ablok-components 0.3.40 → 0.3.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ablok-components.css +1 -1
- package/dist/ablok-components.es.js +7182 -46773
- package/dist/ablok-components.umd.js +4 -179
- package/dist/components/atoms/base-button/base-button.vue.d.ts +1 -1
- package/dist/components/atoms/input-file/input-file.vue.d.ts +9 -9
- package/dist/components/atoms/input-passcode/input-passcode.vue.d.ts +1 -1
- package/dist/components/molecules/auto-suggest/auto-suggest.vue.d.ts +9 -0
- package/dist/components/molecules/base-map/base-map.spec.d.ts +1 -0
- package/dist/components/molecules/base-map/base-map.vue.d.ts +284 -0
- package/dist/components/molecules/hint-system/hint-system.vue.d.ts +1 -1
- package/dist/components/molecules/image-crop/image-crop.vue.d.ts +6 -10
- package/dist/components/molecules/image-crop-resize/image-crop-resize.vue.d.ts +210 -2
- package/dist/components/molecules/image-resize/image-resize.vue.d.ts +420 -4
- package/dist/components/molecules/image-upload/image-upload.vue.d.ts +1 -1
- package/dist/components/molecules/location-list/location-list.vue.d.ts +75 -0
- package/dist/components/molecules/popover-tooltip/popover-tooltip.vue.d.ts +2 -4
- package/dist/components/molecules/progress-steps/progress-steps.vue.d.ts +1 -1
- package/dist/components/molecules/upload-group/upload-group.vue.d.ts +1 -1
- package/dist/components/organisms/asset-uploader/asset-uploader.vue.d.ts +1 -1
- package/dist/components/organisms/location-finder/location-finder.spec.d.ts +1 -0
- package/dist/components/organisms/location-finder/location-finder.vue.d.ts +472 -0
- package/dist/components/templates/modal-dialog/modal-dialog.vue.d.ts +1 -1
- package/dist/composables/useConfetti.d.ts +1 -2
- package/dist/composables/useDirections.d.ts +38 -0
- package/dist/composables/useGeocoding.d.ts +53 -0
- package/dist/composables/useGeolocation.d.ts +20 -0
- package/dist/i18n.d.ts +21 -0
- package/dist/index.d.ts +9 -0
- package/dist/locales/en.d.ts +21 -0
- package/package.json +1 -1
|
@@ -1,179 +1,4 @@
|
|
|
1
|
-
(function(Ge,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(Ge=typeof globalThis<"u"?globalThis:Ge||self,s(Ge.AblokComponents={},Ge.Vue))})(this,(function(Ge,s){"use strict";function aT(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 zh=aT(s),lT={class:"icon",preserveAspectRatio:"xMaxYMin"},cT=["xlink:href"],uT=s.defineComponent({__name:"svg-icon",props:{basePath:{type:String,default:"/symbol-defs.svg"},prefix:{type:String,default:"icon-"},symbol:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("i",{class:s.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(s.openBlock(),s.createElementBlock("svg",lT,[s.createElementVNode("use",{"xlink:href":`${t.basePath}#${t.prefix}${t.symbol}`,"xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0",y:"0"},null,8,cT)]))],2))}}),dT={class:"loading-spinner d-block"},fT=s.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("span",dT,[n[0]||(n[0]=s.createElementVNode("span",{class:"loading-spinner__animation"},[s.createElementVNode("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100"},[s.createElementVNode("path",{d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},[s.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})])])],-1)),s.renderSlot(e.$slots,"default")]))}}),hT=["src","alt"],pT=s.defineComponent({__name:"base-image",props:{src:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},alt:{type:String,default:""},spinner:{type:Boolean,default:!1},zoom:{type:Boolean,default:!1},animate:{type:Boolean,default:!0},ready:{type:Boolean,default:!1},pending:{type:Boolean,default:!1},emitPending:{type:Boolean,default:!0}},emits:["update:ready","update:pending"],setup(t,{emit:e}){const n=t,r=e,A=s.useTemplateRef("image"),i=s.ref(!1);function o(){i.value=!0,A.value?.addEventListener("transitionend",a,{once:!0})}function a(){r("update:ready",!0),n.emitPending&&r("update:pending",!1)}return s.onBeforeMount(()=>{n.emitPending&&r("update:pending",!0)}),(l,u)=>{const d=s.resolveComponent("loading-spinner");return t.src?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["base-image",{"base-image--zoom":t.zoom}])},[t.spinner&&!i.value?(s.openBlock(),s.createBlock(d,{key:0})):s.createCommentVNode("",!0),s.createElementVNode("img",{ref_key:"image",ref:A,class:s.normalizeClass(["",{"opacity-0":t.animate&&!i.value,"opacity-1":!t.animate||i.value}]),src:t.src,alt:t.alt,onLoad:o},null,42,hT)],2)):s.createCommentVNode("",!0)}}}),mT=["innerHTML"],gT=s.defineComponent({__name:"base-headline",props:{tag:{},size:{},variant:{},text:{},className:{}},setup(t){const e=t,n=s.computed(()=>e.tag||"p");return(r,A)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.value),{class:s.normalizeClass(["headline",`${t.size} headline--${t.size}${t.className||""}`])},{default:s.withCtx(()=>[s.renderSlot(r.$slots,"default",{},()=>[s.createElementVNode("span",{class:"headline__text",innerHTML:t.text},null,8,mT)])]),_:3},8,["class"]))}});const{entries:dB,setPrototypeOf:fB,isFrozen:vT,getPrototypeOf:wT,getOwnPropertyDescriptor:BT}=Object;let{freeze:ar,seal:qr,create:Wh}=Object,{apply:Gh,construct:Yh}=typeof Reflect<"u"&&Reflect;ar||(ar=function(e){return e}),qr||(qr=function(e){return e}),Gh||(Gh=function(e,n){for(var r=arguments.length,A=new Array(r>2?r-2:0),i=2;i<r;i++)A[i-2]=arguments[i];return e.apply(n,A)}),Yh||(Yh=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),A=1;A<n;A++)r[A-1]=arguments[A];return new e(...r)});const Wc=cr(Array.prototype.forEach),yT=cr(Array.prototype.lastIndexOf),hB=cr(Array.prototype.pop),nl=cr(Array.prototype.push),CT=cr(Array.prototype.splice),Gc=cr(String.prototype.toLowerCase),qh=cr(String.prototype.toString),Xh=cr(String.prototype.match),rl=cr(String.prototype.replace),bT=cr(String.prototype.indexOf),ET=cr(String.prototype.trim),BA=cr(Object.prototype.hasOwnProperty),lr=cr(RegExp.prototype.test),Al=kT(TypeError);function cr(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),A=1;A<n;A++)r[A-1]=arguments[A];return Gh(t,e,r)}}function kT(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Yh(t,n)}}function dt(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Gc;fB&&fB(t,null);let r=e.length;for(;r--;){let A=e[r];if(typeof A=="string"){const i=n(A);i!==A&&(vT(e)||(e[r]=i),A=i)}t[A]=!0}return t}function ST(t){for(let e=0;e<t.length;e++)BA(t,e)||(t[e]=null);return t}function zA(t){const e=Wh(null);for(const[n,r]of dB(t))BA(t,n)&&(Array.isArray(r)?e[n]=ST(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=zA(r):e[n]=r);return e}function il(t,e){for(;t!==null;){const r=BT(t,e);if(r){if(r.get)return cr(r.get);if(typeof r.value=="function")return cr(r.value)}t=wT(t)}function n(){return null}return n}const pB=ar(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Jh=ar(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),jh=ar(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),xT=ar(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Zh=ar(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),FT=ar(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),mB=ar(["#text"]),gB=ar(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Vh=ar(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),vB=ar(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Yc=ar(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),QT=qr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),TT=qr(/<%[\w\W]*|[\w\W]*%>/gm),MT=qr(/\$\{[\w\W]*/gm),IT=qr(/^data-[\-\w.\u00B7-\uFFFF]+$/),UT=qr(/^aria-[\-\w]+$/),wB=qr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_T=qr(/^(?:\w+script|data):/i),DT=qr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),BB=qr(/^html$/i),OT=qr(/^[a-z][.\w]*(-[.\w]+)+$/i);var yB=Object.freeze({__proto__:null,ARIA_ATTR:UT,ATTR_WHITESPACE:DT,CUSTOM_ELEMENT:OT,DATA_ATTR:IT,DOCTYPE_NAME:BB,ERB_EXPR:TT,IS_ALLOWED_URI:wB,IS_SCRIPT_OR_DATA:_T,MUSTACHE_EXPR:QT,TMPLIT_EXPR:MT});const ol={element:1,text:3,progressingInstruction:7,comment:8,document:9},NT=function(){return typeof window>"u"?null:window},LT=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const A="data-tt-policy-suffix";n&&n.hasAttribute(A)&&(r=n.getAttribute(A));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},CB=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function bB(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:NT();const e=Re=>bB(Re);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==ol.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,A=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:a,Element:l,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:p,trustedTypes:m}=t,v=l.prototype,B=il(v,"cloneNode"),y=il(v,"remove"),w=il(v,"nextSibling"),C=il(v,"childNodes"),k=il(v,"parentNode");if(typeof o=="function"){const Re=n.createElement("template");Re.content&&Re.content.ownerDocument&&(n=Re.content.ownerDocument)}let F,U="";const{implementation:D,createNodeIterator:M,createDocumentFragment:K,getElementsByTagName:q}=n,{importNode:ce}=r;let me=CB();e.isSupported=typeof dB=="function"&&typeof k=="function"&&D&&D.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:ve,ERB_EXPR:Be,TMPLIT_EXPR:te,DATA_ATTR:V,ARIA_ATTR:Y,IS_SCRIPT_OR_DATA:x,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:P}=yB;let{IS_ALLOWED_URI:T}=yB,S=null;const G=dt({},[...pB,...Jh,...jh,...Zh,...mB]);let Ae=null;const ne=dt({},[...gB,...Vh,...vB,...Yc]);let ee=Object.seal(Wh(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,pe=null;const de=Object.seal(Wh(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ce=!0,W=!0,j=!1,$=!0,N=!1,R=!0,J=!1,z=!1,le=!1,E=!1,_=!1,O=!1,ie=!0,X=!1;const be="user-content-";let we=!0,ae=!1,he={},xe=null;const Pe=dt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ot=null;const $e=dt({},["audio","video","img","source","image","track"]);let ht=null;const Bt=dt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Et="http://www.w3.org/1998/Math/MathML",En="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml";let Kt=Yt,OA=!1,pi=null;const ze=dt({},[Et,En,Yt],qh);let gn=dt({},["mi","mo","mn","ms","mtext"]),Tn=dt({},["annotation-xml"]);const mi=dt({},["title","style","font","a","script"]);let Br=null;const Ho=["application/xhtml+xml","text/html"],Us="text/html";let nn=null,NA=null;const Fc=n.createElement("form"),Ra=function(se){return se instanceof RegExp||se instanceof Function},_s=function(){let se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(NA&&NA===se)){if((!se||typeof se!="object")&&(se={}),se=zA(se),Br=Ho.indexOf(se.PARSER_MEDIA_TYPE)===-1?Us:se.PARSER_MEDIA_TYPE,nn=Br==="application/xhtml+xml"?qh:Gc,S=BA(se,"ALLOWED_TAGS")?dt({},se.ALLOWED_TAGS,nn):G,Ae=BA(se,"ALLOWED_ATTR")?dt({},se.ALLOWED_ATTR,nn):ne,pi=BA(se,"ALLOWED_NAMESPACES")?dt({},se.ALLOWED_NAMESPACES,qh):ze,ht=BA(se,"ADD_URI_SAFE_ATTR")?dt(zA(Bt),se.ADD_URI_SAFE_ATTR,nn):Bt,ot=BA(se,"ADD_DATA_URI_TAGS")?dt(zA($e),se.ADD_DATA_URI_TAGS,nn):$e,xe=BA(se,"FORBID_CONTENTS")?dt({},se.FORBID_CONTENTS,nn):Pe,re=BA(se,"FORBID_TAGS")?dt({},se.FORBID_TAGS,nn):zA({}),pe=BA(se,"FORBID_ATTR")?dt({},se.FORBID_ATTR,nn):zA({}),he=BA(se,"USE_PROFILES")?se.USE_PROFILES:!1,Ce=se.ALLOW_ARIA_ATTR!==!1,W=se.ALLOW_DATA_ATTR!==!1,j=se.ALLOW_UNKNOWN_PROTOCOLS||!1,$=se.ALLOW_SELF_CLOSE_IN_ATTR!==!1,N=se.SAFE_FOR_TEMPLATES||!1,R=se.SAFE_FOR_XML!==!1,J=se.WHOLE_DOCUMENT||!1,E=se.RETURN_DOM||!1,_=se.RETURN_DOM_FRAGMENT||!1,O=se.RETURN_TRUSTED_TYPE||!1,le=se.FORCE_BODY||!1,ie=se.SANITIZE_DOM!==!1,X=se.SANITIZE_NAMED_PROPS||!1,we=se.KEEP_CONTENT!==!1,ae=se.IN_PLACE||!1,T=se.ALLOWED_URI_REGEXP||wB,Kt=se.NAMESPACE||Yt,gn=se.MATHML_TEXT_INTEGRATION_POINTS||gn,Tn=se.HTML_INTEGRATION_POINTS||Tn,ee=se.CUSTOM_ELEMENT_HANDLING||{},se.CUSTOM_ELEMENT_HANDLING&&Ra(se.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ee.tagNameCheck=se.CUSTOM_ELEMENT_HANDLING.tagNameCheck),se.CUSTOM_ELEMENT_HANDLING&&Ra(se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ee.attributeNameCheck=se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),se.CUSTOM_ELEMENT_HANDLING&&typeof se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ee.allowCustomizedBuiltInElements=se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),N&&(W=!1),_&&(E=!0),he&&(S=dt({},mB),Ae=[],he.html===!0&&(dt(S,pB),dt(Ae,gB)),he.svg===!0&&(dt(S,Jh),dt(Ae,Vh),dt(Ae,Yc)),he.svgFilters===!0&&(dt(S,jh),dt(Ae,Vh),dt(Ae,Yc)),he.mathMl===!0&&(dt(S,Zh),dt(Ae,vB),dt(Ae,Yc))),se.ADD_TAGS&&(typeof se.ADD_TAGS=="function"?de.tagCheck=se.ADD_TAGS:(S===G&&(S=zA(S)),dt(S,se.ADD_TAGS,nn))),se.ADD_ATTR&&(typeof se.ADD_ATTR=="function"?de.attributeCheck=se.ADD_ATTR:(Ae===ne&&(Ae=zA(Ae)),dt(Ae,se.ADD_ATTR,nn))),se.ADD_URI_SAFE_ATTR&&dt(ht,se.ADD_URI_SAFE_ATTR,nn),se.FORBID_CONTENTS&&(xe===Pe&&(xe=zA(xe)),dt(xe,se.FORBID_CONTENTS,nn)),se.ADD_FORBID_CONTENTS&&(xe===Pe&&(xe=zA(xe)),dt(xe,se.ADD_FORBID_CONTENTS,nn)),we&&(S["#text"]=!0),J&&dt(S,["html","head","body"]),S.table&&(dt(S,["tbody"]),delete re.tbody),se.TRUSTED_TYPES_POLICY){if(typeof se.TRUSTED_TYPES_POLICY.createHTML!="function")throw Al('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof se.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Al('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');F=se.TRUSTED_TYPES_POLICY,U=F.createHTML("")}else F===void 0&&(F=LT(m,A)),F!==null&&typeof U=="string"&&(U=F.createHTML(""));ar&&ar(se),NA=se}},Po=dt({},[...Jh,...jh,...xT]),Ha=dt({},[...Zh,...FT]),Ds=function(se){let Te=k(se);(!Te||!Te.tagName)&&(Te={namespaceURI:Kt,tagName:"template"});const He=Gc(se.tagName),zt=Gc(Te.tagName);return pi[se.namespaceURI]?se.namespaceURI===En?Te.namespaceURI===Yt?He==="svg":Te.namespaceURI===Et?He==="svg"&&(zt==="annotation-xml"||gn[zt]):!!Po[He]:se.namespaceURI===Et?Te.namespaceURI===Yt?He==="math":Te.namespaceURI===En?He==="math"&&Tn[zt]:!!Ha[He]:se.namespaceURI===Yt?Te.namespaceURI===En&&!Tn[zt]||Te.namespaceURI===Et&&!gn[zt]?!1:!Ha[He]&&(mi[He]||!Po[He]):!!(Br==="application/xhtml+xml"&&pi[se.namespaceURI]):!1},Qr=function(se){nl(e.removed,{element:se});try{k(se).removeChild(se)}catch{y(se)}},LA=function(se,Te){try{nl(e.removed,{attribute:Te.getAttributeNode(se),from:Te})}catch{nl(e.removed,{attribute:null,from:Te})}if(Te.removeAttribute(se),se==="is")if(E||_)try{Qr(Te)}catch{}else try{Te.setAttribute(se,"")}catch{}},ge=function(se){let Te=null,He=null;if(le)se="<remove></remove>"+se;else{const ln=Xh(se,/^[\r\n\t ]+/);He=ln&&ln[0]}Br==="application/xhtml+xml"&&Kt===Yt&&(se='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+se+"</body></html>");const zt=F?F.createHTML(se):se;if(Kt===Yt)try{Te=new p().parseFromString(zt,Br)}catch{}if(!Te||!Te.documentElement){Te=D.createDocument(Kt,"template",null);try{Te.documentElement.innerHTML=OA?U:zt}catch{}}const vn=Te.body||Te.documentElement;return se&&He&&vn.insertBefore(n.createTextNode(He),vn.childNodes[0]||null),Kt===Yt?q.call(Te,J?"html":"body")[0]:J?Te.documentElement:vn},Ie=function(se){return M.call(se.ownerDocument||se,se,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},We=function(se){return se instanceof h&&(typeof se.nodeName!="string"||typeof se.textContent!="string"||typeof se.removeChild!="function"||!(se.attributes instanceof d)||typeof se.removeAttribute!="function"||typeof se.setAttribute!="function"||typeof se.namespaceURI!="string"||typeof se.insertBefore!="function"||typeof se.hasChildNodes!="function")},At=function(se){return typeof a=="function"&&se instanceof a};function bt(Re,se,Te){Wc(Re,He=>{He.call(e,se,Te,NA)})}const Pr=function(se){let Te=null;if(bt(me.beforeSanitizeElements,se,null),We(se))return Qr(se),!0;const He=nn(se.nodeName);if(bt(me.uponSanitizeElement,se,{tagName:He,allowedTags:S}),R&&se.hasChildNodes()&&!At(se.firstElementChild)&&lr(/<[/\w!]/g,se.innerHTML)&&lr(/<[/\w!]/g,se.textContent)||se.nodeType===ol.progressingInstruction||R&&se.nodeType===ol.comment&&lr(/<[/\w]/g,se.data))return Qr(se),!0;if(!(de.tagCheck instanceof Function&&de.tagCheck(He))&&(!S[He]||re[He])){if(!re[He]&&gi(He)&&(ee.tagNameCheck instanceof RegExp&&lr(ee.tagNameCheck,He)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(He)))return!1;if(we&&!xe[He]){const zt=k(se)||se.parentNode,vn=C(se)||se.childNodes;if(vn&&zt){const ln=vn.length;for(let ir=ln-1;ir>=0;--ir){const RA=B(vn[ir],!0);RA.__removalCount=(se.__removalCount||0)+1,zt.insertBefore(RA,w(se))}}}return Qr(se),!0}return se instanceof l&&!Ds(se)||(He==="noscript"||He==="noembed"||He==="noframes")&&lr(/<\/no(script|embed|frames)/i,se.innerHTML)?(Qr(se),!0):(N&&se.nodeType===ol.text&&(Te=se.textContent,Wc([ve,Be,te],zt=>{Te=rl(Te,zt," ")}),se.textContent!==Te&&(nl(e.removed,{element:se.cloneNode()}),se.textContent=Te)),bt(me.afterSanitizeElements,se,null),!1)},uA=function(se,Te,He){if(ie&&(Te==="id"||Te==="name")&&(He in n||He in Fc))return!1;if(!(W&&!pe[Te]&&lr(V,Te))){if(!(Ce&&lr(Y,Te))){if(!(de.attributeCheck instanceof Function&&de.attributeCheck(Te,se))){if(!Ae[Te]||pe[Te]){if(!(gi(se)&&(ee.tagNameCheck instanceof RegExp&&lr(ee.tagNameCheck,se)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(se))&&(ee.attributeNameCheck instanceof RegExp&&lr(ee.attributeNameCheck,Te)||ee.attributeNameCheck instanceof Function&&ee.attributeNameCheck(Te,se))||Te==="is"&&ee.allowCustomizedBuiltInElements&&(ee.tagNameCheck instanceof RegExp&&lr(ee.tagNameCheck,He)||ee.tagNameCheck instanceof Function&&ee.tagNameCheck(He))))return!1}else if(!ht[Te]){if(!lr(T,rl(He,Q,""))){if(!((Te==="src"||Te==="xlink:href"||Te==="href")&&se!=="script"&&bT(He,"data:")===0&&ot[se])){if(!(j&&!lr(x,rl(He,Q,"")))){if(He)return!1}}}}}}}return!0},gi=function(se){return se!=="annotation-xml"&&Xh(se,P)},Ki=function(se){bt(me.beforeSanitizeAttributes,se,null);const{attributes:Te}=se;if(!Te||We(se))return;const He={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae,forceKeepAttr:void 0};let zt=Te.length;for(;zt--;){const vn=Te[zt],{name:ln,namespaceURI:ir,value:RA}=vn,Wi=nn(ln),Pa=RA;let kn=ln==="value"?Pa:ET(Pa);if(He.attrName=Wi,He.attrValue=kn,He.keepAttr=!0,He.forceKeepAttr=void 0,bt(me.uponSanitizeAttribute,se,He),kn=He.attrValue,X&&(Wi==="id"||Wi==="name")&&(LA(ln,se),kn=be+kn),R&&lr(/((--!?|])>)|<\/(style|title|textarea)/i,kn)){LA(ln,se);continue}if(Wi==="attributename"&&Xh(kn,"href")){LA(ln,se);continue}if(He.forceKeepAttr)continue;if(!He.keepAttr){LA(ln,se);continue}if(!$&&lr(/\/>/i,kn)){LA(ln,se);continue}N&&Wc([ve,Be,te],rh=>{kn=rl(kn,rh," ")});const nh=nn(se.nodeName);if(!uA(nh,Wi,kn)){LA(ln,se);continue}if(F&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!ir)switch(m.getAttributeType(nh,Wi)){case"TrustedHTML":{kn=F.createHTML(kn);break}case"TrustedScriptURL":{kn=F.createScriptURL(kn);break}}if(kn!==Pa)try{ir?se.setAttributeNS(ir,ln,kn):se.setAttribute(ln,kn),We(se)?Qr(se):hB(e.removed)}catch{LA(ln,se)}}bt(me.afterSanitizeAttributes,se,null)},zi=function Re(se){let Te=null;const He=Ie(se);for(bt(me.beforeSanitizeShadowDOM,se,null);Te=He.nextNode();)bt(me.uponSanitizeShadowNode,Te,null),Pr(Te),Ki(Te),Te.content instanceof i&&Re(Te.content);bt(me.afterSanitizeShadowDOM,se,null)};return e.sanitize=function(Re){let se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Te=null,He=null,zt=null,vn=null;if(OA=!Re,OA&&(Re="<!-->"),typeof Re!="string"&&!At(Re))if(typeof Re.toString=="function"){if(Re=Re.toString(),typeof Re!="string")throw Al("dirty is not a string, aborting")}else throw Al("toString is not a function");if(!e.isSupported)return Re;if(z||_s(se),e.removed=[],typeof Re=="string"&&(ae=!1),ae){if(Re.nodeName){const RA=nn(Re.nodeName);if(!S[RA]||re[RA])throw Al("root node is forbidden and cannot be sanitized in-place")}}else if(Re instanceof a)Te=ge("<!---->"),He=Te.ownerDocument.importNode(Re,!0),He.nodeType===ol.element&&He.nodeName==="BODY"||He.nodeName==="HTML"?Te=He:Te.appendChild(He);else{if(!E&&!N&&!J&&Re.indexOf("<")===-1)return F&&O?F.createHTML(Re):Re;if(Te=ge(Re),!Te)return E?null:O?U:""}Te&&le&&Qr(Te.firstChild);const ln=Ie(ae?Re:Te);for(;zt=ln.nextNode();)Pr(zt),Ki(zt),zt.content instanceof i&&zi(zt.content);if(ae)return Re;if(E){if(_)for(vn=K.call(Te.ownerDocument);Te.firstChild;)vn.appendChild(Te.firstChild);else vn=Te;return(Ae.shadowroot||Ae.shadowrootmode)&&(vn=ce.call(r,vn,!0)),vn}let ir=J?Te.outerHTML:Te.innerHTML;return J&&S["!doctype"]&&Te.ownerDocument&&Te.ownerDocument.doctype&&Te.ownerDocument.doctype.name&&lr(BB,Te.ownerDocument.doctype.name)&&(ir="<!DOCTYPE "+Te.ownerDocument.doctype.name+`>
|
|
2
|
-
`+ir),N&&Wc([ve,Be,te],RA=>{ir=rl(ir,RA," ")}),F&&O?F.createHTML(ir):ir},e.setConfig=function(){let Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_s(Re),z=!0},e.clearConfig=function(){NA=null,z=!1},e.isValidAttribute=function(Re,se,Te){NA||_s({});const He=nn(Re),zt=nn(se);return uA(He,zt,Te)},e.addHook=function(Re,se){typeof se=="function"&&nl(me[Re],se)},e.removeHook=function(Re,se){if(se!==void 0){const Te=yT(me[Re],se);return Te===-1?void 0:CT(me[Re],Te,1)[0]}return hB(me[Re])},e.removeHooks=function(Re){me[Re]=[]},e.removeAllHooks=function(){me=CB()},e}var EB=bB();function qc(t){return s.computed(()=>{const e=typeof t=="function"?t():typeof t=="string"?t:t.value;return EB.sanitize(e,{ALLOWED_TAGS:["b","i","em","strong","u","span","p","br","a","ul","ol","li","h1","h2","h3","h4","h5","h6","article","div","label"],ALLOWED_ATTR:["class","id","href","target","rel","title","data-countdown"],ALLOW_DATA_ATTR:!0})})}function ur(t){return EB.sanitize(t,{ALLOWED_TAGS:["b","i","em","strong","u","span","p","br","a","ul","ol","li","h1","h2","h3","h4","h5","h6","article","div","label"],ALLOWED_ATTR:["class","id","href","target","rel","title","data-countdown","v-modal"],ALLOW_DATA_ATTR:!0})}const RT=["innerHTML"],HT=s.defineComponent({__name:"base-paragraph",props:{size:{},variant:{},text:{},className:{}},setup(t){const e=t;return qc(()=>e.text||""),(n,r)=>(s.openBlock(),s.createElementBlock("p",{class:s.normalizeClass(["base-paragraph",`${t.size||""} ${t.className||""}`]),innerHTML:t.text},null,10,RT))}});function gt(){return Math.random().toString(16).slice(2)}async function Xc(t){return await new Promise(e=>{let n=new FileReader;n.onload=()=>e(n.result),n.readAsDataURL(t)})}function PT(t){const e=atob(t.split(",")[1]),n=new ArrayBuffer(e.length),r=new Uint8Array(n);for(let A=0;A<e.length;A++)r[A]=e.charCodeAt(A);return new Blob([n],{type:"image/png"})}function $T(t){return{"image/jpeg":"jpg","image/jpg":"jpg","image/png":"png","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","application/pdf":"pdf","video/mp4":"mp4","video/webm":"webm","video/ogg":"ogg"}[t]||"bin"}async function kB(t,e,n){const r=$T(n),i=e.includes(".")?e:`${e}.${r}`;return fetch(t).then(function(o){return o.arrayBuffer()}).then(function(o){return new File([o],i,{type:n})})}async function KT(t){return await new Promise((e,n)=>{const r=new Image;r.onload=()=>e(r),r.onerror=A=>n(A),r.src=t})}function SB(t,e,n,r="image/png",A){const i=document.createElement("canvas");i.width=e,i.height=n;const o=i.getContext("2d");return o?(o.drawImage(t,0,0,e,n),i.toDataURL(r,A)):t.src}async function zT(t,e,n){const r=(t.type||"").toLowerCase();if(!(r.startsWith("image/")&&r!=="image/svg+xml"))return t;const i=await Xc(t),o=await KT(i),a=o.naturalWidth,l=o.naturalHeight;if(!a||a<=e)return t;const u=Math.round(e),d=l/a,h=Math.round(u*d),p=SB(o,u,h,t.type||"image/png",n);return await kB(p,t.name,t.type||"image/png")}function xB(t){return!t||typeof t!="string"?"":t.replace(/\0/g,"").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/on\w+\s*=\s*["'][^"']*["']/gi,"").replace(/on\w+\s*=\s*[^\s>]*/gi,"").replace(/javascript:/gi,"").replace(/data:text\/html/gi,"")}const WT={class:"accordion-item"},GT=["id"],YT=["data-bs-target","aria-controls"],qT={class:"flex-grow-1"},XT=["id","aria-labelledby","data-bs-parent"],JT=["innerHTML"],jT=s.defineComponent({__name:"accordion-item",props:{id:{type:String,default:()=>gt()},modelValue:{type:Boolean,default:!1},title:{type:String,default:"Accordion Title"},body:{type:String,default:"<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nisi aut, nobis inventore repudiandae quo laboriosam. Dicta placeat ullam harum optio expedita. Harum fugiat suscipit sapiente quos, molestias neque eaque omnis?</p>"},parent:{type:String,default:""},noPadding:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=qc(()=>n.body);function i(){r("update:modelValue",!n.modelValue)}return(o,a)=>(s.openBlock(),s.createElementBlock("div",WT,[s.createElementVNode("div",{class:"accordion-header",id:`heading-${t.id}`},[s.createElementVNode("button",{class:s.normalizeClass(["accordion-button",!t.modelValue&&"collapsed"]),type:"button","data-bs-toggle":"collapse","data-bs-target":`#target${t.id}`,"aria-expanded":"true","aria-controls":`target${t.id}`,onClick:i},[s.renderSlot(o.$slots,"toggle",{},()=>[s.createElementVNode("span",qT,s.toDisplayString(t.title),1)])],10,YT)],8,GT),s.createElementVNode("div",{class:s.normalizeClass(["accordion-collapse collapse",t.modelValue&&"show"]),id:`target${t.id}`,"aria-labelledby":`heading${t.id}`,"data-bs-parent":t.parent},[s.createElementVNode("div",{class:s.normalizeClass(["accordion-body",t.noPadding?"p-0":""])},[s.renderSlot(o.$slots,"body",{},()=>[s.createElementVNode("article",{innerHTML:s.unref(A)},null,8,JT)])],2)],10,XT)]))}}),ZT=(t,e)=>{const n=t.__vccOpts||t;for(const[r,A]of e)n[r]=A;return n},VT={},eM={class:"accordion"};function tM(t,e){return s.openBlock(),s.createElementBlock("div",eM,[s.renderSlot(t.$slots,"default")])}const nM=ZT(VT,[["render",tM]]),rM=["type","disabled"],AM=s.defineComponent({__name:"base-button",props:{type:{type:null},caption:{type:String},variant:{type:String},color:{type:String,default:"primary"},size:{type:String},icon:{type:String},disabled:{type:Boolean,default:!1},pending:{type:Boolean,default:!1},success:{type:Boolean,default:!1},error:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},circle:{type:Boolean,default:!1}},setup(t){const e=t,n=s.computed(()=>e.caption&&!e.circle);return(r,A)=>{const i=s.resolveComponent("loading-spinner"),o=s.resolveComponent("svg-icon");return s.openBlock(),s.createElementBlock("button",{type:t.type,disabled:t.disabled,class:s.normalizeClass(["btn",{disabled:t.disabled,pending:t.pending,rounded:t.rounded,"rounded-circle":t.circle,[`btn-${t.color}`]:!t.outlined,[`btn-outline-${t.color}`]:t.outlined,"btn-lg":t.size==="large","btn-sm":t.size==="small"}])},[t.pending?s.renderSlot(r.$slots,"pending-icon",{key:0},()=>[s.createVNode(i)]):s.createCommentVNode("",!0),s.renderSlot(r.$slots,"default",{},()=>[t.icon?(s.openBlock(),s.createBlock(o,{key:0,symbol:t.icon,class:"base-button__caption"},null,8,["symbol"])):s.createCommentVNode("",!0),n.value?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["base-button__caption",{"icon-padding":t.icon}])},s.toDisplayString(t.caption),3)):s.createCommentVNode("",!0)])],10,rM)}}}),iM={class:"input-group input__input-group"},oM=["type","id","name","placeholder","pattern","disabled","readonly","required","maxlength","true-value","false-value","aria-label","role","autocomplete"],sM=["for","innerHTML"],aM={key:0,class:"input__error alert alert-danger mt-3"},lM=s.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},min:{type:Number},max:{type:Number},maxlength:{type:Number},pattern:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},role:{type:String,default:"presentation"},autocomplete:{type:String,default:"off"},validate:{type:Boolean,default:!1},valid:{type:Boolean,default:!0},sanitize:{type:Boolean,default:!0}},emits:["update:modelValue","update:valid"],setup(t,{emit:e}){const n=t,r=e,A=s.useTemplateRef("input"),i=s.ref(n.valid),o=s.ref(),a=s.computed(()=>ur(`${n.label}${n.required?" *":""}`)),l=s.computed({get(){return n.modelValue},set(h){h=n.type==="number"?n.max&&Number(h)>n.max?n.max:n.min!==void 0&&Number(h)<n.min?n.min:Number(h):h,n.sanitize&&typeof h=="string"&&!["checkbox","radio","number","date","datetime-local","time","month","week","email","tel","url"].includes(n.type)&&(h=xB(h)),r("update:modelValue",h)}}),u=s.computed(()=>{if(n.type==="number"){const{min:h,max:p}=n;return{...h!==void 0?{min:h}:{},...p!==void 0?{max:p}:{}}}return{}});function d(){n.validate&&A.value&&(i.value=A.value.checkValidity(),i.value?o.value=void 0:o.value=A.value.validationMessage,r("update:valid",i.value))}return s.watch(()=>n.modelValue,()=>{i.value===!1&&d()}),s.onMounted(()=>{let h=p=>{l.value=typeof p.detail=="string"||typeof p.detail=="number"?`${p.detail}`:""};A.value?.addEventListener("focusin",p=>{window.addEventListener("update-focussed-input",h)}),A.value?.addEventListener("focusout",p=>{window.removeEventListener("update-focussed-input",h)}),d()}),(h,p)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["input",`input--${t.type}${i.value?"":" input--invalid"}`])},[s.createElementVNode("div",iM,[s.renderSlot(h.$slots,"input-prepend",{slotScope:"props"}),s.withDirectives(s.createElementVNode("input",s.mergeProps({ref_key:"input",ref:A,"onUpdate:modelValue":p[0]||(p[0]=m=>l.value=m),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,readonly:t.readOnly,required:t.required,maxlength:t.maxlength},u.value,{"true-value":t.trueValue,"false-value":t.falseValue,class:["form-control",{"form-check-input":t.type==="checkbox"}],"aria-label":t.label,role:t.role,autocomplete:t.autocomplete,onChange:d}),null,16,oM),[[s.vModelDynamic,l.value]]),s.renderSlot(h.$slots,"input-append",{slotScope:"props"})]),s.renderSlot(h.$slots,"label",{},()=>[t.label?(s.openBlock(),s.createElementBlock("label",{key:0,for:t.id,class:s.normalizeClass(["input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:a.value},null,10,sM)):s.createCommentVNode("",!0)]),s.createVNode(s.Transition,{name:"fade"},{default:s.withCtx(()=>[!i.value&&o.value?(s.openBlock(),s.createElementBlock("div",aM,s.toDisplayString(o.value),1)):s.createCommentVNode("",!0)]),_:1})],2))}}),cM={class:"input input--textarea"},uM=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","aria-label"],dM=["for","innerHTML"],fM=s.defineComponent({__name:"input-textarea",props:{modelValue:{type:String,default:""},type:{type:String,default:"text"},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1},sanitize:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.computed({get(){return n.modelValue},set(i){n.sanitize&&typeof i=="string"&&(i=xB(i)),r("update:modelValue",i)}});return(i,o)=>(s.openBlock(),s.createElementBlock("div",cM,[s.renderSlot(i.$slots,"input-prepend"),s.withDirectives(s.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=a=>A.value=a),type:t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,class:s.normalizeClass(["form-control",{}]),"aria-label":t.label},null,8,uM),[[s.vModelText,A.value]]),s.renderSlot(i.$slots,"input-append"),s.renderSlot(i.$slots,"label",{},()=>[s.createElementVNode("label",{for:t.id,class:s.normalizeClass(["input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:`${t.label}${t.required?" *":""}`},null,10,dM)])]))}}),hM={class:"form-check input input--checkbox"},pM=["value","id","name","required","disabled","true-value","false-value"],mM=["for","innerHTML"],gM=s.defineComponent({__name:"input-checkbox",props:{id:{type:String},name:{type:String},label:{type:String},error:{type:String},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},modelValue:{type:[Boolean,Array]},value:{type:[String,Object]},checked:{type:Boolean},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},emits:["update:modelValue","update:checked"],setup(t,{emit:e}){const n=t,r=e,A=s.computed({get(){return n.modelValue||n.checked},set(i){r("update:checked",i),r("update:modelValue",i)}});return(i,o)=>(s.openBlock(),s.createElementBlock("div",hM,[s.withDirectives(s.createElementVNode("input",{ref:"input","onUpdate:modelValue":o[0]||(o[0]=a=>A.value=a),value:t.value,id:t.id,name:t.name,type:"checkbox",required:t.required,disabled:t.disabled,class:"form-check-input","true-value":t.trueValue,"false-value":t.falseValue},null,8,pM),[[s.vModelCheckbox,A.value]]),s.createElementVNode("label",{class:"input__label form-check-label",for:t.id,innerHTML:s.unref(ur)(t.label||"")},null,8,mM)]))}}),vM={class:"input-group input__input-group"},wM=["id","name","placeholder","pattern","disabled","read-only","required","aria-label"],BM=["for","innerHTML"],yM=s.defineComponent({__name:"input-datetime",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.computed({get(){const i=n.modelValue&&new Date(`${n.modelValue}Z`),o=i&&new Date(i.getTime()+new Date().getTimezoneOffset()*-60*1e3).toISOString();return o&&o.replace("Z","")},set(i){const o=i&&new Date(i);i=o&&o.toISOString(),r("update:modelValue",i&&i.replace("Z",""))}});return(i,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["input",`input--${t.type}`])},[s.createElementVNode("div",vM,[s.renderSlot(i.$slots,"input-prepend",{slotScope:"props"}),s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=a=>A.value=a),type:"datetime-local",id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,class:"form-control","aria-label":t.label},null,8,wM),[[s.vModelText,A.value]]),s.renderSlot(i.$slots,"input-append",{slotScope:"props"})]),s.renderSlot(i.$slots,"label",{},()=>[t.label?(s.openBlock(),s.createElementBlock("label",{key:0,for:t.id,class:"input__label",innerHTML:s.unref(ur)(`${t.label}${t.required?" *":""}`)},null,8,BM)):s.createCommentVNode("",!0)])],2))}}),CM=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bM=Object.prototype.toString,EM=t=>bM.call(t)==="[object Object]",Jc=()=>{};function ep(t){return Array.isArray(t)?t:[t]}function kM(t,e,n){return s.watch(t,e,{...n,immediate:!0})}const FB=CM?window:void 0;function _r(t){var e;const n=s.toValue(t);return(e=n?.$el)!==null&&e!==void 0?e:n}function Ws(...t){const e=(r,A,i,o)=>(r.addEventListener(A,i,o),()=>r.removeEventListener(A,i,o)),n=s.computed(()=>{const r=ep(s.toValue(t[0])).filter(A=>A!=null);return r.every(A=>typeof A!="string")?r:void 0});return kM(()=>{var r,A;return[(r=(A=n.value)===null||A===void 0?void 0:A.map(i=>_r(i)))!==null&&r!==void 0?r:[FB].filter(i=>i!=null),ep(s.toValue(n.value?t[1]:t[0])),ep(s.unref(n.value?t[2]:t[1])),s.toValue(n.value?t[3]:t[2])]},([r,A,i,o],a,l)=>{if(!r?.length||!A?.length||!i?.length)return;const u=EM(o)?{...o}:o,d=r.flatMap(h=>A.flatMap(p=>i.map(m=>e(h,p,m,u))));l(()=>{d.forEach(h=>h())})},{flush:"post"})}function SM(t,e,n={}){const{window:r=FB,ignore:A=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=n;if(!r)return a?{stop:Jc,cancel:Jc,trigger:Jc}:Jc;let l=!0;const u=y=>s.toValue(A).some(w=>{if(typeof w=="string")return Array.from(r.document.querySelectorAll(w)).some(C=>C===y.target||y.composedPath().includes(C));{const C=_r(w);return C&&(y.target===C||y.composedPath().includes(C))}});function d(y){const w=s.toValue(y);return w&&w.$.subTree.shapeFlag===16}function h(y,w){const C=s.toValue(y),k=C.$.subTree&&C.$.subTree.children;return k==null||!Array.isArray(k)?!1:k.some(F=>F.el===w.target||w.composedPath().includes(F.el))}const p=y=>{const w=_r(t);if(y.target!=null&&!(!(w instanceof Element)&&d(t)&&h(t,y))&&!(!w||w===y.target||y.composedPath().includes(w))){if("detail"in y&&y.detail===0&&(l=!u(y)),!l){l=!0;return}e(y)}};let m=!1;const v=[Ws(r,"click",y=>{m||(m=!0,setTimeout(()=>{m=!1},0),p(y))},{passive:!0,capture:i}),Ws(r,"pointerdown",y=>{const w=_r(t);l=!u(y)&&!!(w&&!y.composedPath().includes(w))},{passive:!0}),o&&Ws(r,"blur",y=>{setTimeout(()=>{var w;const C=_r(t);((w=r.document.activeElement)===null||w===void 0?void 0:w.tagName)==="IFRAME"&&!C?.contains(r.document.activeElement)&&e(y)},0)},{passive:!0})].filter(Boolean),B=()=>v.forEach(y=>y());return a?{stop:B,cancel:()=>{l=!1},trigger:y=>{l=!0,p(y),l=!1}}:B}function xM(t,e={}){const{threshold:n=50,onSwipe:r,onSwipeEnd:A,onSwipeStart:i,passive:o=!0}=e,a=s.reactive({x:0,y:0}),l=s.reactive({x:0,y:0}),u=s.computed(()=>a.x-l.x),d=s.computed(()=>a.y-l.y),{max:h,abs:p}=Math,m=s.computed(()=>h(p(u.value),p(d.value))>=n),v=s.shallowRef(!1),B=s.computed(()=>m.value?p(u.value)>p(d.value)?u.value>0?"left":"right":d.value>0?"up":"down":"none"),y=M=>[M.touches[0].clientX,M.touches[0].clientY],w=(M,K)=>{a.x=M,a.y=K},C=(M,K)=>{l.x=M,l.y=K},k={passive:o,capture:!o},F=M=>{v.value&&A?.(M,B.value),v.value=!1},U=[Ws(t,"touchstart",M=>{if(M.touches.length!==1)return;const[K,q]=y(M);w(K,q),C(K,q),i?.(M)},k),Ws(t,"touchmove",M=>{if(M.touches.length!==1)return;const[K,q]=y(M);C(K,q),k.capture&&!k.passive&&Math.abs(u.value)>Math.abs(d.value)&&M.preventDefault(),!v.value&&m.value&&(v.value=!0),v.value&&r?.(M)},k),Ws(t,["touchend","touchcancel"],F,k)];return{isSwiping:v,direction:B,coordsStart:a,coordsEnd:l,lengthX:u,lengthY:d,stop:()=>U.forEach(M=>M())}}const Gs=Math.min,jo=Math.max,jc=Math.round,Zc=Math.floor,WA=t=>({x:t,y:t}),FM={left:"right",right:"left",bottom:"top",top:"bottom"},QM={start:"end",end:"start"};function tp(t,e,n){return jo(t,Gs(e,n))}function sl(t,e){return typeof t=="function"?t(e):t}function Zo(t){return t.split("-")[0]}function al(t){return t.split("-")[1]}function QB(t){return t==="x"?"y":"x"}function np(t){return t==="y"?"height":"width"}const TM=new Set(["top","bottom"]);function to(t){return TM.has(Zo(t))?"y":"x"}function rp(t){return QB(to(t))}function MM(t,e,n){n===void 0&&(n=!1);const r=al(t),A=rp(t),i=np(A);let o=A==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=Vc(o)),[o,Vc(o)]}function IM(t){const e=Vc(t);return[Ap(t),e,Ap(e)]}function Ap(t){return t.replace(/start|end/g,e=>QM[e])}const TB=["left","right"],MB=["right","left"],UM=["top","bottom"],_M=["bottom","top"];function DM(t,e,n){switch(t){case"top":case"bottom":return n?e?MB:TB:e?TB:MB;case"left":case"right":return e?UM:_M;default:return[]}}function OM(t,e,n,r){const A=al(t);let i=DM(Zo(t),n==="start",r);return A&&(i=i.map(o=>o+"-"+A),e&&(i=i.concat(i.map(Ap)))),i}function Vc(t){return t.replace(/left|right|bottom|top/g,e=>FM[e])}function NM(t){return{top:0,right:0,bottom:0,left:0,...t}}function IB(t){return typeof t!="number"?NM(t):{top:t,right:t,bottom:t,left:t}}function eu(t){const{x:e,y:n,width:r,height:A}=t;return{width:r,height:A,top:n,left:e,right:e+r,bottom:n+A,x:e,y:n}}function UB(t,e,n){let{reference:r,floating:A}=t;const i=to(e),o=rp(e),a=np(o),l=Zo(e),u=i==="y",d=r.x+r.width/2-A.width/2,h=r.y+r.height/2-A.height/2,p=r[a]/2-A[a]/2;let m;switch(l){case"top":m={x:d,y:r.y-A.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-A.width,y:h};break;default:m={x:r.x,y:r.y}}switch(al(e)){case"start":m[o]-=p*(n&&u?-1:1);break;case"end":m[o]+=p*(n&&u?-1:1);break}return m}async function LM(t,e){var n;e===void 0&&(e={});const{x:r,y:A,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:m=0}=sl(e,t),v=IB(m),y=a[p?h==="floating"?"reference":"floating":h],w=eu(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:d,strategy:l})),C=h==="floating"?{x:r,y:A,width:o.floating.width,height:o.floating.height}:o.reference,k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),F=await(i.isElement==null?void 0:i.isElement(k))?await(i.getScale==null?void 0:i.getScale(k))||{x:1,y:1}:{x:1,y:1},U=eu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:k,strategy:l}):C);return{top:(w.top-U.top+v.top)/F.y,bottom:(U.bottom-w.bottom+v.bottom)/F.y,left:(w.left-U.left+v.left)/F.x,right:(U.right-w.right+v.right)/F.x}}const RM=async(t,e,n)=>{const{placement:r="bottom",strategy:A="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:A}),{x:d,y:h}=UB(u,r,l),p=r,m={},v=0;for(let y=0;y<a.length;y++){var B;const{name:w,fn:C}=a[y],{x:k,y:F,data:U,reset:D}=await C({x:d,y:h,initialPlacement:r,placement:p,strategy:A,middlewareData:m,rects:u,platform:{...o,detectOverflow:(B=o.detectOverflow)!=null?B:LM},elements:{reference:t,floating:e}});d=k??d,h=F??h,m={...m,[w]:{...m[w],...U}},D&&v<=50&&(v++,typeof D=="object"&&(D.placement&&(p=D.placement),D.rects&&(u=D.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:A}):D.rects),{x:d,y:h}=UB(u,p,l)),y=-1)}return{x:d,y:h,placement:p,strategy:A,middlewareData:m}},HM=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:A,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:d=0}=sl(t,e)||{};if(u==null)return{};const h=IB(d),p={x:n,y:r},m=rp(A),v=np(m),B=await o.getDimensions(u),y=m==="y",w=y?"top":"left",C=y?"bottom":"right",k=y?"clientHeight":"clientWidth",F=i.reference[v]+i.reference[m]-p[m]-i.floating[v],U=p[m]-i.reference[m],D=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=D?D[k]:0;(!M||!await(o.isElement==null?void 0:o.isElement(D)))&&(M=a.floating[k]||i.floating[v]);const K=F/2-U/2,q=M/2-B[v]/2-1,ce=Gs(h[w],q),me=Gs(h[C],q),ve=ce,Be=M-B[v]-me,te=M/2-B[v]/2+K,V=tp(ve,te,Be),Y=!l.arrow&&al(A)!=null&&te!==V&&i.reference[v]/2-(te<ve?ce:me)-B[v]/2<0,x=Y?te<ve?te-ve:te-Be:0;return{[m]:p[m]+x,data:{[m]:V,centerOffset:te-V-x,...Y&&{alignmentOffset:x}},reset:Y}}}),PM=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:A,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=e,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:B=!0,...y}=sl(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=Zo(A),C=to(a),k=Zo(a)===a,F=await(l.isRTL==null?void 0:l.isRTL(u.floating)),U=p||(k||!B?[Vc(a)]:IM(a)),D=v!=="none";!p&&D&&U.push(...OM(a,B,v,F));const M=[a,...U],K=await l.detectOverflow(e,y),q=[];let ce=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&q.push(K[w]),h){const te=MM(A,o,F);q.push(K[te[0]],K[te[1]])}if(ce=[...ce,{placement:A,overflows:q}],!q.every(te=>te<=0)){var me,ve;const te=(((me=i.flip)==null?void 0:me.index)||0)+1,V=M[te];if(V&&(!(h==="alignment"?C!==to(V):!1)||ce.every(Q=>to(Q.placement)===C?Q.overflows[0]>0:!0)))return{data:{index:te,overflows:ce},reset:{placement:V}};let Y=(ve=ce.filter(x=>x.overflows[0]<=0).sort((x,Q)=>x.overflows[1]-Q.overflows[1])[0])==null?void 0:ve.placement;if(!Y)switch(m){case"bestFit":{var Be;const x=(Be=ce.filter(Q=>{if(D){const P=to(Q.placement);return P===C||P==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(P=>P>0).reduce((P,T)=>P+T,0)]).sort((Q,P)=>Q[1]-P[1])[0])==null?void 0:Be[0];x&&(Y=x);break}case"initialPlacement":Y=a;break}if(A!==Y)return{reset:{placement:Y}}}return{}}}},$M=new Set(["left","top"]);async function KM(t,e){const{placement:n,platform:r,elements:A}=t,i=await(r.isRTL==null?void 0:r.isRTL(A.floating)),o=Zo(n),a=al(n),l=to(n)==="y",u=$M.has(o)?-1:1,d=i&&l?-1:1,h=sl(e,t);let{mainAxis:p,crossAxis:m,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof v=="number"&&(m=a==="end"?v*-1:v),l?{x:m*d,y:p*u}:{x:p*u,y:m*d}}const zM=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:A,y:i,placement:o,middlewareData:a}=e,l=await KM(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:A+l.x,y:i+l.y,data:{...l,placement:o}}}}},WM=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:A,platform:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:C,y:k}=w;return{x:C,y:k}}},...u}=sl(t,e),d={x:n,y:r},h=await i.detectOverflow(e,u),p=to(Zo(A)),m=QB(p);let v=d[m],B=d[p];if(o){const w=m==="y"?"top":"left",C=m==="y"?"bottom":"right",k=v+h[w],F=v-h[C];v=tp(k,v,F)}if(a){const w=p==="y"?"top":"left",C=p==="y"?"bottom":"right",k=B+h[w],F=B-h[C];B=tp(k,B,F)}const y=l.fn({...e,[m]:v,[p]:B});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[m]:o,[p]:a}}}}}};function tu(){return typeof window<"u"}function Vo(t){return ip(t)?(t.nodeName||"").toLowerCase():"#document"}function Dr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function GA(t){var e;return(e=(ip(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ip(t){return tu()?t instanceof Node||t instanceof Dr(t).Node:!1}function yA(t){return tu()?t instanceof Element||t instanceof Dr(t).Element:!1}function YA(t){return tu()?t instanceof HTMLElement||t instanceof Dr(t).HTMLElement:!1}function _B(t){return!tu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Dr(t).ShadowRoot}const GM=new Set(["inline","contents"]);function ll(t){const{overflow:e,overflowX:n,overflowY:r,display:A}=CA(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!GM.has(A)}const YM=new Set(["table","td","th"]);function qM(t){return YM.has(Vo(t))}const XM=[":popover-open",":modal"];function nu(t){return XM.some(e=>{try{return t.matches(e)}catch{return!1}})}const JM=["transform","translate","scale","rotate","perspective"],jM=["transform","translate","scale","rotate","perspective","filter"],ZM=["paint","layout","strict","content"];function op(t){const e=sp(),n=yA(t)?CA(t):t;return JM.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)||jM.some(r=>(n.willChange||"").includes(r))||ZM.some(r=>(n.contain||"").includes(r))}function VM(t){let e=no(t);for(;YA(e)&&!Ys(e);){if(op(e))return e;if(nu(e))return null;e=no(e)}return null}function sp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const eI=new Set(["html","body","#document"]);function Ys(t){return eI.has(Vo(t))}function CA(t){return Dr(t).getComputedStyle(t)}function ru(t){return yA(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function no(t){if(Vo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_B(t)&&t.host||GA(t);return _B(e)?e.host:e}function DB(t){const e=no(t);return Ys(e)?t.ownerDocument?t.ownerDocument.body:t.body:YA(e)&&ll(e)?e:DB(e)}function cl(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const A=DB(t),i=A===((r=t.ownerDocument)==null?void 0:r.body),o=Dr(A);if(i){const a=ap(o);return e.concat(o,o.visualViewport||[],ll(A)?A:[],a&&n?cl(a):[])}return e.concat(A,cl(A,[],n))}function ap(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function OB(t){const e=CA(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const A=YA(t),i=A?t.offsetWidth:n,o=A?t.offsetHeight:r,a=jc(n)!==i||jc(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function lp(t){return yA(t)?t:t.contextElement}function qs(t){const e=lp(t);if(!YA(e))return WA(1);const n=e.getBoundingClientRect(),{width:r,height:A,$:i}=OB(e);let o=(i?jc(n.width):n.width)/r,a=(i?jc(n.height):n.height)/A;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const tI=WA(0);function NB(t){const e=Dr(t);return!sp()||!e.visualViewport?tI:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function nI(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Dr(t)?!1:e}function es(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const A=t.getBoundingClientRect(),i=lp(t);let o=WA(1);e&&(r?yA(r)&&(o=qs(r)):o=qs(t));const a=nI(i,n,r)?NB(i):WA(0);let l=(A.left+a.x)/o.x,u=(A.top+a.y)/o.y,d=A.width/o.x,h=A.height/o.y;if(i){const p=Dr(i),m=r&&yA(r)?Dr(r):r;let v=p,B=ap(v);for(;B&&r&&m!==v;){const y=qs(B),w=B.getBoundingClientRect(),C=CA(B),k=w.left+(B.clientLeft+parseFloat(C.paddingLeft))*y.x,F=w.top+(B.clientTop+parseFloat(C.paddingTop))*y.y;l*=y.x,u*=y.y,d*=y.x,h*=y.y,l+=k,u+=F,v=Dr(B),B=ap(v)}}return eu({width:d,height:h,x:l,y:u})}function Au(t,e){const n=ru(t).scrollLeft;return e?e.left+n:es(GA(t)).left+n}function LB(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-Au(t,n),A=n.top+e.scrollTop;return{x:r,y:A}}function rI(t){let{elements:e,rect:n,offsetParent:r,strategy:A}=t;const i=A==="fixed",o=GA(r),a=e?nu(e.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=WA(1);const d=WA(0),h=YA(r);if((h||!h&&!i)&&((Vo(r)!=="body"||ll(o))&&(l=ru(r)),YA(r))){const m=es(r);u=qs(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=o&&!h&&!i?LB(o,l):WA(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function AI(t){return Array.from(t.getClientRects())}function iI(t){const e=GA(t),n=ru(t),r=t.ownerDocument.body,A=jo(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=jo(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Au(t);const a=-n.scrollTop;return CA(r).direction==="rtl"&&(o+=jo(e.clientWidth,r.clientWidth)-A),{width:A,height:i,x:o,y:a}}const RB=25;function oI(t,e){const n=Dr(t),r=GA(t),A=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(A){i=A.width,o=A.height;const d=sp();(!d||d&&e==="fixed")&&(a=A.offsetLeft,l=A.offsetTop)}const u=Au(r);if(u<=0){const d=r.ownerDocument,h=d.body,p=getComputedStyle(h),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(r.clientWidth-h.clientWidth-m);v<=RB&&(i-=v)}else u<=RB&&(i+=u);return{width:i,height:o,x:a,y:l}}const sI=new Set(["absolute","fixed"]);function aI(t,e){const n=es(t,!0,e==="fixed"),r=n.top+t.clientTop,A=n.left+t.clientLeft,i=YA(t)?qs(t):WA(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=A*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function HB(t,e,n){let r;if(e==="viewport")r=oI(t,n);else if(e==="document")r=iI(GA(t));else if(yA(e))r=aI(e,n);else{const A=NB(t);r={x:e.x-A.x,y:e.y-A.y,width:e.width,height:e.height}}return eu(r)}function PB(t,e){const n=no(t);return n===e||!yA(n)||Ys(n)?!1:CA(n).position==="fixed"||PB(n,e)}function lI(t,e){const n=e.get(t);if(n)return n;let r=cl(t,[],!1).filter(a=>yA(a)&&Vo(a)!=="body"),A=null;const i=CA(t).position==="fixed";let o=i?no(t):t;for(;yA(o)&&!Ys(o);){const a=CA(o),l=op(o);!l&&a.position==="fixed"&&(A=null),(i?!l&&!A:!l&&a.position==="static"&&!!A&&sI.has(A.position)||ll(o)&&!l&&PB(t,o))?r=r.filter(d=>d!==o):A=a,o=no(o)}return e.set(t,r),r}function cI(t){let{element:e,boundary:n,rootBoundary:r,strategy:A}=t;const o=[...n==="clippingAncestors"?nu(e)?[]:lI(e,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,d)=>{const h=HB(e,d,A);return u.top=jo(h.top,u.top),u.right=Gs(h.right,u.right),u.bottom=Gs(h.bottom,u.bottom),u.left=jo(h.left,u.left),u},HB(e,a,A));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function uI(t){const{width:e,height:n}=OB(t);return{width:e,height:n}}function dI(t,e,n){const r=YA(e),A=GA(e),i=n==="fixed",o=es(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=WA(0);function u(){l.x=Au(A)}if(r||!r&&!i)if((Vo(e)!=="body"||ll(A))&&(a=ru(e)),r){const m=es(e,!0,i,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}else A&&u();i&&!r&&A&&u();const d=A&&!r&&!i?LB(A,a):WA(0),h=o.left+a.scrollLeft-l.x-d.x,p=o.top+a.scrollTop-l.y-d.y;return{x:h,y:p,width:o.width,height:o.height}}function cp(t){return CA(t).position==="static"}function $B(t,e){if(!YA(t)||CA(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return GA(t)===n&&(n=n.ownerDocument.body),n}function KB(t,e){const n=Dr(t);if(nu(t))return n;if(!YA(t)){let A=no(t);for(;A&&!Ys(A);){if(yA(A)&&!cp(A))return A;A=no(A)}return n}let r=$B(t,e);for(;r&&qM(r)&&cp(r);)r=$B(r,e);return r&&Ys(r)&&cp(r)&&!op(r)?n:r||VM(t)||n}const fI=async function(t){const e=this.getOffsetParent||KB,n=this.getDimensions,r=await n(t.floating);return{reference:dI(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hI(t){return CA(t).direction==="rtl"}const pI={convertOffsetParentRelativeRectToViewportRelativeRect:rI,getDocumentElement:GA,getClippingRect:cI,getOffsetParent:KB,getElementRects:fI,getClientRects:AI,getDimensions:uI,getScale:qs,isElement:yA,isRTL:hI};function zB(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function mI(t,e){let n=null,r;const A=GA(t);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=t.getBoundingClientRect(),{left:d,top:h,width:p,height:m}=u;if(a||e(),!p||!m)return;const v=Zc(h),B=Zc(A.clientWidth-(d+p)),y=Zc(A.clientHeight-(h+m)),w=Zc(d),k={rootMargin:-v+"px "+-B+"px "+-y+"px "+-w+"px",threshold:jo(0,Gs(1,l))||1};let F=!0;function U(D){const M=D[0].intersectionRatio;if(M!==l){if(!F)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!zB(u,t.getBoundingClientRect())&&o(),F=!1}try{n=new IntersectionObserver(U,{...k,root:A.ownerDocument})}catch{n=new IntersectionObserver(U,k)}n.observe(t)}return o(!0),i}function gI(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:A=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=lp(t),d=A||i?[...u?cl(u):[],...cl(e)]:[];d.forEach(w=>{A&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const h=u&&a?mI(u,n):null;let p=-1,m=null;o&&(m=new ResizeObserver(w=>{let[C]=w;C&&C.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=m)==null||k.observe(e)})),n()}),u&&!l&&m.observe(u),m.observe(e));let v,B=l?es(t):null;l&&y();function y(){const w=es(t);B&&!zB(B,w)&&n(),B=w,v=requestAnimationFrame(y)}return n(),()=>{var w;d.forEach(C=>{A&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),h?.(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(v)}}const vI=zM,wI=WM,BI=PM,yI=HM,CI=(t,e,n)=>{const r=new Map,A={platform:pI,...n},i={...A.platform,_c:r};return RM(t,e,{...A,platform:i})};function bI(t){return t!=null&&typeof t=="object"&&"$el"in t}function up(t){if(bI(t)){const e=t.$el;return ip(e)&&Vo(e)==="#comment"?null:e}return t}function Xs(t){return typeof t=="function"?t():s.unref(t)}function EI(t){return{name:"arrow",options:t,fn(e){const n=up(Xs(t.element));return n==null?{}:yI({element:n,padding:t.padding}).fn(e)}}}function WB(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function GB(t,e){const n=WB(t);return Math.round(e*n)/n}function kI(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,A=s.computed(()=>{var M;return(M=Xs(n.open))!=null?M:!0}),i=s.computed(()=>Xs(n.middleware)),o=s.computed(()=>{var M;return(M=Xs(n.placement))!=null?M:"bottom"}),a=s.computed(()=>{var M;return(M=Xs(n.strategy))!=null?M:"absolute"}),l=s.computed(()=>{var M;return(M=Xs(n.transform))!=null?M:!0}),u=s.computed(()=>up(t.value)),d=s.computed(()=>up(e.value)),h=s.ref(0),p=s.ref(0),m=s.ref(a.value),v=s.ref(o.value),B=s.shallowRef({}),y=s.ref(!1),w=s.computed(()=>{const M={position:m.value,left:"0",top:"0"};if(!d.value)return M;const K=GB(d.value,h.value),q=GB(d.value,p.value);return l.value?{...M,transform:"translate("+K+"px, "+q+"px)",...WB(d.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:K+"px",top:q+"px"}});let C;function k(){if(u.value==null||d.value==null)return;const M=A.value;CI(u.value,d.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(K=>{h.value=K.x,p.value=K.y,m.value=K.strategy,v.value=K.placement,B.value=K.middlewareData,y.value=M!==!1})}function F(){typeof C=="function"&&(C(),C=void 0)}function U(){if(F(),r===void 0){k();return}if(u.value!=null&&d.value!=null){C=r(u.value,d.value,k);return}}function D(){A.value||(y.value=!1)}return s.watch([i,o,a,A],k,{flush:"sync"}),s.watch([u,d],U,{flush:"sync"}),s.watch(A,D,{flush:"sync"}),s.getCurrentScope()&&s.onScopeDispose(F),{x:s.shallowReadonly(h),y:s.shallowReadonly(p),strategy:s.shallowReadonly(m),placement:s.shallowReadonly(v),middlewareData:s.shallowReadonly(B),isPositioned:s.shallowReadonly(y),floatingStyles:w,update:k}}const YB=6048e5,SI=864e5,xI=6e4,FI=36e5,QI=1e3,qB=Symbol.for("constructDateFrom");function _t(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&qB in t?t[qB](e):t instanceof Date?new t.constructor(e):new Date(e)}function Ve(t,e){return _t(e||t,t)}function Xr(t,e,n){const r=Ve(t,n?.in);return isNaN(e)?_t(n?.in||t,NaN):(e&&r.setDate(r.getDate()+e),r)}function bA(t,e,n){const r=Ve(t,n?.in);if(isNaN(e))return _t(t,NaN);if(!e)return r;const A=r.getDate(),i=_t(t,r.getTime());i.setMonth(r.getMonth()+e+1,0);const o=i.getDate();return A>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),A),r)}function XB(t,e,n){const{years:r=0,months:A=0,weeks:i=0,days:o=0,hours:a=0,minutes:l=0,seconds:u=0}=e,d=Ve(t,n?.in),h=A||r?bA(d,A+r*12):d,p=o||i?Xr(h,o+i*7):h,m=l+a*60,B=(u+m*60)*1e3;return _t(t,+p+B)}let TI={};function ts(){return TI}function Jr(t,e){const n=ts(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,A=Ve(t,e?.in),i=A.getDay(),o=(i<r?7:0)+i-r;return A.setDate(A.getDate()-o),A.setHours(0,0,0,0),A}function Js(t,e){return Jr(t,{...e,weekStartsOn:1})}function JB(t,e){const n=Ve(t,e?.in),r=n.getFullYear(),A=_t(n,0);A.setFullYear(r+1,0,4),A.setHours(0,0,0,0);const i=Js(A),o=_t(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const a=Js(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function iu(t){const e=Ve(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function ul(t,...e){const n=_t.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function jB(t,e){const n=Ve(t,e?.in);return n.setHours(0,0,0,0),n}function ZB(t,e,n){const[r,A]=ul(n?.in,t,e),i=jB(r),o=jB(A),a=+i-iu(i),l=+o-iu(o);return Math.round((a-l)/SI)}function MI(t,e){const n=JB(t,e),r=_t(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Js(r)}function II(t,e,n){return bA(t,e*3,n)}function dp(t,e,n){return bA(t,e*12,n)}function VB(t,e){const n=+Ve(t)-+Ve(e);return n<0?-1:n>0?1:n}function e0(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function dl(t){return!(!e0(t)&&typeof t!="number"||isNaN(+Ve(t)))}function t0(t,e){const n=Ve(t,e?.in);return Math.trunc(n.getMonth()/3)+1}function UI(t,e,n){const[r,A]=ul(n?.in,t,e);return r.getFullYear()-A.getFullYear()}function _I(t){return e=>{const r=(t?Math[t]:Math.trunc)(e);return r===0?0:r}}function DI(t,e,n){const[r,A]=ul(n?.in,t,e),i=VB(r,A),o=Math.abs(UI(r,A));r.setFullYear(1584),A.setFullYear(1584);const a=VB(r,A)===-i,l=i*(o-+a);return l===0?0:l}function n0(t,e){const[n,r]=ul(t,e.start,e.end);return{start:n,end:r}}function fp(t,e){const{start:n,end:r}=n0(e?.in,t);let A=+n>+r;const i=A?+n:+r,o=A?r:n;o.setHours(0,0,0,0);let a=1;const l=[];for(;+o<=i;)l.push(_t(n,o)),o.setDate(o.getDate()+a),o.setHours(0,0,0,0);return A?l.reverse():l}function ns(t,e){const n=Ve(t,e?.in),r=n.getMonth(),A=r-r%3;return n.setMonth(A,1),n.setHours(0,0,0,0),n}function OI(t,e){const{start:n,end:r}=n0(e?.in,t);let A=+n>+r;const i=A?+ns(n):+ns(r);let o=ns(A?r:n),a=1;const l=[];for(;+o<=i;)l.push(_t(n,o)),o=II(o,a);return A?l.reverse():l}function NI(t,e){const n=Ve(t,e?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function r0(t,e){const n=Ve(t,e?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function js(t,e){const n=Ve(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function hp(t,e){const n=ts(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,A=Ve(t,e?.in),i=A.getDay(),o=(i<r?-7:0)+6-(i-r);return A.setDate(A.getDate()+o),A.setHours(23,59,59,999),A}function A0(t,e){const n=Ve(t,e?.in),r=n.getMonth(),A=r-r%3+3;return n.setMonth(A,0),n.setHours(23,59,59,999),n}const LI={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},RI=(t,e,n)=>{let r;const A=LI[t];return typeof A=="string"?r=A:e===1?r=A.one:r=A.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function yi(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const HI={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PI={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$I={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},KI={date:yi({formats:HI,defaultWidth:"full"}),time:yi({formats:PI,defaultWidth:"full"}),dateTime:yi({formats:$I,defaultWidth:"full"})},zI={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},WI=(t,e,n,r)=>zI[t];function dr(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let A;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):o;A=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;A=t.values[a]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return A[i]}}const GI={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},YI={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qI={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},XI={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},JI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},jI={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ZI={ordinalNumber:(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:dr({values:GI,defaultWidth:"wide"}),quarter:dr({values:YI,defaultWidth:"wide",argumentCallback:t=>t-1}),month:dr({values:qI,defaultWidth:"wide"}),day:dr({values:XI,defaultWidth:"wide"}),dayPeriod:dr({values:JI,defaultWidth:"wide",formattingValues:jI,defaultFormattingWidth:"wide"})};function fr(t){return(e,n={})=>{const r=n.width,A=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(A);if(!i)return null;const o=i[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?eU(a,h=>h.test(o)):VI(a,h=>h.test(o));let u;u=t.valueCallback?t.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const d=e.slice(o.length);return{value:u,rest:d}}}function VI(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function eU(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function pp(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const A=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(A.length);return{value:o,rest:a}}}const tU=/^(\d+)(th|st|nd|rd)?/i,nU=/\d+/i,rU={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},AU={any:[/^b/i,/^(a|c)/i]},iU={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},oU={any:[/1/i,/2/i,/3/i,/4/i]},sU={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},aU={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},lU={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},cU={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},uU={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},dU={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},fU={ordinalNumber:pp({matchPattern:tU,parsePattern:nU,valueCallback:t=>parseInt(t,10)}),era:fr({matchPatterns:rU,defaultMatchWidth:"wide",parsePatterns:AU,defaultParseWidth:"any"}),quarter:fr({matchPatterns:iU,defaultMatchWidth:"wide",parsePatterns:oU,defaultParseWidth:"any",valueCallback:t=>t+1}),month:fr({matchPatterns:sU,defaultMatchWidth:"wide",parsePatterns:aU,defaultParseWidth:"any"}),day:fr({matchPatterns:lU,defaultMatchWidth:"wide",parsePatterns:cU,defaultParseWidth:"any"}),dayPeriod:fr({matchPatterns:uU,defaultMatchWidth:"any",parsePatterns:dU,defaultParseWidth:"any"})},ou={code:"en-US",formatDistance:RI,formatLong:KI,formatRelative:WI,localize:ZI,match:fU,options:{weekStartsOn:0,firstWeekContainsDate:1}};function hU(t,e){const n=Ve(t,e?.in);return ZB(n,js(n))+1}function mp(t,e){const n=Ve(t,e?.in),r=+Js(n)-+MI(n);return Math.round(r/YB)+1}function gp(t,e){const n=Ve(t,e?.in),r=n.getFullYear(),A=ts(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??A.firstWeekContainsDate??A.locale?.options?.firstWeekContainsDate??1,o=_t(e?.in||t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const a=Jr(o,e),l=_t(e?.in||t,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const u=Jr(l,e);return+n>=+a?r+1:+n>=+u?r:r-1}function pU(t,e){const n=ts(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,A=gp(t,e),i=_t(e?.in||t,0);return i.setFullYear(A,0,r),i.setHours(0,0,0,0),Jr(i,e)}function vp(t,e){const n=Ve(t,e?.in),r=+Jr(n,e)-+pU(n,e);return Math.round(r/YB)+1}function Dt(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const ro={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return Dt(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):Dt(n+1,2)},d(t,e){return Dt(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(t,e){return Dt(t.getHours()%12||12,e.length)},H(t,e){return Dt(t.getHours(),e.length)},m(t,e){return Dt(t.getMinutes(),e.length)},s(t,e){return Dt(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),A=Math.trunc(r*Math.pow(10,n-3));return Dt(A,e.length)}},Zs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},i0={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),A=r>0?r:1-r;return n.ordinalNumber(A,{unit:"year"})}return ro.y(t,e)},Y:function(t,e,n,r){const A=gp(t,r),i=A>0?A:1-A;if(e==="YY"){const o=i%100;return Dt(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):Dt(i,e.length)},R:function(t,e){const n=JB(t);return Dt(n,e.length)},u:function(t,e){const n=t.getFullYear();return Dt(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Dt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Dt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return ro.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return Dt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const A=vp(t,r);return e==="wo"?n.ordinalNumber(A,{unit:"week"}):Dt(A,e.length)},I:function(t,e,n){const r=mp(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):Dt(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):ro.d(t,e)},D:function(t,e,n){const r=hU(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Dt(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const A=t.getDay(),i=(A-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return Dt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(A,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(A,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(A,{width:"short",context:"formatting"});default:return n.day(A,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const A=t.getDay(),i=(A-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return Dt(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(A,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(A,{width:"narrow",context:"standalone"});case"cccccc":return n.day(A,{width:"short",context:"standalone"});default:return n.day(A,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),A=r===0?7:r;switch(e){case"i":return String(A);case"ii":return Dt(A,e.length);case"io":return n.ordinalNumber(A,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const A=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(A,{width:"narrow",context:"formatting"});default:return n.dayPeriod(A,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let A;switch(r===12?A=Zs.noon:r===0?A=Zs.midnight:A=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(A,{width:"narrow",context:"formatting"});default:return n.dayPeriod(A,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let A;switch(r>=17?A=Zs.evening:r>=12?A=Zs.afternoon:r>=4?A=Zs.morning:A=Zs.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(A,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(A,{width:"narrow",context:"formatting"});default:return n.dayPeriod(A,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ro.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):ro.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Dt(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):Dt(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):ro.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):ro.s(t,e)},S:function(t,e){return ro.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return s0(r);case"XXXX":case"XX":return rs(r);default:return rs(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return s0(r);case"xxxx":case"xx":return rs(r);default:return rs(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+o0(r,":");default:return"GMT"+rs(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+o0(r,":");default:return"GMT"+rs(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return Dt(r,e.length)},T:function(t,e,n){return Dt(+t,e.length)}};function o0(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),A=Math.trunc(r/60),i=r%60;return i===0?n+String(A):n+String(A)+e+Dt(i,2)}function s0(t,e){return t%60===0?(t>0?"-":"+")+Dt(Math.abs(t)/60,2):rs(t,e)}function rs(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),A=Dt(Math.trunc(r/60),2),i=Dt(r%60,2);return n+A+e+i}const a0=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},l0=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},wp={p:l0,P:(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],A=n[2];if(!A)return a0(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",a0(r,e)).replace("{{time}}",l0(A,e))}},mU=/^D+$/,gU=/^Y+$/,vU=["D","DD","YY","YYYY"];function c0(t){return mU.test(t)}function u0(t){return gU.test(t)}function Bp(t,e,n){const r=wU(t,e,n);if(console.warn(r),vU.includes(t))throw new RangeError(r)}function wU(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const BU=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yU=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,CU=/^'([^]*?)'?$/,bU=/''/g,EU=/[a-zA-Z]/;function jr(t,e,n){const r=ts(),A=n?.locale??r.locale??ou,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Ve(t,n?.in);if(!dl(a))throw new RangeError("Invalid time value");let l=e.match(yU).map(d=>{const h=d[0];if(h==="p"||h==="P"){const p=wp[h];return p(d,A.formatLong)}return d}).join("").match(BU).map(d=>{if(d==="''")return{isToken:!1,value:"'"};const h=d[0];if(h==="'")return{isToken:!1,value:kU(d)};if(i0[h])return{isToken:!0,value:d};if(h.match(EU))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:d}});A.localize.preprocessor&&(l=A.localize.preprocessor(a,l));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:A};return l.map(d=>{if(!d.isToken)return d.value;const h=d.value;(!n?.useAdditionalWeekYearTokens&&u0(h)||!n?.useAdditionalDayOfYearTokens&&c0(h))&&Bp(h,e,String(t));const p=i0[h[0]];return p(a,h,A.localize,u)}).join("")}function kU(t){const e=t.match(CU);return e?e[1].replace(bU,"'"):t}function SU(t,e){return Ve(t,e?.in).getDay()}function xU(t,e){const n=Ve(t,e?.in),r=n.getFullYear(),A=n.getMonth(),i=_t(n,0);return i.setFullYear(r,A+1,0),i.setHours(0,0,0,0),i.getDate()}function FU(){return Object.assign({},ts())}function qA(t,e){return Ve(t,e?.in).getHours()}function QU(t,e){const n=Ve(t,e?.in).getDay();return n===0?7:n}function Ci(t,e){return Ve(t,e?.in).getMinutes()}function vt(t,e){return Ve(t,e?.in).getMonth()}function Ao(t){return Ve(t).getSeconds()}function tt(t,e){return Ve(t,e?.in).getFullYear()}function XA(t,e){return+Ve(t)>+Ve(e)}function bi(t,e){return+Ve(t)<+Ve(e)}function Vs(t,e){return+Ve(t)==+Ve(e)}function TU(t,e){const n=MU(e)?new e(0):_t(e,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n.setHours(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),n}function MU(t){return typeof t=="function"&&t.prototype?.constructor===t}const IU=10;class d0{subPriority=0;validate(e,n){return!0}}class UU extends d0{constructor(e,n,r,A,i){super(),this.value=e,this.validateValue=n,this.setValue=r,this.priority=A,i&&(this.subPriority=i)}validate(e,n){return this.validateValue(e,this.value,n)}set(e,n,r){return this.setValue(e,n,this.value,r)}}class _U extends d0{priority=IU;subPriority=-1;constructor(e,n){super(),this.context=e||(r=>_t(n,r))}set(e,n){return n.timestampIsSet?e:_t(e,TU(e,this.context))}}let Qt=class{run(e,n,r,A){const i=this.parse(e,n,r,A);return i?{setter:new UU(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(e,n,r){return!0}};class DU extends Qt{priority=140;parse(e,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"});case"GGGGG":return r.era(e,{width:"narrow"});default:return r.era(e,{width:"wide"})||r.era(e,{width:"abbreviated"})||r.era(e,{width:"narrow"})}}set(e,n,r){return n.era=r,e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]}const un={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},JA={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function dn(t,e){return t&&{value:e(t.value),rest:t.rest}}function Vt(t,e){const n=e.match(t);return n?{value:parseInt(n[0],10),rest:e.slice(n[0].length)}:null}function jA(t,e){const n=e.match(t);if(!n)return null;if(n[0]==="Z")return{value:0,rest:e.slice(1)};const r=n[1]==="+"?1:-1,A=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,o=n[5]?parseInt(n[5],10):0;return{value:r*(A*FI+i*xI+o*QI),rest:e.slice(n[0].length)}}function f0(t){return Vt(un.anyDigitsSigned,t)}function An(t,e){switch(t){case 1:return Vt(un.singleDigit,e);case 2:return Vt(un.twoDigits,e);case 3:return Vt(un.threeDigits,e);case 4:return Vt(un.fourDigits,e);default:return Vt(new RegExp("^\\d{1,"+t+"}"),e)}}function su(t,e){switch(t){case 1:return Vt(un.singleDigitSigned,e);case 2:return Vt(un.twoDigitsSigned,e);case 3:return Vt(un.threeDigitsSigned,e);case 4:return Vt(un.fourDigitsSigned,e);default:return Vt(new RegExp("^-?\\d{1,"+t+"}"),e)}}function yp(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function h0(t,e){const n=e>0,r=n?e:1-e;let A;if(r<=50)A=t||100;else{const i=r+50,o=Math.trunc(i/100)*100,a=t>=i%100;A=t+o-(a?100:0)}return n?A:1-A}function p0(t){return t%400===0||t%4===0&&t%100!==0}class OU extends Qt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,n,r){const A=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return dn(An(4,e),A);case"yo":return dn(r.ordinalNumber(e,{unit:"year"}),A);default:return dn(An(n.length,e),A)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r){const A=e.getFullYear();if(r.isTwoDigitYear){const o=h0(r.year,A);return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}const i=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(i,0,1),e.setHours(0,0,0,0),e}}class NU extends Qt{priority=130;parse(e,n,r){const A=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return dn(An(4,e),A);case"Yo":return dn(r.ordinalNumber(e,{unit:"year"}),A);default:return dn(An(n.length,e),A)}}validate(e,n){return n.isTwoDigitYear||n.year>0}set(e,n,r,A){const i=gp(e,A);if(r.isTwoDigitYear){const a=h0(r.year,i);return e.setFullYear(a,0,A.firstWeekContainsDate),e.setHours(0,0,0,0),Jr(e,A)}const o=!("era"in n)||n.era===1?r.year:1-r.year;return e.setFullYear(o,0,A.firstWeekContainsDate),e.setHours(0,0,0,0),Jr(e,A)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class LU extends Qt{priority=130;parse(e,n){return su(n==="R"?4:n.length,e)}set(e,n,r){const A=_t(e,0);return A.setFullYear(r,0,4),A.setHours(0,0,0,0),Js(A)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class RU extends Qt{priority=130;parse(e,n){return su(n==="u"?4:n.length,e)}set(e,n,r){return e.setFullYear(r,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class HU extends Qt{priority=120;parse(e,n,r){switch(n){case"Q":case"QQ":return An(n.length,e);case"Qo":return r.ordinalNumber(e,{unit:"quarter"});case"QQQ":return r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(e,{width:"narrow",context:"formatting"});default:return r.quarter(e,{width:"wide",context:"formatting"})||r.quarter(e,{width:"abbreviated",context:"formatting"})||r.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class PU extends Qt{priority=120;parse(e,n,r){switch(n){case"q":case"qq":return An(n.length,e);case"qo":return r.ordinalNumber(e,{unit:"quarter"});case"qqq":return r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(e,{width:"narrow",context:"standalone"});default:return r.quarter(e,{width:"wide",context:"standalone"})||r.quarter(e,{width:"abbreviated",context:"standalone"})||r.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=1&&n<=4}set(e,n,r){return e.setMonth((r-1)*3,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class $U extends Qt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,n,r){const A=i=>i-1;switch(n){case"M":return dn(Vt(un.month,e),A);case"MM":return dn(An(2,e),A);case"Mo":return dn(r.ordinalNumber(e,{unit:"month"}),A);case"MMM":return r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(e,{width:"narrow",context:"formatting"});default:return r.month(e,{width:"wide",context:"formatting"})||r.month(e,{width:"abbreviated",context:"formatting"})||r.month(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}}class KU extends Qt{priority=110;parse(e,n,r){const A=i=>i-1;switch(n){case"L":return dn(Vt(un.month,e),A);case"LL":return dn(An(2,e),A);case"Lo":return dn(r.ordinalNumber(e,{unit:"month"}),A);case"LLL":return r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(e,{width:"narrow",context:"standalone"});default:return r.month(e,{width:"wide",context:"standalone"})||r.month(e,{width:"abbreviated",context:"standalone"})||r.month(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.setMonth(r,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function zU(t,e,n){const r=Ve(t,n?.in),A=vp(r,n)-e;return r.setDate(r.getDate()-A*7),Ve(r,n?.in)}class WU extends Qt{priority=100;parse(e,n,r){switch(n){case"w":return Vt(un.week,e);case"wo":return r.ordinalNumber(e,{unit:"week"});default:return An(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r,A){return Jr(zU(e,r,A),A)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function GU(t,e,n){const r=Ve(t,n?.in),A=mp(r,n)-e;return r.setDate(r.getDate()-A*7),r}class YU extends Qt{priority=100;parse(e,n,r){switch(n){case"I":return Vt(un.week,e);case"Io":return r.ordinalNumber(e,{unit:"week"});default:return An(n.length,e)}}validate(e,n){return n>=1&&n<=53}set(e,n,r){return Js(GU(e,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const qU=[31,28,31,30,31,30,31,31,30,31,30,31],XU=[31,29,31,30,31,30,31,31,30,31,30,31];class JU extends Qt{priority=90;subPriority=1;parse(e,n,r){switch(n){case"d":return Vt(un.date,e);case"do":return r.ordinalNumber(e,{unit:"date"});default:return An(n.length,e)}}validate(e,n){const r=e.getFullYear(),A=p0(r),i=e.getMonth();return A?n>=1&&n<=XU[i]:n>=1&&n<=qU[i]}set(e,n,r){return e.setDate(r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class jU extends Qt{priority=90;subpriority=1;parse(e,n,r){switch(n){case"D":case"DD":return Vt(un.dayOfYear,e);case"Do":return r.ordinalNumber(e,{unit:"date"});default:return An(n.length,e)}}validate(e,n){const r=e.getFullYear();return p0(r)?n>=1&&n<=366:n>=1&&n<=365}set(e,n,r){return e.setMonth(0,r),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Cp(t,e,n){const r=ts(),A=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Ve(t,n?.in),o=i.getDay(),l=(e%7+7)%7,u=7-A,d=e<0||e>6?e-(o+u)%7:(l+u)%7-(o+u)%7;return Xr(i,d,n)}class ZU extends Qt{priority=90;parse(e,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,A){return e=Cp(e,r,A),e.setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]}class VU extends Qt{priority=90;parse(e,n,r,A){const i=o=>{const a=Math.floor((o-1)/7)*7;return(o+A.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return dn(An(n.length,e),i);case"eo":return dn(r.ordinalNumber(e,{unit:"day"}),i);case"eee":return r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});case"eeeee":return r.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"});default:return r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,A){return e=Cp(e,r,A),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class e_ extends Qt{priority=90;parse(e,n,r,A){const i=o=>{const a=Math.floor((o-1)/7)*7;return(o+A.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return dn(An(n.length,e),i);case"co":return dn(r.ordinalNumber(e,{unit:"day"}),i);case"ccc":return r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});case"ccccc":return r.day(e,{width:"narrow",context:"standalone"});case"cccccc":return r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"});default:return r.day(e,{width:"wide",context:"standalone"})||r.day(e,{width:"abbreviated",context:"standalone"})||r.day(e,{width:"short",context:"standalone"})||r.day(e,{width:"narrow",context:"standalone"})}}validate(e,n){return n>=0&&n<=6}set(e,n,r,A){return e=Cp(e,r,A),e.setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function t_(t,e,n){const r=Ve(t,n?.in),A=QU(r,n),i=e-A;return Xr(r,i,n)}class n_ extends Qt{priority=90;parse(e,n,r){const A=i=>i===0?7:i;switch(n){case"i":case"ii":return An(n.length,e);case"io":return r.ordinalNumber(e,{unit:"day"});case"iii":return dn(r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),A);case"iiiii":return dn(r.day(e,{width:"narrow",context:"formatting"}),A);case"iiiiii":return dn(r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),A);default:return dn(r.day(e,{width:"wide",context:"formatting"})||r.day(e,{width:"abbreviated",context:"formatting"})||r.day(e,{width:"short",context:"formatting"})||r.day(e,{width:"narrow",context:"formatting"}),A)}}validate(e,n){return n>=1&&n<=7}set(e,n,r){return e=t_(e,r),e.setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class r_ extends Qt{priority=80;parse(e,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(yp(r),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]}class A_ extends Qt{priority=80;parse(e,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(yp(r),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]}class i_ extends Qt{priority=80;parse(e,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(e,{width:"narrow",context:"formatting"});default:return r.dayPeriod(e,{width:"wide",context:"formatting"})||r.dayPeriod(e,{width:"abbreviated",context:"formatting"})||r.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,n,r){return e.setHours(yp(r),0,0,0),e}incompatibleTokens=["a","b","t","T"]}class o_ extends Qt{priority=70;parse(e,n,r){switch(n){case"h":return Vt(un.hour12h,e);case"ho":return r.ordinalNumber(e,{unit:"hour"});default:return An(n.length,e)}}validate(e,n){return n>=1&&n<=12}set(e,n,r){const A=e.getHours()>=12;return A&&r<12?e.setHours(r+12,0,0,0):!A&&r===12?e.setHours(0,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]}class s_ extends Qt{priority=70;parse(e,n,r){switch(n){case"H":return Vt(un.hour23h,e);case"Ho":return r.ordinalNumber(e,{unit:"hour"});default:return An(n.length,e)}}validate(e,n){return n>=0&&n<=23}set(e,n,r){return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]}class a_ extends Qt{priority=70;parse(e,n,r){switch(n){case"K":return Vt(un.hour11h,e);case"Ko":return r.ordinalNumber(e,{unit:"hour"});default:return An(n.length,e)}}validate(e,n){return n>=0&&n<=11}set(e,n,r){return e.getHours()>=12&&r<12?e.setHours(r+12,0,0,0):e.setHours(r,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]}class l_ extends Qt{priority=70;parse(e,n,r){switch(n){case"k":return Vt(un.hour24h,e);case"ko":return r.ordinalNumber(e,{unit:"hour"});default:return An(n.length,e)}}validate(e,n){return n>=1&&n<=24}set(e,n,r){const A=r<=24?r%24:r;return e.setHours(A,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]}class c_ extends Qt{priority=60;parse(e,n,r){switch(n){case"m":return Vt(un.minute,e);case"mo":return r.ordinalNumber(e,{unit:"minute"});default:return An(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setMinutes(r,0,0),e}incompatibleTokens=["t","T"]}class u_ extends Qt{priority=50;parse(e,n,r){switch(n){case"s":return Vt(un.second,e);case"so":return r.ordinalNumber(e,{unit:"second"});default:return An(n.length,e)}}validate(e,n){return n>=0&&n<=59}set(e,n,r){return e.setSeconds(r,0),e}incompatibleTokens=["t","T"]}class d_ extends Qt{priority=30;parse(e,n){const r=A=>Math.trunc(A*Math.pow(10,-n.length+3));return dn(An(n.length,e),r)}set(e,n,r){return e.setMilliseconds(r),e}incompatibleTokens=["t","T"]}class f_ extends Qt{priority=10;parse(e,n){switch(n){case"X":return jA(JA.basicOptionalMinutes,e);case"XX":return jA(JA.basic,e);case"XXXX":return jA(JA.basicOptionalSeconds,e);case"XXXXX":return jA(JA.extendedOptionalSeconds,e);default:return jA(JA.extended,e)}}set(e,n,r){return n.timestampIsSet?e:_t(e,e.getTime()-iu(e)-r)}incompatibleTokens=["t","T","x"]}class h_ extends Qt{priority=10;parse(e,n){switch(n){case"x":return jA(JA.basicOptionalMinutes,e);case"xx":return jA(JA.basic,e);case"xxxx":return jA(JA.basicOptionalSeconds,e);case"xxxxx":return jA(JA.extendedOptionalSeconds,e);default:return jA(JA.extended,e)}}set(e,n,r){return n.timestampIsSet?e:_t(e,e.getTime()-iu(e)-r)}incompatibleTokens=["t","T","X"]}class p_ extends Qt{priority=40;parse(e){return f0(e)}set(e,n,r){return[_t(e,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class m_ extends Qt{priority=20;parse(e){return f0(e)}set(e,n,r){return[_t(e,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const g_={G:new DU,y:new OU,Y:new NU,R:new LU,u:new RU,Q:new HU,q:new PU,M:new $U,L:new KU,w:new WU,I:new YU,d:new JU,D:new jU,E:new ZU,e:new VU,c:new e_,i:new n_,a:new r_,b:new A_,B:new i_,h:new o_,H:new s_,K:new a_,k:new l_,m:new c_,s:new u_,S:new d_,X:new f_,x:new h_,t:new p_,T:new m_},v_=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,w_=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,B_=/^'([^]*?)'?$/,y_=/''/g,C_=/\S/,b_=/[a-zA-Z]/;function bp(t,e,n,r){const A=()=>_t(r?.in||n,NaN),i=FU(),o=r?.locale??i.locale??ou,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!e)return t?A():Ve(n,r?.in);const u={firstWeekContainsDate:a,weekStartsOn:l,locale:o},d=[new _U(r?.in,n)],h=e.match(w_).map(y=>{const w=y[0];if(w in wp){const C=wp[w];return C(y,o.formatLong)}return y}).join("").match(v_),p=[];for(let y of h){!r?.useAdditionalWeekYearTokens&&u0(y)&&Bp(y,e,t),!r?.useAdditionalDayOfYearTokens&&c0(y)&&Bp(y,e,t);const w=y[0],C=g_[w];if(C){const{incompatibleTokens:k}=C;if(Array.isArray(k)){const U=p.find(D=>k.includes(D.token)||D.token===w);if(U)throw new RangeError(`The format string mustn't contain \`${U.fullToken}\` and \`${y}\` at the same time`)}else if(C.incompatibleTokens==="*"&&p.length>0)throw new RangeError(`The format string mustn't contain \`${y}\` and any other token at the same time`);p.push({token:w,fullToken:y});const F=C.run(t,y,o.match,u);if(!F)return A();d.push(F.setter),t=F.rest}else{if(w.match(b_))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");if(y==="''"?y="'":w==="'"&&(y=E_(y)),t.indexOf(y)===0)t=t.slice(y.length);else return A()}}if(t.length>0&&C_.test(t))return A();const m=d.map(y=>y.priority).sort((y,w)=>w-y).filter((y,w,C)=>C.indexOf(y)===w).map(y=>d.filter(w=>w.priority===y).sort((w,C)=>C.subPriority-w.subPriority)).map(y=>y[0]);let v=Ve(n,r?.in);if(isNaN(+v))return A();const B={};for(const y of m){if(!y.validate(v,u))return A();const w=y.set(v,B,u);Array.isArray(w)?(v=w[0],Object.assign(B,w[1])):v=w}return v}function E_(t){return t.match(B_)[1].replace(y_,"'")}function m0(t,e,n){const[r,A]=ul(n?.in,t,e);return+ns(r)==+ns(A)}function g0(t,e,n){return Xr(t,-e,n)}function k_(t,e){const n=e?.nearestTo??1;if(n<1||n>30)return _t(t,NaN);const r=Ve(t,e?.in),A=r.getSeconds()/60,i=r.getMilliseconds()/1e3/60,o=r.getMinutes()+A+i,a=e?.roundingMethod??"round",u=_I(a)(o/n)*n;return r.setMinutes(u,0,0),r}function v0(t,e,n){const r=Ve(t,n?.in),A=r.getFullYear(),i=r.getDate(),o=_t(t,0);o.setFullYear(A,e,15),o.setHours(0,0,0,0);const a=xU(o);return r.setMonth(e,Math.min(i,a)),r}function ft(t,e,n){let r=Ve(t,n?.in);return isNaN(+r)?_t(t,NaN):(e.year!=null&&r.setFullYear(e.year),e.month!=null&&(r=v0(r,e.month)),e.date!=null&&r.setDate(e.date),e.hours!=null&&r.setHours(e.hours),e.minutes!=null&&r.setMinutes(e.minutes),e.seconds!=null&&r.setSeconds(e.seconds),e.milliseconds!=null&&r.setMilliseconds(e.milliseconds),r)}function S_(t,e,n){const r=Ve(t,n?.in);return r.setMilliseconds(e),r}function x_(t,e,n){const r=Ve(t,n?.in);return r.setSeconds(e),r}function EA(t,e,n){const r=Ve(t,n?.in);return isNaN(+r)?_t(t,NaN):(r.setFullYear(e),r)}function ea(t,e,n){return bA(t,-e,n)}function F_(t,e,n){const{years:r=0,months:A=0,weeks:i=0,days:o=0,hours:a=0,minutes:l=0,seconds:u=0}=e,d=ea(t,A+r*12,n),h=g0(d,o+i*7,n),p=l+a*60,v=(u+p*60)*1e3;return _t(t,+h-v)}function w0(t,e,n){return dp(t,-e,n)}function Q_(t,e,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:t,timeZoneName:n}).format(e).split(/\s/g).slice(2).join(" ")}const T_={},fl={};function As(t,e){try{const r=(T_[t]||=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"longOffset"}).format)(e).split("GMT")[1];return r in fl?fl[r]:B0(r,r.split(":"))}catch{if(t in fl)return fl[t];const n=t?.match(M_);return n?B0(t,n.slice(1)):NaN}}const M_=/([+-]\d\d):?(\d\d)?/;function B0(t,e){const n=+(e[0]||0),r=+(e[1]||0),A=+(e[2]||0)/60;return fl[t]=n*60+r>0?n*60+r+A:n*60-r-A}class ZA extends Date{constructor(...e){super(),e.length>1&&typeof e[e.length-1]=="string"&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(As(this.timeZone,this))?this.setTime(NaN):e.length?typeof e[0]=="number"&&(e.length===1||e.length===2&&typeof e[1]!="number")?this.setTime(e[0]):typeof e[0]=="string"?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),C0(this),Ep(this)):this.setTime(Date.now())}static tz(e,...n){return n.length?new ZA(...n,e):new ZA(Date.now(),e)}withTimeZone(e){return new ZA(+this,e)}getTimezoneOffset(){const e=-As(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),Ep(this),+this}[Symbol.for("constructDateFrom")](e){return new ZA(+new Date(e),this.timeZone)}}const y0=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(t=>{if(!y0.test(t))return;const e=t.replace(y0,"$1UTC");ZA.prototype[e]&&(t.startsWith("get")?ZA.prototype[t]=function(){return this.internal[e]()}:(ZA.prototype[t]=function(){return Date.prototype[e].apply(this.internal,arguments),I_(this),+this},ZA.prototype[e]=function(){return Date.prototype[e].apply(this,arguments),Ep(this),+this}))});function Ep(t){t.internal.setTime(+t),t.internal.setUTCSeconds(t.internal.getUTCSeconds()-Math.round(-As(t.timeZone,t)*60))}function I_(t){Date.prototype.setFullYear.call(t,t.internal.getUTCFullYear(),t.internal.getUTCMonth(),t.internal.getUTCDate()),Date.prototype.setHours.call(t,t.internal.getUTCHours(),t.internal.getUTCMinutes(),t.internal.getUTCSeconds(),t.internal.getUTCMilliseconds()),C0(t)}function C0(t){const e=As(t.timeZone,t),n=e>0?Math.floor(e):Math.ceil(e),r=new Date(+t);r.setUTCHours(r.getUTCHours()-1);const A=-new Date(+t).getTimezoneOffset(),i=-new Date(+r).getTimezoneOffset(),o=A-i,a=Date.prototype.getHours.apply(t)!==t.internal.getUTCHours();o&&a&&t.internal.setUTCMinutes(t.internal.getUTCMinutes()+o);const l=A-n;l&&Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+l);const u=new Date(+t);u.setUTCSeconds(0);const d=A>0?u.getSeconds():(u.getSeconds()-60)%60,h=Math.round(-(As(t.timeZone,t)*60))%60;(h||d)&&(t.internal.setUTCSeconds(t.internal.getUTCSeconds()+h),Date.prototype.setUTCSeconds.call(t,Date.prototype.getUTCSeconds.call(t)+h+d));const p=As(t.timeZone,t),m=p>0?Math.floor(p):Math.ceil(p),B=-new Date(+t).getTimezoneOffset()-m,y=m!==n,w=B-l;if(y&&w){Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+w);const C=As(t.timeZone,t),k=C>0?Math.floor(C):Math.ceil(C),F=m-k;F&&(t.internal.setUTCMinutes(t.internal.getUTCMinutes()+F),Date.prototype.setUTCMinutes.call(t,Date.prototype.getUTCMinutes.call(t)+F))}}class ta extends ZA{static tz(e,...n){return n.length?new ta(...n,e):new ta(Date.now(),e)}toISOString(){const[e,n,r]=this.tzComponents(),A=`${e}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+A}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,n,r,A]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${r} ${n} ${A}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[n,r,A]=this.tzComponents();return`${e} GMT${n}${r}${A} (${Q_(this.timeZone,this)})`}toLocaleString(e,n){return Date.prototype.toLocaleString.call(this,e,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(e,n){return Date.prototype.toLocaleDateString.call(this,e,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(e,n){return Date.prototype.toLocaleTimeString.call(this,e,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset(),n=e>0?"-":"+",r=String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),A=String(Math.abs(e)%60).padStart(2,"0");return[n,r,A]}withTimeZone(e){return new ta(+this,e)}[Symbol.for("constructDateFrom")](e){return new ta(+new Date(e),this.timeZone)}}function hl(){return s.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[s.h("path",{d:"M29.333 8c0-2.208-1.792-4-4-4h-18.667c-2.208 0-4 1.792-4 4v18.667c0 2.208 1.792 4 4 4h18.667c2.208 0 4-1.792 4-4v-18.667zM26.667 8v18.667c0 0.736-0.597 1.333-1.333 1.333 0 0-18.667 0-18.667 0-0.736 0-1.333-0.597-1.333-1.333 0 0 0-18.667 0-18.667 0-0.736 0.597-1.333 1.333-1.333 0 0 18.667 0 18.667 0 0.736 0 1.333 0.597 1.333 1.333z"}),s.h("path",{d:"M20 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),s.h("path",{d:"M9.333 2.667v5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-5.333c0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"}),s.h("path",{d:"M4 14.667h24c0.736 0 1.333-0.597 1.333-1.333s-0.597-1.333-1.333-1.333h-24c-0.736 0-1.333 0.597-1.333 1.333s0.597 1.333 1.333 1.333z"})])}function U_(){return s.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[s.h("path",{d:"M23.057 7.057l-16 16c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l16-16c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0z"}),s.h("path",{d:"M7.057 8.943l16 16c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885l-16-16c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}function b0(){return s.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[s.h("path",{d:"M20.943 23.057l-7.057-7.057c0 0 7.057-7.057 7.057-7.057 0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-8 8c-0.521 0.521-0.521 1.365 0 1.885l8 8c0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}function E0(){return s.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[s.h("path",{d:"M12.943 24.943l8-8c0.521-0.521 0.521-1.365 0-1.885l-8-8c-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885l7.057 7.057c0 0-7.057 7.057-7.057 7.057-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0z"})])}function k0(){return s.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[s.h("path",{d:"M16 1.333c-8.095 0-14.667 6.572-14.667 14.667s6.572 14.667 14.667 14.667c8.095 0 14.667-6.572 14.667-14.667s-6.572-14.667-14.667-14.667zM16 4c6.623 0 12 5.377 12 12s-5.377 12-12 12c-6.623 0-12-5.377-12-12s5.377-12 12-12z"}),s.h("path",{d:"M14.667 8v8c0 0.505 0.285 0.967 0.737 1.193l5.333 2.667c0.658 0.329 1.46 0.062 1.789-0.596s0.062-1.46-0.596-1.789l-4.596-2.298c0 0 0-7.176 0-7.176 0-0.736-0.597-1.333-1.333-1.333s-1.333 0.597-1.333 1.333z"})])}function S0(){return s.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[s.h("path",{d:"M24.943 19.057l-8-8c-0.521-0.521-1.365-0.521-1.885 0l-8 8c-0.52 0.52-0.52 1.365 0 1.885s1.365 0.52 1.885 0l7.057-7.057c0 0 7.057 7.057 7.057 7.057 0.52 0.52 1.365 0.52 1.885 0s0.52-1.365 0-1.885z"})])}function x0(){return s.h("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor","aria-hidden":"true",class:"dp__icon",role:"img"},[s.h("path",{d:"M7.057 12.943l8 8c0.521 0.521 1.365 0.521 1.885 0l8-8c0.52-0.52 0.52-1.365 0-1.885s-1.365-0.52-1.885 0l-7.057 7.057c0 0-7.057-7.057-7.057-7.057-0.52-0.52-1.365-0.52-1.885 0s-0.52 1.365 0 1.885z"})])}const F0=Symbol("ContextKey"),__=(t,e)=>{const{setTimeModelValue:n}=Sn(),r=xD(t),A=s.ref(null),i=s.reactive({menuFocused:!1,shiftKeyInMenu:!1,isInputFocused:!1,isTextInputDate:!1,arrowNavigationLevel:0}),o=r.getDate(new Date),a=s.ref(""),l=s.ref([{month:vt(o),year:tt(o)}]),u=s.reactive({hours:0,minutes:0,seconds:0});n(u,null,o,r.range.value.enabled);const d=s.computed({get:()=>A.value,set:B=>{A.value=B}}),h=s.computed(()=>B=>l.value[B]?l.value[B].month:0),p=s.computed(()=>B=>l.value[B]?l.value[B].year:0),m=(B,y)=>{i[B]=y},v=()=>{n(u,d.value,o,r.range.value.enabled)};s.provide(F0,{rootProps:t,defaults:r,modelValue:d,state:s.readonly(i),rootEmit:e,calendars:l,month:h,year:p,time:u,today:o,inputValue:a,setState:m,updateTime:v,getDate:r.getDate})},pt=()=>{const t=s.inject(F0);if(!t)throw new Error("Can't use context");return t};var kA=(t=>(t.month="month",t.year="year",t))(kA||{}),is=(t=>(t.header="header",t.calendar="calendar",t.timePicker="timePicker",t))(is||{}),hr=(t=>(t.month="month",t.year="year",t.calendar="calendar",t.time="time",t.minutes="minutes",t.hours="hours",t.seconds="seconds",t))(hr||{});const D_=["timestamp","date","iso"];var SA=(t=>(t.up="up",t.down="down",t.left="left",t.right="right",t))(SA||{}),Nt=(t=>(t.arrowUp="ArrowUp",t.arrowDown="ArrowDown",t.arrowLeft="ArrowLeft",t.arrowRight="ArrowRight",t.enter="Enter",t.space=" ",t.esc="Escape",t.tab="Tab",t.home="Home",t.end="End",t.pageUp="PageUp",t.pageDown="PageDown",t))(Nt||{}),na=(t=>(t.MONTH_AND_YEAR="MM-yyyy",t.YEAR="yyyy",t.DATE="dd-MM-yyyy",t))(na||{}),Q0=(t=>(t[t.Sunday=0]="Sunday",t[t.Monday=1]="Monday",t[t.Tuesday=2]="Tuesday",t[t.Wednesday=3]="Wednesday",t[t.Thursday=4]="Thursday",t[t.Friday=5]="Friday",t[t.Saturday=6]="Saturday",t))(Q0||{});const O_=()=>{const{rootProps:t,state:e}=pt(),n=s.computed(()=>e.arrowNavigationLevel),r=s.ref(-1),A=s.ref(-1);s.watch(n,(C,k)=>{w(C===0&&k>0)});const i=s.ref([]),o=s.ref(new Map),a=()=>{const C=Array.from(document.querySelectorAll(`[data-dp-action-element="${n.value}"]`)),k=new Map,F=new Map;for(const U of C){const D=U.getBoundingClientRect(),M=D.top,K=D.left;k.has(M)||k.set(M,[]),k.get(M).push(U),F.set(U,{row:M,col:K})}i.value=Array.from(k.entries()).sort((U,D)=>U[0]-D[0]).map(([U,D])=>l(D,F)),o.value=F},l=(C,k)=>C.sort((F,U)=>{const D=k.get(F),M=k.get(U);return D.col-M.col}),u=(C,k)=>{n.value===0&&(r.value=C,A.value=k)},d=C=>{if(![Nt.arrowUp,Nt.arrowDown,Nt.arrowLeft,Nt.arrowRight].includes(C.key))return;a(),C.preventDefault();const k=document.activeElement;if(!k?.hasAttribute("data-dp-action-element"))return;let F=-1,U=-1;for(let D=0;D<i.value.length;D++){const M=i.value[D].indexOf(k);if(M!==-1){F=D,U=M;break}}if(F!==-1)switch(C.key){case Nt.arrowLeft:return h(F,U);case Nt.arrowRight:return p(F,U);case Nt.arrowUp:return m(F,U);case Nt.arrowDown:return v(F,U);default:return}},h=(C,k)=>{if(k>0){const F=i.value[C][k-1];u(C,k-1),F&&F.focus()}},p=(C,k)=>{if(k<i.value[C].length-1){const F=i.value[C][k+1];u(C,k+1),F&&F.focus()}},m=(C,k)=>{if(C>0){const F=i.value[C-1],U=Math.min(k,F.length-1),D=F[U];u(C-1,U),D&&D.focus()}},v=(C,k)=>{if(C<i.value.length-1){const F=i.value[C+1],U=Math.min(k,F.length-1),D=F[U];u(C+1,U),D&&D.focus()}},B=()=>{s.nextTick().then(()=>{a();const C=i.value[r.value]?.[A.value];C&&y(C)})},y=C=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{C.focus({preventScroll:!0})})})},w=C=>{if(C)return B();const k=document.querySelector(`[data-dp-element-active="${n.value}"]`);if(k&&!C)y(k);else{const F=document.querySelector(`[data-dp-action-element="${n.value}"]`);F&&y(F)}};s.onMounted(()=>{t.arrowNavigation&&(w(!1),document.addEventListener("keydown",d))}),s.onUnmounted(()=>{t.arrowNavigation&&document.removeEventListener("keydown",d)})},N_=()=>{const{checkPartialRangeValue:t,checkRangeEnabled:e,isValidDate:n}=Zr(),{convertType:r,errorMapper:A}=Sn(),{getDate:i,rootEmit:o,state:a,rootProps:l,inputValue:u,defaults:{textInput:d,range:h,multiDates:p,timeConfig:m,formats:v},modelValue:B,updateTime:y}=pt(),{setTime:w,getWeekFromDate:C}=jn(),{formatSelectedDate:k,formatForTextInput:F}=io();s.watch(B,(W,j)=>{o("internal-model-change",B.value),JSON.stringify(j??{})!==JSON.stringify(W??{})&&y()},{deep:!0}),s.watch(h,(W,j)=>{W.enabled!==j.enabled&&(B.value=null)}),s.watch(()=>v.value.input,()=>{G()});const U=W=>W?l.modelType?ne(W):{hours:qA(W),minutes:Ci(W),seconds:m.value.enableSeconds?Ao(W):0}:null,D=W=>l.modelType?ne(W):{month:vt(W),year:tt(W)},M=W=>Array.isArray(W)?p.value.enabled?W.map(j=>K(j,EA(i(),j))):e(()=>[EA(i(),W[0]),W[1]?EA(i(),W[1]):t(h.value.partialRange)],h.value.enabled):EA(i(),+W),K=(W,j)=>(typeof W=="string"||typeof W=="number")&&l.modelType?Ae(W):j,q=W=>Array.isArray(W)?[K(W[0],w(W[0])),K(W[1],w(W[1]))]:K(W,w(W)),ce=W=>{const j=ft(i(),{date:1});return Array.isArray(W)?p.value.enabled?W.map($=>K($,ft(j,{month:+$.month,year:+$.year}))):e(()=>[K(W[0],ft(j,{month:+W[0].month,year:+W[0].year})),K(W[1],W[1]?ft(j,{month:+W[1].month,year:+W[1].year}):t(h.value.partialRange))],h.value.enabled):K(W,ft(j,{month:+W.month,year:+W.year}))},me=W=>{if(Array.isArray(W))return W.map(j=>Ae(j));throw new Error(A.dateArr("multi-dates"))},ve=W=>{if(Array.isArray(W)&&h.value.enabled){const j=W[0],$=W[1];return[i(Array.isArray(j)?j[0]:null),Array.isArray($)&&$.length?i($[0]):null]}return i(W[0])},Be=W=>l.modelAuto?Array.isArray(W)?[Ae(W[0]),Ae(W[1])]:l.autoApply?[Ae(W)]:[Ae(W),null]:Array.isArray(W)?e(()=>W[1]?[Ae(W[0]),W[1]?Ae(W[1]):t(h.value.partialRange)]:[Ae(W[0])],h.value.enabled):Ae(W),te=()=>{Array.isArray(B.value)&&h.value.enabled&&B.value.length===1&&B.value.push(t(h.value.partialRange))},V=()=>{const W=B.value;return[ne(W[0]),W[1]?ne(W[1]):t(h.value.partialRange)]},Y=()=>Array.isArray(B.value)?B.value[1]?V():ne(r(B.value[0])):[],x=()=>(B.value||[]).map(W=>ne(W)),Q=(W=!1)=>(W||te(),l.modelAuto?Y():p.value.enabled?x():Array.isArray(B.value)?e(()=>V(),h.value.enabled):ne(r(B.value))),P=W=>!W||Array.isArray(W)&&!W.length?null:l.timePicker?q(r(W)):l.monthPicker?ce(r(W)):l.yearPicker?M(r(W)):p.value.enabled?me(r(W)):l.weekPicker?ve(r(W)):Be(r(W)),T=W=>{if(a.isTextInputDate)return;const j=P(W);n(r(j))?(B.value=r(j),G()):(B.value=null,u.value="")},S=()=>B.value?p.value.enabled?B.value.map(W=>k(W)).join("; "):d.value.enabled?F():k(B.value):"",G=()=>{u.value=S()},Ae=W=>l.modelType?D_.includes(l.modelType)?i(W):l.modelType==="format"&&typeof v.value.input=="string"?bp(W,v.value.input,i(),{locale:l.locale}):bp(W,l.modelType,i(),{locale:l.locale}):i(W),ne=W=>W?l.modelType?l.modelType==="timestamp"?+W:l.modelType==="iso"?W.toISOString():l.modelType==="format"&&typeof v.value.input=="string"?k(W):k(W,l.modelType):W:null,ee=W=>{o("update:model-value",W)},re=W=>Array.isArray(B.value)?p.value.enabled?B.value.map(j=>W(j)):[W(B.value[0]),B.value[1]?W(B.value[1]):null]:W(r(B.value)),pe=()=>{if(Array.isArray(B.value)){const W=C(B.value[0],l.weekStart),j=B.value[1]?C(B.value[1],l.weekStart):[];return[W.map($=>i($)),j.map($=>i($))]}return C(B.value,l.weekStart).map(W=>i(W))},de=W=>ee(r(re(W))),Ce=()=>o("update:model-value",pe());return{checkBeforeEmit:()=>B.value?h.value.enabled?h.value.partialRange?B.value.length>=1:B.value.length===2:!!B.value:!1,parseExternalModelValue:T,formatInputValue:G,emitModelValue:()=>(G(),l.monthPicker?de(D):l.timePicker?de(U):l.yearPicker?de(tt):l.weekPicker?Ce():ee(Q()))}},pl=()=>{const{defaults:{transitions:t}}=pt(),e=s.computed(()=>r=>t.value?r?t.value.open:t.value.close:""),n=s.computed(()=>r=>t.value?r?t.value.menuAppearTop:t.value.menuAppearBottom:"");return{transitionName:e,showTransition:!!t.value,menuTransition:n}},ml=t=>{const{today:e,time:n,modelValue:r,defaults:{range:A}}=pt(),{setTimeModelValue:i}=Sn();s.watch(A,(o,a)=>{o.enabled!==a.enabled&&i(n,r.value,e,A.value.enabled)},{deep:!0}),s.watch(r,(o,a)=>{t&&JSON.stringify(o??{})!==JSON.stringify(a??{})&&t()},{deep:!0})},Zr=()=>{const{defaults:{safeDates:t,range:e,multiDates:n,filters:r,timeConfig:A},rootProps:i,getDate:o}=pt(),{getMapKeyType:a,getMapDate:l,errorMapper:u,convertType:d}=Sn(),{isDateBefore:h,isDateAfter:p,isDateEqual:m,resetDate:v,getDaysInBetween:B,setTimeValue:y,getTimeObj:w,setTime:C}=jn(),k=N=>t.value.disabledDates?typeof t.value.disabledDates=="function"?t.value.disabledDates(o(N)):!!l(N,t.value.disabledDates):!1,F=N=>t.value.maxDate?i.yearPicker?tt(N)>tt(t.value.maxDate):p(N,t.value.maxDate):!1,U=N=>t.value.minDate?i.yearPicker?tt(N)<tt(t.value.minDate):h(N,t.value.minDate):!1,D=N=>{if(!N)return!1;const R=F(N),J=U(N),z=k(N),le=r.value.months.map(X=>+X).includes(vt(N)),E=r.value.weekDays?.length?r.value.weekDays.some(X=>+X===SU(N)):!1,_=me(N),O=tt(N),ie=O<+i.yearRange[0]||O>+i.yearRange[1];return!(R||J||z||le||ie||E||_)},M=(N,R)=>h(...Ce(t.value.minDate,N,R))||m(...Ce(t.value.minDate,N,R)),K=(N,R)=>p(...Ce(t.value.maxDate,N,R))||m(...Ce(t.value.maxDate,N,R)),q=(N,R,J)=>{let z=!1;return t.value.maxDate&&J&&K(N,R)&&(z=!0),t.value.minDate&&!J&&M(N,R)&&(z=!0),z},ce=(N,R,J,z)=>{let le=!1;return z&&(t.value.minDate||t.value.maxDate)?t.value.minDate&&t.value.maxDate?le=q(N,R,J):(t.value.minDate&&M(N,R)||t.value.maxDate&&K(N,R))&&(le=!0):le=!0,le},me=N=>Array.isArray(t.value.allowedDates)&&!t.value.allowedDates.length?!0:t.value.allowedDates?!l(N,t.value.allowedDates,a(i.monthPicker,i.yearPicker)):!1,ve=N=>!D(N),Be=N=>e.value.noDisabledRange?!fp({start:N[0],end:N[1]}).some(R=>ve(R)):!0,te=N=>{if(N){const R=tt(N);return R>=+i.yearRange[0]&&R<=i.yearRange[1]}return!0},V=(N,R)=>!!(Array.isArray(N)&&N[R]&&(e.value.maxRange||e.value.minRange)&&te(N[R])),Y=(N,R,J=0)=>{if(V(R,J)&&te(N)){const z=ZB(N,R[J]),le=B(R[J],N),E=le.length===1?0:le.filter(O=>ve(O)).length,_=Math.abs(z)-(e.value.minMaxRawRange?0:E);if(e.value.minRange&&e.value.maxRange)return _>=+e.value.minRange&&_<=+e.value.maxRange;if(e.value.minRange)return _>=+e.value.minRange;if(e.value.maxRange)return _<=+e.value.maxRange}return!0},x=()=>!A.value.enableTimePicker||i.monthPicker||i.yearPicker||A.value.ignoreTimeValidation,Q=N=>Array.isArray(N)?[N[0]?y(N[0]):null,N[1]?y(N[1]):null]:y(N),P=(N,R,J)=>R?N.find(z=>+z.hours===qA(R)&&z.minutes==="*"?!0:+z.minutes===Ci(R)&&+z.hours===qA(R))&&J:!1,T=(N,R,J)=>{const[z,le]=N,[E,_]=R;return!P(z,E,J)&&!P(le,_,J)&&J},S=(N,R)=>{const J=Array.isArray(R)?R:[R];return Array.isArray(i.disabledTimes)?Array.isArray(i.disabledTimes[0])?T(i.disabledTimes,J,N):!J.some(z=>P(i.disabledTimes,z,N)):N},G=(N,R)=>{const J=Array.isArray(R)?[w(R[0]),R[1]?w(R[1]):void 0]:w(R),z=!i.disabledTimes(J);return N&&z},Ae=(N,R)=>i.disabledTimes?Array.isArray(i.disabledTimes)?S(R,N):G(R,N):R,ne=N=>{let R=!0;if(!N||x())return!0;const J=!t.value.minDate&&!t.value.maxDate?Q(N):N;return(i.maxTime||t.value.maxDate)&&(R=j(i.maxTime,t.value.maxDate,"max",d(J),R)),(i.minTime||t.value.minDate)&&(R=j(i.minTime,t.value.minDate,"min",d(J),R)),Ae(N,R)},ee=N=>{if(!i.monthPicker)return!0;let R=!0;const J=o(v(N));if(t.value.minDate&&t.value.maxDate){const z=o(v(t.value.minDate)),le=o(v(t.value.maxDate));return p(J,z)&&h(J,le)||m(J,z)||m(J,le)}if(t.value.minDate){const z=o(v(t.value.minDate));R=p(J,z)||m(J,z)}if(t.value.maxDate){const z=o(v(t.value.maxDate));R=h(J,z)||m(J,z)}return R},re=s.computed(()=>N=>!A.value.enableTimePicker||A.value.ignoreTimeValidation?!0:ne(N)),pe=s.computed(()=>N=>i.monthPicker?Array.isArray(N)&&(e.value.enabled||n.value.enabled)?!N.filter(R=>!ee(R)).length:ee(N):!0),de=(N,R,J)=>{if(!R||J&&!t.value.maxDate||!J&&!t.value.minDate)return!1;const z=J?bA(N,1):ea(N,1),le=[vt(z),tt(z)];return J?!K(...le):!M(...le)},Ce=(N,R,J)=>[ft(o(N),{date:1}),ft(o(),{month:R,year:J,date:1})],W=(N,R,J,z)=>{if(!N)return!0;if(z){const le=J==="max"?bi(N,R):XA(N,R),E={seconds:0,milliseconds:0};return le||Vs(ft(N,E),ft(R,E))}return J==="max"?N.getTime()<=R.getTime():N.getTime()>=R.getTime()},j=(N,R,J,z,le)=>{if(Array.isArray(z)){const _=$(N,z[0],R),O=$(N,z[1],R);return W(z[0],_,J,!!R)&&W(z[1],O,J,!!R)&&le}const E=$(N,z,R);return W(z,E,J,!!R)&&le},$=(N,R,J)=>N?C(N,R):o(J??R);return{isDisabled:ve,validateDate:D,validateMonthYearInRange:ce,isDateRangeAllowed:Be,checkMinMaxRange:Y,isValidTime:ne,validateMonthYear:de,validateMinDate:M,validateMaxDate:K,isValidDate:N=>Array.isArray(N)?dl(N[0])&&(N[1]?dl(N[1]):!0):N?dl(N):!1,checkPartialRangeValue:N=>{if(N)return null;throw new Error(u.prop("partial-range"))},checkRangeEnabled:(N,R)=>{if(R)return N();throw new Error(u.prop("range"))},checkMinMaxValue:(N,R,J)=>{const z=J!=null,le=R!=null;if(!z&&!le)return!1;const E=+J,_=+R;return z&&le?+N>E||+N<_:z?+N>E:le?+N<_:!1},isTimeValid:re,isMonthValid:pe}},L_=t=>{const{rootEmit:e,rootProps:n,defaults:{timeConfig:r,flow:A}}=pt(),i=s.ref(0),o=s.reactive({[is.timePicker]:!r.value.enableTimePicker||n.timePicker||n.monthPicker,[is.calendar]:!1,[is.header]:!1}),a=s.computed(()=>n.monthPicker||n.timePicker),l=m=>{if(A.value?.steps?.length){if(!m&&a.value)return p();o[m]=!0,Object.keys(o).filter(v=>!o[v]).length||p()}},u=()=>{A.value?.steps?.length&&i.value!==-1&&(i.value+=1,e("flow-step",i.value),p()),A.value?.steps?.length===i.value&&s.nextTick().then(()=>d())},d=()=>{i.value=-1},h=(m,v,...B)=>{A.value?.steps[i.value]===m&&t.value&&t.value[v]?.(...B)},p=(m=0)=>{m&&(i.value+=m),h(hr.month,"toggleMonthPicker",!0),h(hr.year,"toggleYearPicker",!0),h(hr.calendar,"toggleTimePicker",!1,!0),h(hr.time,"toggleTimePicker",!0,!0);const v=A.value?.steps[i.value];(v===hr.hours||v===hr.minutes||v===hr.seconds)&&h(v,"toggleTimePicker",!0,!0,v)};return{childMount:l,updateFlowStep:u,resetFlow:d,handleFlow:p,flowStep:i}};function kp(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}function gl(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let A;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,a=n?.width?String(n.width):o;A=t.formattingValues[a]||t.formattingValues[o]}else{const o=t.defaultWidth,a=n?.width?String(n.width):t.defaultWidth;A=t.values[a]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return A[i]}}function vl(t){return(e,n={})=>{const r=n.width,A=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(A);if(!i)return null;const o=i[0],a=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?H_(a,h=>h.test(o)):R_(a,h=>h.test(o));let u;u=t.valueCallback?t.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const d=e.slice(o.length);return{value:u,rest:d}}}function R_(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function H_(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function P_(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const A=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const a=e.slice(A.length);return{value:o,rest:a}}}const $_={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},K_=(t,e,n)=>{let r;const A=$_[t];return typeof A=="string"?r=A:e===1?r=A.one:r=A.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},z_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},W_=(t,e,n,r)=>z_[t],G_={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Y_={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},q_={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},X_={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},J_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},j_={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Z_=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},V_={ordinalNumber:Z_,era:gl({values:G_,defaultWidth:"wide"}),quarter:gl({values:Y_,defaultWidth:"wide",argumentCallback:t=>t-1}),month:gl({values:q_,defaultWidth:"wide"}),day:gl({values:X_,defaultWidth:"wide"}),dayPeriod:gl({values:J_,defaultWidth:"wide",formattingValues:j_,defaultFormattingWidth:"wide"})},eD=/^(\d+)(th|st|nd|rd)?/i,tD=/\d+/i,nD={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rD={any:[/^b/i,/^(a|c)/i]},AD={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},iD={any:[/1/i,/2/i,/3/i,/4/i]},oD={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},sD={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},aD={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lD={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cD={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},uD={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},dD={ordinalNumber:P_({matchPattern:eD,parsePattern:tD,valueCallback:t=>parseInt(t,10)}),era:vl({matchPatterns:nD,defaultMatchWidth:"wide",parsePatterns:rD,defaultParseWidth:"any"}),quarter:vl({matchPatterns:AD,defaultMatchWidth:"wide",parsePatterns:iD,defaultParseWidth:"any",valueCallback:t=>t+1}),month:vl({matchPatterns:oD,defaultMatchWidth:"wide",parsePatterns:sD,defaultParseWidth:"any"}),day:vl({matchPatterns:aD,defaultMatchWidth:"wide",parsePatterns:lD,defaultParseWidth:"any"}),dayPeriod:vl({matchPatterns:cD,defaultMatchWidth:"any",parsePatterns:uD,defaultParseWidth:"any"})},fD={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hD={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pD={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mD={date:kp({formats:fD,defaultWidth:"full"}),time:kp({formats:hD,defaultWidth:"full"}),dateTime:kp({formats:pD,defaultWidth:"full"})},gD={code:"en-US",formatDistance:K_,formatLong:mD,formatRelative:W_,localize:V_,match:dD,options:{weekStartsOn:0,firstWeekContainsDate:1}},T0={noDisabledRange:!1,showLastInRange:!0,minMaxRawRange:!1,partialRange:!0,disableTimeRangeValidation:!1,maxRange:void 0,minRange:void 0,autoRange:void 0,fixedStart:!1,fixedEnd:!1,autoSwitchStartEnd:!0},vD={allowStopPropagation:!0,closeOnScroll:!1,modeHeight:255,allowPreventDefault:!1,closeOnClearValue:!0,closeOnAutoApply:!0,noSwipe:!1,keepActionRow:!1,onClickOutside:void 0,tabOutClosesMenu:!0,arrowLeft:void 0,keepViewOnOffsetClick:!1,timeArrowHoldThreshold:0,shadowDom:!1,mobileBreakpoint:600,setDateOnMenuClose:!1,escClose:!0,spaceConfirm:!0,monthChangeOnArrows:!0,monthChangeOnScroll:!0},M0={enterSubmit:!0,tabSubmit:!0,openMenu:"open",selectOnFocus:!1,rangeSeparator:" - ",escClose:!0,format:void 0,maskFormat:void 0,applyOnBlur:!1,separators:void 0},wD={dates:[],years:[],months:[],quarters:[],weeks:[],weekdays:[],options:{highlightDisabled:!1}},BD={showSelect:!0,showCancel:!0,showNow:!1,showPreview:!0,selectBtnLabel:"Select",cancelBtnLabel:"Cancel",nowBtnLabel:"Now",nowBtnRound:void 0},yD={toggleOverlay:"Toggle overlay",menu:"Datepicker menu",input:"Datepicker input",openTimePicker:"Open time picker",closeTimePicker:"Close time Picker",incrementValue:t=>`Increment ${t}`,decrementValue:t=>`Decrement ${t}`,openTpOverlay:t=>`Open ${t} overlay`,amPmButton:"Switch AM/PM mode",openYearsOverlay:"Open years overlay",openMonthsOverlay:"Open months overlay",nextMonth:"Next month",prevMonth:"Previous month",nextYear:"Next year",prevYear:"Previous year",day:void 0,weekDay:void 0,clearInput:"Clear value",calendarIcon:"Calendar icon",timePicker:"Time picker",monthPicker:t=>`Month picker${t?" overlay":""}`,yearPicker:t=>`Year picker${t?" overlay":""}`,timeOverlay:t=>`${t} overlay`},I0={menuAppearTop:"dp-menu-appear-top",menuAppearBottom:"dp-menu-appear-bottom",open:"dp-slide-down",close:"dp-slide-up",next:"calendar-next",previous:"calendar-prev",vNext:"dp-slide-up",vPrevious:"dp-slide-down"},CD={weekDays:[],months:[],years:[],times:{hours:[],minutes:[],seconds:[]}},bD={month:"LLL",year:"yyyy",weekDay:"EEEEEE",quarter:"MMMM",day:"d",input:void 0,preview:void 0},ED={enableTimePicker:!0,ignoreTimeValidation:!1,enableSeconds:!1,enableMinutes:!0,is24:!0,noHoursOverlay:!1,noMinutesOverlay:!1,noSecondsOverlay:!1,hoursGridIncrement:1,minutesGridIncrement:5,secondsGridIncrement:5,hoursIncrement:1,minutesIncrement:1,secondsIncrement:1,timePickerInline:!1,startTime:void 0},kD={flowStep:0,menuWrapRef:null,collapse:!1},SD={weekStart:Q0.Monday,yearRange:()=>[1900,2100],ui:()=>({}),locale:()=>gD,dark:!1,transitions:!0,hideNavigation:()=>[],vertical:!1,hideMonthYearSelect:!1,disableYearSelect:!1,autoApply:!1,disabledDates:()=>[],hideOffsetDates:!1,noToday:!1,markers:()=>[],presetDates:()=>[],preventMinMaxNavigation:!1,reverseYears:!1,weekPicker:!1,arrowNavigation:!1,monthPicker:!1,yearPicker:!1,quarterPicker:!1,timePicker:!1,modelAuto:!1,multiDates:!1,range:!1,inline:!1,sixWeeks:!1,focusStartDate:!1,yearFirst:!1,loading:!1,centered:!1},U0={name:void 0,required:!1,autocomplete:"off",state:void 0,clearable:!0,alwaysClearable:!1,hideInputIcon:!1,id:void 0,inputmode:"none"},au={type:"local",hideOnOffsetDates:!1,label:"W"},xD=t=>{const{getMapKey:e,getMapKeyType:n,getTimeObjFromCurrent:r}=Sn();function A(x,Q){let P;return t.timezone?P=new ta(x??new Date,t.timezone):P=x?new Date(x):new Date,Q?ft(P,{hours:0,minutes:0,seconds:0,milliseconds:0}):P}const i=()=>{const x=Be.value.enableSeconds?":ss":"",Q=Be.value.enableMinutes?":mm":"";return Be.value.is24?`HH${Q}${x}`:`hh${Q}${x} aa`},o=()=>t.monthPicker?"MM/yyyy":t.timePicker?i():t.weekPicker?`${D.value?.type==="iso"?"II":"ww"}-RR`:t.yearPicker?"yyyy":t.quarterPicker?"QQQ/yyyy":Be.value.enableTimePicker?`MM/dd/yyyy, ${i()}`:"MM/dd/yyyy",a=x=>r(A(),x,Be.value.enableSeconds),l=()=>q.value.enabled?Be.value.startTime&&Array.isArray(Be.value.startTime)?[a(Be.value.startTime[0]),a(Be.value.startTime[1])]:null:Be.value.startTime&&!Array.isArray(Be.value.startTime)?a(Be.value.startTime):null,u=x=>x?typeof x=="boolean"?x?2:0:Math.max(+x,2):0,d=x=>{const Q=n(t.monthPicker,t.yearPicker);return new Map(x.map(P=>{const T=A(P,h.value);return[e(T,Q),T]}))},h=s.computed(()=>t.monthPicker||t.yearPicker||t.quarterPicker),p=s.computed(()=>{const x=typeof t.multiCalendars=="object"&&t.multiCalendars,Q={static:!0,solo:!1};if(!t.multiCalendars)return{...Q,count:u(!1)};const P=x?t.multiCalendars:{},T=x?P.count??!0:t.multiCalendars,S=u(T);return Object.assign(Q,P,{count:S})}),m=s.computed(()=>l()),v=s.computed(()=>({...yD,...t.ariaLabels})),B=s.computed(()=>({...CD,...t.filters})),y=s.computed(()=>typeof t.transitions=="boolean"?t.transitions?I0:!1:{...I0,...t.transitions}),w=s.computed(()=>({...BD,...t.actionRow})),C=s.computed(()=>typeof t.textInput=="object"?{...M0,...t.textInput,format:typeof t.textInput.format=="string"?t.textInput.format:me.value.input,pattern:t.textInput.format??me.value.input,enabled:!0}:{...M0,format:me.value.input,pattern:me.value.input,enabled:t.textInput}),k=s.computed(()=>{const x={input:!1};return typeof t.inline=="object"?{...x,...t.inline,enabled:!0}:{enabled:t.inline,...x}}),F=s.computed(()=>({...vD,...t.config})),U=s.computed(()=>typeof t.highlight=="function"?t.highlight:{...wD,...t.highlight}),D=s.computed(()=>typeof t.weekNumbers=="object"?{type:t.weekNumbers?.type??au.type,hideOnOffsetDates:t.weekNumbers?.hideOnOffsetDates??au.hideOnOffsetDates,label:t.weekNumbers.label??au.label}:t.weekNumbers?au:void 0),M=s.computed(()=>typeof t.multiDates=="boolean"?{enabled:t.multiDates,dragSelect:!0,limit:null}:{enabled:!!t.multiDates,limit:t.multiDates?.limit?+t.multiDates.limit:null,dragSelect:t.multiDates?.dragSelect??!0}),K=s.computed(()=>({minDate:t.minDate?A(t.minDate):null,maxDate:t.maxDate?A(t.maxDate):null,disabledDates:Array.isArray(t.disabledDates)?d(t.disabledDates):t.disabledDates,allowedDates:Array.isArray(t.allowedDates)?d(t.allowedDates):null,highlight:typeof U.value=="object"&&Array.isArray(U.value.dates)?d(U.value.dates):U.value,markers:t.markers?.length?new Map(t.markers.map(x=>{const Q=A(x.date);return[e(Q,na.DATE),x]})):null})),q=s.computed(()=>typeof t.range=="object"?{enabled:!0,...T0,...t.range}:{enabled:t.range,...T0}),ce=s.computed(()=>({...Object.fromEntries(Object.keys(t.ui).map(x=>{const Q=x,P=t.ui[Q];if(Q==="dayClass")return[Q,t.ui[Q]];const T=typeof t.ui[Q]=="string"?{[P]:!0}:Object.fromEntries(P.map(S=>[S,!0]));return[x,T]}))})),me=s.computed(()=>({...bD,...t.formats,input:t.formats?.input??o(),preview:t.formats?.preview??o()})),ve=s.computed(()=>{if(t.teleport)return typeof t.teleport=="string"?t.teleport:typeof t.teleport=="boolean"?"body":t.teleport}),Be=s.computed(()=>({...ED,...t.timeConfig})),te=s.computed(()=>{if(t.flow)return{steps:[],partial:!1,...t.flow}}),V=s.computed(()=>{const x=C.value.enabled?"text":"none";return t.inputAttrs?{...U0,inputmode:x,...t.inputAttrs}:{...U0,inputmode:x}}),Y=s.computed(()=>({offset:t.floating?.offset??10,arrow:t.floating?.arrow??!0,strategy:t.floating?.strategy??void 0,placement:t.floating?.placement??void 0,flip:t.floating?.flip??!0,shift:t.floating?.shift??!0}));return{transitions:y,multiCalendars:p,startTime:m,ariaLabels:v,filters:B,actionRow:w,textInput:C,inline:k,config:F,highlight:U,weekNumbers:D,range:q,safeDates:K,multiDates:M,ui:ce,formats:me,teleport:ve,timeConfig:Be,flow:te,inputAttrs:V,floatingConfig:Y,getDate:A}},Sn=()=>{const t=(C,k)=>jr(C,k??na.DATE),e=(C,k)=>C?na.MONTH_AND_YEAR:k?na.YEAR:na.DATE,n=(C,k,F)=>k.get(t(C,F)),r=C=>C,A=C=>C===0?C:!C||Number.isNaN(+C)?null:+C,i=()=>["a[href]","area[href]","input:not([disabled]):not([type='hidden'])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","[tabindex]:not([tabindex='-1'])","[data-datepicker-instance]"].join(", "),o=(C,k)=>{let F=[...document.querySelectorAll(i())];F=F.filter(D=>!C.contains(D)||"datepicker-instance"in D.dataset);const U=F.indexOf(C);if(U>=0&&(k?U-1>=0:U+1<=F.length))return F[U+(k?-1:1)]},a=C=>String(C).padStart(2,"0"),l=(C,k)=>C?.querySelector(`[data-dp-element="${k}"]`),u=(C,k,F=!1)=>{C&&k.allowStopPropagation&&(F&&C.stopImmediatePropagation(),C.stopPropagation())},d=(C,k,F=!1,U)=>{if(C.key===Nt.enter||C.key===Nt.space)return F&&C.preventDefault(),k();if(U)return U(C)},h=(C,k)=>{k.allowStopPropagation&&C.stopPropagation(),k.allowPreventDefault&&C.preventDefault()},p=C=>{if(C)return[...C.querySelectorAll("input, button, select, textarea, a[href]")][0]},m=()=>"ontouchstart"in globalThis||navigator.maxTouchPoints>0,v=C=>[12,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11][C],B=C=>{const k=[],F=U=>U.filter(D=>!!D);for(let U=0;U<C.length;U+=3){const D=[C[U],C[U+1],C[U+2]];k.push(F(D))}return k},y={prop:C=>`"${C}" prop must be enabled!`,dateArr:C=>`You need to use array as "model-value" binding in order to support "${C}"`},w=(C,k,F,U,D)=>{const M={hours:qA,minutes:Ci,seconds:Ao};if(!k)return U?[M[C](F),M[C](F)]:M[C](F);if(Array.isArray(k)&&U){const K=k[0]??F,q=k[1];return[M[C](K),q?M[C](q):D[C][1]??M[C](F)]}return Array.isArray(k)&&!U?M[C](k[k.length-1]??F):M[C](k)};return{getMapKey:t,getMapKeyType:e,getMapDate:n,convertType:r,getNumVal:A,findNextFocusableElement:o,padZero:a,getElWithin:l,checkStopPropagation:u,checkKeyDown:d,handleEventPropagation:h,findFocusableEl:p,isTouchDevice:m,hoursToAmPmHours:v,getGroupedList:B,setTimeModelValue:(C,k,F,U)=>{C.hours=w("hours",k,F,U,C),C.minutes=w("minutes",k,F,U,C),C.seconds=w("seconds",k,F,U,C)},getTimeObjFromCurrent:(C,k,F)=>{const U={hours:qA(C),minutes:Ci(C),seconds:F?Ao(C):0};return Object.assign(U,k)},errorMapper:y}},jn=()=>{const{getDate:t}=pt(),{getMapDate:e,getGroupedList:n}=Sn(),r=(w,C)=>{if(!w)return t();const k=t(w),F=ft(k,{hours:0,minutes:0,seconds:0,milliseconds:0});return C?NI(F):F},A=(w,C)=>{const k=t(C);return ft(k,{hours:+(w.hours??qA(k)),minutes:+(w.minutes??Ci(k)),seconds:+(w.seconds??Ao(k)),milliseconds:0})},i=(w,C)=>{const k=Jr(w,{weekStartsOn:+C}),F=hp(w,{weekStartsOn:+C});return[k,F]},o=(w,C)=>!w||!C?!1:bi(r(w),r(C)),a=(w,C)=>!w||!C?!1:Vs(r(w),r(C)),l=(w,C)=>!w||!C?!1:XA(r(w),r(C)),u=(w,C,k)=>w?.[0]&&w?.[1]?l(k,w[0])&&o(k,w[1]):w?.[0]&&C?l(k,w[0])&&o(k,C)||o(k,w[0])&&l(k,C):!1,d=(w,C)=>{const k=l(w,C)?C:w,F=l(C,w)?C:w;return fp({start:k,end:F})},h=w=>`dp-${jr(w,"yyyy-MM-dd")}`,p=w=>r(ft(t(w),{date:1})),m=(w,C)=>{if(C){const k=tt(t(C));if(k>w)return 12;if(k===w)return vt(t(C))}},v=(w,C)=>{if(C){const k=tt(t(C));return k<w?-1:k===w?vt(t(C)):void 0}},B=w=>{if(w)return tt(t(w))},y=w=>({hours:qA(w),minutes:Ci(w),seconds:Ao(w)});return{resetDateTime:r,groupListAndMap:(w,C)=>n(w).map(k=>k.map(F=>{const{active:U,disabled:D,isBetween:M,highlighted:K}=C(F);return{...F,active:U,disabled:D,className:{dp__overlay_cell_active:U,dp__overlay_cell:!U,dp__overlay_cell_disabled:D,dp__overlay_cell_pad:!0,dp__overlay_cell_active_disabled:D&&U,dp__cell_in_between:M,"dp--highlighted":K}}})),setTime:A,getWeekFromDate:i,isDateAfter:l,isDateBefore:o,isDateBetween:u,isDateEqual:a,getDaysInBetween:d,getCellId:h,resetDate:p,getMinMonth:m,getMaxMonth:v,getYearFromDate:B,getTimeObj:y,setTimeValue:w=>ft(t(),y(w)),sanitizeTime:(w,C,k)=>C&&(k||k===0)?Object.fromEntries(["hours","minutes","seconds"].map(F=>F===C?[F,k]:[F,Number.isNaN(+w[F])?void 0:+w[F]])):{hours:Number.isNaN(+w.hours)?void 0:+w.hours,minutes:Number.isNaN(+w.minutes)?void 0:+w.minutes,seconds:Number.isNaN(+(w.seconds??""))?void 0:+w.seconds},getBeforeAndAfterInRange:(w,C)=>{const k=g0(r(C),w),F=Xr(r(C),w);return{before:k,after:F}},isModelAuto:w=>Array.isArray(w)?!!w[0]&&!!w[1]:!1,matchDate:(w,C)=>w?C?C instanceof Map?!!e(w,C):C(t(w)):!1:!0,checkHighlightMonth:(w,C,k)=>typeof w=="function"?w({month:C,year:k}):w.months.some(F=>F.month===C&&F.year===k),checkHighlightYear:(w,C)=>typeof w=="function"?w(C):w.years.includes(C)}},lu=()=>{const{defaults:{config:t}}=pt(),e=s.ref(0);s.onMounted(()=>{n(),globalThis.addEventListener("resize",n,{passive:!0})}),s.onUnmounted(()=>{globalThis.removeEventListener("resize",n)});const n=()=>{e.value=globalThis.document.documentElement.clientWidth};return{isMobile:s.computed(()=>e.value<=t.value.mobileBreakpoint?!0:void 0)}},io=()=>{const{getDate:t,state:e,modelValue:n,rootProps:r,defaults:{formats:A,textInput:i}}=pt(),o=v=>jr(EA(t(),v),A.value.year,{locale:r.locale}),a=v=>jr(v0(t(),v),A.value.month,{locale:r.locale}),l=v=>jr(v,A.value.weekDay,{locale:r.locale}),u=v=>jr(v,A.value.quarter,{locale:r.locale}),d=(v,B)=>[v,B].map(y=>u(y)).join("-"),h=v=>jr(v,A.value.day,{locale:r.locale}),p=(v,B,y)=>{const w=y?A.value.preview:A.value.input;if(!v)return"";if(typeof w=="function")return w(v);const C=B??w,k={locale:r.locale};return Array.isArray(v)?`${jr(v[0],C,k)}${r.modelAuto&&!v[1]?"":i.value.rangeSeparator}${v[1]?jr(v[1],C,k):""}`:jr(v,C,k)},m=()=>{const v=B=>jr(B,i.value.format);return Array.isArray(n.value)?`${v(n.value[0])} ${i.value.rangeSeparator} ${n.value[1]?v(n.value[1]):""}`:""};return{formatYear:o,formatMonth:a,formatWeekDay:l,formatQuarter:u,formatSelectedDate:p,formatForTextInput:()=>e.isInputFocused&&n.value?Array.isArray(n.value)?m():jr(n.value,i.value.format):p(n.value),formatPreview:v=>p(v,void 0,!0),formatQuarterText:d,formatDay:h}},cu=()=>{const{rootProps:t}=pt(),{formatYear:e,formatMonth:n}=io();return{getMonths:()=>[0,1,2,3,4,5,6,7,8,9,10,11].map(r=>({text:n(r),value:r})),getYears:()=>{const r=[];for(let A=+t.yearRange[0];A<=+t.yearRange[1];A++)r.push({value:+A,text:e(A)});return t.reverseYears?r.reverse():r},isOutOfYearRange:r=>r<+t.yearRange[0]||r>+t.yearRange[1]}},FD=t=>({openMenu:()=>t.value?.openMenu(),closeMenu:()=>t.value?.closeMenu(),selectDate:()=>t.value?.selectDate(),clearValue:()=>t.value?.clearValue(),formatInputValue:()=>t.value?.formatInputValue(),updateInternalModelValue:e=>t.value?.updateInternalModelValue(e),setMonthYear:(e,n)=>t.value?.setMonthYear(e,n),parseModel:()=>t.value?.parseModel(),switchView:(e,n)=>t.value?.switchView(e,n),handleFlow:()=>t.value?.handleFlow(),toggleMenu:()=>t.value?.toggleMenu(),dpMenuRef:()=>t.value?.dpMenuRef(),dpWrapMenuRef:()=>t.value?.dpWrapMenuRef(),inputRef:()=>t.value?.inputRef()}),ra=()=>({boolHtmlAttribute:t=>t?!0:void 0}),QD=()=>{const{getDate:t,rootProps:e,defaults:{textInput:n,startTime:r,timeConfig:A}}=pt(),{getTimeObjFromCurrent:i}=Sn(),o=s.ref(!1),a=s.computed(()=>Array.isArray(r.value)?r.value[0]:r.value??i(t(),{},A.value.enableSeconds)),l=(d,h)=>{const p=/[^a-zA-Z]+/g,m=/\D+/g,v=h.split(m),B=d.split(p),y=d.match(p)||[],w=h.match(m)||[];let C="";for(let k=0;k<v.length&&k<B.length;k++){k>0&&w[k-1]&&(C+=y[k-1]||w[k-1]);const F=v[k]?.length;C+=B[k]?.slice(0,F)}return C},u=(d,h,p)=>{const m=bp(d,l(h,d),t(),{locale:e.locale});return dl(m)&&e0(m)?p||o.value?m:ft(m,{hours:+a.value.hours,minutes:+a.value.minutes,seconds:+(a.value.seconds??0),milliseconds:0}):null};return{textPasted:o,parseFreeInput:(d,h)=>{if(typeof n.value.pattern=="string")return u(d,n.value.pattern,h);if(Array.isArray(n.value.pattern)){let p=null;for(const m of n.value.pattern)if(p=u(d,m,h),p)break;return p}return typeof n.value.pattern=="function"?n.value.pattern(d):null},applyMaxValues:(d,h)=>{const p={MM:12,DD:31,hh:23,mm:59,ss:59};let m="",v=0;for(let B=0;B<h.length;B++){const y=h[B],w=y.length,C=d.slice(v,v+w);if(!C)break;if(C.length<w)m+=C;else{let k=Number.parseInt(C,10);p[y]&&k>p[y]&&(k=p[y]),m+=k.toString().padStart(w,"0").slice(0,w)}v+=w}return m},createMaskedValue:(d,h)=>{const p=/(YYYY|MM|DD|hh|mm|ss)/g,m=[...h.matchAll(p)].map(C=>C[0]),v=h.replace(p,"|").split("|").filter(Boolean),B=m.map(C=>C.length);let y="",w=0;for(let C=0;C<m.length;C++){const k=B[C],F=d.slice(w,w+k);if(!F)break;y+=F,F.length===k&&v[C]&&(y+=v[C]),w+=k}return y}}};var xA=(t=>(t.Input="input",t.DatePicker="date-picker",t.Calendar="calendar",t.DatePickerHeader="date-picker-header",t.Menu="menu",t.ActionRow="action-row",t.TimePicker="time-picker",t.TimeInput="time-input",t.PassTrough="pass-trough",t.MonthPicker="month-picker",t.YearMode="year-mode",t.QuarterPicker="quarter-picker",t.YearPicker="year-picker",t))(xA||{});const Aa=["time-input","time-picker","pass-trough"],_0=[{name:"trigger",use:["input"]},{name:"input-icon",use:["input"]},{name:"clear-icon",use:["input"]},{name:"dp-input",use:["input"]},{name:"clock-icon",use:["time-picker","time-input","pass-trough"]},{name:"arrow-left",use:["date-picker-header","pass-trough","year-mode"]},{name:"arrow-right",use:["date-picker-header","pass-trough","year-mode"]},{name:"arrow-up",use:["time-picker","time-input","date-picker-header","pass-trough"]},{name:"arrow-down",use:["time-picker","time-input","date-picker-header","pass-trough"]},{name:"calendar-icon",use:["date-picker-header","time-picker","pass-trough","year-mode"]},{name:"day",use:["calendar","pass-trough"]},{name:"month-overlay-value",use:["date-picker-header","pass-trough","month-picker"]},{name:"year-overlay-value",use:["date-picker-header","pass-trough","year-mode","year-picker"]},{name:"year-overlay",use:["date-picker-header","pass-trough"]},{name:"month-overlay",use:["date-picker-header","pass-trough"]},{name:"month-overlay-header",use:["date-picker-header","pass-trough"]},{name:"year-overlay-header",use:["date-picker-header","pass-trough"]},{name:"hours-overlay-value",use:Aa},{name:"hours-overlay-header",use:Aa},{name:"minutes-overlay-value",use:Aa},{name:"minutes-overlay-header",use:Aa},{name:"seconds-overlay-value",use:Aa},{name:"seconds-overlay-header",use:Aa},{name:"hours",use:["time-input","time-picker","pass-trough"]},{name:"minutes",use:["time-input","time-picker","pass-trough"]},{name:"seconds",use:["time-input","time-picker","pass-trough"]},{name:"month",use:["date-picker-header","time-picker","pass-trough"]},{name:"year",use:["date-picker-header","time-picker","pass-trough","year-mode"]},{name:"action-buttons",use:["action-row"]},{name:"action-preview",use:["action-row"]},{name:"calendar-header",use:["calendar","pass-trough"]},{name:"marker-tooltip",use:["calendar","pass-trough"]},{name:"action-extra",use:["menu"]},{name:"time-picker-overlay",use:["time-picker","time-picker","pass-trough"]},{name:"am-pm-button",use:["time-picker","time-input","pass-trough"]},{name:"left-sidebar",use:["menu"]},{name:"right-sidebar",use:["menu"]},{name:"month-year",use:["date-picker-header","pass-trough","month-picker","year-picker"]},{name:"time-picker",use:["date-picker","pass-trough"]},{name:"action-row",use:["action-row"]},{name:"marker",use:["calendar","pass-trough"]},{name:"quarter",use:["quarter-picker","pass-trough"]},{name:"top-extra",use:["date-picker-header","pass-trough","month-picker","quarter-picker","year-picker"]},{name:"tp-inline-arrow-up",use:["date-picker","time-input","time-picker","pass-trough"]},{name:"tp-inline-arrow-down",use:["date-picker","time-input","time-picker","pass-trough"]},{name:"arrow",use:["menu"]},{name:"menu-header",use:["menu"]}],VA=(t,e)=>_0.filter(n=>t[n.name]&&n.use.includes(e)).map(n=>n.name),D0=(t,e)=>_0.map(n=>n.name).concat(e?.filter(n=>n.slot).map(n=>n.slot)??[]).filter(n=>!!t[n]),TD={key:1,class:"dp__input_wrap"},MD=["id","name","inputmode","placeholder","disabled","readonly","required","value","autocomplete","aria-label","aria-disabled","aria-invalid"],ID={key:1,class:"dp--clear-btn"},UD=["aria-label"],_D=s.defineComponent({__name:"DatepickerInput",props:{isMenuOpen:{type:Boolean,default:!1}},emits:["clear","open","set-input-date","close","select-date","set-empty-date","toggle","focus","blur","real-blur"],setup(t,{expose:e,emit:n}){const r=n,A=t,{rootEmit:i,inputValue:o,rootProps:a,defaults:{textInput:l,ariaLabels:u,inline:d,config:h,range:p,multiDates:m,ui:v,inputAttrs:B}}=pt(),{checkMinMaxRange:y,isValidDate:w}=Zr(),{parseFreeInput:C,textPasted:k,createMaskedValue:F,applyMaxValues:U}=QD(),{checkKeyDown:D,checkStopPropagation:M}=Sn(),{boolHtmlAttribute:K}=ra(),q=s.useTemplateRef("dp-input"),ce=s.ref(null),me=s.ref(!1),ve=s.computed(()=>({dp__pointer:!a.disabled&&!a.readonly&&!l.value.enabled,dp__disabled:a.disabled,dp__input_readonly:!l.value.enabled,dp__input:!0,dp__input_not_clearable:!B.value.clearable,dp__input_icon_pad:!B.value.hideInputIcon,dp__input_valid:typeof B.value.state=="boolean"?B.value.state:!1,dp__input_invalid:typeof B.value.state=="boolean"?!B.value.state:!1,dp__input_focus:me.value||A.isMenuOpen,dp__input_reg:!l.value.enabled,...v.value.input})),Be=()=>{r("set-input-date",null),B&&a.autoApply&&(r("set-empty-date"),ce.value=null)},te=W=>{if(l.value.separators?.length){const j=new RegExp(l.value.separators.map($=>$.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"));return W.split(j)}return W.split(l.value.rangeSeparator)},V=W=>{const[j,$]=te(W);if(j){const N=C(j.trim(),o.value),R=$?C($.trim(),o.value):void 0;if(XA(N,R))return;const J=N&&R?[N,R]:[N];y(R,J,0)&&(ce.value=N?J:null)}},Y=()=>{k.value=!0},x=W=>{if(p.value.enabled)V(W);else if(m.value.enabled){const j=W.split(";");ce.value=j.map($=>C($.trim())).filter($=>!!$)}else ce.value=C(W,o.value)},Q=W=>{const j=typeof W=="string"?W:W.target?.value,$=l?.value?.maskFormat;let N=j;if(typeof $=="string"){const R=/(YYYY|MM|DD|hh|mm|ss)/g,J=[...$.matchAll(R)].map(E=>E[0]),z=j.replace(/\D/g,""),le=U(z,J);N=F(le,$)}N===""?Be():(l.value.openMenu&&!A.isMenuOpen&&r("open"),x(N),r("set-input-date",ce.value)),k.value=!1,o.value=N,i("text-input",W,ce.value)},P=W=>{l.value.enabled?(x(W.target.value),l.value.enterSubmit&&w(ce.value)&&o.value!==""?(r("set-input-date",ce.value,!0),ce.value=null):l.value.enterSubmit&&o.value===""&&(ce.value=null,r("clear"))):G(W)},T=(W,j)=>{l.value.enabled&&l.value.tabSubmit&&!j&&x(W.target.value),l.value.tabSubmit&&w(ce.value)&&o.value!==""?(r("set-input-date",ce.value,!0,!0),ce.value=null):l.value.tabSubmit&&o.value===""&&(ce.value=null,r("clear"))},S=()=>{me.value=!0,r("focus"),s.nextTick().then(()=>{l.value.enabled&&l.value.selectOnFocus&&q.value?.select()})},G=W=>{if(M(W,h.value,!0),l.value.enabled&&l.value.openMenu&&!d.value.input){if(l.value.openMenu==="open"&&!A.isMenuOpen)return r("open");if(l.value.openMenu==="toggle")return r("toggle")}else l.value.enabled||r("toggle")},Ae=()=>{r("real-blur"),me.value=!1,(!A.isMenuOpen||d.value.enabled&&d.value.input)&&r("blur"),(a.autoApply&&l.value.enabled&&ce.value&&!A.isMenuOpen||l.value.applyOnBlur)&&(r("set-input-date",ce.value),r("select-date"),ce.value=null)},ne=W=>{M(W,h.value,!0),r("clear")},ee=()=>{r("close")},re=W=>{if(W.key==="Tab"&&T(W),W.key==="Enter"&&P(W),W.key==="Escape"&&l.value.escClose&&ee(),!l.value.enabled){if(W.code==="Tab")return;W.preventDefault()}},pe=()=>{q.value?.focus({preventScroll:!0})},de=W=>{ce.value=W},Ce=W=>{W.key===Nt.tab&&T(W,!0)};return e({focusInput:pe,setParsedDate:de}),(W,j)=>(s.openBlock(),s.createElementBlock("div",{onClick:G},[!W.$slots["dp-input"]&&!s.unref(d).enabled?s.renderSlot(W.$slots,"trigger",{key:0}):s.createCommentVNode("",!0),!W.$slots.trigger&&(!s.unref(d).enabled||s.unref(d).input)?(s.openBlock(),s.createElementBlock("div",TD,[!W.$slots.trigger&&(!s.unref(d).enabled||s.unref(d).enabled&&s.unref(d).input)?s.renderSlot(W.$slots,"dp-input",{key:0,value:s.unref(o),isMenuOpen:t.isMenuOpen,onInput:Q,onEnter:P,onTab:T,onClear:ne,onBlur:Ae,onKeypress:re,onPaste:Y,onFocus:S,openMenu:()=>W.$emit("open"),closeMenu:()=>W.$emit("close"),toggleMenu:()=>W.$emit("toggle")},()=>[s.createElementVNode("input",{id:s.unref(B).id,ref:"dp-input","data-test-id":"dp-input",name:s.unref(B).name,class:s.normalizeClass(ve.value),inputmode:s.unref(B).inputmode,placeholder:s.unref(a).placeholder,disabled:s.unref(K)(s.unref(a).disabled),readonly:s.unref(K)(s.unref(a).readonly),required:s.unref(K)(s.unref(B).required),value:s.unref(o),autocomplete:s.unref(B).autocomplete,"aria-label":s.unref(u).input,"aria-disabled":s.unref(a).disabled||void 0,"aria-invalid":s.unref(B).state===!1?!0:void 0,onInput:Q,onBlur:Ae,onFocus:S,onKeypress:re,onKeydown:j[0]||(j[0]=$=>re($)),onPaste:Y,onInvalid:j[1]||(j[1]=$=>s.unref(i)("invalid",$))},null,42,MD)]):s.createCommentVNode("",!0),s.createElementVNode("div",{onClick:j[4]||(j[4]=$=>r("toggle"))},[W.$slots["input-icon"]&&!s.unref(B).hideInputIcon?(s.openBlock(),s.createElementBlock("span",{key:0,class:"dp__input_icon",onClick:j[2]||(j[2]=$=>r("toggle"))},[s.renderSlot(W.$slots,"input-icon")])):s.createCommentVNode("",!0),!W.$slots["input-icon"]&&!s.unref(B).hideInputIcon&&!W.$slots["dp-input"]?(s.openBlock(),s.createBlock(s.unref(hl),{key:1,"aria-label":s.unref(u)?.calendarIcon,class:"dp__input_icon dp__input_icons",onClick:j[3]||(j[3]=$=>r("toggle"))},null,8,["aria-label"])):s.createCommentVNode("",!0)]),W.$slots["clear-icon"]&&(s.unref(B).alwaysClearable||s.unref(o)&&s.unref(B).clearable&&!s.unref(a).disabled&&!s.unref(a).readonly)?(s.openBlock(),s.createElementBlock("span",ID,[s.renderSlot(W.$slots,"clear-icon",{clear:ne})])):s.createCommentVNode("",!0),!W.$slots["clear-icon"]&&(s.unref(B).alwaysClearable||s.unref(B).clearable&&s.unref(o)&&!s.unref(a).disabled&&!s.unref(a).readonly)?(s.openBlock(),s.createElementBlock("button",{key:2,"aria-label":s.unref(u)?.clearInput,class:"dp--clear-btn",type:"button","data-test-id":"clear-input-value-btn",onKeydown:j[5]||(j[5]=$=>s.unref(D)($,()=>ne($),!0,Ce)),onClick:j[6]||(j[6]=s.withModifiers($=>ne($),["prevent"]))},[s.createVNode(s.unref(U_),{class:"dp__input_icons"})],40,UD)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)]))}}),DD={ref:"action-row",class:"dp__action_row"},OD=["title"],ND={ref:"action-buttons-container",class:"dp__action_buttons","data-dp-element":"action-row"},LD=["disabled"],RD=s.defineComponent({__name:"ActionRow",props:{menuMount:{type:Boolean,default:!1},calendarWidth:{default:0}},emits:["close-picker","select-date","select-now"],setup(t,{emit:e}){const n=e,r=t,{rootEmit:A,rootProps:i,modelValue:o,defaults:{actionRow:a,multiCalendars:l,inline:u,range:d,multiDates:h,formats:p}}=pt(),{isTimeValid:m,isMonthValid:v}=Zr(),{formatPreview:B}=io(),{checkKeyDown:y,convertType:w}=Sn(),{boolHtmlAttribute:C}=ra(),k=s.useTemplateRef("action-buttons-container"),F=s.useTemplateRef("action-row"),U=s.ref(!1),D=s.ref({});s.onMounted(()=>{M(),globalThis.addEventListener("resize",M)}),s.onUnmounted(()=>{globalThis.removeEventListener("resize",M)});const M=()=>{U.value=!1,setTimeout(()=>{const Y=k.value?.getBoundingClientRect(),x=F.value?.getBoundingClientRect();Y&&x&&(D.value.maxWidth=`${x.width-Y.width-20}px`),U.value=!0},0)},K=s.computed(()=>d.value.enabled&&!d.value.partialRange&&o.value?o.value.length===2:!0),q=s.computed(()=>!m.value(o.value)||!v.value(o.value)||!K.value),ce=()=>{const Y=p.value.preview;return i.timePicker||i.monthPicker,Y(w(o.value))},me=()=>{const Y=o.value;return l.value.count>0?`${B(Y[0])} - ${B(Y[1])}`:[B(Y[0]),B(Y[1])]},ve=s.computed(()=>!o.value||!r.menuMount?"":typeof p.value.preview=="string"?Array.isArray(o.value)?o.value.length===2&&o.value[1]?me():h.value.enabled?o.value.map(Y=>`${B(Y)}`):i.modelAuto?`${B(o.value[0])}`:`${B(o.value[0])} -`:B(o.value):ce()),Be=()=>h.value.enabled?"; ":" - ",te=s.computed(()=>Array.isArray(ve.value)?ve.value.join(Be()):ve.value),V=()=>{m.value(o.value)&&v.value(o.value)&&K.value?n("select-date"):A("invalid-select")};return(Y,x)=>(s.openBlock(),s.createElementBlock("div",DD,[Y.$slots["action-row"]?s.renderSlot(Y.$slots,"action-row",s.normalizeProps(s.mergeProps({key:0},{modelValue:s.unref(o),disabled:q.value,selectDate:()=>Y.$emit("select-date"),closePicker:()=>Y.$emit("close-picker")}))):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.unref(a).showPreview?(s.openBlock(),s.createElementBlock("div",{key:0,class:"dp__selection_preview",title:te.value||void 0,style:s.normalizeStyle(D.value)},[Y.$slots["action-preview"]&&U.value?s.renderSlot(Y.$slots,"action-preview",{key:0,value:s.unref(o),formatValue:te.value}):s.createCommentVNode("",!0),!Y.$slots["action-preview"]&&U.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(te.value),1)],64)):s.createCommentVNode("",!0)],12,OD)):s.createCommentVNode("",!0),s.createElementVNode("div",ND,[Y.$slots["action-buttons"]?s.renderSlot(Y.$slots,"action-buttons",{key:0,value:s.unref(o),selectDate:V,selectionDisabled:q.value}):s.createCommentVNode("",!0),Y.$slots["action-buttons"]?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[!s.unref(u).enabled&&s.unref(a).showCancel?(s.openBlock(),s.createElementBlock("button",{key:0,ref:"cancel-btn",type:"button","data-dp-action-element":"0",class:"dp__action_button dp__action_cancel",onClick:x[0]||(x[0]=Q=>Y.$emit("close-picker")),onKeydown:x[1]||(x[1]=Q=>s.unref(y)(Q,()=>Y.$emit("close-picker")))},s.toDisplayString(s.unref(a).cancelBtnLabel),545)):s.createCommentVNode("",!0),s.unref(a).showNow?(s.openBlock(),s.createElementBlock("button",{key:1,type:"button","data-dp-action-element":"0",class:"dp__action_button dp__action_cancel",onClick:x[2]||(x[2]=Q=>Y.$emit("select-now")),onKeydown:x[3]||(x[3]=Q=>s.unref(y)(Q,()=>Y.$emit("select-now")))},s.toDisplayString(s.unref(a).nowBtnLabel),33)):s.createCommentVNode("",!0),s.unref(a).showSelect?(s.openBlock(),s.createElementBlock("button",{key:2,ref:"select-btn",type:"button","data-dp-action-element":"0",class:"dp__action_button dp__action_select",disabled:s.unref(C)(q.value),"data-test-id":"select-button",onKeydown:x[4]||(x[4]=Q=>s.unref(y)(Q,()=>V())),onClick:V},s.toDisplayString(s.unref(a).selectBtnLabel),41,LD)):s.createCommentVNode("",!0)],64))],512)],64))],512))}}),uu=()=>{const{rootProps:t,defaults:{multiCalendars:e}}=pt(),n=s.computed(()=>i=>t.hideNavigation?.includes(i)),r=s.computed(()=>i=>e.value.count?e.value.solo?!0:i===0:!0),A=s.computed(()=>i=>e.value.count?e.value.solo?!0:i===e.value.count-1:!0);return{hideNavigationButtons:n,showLeftIcon:r,showRightIcon:A}},HD=["role","aria-label","tabindex"],PD={class:"dp__selection_grid_header"},$D=["aria-selected","aria-disabled","data-dp-action-element","data-dp-element-active","data-test-id","onClick","onKeydown","onMouseover"],KD=["aria-label","data-dp-action-element"],wl=s.defineComponent({__name:"SelectionOverlay",props:{items:{},type:{},useRelative:{type:Boolean},height:{},overlayLabel:{},isLast:{type:Boolean},level:{}},emits:["selected","toggle","reset-flow","hover-value"],setup(t,{emit:e}){const n=e,r=t,{setState:A,defaults:{ariaLabels:i,config:o}}=pt(),{hideNavigationButtons:a}=uu(),{handleEventPropagation:l,checkKeyDown:u}=Sn(),d=s.useTemplateRef("toggle-button"),h=s.useTemplateRef("overlay-container"),p=s.useTemplateRef("grid-wrap"),m=s.ref(!1),v=s.ref(null),B=s.ref(),y=s.ref(0);s.onBeforeUpdate(()=>{v.value=null}),s.onMounted(async()=>{await s.nextTick(),D(),A("arrowNavigationLevel",r.level??1)}),s.onUnmounted(()=>{A("arrowNavigationLevel",(r.level??1)-1)});const w=s.computed(()=>({dp__overlay:!0,"dp--overlay-absolute":!r.useRelative,"dp--overlay-relative":r.useRelative})),C=s.computed(()=>r.useRelative?{height:`${r.height}px`,width:"var(--dp-menu-min-width)"}:void 0),k=s.computed(()=>({dp__overlay_col:!0})),F=s.computed(()=>({dp__btn:!0,dp__button:!0,dp__overlay_action:!0,dp__over_action_scroll:m.value,dp__button_bottom:r.isLast})),U=s.computed(()=>({dp__overlay_container:!0,dp__container_flex:r.items?.length<=6,dp__container_block:r.items?.length>6}));s.watch(()=>r.items,()=>D(!1),{deep:!0});const D=(Be=!0)=>{s.nextTick().then(()=>{const te=document.querySelector(`[data-dp-element-active="${r.level??1}"]`),V=_r(p),Y=_r(d),x=_r(h),Q=Y?Y.getBoundingClientRect().height:0;V&&(V.getBoundingClientRect().height?y.value=V.getBoundingClientRect().height-Q:y.value=o.value.modeHeight-Q),te&&x&&Be&&(x.scrollTop=te.offsetTop-x.offsetTop-(y.value/2-te.getBoundingClientRect().height)-Q)})},M=Be=>{Be.disabled||n("selected",Be.value)},K=()=>{n("toggle"),n("reset-flow")},q=Be=>{o.value.escClose&&(K(),l(Be,o.value))},ce=Be=>{B.value=Be,n("hover-value",Be)},me=Be=>{if(Be.key===Nt.esc)return q(Be)},ve=Be=>{if(Be.key===Nt.enter)return K()};return(Be,te)=>(s.openBlock(),s.createElementBlock("div",{ref:"grid-wrap",class:s.normalizeClass(w.value),style:s.normalizeStyle(C.value),role:t.useRelative?void 0:"dialog","aria-label":t.overlayLabel,tabindex:t.useRelative?void 0:"0",onKeydown:me,onClick:te[0]||(te[0]=s.withModifiers(()=>{},["prevent"]))},[s.createElementVNode("div",{ref:"overlay-container",class:s.normalizeClass(U.value),style:s.normalizeStyle({"--dp-overlay-height":`${y.value}px`}),role:"grid"},[s.createElementVNode("div",PD,[s.renderSlot(Be.$slots,"header")]),s.renderSlot(Be.$slots,"overlay",{},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,(V,Y)=>(s.openBlock(),s.createElementBlock("div",{key:Y,class:s.normalizeClass(["dp__overlay_row",{dp__flex_row:t.items.length>=3}]),role:"row"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(V,x=>(s.openBlock(),s.createElementBlock("div",{key:x.value,role:"gridcell",class:s.normalizeClass(k.value),"aria-selected":x.active||void 0,"aria-disabled":x.disabled||void 0,"data-dp-action-element":t.level??1,"data-dp-element-active":x.active?t.level??1:void 0,tabindex:"0","data-test-id":x.text,onClick:s.withModifiers(Q=>M(x),["prevent"]),onKeydown:Q=>s.unref(u)(Q,()=>M(x),!0),onMouseover:Q=>ce(x.value)},[s.createElementVNode("div",{class:s.normalizeClass(x.className)},[s.renderSlot(Be.$slots,"item",{item:x},()=>[s.createTextVNode(s.toDisplayString(x.text),1)])],2)],42,$D))),128))],2))),128))])],6),Be.$slots["button-icon"]?s.withDirectives((s.openBlock(),s.createElementBlock("button",{key:0,ref:"toggle-button",type:"button","aria-label":s.unref(i)?.toggleOverlay,class:s.normalizeClass(F.value),tabindex:"0","data-dp-action-element":t.level??1,onClick:K,onKeydown:ve},[s.renderSlot(Be.$slots,"button-icon")],42,KD)),[[s.vShow,!s.unref(a)(t.type)]]):s.createCommentVNode("",!0)],46,HD))}}),zD=["data-dp-mobile"],du=s.defineComponent({__name:"InstanceWrap",props:{stretch:{type:Boolean},collapse:{type:Boolean}},setup(t){const{defaults:{multiCalendars:e}}=pt(),{isMobile:n}=lu(),r=s.computed(()=>e.value.count>0?[...new Array(e.value.count).keys()]:[0]);return(A,i)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass({dp__menu_inner:!t.stretch,"dp--menu--inner-stretched":t.stretch,dp__flex_display:s.unref(e).count>0,"dp--flex-display-collapsed":t.collapse}),"data-dp-mobile":s.unref(n)},[s.renderSlot(A.$slots,"default",{instances:r.value,wrapClass:{dp__instance_calendar:s.unref(e).count>0}})],10,zD))}}),WD=["data-dp-element","aria-label","aria-disabled"],Bl=s.defineComponent({__name:"ArrowBtn",props:{ariaLabel:{},elName:{},disabled:{type:Boolean}},emits:["activate","set-ref"],setup(t,{emit:e}){const{checkKeyDown:n}=Sn(),r=e;return(A,i)=>(s.openBlock(),s.createElementBlock("button",{ref:"arrow-btn",type:"button","data-dp-element":t.elName,"data-dp-action-element":"0",class:"dp__btn dp--arrow-btn-nav",tabindex:"0","aria-label":t.ariaLabel,"aria-disabled":t.disabled||void 0,onClick:i[0]||(i[0]=o=>r("activate")),onKeydown:i[1]||(i[1]=o=>s.unref(n)(o,()=>r("activate"),!0))},[s.createElementVNode("span",{class:s.normalizeClass(["dp__inner_nav",{dp__inner_nav_disabled:t.disabled}])},[s.renderSlot(A.$slots,"default")],2)],40,WD))}}),GD=["aria-label","data-test-id"],O0=s.defineComponent({__name:"YearModePicker",props:{items:{},instance:{},year:{},showYearPicker:{type:Boolean,default:!1},isDisabled:{}},emits:["handle-year","year-select","toggle-year-picker"],setup(t,{emit:e}){const n=e,r=t,{showRightIcon:A,showLeftIcon:i}=uu(),{rootProps:o,defaults:{config:a,ariaLabels:l,ui:u}}=pt(),{showTransition:d,transitionName:h}=pl(),{formatYear:p}=io(),{boolHtmlAttribute:m}=ra(),v=s.ref(!1),B=s.computed(()=>p(r.year)),y=(k=!1,F)=>{v.value=!v.value,n("toggle-year-picker",{flow:k,show:F})},w=k=>{v.value=!1,n("year-select",k)},C=(k=!1)=>{n("handle-year",k)};return(k,F)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",{class:s.normalizeClass(["dp--year-mode-picker",{"dp--hidden-el":v.value}])},[s.unref(i)(t.instance)?(s.openBlock(),s.createBlock(Bl,{key:0,ref:"mpPrevIconRef","aria-label":s.unref(l)?.prevYear,disabled:s.unref(m)(t.isDisabled(!1)),class:s.normalizeClass(s.unref(u)?.navBtnPrev),onActivate:F[0]||(F[0]=U=>C(!1))},{default:s.withCtx(()=>[k.$slots["arrow-left"]?s.renderSlot(k.$slots,"arrow-left",{key:0}):s.createCommentVNode("",!0),k.$slots["arrow-left"]?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(b0),{key:1}))]),_:3},8,["aria-label","disabled","class"])):s.createCommentVNode("",!0),s.createElementVNode("button",{ref:"mpYearButtonRef",class:"dp__btn dp--year-select",type:"button","aria-label":`${t.year}-${s.unref(l)?.openYearsOverlay}`,"data-test-id":`year-mode-btn-${t.instance}`,"data-dp-action-element":"0",onClick:F[1]||(F[1]=()=>y(!1)),onKeydown:F[2]||(F[2]=s.withKeys(s.withModifiers(()=>y(!1),["prevent"]),["enter"]))},[k.$slots.year?s.renderSlot(k.$slots,"year",{key:0,text:B.value,value:t.year}):s.createCommentVNode("",!0),k.$slots.year?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(t.year),1)],64))],40,GD),s.unref(A)(t.instance)?(s.openBlock(),s.createBlock(Bl,{key:1,ref:"mpNextIconRef","aria-label":s.unref(l)?.nextYear,disabled:s.unref(m)(t.isDisabled(!0)),class:s.normalizeClass(s.unref(u)?.navBtnNext),onActivate:F[3]||(F[3]=U=>C(!0))},{default:s.withCtx(()=>[k.$slots["arrow-right"]?s.renderSlot(k.$slots,"arrow-right",{key:0}):s.createCommentVNode("",!0),k.$slots["arrow-right"]?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(E0),{key:1}))]),_:3},8,["aria-label","disabled","class"])):s.createCommentVNode("",!0)],2),s.createVNode(s.Transition,{name:s.unref(h)(t.showYearPicker),css:s.unref(d)},{default:s.withCtx(()=>[t.showYearPicker?(s.openBlock(),s.createBlock(wl,{key:0,items:t.items,config:s.unref(a),"is-last":s.unref(o).autoApply&&!s.unref(a).keepActionRow,"overlay-label":s.unref(l)?.yearPicker?.(!0),type:"year",onToggle:y,onSelected:F[4]||(F[4]=U=>w(U))},s.createSlots({"button-icon":s.withCtx(()=>[k.$slots["calendar-icon"]?s.renderSlot(k.$slots,"calendar-icon",{key:0}):s.createCommentVNode("",!0),k.$slots["calendar-icon"]?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(hl),{key:1}))]),_:2},[k.$slots["year-overlay-value"]?{name:"item",fn:s.withCtx(({item:U})=>[s.renderSlot(k.$slots,"year-overlay-value",{text:U.text,value:U.value})]),key:"0"}:void 0]),1032,["items","config","is-last","overlay-label"])):s.createCommentVNode("",!0)]),_:3},8,["name","css"])],64))}}),N0=t=>{const{getDate:e,rootEmit:n,state:r,month:A,year:i,modelValue:o,calendars:a,rootProps:l,defaults:{multiCalendars:u,range:d,safeDates:h,filters:p,highlight:m}}=pt(),{resetDate:v,getYearFromDate:B,checkHighlightYear:y,groupListAndMap:w}=jn(),{getYears:C}=cu(),{validateMonthYear:k,checkMinMaxValue:F}=Zr(),U=s.ref([!1]),D=s.computed(()=>C()),M=s.computed(()=>(T,S)=>{const G=ft(v(e()),{month:A.value(T),year:i.value(T)}),Ae=S?r0(G):js(G);return k(Ae,l.preventMinMaxNavigation,S)}),K=()=>Array.isArray(o.value)&&u.value.solo&&o.value[1],q=()=>{for(let T=0;T<u.value.count;T++)if(T===0)a.value[T]=a.value[0];else if(T===u.value.count-1&&K())a.value[T]={month:vt(o.value[1]),year:tt(o.value[1])};else{const S=ft(e(),a.value[T-1]);a.value[T]={month:vt(S),year:tt(dp(S,1))}}},ce=T=>{if(!T)return q();const S=ft(e(),a.value[T]);return a.value[0].year=tt(w0(S,u.value.count-1)),q()},me=(T,S)=>{const G=DI(S,T);return d.value.showLastInRange&&G>1?S:T},ve=T=>l.focusStartDate||u.value.solo?T[0]:T[1]?me(T[0],T[1]):T[0],Be=()=>{if(o.value){const T=Array.isArray(o.value)?ve(o.value):o.value;a.value[0]={month:vt(T),year:tt(T)}}},te=()=>{Be(),u.value.count&&q()};s.watch(o,(T,S)=>{r.isTextInputDate&&JSON.stringify(T??{})!==JSON.stringify(S??{})&&te()}),s.onMounted(()=>{te()});const V=(T,S)=>{a.value[S].year=T,n("update-month-year",{instance:S,year:T,month:a.value[S].month}),u.value.count&&!u.value.solo&&ce(S)},Y=s.computed(()=>T=>w(D.value,S=>{const G=i.value(T)===S.value,Ae=F(S.value,B(h.value.minDate),B(h.value.maxDate))||p.value.years?.includes(i.value(T)),ne=y(m.value,S.value);return{active:G,disabled:Ae,highlighted:ne}})),x=(T,S)=>{V(T,S),P(S)},Q=(T,S=!1)=>{if(!M.value(T,S)){const G=S?i.value(T)+1:i.value(T)-1;V(G,T)}},P=(T,S=!1,G)=>{S||t("reset-flow"),G===void 0?U.value[T]=!U.value[T]:U.value[T]=G,U.value[T]?n("overlay-toggle",{open:!0,overlay:hr.year}):n("overlay-toggle",{open:!1,overlay:hr.year})};return{isDisabled:M,groupedYears:Y,showYearPicker:U,selectYear:V,setStartDate:()=>{l.startDate&&(o.value&&l.focusStartDate||!o.value)&&V(tt(e(l.startDate)),0)},toggleYearPicker:P,handleYearSelect:x,handleYear:Q}},fu=()=>{const{isDateAfter:t,isDateBefore:e,isDateEqual:n}=jn(),{getDate:r,rootEmit:A,rootProps:i,modelValue:o,defaults:{range:a}}=pt();return{getRangeWithFixedDate:l=>Array.isArray(o.value)&&(o.value.length===2||o.value.length===1&&a.value.partialRange)?a.value.fixedStart&&(t(l,o.value[0])||n(l,o.value[0]))?[o.value[0],l]:a.value.fixedEnd&&(e(l,o.value[1])||n(l,o.value[1]))?[l,o.value[1]]:(A("invalid-fixed-range",l),o.value):[],setPresetDate:l=>{Array.isArray(l.value)&&l.value.length<=2&&a.value.enabled?o.value=l.value.map(u=>r(u)):Array.isArray(l.value)||(o.value=r(l.value))},checkRangeAutoApply:(l,u,d)=>{a&&(l[0]&&l[1]&&i.autoApply&&u("auto-apply",d),l[0]&&!l[1]&&(i.modelAuto||a.value.partialRange)&&i.autoApply&&u("auto-apply",d))},setMonthOrYearRange:l=>{let u=o.value?o.value.slice():[];return u.length===2&&u[1]!==null&&(u=[]),u.length?(e(l,u[0])?u.unshift(l):u[1]=l,A("range-end",l)):(u=[l],A("range-start",l)),u},handleMultiDatesSelect:(l,u)=>{if(o.value&&Array.isArray(o.value))if(o.value.some(d=>n(l,d))){const d=o.value.filter(h=>!n(h,l));o.value=d.length?d:null}else(u&&+u>o.value.length||!u)&&o.value.push(l);else o.value=[l]}}},YD=(t,e)=>{const{getDate:n,rootEmit:r,state:A,calendars:i,year:o,modelValue:a,rootProps:l,defaults:{range:u,highlight:d,safeDates:h,filters:p,multiDates:m}}=pt();ml(()=>{A.isTextInputDate&&x(tt(n(l.startDate)),0)});const{checkMinMaxRange:v,checkMinMaxValue:B}=Zr(),{isDateBetween:y,resetDateTime:w,resetDate:C,getMinMonth:k,getMaxMonth:F,checkHighlightMonth:U,groupListAndMap:D}=jn(),{checkRangeAutoApply:M,getRangeWithFixedDate:K,handleMultiDatesSelect:q,setMonthOrYearRange:ce,setPresetDate:me}=fu(),{padZero:ve}=Sn(),{getMonths:Be,isOutOfYearRange:te}=cu(),V=s.computed(()=>Be()),Y=s.ref(null),{selectYear:x,groupedYears:Q,showYearPicker:P,toggleYearPicker:T,handleYearSelect:S,handleYear:G,isDisabled:Ae,setStartDate:ne}=N0(e);s.onMounted(()=>{ne()});const ee=X=>X?{month:vt(X),year:tt(X)}:{month:null,year:null},re=()=>a.value?Array.isArray(a.value)?a.value.map(X=>ee(X)):ee(a.value):ee(),pe=(X,be)=>{const we=i.value[X],ae=re();return Array.isArray(ae)?ae.some(he=>he.year===we?.year&&he.month===be):we?.year===ae.year&&be===ae.month},de=(X,be,we)=>{const ae=re();return Array.isArray(ae)?o.value(be)===ae[we]?.year&&X===ae[we]?.month:!1},Ce=(X,be)=>{if(u.value.enabled){const we=re();if(Array.isArray(a.value)&&Array.isArray(we)){const ae=de(X,be,0)||de(X,be,1),he=ft(C(n()),{month:X,year:o.value(be)});return y(a.value,Y.value,he)&&!ae}return!1}return!1},W=s.computed(()=>X=>D(V.value,be=>{const we=pe(X,be.value),ae=B(be.value,k(o.value(X),h.value.minDate),F(o.value(X),h.value.maxDate))||O(h.value.disabledDates,o.value(X),be.value)||p.value.months?.includes(be.value)||!ie(h.value.allowedDates,o.value(X),be.value)||te(o.value(X)),he=Ce(be.value,X),xe=U(d.value,be.value,o.value(X));return{active:we,disabled:ae,isBetween:he,highlighted:xe}})),j=(X,be)=>ft(C(n()),{month:X,year:o.value(be)}),$=(X,be)=>{const we=a.value?a.value:C(n());a.value=ft(we,{month:X,year:o.value(be)}),e("auto-apply"),e("update-flow-step")},N=(X,be)=>{const we=j(X,be);u.value.fixedEnd||u.value.fixedStart?a.value=K(we):a.value?v(we,a.value)&&(a.value=ce(j(X,be))):a.value=[j(X,be)],s.nextTick().then(()=>{M(a.value,e,a.value.length<2)})},R=(X,be)=>{q(j(X,be),m.value.limit),e("auto-apply",!0)},J=(X,be)=>(i.value[be].month=X,le(be,i.value[be].year,X),m.value.enabled?R(X,be):u.value.enabled?N(X,be):$(X,be)),z=(X,be)=>{x(X,be),le(be,X,null)},le=(X,be,we)=>{let ae=we;if(!ae&&ae!==0){const he=re();ae=Array.isArray(he)?he[X].month:he.month}r("update-month-year",{instance:X,year:be,month:ae})},E=(X,be)=>{Y.value=j(X,be)},_=X=>{me({value:X}),e("auto-apply")},O=(X,be,we)=>{if(X instanceof Map){const ae=`${ve(we+1)}-${be}`;return X.size?X.has(ae):!1}return typeof X=="function"?X(w(ft(n(),{month:we,year:be}),!0)):!1},ie=(X,be,we)=>{if(X instanceof Map){const ae=`${ve(we+1)}-${be}`;return X.size?X.has(ae):!0}return!0};return{groupedMonths:W,groupedYears:Q,year:o,isDisabled:Ae,showYearPicker:P,modelValue:a,toggleYearPicker:T,handleYearSelect:S,handleYear:G,presetDate:_,setHoverDate:E,selectMonth:J,selectYear:z,getModelMonthYear:re}},qD=s.defineComponent({__name:"MonthPicker",props:{flowStep:{},collapse:{type:Boolean},menuWrapRef:{},noOverlayFocus:{type:Boolean}},emits:["reset-flow","auto-apply","update-flow-step","mount"],setup(t,{expose:e,emit:n}){const r=n,A=t,i=s.useSlots(),{rootProps:o,defaults:{config:a}}=pt(),l=VA(i,xA.YearMode);s.onMounted(()=>{r("mount")});const{groupedMonths:u,groupedYears:d,year:h,isDisabled:p,showYearPicker:m,modelValue:v,presetDate:B,setHoverDate:y,selectMonth:w,selectYear:C,toggleYearPicker:k,handleYearSelect:F,handleYear:U,getModelMonthYear:D}=YD(A,r);return e({getSidebarProps:()=>({modelValue:v,year:h,getModelMonthYear:D,selectMonth:w,selectYear:C,handleYear:U}),presetDate:B,toggleYearPicker:M=>k(0,M)}),(M,K)=>(s.openBlock(),s.createBlock(du,{collapse:t.collapse,stretch:""},{default:s.withCtx(({instances:q,wrapClass:ce})=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(q,me=>(s.openBlock(),s.createElementBlock("div",{key:me,class:s.normalizeClass(ce)},[M.$slots["top-extra"]?s.renderSlot(M.$slots,"top-extra",{key:0,value:s.unref(v)}):s.createCommentVNode("",!0),s.renderSlot(M.$slots,"month-year",s.mergeProps({ref_for:!0},{year:s.unref(h),months:s.unref(u)(me),years:s.unref(d)(me),selectMonth:s.unref(w),selectYear:s.unref(C),instance:me}),()=>[s.createVNode(wl,{items:s.unref(u)(me),"is-last":s.unref(o).autoApply&&!s.unref(a).keepActionRow,height:s.unref(a).modeHeight,"no-overlay-focus":!!(t.noOverlayFocus||s.unref(o).textInput),"use-relative":"",level:0,type:"month",onSelected:ve=>s.unref(w)(ve,me),onHoverValue:ve=>s.unref(y)(ve,me)},s.createSlots({header:s.withCtx(()=>[s.createVNode(O0,{items:s.unref(d)(me),instance:me,"show-year-picker":s.unref(m)[me],year:s.unref(h)(me),"is-disabled":ve=>s.unref(p)(me,ve),onHandleYear:ve=>s.unref(U)(me,ve),onYearSelect:ve=>s.unref(F)(ve,me),onToggleYearPicker:ve=>s.unref(k)(me,ve?.flow,ve?.show)},s.createSlots({_:2},[s.renderList(s.unref(l),(ve,Be)=>({name:ve,fn:s.withCtx(te=>[s.renderSlot(M.$slots,ve,s.mergeProps({ref_for:!0},te))])}))]),1032,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),_:2},[M.$slots["month-overlay-value"]?{name:"item",fn:s.withCtx(({item:ve})=>[s.renderSlot(M.$slots,"month-overlay-value",{text:ve.text,value:ve.value})]),key:"0"}:void 0]),1032,["items","is-last","height","no-overlay-focus","onSelected","onHoverValue"])])],2))),128))]),_:3},8,["collapse"]))}}),XD=(t,e)=>{const{rootEmit:n,getDate:r,state:A,modelValue:i,rootProps:o,defaults:{highlight:a,multiDates:l,filters:u,range:d,safeDates:h}}=pt(),{getYears:p}=cu(),{isDateBetween:m,resetDate:v,resetDateTime:B,getYearFromDate:y,checkHighlightYear:w,groupListAndMap:C}=jn(),{checkRangeAutoApply:k,setMonthOrYearRange:F}=fu(),{checkMinMaxValue:U,checkMinMaxRange:D}=Zr();ml(()=>{A.isTextInputDate&&(K.value=tt(r(o.startDate)))});const M=s.ref(null),K=s.ref();s.onMounted(()=>{o.startDate&&(i.value&&o.focusStartDate||!i.value)&&(K.value=tt(r(o.startDate)))});const q=V=>Array.isArray(i.value)?i.value.some(Y=>tt(Y)===V):i.value?tt(i.value)===V:!1,ce=V=>d.value.enabled&&Array.isArray(i.value)?m(i.value,M.value,te(V)):!1,me=V=>h.value.allowedDates?.size?h.value.allowedDates.has(`${V}`):!0,ve=V=>h.value.disabledDates instanceof Map?h.value.disabledDates.size?h.value.disabledDates.has(`${V}`):!1:typeof h.value.disabledDates=="function"?h.value.disabledDates(EA(B(js(r())),V)):!0,Be=s.computed(()=>C(p(),V=>{const Y=q(V.value),x=U(V.value,y(h.value.minDate),y(h.value.maxDate))||u.value.years.includes(V.value)||!me(V.value)||ve(V.value),Q=ce(V.value)&&!Y,P=w(a.value,V.value);return{active:Y,disabled:x,isBetween:Q,highlighted:P}})),te=V=>EA(v(js(r())),V);return{groupedYears:Be,focusYear:K,setHoverValue:V=>{M.value=EA(v(r()),V)},selectYear:V=>{if(n("update-month-year",{instance:0,year:V,month:Number.NaN}),l.value.enabled)return i.value?Array.isArray(i.value)&&((i.value?.map(Y=>tt(Y))).includes(V)?i.value=i.value.filter(Y=>tt(Y)!==V):i.value.push(EA(B(r()),V))):i.value=[EA(B(js(r())),V)],e("auto-apply",!0);d.value.enabled?D(te(V),i.value)&&(i.value=F(te(V)),s.nextTick().then(()=>{k(i.value,e,i.value.length<2)})):(i.value=te(V),e("auto-apply"))}}},JD=s.defineComponent({__name:"YearPicker",props:{flowStep:{},collapse:{type:Boolean},menuWrapRef:{},noOverlayFocus:{type:Boolean}},emits:["reset-flow","auto-apply"],setup(t,{expose:e,emit:n}){const r=n,A=t,{modelValue:i,defaults:{config:o},rootProps:a}=pt(),{groupedYears:l,focusYear:u,selectYear:d,setHoverValue:h}=XD(A,r);return e({getSidebarProps:()=>({modelValue:i,selectYear:d})}),(p,m)=>(s.openBlock(),s.createElementBlock("div",null,[p.$slots["top-extra"]?s.renderSlot(p.$slots,"top-extra",{key:0,value:s.unref(i)}):s.createCommentVNode("",!0),p.$slots["month-year"]?s.renderSlot(p.$slots,"month-year",s.normalizeProps(s.mergeProps({key:1},{years:s.unref(l),selectYear:s.unref(d)}))):(s.openBlock(),s.createBlock(wl,{key:2,items:s.unref(l),"is-last":s.unref(a).autoApply&&!s.unref(o).keepActionRow,height:s.unref(o).modeHeight,"no-overlay-focus":!!(t.noOverlayFocus||s.unref(a).textInput),"focus-value":s.unref(u),type:"year","use-relative":"",onSelected:s.unref(d),onHoverValue:s.unref(h)},s.createSlots({_:2},[p.$slots["year-overlay-value"]?{name:"item",fn:s.withCtx(({item:v})=>[s.renderSlot(p.$slots,"year-overlay-value",{text:v.text,value:v.value})]),key:"0"}:void 0]),1032,["items","is-last","height","no-overlay-focus","focus-value","onSelected","onHoverValue"]))]))}}),jD={key:0,class:"dp__time_input"},ZD=["data-compact","data-collapsed"],VD=["data-test-id","aria-label","data-dp-action-element","onKeydown","onClick","onMousedown"],eO=["aria-label","disabled","data-dp-action-element","data-test-id","onKeydown","onClick"],tO=["data-test-id","aria-label","data-dp-action-element","onKeydown","onClick","onMousedown"],nO={key:0},rO=["aria-label","data-dp-action-element","data-compact"],AO=s.defineComponent({__name:"TimeInput",props:{hours:{},minutes:{},seconds:{},order:{},closeTimePickerBtn:{},disabledTimesConfig:{},validateTime:{}},emits:["update:hours","update:minutes","update:seconds","overlay-opened","overlay-closed","set-hours","set-minutes","reset-flow","mounted"],setup(t,{expose:e,emit:n}){const r=n,A=t,{getDate:i,rootEmit:o,rootProps:a,defaults:{ariaLabels:l,filters:u,config:d,range:h,multiCalendars:p,timeConfig:m}}=pt(),{checkKeyDown:v,hoursToAmPmHours:B}=Sn(),{boolHtmlAttribute:y}=ra(),{sanitizeTime:w,groupListAndMap:C}=jn(),{transitionName:k,showTransition:F}=pl(),U=s.reactive({hours:!1,minutes:!1,seconds:!1}),D=s.ref("AM"),M=s.ref(null),K=s.ref(),q=s.ref(!1);s.onMounted(()=>{r("mounted")});const ce=O=>ft(i(),{hours:O.hours,minutes:O.minutes,seconds:m.value.enableSeconds?O.seconds:0,milliseconds:0}),me=s.computed(()=>a.timePicker||m.value.timePickerInline?0:1),ve=s.computed(()=>O=>ee(O,A[O])||te(O,A[O])),Be=s.computed(()=>({hours:A.hours,minutes:A.minutes,seconds:A.seconds})),te=(O,ie)=>h.value.enabled&&!h.value.disableTimeRangeValidation?!A.validateTime(O,ie):!1,V=(O,ie)=>{if(h.value.enabled&&!h.value.disableTimeRangeValidation){const X=ie?+m.value[`${O}Increment`]:-+m.value[`${O}Increment`],be=A[O]+X;return!A.validateTime(O,be)}return!1},Y=s.computed(()=>O=>!W(+A[O]+ +m.value[`${O}Increment`],O)||V(O,!0)),x=s.computed(()=>O=>!W(+A[O]-+m.value[`${O}Increment`],O)||V(O,!1)),Q=(O,ie)=>XB(ft(i(),O),ie),P=(O,ie)=>F_(ft(i(),O),ie),T=s.computed(()=>({dp__time_col:!0,dp__time_col_block:!m.value.timePickerInline,dp__time_col_reg_block:!m.value.enableSeconds&&m.value.is24&&!m.value.timePickerInline,dp__time_col_reg_inline:!m.value.enableSeconds&&m.value.is24&&m.value.timePickerInline,dp__time_col_reg_with_button:!m.value.enableSeconds&&!m.value.is24,dp__time_col_sec:m.value.enableSeconds&&m.value.is24,dp__time_col_sec_with_button:m.value.enableSeconds&&!m.value.is24})),S=s.computed(()=>m.value.timePickerInline&&h.value.enabled&&!p.value.count),G=s.computed(()=>{const O=[{type:"hours"}];return m.value.enableMinutes&&O.push({type:"",separator:!0},{type:"minutes"}),m.value.enableSeconds&&O.push({type:"",separator:!0},{type:"seconds"}),O}),Ae=s.computed(()=>G.value.filter(O=>!O.separator)),ne=s.computed(()=>O=>{if(O==="hours"){const ie=z(+A.hours);return{text:ie<10?`0${ie}`:`${ie}`,value:ie}}return{text:A[O]<10?`0${A[O]}`:`${A[O]}`,value:A[O]}}),ee=(O,ie)=>{if(!A.disabledTimesConfig)return!1;const X=A.disabledTimesConfig(A.order,O==="hours"?ie:void 0);return X[O]?!!X[O]?.includes(ie):!0},re=(O,ie)=>ie!=="hours"||D.value==="AM"?O:O+12,pe=O=>{const ie=m.value.is24?24:12,X=O==="hours"?ie:60,be=+m.value[`${O}GridIncrement`],we=O==="hours"&&!m.value.is24?be:0,ae=[];for(let he=we;he<X;he+=be)ae.push({value:m.value.is24?he:re(he,O),text:he<10?`0${he}`:`${he}`});return O==="hours"&&!m.value.is24&&ae.unshift({value:D.value==="PM"?12:0,text:"12"}),C(ae,he=>({active:!1,disabled:u.value.times[O].includes(he.value)||!W(he.value,O)||ee(O,he.value)||te(O,he.value)}))},de=O=>O>=0?O:59,Ce=O=>O>=0?O:23,W=(O,ie)=>{const X=a.minTime?ce(w(a.minTime)):null,be=a.maxTime?ce(w(a.maxTime)):null,we=ce(w(Be.value,ie,ie==="minutes"||ie==="seconds"?de(O):Ce(O)));return X&&be?(bi(we,be)||Vs(we,be))&&(XA(we,X)||Vs(we,X)):X?XA(we,X)||Vs(we,X):be?bi(we,be)||Vs(we,be):!0},j=O=>m.value[`no${O[0].toUpperCase()+O.slice(1)}Overlay`],$=O=>{j(O)||(U[O]=!U[O],U[O]?(q.value=!0,r("overlay-opened",O)):(q.value=!1,r("overlay-closed",O)))},N=O=>O==="hours"?qA:O==="minutes"?Ci:Ao,R=()=>{K.value&&clearTimeout(K.value)},J=(O,ie=!0,X)=>{const be=ie?Q:P,we=ie?+m.value[`${O}Increment`]:-+m.value[`${O}Increment`];W(+A[O]+we,O)&&r(`update:${O}`,N(O)(be({[O]:+A[O]},{[O]:+m.value[`${O}Increment`]}))),!X?.keyboard&&d.value.timeArrowHoldThreshold&&(K.value=setTimeout(()=>{J(O,ie)},d.value.timeArrowHoldThreshold))},z=O=>m.value.is24?O:(O>=12?D.value="PM":D.value="AM",B(O)),le=()=>{D.value==="PM"?(D.value="AM",r("update:hours",A.hours-12)):(D.value="PM",r("update:hours",A.hours+12)),o("am-pm-change",D.value)},E=O=>{U[O]=!0},_=(O,ie)=>($(O),r(`update:${O}`,ie));return e({openChildCmp:E}),(O,ie)=>s.unref(a).disabled?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",jD,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(G.value,(X,be)=>(s.openBlock(),s.createElementBlock("div",{key:be,class:s.normalizeClass(T.value),"data-compact":S.value&&!s.unref(m).enableSeconds,"data-collapsed":S.value&&s.unref(m).enableSeconds},[X.separator?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[q.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(":")],64))],64)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("button",{type:"button",class:s.normalizeClass({dp__btn:!0,dp__inc_dec_button:!s.unref(m).timePickerInline,dp__inc_dec_button_inline:s.unref(m).timePickerInline,dp__tp_inline_btn_top:s.unref(m).timePickerInline,dp__inc_dec_button_disabled:Y.value(X.type),"dp--hidden-el":q.value}),"data-test-id":`${X.type}-time-inc-btn-${A.order}`,"aria-label":s.unref(l)?.incrementValue(X.type),tabindex:"0","data-dp-action-element":me.value,onKeydown:we=>s.unref(v)(we,()=>J(X.type,!0,{keyboard:!0}),!0),onClick:we=>s.unref(d).timeArrowHoldThreshold?void 0:J(X.type,!0),onMousedown:we=>s.unref(d).timeArrowHoldThreshold?J(X.type,!0):void 0,onMouseup:R},[s.unref(m).timePickerInline?s.renderSlot(O.$slots,"tp-inline-arrow-up",{key:1},()=>[ie[2]||(ie[2]=s.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),ie[3]||(ie[3]=s.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))]):s.renderSlot(O.$slots,"arrow-up",{key:0},()=>[s.createVNode(s.unref(S0))])],42,VD),s.createElementVNode("button",{type:"button","aria-label":`${ne.value(X.type).text}-${s.unref(l)?.openTpOverlay(X.type)}`,class:s.normalizeClass({dp__time_display:!0,dp__time_display_block:!s.unref(m).timePickerInline,dp__time_display_inline:s.unref(m).timePickerInline,"dp--time-invalid":ve.value(X.type),"dp--time-overlay-btn":!ve.value(X.type),"dp--hidden-el":q.value}),disabled:s.unref(y)(j(X.type)),tabindex:"0","data-dp-action-element":me.value,"data-test-id":`${X.type}-toggle-overlay-btn-${A.order}`,onKeydown:we=>s.unref(v)(we,()=>$(X.type),!0),onClick:we=>$(X.type)},[s.renderSlot(O.$slots,X.type,{text:ne.value(X.type).text,value:ne.value(X.type).value},()=>[s.createTextVNode(s.toDisplayString(ne.value(X.type).text),1)])],42,eO),s.createElementVNode("button",{type:"button",class:s.normalizeClass({dp__btn:!0,dp__inc_dec_button:!s.unref(m).timePickerInline,dp__inc_dec_button_inline:s.unref(m).timePickerInline,dp__tp_inline_btn_bottom:s.unref(m).timePickerInline,dp__inc_dec_button_disabled:x.value(X.type),"dp--hidden-el":q.value}),"data-test-id":`${X.type}-time-dec-btn-${A.order}`,"aria-label":s.unref(l)?.decrementValue(X.type),tabindex:"0","data-dp-action-element":me.value,onKeydown:we=>s.unref(v)(we,()=>J(X.type,!1,{keyboard:!0}),!0),onClick:we=>s.unref(d).timeArrowHoldThreshold?void 0:J(X.type,!1),onMousedown:we=>s.unref(d).timeArrowHoldThreshold?J(X.type,!1):void 0,onMouseup:R},[s.unref(m).timePickerInline?s.renderSlot(O.$slots,"tp-inline-arrow-down",{key:1},()=>[ie[4]||(ie[4]=s.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_l"},null,-1)),ie[5]||(ie[5]=s.createElementVNode("span",{class:"dp__tp_inline_btn_bar dp__tp_btn_in_r"},null,-1))]):s.renderSlot(O.$slots,"arrow-down",{key:0},()=>[s.createVNode(s.unref(x0))])],42,tO)],64))],10,ZD))),128)),s.unref(m).is24?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",nO,[s.renderSlot(O.$slots,"am-pm-button",{toggle:le,value:D.value},()=>[s.createElementVNode("button",{ref_key:"amPmButton",ref:M,type:"button",class:"dp__pm_am_button",role:"button","aria-label":s.unref(l)?.amPmButton,tabindex:"0","data-dp-action-element":me.value,"data-compact":S.value,onClick:le,onKeydown:ie[0]||(ie[0]=X=>s.unref(v)(X,()=>le(),!0))},s.toDisplayString(D.value),41,rO)])])),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(Ae.value,(X,be)=>(s.openBlock(),s.createBlock(s.Transition,{key:be,name:s.unref(k)(U[X.type]),css:s.unref(F)},{default:s.withCtx(()=>[U[X.type]?(s.openBlock(),s.createBlock(wl,{key:0,items:pe(X.type),"is-last":s.unref(a).autoApply&&!s.unref(d).keepActionRow,type:X.type,"aria-labels":s.unref(l),level:s.unref(m).timePickerInline||s.unref(a).timePicker?1:2,"overlay-label":s.unref(l).timeOverlay?.(X.type),onSelected:we=>_(X.type,we),onToggle:we=>$(X.type),onResetFlow:ie[1]||(ie[1]=we=>O.$emit("reset-flow"))},s.createSlots({"button-icon":s.withCtx(()=>[s.renderSlot(O.$slots,"clock-icon",{},()=>[O.$slots["clock-icon"]?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(m).timePickerInline?s.unref(hl):s.unref(k0)),{key:0}))])]),_:2},[O.$slots[`${X.type}-overlay-value`]?{name:"item",fn:s.withCtx(({item:we})=>[s.renderSlot(O.$slots,`${X.type}-overlay-value`,{text:we.text,value:we.value})]),key:"0"}:void 0,O.$slots[`${X.type}-overlay-header`]?{name:"header",fn:s.withCtx(()=>[s.renderSlot(O.$slots,`${X.type}-overlay-header`,{toggle:()=>$(X.type)})]),key:"1"}:void 0]),1032,["items","is-last","type","aria-labels","level","overlay-label","onSelected","onToggle"])):s.createCommentVNode("",!0)]),_:2},1032,["name","css"]))),128))]))}}),iO=["data-dp-mobile"],oO=["aria-label","tabindex"],sO=["role","aria-label","tabindex"],aO=["aria-label"],L0=s.defineComponent({__name:"TimePicker",props:{hours:{},minutes:{},seconds:{},disabledTimesConfig:{type:[Function,null]},noOverlayFocus:{type:Boolean},validateTime:{type:Function}},emits:["update:hours","update:minutes","update:seconds","mount","reset-flow"],setup(t,{expose:e,emit:n}){const r=n,A=t,{rootEmit:i,setState:o,modelValue:a,rootProps:l,defaults:{ariaLabels:u,textInput:d,config:h,range:p,timeConfig:m}}=pt(),{isModelAuto:v}=jn(),{checkKeyDown:B,findFocusableEl:y}=Sn(),{transitionName:w,showTransition:C}=pl(),{hideNavigationButtons:k}=uu(),{isMobile:F}=lu(),U=s.useSlots(),D=s.useTemplateRef("overlay"),M=s.useTemplateRef("close-tp-btn"),K=s.useTemplateRef("tp-input"),q=s.ref(!1);s.onMounted(()=>{r("mount")});const ce=s.computed(()=>p.value.enabled&&l.modelAuto?v(a.value):!0),me=s.ref(!1),ve=ne=>({hours:Array.isArray(A.hours)?A.hours[ne]:A.hours,minutes:Array.isArray(A.minutes)?A.minutes[ne]:A.minutes,seconds:Array.isArray(A.seconds)?A.seconds[ne]:A.seconds}),Be=s.computed(()=>{const ne=[];if(p.value.enabled)for(let ee=0;ee<2;ee++)ne.push(ve(ee));else ne.push(ve(0));return ne}),te=(ne,ee=!1,re="")=>{ee||r("reset-flow"),me.value=ne,o("arrowNavigationLevel",ne?1:0),i("overlay-toggle",{open:ne,overlay:hr.time}),s.nextTick(()=>{re!==""&&K.value?.[0]&&K.value[0].openChildCmp(re)})},V=s.computed(()=>({dp__btn:!0,dp__button:!0,dp__button_bottom:l.autoApply&&!h.value.keepActionRow})),Y=VA(U,xA.TimeInput),x=(ne,ee,re)=>p.value.enabled?ee===0?[ne,Be.value[1][re]]:[Be.value[0][re],ne]:ne,Q=ne=>{r("update:hours",ne)},P=ne=>{r("update:minutes",ne)},T=ne=>{r("update:seconds",ne)},S=()=>{if(D.value&&!d.value.enabled&&!A.noOverlayFocus){const ne=y(D.value);ne&&ne.focus({preventScroll:!0})}},G=ne=>{q.value=!1,i("overlay-toggle",{open:!1,overlay:ne})},Ae=ne=>{q.value=!0,i("overlay-toggle",{open:!0,overlay:ne})};return e({toggleTimePicker:te}),(ne,ee)=>(s.openBlock(),s.createElementBlock("div",{class:"dp--tp-wrap","data-dp-mobile":s.unref(F)},[!s.unref(l).timePicker&&!s.unref(m).timePickerInline?s.withDirectives((s.openBlock(),s.createElementBlock("button",{key:0,ref:"open-tp-btn",type:"button","data-dp-action-element":"0",class:s.normalizeClass({...V.value,"dp--hidden-el":me.value}),"aria-label":s.unref(u)?.openTimePicker,tabindex:t.noOverlayFocus?void 0:0,"data-test-id":"open-time-picker-btn",onKeydown:ee[0]||(ee[0]=re=>s.unref(B)(re,()=>te(!0))),onClick:ee[1]||(ee[1]=re=>te(!0))},[s.renderSlot(ne.$slots,"clock-icon",{},()=>[s.createVNode(s.unref(k0))])],42,oO)),[[s.vShow,!s.unref(k)("time")]]):s.createCommentVNode("",!0),s.createVNode(s.Transition,{name:s.unref(w)(me.value),css:s.unref(C)&&!s.unref(m).timePickerInline},{default:s.withCtx(()=>[me.value||s.unref(l).timePicker||s.unref(m).timePickerInline?(s.openBlock(),s.createElementBlock("div",{key:0,ref:"overlay",role:s.unref(m).timePickerInline?void 0:"dialog",class:s.normalizeClass({dp__overlay:!s.unref(m).timePickerInline,"dp--overlay-absolute":!s.unref(l).timePicker&&!s.unref(m).timePickerInline,"dp--overlay-relative":s.unref(l).timePicker}),style:s.normalizeStyle(s.unref(l).timePicker?{height:`${s.unref(h).modeHeight}px`}:void 0),"aria-label":s.unref(u)?.timePicker,tabindex:s.unref(m).timePickerInline?void 0:0},[s.createElementVNode("div",{class:s.normalizeClass(s.unref(m).timePickerInline?"dp__time_picker_inline_container":"dp__overlay_container dp__container_flex dp__time_picker_overlay_container"),style:{display:"flex"}},[s.renderSlot(ne.$slots,"time-picker-overlay",{hours:t.hours,minutes:t.minutes,seconds:t.seconds,setHours:Q,setMinutes:P,setSeconds:T},()=>[s.createElementVNode("div",{class:s.normalizeClass(s.unref(m).timePickerInline?"dp__flex":"dp__overlay_row dp__flex_row")},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(Be.value,(re,pe)=>s.withDirectives((s.openBlock(),s.createBlock(AO,s.mergeProps({key:pe},{ref_for:!0},{order:pe,hours:re.hours,minutes:re.minutes,seconds:re.seconds,closeTimePickerBtn:M.value,disabledTimesConfig:t.disabledTimesConfig,disabled:pe===0?s.unref(p).fixedStart:s.unref(p).fixedEnd},{ref_for:!0,ref:"tp-input","validate-time":(de,Ce)=>t.validateTime(de,x(Ce,pe,de)),"onUpdate:hours":de=>Q(x(de,pe,"hours")),"onUpdate:minutes":de=>P(x(de,pe,"minutes")),"onUpdate:seconds":de=>T(x(de,pe,"seconds")),onMounted:S,onOverlayClosed:G,onOverlayOpened:Ae}),s.createSlots({_:2},[s.renderList(s.unref(Y),(de,Ce)=>({name:de,fn:s.withCtx(W=>[s.renderSlot(ne.$slots,de,s.mergeProps({ref_for:!0},W))])}))]),1040,["validate-time","onUpdate:hours","onUpdate:minutes","onUpdate:seconds"])),[[s.vShow,pe===0?!0:ce.value]])),128))],2)]),!s.unref(l).timePicker&&!s.unref(m).timePickerInline?s.withDirectives((s.openBlock(),s.createElementBlock("button",{key:0,ref:"close-tp-btn","data-dp-action-element":"1",type:"button",class:s.normalizeClass({...V.value,"dp--hidden-el":q.value}),"aria-label":s.unref(u)?.closeTimePicker,tabindex:"0",onKeydown:ee[2]||(ee[2]=re=>s.unref(B)(re,()=>te(!1))),onClick:ee[3]||(ee[3]=re=>te(!1))},[s.renderSlot(ne.$slots,"calendar-icon",{},()=>[s.createVNode(s.unref(hl))])],42,aO)),[[s.vShow,!s.unref(k)("time")]]):s.createCommentVNode("",!0)],2)],14,sO)):s.createCommentVNode("",!0)]),_:3},8,["name","css"])],8,iO))}}),R0=t=>{const{getDate:e,modelValue:n,time:r,rootProps:A,defaults:{range:i,timeConfig:o}}=pt(),{isDateEqual:a,setTime:l}=jn(),u=(M,K)=>Array.isArray(r[M])?r[M][K]:r[M],d=M=>o.value.enableSeconds?Array.isArray(r.seconds)?r.seconds[M]:r.seconds:0,h=(M,K)=>M?l(K!==void 0?{hours:u("hours",K),minutes:u("minutes",K),seconds:d(K)}:{hours:r.hours,minutes:r.minutes,seconds:d()},M):x_(e(),d(K)),p=(M,K)=>{r[M]=K},m=s.computed(()=>A.modelAuto&&i.value.enabled?Array.isArray(n.value)?n.value.length>1:!1:i.value.enabled),v=(M,K)=>{const q=Object.fromEntries(Object.keys(r).map(ce=>ce===M?[ce,K]:[ce,r[ce]].slice()));if(m.value&&!i.value.disableTimeRangeValidation){const ce=ve=>n.value?l({hours:q.hours[ve],minutes:q.minutes[ve],seconds:q.seconds[ve]},n.value[ve]):null,me=ve=>S_(n.value[ve],0);return!(a(ce(0),ce(1))&&(XA(ce(0),me(1))||bi(ce(1),me(0))))}return!0},B=(M,K)=>{v(M,K)&&(p(M,K),t&&t())},y=M=>{B("hours",M)},w=M=>{B("minutes",M)},C=M=>{B("seconds",M)},k=(M,K)=>{y(M.hours),w(M.minutes),C(M.seconds),n.value&&K(n.value)},F=M=>{if(M){const K=Array.isArray(M),q=K?[+M[0].hours,+M[1].hours]:+M.hours,ce=K?[+M[0].minutes,+M[1].minutes]:+M.minutes,me=K?[+(M[0].seconds??0),+(M[1].seconds??0)]:+(M.seconds??0);p("hours",q),p("minutes",ce),o.value.enableSeconds&&p("seconds",me)}},U=(M,K)=>{const q={hours:Array.isArray(r.hours)?r.hours[M]:r.hours,disabledArr:[]};return(K||K===0)&&(q.hours=K),Array.isArray(A.disabledTimes)&&(q.disabledArr=i.value.enabled&&Array.isArray(A.disabledTimes[M])?A.disabledTimes[M]:A.disabledTimes),q},D=s.computed(()=>(M,K)=>{if(Array.isArray(A.disabledTimes)){const{disabledArr:q,hours:ce}=U(M,K),me=q.filter(ve=>+ve.hours===ce);return me[0]?.minutes==="*"?{hours:[ce],minutes:void 0,seconds:void 0}:{hours:[],minutes:me?.map(ve=>+ve.minutes)??[],seconds:me?.map(ve=>ve.seconds?+ve.seconds:void 0)??[]}}return{hours:[],minutes:[],seconds:[]}});return{assignTime:p,updateHours:y,updateMinutes:w,updateSeconds:C,getSetDateTime:h,updateTimeValues:k,getSecondsValue:d,assignStartTime:F,validateTime:v,disabledTimesConfig:D}},lO=t=>{const{getDate:e,time:n,modelValue:r,state:A,defaults:{startTime:i,range:o,timeConfig:a}}=pt(),{getTimeObj:l}=jn();ml(()=>{A.isTextInputDate&&U()});const{updateTimeValues:u,getSetDateTime:d,assignTime:h,assignStartTime:p,disabledTimesConfig:m,validateTime:v}=R0(B);function B(){t("update-flow-step")}const y=M=>{const{hours:K,minutes:q,seconds:ce}=M;return{hours:+K,minutes:+q,seconds:ce?+ce:0}},w=()=>{if(a.value.startTime){if(Array.isArray(a.value.startTime)){const K=y(a.value.startTime[0]),q=y(a.value.startTime[1]);return[ft(e(),K),ft(e(),q)]}const M=y(a.value.startTime);return ft(e(),M)}return o.value.enabled?[null,null]:null},C=()=>{if(o.value.enabled){const[M,K]=w();r.value=[d(M,0),d(K,1)]}else r.value=d(w())},k=M=>Array.isArray(M)?[l(e(M[0])),l(e(M[1]))]:[l(M??e())],F=(M,K,q)=>{h("hours",M),h("minutes",K),h("seconds",a.value.enableSeconds?q:0)},U=()=>{const[M,K]=k(r.value);return o.value.enabled?F([M.hours,K.hours],[M.minutes,K.minutes],[M.seconds,K.seconds]):F(M.hours,M.minutes,M.seconds)};s.onMounted(()=>(p(i.value),r.value?U():C()));const D=()=>{Array.isArray(r.value)?r.value=r.value.map((M,K)=>M&&d(M,K)):r.value=d(r.value),t("time-update")};return{modelValue:r,time:n,disabledTimesConfig:m,validateTime:v,updateTime:M=>{u(M,D)}}},cO=s.defineComponent({__name:"TimePickerSolo",props:{flowStep:{},collapse:{type:Boolean},menuWrapRef:{},noOverlayFocus:{type:Boolean}},emits:["time-update","mount","reset-flow","update-flow-step"],setup(t,{expose:e,emit:n}){const r=n,A=s.useSlots(),i=VA(A,xA.TimePicker),o=s.useTemplateRef("time-input"),{time:a,modelValue:l,disabledTimesConfig:u,updateTime:d,validateTime:h}=lO(r);return s.onMounted(()=>{r("mount")}),e({getSidebarProps:()=>({modelValue:l,time:a,updateTime:d}),toggleTimePicker:(p,m=!1,v="")=>{o.value?.toggleTimePicker(p,m,v)}}),(p,m)=>(s.openBlock(),s.createBlock(du,{"multi-calendars":0,stretch:""},{default:s.withCtx(({wrapClass:v})=>[s.createElementVNode("div",{class:s.normalizeClass(v)},[s.createVNode(L0,s.mergeProps({ref:"time-input"},p.$props,{hours:s.unref(a).hours,minutes:s.unref(a).minutes,seconds:s.unref(a).seconds,"disabled-times-config":s.unref(u),"validate-time":s.unref(h),"onUpdate:hours":m[0]||(m[0]=B=>s.unref(d)({hours:B,minutes:s.unref(a).minutes,seconds:s.unref(a).seconds})),"onUpdate:minutes":m[1]||(m[1]=B=>s.unref(d)({hours:s.unref(a).hours,minutes:B,seconds:s.unref(a).seconds})),"onUpdate:seconds":m[2]||(m[2]=B=>s.unref(d)({hours:s.unref(a).hours,minutes:s.unref(a).minutes,seconds:B})),onResetFlow:m[3]||(m[3]=B=>p.$emit("reset-flow"))}),s.createSlots({_:2},[s.renderList(s.unref(i),(B,y)=>({name:B,fn:s.withCtx(w=>[s.renderSlot(p.$slots,B,s.normalizeProps(s.guardReactiveProps(w)))])}))]),1040,["hours","minutes","seconds","disabled-times-config","validate-time"])],2)]),_:3}))}}),uO=(t,e)=>{const{getDate:n,rootProps:r,defaults:{filters:A}}=pt(),{validateMonthYearInRange:i,validateMonthYear:o}=Zr(),a=(p,m)=>{let v=p;return A.value.months.includes(vt(v))?(v=m?bA(p,1):ea(p,1),a(v,m)):v},l=(p,m)=>{let v=p;return A.value.years.includes(tt(v))?(v=m?dp(p,1):w0(p,1),l(v,m)):v},u=(p,m=!1)=>{const v=ft(n(),{month:t.month,year:t.year});let B=p?bA(v,1):ea(v,1);r.disableYearSelect&&(B=EA(B,t.year));let y=vt(B),w=tt(B);A.value.months.includes(y)&&(B=a(B,p),y=vt(B),w=tt(B)),A.value.years.includes(w)&&(B=l(B,p),w=tt(B)),i(y,w,p,r.preventMinMaxNavigation)&&d(y,w,m)},d=(p,m,v=!1)=>{e("update-month-year",{month:p,year:m,fromNav:v})},h=s.computed(()=>p=>o(ft(n(),{month:t.month,year:t.year}),r.preventMinMaxNavigation,p));return{handleMonthYearChange:u,isDisabled:h,updateMonthYear:d}},dO={class:"dp--header-wrap"},fO={key:0,class:"dp__month_year_wrap"},hO={key:0},pO={class:"dp__month_year_wrap"},mO=["data-dp-element","aria-label","data-test-id","onClick","onKeydown"],gO=s.defineComponent({__name:"DpHeader",props:{month:{},year:{},instance:{},years:{},months:{},menuWrapRef:{}},emits:["mount","reset-flow","update-month-year"],setup(t,{expose:e,emit:n}){const r=n,A=t,{rootEmit:i,rootProps:o,modelValue:a,defaults:{ariaLabels:l,filters:u,config:d,highlight:h,safeDates:p,ui:m}}=pt(),{transitionName:v,showTransition:B}=pl(),{showLeftIcon:y,showRightIcon:w}=uu(),{handleMonthYearChange:C,isDisabled:k,updateMonthYear:F}=uO(A,r),{getMaxMonth:U,getMinMonth:D,getYearFromDate:M,groupListAndMap:K,checkHighlightYear:q,checkHighlightMonth:ce}=jn(),{checkKeyDown:me}=Sn(),{formatYear:ve}=io(),{checkMinMaxValue:Be}=Zr(),{boolHtmlAttribute:te}=ra(),V=s.ref(!1),Y=s.ref(!1),x=s.ref(!1);s.onMounted(()=>{r("mount")});const Q=j=>({get:()=>A[j],set:$=>{const N=j===kA.month?kA.year:kA.month;r("update-month-year",{[j]:$,[N]:A[N]}),j===kA.month?re(!0):pe(!0)}}),P=s.computed(Q(kA.month)),T=s.computed(Q(kA.year)),S=s.computed(()=>j=>({month:A.month,year:A.year,items:j===kA.month?A.months:A.years,instance:A.instance,updateMonthYear:F,toggle:j===kA.month?re:pe})),G=s.computed(()=>A.months.find($=>$.value===A.month)||{text:"",value:0}),Ae=s.computed(()=>K(A.months,j=>{const $=A.month===j.value,N=Be(j.value,D(A.year,p.value.minDate),U(A.year,p.value.maxDate))||u.value.months.includes(j.value),R=ce(h.value,j.value,A.year);return{active:$,disabled:N,highlighted:R}})),ne=s.computed(()=>K(A.years,j=>{const $=A.year===j.value,N=Be(j.value,M(p.value.minDate),M(p.value.maxDate))||u.value.years.includes(j.value),R=q(h.value,j.value);return{active:$,disabled:N,highlighted:R}})),ee=(j,$,N)=>{N===void 0?j.value=!j.value:j.value=N,j.value?(x.value=!0,i("overlay-toggle",{open:!0,overlay:$})):(x.value=!1,i("overlay-toggle",{open:!1,overlay:$}))},re=(j=!1,$)=>{de(j),ee(V,hr.month,$)},pe=(j=!1,$)=>{de(j),ee(Y,hr.year,$)},de=j=>{j||r("reset-flow")},Ce=s.computed(()=>[{type:kA.month,index:1,toggle:re,modelValue:P.value,updateModelValue:j=>P.value=j,text:G.value.text,showSelectionGrid:V.value,items:Ae.value,ariaLabel:l.value?.openMonthsOverlay,overlayLabel:l.value.monthPicker?.(!0)??void 0},{type:kA.year,index:2,toggle:pe,modelValue:T.value,updateModelValue:j=>T.value=j,text:ve(A.year),showSelectionGrid:Y.value,items:ne.value,ariaLabel:l.value?.openYearsOverlay,overlayLabel:l.value.yearPicker?.(!0)??void 0}]),W=s.computed(()=>o.disableYearSelect?[Ce.value[0]]:o.yearFirst?[...Ce.value].reverse():Ce.value);return e({toggleMonthPicker:re,toggleYearPicker:pe,handleMonthYearChange:C}),(j,$)=>(s.openBlock(),s.createElementBlock("div",dO,[j.$slots["month-year"]?(s.openBlock(),s.createElementBlock("div",fO,[s.renderSlot(j.$slots,"month-year",s.normalizeProps(s.guardReactiveProps({month:t.month,year:t.year,months:t.months,years:t.years,updateMonthYear:s.unref(F),handleMonthYearChange:s.unref(C),instance:t.instance,isDisabled:s.unref(k)})))])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[j.$slots["top-extra"]?(s.openBlock(),s.createElementBlock("div",hO,[s.renderSlot(j.$slots,"top-extra",{value:s.unref(a)})])):s.createCommentVNode("",!0),s.createElementVNode("div",pO,[s.unref(y)(t.instance)&&!s.unref(o).vertical?(s.openBlock(),s.createBlock(Bl,{key:0,"aria-label":s.unref(l)?.prevMonth,disabled:s.unref(te)(s.unref(k)(!1)),class:s.normalizeClass(s.unref(m)?.navBtnPrev),"el-name":"action-prev",onActivate:$[0]||($[0]=N=>s.unref(C)(!1,!0))},{default:s.withCtx(()=>[j.$slots["arrow-left"]?s.renderSlot(j.$slots,"arrow-left",{key:0}):s.createCommentVNode("",!0),j.$slots["arrow-left"]?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(b0),{key:1}))]),_:3},8,["aria-label","disabled","class"])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(["dp__month_year_wrap",{dp__year_disable_select:s.unref(o).disableYearSelect}])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(W.value,N=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:N.type},[s.createElementVNode("button",{type:"button","data-dp-element":`overlay-${N.type}`,class:s.normalizeClass(["dp__btn dp__month_year_select",{"dp--hidden-el":x.value}]),"aria-label":`${N.text}-${N.ariaLabel}`,"data-test-id":`${N.type}-toggle-overlay-${t.instance}`,tabindex:"0","data-dp-action-element":"0",onClick:R=>N.toggle(!1),onKeydown:R=>s.unref(me)(R,()=>N.toggle(),!0)},[j.$slots[N.type]?s.renderSlot(j.$slots,N.type,{key:0,text:N.text,value:A[N.type]}):s.createCommentVNode("",!0),j.$slots[N.type]?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(N.text),1)],64))],42,mO),s.createVNode(s.Transition,{name:s.unref(v)(N.showSelectionGrid),css:s.unref(B)},{default:s.withCtx(()=>[N.showSelectionGrid?(s.openBlock(),s.createBlock(wl,{key:0,items:N.items,"is-last":s.unref(o).autoApply&&!s.unref(d).keepActionRow,"skip-button-ref":!1,type:N.type,"header-refs":[],"menu-wrap-ref":t.menuWrapRef,"overlay-label":N.overlayLabel,onSelected:N.updateModelValue,onToggle:N.toggle},s.createSlots({"button-icon":s.withCtx(()=>[j.$slots["calendar-icon"]?s.renderSlot(j.$slots,"calendar-icon",{key:0}):s.createCommentVNode("",!0),j.$slots["calendar-icon"]?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(hl),{key:1}))]),_:2},[j.$slots[`${N.type}-overlay-value`]?{name:"item",fn:s.withCtx(({item:R})=>[s.renderSlot(j.$slots,`${N.type}-overlay-value`,{text:R.text,value:R.value})]),key:"0"}:void 0,j.$slots[`${N.type}-overlay`]?{name:"overlay",fn:s.withCtx(()=>[s.renderSlot(j.$slots,`${N.type}-overlay`,s.mergeProps({ref_for:!0},S.value(N.type)))]),key:"1"}:void 0,j.$slots[`${N.type}-overlay-header`]?{name:"header",fn:s.withCtx(()=>[s.renderSlot(j.$slots,`${N.type}-overlay-header`,{toggle:N.toggle})]),key:"2"}:void 0]),1032,["items","is-last","type","menu-wrap-ref","overlay-label","onSelected","onToggle"])):s.createCommentVNode("",!0)]),_:2},1032,["name","css"])],64))),128))],2),s.unref(y)(t.instance)&&s.unref(o).vertical?(s.openBlock(),s.createBlock(Bl,{key:1,"aria-label":s.unref(l)?.prevMonth,"el-name":"action-prev",disabled:s.unref(te)(s.unref(k)(!1)),class:s.normalizeClass(s.unref(m)?.navBtnPrev),onActivate:$[1]||($[1]=N=>s.unref(C)(!1,!0))},{default:s.withCtx(()=>[j.$slots["arrow-up"]?s.renderSlot(j.$slots,"arrow-up",{key:0}):s.createCommentVNode("",!0),j.$slots["arrow-up"]?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(S0),{key:1}))]),_:3},8,["aria-label","disabled","class"])):s.createCommentVNode("",!0),s.unref(w)(t.instance)?(s.openBlock(),s.createBlock(Bl,{key:2,ref:"rightIcon","el-name":"action-next",disabled:s.unref(te)(s.unref(k)(!0)),"aria-label":s.unref(l)?.nextMonth,class:s.normalizeClass(s.unref(m)?.navBtnNext),onActivate:$[2]||($[2]=N=>s.unref(C)(!0,!0))},{default:s.withCtx(()=>[j.$slots[s.unref(o).vertical?"arrow-down":"arrow-right"]?s.renderSlot(j.$slots,s.unref(o).vertical?"arrow-down":"arrow-right",{key:0}):s.createCommentVNode("",!0),j.$slots[s.unref(o).vertical?"arrow-down":"arrow-right"]?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(o).vertical?s.unref(x0):s.unref(E0)),{key:1}))]),_:3},8,["disabled","aria-label","class"])):s.createCommentVNode("",!0)])],64))]))}}),vO={class:"dp__calendar_header",role:"row"},wO={key:0,class:"dp__calendar_header_item",role:"gridcell"},BO=["aria-label"],yO={key:0,class:"dp__calendar_item dp__week_num",role:"gridcell"},CO={class:"dp__cell_inner"},bO=["id","aria-selected","aria-disabled","aria-label","tabindex","data-test-id","data-dp-element-active","onClick","onTouchend","onKeydown","onMouseenter","onMouseleave","onMousedown"],EO=s.defineComponent({__name:"DpCalendar",props:{instance:{},mappedDates:{},month:{},year:{}},emits:["mount","select-date","set-hover-date","handle-scroll","handle-swipe"],setup(t,{expose:e,emit:n}){const r=n,A=t,{getDate:i,rootEmit:o,rootProps:a,defaults:{transitions:l,config:u,ariaLabels:d,multiCalendars:h,weekNumbers:p,multiDates:m,ui:v}}=pt(),{isDateAfter:B,isDateEqual:y,resetDateTime:w,getCellId:C}=jn(),{checkKeyDown:k,checkStopPropagation:F,isTouchDevice:U}=Sn(),{formatWeekDay:D}=io(),M=s.useTemplateRef("calendar-wrap"),K=s.useTemplateRef("active-tooltip"),q=s.ref([]),ce=s.ref(null),me=s.ref(!0),ve=s.ref(!1),Be=s.ref(""),te=s.ref({bottom:"",left:"",transform:""}),V=s.ref({left:"50%"});xM(M,{onSwipeEnd:(E,_)=>{u.value.noSwipe||(a.vertical?(_==="up"||_==="down")&&r("handle-swipe",_==="up"?"left":"right"):(_==="left"||_==="right")&&r("handle-swipe",_==="right"?"left":"right"))}});const Y=s.computed(()=>a.calendar?a.calendar(A.mappedDates):A.mappedDates),x=s.computed(()=>a.dayNames?Array.isArray(a.dayNames)?a.dayNames:a.dayNames():le());s.onMounted(()=>{r("mount",{cmp:"calendar",dayRefs:q.value}),u.value.monthChangeOnScroll&&M.value&&M.value.addEventListener("wheel",j,{passive:!1})}),s.onUnmounted(()=>{u.value.monthChangeOnScroll&&M.value&&M.value.removeEventListener("wheel",j)});const Q=E=>E?a.vertical?"vNext":"next":a.vertical?"vPrevious":"previous",P=(E,_)=>{if(a.transitions){const O=w(ft(i(),{month:A.month,year:A.year}));Be.value=B(w(ft(i(),{month:E,year:_})),O)?l.value[Q(!0)]:l.value[Q(!1)],me.value=!1,s.nextTick(()=>{me.value=!0})}},T=s.computed(()=>({...v.value.calendar})),S=E=>({type:"dot",...E}),G=s.computed(()=>E=>{const _=S(E);return{dp__marker_dot:_.type==="dot",dp__marker_line:_.type==="line"}}),Ae=s.computed(()=>E=>y(E,ce.value)),ne=s.computed(()=>({dp__calendar:!0,dp__calendar_next:h.value.count>0&&A.instance!==0})),ee=s.computed(()=>E=>a.hideOffsetDates?E.current:!0),re=async(E,_)=>{const{width:O,height:ie}=E.getBoundingClientRect();ce.value=_.value;let X={left:`${O/2}px`},be=-50;if(await s.nextTick(),K.value?.[0]){const{left:we,width:ae}=K.value[0].getBoundingClientRect();we<0&&(X={left:"0"},be=0,V.value.left=`${O/2}px`),globalThis.innerWidth<we+ae&&(X={right:"0"},be=0,V.value.left=`${ae-O/2}px`)}te.value={bottom:`${ie}px`,...X,transform:`translateX(${be}%)`}},pe=async(E,_,O)=>{const ie=_r(q.value?.[_]?.[O]);ie&&(E.marker?.customPosition&&E.marker?.tooltip?.length?te.value=E.marker.customPosition(ie):await re(ie,E),o("tooltip-open",E.marker))},de=async(E,_,O)=>{if(ve.value&&m.value.enabled&&m.value.dragSelect)return r("select-date",E);if(r("set-hover-date",E),E.marker?.tooltip?.length){if(a.hideOffsetDates&&!E.current)return;await pe(E,_,O)}},Ce=E=>{ce.value&&(ce.value=null,te.value=structuredClone({bottom:"",left:"",transform:""}),o("tooltip-close",E.marker))},W=(E,_,O)=>{E&&(Array.isArray(q.value[_])?q.value[_][O]=E:q.value[_]=[E])},j=E=>{u.value.monthChangeOnScroll&&(E.preventDefault(),r("handle-scroll",E))},$=E=>p.value?p.value.type==="local"?vp(E.value,{weekStartsOn:+a.weekStart,locale:a.locale}):p.value.type==="iso"?mp(E.value):typeof p.value.type=="function"?p.value.type(E.value):"":"",N=E=>{const _=E[0];return p.value?.hideOnOffsetDates?E.some(O=>O.current)?$(_):"":$(_)},R=(E,_,O=!0)=>{!O&&U()||(!m.value.enabled||u.value.allowPreventDefault)&&(F(E,u.value),r("select-date",_))},J=E=>{F(E,u.value)},z=E=>{m.value.enabled&&m.value.dragSelect?(ve.value=!0,r("select-date",E)):m.value.enabled&&r("select-date",E)},le=()=>{const E=i(),_=Jr(E,{locale:a.locale,weekStartsOn:+a.weekStart}),O=hp(E,{locale:a.locale,weekStartsOn:+a.weekStart});return fp({start:_,end:O}).map(ie=>D(ie))};return e({triggerTransition:P}),(E,_)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(ne.value)},[s.createElementVNode("div",{ref:"calendar-wrap",class:s.normalizeClass(T.value),role:"grid"},[s.createElementVNode("div",vO,[s.unref(p)?(s.openBlock(),s.createElementBlock("div",wO,s.toDisplayString(s.unref(p).label),1)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(x.value,(O,ie)=>(s.openBlock(),s.createElementBlock("div",{key:ie,class:"dp__calendar_header_item",role:"gridcell","data-test-id":"calendar-header","aria-label":s.unref(d)?.weekDay?.(ie)},[s.renderSlot(E.$slots,"calendar-header",{day:O,index:ie},()=>[s.createTextVNode(s.toDisplayString(O),1)])],8,BO))),128))]),_[2]||(_[2]=s.createElementVNode("div",{class:"dp__calendar_header_separator"},null,-1)),s.createVNode(s.Transition,{name:Be.value,css:!!s.unref(l)},{default:s.withCtx(()=>[me.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"dp__calendar",role:"rowgroup",onMouseleave:_[1]||(_[1]=O=>ve.value=!1)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(Y.value,(O,ie)=>(s.openBlock(),s.createElementBlock("div",{key:ie,class:"dp__calendar_row",role:"row"},[s.unref(p)?(s.openBlock(),s.createElementBlock("div",yO,[s.createElementVNode("div",CO,s.toDisplayString(N(O.days)),1)])):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(O.days,(X,be)=>(s.openBlock(),s.createElementBlock("div",{id:s.unref(C)(X.value),ref_for:!0,ref:we=>W(we,ie,be),key:be+ie,role:"gridcell",class:"dp__calendar_item","aria-selected":(X.classData.dp__active_date||X.classData.dp__range_start||X.classData.dp__range_end)??void 0,"aria-disabled":X.classData.dp__cell_disabled||void 0,"aria-label":s.unref(d)?.day?.(X),tabindex:!X.current&&s.unref(a).hideOffsetDates?void 0:0,"data-test-id":s.unref(C)(X.value),"data-dp-element-active":X.classData.dp__active_date?0:void 0,"data-dp-action-element":"0",onClick:s.withModifiers(we=>R(we,X),["prevent"]),onTouchend:we=>R(we,X,!1),onKeydown:we=>s.unref(k)(we,()=>E.$emit("select-date",X)),onMouseenter:we=>de(X,ie,be),onMouseleave:we=>Ce(X),onMousedown:we=>z(X),onMouseup:_[0]||(_[0]=we=>ve.value=!1)},[s.createElementVNode("div",{class:s.normalizeClass(["dp__cell_inner",X.classData])},[E.$slots.day&&ee.value(X)?s.renderSlot(E.$slots,"day",{key:0,day:+X.text,date:X.value}):s.createCommentVNode("",!0),E.$slots.day?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(X.text),1)],64)),X.marker&&ee.value(X)?s.renderSlot(E.$slots,"marker",{key:2,marker:X.marker,day:+X.text,date:X.value},()=>[s.createElementVNode("div",{class:s.normalizeClass(G.value(X.marker)),style:s.normalizeStyle(X.marker.color?{backgroundColor:X.marker.color}:{})},null,6)]):s.createCommentVNode("",!0),Ae.value(X.value)?(s.openBlock(),s.createElementBlock("div",{key:3,ref_for:!0,ref:"active-tooltip",class:"dp__marker_tooltip",style:s.normalizeStyle(te.value)},[X.marker?.tooltip?(s.openBlock(),s.createElementBlock("div",{key:0,class:"dp__tooltip_content",onClick:J},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(X.marker.tooltip,(we,ae)=>(s.openBlock(),s.createElementBlock("div",{key:ae,class:"dp__tooltip_text"},[s.renderSlot(E.$slots,"marker-tooltip",{tooltip:we,day:X.value},()=>[s.createElementVNode("div",{class:"dp__tooltip_mark",style:s.normalizeStyle(we.color?{backgroundColor:we.color}:{})},null,4),s.createElementVNode("div",null,s.toDisplayString(we.text),1)])]))),128)),s.createElementVNode("div",{class:"dp__arrow_bottom_tp",style:s.normalizeStyle(V.value)},null,4)])):s.createCommentVNode("",!0)],4)):s.createCommentVNode("",!0)],2)],40,bO))),128))]))),128))],32)):s.createCommentVNode("",!0)]),_:3},8,["name","css"])],2)],2))}}),kO=(t,e,n,r)=>{const A=s.ref([]),i=s.ref(new Date),o=s.ref(),{getDate:a,rootEmit:l,calendars:u,month:d,year:h,time:p,modelValue:m,rootProps:v,today:B,state:y,defaults:{multiCalendars:w,startTime:C,range:k,config:F,safeDates:U,multiDates:D,timeConfig:M,flow:K}}=pt(),{validateMonthYearInRange:q,isDisabled:ce,isDateRangeAllowed:me,checkMinMaxRange:ve}=Zr(),{updateTimeValues:Be,getSetDateTime:te,assignTime:V,assignStartTime:Y,validateTime:x,disabledTimesConfig:Q}=R0(r),{formatDay:P}=io(),{resetDateTime:T,setTime:S,isDateBefore:G,isDateEqual:Ae,getDaysInBetween:ne}=jn(),{checkRangeAutoApply:ee,getRangeWithFixedDate:re,handleMultiDatesSelect:pe,setPresetDate:de}=fu(),{getMapDate:Ce}=Sn();ml(()=>z(y.isTextInputDate));const W=ge=>!F.value.keepViewOnOffsetClick||ge?!0:!o.value,j=(ge,Ie,We,At=!1)=>{W(At)&&(u.value[ge]??=u.value[ge]={month:0,year:0},u.value[ge].month=Ie??u.value[ge]?.month,u.value[ge].year=We??u.value[ge]?.year)},$=()=>{v.autoApply&&e("select-date")},N=()=>{C.value&&Y(C.value)};s.onMounted(()=>{m.value||(Pe(),N()),z(!0),v.focusStartDate&&v.startDate&&Pe()});const R=s.computed(()=>K.value?.steps?.length&&!K.value?.partial?t.flowStep===K.value.steps.length:!0),J=()=>{v.autoApply&&R.value&&e("auto-apply",K.value?.partial?t.flowStep!==K.value?.steps?.length:!1)},z=(ge=!1)=>{if(m.value)return Array.isArray(m.value)?(A.value=m.value,we(ge)):O(m.value,ge);if(w.value.count&&ge&&!v.startDate)return _(a(),ge)},le=()=>Array.isArray(m.value)&&k.value.enabled?vt(m.value[0])===vt(m.value[1]??m.value[0]):!1,E=ge=>{const Ie=bA(ge,1);return{month:vt(Ie),year:tt(Ie)}},_=(ge=a(),Ie=!1)=>{if((!w.value.count||!w.value.static||Ie)&&j(0,vt(ge),tt(ge)),w.value.count&&(!m.value||le()||!w.value.solo)&&(!w.value.solo||Ie))for(let We=1;We<w.value.count;We++){const At=ft(a(),{month:d.value(We-1),year:h.value(We-1)}),bt=XB(At,{months:1});u.value[We]={month:vt(bt),year:tt(bt)}}},O=(ge,Ie)=>{_(ge),V("hours",qA(ge)),V("minutes",Ci(ge)),V("seconds",Ao(ge)),w.value.count&&Ie&&xe()},ie=ge=>{if(w.value.count){if(w.value.solo)return 0;const Ie=vt(ge[0]),We=vt(ge[1]);return Math.abs(We-Ie)<w.value.count?0:1}return 1},X=(ge,Ie)=>{ge[1]&&k.value.showLastInRange?_(ge[ie(ge)],Ie):_(ge[0],Ie);const We=(At,bt)=>[At(ge[0]),ge?.[1]?At(ge[1]):p[bt][1]];V("hours",We(qA,"hours")),V("minutes",We(Ci,"minutes")),V("seconds",We(Ao,"seconds"))},be=(ge,Ie)=>{if((k.value.enabled||v.weekPicker)&&!D.value.enabled)return X(ge,Ie);if(D.value.enabled&&Ie){const We=ge[ge.length-1];return O(We,Ie)}},we=ge=>{const Ie=m.value;be(Ie,ge),w.value.count&&w.value.solo&&xe()},ae=(ge,Ie)=>{const We=ft(a(),{month:d.value(Ie),year:h.value(Ie)}),At=ge<0?bA(We,1):ea(We,1);q(vt(At),tt(At),ge<0,v.preventMinMaxNavigation)&&(j(Ie,vt(At),tt(At)),l("update-month-year",{instance:Ie,month:vt(At),year:tt(At)}),w.value.count&&!w.value.solo&&he(Ie),n())},he=ge=>{for(let Ie=ge-1;Ie>=0;Ie--){const We=ea(ft(a(),{month:d.value(Ie+1),year:h.value(Ie+1)}),1);j(Ie,vt(We),tt(We))}for(let Ie=ge+1;Ie<=w.value.count-1;Ie++){const We=bA(ft(a(),{month:d.value(Ie-1),year:h.value(Ie-1)}),1);j(Ie,vt(We),tt(We))}},xe=()=>{if(Array.isArray(m.value)&&m.value.length===2){const ge=a(a(m.value[1]??bA(m.value[0],1))),[Ie,We]=[vt(m.value[0]),tt(m.value[0])],[At,bt]=[vt(m.value[1]),tt(m.value[1])];(Ie!==At||Ie===At&&We!==bt)&&w.value.solo&&j(1,vt(ge),tt(ge))}else m.value&&!Array.isArray(m.value)&&(j(0,vt(m.value),tt(m.value)),_(a()))},Pe=()=>{v.startDate&&(j(0,vt(a(v.startDate)),tt(a(v.startDate))),w.value.count&&he(0))},ot=(ge,Ie)=>{if(F.value.monthChangeOnScroll){const We=Date.now()-i.value.getTime(),At=Math.abs(ge.deltaY);let bt=500;At>1&&(bt=100),At>100&&(bt=0),We>bt&&(i.value=new Date,ae(F.value.monthChangeOnScroll==="inverse"?ge.deltaY:-ge.deltaY,Ie))}},$e=(ge,Ie,We=!1)=>{F.value.monthChangeOnArrows&&v.vertical===We&&ht(ge,Ie)},ht=(ge,Ie)=>{ae(ge==="right"?-1:1,Ie)},Bt=ge=>{if(U.value.markers)return Ce(ge.value,U.value.markers)},Et=(ge,Ie)=>{switch(v.sixWeeks===!0?"append":v.sixWeeks){case"prepend":return[!0,!1];case"center":return[ge==0,!0];case"fair":return[ge==0||Ie>ge,!0];case"append":return[!1,!1];default:return[!1,!1]}},En=(ge,Ie,We,At)=>{if(v.sixWeeks&&ge.length<6){const bt=6-ge.length,Pr=(Ie.getDay()+7-At)%7,uA=6-(We.getDay()+7-At)%7,[gi,Ki]=Et(Pr,uA);for(let zi=1;zi<=bt;zi++)if(Ki?!!(zi%2)==gi:gi){const Re=ge[0].days[0],se=Yt(Xr(Re.value,-7),vt(Ie));ge.unshift({days:se})}else{const Re=ge[ge.length-1],se=Re.days[Re.days.length-1],Te=Yt(Xr(se.value,1),vt(Ie));ge.push({days:Te})}}return ge},Yt=(ge,Ie)=>{const We=a(ge),At=[];for(let bt=0;bt<7;bt++){const Pr=Xr(We,bt),uA=vt(Pr)!==Ie;At.push({text:v.hideOffsetDates&&uA?"":P(Pr),value:Pr,current:!uA,classData:{}})}return At},Kt=(ge,Ie)=>{const We=[],At=a(new Date(Ie,ge)),bt=a(new Date(Ie,ge+1,0)),Pr=v.weekStart,uA=Jr(At,{weekStartsOn:Pr}),gi=Ki=>{const zi=Yt(Ki,ge);if(We.push({days:zi}),!We[We.length-1].days.some(Re=>Ae(a(Re.value),T(bt)))){const Re=Xr(Ki,7);gi(Re)}};return gi(uA),En(We,At,bt,Pr)},OA=ge=>{const Ie=S({hours:p.hours,minutes:p.minutes,seconds:Ho()},a(ge.value));l("date-click",Ie),D.value.enabled?pe(Ie,D.value.limit):m.value=Ie,r(),s.nextTick().then(()=>{J()})},pi=ge=>k.value.noDisabledRange?ne(A.value[0],ge).some(Ie=>ce(Ie)):!1,ze=()=>{A.value=m.value?m.value.slice().filter(ge=>!!ge):[],A.value.length===2&&!(k.value.fixedStart||k.value.fixedEnd)&&(A.value=[])},gn=(ge,Ie)=>{const We=[a(ge.value),Xr(a(ge.value),+k.value.autoRange)];me(We)?(Ie&&Tn(ge.value),A.value=We):l("invalid-date",ge.value)},Tn=ge=>{const Ie=vt(a(ge)),We=tt(a(ge));if(j(0,Ie,We),w.value.count>0)for(let At=1;At<w.value.count;At++){const bt=E(ft(a(ge),{year:h.value(At-1),month:d.value(At-1)}));j(At,bt.month,bt.year)}},mi=ge=>{if(pi(ge.value)||!ve(ge.value,m.value,k.value.fixedStart?0:1))return l("invalid-date",ge.value);A.value=re(a(ge.value))},Br=(ge,Ie)=>{if(ze(),k.value.autoRange)return gn(ge,Ie);if(k.value.fixedStart||k.value.fixedEnd)return mi(ge);A.value[0]?ve(a(ge.value),m.value)&&!pi(ge.value)?G(a(ge.value),a(A.value[0]))?k.value.autoSwitchStartEnd?(A.value.unshift(a(ge.value)),l("range-end",A.value[0])):(A.value[0]=a(ge.value),l("range-start",A.value[0])):(A.value[1]=a(ge.value),l("range-end",A.value[1])):l("invalid-date",ge.value):(A.value[0]=a(ge.value),l("range-start",A.value[0]))},Ho=(ge=!0)=>M.value.enableSeconds?Array.isArray(p.seconds)?ge?p.seconds[0]:p.seconds[1]:p.seconds:0,Us=ge=>{A.value[ge]=S({hours:p.hours[ge],minutes:p.minutes[ge],seconds:Ho(ge!==1)},A.value[ge])},nn=()=>{A.value[0]&&A.value[1]&&+A.value?.[0]>+A.value?.[1]&&(A.value.reverse(),l("range-start",A.value[0]),l("range-end",A.value[1]))},NA=()=>{A.value.length&&(A.value[0]&&!A.value[1]?Us(0):(Us(0),Us(1),r()),nn(),m.value=A.value.slice(),ee(A.value,e,A.value.length<2||K.value?.steps.length?t.flowStep!==K.value?.steps?.length:!1))},Fc=(ge,Ie=!1)=>{if(ce(ge.value)||!ge.current&&v.hideOffsetDates)return l("invalid-date",ge.value);if(o.value=structuredClone(ge),!k.value.enabled)return OA(ge);Array.isArray(p.hours)&&Array.isArray(p.minutes)&&!D.value.enabled&&(Br(ge,Ie),NA())},Ra=(ge,Ie)=>{j(ge,Ie.month,Ie.year,!0),w.value.count&&!w.value.solo&&he(ge),l("update-month-year",{instance:ge,month:Ie.month,year:Ie.year}),n(w.value.solo?ge:void 0);const We=K.value?.steps?.length?K.value.steps[t.flowStep]:void 0;!Ie.fromNav&&(We===hr.month||We===hr.year)&&r()},_s=ge=>{de({value:ge}),$(),v.multiCalendars&&s.nextTick().then(()=>z(!0))},Po=()=>{let ge=a();return v.actionRow?.nowBtnRound&&(ge=k_(ge,{roundingMethod:v.actionRow.nowBtnRound.rounding??"ceil",nearestTo:v.actionRow.nowBtnRound.roundTo??15})),ge},Ha=()=>{const ge=Po();!k.value.enabled&&!D.value.enabled?m.value=ge:m.value&&Array.isArray(m.value)&&m.value[0]?D.value.enabled?m.value=[...m.value,ge]:m.value=G(ge,m.value[0])?[ge,m.value[0]]:[m.value[0],ge]:m.value=[ge],$()},Ds=()=>{if(Array.isArray(m.value))if(D.value.enabled){const ge=Qr();m.value[m.value.length-1]=te(ge)}else m.value=m.value.map((ge,Ie)=>ge&&te(ge,Ie));else m.value=te(m.value);e("time-update")},Qr=()=>Array.isArray(m.value)&&m.value.length?m.value[m.value.length-1]:null,LA=ge=>{let Ie="";if(k.value.enabled&&Array.isArray(m.value))for(const We of Object.keys(ge)){const At=ge[We];Array.isArray(At)&&(p[We][0]!==At[0]&&(Ie="range-start"),p[We][1]!==At[1]&&(Ie="range-start"))}return Ie};return{calendars:u,modelValue:m,month:d,year:h,time:p,disabledTimesConfig:Q,today:B,validateTime:x,getCalendarDays:Kt,getMarker:Bt,handleScroll:ot,handleSwipe:ht,handleArrow:$e,selectDate:Fc,updateMonthYear:Ra,presetDate:_s,selectCurrentDate:Ha,updateTime:ge=>{const Ie=LA(ge);Be(ge,Ds),Ie&&l(Ie,m.value[Ie==="range-start"?0:1])},assignMonthAndYear:_,setStartTime:N}},SO=()=>{const{isModelAuto:t,matchDate:e,isDateAfter:n,isDateBefore:r,isDateBetween:A,isDateEqual:i,getWeekFromDate:o,getBeforeAndAfterInRange:a}=jn(),{getDate:l,today:u,rootProps:d,defaults:{multiCalendars:h,multiDates:p,ui:m,highlight:v,safeDates:B,range:y},modelValue:w}=pt(),{isDisabled:C}=Zr(),k=s.ref(null),F=E=>{!E.current&&d.hideOffsetDates||(k.value=E.value)},U=()=>{k.value=null},D=E=>Array.isArray(w.value)&&y.value.enabled&&w.value[0]&&k.value?E?n(k.value,w.value[0]):r(k.value,w.value[0]):!0,M=(E,_)=>{const O=()=>w.value?_?w.value[0]||null:w.value[1]:null,ie=w.value&&Array.isArray(w.value)?O():null;return i(l(E.value),ie)},K=E=>{const _=Array.isArray(w.value)?w.value[0]:null;return E?!r(k.value,_):!0},q=(E,_=!0)=>(y.value.enabled||d.weekPicker)&&Array.isArray(w.value)&&w.value.length===2?d.hideOffsetDates&&!E.current?!1:i(l(E.value),w.value[_?0:1]):y.value.enabled?M(E,_)&&K(_)||i(E.value,Array.isArray(w.value)?w.value[0]:null)&&D(_):!1,ce=(E,_)=>{if(Array.isArray(w.value)&&w.value[0]&&w.value.length===1){const O=i(E.value,k.value);return _?n(w.value[0],E.value)&&O:r(w.value[0],E.value)&&O}return!1},me=E=>!w.value||d.hideOffsetDates&&!E.current?!1:y.value.enabled?d.modelAuto&&Array.isArray(w.value)?i(E.value,w.value[0]??u):!1:p.value.enabled&&Array.isArray(w.value)?w.value.some(_=>i(_,E.value)):i(E.value,w.value?w.value:u),ve=E=>{if(y.value.autoRange||d.weekPicker){if(k.value){if(d.hideOffsetDates&&!E.current)return!1;const _=Xr(k.value,+y.value.autoRange),O=o(l(k.value),d.weekStart);return d.weekPicker?i(O[1],l(E.value)):i(_,l(E.value))}return!1}return!1},Be=E=>{if(y.value.autoRange||d.weekPicker){if(k.value){const _=Xr(k.value,+y.value.autoRange);if(d.hideOffsetDates&&!E.current)return!1;const O=o(l(k.value),d.weekStart);return d.weekPicker?n(E.value,O[0])&&r(E.value,O[1]):n(E.value,k.value)&&r(E.value,_)}return!1}return!1},te=E=>{if(y.value.autoRange||d.weekPicker){if(k.value){if(d.hideOffsetDates&&!E.current)return!1;const _=o(l(k.value),d.weekStart);return d.weekPicker?i(_[0],E.value):i(k.value,E.value)}return!1}return!1},V=E=>A(w.value,k.value,E.value),Y=()=>d.modelAuto&&Array.isArray(w.value)?!!w.value[0]:!1,x=()=>d.modelAuto?t(w.value):!0,Q=E=>{if(d.weekPicker)return!1;const _=y.value.enabled?!q(E)&&!q(E,!1):!0;return!C(E.value)&&!me(E)&&!(!E.current&&d.hideOffsetDates)&&_},P=E=>y.value.enabled?d.modelAuto?Y()&&me(E):!1:me(E),T=E=>v.value?e(E.value,B.value.highlight):!1,S=E=>{const _=C(E.value);return _&&(typeof v.value=="function"?!v.value(E.value,_):!v.value.options.highlightDisabled)},G=E=>typeof v.value=="function"?v.value(E.value):v.value.weekdays?.includes(E.value.getDay()),Ae=E=>(y.value.enabled||d.weekPicker)&&(!(h.value.count>0)||E.current)&&x()&&!(!E.current&&d.hideOffsetDates)&&!me(E)?V(E):!1,ne=E=>{if(Array.isArray(w.value)&&w.value.length===1){const{before:_,after:O}=a(+y.value.maxRange,w.value[0]);return bi(E.value,_)||XA(E.value,O)}return!1},ee=E=>{if(Array.isArray(w.value)&&w.value.length===1){const{before:_,after:O}=a(+y.value.minRange,w.value[0]);return A([_,O],w.value[0],E.value)}return!1},re=E=>y.value.enabled&&(y.value.maxRange||y.value.minRange)?y.value.maxRange&&y.value.minRange?ne(E)||ee(E):y.value.maxRange?ne(E):ee(E):!1,pe=E=>{const{isRangeStart:_,isRangeEnd:O}=j(E),ie=y.value.enabled?_||O:!1;return{dp__cell_offset:!E.current,dp__pointer:!d.disabled&&!(!E.current&&d.hideOffsetDates)&&!C(E.value)&&!re(E),dp__cell_disabled:C(E.value)||re(E),dp__cell_highlight:!S(E)&&(T(E)||G(E))&&!P(E)&&!ie&&!te(E)&&!(Ae(E)&&d.weekPicker)&&!O,dp__cell_highlight_active:!S(E)&&(T(E)||G(E))&&P(E),dp__today:!d.noToday&&i(E.value,u)&&E.current,"dp--past":r(E.value,u),"dp--future":n(E.value,u)}},de=E=>({dp__active_date:P(E),dp__date_hover:Q(E)}),Ce=E=>{if(w.value&&!Array.isArray(w.value)){const _=o(w.value,d.weekStart);return{...z(E),dp__range_start:i(_[0],E.value),dp__range_end:i(_[1],E.value),dp__range_between_week:n(E.value,_[0])&&r(E.value,_[1])}}return{...z(E)}},W=E=>{if(w.value&&Array.isArray(w.value)){const _=o(w.value[0],d.weekStart),O=w.value[1]?o(w.value[1],d.weekStart):[];return{...z(E),dp__range_start:i(_[0],E.value)||i(O[0],E.value),dp__range_end:i(_[1],E.value)||i(O[1],E.value),dp__range_between_week:n(E.value,_[0])&&r(E.value,_[1])||n(E.value,O[0])&&r(E.value,O[1]),dp__range_between:n(E.value,_[1])&&r(E.value,O[0])}}return{...z(E)}},j=E=>{const _=h.value.count>0?E.current&&q(E)&&x():q(E)&&x(),O=h.value.count>0?E.current&&q(E,!1)&&x():q(E,!1)&&x();return{isRangeStart:_,isRangeEnd:O}},$=E=>y.value.enabled&&(y.value.fixedStart||y.value.fixedEnd)&&Array.isArray(w.value)&&w.value.length===2,N=(E,_,O,ie)=>!$(w.value)||!k.value?!1:_?y.value.fixedEnd&&i(E.value,k.value)&&bi(E.value,w.value[0])&&!O:y.value.fixedStart&&i(E.value,k.value)&&XA(E.value,w.value[1])&&!ie,R=(E,_)=>!$(w.value)||!k.value?!1:_?y.value.fixedEnd&&XA(E.value,k.value)&&bi(E.value,w.value[0]):y.value.fixedStart&&bi(E.value,k.value)&&XA(E.value,w.value[1]),J=E=>{const{isRangeStart:_,isRangeEnd:O}=j(E);return{dp__range_start:_,dp__range_end:O,dp__range_between:Ae(E),dp__date_hover:i(E.value,k.value)&&!_&&!O&&!d.weekPicker,dp__date_hover_start:ce(E,!0)||N(E,!0,_,O),dp__date_hover_end:ce(E,!1)||N(E,!1,_,O),"dp--extended-fixed-start":R(E,!0),"dp--extended-fixed-end":R(E,!1)}},z=E=>({...J(E),dp__cell_auto_range:Be(E),dp__cell_auto_range_start:te(E),dp__cell_auto_range_end:ve(E)}),le=E=>y.value.enabled?y.value.autoRange?z(E):d.modelAuto?{...de(E),...J(E)}:d.weekPicker?W(E):J(E):d.weekPicker?Ce(E):de(E);return{setHoverDate:F,clearHoverDate:U,getDayClassData:E=>d.hideOffsetDates&&!E.current?{}:{...pe(E),...le(E),[m.value.dayClass?m.value.dayClass(E.value,w.value):""]:!0,...m.value.calendarCell}}},xO={key:0},FO=s.defineComponent({__name:"DatePicker",props:s.mergeDefaults({flowStep:{},collapse:{type:Boolean},menuWrapRef:{},noOverlayFocus:{type:Boolean}},kD),emits:["mount","update-flow-step","reset-flow","focus-menu","select-date","time-update","auto-apply"],setup(t,{expose:e,emit:n}){const r=n,A=t,{month:i,year:o,modelValue:a,time:l,disabledTimesConfig:u,today:d,validateTime:h,getCalendarDays:p,getMarker:m,handleArrow:v,handleScroll:B,handleSwipe:y,selectDate:w,updateMonthYear:C,presetDate:k,selectCurrentDate:F,updateTime:U,assignMonthAndYear:D,setStartTime:M}=kO(A,r,de,Ce),K=s.useSlots(),{setHoverDate:q,getDayClassData:ce,clearHoverDate:me}=SO(),{getDate:ve,rootEmit:Be,rootProps:te,defaults:{multiCalendars:V,timeConfig:Y}}=pt(),{getYears:x,getMonths:Q}=cu(),{getCellId:P}=jn(),T=s.useTemplateRef("calendar-header"),S=s.useTemplateRef("calendar"),G=s.useTemplateRef("time-picker"),Ae=VA(K,xA.Calendar),ne=VA(K,xA.DatePickerHeader),ee=VA(K,xA.TimePicker),re=le=>{r("mount",le)};s.watch(V,(le,E)=>{le.count-E.count>0&&D()},{deep:!0});const pe=s.computed(()=>le=>p(i.value(le),o.value(le)).map(E=>({...E,days:E.days.map(_=>(_.marker=m(_),_.classData=ce(_),_))})));function de(le){le||le===0?S.value?.[le]?.triggerTransition(i.value(le),o.value(le)):S.value?.forEach((E,_)=>E?.triggerTransition(i.value(_),o.value(_)))}function Ce(){r("update-flow-step")}const W=(le,E,_=0)=>{T.value?.[_]?.toggleMonthPicker(le,E)},j=(le,E,_=0)=>{T.value?.[_]?.toggleYearPicker(le,E)},$=(le,E,_)=>{G.value?.toggleTimePicker(le,E,_)},N=(le,E)=>{if(!te.range){const _=a.value?a.value:d,O=E?ve(E):_,ie=le?Jr(O,{weekStartsOn:1}):hp(O,{weekStartsOn:1});w({value:ie,current:vt(O)===i.value(0),text:"",classData:{}}),document.getElementById(P(ie))?.focus()}},R=le=>{T.value?.[0]?.handleMonthYearChange(le,!0)},J=le=>{C(0,{month:i.value(0),year:o.value(0)+(le?1:-1),fromNav:!0})},z=le=>{Be("overlay-toggle",{open:!1,overlay:le}),r("focus-menu")};return e({clearHoverDate:me,presetDate:k,selectCurrentDate:F,handleArrow:v,updateMonthYear:C,setStartTime:M,toggleMonthPicker:W,toggleYearPicker:j,toggleTimePicker:$,getSidebarProps:()=>({modelValue:a,month:i,year:o,time:l,updateTime:U,updateMonthYear:C,selectDate:w,presetDate:k}),changeMonth:R,changeYear:J,selectWeekDate:N}),(le,E)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createVNode(du,{collapse:t.collapse},{default:s.withCtx(({instances:_,wrapClass:O})=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(_,ie=>(s.openBlock(),s.createElementBlock("div",{key:ie,class:s.normalizeClass(O)},[s.unref(te).hideMonthYearSelect?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(gO,{key:0,ref_for:!0,ref:"calendar-header",months:s.unref(Q)(),years:s.unref(x)(),month:s.unref(i)(ie),year:s.unref(o)(ie),instance:ie,"menu-wrap-ref":t.menuWrapRef,onMount:E[0]||(E[0]=X=>re(s.unref(is).header)),onResetFlow:E[1]||(E[1]=X=>le.$emit("reset-flow")),onUpdateMonthYear:X=>s.unref(C)(ie,X),onOverlayClosed:z},s.createSlots({_:2},[s.renderList(s.unref(ne),(X,be)=>({name:X,fn:s.withCtx(we=>[s.renderSlot(le.$slots,X,s.mergeProps({ref_for:!0},we))])}))]),1032,["months","years","month","year","instance","menu-wrap-ref","onUpdateMonthYear"])),s.createVNode(EO,{ref_for:!0,ref:"calendar","mapped-dates":pe.value(ie),instance:ie,month:s.unref(i)(ie),year:s.unref(o)(ie),onSelectDate:X=>s.unref(w)(X,ie!==1),onSetHoverDate:E[2]||(E[2]=X=>s.unref(q)(X)),onHandleScroll:X=>s.unref(B)(X,ie),onHandleSwipe:X=>s.unref(y)(X,ie),onMount:E[3]||(E[3]=X=>re(s.unref(is).calendar))},s.createSlots({_:2},[s.renderList(s.unref(Ae),(X,be)=>({name:X,fn:s.withCtx(we=>[s.renderSlot(le.$slots,X,s.mergeProps({ref_for:!0},we))])}))]),1032,["mapped-dates","instance","month","year","onSelectDate","onHandleScroll","onHandleSwipe"])],2))),128))]),_:3},8,["collapse"]),s.unref(Y).enableTimePicker?(s.openBlock(),s.createElementBlock("div",xO,[s.renderSlot(le.$slots,"time-picker",s.normalizeProps(s.guardReactiveProps({time:s.unref(l),updateTime:s.unref(U)})),()=>[s.createVNode(L0,{ref:"time-picker",hours:s.unref(l).hours,minutes:s.unref(l).minutes,seconds:s.unref(l).seconds,"disabled-times-config":s.unref(u),"validate-time":s.unref(h),"no-overlay-focus":t.noOverlayFocus,onMount:E[4]||(E[4]=_=>re(s.unref(is).timePicker)),"onUpdate:hours":E[5]||(E[5]=_=>s.unref(U)({hours:_,minutes:s.unref(l).minutes,seconds:s.unref(l).seconds})),"onUpdate:minutes":E[6]||(E[6]=_=>s.unref(U)({hours:s.unref(l).hours,minutes:_,seconds:s.unref(l).seconds})),"onUpdate:seconds":E[7]||(E[7]=_=>s.unref(U)({hours:s.unref(l).hours,minutes:s.unref(l).minutes,seconds:_})),onResetFlow:E[8]||(E[8]=_=>le.$emit("reset-flow"))},s.createSlots({_:2},[s.renderList(s.unref(ee),(_,O)=>({name:_,fn:s.withCtx(ie=>[s.renderSlot(le.$slots,_,s.normalizeProps(s.guardReactiveProps(ie)))])}))]),1032,["hours","minutes","seconds","disabled-times-config","validate-time","no-overlay-focus"])])])):s.createCommentVNode("",!0)],64))}}),QO=(t,e)=>{const{getDate:n,modelValue:r,year:A,calendars:i,defaults:{highlight:o,range:a,multiDates:l}}=pt(),{isDateBetween:u,isDateEqual:d}=jn(),{checkRangeAutoApply:h,handleMultiDatesSelect:p,setMonthOrYearRange:m}=fu();ml();const{isDisabled:v}=Zr(),{formatQuarterText:B}=io(),{selectYear:y,groupedYears:w,showYearPicker:C,isDisabled:k,toggleYearPicker:F,handleYearSelect:U,handleYear:D,setStartDate:M}=N0(e),K=s.ref();s.onMounted(()=>{M()});const q=s.computed(()=>x=>r.value?Array.isArray(r.value)?r.value.some(Q=>m0(x,Q)):m0(r.value,x):!1),ce=x=>{if(a.value.enabled){if(Array.isArray(r.value)){const Q=d(x,r.value[0])||d(x,r.value[1]);return u(r.value,K.value,x)&&!Q}return!1}return!1},me=(x,Q)=>x.quarter===t0(Q)&&x.year===tt(Q),ve=x=>typeof o.value=="function"?o.value({quarter:t0(x),year:tt(x)}):o.value.quarters.some(Q=>me(Q,x)),Be=s.computed(()=>x=>{const Q=ft(n(),{year:A.value(x)});return OI({start:js(Q),end:r0(Q)}).map(P=>{const T=ns(P),S=A0(P),G=v(P),Ae=ce(T),ne=ve(T);return{text:B(T,S),value:T,active:q.value(T),highlighted:ne,disabled:G,isBetween:Ae}})}),te=x=>{p(x,l.value.limit),e("auto-apply",!0)},V=x=>{r.value=m(x),h(r.value,e,r.value.length<2)},Y=x=>{r.value=x,e("auto-apply")};return{groupedYears:w,year:A,isDisabled:k,quarters:Be,showYearPicker:C,modelValue:r,selectYear:y,toggleYearPicker:F,handleYearSelect:U,handleYear:D,setHoverDate:x=>{K.value=x},selectQuarter:(x,Q,P)=>{if(!P)return i.value[Q].month=vt(A0(x)),l.value.enabled?te(x):a.value.enabled?V(x):Y(x)}}},TO={class:"dp--quarter-items"},MO=["data-test-id","disabled","onClick","onMouseover"],IO=s.defineComponent({__name:"QuarterPicker",props:{flowStep:{},collapse:{type:Boolean},menuWrapRef:{},noOverlayFocus:{type:Boolean}},emits:["reset-flow","auto-apply"],setup(t,{expose:e,emit:n}){const r=n,A=t,{defaults:{config:i}}=pt(),o=s.useSlots(),{boolHtmlAttribute:a}=ra(),l=VA(o,xA.YearMode),{groupedYears:u,year:d,isDisabled:h,quarters:p,modelValue:m,showYearPicker:v,setHoverDate:B,selectQuarter:y,toggleYearPicker:w,handleYearSelect:C,handleYear:k}=QO(A,r);return e({getSidebarProps:()=>({modelValue:m,year:d,selectQuarter:y,handleYearSelect:C,handleYear:k})}),(F,U)=>(s.openBlock(),s.createBlock(du,{collapse:t.collapse,stretch:""},{default:s.withCtx(({instances:D,wrapClass:M})=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(D,K=>(s.openBlock(),s.createElementBlock("div",{key:K,class:s.normalizeClass(M)},[s.createElementVNode("div",{class:"dp-quarter-picker-wrap",style:s.normalizeStyle({minHeight:`${s.unref(i).modeHeight}px`})},[F.$slots["top-extra"]?s.renderSlot(F.$slots,"top-extra",{key:0,value:s.unref(m)}):s.createCommentVNode("",!0),s.createElementVNode("div",null,[s.createVNode(O0,{items:s.unref(u)(K),instance:K,"show-year-picker":s.unref(v)[K],year:s.unref(d)(K),"is-disabled":q=>s.unref(h)(K,q),onHandleYear:q=>s.unref(k)(K,q),onYearSelect:q=>s.unref(C)(q,K),onToggleYearPicker:q=>s.unref(w)(K,q?.flow,q?.show)},s.createSlots({_:2},[s.renderList(s.unref(l),(q,ce)=>({name:q,fn:s.withCtx(me=>[s.renderSlot(F.$slots,q,s.mergeProps({ref_for:!0},me))])}))]),1032,["items","instance","show-year-picker","year","is-disabled","onHandleYear","onYearSelect","onToggleYearPicker"])]),s.createElementVNode("div",TO,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(p)(K),(q,ce)=>(s.openBlock(),s.createElementBlock("div",{key:ce},[s.createElementVNode("button",{type:"button",class:s.normalizeClass(["dp--qr-btn",{"dp--qr-btn-active":q.active,"dp--qr-btn-between":q.isBetween,"dp--qr-btn-disabled":q.disabled,"dp--highlighted":q.highlighted}]),"data-dp-action-element":"0","data-test-id":q.value,disabled:s.unref(a)(q.disabled),onClick:me=>s.unref(y)(q.value,K,q.disabled),onMouseover:me=>s.unref(B)(q.value)},[s.renderSlot(F.$slots,"quarter",{value:q.value,text:q.text},()=>[s.createTextVNode(s.toDisplayString(q.text),1)])],42,MO)]))),128))])],4)],2))),128))]),_:3},8,["collapse"]))}}),UO=["id","tabindex","role","aria-label"],_O={key:0,class:"dp--menu-load-container"},DO={key:1,class:"dp--menu-header"},OO=["data-dp-mobile"],NO={key:0,class:"dp__sidebar_left"},LO=["data-dp-mobile"],RO=["data-test-id","data-dp-mobile","onClick","onKeydown"],HO={class:"dp__instance_calendar"},PO={key:2,class:"dp__sidebar_right"},$O={key:2,class:"dp__action_extra"},KO=s.defineComponent({__name:"DatepickerMenu",props:{collapse:{type:Boolean},noOverlayFocus:{type:Boolean},getInputRect:{type:Function}},emits:["close-picker","select-date","auto-apply","time-update","menu-blur"],setup(t,{expose:e,emit:n}){const r=n,A=s.useSlots(),{state:i,rootProps:o,defaults:{textInput:a,inline:l,config:u,ui:d,ariaLabels:h},setState:p}=pt(),{isMobile:m}=lu(),{handleEventPropagation:v,getElWithin:B,checkStopPropagation:y,checkKeyDown:w}=Sn();O_();const C=s.useTemplateRef("inner-menu"),k=s.useTemplateRef("dp-menu"),F=s.useTemplateRef("dyn-cmp"),U=s.ref(0),D=s.ref(!1),M=s.ref(!1),{flowStep:K,updateFlowStep:q,childMount:ce,resetFlow:me,handleFlow:ve}=L_(F),Be=z=>{M.value=!0,u.value.allowPreventDefault&&z.preventDefault(),y(z,u.value,!0)};s.onMounted(()=>{D.value=!0,te(),globalThis.addEventListener("resize",te);const z=_r(k);z&&!a.value.enabled&&!l.value.enabled&&p("menuFocused",!0),z&&(z.addEventListener("pointerdown",Be),z.addEventListener("mousedown",Be)),document.addEventListener("mousedown",J)}),s.onUnmounted(()=>{globalThis.removeEventListener("resize",te),document.removeEventListener("mousedown",J);const z=_r(k);z&&(z.removeEventListener("pointerdown",Be),z.removeEventListener("mousedown",Be))});const te=()=>{const z=_r(C);z&&(U.value=z.getBoundingClientRect().width)},V=s.computed(()=>o.monthPicker?qD:o.yearPicker?JD:o.timePicker?cO:o.quarterPicker?IO:FO),Y=()=>{const z=_r(k);z&&z.focus({preventScroll:!0})},x=s.computed(()=>F.value?.getSidebarProps()||{}),Q=VA(A,xA.ActionRow),P=VA(A,xA.PassTrough),T=s.computed(()=>({dp__menu_disabled:o.disabled,dp__menu_readonly:o.readonly,"dp-menu-loading":o.loading})),S=s.computed(()=>({dp__menu:!0,dp__menu_index:!l.value.enabled,dp__relative:l.value.enabled,...d.value.menu})),G=z=>{y(z,u.value,!0)},Ae=z=>{u.value.escClose&&(r("close-picker"),v(z,u.value))},ne=z=>{o.arrowNavigation||(z===SA.left||z===SA.up?de("handleArrow",SA.left,0,z===SA.up):de("handleArrow",SA.right,0,z===SA.down))},ee=z=>{p("shiftKeyInMenu",z.shiftKey),!o.hideMonthYearSelect&&z.code===Nt.tab&&z.target.classList.contains("dp__menu")&&i.shiftKeyInMenu&&(z.preventDefault(),y(z,u.value,!0),r("close-picker"))},re=z=>{F.value?.toggleTimePicker(!1,!1),F.value?.toggleMonthPicker(!1,!1,z),F.value?.toggleYearPicker(!1,!1,z)},pe=(z,le=0)=>z==="month"?F.value?.toggleMonthPicker(!1,!0,le):z==="year"?F.value?.toggleYearPicker(!1,!0,le):z==="time"?F.value?.toggleTimePicker(!0,!1):re(le),de=(z,...le)=>{F.value?.[z]&&F.value?.[z](...le)},Ce=()=>{de("selectCurrentDate")},W=z=>{de("presetDate",s.toValue(z))},j=()=>{de("clearHoverDate")},$=(z,le)=>{de("updateMonthYear",z,le)},N=(z,le)=>{z.preventDefault(),ne(le)},R=z=>{if(ee(z),z.key===Nt.home||z.key===Nt.end)return de("selectWeekDate",z.key===Nt.home,z.target.getAttribute("id"));switch((z.key===Nt.pageUp||z.key===Nt.pageDown)&&(z.shiftKey?(de("changeYear",z.key===Nt.pageUp),B(k.value,"overlay-year")?.focus()):(de("changeMonth",z.key===Nt.pageUp),B(k.value,z.key===Nt.pageUp?"action-prev":"action-next")?.focus()),z.target.getAttribute("id")&&k.value?.focus({preventScroll:!0})),z.key){case Nt.esc:return Ae(z);case Nt.arrowLeft:return N(z,SA.left);case Nt.arrowRight:return N(z,SA.right);case Nt.arrowUp:return N(z,SA.up);case Nt.arrowDown:return N(z,SA.down);default:return}},J=z=>{l.value.enabled&&!l.value.input&&!k.value?.contains(z.target)&&M.value&&(M.value=!1,r("menu-blur"))};return e({updateMonthYear:$,switchView:pe,onValueCleared:()=>{F.value?.setStartTime?.()},handleFlow:ve}),(z,le)=>(s.openBlock(),s.createElementBlock("div",{id:s.unref(o).menuId,ref:"dp-menu",tabindex:s.unref(l).enabled?void 0:"0",role:s.unref(l).enabled?void 0:"dialog","aria-label":s.unref(h)?.menu,class:s.normalizeClass(S.value),onMouseleave:j,onClick:G,onKeydown:R},[(s.unref(o).disabled||s.unref(o).readonly)&&s.unref(l).enabled||s.unref(o).loading?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(T.value)},[s.unref(o).loading?(s.openBlock(),s.createElementBlock("div",_O,[...le[5]||(le[5]=[s.createElementVNode("span",{class:"dp--menu-loader"},null,-1)])])):s.createCommentVNode("",!0)],2)):s.createCommentVNode("",!0),z.$slots["menu-header"]?(s.openBlock(),s.createElementBlock("div",DO,[s.renderSlot(z.$slots,"menu-header")])):s.createCommentVNode("",!0),s.renderSlot(z.$slots,"arrow"),s.createElementVNode("div",{ref:"inner-menu",class:s.normalizeClass({dp__menu_content_wrapper:s.unref(o).presetDates?.length||!!z.$slots["left-sidebar"]||!!z.$slots["right-sidebar"],"dp--menu-content-wrapper-collapsed":t.collapse&&(s.unref(o).presetDates?.length||!!z.$slots["left-sidebar"]||!!z.$slots["right-sidebar"])}),"data-dp-mobile":s.unref(m),style:s.normalizeStyle({"--dp-menu-width":`${U.value}px`})},[z.$slots["left-sidebar"]?(s.openBlock(),s.createElementBlock("div",NO,[s.renderSlot(z.$slots,"left-sidebar",s.normalizeProps(s.guardReactiveProps(x.value)))])):s.createCommentVNode("",!0),s.unref(o).presetDates.length?(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass({"dp--preset-dates-collapsed":t.collapse,"dp--preset-dates":!0}),"data-dp-mobile":s.unref(m)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(o).presetDates,(E,_)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:_},[E.slot?s.renderSlot(z.$slots,E.slot,{key:0,presetDate:W,label:E.label,value:E.value}):(s.openBlock(),s.createElementBlock("button",{key:1,type:"button",style:s.normalizeStyle(E.style||{}),class:s.normalizeClass(["dp__btn dp--preset-range",{"dp--preset-range-collapsed":t.collapse}]),"data-test-id":E.testId??void 0,"data-dp-mobile":s.unref(m),onClick:s.withModifiers(O=>W(E.value),["prevent"]),onKeydown:O=>s.unref(w)(O,()=>W(E.value),!0)},s.toDisplayString(E.label),47,RO))],64))),128))],10,LO)):s.createCommentVNode("",!0),s.createElementVNode("div",HO,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(V.value),{ref:"dyn-cmp","flow-step":s.unref(K),collapse:t.collapse,"no-overlay-focus":t.noOverlayFocus,"menu-wrap-ref":k.value,onMount:s.unref(ce),onUpdateFlowStep:s.unref(q),onResetFlow:s.unref(me),onFocusMenu:Y,onSelectDate:le[0]||(le[0]=E=>z.$emit("select-date")),onAutoApply:le[1]||(le[1]=E=>z.$emit("auto-apply",E)),onTimeUpdate:le[2]||(le[2]=E=>z.$emit("time-update"))},s.createSlots({_:2},[s.renderList(s.unref(P),(E,_)=>({name:E,fn:s.withCtx(O=>[s.renderSlot(z.$slots,E,s.normalizeProps(s.guardReactiveProps({...O})))])}))]),1064,["flow-step","collapse","no-overlay-focus","menu-wrap-ref","onMount","onUpdateFlowStep","onResetFlow"]))]),z.$slots["right-sidebar"]?(s.openBlock(),s.createElementBlock("div",PO,[s.renderSlot(z.$slots,"right-sidebar",s.normalizeProps(s.guardReactiveProps(x.value)))])):s.createCommentVNode("",!0)],14,OO),z.$slots["action-extra"]?(s.openBlock(),s.createElementBlock("div",$O,[z.$slots["action-extra"]?s.renderSlot(z.$slots,"action-extra",{key:0,selectCurrentDate:Ce}):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),!s.unref(o).autoApply||s.unref(u).keepActionRow?(s.openBlock(),s.createBlock(RD,{key:3,"menu-mount":D.value,"calendar-width":U.value,onClosePicker:le[3]||(le[3]=E=>z.$emit("close-picker")),onSelectDate:le[4]||(le[4]=E=>z.$emit("select-date")),onSelectNow:Ce},s.createSlots({_:2},[s.renderList(s.unref(Q),(E,_)=>({name:E,fn:s.withCtx(O=>[s.renderSlot(z.$slots,E,s.normalizeProps(s.guardReactiveProps(O)))])}))]),1032,["menu-mount","calendar-width"])):s.createCommentVNode("",!0)],42,UO))}}),zO=["data-dp-mobile"],WO=s.defineComponent({__name:"VueDatePicker",setup(t,{expose:e}){const{rootEmit:n,setState:r,inputValue:A,modelValue:i,rootProps:o,defaults:{inline:a,config:l,textInput:u,range:d,multiDates:h,teleport:p,floatingConfig:m}}=pt(),{validateDate:v,isValidTime:B}=Zr(),{menuTransition:y,showTransition:w}=pl(),{isMobile:C}=lu(),{findNextFocusableElement:k,getNumVal:F}=Sn(),U=s.useSlots(),D=s.ref(!1),M=s.ref(a.value.enabled||o.centered),K=s.toRef(o,"modelValue"),q=s.toRef(o,"timezone"),ce=s.useTemplateRef("dp-menu-wrap"),me=s.useTemplateRef("dp-menu"),ve=s.useTemplateRef("input-cmp"),Be=s.useTemplateRef("picker-wrapper"),te=s.useTemplateRef("menu-arrow"),V=s.ref(!1),Y=s.ref(!1),x=s.ref(!1),Q=s.ref(!0),P=ze=>(m.value.arrow&&ze.push(EI({element:m.value.arrow===!0?te:m.value.arrow})),m.value.flip&&ze.push(BI(typeof m.value.flip=="object"?m.value.flip:{})),m.value.shift&&ze.push(wI(typeof m.value.shift=="object"?m.value.shift:{})),ze),{floatingStyles:T,middlewareData:S,placement:G,y:Ae}=kI(ve,ce,{strategy:m.value.strategy,placement:m.value.placement,middleware:P([vI(m.value.offset)]),whileElementsMounted:gI});s.onMounted(()=>{re(o.modelValue),s.nextTick().then(()=>{a.value.enabled||globalThis.addEventListener("resize",J)}),a.value.enabled&&(D.value=!0),globalThis.addEventListener("keyup",z),globalThis.addEventListener("keydown",le)}),s.onUnmounted(()=>{a.value.enabled||globalThis.removeEventListener("resize",J),globalThis.removeEventListener("keyup",z),globalThis.removeEventListener("keydown",le)});const ne=D0(U,o.presetDates),ee=VA(U,xA.Input);s.watch([K,q],()=>{re(K.value)},{deep:!0}),s.watch([G,Ae],()=>{!a.value.enabled&&!o.centered&&Q.value&&(M.value=!1,s.nextTick().then(()=>{Q.value=!1,M.value=!0}))});const{parseExternalModelValue:re,emitModelValue:pe,formatInputValue:de,checkBeforeEmit:Ce}=N_(),W=s.computed(()=>({dp__main:!0,dp__theme_dark:o.dark,dp__theme_light:!o.dark,dp__flex_display:a.value.enabled,"dp--flex-display-collapsed":x.value,dp__flex_display_with_input:a.value.input})),j=s.computed(()=>o.dark?"dp__theme_dark":"dp__theme_light"),$=s.computed(()=>a.value.enabled&&(o.timePicker||o.monthPicker||o.yearPicker||o.quarterPicker)),N=()=>ve.value?.$el?.getBoundingClientRect()??{width:0,left:0,right:0},R=()=>{D.value&&l.value.closeOnScroll&&he()},J=()=>{const ze=me.value?.$el.getBoundingClientRect().width??0;x.value=document.body.offsetWidth<=ze},z=ze=>{ze.key==="Tab"&&!a.value.enabled&&!o.teleport&&l.value.tabOutClosesMenu&&(Be.value.contains(document.activeElement)||he()),Y.value=ze.shiftKey},le=ze=>{Y.value=ze.shiftKey},E=()=>{!o.disabled&&!o.readonly&&(Q.value=!0,D.value=!0,D.value&&n("open"),D.value||ae(),re(o.modelValue))},_=()=>{A.value="",ae(),me.value?.onValueCleared(),ve.value?.setParsedDate(null),n("update:model-value",null),n("cleared"),l.value.closeOnClearValue&&he()},O=()=>{const ze=i.value;return!ze||!Array.isArray(ze)&&v(ze)?!0:Array.isArray(ze)?h.value.enabled||ze.length===2&&v(ze[0])&&v(ze[1])?!0:d.value.partialRange&&!o.timePicker?v(ze[0]):!1:!1},ie=()=>{Ce()&&O()?(pe(),he()):n("invalid-select")},X=ze=>{be(),pe(),l.value.closeOnAutoApply&&!ze&&he()},be=()=>{ve.value&&u.value.enabled&&ve.value.setParsedDate(i.value)},we=(ze=!1)=>{o.autoApply&&B(i.value)&&O()&&(d.value.enabled&&Array.isArray(i.value)?(d.value.partialRange||i.value.length===2)&&X(ze):X(ze))},ae=()=>{u.value.enabled||(i.value=null)},he=(ze=!1)=>{Q.value=!0,ze&&i.value&&l.value.setDateOnMenuClose&&ie(),a.value.enabled||(D.value&&(D.value=!1,r("menuFocused",!1),r("shiftKeyInMenu",!1),n("closed"),A.value&&re(K.value)),ae(),n("blur"))},xe=(ze,gn,Tn=!1)=>{if(!ze){i.value=null;return}const mi=Array.isArray(ze)?ze.every(Ho=>v(Ho)):v(ze),Br=B(ze);mi&&Br?(r("isTextInputDate",!0),i.value=ze,gn?(V.value=Tn,ie(),n("text-submit")):o.autoApply&&we(!0),s.nextTick().then(()=>{r("isTextInputDate",!1)})):n("invalid-date",ze)},Pe=()=>{o.autoApply&&B(i.value)&&pe(),be()},ot=()=>D.value?he():E(),$e=ze=>{i.value=ze},ht=()=>{u.value.enabled&&(r("isInputFocused",!0),de()),n("focus")},Bt=()=>{u.value.enabled&&(r("isInputFocused",!1),re(o.modelValue),V.value&&k(Be.value,Y.value)?.focus()),n("blur")},Et=(ze,gn)=>{me.value&&me.value.updateMonthYear(gn??0,{month:F(ze.month),year:F(ze.year)})},En=ze=>{re(ze??o.modelValue)},Yt=(ze,gn)=>{me.value?.switchView(ze,gn)},Kt=(ze,gn)=>{if(D.value)return l.value.onClickOutside?l.value.onClickOutside(ze,gn):he(!0)},OA=(ze=0)=>{me.value?.handleFlow(ze)},pi=()=>ce;return SM(ce,ze=>Kt(O,ze),{ignore:[ve]}),e({closeMenu:he,selectDate:ie,clearValue:_,openMenu:E,onScroll:R,formatInputValue:de,updateInternalModelValue:$e,setMonthYear:Et,parseModel:En,switchView:Yt,toggleMenu:ot,handleFlow:OA,getDpWrapMenuRef:pi,dpMenuRef:()=>me,dpWrapMenuRef:()=>ce,inputRef:()=>ve}),(ze,gn)=>(s.openBlock(),s.createElementBlock("div",{ref:"picker-wrapper",class:s.normalizeClass(W.value),"data-datepicker-instance":"","data-dp-mobile":s.unref(C)},[s.createVNode(_D,{ref:"input-cmp","is-menu-open":D.value,onClear:_,onOpen:E,onSetInputDate:xe,onSetEmptyDate:s.unref(pe),onSelectDate:ie,onToggle:ot,onClose:he,onFocus:ht,onBlur:Bt,onRealBlur:gn[0]||(gn[0]=Tn=>s.unref(r)("isInputFocused",!1))},s.createSlots({_:2},[s.renderList(s.unref(ee),(Tn,mi)=>({name:Tn,fn:s.withCtx(Br=>[s.renderSlot(ze.$slots,Tn,s.normalizeProps(s.guardReactiveProps(Br)))])}))]),1032,["is-menu-open","onSetEmptyDate"]),s.createVNode(s.Teleport,{to:s.unref(p),disabled:!s.unref(p)},{default:s.withCtx(()=>[s.createElementVNode("div",{ref:"dp-menu-wrap",class:s.normalizeClass({"dp--menu-wrapper":!s.unref(a).enabled,dp__outer_menu_wrap:!0,"dp--centered":s.unref(o).centered}),style:s.normalizeStyle(!s.unref(a).enabled&&!s.unref(o).centered?s.unref(T):void 0)},[s.createVNode(s.Transition,{name:s.unref(y)(s.unref(G).startsWith("top")),css:s.unref(w)&&!s.unref(a).enabled&&!s.unref(o).centered&&M.value},{default:s.withCtx(()=>[D.value&&M.value?(s.openBlock(),s.createBlock(KO,{key:0,ref:"dp-menu",class:s.normalizeClass({[j.value]:!0}),"no-overlay-focus":$.value,collapse:x.value,"get-input-rect":N,onClosePicker:he,onSelectDate:ie,onAutoApply:we,onTimeUpdate:Pe,onMenuBlur:gn[1]||(gn[1]=Tn=>s.unref(n)("blur"))},s.createSlots({_:2},[s.renderList(s.unref(ne),(Tn,mi)=>({name:Tn,fn:s.withCtx(Br=>[s.renderSlot(ze.$slots,Tn,s.normalizeProps(s.guardReactiveProps({...Br})))])})),!s.unref(a).enabled&&!s.unref(o).centered&&s.unref(m).arrow===!0?{name:"arrow",fn:s.withCtx(()=>[s.createElementVNode("div",{ref:"menu-arrow",class:s.normalizeClass({dp__arrow_top:s.unref(G)==="bottom",dp__arrow_bottom:s.unref(G)==="top"}),style:s.normalizeStyle({left:s.unref(S).arrow?.x!=null?`${s.unref(S).arrow.x}px`:"",top:s.unref(S).arrow?.y!=null?`${s.unref(S).arrow.y}px`:""})},null,6)]),key:"0"}:void 0]),1032,["class","no-overlay-focus","collapse"])):s.createCommentVNode("",!0)]),_:3},8,["name","css"])],6)]),_:3},8,["to","disabled"])],10,zO))}}),hu=s.defineComponent({__name:"VueDatePickerRoot",props:s.mergeDefaults({multiCalendars:{type:[Boolean,Number,String,Object]},modelValue:{},modelType:{},dark:{type:Boolean},transitions:{type:[Boolean,Object]},ariaLabels:{},hideNavigation:{},timezone:{},vertical:{type:Boolean},hideMonthYearSelect:{type:Boolean},disableYearSelect:{type:Boolean},yearRange:{},autoApply:{type:Boolean},disabledDates:{type:[Array,Function]},startDate:{},hideOffsetDates:{type:Boolean},noToday:{type:Boolean},allowedDates:{},markers:{},presetDates:{},flow:{},preventMinMaxNavigation:{type:Boolean},reverseYears:{type:Boolean},weekPicker:{type:Boolean},filters:{},arrowNavigation:{type:Boolean},highlight:{type:[Function,Object]},teleport:{type:[String,Boolean]},centered:{type:Boolean},locale:{},weekStart:{},weekNumbers:{type:[Boolean,Object]},dayNames:{type:[Function,Array]},monthPicker:{type:Boolean},yearPicker:{type:Boolean},modelAuto:{type:Boolean},formats:{},multiDates:{type:[Boolean,Object]},minDate:{},maxDate:{},minTime:{},maxTime:{},inputAttrs:{},timeConfig:{},placeholder:{},timePicker:{type:Boolean},range:{type:[Boolean,Object]},menuId:{},disabled:{type:Boolean},readonly:{type:Boolean},inline:{type:[Boolean,Object]},textInput:{type:[Boolean,Object]},sixWeeks:{type:[Boolean,String]},actionRow:{},focusStartDate:{type:Boolean},disabledTimes:{type:[Function,Array]},calendar:{type:Function},config:{},quarterPicker:{type:Boolean},yearFirst:{type:Boolean},loading:{type:Boolean},ui:{},floating:{}},SD),emits:["update:model-value","internal-model-change","text-submit","text-input","open","closed","focus","blur","cleared","flow-step","update-month-year","invalid-select","invalid-fixed-range","invalid-date","tooltip-open","tooltip-close","am-pm-change","range-start","range-end","date-click","overlay-toggle","invalid"],setup(t,{expose:e,emit:n}){const r=n,A=t;__(A,r);const i=s.useSlots(),o=D0(i,A.presetDates),a=s.useTemplateRef("date-picker");return e(FD(a)),(l,u)=>(s.openBlock(),s.createBlock(WO,{ref:"date-picker"},s.createSlots({_:2},[s.renderList(s.unref(o),(d,h)=>({name:d,fn:s.withCtx(p=>[s.renderSlot(l.$slots,d,s.normalizeProps(s.guardReactiveProps(p)))])}))]),1536))}});function ei(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const H0={};function GO(t){H0[t]||(H0[t]=!0,ei(t))}const Ei=typeof window<"u";let Or,ss;if(process.env.NODE_ENV!=="production"){const t=Ei&&window.performance;t&&t.mark&&t.measure&&t.clearMarks&&t.clearMeasures&&(Or=e=>{t.mark(e)},ss=(e,n,r)=>{t.measure(e,n,r),t.clearMarks(n),t.clearMarks(r)})}const YO=/\{([0-9a-zA-Z]+)\}/g;function pu(t,...e){return e.length===1&&kt(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),t.replace(YO,(n,r)=>e.hasOwnProperty(r)?e[r]:"")}const ki=(t,e=!1)=>e?Symbol.for(t):Symbol(t),qO=(t,e,n)=>XO({l:t,k:e,s:n}),XO=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Un=t=>typeof t=="number"&&isFinite(t),JO=t=>Sp(t)==="[object Date]",mu=t=>Sp(t)==="[object RegExp]",gu=t=>St(t)&&Object.keys(t).length===0,_n=Object.assign,jO=Object.create,Lt=(t=null)=>jO(t);let P0;const as=()=>P0||(P0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Lt());function $0(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function K0(t){return t.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ZO(t){return t=t.replace(/(\w+)\s*=\s*"([^"]*)"/g,(r,A,i)=>`${A}="${K0(i)}"`),t=t.replace(/(\w+)\s*=\s*'([^']*)'/g,(r,A,i)=>`${A}='${K0(i)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(t)&&(process.env.NODE_ENV!=="production"&&ei("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."),t=t.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(r=>{t=t.replace(r,"$1javascript:")}),t}const VO=Object.prototype.hasOwnProperty;function FA(t,e){return VO.call(t,e)}const fn=Array.isArray,Xt=t=>typeof t=="function",Le=t=>typeof t=="string",hn=t=>typeof t=="boolean",kt=t=>t!==null&&typeof t=="object",eN=t=>kt(t)&&Xt(t.then)&&Xt(t.catch),z0=Object.prototype.toString,Sp=t=>z0.call(t),St=t=>Sp(t)==="[object Object]",tN=t=>t==null?"":fn(t)||St(t)&&t.toString===z0?JSON.stringify(t,null,2):String(t);function xp(t,e=""){return t.reduce((n,r,A)=>A===0?n+r:n+e+r,"")}const W0=2;function nN(t,e=0,n=t.length){const r=t.split(/\r?\n/);let A=0;const i=[];for(let o=0;o<r.length;o++)if(A+=r[o].length+1,A>=e){for(let a=o-W0;a<=o+W0||n>A;a++){if(a<0||a>=r.length)continue;const l=a+1;i.push(`${l}${" ".repeat(3-String(l).length)}| ${r[a]}`);const u=r[a].length;if(a===o){const d=e-(A-u)+1,h=Math.max(1,n>A?u-d:n-e);i.push(" | "+" ".repeat(d)+"^".repeat(h))}else if(a>o){if(n>A){const d=Math.max(Math.min(n-A,u),1);i.push(" | "+"^".repeat(d))}A+=u+1}}break}return i.join(`
|
|
3
|
-
|
|
4
|
-
`,uN="\u2028",dN="\u2029";function fN(t){const e=t;let n=0,r=1,A=1,i=0;const o=M=>e[M]===cN&&e[M+1]===Zn,a=M=>e[M]===Zn,l=M=>e[M]===dN,u=M=>e[M]===uN,d=M=>o(M)||a(M)||l(M)||u(M),h=()=>n,p=()=>r,m=()=>A,v=()=>i,B=M=>o(M)||l(M)||u(M)?Zn:e[M],y=()=>B(n),w=()=>B(n+i);function C(){return i=0,d(n)&&(r++,A=0),o(n)&&n++,n++,A++,e[n]}function k(){return o(n+i)&&i++,i++,e[n+i]}function F(){n=0,r=1,A=1,i=0}function U(M=0){i=M}function D(){const M=n+i;for(;M!==n;)C();i=0}return{index:h,line:p,column:m,peekOffset:v,charAt:B,currentChar:y,currentPeek:w,next:C,peek:k,reset:F,resetPeek:U,skipToPeek:D}}const Si=void 0,hN=".",G0="'",pN="tokenizer";function mN(t,e={}){const n=e.location!==!1,r=fN(t),A=()=>r.index(),i=()=>AN(r.line(),r.column(),r.index()),o=i(),a=A(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},u=()=>l,{onError:d}=e;function h(E,_,O,...ie){const X=u();if(_.column+=O,_.offset+=O,d){const be=n?Fp(X.startLoc,_):null,we=ia(E,be,{domain:pN,args:ie});d(we)}}function p(E,_,O){E.endLoc=i(),E.currentType=_;const ie={type:_};return n&&(ie.loc=Fp(E.startLoc,E.endLoc)),O!=null&&(ie.value=O),ie}const m=E=>p(E,13);function v(E,_){return E.currentChar()===_?(E.next(),_):(h(et.EXPECTED_TOKEN,i(),0,_),"")}function B(E){let _="";for(;E.currentPeek()===ti||E.currentPeek()===Zn;)_+=E.currentPeek(),E.peek();return _}function y(E){const _=B(E);return E.skipToPeek(),_}function w(E){if(E===Si)return!1;const _=E.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_===95}function C(E){if(E===Si)return!1;const _=E.charCodeAt(0);return _>=48&&_<=57}function k(E,_){const{currentType:O}=_;if(O!==2)return!1;B(E);const ie=w(E.currentPeek());return E.resetPeek(),ie}function F(E,_){const{currentType:O}=_;if(O!==2)return!1;B(E);const ie=E.currentPeek()==="-"?E.peek():E.currentPeek(),X=C(ie);return E.resetPeek(),X}function U(E,_){const{currentType:O}=_;if(O!==2)return!1;B(E);const ie=E.currentPeek()===G0;return E.resetPeek(),ie}function D(E,_){const{currentType:O}=_;if(O!==7)return!1;B(E);const ie=E.currentPeek()===".";return E.resetPeek(),ie}function M(E,_){const{currentType:O}=_;if(O!==8)return!1;B(E);const ie=w(E.currentPeek());return E.resetPeek(),ie}function K(E,_){const{currentType:O}=_;if(!(O===7||O===11))return!1;B(E);const ie=E.currentPeek()===":";return E.resetPeek(),ie}function q(E,_){const{currentType:O}=_;if(O!==9)return!1;const ie=()=>{const be=E.currentPeek();return be==="{"?w(E.peek()):be==="@"||be==="|"||be===":"||be==="."||be===ti||!be?!1:be===Zn?(E.peek(),ie()):me(E,!1)},X=ie();return E.resetPeek(),X}function ce(E){B(E);const _=E.currentPeek()==="|";return E.resetPeek(),_}function me(E,_=!0){const O=(X=!1,be="")=>{const we=E.currentPeek();return we==="{"||we==="@"||!we?X:we==="|"?!(be===ti||be===Zn):we===ti?(E.peek(),O(!0,ti)):we===Zn?(E.peek(),O(!0,Zn)):!0},ie=O();return _&&E.resetPeek(),ie}function ve(E,_){const O=E.currentChar();return O===Si?Si:_(O)?(E.next(),O):null}function Be(E){const _=E.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36}function te(E){return ve(E,Be)}function V(E){const _=E.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36||_===45}function Y(E){return ve(E,V)}function x(E){const _=E.charCodeAt(0);return _>=48&&_<=57}function Q(E){return ve(E,x)}function P(E){const _=E.charCodeAt(0);return _>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102}function T(E){return ve(E,P)}function S(E){let _="",O="";for(;_=Q(E);)O+=_;return O}function G(E){let _="";for(;;){const O=E.currentChar();if(O==="{"||O==="}"||O==="@"||O==="|"||!O)break;if(O===ti||O===Zn)if(me(E))_+=O,E.next();else{if(ce(E))break;_+=O,E.next()}else _+=O,E.next()}return _}function Ae(E){y(E);let _="",O="";for(;_=Y(E);)O+=_;const ie=E.currentChar();if(ie&&ie!=="}"&&ie!==Si&&ie!==ti&&ie!==Zn&&ie!==" "){const X=W(E);return h(et.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,O+X),O+X}return E.currentChar()===Si&&h(et.UNTERMINATED_CLOSING_BRACE,i(),0),O}function ne(E){y(E);let _="";return E.currentChar()==="-"?(E.next(),_+=`-${S(E)}`):_+=S(E),E.currentChar()===Si&&h(et.UNTERMINATED_CLOSING_BRACE,i(),0),_}function ee(E){return E!==G0&&E!==Zn}function re(E){y(E),v(E,"'");let _="",O="";for(;_=ve(E,ee);)_==="\\"?O+=pe(E):O+=_;const ie=E.currentChar();return ie===Zn||ie===Si?(h(et.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),ie===Zn&&(E.next(),v(E,"'")),O):(v(E,"'"),O)}function pe(E){const _=E.currentChar();switch(_){case"\\":case"'":return E.next(),`\\${_}`;case"u":return de(E,_,4);case"U":return de(E,_,6);default:return h(et.UNKNOWN_ESCAPE_SEQUENCE,i(),0,_),""}}function de(E,_,O){v(E,_);let ie="";for(let X=0;X<O;X++){const be=T(E);if(!be){h(et.INVALID_UNICODE_ESCAPE_SEQUENCE,i(),0,`\\${_}${ie}${E.currentChar()}`);break}ie+=be}return`\\${_}${ie}`}function Ce(E){return E!=="{"&&E!=="}"&&E!==ti&&E!==Zn}function W(E){y(E);let _="",O="";for(;_=ve(E,Ce);)O+=_;return O}function j(E){let _="",O="";for(;_=te(E);)O+=_;return O}function $(E){const _=O=>{const ie=E.currentChar();return ie==="{"||ie==="@"||ie==="|"||ie==="("||ie===")"||!ie||ie===ti?O:(O+=ie,E.next(),_(O))};return _("")}function N(E){y(E);const _=v(E,"|");return y(E),_}function R(E,_){let O=null;switch(E.currentChar()){case"{":return _.braceNest>=1&&h(et.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),E.next(),O=p(_,2,"{"),y(E),_.braceNest++,O;case"}":return _.braceNest>0&&_.currentType===2&&h(et.EMPTY_PLACEHOLDER,i(),0),E.next(),O=p(_,3,"}"),_.braceNest--,_.braceNest>0&&y(E),_.inLinked&&_.braceNest===0&&(_.inLinked=!1),O;case"@":return _.braceNest>0&&h(et.UNTERMINATED_CLOSING_BRACE,i(),0),O=J(E,_)||m(_),_.braceNest=0,O;default:{let X=!0,be=!0,we=!0;if(ce(E))return _.braceNest>0&&h(et.UNTERMINATED_CLOSING_BRACE,i(),0),O=p(_,1,N(E)),_.braceNest=0,_.inLinked=!1,O;if(_.braceNest>0&&(_.currentType===4||_.currentType===5||_.currentType===6))return h(et.UNTERMINATED_CLOSING_BRACE,i(),0),_.braceNest=0,z(E,_);if(X=k(E,_))return O=p(_,4,Ae(E)),y(E),O;if(be=F(E,_))return O=p(_,5,ne(E)),y(E),O;if(we=U(E,_))return O=p(_,6,re(E)),y(E),O;if(!X&&!be&&!we)return O=p(_,12,W(E)),h(et.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,O.value),y(E),O;break}}return O}function J(E,_){const{currentType:O}=_;let ie=null;const X=E.currentChar();switch((O===7||O===8||O===11||O===9)&&(X===Zn||X===ti)&&h(et.INVALID_LINKED_FORMAT,i(),0),X){case"@":return E.next(),ie=p(_,7,"@"),_.inLinked=!0,ie;case".":return y(E),E.next(),p(_,8,".");case":":return y(E),E.next(),p(_,9,":");default:return ce(E)?(ie=p(_,1,N(E)),_.braceNest=0,_.inLinked=!1,ie):D(E,_)||K(E,_)?(y(E),J(E,_)):M(E,_)?(y(E),p(_,11,j(E))):q(E,_)?(y(E),X==="{"?R(E,_)||ie:p(_,10,$(E))):(O===7&&h(et.INVALID_LINKED_FORMAT,i(),0),_.braceNest=0,_.inLinked=!1,z(E,_))}}function z(E,_){let O={type:13};if(_.braceNest>0)return R(E,_)||m(_);if(_.inLinked)return J(E,_)||m(_);switch(E.currentChar()){case"{":return R(E,_)||m(_);case"}":return h(et.UNBALANCED_CLOSING_BRACE,i(),0),E.next(),p(_,3,"}");case"@":return J(E,_)||m(_);default:{if(ce(E))return O=p(_,1,N(E)),_.braceNest=0,_.inLinked=!1,O;if(me(E))return p(_,0,G(E));break}}return O}function le(){const{currentType:E,offset:_,startLoc:O,endLoc:ie}=l;return l.lastType=E,l.lastOffset=_,l.lastStartLoc=O,l.lastEndLoc=ie,l.offset=A(),l.startLoc=i(),r.currentChar()===Si?p(l,13):z(r,l)}return{nextToken:le,currentOffset:A,currentPosition:i,context:u}}const gN="parser",vN=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function wN(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function BN(t={}){const e=t.location!==!1,{onError:n}=t;function r(w,C,k,F,...U){const D=w.currentPosition();if(D.offset+=F,D.column+=F,n){const M=e?Fp(k,D):null,K=ia(C,M,{domain:gN,args:U});n(K)}}function A(w,C,k){const F={type:w};return e&&(F.start=C,F.end=C,F.loc={start:k,end:k}),F}function i(w,C,k,F){e&&(w.end=C,w.loc&&(w.loc.end=k))}function o(w,C){const k=w.context(),F=A(3,k.offset,k.startLoc);return F.value=C,i(F,w.currentOffset(),w.currentPosition()),F}function a(w,C){const k=w.context(),{lastOffset:F,lastStartLoc:U}=k,D=A(5,F,U);return D.index=parseInt(C,10),w.nextToken(),i(D,w.currentOffset(),w.currentPosition()),D}function l(w,C){const k=w.context(),{lastOffset:F,lastStartLoc:U}=k,D=A(4,F,U);return D.key=C,w.nextToken(),i(D,w.currentOffset(),w.currentPosition()),D}function u(w,C){const k=w.context(),{lastOffset:F,lastStartLoc:U}=k,D=A(9,F,U);return D.value=C.replace(vN,wN),w.nextToken(),i(D,w.currentOffset(),w.currentPosition()),D}function d(w){const C=w.nextToken(),k=w.context(),{lastOffset:F,lastStartLoc:U}=k,D=A(8,F,U);return C.type!==11?(r(w,et.UNEXPECTED_EMPTY_LINKED_MODIFIER,k.lastStartLoc,0),D.value="",i(D,F,U),{nextConsumeToken:C,node:D}):(C.value==null&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,ni(C)),D.value=C.value||"",i(D,w.currentOffset(),w.currentPosition()),{node:D})}function h(w,C){const k=w.context(),F=A(7,k.offset,k.startLoc);return F.value=C,i(F,w.currentOffset(),w.currentPosition()),F}function p(w){const C=w.context(),k=A(6,C.offset,C.startLoc);let F=w.nextToken();if(F.type===8){const U=d(w);k.modifier=U.node,F=U.nextConsumeToken||w.nextToken()}switch(F.type!==9&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ni(F)),F=w.nextToken(),F.type===2&&(F=w.nextToken()),F.type){case 10:F.value==null&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ni(F)),k.key=h(w,F.value||"");break;case 4:F.value==null&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ni(F)),k.key=l(w,F.value||"");break;case 5:F.value==null&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ni(F)),k.key=a(w,F.value||"");break;case 6:F.value==null&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ni(F)),k.key=u(w,F.value||"");break;default:{r(w,et.UNEXPECTED_EMPTY_LINKED_KEY,C.lastStartLoc,0);const U=w.context(),D=A(7,U.offset,U.startLoc);return D.value="",i(D,U.offset,U.startLoc),k.key=D,i(k,U.offset,U.startLoc),{nextConsumeToken:F,node:k}}}return i(k,w.currentOffset(),w.currentPosition()),{node:k}}function m(w){const C=w.context(),k=C.currentType===1?w.currentOffset():C.offset,F=C.currentType===1?C.endLoc:C.startLoc,U=A(2,k,F);U.items=[];let D=null;do{const q=D||w.nextToken();switch(D=null,q.type){case 0:q.value==null&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ni(q)),U.items.push(o(w,q.value||""));break;case 5:q.value==null&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ni(q)),U.items.push(a(w,q.value||""));break;case 4:q.value==null&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ni(q)),U.items.push(l(w,q.value||""));break;case 6:q.value==null&&r(w,et.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,ni(q)),U.items.push(u(w,q.value||""));break;case 7:{const ce=p(w);U.items.push(ce.node),D=ce.nextConsumeToken||null;break}}}while(C.currentType!==13&&C.currentType!==1);const M=C.currentType===1?C.lastOffset:w.currentOffset(),K=C.currentType===1?C.lastEndLoc:w.currentPosition();return i(U,M,K),U}function v(w,C,k,F){const U=w.context();let D=F.items.length===0;const M=A(1,C,k);M.cases=[],M.cases.push(F);do{const K=m(w);D||(D=K.items.length===0),M.cases.push(K)}while(U.currentType!==13);return D&&r(w,et.MUST_HAVE_MESSAGES_IN_PLURAL,k,0),i(M,w.currentOffset(),w.currentPosition()),M}function B(w){const C=w.context(),{offset:k,startLoc:F}=C,U=m(w);return C.currentType===13?U:v(w,k,F,U)}function y(w){const C=mN(w,_n({},t)),k=C.context(),F=A(0,k.offset,k.startLoc);return e&&F.loc&&(F.loc.source=w),F.body=B(C),t.onCacheKey&&(F.cacheKey=t.onCacheKey(w)),k.currentType!==13&&r(C,et.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,w[k.offset]||""),i(F,C.currentOffset(),C.currentPosition()),F}return{parse:y}}function ni(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function yN(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function Y0(t,e){for(let n=0;n<t.length;n++)Qp(t[n],e)}function Qp(t,e){switch(t.type){case 1:Y0(t.cases,e),e.helper("plural");break;case 2:Y0(t.items,e);break;case 6:{Qp(t.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function CN(t,e={}){const n=yN(t);n.helper("normalize"),t.body&&Qp(t.body,n);const r=n.context();t.helpers=Array.from(r.helpers)}function bN(t){const e=t.body;return e.type===2?q0(e):e.cases.forEach(n=>q0(n)),t}function q0(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;n<t.items.length;n++){const r=t.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;e.push(r.value)}if(e.length===t.items.length){t.static=xp(e);for(let n=0;n<t.items.length;n++){const r=t.items[n];(r.type===3||r.type===9)&&delete r.value}}}}const EN="minifier";function oa(t){switch(t.t=t.type,t.type){case 0:{const e=t;oa(e.body),e.b=e.body,delete e.body;break}case 1:{const e=t,n=e.cases;for(let r=0;r<n.length;r++)oa(n[r]);e.c=n,delete e.cases;break}case 2:{const e=t,n=e.items;for(let r=0;r<n.length;r++)oa(n[r]);e.i=n,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=t;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=t;oa(e.key),e.k=e.key,delete e.key,e.modifier&&(oa(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=t;e.i=e.index,delete e.index;break}case 4:{const e=t;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw ia(et.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:EN,args:[t.type]})}delete t.type}const kN="parser";function SN(t,e){const{filename:n,breakLineCode:r,needIndent:A}=e,i=e.location!==!1,o={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:A,indentLevel:0};i&&t.loc&&(o.source=t.loc.source);const a=()=>o;function l(B,y){o.code+=B}function u(B,y=!0){const w=y?r:"";l(A?w+" ".repeat(B):w)}function d(B=!0){const y=++o.indentLevel;B&&u(y)}function h(B=!0){const y=--o.indentLevel;B&&u(y)}function p(){u(o.indentLevel)}return{context:a,push:l,indent:d,deindent:h,newline:p,helper:B=>`_${B}`,needIndent:()=>o.needIndent}}function xN(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),sa(t,e.key),e.modifier?(t.push(", "),sa(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function FN(t,e){const{helper:n,needIndent:r}=t;t.push(`${n("normalize")}([`),t.indent(r());const A=e.items.length;for(let i=0;i<A&&(sa(t,e.items[i]),i!==A-1);i++)t.push(", ");t.deindent(r()),t.push("])")}function QN(t,e){const{helper:n,needIndent:r}=t;if(e.cases.length>1){t.push(`${n("plural")}([`),t.indent(r());const A=e.cases.length;for(let i=0;i<A&&(sa(t,e.cases[i]),i!==A-1);i++)t.push(", ");t.deindent(r()),t.push("])")}}function TN(t,e){e.body?sa(t,e.body):t.push("null")}function sa(t,e){const{helper:n}=t;switch(e.type){case 0:TN(t,e);break;case 1:QN(t,e);break;case 2:FN(t,e);break;case 6:xN(t,e);break;case 8:t.push(JSON.stringify(e.value),e);break;case 7:t.push(JSON.stringify(e.value),e);break;case 5:t.push(`${n("interpolate")}(${n("list")}(${e.index}))`,e);break;case 4:t.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:t.push(JSON.stringify(e.value),e);break;case 3:t.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw ia(et.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:kN,args:[e.type]})}}const MN=(t,e={})=>{const n=Le(e.mode)?e.mode:"normal",r=Le(e.filename)?e.filename:"message.intl";e.sourceMap;const A=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":`
|
|
5
|
-
`,i=e.needIndent?e.needIndent:n!=="arrow",o=t.helpers||[],a=SN(t,{filename:r,breakLineCode:A,needIndent:i});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(i),o.length>0&&(a.push(`const { ${xp(o.map(d=>`${d}: _${d}`),", ")} } = ctx`),a.newline()),a.push("return "),sa(a,t),a.deindent(i),a.push("}"),delete t.helpers;const{code:l,map:u}=a.context();return{ast:t,code:l,map:u?u.toJSON():void 0}};function IN(t,e={}){const n=_n({},e),r=!!n.jit,A=!!n.minify,i=n.optimize==null?!0:n.optimize,a=BN(n).parse(t);return r?(i&&bN(a),A&&oa(a),{ast:a,code:""}):(CN(a,n),MN(a,n))}function UN(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(as().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(as().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function QA(t){return kt(t)&&Tp(t)===0&&(FA(t,"b")||FA(t,"body"))}const X0=["b","body"];function _N(t){return oo(t,X0)}const J0=["c","cases"];function DN(t){return oo(t,J0,[])}const j0=["s","static"];function ON(t){return oo(t,j0)}const Z0=["i","items"];function NN(t){return oo(t,Z0,[])}const V0=["t","type"];function Tp(t){return oo(t,V0)}const ey=["v","value"];function Bu(t,e){const n=oo(t,ey);if(n!=null)return n;throw yl(e)}const ty=["m","modifier"];function LN(t){return oo(t,ty)}const ny=["k","key"];function RN(t){const e=oo(t,ny);if(e)return e;throw yl(6)}function oo(t,e,n){for(let r=0;r<e.length;r++){const A=e[r];if(FA(t,A)&&t[A]!=null)return t[A]}return n}const ry=[...X0,...J0,...j0,...Z0,...ny,...ty,...ey,...V0];function yl(t){return new Error(`unhandled node type: ${t}`)}function Mp(t){return n=>HN(n,t)}function HN(t,e){const n=_N(e);if(n==null)throw yl(0);if(Tp(n)===1){const i=DN(n);return t.plural(i.reduce((o,a)=>[...o,Ay(t,a)],[]))}else return Ay(t,n)}function Ay(t,e){const n=ON(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const r=NN(e).reduce((A,i)=>[...A,Ip(t,i)],[]);return t.normalize(r)}}function Ip(t,e){const n=Tp(e);switch(n){case 3:return Bu(e,n);case 9:return Bu(e,n);case 4:{const r=e;if(FA(r,"k")&&r.k)return t.interpolate(t.named(r.k));if(FA(r,"key")&&r.key)return t.interpolate(t.named(r.key));throw yl(n)}case 5:{const r=e;if(FA(r,"i")&&Un(r.i))return t.interpolate(t.list(r.i));if(FA(r,"index")&&Un(r.index))return t.interpolate(t.list(r.index));throw yl(n)}case 6:{const r=e,A=LN(r),i=RN(r);return t.linked(Ip(t,i),A?Ip(t,A):void 0,t.type)}case 7:return Bu(e,n);case 8:return Bu(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const PN="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function $N(t,e){e&&lN(t)&&ei(pu(PN,{source:t}))}const KN=t=>t;let yu=Lt();function zN(t,e={}){let n=!1;const r=e.onError||sN;return e.onError=A=>{n=!0,r(A)},{...IN(t,e),detectError:n}}function WN(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Le(t)){const n=hn(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&$N(t,n);const A=(e.onCacheKey||KN)(t),i=yu[A];if(i)return i;const{ast:o,detectError:a}=zN(t,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),l=Mp(o);return a?l:yu[A]=l}else{if(process.env.NODE_ENV!=="production"&&!QA(t))return ei(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),(()=>t);const n=t.cacheKey;if(n){const r=yu[n];return r||(yu[n]=Mp(t))}else return Mp(t)}}let Cl=null;function GN(t){Cl=t}function YN(t,e,n){Cl&&Cl.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const qN=XN("function:translate");function XN(t){return e=>Cl&&Cl.emit(t,e)}const Vn={INVALID_ARGUMENT:iN,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},JN=24;function xi(t){return ia(t,null,process.env.NODE_ENV!=="production"?{messages:jN}:void 0)}const jN={[Vn.INVALID_ARGUMENT]:"Invalid arguments",[Vn.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[Vn.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[Vn.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[Vn.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[Vn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[Vn.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function Up(t,e){return e.locale!=null?iy(e.locale):iy(t.locale)}let _p;function iy(t){if(Le(t))return t;if(Xt(t)){if(t.resolvedOnce&&_p!=null)return _p;if(t.constructor.name==="Function"){const e=t();if(eN(e))throw xi(Vn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return _p=e}else throw xi(Vn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw xi(Vn.NOT_SUPPORT_LOCALE_TYPE)}function ZN(t,e,n){return[...new Set([n,...fn(e)?e:kt(e)?Object.keys(e):Le(e)?[e]:[n]])]}function oy(t,e,n){const r=Le(n)?n:bu,A=t;A.__localeChainCache||(A.__localeChainCache=new Map);let i=A.__localeChainCache.get(r);if(!i){i=[];let o=[n];for(;fn(o);)o=sy(i,o,e);const a=fn(e)||!St(e)?e:e.default?e.default:null;o=Le(a)?[a]:a,fn(o)&&sy(i,o,!1),A.__localeChainCache.set(r,i)}return i}function sy(t,e,n){let r=!0;for(let A=0;A<e.length&&hn(r);A++){const i=e[A];Le(i)&&(r=VN(t,e[A],n))}return r}function VN(t,e,n){let r;const A=e.split("-");do{const i=A.join("-");r=eL(t,i,n),A.splice(-1,1)}while(A.length&&r===!0);return r}function eL(t,e,n){let r=!1;if(!t.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const A=e.replace(/!/g,"");t.push(A),(fn(n)||St(n))&&n[A]&&(r=n[A])}return r}const so=[];so[0]={w:[0],i:[3,0],"[":[4],o:[7]},so[1]={w:[1],".":[2],"[":[4],o:[7]},so[2]={w:[2],i:[3,0],0:[3,0]},so[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},so[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},so[5]={"'":[4,0],o:8,l:[5,0]},so[6]={'"':[4,0],o:8,l:[6,0]};const tL=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function nL(t){return tL.test(t)}function rL(t){const e=t.charCodeAt(0),n=t.charCodeAt(t.length-1);return e===n&&(e===34||e===39)?t.slice(1,-1):t}function AL(t){if(t==null)return"o";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function iL(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:nL(e)?rL(e):"*"+e}function oL(t){const e=[];let n=-1,r=0,A=0,i,o,a,l,u,d,h;const p=[];p[0]=()=>{o===void 0?o=a:o+=a},p[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},p[2]=()=>{p[0](),A++},p[3]=()=>{if(A>0)A--,r=4,p[0]();else{if(A=0,o===void 0||(o=iL(o),o===!1))return!1;p[1]()}};function m(){const v=t[n+1];if(r===5&&v==="'"||r===6&&v==='"')return n++,a="\\"+v,p[0](),!0}for(;r!==null;)if(n++,i=t[n],!(i==="\\"&&m())){if(l=AL(i),h=so[r],u=h[l]||h.l||8,u===8||(r=u[0],u[1]!==void 0&&(d=p[u[1]],d&&(a=i,d()===!1))))return;if(r===7)return e}}const ay=new Map;function sL(t,e){return kt(t)?t[e]:null}function aL(t,e){if(!kt(t))return null;let n=ay.get(e);if(n||(n=oL(e),n&&ay.set(e,n)),!n)return null;const r=n.length;let A=t,i=0;for(;i<r;){const o=n[i];if(ry.includes(o)&&QA(A))return null;const a=A[o];if(a===void 0||Xt(A))return null;A=a,i++}return A}const Er={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},lL=8,cL={[Er.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Er.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Er.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Er.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Er.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Er.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Er.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function ls(t,...e){return pu(cL[t],...e)}const uL="11.2.8",Cu=-1,bu="en-US",Eu="",ly=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function dL(){return{upper:(t,e)=>e==="text"&&Le(t)?t.toUpperCase():e==="vnode"&&kt(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&Le(t)?t.toLowerCase():e==="vnode"&&kt(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&Le(t)?ly(t):e==="vnode"&&kt(t)&&"__v_isVNode"in t?ly(t.children):t}}let cy;function fL(t){cy=t}let uy;function hL(t){uy=t}let dy;function pL(t){dy=t}let fy=null;const mL=t=>{fy=t},gL=()=>fy;let hy=null;const py=t=>{hy=t},vL=()=>hy;let my=0;function wL(t={}){const e=Xt(t.onWarn)?t.onWarn:ei,n=Le(t.version)?t.version:uL,r=Le(t.locale)||Xt(t.locale)?t.locale:bu,A=Xt(r)?bu:r,i=fn(t.fallbackLocale)||St(t.fallbackLocale)||Le(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:A,o=St(t.messages)?t.messages:Dp(A),a=St(t.datetimeFormats)?t.datetimeFormats:Dp(A),l=St(t.numberFormats)?t.numberFormats:Dp(A),u=_n(Lt(),t.modifiers,dL()),d=t.pluralRules||Lt(),h=Xt(t.missing)?t.missing:null,p=hn(t.missingWarn)||mu(t.missingWarn)?t.missingWarn:!0,m=hn(t.fallbackWarn)||mu(t.fallbackWarn)?t.fallbackWarn:!0,v=!!t.fallbackFormat,B=!!t.unresolving,y=Xt(t.postTranslation)?t.postTranslation:null,w=St(t.processor)?t.processor:null,C=hn(t.warnHtmlMessage)?t.warnHtmlMessage:!0,k=!!t.escapeParameter,F=Xt(t.messageCompiler)?t.messageCompiler:cy;process.env.NODE_ENV!=="production"&&Xt(t.messageCompiler)&&GO(ls(Er.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const U=Xt(t.messageResolver)?t.messageResolver:uy||sL,D=Xt(t.localeFallbacker)?t.localeFallbacker:dy||ZN,M=kt(t.fallbackContext)?t.fallbackContext:void 0,K=t,q=kt(K.__datetimeFormatters)?K.__datetimeFormatters:new Map,ce=kt(K.__numberFormatters)?K.__numberFormatters:new Map,me=kt(K.__meta)?K.__meta:{};my++;const ve={version:n,cid:my,locale:r,fallbackLocale:i,messages:o,modifiers:u,pluralRules:d,missing:h,missingWarn:p,fallbackWarn:m,fallbackFormat:v,unresolving:B,postTranslation:y,processor:w,warnHtmlMessage:C,escapeParameter:k,messageCompiler:F,messageResolver:U,localeFallbacker:D,fallbackContext:M,onWarn:e,__meta:me};return ve.datetimeFormats=a,ve.numberFormats=l,ve.__datetimeFormatters=q,ve.__numberFormatters=ce,process.env.NODE_ENV!=="production"&&(ve.__v_emitter=K.__v_emitter!=null?K.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&YN(ve,n,me),ve}const Dp=t=>({[t]:Lt()});function ku(t,e){return t instanceof RegExp?t.test(e):t}function gy(t,e){return t instanceof RegExp?t.test(e):t}function Op(t,e,n,r,A){const{missing:i,onWarn:o}=t;if(process.env.NODE_ENV!=="production"){const a=t.__v_emitter;a&&a.emit("missing",{locale:n,key:e,type:A,groupId:`${A}:${e}`})}if(i!==null){const a=i(t,n,e,A);return Le(a)?a:e}else return process.env.NODE_ENV!=="production"&&gy(r,e)&&o(ls(Er.NOT_FOUND_KEY,{key:e,locale:n})),e}function bl(t,e,n){const r=t;r.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function vy(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function BL(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let r=n+1;r<e.length;r++)if(vy(t,e[r]))return!0;return!1}const wy=typeof Intl<"u",By={dateTimeFormat:wy&&typeof Intl.DateTimeFormat<"u",numberFormat:wy&&typeof Intl.NumberFormat<"u"};function yy(t,...e){const{datetimeFormats:n,unresolving:r,fallbackLocale:A,onWarn:i,localeFallbacker:o}=t,{__datetimeFormatters:a}=t;if(process.env.NODE_ENV!=="production"&&!By.dateTimeFormat)return i(ls(Er.CANNOT_FORMAT_DATE)),Eu;const[l,u,d,h]=Np(...e),p=hn(d.missingWarn)?d.missingWarn:t.missingWarn,m=hn(d.fallbackWarn)?d.fallbackWarn:t.fallbackWarn,v=!!d.part,B=Up(t,d),y=o(t,A,B);if(!Le(l)||l==="")return new Intl.DateTimeFormat(B,h).format(u);let w={},C,k=null,F=B,U=null;const D="datetime format";for(let q=0;q<y.length;q++){if(C=U=y[q],process.env.NODE_ENV!=="production"&&B!==C&&ku(m,l)&&i(ls(Er.FALLBACK_TO_DATE_FORMAT,{key:l,target:C})),process.env.NODE_ENV!=="production"&&B!==C){const ce=t.__v_emitter;ce&&ce.emit("fallback",{type:D,key:l,from:F,to:U,groupId:`${D}:${l}`})}if(w=n[C]||{},k=w[l],St(k))break;Op(t,l,C,p,D),F=U}if(!St(k)||!Le(C))return r?Cu:l;let M=`${C}__${l}`;gu(h)||(M=`${M}__${JSON.stringify(h)}`);let K=a.get(M);return K||(K=new Intl.DateTimeFormat(C,_n({},k,h)),a.set(M,K)),v?K.formatToParts(u):K.format(u)}const Cy=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Np(...t){const[e,n,r,A]=t,i=Lt();let o=Lt(),a;if(Le(e)){const l=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw xi(Vn.INVALID_ISO_DATE_ARGUMENT);const u=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();a=new Date(u);try{a.toISOString()}catch{throw xi(Vn.INVALID_ISO_DATE_ARGUMENT)}}else if(JO(e)){if(isNaN(e.getTime()))throw xi(Vn.INVALID_DATE_ARGUMENT);a=e}else if(Un(e))a=e;else throw xi(Vn.INVALID_ARGUMENT);return Le(n)?i.key=n:St(n)&&Object.keys(n).forEach(l=>{Cy.includes(l)?o[l]=n[l]:i[l]=n[l]}),Le(r)?i.locale=r:St(r)&&(o=r),St(A)&&(o=A),[i.key||"",a,i,o]}function by(t,e,n){const r=t;for(const A in n){const i=`${e}__${A}`;r.__datetimeFormatters.has(i)&&r.__datetimeFormatters.delete(i)}}function Ey(t,...e){const{numberFormats:n,unresolving:r,fallbackLocale:A,onWarn:i,localeFallbacker:o}=t,{__numberFormatters:a}=t;if(process.env.NODE_ENV!=="production"&&!By.numberFormat)return i(ls(Er.CANNOT_FORMAT_NUMBER)),Eu;const[l,u,d,h]=Lp(...e),p=hn(d.missingWarn)?d.missingWarn:t.missingWarn,m=hn(d.fallbackWarn)?d.fallbackWarn:t.fallbackWarn,v=!!d.part,B=Up(t,d),y=o(t,A,B);if(!Le(l)||l==="")return new Intl.NumberFormat(B,h).format(u);let w={},C,k=null,F=B,U=null;const D="number format";for(let q=0;q<y.length;q++){if(C=U=y[q],process.env.NODE_ENV!=="production"&&B!==C&&ku(m,l)&&i(ls(Er.FALLBACK_TO_NUMBER_FORMAT,{key:l,target:C})),process.env.NODE_ENV!=="production"&&B!==C){const ce=t.__v_emitter;ce&&ce.emit("fallback",{type:D,key:l,from:F,to:U,groupId:`${D}:${l}`})}if(w=n[C]||{},k=w[l],St(k))break;Op(t,l,C,p,D),F=U}if(!St(k)||!Le(C))return r?Cu:l;let M=`${C}__${l}`;gu(h)||(M=`${M}__${JSON.stringify(h)}`);let K=a.get(M);return K||(K=new Intl.NumberFormat(C,_n({},k,h)),a.set(M,K)),v?K.formatToParts(u):K.format(u)}const ky=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Lp(...t){const[e,n,r,A]=t,i=Lt();let o=Lt();if(!Un(e))throw xi(Vn.INVALID_ARGUMENT);const a=e;return Le(n)?i.key=n:St(n)&&Object.keys(n).forEach(l=>{ky.includes(l)?o[l]=n[l]:i[l]=n[l]}),Le(r)?i.locale=r:St(r)&&(o=r),St(A)&&(o=A),[i.key||"",a,i,o]}function Sy(t,e,n){const r=t;for(const A in n){const i=`${e}__${A}`;r.__numberFormatters.has(i)&&r.__numberFormatters.delete(i)}}const yL=t=>t,CL=t=>"",bL="text",EL=t=>t.length===0?"":xp(t),kL=tN;function xy(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function SL(t){const e=Un(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Un(t.named.count)||Un(t.named.n))?Un(t.named.count)?t.named.count:Un(t.named.n)?t.named.n:e:e}function xL(t,e){e.count||(e.count=t),e.n||(e.n=t)}function FL(t={}){const e=t.locale,n=SL(t),r=kt(t.pluralRules)&&Le(e)&&Xt(t.pluralRules[e])?t.pluralRules[e]:xy,A=kt(t.pluralRules)&&Le(e)&&Xt(t.pluralRules[e])?xy:void 0,i=w=>w[r(n,w.length,A)],o=t.list||[],a=w=>o[w],l=t.named||Lt();Un(t.pluralIndex)&&xL(n,l);const u=w=>l[w];function d(w,C){const k=Xt(t.messages)?t.messages(w,!!C):kt(t.messages)?t.messages[w]:!1;return k||(t.parent?t.parent.message(w):CL)}const h=w=>t.modifiers?t.modifiers[w]:yL,p=St(t.processor)&&Xt(t.processor.normalize)?t.processor.normalize:EL,m=St(t.processor)&&Xt(t.processor.interpolate)?t.processor.interpolate:kL,v=St(t.processor)&&Le(t.processor.type)?t.processor.type:bL,y={list:a,named:u,plural:i,linked:(w,...C)=>{const[k,F]=C;let U="text",D="";C.length===1?kt(k)?(D=k.modifier||D,U=k.type||U):Le(k)&&(D=k||D):C.length===2&&(Le(k)&&(D=k||D),Le(F)&&(U=F||U));const M=d(w,!0)(y),K=U==="vnode"&&fn(M)&&D?M[0]:M;return D?h(D)(K,U):K},message:d,type:v,interpolate:m,normalize:p,values:_n(Lt(),o,l)};return y}const Fy=()=>"",Vr=t=>Xt(t);function Qy(t,...e){const{fallbackFormat:n,postTranslation:r,unresolving:A,messageCompiler:i,fallbackLocale:o,messages:a}=t,[l,u]=Rp(...e),d=hn(u.missingWarn)?u.missingWarn:t.missingWarn,h=hn(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn,p=hn(u.escapeParameter)?u.escapeParameter:t.escapeParameter,m=!!u.resolvedMessage,v=Le(u.default)||hn(u.default)?hn(u.default)?i?l:()=>l:u.default:n?i?l:()=>l:null,B=n||v!=null&&(Le(v)||Xt(v)),y=Up(t,u);p&&QL(u);let[w,C,k]=m?[l,y,a[y]||Lt()]:Ty(t,l,y,o,h,d),F=w,U=l;if(!m&&!(Le(F)||QA(F)||Vr(F))&&B&&(F=v,U=F),!m&&(!(Le(F)||QA(F)||Vr(F))||!Le(C)))return A?Cu:l;if(process.env.NODE_ENV!=="production"&&Le(F)&&t.messageCompiler==null)return ei(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${l}'.`),l;let D=!1;const M=()=>{D=!0},K=Vr(F)?F:My(t,l,C,F,U,M);if(D)return F;const q=UL(t,C,k,u),ce=FL(q),me=TL(t,K,ce);let ve=r?r(me,l):me;if(p&&Le(ve)&&(ve=ZO(ve)),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const Be={timestamp:Date.now(),key:Le(l)?l:Vr(F)?F.key:"",locale:C||(Vr(F)?F.locale:""),format:Le(F)?F:Vr(F)?F.source:"",message:ve};Be.meta=_n({},t.__meta,gL()||{}),qN(Be)}return ve}function QL(t){fn(t.list)?t.list=t.list.map(e=>Le(e)?$0(e):e):kt(t.named)&&Object.keys(t.named).forEach(e=>{Le(t.named[e])&&(t.named[e]=$0(t.named[e]))})}function Ty(t,e,n,r,A,i){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:u}=t,d=u(t,r,n);let h=Lt(),p,m=null,v=n,B=null;const y="translate";for(let w=0;w<d.length;w++){if(p=B=d[w],process.env.NODE_ENV!=="production"&&n!==p&&!vy(n,p)&&ku(A,e)&&a(ls(Er.FALLBACK_TO_TRANSLATE,{key:e,target:p})),process.env.NODE_ENV!=="production"&&n!==p){const U=t.__v_emitter;U&&U.emit("fallback",{type:y,key:e,from:v,to:B,groupId:`${y}:${e}`})}h=o[p]||Lt();let C=null,k,F;if(process.env.NODE_ENV!=="production"&&Ei&&(C=window.performance.now(),k="intlify-message-resolve-start",F="intlify-message-resolve-end",Or&&Or(k)),(m=l(h,e))===null&&(m=h[e]),process.env.NODE_ENV!=="production"&&Ei){const U=window.performance.now(),D=t.__v_emitter;D&&C&&m&&D.emit("message-resolve",{type:"message-resolve",key:e,message:m,time:U-C,groupId:`${y}:${e}`}),k&&F&&Or&&ss&&(Or(F),ss("intlify message resolve",k,F))}if(Le(m)||QA(m)||Vr(m))break;if(!BL(p,d)){const U=Op(t,e,p,i,y);U!==e&&(m=U)}v=B}return[m,p,h]}function My(t,e,n,r,A,i){const{messageCompiler:o,warnHtmlMessage:a}=t;if(Vr(r)){const p=r;return p.locale=p.locale||n,p.key=p.key||e,p}if(o==null){const p=(()=>r);return p.locale=n,p.key=e,p}let l=null,u,d;process.env.NODE_ENV!=="production"&&Ei&&(l=window.performance.now(),u="intlify-message-compilation-start",d="intlify-message-compilation-end",Or&&Or(u));const h=o(r,ML(t,n,A,r,a,i));if(process.env.NODE_ENV!=="production"&&Ei){const p=window.performance.now(),m=t.__v_emitter;m&&l&&m.emit("message-compilation",{type:"message-compilation",message:r,time:p-l,groupId:`translate:${e}`}),u&&d&&Or&&ss&&(Or(d),ss("intlify message compilation",u,d))}return h.locale=n,h.key=e,h.source=r,h}function TL(t,e,n){let r=null,A,i;process.env.NODE_ENV!=="production"&&Ei&&(r=window.performance.now(),A="intlify-message-evaluation-start",i="intlify-message-evaluation-end",Or&&Or(A));const o=e(n);if(process.env.NODE_ENV!=="production"&&Ei){const a=window.performance.now(),l=t.__v_emitter;l&&r&&l.emit("message-evaluation",{type:"message-evaluation",value:o,time:a-r,groupId:`translate:${e.key}`}),A&&i&&Or&&ss&&(Or(i),ss("intlify message evaluation",A,i))}return o}function Rp(...t){const[e,n,r]=t,A=Lt();if(!Le(e)&&!Un(e)&&!Vr(e)&&!QA(e))throw xi(Vn.INVALID_ARGUMENT);const i=Un(e)?String(e):(Vr(e),e);return Un(n)?A.plural=n:Le(n)?A.default=n:St(n)&&!gu(n)?A.named=n:fn(n)&&(A.list=n),Un(r)?A.plural=r:Le(r)?A.default=r:St(r)&&_n(A,r),[i,A]}function ML(t,e,n,r,A,i){return{locale:e,key:n,warnHtmlMessage:A,onError:o=>{if(i&&i(o),process.env.NODE_ENV!=="production"){const a=IL(r),l=`Message compilation error: ${o.message}`,u=o.location&&a&&nN(a,o.location.start.offset,o.location.end.offset),d=t.__v_emitter;d&&a&&d.emit("compile-error",{message:a,error:o.message,start:o.location&&o.location.start.offset,end:o.location&&o.location.end.offset,groupId:`translate:${n}`}),console.error(u?`${l}
|
|
6
|
-
${u}`:l)}else throw o},onCacheKey:o=>qO(e,n,o)}}function IL(t){if(Le(t))return t;if(t.loc&&t.loc.source)return t.loc.source}function UL(t,e,n,r){const{modifiers:A,pluralRules:i,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:u,fallbackContext:d}=t,p={locale:e,modifiers:A,pluralRules:i,messages:(m,v)=>{let B=o(n,m);if(B==null&&(d||v)){const[,,y]=Ty(d||t,m,e,a,l,u);B=o(y,m)}if(Le(B)||QA(B)){let y=!1;const C=My(t,m,e,B,m,()=>{y=!0});return y?Fy:C}else return Vr(B)?B:Fy}};return t.processor&&(p.processor=t.processor),r.list&&(p.list=r.list),r.named&&(p.named=r.named),Un(r.plural)&&(p.pluralIndex=r.plural),p}UN();const _L="11.2.8";function DL(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(as().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(as().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(as().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(as().__INTLIFY_PROD_DEVTOOLS__=!1)}const Pn={UNEXPECTED_RETURN_TYPE:JN,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 El(t,...e){return ia(t,null,process.env.NODE_ENV!=="production"?{messages:OL,args:e}:void 0)}const OL={[Pn.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Pn.INVALID_ARGUMENT]:"Invalid argument",[Pn.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Pn.NOT_INSTALLED]:"Need to install with `app.use` function",[Pn.UNEXPECTED_ERROR]:"Unexpected error",[Pn.REQUIRED_VALUE]:"Required in value: {0}",[Pn.INVALID_VALUE]:"Invalid value",[Pn.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Pn.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Pn.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Pn.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Hp=ki("__translateVNode"),Pp=ki("__datetimeParts"),$p=ki("__numberParts"),Kp=ki("__enableEmitter"),zp=ki("__disableEmitter"),NL=ki("__setPluralRules"),Iy=ki("__injectWithOption"),Wp=ki("__dispose"),ri={FALLBACK_TO_ROOT:lL,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12,DUPLICATE_USE_I18N_CALLING:13},LL={[ri.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[ri.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[ri.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[ri.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
7
|
-
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[ri.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[ri.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function Su(t,...e){return pu(LL[t],...e)}function kl(t){if(!kt(t)||QA(t))return t;for(const e in t)if(FA(t,e))if(!e.includes("."))kt(t[e])&&kl(t[e]);else{const n=e.split("."),r=n.length-1;let A=t,i=!1;for(let o=0;o<r;o++){if(n[o]==="__proto__")throw new Error(`unsafe key: ${n[o]}`);if(n[o]in A||(A[n[o]]=Lt()),!kt(A[n[o]])){process.env.NODE_ENV!=="production"&&ei(Su(ri.IGNORE_OBJ_FLATTEN,{key:n[o]})),i=!0;break}A=A[n[o]]}if(i||(QA(A)?ry.includes(n[r])||delete t[e]:(A[n[r]]=t[e],delete t[e])),!QA(A)){const o=A[n[r]];kt(o)&&kl(o)}}return t}function Uy(t,e){const{messages:n,__i18n:r,messageResolver:A,flatJson:i}=e,o=St(n)?n:fn(r)?Lt():{[t]:Lt()};if(fn(r)&&r.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(o[l]=o[l]||Lt(),wu(u,o[l])):wu(u,o)}else Le(a)&&wu(JSON.parse(a),o)}),A==null&&i)for(const a in o)FA(o,a)&&kl(o[a]);return o}function _y(t){return t.type}function RL(t,e,n){let r=kt(e.messages)?e.messages:Lt();"__i18nGlobal"in n&&(r=Uy(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const A=Object.keys(r);A.length&&A.forEach(i=>{t.mergeLocaleMessage(i,r[i])});{if(kt(e.datetimeFormats)){const i=Object.keys(e.datetimeFormats);i.length&&i.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(kt(e.numberFormats)){const i=Object.keys(e.numberFormats);i.length&&i.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function Dy(t){return s.createVNode(s.Text,null,t,0)}function Gp(){const t="currentInstance";return t in zh?zh[t]:zh.getCurrentInstance()}const Oy="__INTLIFY_META__",Ny=()=>[],HL=()=>!1;let Ly=0;function Ry(t){return((e,n,r,A)=>t(n,r,Gp()||void 0,A))}const PL=()=>{const t=Gp();let e=null;return t&&(e=_y(t)[Oy])?{[Oy]:e}:null};function $L(t={}){const{__root:e,__injectWithOption:n}=t,r=e===void 0,A=t.flatJson,i=Ei?s.ref:s.shallowRef;let o=hn(t.inheritLocale)?t.inheritLocale:!0;const a=i(e&&o?e.locale.value:Le(t.locale)?t.locale:bu),l=i(e&&o?e.fallbackLocale.value:Le(t.fallbackLocale)||fn(t.fallbackLocale)||St(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:a.value),u=i(Uy(a.value,t)),d=i(St(t.datetimeFormats)?t.datetimeFormats:{[a.value]:{}}),h=i(St(t.numberFormats)?t.numberFormats:{[a.value]:{}});let p=e?e.missingWarn:hn(t.missingWarn)||mu(t.missingWarn)?t.missingWarn:!0,m=e?e.fallbackWarn:hn(t.fallbackWarn)||mu(t.fallbackWarn)?t.fallbackWarn:!0,v=e?e.fallbackRoot:hn(t.fallbackRoot)?t.fallbackRoot:!0,B=!!t.fallbackFormat,y=Xt(t.missing)?t.missing:null,w=Xt(t.missing)?Ry(t.missing):null,C=Xt(t.postTranslation)?t.postTranslation:null,k=e?e.warnHtmlMessage:hn(t.warnHtmlMessage)?t.warnHtmlMessage:!0,F=!!t.escapeParameter;const U=e?e.modifiers:St(t.modifiers)?t.modifiers:{};let D=t.pluralRules||e&&e.pluralRules,M;M=(()=>{r&&py(null);const ae={version:_L,locale:a.value,fallbackLocale:l.value,messages:u.value,modifiers:U,pluralRules:D,missing:w===null?void 0:w,missingWarn:p,fallbackWarn:m,fallbackFormat:B,unresolving:!0,postTranslation:C===null?void 0:C,warnHtmlMessage:k,escapeParameter:F,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};ae.datetimeFormats=d.value,ae.numberFormats=h.value,ae.__datetimeFormatters=St(M)?M.__datetimeFormatters:void 0,ae.__numberFormatters=St(M)?M.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(ae.__v_emitter=St(M)?M.__v_emitter:void 0);const he=wL(ae);return r&&py(he),he})(),bl(M,a.value,l.value);function q(){return[a.value,l.value,u.value,d.value,h.value]}const ce=s.computed({get:()=>a.value,set:ae=>{M.locale=ae,a.value=ae}}),me=s.computed({get:()=>l.value,set:ae=>{M.fallbackLocale=ae,l.value=ae,bl(M,a.value,ae)}}),ve=s.computed(()=>u.value),Be=s.computed(()=>d.value),te=s.computed(()=>h.value);function V(){return Xt(C)?C:null}function Y(ae){C=ae,M.postTranslation=ae}function x(){return y}function Q(ae){ae!==null&&(w=Ry(ae)),y=ae,M.missing=w}function P(ae,he){return ae!=="translate"||!he.resolvedMessage}const T=(ae,he,xe,Pe,ot,$e)=>{q();let ht;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(M.fallbackContext=e?vL():void 0),ht=ae(M)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(M.fallbackContext=void 0)}if(xe!=="translate exists"&&Un(ht)&&ht===Cu||xe==="translate exists"&&!ht){const[Bt,Et]=he();if(process.env.NODE_ENV!=="production"&&e&&Le(Bt)&&P(xe,Et)&&(v&&(ku(m,Bt)||gy(p,Bt))&&ei(Su(ri.FALLBACK_TO_ROOT,{key:Bt,type:xe})),process.env.NODE_ENV!=="production")){const{__v_emitter:En}=M;En&&v&&En.emit("fallback",{type:xe,key:Bt,to:"global",groupId:`${xe}:${Bt}`})}return e&&v?Pe(e):ot(Bt)}else{if($e(ht))return ht;throw El(Pn.UNEXPECTED_RETURN_TYPE)}};function S(...ae){return T(he=>Reflect.apply(Qy,null,[he,...ae]),()=>Rp(...ae),"translate",he=>Reflect.apply(he.t,he,[...ae]),he=>he,he=>Le(he))}function G(...ae){const[he,xe,Pe]=ae;if(Pe&&!kt(Pe))throw El(Pn.INVALID_ARGUMENT);return S(he,xe,_n({resolvedMessage:!0},Pe||{}))}function Ae(...ae){return T(he=>Reflect.apply(yy,null,[he,...ae]),()=>Np(...ae),"datetime format",he=>Reflect.apply(he.d,he,[...ae]),()=>Eu,he=>Le(he)||fn(he))}function ne(...ae){return T(he=>Reflect.apply(Ey,null,[he,...ae]),()=>Lp(...ae),"number format",he=>Reflect.apply(he.n,he,[...ae]),()=>Eu,he=>Le(he)||fn(he))}function ee(ae){return ae.map(he=>Le(he)||Un(he)||hn(he)?Dy(String(he)):he)}const pe={normalize:ee,interpolate:ae=>ae,type:"vnode"};function de(...ae){return T(he=>{let xe;const Pe=he;try{Pe.processor=pe,xe=Reflect.apply(Qy,null,[Pe,...ae])}finally{Pe.processor=null}return xe},()=>Rp(...ae),"translate",he=>he[Hp](...ae),he=>[Dy(he)],he=>fn(he))}function Ce(...ae){return T(he=>Reflect.apply(Ey,null,[he,...ae]),()=>Lp(...ae),"number format",he=>he[$p](...ae),Ny,he=>Le(he)||fn(he))}function W(...ae){return T(he=>Reflect.apply(yy,null,[he,...ae]),()=>Np(...ae),"datetime format",he=>he[Pp](...ae),Ny,he=>Le(he)||fn(he))}function j(ae){D=ae,M.pluralRules=D}function $(ae,he){return T(()=>{if(!ae)return!1;const xe=Le(he)?he:a.value,Pe=J(xe),ot=M.messageResolver(Pe,ae);return QA(ot)||Vr(ot)||Le(ot)},()=>[ae],"translate exists",xe=>Reflect.apply(xe.te,xe,[ae,he]),HL,xe=>hn(xe))}function N(ae){let he=null;const xe=oy(M,l.value,a.value);for(let Pe=0;Pe<xe.length;Pe++){const ot=u.value[xe[Pe]]||{},$e=M.messageResolver(ot,ae);if($e!=null){he=$e;break}}return he}function R(ae){const he=N(ae);return he??(e?e.tm(ae)||{}:{})}function J(ae){return u.value[ae]||{}}function z(ae,he){if(A){const xe={[ae]:he};for(const Pe in xe)FA(xe,Pe)&&kl(xe[Pe]);he=xe[ae]}u.value[ae]=he,M.messages=u.value}function le(ae,he){u.value[ae]=u.value[ae]||{};const xe={[ae]:he};if(A)for(const Pe in xe)FA(xe,Pe)&&kl(xe[Pe]);he=xe[ae],wu(he,u.value[ae]),M.messages=u.value}function E(ae){return d.value[ae]||{}}function _(ae,he){d.value[ae]=he,M.datetimeFormats=d.value,by(M,ae,he)}function O(ae,he){d.value[ae]=_n(d.value[ae]||{},he),M.datetimeFormats=d.value,by(M,ae,he)}function ie(ae){return h.value[ae]||{}}function X(ae,he){h.value[ae]=he,M.numberFormats=h.value,Sy(M,ae,he)}function be(ae,he){h.value[ae]=_n(h.value[ae]||{},he),M.numberFormats=h.value,Sy(M,ae,he)}Ly++,e&&Ei&&(s.watch(e.locale,ae=>{o&&(a.value=ae,M.locale=ae,bl(M,a.value,l.value))}),s.watch(e.fallbackLocale,ae=>{o&&(l.value=ae,M.fallbackLocale=ae,bl(M,a.value,l.value))}));const we={id:Ly,locale:ce,fallbackLocale:me,get inheritLocale(){return o},set inheritLocale(ae){o=ae,ae&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,bl(M,a.value,l.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:ve,get modifiers(){return U},get pluralRules(){return D||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(ae){p=ae,M.missingWarn=p},get fallbackWarn(){return m},set fallbackWarn(ae){m=ae,M.fallbackWarn=m},get fallbackRoot(){return v},set fallbackRoot(ae){v=ae},get fallbackFormat(){return B},set fallbackFormat(ae){B=ae,M.fallbackFormat=B},get warnHtmlMessage(){return k},set warnHtmlMessage(ae){k=ae,M.warnHtmlMessage=ae},get escapeParameter(){return F},set escapeParameter(ae){F=ae,M.escapeParameter=ae},t:S,getLocaleMessage:J,setLocaleMessage:z,mergeLocaleMessage:le,getPostTranslationHandler:V,setPostTranslationHandler:Y,getMissingHandler:x,setMissingHandler:Q,[NL]:j};return we.datetimeFormats=Be,we.numberFormats=te,we.rt=G,we.te=$,we.tm=R,we.d=Ae,we.n=ne,we.getDateTimeFormat=E,we.setDateTimeFormat=_,we.mergeDateTimeFormat=O,we.getNumberFormat=ie,we.setNumberFormat=X,we.mergeNumberFormat=be,we[Iy]=n,we[Hp]=de,we[Pp]=W,we[$p]=Ce,process.env.NODE_ENV!=="production"&&(we[Kp]=ae=>{M.__v_emitter=ae},we[zp]=()=>{M.__v_emitter=void 0}),we}function Hy(t,e){}const Yp={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function KL({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,A)=>[...r,...A.type===s.Fragment?A.children:[A]],[]):e.reduce((n,r)=>{const A=t[r];return A&&(n[r]=A()),n},Lt())}function Py(){return s.Fragment}_n({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Un(t)||!isNaN(t)}},Yp);function zL(t){return fn(t)&&!Le(t[0])}function $y(t,e,n,r){const{slots:A,attrs:i}=e;return()=>{const o={part:!0};let a=Lt();t.locale&&(o.locale=t.locale),Le(t.format)?o.key=t.format:kt(t.format)&&(Le(t.format.key)&&(o.key=t.format.key),a=Object.keys(t.format).reduce((p,m)=>n.includes(m)?_n(Lt(),p,{[m]:t.format[m]}):p,Lt()));const l=r(t.value,o,a);let u=[o.key];fn(l)?u=l.map((p,m)=>{const v=A[p.type],B=v?v({[p.type]:p.value,index:m,parts:l}):[p.value];return zL(B)&&(B[0].key=`${p.type}-${m}`),B}):Le(l)&&(u=[l]);const d=_n(Lt(),i),h=Le(t.tag)||kt(t.tag)?t.tag:Py();return s.h(h,d,u)}}_n({value:{type:Number,required:!0},format:{type:[String,Object]}},Yp);const WL=ki("global-vue-i18n");function Sl(t={}){const e=Gp();if(e==null)throw El(Pn.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw El(Pn.NOT_INSTALLED);const n=GL(e),r=qL(n),A=_y(e),i=YL(t,A);if(i==="global")return RL(r,t,A),r;if(i==="parent"){let l=XL(n,e,t.__useComponent);return l==null&&(process.env.NODE_ENV!=="production"&&ei(Su(ri.NOT_FOUND_PARENT_SCOPE)),l=r),l}const o=n;let a=o.__getInstance(e);if(a==null){const l=_n({},t);"__i18n"in A&&(l.__i18n=A.__i18n),r&&(l.__root=r),a=$L(l),o.__composerExtend&&(a[Wp]=o.__composerExtend(a)),jL(o,e,a),o.__setInstance(e,a)}else process.env.NODE_ENV!=="production"&&i==="local"&&ei(Su(ri.DUPLICATE_USE_I18N_CALLING));return a}function GL(t){const e=s.inject(t.isCE?WL:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw El(t.isCE?Pn.NOT_INSTALLED_WITH_PROVIDE:Pn.UNEXPECTED_ERROR);return e}function YL(t,e){return gu(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function qL(t){return t.mode==="composition"?t.global:t.global.__composer}function XL(t,e,n=!1){let r=null;const A=e.root;let i=JL(e,n);for(;i!=null;){const o=t;if(t.mode==="composition")r=o.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(i);a!=null&&(r=a.__composer,n&&r&&!r[Iy]&&(r=null))}if(r!=null||A===i)break;i=i.parent}return r}function JL(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function jL(t,e,n){let r=null;s.onMounted(()=>{if(process.env.NODE_ENV!=="production"){e.__VUE_I18N__=n,r=rN();const A=n;A[Kp]&&A[Kp](r),r.on("*",Hy)}},e),s.onUnmounted(()=>{const A=n;process.env.NODE_ENV!=="production"&&(r&&r.off("*",Hy),A[zp]&&A[zp](),delete e.__VUE_I18N__),t.__deleteInstance(e);const i=A[Wp];i&&(i(),delete A[Wp])},e)}if(_n({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Yp),DL(),fL(WN),hL(aL),pL(oy),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=as();t.__INTLIFY__=!0,GN(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Ky={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},ZL=(t,e,n)=>{let r;const A=n?.addSuffix?Ky[t].withPreposition:Ky[t].standalone;return typeof A=="string"?r=A:e===1?r=A.one:r=A.other.replace("{{count}}",String(e)),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:"vor "+r:r},VL={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},e2={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},t2={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},n2={date:yi({formats:VL,defaultWidth:"full"}),time:yi({formats:e2,defaultWidth:"full"}),dateTime:yi({formats:t2,defaultWidth:"full"})},r2={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},A2=(t,e,n,r)=>r2[t],i2={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},o2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},qp={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},s2={narrow:qp.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:qp.wide},a2={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},l2={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},c2={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},u2={ordinalNumber:t=>Number(t)+".",era:dr({values:i2,defaultWidth:"wide"}),quarter:dr({values:o2,defaultWidth:"wide",argumentCallback:t=>t-1}),month:dr({values:qp,formattingValues:s2,defaultWidth:"wide"}),day:dr({values:a2,defaultWidth:"wide"}),dayPeriod:dr({values:l2,defaultWidth:"wide",formattingValues:c2,defaultFormattingWidth:"wide"})},d2=/^(\d+)(\.)?/i,f2=/\d+/i,h2={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},p2={any:[/^v/i,/^n/i]},m2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},g2={any:[/1/i,/2/i,/3/i,/4/i]},v2={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},w2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},B2={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},y2={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},C2={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},b2={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},E2={ordinalNumber:pp({matchPattern:d2,parsePattern:f2,valueCallback:t=>parseInt(t)}),era:fr({matchPatterns:h2,defaultMatchWidth:"wide",parsePatterns:p2,defaultParseWidth:"any"}),quarter:fr({matchPatterns:m2,defaultMatchWidth:"wide",parsePatterns:g2,defaultParseWidth:"any",valueCallback:t=>t+1}),month:fr({matchPatterns:v2,defaultMatchWidth:"wide",parsePatterns:w2,defaultParseWidth:"any"}),day:fr({matchPatterns:B2,defaultMatchWidth:"wide",parsePatterns:y2,defaultParseWidth:"any"}),dayPeriod:fr({matchPatterns:C2,defaultMatchWidth:"wide",parsePatterns:b2,defaultParseWidth:"any"})},k2={code:"de",formatDistance:ZL,formatLong:n2,formatRelative:A2,localize:u2,match:E2,options:{weekStartsOn:1,firstWeekContainsDate:4}},S2={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},x2=(t,e,n)=>{let r;const A=S2[t];return typeof A=="string"?r=A:e===1?r=A.one:r=A.other.replace("{{count}}",String(e)),n?.addSuffix?n.comparison&&n.comparison>0?"dans "+r:"il y a "+r:r},F2={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},Q2={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},T2={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},M2={date:yi({formats:F2,defaultWidth:"full"}),time:yi({formats:Q2,defaultWidth:"full"}),dateTime:yi({formats:T2,defaultWidth:"full"})},I2={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},U2=(t,e,n,r)=>I2[t],_2={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},D2={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},O2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},N2={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},L2={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},R2=(t,e)=>{const n=Number(t),r=e?.unit;if(n===0)return"0";const A=["year","week","hour","minute","second"];let i;return n===1?i=r&&A.includes(r)?"ère":"er":i="ème",n+i},H2=["MMM","MMMM"],P2={preprocessor:(t,e)=>t.getDate()===1||!e.some(r=>r.isToken&&H2.includes(r.value))?e:e.map(r=>r.isToken&&r.value==="do"?{isToken:!0,value:"d"}:r),ordinalNumber:R2,era:dr({values:_2,defaultWidth:"wide"}),quarter:dr({values:D2,defaultWidth:"wide",argumentCallback:t=>t-1}),month:dr({values:O2,defaultWidth:"wide"}),day:dr({values:N2,defaultWidth:"wide"}),dayPeriod:dr({values:L2,defaultWidth:"wide"})},$2=/^(\d+)(ième|ère|ème|er|e)?/i,K2=/\d+/i,z2={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},W2={any:[/^av/i,/^ap/i]},G2={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},Y2={any:[/1/i,/2/i,/3/i,/4/i]},q2={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},X2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},J2={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},j2={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},Z2={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},V2={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},eR={ordinalNumber:pp({matchPattern:$2,parsePattern:K2,valueCallback:t=>parseInt(t)}),era:fr({matchPatterns:z2,defaultMatchWidth:"wide",parsePatterns:W2,defaultParseWidth:"any"}),quarter:fr({matchPatterns:G2,defaultMatchWidth:"wide",parsePatterns:Y2,defaultParseWidth:"any",valueCallback:t=>t+1}),month:fr({matchPatterns:q2,defaultMatchWidth:"wide",parsePatterns:X2,defaultParseWidth:"any"}),day:fr({matchPatterns:J2,defaultMatchWidth:"wide",parsePatterns:j2,defaultParseWidth:"any"}),dayPeriod:fr({matchPatterns:Z2,defaultMatchWidth:"any",parsePatterns:V2,defaultParseWidth:"any"})},tR={code:"fr",formatDistance:x2,formatLong:M2,formatRelative:U2,localize:P2,match:eR,options:{weekStartsOn:1,firstWeekContainsDate:4}},nR={class:"row"},rR={class:"col-12"},AR=["for","innerHTML"],iR={key:0},oR={class:"input-group justify-content-center"},sR={key:0,class:"row"},aR={class:"col-12 col-md-6"},lR={class:"col-12 col-md-6"},cR={key:1,class:"row"},uR={class:"col-12"},dR=s.defineComponent({__name:"input-datepicker",props:{modelValue:{type:null,default:""},from:{type:[String,Number,Boolean,Date],default:""},to:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"datetime-local"},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},range:{type:Boolean,default:!1},textRange:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},textInput:{type:Boolean,default:!0},picker:{type:Boolean,default:!0},locale:{type:String,default:"en"},utcStore:{type:Boolean,default:!1}},emits:["update:modelValue","update:from","update:to"],setup(t,{emit:e}){const n=t,r=e,{t:A,locale:i}=Sl(),o={en:ou,de:k2,fr:tR},a=s.computed(()=>{const y=n.locale||i.value;return o[y]||ou}),l=s.computed(()=>n.inline||!n.picker?{openMenu:!1,format:a.value}:!0),u=s.computed({get(){if(n.range){let y=n.from||(Array.isArray(n.modelValue)?n.modelValue[0]:null),w=n.to||(Array.isArray(n.modelValue)?n.modelValue[1]:null);return n.utcStore?(y=y?m(y):null,w=w?m(w):null):(y=y?new Date(`${y}Z`).toISOString().replace("Z",""):null,w=w?new Date(`${w}Z`).toISOString().replace("Z",""):null),[...y?[y]:[],...w?[w]:[]]}else{if(n.utcStore){const C=n.modelValue;return C&&m(C)||""}const y=n.modelValue?new Date(`${n.modelValue}Z`):null,w=y&&y.toISOString();return w&&w.replace("Z","")}},set(y){if(n.range&&Array.isArray(y)){let[w,C]=y;n.utcStore?(w=v(w)||null,C=v(C)||null):(w=w&&new Date(w),w?.setUTCHours(w.getHours()),w=w?.toISOString()?.replace("Z",""),C=C&&new Date(C),C?.setUTCHours(C.getHours()),C=C?.toISOString()?.replace("Z","")),r("update:modelValue",[w,C]),r("update:from",w),r("update:to",C)}else if(n.utcStore){const w=v(y);r("update:modelValue",w)}else{const w=y&&new Date(y);w?.setUTCHours(w?.getHours()),y=w&&w.toISOString(),r("update:modelValue",y&&y.replace("Z",""))}}}),d=s.computed({get(){return Array.isArray(u.value)?u.value[0]:u.value},set(y){u.value=Array.isArray(u.value)?[y,u.value[0]]:y}}),h=s.computed({get(){return Array.isArray(u.value)?u.value[1]:u.value},set(y){u.value=Array.isArray(u.value)?[u.value[0],y]:y}});s.watch(()=>[d.value,h.value],(y,w)=>{n.range&&y.some(C=>C===void 0)&&w.every(Boolean)&&(u.value=[])});function p(y){if(!y)return;const w=y.getDate(),C=y.getMonth()+1,k=y.getFullYear(),F=y.getMinutes(),U=y.getHours();switch(a.value){case"de":return`${w}.${C}.${k} ${U<10?"0"+U:U}:${F<10?"0"+F:F}`;case"fr":return`${w}/${C}/${k} ${U<10?"0"+U:U}:${F<10?"0"+F:F}`;default:return`${C}/${w}/${k} ${U<10?"0"+U:U}:${F<10?"0"+F:F}`}}function m(y){if(!y)return null;const w=y instanceof Date?new Date(y):new Date(`${y}Z`),C=w.getFullYear(),k=String(w.getMonth()+1).padStart(2,"0"),F=String(w.getDate()).padStart(2,"0"),U=String(w.getHours()).padStart(2,"0"),D=String(w.getMinutes()).padStart(2,"0"),M=String(w.getSeconds()).padStart(2,"0");return`${C}-${k}-${F}T${U}:${D}:${M}`}function v(y){return y?(y instanceof Date?new Date(y):new Date(String(y))).toISOString().split(".")[0]:null}const B=y=>(Array.isArray(y)?y=y.map(w=>p(w)).join(" - "):y=p(y),y);return(y,w)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["input","input--datepicker"])},[s.renderSlot(y.$slots,"label",{},()=>[s.createElementVNode("div",nR,[s.createElementVNode("div",rR,[t.label?(s.openBlock(),s.createElementBlock("label",{key:0,for:t.id,class:"input__label",innerHTML:s.unref(ur)(`${t.label}${t.required?" *":""}`)},null,8,AR)):s.createCommentVNode("",!0)])])]),t.textInput?(s.openBlock(),s.createElementBlock("div",iR,[s.createElementVNode("div",oR,[s.renderSlot(y.$slots,"input-prepend",{slotScope:"props"}),t.range&&!t.textRange?(s.openBlock(),s.createElementBlock("div",sR,[s.createElementVNode("div",aR,[s.createVNode(s.unref(hu),{uid:`${t.id}-from`,modelValue:d.value,"onUpdate:modelValue":w[0]||(w[0]=C=>d.value=C),locale:a.value,format:B,"text-input":l.value,disabled:t.disabled,"read-only":t.readOnly,required:t.required,"auto-apply":!0},null,8,["uid","modelValue","locale","text-input","disabled","read-only","required"])]),s.createElementVNode("div",lR,[s.createVNode(s.unref(hu),{uid:`${t.id}-to`,modelValue:h.value,"onUpdate:modelValue":w[1]||(w[1]=C=>h.value=C),locale:a.value,format:B,"text-input":l.value,disabled:t.disabled,"read-only":t.readOnly,required:t.required,"auto-apply":!0},null,8,["uid","modelValue","locale","text-input","disabled","read-only","required"])])])):(s.openBlock(),s.createBlock(s.unref(hu),{key:1,uid:`${t.id}-input-to`,modelValue:u.value,"onUpdate:modelValue":w[2]||(w[2]=C=>u.value=C),format:B,locale:a.value,range:t.textRange,"text-input":l.value,disabled:t.disabled,"read-only":t.readOnly,required:t.required,"auto-apply":!0},null,8,["uid","modelValue","locale","range","text-input","disabled","read-only","required"])),s.renderSlot(y.$slots,"input-append",{slotScope:"props"})])])):s.createCommentVNode("",!0),t.inline?(s.openBlock(),s.createElementBlock("div",cR,[s.createElementVNode("div",uR,[s.createVNode(s.unref(hu),{uid:`${t.id}-inline`,modelValue:u.value,"onUpdate:modelValue":w[3]||(w[3]=C=>u.value=C),locale:a.value,cancelText:"abbrechen",selectText:"auswählen",range:t.range,"multi-calendars":t.range,inline:{input:!1},"auto-apply":!0,"partial-range":t.range,"partial-flow":!0,"start-time":{hours:0,minutes:0},class:"justify-content-center",disabled:t.disabled,"read-only":t.readOnly,required:t.required,"month-name-format":"long"},null,8,["uid","modelValue","locale","range","multi-calendars","partial-range","disabled","read-only","required"])])])):s.createCommentVNode("",!0)]))}}),fR={class:"input-group input__input-group"},hR=["onUpdate:modelValue","disabled","readonly","onPaste","onInput","onKeydown"],pR=s.defineComponent({__name:"input-passcode",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},role:{type:String,default:"presentation"},autocomplete:{type:String,default:"off"},passcodeMatch:{type:String,default:""},confirm:{type:Boolean,default:!1},splitInput:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=s.ref([]),r=s.ref([]),A=t,i=e,o=s.computed({get(){return A.modelValue},set(d){(A.passcodeMatch===d||!A.passcodeMatch)&&i("update:modelValue",d)}});s.watch(()=>A.modelValue,d=>{const h=d?.toString()||"";for(r.value=h.split("").slice(0,A.passcodeMatch?.length||6);r.value.length<(A.passcodeMatch?.length||6);)r.value.push("")},{immediate:!0}),s.watch(()=>r.value,d=>{const h=d.join("");(A.passcodeMatch===h||!A.passcodeMatch)&&i("update:modelValue",h)},{deep:!0});const a=(d,h)=>{d.preventDefault();const p=d.clipboardData?.getData("text")||"";console.log("Paste detected:",p);const m=p.split(""),v=A.passcodeMatch?.length||6;m.forEach((y,w)=>{const C=h+w;C<v&&(r.value[C]=y)});const B=Math.min(h+m.length,v-1);setTimeout(()=>n.value[B]?.focus(),0)},l=(d,h)=>{A.passcodeMatch?.length,d.key==="Backspace"&&!r.value[h]&&h>0&&n.value[h-1]?.focus()},u=(d,h)=>{let m=d.target.value;m.length>1&&(m=m.slice(-1)),r.value[h]=m;const v=A.passcodeMatch?.length||6;m&&h<v-1&&setTimeout(()=>n.value[h+1]?.focus(),0)};return(d,h)=>{const p=s.resolveComponent("input-password");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["input","input-passcode"])},[s.createElementVNode("div",fR,[t.splitInput?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(t.passcodeMatch,(m,v)=>s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:v,"onUpdate:modelValue":B=>r.value[v]=B,type:"text",ref_for:!0,ref:B=>n.value[v]=B,maxlength:1,disabled:t.disabled,readonly:t.readOnly,onPaste:B=>a(B,v),onInput:B=>u(B,v),onKeydown:B=>l(B,v),size:"1",class:"form-control text-center"},null,40,hR)),[[s.vModelText,r.value[v]]])),128)):(s.openBlock(),s.createBlock(p,{key:0,modelValue:o.value,"onUpdate:modelValue":h[0]||(h[0]=m=>o.value=m),type:t.type,placeholder:t.placeholder,disabled:t.disabled,readonly:t.readOnly,required:t.required,label:t.label},null,8,["modelValue","type","placeholder","disabled","readonly","required","label"]))])])}}}),mR={class:"input-group input__input-group"},gR=s.defineComponent({__name:"input-password",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},role:{type:String,default:"presentation"},autocomplete:{type:String,default:"off"},password:{type:String,default:""},confirm:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.computed({get(){return n.modelValue},set(i){(n.password===i||!n.password)&&r("update:modelValue",i)}});return(i,o)=>{const a=s.resolveComponent("svg-icon"),l=s.resolveComponent("base-input");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["input","input-password"])},[s.createElementVNode("div",mR,[s.createVNode(l,{modelValue:A.value,"onUpdate:modelValue":o[0]||(o[0]=u=>A.value=u),type:"password",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readOnly,required:t.required,label:t.label},{"input-prepend":s.withCtx(u=>[s.renderSlot(i.$slots,"input-prepend",{slotScope:"props"})]),"input-append":s.withCtx(u=>[s.renderSlot(i.$slots,"input-append",{slotScope:"props"},()=>[t.confirm&&t.modelValue===t.password?(s.openBlock(),s.createBlock(a,{key:0,symbol:"check",class:"ms-2"})):s.createCommentVNode("",!0)])]),_:3},8,["modelValue","placeholder","disabled","readonly","required","label"])])])}}}),vR={class:"check-group"},wR=["id","name","value","disabled","read-only","required"],BR=["for","innerHTML"],yR=s.defineComponent({__name:"check-group",props:{modelValue:{type:null,default:()=>[]},options:{type:Array,required:!0},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e;s.ref([]);const A=s.computed({get(){return n.modelValue},set(o){r("update:modelValue",o)}}),i=s.computed(()=>n.options&&n.options.map(o=>(o=typeof o=="string"?{text:o,value:o}:o,{...o,active:n.modelValue&&n.modelValue.includes(o.value)})));return(o,a)=>(s.openBlock(),s.createElementBlock("div",vR,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value,(l,u)=>(s.openBlock(),s.createElementBlock("div",{key:u,class:"form-check"},[s.withDirectives(s.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":a[0]||(a[0]=d=>A.value=d),id:`${t.id}-${u}`,name:t.name,class:"form-check-input",value:l.value||l,disabled:t.disabled,"read-only":t.readOnly,required:t.required},null,8,wR),[[s.vModelCheckbox,A.value]]),s.createElementVNode("label",{class:"form-check-label",for:`${t.id}-${u}`,innerHTML:l.text},null,8,BR)]))),128))]))}}),CR={class:"input radio-group"},bR=["id","name","value","checked","disabled","read-only","required","onChange"],ER=["for","innerHTML"],kR=["for"],xu=s.defineComponent({__name:"radio-group",props:{modelValue:{type:null},options:{type:Array,default:[]},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},keyOption:{type:null},itemClass:{type:String,default:""}},emits:["change","update:modelValue"],setup(t,{emit:e}){const n=e;function r(A){n("update:modelValue",A)}return(A,i)=>(s.openBlock(),s.createElementBlock("div",CR,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.options,(o,a)=>(s.openBlock(),s.createElementBlock("div",{key:a,class:s.normalizeClass(["form-check",t.itemClass])},[s.createElementVNode("input",{type:"radio",id:`${t.id}-${a}`,name:t.name,class:s.normalizeClass(["form-check-input",`
|
|
8
|
-
${a===t.keyOption||o.key?"form-check-input--key":""}
|
|
9
|
-
${(a===t.keyOption||o.key)&&o.value===t.modelValue?.value?"form-check-input--match":""}
|
|
10
|
-
`]),value:o.value||o,checked:o.value?o.value===t.modelValue?.value:o===t.modelValue,disabled:t.disabled,"read-only":t.readOnly,required:t.required,onChange:l=>r(o)},null,42,bR),s.renderSlot(A.$slots,"option-label",{option:o,index:a},()=>[s.createElementVNode("label",{class:"form-check-label",for:`${t.id}-${a}`,innerHTML:s.unref(ur)(o.text||"")},null,8,ER)])],2))),128)),s.renderSlot(A.$slots,"label",{},()=>[t.label?(s.openBlock(),s.createElementBlock("label",{key:0,for:t.id},s.toDisplayString(t.label),9,kR)):s.createCommentVNode("",!0)])]))}}),SR={class:"radio-buttons"},xR=["for"],FR=s.defineComponent({__name:"radio-buttons",props:{modelValue:{type:null,default:""},options:{type:Array,default:[]},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},keyOption:{type:null},itemClass:{type:String,default:""}},emits:["update:modelValue","update:selection"],setup(t,{emit:e}){const n=t,r=e,A=s.computed({get(){return n.modelValue},set(i){r("update:modelValue",i)}});return(i,o)=>(s.openBlock(),s.createElementBlock("div",SR,[s.createVNode(xu,{modelValue:A.value,"onUpdate:modelValue":o[0]||(o[0]=a=>A.value=a),options:t.options,name:t.name,id:t.id,disabled:t.disabled,required:t.required,class:"d-flex flex-column gap-3 justify-content-center"},{"option-label":s.withCtx(a=>[s.createElementVNode("label",{for:`${t.id}-${a.index}`,class:"d-block btn btn-outline-primary p-3 fw-bold",role:"button"},s.toDisplayString(a.option.text),9,xR)]),_:1},8,["modelValue","options","name","id","disabled","required"])]))}}),QR=["id","name","multiple","accept","disabled"],TR={class:"input__input-group input-group"},MR=["value","id","name","disabled"],IR=["for","disabled"],UR={class:"btn btn-outline-contrast"},_R=["for"],DR=["innerHTML"],OR=s.defineComponent({__name:"input-file",props:{modelValue:{type:Array,default:[]},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String},maxFileSize:{type:Number,default:0},dropzone:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e;function A(l){const u=l.target&&l.target.files;u&&(o.splice(0,o.length),Array.from(u).forEach(d=>{if(n.maxFileSize&&d.size>n.maxFileSize){console.warn(`File ${d.name} exceeds the ${n.maxFileSize} bytes size limit and will not be added.`);return}o.push(d)}))}const i=s.ref(),o=s.reactive([]),a=s.computed(()=>o&&o.map(l=>l.name));return s.watch(()=>n.modelValue,(l,u)=>{l.length===0&&(i.value.value=null)},{deep:!0}),s.watch(()=>o,(l,u)=>{r("update:modelValue",l)},{deep:!0}),(l,u)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["input input-file","input-file--primary"])},[s.createElementVNode("input",{ref_key:"input",ref:i,type:"file",id:t.id,name:t.name,class:"d-none",onChange:A,multiple:t.multiple,accept:t.accept,disabled:t.disabled},null,40,QR),s.createElementVNode("div",TR,[s.renderSlot(l.$slots,"input-prepend"),s.createElementVNode("input",{type:"text",value:a.value,id:t.id,name:t.name,class:"form-control",disabled:t.disabled},null,8,MR),s.renderSlot(l.$slots,"input-append",{},()=>[s.createElementVNode("label",{for:t.id,disabled:t.disabled},[s.renderSlot(l.$slots,"button",{},()=>[s.createElementVNode("span",UR,s.toDisplayString(l.$t("common.selectFile")),1)])],8,IR)])]),s.createElementVNode("label",{for:t.id},[s.renderSlot(l.$slots,"label",{},()=>[s.createElementVNode("span",{class:"input__label",innerHTML:s.unref(ur)(`${t.label}${t.required?" *":""}`)},null,8,DR)])],8,_R)]))}}),NR={key:0,class:"custom-html"},LR=["innerHTML"],RR=s.defineComponent({__name:"custom-html",props:{content:{}},setup(t){const e=s.ref(!1);return s.onMounted(()=>{window!==void 0&&(e.value=!0)}),(n,r)=>e.value?(s.openBlock(),s.createElementBlock("div",NR,[s.renderSlot(n.$slots,"default",{},()=>[s.createElementVNode("div",{class:"custom-html__content",innerHTML:t.content},null,8,LR)])])):s.createCommentVNode("",!0)}}),HR={class:"select-media"},PR=["for"],$R=s.defineComponent({__name:"select-media",props:{modelValue:{type:null,default:""},assets:{type:Array,default:[]},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},emitKey:{type:String,default:"src"}},emits:["update:modelValue","update:selection"],setup(t,{emit:e}){const n=t,r=e,A=s.computed({get(){return n.modelValue},set(i){const o=n.assets.find(a=>a.id===i);r("update:modelValue",n.emitKey?o[n.emitKey]:o),n.emitKey&&n.emitKey!=="id"&&r("update:selection",o.id)}});return(i,o)=>{const a=s.resolveComponent("base-image");return s.openBlock(),s.createElementBlock("div",HR,[s.createVNode(xu,{modelValue:A.value,"onUpdate:modelValue":o[0]||(o[0]=l=>A.value=l),options:t.assets.map(l=>l.id),name:t.name,id:t.id,disabled:t.disabled,required:t.required,class:"d-flex flex-wrap flex-row justify-content-center",itemClass:"col-6 p-2"},{"option-label":s.withCtx(l=>[s.createElementVNode("label",{for:`${t.id}-${l.index}`,class:s.normalizeClass(["w-100",{"is-active":t.assets[l.index].id===A.value}]),role:"button"},[t.assets[l.index].thumbnail?(s.openBlock(),s.createBlock(a,{key:0,src:t.assets[l.index].thumbnail,alt:t.assets[l.index].id},null,8,["src","alt"])):s.createCommentVNode("",!0)],10,PR)]),_:1},8,["modelValue","options","name","id","disabled","required"])])}}});function $n(t){this.content=t}$n.prototype={constructor:$n,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,A=r.find(t),i=r.content.slice();return A==-1?i.push(n||t,e):(i[A+1]=e,n&&(i[A]=n)),new $n(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new $n(n)},addToStart:function(t,e){return new $n([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new $n(n)},addBefore:function(t,e,n){var r=this.remove(e),A=r.content.slice(),i=r.find(t);return A.splice(i==-1?A.length:i,0,e,n),new $n(A)},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=$n.from(t),t.size?new $n(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=$n.from(t),t.size?new $n(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=$n.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}},$n.from=function(t){if(t instanceof $n)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new $n(e)};function zy(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let A=t.child(r),i=e.child(r);if(A==i){n+=A.nodeSize;continue}if(!A.sameMarkup(i))return n;if(A.isText&&A.text!=i.text){for(let o=0;A.text[o]==i.text[o];o++)n++;return n}if(A.content.size||i.content.size){let o=zy(A.content,i.content,n+1);if(o!=null)return o}n+=A.nodeSize}}function Wy(t,e,n,r){for(let A=t.childCount,i=e.childCount;;){if(A==0||i==0)return A==i?null:{a:n,b:r};let o=t.child(--A),a=e.child(--i),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let u=0,d=Math.min(o.text.length,a.text.length);for(;u<d&&o.text[o.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(o.content.size||a.content.size){let u=Wy(o.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class Qe{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,A=0,i){for(let o=0,a=0;a<n;o++){let l=this.content[o],u=a+l.nodeSize;if(u>e&&r(l,A+a,i||null,o)!==!1&&l.content.size){let d=a+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,n-d),r,A+d)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,A){let i="",o=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?A?typeof A=="function"?A(a):A:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(o?o=!1:i+=r),i+=u},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,A=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(A[A.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)A.push(e.content[i]);return new Qe(A,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],A=0;if(n>e)for(let i=0,o=0;o<n;i++){let a=this.content[i],l=o+a.nodeSize;l>e&&((o<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,n-o-1))),r.push(a),A+=a.nodeSize),o=l}return new Qe(r,A)}cutByIndex(e,n){return e==n?Qe.empty:e==0&&n==this.content.length?this:new Qe(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let A=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return A[e]=n,new Qe(A,i)}addToStart(e){return new Qe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Qe(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 A=this.content[n];e(A,r,n),r+=A.nodeSize}}findDiffStart(e,n=0){return zy(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Wy(this,e,n,r)}findIndex(e){if(e==0)return Fu(0,e);if(e==this.size)return Fu(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let A=this.child(n),i=r+A.nodeSize;if(i>=e)return i==e?Fu(n+1,i):Fu(n,r);r=i}}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 Qe.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Qe(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Qe.empty;let n,r=0;for(let A=0;A<e.length;A++){let i=e[A];r+=i.nodeSize,A&&i.isText&&e[A-1].sameMarkup(i)?(n||(n=e.slice(0,A)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new Qe(n||e,r)}static from(e){if(!e)return Qe.empty;if(e instanceof Qe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Qe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Qe.empty=new Qe([],0);const Xp={index:0,offset:0};function Fu(t,e){return Xp.index=t,Xp.offset=e,Xp}function Qu(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(!Qu(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Qu(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Ht=class cB{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let A=0;A<e.length;A++){let i=e[A];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,A));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,A)),n.push(this),r=!0),n&&n.push(i)}}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&&Qu(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 A=r.create(n.attrs);return r.checkAttrs(A.attrs),A}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 cB.none;if(e instanceof cB)return[e];let n=e.slice();return n.sort((r,A)=>r.type.rank-A.type.rank),n}};Ht.none=[];class Tu extends Error{}class De{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=Yy(this.content,e+this.openStart,n);return r&&new De(r,this.openStart,this.openEnd)}removeBetween(e,n){return new De(Gy(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 De.empty;let r=n.openStart||0,A=n.openEnd||0;if(typeof r!="number"||typeof A!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new De(Qe.fromJSON(e,n.content),r,A)}static maxOpen(e,n=!0){let r=0,A=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)A++;return new De(e,r,A)}}De.empty=new De(Qe.empty,0,0);function Gy(t,e,n){let{index:r,offset:A}=t.findIndex(e),i=t.maybeChild(r),{index:o,offset:a}=t.findIndex(n);if(A==e||i.isText){if(a!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(Gy(i.content,e-A-1,n-A-1)))}function Yy(t,e,n,r){let{index:A,offset:i}=t.findIndex(e),o=t.maybeChild(A);if(i==e||o.isText)return r&&!r.canReplace(A,A,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=Yy(o.content,e-i-1,n,o);return a&&t.replaceChild(A,o.copy(a))}function KR(t,e,n){if(n.openStart>t.depth)throw new Tu("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Tu("Inconsistent open depths");return qy(t,e,n,0)}function qy(t,e,n,r){let A=t.index(r),i=t.node(r);if(A==e.index(r)&&r<t.depth-n.openStart){let o=qy(t,e,n,r+1);return i.copy(i.content.replaceChild(A,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,a=o.content;return us(o,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=zR(n,t);return us(i,Jy(t,o,a,e,r))}else return us(i,Mu(t,e,r))}function Xy(t,e){if(!e.type.compatibleContent(t.type))throw new Tu("Cannot join "+e.type.name+" onto "+t.type.name)}function Jp(t,e,n){let r=t.node(n);return Xy(r,e.node(n)),r}function cs(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 xl(t,e,n,r){let A=(e||t).node(n),i=0,o=e?e.index(n):A.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(cs(t.nodeAfter,r),i++));for(let a=i;a<o;a++)cs(A.child(a),r);e&&e.depth==n&&e.textOffset&&cs(e.nodeBefore,r)}function us(t,e){return t.type.checkContent(e),t.copy(e)}function Jy(t,e,n,r,A){let i=t.depth>A&&Jp(t,e,A+1),o=r.depth>A&&Jp(n,r,A+1),a=[];return xl(null,t,A,a),i&&o&&e.index(A)==n.index(A)?(Xy(i,o),cs(us(i,Jy(t,e,n,r,A+1)),a)):(i&&cs(us(i,Mu(t,e,A+1)),a),xl(e,n,A,a),o&&cs(us(o,Mu(n,r,A+1)),a)),xl(r,null,A,a),new Qe(a)}function Mu(t,e,n){let r=[];if(xl(null,t,n,r),t.depth>n){let A=Jp(t,e,n+1);cs(us(A,Mu(t,e,n+1)),r)}return xl(e,null,n,r),new Qe(r)}function zR(t,e){let n=e.depth-t.openStart,A=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)A=e.node(i).copy(Qe.from(A));return{start:A.resolveNoCache(t.openStart+n),end:A.resolveNoCache(A.content.size-t.openEnd-n)}}class Fl{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],A=e.child(n);return r?e.child(n).cut(r):A}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],A=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)A+=r.child(i).nodeSize;return A}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Ht.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),A=e.maybeChild(n);if(!r){let a=r;r=A,A=a}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!A||!i[o].isInSet(A.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,A=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!A||!r[i].isInSet(A.marks))&&(r=r[i--].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 Iu(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=[],A=0,i=n;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(i),u=i-l;if(r.push(o,a,A+l),!u||(o=o.child(a),o.isText))break;i=u-1,A+=l+1}return new Fl(n,r,i)}static resolveCached(e,n){let r=jy.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==n)return o}else jy.set(e,r=new WR);let A=r.elts[r.i]=Fl.resolve(e,n);return r.i=(r.i+1)%GR,A}}class WR{constructor(){this.elts=[],this.i=0}}const GR=12,jy=new WeakMap;class Iu{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 YR=Object.create(null);let ao=class uB{constructor(e,n,r,A=Ht.none){this.type=e,this.attrs=n,this.marks=A,this.content=r||Qe.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,A=0){this.content.nodesBetween(e,n,r,A,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,A){return this.content.textBetween(e,n,r,A)}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&&Qu(this.attrs,n||e.defaultAttrs||YR)&&Ht.sameSet(this.marks,r||Ht.none)}copy(e=null){return e==this.content?this:new uB(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new uB(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 De.empty;let A=this.resolve(e),i=this.resolve(n),o=r?0:A.sharedDepth(n),a=A.start(o),u=A.node(o).content.cut(A.pos-a,i.pos-a);return new De(u,A.depth-o,i.depth-o)}replace(e,n,r){return KR(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:A}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(A==e||n.isText)return n;e-=A+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 A=this.content.child(n-1);return{node:A,index:n-1,offset:r-A.nodeSize}}resolve(e){return Fl.resolveCached(this,e)}resolveNoCache(e){return Fl.resolve(this,e)}rangeHasMark(e,n,r){let A=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(A=!0),!A)),A}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()+")"),Zy(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=Qe.empty,A=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,A,i),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=A;l<i;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,A){if(A&&!this.type.allowsMarks(A))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,n);return o?o.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=Ht.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(!Ht.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 A=Qe.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,A,r);return i.type.checkAttrs(i.attrs),i}};ao.prototype.text=void 0;class Uu extends ao{constructor(e,n,r,A){if(super(e,n,null,A),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Zy(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 Uu(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Uu(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 Zy(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class ds{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new qR(e,n);if(r.next==null)return ds.empty;let A=Vy(r);r.next&&r.err("Unexpected trailing text");let i=tH(eH(A));return nH(i,r),i}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 A=this;for(let i=n;A&&i<r;i++)A=A.matchType(e.child(i).type);return A}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 A=[this];function i(o,a){let l=o.matchFragment(e,r);if(l&&(!n||l.validEnd))return Qe.from(a.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:d,next:h}=o.next[u];if(!(d.isText||d.hasRequiredAttrs())&&A.indexOf(h)==-1){A.push(h);let p=i(h,a.concat(d));if(p)return p}}return null}return i(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 A=r.shift(),i=A.match;if(i.matchType(e)){let o=[];for(let a=A;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:a,next:l}=i.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!A.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:A}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let A=0;A<r.next.length;A++)e.indexOf(r.next[A].next)==-1&&n(r.next[A].next)}return n(this),e.map((r,A)=>{let i=A+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
|
|
11
|
-
`)}}ds.empty=new ds(!0);class qR{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 Vy(t){let e=[];do e.push(XR(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function XR(t){let e=[];do e.push(JR(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function JR(t){let e=VR(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=jR(t,e);else break;return e}function eC(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function jR(t,e){let n=eC(t),r=n;return t.eat(",")&&(t.next!="}"?r=eC(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function ZR(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let A=[];for(let i in n){let o=n[i];o.isInGroup(e)&&A.push(o)}return A.length==0&&t.err("No node type or group '"+e+"' found"),A}function VR(t){if(t.eat("(")){let e=Vy(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=ZR(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 eH(t){let e=[[]];return A(i(t,0),n()),e;function n(){return e.push([])-1}function r(o,a,l){let u={term:l,to:a};return e[o].push(u),u}function A(o,a){o.forEach(l=>l.to=a)}function i(o,a){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(i(u,a)),[]);if(o.type=="seq")for(let l=0;;l++){let u=i(o.exprs[l],a);if(l==o.exprs.length-1)return u;A(u,a=n())}else if(o.type=="star"){let l=n();return r(a,l),A(i(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=n();return A(i(o.expr,a),l),A(i(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(i(o.expr,a));if(o.type=="range"){let l=a;for(let u=0;u<o.min;u++){let d=n();A(i(o.expr,l),d),l=d}if(o.max==-1)A(i(o.expr,l),l);else for(let u=o.min;u<o.max;u++){let d=n();r(l,d),A(i(o.expr,l),d),l=d}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function tC(t,e){return e-t}function nC(t,e){let n=[];return r(e),n.sort(tC);function r(A){let i=t[A];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(A);for(let o=0;o<i.length;o++){let{term:a,to:l}=i[o];!a&&n.indexOf(l)==-1&&r(l)}}}function tH(t){let e=Object.create(null);return n(nC(t,0));function n(r){let A=[];r.forEach(o=>{t[o].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let d=0;d<A.length;d++)A[d][0]==a&&(u=A[d][1]);nC(t,l).forEach(d=>{u||A.push([a,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let i=e[r.join(",")]=new ds(r.indexOf(t.length-1)>-1);for(let o=0;o<A.length;o++){let a=A[o][1].sort(tC);i.next.push({type:A[o][0],next:e[a.join(",")]||n(a)})}return i}}function nH(t,e){for(let n=0,r=[t];n<r.length;n++){let A=r[n],i=!A.validEnd,o=[];for(let a=0;a<A.next.length;a++){let{type:l,next:u}=A.next[a];o.push(l.name),i&&!(l.isText||l.hasRequiredAttrs())&&(i=!1),r.indexOf(u)==-1&&r.push(u)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function rC(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 AC(t,e){let n=Object.create(null);for(let r in t){let A=e&&e[r];if(A===void 0){let i=t[r];if(i.hasDefault)A=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=A}return n}function iC(t,e,n,r){for(let A in e)if(!(A in t))throw new RangeError(`Unsupported attribute ${A} for ${n} of type ${A}`);for(let A in t){let i=t[A];i.validate&&i.validate(e[A])}}function oC(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new AH(t,r,e[r]);return n}let sC=class rT{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=oC(e,r.attrs),this.defaultAttrs=rC(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==ds.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:AC(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ao(this,this.computeAttrs(e),Qe.from(n),Ht.setFrom(r))}createChecked(e=null,n,r){return n=Qe.from(n),this.checkContent(n),new ao(this,this.computeAttrs(e),n,Ht.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=Qe.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let A=this.contentMatch.matchFragment(n),i=A&&A.fillBefore(Qe.empty,!0);return i?new ao(this,e,n.append(i),Ht.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){iC(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:Ht.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,o)=>r[i]=new rT(i,n,o));let A=n.spec.topNode||"doc";if(!r[A])throw new RangeError("Schema is missing its top node type ('"+A+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function rH(t,e,n){let r=n.split("|");return A=>{let i=A===null?"null":typeof A;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class AH{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?rH(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class _u{constructor(e,n,r,A){this.name=e,this.rank=n,this.schema=r,this.spec=A,this.attrs=oC(e,A.attrs),this.excluded=null;let i=rC(this.attrs);this.instance=i?new Ht(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Ht(this,AC(this.attrs,e))}static compile(e,n){let r=Object.create(null),A=0;return e.forEach((i,o)=>r[i]=new _u(i,A++,n,o)),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){iC(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class aC{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let A in e)n[A]=e[A];n.nodes=$n.from(e.nodes),n.marks=$n.from(e.marks||{}),this.nodes=sC.compile(this.spec.nodes,this),this.marks=_u.compile(this.spec.marks,this);let r=Object.create(null);for(let A in this.nodes){if(A in this.marks)throw new RangeError(A+" can not be both a node and a mark");let i=this.nodes[A],o=i.spec.content||"",a=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=ds.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=a=="_"?null:a?lC(this,a.split(" ")):a==""||!i.inlineContent?[]:null}for(let A in this.marks){let i=this.marks[A],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:lC(this,o.split(" "))}this.nodeFromJSON=A=>ao.fromJSON(this,A),this.markFromJSON=A=>Ht.fromJSON(this,A),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,A){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof sC){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,A)}text(e,n){let r=this.nodes.text;return new Uu(r,r.defaultAttrs,e,Ht.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function lC(t,e){let n=[];for(let r=0;r<e.length;r++){let A=e[r],i=t.marks[A],o=i;if(i)n.push(i);else for(let a in t.marks){let l=t.marks[a];(A=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(A)>-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function iH(t){return t.tag!=null}function oH(t){return t.style!=null}class lo{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(A=>{if(iH(A))this.tags.push(A);else if(oH(A)){let i=/[^=]*/.exec(A.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(A)}}),this.normalizeLists=!this.tags.some(A=>{if(!/^(ul|ol)\b/.test(A.tag)||!A.node)return!1;let i=e.nodes[A.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new fC(this,n,!1);return r.addAll(e,Ht.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new fC(this,n,!0);return r.addAll(e,Ht.none,n.from,n.to),De.maxOpen(r.finish())}matchTag(e,n,r){for(let A=r?this.tags.indexOf(r)+1:0;A<this.tags.length;A++){let i=this.tags[A];if(lH(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,n,r,A){for(let i=A?this.styles.indexOf(A)+1:0;i<this.styles.length;i++){let o=this.styles[i],a=o.style;if(!(a.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(o.getAttrs){let l=o.getAttrs(n);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let n=[];function r(A){let i=A.priority==null?50:A.priority,o=0;for(;o<n.length;o++){let a=n[o];if((a.priority==null?50:a.priority)<i)break}n.splice(o,0,A)}for(let A in e.marks){let i=e.marks[A].spec.parseDOM;i&&i.forEach(o=>{r(o=hC(o)),o.mark||o.ignore||o.clearMark||(o.mark=A)})}for(let A in e.nodes){let i=e.nodes[A].spec.parseDOM;i&&i.forEach(o=>{r(o=hC(o)),o.node||o.ignore||o.mark||(o.node=A)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new lo(e,lo.schemaRules(e)))}}const cC={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},sH={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},uC={ol:!0,ul:!0},Ql=1,jp=2,Tl=4;function dC(t,e,n){return e!=null?(e?Ql:0)|(e==="full"?jp:0):t&&t.whitespace=="pre"?Ql|jp:n&~Tl}class Du{constructor(e,n,r,A,i,o){this.type=e,this.attrs=n,this.marks=r,this.solid=A,this.options=o,this.content=[],this.activeMarks=Ht.none,this.match=i||(o&Tl?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Qe.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,A;return(A=r.findWrapping(e.type))?(this.match=r,A):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ql)){let r=this.content[this.content.length-1],A;if(r&&r.isText&&(A=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==A[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-A[0].length))}}let n=Qe.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(Qe.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&&!cC.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class fC{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let A=n.topNode,i,o=dC(null,n.preserveWhitespace,0)|(r?Tl:0);A?i=new Du(A.type,A.attrs,Ht.none,!0,n.topMatch||A.type.contentMatch,o):r?i=new Du(null,null,Ht.none,!0,null,o):i=new Du(e.schema.topNodeType,null,Ht.none,!0,null,o),this.nodes=[i],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,A=this.top,i=A.options&jp?"full":this.localPreserveWS||(A.options&Ql)>0;if(i==="full"||A.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
|
|
12
|
-
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=A.content[A.content.length-1],a=e.previousSibling;(!o||a&&a.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let A=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),a;uC.hasOwnProperty(o)&&this.parser.normalizeLists&&aH(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:sH.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,d=this.needsBlock;if(cC.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),u=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let h=l&&l.skip?n:this.readStyles(e,n);h&&this.addAll(e,h),u&&this.sync(i),this.needsBlock=d}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=A}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
13
|
-
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let A=0;A<this.parser.matchedStyles.length;A++){let i=this.parser.matchedStyles[A],o=r.getPropertyValue(i);if(o)for(let a=void 0;;){let l=this.parser.matchStyle(i,o,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,A){let i,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(o,n.attrs||null,r,n.preserveWhitespace);l&&(i=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(A)this.addElement(e,r,A);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}i&&this.sync(a)&&this.open--}addAll(e,n,r,A){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,a=A==null?null:e.childNodes[A];o!=a;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,n);this.findAtPoint(e,i)}findPlace(e,n,r){let A,i;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],u=l.findWrapping(e);if(u&&(!A||A.length>u.length+a)&&(A=u,i=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!A)return null;this.sync(i);for(let o=0;o<A.length;o++)n=this.enterInner(A[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let A=this.findPlace(e,n,r);if(A){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=Ht.none;for(let a of A.concat(e.marks))(i.type?i.type.allowsMarkType(a.type):pC(a.type,e.type))&&(o=a.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,n,r,A){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,A)),i}enterInner(e,n,r,A=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let a=dC(e,i,o.options);o.options&Tl&&o.content.length==0&&(a|=Tl);let l=Ht.none;return r=r.filter(u=>(o.type?o.type.allowsMarkType(u.type):pC(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new Du(e,n,l,A,null,a)),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|=Ql)}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 A=r.length-1;A>=0;A--)e+=r[A].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 A=0;A<this.find.length;A++)this.find[A].pos==null&&e.nodeType==1&&e.contains(this.find[A].node)&&n.compareDocumentPosition(this.find[A].node)&(r?2:4)&&(this.find[A].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,A=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(A?0:1),o=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=i;l--)if(o(a-1,l))return!0;return!1}else{let d=l>0||l==0&&A?this.nodes[l].type:r&&l>=i?r.node(l-i).type:null;if(!d||d.name!=u&&!d.isInGroup(u))return!1;l--}}return!0};return o(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 aH(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&uC.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function lH(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function hC(t){let e={};for(let n in t)e[n]=t[n];return e}function pC(t,e){let n=e.schema.nodes;for(let r in n){let A=n[r];if(!A.allowsMarkType(t))continue;let i=[],o=a=>{i.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:d}=a.edge(l);if(u==e||i.indexOf(d)<0&&o(d))return!0}};if(o(A.contentMatch))return!0}}class fs{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Zp(n).createDocumentFragment());let A=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let a=0,l=0;for(;a<i.length&&l<o.marks.length;){let u=o.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(i[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<i.length;)A=i.pop()[1];for(;l<o.marks.length;){let u=o.marks[l++],d=this.serializeMark(u,o.isInline,n);d&&(i.push([u,A]),A.appendChild(d.dom),A=d.contentDOM||d.dom)}}A.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:A}=Ou(Zp(n),this.nodes[e.type.name](e),null,e.attrs);if(A){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,A)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let A=e.marks.length-1;A>=0;A--){let i=this.serializeMark(e.marks[A],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let A=this.marks[e.type.name];return A&&Ou(Zp(r),A(e,n),null,e.attrs)}static renderSpec(e,n,r=null,A){return Ou(e,n,r,A)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new fs(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=mC(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return mC(e.marks)}}function mC(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Zp(t){return t.document||window.document}const gC=new WeakMap;function cH(t){let e=gC.get(t);return e===void 0&&gC.set(t,e=uH(t)),e}function uH(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 A=0;A<r.length;A++)n(r[A]);else for(let A in r)n(r[A])}return n(t),e}function Ou(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 A=e[0],i;if(typeof A!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=cH(r))&&i.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 o=A.indexOf(" ");o>0&&(n=A.slice(0,o),A=A.slice(o+1));let a,l=n?t.createElementNS(n,A):t.createElement(A),u=e[1],d=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){d=2;for(let h in u)if(u[h]!=null){let p=h.indexOf(" ");p>0?l.setAttributeNS(h.slice(0,p),h.slice(p+1),u[h]):h=="style"&&l.style?l.style.cssText=u[h]:l.setAttribute(h,u[h])}}for(let h=d;h<e.length;h++){let p=e[h];if(p===0){if(h<e.length-1||h>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:m,contentDOM:v}=Ou(t,p,n,r);if(l.appendChild(m),v){if(a)throw new RangeError("Multiple content holes");a=v}}}return{dom:l,contentDOM:a}}const vC=65535,wC=Math.pow(2,16);function dH(t,e){return t+e*wC}function BC(t){return t&vC}function fH(t){return(t-(t&vC))/wC}const yC=1,CC=2,Nu=4,bC=8;class Vp{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&bC)>0}get deletedBefore(){return(this.delInfo&(yC|Nu))>0}get deletedAfter(){return(this.delInfo&(CC|Nu))>0}get deletedAcross(){return(this.delInfo&Nu)>0}}class Nr{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Nr.empty)return Nr.empty}recover(e){let n=0,r=BC(e);if(!this.inverted)for(let A=0;A<r;A++)n+=this.ranges[A*3+2]-this.ranges[A*3+1];return this.ranges[r*3]+n+fH(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 A=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?A:0);if(l>e)break;let u=this.ranges[a+i],d=this.ranges[a+o],h=l+u;if(e<=h){let p=u?e==l?-1:e==h?1:n:n,m=l+A+(p<0?0:d);if(r)return m;let v=e==(n<0?l:h)?null:dH(a/3,e-l),B=e==l?CC:e==h?yC:Nu;return(n<0?e!=l:e!=h)&&(B|=bC),new Vp(m,B,v)}A+=d-u}return r?e+A:new Vp(e+A,0,null)}touches(e,n){let r=0,A=BC(n),i=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+i],d=l+u;if(e<=d&&a==A*3)return!0;r+=this.ranges[a+o]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let A=0,i=0;A<this.ranges.length;A+=3){let o=this.ranges[A],a=o-(this.inverted?i:0),l=o+(this.inverted?0:i),u=this.ranges[A+n],d=this.ranges[A+r];e(a,a+u,l,l+d),i+=d-u}}invert(){return new Nr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Nr.empty:new Nr(e<0?[0,-e,0]:[0,0,e])}}Nr.empty=new Nr([]);class Ml{constructor(e,n,r=0,A=e?e.length:0){this.mirror=n,this.from=r,this.to=A,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Ml(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 A=e.getMirror(n);this.appendMap(e._maps[n],A!=null&&A<n?r+A: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 A=e.getMirror(n);this.appendMap(e._maps[n].invert(),A!=null&&A>n?r-A-1:void 0)}}invert(){let e=new Ml;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 A=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],a=o.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(i);if(l!=null&&l>i&&l<this.to){i=l,e=this._maps[l].recover(a.recover);continue}}A|=a.delInfo,e=a.pos}return r?e:new Vp(e,A,null)}}const em=Object.create(null);class er{getMap(){return Nr.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=em[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 em)throw new RangeError("Duplicate use of step JSON ID "+e);return em[e]=n,n.prototype.jsonID=e,n}}class yn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new yn(e,null)}static fail(e){return new yn(null,e)}static fromReplace(e,n,r,A){try{return yn.ok(e.replace(n,r,A))}catch(i){if(i instanceof Tu)return yn.fail(i.message);throw i}}}function tm(t,e,n){let r=[];for(let A=0;A<t.childCount;A++){let i=t.child(A);i.content.size&&(i=i.copy(tm(i.content,e,i))),i.isInline&&(i=e(i,n,A)),r.push(i)}return Qe.fromArray(r)}class co extends er{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),A=r.node(r.sharedDepth(this.to)),i=new De(tm(n.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),A),n.openStart,n.openEnd);return yn.fromReplace(e,this.from,this.to,i)}invert(){return new TA(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 co(n.pos,r.pos,this.mark)}merge(e){return e instanceof co&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new co(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 co(n.from,n.to,e.markFromJSON(n.mark))}}er.jsonID("addMark",co);class TA extends er{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 De(tm(n.content,A=>A.mark(this.mark.removeFromSet(A.marks)),e),n.openStart,n.openEnd);return yn.fromReplace(e,this.from,this.to,r)}invert(){return new co(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 TA(n.pos,r.pos,this.mark)}merge(e){return e instanceof TA&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new TA(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 TA(n.from,n.to,e.markFromJSON(n.mark))}}er.jsonID("removeMark",TA);class uo extends er{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return yn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return yn.fromReplace(e,this.pos,this.pos+1,new De(Qe.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 A=0;A<n.marks.length;A++)if(!n.marks[A].isInSet(r))return new uo(this.pos,n.marks[A]);return new uo(this.pos,this.mark)}}return new hs(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new uo(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 uo(n.pos,e.markFromJSON(n.mark))}}er.jsonID("addNodeMark",uo);class hs extends er{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return yn.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return yn.fromReplace(e,this.pos,this.pos+1,new De(Qe.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new uo(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new hs(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 hs(n.pos,e.markFromJSON(n.mark))}}er.jsonID("removeNodeMark",hs);class Dn extends er{constructor(e,n,r,A=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=A}apply(e){return this.structure&&nm(e,this.from,this.to)?yn.fail("Structure replace would overwrite content"):yn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Nr([this.from,this.to-this.from,this.slice.size])}invert(e){return new Dn(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 Dn(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof Dn)||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?De.empty:new De(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Dn(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?De.empty:new De(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Dn(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 Dn(n.from,n.to,De.fromJSON(e,n.slice),!!n.structure)}}er.jsonID("replace",Dn);class On extends er{constructor(e,n,r,A,i,o,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=A,this.slice=i,this.insert=o,this.structure=a}apply(e){if(this.structure&&(nm(e,this.from,this.gapFrom)||nm(e,this.gapTo,this.to)))return yn.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return yn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?yn.fromReplace(e,this.from,this.to,r):yn.fail("Content does not fit in gap")}getMap(){return new Nr([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 On(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),A=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||A<n.pos||i>r.pos?null:new On(n.pos,r.pos,A,i,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 On(n.from,n.to,n.gapFrom,n.gapTo,De.fromJSON(e,n.slice),n.insert,!!n.structure)}}er.jsonID("replaceAround",On);function nm(t,e,n){let r=t.resolve(e),A=n-e,i=r.depth;for(;A>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,A--;if(A>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;A>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,A--}}return!1}function hH(t,e,n,r){let A=[],i=[],o,a;t.doc.nodesBetween(e,n,(l,u,d)=>{if(!l.isInline)return;let h=l.marks;if(!r.isInSet(h)&&d.type.allowsMarkType(r.type)){let p=Math.max(u,e),m=Math.min(u+l.nodeSize,n),v=r.addToSet(h);for(let B=0;B<h.length;B++)h[B].isInSet(v)||(o&&o.to==p&&o.mark.eq(h[B])?o.to=m:A.push(o=new TA(p,m,h[B])));a&&a.to==p?a.to=m:i.push(a=new co(p,m,r))}}),A.forEach(l=>t.step(l)),i.forEach(l=>t.step(l))}function pH(t,e,n,r){let A=[],i=0;t.doc.nodesBetween(e,n,(o,a)=>{if(!o.isInline)return;i++;let l=null;if(r instanceof _u){let u=o.marks,d;for(;d=r.isInSet(u);)(l||(l=[])).push(d),u=d.removeFromSet(u)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let u=Math.min(a+o.nodeSize,n);for(let d=0;d<l.length;d++){let h=l[d],p;for(let m=0;m<A.length;m++){let v=A[m];v.step==i-1&&h.eq(A[m].style)&&(p=v)}p?(p.to=u,p.step=i):A.push({style:h,from:Math.max(a,e),to:u,step:i})}}}),A.forEach(o=>t.step(new TA(o.from,o.to,o.style)))}function rm(t,e,n,r=n.contentMatch,A=!0){let i=t.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l<i.childCount;l++){let u=i.child(l),d=a+u.nodeSize,h=r.matchType(u.type);if(!h)o.push(new Dn(a,d,De.empty));else{r=h;for(let p=0;p<u.marks.length;p++)n.allowsMarkType(u.marks[p].type)||t.step(new TA(a,d,u.marks[p]));if(A&&u.isText&&n.whitespace!="pre"){let p,m=/\r?\n|\r/g,v;for(;p=m.exec(u.text);)v||(v=new De(Qe.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),o.push(new Dn(a+p.index,a+p.index+p[0].length,v))}}a=d}if(!r.validEnd){let l=r.fillBefore(Qe.empty,!0);t.replace(a,a,new De(l,0,0))}for(let l=o.length-1;l>=0;l--)t.step(o[l])}function mH(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function aa(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let A=t.$from.node(r),i=t.$from.index(r),o=t.$to.indexAfter(r);if(r<t.depth&&A.canReplace(i,o,n))return r;if(r==0||A.type.spec.isolating||!mH(A,i,o))break}return null}function gH(t,e,n){let{$from:r,$to:A,depth:i}=e,o=r.before(i+1),a=A.after(i+1),l=o,u=a,d=Qe.empty,h=0;for(let v=i,B=!1;v>n;v--)B||r.index(v)>0?(B=!0,d=Qe.from(r.node(v).copy(d)),h++):l--;let p=Qe.empty,m=0;for(let v=i,B=!1;v>n;v--)B||A.after(v+1)<A.end(v)?(B=!0,p=Qe.from(A.node(v).copy(p)),m++):u++;t.step(new On(l,u,o,a,new De(d.append(p),h,m),d.size-h,!0))}function Am(t,e,n=null,r=t){let A=vH(t,e),i=A&&wH(r,e);return i?A.map(EC).concat({type:e,attrs:n}).concat(i.map(EC)):null}function EC(t){return{type:t,attrs:null}}function vH(t,e){let{parent:n,startIndex:r,endIndex:A}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return n.canReplaceWith(r,A,o)?i:null}function wH(t,e){let{parent:n,startIndex:r,endIndex:A}=t,i=n.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let u=r;l&&u<A;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:o}function BH(t,e,n){let r=Qe.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let a=n[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Qe.from(n[o].type.create(n[o].attrs,r))}let A=e.start,i=e.end;t.step(new On(A,i,A,i,new De(r,0,0),n.length,!0))}function yH(t,e,n,r,A){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(o,a)=>{let l=typeof A=="function"?A(o):A;if(o.isTextblock&&!o.hasMarkup(r,l)&&CH(t.doc,t.mapping.slice(i).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",v=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!v?u=!1:!m&&v&&(u=!0)}u===!1&&SC(t,o,a,i),rm(t,t.mapping.slice(i).map(a,1),r,void 0,u===null);let d=t.mapping.slice(i),h=d.map(a,1),p=d.map(a+o.nodeSize,1);return t.step(new On(h,p,h+1,p-1,new De(Qe.from(r.create(l,null,o.marks)),0,0),1,!0)),u===!0&&kC(t,o,a,i),!1}})}function kC(t,e,n,r){e.forEach((A,i)=>{if(A.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(A.text);){let l=t.mapping.slice(r).map(n+1+i+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function SC(t,e,n,r){e.forEach((A,i)=>{if(A.type==A.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+i);t.replaceWith(o,o+1,e.type.schema.text(`
|
|
14
|
-
`))}})}function CH(t,e,n){let r=t.resolve(e),A=r.index();return r.parent.canReplaceWith(A,A+1,n)}function bH(t,e,n,r,A){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let o=n.create(r,null,A||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,o);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new On(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new De(Qe.from(o),0,0),1,!0))}function Fi(t,e,n=1,r){let A=t.resolve(e),i=A.depth-n,o=r&&r[r.length-1]||A.parent;if(i<0||A.parent.type.spec.isolating||!A.parent.canReplace(A.index(),A.parent.childCount)||!o.type.validContent(A.parent.content.cutByIndex(A.index(),A.parent.childCount)))return!1;for(let u=A.depth-1,d=n-2;u>i;u--,d--){let h=A.node(u),p=A.index(u);if(h.type.spec.isolating)return!1;let m=h.content.cutByIndex(p,h.childCount),v=r&&r[d+1];v&&(m=m.replaceChild(0,v.type.create(v.attrs)));let B=r&&r[d]||h;if(!h.canReplace(p+1,h.childCount)||!B.type.validContent(m))return!1}let a=A.indexAfter(i),l=r&&r[0];return A.node(i).canReplaceWith(a,a,l?l.type:A.node(i+1).type)}function EH(t,e,n=1,r){let A=t.doc.resolve(e),i=Qe.empty,o=Qe.empty;for(let a=A.depth,l=A.depth-n,u=n-1;a>l;a--,u--){i=Qe.from(A.node(a).copy(i));let d=r&&r[u];o=Qe.from(d?d.type.create(d.attrs,o):A.node(a).copy(o))}t.step(new Dn(e,e,new De(i.append(o),n,n),!0))}function fo(t,e){let n=t.resolve(e),r=n.index();return xC(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function kH(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let A=0;A<e.childCount;A++){let i=e.child(A),o=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(o),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function xC(t,e){return!!(t&&e&&!t.isLeaf&&kH(t,e))}function Lu(t,e,n=-1){let r=t.resolve(e);for(let A=r.depth;;A--){let i,o,a=r.index(A);if(A==r.depth?(i=r.nodeBefore,o=r.nodeAfter):n>0?(i=r.node(A+1),a++,o=r.node(A).maybeChild(a)):(i=r.node(A).maybeChild(a-1),o=r.node(A+1)),i&&!i.isTextblock&&xC(i,o)&&r.node(A).canReplace(a,a+1))return e;if(A==0)break;e=n<0?r.before(A):r.after(A)}}function SH(t,e,n){let r=null,{linebreakReplacement:A}=t.doc.type.schema,i=t.doc.resolve(e-n),o=i.node().type;if(A&&o.inlineContent){let d=o.whitespace=="pre",h=!!o.contentMatch.matchType(A);d&&!h?r=!1:!d&&h&&(r=!0)}let a=t.steps.length;if(r===!1){let d=t.doc.resolve(e+n);SC(t,d.node(),d.before(),a)}o.inlineContent&&rm(t,e+n-1,o,i.node().contentMatchAt(i.index()),r==null);let l=t.mapping.slice(a),u=l.map(e-n);if(t.step(new Dn(u,l.map(e+n,-1),De.empty,!0)),r===!0){let d=t.doc.resolve(u);kC(t,d.node(),d.before(),t.steps.length)}return t}function xH(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let A=r.depth-1;A>=0;A--){let i=r.index(A);if(r.node(A).canReplaceWith(i,i,n))return r.before(A+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let A=r.depth-1;A>=0;A--){let i=r.indexAfter(A);if(r.node(A).canReplaceWith(i,i,n))return r.after(A+1);if(i<r.node(A).childCount)return null}return null}function FC(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let A=n.content;for(let i=0;i<n.openStart;i++)A=A.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let o=r.depth;o>=0;o--){let a=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,l=r.index(o)+(a>0?1:0),u=r.node(o),d=!1;if(i==1)d=u.canReplace(l,l,A);else{let h=u.contentMatchAt(l).findWrapping(A.firstChild.type);d=h&&u.canReplaceWith(l,l,h[0])}if(d)return a==0?r.pos:a<0?r.before(o+1):r.after(o+1)}return null}function Ru(t,e,n=e,r=De.empty){if(e==n&&!r.size)return null;let A=t.resolve(e),i=t.resolve(n);return QC(A,i,r)?new Dn(e,n,r):new FH(A,i,r).fit()}function QC(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class FH{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Qe.empty;for(let A=0;A<=e.depth;A++){let i=e.node(A);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(A))})}for(let A=e.depth;A>0;A--)this.placed=Qe.from(e.node(A).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,A=this.close(e<0?this.$to:r.doc.resolve(e));if(!A)return null;let i=this.placed,o=r.depth,a=A.depth;for(;o&&a&&i.childCount==1;)i=i.firstChild.content,o--,a--;let l=new De(i,o,a);return e>-1?new On(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Dn(r.pos,A.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,A=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(A=0),i.type.spec.isolating&&A<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let A,i=null;r?(i=im(this.unplaced.content,r-1).firstChild,A=i.content):A=this.unplaced.content;let o=A.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],d,h=null;if(n==1&&(o?u.matchType(o.type)||(h=u.fillBefore(Qe.from(o),!1)):i&&l.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:a,parent:i,inject:h};if(n==2&&o&&(d=u.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:a,parent:i,wrap:d};if(i&&u.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,A=im(e,n);return!A.childCount||A.firstChild.isLeaf?!1:(this.unplaced=new De(e,n+1,Math.max(r,A.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,A=im(e,n);if(A.childCount<=1&&n>0){let i=e.size-n<=n+A.size;this.unplaced=new De(Il(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new De(Il(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:A,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let B=0;B<i.length;B++)this.openFrontierNode(i[B]);let o=this.unplaced,a=r?r.content:o.content,l=o.openStart-e,u=0,d=[],{match:h,type:p}=this.frontier[n];if(A){for(let B=0;B<A.childCount;B++)d.push(A.child(B));h=h.matchFragment(A)}let m=a.size+e-(o.content.size-o.openEnd);for(;u<a.childCount;){let B=a.child(u),y=h.matchType(B.type);if(!y)break;u++,(u>1||l==0||B.content.size)&&(h=y,d.push(TC(B.mark(p.allowedMarks(B.marks)),u==1?l:0,u==a.childCount?m:-1)))}let v=u==a.childCount;v||(m=-1),this.placed=Ul(this.placed,n,Qe.from(d)),this.frontier[n].match=h,v&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let B=0,y=a;B<m;B++){let w=y.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),y=w.content}this.unplaced=v?e==0?De.empty:new De(Il(o.content,e-1,1),e-1,m<0?o.openEnd:e-1):new De(Il(o.content,e,u),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!om(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,A=this.$to.after(r);for(;r>1&&A==this.$to.end(--r);)++A;return A}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:A}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),o=om(e,n,A,r,i);if(o){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],d=om(e,a,u,l,!0);if(!d||d.childCount)continue e}return{depth:n,fit:o,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Ul(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let A=e.node(r),i=A.type.contentMatch.fillBefore(A.content,!0,e.index(r));this.openFrontierNode(A.type,A.attrs,i)}return e}openFrontierNode(e,n=null,r){let A=this.frontier[this.depth];A.match=A.match.matchType(e),this.placed=Ul(this.placed,this.depth,Qe.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(Qe.empty,!0);n.childCount&&(this.placed=Ul(this.placed,this.frontier.length,n))}}function Il(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Il(t.firstChild.content,e-1,n)))}function Ul(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Ul(t.lastChild.content,e-1,n)))}function im(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function TC(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,TC(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(Qe.empty,!0)))),t.copy(r)}function om(t,e,n,r,A){let i=t.node(e),o=A?t.indexAfter(e):t.index(e);if(o==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,o);return a&&!QH(n,i.content,o)?a:null}function QH(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function TH(t){return t.spec.defining||t.spec.definingForContent}function MH(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let A=t.doc.resolve(e),i=t.doc.resolve(n);if(QC(A,i,r))return t.step(new Dn(e,n,r));let o=IC(A,t.doc.resolve(n));o[o.length-1]==0&&o.pop();let a=-(A.depth+1);o.unshift(a);for(let p=A.depth,m=A.pos-1;p>0;p--,m--){let v=A.node(p).type.spec;if(v.defining||v.definingAsContext||v.isolating)break;o.indexOf(p)>-1?a=p:A.before(p)==m&&o.splice(1,0,-p)}let l=o.indexOf(a),u=[],d=r.openStart;for(let p=r.content,m=0;;m++){let v=p.firstChild;if(u.push(v),m==r.openStart)break;p=v.content}for(let p=d-1;p>=0;p--){let m=u[p],v=TH(m.type);if(v&&!m.sameMarkup(A.node(Math.abs(a)-1)))d=p;else if(v||!m.type.isTextblock)break}for(let p=r.openStart;p>=0;p--){let m=(p+d+1)%(r.openStart+1),v=u[m];if(v)for(let B=0;B<o.length;B++){let y=o[(B+l)%o.length],w=!0;y<0&&(w=!1,y=-y);let C=A.node(y-1),k=A.index(y-1);if(C.canReplaceWith(k,k,v.type,v.marks))return t.replace(A.before(y),w?i.after(y):n,new De(MC(r.content,0,r.openStart,m),m,r.openEnd))}}let h=t.steps.length;for(let p=o.length-1;p>=0&&(t.replace(e,n,r),!(t.steps.length>h));p--){let m=o[p];m<0||(e=A.before(m),n=i.after(m))}}function MC(t,e,n,r,A){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(MC(i.content,e+1,n,r,i)))}if(e>r){let i=A.contentMatchAt(0),o=i.fillBefore(t).append(t);t=o.append(i.matchFragment(o).fillBefore(Qe.empty,!0))}return t}function IH(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let A=xH(t.doc,e,r.type);A!=null&&(e=n=A)}t.replaceRange(e,n,new De(Qe.from(r),0,0))}function UH(t,e,n){let r=t.doc.resolve(e),A=t.doc.resolve(n),i=IC(r,A);for(let o=0;o<i.length;o++){let a=i[o],l=o==i.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),A.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),A.indexAfter(a-1))))return t.delete(r.before(a),A.after(a))}for(let o=1;o<=r.depth&&o<=A.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&A.end(o)-n!=A.depth-o&&r.start(o-1)==A.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),A.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}function IC(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let A=r;A>=0;A--){let i=t.start(A);if(i<t.pos-(t.depth-A)||e.end(A)>e.pos+(e.depth-A)||t.node(A).type.spec.isolating||e.node(A).type.spec.isolating)break;(i==e.start(A)||A==t.depth&&A==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&A&&e.start(A-1)==i-1)&&n.push(A)}return n}class la extends er{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return yn.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let A=n.type.create(r,null,n.marks);return yn.fromReplace(e,this.pos,this.pos+1,new De(Qe.from(A),0,n.isLeaf?0:1))}getMap(){return Nr.empty}invert(e){return new la(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new la(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new la(n.pos,n.attr,n.value)}}er.jsonID("attr",la);class _l extends er{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let A in e.attrs)n[A]=e.attrs[A];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return yn.ok(r)}getMap(){return Nr.empty}invert(e){return new _l(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new _l(n.attr,n.value)}}er.jsonID("docAttr",_l);let ca=class extends Error{};ca=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},ca.prototype=Object.create(Error.prototype),ca.prototype.constructor=ca,ca.prototype.name="TransformError";class UC{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ml}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new ca(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=De.empty){let A=Ru(this.doc,e,n,r);return A&&this.step(A),this}replaceWith(e,n,r){return this.replace(e,n,new De(Qe.from(r),0,0))}delete(e,n){return this.replace(e,n,De.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return MH(this,e,n,r),this}replaceRangeWith(e,n,r){return IH(this,e,n,r),this}deleteRange(e,n){return UH(this,e,n),this}lift(e,n){return gH(this,e,n),this}join(e,n=1){return SH(this,e,n),this}wrap(e,n){return BH(this,e,n),this}setBlockType(e,n=e,r,A=null){return yH(this,e,n,r,A),this}setNodeMarkup(e,n,r=null,A){return bH(this,e,n,r,A),this}setNodeAttribute(e,n,r){return this.step(new la(e,n,r)),this}setDocAttribute(e,n){return this.step(new _l(e,n)),this}addNodeMark(e,n){return this.step(new uo(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof Ht)n.isInSet(r.marks)&&this.step(new hs(e,n));else{let A=r.marks,i,o=[];for(;i=n.isInSet(A);)o.push(new hs(e,i)),A=i.removeFromSet(A);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,n=1,r){return EH(this,e,n,r),this}addMark(e,n,r){return hH(this,e,n,r),this}removeMark(e,n,r){return pH(this,e,n,r),this}clearIncompatible(e,n,r){return rm(this,e,n,r),this}}const sm=Object.create(null);class st{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new _H(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=De.empty){let r=n.content.lastChild,A=null;for(let a=0;a<n.openEnd;a++)A=r,r=r.lastChild;let i=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:u}=o[a],d=e.mapping.slice(i);e.replaceRange(d.map(l.pos),d.map(u.pos),a?De.empty:n),a==0&&OC(e,i,(r?r.isInline:A&&A.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,A=this.ranges;for(let i=0;i<A.length;i++){let{$from:o,$to:a}=A[i],l=e.mapping.slice(r),u=l.map(o.pos),d=l.map(a.pos);i?e.deleteRange(u,d):(e.replaceRangeWith(u,d,n),OC(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let A=e.parent.inlineContent?new nt(e):ua(e.node(0),e.parent,e.pos,e.index(),n,r);if(A)return A;for(let i=e.depth-1;i>=0;i--){let o=n<0?ua(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):ua(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(o)return o}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Lr(e.node(0))}static atStart(e){return ua(e,e,0,0,1)||new Lr(e)}static atEnd(e){return ua(e,e,e.content.size,e.childCount,-1)||new Lr(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=sm[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in sm)throw new RangeError("Duplicate use of selection JSON ID "+e);return sm[e]=n,n.prototype.jsonID=e,n}getBookmark(){return nt.between(this.$anchor,this.$head).getBookmark()}}st.prototype.visible=!0;class _H{constructor(e,n){this.$from=e,this.$to=n}}let _C=!1;function DC(t){!_C&&!t.parent.inlineContent&&(_C=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class nt extends st{constructor(e,n=e){DC(e),DC(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return st.near(r);let A=e.resolve(n.map(this.anchor));return new nt(A.parent.inlineContent?A:r,r)}replace(e,n=De.empty){if(super.replace(e,n),n==De.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof nt&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Hu(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new nt(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let A=e.resolve(n);return new this(A,r==n?A:e.resolve(r))}static between(e,n,r){let A=e.pos-n.pos;if((!r||A)&&(r=A>=0?1:-1),!n.parent.inlineContent){let i=st.findFrom(n,r,!0)||st.findFrom(n,-r,!0);if(i)n=i.$head;else return st.near(n,r)}return e.parent.inlineContent||(A==0?e=n:(e=(st.findFrom(e,-r,!0)||st.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=A<0&&(e=n))),new nt(e,n)}}st.jsonID("text",nt);class Hu{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Hu(e.map(this.anchor),e.map(this.head))}resolve(e){return nt.between(e.resolve(this.anchor),e.resolve(this.head))}}class qe extends st{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:A}=n.mapResult(this.anchor),i=e.resolve(A);return r?st.near(i):new qe(i)}content(){return new De(Qe.from(this.node),0,0)}eq(e){return e instanceof qe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new am(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new qe(e.resolve(n.anchor))}static create(e,n){return new qe(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}qe.prototype.visible=!1,st.jsonID("node",qe);class am{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Hu(r,r):new am(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&qe.isSelectable(r)?new qe(n):st.near(n)}}class Lr extends st{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=De.empty){if(n==De.empty){e.delete(0,e.doc.content.size);let r=st.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Lr(e)}map(e){return new Lr(e)}eq(e){return e instanceof Lr}getBookmark(){return DH}}st.jsonID("all",Lr);const DH={map(){return this},resolve(t){return new Lr(t)}};function ua(t,e,n,r,A,i=!1){if(e.inlineContent)return nt.create(t,n);for(let o=r-(A>0?0:1);A>0?o<e.childCount:o>=0;o+=A){let a=e.child(o);if(a.isAtom){if(!i&&qe.isSelectable(a))return qe.create(t,n-(A<0?a.nodeSize:0))}else{let l=ua(t,a,n+A,A<0?a.childCount:0,A,i);if(l)return l}n+=a.nodeSize*A}return null}function OC(t,e,n){let r=t.steps.length-1;if(r<e)return;let A=t.steps[r];if(!(A instanceof Dn||A instanceof On))return;let i=t.mapping.maps[r],o;i.forEach((a,l,u,d)=>{o==null&&(o=d)}),t.setSelection(st.near(t.doc.resolve(o),n))}const NC=1,Pu=2,LC=4;class OH extends UC{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|NC)&~Pu,this.storedMarks=null,this}get selectionSet(){return(this.updated&NC)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Pu,this}ensureMarks(e){return Ht.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Pu)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Pu,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Ht.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let A=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(A.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let o=this.doc.resolve(n);i=r==n?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,A.text(e,i)),this.selection.empty||this.setSelection(st.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=LC,this}get scrolledIntoView(){return(this.updated&LC)>0}}function RC(t,e){return!e||!t?t:t.bind(e)}class Dl{constructor(e,n,r){this.name=e,this.init=RC(n.init,r),this.apply=RC(n.apply,r)}}const NH=[new Dl("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Dl("selection",{init(t,e){return t.selection||st.atStart(e.doc)},apply(t){return t.selection}}),new Dl("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Dl("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class lm{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=NH.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Dl(r.key,r.spec.state,r))})}}class da{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let A=this.config.plugins[r];if(A.spec.filterTransaction&&!A.spec.filterTransaction.call(A,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),A=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let a=this.config.plugins[o];if(a.spec.appendTransaction){let l=A?A[o].n:0,u=A?A[o].state:this,d=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(d&&r.filterTransaction(d,o)){if(d.setMeta("appendedTransaction",e),!A){A=[];for(let h=0;h<this.config.plugins.length;h++)A.push(h<o?{state:r,n:n.length}:{state:this,n:0})}n.push(d),r=r.applyInner(d),i=!0}A&&(A[o]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new da(this.config),r=this.config.fields;for(let A=0;A<r.length;A++){let i=r[A];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new OH(this)}static create(e){let n=new lm(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new da(n);for(let A=0;A<n.fields.length;A++)r[n.fields[A].name]=n.fields[A].init(e,r);return r}reconfigure(e){let n=new lm(this.schema,e.plugins),r=n.fields,A=new da(n);for(let i=0;i<r.length;i++){let o=r[i].name;A[o]=this.hasOwnProperty(o)?this[o]:r[i].init(e,A)}return A}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let A=e[r],i=A.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(A,this[A.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let A=new lm(e.schema,e.plugins),i=new da(A);return A.fields.forEach(o=>{if(o.name=="doc")i.doc=ao.fromJSON(e.schema,n.doc);else if(o.name=="selection")i.selection=st.fromJSON(i.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){i[o.name]=u.fromJSON.call(l,e,n[a],i);return}}i[o.name]=o.init(e,i)}}),i}}function HC(t,e,n){for(let r in t){let A=t[r];A instanceof Function?A=A.bind(e):r=="handleDOMEvents"&&(A=HC(A,e,{})),n[r]=A}return n}class en{constructor(e){this.spec=e,this.props={},e.props&&HC(e.props,this,this.props),this.key=e.key?e.key.key:PC("plugin")}getState(e){return e[this.key]}}const cm=Object.create(null);function PC(t){return t in cm?t+"$"+ ++cm[t]:(cm[t]=0,t+"$")}class xn{constructor(e="key"){this.key=PC(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const um=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function $C(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const KC=(t,e,n)=>{let r=$C(t,n);if(!r)return!1;let A=dm(r);if(!A){let o=r.blockRange(),a=o&&aa(o);return a==null?!1:(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}let i=A.nodeBefore;if(ZC(t,A,e,-1))return!0;if(r.parent.content.size==0&&(fa(i,"end")||qe.isSelectable(i)))for(let o=r.depth;;o--){let a=Ru(t.doc,r.before(o),r.after(o),De.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(fa(i,"end")?st.findFrom(l.doc.resolve(l.mapping.map(A.pos,-1)),-1):qe.create(l.doc,A.pos-i.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return i.isAtom&&A.depth==r.depth-1?(e&&e(t.tr.delete(A.pos-i.nodeSize,A.pos).scrollIntoView()),!0):!1},LH=(t,e,n)=>{let r=$C(t,n);if(!r)return!1;let A=dm(r);return A?zC(t,A,e):!1},RH=(t,e,n)=>{let r=GC(t,n);if(!r)return!1;let A=fm(r);return A?zC(t,A,e):!1};function zC(t,e,n){let r=e.nodeBefore,A=r,i=e.pos-1;for(;!A.isTextblock;i--){if(A.type.spec.isolating)return!1;let d=A.lastChild;if(!d)return!1;A=d}let o=e.nodeAfter,a=o,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let d=a.firstChild;if(!d)return!1;a=d}let u=Ru(t.doc,i,l,De.empty);if(!u||u.from!=i||u instanceof Dn&&u.slice.size>=l-i)return!1;if(n){let d=t.tr.step(u);d.setSelection(nt.create(d.doc,i)),n(d.scrollIntoView())}return!0}function fa(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const WC=(t,e,n)=>{let{$head:r,empty:A}=t.selection,i=r;if(!A)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=dm(r)}let o=i&&i.nodeBefore;return!o||!qe.isSelectable(o)?!1:(e&&e(t.tr.setSelection(qe.create(t.doc,i.pos-o.nodeSize)).scrollIntoView()),!0)};function dm(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function GC(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const YC=(t,e,n)=>{let r=GC(t,n);if(!r)return!1;let A=fm(r);if(!A)return!1;let i=A.nodeAfter;if(ZC(t,A,e,1))return!0;if(r.parent.content.size==0&&(fa(i,"start")||qe.isSelectable(i))){let o=Ru(t.doc,r.before(),r.after(),De.empty);if(o&&o.slice.size<o.to-o.from){if(e){let a=t.tr.step(o);a.setSelection(fa(i,"start")?st.findFrom(a.doc.resolve(a.mapping.map(A.pos)),1):qe.create(a.doc,a.mapping.map(A.pos))),e(a.scrollIntoView())}return!0}}return i.isAtom&&A.depth==r.depth-1?(e&&e(t.tr.delete(A.pos,A.pos+i.nodeSize).scrollIntoView()),!0):!1},qC=(t,e,n)=>{let{$head:r,empty:A}=t.selection,i=r;if(!A)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=fm(r)}let o=i&&i.nodeAfter;return!o||!qe.isSelectable(o)?!1:(e&&e(t.tr.setSelection(qe.create(t.doc,i.pos)).scrollIntoView()),!0)};function fm(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const HH=(t,e)=>{let n=t.selection,r=n instanceof qe,A;if(r){if(n.node.isTextblock||!fo(t.doc,n.from))return!1;A=n.from}else if(A=Lu(t.doc,n.from,-1),A==null)return!1;if(e){let i=t.tr.join(A);r&&i.setSelection(qe.create(i.doc,A-t.doc.resolve(A).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},PH=(t,e)=>{let n=t.selection,r;if(n instanceof qe){if(n.node.isTextblock||!fo(t.doc,n.to))return!1;r=n.to}else if(r=Lu(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},$H=(t,e)=>{let{$from:n,$to:r}=t.selection,A=n.blockRange(r),i=A&&aa(A);return i==null?!1:(e&&e(t.tr.lift(A,i).scrollIntoView()),!0)},XC=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
15
|
-
`).scrollIntoView()),!0)};function hm(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const KH=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let A=n.node(-1),i=n.indexAfter(-1),o=hm(A.contentMatchAt(i));if(!o||!A.canReplaceWith(i,i,o))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,o.createAndFill());l.setSelection(st.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},JC=(t,e)=>{let n=t.selection,{$from:r,$to:A}=n;if(n instanceof Lr||r.parent.inlineContent||A.parent.inlineContent)return!1;let i=hm(A.parent.contentMatchAt(A.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let o=(!r.parentOffset&&A.index()<A.parent.childCount?r:A).pos,a=t.tr.insert(o,i.createAndFill());a.setSelection(nt.create(a.doc,o+1)),e(a.scrollIntoView())}return!0},jC=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Fi(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),A=r&&aa(r);return A==null?!1:(e&&e(t.tr.lift(r,A).scrollIntoView()),!0)};function zH(t){return(e,n)=>{let{$from:r,$to:A}=e.selection;if(e.selection instanceof qe&&e.selection.node.isBlock)return!r.parentOffset||!Fi(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],o,a,l=!1,u=!1;for(let m=r.depth;;m--)if(r.node(m).isBlock){l=r.end(m)==r.pos+(r.depth-m),u=r.start(m)==r.pos-(r.depth-m),a=hm(r.node(m-1).contentMatchAt(r.indexAfter(m-1))),i.unshift(l&&a?{type:a}:null),o=m;break}else{if(m==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof nt||e.selection instanceof Lr)&&d.deleteSelection();let h=d.mapping.map(r.pos),p=Fi(d.doc,h,i.length,i);if(p||(i[0]=a?{type:a}:null,p=Fi(d.doc,h,i.length,i)),!p)return!1;if(d.split(h,i.length,i),!l&&u&&r.node(o).type!=a){let m=d.mapping.map(r.before(o)),v=d.doc.resolve(m);a&&r.node(o-1).canReplaceWith(v.index(),v.index()+1,a)&&d.setNodeMarkup(d.mapping.map(r.before(o)),a)}return n&&n(d.scrollIntoView()),!0}}const WH=zH(),GH=(t,e)=>{let{$from:n,to:r}=t.selection,A,i=n.sharedDepth(r);return i==0?!1:(A=n.before(i),e&&e(t.tr.setSelection(qe.create(t.doc,A))),!0)};function YH(t,e,n){let r=e.nodeBefore,A=e.nodeAfter,i=e.index();return!r||!A||!r.type.compatibleContent(A.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(A.isTextblock||fo(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function ZC(t,e,n,r){let A=e.nodeBefore,i=e.nodeAfter,o,a,l=A.type.spec.isolating||i.type.spec.isolating;if(!l&&YH(t,e,n))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(a=A.contentMatchAt(A.childCount)).findWrapping(i.type))&&a.matchType(o[0]||i.type).validEnd){if(n){let m=e.pos+i.nodeSize,v=Qe.empty;for(let w=o.length-1;w>=0;w--)v=Qe.from(o[w].create(null,v));v=Qe.from(A.copy(v));let B=t.tr.step(new On(e.pos-1,m,e.pos,m,new De(v,1,0),o.length,!0)),y=B.doc.resolve(m+2*o.length);y.nodeAfter&&y.nodeAfter.type==A.type&&fo(B.doc,y.pos)&&B.join(y.pos),n(B.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&l?null:st.findFrom(e,1),h=d&&d.$from.blockRange(d.$to),p=h&&aa(h);if(p!=null&&p>=e.depth)return n&&n(t.tr.lift(h,p).scrollIntoView()),!0;if(u&&fa(i,"start",!0)&&fa(A,"end")){let m=A,v=[];for(;v.push(m),!m.isTextblock;)m=m.lastChild;let B=i,y=1;for(;!B.isTextblock;B=B.firstChild)y++;if(m.canReplace(m.childCount,m.childCount,B.content)){if(n){let w=Qe.empty;for(let k=v.length-1;k>=0;k--)w=Qe.from(v[k].copy(w));let C=t.tr.step(new On(e.pos-v.length,e.pos+i.nodeSize,e.pos+y,e.pos+i.nodeSize-y,new De(w,v.length,0),0,!0));n(C.scrollIntoView())}return!0}}return!1}function VC(t){return function(e,n){let r=e.selection,A=t<0?r.$from:r.$to,i=A.depth;for(;A.node(i).isInline;){if(!i)return!1;i--}return A.node(i).isTextblock?(n&&n(e.tr.setSelection(nt.create(e.doc,t<0?A.start(i):A.end(i)))),!0):!1}}const qH=VC(-1),XH=VC(1);function JH(t,e=null){return function(n,r){let{$from:A,$to:i}=n.selection,o=A.blockRange(i),a=o&&Am(o,t,e);return a?(r&&r(n.tr.wrap(o,a).scrollIntoView()),!0):!1}}function eb(t,e=null){return function(n,r){let A=!1;for(let i=0;i<n.selection.ranges.length&&!A;i++){let{$from:{pos:o},$to:{pos:a}}=n.selection.ranges[i];n.doc.nodesBetween(o,a,(l,u)=>{if(A)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)A=!0;else{let d=n.doc.resolve(u),h=d.index();A=d.parent.canReplaceWith(h,h+1,t)}})}if(!A)return!1;if(r){let i=n.tr;for(let o=0;o<n.selection.ranges.length;o++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[o];i.setBlockType(a,l,t,e)}r(i.scrollIntoView())}return!0}}function pm(...t){return function(e,n,r){for(let A=0;A<t.length;A++)if(t[A](e,n,r))return!0;return!1}}pm(um,KC,WC),pm(um,YC,qC),pm(XC,JC,jC,WH),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function jH(t,e=null){return function(n,r){let{$from:A,$to:i}=n.selection,o=A.blockRange(i);if(!o)return!1;let a=r?n.tr:null;return ZH(a,o,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function ZH(t,e,n,r=null){let A=!1,i=e,o=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);i=new Iu(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new Iu(e.$from,o.resolve(e.$to.end(e.depth)),e.depth)),A=!0}let a=Am(i,n,r,e);return a?(t&&VH(t,e,a,A,n),!0):!1}function VH(t,e,n,r,A){let i=Qe.empty;for(let d=n.length-1;d>=0;d--)i=Qe.from(n[d].type.create(n[d].attrs,i));t.step(new On(e.start-(r?2:0),e.end,e.start,e.end,new De(i,0,0),n.length,!0));let o=0;for(let d=0;d<n.length;d++)n[d].type==A&&(o=d+1);let a=n.length-o,l=e.start+n.length-(r?2:0),u=e.parent;for(let d=e.startIndex,h=e.endIndex,p=!0;d<h;d++,p=!1)!p&&Fi(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=u.child(d).nodeSize;return t}function eP(t){return function(e,n){let{$from:r,$to:A}=e.selection,i=r.blockRange(A,o=>o.childCount>0&&o.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?tP(e,n,t,i):nP(e,n,i):!0:!1}}function tP(t,e,n,r){let A=t.tr,i=r.end,o=r.$to.end(r.depth);i<o&&(A.step(new On(i-1,o,i,o,new De(Qe.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Iu(A.doc.resolve(r.$from.pos),A.doc.resolve(o),r.depth));const a=aa(r);if(a==null)return!1;A.lift(r,a);let l=A.doc.resolve(A.mapping.map(i,-1)-1);return fo(A.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&A.join(l.pos),e(A.scrollIntoView()),!0}function nP(t,e,n){let r=t.tr,A=n.parent;for(let m=n.end,v=n.endIndex-1,B=n.startIndex;v>B;v--)m-=A.child(v).nodeSize,r.delete(m-1,m+1);let i=r.doc.resolve(n.start),o=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==A.childCount,u=i.node(-1),d=i.index(-1);if(!u.canReplace(d+(a?0:1),d+1,o.content.append(l?Qe.empty:Qe.from(A))))return!1;let h=i.pos,p=h+o.nodeSize;return r.step(new On(h-(a?1:0),p+(l?1:0),h+1,p-1,new De((a?Qe.empty:Qe.from(A.copy(Qe.empty))).append(l?Qe.empty:Qe.from(A.copy(Qe.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function rP(t){return function(e,n){let{$from:r,$to:A}=e.selection,i=r.blockRange(A,u=>u.childCount>0&&u.firstChild.type==t);if(!i)return!1;let o=i.startIndex;if(o==0)return!1;let a=i.parent,l=a.child(o-1);if(l.type!=t)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,d=Qe.from(u?t.create():null),h=new De(Qe.from(t.create(null,Qe.from(a.type.create(null,d)))),u?3:1,0),p=i.start,m=i.end;n(e.tr.step(new On(p-(u?3:1),m,p,m,h,1,!0)).scrollIntoView())}return!0}}const Kn=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},ha=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let mm=null;const Qi=function(t,e,n){let r=mm||(mm=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},AP=function(){mm=null},ps=function(t,e,n,r){return n&&(tb(t,e,n,r,-1)||tb(t,e,n,r,1))},iP=/^(img|br|input|textarea|hr)$/i;function tb(t,e,n,r,A){for(var i;;){if(t==n&&e==r)return!0;if(e==(A<0?0:eA(t))){let o=t.parentNode;if(!o||o.nodeType!=1||Ol(t)||iP.test(t.nodeName)||t.contentEditable=="false")return!1;e=Kn(t)+(A<0?0:1),t=o}else if(t.nodeType==1){let o=t.childNodes[e+(A<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((i=o.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=A;else return!1;else t=o,e=A<0?eA(t):0}else return!1}}function eA(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function oP(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=eA(t)}else if(t.parentNode&&!Ol(t))e=Kn(t),t=t.parentNode;else return null}}function sP(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!Ol(t))e=Kn(t)+1,t=t.parentNode;else return null}}function aP(t,e,n){for(let r=e==0,A=e==eA(t);r||A;){if(t==n)return!0;let i=Kn(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,A=A&&i==eA(t)}}function Ol(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const $u=function(t){return t.focusNode&&ps(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ms(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function lP(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function cP(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(eA(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(eA(r.startContainer),r.startOffset)}}}const Ai=typeof navigator<"u"?navigator:null,nb=typeof document<"u"?document:null,ho=Ai&&Ai.userAgent||"",gm=/Edge\/(\d+)/.exec(ho),rb=/MSIE \d/.exec(ho),vm=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ho),kr=!!(rb||vm||gm),po=rb?document.documentMode:vm?+vm[1]:gm?+gm[1]:0,MA=!kr&&/gecko\/(\d+)/i.test(ho);MA&&+(/Firefox\/(\d+)/.exec(ho)||[0,0])[1];const wm=!kr&&/Chrome\/(\d+)/.exec(ho),tr=!!wm,Ab=wm?+wm[1]:0,pr=!kr&&!!Ai&&/Apple Computer/.test(Ai.vendor),pa=pr&&(/Mobile\/\w+/.test(ho)||!!Ai&&Ai.maxTouchPoints>2),tA=pa||(Ai?/Mac/.test(Ai.platform):!1),uP=Ai?/Win/.test(Ai.platform):!1,Ti=/Android \d/.test(ho),Nl=!!nb&&"webkitFontSmoothing"in nb.documentElement.style,dP=Nl?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function fP(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Mi(t,e){return typeof t=="number"?t:t[e]}function hP(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function ib(t,e,n){let r=t.someProp("scrollThreshold")||0,A=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let o=n||t.dom;o;){if(o.nodeType!=1){o=ha(o);continue}let a=o,l=a==i.body,u=l?fP(i):hP(a),d=0,h=0;if(e.top<u.top+Mi(r,"top")?h=-(u.top-e.top+Mi(A,"top")):e.bottom>u.bottom-Mi(r,"bottom")&&(h=e.bottom-e.top>u.bottom-u.top?e.top+Mi(A,"top")-u.top:e.bottom-u.bottom+Mi(A,"bottom")),e.left<u.left+Mi(r,"left")?d=-(u.left-e.left+Mi(A,"left")):e.right>u.right-Mi(r,"right")&&(d=e.right-u.right+Mi(A,"right")),d||h)if(l)i.defaultView.scrollBy(d,h);else{let m=a.scrollLeft,v=a.scrollTop;h&&(a.scrollTop+=h),d&&(a.scrollLeft+=d);let B=a.scrollLeft-m,y=a.scrollTop-v;e={left:e.left-B,top:e.top-y,right:e.right-B,bottom:e.bottom-y}}let p=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(p))break;o=p=="absolute"?o.offsetParent:ha(o)}}function pP(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,A;for(let i=(e.left+e.right)/2,o=n+1;o<Math.min(innerHeight,e.bottom);o+=5){let a=t.root.elementFromPoint(i,o);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,A=l.top;break}}return{refDOM:r,refTop:A,stack:ob(t.dom)}}function ob(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=ha(r));return e}function mP({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;sb(n,r==0?0:r-e)}function sb(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:A,left:i}=t[n];r.scrollTop!=A+e&&(r.scrollTop=A+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let ma=null;function gP(t){if(t.setActive)return t.setActive();if(ma)return t.focus(ma);let e=ob(t);t.focus(ma==null?{get preventScroll(){return ma={preventScroll:!0},!0}}:void 0),ma||(ma=!1,sb(e,0))}function ab(t,e){let n,r=2e8,A,i=0,o=e.top,a=e.top,l,u;for(let d=t.firstChild,h=0;d;d=d.nextSibling,h++){let p;if(d.nodeType==1)p=d.getClientRects();else if(d.nodeType==3)p=Qi(d).getClientRects();else continue;for(let m=0;m<p.length;m++){let v=p[m];if(v.top<=o&&v.bottom>=a){o=Math.max(v.bottom,o),a=Math.min(v.top,a);let B=v.left>e.left?v.left-e.left:v.right<e.left?e.left-v.right:0;if(B<r){n=d,r=B,A=B&&n.nodeType==3?{left:v.right<e.left?v.right:v.left,top:e.top}:e,d.nodeType==1&&B&&(i=h+(e.left>=(v.left+v.right)/2?1:0));continue}}else v.top>e.top&&!l&&v.left<=e.left&&v.right>=e.left&&(l=d,u={left:Math.max(v.left,Math.min(v.right,e.left)),top:v.top});!n&&(e.left>=v.right&&e.top>=v.top||e.left>=v.left&&e.top>=v.bottom)&&(i=h+1)}}return!n&&l&&(n=l,A=u,r=0),n&&n.nodeType==3?vP(n,A):!n||r&&n.nodeType==1?{node:t,offset:i}:ab(n,A)}function vP(t,e){let n=t.nodeValue.length,r=document.createRange();for(let A=0;A<n;A++){r.setEnd(t,A+1),r.setStart(t,A);let i=mo(r,1);if(i.top!=i.bottom&&Bm(e,i))return{node:t,offset:A+(e.left>=(i.left+i.right)/2?1:0)}}return{node:t,offset:0}}function Bm(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function wP(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function BP(t,e,n){let{node:r,offset:A}=ab(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();i=o.left!=o.right&&n.left>(o.left+o.right)/2?1:-1}return t.docView.posFromDOM(r,A,i)}function yP(t,e,n,r){let A=-1;for(let i=e,o=!1;i!=t.dom;){let a=t.docView.nearestDesc(i,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!o&&l.left>r.left||l.top>r.top?A=a.posBefore:(!o&&l.right<r.left||l.bottom<r.top)&&(A=a.posAfter),o=!0),!a.contentDOM&&A<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;i=a.dom.parentNode}return A>-1?A:t.docView.posFromDOM(e,n,-1)}function lb(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let A=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=A;;){let o=t.childNodes[i];if(o.nodeType==1){let a=o.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Bm(e,u))return lb(o,e,u)}}if((i=(i+1)%r)==A)break}return t}function CP(t,e){let n=t.dom.ownerDocument,r,A=0,i=cP(n,e.left,e.top);i&&({node:r,offset:A}=i);let o=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!o||!t.dom.contains(o.nodeType!=1?o.parentNode:o)){let u=t.dom.getBoundingClientRect();if(!Bm(e,u)||(o=lb(t.dom,e,u),!o))return null}if(pr)for(let u=o;r&&u;u=ha(u))u.draggable&&(r=void 0);if(o=wP(o,e),r){if(MA&&r.nodeType==1&&(A=Math.min(A,r.childNodes.length),A<r.childNodes.length)){let d=r.childNodes[A],h;d.nodeName=="IMG"&&(h=d.getBoundingClientRect()).right<=e.left&&h.bottom>e.top&&A++}let u;Nl&&A&&r.nodeType==1&&(u=r.childNodes[A-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&A--,r==t.dom&&A==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(A==0||r.nodeType!=1||r.childNodes[A-1].nodeName!="BR")&&(a=yP(t,r,A,e))}a==null&&(a=BP(t,o,e));let l=t.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function cb(t){return t.top<t.bottom||t.left<t.right}function mo(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(cb(r))return r}return Array.prototype.find.call(n,cb)||t.getBoundingClientRect()}const bP=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ub(t,e,n){let{node:r,offset:A,atom:i}=t.docView.domFromPos(e,n<0?-1:1),o=Nl||MA;if(r.nodeType==3)if(o&&(bP.test(r.nodeValue)||(n<0?!A:A==r.nodeValue.length))){let l=mo(Qi(r,A,A),n);if(MA&&A&&/\s/.test(r.nodeValue[A-1])&&A<r.nodeValue.length){let u=mo(Qi(r,A-1,A-1),-1);if(u.top==l.top){let d=mo(Qi(r,A,A+1),-1);if(d.top!=l.top)return Ll(d,d.left<u.left)}}return l}else{let l=A,u=A,d=n<0?1:-1;return n<0&&!A?(u++,d=-1):n>=0&&A==r.nodeValue.length?(l--,d=1):n<0?l--:u++,Ll(mo(Qi(r,l,u),d),d<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&A&&(n<0||A==eA(r))){let l=r.childNodes[A-1];if(l.nodeType==1)return ym(l.getBoundingClientRect(),!1)}if(i==null&&A<eA(r)){let l=r.childNodes[A];if(l.nodeType==1)return ym(l.getBoundingClientRect(),!0)}return ym(r.getBoundingClientRect(),n>=0)}if(i==null&&A&&(n<0||A==eA(r))){let l=r.childNodes[A-1],u=l.nodeType==3?Qi(l,eA(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return Ll(mo(u,1),!1)}if(i==null&&A<eA(r)){let l=r.childNodes[A];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?Qi(l,0,o?0:1):l.nodeType==1?l:null:null;if(u)return Ll(mo(u,-1),!0)}return Ll(mo(r.nodeType==3?Qi(r):r,-n),n>=0)}function Ll(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function ym(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function db(t,e,n){let r=t.state,A=t.root.activeElement;r!=e&&t.updateState(e),A!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),A!=t.dom&&A&&A.focus()}}function EP(t,e,n){let r=e.selection,A=n=="up"?r.$from:r.$to;return db(t,e,()=>{let{node:i}=t.docView.domFromPos(A.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(i,!0);if(!a)break;if(a.node.isBlock){i=a.contentDOM||a.dom;break}i=a.dom.parentNode}let o=ub(t,A.pos,1);for(let a=i.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Qi(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let d=l[u];if(d.bottom>d.top+1&&(n=="up"?o.top-d.top>(d.bottom-o.top)*2:d.bottom-o.bottom>(o.bottom-d.top)*2))return!1}}return!0})}const kP=/[\u0590-\u08ac]/;function SP(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let A=r.parentOffset,i=!A,o=A==r.parent.content.size,a=t.domSelection();return a?!kP.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?i:o:db(t,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:d,anchorOffset:h}=t.domSelectionRange(),p=a.caretBidiLevel;a.modify("move",n,"character");let m=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:v,focusOffset:B}=t.domSelectionRange(),y=v&&!m.contains(v.nodeType==1?v:v.parentNode)||l==v&&u==B;try{a.collapse(d,h),l&&(l!=d||u!=h)&&a.extend&&a.extend(l,u)}catch{}return p!=null&&(a.caretBidiLevel=p),y}):r.pos==r.start()||r.pos==r.end()}let fb=null,hb=null,pb=!1;function xP(t,e,n){return fb==e&&hb==n?pb:(fb=e,hb=n,pb=n=="up"||n=="down"?EP(t,e,n):SP(t,e,n))}const nA=0,mb=1,gs=2,ii=3;class Rl{constructor(e,n,r,A){this.parent=e,this.children=n,this.dom=r,this.contentDOM=A,this.dirty=nA,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let A=this.children[n];if(A==e)return r;r+=A.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,o;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(o)+o.size:this.posAtStart}else{let i,o;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(o):this.posAtEnd}let A;if(e==this.dom&&this.contentDOM)A=n>Kn(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))A=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){A=!1;break}if(i.previousSibling)break}if(A==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){A=!0;break}if(i.nextSibling)break}}return A??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,A=e;A;A=A.parentNode){let i=this.getDesc(A),o;if(i&&(!n||i.node))if(r&&(o=i.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let A=e;A;A=A.parentNode){let i=this.getDesc(A);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let A=this.children[n],i=r+A.size;if(r==e&&i!=r){for(;!A.border&&A.children.length;)for(let o=0;o<A.children.length;o++){let a=A.children[o];if(a.size){A=a;break}}return A}if(e<i)return A.descAt(e-r-A.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,A=0;for(let i=0;r<this.children.length;r++){let o=this.children[r],a=i+o.size;if(a>e||o instanceof wb){A=e-i;break}i=a}if(A)return this.children[r].domFromPos(A-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof gb&&i.side>=0;r--);if(n<=0){let i,o=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,o=!1);return i&&n&&o&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?Kn(i.dom)+1:0}}else{let i,o=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,o=!1);return i&&o&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?Kn(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let A=-1,i=-1;for(let o=r,a=0;;a++){let l=this.children[a],u=o+l.size;if(A==-1&&e<=u){let d=o+l.border;if(e>=d&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,d);e=o;for(let h=a;h>0;h--){let p=this.children[h-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){A=Kn(p.dom)+1;break}e-=p.size}A==-1&&(A=0)}if(A>-1&&(u>n||a==this.children.length-1)){n=u;for(let d=a+1;d<this.children.length;d++){let h=this.children[d];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){i=Kn(h.dom);break}n+=h.size}i==-1&&(i=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:e,to:n,fromOffset:A,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,A=!1){let i=Math.min(e,n),o=Math.max(e,n);for(let m=0,v=0;m<this.children.length;m++){let B=this.children[m],y=v+B.size;if(i>v&&o<y)return B.setSelection(e-v-B.border,n-v-B.border,r,A);v=y}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),d=r.domSelectionRange(),h=!1;if((MA||pr)&&e==n){let{node:m,offset:v}=a;if(m.nodeType==3){if(h=!!(v&&m.nodeValue[v-1]==`
|
|
16
|
-
`),h&&v==m.nodeValue.length)for(let B=m,y;B;B=B.parentNode){if(y=B.nextSibling){y.nodeName=="BR"&&(a=l={node:y.parentNode,offset:Kn(y)+1});break}let w=B.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{let B=m.childNodes[v-1];h=B&&(B.nodeName=="BR"||B.contentEditable=="false")}}if(MA&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let m=d.focusNode.childNodes[d.focusOffset];m&&m.contentEditable=="false"&&(A=!0)}if(!(A||h&&pr)&&ps(a.node,a.offset,d.anchorNode,d.anchorOffset)&&ps(l.node,l.offset,d.focusNode,d.focusOffset))return;let p=!1;if((u.extend||e==n)&&!h){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),p=!0}catch{}}if(!p){if(e>n){let v=a;a=l,l=v}let m=document.createRange();m.setEnd(l.node,l.offset),m.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(m)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,A=0;A<this.children.length;A++){let i=this.children[A],o=r+i.size;if(r==o?e<=o&&n>=r:e<o&&n>r){let a=r+i.border,l=o-i.border;if(e>=a&&n<=l){this.dirty=e==r||n==o?gs:mb,e==a&&n==l&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=ii:i.markDirty(e-a,n-a);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?gs:ii}r=o}this.dirty=gs}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?gs:mb;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class gb extends Rl{constructor(e,n,r,A){let i,o=n.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!i)return A;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==nA&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class FP extends Rl{constructor(e,n,r,A){super(e,[],n,null),this.textDOM=r,this.text=A}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class vs extends Rl{constructor(e,n,r,A,i){super(e,[],r,A),this.mark=n,this.spec=i}static create(e,n,r,A){let i=A.nodeViews[n.type.name],o=i&&i(n,A,r);return(!o||!o.dom)&&(o=fs.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new vs(e,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&ii||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ii&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=nA){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=nA}}slice(e,n,r){let A=vs.create(this.parent,this.mark,!0,r),i=this.children,o=this.size;n<o&&(i=bm(i,n,o,r)),e>0&&(i=bm(i,0,e,r));for(let a=0;a<i.length;a++)i[a].parent=A;return A.children=i,A}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class go extends Rl{constructor(e,n,r,A,i,o,a,l,u){super(e,[],i,o),this.node=n,this.outerDeco=r,this.innerDeco=A,this.nodeDOM=a}static create(e,n,r,A,i,o){let a=i.nodeViews[n.type.name],l,u=a&&a(n,i,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,A),d=u&&u.dom,h=u&&u.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:h}=fs.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!h&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let p=d;return d=Cb(d,r,n),u?l=new QP(e,n,r,A,d,h||null,p,u,i,o+1):n.isText?new Ku(e,n,r,A,d,p,i):new go(e,n,r,A,d,h||null,p,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Qe.empty)}return e}matchesNode(e,n,r){return this.dirty==nA&&e.eq(this.node)&&zu(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,A=n,i=e.composing?this.localCompositionInfo(e,n):null,o=i&&i.pos>-1?i:null,a=i&&i.pos<0,l=new MP(this,o&&o.node,e);_P(this.node,this.innerDeco,(u,d,h)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!h&&l.syncToMarks(d==this.node.childCount?Ht.none:this.node.child(d).marks,r,e),l.placeWidget(u,e,A)},(u,d,h,p)=>{l.syncToMarks(u.marks,r,e);let m;l.findNodeMatch(u,d,h,p)||a&&e.state.selection.from>A&&e.state.selection.to<A+u.nodeSize&&(m=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(u,d,h,m,e)||l.updateNextNode(u,d,h,e,p,A)||l.addNode(u,d,h,e,A),A+=u.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==gs)&&(o&&this.protectLocalComposition(e,o),Bb(this.contentDOM,this.children,e),pa&&DP(this.dom))}localCompositionInfo(e,n){let{from:r,to:A}=e.state.selection;if(!(e.state.selection instanceof nt)||r<n||A>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let o=i.nodeValue,a=OP(this.node.content,o,r-n,A-n);return a<0?null:{node:i,pos:a,text:o}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:A}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new FP(this,i,n,A);e.input.compositionNodes.push(o),this.children=bm(this.children,r,r+A.length,e,o)}update(e,n,r,A){return this.dirty==ii||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,A),!0)}updateInner(e,n,r,A){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(A,this.posAtStart),this.dirty=nA}updateOuterDeco(e){if(zu(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=yb(this.dom,this.nodeDOM,Cm(this.outerDeco,this.node,n),Cm(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function vb(t,e,n,r,A){Cb(r,e,t);let i=new go(void 0,t,e,n,r,r,r,A,0);return i.contentDOM&&i.updateChildren(A,0),i}class Ku extends go{constructor(e,n,r,A,i,o,a){super(e,n,r,A,i,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,A){return this.dirty==ii||this.dirty!=nA&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=nA||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,A.trackWrites==this.nodeDOM&&(A.trackWrites=null)),this.node=e,this.dirty=nA,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let A=this.node.cut(e,n),i=document.createTextNode(A.text);return new Ku(this.parent,A,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=ii)}get domAtom(){return!1}isText(e){return this.node.text==e}}class wb extends Rl{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==nA&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class QP extends go{constructor(e,n,r,A,i,o,a,l,u,d){super(e,n,r,A,i,o,a,u,d),this.spec=l}update(e,n,r,A){if(this.dirty==ii)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,A),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,A)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,A){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,A)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Bb(t,e,n){let r=t.firstChild,A=!1;for(let i=0;i<e.length;i++){let o=e[i],a=o.dom;if(a.parentNode==t){for(;a!=r;)r=bb(r),A=!0;r=r.nextSibling}else A=!0,t.insertBefore(a,r);if(o instanceof vs){let l=r?r.previousSibling:t.lastChild;Bb(o.contentDOM,o.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=bb(r),A=!0;A&&n.trackWrites==t&&(n.trackWrites=null)}const Hl=function(t){t&&(this.nodeName=t)};Hl.prototype=Object.create(null);const ws=[new Hl];function Cm(t,e,n){if(t.length==0)return ws;let r=n?ws[0]:new Hl,A=[r];for(let i=0;i<t.length;i++){let o=t[i].type.attrs;if(o){o.nodeName&&A.push(r=new Hl(o.nodeName));for(let a in o){let l=o[a];l!=null&&(n&&A.length==1&&A.push(r=new Hl(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return A}function yb(t,e,n,r){if(n==ws&&r==ws)return e;let A=e;for(let i=0;i<r.length;i++){let o=r[i],a=n[i];if(i){let l;a&&a.nodeName==o.nodeName&&A!=t&&(l=A.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(A),a=ws[0]),A=l}TP(A,a||ws[0],o)}return A}function TP(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],A=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)A.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<A.length;i++)r.indexOf(A[i])==-1&&t.classList.add(A[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,A;for(;A=r.exec(e.style);)t.style.removeProperty(A[1])}n.style&&(t.style.cssText+=n.style)}}function Cb(t,e,n){return yb(t,t,ws,Cm(e,n,t.nodeType!=1))}function zu(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function bb(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class MP{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=IP(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r){let A=0,i=this.stack.length>>1,o=Math.min(i,e.length);for(;A<o&&(A==i-1?this.top:this.stack[A+1<<1]).matchesMark(e[A])&&e[A].type.spec.spanning!==!1;)A++;for(;A<i;)this.destroyRest(),this.top.dirty=nA,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let u=this.top.children[l];if(u.matchesMark(e[i])&&!this.isLocked(u.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=vs.create(this.top,e[i],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,i++}}findNodeMatch(e,n,r,A){let i=-1,o;if(A>=this.preMatch.index&&(o=this.preMatch.matches[A-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))i=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){i=a;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,A,i){let o=this.top.children[A];return o.dirty==ii&&o.dom==o.contentDOM&&(o.dirty=gs),o.update(e,n,r,i)?(this.destroyBetween(this.index,A),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let A=this.index;A<this.top.children.length;A++)if(this.top.children[A]==r)return A}return-1}e=n}}updateNextNode(e,n,r,A,i,o){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof go){let u=this.preMatch.matched.get(l);if(u!=null&&u!=i)return!1;let d=l.dom,h,p=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=ii&&zu(n,l.outerDeco));if(!p&&l.update(e,n,r,A))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!p&&(h=this.recreateWrapper(l,e,n,r,A,o)))return this.destroyBetween(this.index,a),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=gs,h.updateChildren(A,o+1),h.dirty=nA),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,A,i,o){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!zu(r,e.outerDeco)||!A.eq(e.innerDeco))return null;let a=go.create(this.top,n,r,A,i,o);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,A,i){let o=go.create(this.top,e,n,r,A,i);o.contentDOM&&o.updateChildren(A,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,n,r){let A=this.index<this.top.children.length?this.top.children[this.index]:null;if(A&&A.matchesWidget(e)&&(e==A.widget||!A.widget.type.toDOM.parentNode))this.index++;else{let i=new gb(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof vs;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Ku)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((pr||tr)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let A=new wb(this.top,[],r,null);n!=this.top?n.children.push(A):n.children.splice(this.index++,0,A),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function IP(t,e){let n=e,r=n.children.length,A=t.childCount,i=new Map,o=[];e:for(;A>0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof vs)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(A-1))break;--A,i.set(a,A),o.push(a)}}return{index:A,matched:i,matches:o.reverse()}}function UP(t,e){return t.type.side-e.type.side}function _P(t,e,n,r){let A=e.locals(t),i=0;if(A.length==0){for(let u=0;u<t.childCount;u++){let d=t.child(u);r(d,A,e.forChild(i,d),u),i+=d.nodeSize}return}let o=0,a=[],l=null;for(let u=0;;){let d,h;for(;o<A.length&&A[o].to==i;){let y=A[o++];y.widget&&(d?(h||(h=[d])).push(y):d=y)}if(d)if(h){h.sort(UP);for(let y=0;y<h.length;y++)n(h[y],u,!!l)}else n(d,u,!!l);let p,m;if(l)m=-1,p=l,l=null;else if(u<t.childCount)m=u,p=t.child(u++);else break;for(let y=0;y<a.length;y++)a[y].to<=i&&a.splice(y--,1);for(;o<A.length&&A[o].from<=i&&A[o].to>i;)a.push(A[o++]);let v=i+p.nodeSize;if(p.isText){let y=v;o<A.length&&A[o].from<y&&(y=A[o].from);for(let w=0;w<a.length;w++)a[w].to<y&&(y=a[w].to);y<v&&(l=p.cut(y-i),p=p.cut(0,y-i),v=y,m=-1)}else for(;o<A.length&&A[o].to<v;)o++;let B=p.isInline&&!p.isLeaf?a.filter(y=>!y.inline):a.slice();r(p,B,e.forChild(i,p),m),i=v}}function DP(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function OP(t,e,n,r){for(let A=0,i=0;A<t.childCount&&i<=r;){let o=t.child(A++),a=i;if(i+=o.nodeSize,!o.isText)continue;let l=o.text;for(;A<t.childCount;){let u=t.child(A++);if(i+=u.nodeSize,!u.isText)break;l+=u.text}if(i>=n){if(i>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let u=a<r?l.lastIndexOf(e,r-a-1):-1;if(u>=0&&u+e.length+a>=n)return a+u;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function bm(t,e,n,r,A){let i=[];for(let o=0,a=0;o<t.length;o++){let l=t[o],u=a,d=a+=l.size;u>=n||d<=e?i.push(l):(u<e&&i.push(l.slice(0,e-u,r)),A&&(i.push(A),A=void 0),d>n&&i.push(l.slice(n-u,l.size,r)))}return i}function Em(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let A=t.docView.nearestDesc(n.focusNode),i=A&&A.size==0,o=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let a=r.resolve(o),l,u;if($u(n)){for(l=o;A&&!A.node;)A=A.parent;let h=A.node;if(A&&h.isAtom&&qe.isSelectable(h)&&A.parent&&!(h.isInline&&aP(n.focusNode,n.focusOffset,A.dom))){let p=A.posBefore;u=new qe(o==p?a:r.resolve(p))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=o,p=o;for(let m=0;m<n.rangeCount;m++){let v=n.getRangeAt(m);h=Math.min(h,t.docView.posFromDOM(v.startContainer,v.startOffset,1)),p=Math.max(p,t.docView.posFromDOM(v.endContainer,v.endOffset,-1))}if(h<0)return null;[l,o]=p==t.state.selection.anchor?[p,h]:[h,p],a=r.resolve(o)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let d=r.resolve(l);if(!u){let h=e=="pointer"||t.state.selection.head<a.pos&&!i?1:-1;u=Sm(t,d,a,h)}return u}function Eb(t){return t.editable?t.hasFocus():Mb(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Ii(t,e=!1){let n=t.state.selection;if(Fb(t,n),!!Eb(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&tr){let r=t.domSelectionRange(),A=t.domObserver.currentSelection;if(r.anchorNode&&A.anchorNode&&ps(r.anchorNode,r.anchorOffset,A.anchorNode,A.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)LP(t);else{let{anchor:r,head:A}=n,i,o;kb&&!(n instanceof nt)&&(n.$from.parent.inlineContent||(i=Sb(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=Sb(t,n.to))),t.docView.setSelection(r,A,t,e),kb&&(i&&xb(i),o&&xb(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&NP(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const kb=pr||tr&&Ab<63;function Sb(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),A=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(pr&&A&&A.contentEditable=="false")return km(A);if((!A||A.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(A)return km(A);if(i)return km(i)}}function km(t){return t.contentEditable="true",pr&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function xb(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function NP(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,A=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=A)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Eb(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function LP(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,A=r.nodeName=="IMG";A?n.setStart(r.parentNode,Kn(r)+1):n.setStart(r,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!A&&!t.state.selection.visible&&kr&&po<=11&&(r.disabled=!0,r.disabled=!1)}function Fb(t,e){if(e instanceof qe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Qb(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Qb(t)}function Qb(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Sm(t,e,n,r){return t.someProp("createSelectionBetween",A=>A(t,e,n))||nt.between(e,n,r)}function Tb(t){return t.editable&&!t.hasFocus()?!1:Mb(t)}function Mb(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function RP(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return ps(e.node,e.offset,n.anchorNode,n.anchorOffset)}function xm(t,e){let{$anchor:n,$head:r}=t.selection,A=e>0?n.max(r):n.min(r),i=A.parent.inlineContent?A.depth?t.doc.resolve(e>0?A.after():A.before()):null:A;return i&&st.findFrom(i,e)}function vo(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Ib(t,e,n){let r=t.state.selection;if(r instanceof nt)if(n.indexOf("s")>-1){let{$head:A}=r,i=A.textOffset?null:e<0?A.nodeBefore:A.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=t.state.doc.resolve(A.pos+i.nodeSize*(e<0?-1:1));return vo(t,new nt(r.$anchor,o))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let A=xm(t.state,e);return A&&A instanceof qe?vo(t,A):!1}else if(!(tA&&n.indexOf("m")>-1)){let A=r.$head,i=A.textOffset?null:e<0?A.nodeBefore:A.nodeAfter,o;if(!i||i.isText)return!1;let a=e<0?A.pos-i.nodeSize:A.pos;return i.isAtom||(o=t.docView.descAt(a))&&!o.contentDOM?qe.isSelectable(i)?vo(t,new qe(e<0?t.state.doc.resolve(A.pos-i.nodeSize):A)):Nl?vo(t,new nt(t.state.doc.resolve(e<0?a:a+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof qe&&r.node.isInline)return vo(t,new nt(e>0?r.$to:r.$from));{let A=xm(t.state,e);return A?vo(t,A):!1}}}function Wu(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Pl(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ga(t,e){return e<0?HP(t):PP(t)}function HP(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let A,i,o=!1;for(MA&&n.nodeType==1&&r<Wu(n)&&Pl(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Pl(a,-1))A=n,i=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(Ub(n))break;{let a=n.previousSibling;for(;a&&Pl(a,-1);)A=n.parentNode,i=Kn(a),a=a.previousSibling;if(a)n=a,r=Wu(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}o?Fm(t,n,r):A&&Fm(t,A,i)}function PP(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let A=Wu(n),i,o;for(;;)if(r<A){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Pl(a,1))i=n,o=++r;else break}else{if(Ub(n))break;{let a=n.nextSibling;for(;a&&Pl(a,1);)i=a.parentNode,o=Kn(a)+1,a=a.nextSibling;if(a)n=a,r=0,A=Wu(n);else{if(n=n.parentNode,n==t.dom)break;r=A=0}}}i&&Fm(t,i,o)}function Ub(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function $P(t,e){for(;t&&e==t.childNodes.length&&!Ol(t);)e=Kn(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function KP(t,e){for(;t&&!e&&!Ol(t);)e=Kn(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function Fm(t,e,n){if(e.nodeType!=3){let i,o;(o=$P(e,n))?(e=o,n=0):(i=KP(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if($u(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:A}=t;setTimeout(()=>{t.state==A&&Ii(t)},50)}function _b(t,e){let n=t.state.doc.resolve(e);if(!(tr||uP)&&n.parent.inlineContent){let A=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>A.top&&o<A.bottom&&Math.abs(i.left-A.left)>1)return i.left<A.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>A.top&&o<A.bottom&&Math.abs(i.left-A.left)>1)return i.left>A.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Db(t,e,n){let r=t.state.selection;if(r instanceof nt&&!r.empty||n.indexOf("s")>-1||tA&&n.indexOf("m")>-1)return!1;let{$from:A,$to:i}=r;if(!A.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let o=xm(t.state,e);if(o&&o instanceof qe)return vo(t,o)}if(!A.parent.inlineContent){let o=e<0?A:i,a=r instanceof Lr?st.near(o,e):st.findFrom(o,e);return a?vo(t,a):!1}return!1}function Ob(t,e){if(!(t.state.selection instanceof nt))return!0;let{$head:n,$anchor:r,empty:A}=t.state.selection;if(!n.sameParent(r))return!0;if(!A)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let o=t.state.tr;return e<0?o.delete(n.pos-i.nodeSize,n.pos):o.delete(n.pos,n.pos+i.nodeSize),t.dispatch(o),!0}return!1}function Nb(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function zP(t){if(!pr||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Nb(t,r,"true"),setTimeout(()=>Nb(t,r,"false"),20)}return!1}function WP(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function GP(t,e){let n=e.keyCode,r=WP(e);if(n==8||tA&&n==72&&r=="c")return Ob(t,-1)||ga(t,-1);if(n==46&&!e.shiftKey||tA&&n==68&&r=="c")return Ob(t,1)||ga(t,1);if(n==13||n==27)return!0;if(n==37||tA&&n==66&&r=="c"){let A=n==37?_b(t,t.state.selection.from)=="ltr"?-1:1:-1;return Ib(t,A,r)||ga(t,A)}else if(n==39||tA&&n==70&&r=="c"){let A=n==39?_b(t,t.state.selection.from)=="ltr"?1:-1:1;return Ib(t,A,r)||ga(t,A)}else{if(n==38||tA&&n==80&&r=="c")return Db(t,-1,r)||ga(t,-1);if(n==40||tA&&n==78&&r=="c")return zP(t)||Db(t,1,r)||ga(t,1);if(r==(tA?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Qm(t,e){t.someProp("transformCopied",m=>{e=m(e,t)});let n=[],{content:r,openStart:A,openEnd:i}=e;for(;A>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){A--,i--;let m=r.firstChild;n.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),r=m.content}let o=t.someProp("clipboardSerializer")||fs.fromSchema(t.state.schema),a=Wb(),l=a.createElement("div");l.appendChild(o.serializeFragment(r,{document:a}));let u=l.firstChild,d,h=0;for(;u&&u.nodeType==1&&(d=Kb[u.nodeName.toLowerCase()]);){for(let m=d.length-1;m>=0;m--){let v=a.createElement(d[m]);for(;l.firstChild;)v.appendChild(l.firstChild);l.appendChild(v),h++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${A} ${i}${h?` -${h}`:""} ${JSON.stringify(n)}`);let p=t.someProp("clipboardTextSerializer",m=>m(e,t))||e.content.textBetween(0,e.content.size,`
|
|
17
|
-
|
|
18
|
-
`);return{dom:l,text:p,slice:e}}function Lb(t,e,n,r,A){let i=A.parent.type.spec.code,o,a;if(!n&&!e)return null;let l=e&&(r||i||!n);if(l){if(t.someProp("transformPastedText",p=>{e=p(e,i||r,t)}),i)return e?new De(Qe.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
19
|
-
`))),0,0):De.empty;let h=t.someProp("clipboardTextParser",p=>p(e,A,r,t));if(h)a=h;else{let p=A.marks(),{schema:m}=t.state,v=fs.fromSchema(m);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(B=>{let y=o.appendChild(document.createElement("p"));B&&y.appendChild(v.serializeNode(m.text(B,p)))})}}else t.someProp("transformPastedHTML",h=>{n=h(n,t)}),o=JP(n),Nl&&jP(o);let u=o&&o.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let h=+d[3];h>0;h--){let p=o.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;o=p}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||lo.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||d),context:A,ruleFromNode(p){return p.nodeName=="BR"&&!p.nextSibling&&p.parentNode&&!YP.test(p.parentNode.nodeName)?{ignore:!0}:null}})),d)a=ZP($b(a,+d[1],+d[2]),d[4]);else if(a=De.maxOpen(qP(a.content,A),!0),a.openStart||a.openEnd){let h=0,p=0;for(let m=a.content.firstChild;h<a.openStart&&!m.type.spec.isolating;h++,m=m.firstChild);for(let m=a.content.lastChild;p<a.openEnd&&!m.type.spec.isolating;p++,m=m.lastChild);a=$b(a,h,p)}return t.someProp("transformPasted",h=>{a=h(a,t)}),a}const YP=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function qP(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let A=e.node(n).contentMatchAt(e.index(n)),i,o=[];if(t.forEach(a=>{if(!o)return;let l=A.findWrapping(a.type),u;if(!l)return o=null;if(u=o.length&&i.length&&Hb(l,i,a,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=Pb(o[o.length-1],i.length));let d=Rb(a,l);o.push(d),A=A.matchType(d.type),i=l}}),o)return Qe.from(o)}return t}function Rb(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,Qe.from(t));return t}function Hb(t,e,n,r,A){if(A<t.length&&A<e.length&&t[A]==e[A]){let i=Hb(t,e,n,r.lastChild,A+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(A==t.length-1?n.type:t[A+1]))return r.copy(r.content.append(Qe.from(Rb(n,t,A+1))))}}function Pb(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Pb(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(Qe.empty,!0);return t.copy(n.append(r))}function Tm(t,e,n,r,A,i){let o=e<0?t.firstChild:t.lastChild,a=o.content;return t.childCount>1&&(i=0),A<r-1&&(a=Tm(a,e,n,r,A+1,i)),A>=n&&(a=e<0?o.contentMatchAt(0).fillBefore(a,i<=A).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(Qe.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(a))}function $b(t,e,n){return e<t.openStart&&(t=new De(Tm(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new De(Tm(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Kb={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let zb=null;function Wb(){return zb||(zb=document.implementation.createHTMLDocument("title"))}let Mm=null;function XP(t){let e=window.trustedTypes;return e?(Mm||(Mm=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Mm.createHTML(t)):t}function JP(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Wb().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),A;if((A=r&&Kb[r[1].toLowerCase()])&&(t=A.map(i=>"<"+i+">").join("")+t+A.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=XP(t),A)for(let i=0;i<A.length;i++)n=n.querySelector(A[i])||n;return n}function jP(t){let e=t.querySelectorAll(tr?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function ZP(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:A,openStart:i,openEnd:o}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;A=Qe.from(l.create(r[a+1],A)),i++,o++}return new De(A,i,o)}const mr={},gr={},VP={touchstart:!0,touchmove:!0};class e4{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function t4(t){for(let e in mr){let n=mr[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{r4(t,r)&&!Um(t,r)&&(t.editable||!(r.type in gr))&&n(t,r)},VP[e]?{passive:!0}:void 0)}pr&&t.dom.addEventListener("input",()=>null),Im(t)}function wo(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function n4(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Im(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Um(t,r))})}function Um(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function r4(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function A4(t,e){!Um(t,e)&&mr[e.type]&&(t.editable||!(e.type in gr))&&mr[e.type](t,e)}gr.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Yb(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Ti&&tr&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),pa&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",A=>A(t,ms(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||GP(t,n)?n.preventDefault():wo(t,"key")},gr.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},gr.keypress=(t,e)=>{let n=e;if(Yb(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||tA&&n.metaKey)return;if(t.someProp("handleKeyPress",A=>A(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof nt)||!r.$from.sameParent(r.$to)){let A=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(A).scrollIntoView();!/[\r\n]/.test(A)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,A,i))&&t.dispatch(i()),n.preventDefault()}};function Gu(t){return{left:t.clientX,top:t.clientY}}function i4(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function _m(t,e,n,r,A){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let o=i.depth+1;o>0;o--)if(t.someProp(e,a=>o>i.depth?a(t,n,i.nodeAfter,i.before(o),A,!0):a(t,n,i.node(o),i.before(o),A,!1)))return!0;return!1}function va(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function o4(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&qe.isSelectable(r)?(va(t,new qe(n)),!0):!1}function s4(t,e){if(e==-1)return!1;let n=t.state.selection,r,A;n instanceof qe&&(r=n.node);let i=t.state.doc.resolve(e);for(let o=i.depth+1;o>0;o--){let a=o>i.depth?i.nodeAfter:i.node(o);if(qe.isSelectable(a)){r&&n.$from.depth>0&&o>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?A=i.before(n.$from.depth):A=i.before(o);break}}return A!=null?(va(t,qe.create(t.state.doc,A)),!0):!1}function a4(t,e,n,r,A){return _m(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(A?s4(t,n):o4(t,n))}function l4(t,e,n,r){return _m(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",A=>A(t,e,r))}function c4(t,e,n,r){return _m(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",A=>A(t,e,r))||u4(t,n,r)}function u4(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(va(t,nt.create(r,0,r.content.size)),!0):!1;let A=r.resolve(e);for(let i=A.depth+1;i>0;i--){let o=i>A.depth?A.nodeAfter:A.node(i),a=A.before(i);if(o.inlineContent)va(t,nt.create(r,a+1,a+1+o.content.size));else if(qe.isSelectable(o))va(t,qe.create(r,a));else continue;return!0}}function Dm(t){return Yu(t)}const Gb=tA?"metaKey":"ctrlKey";mr.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Dm(t),A=Date.now(),i="singleClick";A-t.input.lastClick.time<500&&i4(n,t.input.lastClick)&&!n[Gb]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:A,x:n.clientX,y:n.clientY,type:i,button:n.button};let o=t.posAtCoords(Gu(n));o&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new d4(t,o,n,!!r)):(i=="doubleClick"?l4:c4)(t,o.pos,o.inside,n)?n.preventDefault():wo(t,"pointer"))};class d4{constructor(e,n,r,A){this.view=e,this.pos=n,this.event=r,this.flushed=A,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Gb],this.allowDefault=r.shiftKey;let i,o;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),o=n.inside;else{let d=e.state.doc.resolve(n.pos);i=d.parent,o=d.depth?d.before():0}const a=A?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:u}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||u instanceof qe&&u.from<=o&&u.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&MA&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),wo(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Ii(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Gu(e))),this.updateAllowDefault(e),this.allowDefault||!n?wo(this.view,"pointer"):a4(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||pr&&this.mightDrag&&!this.mightDrag.node.isAtom||tr&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(va(this.view,st.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):wo(this.view,"pointer")}move(e){this.updateAllowDefault(e),wo(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}mr.touchstart=t=>{t.input.lastTouch=Date.now(),Dm(t),wo(t,"pointer")},mr.touchmove=t=>{t.input.lastTouch=Date.now(),wo(t,"pointer")},mr.contextmenu=t=>Dm(t);function Yb(t,e){return t.composing?!0:pr&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const f4=Ti?5e3:-1;gr.compositionstart=gr.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof nt&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Yu(t,!0),t.markCursor=null;else if(Yu(t,!e.selection.empty),MA&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let A=r.focusNode,i=r.focusOffset;A&&A.nodeType==1&&i!=0;){let o=i<0?A.lastChild:A.childNodes[i-1];if(!o)break;if(o.nodeType==3){let a=t.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else A=o,i=-1}}t.input.composing=!0}qb(t,f4)},gr.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,qb(t,20))};function qb(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Yu(t),e))}function Xb(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=p4());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function h4(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=oP(e.focusNode,e.focusOffset),r=sP(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let A=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!A||!A.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function p4(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Yu(t,e=!1){if(!(Ti&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Xb(t),e||t.docView&&t.docView.dirty){let n=Em(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function m4(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),A=document.createRange();A.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(A),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const $l=kr&&po<15||pa&&dP<604;mr.copy=gr.cut=(t,e)=>{let n=e,r=t.state.selection,A=n.type=="cut";if(r.empty)return;let i=$l?null:n.clipboardData,o=r.content(),{dom:a,text:l}=Qm(t,o);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):m4(t,a),A&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function g4(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function v4(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let A=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Kl(t,r.value,null,A,e):Kl(t,r.textContent,r.innerHTML,A,e)},50)}function Kl(t,e,n,r,A){let i=Lb(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,A,i||De.empty)))return!0;if(!i)return!1;let o=g4(i),a=o?t.state.tr.replaceSelectionWith(o,r):t.state.tr.replaceSelection(i);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Jb(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}gr.paste=(t,e)=>{let n=e;if(t.composing&&!Ti)return;let r=$l?null:n.clipboardData,A=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Kl(t,Jb(r),r.getData("text/html"),A,n)?n.preventDefault():v4(t,n)};class jb{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const w4=tA?"altKey":"ctrlKey";function Zb(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[w4]}mr.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let A=t.state.selection,i=A.empty?null:t.posAtCoords(Gu(n)),o;if(!(i&&i.pos>=A.from&&i.pos<=(A instanceof qe?A.to-1:A.to))){if(r&&r.mightDrag)o=qe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=t.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=t.docView&&(o=qe.create(t.state.doc,h.posBefore))}}let a=(o||t.state.selection).content(),{dom:l,text:u,slice:d}=Qm(t,a);(!n.dataTransfer.files.length||!tr||Ab>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData($l?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",$l||n.dataTransfer.setData("text/plain",u),t.dragging=new jb(d,Zb(t,n),o)},mr.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},gr.dragover=gr.dragenter=(t,e)=>e.preventDefault(),gr.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let A=t.posAtCoords(Gu(n));if(!A)return;let i=t.state.doc.resolve(A.pos),o=r&&r.slice;o?t.someProp("transformPasted",v=>{o=v(o,t)}):o=Lb(t,Jb(n.dataTransfer),$l?null:n.dataTransfer.getData("text/html"),!1,i);let a=!!(r&&Zb(t,n));if(t.someProp("handleDrop",v=>v(t,n,o||De.empty,a))){n.preventDefault();return}if(!o)return;n.preventDefault();let l=o?FC(t.state.doc,i.pos,o):i.pos;l==null&&(l=i.pos);let u=t.state.tr;if(a){let{node:v}=r;v?v.replace(u):u.deleteSelection()}let d=u.mapping.map(l),h=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,p=u.doc;if(h?u.replaceRangeWith(d,d,o.content.firstChild):u.replaceRange(d,d,o),u.doc.eq(p))return;let m=u.doc.resolve(d);if(h&&qe.isSelectable(o.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new qe(m));else{let v=u.mapping.map(l);u.mapping.maps[u.mapping.maps.length-1].forEach((B,y,w,C)=>v=C),u.setSelection(Sm(t,m,u.doc.resolve(v)))}t.focus(),t.dispatch(u.setMeta("uiEvent","drop"))},mr.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Ii(t)},20))},mr.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},mr.beforeinput=(t,e)=>{if(tr&&Ti&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,ms(8,"Backspace")))))return;let{$cursor:A}=t.state.selection;A&&A.pos>0&&t.dispatch(t.state.tr.delete(A.pos-1,A.pos).scrollIntoView())},50)}};for(let t in gr)mr[t]=gr[t];function zl(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class qu{constructor(e,n){this.toDOM=e,this.spec=n||Bs,this.side=this.spec.side||0}map(e,n,r,A){let{pos:i,deleted:o}=e.mapResult(n.from+A,this.side<0?-1:1);return o?null:new vr(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof qu&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&zl(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Bo{constructor(e,n){this.attrs=e,this.spec=n||Bs}map(e,n,r,A){let i=e.map(n.from+A,this.spec.inclusiveStart?-1:1)-r,o=e.map(n.to+A,this.spec.inclusiveEnd?1:-1)-r;return i>=o?null:new vr(i,o,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Bo&&zl(this.attrs,e.attrs)&&zl(this.spec,e.spec)}static is(e){return e.type instanceof Bo}destroy(){}}class Om{constructor(e,n){this.attrs=e,this.spec=n||Bs}map(e,n,r,A){let i=e.mapResult(n.from+A,1);if(i.deleted)return null;let o=e.mapResult(n.to+A,-1);return o.deleted||o.pos<=i.pos?null:new vr(i.pos-r,o.pos-r,this)}valid(e,n){let{index:r,offset:A}=e.content.findIndex(n.from),i;return A==n.from&&!(i=e.child(r)).isText&&A+i.nodeSize==n.to}eq(e){return this==e||e instanceof Om&&zl(this.attrs,e.attrs)&&zl(this.spec,e.spec)}destroy(){}}class vr{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new vr(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new vr(e,e,new qu(n,r))}static inline(e,n,r,A){return new vr(e,n,new Bo(r,A))}static node(e,n,r,A){return new vr(e,n,new Om(r,A))}get spec(){return this.type.spec}get inline(){return this.type instanceof Bo}get widget(){return this.type instanceof qu}}const wa=[],Bs={};class tn{constructor(e,n){this.local=e.length?e:wa,this.children=n.length?n:wa}static create(e,n){return n.length?Xu(n,e,0,Bs):nr}find(e,n,r){let A=[];return this.findInner(e??0,n??1e9,A,0,r),A}findInner(e,n,r,A,i){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=n&&a.to>=e&&(!i||i(a.spec))&&r.push(a.copy(a.from+A,a.to+A))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>e){let a=this.children[o]+1;this.children[o+2].findInner(e-a,n-a,r,A+a,i)}}map(e,n,r){return this==nr||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Bs)}mapInner(e,n,r,A,i){let o;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,A);l&&l.type.valid(n,l)?(o||(o=[])).push(l):i.onRemove&&i.onRemove(this.local[a].spec)}return this.children.length?B4(this.children,o||[],e,n,r,A,i):o?new tn(o.sort(ys),wa):nr}add(e,n){return n.length?this==nr?tn.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let A,i=0;e.forEach((a,l)=>{let u=l+r,d;if(d=e1(n,a,u)){for(A||(A=this.children.slice());i<A.length&&A[i]<l;)i+=3;A[i]==l?A[i+2]=A[i+2].addInner(a,d,u+1):A.splice(i,0,l,l+a.nodeSize,Xu(d,a,u+1,Bs)),i+=3}});let o=Vb(i?t1(n):n,-r);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||o.splice(a--,1);return new tn(o.length?this.local.concat(o).sort(ys):this.local,A||this.children)}remove(e){return e.length==0||this==nr?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,A=this.local;for(let i=0;i<r.length;i+=3){let o,a=r[i]+n,l=r[i+1]+n;for(let d=0,h;d<e.length;d++)(h=e[d])&&h.from>a&&h.to<l&&(e[d]=null,(o||(o=[])).push(h));if(!o)continue;r==this.children&&(r=this.children.slice());let u=r[i+2].removeInner(o,a+1);u!=nr?r[i+2]=u:(r.splice(i,3),i-=3)}if(A.length){for(let i=0,o;i<e.length;i++)if(o=e[i])for(let a=0;a<A.length;a++)A[a].eq(o,n)&&(A==this.local&&(A=this.local.slice()),A.splice(a--,1))}return r==this.children&&A==this.local?this:A.length||r.length?new tn(A,r):nr}forChild(e,n){if(this==nr)return this;if(n.isLeaf)return tn.empty;let r,A;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let i=e+1,o=i+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<o&&l.to>i&&l.type instanceof Bo){let u=Math.max(i,l.from)-i,d=Math.min(o,l.to)-i;u<d&&(A||(A=[])).push(l.copy(u,d))}}if(A){let a=new tn(A.sort(ys),wa);return r?new yo([a,r]):a}return r||nr}eq(e){if(this==e)return!0;if(!(e instanceof tn)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Nm(this.localsInner(e))}localsInner(e){if(this==nr)return wa;if(e.inlineContent||!this.local.some(Bo.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Bo||n.push(this.local[r]);return n}forEachSet(e){e(this)}}tn.empty=new tn([],[]),tn.removeOverlap=Nm;const nr=tn.empty;class yo{constructor(e){this.members=e}map(e,n){const r=this.members.map(A=>A.map(e,n,Bs));return yo.from(r)}forChild(e,n){if(n.isLeaf)return tn.empty;let r=[];for(let A=0;A<this.members.length;A++){let i=this.members[A].forChild(e,n);i!=nr&&(i instanceof yo?r=r.concat(i.members):r.push(i))}return yo.from(r)}eq(e){if(!(e instanceof yo)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let A=0;A<this.members.length;A++){let i=this.members[A].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let o=0;o<i.length;o++)n.push(i[o])}}return n?Nm(r?n:n.sort(ys)):wa}static from(e){switch(e.length){case 0:return nr;case 1:return e[0];default:return new yo(e.every(n=>n instanceof tn)?e:e.reduce((n,r)=>n.concat(r instanceof tn?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function B4(t,e,n,r,A,i,o){let a=t.slice();for(let u=0,d=i;u<n.maps.length;u++){let h=0;n.maps[u].forEach((p,m,v,B)=>{let y=B-v-(m-p);for(let w=0;w<a.length;w+=3){let C=a[w+1];if(C<0||p>C+d-h)continue;let k=a[w]+d-h;m>=k?a[w+1]=p<=k?-2:-1:p>=d&&y&&(a[w]+=y,a[w+1]+=y)}h+=y}),d=n.maps[u].map(d,-1)}let l=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){l=!0,a[u+1]=-1;continue}let d=n.map(t[u]+i),h=d-A;if(h<0||h>=r.content.size){l=!0;continue}let p=n.map(t[u+1]+i,-1),m=p-A,{index:v,offset:B}=r.content.findIndex(h),y=r.maybeChild(v);if(y&&B==h&&B+y.nodeSize==m){let w=a[u+2].mapInner(n,y,d+1,t[u]+i+1,o);w!=nr?(a[u]=h,a[u+1]=m,a[u+2]=w):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=y4(a,t,e,n,A,i,o),d=Xu(u,r,0,o);e=d.local;for(let h=0;h<a.length;h+=3)a[h+1]<0&&(a.splice(h,3),h-=3);for(let h=0,p=0;h<d.children.length;h+=3){let m=d.children[h];for(;p<a.length&&a[p]<m;)p+=3;a.splice(p,0,d.children[h],d.children[h+1],d.children[h+2])}}return new tn(e.sort(ys),a)}function Vb(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let A=t[r];n.push(new vr(A.from+e,A.to+e,A.type))}return n}function y4(t,e,n,r,A,i,o){function a(l,u){for(let d=0;d<l.local.length;d++){let h=l.local[d].map(r,A,u);h?n.push(h):o.onRemove&&o.onRemove(l.local[d].spec)}for(let d=0;d<l.children.length;d+=3)a(l.children[d+2],l.children[d]+u+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+i+1);return n}function e1(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,A=null;for(let i=0,o;i<t.length;i++)(o=t[i])&&o.from>n&&o.to<r&&((A||(A=[])).push(o),t[i]=null);return A}function t1(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Xu(t,e,n,r){let A=[],i=!1;e.forEach((a,l)=>{let u=e1(t,a,l+n);if(u){i=!0;let d=Xu(u,a,n+l+1,r);d!=nr&&A.push(l,l+a.nodeSize,d)}});let o=Vb(i?t1(t):t,-n).sort(ys);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||(r.onRemove&&r.onRemove(o[a].spec),o.splice(a--,1));return o.length||A.length?new tn(o,A):nr}function ys(t,e){return t.from-e.from||t.to-e.to}function Nm(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let A=n+1;A<e.length;A++){let i=e[A];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[A]=i.copy(i.from,r.to),n1(e,A+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),n1(e,A,r.copy(i.from,r.to)));break}}}return e}function n1(t,e,n){for(;e<t.length&&ys(n,t[e])>0;)e++;t.splice(e,0,n)}function Lm(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=nr&&e.push(r)}),t.cursorWrapper&&e.push(tn.create(t.state.doc,[t.cursorWrapper.deco])),yo.from(e)}const C4={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},b4=kr&&po<=11;class E4{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class k4{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new E4,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let A=0;A<r.length;A++)this.queue.push(r[A]);kr&&po<=11&&r.some(A=>A.type=="childList"&&A.removedNodes.length||A.type=="characterData"&&A.oldValue.length>A.target.nodeValue.length)?this.flushSoon():this.flush()}),b4&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,C4)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Tb(this.view)){if(this.suppressingSelectionUpdates)return Ii(this.view);if(kr&&po<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ps(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=ha(i))n.add(i);for(let i=e.anchorNode;i;i=ha(i))if(n.has(i)){r=i;break}let A=r&&this.view.docView.nearestDesc(r);if(A&&A.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),A=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Tb(e)&&!this.ignoreSelectionChange(r),i=-1,o=-1,a=!1,l=[];if(e.editable)for(let d=0;d<n.length;d++){let h=this.registerMutation(n[d],l);h&&(i=i<0?h.from:Math.min(h.from,i),o=o<0?h.to:Math.max(h.to,o),h.typeOver&&(a=!0))}if(MA&&l.length){let d=l.filter(h=>h.nodeName=="BR");if(d.length==2){let[h,p]=d;h.parentNode&&h.parentNode.parentNode==p.parentNode?p.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let p of d){let m=p.parentNode;m&&m.nodeName=="LI"&&(!h||F4(e,h)!=m)&&p.remove()}}}let u=null;i<0&&A&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&$u(r)&&(u=Em(e))&&u.eq(st.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ii(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||A)&&(i>-1&&(e.docView.markDirty(i,o),S4(e)),this.handleDOMChange(i,o,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Ii(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let h=e.addedNodes[d];n.push(h),h.nodeType==3&&(this.lastChangedTextNode=h)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let A=e.previousSibling,i=e.nextSibling;if(kr&&po<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:h,nextSibling:p}=e.addedNodes[d];(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(A=h),(!p||Array.prototype.indexOf.call(e.addedNodes,p)<0)&&(i=p)}let o=A&&A.parentNode==e.target?Kn(A)+1:0,a=r.localPosFromDOM(e.target,o,-1),l=i&&i.parentNode==e.target?Kn(i):e.target.childNodes.length,u=r.localPosFromDOM(e.target,l,1);return{from:a,to:u}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let r1=new WeakMap,A1=!1;function S4(t){if(!r1.has(t)&&(r1.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=MA,A1)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),A1=!0}}function i1(t,e){let n=e.startContainer,r=e.startOffset,A=e.endContainer,i=e.endOffset,o=t.domAtPos(t.state.selection.anchor);return ps(o.node,o.offset,A,i)&&([n,r,A,i]=[A,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:A,focusOffset:i}}function x4(t,e){if(e.getComposedRanges){let A=e.getComposedRanges(t.root)[0];if(A)return i1(t,A)}let n;function r(A){A.preventDefault(),A.stopImmediatePropagation(),n=A.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?i1(t,n):null}function F4(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function Q4(t,e,n){let{node:r,fromOffset:A,toOffset:i,from:o,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),u,d=l.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:l.anchorOffset}],$u(l)||u.push({node:l.focusNode,offset:l.focusOffset})),tr&&t.input.lastKeyCode===8)for(let y=i;y>A;y--){let w=r.childNodes[y-1],C=w.pmViewDesc;if(w.nodeName=="BR"&&!C){i=y;break}if(!C||C.size)break}let h=t.state.doc,p=t.someProp("domParser")||lo.fromSchema(t.state.schema),m=h.resolve(o),v=null,B=p.parse(r,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:A,to:i,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:T4,context:m});if(u&&u[0].pos!=null){let y=u[0].pos,w=u[1]&&u[1].pos;w==null&&(w=y),v={anchor:y+o,head:w+o}}return{doc:B,sel:v,from:o,to:a}}function T4(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(pr&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||pr&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const M4=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function I4(t,e,n,r,A){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let K=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,q=Em(t,K);if(q&&!t.state.selection.eq(q)){if(tr&&Ti&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",me=>me(t,ms(13,"Enter"))))return;let ce=t.state.tr.setSelection(q);K=="pointer"?ce.setMeta("pointer",!0):K=="key"&&ce.scrollIntoView(),i&&ce.setMeta("composition",i),t.dispatch(ce)}return}let o=t.state.doc.resolve(e),a=o.sharedDepth(n);e=o.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,u=Q4(t,e,n),d=t.state.doc,h=d.slice(u.from,u.to),p,m;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(p=t.state.selection.to,m="end"):(p=t.state.selection.from,m="start"),t.input.lastKeyCode=null;let v=D4(h.content,u.doc.content,u.from,p,m);if(v&&t.input.domChangeCount++,(pa&&t.input.lastIOSEnter>Date.now()-225||Ti)&&A.some(K=>K.nodeType==1&&!M4.test(K.nodeName))&&(!v||v.endA>=v.endB)&&t.someProp("handleKeyDown",K=>K(t,ms(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!v)if(r&&l instanceof nt&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))v={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let K=o1(t,t.state.doc,u.sel);if(K&&!K.eq(t.state.selection)){let q=t.state.tr.setSelection(K);i&&q.setMeta("composition",i),t.dispatch(q)}}return}t.state.selection.from<t.state.selection.to&&v.start==v.endB&&t.state.selection instanceof nt&&(v.start>t.state.selection.from&&v.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?v.start=t.state.selection.from:v.endA<t.state.selection.to&&v.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(v.endB+=t.state.selection.to-v.endA,v.endA=t.state.selection.to)),kr&&po<=11&&v.endB==v.start+1&&v.endA==v.start&&v.start>u.from&&u.doc.textBetween(v.start-u.from-1,v.start-u.from+1)==" "&&(v.start--,v.endA--,v.endB--);let B=u.doc.resolveNoCache(v.start-u.from),y=u.doc.resolveNoCache(v.endB-u.from),w=d.resolve(v.start),C=B.sameParent(y)&&B.parent.inlineContent&&w.end()>=v.endA,k;if((pa&&t.input.lastIOSEnter>Date.now()-225&&(!C||A.some(K=>K.nodeName=="DIV"||K.nodeName=="P"))||!C&&B.pos<u.doc.content.size&&(!B.sameParent(y)||!B.parent.inlineContent)&&!/\S/.test(u.doc.textBetween(B.pos,y.pos,"",""))&&(k=st.findFrom(u.doc.resolve(B.pos+1),1,!0))&&k.head>B.pos)&&t.someProp("handleKeyDown",K=>K(t,ms(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>v.start&&_4(d,v.start,v.endA,B,y)&&t.someProp("handleKeyDown",K=>K(t,ms(8,"Backspace")))){Ti&&tr&&t.domObserver.suppressSelectionUpdates();return}tr&&v.endB==v.start&&(t.input.lastChromeDelete=Date.now()),Ti&&!C&&B.start()!=y.start()&&y.parentOffset==0&&B.depth==y.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==v.endA&&(v.endB-=2,y=u.doc.resolveNoCache(v.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(K){return K(t,ms(13,"Enter"))})},20));let F=v.start,U=v.endA,D=K=>{let q=K||t.state.tr.replace(F,U,u.doc.slice(v.start-u.from,v.endB-u.from));if(u.sel){let ce=o1(t,q.doc,u.sel);ce&&!(tr&&t.composing&&ce.empty&&(v.start!=v.endB||t.input.lastChromeDelete<Date.now()-100)&&(ce.head==F||ce.head==q.mapping.map(U)-1)||kr&&ce.empty&&ce.head==F)&&q.setSelection(ce)}return i&&q.setMeta("composition",i),q.scrollIntoView()},M;if(C){if(B.pos==y.pos){kr&&po<=11&&B.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ii(t),20));let K=D(t.state.tr.delete(F,U)),q=d.resolve(v.start).marksAcross(d.resolve(v.endA));q&&K.ensureMarks(q),t.dispatch(K)}else if(v.endA==v.endB&&(M=U4(B.parent.content.cut(B.parentOffset,y.parentOffset),w.parent.content.cut(w.parentOffset,v.endA-w.start())))){let K=D(t.state.tr);M.type=="add"?K.addMark(F,U,M.mark):K.removeMark(F,U,M.mark),t.dispatch(K)}else if(B.parent.child(B.index()).isText&&B.index()==y.index()-(y.textOffset?0:1)){let K=B.parent.textBetween(B.parentOffset,y.parentOffset),q=()=>D(t.state.tr.insertText(K,F,U));t.someProp("handleTextInput",ce=>ce(t,F,U,K,q))||t.dispatch(q())}}else t.dispatch(D())}function o1(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Sm(t,e.resolve(n.anchor),e.resolve(n.head))}function U4(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,A=n,i=r,o,a,l;for(let d=0;d<r.length;d++)A=r[d].removeFromSet(A);for(let d=0;d<n.length;d++)i=n[d].removeFromSet(i);if(A.length==1&&i.length==0)a=A[0],o="add",l=d=>d.mark(a.addToSet(d.marks));else if(A.length==0&&i.length==1)a=i[0],o="remove",l=d=>d.mark(a.removeFromSet(d.marks));else return null;let u=[];for(let d=0;d<e.childCount;d++)u.push(l(e.child(d)));if(Qe.from(u).eq(t))return{mark:a,type:o}}function _4(t,e,n,r,A){if(n-e<=A.pos-r.pos||Rm(r,!0,!1)<A.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let a=i.nodeAfter;return a!=null&&n==e+a.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let o=t.resolve(Rm(i,!0,!0));return!o.parent.isTextblock||o.pos>n||Rm(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function Rm(t,e,n){let r=t.depth,A=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,A++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,A++}return A}function D4(t,e,n,r,A){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:o,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(A=="end"){let l=Math.max(0,i-Math.min(o,a));r-=o+l-i}if(o<i&&t.size<e.size){let l=r<=i&&r>=o?i-r:0;i-=l,i&&i<e.size&&s1(e.textBetween(i-1,i+1))&&(i+=l?1:-1),a=i+(a-o),o=i}else if(a<i){let l=r<=i&&r>=a?i-r:0;i-=l,i&&i<t.size&&s1(t.textBetween(i-1,i+1))&&(i+=l?1:-1),o=i+(o-a),a=i}return{start:i,endA:o,endB:a}}function s1(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class a1{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new e4,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(f1),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=u1(this),c1(this),this.nodeViews=d1(this),this.docView=vb(this.state.doc,l1(this),Lm(this),this.dom,this),this.domObserver=new k4(this,(r,A,i,o)=>I4(this,r,A,i,o)),this.domObserver.start(),t4(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Im(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(f1),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let A=this.state,i=!1,o=!1;e.storedMarks&&this.composing&&(Xb(this),o=!0),this.state=e;let a=A.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let m=d1(this);N4(m,this.nodeViews)&&(this.nodeViews=m,i=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Im(this),this.editable=u1(this),c1(this);let l=Lm(this),u=l1(this),d=A.plugins!=e.plugins&&!A.doc.eq(e.doc)?"reset":e.scrollToSelection>A.scrollToSelection?"to selection":"preserve",h=i||!this.docView.matchesNode(e.doc,u,l);(h||!e.selection.eq(A.selection))&&(o=!0);let p=d=="preserve"&&o&&this.dom.style.overflowAnchor==null&&pP(this);if(o){this.domObserver.stop();let m=h&&(kr||tr)&&!this.composing&&!A.selection.empty&&!e.selection.empty&&O4(A.selection,e.selection);if(h){let v=tr?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=h4(this)),(i||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=vb(e.doc,u,l,this.dom,this)),v&&!this.trackWrites&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&RP(this))?Ii(this,m):(Fb(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(A),!((r=this.dragging)===null||r===void 0)&&r.node&&!A.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,A),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():p&&mP(p)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof qe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&ib(this,n.getBoundingClientRect(),e)}else ib(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,A=-1;if(this.state.doc.nodeAt(r.from)==r.node)A=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(A=i)}this.dragging=new jb(e.slice,e.move,A<0?void 0:qe.create(this.state.doc,A))}someProp(e,n){let r=this._props&&this._props[e],A;if(r!=null&&(A=n?n(r):r))return A;for(let o=0;o<this.directPlugins.length;o++){let a=this.directPlugins[o].props[e];if(a!=null&&(A=n?n(a):a))return A}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let a=i[o].props[e];if(a!=null&&(A=n?n(a):a))return A}}hasFocus(){if(kr){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&gP(this.dom),Ii(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return CP(this,e)}coordsAtPos(e,n=1){return ub(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let A=this.docView.posFromDOM(e,n,r);if(A==null)throw new RangeError("DOM position not inside the editor");return A}endOfTextblock(e,n){return xP(this,n||this.state,e)}pasteHTML(e,n){return Kl(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Kl(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Qm(this,e)}destroy(){this.docView&&(n4(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Lm(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,AP())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return A4(this,e)}domSelectionRange(){let e=this.domSelection();return e?pr&&this.root.nodeType===11&&lP(this.dom.ownerDocument)==this.dom&&x4(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}a1.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function l1(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[vr.node(0,t.state.doc.content.size,e)]}function c1(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:vr.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function u1(t){return!t.someProp("editable",e=>e(t.state)===!1)}function O4(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function d1(t){let e=Object.create(null);function n(r){for(let A in r)Object.prototype.hasOwnProperty.call(e,A)||(e[A]=r[A])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function N4(t,e){let n=0,r=0;for(let A in t){if(t[A]!=e[A])return!0;n++}for(let A in e)r++;return n!=r}function f1(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Co={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Ju={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},L4=typeof navigator<"u"&&/Mac/.test(navigator.platform),R4=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),zn=0;zn<10;zn++)Co[48+zn]=Co[96+zn]=String(zn);for(var zn=1;zn<=24;zn++)Co[zn+111]="F"+zn;for(var zn=65;zn<=90;zn++)Co[zn]=String.fromCharCode(zn+32),Ju[zn]=String.fromCharCode(zn);for(var Hm in Co)Ju.hasOwnProperty(Hm)||(Ju[Hm]=Co[Hm]);function H4(t){var e=L4&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||R4&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Ju:Co)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const P4=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),$4=typeof navigator<"u"&&/Win/.test(navigator.platform);function K4(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,A,i,o;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))A=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))P4?o=!0:A=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),A&&(n="Ctrl-"+n),o&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function z4(t){let e=Object.create(null);for(let n in t)e[K4(n)]=t[n];return e}function Pm(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function W4(t){return new en({props:{handleKeyDown:h1(t)}})}function h1(t){let e=z4(t);return function(n,r){let A=H4(r),i,o=e[Pm(A,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(A.length==1&&A!=" "){if(r.shiftKey){let a=e[Pm(A,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!($4&&r.ctrlKey&&r.altKey)&&(i=Co[r.keyCode])&&i!=A){let a=e[Pm(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var G4=Object.defineProperty,$m=(t,e)=>{for(var n in e)G4(t,n,{get:e[n],enumerable:!0})};function ju(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:A}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return A},get tr(){return r=n.selection,A=n.doc,i=n.storedMarks,n}}}var Zu=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:A}=n,i=this.buildProps(A);return Object.fromEntries(Object.entries(t).map(([o,a])=>[o,(...u)=>{const d=a(...u)(i);return!A.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(A),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:A}=this,{view:i}=r,o=[],a=!!t,l=t||A.tr,u=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(l),o.every(h=>h===!0)),d={...Object.fromEntries(Object.entries(n).map(([h,p])=>[h,(...v)=>{const B=this.buildProps(l,e),y=p(...v)(B);return o.push(y),d}])),run:u};return d}createCan(t){const{rawCommands:e,state:n}=this,r=!1,A=t||n.tr,i=this.buildProps(A,r);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>l(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(A,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:A}=this,{view:i}=r,o={tr:t,editor:r,view:i,state:ju({state:A,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...u)=>l(...u)(o)]))}};return o}},p1={};$m(p1,{blur:()=>Y4,clearContent:()=>q4,clearNodes:()=>X4,command:()=>J4,createParagraphNear:()=>j4,cut:()=>Z4,deleteCurrentNode:()=>V4,deleteNode:()=>e3,deleteRange:()=>t3,deleteSelection:()=>n3,enter:()=>r3,exitCode:()=>A3,extendMarkRange:()=>i3,first:()=>o3,focus:()=>a3,forEach:()=>l3,insertContent:()=>c3,insertContentAt:()=>f3,joinBackward:()=>m3,joinDown:()=>p3,joinForward:()=>g3,joinItemBackward:()=>v3,joinItemForward:()=>w3,joinTextblockBackward:()=>B3,joinTextblockForward:()=>y3,joinUp:()=>h3,keyboardShortcut:()=>b3,lift:()=>E3,liftEmptyBlock:()=>k3,liftListItem:()=>S3,newlineInCode:()=>x3,resetAttributes:()=>F3,scrollIntoView:()=>Q3,selectAll:()=>T3,selectNodeBackward:()=>M3,selectNodeForward:()=>I3,selectParentNode:()=>U3,selectTextblockEnd:()=>_3,selectTextblockStart:()=>D3,setContent:()=>O3,setMark:()=>n$,setMeta:()=>r$,setNode:()=>A$,setNodeSelection:()=>i$,setTextDirection:()=>o$,setTextSelection:()=>s$,sinkListItem:()=>a$,splitBlock:()=>l$,splitListItem:()=>c$,toggleList:()=>u$,toggleMark:()=>d$,toggleNode:()=>f$,toggleWrap:()=>h$,undoInputRule:()=>p$,unsetAllMarks:()=>m$,unsetMark:()=>g$,unsetTextDirection:()=>v$,updateAttributes:()=>w$,wrapIn:()=>B$,wrapInList:()=>y$});var Y4=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),q4=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),X4=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:A}=r;return n&&A.forEach(({$from:i,$to:o})=>{t.doc.nodesBetween(i.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:d}=e,h=u.resolve(d.map(l)),p=u.resolve(d.map(l+a.nodeSize)),m=h.blockRange(p);if(!m)return;const v=aa(m);if(a.type.isTextblock){const{defaultType:B}=h.parent.contentMatchAt(h.index());e.setNodeMarkup(m.start,B)}(v||v===0)&&e.lift(m,v)})}),!0},J4=t=>e=>t(e),j4=()=>({state:t,dispatch:e})=>JC(t,e),Z4=(t,e)=>({editor:n,tr:r})=>{const{state:A}=n,i=A.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const o=r.mapping.map(e);return r.insert(o,i.content),r.setSelection(new nt(r.doc.resolve(Math.max(o-1,0)))),!0},V4=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const A=t.selection.$anchor;for(let i=A.depth;i>0;i-=1)if(A.node(i).type===r.type){if(e){const a=A.before(i),l=A.after(i);t.delete(a,l).scrollIntoView()}return!0}return!1};function Cn(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var e3=t=>({tr:e,state:n,dispatch:r})=>{const A=Cn(t,n.schema),i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===A){if(r){const l=i.before(o),u=i.after(o);e.delete(l,u).scrollIntoView()}return!0}return!1},t3=t=>({tr:e,dispatch:n})=>{const{from:r,to:A}=t;return n&&e.delete(r,A),!0},n3=()=>({state:t,dispatch:e})=>um(t,e),r3=()=>({commands:t})=>t.keyboardShortcut("Enter"),A3=()=>({state:t,dispatch:e})=>KH(t,e);function Km(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function Vu(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(A=>n.strict?e[A]===t[A]:Km(e[A])?e[A].test(t[A]):e[A]===t[A]):!0}function m1(t,e,n={}){return t.find(r=>r.type===e&&Vu(Object.fromEntries(Object.keys(n).map(A=>[A,r.attrs[A]])),n))}function g1(t,e,n={}){return!!m1(t,e,n)}function zm(t,e,n){var r;if(!t||!e)return;let A=t.parent.childAfter(t.parentOffset);if((!A.node||!A.node.marks.some(d=>d.type===e))&&(A=t.parent.childBefore(t.parentOffset)),!A.node||!A.node.marks.some(d=>d.type===e)||(n=n||((r=A.node.marks[0])==null?void 0:r.attrs),!m1([...A.node.marks],e,n)))return;let o=A.index,a=t.start()+A.offset,l=o+1,u=a+A.node.nodeSize;for(;o>0&&g1([...t.parent.child(o-1).marks],e,n);)o-=1,a-=t.parent.child(o).nodeSize;for(;l<t.parent.childCount&&g1([...t.parent.child(l).marks],e,n);)u+=t.parent.child(l).nodeSize,l+=1;return{from:a,to:u}}function Ui(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var i3=(t,e={})=>({tr:n,state:r,dispatch:A})=>{const i=Ui(t,r.schema),{doc:o,selection:a}=n,{$from:l,from:u,to:d}=a;if(A){const h=zm(l,i,e);if(h&&h.from<=u&&h.to>=d){const p=nt.create(o,h.from,h.to);n.setSelection(p)}}return!0},o3=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function v1(t){return t instanceof nt}function Cs(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function w1(t,e=null){if(!e)return null;const n=st.atStart(t),r=st.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const A=n.from,i=r.to;return e==="all"?nt.create(t,Cs(0,A,i),Cs(t.content.size,A,i)):nt.create(t,Cs(e,A,i),Cs(e,A,i))}function B1(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function ed(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function s3(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var a3=(t=null,e={})=>({editor:n,view:r,tr:A,dispatch:i})=>{e={scrollIntoView:!0,...e};const o=()=>{(ed()||B1())&&r.dom.focus(),s3()&&!ed()&&!B1()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!v1(n.state.selection))return o(),!0;const a=w1(A.doc,t)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||A.setSelection(a),l&&A.storedMarks&&A.setStoredMarks(A.storedMarks),o()),!0},l3=(t,e)=>n=>t.every((r,A)=>e(r,{...n,index:A})),c3=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),y1=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&y1(r)}return t};function td(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return y1(n)}function Wl(t,e,n){if(t instanceof ao||t instanceof Qe)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,A=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return Qe.fromArray(t.map(a=>e.nodeFromJSON(a)));const o=e.nodeFromJSON(t);return n.errorOnInvalidContent&&o.check(),o}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),Wl("",e,n)}if(A){if(n.errorOnInvalidContent){let o=!1,a="";const l=new aC({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?lo.fromSchema(l).parseSlice(td(t),n.parseOptions):lo.fromSchema(l).parse(td(t),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const i=lo.fromSchema(e);return n.slice?i.parseSlice(td(t),n.parseOptions).content:i.parse(td(t),n.parseOptions)}return Wl("",e,n)}function u3(t,e,n){const r=t.steps.length-1;if(r<e)return;const A=t.steps[r];if(!(A instanceof Dn||A instanceof On))return;const i=t.mapping.maps[r];let o=0;i.forEach((a,l,u,d)=>{o===0&&(o=d)}),t.setSelection(st.near(t.doc.resolve(o),n))}var d3=t=>!("type"in t),f3=(t,e,n)=>({tr:r,dispatch:A,editor:i})=>{var o;if(A){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=y=>{i.emit("contentError",{editor:i,error:y,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Wl(e,i.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(y){l(y)}try{a=Wl(e,i.schema,{parseOptions:u,errorOnInvalidContent:(o=n.errorOnInvalidContent)!=null?o:i.options.enableContentCheck})}catch(y){return l(y),!1}let{from:d,to:h}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},p=!0,m=!0;if((d3(a)?a:[a]).forEach(y=>{y.check(),p=p?y.isText&&y.marks.length===0:!1,m=m?y.isBlock:!1}),d===h&&m){const{parent:y}=r.doc.resolve(d);y.isTextblock&&!y.type.spec.code&&!y.childCount&&(d-=1,h+=1)}let B;if(p){if(Array.isArray(e))B=e.map(y=>y.text||"").join("");else if(e instanceof Qe){let y="";e.forEach(w=>{w.text&&(y+=w.text)}),B=y}else typeof e=="object"&&e&&e.text?B=e.text:B=e;r.insertText(B,d,h)}else{B=a;const y=r.doc.resolve(d),w=y.node(),C=y.parentOffset===0,k=w.isText||w.isTextblock,F=w.content.size>0;C&&k&&F&&(d=Math.max(0,d-1)),r.replaceWith(d,h,B)}n.updateSelection&&u3(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:d,text:B}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:d,text:B})}return!0},h3=()=>({state:t,dispatch:e})=>HH(t,e),p3=()=>({state:t,dispatch:e})=>PH(t,e),m3=()=>({state:t,dispatch:e})=>KC(t,e),g3=()=>({state:t,dispatch:e})=>YC(t,e),v3=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Lu(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},w3=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Lu(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},B3=()=>({state:t,dispatch:e})=>LH(t,e),y3=()=>({state:t,dispatch:e})=>RH(t,e);function C1(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function C3(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,A,i,o;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))A=!0;else if(/^s(hift)?$/i.test(l))i=!0;else if(/^mod$/i.test(l))ed()||C1()?o=!0:A=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),A&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var b3=t=>({editor:e,view:n,tr:r,dispatch:A})=>{const i=C3(t).split(/-(?!$)/),o=i.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l?.steps.forEach(u=>{const d=u.map(r.mapping);d&&A&&r.maybeStep(d)}),!0};function bo(t,e,n={}){const{from:r,to:A,empty:i}=t.selection,o=e?Cn(e,t.schema):null,a=[];t.doc.nodesBetween(r,A,(h,p)=>{if(h.isText)return;const m=Math.max(r,p),v=Math.min(A,p+h.nodeSize);a.push({node:h,from:m,to:v})});const l=A-r,u=a.filter(h=>o?o.name===h.node.type.name:!0).filter(h=>Vu(h.node.attrs,n,{strict:!1}));return i?!!u.length:u.reduce((h,p)=>h+p.to-p.from,0)>=l}var E3=(t,e={})=>({state:n,dispatch:r})=>{const A=Cn(t,n.schema);return bo(n,A,e)?$H(n,r):!1},k3=()=>({state:t,dispatch:e})=>jC(t,e),S3=t=>({state:e,dispatch:n})=>{const r=Cn(t,e.schema);return eP(r)(e,n)},x3=()=>({state:t,dispatch:e})=>XC(t,e);function nd(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function b1(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,A)=>(n.includes(A)||(r[A]=t[A]),r),{})}var F3=(t,e)=>({tr:n,state:r,dispatch:A})=>{let i=null,o=null;const a=nd(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=Cn(t,r.schema)),a==="mark"&&(o=Ui(t,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(d,h)=>{i&&i===d.type&&(l=!0,A&&n.setNodeMarkup(h,void 0,b1(d.attrs,e))),o&&d.marks.length&&d.marks.forEach(p=>{o===p.type&&(l=!0,A&&n.addMark(h,h+d.nodeSize,o.create(b1(p.attrs,e))))})})}),l},Q3=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),T3=()=>({tr:t,dispatch:e})=>{if(e){const n=new Lr(t.doc);t.setSelection(n)}return!0},M3=()=>({state:t,dispatch:e})=>WC(t,e),I3=()=>({state:t,dispatch:e})=>qC(t,e),U3=()=>({state:t,dispatch:e})=>GH(t,e),_3=()=>({state:t,dispatch:e})=>XH(t,e),D3=()=>({state:t,dispatch:e})=>qH(t,e);function Wm(t,e,n={},r={}){return Wl(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var O3=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:A,tr:i,dispatch:o,commands:a})=>{const{doc:l}=i;if(r.preserveWhitespace!=="full"){const u=Wm(t,A.schema,r,{errorOnInvalidContent:e??A.options.enableContentCheck});return o&&i.replaceWith(0,l.content.size,u).setMeta("preventUpdate",!n),!0}return o&&i.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??A.options.enableContentCheck})};function E1(t,e){const n=Ui(e,t.schema),{from:r,to:A,empty:i}=t.selection,o=[];i?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,A,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function k1(t,e){const n=new UC(t);return e.forEach(r=>{r.steps.forEach(A=>{n.step(A)})}),n}function N3(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function L3(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(A,i)=>{n(A)&&r.push({node:A,pos:i})}),r}function R3(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function rd(t){return e=>R3(e.$from,t)}function Ye(t,e,n){return t.config[e]===void 0&&t.parent?Ye(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?Ye(t.parent,e,n):null}):t.config[e]}function Gm(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=Ye(e,"addExtensions",n);return r?[e,...Gm(r())]:e}).flat(10)}function Ym(t,e){const n=fs.fromSchema(e).serializeFragment(t),A=document.implementation.createHTMLDocument().createElement("div");return A.appendChild(n),A.innerHTML}function S1(t){return typeof t=="function"}function Ot(t,e=void 0,...n){return S1(t)?e?t.bind(e)(...n):t(...n):t}function H3(t={}){return Object.keys(t).length===0&&t.constructor===Object}function Ba(t){const e=t.filter(A=>A.type==="extension"),n=t.filter(A=>A.type==="node"),r=t.filter(A=>A.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function x1(t){const e=[],{nodeExtensions:n,markExtensions:r}=Ba(t),A=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage,extensions:A},l=Ye(o,"addGlobalAttributes",a);if(!l)return;l().forEach(d=>{d.types.forEach(h=>{Object.entries(d.attributes).forEach(([p,m])=>{e.push({type:h,name:p,attribute:{...i,...m}})})})})}),A.forEach(o=>{const a={name:o.name,options:o.options,storage:o.storage},l=Ye(o,"addAttributes",a);if(!l)return;const u=l();Object.entries(u).forEach(([d,h])=>{const p={...i,...h};typeof p?.default=="function"&&(p.default=p.default()),p?.isRequired&&p?.default===void 0&&delete p.default,e.push({type:o.name,name:d,attribute:p})})}),e}function Jt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([A,i])=>{if(!r[A]){r[A]=i;return}if(A==="class"){const a=i?String(i).split(" "):[],l=r[A]?r[A].split(" "):[],u=a.filter(d=>!l.includes(d));r[A]=[...l,...u].join(" ")}else if(A==="style"){const a=i?i.split(";").map(d=>d.trim()).filter(Boolean):[],l=r[A]?r[A].split(";").map(d=>d.trim()).filter(Boolean):[],u=new Map;l.forEach(d=>{const[h,p]=d.split(":").map(m=>m.trim());u.set(h,p)}),a.forEach(d=>{const[h,p]=d.split(":").map(m=>m.trim());u.set(h,p)}),r[A]=Array.from(u.entries()).map(([d,h])=>`${d}: ${h}`).join("; ")}else r[A]=i}),r},{})}function Gl(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Jt(n,r),{})}function P3(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function F1(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const A=e.reduce((i,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(n):P3(n.getAttribute(o.name));return a==null?i:{...i,[o.name]:a}},{});return{...r,...A}}}}function Q1(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&H3(n)?!1:n!=null))}function T1(t){var e,n;const r={};return!((e=t?.attribute)!=null&&e.isRequired)&&"default"in(t?.attribute||{})&&(r.default=t.attribute.default),((n=t?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function $3(t,e){var n;const r=x1(t),{nodeExtensions:A,markExtensions:i}=Ba(t),o=(n=A.find(u=>Ye(u,"topNode")))==null?void 0:n.name,a=Object.fromEntries(A.map(u=>{const d=r.filter(w=>w.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},p=t.reduce((w,C)=>{const k=Ye(C,"extendNodeSchema",h);return{...w,...k?k(u):{}}},{}),m=Q1({...p,content:Ot(Ye(u,"content",h)),marks:Ot(Ye(u,"marks",h)),group:Ot(Ye(u,"group",h)),inline:Ot(Ye(u,"inline",h)),atom:Ot(Ye(u,"atom",h)),selectable:Ot(Ye(u,"selectable",h)),draggable:Ot(Ye(u,"draggable",h)),code:Ot(Ye(u,"code",h)),whitespace:Ot(Ye(u,"whitespace",h)),linebreakReplacement:Ot(Ye(u,"linebreakReplacement",h)),defining:Ot(Ye(u,"defining",h)),isolating:Ot(Ye(u,"isolating",h)),attrs:Object.fromEntries(d.map(T1))}),v=Ot(Ye(u,"parseHTML",h));v&&(m.parseDOM=v.map(w=>F1(w,d)));const B=Ye(u,"renderHTML",h);B&&(m.toDOM=w=>B({node:w,HTMLAttributes:Gl(w,d)}));const y=Ye(u,"renderText",h);return y&&(m.toText=y),[u.name,m]})),l=Object.fromEntries(i.map(u=>{const d=r.filter(y=>y.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},p=t.reduce((y,w)=>{const C=Ye(w,"extendMarkSchema",h);return{...y,...C?C(u):{}}},{}),m=Q1({...p,inclusive:Ot(Ye(u,"inclusive",h)),excludes:Ot(Ye(u,"excludes",h)),group:Ot(Ye(u,"group",h)),spanning:Ot(Ye(u,"spanning",h)),code:Ot(Ye(u,"code",h)),attrs:Object.fromEntries(d.map(T1))}),v=Ot(Ye(u,"parseHTML",h));v&&(m.parseDOM=v.map(y=>F1(y,d)));const B=Ye(u,"renderHTML",h);return B&&(m.toDOM=y=>B({mark:y,HTMLAttributes:Gl(y,d)})),[u.name,m]}));return new aC({topNode:o,nodes:a,marks:l})}function K3(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Ad(t){return t.sort((n,r)=>{const A=Ye(n,"priority")||100,i=Ye(r,"priority")||100;return A>i?-1:A<i?1:0})}function M1(t){const e=Ad(Gm(t)),n=K3(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function I1(t,e,n){const{from:r,to:A}=e,{blockSeparator:i=`
|
|
20
|
-
|
|
21
|
-
`,textSerializers:o={}}=n||{};let a="";return t.nodesBetween(r,A,(l,u,d,h)=>{var p;l.isBlock&&u>r&&(a+=i);const m=o?.[l.type.name];if(m)return d&&(a+=m({node:l,pos:u,parent:d,index:h,range:e})),!1;l.isText&&(a+=(p=l?.text)==null?void 0:p.slice(Math.max(r,u)-u,A-u))}),a}function z3(t,e){const n={from:0,to:t.content.size};return I1(t,n,e)}function U1(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function W3(t,e){const n=Cn(e,t.schema),{from:r,to:A}=t.selection,i=[];t.doc.nodesBetween(r,A,a=>{i.push(a)});const o=i.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function _1(t,e){const n=nd(typeof e=="string"?e:e.name,t.schema);return n==="node"?W3(t,e):n==="mark"?E1(t,e):{}}function G3(t,e=JSON.stringify){const n={};return t.filter(r=>{const A=e(r);return Object.prototype.hasOwnProperty.call(n,A)?!1:n[A]=!0})}function Y3(t){const e=G3(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,o)=>o!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function D1(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((A,i)=>{const o=[];if(A.ranges.length)A.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=n[i];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const u=e.slice(i).map(a,-1),d=e.slice(i).map(l),h=e.invert().map(u,-1),p=e.invert().map(d);r.push({oldRange:{from:h,to:p},newRange:{from:u,to:d}})})}),Y3(r)}function qm(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(A=>{const i=n.resolve(t),o=zm(i,A.type);o&&r.push({mark:A,...o})}):n.nodesBetween(t,e,(A,i)=>{!A||A?.nodeSize===void 0||r.push(...A.marks.map(o=>({from:i,to:i+A.nodeSize,mark:o})))}),r}var q3=(t,e,n,r=20)=>{const A=t.doc.resolve(n);let i=r,o=null;for(;i>0&&o===null;){const a=A.node(i);a?.type.name===e?o=a:i-=1}return[o,i]};function id(t,e){return e.nodes[t]||e.marks[t]||null}function od(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const A=t.find(i=>i.type===e&&i.name===r);return A?A.attribute.keepOnSplit:!1}))}var X3=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(A,i,o,a)=>{var l,u;const d=((u=(l=A.type.spec).toText)==null?void 0:u.call(l,{node:A,pos:i,parent:o,index:a}))||A.textContent||"%leaf%";n+=A.isAtom&&!A.isText?d:d.slice(0,Math.max(0,r-i))}),n};function Xm(t,e,n={}){const{empty:r,ranges:A}=t.selection,i=e?Ui(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(h=>i?i.name===h.type.name:!0).find(h=>Vu(h.attrs,n,{strict:!1}));let o=0;const a=[];if(A.forEach(({$from:h,$to:p})=>{const m=h.pos,v=p.pos;t.doc.nodesBetween(m,v,(B,y)=>{if(!B.isText&&!B.marks.length)return;const w=Math.max(m,y),C=Math.min(v,y+B.nodeSize),k=C-w;o+=k,a.push(...B.marks.map(F=>({mark:F,from:w,to:C})))})}),o===0)return!1;const l=a.filter(h=>i?i.name===h.mark.type.name:!0).filter(h=>Vu(h.mark.attrs,n,{strict:!1})).reduce((h,p)=>h+p.to-p.from,0),u=a.filter(h=>i?h.mark.type!==i&&h.mark.type.excludes(i):!0).reduce((h,p)=>h+p.to-p.from,0);return(l>0?l+u:l)>=o}function J3(t,e,n={}){if(!e)return bo(t,null,n)||Xm(t,null,n);const r=nd(e,t.schema);return r==="node"?bo(t,e,n):r==="mark"?Xm(t,e,n):!1}var j3=(t,e)=>{const{$from:n,$to:r,$anchor:A}=t.selection;if(e){const i=rd(a=>a.type.name===e)(t.selection);if(!i)return!1;const o=t.doc.resolve(i.pos+1);return A.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},Z3=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function O1(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function N1(t,e){const{nodeExtensions:n}=Ba(e),r=n.find(o=>o.name===t);if(!r)return!1;const A={name:r.name,options:r.options,storage:r.storage},i=Ot(Ye(r,"group",A));return typeof i!="string"?!1:i.split(" ").includes("list")}function sd(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let A=!0;return t.content.forEach(i=>{A!==!1&&(sd(i,{ignoreWhitespace:n,checkChildren:e})||(A=!1))}),A}return!1}function L1(t){return t instanceof qe}var R1=class AT{constructor(e){this.position=e}static fromJSON(e){return new AT(e.position)}toJSON(){return{position:this.position}}};function V3(t,e){const n=e.mapping.mapResult(t.position);return{position:new R1(n.pos),mapResult:n}}function e$(t){return new R1(t)}function t$(t,e,n){var r;const{selection:A}=e;let i=null;if(v1(A)&&(i=A.$cursor),i){const a=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(u=>u.type.excludes(n)))}const{ranges:o}=A;return o.some(({$from:a,$to:l})=>{let u=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(d,h,p)=>{if(u)return!1;if(d.isInline){const m=!p||p.type.allowsMarkType(n),v=!!n.isInSet(d.marks)||!d.marks.some(B=>B.type.excludes(n));u=m&&v}return!u}),u})}var n$=(t,e={})=>({tr:n,state:r,dispatch:A})=>{const{selection:i}=n,{empty:o,ranges:a}=i,l=Ui(t,r.schema);if(A)if(o){const u=E1(r,l);n.addStoredMark(l.create({...u,...e}))}else a.forEach(u=>{const d=u.$from.pos,h=u.$to.pos;r.doc.nodesBetween(d,h,(p,m)=>{const v=Math.max(m,d),B=Math.min(m+p.nodeSize,h);p.marks.find(w=>w.type===l)?p.marks.forEach(w=>{l===w.type&&n.addMark(v,B,l.create({...w.attrs,...e}))}):n.addMark(v,B,l.create(e))})});return t$(r,n,l)},r$=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),A$=(t,e={})=>({state:n,dispatch:r,chain:A})=>{const i=Cn(t,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),i.isTextblock?A().command(({commands:a})=>eb(i,{...o,...e})(n)?!0:a.clearNodes()).command(({state:a})=>eb(i,{...o,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},i$=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,A=Cs(t,0,r.content.size),i=qe.create(r,A);e.setSelection(i)}return!0},o$=(t,e)=>({tr:n,state:r,dispatch:A})=>{const{selection:i}=r;let o,a;return typeof e=="number"?(o=e,a=e):e&&"from"in e&&"to"in e?(o=e.from,a=e.to):(o=i.from,a=i.to),A&&n.doc.nodesBetween(o,a,(l,u)=>{l.isText||n.setNodeMarkup(u,void 0,{...l.attrs,dir:t})}),!0},s$=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:A,to:i}=typeof t=="number"?{from:t,to:t}:t,o=nt.atStart(r).from,a=nt.atEnd(r).to,l=Cs(A,o,a),u=Cs(i,o,a),d=nt.create(r,l,u);e.setSelection(d)}return!0},a$=t=>({state:e,dispatch:n})=>{const r=Cn(t,e.schema);return rP(r)(e,n)};function H1(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(A=>e?.includes(A.type.name));t.tr.ensureMarks(r)}}var l$=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:A})=>{const{selection:i,doc:o}=e,{$from:a,$to:l}=i,u=A.extensionManager.attributes,d=od(u,a.node().type.name,a.node().attrs);if(i instanceof qe&&i.node.isBlock)return!a.parentOffset||!Fi(o,a.pos)?!1:(r&&(t&&H1(n,A.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const h=l.parentOffset===l.parent.content.size,p=a.depth===0?void 0:N3(a.node(-1).contentMatchAt(a.indexAfter(-1)));let m=h&&p?[{type:p,attrs:d}]:void 0,v=Fi(e.doc,e.mapping.map(a.pos),1,m);if(!m&&!v&&Fi(e.doc,e.mapping.map(a.pos),1,p?[{type:p}]:void 0)&&(v=!0,m=p?[{type:p,attrs:d}]:void 0),r){if(v&&(i instanceof nt&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,m),p&&!h&&!a.parentOffset&&a.parent.type!==p)){const B=e.mapping.map(a.before()),y=e.doc.resolve(B);a.node(-1).canReplaceWith(y.index(),y.index()+1,p)&&e.setNodeMarkup(e.mapping.map(a.before()),p)}t&&H1(n,A.extensionManager.splittableMarks),e.scrollIntoView()}return v},c$=(t,e={})=>({tr:n,state:r,dispatch:A,editor:i})=>{var o;const a=Cn(t,r.schema),{$from:l,$to:u}=r.selection,d=r.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(u))return!1;const h=l.node(-1);if(h.type!==a)return!1;const p=i.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(A){let w=Qe.empty;const C=l.index(-1)?1:l.index(-2)?2:3;for(let K=l.depth-C;K>=l.depth-3;K-=1)w=Qe.from(l.node(K).copy(w));const k=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,F={...od(p,l.node().type.name,l.node().attrs),...e},U=((o=a.contentMatch.defaultType)==null?void 0:o.createAndFill(F))||void 0;w=w.append(Qe.from(a.createAndFill(null,U)||void 0));const D=l.before(l.depth-(C-1));n.replace(D,l.after(-k),new De(w,4-C,0));let M=-1;n.doc.nodesBetween(D,n.doc.content.size,(K,q)=>{if(M>-1)return!1;K.isTextblock&&K.content.size===0&&(M=q+1)}),M>-1&&n.setSelection(nt.near(n.doc.resolve(M))),n.scrollIntoView()}return!0}const m=u.pos===l.end()?h.contentMatchAt(0).defaultType:null,v={...od(p,h.type.name,h.attrs),...e},B={...od(p,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,u.pos);const y=m?[{type:a,attrs:v},{type:m,attrs:B}]:[{type:a,attrs:v}];if(!Fi(n.doc,l.pos,2))return!1;if(A){const{selection:w,storedMarks:C}=r,{splittableMarks:k}=i.extensionManager,F=C||w.$to.parentOffset&&w.$from.marks();if(n.split(l.pos,2,y).scrollIntoView(),!F||!A)return!0;const U=F.filter(D=>k.includes(D.type.name));n.ensureMarks(U)}return!0},Jm=(t,e)=>{const n=rd(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const A=t.doc.nodeAt(r);return n.node.type===A?.type&&fo(t.doc,n.pos)&&t.join(n.pos),!0},jm=(t,e)=>{const n=rd(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const A=t.doc.nodeAt(r);return n.node.type===A?.type&&fo(t.doc,r)&&t.join(r),!0},u$=(t,e,n,r={})=>({editor:A,tr:i,state:o,dispatch:a,chain:l,commands:u,can:d})=>{const{extensions:h,splittableMarks:p}=A.extensionManager,m=Cn(t,o.schema),v=Cn(e,o.schema),{selection:B,storedMarks:y}=o,{$from:w,$to:C}=B,k=w.blockRange(C),F=y||B.$to.parentOffset&&B.$from.marks();if(!k)return!1;const U=rd(D=>N1(D.type.name,h))(B);if(k.depth>=1&&U&&k.depth-U.depth<=1){if(U.node.type===m)return u.liftListItem(v);if(N1(U.node.type.name,h)&&m.validContent(U.node.content)&&a)return l().command(()=>(i.setNodeMarkup(U.pos,m),!0)).command(()=>Jm(i,m)).command(()=>jm(i,m)).run()}return!n||!F||!a?l().command(()=>d().wrapInList(m,r)?!0:u.clearNodes()).wrapInList(m,r).command(()=>Jm(i,m)).command(()=>jm(i,m)).run():l().command(()=>{const D=d().wrapInList(m,r),M=F.filter(K=>p.includes(K.type.name));return i.ensureMarks(M),D?!0:u.clearNodes()}).wrapInList(m,r).command(()=>Jm(i,m)).command(()=>jm(i,m)).run()},d$=(t,e={},n={})=>({state:r,commands:A})=>{const{extendEmptyMarkRange:i=!1}=n,o=Ui(t,r.schema);return Xm(r,o,e)?A.unsetMark(o,{extendEmptyMarkRange:i}):A.setMark(o,e)},f$=(t,e,n={})=>({state:r,commands:A})=>{const i=Cn(t,r.schema),o=Cn(e,r.schema),a=bo(r,i,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?A.setNode(o,l):A.setNode(i,{...l,...n})},h$=(t,e={})=>({state:n,commands:r})=>{const A=Cn(t,n.schema);return bo(n,A,e)?r.lift(A):r.wrapIn(A,e)},p$=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const A=n[r];let i;if(A.spec.isInputRules&&(i=A.getState(t))){if(e){const o=t.tr,a=i.transform;for(let l=a.steps.length-1;l>=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(i.text){const l=o.doc.resolve(i.from).marks();o.replaceWith(i.from,i.to,t.schema.text(i.text,l))}else o.delete(i.from,i.to)}return!0}}return!1},m$=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:A}=n;return r||e&&A.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},g$=(t,e={})=>({tr:n,state:r,dispatch:A})=>{var i;const{extendEmptyMarkRange:o=!1}=e,{selection:a}=n,l=Ui(t,r.schema),{$from:u,empty:d,ranges:h}=a;if(!A)return!0;if(d&&o){let{from:p,to:m}=a;const v=(i=u.marks().find(y=>y.type===l))==null?void 0:i.attrs,B=zm(u,l,v);B&&(p=B.from,m=B.to),n.removeMark(p,m,l)}else h.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,l)});return n.removeStoredMark(l),!0},v$=t=>({tr:e,state:n,dispatch:r})=>{const{selection:A}=n;let i,o;return typeof t=="number"?(i=t,o=t):t&&"from"in t&&"to"in t?(i=t.from,o=t.to):(i=A.from,o=A.to),r&&e.doc.nodesBetween(i,o,(a,l)=>{if(a.isText)return;const u={...a.attrs};delete u.dir,e.setNodeMarkup(l,void 0,u)}),!0},w$=(t,e={})=>({tr:n,state:r,dispatch:A})=>{let i=null,o=null;const a=nd(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(i=Cn(t,r.schema)),a==="mark"&&(o=Ui(t,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{const d=u.$from.pos,h=u.$to.pos;let p,m,v,B;n.selection.empty?r.doc.nodesBetween(d,h,(y,w)=>{i&&i===y.type&&(l=!0,v=Math.max(w,d),B=Math.min(w+y.nodeSize,h),p=w,m=y)}):r.doc.nodesBetween(d,h,(y,w)=>{w<d&&i&&i===y.type&&(l=!0,v=Math.max(w,d),B=Math.min(w+y.nodeSize,h),p=w,m=y),w>=d&&w<=h&&(i&&i===y.type&&(l=!0,A&&n.setNodeMarkup(w,void 0,{...y.attrs,...e})),o&&y.marks.length&&y.marks.forEach(C=>{if(o===C.type&&(l=!0,A)){const k=Math.max(w,d),F=Math.min(w+y.nodeSize,h);n.addMark(k,F,o.create({...C.attrs,...e}))}}))}),m&&(p!==void 0&&A&&n.setNodeMarkup(p,void 0,{...m.attrs,...e}),o&&m.marks.length&&m.marks.forEach(y=>{o===y.type&&A&&n.addMark(v,B,o.create({...y.attrs,...e}))}))}),l},B$=(t,e={})=>({state:n,dispatch:r})=>{const A=Cn(t,n.schema);return JH(A,e)(n,r)},y$=(t,e={})=>({state:n,dispatch:r})=>{const A=Cn(t,n.schema);return jH(A,e)(n,r)},C$=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},ad=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},b$=(t,e)=>{if(Km(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function ld(t){var e;const{editor:n,from:r,to:A,text:i,rules:o,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(e=u.nodeBefore||u.nodeAfter)!=null&&e.marks.find(p=>p.type.spec.code))return!1;let d=!1;const h=X3(u)+i;return o.forEach(p=>{if(d)return;const m=b$(h,p.find);if(!m)return;const v=l.state.tr,B=ju({state:l.state,transaction:v}),y={from:r-(m[0].length-i.length),to:A},{commands:w,chain:C,can:k}=new Zu({editor:n,state:B});p.handler({state:B,range:y,match:m,commands:w,chain:C,can:k})===null||!v.steps.length||(p.undoable&&v.setMeta(a,{transform:v,from:r,to:A,text:i}),l.dispatch(v),d=!0)}),d}function E$(t){const{editor:e,rules:n}=t,r=new en({state:{init(){return null},apply(A,i,o){const a=A.getMeta(r);if(a)return a;const l=A.getMeta("applyInputRules");return l&&setTimeout(()=>{let{text:d}=l;typeof d=="string"?d=d:d=Ym(Qe.from(d),o.schema);const{from:h}=l,p=h+d.length;ld({editor:e,from:h,to:p,text:d,rules:n,plugin:r})}),A.selectionSet||A.docChanged?null:i}},props:{handleTextInput(A,i,o,a){return ld({editor:e,from:i,to:o,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:A=>(setTimeout(()=>{const{$cursor:i}=A.state.selection;i&&ld({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(A,i){if(i.key!=="Enter")return!1;const{$cursor:o}=A.state.selection;return o?ld({editor:e,from:o.pos,to:o.pos,text:`
|
|
22
|
-
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function k$(t){return Object.prototype.toString.call(t).slice(8,-1)}function cd(t){return k$(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function P1(t,e){const n={...t};return cd(t)&&cd(e)&&Object.keys(e).forEach(r=>{cd(e[r])&&cd(t[r])?n[r]=P1(t[r],e[r]):n[r]=e[r]}),n}var Zm=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...Ot(Ye(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Ot(Ye(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>P1(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Eo=class iT extends Zm{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new iT(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,A=e.state.selection.$from;if(A.pos===A.end()){const o=A.marks();if(!!!o.find(u=>u?.type.name===n.name))return!1;const l=o.find(u=>u?.type.name===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",A.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function S$(t){return typeof t=="number"}var x$=class{constructor(t){this.find=t.find,this.handler=t.handler}},F$=(t,e,n)=>{if(Km(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(A=>{const i=[A.text];return i.index=A.index,i.input=t,i.data=A.data,A.replaceWith&&(A.text.includes(A.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(A.replaceWith)),i}):[]};function Q$(t){const{editor:e,state:n,from:r,to:A,rule:i,pasteEvent:o,dropEvent:a}=t,{commands:l,chain:u,can:d}=new Zu({editor:e,state:n}),h=[];return n.doc.nodesBetween(r,A,(m,v)=>{var B,y,w,C,k;if((y=(B=m.type)==null?void 0:B.spec)!=null&&y.code||!(m.isText||m.isTextblock||m.isInline))return;const F=(k=(C=(w=m.content)==null?void 0:w.size)!=null?C:m.nodeSize)!=null?k:0,U=Math.max(r,v),D=Math.min(A,v+F);if(U>=D)return;const M=m.isText?m.text||"":m.textBetween(U-v,D-v,void 0,"");F$(M,i.find,o).forEach(q=>{if(q.index===void 0)return;const ce=U+q.index+1,me=ce+q[0].length,ve={from:n.tr.mapping.map(ce),to:n.tr.mapping.map(me)},Be=i.handler({state:n,range:ve,match:q,commands:l,chain:u,can:d,pasteEvent:o,dropEvent:a});h.push(Be)})}),h.every(m=>m!==null)}var ud=null,T$=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function M$(t){const{editor:e,rules:n}=t;let r=null,A=!1,i=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:d,from:h,to:p,rule:m,pasteEvt:v})=>{const B=d.tr,y=ju({state:d,transaction:B});if(!(!Q$({editor:e,state:y,from:Math.max(h-1,0),to:p.b-1,rule:m,pasteEvent:v,dropEvent:a})||!B.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,B}};return n.map(d=>new en({view(h){const p=v=>{var B;r=(B=h.dom.parentElement)!=null&&B.contains(v.target)?h.dom.parentElement:null,r&&(ud=e)},m=()=>{ud&&(ud=null)};return window.addEventListener("dragstart",p),window.addEventListener("dragend",m),{destroy(){window.removeEventListener("dragstart",p),window.removeEventListener("dragend",m)}}},props:{handleDOMEvents:{drop:(h,p)=>{if(i=r===h.dom.parentElement,a=p,!i){const m=ud;m?.isEditable&&setTimeout(()=>{const v=m.state.selection;v&&m.commands.deleteRange({from:v.from,to:v.to})},10)}return!1},paste:(h,p)=>{var m;const v=(m=p.clipboardData)==null?void 0:m.getData("text/html");return o=p,A=!!v?.includes("data-pm-slice"),!1}}},appendTransaction:(h,p,m)=>{const v=h[0],B=v.getMeta("uiEvent")==="paste"&&!A,y=v.getMeta("uiEvent")==="drop"&&!i,w=v.getMeta("applyPasteRules"),C=!!w;if(!B&&!y&&!C)return;if(C){let{text:U}=w;typeof U=="string"?U=U:U=Ym(Qe.from(U),m.schema);const{from:D}=w,M=D+U.length,K=T$(U);return l({rule:d,state:m,from:D,to:{b:M},pasteEvt:K})}const k=p.doc.content.findDiffStart(m.doc.content),F=p.doc.content.findDiffEnd(m.doc.content);if(!(!S$(k)||!F||k===F.b))return l({rule:d,state:m,from:k,to:F,pasteEvt:o})}}))}var dd=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=M1(t),this.schema=$3(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:id(e.name,this.schema)},r=Ye(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return Ad([...this.extensions].reverse()).flatMap(r=>{const A={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:id(r.name,this.schema)},i=[],o=Ye(r,"addKeyboardShortcuts",A);let a={};if(r.type==="mark"&&Ye(r,"exitable",A)&&(a.ArrowRight=()=>Eo.handleExit({editor:t,mark:r})),o){const p=Object.fromEntries(Object.entries(o()).map(([m,v])=>[m,()=>v({editor:t})]));a={...a,...p}}const l=W4(a);i.push(l);const u=Ye(r,"addInputRules",A);if(O1(r,t.options.enableInputRules)&&u){const p=u();if(p&&p.length){const m=E$({editor:t,rules:p}),v=Array.isArray(m)?m:[m];i.push(...v)}}const d=Ye(r,"addPasteRules",A);if(O1(r,t.options.enablePasteRules)&&d){const p=d();if(p&&p.length){const m=M$({editor:t,rules:p});i.push(...m)}}const h=Ye(r,"addProseMirrorPlugins",A);if(h){const p=h();i.push(...p)}return i})}get attributes(){return x1(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=Ba(this.extensions);return Object.fromEntries(e.filter(n=>!!Ye(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),A={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Cn(n.name,this.schema)},i=Ye(n,"addNodeView",A);if(!i)return[];const o=i();if(!o)return[];const a=(l,u,d,h,p)=>{const m=Gl(l,r);return o({node:l,view:u,getPos:d,decorations:h,innerDecorations:p,editor:t,extension:n,HTMLAttributes:m})};return[n.name,a]}))}dispatchTransaction(t){const{editor:e}=this;return Ad([...this.extensions].reverse()).reduceRight((r,A)=>{const i={name:A.name,options:A.options,storage:this.editor.extensionStorage[A.name],editor:e,type:id(A.name,this.schema)},o=Ye(A,"dispatchTransaction",i);return o?a=>{o.call(i,{transaction:a,next:r})}:r},t)}get markViews(){const{editor:t}=this,{markExtensions:e}=Ba(this.extensions);return Object.fromEntries(e.filter(n=>!!Ye(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),A={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Ui(n.name,this.schema)},i=Ye(n,"addMarkView",A);if(!i)return[];const o=(a,l,u)=>{const d=Gl(a,r);return i()({mark:a,view:l,inline:u,editor:t,extension:n,HTMLAttributes:d,updateAttributes:h=>{W$(a,t,h)}})};return[n.name,o]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:id(e.name,this.schema)};e.type==="mark"&&((n=Ot(Ye(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const A=Ye(e,"onBeforeCreate",r),i=Ye(e,"onCreate",r),o=Ye(e,"onUpdate",r),a=Ye(e,"onSelectionUpdate",r),l=Ye(e,"onTransaction",r),u=Ye(e,"onFocus",r),d=Ye(e,"onBlur",r),h=Ye(e,"onDestroy",r);A&&this.editor.on("beforeCreate",A),i&&this.editor.on("create",i),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),d&&this.editor.on("blur",d),h&&this.editor.on("destroy",h)})}};dd.resolve=M1,dd.sort=Ad,dd.flatten=Gm;var I$={};$m(I$,{ClipboardTextSerializer:()=>$1,Commands:()=>K1,Delete:()=>z1,Drop:()=>W1,Editable:()=>G1,FocusEvents:()=>q1,Keymap:()=>X1,Paste:()=>J1,Tabindex:()=>j1,TextDirection:()=>Z1,focusEventsPluginKey:()=>Y1});var on=class oT extends Zm{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new oT(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},$1=on.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new en({key:new xn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:A}=e,{ranges:i}=A,o=Math.min(...i.map(d=>d.$from.pos)),a=Math.max(...i.map(d=>d.$to.pos)),l=U1(n);return I1(r,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),K1=on.create({name:"commands",addCommands(){return{...p1}}}),z1=on.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,A;const i=()=>{var o,a,l,u;if((u=(l=(a=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,t))!=null?u:t.getMeta("y-sync$"))return;const d=k1(t.before,[t,...e]);D1(d).forEach(m=>{d.mapping.mapResult(m.oldRange.from).deletedAfter&&d.mapping.mapResult(m.oldRange.to).deletedBefore&&d.before.nodesBetween(m.oldRange.from,m.oldRange.to,(v,B)=>{const y=B+v.nodeSize-2,w=m.oldRange.from<=B&&y<=m.oldRange.to;this.editor.emit("delete",{type:"node",node:v,from:B,to:y,newFrom:d.mapping.map(B),newTo:d.mapping.map(y),deletedRange:m.oldRange,newRange:m.newRange,partial:!w,editor:this.editor,transaction:t,combinedTransform:d})})});const p=d.mapping;d.steps.forEach((m,v)=>{var B,y;if(m instanceof TA){const w=p.slice(v).map(m.from,-1),C=p.slice(v).map(m.to),k=p.invert().map(w,-1),F=p.invert().map(C),U=(B=d.doc.nodeAt(w-1))==null?void 0:B.marks.some(M=>M.eq(m.mark)),D=(y=d.doc.nodeAt(C))==null?void 0:y.marks.some(M=>M.eq(m.mark));this.editor.emit("delete",{type:"mark",mark:m.mark,from:m.from,to:m.to,deletedRange:{from:k,to:F},newRange:{from:w,to:C},partial:!!(D||U),editor:this.editor,transaction:t,combinedTransform:d})}})};(A=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||A?setTimeout(i,0):i()}}),W1=on.create({name:"drop",addProseMirrorPlugins(){return[new en({key:new xn("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),G1=on.create({name:"editable",addProseMirrorPlugins(){return[new en({key:new xn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Y1=new xn("focusEvents"),q1=on.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new en({key:Y1,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),X1=on.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:d,$anchor:h}=l,{pos:p,parent:m}=h,v=h.parent.isTextblock&&p>0?a.doc.resolve(p-1):h,B=v.parent.type.spec.isolating,y=h.pos-h.parentOffset,w=B&&v.parent.childCount===1?y===h.pos:st.atStart(u).from===p;return!d||!m.type.isTextblock||m.textContent.length||!w||w&&h.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},A={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ed()||C1()?i:A},addProseMirrorPlugins(){return[new en({key:new xn("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(B=>B.getMeta("composition")))return;const r=t.some(B=>B.docChanged)&&!e.doc.eq(n.doc),A=t.some(B=>B.getMeta("preventClearDocument"));if(!r||A)return;const{empty:i,from:o,to:a}=e.selection,l=st.atStart(e.doc).from,u=st.atEnd(e.doc).to;if(i||!(o===l&&a===u)||!sd(n.doc))return;const p=n.tr,m=ju({state:n,transaction:p}),{commands:v}=new Zu({editor:this.editor,state:m});if(v.clearNodes(),!!p.steps.length)return p}})]}}),J1=on.create({name:"paste",addProseMirrorPlugins(){return[new en({key:new xn("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),j1=on.create({name:"tabindex",addProseMirrorPlugins(){return[new en({key:new xn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Z1=on.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=Ba(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new en({key:new xn("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),U$=class zc{constructor(e,n,r=!1,A=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=A}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new zc(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new zc(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new zc(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const A=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,o=n.isInline,a=this.pos+r+(i?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!A&&!o&&l.depth<=this.depth)return;const u=new zc(l,this.editor,A,A||o?n:null);A&&(u.actualDepth=this.depth+1),e.push(u)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,A=this.parent;for(;A&&!r;){if(A.node.type.name===e)if(Object.keys(n).length>0){const i=A.node.attrs,o=Object.keys(n);for(let a=0;a<o.length;a+=1){const l=o[a];if(i[l]!==n[l])break}}else r=A;A=A.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let A=[];if(!this.children||this.children.length===0)return A;const i=Object.keys(n);return this.children.forEach(o=>{r&&A.length>0||(o.node.type.name===e&&i.every(l=>n[l]===o.node.attrs[l])&&A.push(o),!(r&&A.length>0)&&(A=A.concat(o.querySelectorAll(e,n,r))))}),A}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},_$=`.ProseMirror {
|
|
23
|
-
position: relative;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.ProseMirror {
|
|
27
|
-
word-wrap: break-word;
|
|
28
|
-
white-space: pre-wrap;
|
|
29
|
-
white-space: break-spaces;
|
|
30
|
-
-webkit-font-variant-ligatures: none;
|
|
31
|
-
font-variant-ligatures: none;
|
|
32
|
-
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.ProseMirror [contenteditable="false"] {
|
|
36
|
-
white-space: normal;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
40
|
-
white-space: pre-wrap;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ProseMirror pre {
|
|
44
|
-
white-space: pre-wrap;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
img.ProseMirror-separator {
|
|
48
|
-
display: inline !important;
|
|
49
|
-
border: none !important;
|
|
50
|
-
margin: 0 !important;
|
|
51
|
-
width: 0 !important;
|
|
52
|
-
height: 0 !important;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.ProseMirror-gapcursor {
|
|
56
|
-
display: none;
|
|
57
|
-
pointer-events: none;
|
|
58
|
-
position: absolute;
|
|
59
|
-
margin: 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.ProseMirror-gapcursor:after {
|
|
63
|
-
content: "";
|
|
64
|
-
display: block;
|
|
65
|
-
position: absolute;
|
|
66
|
-
top: -2px;
|
|
67
|
-
width: 20px;
|
|
68
|
-
border-top: 1px solid black;
|
|
69
|
-
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
@keyframes ProseMirror-cursor-blink {
|
|
73
|
-
to {
|
|
74
|
-
visibility: hidden;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.ProseMirror-hideselection *::selection {
|
|
79
|
-
background: transparent;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.ProseMirror-hideselection *::-moz-selection {
|
|
83
|
-
background: transparent;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.ProseMirror-hideselection * {
|
|
87
|
-
caret-color: transparent;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
91
|
-
display: block;
|
|
92
|
-
}`;function D$(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const A=document.createElement("style");return e&&A.setAttribute("nonce",e),A.setAttribute("data-tiptap-style",""),A.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(A),A}var O$=class extends C${constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:A})=>{throw A},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:V3,createMappablePosition:e$},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:A,slice:i,moved:o})=>this.options.onDrop(A,i,o)),this.on("paste",({event:A,slice:i})=>this.options.onPaste(A,i)),this.on("delete",this.options.onDelete);const n=this.createDoc(),r=w1(n,this.options.autofocus);this.editorState=da.create({doc:n,schema:this.schema,selection:r||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=D$(_$,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,n)=>{if(this.editorView)return this.editorView[n];if(n==="state")return this.editorState;if(n in e)return Reflect.get(e,n);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${n}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,n){const r=S1(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],A=this.state.reconfigure({plugins:r});return this.view.updateState(A),A}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(e).forEach(i=>{const o=typeof i=="string"?`${i}$`:i.key;r=r.filter(a=>!a.key.startsWith(o))}),n.length===r.length)return;const A=this.state.reconfigure({plugins:r});return this.view.updateState(A),A}createExtensionManager(){var e,n;const A=[...this.options.enableCoreExtensions?[G1,$1.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:n.blockSeparator}),K1,q1,X1,j1,W1,J1,z1,Z1.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new dd(A,this)}createCommandManager(){this.commandManager=new Zu({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=Wm(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(n){if(!(n instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(n.message))throw n;this.emit("contentError",{editor:this,error:n,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),e=Wm(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){const{editorProps:n,enableExtensionDispatchTransaction:r}=this.options,A=n.dispatchTransaction||this.dispatchTransaction.bind(this),i=r?this.extensionManager.dispatchTransaction(A):A;this.editorView=new a1(e,{...n,attributes:{role:"textbox",...n?.attributes},dispatchTransaction:i,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.prependClass(),this.injectCSS();const a=this.view.dom;a.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(d=>{var h;return(h=this.capturedTransaction)==null?void 0:h.step(d)});return}const{state:n,transactions:r}=this.state.applyTransaction(e),A=!this.state.selection.eq(n.selection),i=r.includes(e),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),!i)return;this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:r.slice(1)}),A&&this.emit("selectionUpdate",{editor:this,transaction:e});const a=r.findLast(d=>d.getMeta("focus")||d.getMeta("blur")),l=a?.getMeta("focus"),u=a?.getMeta("blur");l&&this.emit("focus",{editor:this,event:l.event,transaction:a}),u&&this.emit("blur",{editor:this,event:u.event,transaction:a}),!(e.getMeta("preventUpdate")||!r.some(d=>d.docChanged)||o.doc.eq(n.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:r.slice(1)})}getAttributes(e){return _1(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,A=typeof e=="string"?n:e;return J3(this.state,r,A)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ym(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
|
|
93
|
-
|
|
94
|
-
`,textSerializers:r={}}=e||{};return z3(this.state.doc,{blockSeparator:n,textSerializers:{...U1(this.schema),...r}})}get isEmpty(){return sd(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,n;return(n=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?n:!0}$node(e,n){var r;return((r=this.$doc)==null?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)==null?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new U$(n,this)}get $doc(){return this.$pos(0)}};function bs(t){return new ad({find:t.find,handler:({state:e,range:n,match:r})=>{const A=Ot(t.getAttributes,void 0,r);if(A===!1||A===null)return null;const{tr:i}=e,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),u=n.from+a.indexOf(o),d=u+o.length;if(qm(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(B=>B===t.type&&B!==m.mark.type)).filter(m=>m.to>u).length)return null;d<n.to&&i.delete(d,n.to),u>n.from&&i.delete(n.from+l,u);const p=n.from+l+o.length;i.addMark(n.from+l,p,t.type.create(A||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function N$(t){return new ad({find:t.find,handler:({state:e,range:n,match:r})=>{const A=Ot(t.getAttributes,void 0,r)||{},{tr:i}=e,o=n.from;let a=n.to;const l=t.type.create(A);if(r[1]){const u=r[0].lastIndexOf(r[1]);let d=o+u;d>a?d=a:a=d+r[1].length;const h=r[0][r[0].length-1];i.insertText(h,o+r[0].length-1),i.replaceWith(d,a,l)}else if(r[0]){const u=t.type.isInline?o:o-1;i.insert(u,t.type.create(A)).delete(i.mapping.map(o),i.mapping.map(a))}i.scrollIntoView()},undoable:t.undoable})}function Vm(t){return new ad({find:t.find,handler:({state:e,range:n,match:r})=>{const A=e.doc.resolve(n.from),i=Ot(t.getAttributes,void 0,r)||{};if(!A.node(-1).canReplaceWith(A.index(-1),A.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function ya(t){return new ad({find:t.find,handler:({state:e,range:n,match:r,chain:A})=>{const i=Ot(t.getAttributes,void 0,r)||{},o=e.tr.delete(n.from,n.to),l=o.doc.resolve(n.from).blockRange(),u=l&&Am(l,t.type,i);if(!u)return null;if(o.wrap(l,u),t.keepMarks&&t.editor){const{selection:h,storedMarks:p}=e,{splittableMarks:m}=t.editor.extensionManager,v=p||h.$to.parentOffset&&h.$from.marks();if(v){const B=v.filter(y=>m.includes(y.type.name));o.ensureMarks(B)}}if(t.keepAttributes){const h=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";A().updateAttributes(h,i).run()}const d=o.doc.resolve(n.from-1).nodeBefore;d&&d.type===t.type&&fo(o.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,d))&&o.join(n.from-1)},undoable:t.undoable})}function L$(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof qe){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let A=r.depth;for(;A>=0;){const i=r.index(A);if(r.node(A).contentMatchAt(i).matchType(e))return!0;A-=1}return!1}var R$={};$m(R$,{createAtomBlockMarkdownSpec:()=>H$,createBlockMarkdownSpec:()=>P$,createInlineMarkdownSpec:()=>z$,parseAttributes:()=>eg,parseIndentedBlocks:()=>ng,renderNestedMarkdownContent:()=>rg,serializeAttributes:()=>tg});function eg(t){if(!t?.trim())return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),A=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(A){const u=A.map(d=>d.trim().slice(1));e.class=u.join(" ")}const i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(e.id=i[1]);const o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,u,d])=>{var h;const p=parseInt(((h=d.match(/__QUOTED_(\d+)__/))==null?void 0:h[1])||"0",10),m=n[p];m&&(e[u]=m.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(d=>{d.match(/^[a-zA-Z][\w-]*$/)&&(e[d]=!0)}),e}function tg(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function H$(t){const{nodeName:e,name:n,parseAttributes:r=eg,serializeAttributes:A=tg,defaultAttributes:i={},requiredAttributes:o=[],allowedAttributes:a}=t,l=n||e,u=d=>{if(!a)return d;const h={};return a.forEach(p=>{p in d&&(h[p]=d[p])}),h};return{parseMarkdown:(d,h)=>{const p={...i,...d.attributes};return h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"block",start(d){var h;const p=new RegExp(`^:::${l}(?:\\s|$)`,"m"),m=(h=d.match(p))==null?void 0:h.index;return m!==void 0?m:-1},tokenize(d,h,p){const m=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),v=d.match(m);if(!v)return;const B=v[1]||"",y=r(B);if(!o.find(C=>!(C in y)))return{type:e,raw:v[0],attributes:y}}},renderMarkdown:d=>{const h=u(d.attrs||{}),p=A(h),m=p?` {${p}}`:"";return`:::${l}${m} :::`}}}function P$(t){const{nodeName:e,name:n,getContent:r,parseAttributes:A=eg,serializeAttributes:i=tg,defaultAttributes:o={},content:a="block",allowedAttributes:l}=t,u=n||e,d=h=>{if(!l)return h;const p={};return l.forEach(m=>{m in h&&(p[m]=h[m])}),p};return{parseMarkdown:(h,p)=>{let m;if(r){const B=r(h);m=typeof B=="string"?[{type:"text",text:B}]:B}else a==="block"?m=p.parseChildren(h.tokens||[]):m=p.parseInline(h.tokens||[]);const v={...o,...h.attributes};return p.createNode(e,v,m)},markdownTokenizer:{name:e,level:"block",start(h){var p;const m=new RegExp(`^:::${u}`,"m"),v=(p=h.match(m))==null?void 0:p.index;return v!==void 0?v:-1},tokenize(h,p,m){var v;const B=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),y=h.match(B);if(!y)return;const[w,C=""]=y,k=A(C);let F=1;const U=w.length;let D="";const M=/^:::([\w-]*)(\s.*)?/gm,K=h.slice(U);for(M.lastIndex=0;;){const q=M.exec(K);if(q===null)break;const ce=q.index,me=q[1];if(!((v=q[2])!=null&&v.endsWith(":::"))){if(me)F+=1;else if(F-=1,F===0){const ve=K.slice(0,ce);D=ve.trim();const Be=h.slice(0,U+ce+q[0].length);let te=[];if(D)if(a==="block")for(te=m.blockTokens(ve),te.forEach(V=>{V.text&&(!V.tokens||V.tokens.length===0)&&(V.tokens=m.inlineTokens(V.text))});te.length>0;){const V=te[te.length-1];if(V.type==="paragraph"&&(!V.text||V.text.trim()===""))te.pop();else break}else te=m.inlineTokens(D);return{type:e,raw:Be,attributes:k,content:D,tokens:te}}}}}},renderMarkdown:(h,p)=>{const m=d(h.attrs||{}),v=i(m),B=v?` {${v}}`:"",y=p.renderChildren(h.content||[],`
|
|
95
|
-
|
|
96
|
-
`);return`:::${u}${B}
|
|
97
|
-
|
|
98
|
-
${y}
|
|
99
|
-
|
|
100
|
-
:::`}}}function $$(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,A,i,o]=r;e[A]=i||o,r=n.exec(t)}return e}function K$(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function z$(t){const{nodeName:e,name:n,getContent:r,parseAttributes:A=$$,serializeAttributes:i=K$,defaultAttributes:o={},selfClosing:a=!1,allowedAttributes:l}=t,u=n||e,d=p=>{if(!l)return p;const m={};return l.forEach(v=>{const B=typeof v=="string"?v:v.name,y=typeof v=="string"?void 0:v.skipIfDefault;if(B in p){const w=p[B];if(y!==void 0&&w===y)return;m[B]=w}}),m},h=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(p,m)=>{const v={...o,...p.attributes};if(a)return m.createNode(e,v);const B=r?r(p):p.content||"";return B?m.createNode(e,v,[m.createTextNode(B)]):m.createNode(e,v,[])},markdownTokenizer:{name:e,level:"inline",start(p){const m=a?new RegExp(`\\[${h}\\s*[^\\]]*\\]`):new RegExp(`\\[${h}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${h}\\]`),v=p.match(m),B=v?.index;return B!==void 0?B:-1},tokenize(p,m,v){const B=a?new RegExp(`^\\[${h}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${h}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${h}\\]`),y=p.match(B);if(!y)return;let w="",C="";if(a){const[,F]=y;C=F}else{const[,F,U]=y;C=F,w=U||""}const k=A(C.trim());return{type:e,raw:y[0],content:w.trim(),attributes:k}}},renderMarkdown:p=>{let m="";r?m=r(p):p.content&&p.content.length>0&&(m=p.content.filter(w=>w.type==="text").map(w=>w.text).join(""));const v=d(p.attrs||{}),B=i(v),y=B?` ${B}`:"";return a?`[${u}${y}]`:`[${u}${y}]${m}[/${u}]`}}}function ng(t,e,n){var r,A,i,o;const a=t.split(`
|
|
101
|
-
`),l=[];let u="",d=0;const h=e.baseIndentSize||2;for(;d<a.length;){const p=a[d],m=p.match(e.itemPattern);if(!m){if(l.length>0)break;if(p.trim()===""){d+=1,u=`${u}${p}
|
|
102
|
-
`;continue}else return}const v=e.extractItemData(m),{indentLevel:B,mainContent:y}=v;u=`${u}${p}
|
|
103
|
-
`;const w=[y];for(d+=1;d<a.length;){const U=a[d];if(U.trim()===""){const M=a.slice(d+1).findIndex(ce=>ce.trim()!=="");if(M===-1)break;if((((A=(r=a[d+1+M].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:A.length)||0)>B){w.push(U),u=`${u}${U}
|
|
104
|
-
`,d+=1;continue}else break}if((((o=(i=U.match(/^(\s*)/))==null?void 0:i[1])==null?void 0:o.length)||0)>B)w.push(U),u=`${u}${U}
|
|
105
|
-
`,d+=1;else break}let C;const k=w.slice(1);if(k.length>0){const U=k.map(D=>D.slice(B+h)).join(`
|
|
106
|
-
`);U.trim()&&(e.customNestedParser?C=e.customNestedParser(U):C=n.blockTokens(U))}const F=e.createToken(v,C);l.push(F)}if(l.length!==0)return{items:l,raw:u}}function rg(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const A=typeof n=="function"?n(r):n,[i,...o]=t.content,a=e.renderChildren([i]),l=[`${A}${a}`];return o&&o.length>0&&o.forEach(u=>{const d=e.renderChildren([u]);if(d){const h=d.split(`
|
|
107
|
-
`).map(p=>p?e.indent(p):"").join(`
|
|
108
|
-
`);l.push(h)}}),l.join(`
|
|
109
|
-
`)}function W$(t,e,n={}){const{state:r}=e,{doc:A,tr:i}=r,o=t;A.descendants((a,l)=>{const u=i.mapping.map(l),d=i.mapping.map(l)+a.nodeSize;let h=null;if(a.marks.forEach(m=>{if(m!==o)return!1;h=m}),!h)return;let p=!1;if(Object.keys(n).forEach(m=>{n[m]!==h.attrs[m]&&(p=!0)}),p){const m=t.type.create({...t.attrs,...n});i.removeMark(u,d,t.type),i.addMark(u,d,m)}}),i.docChanged&&e.view.dispatch(i)}var Rr=class sT extends Zm{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new sT(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function ko(t){return new x$({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:A})=>{const i=Ot(t.getAttributes,void 0,r,A);if(i===!1||i===null)return null;const{tr:o}=e,a=r[r.length-1],l=r[0];let u=n.to;if(a){const d=l.search(/\S/),h=n.from+l.indexOf(a),p=h+a.length;if(qm(n.from,n.to,e.doc).filter(v=>v.mark.type.excluded.find(y=>y===t.type&&y!==v.mark.type)).filter(v=>v.to>h).length)return null;p<n.to&&o.delete(p,n.to),h>n.from&&o.delete(n.from+d,h),u=n.from+d+a.length,o.addMark(n.from+d,u,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}var G$=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Y$=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,q$=Eo.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",Jt(this.options.HTMLAttributes,t),0]},renderMarkdown:(t,e)=>`==${e.renderChildren(t)}==`,parseMarkdown:(t,e)=>e.applyMark("highlight",e.parseInline(t.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:t=>t.indexOf("=="),tokenize(t,e,n){const A=/^(==)([^=]+)(==)/.exec(t);if(A){const i=A[2].trim(),o=n.inlineTokens(i);return{type:"highlight",raw:A[0],text:i,tokens:o}}}},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[bs({find:G$,type:this.type})]},addPasteRules(){return[ko({find:Y$,type:this.type})]}}),X$=q$,J$=on.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),j$=J$;const Z$="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",V$="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Ag="numeric",ig="ascii",og="alpha",Yl="asciinumeric",ql="alphanumeric",sg="domain",V1="emoji",eK="scheme",tK="slashscheme",ag="whitespace";function nK(t,e){return t in e||(e[t]=[]),e[t]}function Es(t,e,n){e[Ag]&&(e[Yl]=!0,e[ql]=!0),e[ig]&&(e[Yl]=!0,e[og]=!0),e[Yl]&&(e[ql]=!0),e[og]&&(e[ql]=!0),e[ql]&&(e[sg]=!0),e[V1]&&(e[sg]=!0);for(const r in e){const A=nK(r,n);A.indexOf(t)<0&&A.push(t)}}function rK(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function Sr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}Sr.groups={},Sr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const A=e.jr[r][0],i=e.jr[r][1];if(i&&A.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let A=0;A<t.length;A++)this.tt(t[A],e,n,r)},tr(t,e,n,r){r=r||Sr.groups;let A;return e&&e.j?A=e:(A=new Sr(e),n&&r&&Es(e,n,r)),this.jr.push([t,A]),A},ts(t,e,n,r){let A=this;const i=t.length;if(!i)return A;for(let o=0;o<i-1;o++)A=A.tt(t[o]);return A.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||Sr.groups;const A=this;if(e&&e.j)return A.j[t]=e,e;const i=e;let o,a=A.go(t);if(a?(o=new Sr,Object.assign(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new Sr,i){if(r)if(o.t&&typeof o.t=="string"){const l=Object.assign(rK(o.t,r),n);Es(i,l,r)}else n&&Es(i,n,r);o.t=i}return A.j[t]=o,o}};const lt=(t,e,n,r,A)=>t.ta(e,n,r,A),sn=(t,e,n,r,A)=>t.tr(e,n,r,A),eE=(t,e,n,r,A)=>t.ts(e,n,r,A),Me=(t,e,n,r,A)=>t.tt(e,n,r,A),_i="WORD",lg="UWORD",tE="ASCIINUMERICAL",nE="ALPHANUMERICAL",Xl="LOCALHOST",cg="TLD",ug="UTLD",fd="SCHEME",Ca="SLASH_SCHEME",dg="NUM",fg="WS",hg="NL",Jl="OPENBRACE",jl="CLOSEBRACE",hd="OPENBRACKET",pd="CLOSEBRACKET",md="OPENPAREN",gd="CLOSEPAREN",vd="OPENANGLEBRACKET",wd="CLOSEANGLEBRACKET",Bd="FULLWIDTHLEFTPAREN",yd="FULLWIDTHRIGHTPAREN",Cd="LEFTCORNERBRACKET",bd="RIGHTCORNERBRACKET",Ed="LEFTWHITECORNERBRACKET",kd="RIGHTWHITECORNERBRACKET",Sd="FULLWIDTHLESSTHAN",xd="FULLWIDTHGREATERTHAN",Fd="AMPERSAND",Qd="APOSTROPHE",Td="ASTERISK",So="AT",Md="BACKSLASH",Id="BACKTICK",Ud="CARET",xo="COLON",pg="COMMA",_d="DOLLAR",oi="DOT",Dd="EQUALS",mg="EXCLAMATION",rA="HYPHEN",Zl="PERCENT",Od="PIPE",Nd="PLUS",Ld="POUND",Vl="QUERY",gg="QUOTE",rE="FULLWIDTHMIDDLEDOT",vg="SEMI",si="SLASH",ec="TILDE",Rd="UNDERSCORE",AE="EMOJI",Hd="SYM";var iE=Object.freeze({__proto__:null,ALPHANUMERICAL:nE,AMPERSAND:Fd,APOSTROPHE:Qd,ASCIINUMERICAL:tE,ASTERISK:Td,AT:So,BACKSLASH:Md,BACKTICK:Id,CARET:Ud,CLOSEANGLEBRACKET:wd,CLOSEBRACE:jl,CLOSEBRACKET:pd,CLOSEPAREN:gd,COLON:xo,COMMA:pg,DOLLAR:_d,DOT:oi,EMOJI:AE,EQUALS:Dd,EXCLAMATION:mg,FULLWIDTHGREATERTHAN:xd,FULLWIDTHLEFTPAREN:Bd,FULLWIDTHLESSTHAN:Sd,FULLWIDTHMIDDLEDOT:rE,FULLWIDTHRIGHTPAREN:yd,HYPHEN:rA,LEFTCORNERBRACKET:Cd,LEFTWHITECORNERBRACKET:Ed,LOCALHOST:Xl,NL:hg,NUM:dg,OPENANGLEBRACKET:vd,OPENBRACE:Jl,OPENBRACKET:hd,OPENPAREN:md,PERCENT:Zl,PIPE:Od,PLUS:Nd,POUND:Ld,QUERY:Vl,QUOTE:gg,RIGHTCORNERBRACKET:bd,RIGHTWHITECORNERBRACKET:kd,SCHEME:fd,SEMI:vg,SLASH:si,SLASH_SCHEME:Ca,SYM:Hd,TILDE:ec,TLD:cg,UNDERSCORE:Rd,UTLD:ug,UWORD:lg,WORD:_i,WS:fg});const Di=/[a-z]/,tc=new RegExp("\\p{L}","u"),wg=new RegExp("\\p{Emoji}","u"),Oi=/\d/,Bg=/\s/,oE="\r",yg=`
|
|
110
|
-
`,AK="️",iK="",Cg="";let Pd=null,$d=null;function oK(t=[]){const e={};Sr.groups=e;const n=new Sr;Pd==null&&(Pd=aE(Z$)),$d==null&&($d=aE(V$)),Me(n,"'",Qd),Me(n,"{",Jl),Me(n,"}",jl),Me(n,"[",hd),Me(n,"]",pd),Me(n,"(",md),Me(n,")",gd),Me(n,"<",vd),Me(n,">",wd),Me(n,"(",Bd),Me(n,")",yd),Me(n,"「",Cd),Me(n,"」",bd),Me(n,"『",Ed),Me(n,"』",kd),Me(n,"<",Sd),Me(n,">",xd),Me(n,"&",Fd),Me(n,"*",Td),Me(n,"@",So),Me(n,"`",Id),Me(n,"^",Ud),Me(n,":",xo),Me(n,",",pg),Me(n,"$",_d),Me(n,".",oi),Me(n,"=",Dd),Me(n,"!",mg),Me(n,"-",rA),Me(n,"%",Zl),Me(n,"|",Od),Me(n,"+",Nd),Me(n,"#",Ld),Me(n,"?",Vl),Me(n,'"',gg),Me(n,"/",si),Me(n,";",vg),Me(n,"~",ec),Me(n,"_",Rd),Me(n,"\\",Md),Me(n,"・",rE);const r=sn(n,Oi,dg,{[Ag]:!0});sn(r,Oi,r);const A=sn(r,Di,tE,{[Yl]:!0}),i=sn(r,tc,nE,{[ql]:!0}),o=sn(n,Di,_i,{[ig]:!0});sn(o,Oi,A),sn(o,Di,o),sn(A,Oi,A),sn(A,Di,A);const a=sn(n,tc,lg,{[og]:!0});sn(a,Di),sn(a,Oi,i),sn(a,tc,a),sn(i,Oi,i),sn(i,Di),sn(i,tc,i);const l=Me(n,yg,hg,{[ag]:!0}),u=Me(n,oE,fg,{[ag]:!0}),d=sn(n,Bg,fg,{[ag]:!0});Me(n,Cg,d),Me(u,yg,l),Me(u,Cg,d),sn(u,Bg,d),Me(d,oE),Me(d,yg),sn(d,Bg,d),Me(d,Cg,d);const h=sn(n,wg,AE,{[V1]:!0});Me(h,"#"),sn(h,wg,h),Me(h,AK,h);const p=Me(h,iK);Me(p,"#"),sn(p,wg,h);const m=[[Di,o],[Oi,A]],v=[[Di,null],[tc,a],[Oi,i]];for(let B=0;B<Pd.length;B++)Fo(n,Pd[B],cg,_i,m);for(let B=0;B<$d.length;B++)Fo(n,$d[B],ug,lg,v);Es(cg,{tld:!0,ascii:!0},e),Es(ug,{utld:!0,alpha:!0},e),Fo(n,"file",fd,_i,m),Fo(n,"mailto",fd,_i,m),Fo(n,"http",Ca,_i,m),Fo(n,"https",Ca,_i,m),Fo(n,"ftp",Ca,_i,m),Fo(n,"ftps",Ca,_i,m),Es(fd,{scheme:!0,ascii:!0},e),Es(Ca,{slashscheme:!0,ascii:!0},e),t=t.sort((B,y)=>B[0]>y[0]?1:-1);for(let B=0;B<t.length;B++){const y=t[B][0],C=t[B][1]?{[eK]:!0}:{[tK]:!0};y.indexOf("-")>=0?C[sg]=!0:Di.test(y)?Oi.test(y)?C[Yl]=!0:C[ig]=!0:C[Ag]=!0,eE(n,y,y,C)}return eE(n,"localhost",Xl,{ascii:!0}),n.jd=new Sr(Hd),{start:n,tokens:Object.assign({groups:e},iE)}}function sE(t,e){const n=sK(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,A=[];let i=0,o=0;for(;o<r;){let a=t,l=null,u=0,d=null,h=-1,p=-1;for(;o<r&&(l=a.go(n[o]));)a=l,a.accepts()?(h=0,p=0,d=a):h>=0&&(h+=n[o].length,p++),u+=n[o].length,i+=n[o].length,o++;i-=h,o-=p,u-=h,A.push({t:d.t,v:e.slice(i-u,i),s:i-u,e:i})}return A}function sK(t){const e=[],n=t.length;let r=0;for(;r<n;){let A=t.charCodeAt(r),i,o=A<55296||A>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function Fo(t,e,n,r,A){let i;const o=e.length;for(let a=0;a<o-1;a++){const l=e[a];t.j[l]?i=t.j[l]:(i=new Sr(r),i.jr=A.slice(),t.j[l]=i),t=i}return i=new Sr(n),i.jr=A.slice(),t.j[e[o-1]]=i,i}function aE(t){const e=[],n=[];let r=0,A="0123456789";for(;r<t.length;){let i=0;for(;A.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let o=parseInt(t.substring(r,r+i),10);o>0;o--)n.pop();r+=i}else n.push(t[r]),r++}return e}const nc={defaultProtocol:"http",events:null,format:lE,formatHref:lE,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function bg(t,e=null){let n=Object.assign({},nc);t&&(n=Object.assign(n,t instanceof bg?t.o:t));const r=n.ignoreTags,A=[];for(let i=0;i<r.length;i++)A.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=A}bg.prototype={o:nc,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let A=this.o[t];return A&&(typeof A=="object"?(A=n.t in A?A[n.t]:nc[t],typeof A=="function"&&r&&(A=A(e,n))):typeof A=="function"&&r&&(A=A(e,n.t,n)),A)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function lE(t){return t}function cE(t,e){this.t="token",this.v=t,this.tk=e}cE.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=nc.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),A=t.get("tagName",n,e),i=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),u=t.get("rel",n,e),d=t.getObj("attributes",n,e),h=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),u&&(o.rel=u),d&&Object.assign(o,d),{tagName:A,attributes:o,content:i,eventListeners:h}}};function Kd(t,e){class n extends cE{constructor(A,i){super(A,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const uE=Kd("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),dE=Kd("text"),aK=Kd("nl"),zd=Kd("url",{isLink:!0,toHref(t=nc.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Xl&&t[1].t===xo}}),AA=t=>new Sr(t);function lK({groups:t}){const e=t.domain.concat([Fd,Td,So,Md,Id,Ud,_d,Dd,rA,dg,Zl,Od,Nd,Ld,si,Hd,ec,Rd]),n=[Qd,xo,pg,oi,mg,Zl,Vl,gg,vg,vd,wd,Jl,jl,pd,hd,md,gd,Bd,yd,Cd,bd,Ed,kd,Sd,xd],r=[Fd,Qd,Td,Md,Id,Ud,_d,Dd,rA,Jl,jl,Zl,Od,Nd,Ld,Vl,si,Hd,ec,Rd],A=AA(),i=Me(A,ec);lt(i,r,i),lt(i,t.domain,i);const o=AA(),a=AA(),l=AA();lt(A,t.domain,o),lt(A,t.scheme,a),lt(A,t.slashscheme,l),lt(o,r,i),lt(o,t.domain,o);const u=Me(o,So);Me(i,So,u),Me(a,So,u),Me(l,So,u);const d=Me(i,oi);lt(d,r,i),lt(d,t.domain,i);const h=AA();lt(u,t.domain,h),lt(h,t.domain,h);const p=Me(h,oi);lt(p,t.domain,h);const m=AA(uE);lt(p,t.tld,m),lt(p,t.utld,m),Me(u,Xl,m);const v=Me(h,rA);Me(v,rA,v),lt(v,t.domain,h),lt(m,t.domain,h),Me(m,oi,p),Me(m,rA,v);const B=Me(m,xo);lt(B,t.numeric,uE);const y=Me(o,rA),w=Me(o,oi);Me(y,rA,y),lt(y,t.domain,o),lt(w,r,i),lt(w,t.domain,o);const C=AA(zd);lt(w,t.tld,C),lt(w,t.utld,C),lt(C,t.domain,o),lt(C,r,i),Me(C,oi,w),Me(C,rA,y),Me(C,So,u);const k=Me(C,xo),F=AA(zd);lt(k,t.numeric,F);const U=AA(zd),D=AA();lt(U,e,U),lt(U,n,D),lt(D,e,U),lt(D,n,D),Me(C,si,U),Me(F,si,U);const M=Me(a,xo),K=Me(l,xo),q=Me(K,si),ce=Me(q,si);lt(a,t.domain,o),Me(a,oi,w),Me(a,rA,y),lt(l,t.domain,o),Me(l,oi,w),Me(l,rA,y),lt(M,t.domain,U),Me(M,si,U),Me(M,Vl,U),lt(ce,t.domain,U),lt(ce,e,U),Me(ce,si,U);const me=[[Jl,jl],[hd,pd],[md,gd],[vd,wd],[Bd,yd],[Cd,bd],[Ed,kd],[Sd,xd]];for(let ve=0;ve<me.length;ve++){const[Be,te]=me[ve],V=Me(U,Be);Me(D,Be,V),Me(V,te,U);const Y=AA(zd);lt(V,e,Y);const x=AA();lt(V,n),lt(Y,e,Y),lt(Y,n,x),lt(x,e,Y),lt(x,n,x),Me(Y,te,U),Me(x,te,U)}return Me(A,Xl,C),Me(A,hg,aK),{start:A,tokens:iE}}function cK(t,e,n){let r=n.length,A=0,i=[],o=[];for(;A<r;){let a=t,l=null,u=null,d=0,h=null,p=-1;for(;A<r&&!(l=a.go(n[A].t));)o.push(n[A++]);for(;A<r&&(u=l||a.go(n[A].t));)l=null,a=u,a.accepts()?(p=0,h=a):p>=0&&p++,A++,d++;if(p<0)A-=d,A<r&&(o.push(n[A]),A++);else{o.length>0&&(i.push(Eg(dE,e,o)),o=[]),A-=p,d-=p;const m=h.t,v=n.slice(A-d,A);i.push(Eg(m,e,v))}}return o.length>0&&i.push(Eg(dE,e,o)),i}function Eg(t,e,n){const r=n[0].s,A=n[n.length-1].e,i=e.slice(r,A);return new t(i,n)}const uK=typeof console<"u"&&console&&console.warn||(()=>{}),dK="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Gt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function fK(){return Sr.groups={},Gt.scanner=null,Gt.parser=null,Gt.tokenQueue=[],Gt.pluginQueue=[],Gt.customSchemes=[],Gt.initialized=!1,Gt}function fE(t,e=!1){if(Gt.initialized&&uK(`linkifyjs: already initialized - will not register custom scheme "${t}" ${dK}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
111
|
-
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
112
|
-
2. Cannot start or end with "-"
|
|
113
|
-
3. "-" cannot repeat`);Gt.customSchemes.push([t,e])}function hK(){Gt.scanner=oK(Gt.customSchemes);for(let t=0;t<Gt.tokenQueue.length;t++)Gt.tokenQueue[t][1]({scanner:Gt.scanner});Gt.parser=lK(Gt.scanner.tokens);for(let t=0;t<Gt.pluginQueue.length;t++)Gt.pluginQueue[t][1]({scanner:Gt.scanner,parser:Gt.parser});return Gt.initialized=!0,Gt}function kg(t){return Gt.initialized||hK(),cK(Gt.parser.start,t,sE(Gt.scanner.start,t))}kg.scan=sE;function hE(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 bg(n),A=kg(t),i=[];for(let o=0;o<A.length;o++){const a=A[o];a.isLink&&(!e||a.t===e)&&r.check(a)&&i.push(a.toFormattedObject(r))}return i}var Sg="[\0- -\u2029 ]",pK=new RegExp(Sg),mK=new RegExp(`${Sg}$`),gK=new RegExp(Sg,"g");function vK(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function wK(t){return new en({key:new xn("autolink"),appendTransaction:(e,n,r)=>{const A=e.some(u=>u.docChanged)&&!n.doc.eq(r.doc),i=e.some(u=>u.getMeta("preventAutolink"));if(!A||i)return;const{tr:o}=r,a=k1(n.doc,[...e]);if(D1(a).forEach(({newRange:u})=>{const d=L3(r.doc,u,m=>m.isTextblock);let h,p;if(d.length>1)h=d[0],p=r.doc.textBetween(h.pos,h.pos+h.node.nodeSize,void 0," ");else if(d.length){const m=r.doc.textBetween(u.from,u.to," "," ");if(!mK.test(m))return;h=d[0],p=r.doc.textBetween(h.pos,u.to,void 0," ")}if(h&&p){const m=p.split(pK).filter(Boolean);if(m.length<=0)return!1;const v=m[m.length-1],B=h.pos+p.lastIndexOf(v);if(!v)return!1;const y=kg(v).map(w=>w.toObject(t.defaultProtocol));if(!vK(y))return!1;y.filter(w=>w.isLink).map(w=>({...w,from:B+w.start+1,to:B+w.end+1})).filter(w=>r.schema.marks.code?!r.doc.rangeHasMark(w.from,w.to,r.schema.marks.code):!0).filter(w=>t.validate(w.value)).filter(w=>t.shouldAutoLink(w.value)).forEach(w=>{qm(w.from,w.to,r.doc).some(C=>C.mark.type===t.type)||o.addMark(w.from,w.to,t.type.create({href:w.href}))})}}),!!o.steps.length)return o}})}function BK(t){return new en({key:new xn("handleClickLink"),props:{handleClick:(e,n,r)=>{var A,i;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{const l=r.target;if(!l)return!1;const u=t.editor.view.dom;o=l.closest("a"),o&&!u.contains(o)&&(o=null)}if(!o)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const l=_1(e.state,t.type.name),u=(A=o.href)!=null?A:l.href,d=(i=o.target)!=null?i:l.target;u&&(window.open(u,d),a=!0)}return a}}})}function yK(t){return new en({key:new xn("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:A}=t,{state:i}=e,{selection:o}=i,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(d=>{l+=d.textContent});const u=hE(l,{defaultProtocol:t.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!u||A!==void 0&&!A(u.value)?!1:t.editor.commands.setMark(t.type,{href:u.href})}}})}function ks(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const A=typeof r=="string"?r:r.scheme;A&&n.push(A)}),!t||t.replace(gK,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var pE=Eo.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"){fE(t);return}fE(t.scheme,t.optionalSlashes)})},onDestroy(){fK()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!ks(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const A=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(A)||!/\./.test(A))}}},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=>!!ks(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=>!!ks(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Jt(this.options.HTMLAttributes,t),0]:["a",Jt(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n;const r=((n=t.attrs)==null?void 0:n.href)||"";return`[${e.renderChildren(t)}](${r})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ks(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 n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!ks(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[ko({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,A=hE(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:o=>!!ks(o,n),protocols:n,defaultProtocol:r}));A.length&&A.forEach(i=>{this.options.shouldAutoLink(i.value)&&e.push({text:i.value,data:{href:i.href},index:i.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(wK({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:A=>!!ks(A,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(BK({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(yK({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),CK=pE,Wd=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},bK=/^\s*>\s$/,EK=Rr.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Wd("blockquote",{...Jt(this.options.HTMLAttributes,t),children:Wd("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach(A=>{const a=e.renderChildren([A]).split(`
|
|
114
|
-
`).map(l=>l.trim()===""?n:`${n} ${l}`);r.push(a.join(`
|
|
115
|
-
`))}),r.join(`
|
|
116
|
-
${n}
|
|
117
|
-
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[ya({find:bK,type:this.type})]}}),kK=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,SK=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,xK=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,FK=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,mE=Eo.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Wd("strong",{...Jt(this.options.HTMLAttributes,t),children:Wd("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[bs({find:kK,type:this.type}),bs({find:xK,type:this.type})]},addPasteRules(){return[ko({find:SK,type:this.type}),ko({find:FK,type:this.type})]}}),QK=mE,TK=/(^|[^`])`([^`]+)`(?!`)$/,MK=/(^|[^`])`([^`]+)`(?!`)/g,IK=Eo.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",Jt(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[bs({find:TK,type:this.type})]},addPasteRules(){return[ko({find:MK,type:this.type})]}}),xg=4,UK=/^```([a-z]+)?[\s\n]$/,_K=/^~~~([a-z]+)?[\s\n]$/,DK=Rr.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:xg,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",Jt(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const A=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${A}`,e.renderChildren(t.content),"```"].join(`
|
|
118
|
-
`):r=`\`\`\`${A}
|
|
119
|
-
|
|
120
|
-
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:xg,{state:r}=t,{selection:A}=r,{$from:i,empty:o}=A;if(i.parent.type!==this.type)return!1;const a=" ".repeat(n);return o?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:u,to:d}=A,m=r.doc.textBetween(u,d,`
|
|
121
|
-
`,`
|
|
122
|
-
`).split(`
|
|
123
|
-
`).map(v=>a+v).join(`
|
|
124
|
-
`);return l.replaceWith(u,d,r.schema.text(m)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:xg,{state:r}=t,{selection:A}=r,{$from:i,empty:o}=A;return i.parent.type!==this.type?!1:o?t.commands.command(({tr:a})=>{var l;const{pos:u}=i,d=i.start(),h=i.end(),m=r.doc.textBetween(d,h,`
|
|
125
|
-
`,`
|
|
126
|
-
`).split(`
|
|
127
|
-
`);let v=0,B=0;const y=u-d;for(let D=0;D<m.length;D+=1){if(B+m[D].length>=y){v=D;break}B+=m[D].length+1}const C=((l=m[v].match(/^ */))==null?void 0:l[0])||"",k=Math.min(C.length,n);if(k===0)return!0;let F=d;for(let D=0;D<v;D+=1)F+=m[D].length+1;return a.delete(F,F+k),u-F<=k&&a.setSelection(nt.create(a.doc,F)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:u}=A,p=r.doc.textBetween(l,u,`
|
|
128
|
-
`,`
|
|
129
|
-
`).split(`
|
|
130
|
-
`).map(m=>{var v;const B=((v=m.match(/^ */))==null?void 0:v[0])||"",y=Math.min(B.length,n);return m.slice(y)}).join(`
|
|
131
|
-
`);return a.replaceWith(l,u,r.schema.text(p)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:A}=n;if(!A||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
|
|
132
|
-
|
|
133
|
-
`);return!i||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:A,empty:i}=n;if(!i||A.parent.type!==this.type||!(A.parentOffset===A.parent.nodeSize-2))return!1;const a=A.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:u})=>(u.setSelection(st.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[Vm({find:UK,type:this.type,getAttributes:t=>({language:t[1]})}),Vm({find:_K,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new en({key:new xn("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),A=r?JSON.parse(r):void 0,i=A?.mode;if(!n||!i)return!1;const{tr:o,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
|
|
134
|
-
`));return o.replaceSelectionWith(this.type.create({language:i},l)),o.selection.$from.parent.type!==this.type&&o.setSelection(nt.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),OK=Rr.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
135
|
-
|
|
136
|
-
`):""}),NK=Rr.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Jt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
137
|
-
`},renderMarkdown:()=>`
|
|
138
|
-
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:A,storedMarks:i}=n;if(A.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=i||A.$to.parentOffset&&A.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:d})=>{if(d&&l&&o){const h=l.filter(p=>a.includes(p.type.name));u.ensureMarks(h)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),LK=Rr.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Jt(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,A="#".repeat(r);return t.content?`${A} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Vm({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),RK=Rr.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Jt(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!L$(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,A=t();return L1(n)?A.insertContentAt(r.pos,{type:this.name}):A.insertContent({type:this.name}),A.command(({state:i,tr:o,dispatch:a})=>{if(a){const{$to:l}=o.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection(nt.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(qe.create(o.doc,l.pos)):o.setSelection(nt.create(o.doc,l.pos));else{const d=i.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,h=d?.create();h&&(o.insert(u,h),o.setSelection(nt.create(o.doc,u+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[N$({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),HK=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,PK=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,$K=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,KK=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,zK=Eo.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Jt(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[bs({find:HK,type:this.type}),bs({find:$K,type:this.type})]},addPasteRules(){return[ko({find:PK,type:this.type}),ko({find:KK,type:this.type})]}}),WK=Object.defineProperty,GK=(t,e)=>{for(var n in e)WK(t,n,{get:e[n],enumerable:!0})},YK="listItem",gE="textStyle",vE=/^\s*([-+*])\s$/,wE=Rr.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",Jt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
139
|
-
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(YK,this.editor.getAttributes(gE)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=ya({find:vE,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=ya({find:vE,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(gE),editor:this.editor})),[t]}}),BE=Rr.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Jt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(A=>A.type==="paragraph"))n=e.parseChildren(t.tokens);else{const A=t.tokens[0];if(A&&A.type==="text"&&A.tokens&&A.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(A.tokens)}],t.tokens.length>1){const o=t.tokens.slice(1),a=e.parseChildren(o);n.push(...a)}}else n=e.parseChildren(t.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>rg(t,e,r=>{var A,i;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((i=(A=r.meta)==null?void 0:A.parentAttrs)==null?void 0:i.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),qK={};GK(qK,{findListItemPos:()=>rc,getNextListDepth:()=>Fg,handleBackspace:()=>Qg,handleDelete:()=>Tg,hasListBefore:()=>yE,hasListItemAfter:()=>XK,hasListItemBefore:()=>CE,listItemHasSubList:()=>bE,nextListIsDeeper:()=>EE,nextListIsHigher:()=>kE});var rc=(t,e)=>{const{$from:n}=e.selection,r=Cn(t,e.schema);let A=null,i=n.depth,o=n.pos,a=null;for(;i>0&&a===null;)A=n.node(i),A.type===r?a=i:(i-=1,o-=1);return a===null?null:{$pos:e.doc.resolve(o),depth:a}},Fg=(t,e)=>{const n=rc(t,e);if(!n)return!1;const[,r]=q3(e,t,n.$pos.pos+4);return r},yE=(t,e,n)=>{const{$anchor:r}=t.selection,A=Math.max(0,r.pos-2),i=t.doc.resolve(A).node();return!(!i||!n.includes(i.type.name))},CE=(t,e)=>{var n;const{$anchor:r}=e.selection,A=e.doc.resolve(r.pos-2);return!(A.index()===0||((n=A.nodeBefore)==null?void 0:n.type.name)!==t)},bE=(t,e,n)=>{if(!n)return!1;const r=Cn(t,e.schema);let A=!1;return n.descendants(i=>{i.type===r&&(A=!0)}),A},Qg=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!bo(t.state,e)&&yE(t.state,e,n)){const{$anchor:a}=t.state.selection,l=t.state.doc.resolve(a.before()-1),u=[];l.node().descendants((p,m)=>{p.type.name===e&&u.push({node:p,pos:m})});const d=u.at(-1);if(!d)return!1;const h=t.state.doc.resolve(l.start()+d.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},h.end()).joinForward().run()}if(!bo(t.state,e)||!Z3(t.state))return!1;const r=rc(e,t.state);if(!r)return!1;const i=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=bE(e,t.state,i);return CE(e,t.state)&&!o?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},EE=(t,e)=>{const n=Fg(t,e),r=rc(t,e);return!r||!n?!1:n>r.depth},kE=(t,e)=>{const n=Fg(t,e),r=rc(t,e);return!r||!n?!1:n<r.depth},Tg=(t,e)=>{if(!bo(t.state,e)||!j3(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:A}=n;return!n.empty&&r.sameParent(A)?!1:EE(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():kE(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},XK=(t,e)=>{var n;const{$anchor:r}=e.selection,A=e.doc.resolve(r.pos-r.parentOffset-2);return!(A.index()===A.parent.childCount-1||((n=A.nodeAfter)==null?void 0:n.type.name)!==t)},SE=on.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Tg(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Tg(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&Qg(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&Qg(t,n,r)&&(e=!0)}),e}}}}),xE=/^(\s*)(\d+)\.\s+(.*)$/,JK=/^\s/;function jK(t){const e=[];let n=0,r=0;for(;n<t.length;){const A=t[n],i=A.match(xE);if(!i)break;const[,o,a,l]=i,u=o.length;let d=l,h=n+1;const p=[A];for(;h<t.length;){const m=t[h];if(m.match(xE))break;if(m.trim()==="")p.push(m),d+=`
|
|
140
|
-
`,h+=1;else if(m.match(JK))p.push(m),d+=`
|
|
141
|
-
${m.slice(u+2)}`,h+=1;else break}e.push({indent:u,number:parseInt(a,10),content:d.trim(),raw:p.join(`
|
|
142
|
-
`)}),r=h,n=h}return[e,r]}function FE(t,e,n){var r;const A=[];let i=0;for(;i<t.length;){const o=t[i];if(o.indent===e){const a=o.content.split(`
|
|
143
|
-
`),l=((r=a[0])==null?void 0:r.trim())||"",u=[];l&&u.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const d=a.slice(1).join(`
|
|
144
|
-
`).trim();if(d){const m=n.blockTokens(d);u.push(...m)}let h=i+1;const p=[];for(;h<t.length&&t[h].indent>e;)p.push(t[h]),h+=1;if(p.length>0){const m=Math.min(...p.map(B=>B.indent)),v=FE(p,m,n);u.push({type:"list",ordered:!0,start:p[0].number,items:v,raw:p.map(B=>B.raw).join(`
|
|
145
|
-
`)})}A.push({type:"list_item",raw:o.raw,tokens:u}),i=h}else i+=1}return A}function ZK(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(A=>{if(A.type==="paragraph"||A.type==="list"||A.type==="blockquote"||A.type==="code")r.push(...e.parseChildren([A]));else if(A.type==="text"&&A.tokens){const i=e.parseChildren([A]);r.push({type:"paragraph",content:i})}else{const i=e.parseChildren([A]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var VK="listItem",QE="textStyle",TE=/^(\d+)\.\s$/,ME=Rr.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Jt(this.options.HTMLAttributes,n),0]:["ol",Jt(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?ZK(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
146
|
-
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e?.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const A=t.split(`
|
|
147
|
-
`),[i,o]=jK(A);if(i.length===0)return;const a=FE(i,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:a,raw:A.slice(0,o).join(`
|
|
148
|
-
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(VK,this.editor.getAttributes(QE)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=ya({find:TE,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=ya({find:TE,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(QE)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),ez=/^\s*(\[([( |x])?\])\s$/,tz=Rr.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Jt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const A=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return rg(t,e,A)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const A=document.createElement("li"),i=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),u=h=>{var p,m;a.ariaLabel=((m=(p=this.options.a11y)==null?void 0:p.checkboxLabel)==null?void 0:m.call(p,h,a.checked))||`Task item checkbox for ${h.textContent||"empty task item"}`};u(t),i.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",h=>h.preventDefault()),a.addEventListener("change",h=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:p}=h.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const v=n();if(typeof v!="number")return!1;const B=m.doc.nodeAt(v);return m.setNodeMarkup(v,void 0,{...B?.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,p)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([h,p])=>{A.setAttribute(h,p)}),A.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,i.append(a,o),A.append(i,l),Object.entries(e).forEach(([h,p])=>{A.setAttribute(h,p)});let d=new Set(Object.keys(e));return{dom:A,contentDOM:l,update:h=>{if(h.type!==this.type)return!1;A.dataset.checked=h.attrs.checked,a.checked=h.attrs.checked,u(h);const p=r.extensionManager.attributes,m=Gl(h,p),v=new Set(Object.keys(m)),B=this.options.HTMLAttributes;return d.forEach(y=>{v.has(y)||(y in B?A.setAttribute(y,B[y]):A.removeAttribute(y))}),Object.entries(m).forEach(([y,w])=>{w==null?y in B?A.setAttribute(y,B[y]):A.removeAttribute(y):A.setAttribute(y,w)}),d=v,!0}}}},addInputRules(){return[ya({find:ez,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),nz=Rr.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Jt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
149
|
-
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const o=ng(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return o?[{type:"taskList",raw:o.raw,items:o.items}]:n.blockTokens(i)},A=ng(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,o)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:o}),customNestedParser:r},n);if(A)return{type:"taskList",raw:A.raw,items:A.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});on.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(wE.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(BE.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(SE.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(ME.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(tz.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(nz.configure(this.options.taskList)),t}});var IE=" ",rz=" ",Az=Rr.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Jt(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===IE||r[0].text===rz)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e)=>{if(!t)return"";const n=Array.isArray(t.content)?t.content:[];return n.length===0?IE:e.renderChildren(n)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),iz=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,oz=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,sz=Eo.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Jt(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[bs({find:iz,type:this.type})]},addPasteRules(){return[ko({find:oz,type:this.type})]}}),az=Rr.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),lz=Eo.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Jt(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const A=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!A)return;const i=A[2].trim();return{type:"underline",raw:A[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function cz(t={}){return new en({view(e){return new uz(e,t)}})}class uz{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(A=>{let i=o=>{this[A](o)};return e.dom.addEventListener(A,i),{name:A,handler:i}})}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,A=this.editorView.dom,i=A.getBoundingClientRect(),o=i.width/A.offsetWidth,a=i.height/A.offsetHeight;if(n){let h=e.nodeBefore,p=e.nodeAfter;if(h||p){let m=this.editorView.nodeDOM(this.cursorPos-(h?h.nodeSize:0));if(m){let v=m.getBoundingClientRect(),B=h?v.bottom:v.top;h&&p&&(B=(B+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let y=this.width/2*a;r={left:v.left,right:v.right,top:B-y,bottom:B+y}}}}if(!r){let h=this.editorView.coordsAtPos(this.cursorPos),p=this.width/2*o;r={left:h.left-p,right:h.left+p,top:h.top,bottom:h.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.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 u,d;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,d=-pageYOffset;else{let h=l.getBoundingClientRect(),p=h.width/l.offsetWidth,m=h.height/l.offsetHeight;u=h.left-l.scrollLeft*p,d=h.top-l.scrollTop*m}this.element.style.left=(r.left-u)/o+"px",this.element.style.top=(r.top-d)/a+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/a+"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),A=r&&r.type.spec.disableDropCursor,i=typeof A=="function"?A(this.editorView,n,e):A;if(n&&!i){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=FC(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class an extends st{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return an.valid(r)?new an(r):st.near(r)}content(){return De.empty}eq(e){return e instanceof an&&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 an(e.resolve(n.pos))}getBookmark(){return new Mg(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!dz(e)||!fz(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let A=n.contentMatchAt(e.index()).defaultType;return A&&A.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&an.valid(e))return e;let A=e.pos,i=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>0?e.indexAfter(o)<a.childCount:e.index(o)>0){i=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;A+=n;let l=e.doc.resolve(A);if(an.valid(l))return l}for(;;){let o=n>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!qe.isSelectable(i)){e=e.doc.resolve(A+i.nodeSize*n),r=!1;continue e}break}i=o,A+=n;let a=e.doc.resolve(A);if(an.valid(a))return a}return null}}}an.prototype.visible=!1,an.findFrom=an.findGapCursorFrom,st.jsonID("gapcursor",an);class Mg{constructor(e){this.pos=e}map(e){return new Mg(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return an.valid(n)?new an(n):st.near(n)}}function dz(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 A=r.child(n-1);;A=A.lastChild){if(A.childCount==0&&!A.inlineContent||A.isAtom||A.type.spec.isolating)return!0;if(A.inlineContent)return!1}}return!0}function fz(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 A=r.child(n);;A=A.firstChild){if(A.childCount==0&&!A.inlineContent||A.isAtom||A.type.spec.isolating)return!0;if(A.inlineContent)return!1}}return!0}function hz(){return new en({props:{decorations:vz,createSelectionBetween(t,e,n){return e.pos==n.pos&&an.valid(n)?new an(n):null},handleClick:mz,handleKeyDown:pz,handleDOMEvents:{beforeinput:gz}}})}const pz=h1({ArrowLeft:Gd("horiz",-1),ArrowRight:Gd("horiz",1),ArrowUp:Gd("vert",-1),ArrowDown:Gd("vert",1)});function Gd(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,A,i){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof nt){if(!i.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let u=an.findGapCursorFrom(a,e,l);return u?(A&&A(r.tr.setSelection(new an(u))),!0):!1}}function mz(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!an.valid(r))return!1;let A=t.posAtCoords({left:n.clientX,top:n.clientY});return A&&A.inside>-1&&qe.isSelectable(t.state.doc.nodeAt(A.inside))?!1:(t.dispatch(t.state.tr.setSelection(new an(r))),!0)}function gz(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof an))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 A=Qe.empty;for(let o=r.length-1;o>=0;o--)A=Qe.from(r[o].createAndFill(null,A));let i=t.state.tr.replace(n.pos,n.pos,new De(A,0,0));return i.setSelection(nt.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function vz(t){if(!(t.selection instanceof an))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",tn.create(t.doc,[vr.widget(t.selection.head,e,{key:"gapcursor"})])}var Yd=200,Nn=function(){};Nn.prototype.append=function(e){return e.length?(e=Nn.from(e),!this.length&&e||e.length<Yd&&this.leafAppend(e)||this.length<Yd&&e.leafPrepend(this)||this.appendInner(e)):this},Nn.prototype.prepend=function(e){return e.length?Nn.from(e).append(this):this},Nn.prototype.appendInner=function(e){return new wz(this,e)},Nn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Nn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},Nn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Nn.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)},Nn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var A=[];return this.forEach(function(i,o){return A.push(e(i,o))},n,r),A},Nn.from=function(e){return e instanceof Nn?e:e&&e.length?new UE(e):Nn.empty};var UE=(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(A,i){return A==0&&i==this.length?this:new e(this.values.slice(A,i))},e.prototype.getInner=function(A){return this.values[A]},e.prototype.forEachInner=function(A,i,o,a){for(var l=i;l<o;l++)if(A(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(A,i,o,a){for(var l=i-1;l>=o;l--)if(A(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(A){if(this.length+A.length<=Yd)return new e(this.values.concat(A.flatten()))},e.prototype.leafPrepend=function(A){if(this.length+A.length<=Yd)return new e(A.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(Nn);Nn.empty=new UE([]);var wz=(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,A,i,o){var a=this.left.length;if(A<a&&this.left.forEachInner(r,A,Math.min(i,a),o)===!1||i>a&&this.right.forEachInner(r,Math.max(A-a,0),Math.min(this.length,i)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,A,i,o){var a=this.left.length;if(A>a&&this.right.forEachInvertedInner(r,A-a,Math.max(i,a)-a,o+a)===!1||i<a&&this.left.forEachInvertedInner(r,Math.min(A,a),i,o)===!1)return!1},e.prototype.sliceInner=function(r,A){if(r==0&&A==this.length)return this;var i=this.left.length;return A<=i?this.left.slice(r,A):r>=i?this.right.slice(r-i,A-i):this.left.slice(r,i).append(this.right.slice(0,A-i))},e.prototype.leafAppend=function(r){var A=this.right.leafAppend(r);if(A)return new e(this.left,A)},e.prototype.leafPrepend=function(r){var A=this.left.leafPrepend(r);if(A)return new e(A,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})(Nn);const Bz=500;class IA{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 A,i;n&&(A=this.remapping(r,this.items.length),i=A.maps.length);let o=e.tr,a,l,u=[],d=[];return this.items.forEach((h,p)=>{if(!h.step){A||(A=this.remapping(r,p+1),i=A.maps.length),i--,d.push(h);return}if(A){d.push(new ai(h.map));let m=h.step.map(A.slice(i)),v;m&&o.maybeStep(m).doc&&(v=o.mapping.maps[o.mapping.maps.length-1],u.push(new ai(v,void 0,void 0,u.length+d.length))),i--,v&&A.appendMap(v,i)}else o.maybeStep(h.step);if(h.selection)return a=A?h.selection.map(A.slice(i)):h.selection,l=new IA(this.items.slice(0,r).append(d.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,n,r,A){let i=[],o=this.eventCount,a=this.items,l=!A&&a.length?a.get(a.length-1):null;for(let d=0;d<e.steps.length;d++){let h=e.steps[d].invert(e.docs[d]),p=new ai(e.mapping.maps[d],h,n),m;(m=l&&l.merge(p))&&(p=m,d?i.pop():a=a.slice(0,a.length-1)),i.push(p),n&&(o++,n=void 0),A||(l=p)}let u=o-r.depth;return u>Cz&&(a=yz(a,u),o-=u),new IA(a.append(i),o)}remapping(e,n){let r=new Ml;return this.items.forEach((A,i)=>{let o=A.mirrorOffset!=null&&i-A.mirrorOffset>=e?r.maps.length-A.mirrorOffset:void 0;r.appendMap(A.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new IA(this.items.append(e.map(n=>new ai(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],A=Math.max(0,this.items.length-n),i=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},A);let l=n;this.items.forEach(p=>{let m=i.getMirror(--l);if(m==null)return;o=Math.min(o,m);let v=i.maps[m];if(p.step){let B=e.steps[m].invert(e.docs[m]),y=p.selection&&p.selection.map(i.slice(l+1,m));y&&a++,r.push(new ai(v,B,y))}else r.push(new ai(v))},A);let u=[];for(let p=n;p<o;p++)u.push(new ai(i.maps[p]));let d=this.items.slice(0,A).append(u).append(r),h=new IA(d,a);return h.emptyItemCount()>Bz&&(h=h.compress(this.items.length-r.length)),h}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,A=[],i=0;return this.items.forEach((o,a)=>{if(a>=e)A.push(o),o.selection&&i++;else if(o.step){let l=o.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let d=o.selection&&o.selection.map(n.slice(r));d&&i++;let h=new ai(u.invert(),l,d),p,m=A.length-1;(p=A.length&&A[m].merge(h))?A[m]=p:A.push(h)}}else o.map&&r--},this.items.length,0),new IA(Nn.from(A.reverse()),i)}}IA.empty=new IA(Nn.empty,0);function yz(t,e){let n;return t.forEach((r,A)=>{if(r.selection&&e--==0)return n=A,!1}),t.slice(n)}class ai{constructor(e,n,r,A){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=A}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new ai(n.getMap().invert(),n,this.selection)}}}class Qo{constructor(e,n,r,A,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=A,this.prevComposition=i}}const Cz=20;function bz(t,e,n,r){let A=n.getMeta(Ss),i;if(A)return A.historyState;n.getMeta(Sz)&&(t=new Qo(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(Ss))return o.getMeta(Ss).redo?new Qo(t.done.addTransform(n,void 0,r,qd(e)),t.undone,_E(n.mapping.maps),t.prevTime,t.prevComposition):new Qo(t.done,t.undone.addTransform(n,void 0,r,qd(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!Ez(n,t.prevRanges)),u=o?Ig(t.prevRanges,n.mapping):_E(n.mapping.maps);return new Qo(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,qd(e)),IA.empty,u,n.time,a??t.prevComposition)}else return(i=n.getMeta("rebased"))?new Qo(t.done.rebased(n,i),t.undone.rebased(n,i),Ig(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Qo(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Ig(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Ez(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,A)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&A>=e[i]&&(n=!0)}),n}function _E(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,A,i,o)=>e.push(i,o));return e}function Ig(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let A=e.map(t[r],1),i=e.map(t[r+1],-1);A<=i&&n.push(A,i)}return n}function kz(t,e,n){let r=qd(e),A=Ss.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let o=i.selection.resolve(i.transform.doc),a=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),A,r),l=new Qo(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(o).setMeta(Ss,{redo:n,historyState:l})}let Ug=!1,DE=null;function qd(t){let e=t.plugins;if(DE!=e){Ug=!1,DE=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Ug=!0;break}}return Ug}const Ss=new xn("history"),Sz=new xn("closeHistory");function xz(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new en({key:Ss,state:{init(){return new Qo(IA.empty,IA.empty,null,0,-1)},apply(e,n,r){return bz(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,A=r=="historyUndo"?NE:r=="historyRedo"?LE:null;return A?(n.preventDefault(),A(e.state,e.dispatch)):!1}}}})}function OE(t,e){return(n,r)=>{let A=Ss.getState(n);if(!A||(t?A.undone:A.done).eventCount==0)return!1;if(r){let i=kz(A,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const NE=OE(!1,!0),LE=OE(!0,!0);on.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?.node||this.editor.state.doc;if((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?.node||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new en({key:new xn("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const A=this.options.limit;if(A==null||A===0){t=!0;return}const i=this.storage.characters({node:r.doc});if(i>A){const o=i-A,a=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${A} characters. Content was automatically trimmed.`);const u=r.tr.deleteRange(a,l);return t=!0,u}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const A=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||A>r&&i>r&&i<=A)return!0;if(A>r&&i>r&&i>A||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=i-r,u=a-l,d=a;return e.deleteRange(u,d),!(this.storage.characters({node:e.doc})>r)}})]}});var Fz=on.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[cz(this.options)]}});on.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new en({key:new xn("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:A}=e,i=[];if(!n||!r)return tn.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,u)=>{if(l.isText)return;if(!(A>=u&&A<=u+l.nodeSize-1))return!1;o+=1});let a=0;return t.descendants((l,u)=>{if(l.isText||!(A>=u&&A<=u+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";i.push(vr.node(u,u+l.nodeSize,{class:this.options.className}))}),tn.create(t,i)}}})]}});var Qz=on.create({name:"gapCursor",addProseMirrorPlugins(){return[hz()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Ot(Ye(t,"allowGapCursor",n)))!=null?e:null}}}),RE="placeholder";function Tz(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}on.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:RE,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${Tz(this.options.dataAttribute)}`:`data-${RE}`;return[new en({key:new xn("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:A}=n,i=[];if(!r)return null;const o=this.editor.isEmpty;return e.descendants((a,l)=>{const u=A>=l&&A<=l+a.nodeSize,d=!a.isLeaf&&sd(a);if((u||!this.options.showOnlyCurrent)&&d){const h=[this.options.emptyNodeClass];o&&h.push(this.options.emptyEditorClass);const p=vr.node(l,l+a.nodeSize,{class:h.join(" "),[t]: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}),tn.create(e,i)}}})]}}),on.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new en({key:new xn("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||L1(n.selection)||t.view.dragging?null:tn.create(n.doc,[vr.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function HE({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||e?.type===t}var Mz=on.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new xn(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,A])=>A).filter(A=>(this.options.notAfter||[]).concat(n).includes(A.name));return[new en({key:e,appendTransaction:(A,i,o)=>{const{doc:a,tr:l,schema:u}=o,d=e.getState(o),h=a.content.size,p=u.nodes[n];if(d)return l.insert(h,p.create())},state:{init:(A,i)=>{const o=i.tr.doc.lastChild;return!HE({node:o,types:r})},apply:(A,i)=>{if(!A.docChanged||A.getMeta("__uniqueIDTransaction"))return i;const o=A.doc.lastChild;return!HE({node:o,types:r})}}})]}}),Iz=on.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>NE(t,e),redo:()=>({state:t,dispatch:e})=>LE(t,e)}},addProseMirrorPlugins(){return[xz(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()}}}),Uz=on.create({name:"starterKit",addExtensions(){var t,e,n,r;const A=[];return this.options.bold!==!1&&A.push(mE.configure(this.options.bold)),this.options.blockquote!==!1&&A.push(EK.configure(this.options.blockquote)),this.options.bulletList!==!1&&A.push(wE.configure(this.options.bulletList)),this.options.code!==!1&&A.push(IK.configure(this.options.code)),this.options.codeBlock!==!1&&A.push(DK.configure(this.options.codeBlock)),this.options.document!==!1&&A.push(OK.configure(this.options.document)),this.options.dropcursor!==!1&&A.push(Fz.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&A.push(Qz.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&A.push(NK.configure(this.options.hardBreak)),this.options.heading!==!1&&A.push(LK.configure(this.options.heading)),this.options.undoRedo!==!1&&A.push(Iz.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&A.push(RK.configure(this.options.horizontalRule)),this.options.italic!==!1&&A.push(zK.configure(this.options.italic)),this.options.listItem!==!1&&A.push(BE.configure(this.options.listItem)),this.options.listKeymap!==!1&&A.push(SE.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&A.push(pE.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&A.push(ME.configure(this.options.orderedList)),this.options.paragraph!==!1&&A.push(Az.configure(this.options.paragraph)),this.options.strike!==!1&&A.push(sz.configure(this.options.strike)),this.options.text!==!1&&A.push(az.configure(this.options.text)),this.options.underline!==!1&&A.push(lz.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&A.push(Mz.configure((r=this.options)==null?void 0:r.trailingNode)),A}}),_z=Uz;function PE(t){return s.customRef((e,n)=>({get(){return e(),t},set(r){t=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}var Dz=class extends O${constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=PE(this.view.state),this.reactiveExtensionStorage=PE(this.extensionStorage),this.on("beforeTransaction",({nextState:e})=>{this.reactiveState.value=e,this.reactiveExtensionStorage.value=this.extensionStorage}),s.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,e){const n=super.registerPlugin(t,e);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(t){const e=super.unregisterPlugin(t);return this.reactiveState&&e&&(this.reactiveState.value=e),e}},Oz=s.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=s.ref(),n=s.getCurrentInstance();return s.watchEffect(()=>{const r=t.editor;r&&r.options.element&&e.value&&s.nextTick(()=>{var A;if(!e.value||!((A=r.view.dom)!=null&&A.parentNode))return;const i=s.unref(e.value);e.value.append(...r.view.dom.parentNode.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:i}),r.createNodeViews()})}),s.onBeforeUnmount(()=>{const r=t.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return s.h("div",{ref:t=>{this.rootEl=t}})}});s.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return s.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),s.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return s.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(t=this.$slots).default)==null?void 0:e.call(t))}});var Nz=(t={})=>{const e=s.shallowRef();return s.onMounted(()=>{e.value=new Dz(t)}),s.onBeforeUnmount(()=>{var n,r,A,i;const o=(r=(n=e.value)==null?void 0:n.view.dom)==null?void 0:r.parentNode,a=o?.cloneNode(!0);(A=o?.parentNode)==null||A.replaceChild(a,o),(i=e.value)==null||i.destroy()}),e};s.defineComponent({name:"MarkViewContent",props:{as:{type:String,default:"span"}},render(){return s.h(this.as,{style:{whiteSpace:"inherit"},"data-mark-view-content":""})}});const Lz={class:"rte-editor"},Rz={key:0,class:"rte-editor__controls mb-2"},Hz=["disabled"],Pz=["disabled"],$z={class:"btn-group"},Kz=["disabled"],zz=["disabled"],Wz={class:"btn-group"},Gz={class:"dropdown"},Yz={class:"btn dropdown-toggle btn-light","data-bs-toggle":"dropdown",role:"button",type:"button"},qz={class:"dropdown-menu"},Xz={class:"dropdown"},Jz={class:"btn dropdown-toggle btn-light","data-bs-toggle":"dropdown",role:"button",type:"button"},jz={class:"dropdown-menu"},Zz={class:"btn-group"},Vz=["disabled"],e5=["disabled"],t5=s.defineComponent({__name:"rte-editor",props:{modelValue:{type:String,default:""},disabled:{type:Boolean,default:!1},iconBasePath:{type:String,default:"/rte-icons-defs.svg"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.ref(!1),i=Nz({content:n.modelValue,onUpdate:()=>{r("update:modelValue",i.value?.getHTML())},extensions:[_z.configure({bold:!1}),QK.extend({addAttributes(){return{class:{default:null}}},parseHTML(){return[{tag:"strong"},{tag:"b"}]},renderHTML({HTMLAttributes:u}){return["strong",Jt(this.options.HTMLAttributes,u),0]}}),j$.configure({types:["heading","paragraph"]}),X$,CK.extend({addAttributes(){return{...this.parent?.(),class:{default:null},id:{default:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:u=>({href:u.getAttribute("href"),target:u.getAttribute("target"),rel:u.getAttribute("rel"),class:u.getAttribute("class"),id:u.getAttribute("id"),title:u.getAttribute("title")})},{tag:"a:not([href])",getAttrs:u=>({href:null,target:u.getAttribute("target"),rel:u.getAttribute("rel"),class:u.getAttribute("class"),id:u.getAttribute("id"),title:u.getAttribute("title")})}]},renderHTML({HTMLAttributes:u}){if(!u.href){const{href:d,target:h,rel:p,...m}=u;return["a",Jt(m),0]}return["a",Jt(this.options.HTMLAttributes,u),0]}}).configure({openOnClick:!1,autolink:!0,defaultProtocol:"https",protocols:["http","https"],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"}})]});s.watch(()=>n.modelValue,(u,d)=>{if(i.value){if(i.value.getHTML()===u)return;i.value.commands.setContent(u)}});function o(){const u=i.value?.getAttributes("link").href,d=window.prompt("URL",u);if(d!==null){if(d===""){i.value?.chain().focus().extendMarkRange("link").unsetLink().run();return}try{i.value?.chain().focus().extendMarkRange("link").setLink({href:d}).run()}catch(h){alert(h.message)}}}const a=()=>{i.value?.commands.setContent(`<textarea>${i.value.getHTML()}</textarea>`),A.value=!0},l=()=>{i.value?.commands.setContent(i.value.getText()),A.value=!1};return(u,d)=>{const h=s.resolveComponent("svg-icon");return s.openBlock(),s.createElementBlock("div",Lz,[s.unref(i)?(s.openBlock(),s.createElementBlock("div",Rz,[A.value?(s.openBlock(),s.createElementBlock("button",{key:1,class:"btn btn-sm btn-light is-active",onClick:l,disabled:!s.unref(i).can().chain().focus().toggleCode().run(),title:"Toggle Source"},[s.createVNode(h,{symbol:"source","base-path":t.iconBasePath},null,8,["base-path"])],8,Pz)):(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("code")}]),onClick:a,disabled:!s.unref(i).can().chain().focus().toggleCode().run(),title:"Toggle Source"},[s.createVNode(h,{symbol:"source","base-path":t.iconBasePath},null,8,["base-path"])],10,Hz)),s.createElementVNode("div",$z,[s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("bold")}]),onClick:d[0]||(d[0]=p=>s.unref(i)?.chain().focus().toggleBold().run()),disabled:!s.unref(i).can().chain().focus().toggleBold().run(),title:"Toggle Bold"},[s.createVNode(h,{symbol:"bold","base-path":t.iconBasePath},null,8,["base-path"])],10,Kz),s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("italic")}]),onClick:d[1]||(d[1]=p=>s.unref(i)?.chain().focus().toggleItalic().run()),disabled:!s.unref(i).can().chain().focus().toggleItalic().run(),title:"Toggle Italic"},[s.createVNode(h,{symbol:"italic","base-path":t.iconBasePath},null,8,["base-path"])],10,zz)]),s.createElementVNode("div",Wz,[s.createElementVNode("div",Gz,[s.createElementVNode("button",Yz,[s.unref(i).isActive("heading",{level:1})?(s.openBlock(),s.createBlock(h,{key:0,symbol:"h1","base-path":t.iconBasePath},null,8,["base-path"])):s.unref(i).isActive("heading",{level:2})?(s.openBlock(),s.createBlock(h,{key:1,symbol:"h2","base-path":t.iconBasePath},null,8,["base-path"])):s.unref(i).isActive("heading",{level:3})?(s.openBlock(),s.createBlock(h,{key:2,symbol:"h3","base-path":t.iconBasePath},null,8,["base-path"])):s.unref(i).isActive("heading",{level:4})?(s.openBlock(),s.createBlock(h,{key:3,symbol:"h4","base-path":t.iconBasePath},null,8,["base-path"])):(s.openBlock(),s.createBlock(h,{key:4,symbol:"headline","base-path":t.iconBasePath},null,8,["base-path"]))]),s.createElementVNode("ul",qz,[s.createElementVNode("li",null,[s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("heading",{level:1})}]),onClick:d[2]||(d[2]=p=>s.unref(i)?.chain().focus().setHeading({level:1}).run()),title:"Set Heading 1"},[s.createVNode(h,{symbol:"h1","base-path":t.iconBasePath},null,8,["base-path"])],2)]),s.createElementVNode("li",null,[s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("heading",{level:2})}]),onClick:d[3]||(d[3]=p=>s.unref(i)?.chain().focus().setHeading({level:2}).run()),title:"Set Heading 2"},[s.createVNode(h,{symbol:"h2","base-path":t.iconBasePath},null,8,["base-path"])],2)]),s.createElementVNode("li",null,[s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("heading",{level:3})}]),onClick:d[4]||(d[4]=p=>s.unref(i)?.chain().focus().setHeading({level:3}).run()),title:"Set Heading 3"},[s.createVNode(h,{symbol:"h3","base-path":t.iconBasePath},null,8,["base-path"])],2)]),s.createElementVNode("li",null,[s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("heading",{level:4})}]),onClick:d[5]||(d[5]=p=>s.unref(i)?.chain().focus().setHeading({level:4}).run()),title:"Set Heading 4"},[s.createVNode(h,{symbol:"h4","base-path":t.iconBasePath},null,8,["base-path"])],2)])])]),s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("paragraph")}]),onClick:d[6]||(d[6]=p=>s.unref(i)?.chain().focus().setParagraph().run()),title:"Set Paragraph"},[s.createVNode(h,{symbol:"paragraph","base-path":t.iconBasePath},null,8,["base-path"])],2),s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("bulletList")}]),onClick:d[7]||(d[7]=p=>s.unref(i)?.chain().focus().toggleBulletList().run()),title:"Toggle Bullet List"},[s.createVNode(h,{symbol:"list","base-path":t.iconBasePath},null,8,["base-path"])],2),s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("orderedList")}]),onClick:d[8]||(d[8]=p=>s.unref(i)?.chain().focus().toggleOrderedList().run()),title:"Toggle Ordered List"},[s.createVNode(h,{symbol:"ordered-list","base-path":t.iconBasePath},null,8,["base-path"])],2)]),s.createElementVNode("div",Xz,[s.createElementVNode("button",Jz,[s.unref(i).isActive({textAlign:"center"})?(s.openBlock(),s.createBlock(h,{key:0,symbol:"align-center","base-path":t.iconBasePath},null,8,["base-path"])):s.unref(i).isActive({textAlign:"left"})?(s.openBlock(),s.createBlock(h,{key:1,symbol:"align-left","base-path":t.iconBasePath},null,8,["base-path"])):s.unref(i).isActive({textAlign:"right"})?(s.openBlock(),s.createBlock(h,{key:2,symbol:"align-right","base-path":t.iconBasePath},null,8,["base-path"])):(s.openBlock(),s.createBlock(h,{key:3,symbol:"align-justify","base-path":t.iconBasePath},null,8,["base-path"]))]),s.createElementVNode("ul",jz,[s.createElementVNode("li",null,[s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive({textAlign:"left"})}]),onClick:d[9]||(d[9]=p=>s.unref(i)?.chain().focus().setTextAlign("left").run())},[s.createVNode(h,{symbol:"align-left","base-path":t.iconBasePath},null,8,["base-path"])],2)]),s.createElementVNode("li",null,[s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive({textAlign:"center"})}]),onClick:d[10]||(d[10]=p=>s.unref(i)?.chain().focus().setTextAlign("center").run())},[s.createVNode(h,{symbol:"align-center","base-path":t.iconBasePath},null,8,["base-path"])],2)]),s.createElementVNode("li",null,[s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive({textAlign:"right"})}]),onClick:d[11]||(d[11]=p=>s.unref(i)?.chain().focus().setTextAlign("right").run())},[s.createVNode(h,{symbol:"align-right","base-path":t.iconBasePath},null,8,["base-path"])],2)]),s.createElementVNode("li",null,[s.createElementVNode("button",{class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive({textAlign:"pretty"})}]),onClick:d[12]||(d[12]=p=>s.unref(i)?.chain().focus().setTextAlign("right").run())},[s.createVNode(h,{symbol:"align-justify","base-path":t.iconBasePath},null,8,["base-path"])],2)])])]),s.unref(i).isActive("link")?(s.openBlock(),s.createElementBlock("button",{key:3,class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("link")}]),onClick:d[13]||(d[13]=p=>s.unref(i).chain().focus().unsetLink().run()),title:"Unset Link"},[s.createVNode(h,{symbol:"unlink","base-path":t.iconBasePath},null,8,["base-path"])],2)):(s.openBlock(),s.createElementBlock("button",{key:2,class:s.normalizeClass(["btn btn-sm btn-light",{"is-active":s.unref(i).isActive("link")}]),onClick:o,title:"Set Link"},[s.createVNode(h,{symbol:"link","base-path":t.iconBasePath},null,8,["base-path"])],2)),s.createElementVNode("div",Zz,[s.createElementVNode("button",{class:"btn btn-sm btn-light",onClick:d[14]||(d[14]=p=>s.unref(i)?.chain().focus().undo().run()),disabled:!s.unref(i).can().chain().focus().undo().run(),title:"Undo"},[s.createVNode(h,{symbol:"undo","base-path":t.iconBasePath},null,8,["base-path"])],8,Vz),s.createElementVNode("button",{class:"btn btn-sm btn-light",onClick:d[15]||(d[15]=p=>s.unref(i)?.chain().focus().redo().run()),disabled:!s.unref(i).can().chain().focus().redo().run(),title:"Redo"},[s.createVNode(h,{symbol:"redo","base-path":t.iconBasePath},null,8,["base-path"])],8,e5)])])):s.createCommentVNode("",!0),s.createVNode(s.unref(Oz),{class:"rte-editor__content",editor:s.unref(i)},null,8,["editor"])])}}}),n5={class:"input-color"},r5={class:"base-input__color-swatch"},A5=["name","id","disabled","read-only","required","aria-label"],i5=s.defineComponent({__name:"input-color",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.computed({get(){return n.modelValue},set(i){r("update:modelValue",i)}});return(i,o)=>{const a=s.resolveComponent("base-input");return s.openBlock(),s.createElementBlock("div",n5,[s.createVNode(a,{modelValue:A.value,"onUpdate:modelValue":o[1]||(o[1]=l=>A.value=l),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,label:t.label,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength},{"input-append":s.withCtx(l=>[s.createElementVNode("span",r5,[s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=u=>A.value=u),type:"color",name:`${t.name}-color`,id:`${t.id}-color`,disabled:t.disabled,"read-only":t.readOnly,required:t.required,class:"form-control","aria-label":t.label},null,8,A5),[[s.vModelText,A.value]])])]),_:1},8,["modelValue","type","id","name","placeholder","pattern","label","disabled","read-only","required","maxlength"])])}}}),o5={class:"color-palette"},s5=["for"],a5=s.defineComponent({__name:"color-palette",props:{modelValue:{type:[String],default:""},colors:{type:Array,default:["#000000","#FFFFFF"]},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.computed({get(){return n.modelValue},set(i){r("update:modelValue",i)}});return(i,o)=>(s.openBlock(),s.createElementBlock("div",o5,[s.createVNode(xu,{modelValue:A.value,"onUpdate:modelValue":o[0]||(o[0]=a=>A.value=a),options:t.colors,name:t.name,id:t.id,label:t.label,disabled:t.disabled,required:t.required,class:"d-flex flex-wrap flex-row gap-2"},{"option-label":s.withCtx(a=>[s.createElementVNode("label",{for:`${t.id}-${a.index}`,class:"d-block rounded-circle",style:s.normalizeStyle({backgroundColor:a.option})},null,12,s5)]),_:1},8,["modelValue","options","name","id","label","disabled","required"])]))}}),l5=["id"],c5=["for","innerHTML"],u5={class:"dropdown"},d5={class:"caption"},f5=["innerHTML"],h5={class:"caption__text"},p5={class:"d-block text-truncate"},m5={class:"dropdown-menu"},g5={class:"form-check d-flex"},v5=["value","id","name","label","required","disabled"],w5=["value","id","name","label","required","disabled"],B5=["for"],y5=s.defineComponent({__name:"input-dropdown",props:{id:{type:String},name:{type:String,default:()=>`dropdown-${gt()}`},label:{type:String},error:{type:String},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},modelValue:{type:null},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},showSelectionCount:{type:Boolean,default:!1},toggleCaption:{type:String},placeholder:{type:String,default:""},icon:{default:"chevron-down",type:String},variant:{type:String,default:""},color:{type:String,default:""},outlined:{type:Boolean,default:!1},exactMatch:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const{t:n}=Sl(),r=t,A=e,i=s.computed({get(){return r.multiple&&!r.modelValue?[]:r.modelValue},set(l){A("update:modelValue",l)}}),o=s.computed(()=>r.options&&r.options.map(l=>(l=typeof l=="string"?{text:l,value:l}:l,{...l,active:r.modelValue&&l.value&&(r.exactMatch?r.modelValue===l.value:r.multiple?r.modelValue.includes(l.value):r.modelValue===l.value)}))),a=s.computed(()=>{if(!r.modelValue)return r.placeholder||`${n("common.select")}`;if(r.multiple&&Array.isArray(r.modelValue)&&r.modelValue.length)return o.value.reduce((l,u)=>r.modelValue.includes(u.value)?`${l}${l?", ":""}${u.text}`:l,"");if(!r.multiple){const l=o.value.find(u=>typeof u.value=="object"&&u.value!==null?JSON.stringify(u.value)===JSON.stringify(r.modelValue):u.value===r.modelValue);return l?l.text:r.placeholder||`${n("common.select")}`}return r.placeholder||`${n("common.select")}`});return(l,u)=>{const d=s.resolveComponent("base-button");return s.openBlock(),s.createElementBlock("div",{class:"input input-dropdown",id:`${t.id||t.name}`},[s.renderSlot(l.$slots,"label",{},()=>[t.label?(s.openBlock(),s.createElementBlock("label",{key:0,for:`${t.id||t.name}--dropdown-toggle`,class:"input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,c5)):s.createCommentVNode("",!0)]),s.createElementVNode("div",u5,[s.createVNode(d,{id:`${t.id||t.name}--dropdown-toggle`,"data-bs-toggle":"dropdown",role:"button",type:"button",title:a.value,class:"btn dropdown-toggle",color:t.color,outlined:t.outlined,disabled:t.disabled},{default:s.withCtx(()=>[s.createElementVNode("span",d5,[s.createVNode(s.Transition,{name:"bounce"},{default:s.withCtx(()=>[t.showSelectionCount&&t.modelValue.length?(s.openBlock(),s.createElementBlock("i",{key:0,class:"caption__count",innerHTML:t.modelValue.length},null,8,f5)):s.createCommentVNode("",!0)]),_:1}),s.createElementVNode("span",h5,[s.createElementVNode("span",p5,s.toDisplayString(t.toggleCaption||a.value),1)])])]),_:1},8,["id","title","color","outlined","disabled"]),s.createElementVNode("ul",m5,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.value,(h,p)=>(s.openBlock(),s.createElementBlock("li",{key:`${h.value}-${p}`},[s.createElementVNode("div",{class:s.normalizeClass(["dropdown-item",h.active&&"active"])},[s.createElementVNode("div",g5,[t.multiple?s.withDirectives((s.openBlock(),s.createElementBlock("input",{type:"checkbox","onUpdate:modelValue":u[0]||(u[0]=m=>i.value=m),value:h.value,key:`${t.name}-${h.value}-${p}__if`,id:`${t.name}-${h.value}-${p}`,name:t.name,label:h.text,required:t.required,disabled:h.selectable===!1,class:"form-check-input"},null,8,v5)),[[s.vModelCheckbox,i.value]]):s.withDirectives((s.openBlock(),s.createElementBlock("input",{type:"radio","onUpdate:modelValue":u[1]||(u[1]=m=>i.value=m),value:h.value,key:`${t.name}-${h.value}-${p}__else`,id:`${t.name}-${h.value}-${p}`,name:t.name,label:h.text,required:t.required,disabled:h.selectable===!1,class:"form-check-input visually-hidden"},null,8,w5)),[[s.vModelRadio,i.value]]),s.createElementVNode("label",{class:"form-check-label flex-grow-1",onclick:"event.stopPropagation",for:`${t.name}-${h.value}-${p}`},s.toDisplayString(h.text),9,B5)])],2)]))),128))])])],8,l5)}}}),C5={key:0,class:"auto-suggest__suggestions position-relative"},b5={class:"suggestions dropdown-menu show w-100 mt-2"},E5=["onClick"],k5=["innerHTML"],S5=s.defineComponent({__name:"auto-suggest",props:{modelValue:{type:String},id:{type:String},name:{type:String},label:{type:String},error:{type:String},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},options:{type:Array,default:[]},color:{type:String,default:""},outlined:{type:Boolean,default:!1},selection:{type:String}},emits:["update:modelValue","update:selection"],setup(t,{emit:e}){const n=t,r=e,A=s.ref(),i=s.ref(!1),o=s.computed({get(){return n.modelValue},set(m){r("update:modelValue",m)}}),a=s.computed(()=>{const m=new RegExp(`(${o.value})`,"i");return o.value?n.options.filter(v=>m.test(v)):n.options}),l=s.computed(()=>{const m=new RegExp(`(${o.value})`,"i");return a.value.map(v=>{const B=v.replace(m,"<strong>$1</strong>");return ur(B)})});s.watch(()=>n.options,(m,v)=>{m.length&&(i.value=!0)},{deep:!0});function u(){n.options.length&&(i.value=!0)}function d(m){i.value=!1;const v=a.value[m];r("update:modelValue",v),r("update:selection",v)}const h=s.ref();function p(m){const v=m.target;i.value&&v&&!A.value.contains(v)&&(i.value=!1)}return s.onBeforeMount(()=>{h.value=document.addEventListener("click",p)}),s.onBeforeUnmount(()=>{document.removeEventListener("click",h.value)}),(m,v)=>{const B=s.resolveComponent("base-input");return s.openBlock(),s.createElementBlock("div",{class:"auto-suggest",ref_key:"container",ref:A},[s.createElementVNode("div",{class:"auto-suggest__input",onFocusCapture:u},[s.renderSlot(m.$slots,"default",{},()=>[s.createVNode(B,s.mergeProps({modelValue:o.value,"onUpdate:modelValue":v[0]||(v[0]=y=>o.value=y)},m.$props),null,16,["modelValue"])])],32),i.value&&a.value.length?(s.openBlock(),s.createElementBlock("div",C5,[s.createElementVNode("ul",b5,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.value,(y,w)=>(s.openBlock(),s.createElementBlock("li",{key:y,class:"suggestions__item dropdown-item",onClick:s.withModifiers(C=>d(w),["prevent"])},[s.createElementVNode("p",{class:"text-truncate my-2",innerHTML:y},null,8,k5)],8,E5))),128))])])):s.createCommentVNode("",!0)],512)}}});var Xd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function x5(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ac={exports:{}};var F5=Ac.exports,$E;function Q5(){return $E||($E=1,(function(t,e){(function(){var n,r="4.17.23",A=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",a="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,d="__lodash_placeholder__",h=1,p=2,m=4,v=1,B=2,y=1,w=2,C=4,k=8,F=16,U=32,D=64,M=128,K=256,q=512,ce=30,me="...",ve=800,Be=16,te=1,V=2,Y=3,x=1/0,Q=9007199254740991,P=17976931348623157e292,T=NaN,S=4294967295,G=S-1,Ae=S>>>1,ne=[["ary",M],["bind",y],["bindKey",w],["curry",k],["curryRight",F],["flip",q],["partial",U],["partialRight",D],["rearg",K]],ee="[object Arguments]",re="[object Array]",pe="[object AsyncFunction]",de="[object Boolean]",Ce="[object Date]",W="[object DOMException]",j="[object Error]",$="[object Function]",N="[object GeneratorFunction]",R="[object Map]",J="[object Number]",z="[object Null]",le="[object Object]",E="[object Promise]",_="[object Proxy]",O="[object RegExp]",ie="[object Set]",X="[object String]",be="[object Symbol]",we="[object Undefined]",ae="[object WeakMap]",he="[object WeakSet]",xe="[object ArrayBuffer]",Pe="[object DataView]",ot="[object Float32Array]",$e="[object Float64Array]",ht="[object Int8Array]",Bt="[object Int16Array]",Et="[object Int32Array]",En="[object Uint8Array]",Yt="[object Uint8ClampedArray]",Kt="[object Uint16Array]",OA="[object Uint32Array]",pi=/\b__p \+= '';/g,ze=/\b(__p \+=) '' \+/g,gn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Tn=/&(?:amp|lt|gt|quot|#39);/g,mi=/[&<>"']/g,Br=RegExp(Tn.source),Ho=RegExp(mi.source),Us=/<%-([\s\S]+?)%>/g,nn=/<%([\s\S]+?)%>/g,NA=/<%=([\s\S]+?)%>/g,Fc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ra=/^\w*$/,_s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Po=/[\\^$.*+?()[\]{}|]/g,Ha=RegExp(Po.source),Ds=/^\s+/,Qr=/\s/,LA=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ge=/\{\n\/\* \[wrapped with (.+)\] \*/,Ie=/,? & /,We=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,At=/[()=,{}\[\]\/\s]/,bt=/\\(\\)?/g,Pr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,uA=/\w*$/,gi=/^[-+]0x[0-9a-f]+$/i,Ki=/^0b[01]+$/i,zi=/^\[object .+?Constructor\]$/,Re=/^0o[0-7]+$/i,se=/^(?:0|[1-9]\d*)$/,Te=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,He=/($^)/,zt=/['\n\r\u2028\u2029\\]/g,vn="\\ud800-\\udfff",ln="\\u0300-\\u036f",ir="\\ufe20-\\ufe2f",RA="\\u20d0-\\u20ff",Wi=ln+ir+RA,Pa="\\u2700-\\u27bf",kn="a-z\\xdf-\\xf6\\xf8-\\xff",nh="\\xac\\xb1\\xd7\\xf7",rh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mj="\\u2000-\\u206f",Ij=" \\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",Dx="A-Z\\xc0-\\xd6\\xd8-\\xde",Ox="\\ufe0e\\ufe0f",Nx=nh+rh+Mj+Ij,ew="['’]",Uj="["+vn+"]",Lx="["+Nx+"]",Ah="["+Wi+"]",Rx="\\d+",_j="["+Pa+"]",Hx="["+kn+"]",Px="[^"+vn+Nx+Rx+Pa+kn+Dx+"]",tw="\\ud83c[\\udffb-\\udfff]",Dj="(?:"+Ah+"|"+tw+")",$x="[^"+vn+"]",nw="(?:\\ud83c[\\udde6-\\uddff]){2}",rw="[\\ud800-\\udbff][\\udc00-\\udfff]",$a="["+Dx+"]",Kx="\\u200d",zx="(?:"+Hx+"|"+Px+")",Oj="(?:"+$a+"|"+Px+")",Wx="(?:"+ew+"(?:d|ll|m|re|s|t|ve))?",Gx="(?:"+ew+"(?:D|LL|M|RE|S|T|VE))?",Yx=Dj+"?",qx="["+Ox+"]?",Nj="(?:"+Kx+"(?:"+[$x,nw,rw].join("|")+")"+qx+Yx+")*",Lj="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rj="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xx=qx+Yx+Nj,Hj="(?:"+[_j,nw,rw].join("|")+")"+Xx,Pj="(?:"+[$x+Ah+"?",Ah,nw,rw,Uj].join("|")+")",$j=RegExp(ew,"g"),Kj=RegExp(Ah,"g"),Aw=RegExp(tw+"(?="+tw+")|"+Pj+Xx,"g"),zj=RegExp([$a+"?"+Hx+"+"+Wx+"(?="+[Lx,$a,"$"].join("|")+")",Oj+"+"+Gx+"(?="+[Lx,$a+zx,"$"].join("|")+")",$a+"?"+zx+"+"+Wx,$a+"+"+Gx,Rj,Lj,Rx,Hj].join("|"),"g"),Wj=RegExp("["+Kx+vn+Wi+Ox+"]"),Gj=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yj=["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"],qj=-1,qt={};qt[ot]=qt[$e]=qt[ht]=qt[Bt]=qt[Et]=qt[En]=qt[Yt]=qt[Kt]=qt[OA]=!0,qt[ee]=qt[re]=qt[xe]=qt[de]=qt[Pe]=qt[Ce]=qt[j]=qt[$]=qt[R]=qt[J]=qt[le]=qt[O]=qt[ie]=qt[X]=qt[ae]=!1;var Wt={};Wt[ee]=Wt[re]=Wt[xe]=Wt[Pe]=Wt[de]=Wt[Ce]=Wt[ot]=Wt[$e]=Wt[ht]=Wt[Bt]=Wt[Et]=Wt[R]=Wt[J]=Wt[le]=Wt[O]=Wt[ie]=Wt[X]=Wt[be]=Wt[En]=Wt[Yt]=Wt[Kt]=Wt[OA]=!0,Wt[j]=Wt[$]=Wt[ae]=!1;var Xj={À:"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"},Jj={"&":"&","<":"<",">":">",'"':""","'":"'"},jj={"&":"&","<":"<",">":">",""":'"',"'":"'"},Zj={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vj=parseFloat,e9=parseInt,Jx=typeof Xd=="object"&&Xd&&Xd.Object===Object&&Xd,t9=typeof self=="object"&&self&&self.Object===Object&&self,Xn=Jx||t9||Function("return this")(),iw=e&&!e.nodeType&&e,Os=iw&&!0&&t&&!t.nodeType&&t,jx=Os&&Os.exports===iw,ow=jx&&Jx.process,dA=(function(){try{var ue=Os&&Os.require&&Os.require("util").types;return ue||ow&&ow.binding&&ow.binding("util")}catch{}})(),Zx=dA&&dA.isArrayBuffer,Vx=dA&&dA.isDate,eF=dA&&dA.isMap,tF=dA&&dA.isRegExp,nF=dA&&dA.isSet,rF=dA&&dA.isTypedArray;function $r(ue,Ee,ye){switch(ye.length){case 0:return ue.call(Ee);case 1:return ue.call(Ee,ye[0]);case 2:return ue.call(Ee,ye[0],ye[1]);case 3:return ue.call(Ee,ye[0],ye[1],ye[2])}return ue.apply(Ee,ye)}function n9(ue,Ee,ye,Ne){for(var rt=-1,Tt=ue==null?0:ue.length;++rt<Tt;){var Mn=ue[rt];Ee(Ne,Mn,ye(Mn),ue)}return Ne}function fA(ue,Ee){for(var ye=-1,Ne=ue==null?0:ue.length;++ye<Ne&&Ee(ue[ye],ye,ue)!==!1;);return ue}function r9(ue,Ee){for(var ye=ue==null?0:ue.length;ye--&&Ee(ue[ye],ye,ue)!==!1;);return ue}function AF(ue,Ee){for(var ye=-1,Ne=ue==null?0:ue.length;++ye<Ne;)if(!Ee(ue[ye],ye,ue))return!1;return!0}function $o(ue,Ee){for(var ye=-1,Ne=ue==null?0:ue.length,rt=0,Tt=[];++ye<Ne;){var Mn=ue[ye];Ee(Mn,ye,ue)&&(Tt[rt++]=Mn)}return Tt}function ih(ue,Ee){var ye=ue==null?0:ue.length;return!!ye&&Ka(ue,Ee,0)>-1}function sw(ue,Ee,ye){for(var Ne=-1,rt=ue==null?0:ue.length;++Ne<rt;)if(ye(Ee,ue[Ne]))return!0;return!1}function Zt(ue,Ee){for(var ye=-1,Ne=ue==null?0:ue.length,rt=Array(Ne);++ye<Ne;)rt[ye]=Ee(ue[ye],ye,ue);return rt}function Ko(ue,Ee){for(var ye=-1,Ne=Ee.length,rt=ue.length;++ye<Ne;)ue[rt+ye]=Ee[ye];return ue}function aw(ue,Ee,ye,Ne){var rt=-1,Tt=ue==null?0:ue.length;for(Ne&&Tt&&(ye=ue[++rt]);++rt<Tt;)ye=Ee(ye,ue[rt],rt,ue);return ye}function A9(ue,Ee,ye,Ne){var rt=ue==null?0:ue.length;for(Ne&&rt&&(ye=ue[--rt]);rt--;)ye=Ee(ye,ue[rt],rt,ue);return ye}function lw(ue,Ee){for(var ye=-1,Ne=ue==null?0:ue.length;++ye<Ne;)if(Ee(ue[ye],ye,ue))return!0;return!1}var i9=cw("length");function o9(ue){return ue.split("")}function s9(ue){return ue.match(We)||[]}function iF(ue,Ee,ye){var Ne;return ye(ue,function(rt,Tt,Mn){if(Ee(rt,Tt,Mn))return Ne=Tt,!1}),Ne}function oh(ue,Ee,ye,Ne){for(var rt=ue.length,Tt=ye+(Ne?1:-1);Ne?Tt--:++Tt<rt;)if(Ee(ue[Tt],Tt,ue))return Tt;return-1}function Ka(ue,Ee,ye){return Ee===Ee?w9(ue,Ee,ye):oh(ue,oF,ye)}function a9(ue,Ee,ye,Ne){for(var rt=ye-1,Tt=ue.length;++rt<Tt;)if(Ne(ue[rt],Ee))return rt;return-1}function oF(ue){return ue!==ue}function sF(ue,Ee){var ye=ue==null?0:ue.length;return ye?dw(ue,Ee)/ye:T}function cw(ue){return function(Ee){return Ee==null?n:Ee[ue]}}function uw(ue){return function(Ee){return ue==null?n:ue[Ee]}}function aF(ue,Ee,ye,Ne,rt){return rt(ue,function(Tt,Mn,Pt){ye=Ne?(Ne=!1,Tt):Ee(ye,Tt,Mn,Pt)}),ye}function l9(ue,Ee){var ye=ue.length;for(ue.sort(Ee);ye--;)ue[ye]=ue[ye].value;return ue}function dw(ue,Ee){for(var ye,Ne=-1,rt=ue.length;++Ne<rt;){var Tt=Ee(ue[Ne]);Tt!==n&&(ye=ye===n?Tt:ye+Tt)}return ye}function fw(ue,Ee){for(var ye=-1,Ne=Array(ue);++ye<ue;)Ne[ye]=Ee(ye);return Ne}function c9(ue,Ee){return Zt(Ee,function(ye){return[ye,ue[ye]]})}function lF(ue){return ue&&ue.slice(0,fF(ue)+1).replace(Ds,"")}function Kr(ue){return function(Ee){return ue(Ee)}}function hw(ue,Ee){return Zt(Ee,function(ye){return ue[ye]})}function Qc(ue,Ee){return ue.has(Ee)}function cF(ue,Ee){for(var ye=-1,Ne=ue.length;++ye<Ne&&Ka(Ee,ue[ye],0)>-1;);return ye}function uF(ue,Ee){for(var ye=ue.length;ye--&&Ka(Ee,ue[ye],0)>-1;);return ye}function u9(ue,Ee){for(var ye=ue.length,Ne=0;ye--;)ue[ye]===Ee&&++Ne;return Ne}var d9=uw(Xj),f9=uw(Jj);function h9(ue){return"\\"+Zj[ue]}function p9(ue,Ee){return ue==null?n:ue[Ee]}function za(ue){return Wj.test(ue)}function m9(ue){return Gj.test(ue)}function g9(ue){for(var Ee,ye=[];!(Ee=ue.next()).done;)ye.push(Ee.value);return ye}function pw(ue){var Ee=-1,ye=Array(ue.size);return ue.forEach(function(Ne,rt){ye[++Ee]=[rt,Ne]}),ye}function dF(ue,Ee){return function(ye){return ue(Ee(ye))}}function zo(ue,Ee){for(var ye=-1,Ne=ue.length,rt=0,Tt=[];++ye<Ne;){var Mn=ue[ye];(Mn===Ee||Mn===d)&&(ue[ye]=d,Tt[rt++]=ye)}return Tt}function sh(ue){var Ee=-1,ye=Array(ue.size);return ue.forEach(function(Ne){ye[++Ee]=Ne}),ye}function v9(ue){var Ee=-1,ye=Array(ue.size);return ue.forEach(function(Ne){ye[++Ee]=[Ne,Ne]}),ye}function w9(ue,Ee,ye){for(var Ne=ye-1,rt=ue.length;++Ne<rt;)if(ue[Ne]===Ee)return Ne;return-1}function B9(ue,Ee,ye){for(var Ne=ye+1;Ne--;)if(ue[Ne]===Ee)return Ne;return Ne}function Wa(ue){return za(ue)?C9(ue):i9(ue)}function HA(ue){return za(ue)?b9(ue):o9(ue)}function fF(ue){for(var Ee=ue.length;Ee--&&Qr.test(ue.charAt(Ee)););return Ee}var y9=uw(jj);function C9(ue){for(var Ee=Aw.lastIndex=0;Aw.test(ue);)++Ee;return Ee}function b9(ue){return ue.match(Aw)||[]}function E9(ue){return ue.match(zj)||[]}var k9=(function ue(Ee){Ee=Ee==null?Xn:Ga.defaults(Xn.Object(),Ee,Ga.pick(Xn,Yj));var ye=Ee.Array,Ne=Ee.Date,rt=Ee.Error,Tt=Ee.Function,Mn=Ee.Math,Pt=Ee.Object,mw=Ee.RegExp,S9=Ee.String,hA=Ee.TypeError,ah=ye.prototype,x9=Tt.prototype,Ya=Pt.prototype,lh=Ee["__core-js_shared__"],ch=x9.toString,It=Ya.hasOwnProperty,F9=0,hF=(function(){var c=/[^.]+$/.exec(lh&&lh.keys&&lh.keys.IE_PROTO||"");return c?"Symbol(src)_1."+c:""})(),uh=Ya.toString,Q9=ch.call(Pt),T9=Xn._,M9=mw("^"+ch.call(It).replace(Po,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),dh=jx?Ee.Buffer:n,Wo=Ee.Symbol,fh=Ee.Uint8Array,pF=dh?dh.allocUnsafe:n,hh=dF(Pt.getPrototypeOf,Pt),mF=Pt.create,gF=Ya.propertyIsEnumerable,ph=ah.splice,vF=Wo?Wo.isConcatSpreadable:n,Tc=Wo?Wo.iterator:n,Ns=Wo?Wo.toStringTag:n,mh=(function(){try{var c=$s(Pt,"defineProperty");return c({},"",{}),c}catch{}})(),I9=Ee.clearTimeout!==Xn.clearTimeout&&Ee.clearTimeout,U9=Ne&&Ne.now!==Xn.Date.now&&Ne.now,_9=Ee.setTimeout!==Xn.setTimeout&&Ee.setTimeout,gh=Mn.ceil,vh=Mn.floor,gw=Pt.getOwnPropertySymbols,D9=dh?dh.isBuffer:n,wF=Ee.isFinite,O9=ah.join,N9=dF(Pt.keys,Pt),In=Mn.max,or=Mn.min,L9=Ne.now,R9=Ee.parseInt,BF=Mn.random,H9=ah.reverse,vw=$s(Ee,"DataView"),Mc=$s(Ee,"Map"),ww=$s(Ee,"Promise"),qa=$s(Ee,"Set"),Ic=$s(Ee,"WeakMap"),Uc=$s(Pt,"create"),wh=Ic&&new Ic,Xa={},P9=Ks(vw),$9=Ks(Mc),K9=Ks(ww),z9=Ks(qa),W9=Ks(Ic),Bh=Wo?Wo.prototype:n,_c=Bh?Bh.valueOf:n,yF=Bh?Bh.toString:n;function L(c){if(cn(c)&&!it(c)&&!(c instanceof yt)){if(c instanceof pA)return c;if(It.call(c,"__wrapped__"))return CQ(c)}return new pA(c)}var Ja=(function(){function c(){}return function(f){if(!rn(f))return{};if(mF)return mF(f);c.prototype=f;var g=new c;return c.prototype=n,g}})();function yh(){}function pA(c,f){this.__wrapped__=c,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=n}L.templateSettings={escape:Us,evaluate:nn,interpolate:NA,variable:"",imports:{_:L}},L.prototype=yh.prototype,L.prototype.constructor=L,pA.prototype=Ja(yh.prototype),pA.prototype.constructor=pA;function yt(c){this.__wrapped__=c,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=S,this.__views__=[]}function G9(){var c=new yt(this.__wrapped__);return c.__actions__=Tr(this.__actions__),c.__dir__=this.__dir__,c.__filtered__=this.__filtered__,c.__iteratees__=Tr(this.__iteratees__),c.__takeCount__=this.__takeCount__,c.__views__=Tr(this.__views__),c}function Y9(){if(this.__filtered__){var c=new yt(this);c.__dir__=-1,c.__filtered__=!0}else c=this.clone(),c.__dir__*=-1;return c}function q9(){var c=this.__wrapped__.value(),f=this.__dir__,g=it(c),b=f<0,I=g?c.length:0,H=oV(0,I,this.__views__),Z=H.start,oe=H.end,fe=oe-Z,ke=b?oe:Z-1,Se=this.__iteratees__,Fe=Se.length,Ue=0,Ke=or(fe,this.__takeCount__);if(!g||!b&&I==fe&&Ke==fe)return WF(c,this.__actions__);var je=[];e:for(;fe--&&Ue<Ke;){ke+=f;for(var ct=-1,Ze=c[ke];++ct<Fe;){var mt=Se[ct],Ct=mt.iteratee,Gr=mt.type,br=Ct(Ze);if(Gr==V)Ze=br;else if(!br){if(Gr==te)continue e;break e}}je[Ue++]=Ze}return je}yt.prototype=Ja(yh.prototype),yt.prototype.constructor=yt;function Ls(c){var f=-1,g=c==null?0:c.length;for(this.clear();++f<g;){var b=c[f];this.set(b[0],b[1])}}function X9(){this.__data__=Uc?Uc(null):{},this.size=0}function J9(c){var f=this.has(c)&&delete this.__data__[c];return this.size-=f?1:0,f}function j9(c){var f=this.__data__;if(Uc){var g=f[c];return g===l?n:g}return It.call(f,c)?f[c]:n}function Z9(c){var f=this.__data__;return Uc?f[c]!==n:It.call(f,c)}function V9(c,f){var g=this.__data__;return this.size+=this.has(c)?0:1,g[c]=Uc&&f===n?l:f,this}Ls.prototype.clear=X9,Ls.prototype.delete=J9,Ls.prototype.get=j9,Ls.prototype.has=Z9,Ls.prototype.set=V9;function Gi(c){var f=-1,g=c==null?0:c.length;for(this.clear();++f<g;){var b=c[f];this.set(b[0],b[1])}}function eZ(){this.__data__=[],this.size=0}function tZ(c){var f=this.__data__,g=Ch(f,c);if(g<0)return!1;var b=f.length-1;return g==b?f.pop():ph.call(f,g,1),--this.size,!0}function nZ(c){var f=this.__data__,g=Ch(f,c);return g<0?n:f[g][1]}function rZ(c){return Ch(this.__data__,c)>-1}function AZ(c,f){var g=this.__data__,b=Ch(g,c);return b<0?(++this.size,g.push([c,f])):g[b][1]=f,this}Gi.prototype.clear=eZ,Gi.prototype.delete=tZ,Gi.prototype.get=nZ,Gi.prototype.has=rZ,Gi.prototype.set=AZ;function Yi(c){var f=-1,g=c==null?0:c.length;for(this.clear();++f<g;){var b=c[f];this.set(b[0],b[1])}}function iZ(){this.size=0,this.__data__={hash:new Ls,map:new(Mc||Gi),string:new Ls}}function oZ(c){var f=_h(this,c).delete(c);return this.size-=f?1:0,f}function sZ(c){return _h(this,c).get(c)}function aZ(c){return _h(this,c).has(c)}function lZ(c,f){var g=_h(this,c),b=g.size;return g.set(c,f),this.size+=g.size==b?0:1,this}Yi.prototype.clear=iZ,Yi.prototype.delete=oZ,Yi.prototype.get=sZ,Yi.prototype.has=aZ,Yi.prototype.set=lZ;function Rs(c){var f=-1,g=c==null?0:c.length;for(this.__data__=new Yi;++f<g;)this.add(c[f])}function cZ(c){return this.__data__.set(c,l),this}function uZ(c){return this.__data__.has(c)}Rs.prototype.add=Rs.prototype.push=cZ,Rs.prototype.has=uZ;function PA(c){var f=this.__data__=new Gi(c);this.size=f.size}function dZ(){this.__data__=new Gi,this.size=0}function fZ(c){var f=this.__data__,g=f.delete(c);return this.size=f.size,g}function hZ(c){return this.__data__.get(c)}function pZ(c){return this.__data__.has(c)}function mZ(c,f){var g=this.__data__;if(g instanceof Gi){var b=g.__data__;if(!Mc||b.length<A-1)return b.push([c,f]),this.size=++g.size,this;g=this.__data__=new Yi(b)}return g.set(c,f),this.size=g.size,this}PA.prototype.clear=dZ,PA.prototype.delete=fZ,PA.prototype.get=hZ,PA.prototype.has=pZ,PA.prototype.set=mZ;function CF(c,f){var g=it(c),b=!g&&zs(c),I=!g&&!b&&Jo(c),H=!g&&!b&&!I&&el(c),Z=g||b||I||H,oe=Z?fw(c.length,S9):[],fe=oe.length;for(var ke in c)(f||It.call(c,ke))&&!(Z&&(ke=="length"||I&&(ke=="offset"||ke=="parent")||H&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||ji(ke,fe)))&&oe.push(ke);return oe}function bF(c){var f=c.length;return f?c[Tw(0,f-1)]:n}function gZ(c,f){return Dh(Tr(c),Hs(f,0,c.length))}function vZ(c){return Dh(Tr(c))}function Bw(c,f,g){(g!==n&&!$A(c[f],g)||g===n&&!(f in c))&&qi(c,f,g)}function Dc(c,f,g){var b=c[f];(!(It.call(c,f)&&$A(b,g))||g===n&&!(f in c))&&qi(c,f,g)}function Ch(c,f){for(var g=c.length;g--;)if($A(c[g][0],f))return g;return-1}function wZ(c,f,g,b){return Go(c,function(I,H,Z){f(b,I,g(I),Z)}),b}function EF(c,f){return c&&wi(f,Hn(f),c)}function BZ(c,f){return c&&wi(f,Ir(f),c)}function qi(c,f,g){f=="__proto__"&&mh?mh(c,f,{configurable:!0,enumerable:!0,value:g,writable:!0}):c[f]=g}function yw(c,f){for(var g=-1,b=f.length,I=ye(b),H=c==null;++g<b;)I[g]=H?n:tB(c,f[g]);return I}function Hs(c,f,g){return c===c&&(g!==n&&(c=c<=g?c:g),f!==n&&(c=c>=f?c:f)),c}function mA(c,f,g,b,I,H){var Z,oe=f&h,fe=f&p,ke=f&m;if(g&&(Z=I?g(c,b,I,H):g(c)),Z!==n)return Z;if(!rn(c))return c;var Se=it(c);if(Se){if(Z=aV(c),!oe)return Tr(c,Z)}else{var Fe=sr(c),Ue=Fe==$||Fe==N;if(Jo(c))return qF(c,oe);if(Fe==le||Fe==ee||Ue&&!I){if(Z=fe||Ue?{}:fQ(c),!oe)return fe?jZ(c,BZ(Z,c)):JZ(c,EF(Z,c))}else{if(!Wt[Fe])return I?c:{};Z=lV(c,Fe,oe)}}H||(H=new PA);var Ke=H.get(c);if(Ke)return Ke;H.set(c,Z),$Q(c)?c.forEach(function(Ze){Z.add(mA(Ze,f,g,Ze,c,H))}):HQ(c)&&c.forEach(function(Ze,mt){Z.set(mt,mA(Ze,f,g,mt,c,H))});var je=ke?fe?Pw:Hw:fe?Ir:Hn,ct=Se?n:je(c);return fA(ct||c,function(Ze,mt){ct&&(mt=Ze,Ze=c[mt]),Dc(Z,mt,mA(Ze,f,g,mt,c,H))}),Z}function yZ(c){var f=Hn(c);return function(g){return kF(g,c,f)}}function kF(c,f,g){var b=g.length;if(c==null)return!b;for(c=Pt(c);b--;){var I=g[b],H=f[I],Z=c[I];if(Z===n&&!(I in c)||!H(Z))return!1}return!0}function SF(c,f,g){if(typeof c!="function")throw new hA(o);return $c(function(){c.apply(n,g)},f)}function Oc(c,f,g,b){var I=-1,H=ih,Z=!0,oe=c.length,fe=[],ke=f.length;if(!oe)return fe;g&&(f=Zt(f,Kr(g))),b?(H=sw,Z=!1):f.length>=A&&(H=Qc,Z=!1,f=new Rs(f));e:for(;++I<oe;){var Se=c[I],Fe=g==null?Se:g(Se);if(Se=b||Se!==0?Se:0,Z&&Fe===Fe){for(var Ue=ke;Ue--;)if(f[Ue]===Fe)continue e;fe.push(Se)}else H(f,Fe,b)||fe.push(Se)}return fe}var Go=VF(vi),xF=VF(bw,!0);function CZ(c,f){var g=!0;return Go(c,function(b,I,H){return g=!!f(b,I,H),g}),g}function bh(c,f,g){for(var b=-1,I=c.length;++b<I;){var H=c[b],Z=f(H);if(Z!=null&&(oe===n?Z===Z&&!Wr(Z):g(Z,oe)))var oe=Z,fe=H}return fe}function bZ(c,f,g,b){var I=c.length;for(g=at(g),g<0&&(g=-g>I?0:I+g),b=b===n||b>I?I:at(b),b<0&&(b+=I),b=g>b?0:zQ(b);g<b;)c[g++]=f;return c}function FF(c,f){var g=[];return Go(c,function(b,I,H){f(b,I,H)&&g.push(b)}),g}function Jn(c,f,g,b,I){var H=-1,Z=c.length;for(g||(g=uV),I||(I=[]);++H<Z;){var oe=c[H];f>0&&g(oe)?f>1?Jn(oe,f-1,g,b,I):Ko(I,oe):b||(I[I.length]=oe)}return I}var Cw=eQ(),QF=eQ(!0);function vi(c,f){return c&&Cw(c,f,Hn)}function bw(c,f){return c&&QF(c,f,Hn)}function Eh(c,f){return $o(f,function(g){return Zi(c[g])})}function Ps(c,f){f=qo(f,c);for(var g=0,b=f.length;c!=null&&g<b;)c=c[Bi(f[g++])];return g&&g==b?c:n}function TF(c,f,g){var b=f(c);return it(c)?b:Ko(b,g(c))}function yr(c){return c==null?c===n?we:z:Ns&&Ns in Pt(c)?iV(c):vV(c)}function Ew(c,f){return c>f}function EZ(c,f){return c!=null&&It.call(c,f)}function kZ(c,f){return c!=null&&f in Pt(c)}function SZ(c,f,g){return c>=or(f,g)&&c<In(f,g)}function kw(c,f,g){for(var b=g?sw:ih,I=c[0].length,H=c.length,Z=H,oe=ye(H),fe=1/0,ke=[];Z--;){var Se=c[Z];Z&&f&&(Se=Zt(Se,Kr(f))),fe=or(Se.length,fe),oe[Z]=!g&&(f||I>=120&&Se.length>=120)?new Rs(Z&&Se):n}Se=c[0];var Fe=-1,Ue=oe[0];e:for(;++Fe<I&&ke.length<fe;){var Ke=Se[Fe],je=f?f(Ke):Ke;if(Ke=g||Ke!==0?Ke:0,!(Ue?Qc(Ue,je):b(ke,je,g))){for(Z=H;--Z;){var ct=oe[Z];if(!(ct?Qc(ct,je):b(c[Z],je,g)))continue e}Ue&&Ue.push(je),ke.push(Ke)}}return ke}function xZ(c,f,g,b){return vi(c,function(I,H,Z){f(b,g(I),H,Z)}),b}function Nc(c,f,g){f=qo(f,c),c=gQ(c,f);var b=c==null?c:c[Bi(vA(f))];return b==null?n:$r(b,c,g)}function MF(c){return cn(c)&&yr(c)==ee}function FZ(c){return cn(c)&&yr(c)==xe}function QZ(c){return cn(c)&&yr(c)==Ce}function Lc(c,f,g,b,I){return c===f?!0:c==null||f==null||!cn(c)&&!cn(f)?c!==c&&f!==f:TZ(c,f,g,b,Lc,I)}function TZ(c,f,g,b,I,H){var Z=it(c),oe=it(f),fe=Z?re:sr(c),ke=oe?re:sr(f);fe=fe==ee?le:fe,ke=ke==ee?le:ke;var Se=fe==le,Fe=ke==le,Ue=fe==ke;if(Ue&&Jo(c)){if(!Jo(f))return!1;Z=!0,Se=!1}if(Ue&&!Se)return H||(H=new PA),Z||el(c)?cQ(c,f,g,b,I,H):rV(c,f,fe,g,b,I,H);if(!(g&v)){var Ke=Se&&It.call(c,"__wrapped__"),je=Fe&&It.call(f,"__wrapped__");if(Ke||je){var ct=Ke?c.value():c,Ze=je?f.value():f;return H||(H=new PA),I(ct,Ze,g,b,H)}}return Ue?(H||(H=new PA),AV(c,f,g,b,I,H)):!1}function MZ(c){return cn(c)&&sr(c)==R}function Sw(c,f,g,b){var I=g.length,H=I,Z=!b;if(c==null)return!H;for(c=Pt(c);I--;){var oe=g[I];if(Z&&oe[2]?oe[1]!==c[oe[0]]:!(oe[0]in c))return!1}for(;++I<H;){oe=g[I];var fe=oe[0],ke=c[fe],Se=oe[1];if(Z&&oe[2]){if(ke===n&&!(fe in c))return!1}else{var Fe=new PA;if(b)var Ue=b(ke,Se,fe,c,f,Fe);if(!(Ue===n?Lc(Se,ke,v|B,b,Fe):Ue))return!1}}return!0}function IF(c){if(!rn(c)||fV(c))return!1;var f=Zi(c)?M9:zi;return f.test(Ks(c))}function IZ(c){return cn(c)&&yr(c)==O}function UZ(c){return cn(c)&&sr(c)==ie}function _Z(c){return cn(c)&&Ph(c.length)&&!!qt[yr(c)]}function UF(c){return typeof c=="function"?c:c==null?Ur:typeof c=="object"?it(c)?OF(c[0],c[1]):DF(c):tT(c)}function xw(c){if(!Pc(c))return N9(c);var f=[];for(var g in Pt(c))It.call(c,g)&&g!="constructor"&&f.push(g);return f}function DZ(c){if(!rn(c))return gV(c);var f=Pc(c),g=[];for(var b in c)b=="constructor"&&(f||!It.call(c,b))||g.push(b);return g}function Fw(c,f){return c<f}function _F(c,f){var g=-1,b=Mr(c)?ye(c.length):[];return Go(c,function(I,H,Z){b[++g]=f(I,H,Z)}),b}function DF(c){var f=Kw(c);return f.length==1&&f[0][2]?pQ(f[0][0],f[0][1]):function(g){return g===c||Sw(g,c,f)}}function OF(c,f){return Ww(c)&&hQ(f)?pQ(Bi(c),f):function(g){var b=tB(g,c);return b===n&&b===f?nB(g,c):Lc(f,b,v|B)}}function kh(c,f,g,b,I){c!==f&&Cw(f,function(H,Z){if(I||(I=new PA),rn(H))OZ(c,f,Z,g,kh,b,I);else{var oe=b?b(Yw(c,Z),H,Z+"",c,f,I):n;oe===n&&(oe=H),Bw(c,Z,oe)}},Ir)}function OZ(c,f,g,b,I,H,Z){var oe=Yw(c,g),fe=Yw(f,g),ke=Z.get(fe);if(ke){Bw(c,g,ke);return}var Se=H?H(oe,fe,g+"",c,f,Z):n,Fe=Se===n;if(Fe){var Ue=it(fe),Ke=!Ue&&Jo(fe),je=!Ue&&!Ke&&el(fe);Se=fe,Ue||Ke||je?it(oe)?Se=oe:wn(oe)?Se=Tr(oe):Ke?(Fe=!1,Se=qF(fe,!0)):je?(Fe=!1,Se=XF(fe,!0)):Se=[]:Kc(fe)||zs(fe)?(Se=oe,zs(oe)?Se=WQ(oe):(!rn(oe)||Zi(oe))&&(Se=fQ(fe))):Fe=!1}Fe&&(Z.set(fe,Se),I(Se,fe,b,H,Z),Z.delete(fe)),Bw(c,g,Se)}function NF(c,f){var g=c.length;if(g)return f+=f<0?g:0,ji(f,g)?c[f]:n}function LF(c,f,g){f.length?f=Zt(f,function(H){return it(H)?function(Z){return Ps(Z,H.length===1?H[0]:H)}:H}):f=[Ur];var b=-1;f=Zt(f,Kr(Je()));var I=_F(c,function(H,Z,oe){var fe=Zt(f,function(ke){return ke(H)});return{criteria:fe,index:++b,value:H}});return l9(I,function(H,Z){return XZ(H,Z,g)})}function NZ(c,f){return RF(c,f,function(g,b){return nB(c,b)})}function RF(c,f,g){for(var b=-1,I=f.length,H={};++b<I;){var Z=f[b],oe=Ps(c,Z);g(oe,Z)&&Rc(H,qo(Z,c),oe)}return H}function LZ(c){return function(f){return Ps(f,c)}}function Qw(c,f,g,b){var I=b?a9:Ka,H=-1,Z=f.length,oe=c;for(c===f&&(f=Tr(f)),g&&(oe=Zt(c,Kr(g)));++H<Z;)for(var fe=0,ke=f[H],Se=g?g(ke):ke;(fe=I(oe,Se,fe,b))>-1;)oe!==c&&ph.call(oe,fe,1),ph.call(c,fe,1);return c}function HF(c,f){for(var g=c?f.length:0,b=g-1;g--;){var I=f[g];if(g==b||I!==H){var H=I;ji(I)?ph.call(c,I,1):Uw(c,I)}}return c}function Tw(c,f){return c+vh(BF()*(f-c+1))}function RZ(c,f,g,b){for(var I=-1,H=In(gh((f-c)/(g||1)),0),Z=ye(H);H--;)Z[b?H:++I]=c,c+=g;return Z}function Mw(c,f){var g="";if(!c||f<1||f>Q)return g;do f%2&&(g+=c),f=vh(f/2),f&&(c+=c);while(f);return g}function ut(c,f){return qw(mQ(c,f,Ur),c+"")}function HZ(c){return bF(tl(c))}function PZ(c,f){var g=tl(c);return Dh(g,Hs(f,0,g.length))}function Rc(c,f,g,b){if(!rn(c))return c;f=qo(f,c);for(var I=-1,H=f.length,Z=H-1,oe=c;oe!=null&&++I<H;){var fe=Bi(f[I]),ke=g;if(fe==="__proto__"||fe==="constructor"||fe==="prototype")return c;if(I!=Z){var Se=oe[fe];ke=b?b(Se,fe,oe):n,ke===n&&(ke=rn(Se)?Se:ji(f[I+1])?[]:{})}Dc(oe,fe,ke),oe=oe[fe]}return c}var PF=wh?function(c,f){return wh.set(c,f),c}:Ur,$Z=mh?function(c,f){return mh(c,"toString",{configurable:!0,enumerable:!1,value:AB(f),writable:!0})}:Ur;function KZ(c){return Dh(tl(c))}function gA(c,f,g){var b=-1,I=c.length;f<0&&(f=-f>I?0:I+f),g=g>I?I:g,g<0&&(g+=I),I=f>g?0:g-f>>>0,f>>>=0;for(var H=ye(I);++b<I;)H[b]=c[b+f];return H}function zZ(c,f){var g;return Go(c,function(b,I,H){return g=f(b,I,H),!g}),!!g}function Sh(c,f,g){var b=0,I=c==null?b:c.length;if(typeof f=="number"&&f===f&&I<=Ae){for(;b<I;){var H=b+I>>>1,Z=c[H];Z!==null&&!Wr(Z)&&(g?Z<=f:Z<f)?b=H+1:I=H}return I}return Iw(c,f,Ur,g)}function Iw(c,f,g,b){var I=0,H=c==null?0:c.length;if(H===0)return 0;f=g(f);for(var Z=f!==f,oe=f===null,fe=Wr(f),ke=f===n;I<H;){var Se=vh((I+H)/2),Fe=g(c[Se]),Ue=Fe!==n,Ke=Fe===null,je=Fe===Fe,ct=Wr(Fe);if(Z)var Ze=b||je;else ke?Ze=je&&(b||Ue):oe?Ze=je&&Ue&&(b||!Ke):fe?Ze=je&&Ue&&!Ke&&(b||!ct):Ke||ct?Ze=!1:Ze=b?Fe<=f:Fe<f;Ze?I=Se+1:H=Se}return or(H,G)}function $F(c,f){for(var g=-1,b=c.length,I=0,H=[];++g<b;){var Z=c[g],oe=f?f(Z):Z;if(!g||!$A(oe,fe)){var fe=oe;H[I++]=Z===0?0:Z}}return H}function KF(c){return typeof c=="number"?c:Wr(c)?T:+c}function zr(c){if(typeof c=="string")return c;if(it(c))return Zt(c,zr)+"";if(Wr(c))return yF?yF.call(c):"";var f=c+"";return f=="0"&&1/c==-x?"-0":f}function Yo(c,f,g){var b=-1,I=ih,H=c.length,Z=!0,oe=[],fe=oe;if(g)Z=!1,I=sw;else if(H>=A){var ke=f?null:tV(c);if(ke)return sh(ke);Z=!1,I=Qc,fe=new Rs}else fe=f?[]:oe;e:for(;++b<H;){var Se=c[b],Fe=f?f(Se):Se;if(Se=g||Se!==0?Se:0,Z&&Fe===Fe){for(var Ue=fe.length;Ue--;)if(fe[Ue]===Fe)continue e;f&&fe.push(Fe),oe.push(Se)}else I(fe,Fe,g)||(fe!==oe&&fe.push(Fe),oe.push(Se))}return oe}function Uw(c,f){f=qo(f,c);var g=-1,b=f.length;if(!b)return!0;for(var I=c==null||typeof c!="object"&&typeof c!="function";++g<b;){var H=f[g];if(typeof H=="string"){if(H==="__proto__"&&!It.call(c,"__proto__"))return!1;if(H==="constructor"&&g+1<b&&typeof f[g+1]=="string"&&f[g+1]==="prototype"){if(I&&g===0)continue;return!1}}}var Z=gQ(c,f);return Z==null||delete Z[Bi(vA(f))]}function zF(c,f,g,b){return Rc(c,f,g(Ps(c,f)),b)}function xh(c,f,g,b){for(var I=c.length,H=b?I:-1;(b?H--:++H<I)&&f(c[H],H,c););return g?gA(c,b?0:H,b?H+1:I):gA(c,b?H+1:0,b?I:H)}function WF(c,f){var g=c;return g instanceof yt&&(g=g.value()),aw(f,function(b,I){return I.func.apply(I.thisArg,Ko([b],I.args))},g)}function _w(c,f,g){var b=c.length;if(b<2)return b?Yo(c[0]):[];for(var I=-1,H=ye(b);++I<b;)for(var Z=c[I],oe=-1;++oe<b;)oe!=I&&(H[I]=Oc(H[I]||Z,c[oe],f,g));return Yo(Jn(H,1),f,g)}function GF(c,f,g){for(var b=-1,I=c.length,H=f.length,Z={};++b<I;){var oe=b<H?f[b]:n;g(Z,c[b],oe)}return Z}function Dw(c){return wn(c)?c:[]}function Ow(c){return typeof c=="function"?c:Ur}function qo(c,f){return it(c)?c:Ww(c,f)?[c]:yQ(Ut(c))}var WZ=ut;function Xo(c,f,g){var b=c.length;return g=g===n?b:g,!f&&g>=b?c:gA(c,f,g)}var YF=I9||function(c){return Xn.clearTimeout(c)};function qF(c,f){if(f)return c.slice();var g=c.length,b=pF?pF(g):new c.constructor(g);return c.copy(b),b}function Nw(c){var f=new c.constructor(c.byteLength);return new fh(f).set(new fh(c)),f}function GZ(c,f){var g=f?Nw(c.buffer):c.buffer;return new c.constructor(g,c.byteOffset,c.byteLength)}function YZ(c){var f=new c.constructor(c.source,uA.exec(c));return f.lastIndex=c.lastIndex,f}function qZ(c){return _c?Pt(_c.call(c)):{}}function XF(c,f){var g=f?Nw(c.buffer):c.buffer;return new c.constructor(g,c.byteOffset,c.length)}function JF(c,f){if(c!==f){var g=c!==n,b=c===null,I=c===c,H=Wr(c),Z=f!==n,oe=f===null,fe=f===f,ke=Wr(f);if(!oe&&!ke&&!H&&c>f||H&&Z&&fe&&!oe&&!ke||b&&Z&&fe||!g&&fe||!I)return 1;if(!b&&!H&&!ke&&c<f||ke&&g&&I&&!b&&!H||oe&&g&&I||!Z&&I||!fe)return-1}return 0}function XZ(c,f,g){for(var b=-1,I=c.criteria,H=f.criteria,Z=I.length,oe=g.length;++b<Z;){var fe=JF(I[b],H[b]);if(fe){if(b>=oe)return fe;var ke=g[b];return fe*(ke=="desc"?-1:1)}}return c.index-f.index}function jF(c,f,g,b){for(var I=-1,H=c.length,Z=g.length,oe=-1,fe=f.length,ke=In(H-Z,0),Se=ye(fe+ke),Fe=!b;++oe<fe;)Se[oe]=f[oe];for(;++I<Z;)(Fe||I<H)&&(Se[g[I]]=c[I]);for(;ke--;)Se[oe++]=c[I++];return Se}function ZF(c,f,g,b){for(var I=-1,H=c.length,Z=-1,oe=g.length,fe=-1,ke=f.length,Se=In(H-oe,0),Fe=ye(Se+ke),Ue=!b;++I<Se;)Fe[I]=c[I];for(var Ke=I;++fe<ke;)Fe[Ke+fe]=f[fe];for(;++Z<oe;)(Ue||I<H)&&(Fe[Ke+g[Z]]=c[I++]);return Fe}function Tr(c,f){var g=-1,b=c.length;for(f||(f=ye(b));++g<b;)f[g]=c[g];return f}function wi(c,f,g,b){var I=!g;g||(g={});for(var H=-1,Z=f.length;++H<Z;){var oe=f[H],fe=b?b(g[oe],c[oe],oe,g,c):n;fe===n&&(fe=c[oe]),I?qi(g,oe,fe):Dc(g,oe,fe)}return g}function JZ(c,f){return wi(c,zw(c),f)}function jZ(c,f){return wi(c,uQ(c),f)}function Fh(c,f){return function(g,b){var I=it(g)?n9:wZ,H=f?f():{};return I(g,c,Je(b,2),H)}}function ja(c){return ut(function(f,g){var b=-1,I=g.length,H=I>1?g[I-1]:n,Z=I>2?g[2]:n;for(H=c.length>3&&typeof H=="function"?(I--,H):n,Z&&Cr(g[0],g[1],Z)&&(H=I<3?n:H,I=1),f=Pt(f);++b<I;){var oe=g[b];oe&&c(f,oe,b,H)}return f})}function VF(c,f){return function(g,b){if(g==null)return g;if(!Mr(g))return c(g,b);for(var I=g.length,H=f?I:-1,Z=Pt(g);(f?H--:++H<I)&&b(Z[H],H,Z)!==!1;);return g}}function eQ(c){return function(f,g,b){for(var I=-1,H=Pt(f),Z=b(f),oe=Z.length;oe--;){var fe=Z[c?oe:++I];if(g(H[fe],fe,H)===!1)break}return f}}function ZZ(c,f,g){var b=f&y,I=Hc(c);function H(){var Z=this&&this!==Xn&&this instanceof H?I:c;return Z.apply(b?g:this,arguments)}return H}function tQ(c){return function(f){f=Ut(f);var g=za(f)?HA(f):n,b=g?g[0]:f.charAt(0),I=g?Xo(g,1).join(""):f.slice(1);return b[c]()+I}}function Za(c){return function(f){return aw(VQ(ZQ(f).replace($j,"")),c,"")}}function Hc(c){return function(){var f=arguments;switch(f.length){case 0:return new c;case 1:return new c(f[0]);case 2:return new c(f[0],f[1]);case 3:return new c(f[0],f[1],f[2]);case 4:return new c(f[0],f[1],f[2],f[3]);case 5:return new c(f[0],f[1],f[2],f[3],f[4]);case 6:return new c(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new c(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var g=Ja(c.prototype),b=c.apply(g,f);return rn(b)?b:g}}function VZ(c,f,g){var b=Hc(c);function I(){for(var H=arguments.length,Z=ye(H),oe=H,fe=Va(I);oe--;)Z[oe]=arguments[oe];var ke=H<3&&Z[0]!==fe&&Z[H-1]!==fe?[]:zo(Z,fe);if(H-=ke.length,H<g)return oQ(c,f,Qh,I.placeholder,n,Z,ke,n,n,g-H);var Se=this&&this!==Xn&&this instanceof I?b:c;return $r(Se,this,Z)}return I}function nQ(c){return function(f,g,b){var I=Pt(f);if(!Mr(f)){var H=Je(g,3);f=Hn(f),g=function(oe){return H(I[oe],oe,I)}}var Z=c(f,g,b);return Z>-1?I[H?f[Z]:Z]:n}}function rQ(c){return Ji(function(f){var g=f.length,b=g,I=pA.prototype.thru;for(c&&f.reverse();b--;){var H=f[b];if(typeof H!="function")throw new hA(o);if(I&&!Z&&Uh(H)=="wrapper")var Z=new pA([],!0)}for(b=Z?b:g;++b<g;){H=f[b];var oe=Uh(H),fe=oe=="wrapper"?$w(H):n;fe&&Gw(fe[0])&&fe[1]==(M|k|U|K)&&!fe[4].length&&fe[9]==1?Z=Z[Uh(fe[0])].apply(Z,fe[3]):Z=H.length==1&&Gw(H)?Z[oe]():Z.thru(H)}return function(){var ke=arguments,Se=ke[0];if(Z&&ke.length==1&&it(Se))return Z.plant(Se).value();for(var Fe=0,Ue=g?f[Fe].apply(this,ke):Se;++Fe<g;)Ue=f[Fe].call(this,Ue);return Ue}})}function Qh(c,f,g,b,I,H,Z,oe,fe,ke){var Se=f&M,Fe=f&y,Ue=f&w,Ke=f&(k|F),je=f&q,ct=Ue?n:Hc(c);function Ze(){for(var mt=arguments.length,Ct=ye(mt),Gr=mt;Gr--;)Ct[Gr]=arguments[Gr];if(Ke)var br=Va(Ze),Yr=u9(Ct,br);if(b&&(Ct=jF(Ct,b,I,Ke)),H&&(Ct=ZF(Ct,H,Z,Ke)),mt-=Yr,Ke&&mt<ke){var Bn=zo(Ct,br);return oQ(c,f,Qh,Ze.placeholder,g,Ct,Bn,oe,fe,ke-mt)}var KA=Fe?g:this,eo=Ue?KA[c]:c;return mt=Ct.length,oe?Ct=wV(Ct,oe):je&&mt>1&&Ct.reverse(),Se&&fe<mt&&(Ct.length=fe),this&&this!==Xn&&this instanceof Ze&&(eo=ct||Hc(eo)),eo.apply(KA,Ct)}return Ze}function AQ(c,f){return function(g,b){return xZ(g,c,f(b),{})}}function Th(c,f){return function(g,b){var I;if(g===n&&b===n)return f;if(g!==n&&(I=g),b!==n){if(I===n)return b;typeof g=="string"||typeof b=="string"?(g=zr(g),b=zr(b)):(g=KF(g),b=KF(b)),I=c(g,b)}return I}}function Lw(c){return Ji(function(f){return f=Zt(f,Kr(Je())),ut(function(g){var b=this;return c(f,function(I){return $r(I,b,g)})})})}function Mh(c,f){f=f===n?" ":zr(f);var g=f.length;if(g<2)return g?Mw(f,c):f;var b=Mw(f,gh(c/Wa(f)));return za(f)?Xo(HA(b),0,c).join(""):b.slice(0,c)}function eV(c,f,g,b){var I=f&y,H=Hc(c);function Z(){for(var oe=-1,fe=arguments.length,ke=-1,Se=b.length,Fe=ye(Se+fe),Ue=this&&this!==Xn&&this instanceof Z?H:c;++ke<Se;)Fe[ke]=b[ke];for(;fe--;)Fe[ke++]=arguments[++oe];return $r(Ue,I?g:this,Fe)}return Z}function iQ(c){return function(f,g,b){return b&&typeof b!="number"&&Cr(f,g,b)&&(g=b=n),f=Vi(f),g===n?(g=f,f=0):g=Vi(g),b=b===n?f<g?1:-1:Vi(b),RZ(f,g,b,c)}}function Ih(c){return function(f,g){return typeof f=="string"&&typeof g=="string"||(f=wA(f),g=wA(g)),c(f,g)}}function oQ(c,f,g,b,I,H,Z,oe,fe,ke){var Se=f&k,Fe=Se?Z:n,Ue=Se?n:Z,Ke=Se?H:n,je=Se?n:H;f|=Se?U:D,f&=~(Se?D:U),f&C||(f&=-4);var ct=[c,f,I,Ke,Fe,je,Ue,oe,fe,ke],Ze=g.apply(n,ct);return Gw(c)&&vQ(Ze,ct),Ze.placeholder=b,wQ(Ze,c,f)}function Rw(c){var f=Mn[c];return function(g,b){if(g=wA(g),b=b==null?0:or(at(b),292),b&&wF(g)){var I=(Ut(g)+"e").split("e"),H=f(I[0]+"e"+(+I[1]+b));return I=(Ut(H)+"e").split("e"),+(I[0]+"e"+(+I[1]-b))}return f(g)}}var tV=qa&&1/sh(new qa([,-0]))[1]==x?function(c){return new qa(c)}:sB;function sQ(c){return function(f){var g=sr(f);return g==R?pw(f):g==ie?v9(f):c9(f,c(f))}}function Xi(c,f,g,b,I,H,Z,oe){var fe=f&w;if(!fe&&typeof c!="function")throw new hA(o);var ke=b?b.length:0;if(ke||(f&=-97,b=I=n),Z=Z===n?Z:In(at(Z),0),oe=oe===n?oe:at(oe),ke-=I?I.length:0,f&D){var Se=b,Fe=I;b=I=n}var Ue=fe?n:$w(c),Ke=[c,f,g,b,I,Se,Fe,H,Z,oe];if(Ue&&mV(Ke,Ue),c=Ke[0],f=Ke[1],g=Ke[2],b=Ke[3],I=Ke[4],oe=Ke[9]=Ke[9]===n?fe?0:c.length:In(Ke[9]-ke,0),!oe&&f&(k|F)&&(f&=-25),!f||f==y)var je=ZZ(c,f,g);else f==k||f==F?je=VZ(c,f,oe):(f==U||f==(y|U))&&!I.length?je=eV(c,f,g,b):je=Qh.apply(n,Ke);var ct=Ue?PF:vQ;return wQ(ct(je,Ke),c,f)}function aQ(c,f,g,b){return c===n||$A(c,Ya[g])&&!It.call(b,g)?f:c}function lQ(c,f,g,b,I,H){return rn(c)&&rn(f)&&(H.set(f,c),kh(c,f,n,lQ,H),H.delete(f)),c}function nV(c){return Kc(c)?n:c}function cQ(c,f,g,b,I,H){var Z=g&v,oe=c.length,fe=f.length;if(oe!=fe&&!(Z&&fe>oe))return!1;var ke=H.get(c),Se=H.get(f);if(ke&&Se)return ke==f&&Se==c;var Fe=-1,Ue=!0,Ke=g&B?new Rs:n;for(H.set(c,f),H.set(f,c);++Fe<oe;){var je=c[Fe],ct=f[Fe];if(b)var Ze=Z?b(ct,je,Fe,f,c,H):b(je,ct,Fe,c,f,H);if(Ze!==n){if(Ze)continue;Ue=!1;break}if(Ke){if(!lw(f,function(mt,Ct){if(!Qc(Ke,Ct)&&(je===mt||I(je,mt,g,b,H)))return Ke.push(Ct)})){Ue=!1;break}}else if(!(je===ct||I(je,ct,g,b,H))){Ue=!1;break}}return H.delete(c),H.delete(f),Ue}function rV(c,f,g,b,I,H,Z){switch(g){case Pe:if(c.byteLength!=f.byteLength||c.byteOffset!=f.byteOffset)return!1;c=c.buffer,f=f.buffer;case xe:return!(c.byteLength!=f.byteLength||!H(new fh(c),new fh(f)));case de:case Ce:case J:return $A(+c,+f);case j:return c.name==f.name&&c.message==f.message;case O:case X:return c==f+"";case R:var oe=pw;case ie:var fe=b&v;if(oe||(oe=sh),c.size!=f.size&&!fe)return!1;var ke=Z.get(c);if(ke)return ke==f;b|=B,Z.set(c,f);var Se=cQ(oe(c),oe(f),b,I,H,Z);return Z.delete(c),Se;case be:if(_c)return _c.call(c)==_c.call(f)}return!1}function AV(c,f,g,b,I,H){var Z=g&v,oe=Hw(c),fe=oe.length,ke=Hw(f),Se=ke.length;if(fe!=Se&&!Z)return!1;for(var Fe=fe;Fe--;){var Ue=oe[Fe];if(!(Z?Ue in f:It.call(f,Ue)))return!1}var Ke=H.get(c),je=H.get(f);if(Ke&&je)return Ke==f&&je==c;var ct=!0;H.set(c,f),H.set(f,c);for(var Ze=Z;++Fe<fe;){Ue=oe[Fe];var mt=c[Ue],Ct=f[Ue];if(b)var Gr=Z?b(Ct,mt,Ue,f,c,H):b(mt,Ct,Ue,c,f,H);if(!(Gr===n?mt===Ct||I(mt,Ct,g,b,H):Gr)){ct=!1;break}Ze||(Ze=Ue=="constructor")}if(ct&&!Ze){var br=c.constructor,Yr=f.constructor;br!=Yr&&"constructor"in c&&"constructor"in f&&!(typeof br=="function"&&br instanceof br&&typeof Yr=="function"&&Yr instanceof Yr)&&(ct=!1)}return H.delete(c),H.delete(f),ct}function Ji(c){return qw(mQ(c,n,kQ),c+"")}function Hw(c){return TF(c,Hn,zw)}function Pw(c){return TF(c,Ir,uQ)}var $w=wh?function(c){return wh.get(c)}:sB;function Uh(c){for(var f=c.name+"",g=Xa[f],b=It.call(Xa,f)?g.length:0;b--;){var I=g[b],H=I.func;if(H==null||H==c)return I.name}return f}function Va(c){var f=It.call(L,"placeholder")?L:c;return f.placeholder}function Je(){var c=L.iteratee||iB;return c=c===iB?UF:c,arguments.length?c(arguments[0],arguments[1]):c}function _h(c,f){var g=c.__data__;return dV(f)?g[typeof f=="string"?"string":"hash"]:g.map}function Kw(c){for(var f=Hn(c),g=f.length;g--;){var b=f[g],I=c[b];f[g]=[b,I,hQ(I)]}return f}function $s(c,f){var g=p9(c,f);return IF(g)?g:n}function iV(c){var f=It.call(c,Ns),g=c[Ns];try{c[Ns]=n;var b=!0}catch{}var I=uh.call(c);return b&&(f?c[Ns]=g:delete c[Ns]),I}var zw=gw?function(c){return c==null?[]:(c=Pt(c),$o(gw(c),function(f){return gF.call(c,f)}))}:aB,uQ=gw?function(c){for(var f=[];c;)Ko(f,zw(c)),c=hh(c);return f}:aB,sr=yr;(vw&&sr(new vw(new ArrayBuffer(1)))!=Pe||Mc&&sr(new Mc)!=R||ww&&sr(ww.resolve())!=E||qa&&sr(new qa)!=ie||Ic&&sr(new Ic)!=ae)&&(sr=function(c){var f=yr(c),g=f==le?c.constructor:n,b=g?Ks(g):"";if(b)switch(b){case P9:return Pe;case $9:return R;case K9:return E;case z9:return ie;case W9:return ae}return f});function oV(c,f,g){for(var b=-1,I=g.length;++b<I;){var H=g[b],Z=H.size;switch(H.type){case"drop":c+=Z;break;case"dropRight":f-=Z;break;case"take":f=or(f,c+Z);break;case"takeRight":c=In(c,f-Z);break}}return{start:c,end:f}}function sV(c){var f=c.match(ge);return f?f[1].split(Ie):[]}function dQ(c,f,g){f=qo(f,c);for(var b=-1,I=f.length,H=!1;++b<I;){var Z=Bi(f[b]);if(!(H=c!=null&&g(c,Z)))break;c=c[Z]}return H||++b!=I?H:(I=c==null?0:c.length,!!I&&Ph(I)&&ji(Z,I)&&(it(c)||zs(c)))}function aV(c){var f=c.length,g=new c.constructor(f);return f&&typeof c[0]=="string"&&It.call(c,"index")&&(g.index=c.index,g.input=c.input),g}function fQ(c){return typeof c.constructor=="function"&&!Pc(c)?Ja(hh(c)):{}}function lV(c,f,g){var b=c.constructor;switch(f){case xe:return Nw(c);case de:case Ce:return new b(+c);case Pe:return GZ(c,g);case ot:case $e:case ht:case Bt:case Et:case En:case Yt:case Kt:case OA:return XF(c,g);case R:return new b;case J:case X:return new b(c);case O:return YZ(c);case ie:return new b;case be:return qZ(c)}}function cV(c,f){var g=f.length;if(!g)return c;var b=g-1;return f[b]=(g>1?"& ":"")+f[b],f=f.join(g>2?", ":" "),c.replace(LA,`{
|
|
150
|
-
/* [wrapped with `+f+`] */
|
|
151
|
-
`)}function uV(c){return it(c)||zs(c)||!!(vF&&c&&c[vF])}function ji(c,f){var g=typeof c;return f=f??Q,!!f&&(g=="number"||g!="symbol"&&se.test(c))&&c>-1&&c%1==0&&c<f}function Cr(c,f,g){if(!rn(g))return!1;var b=typeof f;return(b=="number"?Mr(g)&&ji(f,g.length):b=="string"&&f in g)?$A(g[f],c):!1}function Ww(c,f){if(it(c))return!1;var g=typeof c;return g=="number"||g=="symbol"||g=="boolean"||c==null||Wr(c)?!0:Ra.test(c)||!Fc.test(c)||f!=null&&c in Pt(f)}function dV(c){var f=typeof c;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?c!=="__proto__":c===null}function Gw(c){var f=Uh(c),g=L[f];if(typeof g!="function"||!(f in yt.prototype))return!1;if(c===g)return!0;var b=$w(g);return!!b&&c===b[0]}function fV(c){return!!hF&&hF in c}var hV=lh?Zi:lB;function Pc(c){var f=c&&c.constructor,g=typeof f=="function"&&f.prototype||Ya;return c===g}function hQ(c){return c===c&&!rn(c)}function pQ(c,f){return function(g){return g==null?!1:g[c]===f&&(f!==n||c in Pt(g))}}function pV(c){var f=Rh(c,function(b){return g.size===u&&g.clear(),b}),g=f.cache;return f}function mV(c,f){var g=c[1],b=f[1],I=g|b,H=I<(y|w|M),Z=b==M&&g==k||b==M&&g==K&&c[7].length<=f[8]||b==(M|K)&&f[7].length<=f[8]&&g==k;if(!(H||Z))return c;b&y&&(c[2]=f[2],I|=g&y?0:C);var oe=f[3];if(oe){var fe=c[3];c[3]=fe?jF(fe,oe,f[4]):oe,c[4]=fe?zo(c[3],d):f[4]}return oe=f[5],oe&&(fe=c[5],c[5]=fe?ZF(fe,oe,f[6]):oe,c[6]=fe?zo(c[5],d):f[6]),oe=f[7],oe&&(c[7]=oe),b&M&&(c[8]=c[8]==null?f[8]:or(c[8],f[8])),c[9]==null&&(c[9]=f[9]),c[0]=f[0],c[1]=I,c}function gV(c){var f=[];if(c!=null)for(var g in Pt(c))f.push(g);return f}function vV(c){return uh.call(c)}function mQ(c,f,g){return f=In(f===n?c.length-1:f,0),function(){for(var b=arguments,I=-1,H=In(b.length-f,0),Z=ye(H);++I<H;)Z[I]=b[f+I];I=-1;for(var oe=ye(f+1);++I<f;)oe[I]=b[I];return oe[f]=g(Z),$r(c,this,oe)}}function gQ(c,f){return f.length<2?c:Ps(c,gA(f,0,-1))}function wV(c,f){for(var g=c.length,b=or(f.length,g),I=Tr(c);b--;){var H=f[b];c[b]=ji(H,g)?I[H]:n}return c}function Yw(c,f){if(!(f==="constructor"&&typeof c[f]=="function")&&f!="__proto__")return c[f]}var vQ=BQ(PF),$c=_9||function(c,f){return Xn.setTimeout(c,f)},qw=BQ($Z);function wQ(c,f,g){var b=f+"";return qw(c,cV(b,BV(sV(b),g)))}function BQ(c){var f=0,g=0;return function(){var b=L9(),I=Be-(b-g);if(g=b,I>0){if(++f>=ve)return arguments[0]}else f=0;return c.apply(n,arguments)}}function Dh(c,f){var g=-1,b=c.length,I=b-1;for(f=f===n?b:f;++g<f;){var H=Tw(g,I),Z=c[H];c[H]=c[g],c[g]=Z}return c.length=f,c}var yQ=pV(function(c){var f=[];return c.charCodeAt(0)===46&&f.push(""),c.replace(_s,function(g,b,I,H){f.push(I?H.replace(bt,"$1"):b||g)}),f});function Bi(c){if(typeof c=="string"||Wr(c))return c;var f=c+"";return f=="0"&&1/c==-x?"-0":f}function Ks(c){if(c!=null){try{return ch.call(c)}catch{}try{return c+""}catch{}}return""}function BV(c,f){return fA(ne,function(g){var b="_."+g[0];f&g[1]&&!ih(c,b)&&c.push(b)}),c.sort()}function CQ(c){if(c instanceof yt)return c.clone();var f=new pA(c.__wrapped__,c.__chain__);return f.__actions__=Tr(c.__actions__),f.__index__=c.__index__,f.__values__=c.__values__,f}function yV(c,f,g){(g?Cr(c,f,g):f===n)?f=1:f=In(at(f),0);var b=c==null?0:c.length;if(!b||f<1)return[];for(var I=0,H=0,Z=ye(gh(b/f));I<b;)Z[H++]=gA(c,I,I+=f);return Z}function CV(c){for(var f=-1,g=c==null?0:c.length,b=0,I=[];++f<g;){var H=c[f];H&&(I[b++]=H)}return I}function bV(){var c=arguments.length;if(!c)return[];for(var f=ye(c-1),g=arguments[0],b=c;b--;)f[b-1]=arguments[b];return Ko(it(g)?Tr(g):[g],Jn(f,1))}var EV=ut(function(c,f){return wn(c)?Oc(c,Jn(f,1,wn,!0)):[]}),kV=ut(function(c,f){var g=vA(f);return wn(g)&&(g=n),wn(c)?Oc(c,Jn(f,1,wn,!0),Je(g,2)):[]}),SV=ut(function(c,f){var g=vA(f);return wn(g)&&(g=n),wn(c)?Oc(c,Jn(f,1,wn,!0),n,g):[]});function xV(c,f,g){var b=c==null?0:c.length;return b?(f=g||f===n?1:at(f),gA(c,f<0?0:f,b)):[]}function FV(c,f,g){var b=c==null?0:c.length;return b?(f=g||f===n?1:at(f),f=b-f,gA(c,0,f<0?0:f)):[]}function QV(c,f){return c&&c.length?xh(c,Je(f,3),!0,!0):[]}function TV(c,f){return c&&c.length?xh(c,Je(f,3),!0):[]}function MV(c,f,g,b){var I=c==null?0:c.length;return I?(g&&typeof g!="number"&&Cr(c,f,g)&&(g=0,b=I),bZ(c,f,g,b)):[]}function bQ(c,f,g){var b=c==null?0:c.length;if(!b)return-1;var I=g==null?0:at(g);return I<0&&(I=In(b+I,0)),oh(c,Je(f,3),I)}function EQ(c,f,g){var b=c==null?0:c.length;if(!b)return-1;var I=b-1;return g!==n&&(I=at(g),I=g<0?In(b+I,0):or(I,b-1)),oh(c,Je(f,3),I,!0)}function kQ(c){var f=c==null?0:c.length;return f?Jn(c,1):[]}function IV(c){var f=c==null?0:c.length;return f?Jn(c,x):[]}function UV(c,f){var g=c==null?0:c.length;return g?(f=f===n?1:at(f),Jn(c,f)):[]}function _V(c){for(var f=-1,g=c==null?0:c.length,b={};++f<g;){var I=c[f];b[I[0]]=I[1]}return b}function SQ(c){return c&&c.length?c[0]:n}function DV(c,f,g){var b=c==null?0:c.length;if(!b)return-1;var I=g==null?0:at(g);return I<0&&(I=In(b+I,0)),Ka(c,f,I)}function OV(c){var f=c==null?0:c.length;return f?gA(c,0,-1):[]}var NV=ut(function(c){var f=Zt(c,Dw);return f.length&&f[0]===c[0]?kw(f):[]}),LV=ut(function(c){var f=vA(c),g=Zt(c,Dw);return f===vA(g)?f=n:g.pop(),g.length&&g[0]===c[0]?kw(g,Je(f,2)):[]}),RV=ut(function(c){var f=vA(c),g=Zt(c,Dw);return f=typeof f=="function"?f:n,f&&g.pop(),g.length&&g[0]===c[0]?kw(g,n,f):[]});function HV(c,f){return c==null?"":O9.call(c,f)}function vA(c){var f=c==null?0:c.length;return f?c[f-1]:n}function PV(c,f,g){var b=c==null?0:c.length;if(!b)return-1;var I=b;return g!==n&&(I=at(g),I=I<0?In(b+I,0):or(I,b-1)),f===f?B9(c,f,I):oh(c,oF,I,!0)}function $V(c,f){return c&&c.length?NF(c,at(f)):n}var KV=ut(xQ);function xQ(c,f){return c&&c.length&&f&&f.length?Qw(c,f):c}function zV(c,f,g){return c&&c.length&&f&&f.length?Qw(c,f,Je(g,2)):c}function WV(c,f,g){return c&&c.length&&f&&f.length?Qw(c,f,n,g):c}var GV=Ji(function(c,f){var g=c==null?0:c.length,b=yw(c,f);return HF(c,Zt(f,function(I){return ji(I,g)?+I:I}).sort(JF)),b});function YV(c,f){var g=[];if(!(c&&c.length))return g;var b=-1,I=[],H=c.length;for(f=Je(f,3);++b<H;){var Z=c[b];f(Z,b,c)&&(g.push(Z),I.push(b))}return HF(c,I),g}function Xw(c){return c==null?c:H9.call(c)}function qV(c,f,g){var b=c==null?0:c.length;return b?(g&&typeof g!="number"&&Cr(c,f,g)?(f=0,g=b):(f=f==null?0:at(f),g=g===n?b:at(g)),gA(c,f,g)):[]}function XV(c,f){return Sh(c,f)}function JV(c,f,g){return Iw(c,f,Je(g,2))}function jV(c,f){var g=c==null?0:c.length;if(g){var b=Sh(c,f);if(b<g&&$A(c[b],f))return b}return-1}function ZV(c,f){return Sh(c,f,!0)}function VV(c,f,g){return Iw(c,f,Je(g,2),!0)}function eee(c,f){var g=c==null?0:c.length;if(g){var b=Sh(c,f,!0)-1;if($A(c[b],f))return b}return-1}function tee(c){return c&&c.length?$F(c):[]}function nee(c,f){return c&&c.length?$F(c,Je(f,2)):[]}function ree(c){var f=c==null?0:c.length;return f?gA(c,1,f):[]}function Aee(c,f,g){return c&&c.length?(f=g||f===n?1:at(f),gA(c,0,f<0?0:f)):[]}function iee(c,f,g){var b=c==null?0:c.length;return b?(f=g||f===n?1:at(f),f=b-f,gA(c,f<0?0:f,b)):[]}function oee(c,f){return c&&c.length?xh(c,Je(f,3),!1,!0):[]}function see(c,f){return c&&c.length?xh(c,Je(f,3)):[]}var aee=ut(function(c){return Yo(Jn(c,1,wn,!0))}),lee=ut(function(c){var f=vA(c);return wn(f)&&(f=n),Yo(Jn(c,1,wn,!0),Je(f,2))}),cee=ut(function(c){var f=vA(c);return f=typeof f=="function"?f:n,Yo(Jn(c,1,wn,!0),n,f)});function uee(c){return c&&c.length?Yo(c):[]}function dee(c,f){return c&&c.length?Yo(c,Je(f,2)):[]}function fee(c,f){return f=typeof f=="function"?f:n,c&&c.length?Yo(c,n,f):[]}function Jw(c){if(!(c&&c.length))return[];var f=0;return c=$o(c,function(g){if(wn(g))return f=In(g.length,f),!0}),fw(f,function(g){return Zt(c,cw(g))})}function FQ(c,f){if(!(c&&c.length))return[];var g=Jw(c);return f==null?g:Zt(g,function(b){return $r(f,n,b)})}var hee=ut(function(c,f){return wn(c)?Oc(c,f):[]}),pee=ut(function(c){return _w($o(c,wn))}),mee=ut(function(c){var f=vA(c);return wn(f)&&(f=n),_w($o(c,wn),Je(f,2))}),gee=ut(function(c){var f=vA(c);return f=typeof f=="function"?f:n,_w($o(c,wn),n,f)}),vee=ut(Jw);function wee(c,f){return GF(c||[],f||[],Dc)}function Bee(c,f){return GF(c||[],f||[],Rc)}var yee=ut(function(c){var f=c.length,g=f>1?c[f-1]:n;return g=typeof g=="function"?(c.pop(),g):n,FQ(c,g)});function QQ(c){var f=L(c);return f.__chain__=!0,f}function Cee(c,f){return f(c),c}function Oh(c,f){return f(c)}var bee=Ji(function(c){var f=c.length,g=f?c[0]:0,b=this.__wrapped__,I=function(H){return yw(H,c)};return f>1||this.__actions__.length||!(b instanceof yt)||!ji(g)?this.thru(I):(b=b.slice(g,+g+(f?1:0)),b.__actions__.push({func:Oh,args:[I],thisArg:n}),new pA(b,this.__chain__).thru(function(H){return f&&!H.length&&H.push(n),H}))});function Eee(){return QQ(this)}function kee(){return new pA(this.value(),this.__chain__)}function See(){this.__values__===n&&(this.__values__=KQ(this.value()));var c=this.__index__>=this.__values__.length,f=c?n:this.__values__[this.__index__++];return{done:c,value:f}}function xee(){return this}function Fee(c){for(var f,g=this;g instanceof yh;){var b=CQ(g);b.__index__=0,b.__values__=n,f?I.__wrapped__=b:f=b;var I=b;g=g.__wrapped__}return I.__wrapped__=c,f}function Qee(){var c=this.__wrapped__;if(c instanceof yt){var f=c;return this.__actions__.length&&(f=new yt(this)),f=f.reverse(),f.__actions__.push({func:Oh,args:[Xw],thisArg:n}),new pA(f,this.__chain__)}return this.thru(Xw)}function Tee(){return WF(this.__wrapped__,this.__actions__)}var Mee=Fh(function(c,f,g){It.call(c,g)?++c[g]:qi(c,g,1)});function Iee(c,f,g){var b=it(c)?AF:CZ;return g&&Cr(c,f,g)&&(f=n),b(c,Je(f,3))}function Uee(c,f){var g=it(c)?$o:FF;return g(c,Je(f,3))}var _ee=nQ(bQ),Dee=nQ(EQ);function Oee(c,f){return Jn(Nh(c,f),1)}function Nee(c,f){return Jn(Nh(c,f),x)}function Lee(c,f,g){return g=g===n?1:at(g),Jn(Nh(c,f),g)}function TQ(c,f){var g=it(c)?fA:Go;return g(c,Je(f,3))}function MQ(c,f){var g=it(c)?r9:xF;return g(c,Je(f,3))}var Ree=Fh(function(c,f,g){It.call(c,g)?c[g].push(f):qi(c,g,[f])});function Hee(c,f,g,b){c=Mr(c)?c:tl(c),g=g&&!b?at(g):0;var I=c.length;return g<0&&(g=In(I+g,0)),$h(c)?g<=I&&c.indexOf(f,g)>-1:!!I&&Ka(c,f,g)>-1}var Pee=ut(function(c,f,g){var b=-1,I=typeof f=="function",H=Mr(c)?ye(c.length):[];return Go(c,function(Z){H[++b]=I?$r(f,Z,g):Nc(Z,f,g)}),H}),$ee=Fh(function(c,f,g){qi(c,g,f)});function Nh(c,f){var g=it(c)?Zt:_F;return g(c,Je(f,3))}function Kee(c,f,g,b){return c==null?[]:(it(f)||(f=f==null?[]:[f]),g=b?n:g,it(g)||(g=g==null?[]:[g]),LF(c,f,g))}var zee=Fh(function(c,f,g){c[g?0:1].push(f)},function(){return[[],[]]});function Wee(c,f,g){var b=it(c)?aw:aF,I=arguments.length<3;return b(c,Je(f,4),g,I,Go)}function Gee(c,f,g){var b=it(c)?A9:aF,I=arguments.length<3;return b(c,Je(f,4),g,I,xF)}function Yee(c,f){var g=it(c)?$o:FF;return g(c,Hh(Je(f,3)))}function qee(c){var f=it(c)?bF:HZ;return f(c)}function Xee(c,f,g){(g?Cr(c,f,g):f===n)?f=1:f=at(f);var b=it(c)?gZ:PZ;return b(c,f)}function Jee(c){var f=it(c)?vZ:KZ;return f(c)}function jee(c){if(c==null)return 0;if(Mr(c))return $h(c)?Wa(c):c.length;var f=sr(c);return f==R||f==ie?c.size:xw(c).length}function Zee(c,f,g){var b=it(c)?lw:zZ;return g&&Cr(c,f,g)&&(f=n),b(c,Je(f,3))}var Vee=ut(function(c,f){if(c==null)return[];var g=f.length;return g>1&&Cr(c,f[0],f[1])?f=[]:g>2&&Cr(f[0],f[1],f[2])&&(f=[f[0]]),LF(c,Jn(f,1),[])}),Lh=U9||function(){return Xn.Date.now()};function ete(c,f){if(typeof f!="function")throw new hA(o);return c=at(c),function(){if(--c<1)return f.apply(this,arguments)}}function IQ(c,f,g){return f=g?n:f,f=c&&f==null?c.length:f,Xi(c,M,n,n,n,n,f)}function UQ(c,f){var g;if(typeof f!="function")throw new hA(o);return c=at(c),function(){return--c>0&&(g=f.apply(this,arguments)),c<=1&&(f=n),g}}var jw=ut(function(c,f,g){var b=y;if(g.length){var I=zo(g,Va(jw));b|=U}return Xi(c,b,f,g,I)}),_Q=ut(function(c,f,g){var b=y|w;if(g.length){var I=zo(g,Va(_Q));b|=U}return Xi(f,b,c,g,I)});function DQ(c,f,g){f=g?n:f;var b=Xi(c,k,n,n,n,n,n,f);return b.placeholder=DQ.placeholder,b}function OQ(c,f,g){f=g?n:f;var b=Xi(c,F,n,n,n,n,n,f);return b.placeholder=OQ.placeholder,b}function NQ(c,f,g){var b,I,H,Z,oe,fe,ke=0,Se=!1,Fe=!1,Ue=!0;if(typeof c!="function")throw new hA(o);f=wA(f)||0,rn(g)&&(Se=!!g.leading,Fe="maxWait"in g,H=Fe?In(wA(g.maxWait)||0,f):H,Ue="trailing"in g?!!g.trailing:Ue);function Ke(Bn){var KA=b,eo=I;return b=I=n,ke=Bn,Z=c.apply(eo,KA),Z}function je(Bn){return ke=Bn,oe=$c(mt,f),Se?Ke(Bn):Z}function ct(Bn){var KA=Bn-fe,eo=Bn-ke,nT=f-KA;return Fe?or(nT,H-eo):nT}function Ze(Bn){var KA=Bn-fe,eo=Bn-ke;return fe===n||KA>=f||KA<0||Fe&&eo>=H}function mt(){var Bn=Lh();if(Ze(Bn))return Ct(Bn);oe=$c(mt,ct(Bn))}function Ct(Bn){return oe=n,Ue&&b?Ke(Bn):(b=I=n,Z)}function Gr(){oe!==n&&YF(oe),ke=0,b=fe=I=oe=n}function br(){return oe===n?Z:Ct(Lh())}function Yr(){var Bn=Lh(),KA=Ze(Bn);if(b=arguments,I=this,fe=Bn,KA){if(oe===n)return je(fe);if(Fe)return YF(oe),oe=$c(mt,f),Ke(fe)}return oe===n&&(oe=$c(mt,f)),Z}return Yr.cancel=Gr,Yr.flush=br,Yr}var tte=ut(function(c,f){return SF(c,1,f)}),nte=ut(function(c,f,g){return SF(c,wA(f)||0,g)});function rte(c){return Xi(c,q)}function Rh(c,f){if(typeof c!="function"||f!=null&&typeof f!="function")throw new hA(o);var g=function(){var b=arguments,I=f?f.apply(this,b):b[0],H=g.cache;if(H.has(I))return H.get(I);var Z=c.apply(this,b);return g.cache=H.set(I,Z)||H,Z};return g.cache=new(Rh.Cache||Yi),g}Rh.Cache=Yi;function Hh(c){if(typeof c!="function")throw new hA(o);return function(){var f=arguments;switch(f.length){case 0:return!c.call(this);case 1:return!c.call(this,f[0]);case 2:return!c.call(this,f[0],f[1]);case 3:return!c.call(this,f[0],f[1],f[2])}return!c.apply(this,f)}}function Ate(c){return UQ(2,c)}var ite=WZ(function(c,f){f=f.length==1&&it(f[0])?Zt(f[0],Kr(Je())):Zt(Jn(f,1),Kr(Je()));var g=f.length;return ut(function(b){for(var I=-1,H=or(b.length,g);++I<H;)b[I]=f[I].call(this,b[I]);return $r(c,this,b)})}),Zw=ut(function(c,f){var g=zo(f,Va(Zw));return Xi(c,U,n,f,g)}),LQ=ut(function(c,f){var g=zo(f,Va(LQ));return Xi(c,D,n,f,g)}),ote=Ji(function(c,f){return Xi(c,K,n,n,n,f)});function ste(c,f){if(typeof c!="function")throw new hA(o);return f=f===n?f:at(f),ut(c,f)}function ate(c,f){if(typeof c!="function")throw new hA(o);return f=f==null?0:In(at(f),0),ut(function(g){var b=g[f],I=Xo(g,0,f);return b&&Ko(I,b),$r(c,this,I)})}function lte(c,f,g){var b=!0,I=!0;if(typeof c!="function")throw new hA(o);return rn(g)&&(b="leading"in g?!!g.leading:b,I="trailing"in g?!!g.trailing:I),NQ(c,f,{leading:b,maxWait:f,trailing:I})}function cte(c){return IQ(c,1)}function ute(c,f){return Zw(Ow(f),c)}function dte(){if(!arguments.length)return[];var c=arguments[0];return it(c)?c:[c]}function fte(c){return mA(c,m)}function hte(c,f){return f=typeof f=="function"?f:n,mA(c,m,f)}function pte(c){return mA(c,h|m)}function mte(c,f){return f=typeof f=="function"?f:n,mA(c,h|m,f)}function gte(c,f){return f==null||kF(c,f,Hn(f))}function $A(c,f){return c===f||c!==c&&f!==f}var vte=Ih(Ew),wte=Ih(function(c,f){return c>=f}),zs=MF((function(){return arguments})())?MF:function(c){return cn(c)&&It.call(c,"callee")&&!gF.call(c,"callee")},it=ye.isArray,Bte=Zx?Kr(Zx):FZ;function Mr(c){return c!=null&&Ph(c.length)&&!Zi(c)}function wn(c){return cn(c)&&Mr(c)}function yte(c){return c===!0||c===!1||cn(c)&&yr(c)==de}var Jo=D9||lB,Cte=Vx?Kr(Vx):QZ;function bte(c){return cn(c)&&c.nodeType===1&&!Kc(c)}function Ete(c){if(c==null)return!0;if(Mr(c)&&(it(c)||typeof c=="string"||typeof c.splice=="function"||Jo(c)||el(c)||zs(c)))return!c.length;var f=sr(c);if(f==R||f==ie)return!c.size;if(Pc(c))return!xw(c).length;for(var g in c)if(It.call(c,g))return!1;return!0}function kte(c,f){return Lc(c,f)}function Ste(c,f,g){g=typeof g=="function"?g:n;var b=g?g(c,f):n;return b===n?Lc(c,f,n,g):!!b}function Vw(c){if(!cn(c))return!1;var f=yr(c);return f==j||f==W||typeof c.message=="string"&&typeof c.name=="string"&&!Kc(c)}function xte(c){return typeof c=="number"&&wF(c)}function Zi(c){if(!rn(c))return!1;var f=yr(c);return f==$||f==N||f==pe||f==_}function RQ(c){return typeof c=="number"&&c==at(c)}function Ph(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=Q}function rn(c){var f=typeof c;return c!=null&&(f=="object"||f=="function")}function cn(c){return c!=null&&typeof c=="object"}var HQ=eF?Kr(eF):MZ;function Fte(c,f){return c===f||Sw(c,f,Kw(f))}function Qte(c,f,g){return g=typeof g=="function"?g:n,Sw(c,f,Kw(f),g)}function Tte(c){return PQ(c)&&c!=+c}function Mte(c){if(hV(c))throw new rt(i);return IF(c)}function Ite(c){return c===null}function Ute(c){return c==null}function PQ(c){return typeof c=="number"||cn(c)&&yr(c)==J}function Kc(c){if(!cn(c)||yr(c)!=le)return!1;var f=hh(c);if(f===null)return!0;var g=It.call(f,"constructor")&&f.constructor;return typeof g=="function"&&g instanceof g&&ch.call(g)==Q9}var eB=tF?Kr(tF):IZ;function _te(c){return RQ(c)&&c>=-Q&&c<=Q}var $Q=nF?Kr(nF):UZ;function $h(c){return typeof c=="string"||!it(c)&&cn(c)&&yr(c)==X}function Wr(c){return typeof c=="symbol"||cn(c)&&yr(c)==be}var el=rF?Kr(rF):_Z;function Dte(c){return c===n}function Ote(c){return cn(c)&&sr(c)==ae}function Nte(c){return cn(c)&&yr(c)==he}var Lte=Ih(Fw),Rte=Ih(function(c,f){return c<=f});function KQ(c){if(!c)return[];if(Mr(c))return $h(c)?HA(c):Tr(c);if(Tc&&c[Tc])return g9(c[Tc]());var f=sr(c),g=f==R?pw:f==ie?sh:tl;return g(c)}function Vi(c){if(!c)return c===0?c:0;if(c=wA(c),c===x||c===-x){var f=c<0?-1:1;return f*P}return c===c?c:0}function at(c){var f=Vi(c),g=f%1;return f===f?g?f-g:f:0}function zQ(c){return c?Hs(at(c),0,S):0}function wA(c){if(typeof c=="number")return c;if(Wr(c))return T;if(rn(c)){var f=typeof c.valueOf=="function"?c.valueOf():c;c=rn(f)?f+"":f}if(typeof c!="string")return c===0?c:+c;c=lF(c);var g=Ki.test(c);return g||Re.test(c)?e9(c.slice(2),g?2:8):gi.test(c)?T:+c}function WQ(c){return wi(c,Ir(c))}function Hte(c){return c?Hs(at(c),-Q,Q):c===0?c:0}function Ut(c){return c==null?"":zr(c)}var Pte=ja(function(c,f){if(Pc(f)||Mr(f)){wi(f,Hn(f),c);return}for(var g in f)It.call(f,g)&&Dc(c,g,f[g])}),GQ=ja(function(c,f){wi(f,Ir(f),c)}),Kh=ja(function(c,f,g,b){wi(f,Ir(f),c,b)}),$te=ja(function(c,f,g,b){wi(f,Hn(f),c,b)}),Kte=Ji(yw);function zte(c,f){var g=Ja(c);return f==null?g:EF(g,f)}var Wte=ut(function(c,f){c=Pt(c);var g=-1,b=f.length,I=b>2?f[2]:n;for(I&&Cr(f[0],f[1],I)&&(b=1);++g<b;)for(var H=f[g],Z=Ir(H),oe=-1,fe=Z.length;++oe<fe;){var ke=Z[oe],Se=c[ke];(Se===n||$A(Se,Ya[ke])&&!It.call(c,ke))&&(c[ke]=H[ke])}return c}),Gte=ut(function(c){return c.push(n,lQ),$r(YQ,n,c)});function Yte(c,f){return iF(c,Je(f,3),vi)}function qte(c,f){return iF(c,Je(f,3),bw)}function Xte(c,f){return c==null?c:Cw(c,Je(f,3),Ir)}function Jte(c,f){return c==null?c:QF(c,Je(f,3),Ir)}function jte(c,f){return c&&vi(c,Je(f,3))}function Zte(c,f){return c&&bw(c,Je(f,3))}function Vte(c){return c==null?[]:Eh(c,Hn(c))}function ene(c){return c==null?[]:Eh(c,Ir(c))}function tB(c,f,g){var b=c==null?n:Ps(c,f);return b===n?g:b}function tne(c,f){return c!=null&&dQ(c,f,EZ)}function nB(c,f){return c!=null&&dQ(c,f,kZ)}var nne=AQ(function(c,f,g){f!=null&&typeof f.toString!="function"&&(f=uh.call(f)),c[f]=g},AB(Ur)),rne=AQ(function(c,f,g){f!=null&&typeof f.toString!="function"&&(f=uh.call(f)),It.call(c,f)?c[f].push(g):c[f]=[g]},Je),Ane=ut(Nc);function Hn(c){return Mr(c)?CF(c):xw(c)}function Ir(c){return Mr(c)?CF(c,!0):DZ(c)}function ine(c,f){var g={};return f=Je(f,3),vi(c,function(b,I,H){qi(g,f(b,I,H),b)}),g}function one(c,f){var g={};return f=Je(f,3),vi(c,function(b,I,H){qi(g,I,f(b,I,H))}),g}var sne=ja(function(c,f,g){kh(c,f,g)}),YQ=ja(function(c,f,g,b){kh(c,f,g,b)}),ane=Ji(function(c,f){var g={};if(c==null)return g;var b=!1;f=Zt(f,function(H){return H=qo(H,c),b||(b=H.length>1),H}),wi(c,Pw(c),g),b&&(g=mA(g,h|p|m,nV));for(var I=f.length;I--;)Uw(g,f[I]);return g});function lne(c,f){return qQ(c,Hh(Je(f)))}var cne=Ji(function(c,f){return c==null?{}:NZ(c,f)});function qQ(c,f){if(c==null)return{};var g=Zt(Pw(c),function(b){return[b]});return f=Je(f),RF(c,g,function(b,I){return f(b,I[0])})}function une(c,f,g){f=qo(f,c);var b=-1,I=f.length;for(I||(I=1,c=n);++b<I;){var H=c==null?n:c[Bi(f[b])];H===n&&(b=I,H=g),c=Zi(H)?H.call(c):H}return c}function dne(c,f,g){return c==null?c:Rc(c,f,g)}function fne(c,f,g,b){return b=typeof b=="function"?b:n,c==null?c:Rc(c,f,g,b)}var XQ=sQ(Hn),JQ=sQ(Ir);function hne(c,f,g){var b=it(c),I=b||Jo(c)||el(c);if(f=Je(f,4),g==null){var H=c&&c.constructor;I?g=b?new H:[]:rn(c)?g=Zi(H)?Ja(hh(c)):{}:g={}}return(I?fA:vi)(c,function(Z,oe,fe){return f(g,Z,oe,fe)}),g}function pne(c,f){return c==null?!0:Uw(c,f)}function mne(c,f,g){return c==null?c:zF(c,f,Ow(g))}function gne(c,f,g,b){return b=typeof b=="function"?b:n,c==null?c:zF(c,f,Ow(g),b)}function tl(c){return c==null?[]:hw(c,Hn(c))}function vne(c){return c==null?[]:hw(c,Ir(c))}function wne(c,f,g){return g===n&&(g=f,f=n),g!==n&&(g=wA(g),g=g===g?g:0),f!==n&&(f=wA(f),f=f===f?f:0),Hs(wA(c),f,g)}function Bne(c,f,g){return f=Vi(f),g===n?(g=f,f=0):g=Vi(g),c=wA(c),SZ(c,f,g)}function yne(c,f,g){if(g&&typeof g!="boolean"&&Cr(c,f,g)&&(f=g=n),g===n&&(typeof f=="boolean"?(g=f,f=n):typeof c=="boolean"&&(g=c,c=n)),c===n&&f===n?(c=0,f=1):(c=Vi(c),f===n?(f=c,c=0):f=Vi(f)),c>f){var b=c;c=f,f=b}if(g||c%1||f%1){var I=BF();return or(c+I*(f-c+Vj("1e-"+((I+"").length-1))),f)}return Tw(c,f)}var Cne=Za(function(c,f,g){return f=f.toLowerCase(),c+(g?jQ(f):f)});function jQ(c){return rB(Ut(c).toLowerCase())}function ZQ(c){return c=Ut(c),c&&c.replace(Te,d9).replace(Kj,"")}function bne(c,f,g){c=Ut(c),f=zr(f);var b=c.length;g=g===n?b:Hs(at(g),0,b);var I=g;return g-=f.length,g>=0&&c.slice(g,I)==f}function Ene(c){return c=Ut(c),c&&Ho.test(c)?c.replace(mi,f9):c}function kne(c){return c=Ut(c),c&&Ha.test(c)?c.replace(Po,"\\$&"):c}var Sne=Za(function(c,f,g){return c+(g?"-":"")+f.toLowerCase()}),xne=Za(function(c,f,g){return c+(g?" ":"")+f.toLowerCase()}),Fne=tQ("toLowerCase");function Qne(c,f,g){c=Ut(c),f=at(f);var b=f?Wa(c):0;if(!f||b>=f)return c;var I=(f-b)/2;return Mh(vh(I),g)+c+Mh(gh(I),g)}function Tne(c,f,g){c=Ut(c),f=at(f);var b=f?Wa(c):0;return f&&b<f?c+Mh(f-b,g):c}function Mne(c,f,g){c=Ut(c),f=at(f);var b=f?Wa(c):0;return f&&b<f?Mh(f-b,g)+c:c}function Ine(c,f,g){return g||f==null?f=0:f&&(f=+f),R9(Ut(c).replace(Ds,""),f||0)}function Une(c,f,g){return(g?Cr(c,f,g):f===n)?f=1:f=at(f),Mw(Ut(c),f)}function _ne(){var c=arguments,f=Ut(c[0]);return c.length<3?f:f.replace(c[1],c[2])}var Dne=Za(function(c,f,g){return c+(g?"_":"")+f.toLowerCase()});function One(c,f,g){return g&&typeof g!="number"&&Cr(c,f,g)&&(f=g=n),g=g===n?S:g>>>0,g?(c=Ut(c),c&&(typeof f=="string"||f!=null&&!eB(f))&&(f=zr(f),!f&&za(c))?Xo(HA(c),0,g):c.split(f,g)):[]}var Nne=Za(function(c,f,g){return c+(g?" ":"")+rB(f)});function Lne(c,f,g){return c=Ut(c),g=g==null?0:Hs(at(g),0,c.length),f=zr(f),c.slice(g,g+f.length)==f}function Rne(c,f,g){var b=L.templateSettings;g&&Cr(c,f,g)&&(f=n),c=Ut(c),f=Kh({},f,b,aQ);var I=Kh({},f.imports,b.imports,aQ),H=Hn(I),Z=hw(I,H),oe,fe,ke=0,Se=f.interpolate||He,Fe="__p += '",Ue=mw((f.escape||He).source+"|"+Se.source+"|"+(Se===NA?Pr:He).source+"|"+(f.evaluate||He).source+"|$","g"),Ke="//# sourceURL="+(It.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++qj+"]")+`
|
|
152
|
-
`;c.replace(Ue,function(Ze,mt,Ct,Gr,br,Yr){return Ct||(Ct=Gr),Fe+=c.slice(ke,Yr).replace(zt,h9),mt&&(oe=!0,Fe+=`' +
|
|
153
|
-
__e(`+mt+`) +
|
|
154
|
-
'`),br&&(fe=!0,Fe+=`';
|
|
155
|
-
`+br+`;
|
|
156
|
-
__p += '`),Ct&&(Fe+=`' +
|
|
157
|
-
((__t = (`+Ct+`)) == null ? '' : __t) +
|
|
158
|
-
'`),ke=Yr+Ze.length,Ze}),Fe+=`';
|
|
159
|
-
`;var je=It.call(f,"variable")&&f.variable;if(!je)Fe=`with (obj) {
|
|
160
|
-
`+Fe+`
|
|
161
|
-
}
|
|
162
|
-
`;else if(At.test(je))throw new rt(a);Fe=(fe?Fe.replace(pi,""):Fe).replace(ze,"$1").replace(gn,"$1;"),Fe="function("+(je||"obj")+`) {
|
|
163
|
-
`+(je?"":`obj || (obj = {});
|
|
164
|
-
`)+"var __t, __p = ''"+(oe?", __e = _.escape":"")+(fe?`, __j = Array.prototype.join;
|
|
165
|
-
function print() { __p += __j.call(arguments, '') }
|
|
166
|
-
`:`;
|
|
167
|
-
`)+Fe+`return __p
|
|
168
|
-
}`;var ct=eT(function(){return Tt(H,Ke+"return "+Fe).apply(n,Z)});if(ct.source=Fe,Vw(ct))throw ct;return ct}function Hne(c){return Ut(c).toLowerCase()}function Pne(c){return Ut(c).toUpperCase()}function $ne(c,f,g){if(c=Ut(c),c&&(g||f===n))return lF(c);if(!c||!(f=zr(f)))return c;var b=HA(c),I=HA(f),H=cF(b,I),Z=uF(b,I)+1;return Xo(b,H,Z).join("")}function Kne(c,f,g){if(c=Ut(c),c&&(g||f===n))return c.slice(0,fF(c)+1);if(!c||!(f=zr(f)))return c;var b=HA(c),I=uF(b,HA(f))+1;return Xo(b,0,I).join("")}function zne(c,f,g){if(c=Ut(c),c&&(g||f===n))return c.replace(Ds,"");if(!c||!(f=zr(f)))return c;var b=HA(c),I=cF(b,HA(f));return Xo(b,I).join("")}function Wne(c,f){var g=ce,b=me;if(rn(f)){var I="separator"in f?f.separator:I;g="length"in f?at(f.length):g,b="omission"in f?zr(f.omission):b}c=Ut(c);var H=c.length;if(za(c)){var Z=HA(c);H=Z.length}if(g>=H)return c;var oe=g-Wa(b);if(oe<1)return b;var fe=Z?Xo(Z,0,oe).join(""):c.slice(0,oe);if(I===n)return fe+b;if(Z&&(oe+=fe.length-oe),eB(I)){if(c.slice(oe).search(I)){var ke,Se=fe;for(I.global||(I=mw(I.source,Ut(uA.exec(I))+"g")),I.lastIndex=0;ke=I.exec(Se);)var Fe=ke.index;fe=fe.slice(0,Fe===n?oe:Fe)}}else if(c.indexOf(zr(I),oe)!=oe){var Ue=fe.lastIndexOf(I);Ue>-1&&(fe=fe.slice(0,Ue))}return fe+b}function Gne(c){return c=Ut(c),c&&Br.test(c)?c.replace(Tn,y9):c}var Yne=Za(function(c,f,g){return c+(g?" ":"")+f.toUpperCase()}),rB=tQ("toUpperCase");function VQ(c,f,g){return c=Ut(c),f=g?n:f,f===n?m9(c)?E9(c):s9(c):c.match(f)||[]}var eT=ut(function(c,f){try{return $r(c,n,f)}catch(g){return Vw(g)?g:new rt(g)}}),qne=Ji(function(c,f){return fA(f,function(g){g=Bi(g),qi(c,g,jw(c[g],c))}),c});function Xne(c){var f=c==null?0:c.length,g=Je();return c=f?Zt(c,function(b){if(typeof b[1]!="function")throw new hA(o);return[g(b[0]),b[1]]}):[],ut(function(b){for(var I=-1;++I<f;){var H=c[I];if($r(H[0],this,b))return $r(H[1],this,b)}})}function Jne(c){return yZ(mA(c,h))}function AB(c){return function(){return c}}function jne(c,f){return c==null||c!==c?f:c}var Zne=rQ(),Vne=rQ(!0);function Ur(c){return c}function iB(c){return UF(typeof c=="function"?c:mA(c,h))}function ere(c){return DF(mA(c,h))}function tre(c,f){return OF(c,mA(f,h))}var nre=ut(function(c,f){return function(g){return Nc(g,c,f)}}),rre=ut(function(c,f){return function(g){return Nc(c,g,f)}});function oB(c,f,g){var b=Hn(f),I=Eh(f,b);g==null&&!(rn(f)&&(I.length||!b.length))&&(g=f,f=c,c=this,I=Eh(f,Hn(f)));var H=!(rn(g)&&"chain"in g)||!!g.chain,Z=Zi(c);return fA(I,function(oe){var fe=f[oe];c[oe]=fe,Z&&(c.prototype[oe]=function(){var ke=this.__chain__;if(H||ke){var Se=c(this.__wrapped__),Fe=Se.__actions__=Tr(this.__actions__);return Fe.push({func:fe,args:arguments,thisArg:c}),Se.__chain__=ke,Se}return fe.apply(c,Ko([this.value()],arguments))})}),c}function Are(){return Xn._===this&&(Xn._=T9),this}function sB(){}function ire(c){return c=at(c),ut(function(f){return NF(f,c)})}var ore=Lw(Zt),sre=Lw(AF),are=Lw(lw);function tT(c){return Ww(c)?cw(Bi(c)):LZ(c)}function lre(c){return function(f){return c==null?n:Ps(c,f)}}var cre=iQ(),ure=iQ(!0);function aB(){return[]}function lB(){return!1}function dre(){return{}}function fre(){return""}function hre(){return!0}function pre(c,f){if(c=at(c),c<1||c>Q)return[];var g=S,b=or(c,S);f=Je(f),c-=S;for(var I=fw(b,f);++g<c;)f(g);return I}function mre(c){return it(c)?Zt(c,Bi):Wr(c)?[c]:Tr(yQ(Ut(c)))}function gre(c){var f=++F9;return Ut(c)+f}var vre=Th(function(c,f){return c+f},0),wre=Rw("ceil"),Bre=Th(function(c,f){return c/f},1),yre=Rw("floor");function Cre(c){return c&&c.length?bh(c,Ur,Ew):n}function bre(c,f){return c&&c.length?bh(c,Je(f,2),Ew):n}function Ere(c){return sF(c,Ur)}function kre(c,f){return sF(c,Je(f,2))}function Sre(c){return c&&c.length?bh(c,Ur,Fw):n}function xre(c,f){return c&&c.length?bh(c,Je(f,2),Fw):n}var Fre=Th(function(c,f){return c*f},1),Qre=Rw("round"),Tre=Th(function(c,f){return c-f},0);function Mre(c){return c&&c.length?dw(c,Ur):0}function Ire(c,f){return c&&c.length?dw(c,Je(f,2)):0}return L.after=ete,L.ary=IQ,L.assign=Pte,L.assignIn=GQ,L.assignInWith=Kh,L.assignWith=$te,L.at=Kte,L.before=UQ,L.bind=jw,L.bindAll=qne,L.bindKey=_Q,L.castArray=dte,L.chain=QQ,L.chunk=yV,L.compact=CV,L.concat=bV,L.cond=Xne,L.conforms=Jne,L.constant=AB,L.countBy=Mee,L.create=zte,L.curry=DQ,L.curryRight=OQ,L.debounce=NQ,L.defaults=Wte,L.defaultsDeep=Gte,L.defer=tte,L.delay=nte,L.difference=EV,L.differenceBy=kV,L.differenceWith=SV,L.drop=xV,L.dropRight=FV,L.dropRightWhile=QV,L.dropWhile=TV,L.fill=MV,L.filter=Uee,L.flatMap=Oee,L.flatMapDeep=Nee,L.flatMapDepth=Lee,L.flatten=kQ,L.flattenDeep=IV,L.flattenDepth=UV,L.flip=rte,L.flow=Zne,L.flowRight=Vne,L.fromPairs=_V,L.functions=Vte,L.functionsIn=ene,L.groupBy=Ree,L.initial=OV,L.intersection=NV,L.intersectionBy=LV,L.intersectionWith=RV,L.invert=nne,L.invertBy=rne,L.invokeMap=Pee,L.iteratee=iB,L.keyBy=$ee,L.keys=Hn,L.keysIn=Ir,L.map=Nh,L.mapKeys=ine,L.mapValues=one,L.matches=ere,L.matchesProperty=tre,L.memoize=Rh,L.merge=sne,L.mergeWith=YQ,L.method=nre,L.methodOf=rre,L.mixin=oB,L.negate=Hh,L.nthArg=ire,L.omit=ane,L.omitBy=lne,L.once=Ate,L.orderBy=Kee,L.over=ore,L.overArgs=ite,L.overEvery=sre,L.overSome=are,L.partial=Zw,L.partialRight=LQ,L.partition=zee,L.pick=cne,L.pickBy=qQ,L.property=tT,L.propertyOf=lre,L.pull=KV,L.pullAll=xQ,L.pullAllBy=zV,L.pullAllWith=WV,L.pullAt=GV,L.range=cre,L.rangeRight=ure,L.rearg=ote,L.reject=Yee,L.remove=YV,L.rest=ste,L.reverse=Xw,L.sampleSize=Xee,L.set=dne,L.setWith=fne,L.shuffle=Jee,L.slice=qV,L.sortBy=Vee,L.sortedUniq=tee,L.sortedUniqBy=nee,L.split=One,L.spread=ate,L.tail=ree,L.take=Aee,L.takeRight=iee,L.takeRightWhile=oee,L.takeWhile=see,L.tap=Cee,L.throttle=lte,L.thru=Oh,L.toArray=KQ,L.toPairs=XQ,L.toPairsIn=JQ,L.toPath=mre,L.toPlainObject=WQ,L.transform=hne,L.unary=cte,L.union=aee,L.unionBy=lee,L.unionWith=cee,L.uniq=uee,L.uniqBy=dee,L.uniqWith=fee,L.unset=pne,L.unzip=Jw,L.unzipWith=FQ,L.update=mne,L.updateWith=gne,L.values=tl,L.valuesIn=vne,L.without=hee,L.words=VQ,L.wrap=ute,L.xor=pee,L.xorBy=mee,L.xorWith=gee,L.zip=vee,L.zipObject=wee,L.zipObjectDeep=Bee,L.zipWith=yee,L.entries=XQ,L.entriesIn=JQ,L.extend=GQ,L.extendWith=Kh,oB(L,L),L.add=vre,L.attempt=eT,L.camelCase=Cne,L.capitalize=jQ,L.ceil=wre,L.clamp=wne,L.clone=fte,L.cloneDeep=pte,L.cloneDeepWith=mte,L.cloneWith=hte,L.conformsTo=gte,L.deburr=ZQ,L.defaultTo=jne,L.divide=Bre,L.endsWith=bne,L.eq=$A,L.escape=Ene,L.escapeRegExp=kne,L.every=Iee,L.find=_ee,L.findIndex=bQ,L.findKey=Yte,L.findLast=Dee,L.findLastIndex=EQ,L.findLastKey=qte,L.floor=yre,L.forEach=TQ,L.forEachRight=MQ,L.forIn=Xte,L.forInRight=Jte,L.forOwn=jte,L.forOwnRight=Zte,L.get=tB,L.gt=vte,L.gte=wte,L.has=tne,L.hasIn=nB,L.head=SQ,L.identity=Ur,L.includes=Hee,L.indexOf=DV,L.inRange=Bne,L.invoke=Ane,L.isArguments=zs,L.isArray=it,L.isArrayBuffer=Bte,L.isArrayLike=Mr,L.isArrayLikeObject=wn,L.isBoolean=yte,L.isBuffer=Jo,L.isDate=Cte,L.isElement=bte,L.isEmpty=Ete,L.isEqual=kte,L.isEqualWith=Ste,L.isError=Vw,L.isFinite=xte,L.isFunction=Zi,L.isInteger=RQ,L.isLength=Ph,L.isMap=HQ,L.isMatch=Fte,L.isMatchWith=Qte,L.isNaN=Tte,L.isNative=Mte,L.isNil=Ute,L.isNull=Ite,L.isNumber=PQ,L.isObject=rn,L.isObjectLike=cn,L.isPlainObject=Kc,L.isRegExp=eB,L.isSafeInteger=_te,L.isSet=$Q,L.isString=$h,L.isSymbol=Wr,L.isTypedArray=el,L.isUndefined=Dte,L.isWeakMap=Ote,L.isWeakSet=Nte,L.join=HV,L.kebabCase=Sne,L.last=vA,L.lastIndexOf=PV,L.lowerCase=xne,L.lowerFirst=Fne,L.lt=Lte,L.lte=Rte,L.max=Cre,L.maxBy=bre,L.mean=Ere,L.meanBy=kre,L.min=Sre,L.minBy=xre,L.stubArray=aB,L.stubFalse=lB,L.stubObject=dre,L.stubString=fre,L.stubTrue=hre,L.multiply=Fre,L.nth=$V,L.noConflict=Are,L.noop=sB,L.now=Lh,L.pad=Qne,L.padEnd=Tne,L.padStart=Mne,L.parseInt=Ine,L.random=yne,L.reduce=Wee,L.reduceRight=Gee,L.repeat=Une,L.replace=_ne,L.result=une,L.round=Qre,L.runInContext=ue,L.sample=qee,L.size=jee,L.snakeCase=Dne,L.some=Zee,L.sortedIndex=XV,L.sortedIndexBy=JV,L.sortedIndexOf=jV,L.sortedLastIndex=ZV,L.sortedLastIndexBy=VV,L.sortedLastIndexOf=eee,L.startCase=Nne,L.startsWith=Lne,L.subtract=Tre,L.sum=Mre,L.sumBy=Ire,L.template=Rne,L.times=pre,L.toFinite=Vi,L.toInteger=at,L.toLength=zQ,L.toLower=Hne,L.toNumber=wA,L.toSafeInteger=Hte,L.toString=Ut,L.toUpper=Pne,L.trim=$ne,L.trimEnd=Kne,L.trimStart=zne,L.truncate=Wne,L.unescape=Gne,L.uniqueId=gre,L.upperCase=Yne,L.upperFirst=rB,L.each=TQ,L.eachRight=MQ,L.first=SQ,oB(L,(function(){var c={};return vi(L,function(f,g){It.call(L.prototype,g)||(c[g]=f)}),c})(),{chain:!1}),L.VERSION=r,fA(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){L[c].placeholder=L}),fA(["drop","take"],function(c,f){yt.prototype[c]=function(g){g=g===n?1:In(at(g),0);var b=this.__filtered__&&!f?new yt(this):this.clone();return b.__filtered__?b.__takeCount__=or(g,b.__takeCount__):b.__views__.push({size:or(g,S),type:c+(b.__dir__<0?"Right":"")}),b},yt.prototype[c+"Right"]=function(g){return this.reverse()[c](g).reverse()}}),fA(["filter","map","takeWhile"],function(c,f){var g=f+1,b=g==te||g==Y;yt.prototype[c]=function(I){var H=this.clone();return H.__iteratees__.push({iteratee:Je(I,3),type:g}),H.__filtered__=H.__filtered__||b,H}}),fA(["head","last"],function(c,f){var g="take"+(f?"Right":"");yt.prototype[c]=function(){return this[g](1).value()[0]}}),fA(["initial","tail"],function(c,f){var g="drop"+(f?"":"Right");yt.prototype[c]=function(){return this.__filtered__?new yt(this):this[g](1)}}),yt.prototype.compact=function(){return this.filter(Ur)},yt.prototype.find=function(c){return this.filter(c).head()},yt.prototype.findLast=function(c){return this.reverse().find(c)},yt.prototype.invokeMap=ut(function(c,f){return typeof c=="function"?new yt(this):this.map(function(g){return Nc(g,c,f)})}),yt.prototype.reject=function(c){return this.filter(Hh(Je(c)))},yt.prototype.slice=function(c,f){c=at(c);var g=this;return g.__filtered__&&(c>0||f<0)?new yt(g):(c<0?g=g.takeRight(-c):c&&(g=g.drop(c)),f!==n&&(f=at(f),g=f<0?g.dropRight(-f):g.take(f-c)),g)},yt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},yt.prototype.toArray=function(){return this.take(S)},vi(yt.prototype,function(c,f){var g=/^(?:filter|find|map|reject)|While$/.test(f),b=/^(?:head|last)$/.test(f),I=L[b?"take"+(f=="last"?"Right":""):f],H=b||/^find/.test(f);I&&(L.prototype[f]=function(){var Z=this.__wrapped__,oe=b?[1]:arguments,fe=Z instanceof yt,ke=oe[0],Se=fe||it(Z),Fe=function(mt){var Ct=I.apply(L,Ko([mt],oe));return b&&Ue?Ct[0]:Ct};Se&&g&&typeof ke=="function"&&ke.length!=1&&(fe=Se=!1);var Ue=this.__chain__,Ke=!!this.__actions__.length,je=H&&!Ue,ct=fe&&!Ke;if(!H&&Se){Z=ct?Z:new yt(this);var Ze=c.apply(Z,oe);return Ze.__actions__.push({func:Oh,args:[Fe],thisArg:n}),new pA(Ze,Ue)}return je&&ct?c.apply(this,oe):(Ze=this.thru(Fe),je?b?Ze.value()[0]:Ze.value():Ze)})}),fA(["pop","push","shift","sort","splice","unshift"],function(c){var f=ah[c],g=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",b=/^(?:pop|shift)$/.test(c);L.prototype[c]=function(){var I=arguments;if(b&&!this.__chain__){var H=this.value();return f.apply(it(H)?H:[],I)}return this[g](function(Z){return f.apply(it(Z)?Z:[],I)})}}),vi(yt.prototype,function(c,f){var g=L[f];if(g){var b=g.name+"";It.call(Xa,b)||(Xa[b]=[]),Xa[b].push({name:f,func:g})}}),Xa[Qh(n,w).name]=[{name:"wrapper",func:n}],yt.prototype.clone=G9,yt.prototype.reverse=Y9,yt.prototype.value=q9,L.prototype.at=bee,L.prototype.chain=Eee,L.prototype.commit=kee,L.prototype.next=See,L.prototype.plant=Fee,L.prototype.reverse=Qee,L.prototype.toJSON=L.prototype.valueOf=L.prototype.value=Tee,L.prototype.first=L.prototype.head,Tc&&(L.prototype[Tc]=xee),L}),Ga=k9();Os?((Os.exports=Ga)._=Ga,iw._=Ga):Xn._=Ga}).call(F5)})(Ac,Ac.exports)),Ac.exports}var _g=Q5();function KE(t){const e=s.computed(()=>{if(!t.tintColor)return null;const o=t.tintColor.replace("#",""),a=parseInt(o.substring(0,2),16),l=parseInt(o.substring(2,4),16),u=parseInt(o.substring(4,6),16);return{r:a,g:l,b:u}});function n(o,a,l){if(t.filter==="none"&&!t.tintColor)return;const u=o.getImageData(0,0,a,l),d=u.data;if(t.filter==="grayscale")for(let h=0;h<d.length;h+=4){const p=.299*d[h]+.587*d[h+1]+.114*d[h+2];d[h]=p,d[h+1]=p,d[h+2]=p}else if(t.filter==="sepia")for(let h=0;h<d.length;h+=4){const p=d[h],m=d[h+1],v=d[h+2];d[h]=Math.min(255,.393*p+.769*m+.189*v),d[h+1]=Math.min(255,.349*p+.686*m+.168*v),d[h+2]=Math.min(255,.272*p+.534*m+.131*v)}if(t.tintColor&&e.value){const{r:h,g:p,b:m}=e.value,v=t.tintIntensity;for(let B=0;B<d.length;B+=4){const y=d[B],w=d[B+1],C=d[B+2],k=y*h/255,F=w*p/255,U=C*m/255;d[B]=y+(k-y)*v,d[B+1]=w+(F-w)*v,d[B+2]=C+(U-C)*v}}o.putImageData(u,0,0)}async function r(o){if(typeof o!="string")return o.complete&&o.naturalWidth>0||await new Promise((l,u)=>{o.onload=()=>l(),o.onerror=()=>u(new Error("Failed to load image element"))}),o;const a=new Image;return await new Promise((l,u)=>{a.onload=()=>l(),a.onerror=()=>u(new Error("Failed to load image source")),a.src=o}),a}async function A(o,a={}){const l=await r(o),u=document.createElement("canvas"),d=a.width||l.naturalWidth||l.width,h=a.height||l.naturalHeight||l.height;u.width=d,u.height=h;const p=u.getContext("2d");if(!p)throw new Error("Could not create canvas context");return p.drawImage(l,0,0,d,h),n(p,d,h),u.toDataURL(a.mimeType||"image/png",a.quality)}async function i(o,a={}){const l=await A(o,a);return(await fetch(l)).blob()}return{tintRgb:e,applyFilterToCanvas:n,applyFilterToImage:A,applyFilterToImageBlob:i}}const T5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAYAAAB/HSuDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAHkJJREFUeNrs3Q1u8zaXgNHS8JK4/xVwTyzytgnS1HZsixR/7jlAgZkMBl+hT6Z1H1FyqrX+BQAAAOzt4hAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAEA0V4cAANaTc64j//NLKcl/CwCwllRrdRQAwJDfjDgAAHPyCAAAGP79uwOAAAAAAAAIAAAAAIAAAAAAAAgAAAAAwEn8CgAATOq3l+mNetv+rP9eAIAAAAAAAOF5BAAAAAAEAAAAAEAAAAAAAJZwdQgA2N2tl9Z5UZ1zwjkBQDReAghAmAHPwIdzA4DI7AAAINxwB8+eR0IAADuxAwCA0IO/Ac954jwBQAAAgE2HOUOd88Z5A0BEHgEAINwABy3OPyEAgNXYAQBAyMHf8OZcci4BIAAAwKbDmkEN5xcAAgAAGMxwvjnfABAAAGC1QcwQhnMQAAQAAAxd4JwEQAAAAEMWOEcBEAAAYKrBylCF8xUABAAANh2kDFE4hwFAAADA0ATOaQC44eIQAGBQgvcdOTdb/fQgADzDDgAADP7gXAdAAACAMQORYQjnPQAIAAAYgMDnAAAEAAAMPLD+58JnAgABAADDP/h8AIAAAMA6w43BBp8VnxUABAAADDPgs+OzA0BDF4cAgDMZYMBnAYAxrg4BAIYdGPu5ePf9AADwCjsAADD8g88IAAHYAQCAoQYm+rzYDQBAL3YAAGD4B58dAALwKwAANPF519LwAj5XAAgAAAAAwCAeAQAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAiyznXj38cCcA6A8AjqVZrOcCqF+S3/l5KSY4OYJ0B4Cc7AAA2uigHsAYBIAAAuDAHsJYACAAAuCgHsBYBCAAALHPB7dlcoIVn1hIRAEAAAGDQ8A9gbQJAAAAIcIHt7j/Q0rNriggAIAAAMOGFOoC1BUAAAGBCnvsHVogAdgEACAAAGP4BEQAAAQAAAAAQAAACc/cfmI1dAAACAACGf0AEEAEABAAADP+ACACAAAAAAAAIAACRuPsPrMIuAAABAADDPyACiAAAAgAAAAAgAAAE5e4/sCq7AAAEAAAM/4AIIAIACAAAAACAAAAQhLv/wC7sAgAQAADofEENYM0CQAAAmJg7YYC1DwABAMAFsDtpwJI8CgAgAADQ+AIawBoGgAAAMDF3vgCshQACAADunAHWMgAEAIDVueMFYE0EEAAAXOi6YwZsxQsBAQQAAAz/gLUNAAEAYD/ucAFYIwEEAADcIQOscQAIAACrc2cLwFoJIAAA4M4YYK0DQAAAWJ07WgDWTAABAAB3xABrHgACAMDq3MkCsHYCCAAAuBMGWPsAEAAAVvfbHSwXwIAI8P4aCoAAAAAAAAgAAHNw9x/AWgggAAAAAAACAMDq3PECsCYCCAAAAABAN6lWL1kF6OXzTdbucgFYLwEEAAAAAKA7jwAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACgEMAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAIAAAAAAAAgAAJHknOvHP44EgHUaYGWpVmslwL0Lyp9/K6UkRwbAWg2wIjsAAJ68oHz0dwCs1QACAAAAACAAAAAAAAIAwOlsHQWwlgMIAADBebEUAAACAAAAnEiUBRAAAAAAAAEA4D7PjAJY0wEEAAAAAEAAANidZ00BrM0AAgAAAAAgAAAAAAACAMAUvCwKwNoOIAAAAAAAAgDA7rxkCsAaDSAAAAAAAAIAAAAAIAAATMFLogCs8QACAAAAACAAAOzOy6UArNUAAgAAAAAgAAAAAAACAAAAACAAAJzD26EBrPUAAgAAAAAgAADszlulAazZAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAEAjfhYKwJoPIAAAAAAAAgDA7vycFIC1G0AAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAPiSc66OAoC1H0AAAAjM70gDWMMBBAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAAAQAAAAAAABACCMUkpyFACs5QACAICLQwCs/QDLSbVWRwEAAAA2ZwcAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgADgEAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAABAc1eHAIgs51x//q2UkhwZAGs8wG7sAABcGD75dwCs8QACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAFH5nWgAaziAAACwiVJKchQArP0AAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAIAAAMC/cs7VUQCwdgMIAAAbKKUkRwHAmg8gAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAA04fekAazZAAIAwCb8LjSAtR5AAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAABoxu9KA1irAQQAgE34fWgAAAQAAABYmMgLIAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAMBu/Lw1gjQYQAAA24WeiAKztAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAwEv8XBSANR1AAABwEQmANRpgWanW6igAAADA5uwAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAABACHAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAgLNdHQKA1+Wc6+f/XEpJjgiAtRdgdqnW6igAvHHx+Z0LUQDrL8DsPAIA0PHCFABrLIAAAAAAAAgAAAAAgAAAAAAACAAAAOzA8/8AAgCAi1QAABAAAPrwc1MA1mQAAQAAAAAQAAAAAAABAAAAABAAANbgRYAA1lQAAQBgE146BWAtBhAAAAAAAAEAAAAAEAAAtuCZVQBrKYAAAAAAAAgAAKvw8ikAazCAAAAAAAAIAAAAAIAAALAFL68CsIYCCAAAAACAAACwCi+hArD2AggAAAAAgAAAAAAACAAAW/ASKwBrJ4AAALAJz6ICWHMBBAAAAABAAAAAAAAEAIAteJYVwJoJIAAAAAAAAgDAKryUCsBaCyAAAAAAAAIAQASeaQWwVgIIAAAAAIAAALAKz6YCWGMBBAAAAABAAACIwLOtAAAIAAAAhCaSAggAAEvxjCqAtRVAAAAAAAAEAAAAAEAAANiCZ1wBrI0AAgDAJjyrCmBNBRAAAAAAAAEAIAJbXQGsiQACAAAAACAAAKzCM6sA1lIAAQAAAAAQAAAAAAABAGAZ97au2tIKYK0EEAAANr+wdUELYK0EGCnV6tdXAAAAYHd2AAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAKAQwAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAADAQTnn+vGPIwFYvwBoJdVqfQaY6cL51t9LKcnRAaxfABxhBwAAAAAIAADMwHZawBoFgAAAAAAACAAAu3CHDbA2ASAAAAAAAAIAwCq8LRuwpgEgAABgqy1gTQJAAAAAAAAEAIBl2DILWMsAEAAAsOUWsBYBIAAAAAAAAgDAMn7bOuvOGzDSb2uQ7f8AAgAAAAAgAAAAAAACAEAwHgMAZmT7P4AAAAAAAAgAALzDnTTAmgWAAACAxwAAaw4AAgAAAAAgAAAsw8sAgRl4+R+AAAAAAAAIAAC04M4aYI0CQAAAwGMAgDUGAAEAAAAAEAAAluFlgMAIXv4HIAAAAAAAAgAAPdgFAJzJ3X8AAQAAAAAQAAAAAAABAIBDPAYAnMH2fwABAAAAABAAADiDXQBAT+7+AwgAAAAAgAAAwJnsAgB6cPcfQAAAAAAABAAAAABAAACgC48BAC3Z/g8gAAAAAAACAAAj2QUAtODuP4AAAAAAAAgAAMzALgDgCHf/AQQAAAAAQAAAYCZ2AQDvcPcfQAAAAAAABAAAZuROHWBNAUAAAAAAAAEAAAAAEAAAWIYtu4C1BIBbUq1eCg0AAAC7swMAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAAAQABwCAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAEAAD4JudcP/5xJMDnE4B1pVp9XwBwf7D4+bdSSnJkwGcUgPXYAQDA04PFo78DPqMACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAQfkZMfAZBkAAAAAAAAQAAHZXSkmOAvgsAiAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAABAHDnn6igAIAAAYGgAABAAAOA2vzsOPpMACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAfMk5V0cBfKYBEAAACMzvjYPPJgACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAABf/F44+GwDIAAAAAAAAgAAuyulJEcBfEYBEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAA+CPnXB0F8BkHQAAAIDC/Lw4+qwAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAA8xc+Kgc8sAAIAAAAAsJBUa3UUAPgj5/z1peBOIvgsAyAAAAAAAIvxCAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAADAIVeHAGAeOef682+llOTIANYwAI5KtVZHAWCSC+V7XEAD1jQAjrIDAGCyC2OAiGuiKAAgAAAY9AECr5/CAIAAAGDQBwi83goDAAIAgCEfIPgaLQ4A3OYlgICLyMkHfReygPXUegogAABsdGHqAhWw7lp3AQQAABeeANZl6zKAAACwykWmi0qANdZs6zWwIy8BBHDhCDDdmulFrAACAIAhHyD4GisOAAgAAAZ9gMDrsjAAIAAAGPQBAq/jwgDAP7wEENjWvQs+gz4AvicAAQAAAADY0sUhAAAAAAEAAAAAEAAAAACAFfgVAOBXt16S5AVJAOC7GViLlwACT11U3OJCAwB8TwPrsAMA8PvIABDg+10QAAQAcEEAAAgCgAAAGPgBAEEAEAAAAz8AIAgAS/ASQDD0v8VFAQD43gcEAGDDL35f/gDgmsA1AQgAgC93AMA1AyAAAL68AQDXFIAAAPhyBgBccwACAPjy9eULALgmAQQA8CXryxUAcK0CCAAQ6wvVlygA4PoFuOfqEMC6fGECAGdfb4x4ZAAQAMDADwAgCAACABj4AQAEAeCTdwDAyR59KRr4AQDXPoAAAAAAALzt4hAAAACAAAAAAAAIAAAAAIAAACf4eLGMt80CAOB6Ex7zEkCWXIAf/d+9TRYAANed8H9Xh4AdFl8AABh5jSoGIACAoR8AADEABAAw9AMAIAaAAIChHwAAxAAQADD0AwCAGADP8isAbDH0W0ABAHAtCwIAFkoAAHCNiwAgALDSomhBBADAdS8IAFj8AADA9TAIAKy00FnkAABwjewaGQGATRc1CxoAAK6bXTcjAGDxAgAA19OupxEAWGmhskgBAIBrbAQALEoAAOCa2zU3AgCrLUIWIAAAcB2OAIAFBwAAcF2OAMBqi4zFBQAAXKczr6tDwFEWFAAA6H+93foXBBAAwOAPAABCAAIAGPwBAEAIYEXeAcB/3FtEDP0AAOA6HgGAjRcPCwYAALiWRwAAAAAAFnFxCAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAACAG64OwRg55/r5P5dSkiMCAACYgegp1VodhUEn/Xc+AAAAgDmInjwCMMFJDwAAYEaiN48AOKkBAACGz0t2A/RnB4DhHwAAwOwkAOAEBgAAMEMJADQ5cW11AQAAdvbKzCMC9ONXAAYO/oZ/AADAvGReOosdAE5mAACAU7w6A9kNIAAY/gEAAEQAXuQRgJOHf4M/AACAWWoEOwCcsAAAAEN4OaAAYPgHAAAQAUQAAcDwDwAAIALwKu8A6Dj4G/4BAADMWwLA5iejExEAAMDsNROPADgBAQAApuKRAAHA8A8AACACiAACgOEfAABABEAAMPwDAACIAAIAhn8AAAARQAAw/Bv+AQAARAABwPAPAACACCAAGP4BAAAQAQQAwz8AAAAigABg+AcAAEAEEAAM/wAAACKACCAAGP4BAABEABEgcgAw/AMAAIgAAgCGfwAAALObALC6Z4uPEwgAAGC/CBB1F0C4AGD4BwAAEAEiRoBQAcDwDwAAIAJEjQBhAoDhHwAAQASIHAG8BNDwDwAAYMYTAJwYAAAAmPUEACcEAAAAZj4BwIkAAACA2U8AGP5fthMAAAAgdgSINBemWquzAAAAADbnHQAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAIAA4BAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAANHId/S+Qc64//1ZKSf6rAQAAYFUzzrqX2Q7Io78DAADAisP/DLOuRwAAAAAggGEBwF1+AAAAohk5C9sBAAAAAAEMCQC/FQ8vAQQAAGBXo3YB2AEAAAAADc16U/v0AODuPwAAANEjwIhdAHYAAAAAQACnBgB3/wEAAIhitl0AdgAAAABAAKcFAHf/AQAAiGamXQB2AAAAAEAApwQAd/8BAACIapZdAHYAAAAAQADdA8CI3zYEAACAlZwxOw/fAWD7PwAAALubYfb1CAAAAAAE0DUAePkfAAAAPDcD934MwA4AAAAACKBbAHD3HwAAAF6bhXvuArADAAAAAAIYEgDc/QcAACCqUTNxlwBwxu8XAgAAwI56zdQeAQAAAIAAmgcAL/8DAACAx0a8DNAOAAAAAAjg1ADg7j8AAACMmZGbBgAv/wMAAIA5Z2yPAAAAAEAApwUA2/8BAABg3KzcLADY/g8AAABttZy1PQIAAAAAAZwSAGz/BwAAgLEzc5MAYPs/AAAA9NFq5vYIAAAAAATQPQDY/g8AAADjZ+fDAcD2fwAAAOirxeztEQAAAAAIoGsAsP0fAAAA5pihDwUA2/8BAADgHEdncI8AAAAAQADdAoDt/wAAADDPLG0HAAAAAATwdgDw/D8AAACc68gsbgcAAAAABNAlAHj+HwAAAOaaqe0AAAAAgADeDgD3ioS7/wAAAHBMj5n70vJfyPAPAAAAfSLA0Zk71epl/gAAALA77wAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAEAIcAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAACAs13f+X/KOdfv/3spJTmUAAAA0EeLOfxy9D/03t8AAACA9sP/u3O4RwAAAAAggJcCgDv9AAAAMIdXZ3Q7AAAAACAAAQAAAAAEAAAAAEAAAADgb3bsWAAAAABgkL/1IPYWRgAgAAAAAAABAAAAAAgAAAAAQAAAAAAAAgAAAAAQAAAAACAAAAAAAAEAAAAACAAAAABAAAAAAAACAAAAABAAAAAAgAAAAAAABAAAAAAIAAAAAEAAAAAAAAIAAAAAEAAAAACAAAAAAAAEAAAAALAkwACd6iSVhnRezwAAAABJRU5ErkJggg==",M5={class:"camera__preview"},I5={key:0,class:"camera__bg-notification"},U5=["innerHTML"],_5=["width","height"],D5={key:1,class:"camera__countdown-overlay"},O5=["innerHTML","data-countdown"],N5=["src"],L5={class:"camera__controls"},R5={class:"container"},H5={class:"row"},P5={class:"col"},$5={class:"btn-group"},K5={key:0},z5={key:1},W5={key:0,class:"camera__switch-cam"},G5={key:1,class:"base-camera__devices"},Y5={name:"BaseCamera",inheritAttrs:!1},zE={"1x1":{width:720,height:720},"2x3":{width:720,height:1080},"3x2":{width:1080,height:720},"3x4":{width:720,height:960},"4x3":{width:960,height:720},"4x5":{width:960,height:1200},"5x4":{width:1200,height:960},"16x9":{width:1280,height:720},"9x16":{width:720,height:1280}},q5=s.defineComponent({...Y5,props:{modelValue:{type:null},enableSwitchCamera:{type:Boolean,default:!0},defaultRearCamera:{type:Boolean,default:!1},enableMirrorCamera:{type:Boolean,default:!1},enableGuide:{type:Boolean,default:!0},guideSrc:{type:String,default:()=>T5},countdown:{type:Number,default:0},ratio:{type:String,default:""},filter:{type:String,default:"none",validator:t=>["none","grayscale","sepia"].includes(t)},tintColor:{type:String,default:""},tintIntensity:{type:Number,default:.3},enableAudio:{type:Boolean,default:!1},enableSelectDevice:{type:Boolean,default:!1},enableCropImage:{type:Boolean,default:!0},resolutions:{type:Object,default:()=>zE}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const r=t,A=n,i=s.ref(),o=s.ref(),a=s.ref(!1),l=s.ref([]),u=s.ref(),d=s.ref(),h=s.ref(!1),p=s.ref(!1),m=s.ref(0),v=s.ref(0),B=s.ref(),y=s.computed(()=>({...zE,...r.resolutions})),w=s.computed(()=>Object.values(y.value)[0]);function C(ee){return String(ee||"").trim().toLowerCase().replace(/\s+/g,"").replace(/[:/]/g,"x")}const k=s.computed(()=>{if(y.value[r.ratio])return r.ratio;const ee=C(r.ratio);if(y.value[ee])return ee}),F=s.computed(()=>k.value?y.value[k.value]:w.value),U=s.computed(()=>{const ee=k.value?y.value[k.value]:void 0;return ee?`${ee.width} / ${ee.height}`:void 0}),D=s.computed(()=>l.value.filter(ee=>ee.kind==="videoinput")),M=s.computed(()=>l.value.filter(ee=>ee.kind==="audioinput")),K=s.computed({get(){return u.value&&u.value.deviceId},set(ee){u.value=D.value.find(re=>re.deviceId===ee)}}),q=s.computed({get(){return d.value&&d.value.deviceId},set(ee){d.value=M.value.find(re=>re.deviceId===ee)}}),ce=s.computed(()=>{const ee=u.value&&D.value.findIndex(re=>re.deviceId===u.value.deviceId);return r.enableMirrorCamera&&ee===0?"mirror-cam":""}),me=s.computed(()=>{const ee=u.value&&l.value.findIndex(re=>re.deviceId===u.value.deviceId);return ce.value?`${ce.value} mirror-device-${ee}`:""}),{tintRgb:ve,applyFilterToCanvas:Be}=KE(r);function te(){if(k.value&&F.value){m.value=F.value.width,v.value=F.value.height;return}m.value=i.value.parentElement&&i.value.parentElement.clientWidth,v.value=i.value.parentElement&&i.value.parentElement.clientHeight}const V=_g.debounce(()=>{te()},300,{trailing:!0,leading:!1});async function Y(){const ee=F.value?{width:F.value.width,height:F.value.height}:void 0,re=ee?ee.width/ee.height:void 0,pe={audio:r.enableAudio&&{...d.value?{deviceId:d.value.deviceId}:{}},video:{...u.value?{deviceId:u.value.deviceId}:{},width:{ideal:ee?.width},...k.value&&ee?.height?{height:{ideal:ee.height}}:{},...k.value&&re?{aspectRatio:{ideal:re}}:{}}};return navigator.mediaDevices.getUserMedia(pe).catch(de=>{console.error(de,"navigator.mediaDevices.getUserMedia: failed")})}function x(){i.value&&i.value.srcObject&&i.value.srcObject.getTracks().forEach(re=>{re.stop()})}async function Q(){return i.value.srcObject=await Y(),l.value=await navigator.mediaDevices.enumerateDevices(),{stream:i.value.srcObject,devices:l.value}}function P(){h.value?(h.value=!1,p.value=!1,x()):(h.value=!0,Q())}function T(){l.value.length>1&&(x(),u.value=u.value&&u.value.deviceId===D.value[0].deviceId?D.value[D.value.length-1]:D.value[0],Q())}async function S(ee,re){x(),ee&&(!re||ee.deviceId!==re.deviceId)&&await Q()}s.watch(()=>u.value,S),s.watch(()=>d.value,S);function G(){r.countdown?(B.value=B.value?B.value-1:r.countdown,B.value?setTimeout(G,1e3):Ae()):Ae()}e({onCapture:G,camera:i.value});function Ae(){p.value=!0;const ee=o.value.getContext("2d"),re=i.value,pe=re&&re.srcObject&&re.srcObject.getTracks(),{aspectRatio:de,width:Ce,height:W}=pe.length&&pe[0].getSettings(),j=re?.videoWidth||Ce||m.value,$=re?.videoHeight||W||v.value,N=j&&$?j/$:de,R=F.value||{width:j,height:$},J=R?.width||j,z=k.value?R?.height||$:Math.round(J/N),le=J/z;if(o.value.width=J,o.value.height=z,!j||!$||!N)return;if(ee.save(),ce.value&&(ee.translate(o.value.width,0),ee.scale(-1,1)),r.enableCropImage){let _=0,O=0,ie=j,X=$;N>le?(ie=$*le,_=(j-ie)/2):N<le&&(X=j/le,O=($-X)/2),ee.drawImage(re,_,O,ie,X,0,0,o.value.width,o.value.height)}else{let _=o.value.width,O=o.value.height,ie=0,X=0;N>le?(O=o.value.width/N,X=(o.value.height-O)/2):N<le&&(_=o.value.height*N,ie=(o.value.width-_)/2),ce.value&&(ie=o.value.width-ie-_),ee.drawImage(re,0,0,j,$,ie,X,_,O)}ee.restore(),Be(ee,o.value.width,o.value.height);const E=o.value.toDataURL("image/png");ne(E)}function ne(ee){const re=PT(ee);A("update:modelValue",{name:`cam-pic-${new Date().toISOString()}`,id:`cam-pic-${new Date().toISOString()}`,blob:re,size:re.size})}return s.onMounted(async()=>{x(),await Q(),u.value=D.value[0],r.enableAudio&&(d.value=M.value[0]),navigator.mediaDevices.addEventListener("devicechange",async ee=>{await Q()}),r.defaultRearCamera&&T(),P(),window.addEventListener("resize",V),te(),await s.nextTick(),a.value=!0}),s.onBeforeUnmount(()=>{h.value=!1,p.value=!1,x(),window.removeEventListener("resize",V)}),(ee,re)=>{const pe=s.resolveComponent("loading-spinner"),de=s.resolveComponent("svg-icon"),Ce=s.resolveComponent("input-dropdown");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["camera",me.value])},[s.createElementVNode("div",M5,[a.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",I5,[s.createVNode(pe,{color:"#000"},{default:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass("d-block text-center"),innerHTML:ee.$t("camera.waitForCameraNotification")},null,8,U5)]),_:1})])),s.withDirectives(s.createElementVNode("div",{class:s.normalizeClass(["camera__video-wrapper",k.value?`aspect-ratio--${k.value}`:""]),style:s.normalizeStyle(U.value?{aspectRatio:U.value}:void 0)},[s.createElementVNode("video",{ref_key:"camera",ref:i,class:"camera__video",style:s.normalizeStyle({filter:r.filter==="grayscale"?"grayscale(100%)":r.filter==="sepia"?"sepia(100%)":"none"}),autoplay:"",playsinline:""},null,4),t.tintColor?(s.openBlock(),s.createElementBlock("div",{key:0,class:"camera__tint-overlay",style:s.normalizeStyle({backgroundColor:t.tintColor,opacity:t.tintIntensity,mixBlendMode:"multiply"})},null,4)):s.createCommentVNode("",!0)],6),[[s.vShow,a.value]]),s.withDirectives(s.createElementVNode("canvas",{ref_key:"canvas",ref:o,class:"camera__canvas",width:m.value,height:v.value},null,8,_5),[[s.vShow,p.value]]),B.value?(s.openBlock(),s.createElementBlock("div",D5,[(s.openBlock(),s.createElementBlock("p",{class:"countdown",key:B.value,innerHTML:B.value,"data-countdown":B.value},null,8,O5))])):s.createCommentVNode("",!0),t.enableGuide&&h.value&&a.value?(s.openBlock(),s.createElementBlock("img",{key:2,class:"camera__guide",src:t.guideSrc},null,8,N5)):s.createCommentVNode("",!0)]),s.createElementVNode("div",L5,[s.createElementVNode("div",R5,[s.createElementVNode("div",H5,[s.createElementVNode("div",P5,[s.createElementVNode("div",$5,[s.createElementVNode("button",{type:"button",class:"camera__toggle btn btn-primary",onClick:P},[h.value?(s.openBlock(),s.createElementBlock("span",z5,s.toDisplayString(ee.$t("common.pause")),1)):(s.openBlock(),s.createElementBlock("span",K5,s.toDisplayString(ee.$t("common.play")),1))]),s.createElementVNode("button",{type:"button",class:"camera__capture btn btn-primary",onClick:G},s.toDisplayString(ee.$t("camera.capture")),1)])])])])]),t.enableSwitchCamera&&D.value&&D.value.length>1?(s.openBlock(),s.createElementBlock("div",W5,[s.createElementVNode("button",{class:"btn",onClick:s.withModifiers(T,["prevent"])},[s.createVNode(de,{symbol:"switch-camera"})])])):s.createCommentVNode("",!0),t.enableSelectDevice?(s.openBlock(),s.createElementBlock("div",G5,[M.value.length&&d.value?(s.openBlock(),s.createBlock(Ce,{key:0,modelValue:q.value,"onUpdate:modelValue":re[0]||(re[0]=W=>q.value=W),options:M.value.map((W,j)=>({text:W.label||`Microphone ${j+1}`,value:W.deviceId}))},null,8,["modelValue","options"])):s.createCommentVNode("",!0),D.value.length?(s.openBlock(),s.createBlock(Ce,{key:1,modelValue:K.value,"onUpdate:modelValue":re[1]||(re[1]=W=>K.value=W),options:D.value.map((W,j)=>({text:W.label||`Camera ${j+1}`,value:W.deviceId}))},null,8,["modelValue","options"])):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)],2)}}}),X5=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,J5=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,j5=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Z5(t,e){if(t==="__proto__"||t==="constructor"&&e&&typeof e=="object"&&"prototype"in e){V5(t);return}return e}function V5(t){console.warn(`[destr] Dropping "${t}" key to prevent prototype pollution.`)}function eW(t,e={}){if(typeof t!="string")return t;if(t[0]==='"'&&t[t.length-1]==='"'&&t.indexOf("\\")===-1)return t.slice(1,-1);const n=t.trim();if(n.length<=9)switch(n.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!j5.test(t)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return t}try{if(X5.test(t)||J5.test(t)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(t,Z5)}return JSON.parse(t)}catch(r){if(e.strict)throw r;return t}}const tW=/#/g,nW=/&/g,rW=/\//g,AW=/=/g,Dg=/\+/g,iW=/%5e/gi,oW=/%60/gi,sW=/%7c/gi,aW=/%20/gi;function lW(t){return encodeURI(""+t).replace(sW,"|")}function Og(t){return lW(typeof t=="string"?t:JSON.stringify(t)).replace(Dg,"%2B").replace(aW,"+").replace(tW,"%23").replace(nW,"%26").replace(oW,"`").replace(iW,"^").replace(rW,"%2F")}function Ng(t){return Og(t).replace(AW,"%3D")}function WE(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}function cW(t){return WE(t.replace(Dg," "))}function uW(t){return WE(t.replace(Dg," "))}function dW(t=""){const e=Object.create(null);t[0]==="?"&&(t=t.slice(1));for(const n of t.split("&")){const r=n.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const A=cW(r[1]);if(A==="__proto__"||A==="constructor")continue;const i=uW(r[2]||"");e[A]===void 0?e[A]=i:Array.isArray(e[A])?e[A].push(i):e[A]=[e[A],i]}return e}function fW(t,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(n=>`${Ng(t)}=${Og(n)}`).join("&"):`${Ng(t)}=${Og(e)}`:Ng(t)}function hW(t){return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>fW(e,t[e])).filter(Boolean).join("&")}const pW=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,mW=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,gW=/^([/\\]\s*){2,}[^/\\]/,vW=/^\.?\//;function GE(t,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?pW.test(t):mW.test(t)||(e.acceptRelative?gW.test(t):!1)}function wW(t="",e){return t.endsWith("/")}function BW(t="",e){return(wW(t)?t.slice(0,-1):t)||"/"}function yW(t="",e){return t.endsWith("/")?t:t+"/"}function CW(t,e){if(EW(e)||GE(t))return t;const n=BW(e);return t.startsWith(n)?t:SW(n,t)}function bW(t,e){const n=xW(t),r={...dW(n.search),...e};return n.search=hW(r),FW(n)}function EW(t){return!t||t==="/"}function kW(t){return t&&t!=="/"}function SW(t,...e){let n=t||"";for(const r of e.filter(A=>kW(A)))if(n){const A=r.replace(vW,"");n=yW(n)+A}else n=r;return n}const YE=Symbol.for("ufo:protocolRelative");function xW(t="",e){const n=t.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){const[,h,p=""]=n;return{protocol:h.toLowerCase(),pathname:p,href:h+p,auth:"",host:"",search:"",hash:""}}if(!GE(t,{acceptRelative:!0}))return qE(t);const[,r="",A,i=""]=t.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,o="",a=""]=i.match(/([^#/?]*)(.*)?/)||[];r==="file:"&&(a=a.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:l,search:u,hash:d}=qE(a);return{protocol:r.toLowerCase(),auth:A?A.slice(0,Math.max(0,A.length-1)):"",host:o,pathname:l,search:u,hash:d,[YE]:!r}}function qE(t=""){const[e="",n="",r=""]=(t.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:n,hash:r}}function FW(t){const e=t.pathname||"",n=t.search?(t.search.startsWith("?")?"":"?")+t.search:"",r=t.hash||"",A=t.auth?t.auth+"@":"",i=t.host||"";return(t.protocol||t[YE]?(t.protocol||"")+"//":"")+A+i+e+n+r}class QW extends Error{constructor(e,n){super(e,n),this.name="FetchError",n?.cause&&!this.cause&&(this.cause=n.cause)}}function TW(t){const e=t.error?.message||t.error?.toString()||"",n=t.request?.method||t.options?.method||"GET",r=t.request?.url||String(t.request)||"/",A=`[${n}] ${JSON.stringify(r)}`,i=t.response?`${t.response.status} ${t.response.statusText}`:"<no response>",o=`${A}: ${i}${e?` ${e}`:""}`,a=new QW(o,t.error?{cause:t.error}:void 0);for(const l of["request","options","response"])Object.defineProperty(a,l,{get(){return t[l]}});for(const[l,u]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(a,l,{get(){return t.response&&t.response[u]}});return a}const MW=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function XE(t="GET"){return MW.has(t.toUpperCase())}function IW(t){if(t===void 0)return!1;const e=typeof t;return e==="string"||e==="number"||e==="boolean"||e===null?!0:e!=="object"?!1:Array.isArray(t)?!0:t.buffer||t instanceof FormData||t instanceof URLSearchParams?!1:t.constructor&&t.constructor.name==="Object"||typeof t.toJSON=="function"}const UW=new Set(["image/svg","application/xml","application/xhtml","application/html"]),_W=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function DW(t=""){if(!t)return"json";const e=t.split(";").shift()||"";return _W.test(e)?"json":e==="text/event-stream"?"stream":UW.has(e)||e.startsWith("text/")?"text":"blob"}function OW(t,e,n,r){const A=NW(e?.headers??t?.headers,n?.headers,r);let i;return(n?.query||n?.params||e?.params||e?.query)&&(i={...n?.params,...n?.query,...e?.params,...e?.query}),{...n,...e,query:i,params:i,headers:A}}function NW(t,e,n){if(!e)return new n(t);const r=new n(e);if(t)for(const[A,i]of Symbol.iterator in t||Array.isArray(t)?t:new n(t))r.set(A,i);return r}async function Jd(t,e){if(e)if(Array.isArray(e))for(const n of e)await n(t);else await e(t)}const LW=new Set([408,409,425,429,500,502,503,504]),RW=new Set([101,204,205,304]);function JE(t={}){const{fetch:e=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=t;async function A(a){const l=a.error&&a.error.name==="AbortError"&&!a.options.timeout||!1;if(a.options.retry!==!1&&!l){let d;typeof a.options.retry=="number"?d=a.options.retry:d=XE(a.options.method)?0:1;const h=a.response&&a.response.status||500;if(d>0&&(Array.isArray(a.options.retryStatusCodes)?a.options.retryStatusCodes.includes(h):LW.has(h))){const p=typeof a.options.retryDelay=="function"?a.options.retryDelay(a):a.options.retryDelay||0;return p>0&&await new Promise(m=>setTimeout(m,p)),i(a.request,{...a.options,retry:d-1})}}const u=TW(a);throw Error.captureStackTrace&&Error.captureStackTrace(u,i),u}const i=async function(l,u={}){const d={request:l,options:OW(l,u,t.defaults,n),response:void 0,error:void 0};if(d.options.method&&(d.options.method=d.options.method.toUpperCase()),d.options.onRequest&&(await Jd(d,d.options.onRequest),d.options.headers instanceof n||(d.options.headers=new n(d.options.headers||{}))),typeof d.request=="string"&&(d.options.baseURL&&(d.request=CW(d.request,d.options.baseURL)),d.options.query&&(d.request=bW(d.request,d.options.query),delete d.options.query),"query"in d.options&&delete d.options.query,"params"in d.options&&delete d.options.params),d.options.body&&XE(d.options.method))if(IW(d.options.body)){const m=d.options.headers.get("content-type");typeof d.options.body!="string"&&(d.options.body=m==="application/x-www-form-urlencoded"?new URLSearchParams(d.options.body).toString():JSON.stringify(d.options.body)),m||d.options.headers.set("content-type","application/json"),d.options.headers.has("accept")||d.options.headers.set("accept","application/json")}else("pipeTo"in d.options.body&&typeof d.options.body.pipeTo=="function"||typeof d.options.body.pipe=="function")&&("duplex"in d.options||(d.options.duplex="half"));let h;if(!d.options.signal&&d.options.timeout){const m=new r;h=setTimeout(()=>{const v=new Error("[TimeoutError]: The operation was aborted due to timeout");v.name="TimeoutError",v.code=23,m.abort(v)},d.options.timeout),d.options.signal=m.signal}try{d.response=await e(d.request,d.options)}catch(m){return d.error=m,d.options.onRequestError&&await Jd(d,d.options.onRequestError),await A(d)}finally{h&&clearTimeout(h)}if((d.response.body||d.response._bodyInit)&&!RW.has(d.response.status)&&d.options.method!=="HEAD"){const m=(d.options.parseResponse?"json":d.options.responseType)||DW(d.response.headers.get("content-type")||"");switch(m){case"json":{const v=await d.response.text(),B=d.options.parseResponse||eW;d.response._data=B(v);break}case"stream":{d.response._data=d.response.body||d.response._bodyInit;break}default:d.response._data=await d.response[m]()}}return d.options.onResponse&&await Jd(d,d.options.onResponse),!d.options.ignoreResponseError&&d.response.status>=400&&d.response.status<600?(d.options.onResponseError&&await Jd(d,d.options.onResponseError),await A(d)):d.response},o=async function(l,u){return(await i(l,u))._data};return o.raw=i,o.native=(...a)=>e(...a),o.create=(a={},l={})=>JE({...t,...l,defaults:{...t.defaults,...l.defaults,...a}}),o}const jd=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")})(),HW=jd.fetch?(...t)=>jd.fetch(...t):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),PW=jd.Headers,$W=jd.AbortController,KW=JE({fetch:HW,Headers:PW,AbortController:$W});function jE(t=null,e){const n=s.ref(!1),r=s.ref([]),A=s.ref([]),i=s.ref(!1),o=s.ref(!1),a=s.computed(()=>t.modelValue?.length?t.modelValue:t.src?[{type:"",src:t.src}]:A.value);async function l(B){const y=new FormData;y.append("file",B),n.value=!0;const C=await(t.customFetch||KW)(t.endpoint,{method:"POST",...t.customFetch?{}:{headers:{Accept:"application/json",...t.authToken?{Authorization:`Bearer ${t.authToken}`}:{}}},body:y}).catch(F=>{console.error("Error",F)});return n.value=!1,`${t.baseResponsePath||"/api/v1/assets"}/${C.path}`}function u(B){const y=typeof B=="string"?parseInt(B,10):B,w=Array.isArray(t.modelValue)&&t.modelValue.length>0,C=Array.isArray(A.value)&&A.value.length>0;if(C&&y<A.value.length&&A.value.splice(y,1),w){const k=[...t.modelValue];y<k.length&&k.splice(y,1),e?.("update:modelValue",k),t.multiple||e?.("update:src",k[0]?.src||"")}else if(C){const k=t.multiple?A.value:A.value[0];e?.("update:modelValue",k),t.multiple||e?.("update:src",A.value[0]?.src||"")}else e?.("update:modelValue",t.multiple?[]:void 0),e?.("update:src","");r.value.splice(y,1),i.value=!1}function d(B){B.preventDefault(),o.value=!0}function h(B){B.preventDefault(),o.value=!1}function p(B){B.preventDefault(),o.value=!1;const y=B.dataTransfer,w=y&&Array.from(y.files||[]);r.value=w||[]}function m(){t.dropFiles&&(["dragenter","dragover"].forEach(B=>{document.body.addEventListener(B,d,!1)}),["dragleave","drop"].forEach(B=>{document.body.addEventListener(B,h,!1)}),document.body.addEventListener("drop",p,!1))}function v(){t.dropFiles&&(["dragenter","dragover"].forEach(B=>{document.body.removeEventListener(B,d,!1)}),["dragleave","drop"].forEach(B=>{document.body.removeEventListener(B,h,!1)}),document.body.removeEventListener("drop",p,!1))}return s.onMounted(()=>{m()}),s.onBeforeUnmount(()=>{v()}),{pending:n,files:r,dataUrls:A,imgLoaded:i,isDragging:o,thumbnails:a,uploadFile:l,removeFile:u,dragStart:d,dragStop:h,dragDrop:p,setupDragAndDrop:m,cleanupDragAndDrop:v}}const zW=["src"],WW=["onClick"],GW=["onClick"],YW=["for"],qW=["innerHTML"],XW={key:0,class:"file-upload__loading-spinner"},JW=s.defineComponent({__name:"file-upload",props:{modelValue:{type:Array,default:[]},src:{type:String},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String},maxFileSize:{type:Number,default:0},endpoint:{type:String,default:""},toDataUrl:{type:Boolean,default:!0},authToken:{type:String,default:""},customFetch:null,baseResponsePath:{type:String,default:"/api/v1/assets"},enablePreview:{type:Boolean,default:!0},previewWidth:{type:Number,default:0},dropFiles:{type:Boolean,default:!1}},emits:["update:modelValue","update:src"],setup(t,{emit:e}){const n=t,r=e,{pending:A,files:i,dataUrls:o,isDragging:a,thumbnails:l,uploadFile:u,removeFile:d}=jE(n,r);return s.watch(()=>i.value,async h=>{o.value=await Promise.all(h.map(async p=>({src:n.toDataUrl?await Xc(p):await u(p),type:p.type})))},{deep:!0}),s.watch(()=>o.value,async h=>{const p=n.multiple?h:h[0];r("update:modelValue",p),n.multiple||r("update:src",h[0]&&h[0].src)},{deep:!0}),(h,p)=>{const m=s.resolveComponent("svg-icon"),v=s.resolveComponent("input-file");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["file-upload",{"has-dragging":t.dropFiles,"is-dragging":s.unref(a)}])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(l),(B,y)=>(s.openBlock(),s.createElementBlock("div",{key:B.src,class:s.normalizeClass(t.enablePreview?"file-upload__thumbnail":"file-upload__reset")},[t.enablePreview?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createElementVNode("img",{src:`${B.src}${t.previewWidth?`?width=${t.previewWidth}`:""}`,class:"img-thumbnail rounded"},null,8,zW),s.createElementVNode("button",{onClick:s.withModifiers(w=>s.unref(d)(y),["prevent"]),class:"btn btn--close"},[s.createVNode(m,{symbol:"x"})],8,WW)],64)):(s.openBlock(),s.createElementBlock("button",{key:1,onClick:s.withModifiers(w=>s.unref(d)(y),["prevent"]),class:"btn btn--close btn-outline-contrast"},[s.createVNode(m,{symbol:"x"})],8,GW))],2))),128)),s.createVNode(v,{modelValue:s.unref(i),"onUpdate:modelValue":p[0]||(p[0]=B=>s.isRef(i)?i.value=B:null),id:t.id,name:t.name,accept:t.accept,"max-file-size":t.maxFileSize,class:"d-none"},null,8,["modelValue","id","name","accept","max-file-size"]),s.createElementVNode("label",{for:t.id,class:"file-upload__label"},[s.renderSlot(h.$slots,"button",{},()=>[s.createElementVNode("span",{class:"btn btn-outline-contrast",innerHTML:t.label||h.$t("common.selectFile")},null,8,qW)]),s.createVNode(s.Transition,{name:"fade"},{default:s.withCtx(()=>[s.unref(A)?(s.openBlock(),s.createElementBlock("span",XW,[...p[1]||(p[1]=[s.createElementVNode("span",{class:"spinner-border",role:"status"},[s.createElementVNode("span",{class:"visually-hidden"},"Loading...")],-1)])])):s.createCommentVNode("",!0)]),_:1})],8,YW)],2)}}}),jW={class:"upload-group"},ZW=["innerHTML"],VW={class:"upload-group__list"},e8={class:"img-container"},t8=["src"],n8=["onClick"],r8={role:"button",class:"img-thumbnail d-flex justify-content-center align-items-center"},A8={role:"button",class:"img-thumbnail d-flex justify-content-center align-items-center"},ZE=s.defineComponent({__name:"upload-group",props:{modelValue:{type:Array,default:()=>[]},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},accept:{type:String},maxFileSize:{type:Number,default:0},endpoint:{type:String,default:""},authToken:{type:String,default:""},customFetch:null,baseResponsePath:{type:String,default:"/api/v1/assets"},previewWidth:{type:Number,default:0},useImageUpload:{type:Boolean,default:!1},maxImageWidth:{type:Number,default:0},aspectRatio:Number},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.ref(""),i=s.computed({get(){return n.modelValue},set(a){r("update:modelValue",a)}});function o(a){i.value.splice(a,1),r("update:modelValue",i.value)}return s.watch(A,async(a,l)=>{a&&l!==a&&(r("update:modelValue",[...i.value,a]),await s.nextTick(),A.value="")}),(a,l)=>{const u=s.resolveComponent("svg-icon"),d=s.resolveComponent("image-upload"),h=s.resolveComponent("file-upload"),p=s.resolveComponent("sortable-list");return s.openBlock(),s.createElementBlock("div",jW,[t.label?(s.openBlock(),s.createElementBlock("label",{key:0,innerHTML:s.unref(ur)(t.label)},null,8,ZW)):s.createCommentVNode("",!0),s.createElementVNode("div",VW,[s.createVNode(p,{modelValue:i.value,"onUpdate:modelValue":l[2]||(l[2]=m=>i.value=m),vertical:!1,class:"mb-3"},{"list-item":s.withCtx(({item:m,index:v})=>[s.createElementVNode("div",e8,[s.createElementVNode("img",{src:`${m}${t.previewWidth?`?width=${t.previewWidth}`:""}`,class:"img-thumbnail"},null,8,t8),s.createElementVNode("button",{onClick:s.withModifiers(B=>o(v),["prevent"]),class:"btn btn--close"},[s.createVNode(u,{symbol:"x"})],8,n8)])]),"list-append":s.withCtx(()=>[t.useImageUpload?(s.openBlock(),s.createBlock(d,{key:0,src:A.value,"onUpdate:src":l[0]||(l[0]=m=>A.value=m),endpoint:t.endpoint,"custom-fetch":t.customFetch,"to-data-url":!t.endpoint,"auth-token":t.authToken,disabled:t.disabled,"base-response-path":t.baseResponsePath,accept:t.accept,"max-file-size":t.maxFileSize,"max-image-width":t.maxImageWidth,"enable-preview":!1,"aspect-ratio":t.aspectRatio},{button:s.withCtx(()=>[s.createElementVNode("span",r8,[s.createVNode(u,{symbol:"plus"})])]),_:1},8,["src","endpoint","custom-fetch","to-data-url","auth-token","disabled","base-response-path","accept","max-file-size","max-image-width","aspect-ratio"])):(s.openBlock(),s.createBlock(h,{key:1,src:A.value,"onUpdate:src":l[1]||(l[1]=m=>A.value=m),multiple:!1,endpoint:t.endpoint,"custom-fetch":t.customFetch,"to-data-url":!t.endpoint,"auth-token":t.authToken,disabled:t.disabled,"base-response-path":t.baseResponsePath,accept:t.accept,"max-file-size":t.maxFileSize,"max-image-width":t.maxImageWidth},{button:s.withCtx(()=>[s.createElementVNode("span",A8,[s.createVNode(u,{symbol:"plus"})])]),_:1},8,["src","endpoint","custom-fetch","to-data-url","auth-token","disabled","base-response-path","accept","max-file-size","max-image-width"]))]),_:1},8,["modelValue"])])])}}}),i8={class:"asset-uploader"},o8=["innerHTML"],s8=s.defineComponent({__name:"asset-uploader",props:{modelValue:{type:Array,default:()=>[]},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},type:{type:String,default:""},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},accept:{type:String},maxFileSize:{type:Number,default:0},endpoint:{type:String,default:""},authToken:{type:String,default:""},customFetch:null,mediaTypeMap:{type:Object,default:()=>({svg:"Svg",png:"Image",jpg:"Image"})},baseResponsePath:{type:String,default:"/api/v1/assets"},previewWidth:{type:Number,default:0},useImageUpload:{type:Boolean,default:!1},maxImageWidth:{type:Number,default:0},aspectRatio:Number},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.computed({get(){return n.modelValue.map(i=>i.src)},set(i){r("update:modelValue",i.map((o,a)=>({mediaType:n.modelValue[a]&&n.modelValue[a].mediaType||o.includes("data:image")?o.includes("data:image/svg")?"Svg":"Image":n.mediaTypeMap[o.split(".")[1]],src:o,name:n.modelValue[a]&&n.modelValue[a].name||`${n.name}-${a}`,...n.type?{type:n.type}:{}})))}});return(i,o)=>(s.openBlock(),s.createElementBlock("div",i8,[t.label?(s.openBlock(),s.createElementBlock("label",{key:0,innerHTML:s.unref(ur)(t.label)},null,8,o8)):s.createCommentVNode("",!0),s.createVNode(ZE,{modelValue:A.value,"onUpdate:modelValue":o[0]||(o[0]=a=>A.value=a),endpoint:t.endpoint,"custom-fetch":t.customFetch,"auth-token":t.authToken,disabled:t.disabled,"preview-width":t.previewWidth,"base-response-path":t.baseResponsePath,accept:t.accept,"max-file-size":t.maxFileSize,"use-image-upload":t.useImageUpload,"max-image-width":t.maxImageWidth,"aspect-ratio":t.aspectRatio},null,8,["modelValue","endpoint","custom-fetch","auth-token","disabled","preview-width","base-response-path","accept","max-file-size","use-image-upload","max-image-width","aspect-ratio"])]))}}),a8={class:"carousel d-flex"},l8=["onClick"],VE=s.defineComponent({__name:"base-carousel",props:{modelValue:{type:Number,default:-1},config:{type:Object,default:null},messages:{type:Object,default:{}},items:{type:Array,default:[]},navigation:{type:Boolean,default:!0}},emits:["update:modelValue","select"],setup(t,{emit:e}){const n=e,r=s.ref(),A=s.ref();function i(){r.value.scrollTo({top:0,left:r.value.scrollLeft-r.value.clientWidth>0?r.value.scrollLeft-r.value.clientWidth:0,behavior:"smooth"})}function o(){r.value.scrollTo({top:0,left:r.value.scrollLeft-r.value.clientWidth<=A.value.clientWidth?r.value.scrollLeft+r.value.clientWidth:A.value.clientWidth,behavior:"smooth"})}function a(l){n("update:modelValue",l)}return(l,u)=>{const d=s.resolveComponent("svg-icon");return s.openBlock(),s.createElementBlock("div",a8,[t.navigation?(s.openBlock(),s.createElementBlock("button",{key:0,class:"carousel__control btn btn-link text-light",type:"button",onClick:s.withModifiers(i,["prevent","stop"])},[s.createVNode(d,{symbol:"chevron-left"})])):s.createCommentVNode("",!0),s.createElementVNode("div",{ref_key:"viewport",ref:r,class:"carousel__viewport flex-grow-1"},[s.createElementVNode("div",{ref_key:"track",ref:A,class:"carousel__track d-flex justify-center align-items-center"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.items,(h,p)=>s.renderSlot(l.$slots,"carousel-item",{key:h.src,item:h,index:p},()=>[s.createElementVNode("div",{class:s.normalizeClass(["carousel__item",p===t.modelValue?"selected":""]),onClick:m=>a(p)},s.toDisplayString(h),11,l8)])),128))],512)],512),t.navigation?(s.openBlock(),s.createElementBlock("button",{key:1,class:"carousel__control btn btn-link text-light",type:"button",onClick:s.withModifiers(o,["prevent","stop"])},[s.createVNode(d,{symbol:"chevron-right"})])):s.createCommentVNode("",!0)])}}}),c8={class:"media-thumbnails"},u8=["onClick"],d8={class:"img-container"},f8=s.defineComponent({__name:"media-thumbnails",props:{modelValue:{default:null},config:{type:Object,default:null},messages:{type:Object,default:{}},assets:{type:Array,default:[]}},emits:["update:modelValue","select"],setup(t,{emit:e}){const n=e,r=s.ref(-1);function A(i){r.value=i,n("update:modelValue",i),n("select",i)}return(i,o)=>{const a=s.resolveComponent("base-image");return s.openBlock(),s.createElementBlock("div",c8,[s.createVNode(VE,{items:t.assets},{"carousel-item":s.withCtx(l=>[s.createElementVNode("a",{role:"button",class:s.normalizeClass(["carousel__item media-thumbnails__thumbnail",l.index===t.modelValue||l.index===r.value?"is-active":""]),onClick:u=>A(l.index)},[s.createElementVNode("div",d8,[s.createVNode(a,{src:l.item.thumbnail||l.item.src,class:"img-fluid"},null,8,["src"])])],10,u8)]),_:1},8,["items"])])}}}),h8={class:"progress-steps"},p8={class:"progress-steps__list"},m8={class:"progress-step"},g8=["checked","id","value","disabled","read-only","required","onChange"],v8=["for"],w8=["innerHTML"],B8=["for"],y8=["innerHTML"],C8=s.defineComponent({__name:"progress-steps",props:{modelValue:{type:Number,default:0},progress:{type:Number,default:0},steps:{type:Array},label:{type:String,default:""},reveal:{type:Boolean,default:!1}},emits:["update:modelValue","update:progress"],setup(t,{emit:e}){const n=t,r=e;function A(i){r("update:modelValue",i),i>=n.progress&&r("update:progress",i)}return(i,o)=>(s.openBlock(),s.createElementBlock("div",h8,[s.createElementVNode("ul",p8,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.steps,(a,l)=>(s.openBlock(),s.createElementBlock("li",{key:l,class:s.normalizeClass(["progress-steps__step",{"progress-steps__step--disabled":l>t.progress+(t.reveal?1:0),"progress-steps__step--active":l===(t.modelValue||0)}])},[s.renderSlot(i.$slots,"step",{},()=>[s.createElementVNode("div",m8,[s.createElementVNode("input",{type:"radio",checked:l<=(t.progress||0),id:`step-${l}`,name:"step",class:"form-check-input",value:a.value,disabled:a.disabled||l>t.progress+(t.reveal?1:0),"read-only":a.readOnly,required:a.required,onChange:u=>A(l)},null,40,g8),s.createElementVNode("label",{for:`step-${l}`},[s.renderSlot(i.$slots,"button",{step:a},()=>[s.createElementVNode("span",{class:"btn rounded-circle",innerHTML:s.unref(ur)(a.text||"")},null,8,w8)])],8,v8),s.createElementVNode("label",{for:`step-${l}`},[s.renderSlot(i.$slots,"label",{step:a},()=>[s.createElementVNode("span",{class:"form-check-label",innerHTML:s.unref(ur)(a.label||"")},null,8,y8)])],8,B8)])])],2))),128))])]))}}),b8={class:"hint-system"},E8=["innerHTML"],k8=["innerHTML"],S8={key:1,class:"hint-system__hint-content"},x8=["disabled"],F8=s.defineComponent({__name:"hint-system",props:{modelValue:{type:Number,default:0},hints:{type:Array,default:()=>[]},penalty:{type:Number,default:1},maxHints:{type:Number,default:void 0},htmlContent:{type:Boolean,default:!1},label:{type:String,default:"Show hint"},description:{type:String,default:""}},emits:["update:modelValue","hint-revealed"],setup(t,{emit:e}){const n=t,r=e,A=s.ref(n.modelValue);s.watch(()=>n.modelValue,u=>{A.value=u});const i=s.computed(()=>n.maxHints!==void 0?n.maxHints:n.hints.length),o=s.computed(()=>A.value<i.value),a=s.computed(()=>n.hints.slice(0,A.value));function l(){if(!o.value)return;const u=A.value;A.value++,r("update:modelValue",A.value),r("hint-revealed",{hint:n.hints[u],index:u,penaltyTotal:A.value*n.penalty})}return(u,d)=>(s.openBlock(),s.createElementBlock("div",b8,[t.description?(s.openBlock(),s.createElementBlock("div",{key:0,innerHTML:s.unref(ur)(t.description),class:"hint-system__description"},null,8,E8)):s.createCommentVNode("",!0),a.value.length?(s.openBlock(),s.createBlock(s.TransitionGroup,{key:1,name:"hint-reveal",tag:"ol",class:"hint-system__list"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(h,p)=>(s.openBlock(),s.createElementBlock("li",{key:p,class:"hint-system__hint"},[s.renderSlot(u.$slots,"hint",{hint:h,index:p,isNew:p===A.value-1},()=>[t.htmlContent?(s.openBlock(),s.createElementBlock("div",{key:0,class:"hint-system__hint-content",innerHTML:s.unref(ur)(h.content||"")},null,8,k8)):(s.openBlock(),s.createElementBlock("div",S8,s.toDisplayString(h.content),1))])]))),128))]),_:3})):s.createCommentVNode("",!0),o.value?s.renderSlot(u.$slots,"trigger",{key:2,revealNext:l,canReveal:o.value,revealedCount:A.value,total:i.value},()=>[s.createElementVNode("button",{type:"button",class:"hint-system__trigger d-block w-100 text-center",disabled:!o.value,onClick:l},s.toDisplayString(t.label),9,x8)]):s.createCommentVNode("",!0)]))}}),Q8=["id","popover"],Lg=s.defineComponent({__name:"popover-dialog",props:{modelValue:{type:Boolean,default:!1},type:{type:String,default:"auto"},id:{type:String,default:()=>`popover-dialog-${Math.random().toString(36).substr(2,9)}`},title:{type:String,default:""},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1},classes:{type:String,default:""},hover:{type:Boolean,default:!1},hoverDelay:{type:Number,default:400},closeTimeout:{type:Number,default:0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.ref(),i=s.ref(),o=s.ref(!1),a=s.computed(()=>"ontouchstart"in window||navigator.maxTouchPoints>0);function l(){clearTimeout(i.value),n.hover&&A.value?.showPopover()}function u(){o.value=!0,clearTimeout(i.value),l()}function d(){o.value=!1,(n.hover||n.closeTimeout)&&(i.value=setTimeout(()=>{A.value?.hidePopover()},n.closeTimeout||n.hoverDelay))}s.watch(()=>n.modelValue,(p,m)=>{p&&!m?A.value?.matches(":popover-open")||A.value?.showPopover():!p&&m&&A.value?.matches(":popover-open")&&A.value?.hidePopover()});function h(p){p.newState==="open"?(n.closeTimeout&&!o.value&&(clearTimeout(i.value),i.value=setTimeout(()=>{o.value||A.value?.hidePopover()},n.closeTimeout)),n.modelValue||r("update:modelValue",!0)):p.newState==="closed"&&(o.value=!1,n.modelValue&&r("update:modelValue",!1))}return s.onMounted(()=>{if(A.value?.addEventListener("toggle",h),n.modelValue&&A.value?.showPopover(),!a.value){A.value?.addEventListener("mouseenter",u),A.value?.addEventListener("mouseleave",d);const p=document.querySelector(`[popovertarget="${n.id}"]`);p&&(p.addEventListener("mouseenter",u),p.addEventListener("mouseleave",d))}}),s.onBeforeUnmount(()=>{if(clearTimeout(i.value),A.value?.removeEventListener("toggle",h),!a.value){A.value?.removeEventListener("mouseenter",u),A.value?.removeEventListener("mouseleave",d);const p=document.querySelector(`[popovertarget="${n.id}"]`);p&&(p.removeEventListener("mouseenter",u),p.removeEventListener("mouseleave",d))}}),(p,m)=>(s.openBlock(),s.createElementBlock("span",{class:"popover-dialog",id:t.id,popover:t.type,ref_key:"popover",ref:A},[s.renderSlot(p.$slots,"default",{},()=>[m[0]||(m[0]=s.createTextVNode(" Popover content goes here. ",-1))])],8,Q8))}}),T8={class:"popover-tooltip"},M8=["popovertarget","disabled","aria-describedby","aria-label"],I8={class:"popover-tooltip__content d-flex flex-column"},U8={key:0,class:"popover-tooltip__header d-flex p-3 border-bottom"},_8=["innerHTML"],D8={class:"popover-tooltip__body"},O8=["innerHTML"],N8={key:1,class:"popover-tooltip__footer d-flex p-3 border-top"},L8=s.defineComponent({__name:"popover-tooltip",props:{modelValue:{type:Boolean,default:!1},id:{type:String,default:()=>`popover-tooltip-${Math.random().toString(36).substr(2,9)}`},size:{type:String},exclusive:{type:Boolean,default:!0},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1},title:{type:String,default:""},content:{type:String,default:""},hover:{type:Boolean,default:!0},hoverDelay:{type:Number,default:400},disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:""}},emits:["update:modelValue","confirm","cancel"],setup(t,{emit:e}){const n=t,r=e,A=qc(()=>n.title),i=qc(()=>n.content),o=s.computed({get(){return n.modelValue},set(u){r("update:modelValue",u)}}),a=s.ref(),l=s.ref();return(u,d)=>(s.openBlock(),s.createElementBlock("span",T8,[s.createElementVNode("button",{type:"button",popovertarget:t.id,disabled:t.disabled,"aria-describedby":t.id,"aria-label":t.ariaLabel||u.$te("common.moreInfo")?u.$t("common.moreInfo"):void 0,ref_key:"trigger",ref:a},[s.renderSlot(u.$slots,"button",{},()=>[d[3]||(d[3]=s.createElementVNode("span",{class:"popover-tooltip__trigger"}," i ",-1))])],8,M8),s.createVNode(Lg,{id:t.id,modelValue:o.value,"onUpdate:modelValue":d[2]||(d[2]=h=>o.value=h),hover:t.hover,"hover-delay":t.hoverDelay,ref_key:"dialog",ref:l,role:"tooltip",class:s.normalizeClass(t.size?`popover-tooltip--${t.size}`:"")},{default:s.withCtx(()=>[s.createElementVNode("div",I8,[t.header?(s.openBlock(),s.createElementBlock("div",U8,[t.title?(s.openBlock(),s.createElementBlock("h5",{key:0,class:"popover-tooltip__title",innerHTML:s.unref(A)},null,8,_8)):s.createCommentVNode("",!0),s.createElementVNode("button",{type:"button",class:"btn-close ms-auto border-radius-none","aria-label":"Close",onClick:d[0]||(d[0]=h=>o.value=!1)})])):s.createCommentVNode("",!0),s.createElementVNode("div",D8,[s.renderSlot(u.$slots,"default",{},()=>[s.createElementVNode("span",{innerHTML:s.unref(i)},null,8,O8)])]),t.footer?(s.openBlock(),s.createElementBlock("div",N8,[s.renderSlot(u.$slots,"footer"),s.createElementVNode("button",{type:"button",class:"btn ms-auto",onClick:d[1]||(d[1]=h=>o.value=!1)},s.toDisplayString(u.$t("common.close")),1)])):s.createCommentVNode("",!0)])]),_:3},8,["id","modelValue","hover","hover-delay","class"])]))}}),R8={class:"popover-notification__header d-flex justify-content-between mb-2"},H8={class:"popover-notification__title"},P8=["onClick"],$8=["innerHTML"],K8=s.defineComponent({__name:"popover-notifications",props:{modelValue:{type:Boolean,default:!1},id:{type:String,default:()=>`popover-notifications-${Math.random().toString(36).substr(2,9)}`},items:{type:Array,default:()=>[]},debounceItem:{type:Number,default:0},closeTimeout:{type:Number,default:8e3},collapsible:{type:Boolean,default:!0}},setup(t,{expose:e}){const n=t,r=s.ref([]),A=s.ref([]),i=s.computed(()=>r.value.map(p=>({...p,content:ur(p.content||"")}))),o=s.ref(!1),a=s.computed(()=>n.collapsible&&r.value.length>3);function l(p,m){r.value=r.value.filter(v=>v.id!==p.id)}s.watch(()=>n.items,(p,m)=>{const v=p.filter(B=>!m.some(y=>y.id===B.id));A.value=[...A.value,...v]});function u(){setTimeout(()=>{console.log("Queueing item:",A.value);const p=A.value.shift();p&&r.value.push({...p,closeTimeout:n.closeTimeout,visible:!0}),A.value.length>0&&u()},r.value.length?n.debounceItem:0)}function d(p){a.value&&(p.preventDefault(),p.stopPropagation(),o.value=!o.value)}function h(p){console.log("Adding item:",p),A.value.push(p),u()}return s.onMounted(()=>{A.value=n.items,A.value.length>3&&(o.value=!0),u()}),e({addItem:h}),(p,m)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["popover-notifications",{"popover-notifications--collapsed":o.value}]),style:{anchorName:"--popover-notifications"}},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value,(v,B)=>(s.openBlock(),s.createBlock(Lg,{key:v.id,id:v.id,"close-timeout":v.closeTimeout,type:"manual",class:"popover-notification",modelValue:v.visible,"onUpdate:modelValue":[y=>v.visible=y,y=>l(v)],onClick:d},{default:s.withCtx(()=>[s.renderSlot(p.$slots,"item",{item:v},()=>[s.createElementVNode("div",R8,[s.createElementVNode("span",H8,s.toDisplayString(v.title),1),s.createElementVNode("button",{type:"button",class:"btn btn-close p-0",onClick:s.withModifiers(y=>v.visible=!1,["stop"]),"aria-label":"Close notification"},null,8,P8)]),s.createElementVNode("span",{innerHTML:v.content},null,8,$8)])]),_:2},1032,["id","close-timeout","modelValue","onUpdate:modelValue"]))),128))],2))}});var Rg=function(t,e){return Rg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var A in r)Object.prototype.hasOwnProperty.call(r,A)&&(n[A]=r[A])},Rg(t,e)};function UA(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Rg(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Hg=function(){return Hg=Object.assign||function(e){for(var n,r=1,A=arguments.length;r<A;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Hg.apply(this,arguments)};function wr(t,e,n,r){function A(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function a(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):A(d.value).then(a,l)}u((r=r.apply(t,[])).next())})}function rr(t,e){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,A,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(d){return l([u,d])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,A&&(i=u[0]&2?A.return:u[0]?A.throw||((i=A.return)&&i.call(A),0):A.next)&&!(i=i.call(A,u[1])).done)return i;switch(A=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,A=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=e.call(t,n)}catch(d){u=[6,d],A=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Zd(t,e,n){if(arguments.length===2)for(var r=0,A=e.length,i;r<A;r++)(i||!(r in e))&&(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||e)}for(var Ni=(function(){function t(e,n,r,A){this.left=e,this.top=n,this.width=r,this.height=A}return t.prototype.add=function(e,n,r,A){return new t(this.left+e,this.top+n,this.width+r,this.height+A)},t.fromClientRect=function(e,n){return new t(n.left+e.windowBounds.left,n.top+e.windowBounds.top,n.width,n.height)},t.fromDOMRectList=function(e,n){var r=Array.from(n).find(function(A){return A.width!==0});return r?new t(r.left+e.windowBounds.left,r.top+e.windowBounds.top,r.width,r.height):t.EMPTY},t.EMPTY=new t(0,0,0,0),t})(),Vd=function(t,e){return Ni.fromClientRect(t,e.getBoundingClientRect())},z8=function(t){var e=t.body,n=t.documentElement;if(!e||!n)throw new Error("Unable to get document size");var r=Math.max(Math.max(e.scrollWidth,n.scrollWidth),Math.max(e.offsetWidth,n.offsetWidth),Math.max(e.clientWidth,n.clientWidth)),A=Math.max(Math.max(e.scrollHeight,n.scrollHeight),Math.max(e.offsetHeight,n.offsetHeight),Math.max(e.clientHeight,n.clientHeight));return new Ni(0,0,r,A)},ef=function(t){for(var e=[],n=0,r=t.length;n<r;){var A=t.charCodeAt(n++);if(A>=55296&&A<=56319&&n<r){var i=t.charCodeAt(n++);(i&64512)===56320?e.push(((A&1023)<<10)+(i&1023)+65536):(e.push(A),n--)}else e.push(A)}return e},pn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var n=t.length;if(!n)return"";for(var r=[],A=-1,i="";++A<n;){var o=t[A];o<=65535?r.push(o):(o-=65536,r.push((o>>10)+55296,o%1024+56320)),(A+1===n||r.length>16384)&&(i+=String.fromCharCode.apply(String,r),r.length=0)}return i},ek="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",W8=typeof Uint8Array>"u"?[]:new Uint8Array(256),tf=0;tf<ek.length;tf++)W8[ek.charCodeAt(tf)]=tf;for(var tk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ic=typeof Uint8Array>"u"?[]:new Uint8Array(256),nf=0;nf<tk.length;nf++)ic[tk.charCodeAt(nf)]=nf;for(var G8=function(t){var e=t.length*.75,n=t.length,r,A=0,i,o,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var u=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),d=Array.isArray(u)?u:new Uint8Array(u);for(r=0;r<n;r+=4)i=ic[t.charCodeAt(r)],o=ic[t.charCodeAt(r+1)],a=ic[t.charCodeAt(r+2)],l=ic[t.charCodeAt(r+3)],d[A++]=i<<2|o>>4,d[A++]=(o&15)<<4|a>>2,d[A++]=(a&3)<<6|l&63;return u},Y8=function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n.push(t[r+1]<<8|t[r]);return n},q8=function(t){for(var e=t.length,n=[],r=0;r<e;r+=4)n.push(t[r+3]<<24|t[r+2]<<16|t[r+1]<<8|t[r]);return n},xs=5,Pg=11,$g=2,X8=Pg-xs,nk=65536>>xs,J8=1<<xs,Kg=J8-1,j8=1024>>xs,Z8=nk+j8,V8=Z8,e6=32,t6=V8+e6,n6=65536>>Pg,r6=1<<X8,A6=r6-1,rk=function(t,e,n){return t.slice?t.slice(e,n):new Uint16Array(Array.prototype.slice.call(t,e,n))},i6=function(t,e,n){return t.slice?t.slice(e,n):new Uint32Array(Array.prototype.slice.call(t,e,n))},o6=function(t,e){var n=G8(t),r=Array.isArray(n)?q8(n):new Uint32Array(n),A=Array.isArray(n)?Y8(n):new Uint16Array(n),i=24,o=rk(A,i/2,r[4]/2),a=r[5]===2?rk(A,(i+r[4])/2):i6(r,Math.ceil((i+r[4])/4));return new s6(r[0],r[1],r[2],r[3],o,a)},s6=(function(){function t(e,n,r,A,i,o){this.initialValue=e,this.errorValue=n,this.highStart=r,this.highValueIndex=A,this.index=i,this.data=o}return t.prototype.get=function(e){var n;if(e>=0){if(e<55296||e>56319&&e<=65535)return n=this.index[e>>xs],n=(n<<$g)+(e&Kg),this.data[n];if(e<=65535)return n=this.index[nk+(e-55296>>xs)],n=(n<<$g)+(e&Kg),this.data[n];if(e<this.highStart)return n=t6-n6+(e>>Pg),n=this.index[n],n+=e>>xs&A6,n=this.index[n],n=(n<<$g)+(e&Kg),this.data[n];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t})(),Ak="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a6=typeof Uint8Array>"u"?[]:new Uint8Array(256),rf=0;rf<Ak.length;rf++)a6[Ak.charCodeAt(rf)]=rf;var l6="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",ik=50,c6=1,ok=2,sk=3,u6=4,d6=5,ak=7,lk=8,ck=9,To=10,zg=11,uk=12,Wg=13,f6=14,oc=15,Gg=16,Af=17,sc=18,h6=19,dk=20,Yg=21,ac=22,qg=23,ba=24,Hr=25,lc=26,cc=27,Ea=28,p6=29,Fs=30,m6=31,of=32,sf=33,Xg=34,Jg=35,jg=36,uc=37,Zg=38,af=39,lf=40,Vg=41,fk=42,g6=43,v6=[9001,65288],hk="!",wt="×",cf="÷",ev=o6(l6),Li=[Fs,jg],tv=[c6,ok,sk,d6],pk=[To,lk],mk=[cc,lc],w6=tv.concat(pk),gk=[Zg,af,lf,Xg,Jg],B6=[oc,Wg],y6=function(t,e){e===void 0&&(e="strict");var n=[],r=[],A=[];return t.forEach(function(i,o){var a=ev.get(i);if(a>ik?(A.push(!0),a-=ik):A.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(i)!==-1)return r.push(o),n.push(Gg);if(a===u6||a===zg){if(o===0)return r.push(o),n.push(Fs);var l=n[o-1];return w6.indexOf(l)===-1?(r.push(r[o-1]),n.push(l)):(r.push(o),n.push(Fs))}if(r.push(o),a===m6)return n.push(e==="strict"?Yg:uc);if(a===fk||a===p6)return n.push(Fs);if(a===g6)return i>=131072&&i<=196605||i>=196608&&i<=262141?n.push(uc):n.push(Fs);n.push(a)}),[r,n,A]},nv=function(t,e,n,r){var A=r[n];if(Array.isArray(t)?t.indexOf(A)!==-1:t===A)for(var i=n;i<=r.length;){i++;var o=r[i];if(o===e)return!0;if(o!==To)break}if(A===To)for(var i=n;i>0;){i--;var a=r[i];if(Array.isArray(t)?t.indexOf(a)!==-1:t===a)for(var l=n;l<=r.length;){l++;var o=r[l];if(o===e)return!0;if(o!==To)break}if(a!==To)break}return!1},vk=function(t,e){for(var n=t;n>=0;){var r=e[n];if(r===To)n--;else return r}return 0},C6=function(t,e,n,r,A){if(n[r]===0)return wt;var i=r-1;if(Array.isArray(A)&&A[i]===!0)return wt;var o=i-1,a=i+1,l=e[i],u=o>=0?e[o]:0,d=e[a];if(l===ok&&d===sk)return wt;if(tv.indexOf(l)!==-1)return hk;if(tv.indexOf(d)!==-1||pk.indexOf(d)!==-1)return wt;if(vk(i,e)===lk)return cf;if(ev.get(t[i])===zg||(l===of||l===sf)&&ev.get(t[a])===zg||l===ak||d===ak||l===ck||[To,Wg,oc].indexOf(l)===-1&&d===ck||[Af,sc,h6,ba,Ea].indexOf(d)!==-1||vk(i,e)===ac||nv(qg,ac,i,e)||nv([Af,sc],Yg,i,e)||nv(uk,uk,i,e))return wt;if(l===To)return cf;if(l===qg||d===qg)return wt;if(d===Gg||l===Gg)return cf;if([Wg,oc,Yg].indexOf(d)!==-1||l===f6||u===jg&&B6.indexOf(l)!==-1||l===Ea&&d===jg||d===dk||Li.indexOf(d)!==-1&&l===Hr||Li.indexOf(l)!==-1&&d===Hr||l===cc&&[uc,of,sf].indexOf(d)!==-1||[uc,of,sf].indexOf(l)!==-1&&d===lc||Li.indexOf(l)!==-1&&mk.indexOf(d)!==-1||mk.indexOf(l)!==-1&&Li.indexOf(d)!==-1||[cc,lc].indexOf(l)!==-1&&(d===Hr||[ac,oc].indexOf(d)!==-1&&e[a+1]===Hr)||[ac,oc].indexOf(l)!==-1&&d===Hr||l===Hr&&[Hr,Ea,ba].indexOf(d)!==-1)return wt;if([Hr,Ea,ba,Af,sc].indexOf(d)!==-1)for(var h=i;h>=0;){var p=e[h];if(p===Hr)return wt;if([Ea,ba].indexOf(p)!==-1)h--;else break}if([cc,lc].indexOf(d)!==-1)for(var h=[Af,sc].indexOf(l)!==-1?o:i;h>=0;){var p=e[h];if(p===Hr)return wt;if([Ea,ba].indexOf(p)!==-1)h--;else break}if(Zg===l&&[Zg,af,Xg,Jg].indexOf(d)!==-1||[af,Xg].indexOf(l)!==-1&&[af,lf].indexOf(d)!==-1||[lf,Jg].indexOf(l)!==-1&&d===lf||gk.indexOf(l)!==-1&&[dk,lc].indexOf(d)!==-1||gk.indexOf(d)!==-1&&l===cc||Li.indexOf(l)!==-1&&Li.indexOf(d)!==-1||l===ba&&Li.indexOf(d)!==-1||Li.concat(Hr).indexOf(l)!==-1&&d===ac&&v6.indexOf(t[a])===-1||Li.concat(Hr).indexOf(d)!==-1&&l===sc)return wt;if(l===Vg&&d===Vg){for(var m=n[i],v=1;m>0&&(m--,e[m]===Vg);)v++;if(v%2!==0)return wt}return l===of&&d===sf?wt:cf},b6=function(t,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var n=y6(t,e.lineBreak),r=n[0],A=n[1],i=n[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(A=A.map(function(a){return[Hr,Fs,fk].indexOf(a)!==-1?uc:a}));var o=e.wordBreak==="keep-all"?i.map(function(a,l){return a&&t[l]>=19968&&t[l]<=40959}):void 0;return[r,A,o]},E6=(function(){function t(e,n,r,A){this.codePoints=e,this.required=n===hk,this.start=r,this.end=A}return t.prototype.slice=function(){return pn.apply(void 0,this.codePoints.slice(this.start,this.end))},t})(),k6=function(t,e){var n=ef(t),r=b6(n,e),A=r[0],i=r[1],o=r[2],a=n.length,l=0,u=0;return{next:function(){if(u>=a)return{done:!0,value:null};for(var d=wt;u<a&&(d=C6(n,i,A,++u,o))===wt;);if(d!==wt||u===a){var h=new E6(n,d,l,u);return l=u,{value:h,done:!1}}return{done:!0,value:null}}}},S6=1,x6=2,dc=4,wk=8,uf=10,Bk=47,fc=92,F6=9,Q6=32,df=34,hc=61,T6=35,M6=36,I6=37,ff=39,hf=40,pc=41,U6=95,xr=45,_6=33,D6=60,O6=62,N6=64,L6=91,R6=93,H6=61,P6=123,pf=63,$6=125,yk=124,K6=126,z6=128,Ck=65533,rv=42,Qs=43,W6=44,G6=58,Y6=59,mc=46,q6=0,X6=8,J6=11,j6=14,Z6=31,V6=127,li=-1,bk=48,Ek=97,kk=101,eG=102,tG=117,nG=122,Sk=65,xk=69,Fk=70,rG=85,AG=90,Ar=function(t){return t>=bk&&t<=57},iG=function(t){return t>=55296&&t<=57343},ka=function(t){return Ar(t)||t>=Sk&&t<=Fk||t>=Ek&&t<=eG},oG=function(t){return t>=Ek&&t<=nG},sG=function(t){return t>=Sk&&t<=AG},aG=function(t){return oG(t)||sG(t)},lG=function(t){return t>=z6},mf=function(t){return t===uf||t===F6||t===Q6},gf=function(t){return aG(t)||lG(t)||t===U6},Qk=function(t){return gf(t)||Ar(t)||t===xr},cG=function(t){return t>=q6&&t<=X6||t===J6||t>=j6&&t<=Z6||t===V6},Mo=function(t,e){return t!==fc?!1:e!==uf},vf=function(t,e,n){return t===xr?gf(e)||Mo(e,n):gf(t)?!0:!!(t===fc&&Mo(t,e))},Av=function(t,e,n){return t===Qs||t===xr?Ar(e)?!0:e===mc&&Ar(n):Ar(t===mc?e:t)},uG=function(t){var e=0,n=1;(t[e]===Qs||t[e]===xr)&&(t[e]===xr&&(n=-1),e++);for(var r=[];Ar(t[e]);)r.push(t[e++]);var A=r.length?parseInt(pn.apply(void 0,r),10):0;t[e]===mc&&e++;for(var i=[];Ar(t[e]);)i.push(t[e++]);var o=i.length,a=o?parseInt(pn.apply(void 0,i),10):0;(t[e]===xk||t[e]===kk)&&e++;var l=1;(t[e]===Qs||t[e]===xr)&&(t[e]===xr&&(l=-1),e++);for(var u=[];Ar(t[e]);)u.push(t[e++]);var d=u.length?parseInt(pn.apply(void 0,u),10):0;return n*(A+a*Math.pow(10,-o))*Math.pow(10,l*d)},dG={type:2},fG={type:3},hG={type:4},pG={type:13},mG={type:8},gG={type:21},vG={type:9},wG={type:10},BG={type:11},yG={type:12},CG={type:14},wf={type:23},bG={type:1},EG={type:25},kG={type:24},SG={type:26},xG={type:27},FG={type:28},QG={type:29},TG={type:31},iv={type:32},Tk=(function(){function t(){this._value=[]}return t.prototype.write=function(e){this._value=this._value.concat(ef(e))},t.prototype.read=function(){for(var e=[],n=this.consumeToken();n!==iv;)e.push(n),n=this.consumeToken();return e},t.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case df:return this.consumeStringToken(df);case T6:var n=this.peekCodePoint(0),r=this.peekCodePoint(1),A=this.peekCodePoint(2);if(Qk(n)||Mo(r,A)){var i=vf(n,r,A)?x6:S6,o=this.consumeName();return{type:5,value:o,flags:i}}break;case M6:if(this.peekCodePoint(0)===hc)return this.consumeCodePoint(),pG;break;case ff:return this.consumeStringToken(ff);case hf:return dG;case pc:return fG;case rv:if(this.peekCodePoint(0)===hc)return this.consumeCodePoint(),CG;break;case Qs:if(Av(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case W6:return hG;case xr:var a=e,l=this.peekCodePoint(0),u=this.peekCodePoint(1);if(Av(a,l,u))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(vf(a,l,u))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(l===xr&&u===O6)return this.consumeCodePoint(),this.consumeCodePoint(),kG;break;case mc:if(Av(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Bk:if(this.peekCodePoint(0)===rv)for(this.consumeCodePoint();;){var d=this.consumeCodePoint();if(d===rv&&(d=this.consumeCodePoint(),d===Bk))return this.consumeToken();if(d===li)return this.consumeToken()}break;case G6:return SG;case Y6:return xG;case D6:if(this.peekCodePoint(0)===_6&&this.peekCodePoint(1)===xr&&this.peekCodePoint(2)===xr)return this.consumeCodePoint(),this.consumeCodePoint(),EG;break;case N6:var h=this.peekCodePoint(0),p=this.peekCodePoint(1),m=this.peekCodePoint(2);if(vf(h,p,m)){var o=this.consumeName();return{type:7,value:o}}break;case L6:return FG;case fc:if(Mo(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case R6:return QG;case H6:if(this.peekCodePoint(0)===hc)return this.consumeCodePoint(),mG;break;case P6:return BG;case $6:return yG;case tG:case rG:var v=this.peekCodePoint(0),B=this.peekCodePoint(1);return v===Qs&&(ka(B)||B===pf)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case yk:if(this.peekCodePoint(0)===hc)return this.consumeCodePoint(),vG;if(this.peekCodePoint(0)===yk)return this.consumeCodePoint(),gG;break;case K6:if(this.peekCodePoint(0)===hc)return this.consumeCodePoint(),wG;break;case li:return iv}return mf(e)?(this.consumeWhiteSpace(),TG):Ar(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):gf(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:pn(e)}},t.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e>"u"?-1:e},t.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},t.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},t.prototype.consumeUnicodeRangeToken=function(){for(var e=[],n=this.consumeCodePoint();ka(n)&&e.length<6;)e.push(n),n=this.consumeCodePoint();for(var r=!1;n===pf&&e.length<6;)e.push(n),n=this.consumeCodePoint(),r=!0;if(r){var A=parseInt(pn.apply(void 0,e.map(function(l){return l===pf?bk:l})),16),i=parseInt(pn.apply(void 0,e.map(function(l){return l===pf?Fk:l})),16);return{type:30,start:A,end:i}}var o=parseInt(pn.apply(void 0,e),16);if(this.peekCodePoint(0)===xr&&ka(this.peekCodePoint(1))){this.consumeCodePoint(),n=this.consumeCodePoint();for(var a=[];ka(n)&&a.length<6;)a.push(n),n=this.consumeCodePoint();var i=parseInt(pn.apply(void 0,a),16);return{type:30,start:o,end:i}}else return{type:30,start:o,end:o}},t.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===hf?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===hf?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},t.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===li)return{type:22,value:""};var n=this.peekCodePoint(0);if(n===ff||n===df){var r=this.consumeStringToken(this.consumeCodePoint());return r.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===li||this.peekCodePoint(0)===pc)?(this.consumeCodePoint(),{type:22,value:r.value}):(this.consumeBadUrlRemnants(),wf)}for(;;){var A=this.consumeCodePoint();if(A===li||A===pc)return{type:22,value:pn.apply(void 0,e)};if(mf(A))return this.consumeWhiteSpace(),this.peekCodePoint(0)===li||this.peekCodePoint(0)===pc?(this.consumeCodePoint(),{type:22,value:pn.apply(void 0,e)}):(this.consumeBadUrlRemnants(),wf);if(A===df||A===ff||A===hf||cG(A))return this.consumeBadUrlRemnants(),wf;if(A===fc)if(Mo(A,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),wf;else e.push(A)}},t.prototype.consumeWhiteSpace=function(){for(;mf(this.peekCodePoint(0));)this.consumeCodePoint()},t.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===pc||e===li)return;Mo(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},t.prototype.consumeStringSlice=function(e){for(var n=5e4,r="";e>0;){var A=Math.min(n,e);r+=pn.apply(void 0,this._value.splice(0,A)),e-=A}return this._value.shift(),r},t.prototype.consumeStringToken=function(e){var n="",r=0;do{var A=this._value[r];if(A===li||A===void 0||A===e)return n+=this.consumeStringSlice(r),{type:0,value:n};if(A===uf)return this._value.splice(0,r),bG;if(A===fc){var i=this._value[r+1];i!==li&&i!==void 0&&(i===uf?(n+=this.consumeStringSlice(r),r=-1,this._value.shift()):Mo(A,i)&&(n+=this.consumeStringSlice(r),n+=pn(this.consumeEscapedCodePoint()),r=-1))}r++}while(!0)},t.prototype.consumeNumber=function(){var e=[],n=dc,r=this.peekCodePoint(0);for((r===Qs||r===xr)&&e.push(this.consumeCodePoint());Ar(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0);var A=this.peekCodePoint(1);if(r===mc&&Ar(A))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),n=wk;Ar(this.peekCodePoint(0));)e.push(this.consumeCodePoint());r=this.peekCodePoint(0),A=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((r===xk||r===kk)&&((A===Qs||A===xr)&&Ar(i)||Ar(A)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),n=wk;Ar(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[uG(e),n]},t.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),n=e[0],r=e[1],A=this.peekCodePoint(0),i=this.peekCodePoint(1),o=this.peekCodePoint(2);if(vf(A,i,o)){var a=this.consumeName();return{type:15,number:n,flags:r,unit:a}}return A===I6?(this.consumeCodePoint(),{type:16,number:n,flags:r}):{type:17,number:n,flags:r}},t.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(ka(e)){for(var n=pn(e);ka(this.peekCodePoint(0))&&n.length<6;)n+=pn(this.consumeCodePoint());mf(this.peekCodePoint(0))&&this.consumeCodePoint();var r=parseInt(n,16);return r===0||iG(r)||r>1114111?Ck:r}return e===li?Ck:e},t.prototype.consumeName=function(){for(var e="";;){var n=this.consumeCodePoint();if(Qk(n))e+=pn(n);else if(Mo(n,this.peekCodePoint(0)))e+=pn(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(n),e}},t})(),Mk=(function(){function t(e){this._tokens=e}return t.create=function(e){var n=new Tk;return n.write(e),new t(n.read())},t.parseValue=function(e){return t.create(e).parseComponentValue()},t.parseValues=function(e){return t.create(e).parseComponentValues()},t.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var n=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return n;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},t.prototype.parseComponentValues=function(){for(var e=[];;){var n=this.consumeComponentValue();if(n.type===32)return e;e.push(n),e.push()}},t.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},t.prototype.consumeSimpleBlock=function(e){for(var n={type:e,values:[]},r=this.consumeToken();;){if(r.type===32||IG(r,e))return n;this.reconsumeToken(r),n.values.push(this.consumeComponentValue()),r=this.consumeToken()}},t.prototype.consumeFunction=function(e){for(var n={name:e.value,values:[],type:18};;){var r=this.consumeToken();if(r.type===32||r.type===3)return n;this.reconsumeToken(r),n.values.push(this.consumeComponentValue())}},t.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e>"u"?iv:e},t.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},t})(),gc=function(t){return t.type===15},Sa=function(t){return t.type===17},Rt=function(t){return t.type===20},MG=function(t){return t.type===0},ov=function(t,e){return Rt(t)&&t.value===e},Ik=function(t){return t.type!==31},xa=function(t){return t.type!==31&&t.type!==4},ci=function(t){var e=[],n=[];return t.forEach(function(r){if(r.type===4){if(n.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(n),n=[];return}r.type!==31&&n.push(r)}),n.length&&e.push(n),e},IG=function(t,e){return e===11&&t.type===12||e===28&&t.type===29?!0:e===2&&t.type===3},Io=function(t){return t.type===17||t.type===15},bn=function(t){return t.type===16||Io(t)},Uk=function(t){return t.length>1?[t[0],t[1]]:[t[0]]},Wn={type:17,number:0,flags:dc},sv={type:16,number:50,flags:dc},Uo={type:16,number:100,flags:dc},vc=function(t,e,n){var r=t[0],A=t[1];return[$t(r,e),$t(typeof A<"u"?A:r,n)]},$t=function(t,e){if(t.type===16)return t.number/100*e;if(gc(t))switch(t.unit){case"rem":case"em":return 16*t.number;default:return t.number}return t.number},_k="deg",Dk="grad",Ok="rad",Nk="turn",Bf={name:"angle",parse:function(t,e){if(e.type===15)switch(e.unit){case _k:return Math.PI*e.number/180;case Dk:return Math.PI/200*e.number;case Ok:return e.number;case Nk:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},Lk=function(t){return t.type===15&&(t.unit===_k||t.unit===Dk||t.unit===Ok||t.unit===Nk)},Rk=function(t){var e=t.filter(Rt).map(function(n){return n.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Wn,Wn];case"to top":case"bottom":return iA(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Wn,Uo];case"to right":case"left":return iA(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Uo,Uo];case"to bottom":case"top":return iA(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Uo,Wn];case"to left":case"right":return iA(270)}return 0},iA=function(t){return Math.PI*t/180},_o={name:"color",parse:function(t,e){if(e.type===18){var n=UG[e.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return n(t,e.values)}if(e.type===5){if(e.value.length===3){var r=e.value.substring(0,1),A=e.value.substring(1,2),i=e.value.substring(2,3);return Oo(parseInt(r+r,16),parseInt(A+A,16),parseInt(i+i,16),1)}if(e.value.length===4){var r=e.value.substring(0,1),A=e.value.substring(1,2),i=e.value.substring(2,3),o=e.value.substring(3,4);return Oo(parseInt(r+r,16),parseInt(A+A,16),parseInt(i+i,16),parseInt(o+o,16)/255)}if(e.value.length===6){var r=e.value.substring(0,2),A=e.value.substring(2,4),i=e.value.substring(4,6);return Oo(parseInt(r,16),parseInt(A,16),parseInt(i,16),1)}if(e.value.length===8){var r=e.value.substring(0,2),A=e.value.substring(2,4),i=e.value.substring(4,6),o=e.value.substring(6,8);return Oo(parseInt(r,16),parseInt(A,16),parseInt(i,16),parseInt(o,16)/255)}}if(e.type===20){var a=Ri[e.value.toUpperCase()];if(typeof a<"u")return a}return Ri.TRANSPARENT}},Do=function(t){return(255&t)===0},Ln=function(t){var e=255&t,n=255&t>>8,r=255&t>>16,A=255&t>>24;return e<255?"rgba("+A+","+r+","+n+","+e/255+")":"rgb("+A+","+r+","+n+")"},Oo=function(t,e,n,r){return(t<<24|e<<16|n<<8|Math.round(r*255)<<0)>>>0},Hk=function(t,e){if(t.type===17)return t.number;if(t.type===16){var n=e===3?1:255;return e===3?t.number/100*n:Math.round(t.number/100*n)}return 0},Pk=function(t,e){var n=e.filter(xa);if(n.length===3){var r=n.map(Hk),A=r[0],i=r[1],o=r[2];return Oo(A,i,o,1)}if(n.length===4){var a=n.map(Hk),A=a[0],i=a[1],o=a[2],l=a[3];return Oo(A,i,o,l)}return 0};function av(t,e,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(e-t)*n*6+t:n<1/2?e:n<2/3?(e-t)*6*(2/3-n)+t:t}var $k=function(t,e){var n=e.filter(xa),r=n[0],A=n[1],i=n[2],o=n[3],a=(r.type===17?iA(r.number):Bf.parse(t,r))/(Math.PI*2),l=bn(A)?A.number/100:0,u=bn(i)?i.number/100:0,d=typeof o<"u"&&bn(o)?$t(o,1):1;if(l===0)return Oo(u*255,u*255,u*255,1);var h=u<=.5?u*(l+1):u+l-u*l,p=u*2-h,m=av(p,h,a+1/3),v=av(p,h,a),B=av(p,h,a-1/3);return Oo(m*255,v*255,B*255,d)},UG={hsl:$k,hsla:$k,rgb:Pk,rgba:Pk},wc=function(t,e){return _o.parse(t,Mk.create(e).parseComponentValue())},Ri={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},_G={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map(function(n){if(Rt(n))switch(n.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},DG={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},yf=function(t,e){var n=_o.parse(t,e[0]),r=e[1];return r&&bn(r)?{color:n,stop:r}:{color:n,stop:null}},Kk=function(t,e){var n=t[0],r=t[t.length-1];n.stop===null&&(n.stop=Wn),r.stop===null&&(r.stop=Uo);for(var A=[],i=0,o=0;o<t.length;o++){var a=t[o].stop;if(a!==null){var l=$t(a,e);l>i?A.push(l):A.push(i),i=l}else A.push(null)}for(var u=null,o=0;o<A.length;o++){var d=A[o];if(d===null)u===null&&(u=o);else if(u!==null){for(var h=o-u,p=A[u-1],m=(d-p)/(h+1),v=1;v<=h;v++)A[u+v-1]=m*v;u=null}}return t.map(function(B,y){var w=B.color;return{color:w,stop:Math.max(Math.min(1,A[y]/e),0)}})},OG=function(t,e,n){var r=e/2,A=n/2,i=$t(t[0],e)-r,o=A-$t(t[1],n);return(Math.atan2(o,i)+Math.PI*2)%(Math.PI*2)},NG=function(t,e,n){var r=typeof t=="number"?t:OG(t,e,n),A=Math.abs(e*Math.sin(r))+Math.abs(n*Math.cos(r)),i=e/2,o=n/2,a=A/2,l=Math.sin(r-Math.PI/2)*a,u=Math.cos(r-Math.PI/2)*a;return[A,i-u,i+u,o-l,o+l]},_A=function(t,e){return Math.sqrt(t*t+e*e)},zk=function(t,e,n,r,A){var i=[[0,0],[0,e],[t,0],[t,e]];return i.reduce(function(o,a){var l=a[0],u=a[1],d=_A(n-l,r-u);return(A?d<o.optimumDistance:d>o.optimumDistance)?{optimumCorner:a,optimumDistance:d}:o},{optimumDistance:A?1/0:-1/0,optimumCorner:null}).optimumCorner},LG=function(t,e,n,r,A){var i=0,o=0;switch(t.size){case 0:t.shape===0?i=o=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(n),Math.abs(n-A)):t.shape===1&&(i=Math.min(Math.abs(e),Math.abs(e-r)),o=Math.min(Math.abs(n),Math.abs(n-A)));break;case 2:if(t.shape===0)i=o=Math.min(_A(e,n),_A(e,n-A),_A(e-r,n),_A(e-r,n-A));else if(t.shape===1){var a=Math.min(Math.abs(n),Math.abs(n-A))/Math.min(Math.abs(e),Math.abs(e-r)),l=zk(r,A,e,n,!0),u=l[0],d=l[1];i=_A(u-e,(d-n)/a),o=a*i}break;case 1:t.shape===0?i=o=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(n),Math.abs(n-A)):t.shape===1&&(i=Math.max(Math.abs(e),Math.abs(e-r)),o=Math.max(Math.abs(n),Math.abs(n-A)));break;case 3:if(t.shape===0)i=o=Math.max(_A(e,n),_A(e,n-A),_A(e-r,n),_A(e-r,n-A));else if(t.shape===1){var a=Math.max(Math.abs(n),Math.abs(n-A))/Math.max(Math.abs(e),Math.abs(e-r)),h=zk(r,A,e,n,!1),u=h[0],d=h[1];i=_A(u-e,(d-n)/a),o=a*i}break}return Array.isArray(t.size)&&(i=$t(t.size[0],r),o=t.size.length===2?$t(t.size[1],A):i),[i,o]},RG=function(t,e){var n=iA(180),r=[];return ci(e).forEach(function(A,i){if(i===0){var o=A[0];if(o.type===20&&o.value==="to"){n=Rk(A);return}else if(Lk(o)){n=Bf.parse(t,o);return}}var a=yf(t,A);r.push(a)}),{angle:n,stops:r,type:1}},Cf=function(t,e){var n=iA(180),r=[];return ci(e).forEach(function(A,i){if(i===0){var o=A[0];if(o.type===20&&["top","left","right","bottom"].indexOf(o.value)!==-1){n=Rk(A);return}else if(Lk(o)){n=(Bf.parse(t,o)+iA(270))%iA(360);return}}var a=yf(t,A);r.push(a)}),{angle:n,stops:r,type:1}},HG=function(t,e){var n=iA(180),r=[],A=1,i=0,o=3,a=[];return ci(e).forEach(function(l,u){var d=l[0];if(u===0){if(Rt(d)&&d.value==="linear"){A=1;return}else if(Rt(d)&&d.value==="radial"){A=2;return}}if(d.type===18){if(d.name==="from"){var h=_o.parse(t,d.values[0]);r.push({stop:Wn,color:h})}else if(d.name==="to"){var h=_o.parse(t,d.values[0]);r.push({stop:Uo,color:h})}else if(d.name==="color-stop"){var p=d.values.filter(xa);if(p.length===2){var h=_o.parse(t,p[1]),m=p[0];Sa(m)&&r.push({stop:{type:16,number:m.number*100,flags:m.flags},color:h})}}}}),A===1?{angle:(n+iA(180))%iA(360),stops:r,type:A}:{size:o,shape:i,stops:r,position:a,type:A}},Wk="closest-side",Gk="farthest-side",Yk="closest-corner",qk="farthest-corner",Xk="circle",Jk="ellipse",jk="cover",Zk="contain",PG=function(t,e){var n=0,r=3,A=[],i=[];return ci(e).forEach(function(o,a){var l=!0;if(a===0){var u=!1;l=o.reduce(function(h,p){if(u)if(Rt(p))switch(p.value){case"center":return i.push(sv),h;case"top":case"left":return i.push(Wn),h;case"right":case"bottom":return i.push(Uo),h}else(bn(p)||Io(p))&&i.push(p);else if(Rt(p))switch(p.value){case Xk:return n=0,!1;case Jk:return n=1,!1;case"at":return u=!0,!1;case Wk:return r=0,!1;case jk:case Gk:return r=1,!1;case Zk:case Yk:return r=2,!1;case qk:return r=3,!1}else if(Io(p)||bn(p))return Array.isArray(r)||(r=[]),r.push(p),!1;return h},l)}if(l){var d=yf(t,o);A.push(d)}}),{size:r,shape:n,stops:A,position:i,type:2}},bf=function(t,e){var n=0,r=3,A=[],i=[];return ci(e).forEach(function(o,a){var l=!0;if(a===0?l=o.reduce(function(d,h){if(Rt(h))switch(h.value){case"center":return i.push(sv),!1;case"top":case"left":return i.push(Wn),!1;case"right":case"bottom":return i.push(Uo),!1}else if(bn(h)||Io(h))return i.push(h),!1;return d},l):a===1&&(l=o.reduce(function(d,h){if(Rt(h))switch(h.value){case Xk:return n=0,!1;case Jk:return n=1,!1;case Zk:case Wk:return r=0,!1;case Gk:return r=1,!1;case Yk:return r=2,!1;case jk:case qk:return r=3,!1}else if(Io(h)||bn(h))return Array.isArray(r)||(r=[]),r.push(h),!1;return d},l)),l){var u=yf(t,o);A.push(u)}}),{size:r,shape:n,stops:A,position:i,type:2}},$G=function(t){return t.type===1},KG=function(t){return t.type===2},lv={name:"image",parse:function(t,e){if(e.type===22){var n={url:e.value,type:0};return t.cache.addImage(e.value),n}if(e.type===18){var r=Vk[e.name];if(typeof r>"u")throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return r(t,e.values)}throw new Error("Unsupported image type "+e.type)}};function zG(t){return!(t.type===20&&t.value==="none")&&(t.type!==18||!!Vk[t.name])}var Vk={"linear-gradient":RG,"-moz-linear-gradient":Cf,"-ms-linear-gradient":Cf,"-o-linear-gradient":Cf,"-webkit-linear-gradient":Cf,"radial-gradient":PG,"-moz-radial-gradient":bf,"-ms-radial-gradient":bf,"-o-radial-gradient":bf,"-webkit-radial-gradient":bf,"-webkit-gradient":HG},WG={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(e.length===0)return[];var n=e[0];return n.type===20&&n.value==="none"?[]:e.filter(function(r){return xa(r)&&zG(r)}).map(function(r){return lv.parse(t,r)})}},GG={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map(function(n){if(Rt(n))switch(n.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},YG={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(t,e){return ci(e).map(function(n){return n.filter(bn)}).map(Uk)}},qG={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(t,e){return ci(e).map(function(n){return n.filter(Rt).map(function(r){return r.value}).join(" ")}).map(XG)}},XG=function(t){switch(t){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},Fa;(function(t){t.AUTO="auto",t.CONTAIN="contain",t.COVER="cover"})(Fa||(Fa={}));var JG={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(t,e){return ci(e).map(function(n){return n.filter(jG)})}},jG=function(t){return Rt(t)||bn(t)},Ef=function(t){return{name:"border-"+t+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},ZG=Ef("top"),VG=Ef("right"),eY=Ef("bottom"),tY=Ef("left"),kf=function(t){return{name:"border-radius-"+t,initialValue:"0 0",prefix:!1,type:1,parse:function(e,n){return Uk(n.filter(bn))}}},nY=kf("top-left"),rY=kf("top-right"),AY=kf("bottom-right"),iY=kf("bottom-left"),Sf=function(t){return{name:"border-"+t+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,n){switch(n){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},oY=Sf("top"),sY=Sf("right"),aY=Sf("bottom"),lY=Sf("left"),xf=function(t){return{name:"border-"+t+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,n){return gc(n)?n.number:0}}},cY=xf("top"),uY=xf("right"),dY=xf("bottom"),fY=xf("left"),hY={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},pY={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(t,e){return e==="rtl"?1:0}},mY={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(t,e){return e.filter(Rt).reduce(function(n,r){return n|gY(r.value)},0)}},gY=function(t){switch(t){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},vY={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},wY={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(t,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},Ff;(function(t){t.NORMAL="normal",t.STRICT="strict"})(Ff||(Ff={}));var BY={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return e==="strict"?Ff.STRICT:Ff.NORMAL}},yY={name:"line-height",initialValue:"normal",prefix:!1,type:4},eS=function(t,e){return Rt(t)&&t.value==="normal"?1.2*e:t.type===17?e*t.number:bn(t)?$t(t,e):e},CY={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(t,e){return e.type===20&&e.value==="none"?null:lv.parse(t,e)}},bY={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(t,e){return e==="inside"?0:1}},cv={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Qf=function(t){return{name:"margin-"+t,initialValue:"0",prefix:!1,type:4}},EY=Qf("top"),kY=Qf("right"),SY=Qf("bottom"),xY=Qf("left"),FY={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(t,e){return e.filter(Rt).map(function(n){switch(n.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})}},QY={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){return e==="break-word"?"break-word":"normal"}},Tf=function(t){return{name:"padding-"+t,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},TY=Tf("top"),MY=Tf("right"),IY=Tf("bottom"),UY=Tf("left"),_Y={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(t,e){switch(e){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},DY={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(t,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},OY={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.length===1&&ov(e[0],"none")?[]:ci(e).map(function(n){for(var r={color:Ri.TRANSPARENT,offsetX:Wn,offsetY:Wn,blur:Wn},A=0,i=0;i<n.length;i++){var o=n[i];Io(o)?(A===0?r.offsetX=o:A===1?r.offsetY=o:r.blur=o,A++):r.color=_o.parse(t,o)}return r})}},NY={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},LY={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(t,e){if(e.type===20&&e.value==="none")return null;if(e.type===18){var n=PY[e.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return n(e.values)}return null}},RY=function(t){var e=t.filter(function(n){return n.type===17}).map(function(n){return n.number});return e.length===6?e:null},HY=function(t){var e=t.filter(function(l){return l.type===17}).map(function(l){return l.number}),n=e[0],r=e[1];e[2],e[3];var A=e[4],i=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var o=e[12],a=e[13];return e[14],e[15],e.length===16?[n,r,A,i,o,a]:null},PY={matrix:RY,matrix3d:HY},tS={type:16,number:50,flags:dc},$Y=[tS,tS],KY={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(t,e){var n=e.filter(bn);return n.length!==2?$Y:[n[0],n[1]]}},zY={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"hidden":return 1;case"collapse":return 2;default:return 0}}},Bc;(function(t){t.NORMAL="normal",t.BREAK_ALL="break-all",t.KEEP_ALL="keep-all"})(Bc||(Bc={}));for(var WY={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"break-all":return Bc.BREAK_ALL;case"keep-all":return Bc.KEEP_ALL;default:return Bc.NORMAL}}},GY={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(t,e){if(e.type===20)return{auto:!0,order:0};if(Sa(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},nS={name:"time",parse:function(t,e){if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},YY={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(t,e){return Sa(e)?e.number:1}},qY={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},XY={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(t,e){return e.filter(Rt).map(function(n){switch(n.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(n){return n!==0})}},JY={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(t,e){var n=[],r=[];return e.forEach(function(A){switch(A.type){case 20:case 0:n.push(A.value);break;case 17:n.push(A.number.toString());break;case 4:r.push(n.join(" ")),n.length=0;break}}),n.length&&r.push(n.join(" ")),r.map(function(A){return A.indexOf(" ")===-1?A:"'"+A+"'"})}},jY={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ZY={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(t,e){return Sa(e)?e.number:Rt(e)&&e.value==="bold"?700:400}},VY={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.filter(Rt).map(function(n){return n.value})}},e7={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},Fn=function(t,e){return(t&e)!==0},t7={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(e.length===0)return[];var n=e[0];return n.type===20&&n.value==="none"?[]:e}},n7={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(e.length===0)return null;var n=e[0];if(n.type===20&&n.value==="none")return null;for(var r=[],A=e.filter(Ik),i=0;i<A.length;i++){var o=A[i],a=A[i+1];if(o.type===20){var l=a&&Sa(a)?a.number:1;r.push({counter:o.value,increment:l})}}return r}},r7={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(e.length===0)return[];for(var n=[],r=e.filter(Ik),A=0;A<r.length;A++){var i=r[A],o=r[A+1];if(Rt(i)&&i.value!=="none"){var a=o&&Sa(o)?o.number:0;n.push({counter:i.value,reset:a})}}return n}},A7={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(t,e){return e.filter(gc).map(function(n){return nS.parse(t,n)})}},i7={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(e.length===0)return null;var n=e[0];if(n.type===20&&n.value==="none")return null;var r=[],A=e.filter(MG);if(A.length%2!==0)return null;for(var i=0;i<A.length;i+=2){var o=A[i].value,a=A[i+1].value;r.push({open:o,close:a})}return r}},rS=function(t,e,n){if(!t)return"";var r=t[Math.min(e,t.length-1)];return r?n?r.open:r.close:""},o7={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.length===1&&ov(e[0],"none")?[]:ci(e).map(function(n){for(var r={color:255,offsetX:Wn,offsetY:Wn,blur:Wn,spread:Wn,inset:!1},A=0,i=0;i<n.length;i++){var o=n[i];ov(o,"inset")?r.inset=!0:Io(o)?(A===0?r.offsetX=o:A===1?r.offsetY=o:A===2?r.blur=o:r.spread=o,A++):r.color=_o.parse(t,o)}return r})}},s7={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(t,e){var n=[0,1,2],r=[];return e.filter(Rt).forEach(function(A){switch(A.value){case"stroke":r.push(1);break;case"fill":r.push(0);break;case"markers":r.push(2);break}}),n.forEach(function(A){r.indexOf(A)===-1&&r.push(A)}),r}},a7={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},l7={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return gc(e)?e.number:0}},c7=(function(){function t(e,n){var r,A;this.animationDuration=Oe(e,A7,n.animationDuration),this.backgroundClip=Oe(e,_G,n.backgroundClip),this.backgroundColor=Oe(e,DG,n.backgroundColor),this.backgroundImage=Oe(e,WG,n.backgroundImage),this.backgroundOrigin=Oe(e,GG,n.backgroundOrigin),this.backgroundPosition=Oe(e,YG,n.backgroundPosition),this.backgroundRepeat=Oe(e,qG,n.backgroundRepeat),this.backgroundSize=Oe(e,JG,n.backgroundSize),this.borderTopColor=Oe(e,ZG,n.borderTopColor),this.borderRightColor=Oe(e,VG,n.borderRightColor),this.borderBottomColor=Oe(e,eY,n.borderBottomColor),this.borderLeftColor=Oe(e,tY,n.borderLeftColor),this.borderTopLeftRadius=Oe(e,nY,n.borderTopLeftRadius),this.borderTopRightRadius=Oe(e,rY,n.borderTopRightRadius),this.borderBottomRightRadius=Oe(e,AY,n.borderBottomRightRadius),this.borderBottomLeftRadius=Oe(e,iY,n.borderBottomLeftRadius),this.borderTopStyle=Oe(e,oY,n.borderTopStyle),this.borderRightStyle=Oe(e,sY,n.borderRightStyle),this.borderBottomStyle=Oe(e,aY,n.borderBottomStyle),this.borderLeftStyle=Oe(e,lY,n.borderLeftStyle),this.borderTopWidth=Oe(e,cY,n.borderTopWidth),this.borderRightWidth=Oe(e,uY,n.borderRightWidth),this.borderBottomWidth=Oe(e,dY,n.borderBottomWidth),this.borderLeftWidth=Oe(e,fY,n.borderLeftWidth),this.boxShadow=Oe(e,o7,n.boxShadow),this.color=Oe(e,hY,n.color),this.direction=Oe(e,pY,n.direction),this.display=Oe(e,mY,n.display),this.float=Oe(e,vY,n.cssFloat),this.fontFamily=Oe(e,JY,n.fontFamily),this.fontSize=Oe(e,jY,n.fontSize),this.fontStyle=Oe(e,e7,n.fontStyle),this.fontVariant=Oe(e,VY,n.fontVariant),this.fontWeight=Oe(e,ZY,n.fontWeight),this.letterSpacing=Oe(e,wY,n.letterSpacing),this.lineBreak=Oe(e,BY,n.lineBreak),this.lineHeight=Oe(e,yY,n.lineHeight),this.listStyleImage=Oe(e,CY,n.listStyleImage),this.listStylePosition=Oe(e,bY,n.listStylePosition),this.listStyleType=Oe(e,cv,n.listStyleType),this.marginTop=Oe(e,EY,n.marginTop),this.marginRight=Oe(e,kY,n.marginRight),this.marginBottom=Oe(e,SY,n.marginBottom),this.marginLeft=Oe(e,xY,n.marginLeft),this.opacity=Oe(e,YY,n.opacity);var i=Oe(e,FY,n.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=Oe(e,QY,n.overflowWrap),this.paddingTop=Oe(e,TY,n.paddingTop),this.paddingRight=Oe(e,MY,n.paddingRight),this.paddingBottom=Oe(e,IY,n.paddingBottom),this.paddingLeft=Oe(e,UY,n.paddingLeft),this.paintOrder=Oe(e,s7,n.paintOrder),this.position=Oe(e,DY,n.position),this.textAlign=Oe(e,_Y,n.textAlign),this.textDecorationColor=Oe(e,qY,(r=n.textDecorationColor)!==null&&r!==void 0?r:n.color),this.textDecorationLine=Oe(e,XY,(A=n.textDecorationLine)!==null&&A!==void 0?A:n.textDecoration),this.textShadow=Oe(e,OY,n.textShadow),this.textTransform=Oe(e,NY,n.textTransform),this.transform=Oe(e,LY,n.transform),this.transformOrigin=Oe(e,KY,n.transformOrigin),this.visibility=Oe(e,zY,n.visibility),this.webkitTextStrokeColor=Oe(e,a7,n.webkitTextStrokeColor),this.webkitTextStrokeWidth=Oe(e,l7,n.webkitTextStrokeWidth),this.wordBreak=Oe(e,WY,n.wordBreak),this.zIndex=Oe(e,GY,n.zIndex)}return t.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},t.prototype.isTransparent=function(){return Do(this.backgroundColor)},t.prototype.isTransformed=function(){return this.transform!==null},t.prototype.isPositioned=function(){return this.position!==0},t.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},t.prototype.isFloating=function(){return this.float!==0},t.prototype.isInlineLevel=function(){return Fn(this.display,4)||Fn(this.display,33554432)||Fn(this.display,268435456)||Fn(this.display,536870912)||Fn(this.display,67108864)||Fn(this.display,134217728)},t})(),u7=(function(){function t(e,n){this.content=Oe(e,t7,n.content),this.quotes=Oe(e,i7,n.quotes)}return t})(),AS=(function(){function t(e,n){this.counterIncrement=Oe(e,n7,n.counterIncrement),this.counterReset=Oe(e,r7,n.counterReset)}return t})(),Oe=function(t,e,n){var r=new Tk,A=n!==null&&typeof n<"u"?n.toString():e.initialValue;r.write(A);var i=new Mk(r.read());switch(e.type){case 2:var o=i.parseComponentValue();return e.parse(t,Rt(o)?o.value:e.initialValue);case 0:return e.parse(t,i.parseComponentValue());case 1:return e.parse(t,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(e.format){case"angle":return Bf.parse(t,i.parseComponentValue());case"color":return _o.parse(t,i.parseComponentValue());case"image":return lv.parse(t,i.parseComponentValue());case"length":var a=i.parseComponentValue();return Io(a)?a:Wn;case"length-percentage":var l=i.parseComponentValue();return bn(l)?l:Wn;case"time":return nS.parse(t,i.parseComponentValue())}break}},d7="data-html2canvas-debug",f7=function(t){var e=t.getAttribute(d7);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},uv=function(t,e){var n=f7(t);return n===1||e===n},ui=(function(){function t(e,n){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,uv(n,3))debugger;this.styles=new c7(e,window.getComputedStyle(n,null)),kv(n)&&(this.styles.animationDuration.some(function(r){return r>0})&&(n.style.animationDuration="0s"),this.styles.transform!==null&&(n.style.transform="none")),this.bounds=Vd(this.context,n),uv(n,4)&&(this.flags|=16)}return t})(),h7="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",iS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yc=typeof Uint8Array>"u"?[]:new Uint8Array(256),Mf=0;Mf<iS.length;Mf++)yc[iS.charCodeAt(Mf)]=Mf;for(var p7=function(t){var e=t.length*.75,n=t.length,r,A=0,i,o,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var u=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),d=Array.isArray(u)?u:new Uint8Array(u);for(r=0;r<n;r+=4)i=yc[t.charCodeAt(r)],o=yc[t.charCodeAt(r+1)],a=yc[t.charCodeAt(r+2)],l=yc[t.charCodeAt(r+3)],d[A++]=i<<2|o>>4,d[A++]=(o&15)<<4|a>>2,d[A++]=(a&3)<<6|l&63;return u},m7=function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n.push(t[r+1]<<8|t[r]);return n},g7=function(t){for(var e=t.length,n=[],r=0;r<e;r+=4)n.push(t[r+3]<<24|t[r+2]<<16|t[r+1]<<8|t[r]);return n},Ts=5,dv=11,fv=2,v7=dv-Ts,oS=65536>>Ts,w7=1<<Ts,hv=w7-1,B7=1024>>Ts,y7=oS+B7,C7=y7,b7=32,E7=C7+b7,k7=65536>>dv,S7=1<<v7,x7=S7-1,sS=function(t,e,n){return t.slice?t.slice(e,n):new Uint16Array(Array.prototype.slice.call(t,e,n))},F7=function(t,e,n){return t.slice?t.slice(e,n):new Uint32Array(Array.prototype.slice.call(t,e,n))},Q7=function(t,e){var n=p7(t),r=Array.isArray(n)?g7(n):new Uint32Array(n),A=Array.isArray(n)?m7(n):new Uint16Array(n),i=24,o=sS(A,i/2,r[4]/2),a=r[5]===2?sS(A,(i+r[4])/2):F7(r,Math.ceil((i+r[4])/4));return new T7(r[0],r[1],r[2],r[3],o,a)},T7=(function(){function t(e,n,r,A,i,o){this.initialValue=e,this.errorValue=n,this.highStart=r,this.highValueIndex=A,this.index=i,this.data=o}return t.prototype.get=function(e){var n;if(e>=0){if(e<55296||e>56319&&e<=65535)return n=this.index[e>>Ts],n=(n<<fv)+(e&hv),this.data[n];if(e<=65535)return n=this.index[oS+(e-55296>>Ts)],n=(n<<fv)+(e&hv),this.data[n];if(e<this.highStart)return n=E7-k7+(e>>dv),n=this.index[n],n+=e>>Ts&x7,n=this.index[n],n=(n<<fv)+(e&hv),this.data[n];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t})(),aS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M7=typeof Uint8Array>"u"?[]:new Uint8Array(256),If=0;If<aS.length;If++)M7[aS.charCodeAt(If)]=If;var I7=1,pv=2,mv=3,lS=4,cS=5,U7=7,uS=8,gv=9,vv=10,dS=11,fS=12,hS=13,pS=14,wv=15,_7=function(t){for(var e=[],n=0,r=t.length;n<r;){var A=t.charCodeAt(n++);if(A>=55296&&A<=56319&&n<r){var i=t.charCodeAt(n++);(i&64512)===56320?e.push(((A&1023)<<10)+(i&1023)+65536):(e.push(A),n--)}else e.push(A)}return e},D7=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var n=t.length;if(!n)return"";for(var r=[],A=-1,i="";++A<n;){var o=t[A];o<=65535?r.push(o):(o-=65536,r.push((o>>10)+55296,o%1024+56320)),(A+1===n||r.length>16384)&&(i+=String.fromCharCode.apply(String,r),r.length=0)}return i},O7=Q7(h7),oA="×",Bv="÷",N7=function(t){return O7.get(t)},L7=function(t,e,n){var r=n-2,A=e[r],i=e[n-1],o=e[n];if(i===pv&&o===mv)return oA;if(i===pv||i===mv||i===lS||o===pv||o===mv||o===lS)return Bv;if(i===uS&&[uS,gv,dS,fS].indexOf(o)!==-1||(i===dS||i===gv)&&(o===gv||o===vv)||(i===fS||i===vv)&&o===vv||o===hS||o===cS||o===U7||i===I7)return oA;if(i===hS&&o===pS){for(;A===cS;)A=e[--r];if(A===pS)return oA}if(i===wv&&o===wv){for(var a=0;A===wv;)a++,A=e[--r];if(a%2===0)return oA}return Bv},R7=function(t){var e=_7(t),n=e.length,r=0,A=0,i=e.map(N7);return{next:function(){if(r>=n)return{done:!0,value:null};for(var o=oA;r<n&&(o=L7(e,i,++r))===oA;);if(o!==oA||r===n){var a=D7.apply(null,e.slice(A,r));return A=r,{value:a,done:!1}}return{done:!0,value:null}}}},H7=function(t){for(var e=R7(t),n=[],r;!(r=e.next()).done;)r.value&&n.push(r.value.slice());return n},P7=function(t){var e=123;if(t.createRange){var n=t.createRange();if(n.getBoundingClientRect){var r=t.createElement("boundtest");r.style.height=e+"px",r.style.display="block",t.body.appendChild(r),n.selectNode(r);var A=n.getBoundingClientRect(),i=Math.round(A.height);if(t.body.removeChild(r),i===e)return!0}}return!1},$7=function(t){var e=t.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",t.body.appendChild(e);var n=t.createRange();e.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var r=e.firstChild,A=ef(r.data).map(function(l){return pn(l)}),i=0,o={},a=A.every(function(l,u){n.setStart(r,i),n.setEnd(r,i+l.length);var d=n.getBoundingClientRect();i+=l.length;var h=d.x>o.x||d.y>o.y;return o=d,u===0?!0:h});return t.body.removeChild(e),a},K7=function(){return typeof new Image().crossOrigin<"u"},z7=function(){return typeof new XMLHttpRequest().responseType=="string"},W7=function(t){var e=new Image,n=t.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(e,0,0),n.toDataURL()}catch{return!1}return!0},mS=function(t){return t[0]===0&&t[1]===255&&t[2]===0&&t[3]===255},G7=function(t){var e=t.createElement("canvas"),n=100;e.width=n,e.height=n;var r=e.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var A=new Image,i=e.toDataURL();A.src=i;var o=yv(n,n,0,0,A);return r.fillStyle="red",r.fillRect(0,0,n,n),gS(o).then(function(a){r.drawImage(a,0,0);var l=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var u=t.createElement("div");return u.style.backgroundImage="url("+i+")",u.style.height=n+"px",mS(l)?gS(yv(n,n,0,0,u)):Promise.reject(!1)}).then(function(a){return r.drawImage(a,0,0),mS(r.getImageData(0,0,n,n).data)}).catch(function(){return!1})},yv=function(t,e,n,r,A){var i="http://www.w3.org/2000/svg",o=document.createElementNS(i,"svg"),a=document.createElementNS(i,"foreignObject");return o.setAttributeNS(null,"width",t.toString()),o.setAttributeNS(null,"height",e.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",n.toString()),a.setAttributeNS(null,"y",r.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(a),a.appendChild(A),o},gS=function(t){return new Promise(function(e,n){var r=new Image;r.onload=function(){return e(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},Gn={get SUPPORT_RANGE_BOUNDS(){var t=P7(document);return Object.defineProperty(Gn,"SUPPORT_RANGE_BOUNDS",{value:t}),t},get SUPPORT_WORD_BREAKING(){var t=Gn.SUPPORT_RANGE_BOUNDS&&$7(document);return Object.defineProperty(Gn,"SUPPORT_WORD_BREAKING",{value:t}),t},get SUPPORT_SVG_DRAWING(){var t=W7(document);return Object.defineProperty(Gn,"SUPPORT_SVG_DRAWING",{value:t}),t},get SUPPORT_FOREIGNOBJECT_DRAWING(){var t=typeof Array.from=="function"&&typeof window.fetch=="function"?G7(document):Promise.resolve(!1);return Object.defineProperty(Gn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:t}),t},get SUPPORT_CORS_IMAGES(){var t=K7();return Object.defineProperty(Gn,"SUPPORT_CORS_IMAGES",{value:t}),t},get SUPPORT_RESPONSE_TYPE(){var t=z7();return Object.defineProperty(Gn,"SUPPORT_RESPONSE_TYPE",{value:t}),t},get SUPPORT_CORS_XHR(){var t="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Gn,"SUPPORT_CORS_XHR",{value:t}),t},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var t=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Gn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:t}),t}},Cc=(function(){function t(e,n){this.text=e,this.bounds=n}return t})(),Y7=function(t,e,n,r){var A=J7(e,n),i=[],o=0;return A.forEach(function(a){if(n.textDecorationLine.length||a.trim().length>0)if(Gn.SUPPORT_RANGE_BOUNDS){var l=vS(r,o,a.length).getClientRects();if(l.length>1){var u=Cv(a),d=0;u.forEach(function(p){i.push(new Cc(p,Ni.fromDOMRectList(t,vS(r,d+o,p.length).getClientRects()))),d+=p.length})}else i.push(new Cc(a,Ni.fromDOMRectList(t,l)))}else{var h=r.splitText(a.length);i.push(new Cc(a,q7(t,r))),r=h}else Gn.SUPPORT_RANGE_BOUNDS||(r=r.splitText(a.length));o+=a.length}),i},q7=function(t,e){var n=e.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(e.cloneNode(!0));var A=e.parentNode;if(A){A.replaceChild(r,e);var i=Vd(t,r);return r.firstChild&&A.replaceChild(r.firstChild,r),i}}return Ni.EMPTY},vS=function(t,e,n){var r=t.ownerDocument;if(!r)throw new Error("Node has no owner document");var A=r.createRange();return A.setStart(t,e),A.setEnd(t,e+n),A},Cv=function(t){if(Gn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(t)).map(function(n){return n.segment})}return H7(t)},X7=function(t,e){if(Gn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(t)).map(function(r){return r.segment})}return Z7(t,e)},J7=function(t,e){return e.letterSpacing!==0?Cv(t):X7(t,e)},j7=[32,160,4961,65792,65793,4153,4241],Z7=function(t,e){for(var n=k6(t,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),r=[],A,i=function(){if(A.value){var o=A.value.slice(),a=ef(o),l="";a.forEach(function(u){j7.indexOf(u)===-1?l+=pn(u):(l.length&&r.push(l),r.push(pn(u)),l="")}),l.length&&r.push(l)}};!(A=n.next()).done;)i();return r},V7=(function(){function t(e,n,r){this.text=eq(n.data,r.textTransform),this.textBounds=Y7(e,this.text,r,n)}return t})(),eq=function(t,e){switch(e){case 1:return t.toLowerCase();case 3:return t.replace(tq,nq);case 2:return t.toUpperCase();default:return t}},tq=/(^|\s|:|-|\(|\))([a-z])/g,nq=function(t,e,n){return t.length>0?e+n.toUpperCase():t},wS=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this;return A.src=r.currentSrc||r.src,A.intrinsicWidth=r.naturalWidth,A.intrinsicHeight=r.naturalHeight,A.context.cache.addImage(A.src),A}return e})(ui),BS=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this;return A.canvas=r,A.intrinsicWidth=r.width,A.intrinsicHeight=r.height,A}return e})(ui),yS=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this,i=new XMLSerializer,o=Vd(n,r);return r.setAttribute("width",o.width+"px"),r.setAttribute("height",o.height+"px"),A.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(r)),A.intrinsicWidth=r.width.baseVal.value,A.intrinsicHeight=r.height.baseVal.value,A.context.cache.addImage(A.svg),A}return e})(ui),CS=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this;return A.value=r.value,A}return e})(ui),bv=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this;return A.start=r.start,A.reversed=typeof r.reversed=="boolean"&&r.reversed===!0,A}return e})(ui),rq=[{type:15,flags:0,unit:"px",number:3}],Aq=[{type:16,flags:0,number:50}],iq=function(t){return t.width>t.height?new Ni(t.left+(t.width-t.height)/2,t.top,t.height,t.height):t.width<t.height?new Ni(t.left,t.top+(t.height-t.width)/2,t.width,t.width):t},oq=function(t){var e=t.type===sq?new Array(t.value.length+1).join("•"):t.value;return e.length===0?t.placeholder||"":e},Uf="checkbox",_f="radio",sq="password",bS=707406591,Ev=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this;switch(A.type=r.type.toLowerCase(),A.checked=r.checked,A.value=oq(r),(A.type===Uf||A.type===_f)&&(A.styles.backgroundColor=3739148031,A.styles.borderTopColor=A.styles.borderRightColor=A.styles.borderBottomColor=A.styles.borderLeftColor=2779096575,A.styles.borderTopWidth=A.styles.borderRightWidth=A.styles.borderBottomWidth=A.styles.borderLeftWidth=1,A.styles.borderTopStyle=A.styles.borderRightStyle=A.styles.borderBottomStyle=A.styles.borderLeftStyle=1,A.styles.backgroundClip=[0],A.styles.backgroundOrigin=[0],A.bounds=iq(A.bounds)),A.type){case Uf:A.styles.borderTopRightRadius=A.styles.borderTopLeftRadius=A.styles.borderBottomRightRadius=A.styles.borderBottomLeftRadius=rq;break;case _f:A.styles.borderTopRightRadius=A.styles.borderTopLeftRadius=A.styles.borderBottomRightRadius=A.styles.borderBottomLeftRadius=Aq;break}return A}return e})(ui),ES=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this,i=r.options[r.selectedIndex||0];return A.value=i&&i.text||"",A}return e})(ui),kS=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this;return A.value=r.value,A}return e})(ui),SS=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this;A.src=r.src,A.width=parseInt(r.width,10)||0,A.height=parseInt(r.height,10)||0,A.backgroundColor=A.styles.backgroundColor;try{if(r.contentWindow&&r.contentWindow.document&&r.contentWindow.document.documentElement){A.tree=FS(n,r.contentWindow.document.documentElement);var i=r.contentWindow.document.documentElement?wc(n,getComputedStyle(r.contentWindow.document.documentElement).backgroundColor):Ri.TRANSPARENT,o=r.contentWindow.document.body?wc(n,getComputedStyle(r.contentWindow.document.body).backgroundColor):Ri.TRANSPARENT;A.backgroundColor=Do(i)?Do(o)?A.styles.backgroundColor:o:i}}catch{}return A}return e})(ui),aq=["OL","UL","MENU"],Df=function(t,e,n,r){for(var A=e.firstChild,i=void 0;A;A=i)if(i=A.nextSibling,QS(A)&&A.data.trim().length>0)n.textNodes.push(new V7(t,A,n.styles));else if(Qa(A))if(DS(A)&&A.assignedNodes)A.assignedNodes().forEach(function(a){return Df(t,a,n,r)});else{var o=xS(t,A);o.styles.isVisible()&&(lq(A,o,r)?o.flags|=4:cq(o.styles)&&(o.flags|=2),aq.indexOf(A.tagName)!==-1&&(o.flags|=8),n.elements.push(o),A.slot,A.shadowRoot?Df(t,A.shadowRoot,o,r):!Nf(A)&&!TS(A)&&!Lf(A)&&Df(t,A,o,r))}},xS=function(t,e){return xv(e)?new wS(t,e):MS(e)?new BS(t,e):TS(e)?new yS(t,e):uq(e)?new CS(t,e):dq(e)?new bv(t,e):fq(e)?new Ev(t,e):Lf(e)?new ES(t,e):Nf(e)?new kS(t,e):US(e)?new SS(t,e):new ui(t,e)},FS=function(t,e){var n=xS(t,e);return n.flags|=4,Df(t,e,n,n),n},lq=function(t,e,n){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Sv(t)&&n.styles.isTransparent()},cq=function(t){return t.isPositioned()||t.isFloating()},QS=function(t){return t.nodeType===Node.TEXT_NODE},Qa=function(t){return t.nodeType===Node.ELEMENT_NODE},kv=function(t){return Qa(t)&&typeof t.style<"u"&&!Of(t)},Of=function(t){return typeof t.className=="object"},uq=function(t){return t.tagName==="LI"},dq=function(t){return t.tagName==="OL"},fq=function(t){return t.tagName==="INPUT"},hq=function(t){return t.tagName==="HTML"},TS=function(t){return t.tagName==="svg"},Sv=function(t){return t.tagName==="BODY"},MS=function(t){return t.tagName==="CANVAS"},IS=function(t){return t.tagName==="VIDEO"},xv=function(t){return t.tagName==="IMG"},US=function(t){return t.tagName==="IFRAME"},_S=function(t){return t.tagName==="STYLE"},pq=function(t){return t.tagName==="SCRIPT"},Nf=function(t){return t.tagName==="TEXTAREA"},Lf=function(t){return t.tagName==="SELECT"},DS=function(t){return t.tagName==="SLOT"},OS=function(t){return t.tagName.indexOf("-")>0},mq=(function(){function t(){this.counters={}}return t.prototype.getCounterValue=function(e){var n=this.counters[e];return n&&n.length?n[n.length-1]:1},t.prototype.getCounterValues=function(e){var n=this.counters[e];return n||[]},t.prototype.pop=function(e){var n=this;e.forEach(function(r){return n.counters[r].pop()})},t.prototype.parse=function(e){var n=this,r=e.counterIncrement,A=e.counterReset,i=!0;r!==null&&r.forEach(function(a){var l=n.counters[a.counter];l&&a.increment!==0&&(i=!1,l.length||l.push(1),l[Math.max(0,l.length-1)]+=a.increment)});var o=[];return i&&A.forEach(function(a){var l=n.counters[a.counter];o.push(a.counter),l||(l=n.counters[a.counter]=[]),l.push(a.reset)}),o},t})(),NS={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},LS={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},gq={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},vq={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ta=function(t,e,n,r,A,i){return t<e||t>n?Ec(t,A,i.length>0):r.integers.reduce(function(o,a,l){for(;t>=a;)t-=a,o+=r.values[l];return o},"")+i},RS=function(t,e,n,r){var A="";do n||t--,A=r(t)+A,t/=e;while(t*e>=e);return A},mn=function(t,e,n,r,A){var i=n-e+1;return(t<0?"-":"")+(RS(Math.abs(t),i,r,function(o){return pn(Math.floor(o%i)+e)})+A)},Ms=function(t,e,n){n===void 0&&(n=". ");var r=e.length;return RS(Math.abs(t),r,!1,function(A){return e[Math.floor(A%r)]})+n},Ma=1,No=2,Lo=4,bc=8,Hi=function(t,e,n,r,A,i){if(t<-9999||t>9999)return Ec(t,4,A.length>0);var o=Math.abs(t),a=A;if(o===0)return e[0]+a;for(var l=0;o>0&&l<=4;l++){var u=o%10;u===0&&Fn(i,Ma)&&a!==""?a=e[u]+a:u>1||u===1&&l===0||u===1&&l===1&&Fn(i,No)||u===1&&l===1&&Fn(i,Lo)&&t>100||u===1&&l>1&&Fn(i,bc)?a=e[u]+(l>0?n[l-1]:"")+a:u===1&&l>0&&(a=n[l-1]+a),o=Math.floor(o/10)}return(t<0?r:"")+a},HS="十百千萬",PS="拾佰仟萬",$S="マイナス",Fv="마이너스",Ec=function(t,e,n){var r=n?". ":"",A=n?"、":"",i=n?", ":"",o=n?" ":"";switch(e){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var a=mn(t,48,57,!0,r);return a.length<4?"0"+a:a;case 4:return Ms(t,"〇一二三四五六七八九",A);case 6:return Ta(t,1,3999,NS,3,r).toLowerCase();case 7:return Ta(t,1,3999,NS,3,r);case 8:return mn(t,945,969,!1,r);case 9:return mn(t,97,122,!1,r);case 10:return mn(t,65,90,!1,r);case 11:return mn(t,1632,1641,!0,r);case 12:case 49:return Ta(t,1,9999,LS,3,r);case 35:return Ta(t,1,9999,LS,3,r).toLowerCase();case 13:return mn(t,2534,2543,!0,r);case 14:case 30:return mn(t,6112,6121,!0,r);case 15:return Ms(t,"子丑寅卯辰巳午未申酉戌亥",A);case 16:return Ms(t,"甲乙丙丁戊己庚辛壬癸",A);case 17:case 48:return Hi(t,"零一二三四五六七八九",HS,"負",A,No|Lo|bc);case 47:return Hi(t,"零壹貳參肆伍陸柒捌玖",PS,"負",A,Ma|No|Lo|bc);case 42:return Hi(t,"零一二三四五六七八九",HS,"负",A,No|Lo|bc);case 41:return Hi(t,"零壹贰叁肆伍陆柒捌玖",PS,"负",A,Ma|No|Lo|bc);case 26:return Hi(t,"〇一二三四五六七八九","十百千万",$S,A,0);case 25:return Hi(t,"零壱弐参四伍六七八九","拾百千万",$S,A,Ma|No|Lo);case 31:return Hi(t,"영일이삼사오육칠팔구","십백천만",Fv,i,Ma|No|Lo);case 33:return Hi(t,"零一二三四五六七八九","十百千萬",Fv,i,0);case 32:return Hi(t,"零壹貳參四五六七八九","拾百千",Fv,i,Ma|No|Lo);case 18:return mn(t,2406,2415,!0,r);case 20:return Ta(t,1,19999,vq,3,r);case 21:return mn(t,2790,2799,!0,r);case 22:return mn(t,2662,2671,!0,r);case 22:return Ta(t,1,10999,gq,3,r);case 23:return Ms(t,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Ms(t,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return mn(t,3302,3311,!0,r);case 28:return Ms(t,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",A);case 29:return Ms(t,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",A);case 34:return mn(t,3792,3801,!0,r);case 37:return mn(t,6160,6169,!0,r);case 38:return mn(t,4160,4169,!0,r);case 39:return mn(t,2918,2927,!0,r);case 40:return mn(t,1776,1785,!0,r);case 43:return mn(t,3046,3055,!0,r);case 44:return mn(t,3174,3183,!0,r);case 45:return mn(t,3664,3673,!0,r);case 46:return mn(t,3872,3881,!0,r);default:return mn(t,48,57,!0,r)}},KS="data-html2canvas-ignore",zS=(function(){function t(e,n,r){if(this.context=e,this.options=r,this.scrolledElements=[],this.referenceElement=n,this.counters=new mq,this.quoteDepth=0,!n.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(n.ownerDocument.documentElement,!1)}return t.prototype.toIFrame=function(e,n){var r=this,A=wq(e,n);if(!A.contentWindow)return Promise.reject("Unable to find iframe window");var i=e.defaultView.pageXOffset,o=e.defaultView.pageYOffset,a=A.contentWindow,l=a.document,u=Cq(A).then(function(){return wr(r,void 0,void 0,function(){var d,h;return rr(this,function(p){switch(p.label){case 0:return this.scrolledElements.forEach(Sq),a&&(a.scrollTo(n.left,n.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(a.scrollY!==n.top||a.scrollX!==n.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(a.scrollX-n.left,a.scrollY-n.top,0,0))),d=this.options.onclone,h=this.clonedReferenceElement,typeof h>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:p.sent(),p.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,yq(l)]:[3,4];case 3:p.sent(),p.label=4;case 4:return typeof d=="function"?[2,Promise.resolve().then(function(){return d(l,h)}).then(function(){return A})]:[2,A]}})})});return l.open(),l.write(Eq(document.doctype)+"<html></html>"),kq(this.referenceElement.ownerDocument,i,o),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),u},t.prototype.createElementClone=function(e){if(uv(e,2))debugger;if(MS(e))return this.createCanvasClone(e);if(IS(e))return this.createVideoClone(e);if(_S(e))return this.createStyleClone(e);var n=e.cloneNode(!1);return xv(n)&&(xv(e)&&e.currentSrc&&e.currentSrc!==e.src&&(n.src=e.currentSrc,n.srcset=""),n.loading==="lazy"&&(n.loading="eager")),OS(n)?this.createCustomElementClone(n):n},t.prototype.createCustomElementClone=function(e){var n=document.createElement("html2canvascustomelement");return Qv(e.style,n),n},t.prototype.createStyleClone=function(e){try{var n=e.sheet;if(n&&n.cssRules){var r=[].slice.call(n.cssRules,0).reduce(function(i,o){return o&&typeof o.cssText=="string"?i+o.cssText:i},""),A=e.cloneNode(!1);return A.textContent=r,A}}catch(i){if(this.context.logger.error("Unable to access cssRules property",i),i.name!=="SecurityError")throw i}return e.cloneNode(!1)},t.prototype.createCanvasClone=function(e){var n;if(this.options.inlineImages&&e.ownerDocument){var r=e.ownerDocument.createElement("img");try{return r.src=e.toDataURL(),r}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var A=e.cloneNode(!1);try{A.width=e.width,A.height=e.height;var i=e.getContext("2d"),o=A.getContext("2d");if(o)if(!this.options.allowTaint&&i)o.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var a=(n=e.getContext("webgl2"))!==null&&n!==void 0?n:e.getContext("webgl");if(a){var l=a.getContextAttributes();l?.preserveDrawingBuffer===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return A}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return A},t.prototype.createVideoClone=function(e){var n=e.ownerDocument.createElement("canvas");n.width=e.offsetWidth,n.height=e.offsetHeight;var r=n.getContext("2d");try{return r&&(r.drawImage(e,0,0,n.width,n.height),this.options.allowTaint||r.getImageData(0,0,n.width,n.height)),n}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var A=e.ownerDocument.createElement("canvas");return A.width=e.offsetWidth,A.height=e.offsetHeight,A},t.prototype.appendChildNode=function(e,n,r){(!Qa(n)||!pq(n)&&!n.hasAttribute(KS)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(n)))&&(!this.options.copyStyles||!Qa(n)||!_S(n))&&e.appendChild(this.cloneNode(n,r))},t.prototype.cloneChildNodes=function(e,n,r){for(var A=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(Qa(i)&&DS(i)&&typeof i.assignedNodes=="function"){var o=i.assignedNodes();o.length&&o.forEach(function(a){return A.appendChildNode(n,a,r)})}else this.appendChildNode(n,i,r)},t.prototype.cloneNode=function(e,n){if(QS(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var r=e.ownerDocument.defaultView;if(r&&Qa(e)&&(kv(e)||Of(e))){var A=this.createElementClone(e);A.style.transitionProperty="none";var i=r.getComputedStyle(e),o=r.getComputedStyle(e,":before"),a=r.getComputedStyle(e,":after");this.referenceElement===e&&kv(A)&&(this.clonedReferenceElement=A),Sv(A)&&Qq(A);var l=this.counters.parse(new AS(this.context,i)),u=this.resolvePseudoContent(e,A,o,kc.BEFORE);OS(e)&&(n=!0),IS(e)||this.cloneChildNodes(e,A,n),u&&A.insertBefore(u,A.firstChild);var d=this.resolvePseudoContent(e,A,a,kc.AFTER);return d&&A.appendChild(d),this.counters.pop(l),(i&&(this.options.copyStyles||Of(e))&&!US(e)||n)&&Qv(i,A),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([A,e.scrollLeft,e.scrollTop]),(Nf(e)||Lf(e))&&(Nf(A)||Lf(A))&&(A.value=e.value),A}return e.cloneNode(!1)},t.prototype.resolvePseudoContent=function(e,n,r,A){var i=this;if(r){var o=r.content,a=n.ownerDocument;if(!(!a||!o||o==="none"||o==="-moz-alt-content"||r.display==="none")){this.counters.parse(new AS(this.context,r));var l=new u7(this.context,r),u=a.createElement("html2canvaspseudoelement");Qv(r,u),l.content.forEach(function(h){if(h.type===0)u.appendChild(a.createTextNode(h.value));else if(h.type===22){var p=a.createElement("img");p.src=h.value,p.style.opacity="1",u.appendChild(p)}else if(h.type===18){if(h.name==="attr"){var m=h.values.filter(Rt);m.length&&u.appendChild(a.createTextNode(e.getAttribute(m[0].value)||""))}else if(h.name==="counter"){var v=h.values.filter(xa),B=v[0],y=v[1];if(B&&Rt(B)){var w=i.counters.getCounterValue(B.value),C=y&&Rt(y)?cv.parse(i.context,y.value):3;u.appendChild(a.createTextNode(Ec(w,C,!1)))}}else if(h.name==="counters"){var k=h.values.filter(xa),B=k[0],F=k[1],y=k[2];if(B&&Rt(B)){var U=i.counters.getCounterValues(B.value),D=y&&Rt(y)?cv.parse(i.context,y.value):3,M=F&&F.type===0?F.value:"",K=U.map(function(me){return Ec(me,D,!1)}).join(M);u.appendChild(a.createTextNode(K))}}}else if(h.type===20)switch(h.value){case"open-quote":u.appendChild(a.createTextNode(rS(l.quotes,i.quoteDepth++,!0)));break;case"close-quote":u.appendChild(a.createTextNode(rS(l.quotes,--i.quoteDepth,!1)));break;default:u.appendChild(a.createTextNode(h.value))}}),u.className=Tv+" "+Mv;var d=A===kc.BEFORE?" "+Tv:" "+Mv;return Of(n)?n.className.baseValue+=d:n.className+=d,u}}},t.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},t})(),kc;(function(t){t[t.BEFORE=0]="BEFORE",t[t.AFTER=1]="AFTER"})(kc||(kc={}));var wq=function(t,e){var n=t.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=e.width.toString(),n.height=e.height.toString(),n.scrolling="no",n.setAttribute(KS,"true"),t.body.appendChild(n),n},Bq=function(t){return new Promise(function(e){if(t.complete){e();return}if(!t.src){e();return}t.onload=e,t.onerror=e})},yq=function(t){return Promise.all([].slice.call(t.images,0).map(Bq))},Cq=function(t){return new Promise(function(e,n){var r=t.contentWindow;if(!r)return n("No window assigned for iframe");var A=r.document;r.onload=t.onload=function(){r.onload=t.onload=null;var i=setInterval(function(){A.body.childNodes.length>0&&A.readyState==="complete"&&(clearInterval(i),e(t))},50)}})},bq=["all","d","content"],Qv=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t.item(n);bq.indexOf(r)===-1&&e.style.setProperty(r,t.getPropertyValue(r))}return e},Eq=function(t){var e="";return t&&(e+="<!DOCTYPE ",t.name&&(e+=t.name),t.internalSubset&&(e+=t.internalSubset),t.publicId&&(e+='"'+t.publicId+'"'),t.systemId&&(e+='"'+t.systemId+'"'),e+=">"),e},kq=function(t,e,n){t&&t.defaultView&&(e!==t.defaultView.pageXOffset||n!==t.defaultView.pageYOffset)&&t.defaultView.scrollTo(e,n)},Sq=function(t){var e=t[0],n=t[1],r=t[2];e.scrollLeft=n,e.scrollTop=r},xq=":before",Fq=":after",Tv="___html2canvas___pseudoelement_before",Mv="___html2canvas___pseudoelement_after",WS=`{
|
|
169
|
-
content: "" !important;
|
|
170
|
-
display: none !important;
|
|
171
|
-
}`,Qq=function(t){Tq(t,"."+Tv+xq+WS+`
|
|
172
|
-
.`+Mv+Fq+WS)},Tq=function(t,e){var n=t.ownerDocument;if(n){var r=n.createElement("style");r.textContent=e,t.appendChild(r)}},GS=(function(){function t(){}return t.getOrigin=function(e){var n=t._link;return n?(n.href=e,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t})(),Mq=(function(){function t(e,n){this.context=e,this._options=n,this._cache={}}return t.prototype.addImage=function(e){var n=Promise.resolve();return this.has(e)||(Uv(e)||Dq(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),n},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return wr(this,void 0,void 0,function(){var n,r,A,i,o=this;return rr(this,function(a){switch(a.label){case 0:return n=GS.isSameOrigin(e),r=!Iv(e)&&this._options.useCORS===!0&&Gn.SUPPORT_CORS_IMAGES&&!n,A=!Iv(e)&&!n&&!Uv(e)&&typeof this._options.proxy=="string"&&Gn.SUPPORT_CORS_XHR&&!r,!n&&this._options.allowTaint===!1&&!Iv(e)&&!Uv(e)&&!A&&!r?[2]:(i=e,A?[4,this.proxy(i)]:[3,2]);case 1:i=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(l,u){var d=new Image;d.onload=function(){return l(d)},d.onerror=u,(Oq(i)||r)&&(d.crossOrigin="anonymous"),d.src=i,d.complete===!0&&setTimeout(function(){return l(d)},500),o._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var n=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var A=e.substring(0,256);return new Promise(function(i,o){var a=Gn.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(a==="text")i(l.response);else{var h=new FileReader;h.addEventListener("load",function(){return i(h.result)},!1),h.addEventListener("error",function(p){return o(p)},!1),h.readAsDataURL(l.response)}else o("Failed to proxy resource "+A+" with status code "+l.status)},l.onerror=o;var u=r.indexOf("?")>-1?"&":"?";if(l.open("GET",""+r+u+"url="+encodeURIComponent(e)+"&responseType="+a),a!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=a),n._options.imageTimeout){var d=n._options.imageTimeout;l.timeout=d,l.ontimeout=function(){return o("Timed out ("+d+"ms) proxying "+A)}}l.send()})},t})(),Iq=/^data:image\/svg\+xml/i,Uq=/^data:image\/.*;base64,/i,_q=/^data:image\/.*/i,Dq=function(t){return Gn.SUPPORT_SVG_DRAWING||!Nq(t)},Iv=function(t){return _q.test(t)},Oq=function(t){return Uq.test(t)},Uv=function(t){return t.substr(0,4)==="blob"},Nq=function(t){return t.substr(-3).toLowerCase()==="svg"||Iq.test(t)},_e=(function(){function t(e,n){this.type=0,this.x=e,this.y=n}return t.prototype.add=function(e,n){return new t(this.x+e,this.y+n)},t})(),Ia=function(t,e,n){return new _e(t.x+(e.x-t.x)*n,t.y+(e.y-t.y)*n)},Rf=(function(){function t(e,n,r,A){this.type=1,this.start=e,this.startControl=n,this.endControl=r,this.end=A}return t.prototype.subdivide=function(e,n){var r=Ia(this.start,this.startControl,e),A=Ia(this.startControl,this.endControl,e),i=Ia(this.endControl,this.end,e),o=Ia(r,A,e),a=Ia(A,i,e),l=Ia(o,a,e);return n?new t(this.start,r,o,l):new t(l,a,i,this.end)},t.prototype.add=function(e,n){return new t(this.start.add(e,n),this.startControl.add(e,n),this.endControl.add(e,n),this.end.add(e,n))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t})(),sA=function(t){return t.type===1},Lq=(function(){function t(e){var n=e.styles,r=e.bounds,A=vc(n.borderTopLeftRadius,r.width,r.height),i=A[0],o=A[1],a=vc(n.borderTopRightRadius,r.width,r.height),l=a[0],u=a[1],d=vc(n.borderBottomRightRadius,r.width,r.height),h=d[0],p=d[1],m=vc(n.borderBottomLeftRadius,r.width,r.height),v=m[0],B=m[1],y=[];y.push((i+l)/r.width),y.push((v+h)/r.width),y.push((o+B)/r.height),y.push((u+p)/r.height);var w=Math.max.apply(Math,y);w>1&&(i/=w,o/=w,l/=w,u/=w,h/=w,p/=w,v/=w,B/=w);var C=r.width-l,k=r.height-p,F=r.width-h,U=r.height-B,D=n.borderTopWidth,M=n.borderRightWidth,K=n.borderBottomWidth,q=n.borderLeftWidth,ce=$t(n.paddingTop,e.bounds.width),me=$t(n.paddingRight,e.bounds.width),ve=$t(n.paddingBottom,e.bounds.width),Be=$t(n.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||o>0?jt(r.left+q/3,r.top+D/3,i-q/3,o-D/3,Mt.TOP_LEFT):new _e(r.left+q/3,r.top+D/3),this.topRightBorderDoubleOuterBox=i>0||o>0?jt(r.left+C,r.top+D/3,l-M/3,u-D/3,Mt.TOP_RIGHT):new _e(r.left+r.width-M/3,r.top+D/3),this.bottomRightBorderDoubleOuterBox=h>0||p>0?jt(r.left+F,r.top+k,h-M/3,p-K/3,Mt.BOTTOM_RIGHT):new _e(r.left+r.width-M/3,r.top+r.height-K/3),this.bottomLeftBorderDoubleOuterBox=v>0||B>0?jt(r.left+q/3,r.top+U,v-q/3,B-K/3,Mt.BOTTOM_LEFT):new _e(r.left+q/3,r.top+r.height-K/3),this.topLeftBorderDoubleInnerBox=i>0||o>0?jt(r.left+q*2/3,r.top+D*2/3,i-q*2/3,o-D*2/3,Mt.TOP_LEFT):new _e(r.left+q*2/3,r.top+D*2/3),this.topRightBorderDoubleInnerBox=i>0||o>0?jt(r.left+C,r.top+D*2/3,l-M*2/3,u-D*2/3,Mt.TOP_RIGHT):new _e(r.left+r.width-M*2/3,r.top+D*2/3),this.bottomRightBorderDoubleInnerBox=h>0||p>0?jt(r.left+F,r.top+k,h-M*2/3,p-K*2/3,Mt.BOTTOM_RIGHT):new _e(r.left+r.width-M*2/3,r.top+r.height-K*2/3),this.bottomLeftBorderDoubleInnerBox=v>0||B>0?jt(r.left+q*2/3,r.top+U,v-q*2/3,B-K*2/3,Mt.BOTTOM_LEFT):new _e(r.left+q*2/3,r.top+r.height-K*2/3),this.topLeftBorderStroke=i>0||o>0?jt(r.left+q/2,r.top+D/2,i-q/2,o-D/2,Mt.TOP_LEFT):new _e(r.left+q/2,r.top+D/2),this.topRightBorderStroke=i>0||o>0?jt(r.left+C,r.top+D/2,l-M/2,u-D/2,Mt.TOP_RIGHT):new _e(r.left+r.width-M/2,r.top+D/2),this.bottomRightBorderStroke=h>0||p>0?jt(r.left+F,r.top+k,h-M/2,p-K/2,Mt.BOTTOM_RIGHT):new _e(r.left+r.width-M/2,r.top+r.height-K/2),this.bottomLeftBorderStroke=v>0||B>0?jt(r.left+q/2,r.top+U,v-q/2,B-K/2,Mt.BOTTOM_LEFT):new _e(r.left+q/2,r.top+r.height-K/2),this.topLeftBorderBox=i>0||o>0?jt(r.left,r.top,i,o,Mt.TOP_LEFT):new _e(r.left,r.top),this.topRightBorderBox=l>0||u>0?jt(r.left+C,r.top,l,u,Mt.TOP_RIGHT):new _e(r.left+r.width,r.top),this.bottomRightBorderBox=h>0||p>0?jt(r.left+F,r.top+k,h,p,Mt.BOTTOM_RIGHT):new _e(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=v>0||B>0?jt(r.left,r.top+U,v,B,Mt.BOTTOM_LEFT):new _e(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||o>0?jt(r.left+q,r.top+D,Math.max(0,i-q),Math.max(0,o-D),Mt.TOP_LEFT):new _e(r.left+q,r.top+D),this.topRightPaddingBox=l>0||u>0?jt(r.left+Math.min(C,r.width-M),r.top+D,C>r.width+M?0:Math.max(0,l-M),Math.max(0,u-D),Mt.TOP_RIGHT):new _e(r.left+r.width-M,r.top+D),this.bottomRightPaddingBox=h>0||p>0?jt(r.left+Math.min(F,r.width-q),r.top+Math.min(k,r.height-K),Math.max(0,h-M),Math.max(0,p-K),Mt.BOTTOM_RIGHT):new _e(r.left+r.width-M,r.top+r.height-K),this.bottomLeftPaddingBox=v>0||B>0?jt(r.left+q,r.top+Math.min(U,r.height-K),Math.max(0,v-q),Math.max(0,B-K),Mt.BOTTOM_LEFT):new _e(r.left+q,r.top+r.height-K),this.topLeftContentBox=i>0||o>0?jt(r.left+q+Be,r.top+D+ce,Math.max(0,i-(q+Be)),Math.max(0,o-(D+ce)),Mt.TOP_LEFT):new _e(r.left+q+Be,r.top+D+ce),this.topRightContentBox=l>0||u>0?jt(r.left+Math.min(C,r.width+q+Be),r.top+D+ce,C>r.width+q+Be?0:l-q+Be,u-(D+ce),Mt.TOP_RIGHT):new _e(r.left+r.width-(M+me),r.top+D+ce),this.bottomRightContentBox=h>0||p>0?jt(r.left+Math.min(F,r.width-(q+Be)),r.top+Math.min(k,r.height+D+ce),Math.max(0,h-(M+me)),p-(K+ve),Mt.BOTTOM_RIGHT):new _e(r.left+r.width-(M+me),r.top+r.height-(K+ve)),this.bottomLeftContentBox=v>0||B>0?jt(r.left+q+Be,r.top+U,Math.max(0,v-(q+Be)),B-(K+ve),Mt.BOTTOM_LEFT):new _e(r.left+q+Be,r.top+r.height-(K+ve))}return t})(),Mt;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Mt||(Mt={}));var jt=function(t,e,n,r,A){var i=4*((Math.sqrt(2)-1)/3),o=n*i,a=r*i,l=t+n,u=e+r;switch(A){case Mt.TOP_LEFT:return new Rf(new _e(t,u),new _e(t,u-a),new _e(l-o,e),new _e(l,e));case Mt.TOP_RIGHT:return new Rf(new _e(t,e),new _e(t+o,e),new _e(l,u-a),new _e(l,u));case Mt.BOTTOM_RIGHT:return new Rf(new _e(l,e),new _e(l,e+a),new _e(t+o,u),new _e(t,u));case Mt.BOTTOM_LEFT:default:return new Rf(new _e(l,u),new _e(l-o,u),new _e(t,e+a),new _e(t,e))}},Hf=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},Rq=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},Pf=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},Hq=(function(){function t(e,n,r){this.offsetX=e,this.offsetY=n,this.matrix=r,this.type=0,this.target=6}return t})(),$f=(function(){function t(e,n){this.path=e,this.target=n,this.type=1}return t})(),Pq=(function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t})(),$q=function(t){return t.type===0},YS=function(t){return t.type===1},Kq=function(t){return t.type===2},qS=function(t,e){return t.length===e.length?t.some(function(n,r){return n===e[r]}):!1},zq=function(t,e,n,r,A){return t.map(function(i,o){switch(o){case 0:return i.add(e,n);case 1:return i.add(e+r,n);case 2:return i.add(e+r,n+A);case 3:return i.add(e,n+A)}return i})},XS=(function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t})(),JS=(function(){function t(e,n){if(this.container=e,this.parent=n,this.effects=[],this.curves=new Lq(this.container),this.container.styles.opacity<1&&this.effects.push(new Pq(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,A=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Hq(r,A,i))}if(this.container.styles.overflowX!==0){var o=Hf(this.curves),a=Pf(this.curves);qS(o,a)?this.effects.push(new $f(o,6)):(this.effects.push(new $f(o,2)),this.effects.push(new $f(a,4)))}}return t.prototype.getEffects=function(e){for(var n=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,A=this.effects.slice(0);r;){var i=r.effects.filter(function(l){return!YS(l)});if(n||r.container.styles.position!==0||!r.parent){if(A.unshift.apply(A,i),n=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var o=Hf(r.curves),a=Pf(r.curves);qS(o,a)||A.unshift(new $f(a,6))}}else A.unshift.apply(A,i);r=r.parent}return A.filter(function(l){return Fn(l.target,e)})},t})(),_v=function(t,e,n,r){t.container.elements.forEach(function(A){var i=Fn(A.flags,4),o=Fn(A.flags,2),a=new JS(A,t);Fn(A.styles.display,2048)&&r.push(a);var l=Fn(A.flags,8)?[]:r;if(i||o){var u=i||A.styles.isPositioned()?n:e,d=new XS(a);if(A.styles.isPositioned()||A.styles.opacity<1||A.styles.isTransformed()){var h=A.styles.zIndex.order;if(h<0){var p=0;u.negativeZIndex.some(function(v,B){return h>v.element.container.styles.zIndex.order?(p=B,!1):p>0}),u.negativeZIndex.splice(p,0,d)}else if(h>0){var m=0;u.positiveZIndex.some(function(v,B){return h>=v.element.container.styles.zIndex.order?(m=B+1,!1):m>0}),u.positiveZIndex.splice(m,0,d)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(d)}else A.styles.isFloating()?u.nonPositionedFloats.push(d):u.nonPositionedInlineLevel.push(d);_v(a,d,i?d:n,l)}else A.styles.isInlineLevel()?e.inlineLevel.push(a):e.nonInlineLevel.push(a),_v(a,e,n,l);Fn(A.flags,8)&&jS(A,l)})},jS=function(t,e){for(var n=t instanceof bv?t.start:1,r=t instanceof bv?t.reversed:!1,A=0;A<e.length;A++){var i=e[A];i.container instanceof CS&&typeof i.container.value=="number"&&i.container.value!==0&&(n=i.container.value),i.listValue=Ec(n,i.container.styles.listStyleType,!0),n+=r?-1:1}},Wq=function(t){var e=new JS(t,null),n=new XS(e),r=[];return _v(e,n,n,r),jS(e.container,r),n},ZS=function(t,e){switch(e){case 0:return aA(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return aA(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return aA(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);default:return aA(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},Gq=function(t,e){switch(e){case 0:return aA(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return aA(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return aA(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);default:return aA(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},Yq=function(t,e){switch(e){case 0:return aA(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return aA(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return aA(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);default:return aA(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},qq=function(t,e){switch(e){case 0:return Kf(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Kf(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Kf(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);default:return Kf(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Kf=function(t,e){var n=[];return sA(t)?n.push(t.subdivide(.5,!1)):n.push(t),sA(e)?n.push(e.subdivide(.5,!0)):n.push(e),n},aA=function(t,e,n,r){var A=[];return sA(t)?A.push(t.subdivide(.5,!1)):A.push(t),sA(n)?A.push(n.subdivide(.5,!0)):A.push(n),sA(r)?A.push(r.subdivide(.5,!0).reverse()):A.push(r),sA(e)?A.push(e.subdivide(.5,!1).reverse()):A.push(e),A},VS=function(t){var e=t.bounds,n=t.styles;return e.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},zf=function(t){var e=t.styles,n=t.bounds,r=$t(e.paddingLeft,n.width),A=$t(e.paddingRight,n.width),i=$t(e.paddingTop,n.width),o=$t(e.paddingBottom,n.width);return n.add(r+e.borderLeftWidth,i+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+A),-(e.borderTopWidth+e.borderBottomWidth+i+o))},Xq=function(t,e){return t===0?e.bounds:t===2?zf(e):VS(e)},Jq=function(t,e){return t===0?e.bounds:t===2?zf(e):VS(e)},Dv=function(t,e,n){var r=Xq(_a(t.styles.backgroundOrigin,e),t),A=Jq(_a(t.styles.backgroundClip,e),t),i=jq(_a(t.styles.backgroundSize,e),n,r),o=i[0],a=i[1],l=vc(_a(t.styles.backgroundPosition,e),r.width-o,r.height-a),u=Zq(_a(t.styles.backgroundRepeat,e),l,i,r,A),d=Math.round(r.left+l[0]),h=Math.round(r.top+l[1]);return[u,d,h,o,a]},Ua=function(t){return Rt(t)&&t.value===Fa.AUTO},Wf=function(t){return typeof t=="number"},jq=function(t,e,n){var r=e[0],A=e[1],i=e[2],o=t[0],a=t[1];if(!o)return[0,0];if(bn(o)&&a&&bn(a))return[$t(o,n.width),$t(a,n.height)];var l=Wf(i);if(Rt(o)&&(o.value===Fa.CONTAIN||o.value===Fa.COVER)){if(Wf(i)){var u=n.width/n.height;return u<i!=(o.value===Fa.COVER)?[n.width,n.width/i]:[n.height*i,n.height]}return[n.width,n.height]}var d=Wf(r),h=Wf(A),p=d||h;if(Ua(o)&&(!a||Ua(a))){if(d&&h)return[r,A];if(!l&&!p)return[n.width,n.height];if(p&&l){var m=d?r:A*i,v=h?A:r/i;return[m,v]}var B=d?r:n.width,y=h?A:n.height;return[B,y]}if(l){var w=0,C=0;return bn(o)?w=$t(o,n.width):bn(a)&&(C=$t(a,n.height)),Ua(o)?w=C*i:(!a||Ua(a))&&(C=w/i),[w,C]}var k=null,F=null;if(bn(o)?k=$t(o,n.width):a&&bn(a)&&(F=$t(a,n.height)),k!==null&&(!a||Ua(a))&&(F=d&&h?k/r*A:n.height),F!==null&&Ua(o)&&(k=d&&h?F/A*r:n.width),k!==null&&F!==null)return[k,F];throw new Error("Unable to calculate background-size for element")},_a=function(t,e){var n=t[e];return typeof n>"u"?t[0]:n},Zq=function(t,e,n,r,A){var i=e[0],o=e[1],a=n[0],l=n[1];switch(t){case 2:return[new _e(Math.round(r.left),Math.round(r.top+o)),new _e(Math.round(r.left+r.width),Math.round(r.top+o)),new _e(Math.round(r.left+r.width),Math.round(l+r.top+o)),new _e(Math.round(r.left),Math.round(l+r.top+o))];case 3:return[new _e(Math.round(r.left+i),Math.round(r.top)),new _e(Math.round(r.left+i+a),Math.round(r.top)),new _e(Math.round(r.left+i+a),Math.round(r.height+r.top)),new _e(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new _e(Math.round(r.left+i),Math.round(r.top+o)),new _e(Math.round(r.left+i+a),Math.round(r.top+o)),new _e(Math.round(r.left+i+a),Math.round(r.top+o+l)),new _e(Math.round(r.left+i),Math.round(r.top+o+l))];default:return[new _e(Math.round(A.left),Math.round(A.top)),new _e(Math.round(A.left+A.width),Math.round(A.top)),new _e(Math.round(A.left+A.width),Math.round(A.height+A.top)),new _e(Math.round(A.left),Math.round(A.height+A.top))]}},Vq="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",ex="Hidden Text",eX=(function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,n){var r=this._document.createElement("div"),A=this._document.createElement("img"),i=this._document.createElement("span"),o=this._document.body;r.style.visibility="hidden",r.style.fontFamily=e,r.style.fontSize=n,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",o.appendChild(r),A.src=Vq,A.width=1,A.height=1,A.style.margin="0",A.style.padding="0",A.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=n,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(ex)),r.appendChild(i),r.appendChild(A);var a=A.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(ex)),r.style.lineHeight="normal",A.style.verticalAlign="super";var l=A.offsetTop-r.offsetTop+2;return o.removeChild(r),{baseline:a,middle:l}},t.prototype.getMetrics=function(e,n){var r=e+" "+n;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(e,n)),this._data[r]},t})(),tx=(function(){function t(e,n){this.context=e,this.options=n}return t})(),tX=1e4,nX=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this;return A._activeEffects=[],A.canvas=r.canvas?r.canvas:document.createElement("canvas"),A.ctx=A.canvas.getContext("2d"),r.canvas||(A.canvas.width=Math.floor(r.width*r.scale),A.canvas.height=Math.floor(r.height*r.scale),A.canvas.style.width=r.width+"px",A.canvas.style.height=r.height+"px"),A.fontMetrics=new eX(document),A.ctx.scale(A.options.scale,A.options.scale),A.ctx.translate(-r.x,-r.y),A.ctx.textBaseline="bottom",A._activeEffects=[],A.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),A}return e.prototype.applyEffects=function(n){for(var r=this;this._activeEffects.length;)this.popEffect();n.forEach(function(A){return r.applyEffect(A)})},e.prototype.applyEffect=function(n){this.ctx.save(),Kq(n)&&(this.ctx.globalAlpha=n.opacity),$q(n)&&(this.ctx.translate(n.offsetX,n.offsetY),this.ctx.transform(n.matrix[0],n.matrix[1],n.matrix[2],n.matrix[3],n.matrix[4],n.matrix[5]),this.ctx.translate(-n.offsetX,-n.offsetY)),YS(n)&&(this.path(n.path),this.ctx.clip()),this._activeEffects.push(n)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(n){return wr(this,void 0,void 0,function(){var r;return rr(this,function(A){switch(A.label){case 0:return r=n.element.container.styles,r.isVisible()?[4,this.renderStackContent(n)]:[3,2];case 1:A.sent(),A.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(n){return wr(this,void 0,void 0,function(){return rr(this,function(r){switch(r.label){case 0:if(Fn(n.container.flags,16))debugger;return n.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(n)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(n)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(n,r,A){var i=this;if(r===0)this.ctx.fillText(n.text,n.bounds.left,n.bounds.top+A);else{var o=Cv(n.text);o.reduce(function(a,l){return i.ctx.fillText(l,a,n.bounds.top+A),a+i.ctx.measureText(l).width},n.bounds.left)}},e.prototype.createFontStyle=function(n){var r=n.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),A=sX(n.fontFamily).join(", "),i=gc(n.fontSize)?""+n.fontSize.number+n.fontSize.unit:n.fontSize.number+"px";return[[n.fontStyle,r,n.fontWeight,i,A].join(" "),A,i]},e.prototype.renderTextNode=function(n,r){return wr(this,void 0,void 0,function(){var A,i,o,a,l,u,d,h,p=this;return rr(this,function(m){return A=this.createFontStyle(r),i=A[0],o=A[1],a=A[2],this.ctx.font=i,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(o,a),u=l.baseline,d=l.middle,h=r.paintOrder,n.textBounds.forEach(function(v){h.forEach(function(B){switch(B){case 0:p.ctx.fillStyle=Ln(r.color),p.renderTextWithLetterSpacing(v,r.letterSpacing,u);var y=r.textShadow;y.length&&v.text.trim().length&&(y.slice(0).reverse().forEach(function(w){p.ctx.shadowColor=Ln(w.color),p.ctx.shadowOffsetX=w.offsetX.number*p.options.scale,p.ctx.shadowOffsetY=w.offsetY.number*p.options.scale,p.ctx.shadowBlur=w.blur.number,p.renderTextWithLetterSpacing(v,r.letterSpacing,u)}),p.ctx.shadowColor="",p.ctx.shadowOffsetX=0,p.ctx.shadowOffsetY=0,p.ctx.shadowBlur=0),r.textDecorationLine.length&&(p.ctx.fillStyle=Ln(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(w){switch(w){case 1:p.ctx.fillRect(v.bounds.left,Math.round(v.bounds.top+u),v.bounds.width,1);break;case 2:p.ctx.fillRect(v.bounds.left,Math.round(v.bounds.top),v.bounds.width,1);break;case 3:p.ctx.fillRect(v.bounds.left,Math.ceil(v.bounds.top+d),v.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&v.text.trim().length&&(p.ctx.strokeStyle=Ln(r.webkitTextStrokeColor),p.ctx.lineWidth=r.webkitTextStrokeWidth,p.ctx.lineJoin=window.chrome?"miter":"round",p.ctx.strokeText(v.text,v.bounds.left,v.bounds.top+u)),p.ctx.strokeStyle="",p.ctx.lineWidth=0,p.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(n,r,A){if(A&&n.intrinsicWidth>0&&n.intrinsicHeight>0){var i=zf(n),o=Pf(r);this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(A,0,0,n.intrinsicWidth,n.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(n){return wr(this,void 0,void 0,function(){var r,A,i,o,a,l,C,C,u,d,h,p,F,m,v,U,B,y,w,C,k,F,U;return rr(this,function(D){switch(D.label){case 0:this.applyEffects(n.getEffects(4)),r=n.container,A=n.curves,i=r.styles,o=0,a=r.textNodes,D.label=1;case 1:return o<a.length?(l=a[o],[4,this.renderTextNode(l,i)]):[3,4];case 2:D.sent(),D.label=3;case 3:return o++,[3,1];case 4:if(!(r instanceof wS))return[3,8];D.label=5;case 5:return D.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return C=D.sent(),this.renderReplacedElement(r,A,C),[3,8];case 7:return D.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof BS&&this.renderReplacedElement(r,A,r.canvas),!(r instanceof yS))return[3,12];D.label=9;case 9:return D.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return C=D.sent(),this.renderReplacedElement(r,A,C),[3,12];case 11:return D.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof SS&&r.tree?(u=new e(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,u.render(r.tree)]):[3,14];case 13:d=D.sent(),r.width&&r.height&&this.ctx.drawImage(d,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),D.label=14;case 14:if(r instanceof Ev&&(h=Math.min(r.bounds.width,r.bounds.height),r.type===Uf?r.checked&&(this.ctx.save(),this.path([new _e(r.bounds.left+h*.39363,r.bounds.top+h*.79),new _e(r.bounds.left+h*.16,r.bounds.top+h*.5549),new _e(r.bounds.left+h*.27347,r.bounds.top+h*.44071),new _e(r.bounds.left+h*.39694,r.bounds.top+h*.5649),new _e(r.bounds.left+h*.72983,r.bounds.top+h*.23),new _e(r.bounds.left+h*.84,r.bounds.top+h*.34085),new _e(r.bounds.left+h*.39363,r.bounds.top+h*.79)]),this.ctx.fillStyle=Ln(bS),this.ctx.fill(),this.ctx.restore()):r.type===_f&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+h/2,r.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=Ln(bS),this.ctx.fill(),this.ctx.restore())),rX(r)&&r.value.length){switch(p=this.createFontStyle(i),F=p[0],m=p[1],v=this.fontMetrics.getMetrics(F,m).baseline,this.ctx.font=F,this.ctx.fillStyle=Ln(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=iX(r.styles.textAlign),U=zf(r),B=0,r.styles.textAlign){case 1:B+=U.width/2;break;case 2:B+=U.width;break}y=U.add(B,0,0,-U.height/2+1),this.ctx.save(),this.path([new _e(U.left,U.top),new _e(U.left+U.width,U.top),new _e(U.left+U.width,U.top+U.height),new _e(U.left,U.top+U.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Cc(r.value,y),i.letterSpacing,v),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Fn(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(w=r.styles.listStyleImage,w.type!==0)return[3,18];C=void 0,k=w.url,D.label=15;case 15:return D.trys.push([15,17,,18]),[4,this.context.cache.match(k)];case 16:return C=D.sent(),this.ctx.drawImage(C,r.bounds.left-(C.width+10),r.bounds.top),[3,18];case 17:return D.sent(),this.context.logger.error("Error loading list-style-image "+k),[3,18];case 18:return[3,20];case 19:n.listValue&&r.styles.listStyleType!==-1&&(F=this.createFontStyle(i)[0],this.ctx.font=F,this.ctx.fillStyle=Ln(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",U=new Ni(r.bounds.left,r.bounds.top+$t(r.styles.paddingTop,r.bounds.width),r.bounds.width,eS(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Cc(n.listValue,U),i.letterSpacing,eS(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),D.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(n){return wr(this,void 0,void 0,function(){var r,A,w,i,o,w,a,l,w,u,d,w,h,p,w,m,v,w,B,y,w;return rr(this,function(C){switch(C.label){case 0:if(Fn(n.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(n.element)];case 1:C.sent(),r=0,A=n.negativeZIndex,C.label=2;case 2:return r<A.length?(w=A[r],[4,this.renderStack(w)]):[3,5];case 3:C.sent(),C.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(n.element)];case 6:C.sent(),i=0,o=n.nonInlineLevel,C.label=7;case 7:return i<o.length?(w=o[i],[4,this.renderNode(w)]):[3,10];case 8:C.sent(),C.label=9;case 9:return i++,[3,7];case 10:a=0,l=n.nonPositionedFloats,C.label=11;case 11:return a<l.length?(w=l[a],[4,this.renderStack(w)]):[3,14];case 12:C.sent(),C.label=13;case 13:return a++,[3,11];case 14:u=0,d=n.nonPositionedInlineLevel,C.label=15;case 15:return u<d.length?(w=d[u],[4,this.renderStack(w)]):[3,18];case 16:C.sent(),C.label=17;case 17:return u++,[3,15];case 18:h=0,p=n.inlineLevel,C.label=19;case 19:return h<p.length?(w=p[h],[4,this.renderNode(w)]):[3,22];case 20:C.sent(),C.label=21;case 21:return h++,[3,19];case 22:m=0,v=n.zeroOrAutoZIndexOrTransformedOrOpacity,C.label=23;case 23:return m<v.length?(w=v[m],[4,this.renderStack(w)]):[3,26];case 24:C.sent(),C.label=25;case 25:return m++,[3,23];case 26:B=0,y=n.positiveZIndex,C.label=27;case 27:return B<y.length?(w=y[B],[4,this.renderStack(w)]):[3,30];case 28:C.sent(),C.label=29;case 29:return B++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(n){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(n.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(n){this.ctx.beginPath(),this.formatPath(n),this.ctx.closePath()},e.prototype.formatPath=function(n){var r=this;n.forEach(function(A,i){var o=sA(A)?A.start:A;i===0?r.ctx.moveTo(o.x,o.y):r.ctx.lineTo(o.x,o.y),sA(A)&&r.ctx.bezierCurveTo(A.startControl.x,A.startControl.y,A.endControl.x,A.endControl.y,A.end.x,A.end.y)})},e.prototype.renderRepeat=function(n,r,A,i){this.path(n),this.ctx.fillStyle=r,this.ctx.translate(A,i),this.ctx.fill(),this.ctx.translate(-A,-i)},e.prototype.resizeImage=function(n,r,A){var i;if(n.width===r&&n.height===A)return n;var o=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,a=o.createElement("canvas");a.width=Math.max(1,r),a.height=Math.max(1,A);var l=a.getContext("2d");return l.drawImage(n,0,0,n.width,n.height,0,0,r,A),a},e.prototype.renderBackgroundImage=function(n){return wr(this,void 0,void 0,function(){var r,A,i,o,a,l;return rr(this,function(u){switch(u.label){case 0:r=n.styles.backgroundImage.length-1,A=function(d){var h,p,m,ce,Y,x,Be,te,K,v,ce,Y,x,Be,te,B,y,w,C,k,F,U,D,M,K,q,ce,me,ve,Be,te,V,Y,x,Q,P,T,S,G,Ae,ne,ee;return rr(this,function(re){switch(re.label){case 0:if(d.type!==0)return[3,5];h=void 0,p=d.url,re.label=1;case 1:return re.trys.push([1,3,,4]),[4,i.context.cache.match(p)];case 2:return h=re.sent(),[3,4];case 3:return re.sent(),i.context.logger.error("Error loading background-image "+p),[3,4];case 4:return h&&(m=Dv(n,r,[h.width,h.height,h.width/h.height]),ce=m[0],Y=m[1],x=m[2],Be=m[3],te=m[4],K=i.ctx.createPattern(i.resizeImage(h,Be,te),"repeat"),i.renderRepeat(ce,K,Y,x)),[3,6];case 5:$G(d)?(v=Dv(n,r,[null,null,null]),ce=v[0],Y=v[1],x=v[2],Be=v[3],te=v[4],B=NG(d.angle,Be,te),y=B[0],w=B[1],C=B[2],k=B[3],F=B[4],U=document.createElement("canvas"),U.width=Be,U.height=te,D=U.getContext("2d"),M=D.createLinearGradient(w,k,C,F),Kk(d.stops,y).forEach(function(pe){return M.addColorStop(pe.stop,Ln(pe.color))}),D.fillStyle=M,D.fillRect(0,0,Be,te),Be>0&&te>0&&(K=i.ctx.createPattern(U,"repeat"),i.renderRepeat(ce,K,Y,x))):KG(d)&&(q=Dv(n,r,[null,null,null]),ce=q[0],me=q[1],ve=q[2],Be=q[3],te=q[4],V=d.position.length===0?[sv]:d.position,Y=$t(V[0],Be),x=$t(V[V.length-1],te),Q=LG(d,Y,x,Be,te),P=Q[0],T=Q[1],P>0&&T>0&&(S=i.ctx.createRadialGradient(me+Y,ve+x,0,me+Y,ve+x,P),Kk(d.stops,P*2).forEach(function(pe){return S.addColorStop(pe.stop,Ln(pe.color))}),i.path(ce),i.ctx.fillStyle=S,P!==T?(G=n.bounds.left+.5*n.bounds.width,Ae=n.bounds.top+.5*n.bounds.height,ne=T/P,ee=1/ne,i.ctx.save(),i.ctx.translate(G,Ae),i.ctx.transform(1,0,0,ne,0,0),i.ctx.translate(-G,-Ae),i.ctx.fillRect(me,ee*(ve-Ae)+Ae,Be,te*ee),i.ctx.restore()):i.ctx.fill())),re.label=6;case 6:return r--,[2]}})},i=this,o=0,a=n.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return o<a.length?(l=a[o],[5,A(l)]):[3,4];case 2:u.sent(),u.label=3;case 3:return o++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(n,r,A){return wr(this,void 0,void 0,function(){return rr(this,function(i){return this.path(ZS(A,r)),this.ctx.fillStyle=Ln(n),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(n,r,A,i){return wr(this,void 0,void 0,function(){var o,a;return rr(this,function(l){switch(l.label){case 0:return r<3?[4,this.renderSolidBorder(n,A,i)]:[3,2];case 1:return l.sent(),[2];case 2:return o=Gq(i,A),this.path(o),this.ctx.fillStyle=Ln(n),this.ctx.fill(),a=Yq(i,A),this.path(a),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(n){return wr(this,void 0,void 0,function(){var r,A,i,o,a,l,u,d,h=this;return rr(this,function(p){switch(p.label){case 0:return this.applyEffects(n.getEffects(2)),r=n.container.styles,A=!Do(r.backgroundColor)||r.backgroundImage.length,i=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],o=AX(_a(r.backgroundClip,0),n.curves),A||r.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),Do(r.backgroundColor)||(this.ctx.fillStyle=Ln(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(n.container)]):[3,2];case 1:p.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(m){h.ctx.save();var v=Hf(n.curves),B=m.inset?0:tX,y=zq(v,-B+(m.inset?1:-1)*m.spread.number,(m.inset?1:-1)*m.spread.number,m.spread.number*(m.inset?-2:2),m.spread.number*(m.inset?-2:2));m.inset?(h.path(v),h.ctx.clip(),h.mask(y)):(h.mask(v),h.ctx.clip(),h.path(y)),h.ctx.shadowOffsetX=m.offsetX.number+B,h.ctx.shadowOffsetY=m.offsetY.number,h.ctx.shadowColor=Ln(m.color),h.ctx.shadowBlur=m.blur.number,h.ctx.fillStyle=m.inset?Ln(m.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),p.label=2;case 2:a=0,l=0,u=i,p.label=3;case 3:return l<u.length?(d=u[l],d.style!==0&&!Do(d.color)&&d.width>0?d.style!==2?[3,5]:[4,this.renderDashedDottedBorder(d.color,d.width,a,n.curves,2)]:[3,11]):[3,13];case 4:return p.sent(),[3,11];case 5:return d.style!==3?[3,7]:[4,this.renderDashedDottedBorder(d.color,d.width,a,n.curves,3)];case 6:return p.sent(),[3,11];case 7:return d.style!==4?[3,9]:[4,this.renderDoubleBorder(d.color,d.width,a,n.curves)];case 8:return p.sent(),[3,11];case 9:return[4,this.renderSolidBorder(d.color,a,n.curves)];case 10:p.sent(),p.label=11;case 11:a++,p.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(n,r,A,i,o){return wr(this,void 0,void 0,function(){var a,l,u,d,h,p,m,v,B,y,w,C,k,F,U,D,U,D;return rr(this,function(M){return this.ctx.save(),a=qq(i,A),l=ZS(i,A),o===2&&(this.path(l),this.ctx.clip()),sA(l[0])?(u=l[0].start.x,d=l[0].start.y):(u=l[0].x,d=l[0].y),sA(l[1])?(h=l[1].end.x,p=l[1].end.y):(h=l[1].x,p=l[1].y),A===0||A===2?m=Math.abs(u-h):m=Math.abs(d-p),this.ctx.beginPath(),o===3?this.formatPath(a):this.formatPath(l.slice(0,2)),v=r<3?r*3:r*2,B=r<3?r*2:r,o===3&&(v=r,B=r),y=!0,m<=v*2?y=!1:m<=v*2+B?(w=m/(2*v+B),v*=w,B*=w):(C=Math.floor((m+B)/(v+B)),k=(m-C*v)/(C-1),F=(m-(C+1)*v)/C,B=F<=0||Math.abs(B-k)<Math.abs(B-F)?k:F),y&&(o===3?this.ctx.setLineDash([0,v+B]):this.ctx.setLineDash([v,B])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=Ln(n),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(sA(l[0])&&(U=l[3],D=l[0],this.ctx.beginPath(),this.formatPath([new _e(U.end.x,U.end.y),new _e(D.start.x,D.start.y)]),this.ctx.stroke()),sA(l[1])&&(U=l[1],D=l[2],this.ctx.beginPath(),this.formatPath([new _e(U.end.x,U.end.y),new _e(D.start.x,D.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(n){return wr(this,void 0,void 0,function(){var r;return rr(this,function(A){switch(A.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Ln(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=Wq(n),[4,this.renderStack(r)];case 1:return A.sent(),this.applyEffects([]),[2,this.canvas]}})})},e})(tx),rX=function(t){return t instanceof kS||t instanceof ES?!0:t instanceof Ev&&t.type!==_f&&t.type!==Uf},AX=function(t,e){switch(t){case 0:return Hf(e);case 2:return Rq(e);default:return Pf(e)}},iX=function(t){switch(t){case 1:return"center";case 2:return"right";default:return"left"}},oX=["-apple-system","system-ui"],sX=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return oX.indexOf(e)===-1}):t},aX=(function(t){UA(e,t);function e(n,r){var A=t.call(this,n,r)||this;return A.canvas=r.canvas?r.canvas:document.createElement("canvas"),A.ctx=A.canvas.getContext("2d"),A.options=r,A.canvas.width=Math.floor(r.width*r.scale),A.canvas.height=Math.floor(r.height*r.scale),A.canvas.style.width=r.width+"px",A.canvas.style.height=r.height+"px",A.ctx.scale(A.options.scale,A.options.scale),A.ctx.translate(-r.x,-r.y),A.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),A}return e.prototype.render=function(n){return wr(this,void 0,void 0,function(){var r,A;return rr(this,function(i){switch(i.label){case 0:return r=yv(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,n),[4,lX(r)];case 1:return A=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Ln(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(A,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e})(tx),lX=function(t){return new Promise(function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},cX=(function(){function t(e){var n=e.id,r=e.enabled;this.id=n,this.enabled=r,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Zd([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Zd([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Zd([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Zd([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t})(),uX=(function(){function t(e,n){var r;this.windowBounds=n,this.instanceName="#"+t.instanceCount++,this.logger=new cX({id:this.instanceName,enabled:e.logging}),this.cache=(r=e.cache)!==null&&r!==void 0?r:new Mq(this,e)}return t.instanceCount=1,t})(),dX=function(t,e){return e===void 0&&(e={}),fX(t,e)};typeof window<"u"&&GS.setContext(window);var fX=function(t,e){return wr(void 0,void 0,void 0,function(){var n,r,A,i,o,a,l,u,d,h,p,m,v,B,y,w,C,k,F,U,M,D,M,K,q,ce,me,ve,Be,te,V,Y,x,Q,P,T,S,G,Ae,ne;return rr(this,function(ee){switch(ee.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(n=t.ownerDocument,!n)throw new Error("Element is not attached to a Document");if(r=n.defaultView,!r)throw new Error("Document is not attached to a Window");return A={allowTaint:(K=e.allowTaint)!==null&&K!==void 0?K:!1,imageTimeout:(q=e.imageTimeout)!==null&&q!==void 0?q:15e3,proxy:e.proxy,useCORS:(ce=e.useCORS)!==null&&ce!==void 0?ce:!1},i=Hg({logging:(me=e.logging)!==null&&me!==void 0?me:!0,cache:e.cache},A),o={windowWidth:(ve=e.windowWidth)!==null&&ve!==void 0?ve:r.innerWidth,windowHeight:(Be=e.windowHeight)!==null&&Be!==void 0?Be:r.innerHeight,scrollX:(te=e.scrollX)!==null&&te!==void 0?te:r.pageXOffset,scrollY:(V=e.scrollY)!==null&&V!==void 0?V:r.pageYOffset},a=new Ni(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),l=new uX(i,a),u=(Y=e.foreignObjectRendering)!==null&&Y!==void 0?Y:!1,d={allowTaint:(x=e.allowTaint)!==null&&x!==void 0?x:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:u,copyStyles:u},l.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),h=new zS(l,t,d),p=h.clonedReferenceElement,p?[4,h.toIFrame(n,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return m=ee.sent(),v=Sv(p)||hq(p)?z8(p.ownerDocument):Vd(l,p),B=v.width,y=v.height,w=v.left,C=v.top,k=hX(l,p,e.backgroundColor),F={canvas:e.canvas,backgroundColor:k,scale:(P=(Q=e.scale)!==null&&Q!==void 0?Q:r.devicePixelRatio)!==null&&P!==void 0?P:1,x:((T=e.x)!==null&&T!==void 0?T:0)+w,y:((S=e.y)!==null&&S!==void 0?S:0)+C,width:(G=e.width)!==null&&G!==void 0?G:Math.ceil(B),height:(Ae=e.height)!==null&&Ae!==void 0?Ae:Math.ceil(y)},u?(l.logger.debug("Document cloned, using foreign object rendering"),M=new aX(l,F),[4,M.render(p)]):[3,3];case 2:return U=ee.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+w+","+C+" with size "+B+"x"+y+" using computed rendering"),l.logger.debug("Starting DOM parsing"),D=FS(l,p),k===D.styles.backgroundColor&&(D.styles.backgroundColor=Ri.TRANSPARENT),l.logger.debug("Starting renderer for element at "+F.x+","+F.y+" with size "+F.width+"x"+F.height),M=new nX(l,F),[4,M.render(D)];case 4:U=ee.sent(),ee.label=5;case 5:return(!((ne=e.removeContainer)!==null&&ne!==void 0)||ne)&&(zS.destroy(m)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,U]}})})},hX=function(t,e,n){var r=e.ownerDocument,A=r.documentElement?wc(t,getComputedStyle(r.documentElement).backgroundColor):Ri.TRANSPARENT,i=r.body?wc(t,getComputedStyle(r.body).backgroundColor):Ri.TRANSPARENT,o=typeof n=="string"?wc(t,n):n===null?Ri.TRANSPARENT:4294967295;return e===r.documentElement?Do(A)?Do(i)?o:i:A:o};const pX=s.defineComponent({__name:"dom-renderer",props:{modelValue:{type:String,default:""},fixedWidth:{type:Number,default:0},renderUpdates:{type:Boolean,default:!1},exportToSvg:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},pending:{type:Boolean,default:!1},emitPending:{type:Boolean,default:!1},debug:{type:Boolean,default:!1}},emits:["update:modelValue","update:pending"],setup(t,{emit:e}){const n=t,r=e,A=s.ref(),i=s.ref(""),o=s.ref(),a=s.ref(!0);async function l(){if(!A.value||!a.value)return"";const d=A.value;if(!d.isConnected)return"";try{n.emitPending&&r("update:pending",!0);const h=d.firstElementChild;if(!h)return"";const p=await dX(h,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,...n.options});if(!a.value||!A.value||!d.isConnected)return"";const m=p.toDataURL();if(r("update:modelValue",m),n.emitPending&&r("update:pending",!1),n.debug){const v=new Image;v.src=m,document.body.appendChild(v)}return m}catch(h){return a.value&&n.emitPending&&r("update:pending",!1),console.warn("dom-renderer: Render failed",h),""}}const u=_g.debounce(async()=>{i.value=await l()},300,{trailing:!0,leading:!1});return s.onMounted(()=>{const d=A.value;n.renderUpdates&&(o.value=new MutationObserver(async h=>{!a.value||!d.isConnected||(n.emitPending&&r("update:pending",!0),u())}),o.value.observe(d,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{n.emitPending&&r("update:pending",!0),u()},500)}),s.onBeforeUnmount(()=>{a.value=!1,o.value&&o.value.disconnect(),u.cancel()}),(d,h)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:A,style:s.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[s.renderSlot(d.$slots,"default")],6))}});var Gf={exports:{}},mX=Gf.exports,nx;function gX(){return nx||(nx=1,(function(t,e){(function(n,r){t.exports=r()})(mX,(()=>(()=>{var n={873:(o,a)=>{var l,u,d=(function(){var h=function(te,V){var Y=te,x=w[V],Q=null,P=0,T=null,S=[],G={},Ae=function($,N){Q=(function(R){for(var J=new Array(R),z=0;z<R;z+=1){J[z]=new Array(R);for(var le=0;le<R;le+=1)J[z][le]=null}return J})(P=4*Y+17),ne(0,0),ne(P-7,0),ne(0,P-7),re(),ee(),de($,N),Y>=7&&pe($),T==null&&(T=W(Y,x,S)),Ce(T,N)},ne=function($,N){for(var R=-1;R<=7;R+=1)if(!($+R<=-1||P<=$+R))for(var J=-1;J<=7;J+=1)N+J<=-1||P<=N+J||(Q[$+R][N+J]=0<=R&&R<=6&&(J==0||J==6)||0<=J&&J<=6&&(R==0||R==6)||2<=R&&R<=4&&2<=J&&J<=4)},ee=function(){for(var $=8;$<P-8;$+=1)Q[$][6]==null&&(Q[$][6]=$%2==0);for(var N=8;N<P-8;N+=1)Q[6][N]==null&&(Q[6][N]=N%2==0)},re=function(){for(var $=C.getPatternPosition(Y),N=0;N<$.length;N+=1)for(var R=0;R<$.length;R+=1){var J=$[N],z=$[R];if(Q[J][z]==null)for(var le=-2;le<=2;le+=1)for(var E=-2;E<=2;E+=1)Q[J+le][z+E]=le==-2||le==2||E==-2||E==2||le==0&&E==0}},pe=function($){for(var N=C.getBCHTypeNumber(Y),R=0;R<18;R+=1){var J=!$&&(N>>R&1)==1;Q[Math.floor(R/3)][R%3+P-8-3]=J}for(R=0;R<18;R+=1)J=!$&&(N>>R&1)==1,Q[R%3+P-8-3][Math.floor(R/3)]=J},de=function($,N){for(var R=x<<3|N,J=C.getBCHTypeInfo(R),z=0;z<15;z+=1){var le=!$&&(J>>z&1)==1;z<6?Q[z][8]=le:z<8?Q[z+1][8]=le:Q[P-15+z][8]=le}for(z=0;z<15;z+=1)le=!$&&(J>>z&1)==1,z<8?Q[8][P-z-1]=le:z<9?Q[8][15-z-1+1]=le:Q[8][15-z-1]=le;Q[P-8][8]=!$},Ce=function($,N){for(var R=-1,J=P-1,z=7,le=0,E=C.getMaskFunction(N),_=P-1;_>0;_-=2)for(_==6&&(_-=1);;){for(var O=0;O<2;O+=1)if(Q[J][_-O]==null){var ie=!1;le<$.length&&(ie=($[le]>>>z&1)==1),E(J,_-O)&&(ie=!ie),Q[J][_-O]=ie,(z-=1)==-1&&(le+=1,z=7)}if((J+=R)<0||P<=J){J-=R,R=-R;break}}},W=function($,N,R){for(var J=U.getRSBlocks($,N),z=D(),le=0;le<R.length;le+=1){var E=R[le];z.put(E.getMode(),4),z.put(E.getLength(),C.getLengthInBits(E.getMode(),$)),E.write(z)}var _=0;for(le=0;le<J.length;le+=1)_+=J[le].dataCount;if(z.getLengthInBits()>8*_)throw"code length overflow. ("+z.getLengthInBits()+">"+8*_+")";for(z.getLengthInBits()+4<=8*_&&z.put(0,4);z.getLengthInBits()%8!=0;)z.putBit(!1);for(;!(z.getLengthInBits()>=8*_||(z.put(236,8),z.getLengthInBits()>=8*_));)z.put(17,8);return(function(O,ie){for(var X=0,be=0,we=0,ae=new Array(ie.length),he=new Array(ie.length),xe=0;xe<ie.length;xe+=1){var Pe=ie[xe].dataCount,ot=ie[xe].totalCount-Pe;be=Math.max(be,Pe),we=Math.max(we,ot),ae[xe]=new Array(Pe);for(var $e=0;$e<ae[xe].length;$e+=1)ae[xe][$e]=255&O.getBuffer()[$e+X];X+=Pe;var ht=C.getErrorCorrectPolynomial(ot),Bt=F(ae[xe],ht.getLength()-1).mod(ht);for(he[xe]=new Array(ht.getLength()-1),$e=0;$e<he[xe].length;$e+=1){var Et=$e+Bt.getLength()-he[xe].length;he[xe][$e]=Et>=0?Bt.getAt(Et):0}}var En=0;for($e=0;$e<ie.length;$e+=1)En+=ie[$e].totalCount;var Yt=new Array(En),Kt=0;for($e=0;$e<be;$e+=1)for(xe=0;xe<ie.length;xe+=1)$e<ae[xe].length&&(Yt[Kt]=ae[xe][$e],Kt+=1);for($e=0;$e<we;$e+=1)for(xe=0;xe<ie.length;xe+=1)$e<he[xe].length&&(Yt[Kt]=he[xe][$e],Kt+=1);return Yt})(z,J)};G.addData=function($,N){var R=null;switch(N=N||"Byte"){case"Numeric":R=M($);break;case"Alphanumeric":R=K($);break;case"Byte":R=q($);break;case"Kanji":R=ce($);break;default:throw"mode:"+N}S.push(R),T=null},G.isDark=function($,N){if($<0||P<=$||N<0||P<=N)throw $+","+N;return Q[$][N]},G.getModuleCount=function(){return P},G.make=function(){if(Y<1){for(var $=1;$<40;$++){for(var N=U.getRSBlocks($,x),R=D(),J=0;J<S.length;J++){var z=S[J];R.put(z.getMode(),4),R.put(z.getLength(),C.getLengthInBits(z.getMode(),$)),z.write(R)}var le=0;for(J=0;J<N.length;J++)le+=N[J].dataCount;if(R.getLengthInBits()<=8*le)break}Y=$}Ae(!1,(function(){for(var E=0,_=0,O=0;O<8;O+=1){Ae(!0,O);var ie=C.getLostPoint(G);(O==0||E>ie)&&(E=ie,_=O)}return _})())},G.createTableTag=function($,N){$=$||2;var R="";R+='<table style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: "+(N=N===void 0?4*$:N)+"px;",R+='">',R+="<tbody>";for(var J=0;J<G.getModuleCount();J+=1){R+="<tr>";for(var z=0;z<G.getModuleCount();z+=1)R+='<td style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: 0px;",R+=" width: "+$+"px;",R+=" height: "+$+"px;",R+=" background-color: ",R+=G.isDark(J,z)?"#000000":"#ffffff",R+=";",R+='"/>';R+="</tr>"}return(R+="</tbody>")+"</table>"},G.createSvgTag=function($,N,R,J){var z={};typeof arguments[0]=="object"&&($=(z=arguments[0]).cellSize,N=z.margin,R=z.alt,J=z.title),$=$||2,N=N===void 0?4*$:N,(R=typeof R=="string"?{text:R}:R||{}).text=R.text||null,R.id=R.text?R.id||"qrcode-description":null,(J=typeof J=="string"?{text:J}:J||{}).text=J.text||null,J.id=J.text?J.id||"qrcode-title":null;var le,E,_,O,ie=G.getModuleCount()*$+2*N,X="";for(O="l"+$+",0 0,"+$+" -"+$+",0 0,-"+$+"z ",X+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',X+=z.scalable?"":' width="'+ie+'px" height="'+ie+'px"',X+=' viewBox="0 0 '+ie+" "+ie+'" ',X+=' preserveAspectRatio="xMinYMin meet"',X+=J.text||R.text?' role="img" aria-labelledby="'+j([J.id,R.id].join(" ").trim())+'"':"",X+=">",X+=J.text?'<title id="'+j(J.id)+'">'+j(J.text)+"</title>":"",X+=R.text?'<description id="'+j(R.id)+'">'+j(R.text)+"</description>":"",X+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',X+='<path d="',E=0;E<G.getModuleCount();E+=1)for(_=E*$+N,le=0;le<G.getModuleCount();le+=1)G.isDark(E,le)&&(X+="M"+(le*$+N)+","+_+O);return(X+='" stroke="transparent" fill="black"/>')+"</svg>"},G.createDataURL=function($,N){$=$||2,N=N===void 0?4*$:N;var R=G.getModuleCount()*$+2*N,J=N,z=R-N;return Be(R,R,(function(le,E){if(J<=le&&le<z&&J<=E&&E<z){var _=Math.floor((le-J)/$),O=Math.floor((E-J)/$);return G.isDark(O,_)?0:1}return 1}))},G.createImgTag=function($,N,R){$=$||2,N=N===void 0?4*$:N;var J=G.getModuleCount()*$+2*N,z="";return z+="<img",z+=' src="',z+=G.createDataURL($,N),z+='"',z+=' width="',z+=J,z+='"',z+=' height="',z+=J,z+='"',R&&(z+=' alt="',z+=j(R),z+='"'),z+"/>"};var j=function($){for(var N="",R=0;R<$.length;R+=1){var J=$.charAt(R);switch(J){case"<":N+="<";break;case">":N+=">";break;case"&":N+="&";break;case'"':N+=""";break;default:N+=J}}return N};return G.createASCII=function($,N){if(($=$||1)<2)return(function(ae){ae=ae===void 0?2:ae;var he,xe,Pe,ot,$e,ht=1*G.getModuleCount()+2*ae,Bt=ae,Et=ht-ae,En={"██":"█","█ ":"▀"," █":"▄"," ":" "},Yt={"██":"▀","█ ":"▀"," █":" "," ":" "},Kt="";for(he=0;he<ht;he+=2){for(Pe=Math.floor((he-Bt)/1),ot=Math.floor((he+1-Bt)/1),xe=0;xe<ht;xe+=1)$e="█",Bt<=xe&&xe<Et&&Bt<=he&&he<Et&&G.isDark(Pe,Math.floor((xe-Bt)/1))&&($e=" "),Bt<=xe&&xe<Et&&Bt<=he+1&&he+1<Et&&G.isDark(ot,Math.floor((xe-Bt)/1))?$e+=" ":$e+="█",Kt+=ae<1&&he+1>=Et?Yt[$e]:En[$e];Kt+=`
|
|
173
|
-
`}return ht%2&&ae>0?Kt.substring(0,Kt.length-ht-1)+Array(ht+1).join("▀"):Kt.substring(0,Kt.length-1)})(N);$-=1,N=N===void 0?2*$:N;var R,J,z,le,E=G.getModuleCount()*$+2*N,_=N,O=E-N,ie=Array($+1).join("██"),X=Array($+1).join(" "),be="",we="";for(R=0;R<E;R+=1){for(z=Math.floor((R-_)/$),we="",J=0;J<E;J+=1)le=1,_<=J&&J<O&&_<=R&&R<O&&G.isDark(z,Math.floor((J-_)/$))&&(le=0),we+=le?ie:X;for(z=0;z<$;z+=1)be+=we+`
|
|
174
|
-
`}return be.substring(0,be.length-1)},G.renderTo2dContext=function($,N){N=N||2;for(var R=G.getModuleCount(),J=0;J<R;J++)for(var z=0;z<R;z++)$.fillStyle=G.isDark(J,z)?"black":"white",$.fillRect(J*N,z*N,N,N)},G};h.stringToBytes=(h.stringToBytesFuncs={default:function(te){for(var V=[],Y=0;Y<te.length;Y+=1){var x=te.charCodeAt(Y);V.push(255&x)}return V}}).default,h.createStringToBytes=function(te,V){var Y=(function(){for(var Q=ve(te),P=function(){var ee=Q.read();if(ee==-1)throw"eof";return ee},T=0,S={};;){var G=Q.read();if(G==-1)break;var Ae=P(),ne=P()<<8|P();S[String.fromCharCode(G<<8|Ae)]=ne,T+=1}if(T!=V)throw T+" != "+V;return S})(),x=63;return function(Q){for(var P=[],T=0;T<Q.length;T+=1){var S=Q.charCodeAt(T);if(S<128)P.push(S);else{var G=Y[Q.charAt(T)];typeof G=="number"?(255&G)==G?P.push(G):(P.push(G>>>8),P.push(255&G)):P.push(x)}}return P}};var p,m,v,B,y,w={L:1,M:0,Q:3,H:2},C=(p=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],m=1335,v=7973,y=function(te){for(var V=0;te!=0;)V+=1,te>>>=1;return V},(B={}).getBCHTypeInfo=function(te){for(var V=te<<10;y(V)-y(m)>=0;)V^=m<<y(V)-y(m);return 21522^(te<<10|V)},B.getBCHTypeNumber=function(te){for(var V=te<<12;y(V)-y(v)>=0;)V^=v<<y(V)-y(v);return te<<12|V},B.getPatternPosition=function(te){return p[te-1]},B.getMaskFunction=function(te){switch(te){case 0:return function(V,Y){return(V+Y)%2==0};case 1:return function(V,Y){return V%2==0};case 2:return function(V,Y){return Y%3==0};case 3:return function(V,Y){return(V+Y)%3==0};case 4:return function(V,Y){return(Math.floor(V/2)+Math.floor(Y/3))%2==0};case 5:return function(V,Y){return V*Y%2+V*Y%3==0};case 6:return function(V,Y){return(V*Y%2+V*Y%3)%2==0};case 7:return function(V,Y){return(V*Y%3+(V+Y)%2)%2==0};default:throw"bad maskPattern:"+te}},B.getErrorCorrectPolynomial=function(te){for(var V=F([1],0),Y=0;Y<te;Y+=1)V=V.multiply(F([1,k.gexp(Y)],0));return V},B.getLengthInBits=function(te,V){if(1<=V&&V<10)switch(te){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+te}else if(V<27)switch(te){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+te}else{if(!(V<41))throw"type:"+V;switch(te){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+te}}},B.getLostPoint=function(te){for(var V=te.getModuleCount(),Y=0,x=0;x<V;x+=1)for(var Q=0;Q<V;Q+=1){for(var P=0,T=te.isDark(x,Q),S=-1;S<=1;S+=1)if(!(x+S<0||V<=x+S))for(var G=-1;G<=1;G+=1)Q+G<0||V<=Q+G||S==0&&G==0||T==te.isDark(x+S,Q+G)&&(P+=1);P>5&&(Y+=3+P-5)}for(x=0;x<V-1;x+=1)for(Q=0;Q<V-1;Q+=1){var Ae=0;te.isDark(x,Q)&&(Ae+=1),te.isDark(x+1,Q)&&(Ae+=1),te.isDark(x,Q+1)&&(Ae+=1),te.isDark(x+1,Q+1)&&(Ae+=1),Ae!=0&&Ae!=4||(Y+=3)}for(x=0;x<V;x+=1)for(Q=0;Q<V-6;Q+=1)te.isDark(x,Q)&&!te.isDark(x,Q+1)&&te.isDark(x,Q+2)&&te.isDark(x,Q+3)&&te.isDark(x,Q+4)&&!te.isDark(x,Q+5)&&te.isDark(x,Q+6)&&(Y+=40);for(Q=0;Q<V;Q+=1)for(x=0;x<V-6;x+=1)te.isDark(x,Q)&&!te.isDark(x+1,Q)&&te.isDark(x+2,Q)&&te.isDark(x+3,Q)&&te.isDark(x+4,Q)&&!te.isDark(x+5,Q)&&te.isDark(x+6,Q)&&(Y+=40);var ne=0;for(Q=0;Q<V;Q+=1)for(x=0;x<V;x+=1)te.isDark(x,Q)&&(ne+=1);return Y+Math.abs(100*ne/V/V-50)/5*10},B),k=(function(){for(var te=new Array(256),V=new Array(256),Y=0;Y<8;Y+=1)te[Y]=1<<Y;for(Y=8;Y<256;Y+=1)te[Y]=te[Y-4]^te[Y-5]^te[Y-6]^te[Y-8];for(Y=0;Y<255;Y+=1)V[te[Y]]=Y;return{glog:function(x){if(x<1)throw"glog("+x+")";return V[x]},gexp:function(x){for(;x<0;)x+=255;for(;x>=256;)x-=255;return te[x]}}})();function F(te,V){if(te.length===void 0)throw te.length+"/"+V;var Y=(function(){for(var Q=0;Q<te.length&&te[Q]==0;)Q+=1;for(var P=new Array(te.length-Q+V),T=0;T<te.length-Q;T+=1)P[T]=te[T+Q];return P})(),x={getAt:function(Q){return Y[Q]},getLength:function(){return Y.length},multiply:function(Q){for(var P=new Array(x.getLength()+Q.getLength()-1),T=0;T<x.getLength();T+=1)for(var S=0;S<Q.getLength();S+=1)P[T+S]^=k.gexp(k.glog(x.getAt(T))+k.glog(Q.getAt(S)));return F(P,0)},mod:function(Q){if(x.getLength()-Q.getLength()<0)return x;for(var P=k.glog(x.getAt(0))-k.glog(Q.getAt(0)),T=new Array(x.getLength()),S=0;S<x.getLength();S+=1)T[S]=x.getAt(S);for(S=0;S<Q.getLength();S+=1)T[S]^=k.gexp(k.glog(Q.getAt(S))+P);return F(T,0).mod(Q)}};return x}var U=(function(){var te=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],V=function(x,Q){var P={};return P.totalCount=x,P.dataCount=Q,P},Y={getRSBlocks:function(x,Q){var P=(function(pe,de){switch(de){case w.L:return te[4*(pe-1)+0];case w.M:return te[4*(pe-1)+1];case w.Q:return te[4*(pe-1)+2];case w.H:return te[4*(pe-1)+3];default:return}})(x,Q);if(P===void 0)throw"bad rs block @ typeNumber:"+x+"/errorCorrectionLevel:"+Q;for(var T=P.length/3,S=[],G=0;G<T;G+=1)for(var Ae=P[3*G+0],ne=P[3*G+1],ee=P[3*G+2],re=0;re<Ae;re+=1)S.push(V(ne,ee));return S}};return Y})(),D=function(){var te=[],V=0,Y={getBuffer:function(){return te},getAt:function(x){var Q=Math.floor(x/8);return(te[Q]>>>7-x%8&1)==1},put:function(x,Q){for(var P=0;P<Q;P+=1)Y.putBit((x>>>Q-P-1&1)==1)},getLengthInBits:function(){return V},putBit:function(x){var Q=Math.floor(V/8);te.length<=Q&&te.push(0),x&&(te[Q]|=128>>>V%8),V+=1}};return Y},M=function(te){var V=te,Y={getMode:function(){return 1},getLength:function(P){return V.length},write:function(P){for(var T=V,S=0;S+2<T.length;)P.put(x(T.substring(S,S+3)),10),S+=3;S<T.length&&(T.length-S==1?P.put(x(T.substring(S,S+1)),4):T.length-S==2&&P.put(x(T.substring(S,S+2)),7))}},x=function(P){for(var T=0,S=0;S<P.length;S+=1)T=10*T+Q(P.charAt(S));return T},Q=function(P){if("0"<=P&&P<="9")return P.charCodeAt(0)-48;throw"illegal char :"+P};return Y},K=function(te){var V=te,Y={getMode:function(){return 2},getLength:function(Q){return V.length},write:function(Q){for(var P=V,T=0;T+1<P.length;)Q.put(45*x(P.charAt(T))+x(P.charAt(T+1)),11),T+=2;T<P.length&&Q.put(x(P.charAt(T)),6)}},x=function(Q){if("0"<=Q&&Q<="9")return Q.charCodeAt(0)-48;if("A"<=Q&&Q<="Z")return Q.charCodeAt(0)-65+10;switch(Q){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+Q}};return Y},q=function(te){var V=h.stringToBytes(te);return{getMode:function(){return 4},getLength:function(Y){return V.length},write:function(Y){for(var x=0;x<V.length;x+=1)Y.put(V[x],8)}}},ce=function(te){var V=h.stringToBytesFuncs.SJIS;if(!V)throw"sjis not supported.";(function(){var Q=V("友");if(Q.length!=2||(Q[0]<<8|Q[1])!=38726)throw"sjis not supported."})();var Y=V(te),x={getMode:function(){return 8},getLength:function(Q){return~~(Y.length/2)},write:function(Q){for(var P=Y,T=0;T+1<P.length;){var S=(255&P[T])<<8|255&P[T+1];if(33088<=S&&S<=40956)S-=33088;else{if(!(57408<=S&&S<=60351))throw"illegal char at "+(T+1)+"/"+S;S-=49472}S=192*(S>>>8&255)+(255&S),Q.put(S,13),T+=2}if(T<P.length)throw"illegal char at "+(T+1)}};return x},me=function(){var te=[],V={writeByte:function(Y){te.push(255&Y)},writeShort:function(Y){V.writeByte(Y),V.writeByte(Y>>>8)},writeBytes:function(Y,x,Q){x=x||0,Q=Q||Y.length;for(var P=0;P<Q;P+=1)V.writeByte(Y[P+x])},writeString:function(Y){for(var x=0;x<Y.length;x+=1)V.writeByte(Y.charCodeAt(x))},toByteArray:function(){return te},toString:function(){var Y="";Y+="[";for(var x=0;x<te.length;x+=1)x>0&&(Y+=","),Y+=te[x];return Y+"]"}};return V},ve=function(te){var V=te,Y=0,x=0,Q=0,P={read:function(){for(;Q<8;){if(Y>=V.length){if(Q==0)return-1;throw"unexpected end of file./"+Q}var S=V.charAt(Y);if(Y+=1,S=="=")return Q=0,-1;S.match(/^\s$/)||(x=x<<6|T(S.charCodeAt(0)),Q+=6)}var G=x>>>Q-8&255;return Q-=8,G}},T=function(S){if(65<=S&&S<=90)return S-65;if(97<=S&&S<=122)return S-97+26;if(48<=S&&S<=57)return S-48+52;if(S==43)return 62;if(S==47)return 63;throw"c:"+S};return P},Be=function(te,V,Y){for(var x=(function(ne,ee){var re=ne,pe=ee,de=new Array(ne*ee),Ce={setPixel:function($,N,R){de[N*re+$]=R},write:function($){$.writeString("GIF87a"),$.writeShort(re),$.writeShort(pe),$.writeByte(128),$.writeByte(0),$.writeByte(0),$.writeByte(0),$.writeByte(0),$.writeByte(0),$.writeByte(255),$.writeByte(255),$.writeByte(255),$.writeString(","),$.writeShort(0),$.writeShort(0),$.writeShort(re),$.writeShort(pe),$.writeByte(0);var N=W(2);$.writeByte(2);for(var R=0;N.length-R>255;)$.writeByte(255),$.writeBytes(N,R,255),R+=255;$.writeByte(N.length-R),$.writeBytes(N,R,N.length-R),$.writeByte(0),$.writeString(";")}},W=function($){for(var N=1<<$,R=1+(1<<$),J=$+1,z=j(),le=0;le<N;le+=1)z.add(String.fromCharCode(le));z.add(String.fromCharCode(N)),z.add(String.fromCharCode(R));var E,_,O,ie=me(),X=(E=ie,_=0,O=0,{write:function(he,xe){if(he>>>xe)throw"length over";for(;_+xe>=8;)E.writeByte(255&(he<<_|O)),xe-=8-_,he>>>=8-_,O=0,_=0;O|=he<<_,_+=xe},flush:function(){_>0&&E.writeByte(O)}});X.write(N,J);var be=0,we=String.fromCharCode(de[be]);for(be+=1;be<de.length;){var ae=String.fromCharCode(de[be]);be+=1,z.contains(we+ae)?we+=ae:(X.write(z.indexOf(we),J),z.size()<4095&&(z.size()==1<<J&&(J+=1),z.add(we+ae)),we=ae)}return X.write(z.indexOf(we),J),X.write(R,J),X.flush(),ie.toByteArray()},j=function(){var $={},N=0,R={add:function(J){if(R.contains(J))throw"dup key:"+J;$[J]=N,N+=1},size:function(){return N},indexOf:function(J){return $[J]},contains:function(J){return $[J]!==void 0}};return R};return Ce})(te,V),Q=0;Q<V;Q+=1)for(var P=0;P<te;P+=1)x.setPixel(P,Q,Y(P,Q));var T=me();x.write(T);for(var S=(function(){var ne=0,ee=0,re=0,pe="",de={},Ce=function(j){pe+=String.fromCharCode(W(63&j))},W=function(j){if(!(j<0)){if(j<26)return 65+j;if(j<52)return j-26+97;if(j<62)return j-52+48;if(j==62)return 43;if(j==63)return 47}throw"n:"+j};return de.writeByte=function(j){for(ne=ne<<8|255&j,ee+=8,re+=1;ee>=6;)Ce(ne>>>ee-6),ee-=6},de.flush=function(){if(ee>0&&(Ce(ne<<6-ee),ne=0,ee=0),re%3!=0)for(var j=3-re%3,$=0;$<j;$+=1)pe+="="},de.toString=function(){return pe},de})(),G=T.toByteArray(),Ae=0;Ae<G.length;Ae+=1)S.writeByte(G[Ae]);return S.flush(),"data:image/gif;base64,"+S};return h})();d.stringToBytesFuncs["UTF-8"]=function(h){return(function(p){for(var m=[],v=0;v<p.length;v++){var B=p.charCodeAt(v);B<128?m.push(B):B<2048?m.push(192|B>>6,128|63&B):B<55296||B>=57344?m.push(224|B>>12,128|B>>6&63,128|63&B):(v++,B=65536+((1023&B)<<10|1023&p.charCodeAt(v)),m.push(240|B>>18,128|B>>12&63,128|B>>6&63,128|63&B))}return m})(h)},(u=typeof(l=function(){return d})=="function"?l.apply(a,[]):l)===void 0||(o.exports=u)}},r={};function A(o){var a=r[o];if(a!==void 0)return a.exports;var l=r[o]={exports:{}};return n[o](l,l.exports,A),l.exports}A.n=o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return A.d(a,{a}),a},A.d=(o,a)=>{for(var l in a)A.o(a,l)&&!A.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:a[l]})},A.o=(o,a)=>Object.prototype.hasOwnProperty.call(o,a);var i={};return(()=>{A.d(i,{default:()=>V});const o=Y=>!!Y&&typeof Y=="object"&&!Array.isArray(Y);function a(Y,...x){if(!x.length)return Y;const Q=x.shift();return Q!==void 0&&o(Y)&&o(Q)?(Y=Object.assign({},Y),Object.keys(Q).forEach((P=>{const T=Y[P],S=Q[P];Array.isArray(T)&&Array.isArray(S)?Y[P]=S:o(T)&&o(S)?Y[P]=a(Object.assign({},T),S):Y[P]=S})),a(Y,...x)):Y}function l(Y,x){const Q=document.createElement("a");Q.download=x,Q.href=Y,document.body.appendChild(Q),Q.click(),document.body.removeChild(Q)}const u={L:.07,M:.15,Q:.25,H:.3};class d{constructor({svg:x,type:Q,window:P}){this._svg=x,this._type=Q,this._window=P}draw(x,Q,P,T){let S;switch(this._type){case"dots":S=this._drawDot;break;case"classy":S=this._drawClassy;break;case"classy-rounded":S=this._drawClassyRounded;break;case"rounded":S=this._drawRounded;break;case"extra-rounded":S=this._drawExtraRounded;break;default:S=this._drawSquare}S.call(this,{x,y:Q,size:P,getNeighbor:T})}_rotateFigure({x,y:Q,size:P,rotation:T=0,draw:S}){var G;const Ae=x+P/2,ne=Q+P/2;S(),(G=this._element)===null||G===void 0||G.setAttribute("transform",`rotate(${180*T/Math.PI},${Ae},${ne})`)}_basicDot(x){const{size:Q,x:P,y:T}=x;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(P+Q/2)),this._element.setAttribute("cy",String(T+Q/2)),this._element.setAttribute("r",String(Q/2))}}))}_basicSquare(x){const{size:Q,x:P,y:T}=x;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(P)),this._element.setAttribute("y",String(T)),this._element.setAttribute("width",String(Q)),this._element.setAttribute("height",String(Q))}}))}_basicSideRounded(x){const{size:Q,x:P,y:T}=x;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${P} ${T}v ${Q}h `+Q/2+`a ${Q/2} ${Q/2}, 0, 0, 0, 0 ${-Q}`)}}))}_basicCornerRounded(x){const{size:Q,x:P,y:T}=x;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${P} ${T}v ${Q}h ${Q}v `+-Q/2+`a ${Q/2} ${Q/2}, 0, 0, 0, ${-Q/2} ${-Q/2}`)}}))}_basicCornerExtraRounded(x){const{size:Q,x:P,y:T}=x;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${P} ${T}v ${Q}h ${Q}a ${Q} ${Q}, 0, 0, 0, ${-Q} ${-Q}`)}}))}_basicCornersRounded(x){const{size:Q,x:P,y:T}=x;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("d",`M ${P} ${T}v `+Q/2+`a ${Q/2} ${Q/2}, 0, 0, 0, ${Q/2} ${Q/2}h `+Q/2+"v "+-Q/2+`a ${Q/2} ${Q/2}, 0, 0, 0, ${-Q/2} ${-Q/2}`)}}))}_drawDot({x,y:Q,size:P}){this._basicDot({x,y:Q,size:P,rotation:0})}_drawSquare({x,y:Q,size:P}){this._basicSquare({x,y:Q,size:P,rotation:0})}_drawRounded({x,y:Q,size:P,getNeighbor:T}){const S=T?+T(-1,0):0,G=T?+T(1,0):0,Ae=T?+T(0,-1):0,ne=T?+T(0,1):0,ee=S+G+Ae+ne;if(ee!==0)if(ee>2||S&&G||Ae&&ne)this._basicSquare({x,y:Q,size:P,rotation:0});else{if(ee===2){let re=0;return S&&Ae?re=Math.PI/2:Ae&&G?re=Math.PI:G&&ne&&(re=-Math.PI/2),void this._basicCornerRounded({x,y:Q,size:P,rotation:re})}if(ee===1){let re=0;return Ae?re=Math.PI/2:G?re=Math.PI:ne&&(re=-Math.PI/2),void this._basicSideRounded({x,y:Q,size:P,rotation:re})}}else this._basicDot({x,y:Q,size:P,rotation:0})}_drawExtraRounded({x,y:Q,size:P,getNeighbor:T}){const S=T?+T(-1,0):0,G=T?+T(1,0):0,Ae=T?+T(0,-1):0,ne=T?+T(0,1):0,ee=S+G+Ae+ne;if(ee!==0)if(ee>2||S&&G||Ae&&ne)this._basicSquare({x,y:Q,size:P,rotation:0});else{if(ee===2){let re=0;return S&&Ae?re=Math.PI/2:Ae&&G?re=Math.PI:G&&ne&&(re=-Math.PI/2),void this._basicCornerExtraRounded({x,y:Q,size:P,rotation:re})}if(ee===1){let re=0;return Ae?re=Math.PI/2:G?re=Math.PI:ne&&(re=-Math.PI/2),void this._basicSideRounded({x,y:Q,size:P,rotation:re})}}else this._basicDot({x,y:Q,size:P,rotation:0})}_drawClassy({x,y:Q,size:P,getNeighbor:T}){const S=T?+T(-1,0):0,G=T?+T(1,0):0,Ae=T?+T(0,-1):0,ne=T?+T(0,1):0;S+G+Ae+ne!==0?S||Ae?G||ne?this._basicSquare({x,y:Q,size:P,rotation:0}):this._basicCornerRounded({x,y:Q,size:P,rotation:Math.PI/2}):this._basicCornerRounded({x,y:Q,size:P,rotation:-Math.PI/2}):this._basicCornersRounded({x,y:Q,size:P,rotation:Math.PI/2})}_drawClassyRounded({x,y:Q,size:P,getNeighbor:T}){const S=T?+T(-1,0):0,G=T?+T(1,0):0,Ae=T?+T(0,-1):0,ne=T?+T(0,1):0;S+G+Ae+ne!==0?S||Ae?G||ne?this._basicSquare({x,y:Q,size:P,rotation:0}):this._basicCornerExtraRounded({x,y:Q,size:P,rotation:Math.PI/2}):this._basicCornerExtraRounded({x,y:Q,size:P,rotation:-Math.PI/2}):this._basicCornersRounded({x,y:Q,size:P,rotation:Math.PI/2})}}const h={dot:"dot",square:"square",extraRounded:"extra-rounded"},p=Object.values(h);class m{constructor({svg:x,type:Q,window:P}){this._svg=x,this._type=Q,this._window=P}draw(x,Q,P,T){let S;switch(this._type){case h.square:S=this._drawSquare;break;case h.extraRounded:S=this._drawExtraRounded;break;default:S=this._drawDot}S.call(this,{x,y:Q,size:P,rotation:T})}_rotateFigure({x,y:Q,size:P,rotation:T=0,draw:S}){var G;const Ae=x+P/2,ne=Q+P/2;S(),(G=this._element)===null||G===void 0||G.setAttribute("transform",`rotate(${180*T/Math.PI},${Ae},${ne})`)}_basicDot(x){const{size:Q,x:P,y:T}=x,S=Q/7;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${P+Q/2} ${T}a ${Q/2} ${Q/2} 0 1 0 0.1 0zm 0 ${S}a ${Q/2-S} ${Q/2-S} 0 1 1 -0.1 0Z`)}}))}_basicSquare(x){const{size:Q,x:P,y:T}=x,S=Q/7;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${P} ${T}v ${Q}h ${Q}v `+-Q+`zM ${P+S} ${T+S}h `+(Q-2*S)+"v "+(Q-2*S)+"h "+(2*S-Q)+"z")}}))}_basicExtraRounded(x){const{size:Q,x:P,y:T}=x,S=Q/7;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","path"),this._element.setAttribute("clip-rule","evenodd"),this._element.setAttribute("d",`M ${P} ${T+2.5*S}v `+2*S+`a ${2.5*S} ${2.5*S}, 0, 0, 0, ${2.5*S} ${2.5*S}h `+2*S+`a ${2.5*S} ${2.5*S}, 0, 0, 0, ${2.5*S} ${2.5*-S}v `+-2*S+`a ${2.5*S} ${2.5*S}, 0, 0, 0, ${2.5*-S} ${2.5*-S}h `+-2*S+`a ${2.5*S} ${2.5*S}, 0, 0, 0, ${2.5*-S} ${2.5*S}M ${P+2.5*S} ${T+S}h `+2*S+`a ${1.5*S} ${1.5*S}, 0, 0, 1, ${1.5*S} ${1.5*S}v `+2*S+`a ${1.5*S} ${1.5*S}, 0, 0, 1, ${1.5*-S} ${1.5*S}h `+-2*S+`a ${1.5*S} ${1.5*S}, 0, 0, 1, ${1.5*-S} ${1.5*-S}v `+-2*S+`a ${1.5*S} ${1.5*S}, 0, 0, 1, ${1.5*S} ${1.5*-S}`)}}))}_drawDot({x,y:Q,size:P,rotation:T}){this._basicDot({x,y:Q,size:P,rotation:T})}_drawSquare({x,y:Q,size:P,rotation:T}){this._basicSquare({x,y:Q,size:P,rotation:T})}_drawExtraRounded({x,y:Q,size:P,rotation:T}){this._basicExtraRounded({x,y:Q,size:P,rotation:T})}}const v={dot:"dot",square:"square"},B=Object.values(v);class y{constructor({svg:x,type:Q,window:P}){this._svg=x,this._type=Q,this._window=P}draw(x,Q,P,T){let S;S=this._type===v.square?this._drawSquare:this._drawDot,S.call(this,{x,y:Q,size:P,rotation:T})}_rotateFigure({x,y:Q,size:P,rotation:T=0,draw:S}){var G;const Ae=x+P/2,ne=Q+P/2;S(),(G=this._element)===null||G===void 0||G.setAttribute("transform",`rotate(${180*T/Math.PI},${Ae},${ne})`)}_basicDot(x){const{size:Q,x:P,y:T}=x;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","circle"),this._element.setAttribute("cx",String(P+Q/2)),this._element.setAttribute("cy",String(T+Q/2)),this._element.setAttribute("r",String(Q/2))}}))}_basicSquare(x){const{size:Q,x:P,y:T}=x;this._rotateFigure(Object.assign(Object.assign({},x),{draw:()=>{this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect"),this._element.setAttribute("x",String(P)),this._element.setAttribute("y",String(T)),this._element.setAttribute("width",String(Q)),this._element.setAttribute("height",String(Q))}}))}_drawDot({x,y:Q,size:P,rotation:T}){this._basicDot({x,y:Q,size:P,rotation:T})}_drawSquare({x,y:Q,size:P,rotation:T}){this._basicSquare({x,y:Q,size:P,rotation:T})}}const w="circle",C=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],k=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];class F{constructor(x,Q){this._roundSize=P=>this._options.dotsOptions.roundSize?Math.floor(P):P,this._window=Q,this._element=this._window.document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(x.width)),this._element.setAttribute("height",String(x.height)),this._element.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),x.dotsOptions.roundSize||this._element.setAttribute("shape-rendering","crispEdges"),this._element.setAttribute("viewBox",`0 0 ${x.width} ${x.height}`),this._defs=this._window.document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._imageUri=x.image,this._instanceId=F.instanceCount++,this._options=x}get width(){return this._options.width}get height(){return this._options.height}getElement(){return this._element}async drawQR(x){const Q=x.getModuleCount(),P=Math.min(this._options.width,this._options.height)-2*this._options.margin,T=this._options.shape===w?P/Math.sqrt(2):P,S=this._roundSize(T/Q);let G={hideXDots:0,hideYDots:0,width:0,height:0};if(this._qr=x,this._options.image){if(await this.loadImage(),!this._image)return;const{imageOptions:Ae,qrOptions:ne}=this._options,ee=Ae.imageSize*u[ne.errorCorrectionLevel],re=Math.floor(ee*Q*Q);G=(function({originalHeight:pe,originalWidth:de,maxHiddenDots:Ce,maxHiddenAxisDots:W,dotSize:j}){const $={x:0,y:0},N={x:0,y:0};if(pe<=0||de<=0||Ce<=0||j<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};const R=pe/de;return $.x=Math.floor(Math.sqrt(Ce/R)),$.x<=0&&($.x=1),W&&W<$.x&&($.x=W),$.x%2==0&&$.x--,N.x=$.x*j,$.y=1+2*Math.ceil(($.x*R-1)/2),N.y=Math.round(N.x*R),($.y*$.x>Ce||W&&W<$.y)&&(W&&W<$.y?($.y=W,$.y%2==0&&$.x--):$.y-=2,N.y=$.y*j,$.x=1+2*Math.ceil(($.y/R-1)/2),N.x=Math.round(N.y/R)),{height:N.y,width:N.x,hideYDots:$.y,hideXDots:$.x}})({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:re,maxHiddenAxisDots:Q-14,dotSize:S})}this.drawBackground(),this.drawDots(((Ae,ne)=>{var ee,re,pe,de,Ce,W;return!(this._options.imageOptions.hideBackgroundDots&&Ae>=(Q-G.hideYDots)/2&&Ae<(Q+G.hideYDots)/2&&ne>=(Q-G.hideXDots)/2&&ne<(Q+G.hideXDots)/2||!((ee=C[Ae])===null||ee===void 0)&&ee[ne]||!((re=C[Ae-Q+7])===null||re===void 0)&&re[ne]||!((pe=C[Ae])===null||pe===void 0)&&pe[ne-Q+7]||!((de=k[Ae])===null||de===void 0)&&de[ne]||!((Ce=k[Ae-Q+7])===null||Ce===void 0)&&Ce[ne]||!((W=k[Ae])===null||W===void 0)&&W[ne-Q+7])})),this.drawCorners(),this._options.image&&await this.drawImage({width:G.width,height:G.height,count:Q,dotSize:S})}drawBackground(){var x,Q,P;const T=this._element,S=this._options;if(T){const G=(x=S.backgroundOptions)===null||x===void 0?void 0:x.gradient,Ae=(Q=S.backgroundOptions)===null||Q===void 0?void 0:Q.color;let ne=S.height,ee=S.width;if(G||Ae){const re=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id",`clip-path-background-color-${this._instanceId}`),this._defs.appendChild(this._backgroundClipPath),!((P=S.backgroundOptions)===null||P===void 0)&&P.round&&(ne=ee=Math.min(S.width,S.height),re.setAttribute("rx",String(ne/2*S.backgroundOptions.round))),re.setAttribute("x",String(this._roundSize((S.width-ee)/2))),re.setAttribute("y",String(this._roundSize((S.height-ne)/2))),re.setAttribute("width",String(ee)),re.setAttribute("height",String(ne)),this._backgroundClipPath.appendChild(re),this._createColor({options:G,color:Ae,additionalRotation:0,x:0,y:0,height:S.height,width:S.width,name:`background-color-${this._instanceId}`})}}}drawDots(x){var Q,P;if(!this._qr)throw"QR code is not defined";const T=this._options,S=this._qr.getModuleCount();if(S>T.width||S>T.height)throw"The canvas is too small.";const G=Math.min(T.width,T.height)-2*T.margin,Ae=T.shape===w?G/Math.sqrt(2):G,ne=this._roundSize(Ae/S),ee=this._roundSize((T.width-S*ne)/2),re=this._roundSize((T.height-S*ne)/2),pe=new d({svg:this._element,type:T.dotsOptions.type,window:this._window});this._dotsClipPath=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id",`clip-path-dot-color-${this._instanceId}`),this._defs.appendChild(this._dotsClipPath),this._createColor({options:(Q=T.dotsOptions)===null||Q===void 0?void 0:Q.gradient,color:T.dotsOptions.color,additionalRotation:0,x:0,y:0,height:T.height,width:T.width,name:`dot-color-${this._instanceId}`});for(let de=0;de<S;de++)for(let Ce=0;Ce<S;Ce++)x&&!x(de,Ce)||!((P=this._qr)===null||P===void 0)&&P.isDark(de,Ce)&&(pe.draw(ee+Ce*ne,re+de*ne,ne,((W,j)=>!(Ce+W<0||de+j<0||Ce+W>=S||de+j>=S)&&!(x&&!x(de+j,Ce+W))&&!!this._qr&&this._qr.isDark(de+j,Ce+W))),pe._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(pe._element));if(T.shape===w){const de=this._roundSize((G/ne-S)/2),Ce=S+2*de,W=ee-de*ne,j=re-de*ne,$=[],N=this._roundSize(Ce/2);for(let R=0;R<Ce;R++){$[R]=[];for(let J=0;J<Ce;J++)R>=de-1&&R<=Ce-de&&J>=de-1&&J<=Ce-de||Math.sqrt((R-N)*(R-N)+(J-N)*(J-N))>N?$[R][J]=0:$[R][J]=this._qr.isDark(J-2*de<0?J:J>=S?J-2*de:J-de,R-2*de<0?R:R>=S?R-2*de:R-de)?1:0}for(let R=0;R<Ce;R++)for(let J=0;J<Ce;J++)$[R][J]&&(pe.draw(W+J*ne,j+R*ne,ne,((z,le)=>{var E;return!!(!((E=$[R+le])===null||E===void 0)&&E[J+z])})),pe._element&&this._dotsClipPath&&this._dotsClipPath.appendChild(pe._element))}}drawCorners(){if(!this._qr)throw"QR code is not defined";const x=this._element,Q=this._options;if(!x)throw"Element code is not defined";const P=this._qr.getModuleCount(),T=Math.min(Q.width,Q.height)-2*Q.margin,S=Q.shape===w?T/Math.sqrt(2):T,G=this._roundSize(S/P),Ae=7*G,ne=3*G,ee=this._roundSize((Q.width-P*G)/2),re=this._roundSize((Q.height-P*G)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((([pe,de,Ce])=>{var W,j,$,N,R,J,z,le,E,_,O,ie,X,be;const we=ee+pe*G*(P-7),ae=re+de*G*(P-7);let he=this._dotsClipPath,xe=this._dotsClipPath;if((!((W=Q.cornersSquareOptions)===null||W===void 0)&&W.gradient||!((j=Q.cornersSquareOptions)===null||j===void 0)&&j.color)&&(he=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),he.setAttribute("id",`clip-path-corners-square-color-${pe}-${de}-${this._instanceId}`),this._defs.appendChild(he),this._cornersSquareClipPath=this._cornersDotClipPath=xe=he,this._createColor({options:($=Q.cornersSquareOptions)===null||$===void 0?void 0:$.gradient,color:(N=Q.cornersSquareOptions)===null||N===void 0?void 0:N.color,additionalRotation:Ce,x:we,y:ae,height:Ae,width:Ae,name:`corners-square-color-${pe}-${de}-${this._instanceId}`})),((R=Q.cornersSquareOptions)===null||R===void 0?void 0:R.type)&&p.includes(Q.cornersSquareOptions.type)){const Pe=new m({svg:this._element,type:Q.cornersSquareOptions.type,window:this._window});Pe.draw(we,ae,Ae,Ce),Pe._element&&he&&he.appendChild(Pe._element)}else{const Pe=new d({svg:this._element,type:((J=Q.cornersSquareOptions)===null||J===void 0?void 0:J.type)||Q.dotsOptions.type,window:this._window});for(let ot=0;ot<C.length;ot++)for(let $e=0;$e<C[ot].length;$e++)!((z=C[ot])===null||z===void 0)&&z[$e]&&(Pe.draw(we+$e*G,ae+ot*G,G,((ht,Bt)=>{var Et;return!!(!((Et=C[ot+Bt])===null||Et===void 0)&&Et[$e+ht])})),Pe._element&&he&&he.appendChild(Pe._element))}if((!((le=Q.cornersDotOptions)===null||le===void 0)&&le.gradient||!((E=Q.cornersDotOptions)===null||E===void 0)&&E.color)&&(xe=this._window.document.createElementNS("http://www.w3.org/2000/svg","clipPath"),xe.setAttribute("id",`clip-path-corners-dot-color-${pe}-${de}-${this._instanceId}`),this._defs.appendChild(xe),this._cornersDotClipPath=xe,this._createColor({options:(_=Q.cornersDotOptions)===null||_===void 0?void 0:_.gradient,color:(O=Q.cornersDotOptions)===null||O===void 0?void 0:O.color,additionalRotation:Ce,x:we+2*G,y:ae+2*G,height:ne,width:ne,name:`corners-dot-color-${pe}-${de}-${this._instanceId}`})),((ie=Q.cornersDotOptions)===null||ie===void 0?void 0:ie.type)&&B.includes(Q.cornersDotOptions.type)){const Pe=new y({svg:this._element,type:Q.cornersDotOptions.type,window:this._window});Pe.draw(we+2*G,ae+2*G,ne,Ce),Pe._element&&xe&&xe.appendChild(Pe._element)}else{const Pe=new d({svg:this._element,type:((X=Q.cornersDotOptions)===null||X===void 0?void 0:X.type)||Q.dotsOptions.type,window:this._window});for(let ot=0;ot<k.length;ot++)for(let $e=0;$e<k[ot].length;$e++)!((be=k[ot])===null||be===void 0)&&be[$e]&&(Pe.draw(we+$e*G,ae+ot*G,G,((ht,Bt)=>{var Et;return!!(!((Et=k[ot+Bt])===null||Et===void 0)&&Et[$e+ht])})),Pe._element&&xe&&xe.appendChild(Pe._element))}}))}loadImage(){return new Promise(((x,Q)=>{var P;const T=this._options;if(!T.image)return Q("Image is not defined");if(!((P=T.nodeCanvas)===null||P===void 0)&&P.loadImage)T.nodeCanvas.loadImage(T.image).then((S=>{var G,Ae;if(this._image=S,this._options.imageOptions.saveAsBlob){const ne=(G=T.nodeCanvas)===null||G===void 0?void 0:G.createCanvas(this._image.width,this._image.height);(Ae=ne?.getContext("2d"))===null||Ae===void 0||Ae.drawImage(S,0,0),this._imageUri=ne?.toDataURL()}x()})).catch(Q);else{const S=new this._window.Image;typeof T.imageOptions.crossOrigin=="string"&&(S.crossOrigin=T.imageOptions.crossOrigin),this._image=S,S.onload=async()=>{this._options.imageOptions.saveAsBlob&&(this._imageUri=await(async function(G,Ae){return new Promise((ne=>{const ee=new Ae.XMLHttpRequest;ee.onload=function(){const re=new Ae.FileReader;re.onloadend=function(){ne(re.result)},re.readAsDataURL(ee.response)},ee.open("GET",G),ee.responseType="blob",ee.send()}))})(T.image||"",this._window)),x()},S.src=T.image}}))}async drawImage({width:x,height:Q,count:P,dotSize:T}){const S=this._options,G=this._roundSize((S.width-P*T)/2),Ae=this._roundSize((S.height-P*T)/2),ne=G+this._roundSize(S.imageOptions.margin+(P*T-x)/2),ee=Ae+this._roundSize(S.imageOptions.margin+(P*T-Q)/2),re=x-2*S.imageOptions.margin,pe=Q-2*S.imageOptions.margin,de=this._window.document.createElementNS("http://www.w3.org/2000/svg","image");de.setAttribute("href",this._imageUri||""),de.setAttribute("xlink:href",this._imageUri||""),de.setAttribute("x",String(ne)),de.setAttribute("y",String(ee)),de.setAttribute("width",`${re}px`),de.setAttribute("height",`${pe}px`),this._element.appendChild(de)}_createColor({options:x,color:Q,additionalRotation:P,x:T,y:S,height:G,width:Ae,name:ne}){const ee=Ae>G?Ae:G,re=this._window.document.createElementNS("http://www.w3.org/2000/svg","rect");if(re.setAttribute("x",String(T)),re.setAttribute("y",String(S)),re.setAttribute("height",String(G)),re.setAttribute("width",String(Ae)),re.setAttribute("clip-path",`url('#clip-path-${ne}')`),x){let pe;if(x.type==="radial")pe=this._window.document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),pe.setAttribute("id",ne),pe.setAttribute("gradientUnits","userSpaceOnUse"),pe.setAttribute("fx",String(T+Ae/2)),pe.setAttribute("fy",String(S+G/2)),pe.setAttribute("cx",String(T+Ae/2)),pe.setAttribute("cy",String(S+G/2)),pe.setAttribute("r",String(ee/2));else{const de=((x.rotation||0)+P)%(2*Math.PI),Ce=(de+2*Math.PI)%(2*Math.PI);let W=T+Ae/2,j=S+G/2,$=T+Ae/2,N=S+G/2;Ce>=0&&Ce<=.25*Math.PI||Ce>1.75*Math.PI&&Ce<=2*Math.PI?(W-=Ae/2,j-=G/2*Math.tan(de),$+=Ae/2,N+=G/2*Math.tan(de)):Ce>.25*Math.PI&&Ce<=.75*Math.PI?(j-=G/2,W-=Ae/2/Math.tan(de),N+=G/2,$+=Ae/2/Math.tan(de)):Ce>.75*Math.PI&&Ce<=1.25*Math.PI?(W+=Ae/2,j+=G/2*Math.tan(de),$-=Ae/2,N-=G/2*Math.tan(de)):Ce>1.25*Math.PI&&Ce<=1.75*Math.PI&&(j+=G/2,W+=Ae/2/Math.tan(de),N-=G/2,$-=Ae/2/Math.tan(de)),pe=this._window.document.createElementNS("http://www.w3.org/2000/svg","linearGradient"),pe.setAttribute("id",ne),pe.setAttribute("gradientUnits","userSpaceOnUse"),pe.setAttribute("x1",String(Math.round(W))),pe.setAttribute("y1",String(Math.round(j))),pe.setAttribute("x2",String(Math.round($))),pe.setAttribute("y2",String(Math.round(N)))}x.colorStops.forEach((({offset:de,color:Ce})=>{const W=this._window.document.createElementNS("http://www.w3.org/2000/svg","stop");W.setAttribute("offset",100*de+"%"),W.setAttribute("stop-color",Ce),pe.appendChild(W)})),re.setAttribute("fill",`url('#${ne}')`),this._defs.appendChild(pe)}else Q&&re.setAttribute("fill",Q);this._element.appendChild(re)}}F.instanceCount=0;const U=F,D="canvas",M={};for(let Y=0;Y<=40;Y++)M[Y]=Y;const K={type:D,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:M[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{saveAsBlob:!0,hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000",roundSize:!0},backgroundOptions:{round:0,color:"#fff"}};function q(Y){const x=Object.assign({},Y);if(!x.colorStops||!x.colorStops.length)throw"Field 'colorStops' is required in gradient";return x.rotation?x.rotation=Number(x.rotation):x.rotation=0,x.colorStops=x.colorStops.map((Q=>Object.assign(Object.assign({},Q),{offset:Number(Q.offset)}))),x}function ce(Y){const x=Object.assign({},Y);return x.width=Number(x.width),x.height=Number(x.height),x.margin=Number(x.margin),x.imageOptions=Object.assign(Object.assign({},x.imageOptions),{hideBackgroundDots:!!x.imageOptions.hideBackgroundDots,imageSize:Number(x.imageOptions.imageSize),margin:Number(x.imageOptions.margin)}),x.margin>Math.min(x.width,x.height)&&(x.margin=Math.min(x.width,x.height)),x.dotsOptions=Object.assign({},x.dotsOptions),x.dotsOptions.gradient&&(x.dotsOptions.gradient=q(x.dotsOptions.gradient)),x.cornersSquareOptions&&(x.cornersSquareOptions=Object.assign({},x.cornersSquareOptions),x.cornersSquareOptions.gradient&&(x.cornersSquareOptions.gradient=q(x.cornersSquareOptions.gradient))),x.cornersDotOptions&&(x.cornersDotOptions=Object.assign({},x.cornersDotOptions),x.cornersDotOptions.gradient&&(x.cornersDotOptions.gradient=q(x.cornersDotOptions.gradient))),x.backgroundOptions&&(x.backgroundOptions=Object.assign({},x.backgroundOptions),x.backgroundOptions.gradient&&(x.backgroundOptions.gradient=q(x.backgroundOptions.gradient))),x}var me=A(873),ve=A.n(me);function Be(Y){if(!Y)throw new Error("Extension must be defined");Y[0]==="."&&(Y=Y.substring(1));const x={bmp:"image/bmp",gif:"image/gif",ico:"image/vnd.microsoft.icon",jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",tif:"image/tiff",tiff:"image/tiff",webp:"image/webp",pdf:"application/pdf"}[Y.toLowerCase()];if(!x)throw new Error(`Extension "${Y}" is not supported`);return x}class te{constructor(x){x?.jsdom?this._window=new x.jsdom("",{resources:"usable"}).window:this._window=window,this._options=x?ce(a(K,x)):K,this.update()}static _clearContainer(x){x&&(x.innerHTML="")}_setupSvg(){if(!this._qr)return;const x=new U(this._options,this._window);this._svg=x.getElement(),this._svgDrawingPromise=x.drawQR(this._qr).then((()=>{var Q;this._svg&&((Q=this._extension)===null||Q===void 0||Q.call(this,x.getElement(),this._options))}))}_setupCanvas(){var x,Q;this._qr&&(!((x=this._options.nodeCanvas)===null||x===void 0)&&x.createCanvas?(this._nodeCanvas=this._options.nodeCanvas.createCanvas(this._options.width,this._options.height),this._nodeCanvas.width=this._options.width,this._nodeCanvas.height=this._options.height):(this._domCanvas=document.createElement("canvas"),this._domCanvas.width=this._options.width,this._domCanvas.height=this._options.height),this._setupSvg(),this._canvasDrawingPromise=(Q=this._svgDrawingPromise)===null||Q===void 0?void 0:Q.then((()=>{var P;if(!this._svg)return;const T=this._svg,S=new this._window.XMLSerializer().serializeToString(T),G=btoa(S),Ae=`data:${Be("svg")};base64,${G}`;if(!((P=this._options.nodeCanvas)===null||P===void 0)&&P.loadImage)return this._options.nodeCanvas.loadImage(Ae).then((ne=>{var ee,re;ne.width=this._options.width,ne.height=this._options.height,(re=(ee=this._nodeCanvas)===null||ee===void 0?void 0:ee.getContext("2d"))===null||re===void 0||re.drawImage(ne,0,0)}));{const ne=new this._window.Image;return new Promise((ee=>{ne.onload=()=>{var re,pe;(pe=(re=this._domCanvas)===null||re===void 0?void 0:re.getContext("2d"))===null||pe===void 0||pe.drawImage(ne,0,0),ee()},ne.src=Ae}))}})))}async _getElement(x="png"){if(!this._qr)throw"QR code is empty";return x.toLowerCase()==="svg"?(this._svg&&this._svgDrawingPromise||this._setupSvg(),await this._svgDrawingPromise,this._svg):((this._domCanvas||this._nodeCanvas)&&this._canvasDrawingPromise||this._setupCanvas(),await this._canvasDrawingPromise,this._domCanvas||this._nodeCanvas)}update(x){te._clearContainer(this._container),this._options=x?ce(a(this._options,x)):this._options,this._options.data&&(this._qr=ve()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||(function(Q){switch(!0){case/^[0-9]*$/.test(Q):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(Q):return"Alphanumeric";default:return"Byte"}})(this._options.data)),this._qr.make(),this._options.type===D?this._setupCanvas():this._setupSvg(),this.append(this._container))}append(x){if(x){if(typeof x.appendChild!="function")throw"Container should be a single DOM node";this._options.type===D?this._domCanvas&&x.appendChild(this._domCanvas):this._svg&&x.appendChild(this._svg),this._container=x}}applyExtension(x){if(!x)throw"Extension function should be defined.";this._extension=x,this.update()}deleteExtension(){this._extension=void 0,this.update()}async getRawData(x="png"){if(!this._qr)throw"QR code is empty";const Q=await this._getElement(x),P=Be(x);if(!Q)return null;if(x.toLowerCase()==="svg"){const T=`<?xml version="1.0" standalone="no"?>\r
|
|
175
|
-
${new this._window.XMLSerializer().serializeToString(Q)}`;return typeof Blob>"u"||this._options.jsdom?Buffer.from(T):new Blob([T],{type:P})}return new Promise((T=>{const S=Q;if("toBuffer"in S)if(P==="image/png")T(S.toBuffer(P));else if(P==="image/jpeg")T(S.toBuffer(P));else{if(P!=="application/pdf")throw Error("Unsupported extension");T(S.toBuffer(P))}else"toBlob"in S&&S.toBlob(T,P,1)}))}async download(x){if(!this._qr)throw"QR code is empty";if(typeof Blob>"u")throw"Cannot download in Node.js, call getRawData instead.";let Q="png",P="qr";typeof x=="string"?(Q=x,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):typeof x=="object"&&x!==null&&(x.name&&(P=x.name),x.extension&&(Q=x.extension));const T=await this._getElement(Q);if(T)if(Q.toLowerCase()==="svg"){let S=new XMLSerializer().serializeToString(T);S=`<?xml version="1.0" standalone="no"?>\r
|
|
176
|
-
`+S,l(`data:${Be(Q)};charset=utf-8,${encodeURIComponent(S)}`,`${P}.svg`)}else l(T.toDataURL(Be(Q)),`${P}.${Q}`)}}const V=te})(),i.default})()))})(Gf)),Gf.exports}var vX=gX();const rx=x5(vX),wX={class:"qr-code"},BX=["innerHTML"],yX=s.defineComponent({__name:"qr-code",props:{data:null,image:null,download:{type:Boolean,default:!1},filename:{type:String,default:"qr-code"}},emits:["update:dataUrl"],setup(t,{expose:e,emit:n}){const r=t,A=s.ref(),i=s.computed(()=>({width:300,height:300,type:"canvas",data:r.data,...r.image?{image:r.image}:{},margin:10,qrOptions:{typeNumber:0,mode:"Byte",errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,margin:20,crossOrigin:"anonymous"},dotsOptions:{type:"rounded"},backgroundOptions:{color:"#ffffff"},cornersSquareOptions:{color:"#333333",type:"extra-rounded"},cornersDotOptions:{color:"#333333",type:"dot"}}));function o(l=null,u=null){typeof window<"u"&&(A.value&&(A.value.innerHTML=""),new rx(l||i.value).append(A.value))}function a(){new rx({...i.value,width:1200,height:1200}).download({name:r.filename,extension:"png"})}return s.watch(()=>i.value,o,{deep:!0,immediate:!0}),s.onMounted(()=>{typeof window<"u"&&o()}),e({download:a}),(l,u)=>(s.openBlock(),s.createElementBlock("div",wX,[r.download?(s.openBlock(),s.createElementBlock("button",{key:0,class:"btn btn-outline-contrast mb-3",onClick:a,innerHTML:l.$t("qrlink.download")},null,8,BX)):(s.openBlock(),s.createElementBlock("div",{key:1,ref_key:"canvas",ref:A},null,512))]))}}),CX={class:"link-sharing"},bX={key:0,class:"link-sharing__links container"},EX={class:"row"},kX={key:0,class:"col-12 col-md-6"},SX=["href"],xX={class:"caption"},FX={key:1,class:"col-12 col-md-6"},QX=["href"],TX={class:"caption"},MX={key:2,class:"col-12 col-md-6"},IX={class:"caption"},UX={key:3,class:"col-12 col-md-6"},_X=["href"],DX={class:"caption"},OX={key:4,class:"col-12 col-md-6"},NX=["href"],LX={class:"caption"},RX={key:5,class:"col-12 col-md-6"},HX={class:"caption"},PX={key:6,class:"col-12 col-md-6"},$X=["href"],KX={class:"caption"},zX={key:1,class:"link-sharing__instructions pt-5"},WX={class:"row"},GX={class:"col-12 text-center py-0"},YX={class:"mb-5"},qX=t=>t.replace(/<(?:.|\n)*?>/gm,""),XX=s.defineComponent({__name:"link-sharing",props:{url:{type:String,default:""},subject:{type:String,default:""},hashtags:Array,text:{type:String,default:""},media:{type:String,default:""},services:{type:Object,default:{facebook:!0,instagram:!0,linkedin:!0,whatsapp:!0,mailto:!0,clipboard:!0,bluesky:!0}}},setup(t){const e=t,n=s.ref(!1),r=s.computed(()=>encodeURIComponent(e.url));s.computed(()=>encodeURIComponent(e.media));const A=s.computed(()=>qX(e.text)),i=s.computed(()=>!!(navigator&&navigator.userAgent&&/Mobi|Android/i.test(navigator.userAgent)));async function o(){const a=document.createElement("textarea");document.body.appendChild(a),a.value=e.url,a.select(),a.setSelectionRange(0,99999),navigator.clipboard.writeText(a.value),document.body.removeChild(a)}return(a,l)=>{const u=s.resolveComponent("svg-icon");return s.openBlock(),s.createElementBlock("div",CX,[n.value?(s.openBlock(),s.createElementBlock("div",zX,[s.createElementVNode("div",WX,[s.createElementVNode("div",GX,[s.createElementVNode("div",YX,[s.createElementVNode("p",null,s.toDisplayString(a.$t("sharing.instructions",{service:"Instagram"})),1),s.createElementVNode("p",null,[s.createElementVNode("strong",null,s.toDisplayString(Array.isArray(t.hashtags)?t.hashtags.join(", "):t.hashtags),1)]),s.createElementVNode("button",{type:"button",class:"btn btn-text",onClick:l[1]||(l[1]=s.withModifiers(d=>n.value=!n.value,["prevent"]))},[s.createVNode(u,{symbol:"arrow-left"}),s.createTextVNode(" "+s.toDisplayString(a.$t("common.back")),1)])])])])])):(s.openBlock(),s.createElementBlock("div",bX,[s.createElementVNode("div",EX,[t.services.facebook?(s.openBlock(),s.createElementBlock("div",kX,[s.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.facebook.com/sharer.php?u=${r.value}`,target:"_blank",rel:"noopener"},[s.createVNode(u,{symbol:"facebook"}),s.createElementVNode("span",xX,s.toDisplayString(a.$t("sharing.facebook")),1)],8,SX)])):s.createCommentVNode("",!0),t.services.bluesky?(s.openBlock(),s.createElementBlock("div",FX,[s.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://bsky.app/intent/compose?text=${A.value}${A.value?"%20":""}${t.url}`,target:"_blank",rel:"noopener"},[s.createVNode(u,{symbol:"bluesky-logo"}),s.createElementVNode("span",TX,s.toDisplayString(a.$t("sharing.bluesky")),1)],8,QX)])):s.createCommentVNode("",!0),t.services.instagram?(s.openBlock(),s.createElementBlock("div",MX,[s.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:l[0]||(l[0]=s.withModifiers(d=>n.value=!n.value,["prevent"]))},[s.createVNode(u,{symbol:"instagram"}),s.createElementVNode("span",IX,s.toDisplayString(a.$t("sharing.instagram")),1)])])):s.createCommentVNode("",!0),t.services.linkedin?(s.openBlock(),s.createElementBlock("div",UX,[s.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.linkedin.com/shareArticle?mini=true&url=${r.value}&title=${t.subject}`,target:"_blank",rel:"noopener"},[s.createVNode(u,{symbol:"linkedin"}),s.createElementVNode("span",DX,s.toDisplayString(a.$t("sharing.linkedin")),1)],8,_X)])):s.createCommentVNode("",!0),t.services.whatsapp&&i.value?(s.openBlock(),s.createElementBlock("div",OX,[s.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`whatsapp://send?text=${r.value}`,target:"_blank",rel:"noopener"},[s.createVNode(u,{symbol:"whatsapp"}),s.createElementVNode("span",LX,s.toDisplayString(a.$t("sharing.whatsapp")),1)],8,NX)])):s.createCommentVNode("",!0),t.services.clipboard?(s.openBlock(),s.createElementBlock("div",RX,[s.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:s.withModifiers(o,["prevent","stop"])},[s.createVNode(u,{symbol:"copy"}),s.createElementVNode("span",HX,s.toDisplayString(a.$t("sharing.clipboard")),1)])])):s.createCommentVNode("",!0),t.services.mailto?(s.openBlock(),s.createElementBlock("div",PX,[s.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`mailto:?subject=${t.subject}&body=${A.value}%0D%0A${t.url}`,target:"_blank",rel:"noopener"},[s.createVNode(u,{symbol:"mail"}),s.createElementVNode("span",KX,s.toDisplayString(a.$t("sharing.mailto")),1)],8,$X)])):s.createCommentVNode("",!0)])]))])}}}),JX={class:"base-form"},jX=s.defineComponent({__name:"base-form",props:{id:{},name:{},variant:{},disabled:{type:Boolean},pending:{type:Boolean}},setup(t){function e(A){console.log("input",A)}function n(A){console.log("reset",A)}function r(A){console.log("submit",A)}return(A,i)=>(s.openBlock(),s.createElementBlock("div",JX,[s.createElementVNode("form",{ref:"form",onInput:e,onReset:n,onSubmit:s.withModifiers(r,["prevent"])},[s.renderSlot(A.$slots,"default")],544)]))}}),ZX={class:"modal-dialog__content d-flex flex-column"},VX={class:"modal-dialog__header d-flex p-3 border-bottom"},eJ={key:0,class:"modal-dialog__title",id:"exampleModalLabel"},tJ={class:"modal-dialog__body"},nJ={key:0,class:"modal-dialog__footer d-flex p-3 border-top"},rJ=s.defineComponent({__name:"modal-dialog",props:{modelValue:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},size:{type:String,default:"md"},dismiss:{type:Boolean,default:!0},title:{type:String,default:""},footer:{type:Boolean,default:!0},classes:{type:String,default:""}},emits:["update:modelValue","confirm","cancel"],setup(t,{expose:e,emit:n}){const r=t,A=n,i=s.ref();function o(){document.documentElement.style.setProperty("--scroll-position",`${Math.round(document.documentElement.scrollTop)}px`),r.modal?i.value?.showModal():i.value?.show(),A("update:modelValue",!0)}function a(){const p=i.value&&new KeyframeEffect(i.value,[{translate:"0 -100%",opacity:"0"}],{duration:320,easing:"ease",direction:"normal"}),m=new Animation(p,document.timeline);m.play(),m.addEventListener("finish",()=>{i.value?.close(),l()}),A("update:modelValue",!1)}function l(){const p=getComputedStyle(document.documentElement).getPropertyValue("--scroll-position");document.documentElement.scrollTo({top:parseInt(p,10),behavior:"instant"}),A("update:modelValue",!1)}function u(p){o(),A("confirm",p)}function d(){a(),A("cancel")}function h(p){const m=p.target;m&&m.nodeName==="DIALOG"&&a()}return s.watch(()=>r.modelValue,(p,m)=>{p&&p!==m?o():m&&a()},{immediate:!0}),s.onMounted(()=>{i.value?.addEventListener("cancel",p=>{p.preventDefault(),a()}),r.dismiss&&document.addEventListener("click",h),r.modelValue&&o()}),s.onBeforeUnmount(()=>{r.dismiss&&document.removeEventListener("click",h)}),e({show:o,close:a,confirm:u,cancel:d}),(p,m)=>(s.openBlock(),s.createElementBlock("dialog",{ref_key:"dialog",ref:i,class:s.normalizeClass(["modal-dialog",{[`modal-dialog--${t.size}`]:t.size}]),onClose:l},[s.createElementVNode("div",ZX,[s.createElementVNode("div",VX,[t.title?(s.openBlock(),s.createElementBlock("h5",eJ,s.toDisplayString(t.title),1)):s.createCommentVNode("",!0),s.createElementVNode("button",{type:"button",class:"btn-close ms-auto border-radius-none","aria-label":"Close",onClick:a})]),s.createElementVNode("div",tJ,[s.renderSlot(p.$slots,"default")]),t.footer?(s.openBlock(),s.createElementBlock("div",nJ,[s.renderSlot(p.$slots,"footer"),s.createElementVNode("button",{type:"button",class:"btn ms-auto",onClick:a},s.toDisplayString(p.$t("common.close")),1)])):s.createCommentVNode("",!0)])],34))}}),AJ=["onDragenter","onDragover","onDragleave","onDragend","onDrop","innerHTML"],iJ=["onDragstart","onDrag","onDragenter","onDragover","onDragleave","onDragend","onDrop"],oJ={key:0,class:"sortable-list__drag-handle"},sJ={type:"button",class:"btn",draggable:"true"},aJ={key:0,class:"sortable-list__item"},lJ=s.defineComponent({__name:"sortable-list",props:{modelValue:{type:Array,default:()=>[]},config:{type:Object,default:null},messages:{type:Object,default:{}},vertical:{type:Boolean,default:!0},showDragHandle:{type:Boolean,default:!1},showPreview:{type:Boolean,default:!0}},emits:["update:modelValue","update:isDragging","update:dragIndex","update:dragOverIndex"],setup(t,{emit:e}){const n=t,r=s.ref(!1),A=s.ref(null),i=s.ref(null),o=e,a=s.computed({get(){return n.modelValue},set(C){o("update:modelValue",C)}}),l=s.computed(()=>{const C=document.querySelector(".is-drag-item")?.outerHTML;return C?ur(C):""}),u=s.useSlots(),d=s.computed(()=>u["list-append"]);function h(C,k){C.dataTransfer&&(C.dataTransfer.dropEffect="move",C.dataTransfer.effectAllowed="move",C.dataTransfer.setData("index",k.toLocaleString()),r.value=!0,A.value=k)}function p(C,k){r.value=!1,A.value=null,i.value=null}function m(C,k){}function v(C,k){i.value=A.value!==k?k:null}function B(C,k){i.value=A.value!==k?k:null}function y(C,k){}function w(C,k){if(C.dataTransfer){C.preventDefault();const F=Number(C.dataTransfer.getData("index")),U=k,D=[...a.value];(U||U===0)&&(F||F===0)&&D.splice(U,0,D.splice(F,1)[0]),a.value=D}}return s.watch(()=>r.value,C=>{o("update:isDragging",C)},{immediate:!0}),s.watch(()=>A.value,C=>{o("update:dragIndex",C)},{immediate:!0}),s.watch(()=>i.value,C=>{o("update:dragOverIndex",C)},{immediate:!0}),(C,k)=>{const F=s.resolveComponent("svg-icon");return s.openBlock(),s.createBlock(s.TransitionGroup,{name:"list",tag:"ul",class:s.normalizeClass(["sortable-list p-0 d-flex gap-2",{"flex-column":t.vertical,"flex-row flex-wrap":!t.vertical}]),onDragover:k[0]||(k[0]=s.withModifiers(()=>{},["prevent"])),onDragenter:k[1]||(k[1]=s.withModifiers(()=>{},["prevent"]))},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(U,D)=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:D},[t.showPreview&&r.value&&i.value===D?(s.openBlock(),s.createElementBlock("li",{key:0,class:"sortable-list__item is-drop-target",onDragenter:M=>v(M,D),onDragover:M=>B(M,D),onDragleave:M=>void 0,onDragend:M=>p(),onDrop:M=>w(M,D),innerHTML:l.value},null,40,AJ)):s.createCommentVNode("",!0),s.createElementVNode("li",{class:s.normalizeClass(["sortable-list__item d-flex",{"is-drag-item":r.value&&A.value===D,"is-drop-target":r.value&&i.value===D&&!t.showPreview,"align-items-center gap-2":t.vertical}]),draggable:!0,onDragstart:M=>h(M,D),onDrag:M=>void 0,onDragenter:M=>v(M,D),onDragover:M=>B(M,D),onDragleave:M=>void 0,onDragend:M=>p(),onDrop:M=>w(M,D)},[t.showDragHandle?(s.openBlock(),s.createElementBlock("div",oJ,[s.createElementVNode("button",sJ,[s.createVNode(F,{symbol:"drag"})])])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(["sortable-list__item-content",{"flex-grow-1":t.vertical}])},[s.renderSlot(C.$slots,"list-item",{item:U,index:D},()=>[s.createTextVNode(s.toDisplayString(U),1)])],2)],42,iJ)],64))),128)),d.value?(s.openBlock(),s.createElementBlock("li",aJ,[s.renderSlot(C.$slots,"list-append")])):s.createCommentVNode("",!0)]),_:3},8,["class"])}}}),cJ={class:"touch-wrapper__controls"},uJ={class:"btn-group",role:"group"},dJ=s.defineComponent({__name:"touch-wrapper",props:{modelValue:{type:Number,default:1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=s.getCurrentInstance(),r=n&&n.appContext.config.globalProperties.$config,A=t,i=e,o=s.ref();function a(d){const h=A.modelValue+d;i("update:modelValue",d===0?1:h>=1?h:1)}function l(d){if(d.ctrlKey){d.preventDefault();const h=0-d.deltaY*.01;a(h)}}function u(d){d.preventDefault();const{scale:h}=d,p=h>1?h*.01:0-h;a(p)}return s.onMounted(()=>{o.value&&(o.value.addEventListener("wheel",l,!1),o.value.addEventListener("gesturestart",u,!1),o.value.addEventListener("gesturechange",u,!1),o.value.addEventListener("gestureend",u,!1))}),(d,h)=>{const p=s.resolveComponent("svg-icon");return s.openBlock(),s.createElementBlock("div",{ref_key:"touchElement",ref:o,class:"touch-wrapper"},[s.renderSlot(d.$slots,"controls",{on:{setScale:a}},()=>[s.createElementVNode("div",cJ,[s.createElementVNode("div",uJ,[s.createElementVNode("button",{type:"button",class:"btn",onClick:h[0]||(h[0]=m=>a(-1))},[s.createVNode(p,{symbol:"minus","base-path":s.unref(r).iconSprite},null,8,["base-path"])]),s.createElementVNode("button",{type:"button",class:"btn",onClick:h[1]||(h[1]=m=>a(0))},[s.createVNode(p,{symbol:"maximize","base-path":s.unref(r).iconSprite},null,8,["base-path"])]),s.createElementVNode("button",{type:"button",class:"btn",onClick:h[2]||(h[2]=m=>a(1))},[s.createVNode(p,{symbol:"plus","base-path":s.unref(r).iconSprite},null,8,["base-path"])])])])]),s.renderSlot(d.$slots,"default")],512)}}});var Ov={};(function t(e,n,r,A){var i=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL),o=typeof Path2D=="function"&&typeof DOMMatrix=="function",a=(function(){if(!e.OffscreenCanvas)return!1;try{var T=new OffscreenCanvas(1,1),S=T.getContext("2d");S.fillRect(0,0,1,1);var G=T.transferToImageBitmap();S.createPattern(G,"no-repeat")}catch{return!1}return!0})();function l(){}function u(T){var S=n.exports.Promise,G=S!==void 0?S:e.Promise;return typeof G=="function"?new G(T):(T(l,l),null)}var d=(function(T,S){return{transform:function(G){if(T)return G;if(S.has(G))return S.get(G);var Ae=new OffscreenCanvas(G.width,G.height),ne=Ae.getContext("2d");return ne.drawImage(G,0,0),S.set(G,Ae),Ae},clear:function(){S.clear()}}})(a,new Map),h=(function(){var T=Math.floor(16.666666666666668),S,G,Ae={},ne=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(S=function(ee){var re=Math.random();return Ae[re]=requestAnimationFrame(function pe(de){ne===de||ne+T-1<de?(ne=de,delete Ae[re],ee()):Ae[re]=requestAnimationFrame(pe)}),re},G=function(ee){Ae[ee]&&cancelAnimationFrame(Ae[ee])}):(S=function(ee){return setTimeout(ee,T)},G=function(ee){return clearTimeout(ee)}),{frame:S,cancel:G}})(),p=(function(){var T,S,G={};function Ae(ne){function ee(re,pe){ne.postMessage({options:re||{},callback:pe})}ne.init=function(pe){var de=pe.transferControlToOffscreen();ne.postMessage({canvas:de},[de])},ne.fire=function(pe,de,Ce){if(S)return ee(pe,null),S;var W=Math.random().toString(36).slice(2);return S=u(function(j){function $(N){N.data.callback===W&&(delete G[W],ne.removeEventListener("message",$),S=null,d.clear(),Ce(),j())}ne.addEventListener("message",$),ee(pe,W),G[W]=$.bind(null,{data:{callback:W}})}),S},ne.reset=function(){ne.postMessage({reset:!0});for(var pe in G)G[pe](),delete G[pe]}}return function(){if(T)return T;if(!r&&i){var ne=["var CONFETTI, SIZE = {}, module = {};","("+t.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
|
|
177
|
-
`);try{T=new Worker(URL.createObjectURL(new Blob([ne])))}catch(ee){return typeof console<"u"&&typeof console.warn=="function"&&console.warn("🎊 Could not load worker",ee),null}Ae(T)}return T}})(),m={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function v(T,S){return S?S(T):T}function B(T){return T!=null}function y(T,S,G){return v(T&&B(T[S])?T[S]:m[S],G)}function w(T){return T<0?0:Math.floor(T)}function C(T,S){return Math.floor(Math.random()*(S-T))+T}function k(T){return parseInt(T,16)}function F(T){return T.map(U)}function U(T){var S=String(T).replace(/[^0-9a-f]/gi,"");return S.length<6&&(S=S[0]+S[0]+S[1]+S[1]+S[2]+S[2]),{r:k(S.substring(0,2)),g:k(S.substring(2,4)),b:k(S.substring(4,6))}}function D(T){var S=y(T,"origin",Object);return S.x=y(S,"x",Number),S.y=y(S,"y",Number),S}function M(T){T.width=document.documentElement.clientWidth,T.height=document.documentElement.clientHeight}function K(T){var S=T.getBoundingClientRect();T.width=S.width,T.height=S.height}function q(T){var S=document.createElement("canvas");return S.style.position="fixed",S.style.top="0px",S.style.left="0px",S.style.pointerEvents="none",S.style.zIndex=T,S}function ce(T,S,G,Ae,ne,ee,re,pe,de){T.save(),T.translate(S,G),T.rotate(ee),T.scale(Ae,ne),T.arc(0,0,1,re,pe,de),T.restore()}function me(T){var S=T.angle*(Math.PI/180),G=T.spread*(Math.PI/180);return{x:T.x,y:T.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:T.startVelocity*.5+Math.random()*T.startVelocity,angle2D:-S+(.5*G-Math.random()*G),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:T.color,shape:T.shape,tick:0,totalTicks:T.ticks,decay:T.decay,drift:T.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:T.gravity*3,ovalScalar:.6,scalar:T.scalar,flat:T.flat}}function ve(T,S){S.x+=Math.cos(S.angle2D)*S.velocity+S.drift,S.y+=Math.sin(S.angle2D)*S.velocity+S.gravity,S.velocity*=S.decay,S.flat?(S.wobble=0,S.wobbleX=S.x+10*S.scalar,S.wobbleY=S.y+10*S.scalar,S.tiltSin=0,S.tiltCos=0,S.random=1):(S.wobble+=S.wobbleSpeed,S.wobbleX=S.x+10*S.scalar*Math.cos(S.wobble),S.wobbleY=S.y+10*S.scalar*Math.sin(S.wobble),S.tiltAngle+=.1,S.tiltSin=Math.sin(S.tiltAngle),S.tiltCos=Math.cos(S.tiltAngle),S.random=Math.random()+2);var G=S.tick++/S.totalTicks,Ae=S.x+S.random*S.tiltCos,ne=S.y+S.random*S.tiltSin,ee=S.wobbleX+S.random*S.tiltCos,re=S.wobbleY+S.random*S.tiltSin;if(T.fillStyle="rgba("+S.color.r+", "+S.color.g+", "+S.color.b+", "+(1-G)+")",T.beginPath(),o&&S.shape.type==="path"&&typeof S.shape.path=="string"&&Array.isArray(S.shape.matrix))T.fill(x(S.shape.path,S.shape.matrix,S.x,S.y,Math.abs(ee-Ae)*.1,Math.abs(re-ne)*.1,Math.PI/10*S.wobble));else if(S.shape.type==="bitmap"){var pe=Math.PI/10*S.wobble,de=Math.abs(ee-Ae)*.1,Ce=Math.abs(re-ne)*.1,W=S.shape.bitmap.width*S.scalar,j=S.shape.bitmap.height*S.scalar,$=new DOMMatrix([Math.cos(pe)*de,Math.sin(pe)*de,-Math.sin(pe)*Ce,Math.cos(pe)*Ce,S.x,S.y]);$.multiplySelf(new DOMMatrix(S.shape.matrix));var N=T.createPattern(d.transform(S.shape.bitmap),"no-repeat");N.setTransform($),T.globalAlpha=1-G,T.fillStyle=N,T.fillRect(S.x-W/2,S.y-j/2,W,j),T.globalAlpha=1}else if(S.shape==="circle")T.ellipse?T.ellipse(S.x,S.y,Math.abs(ee-Ae)*S.ovalScalar,Math.abs(re-ne)*S.ovalScalar,Math.PI/10*S.wobble,0,2*Math.PI):ce(T,S.x,S.y,Math.abs(ee-Ae)*S.ovalScalar,Math.abs(re-ne)*S.ovalScalar,Math.PI/10*S.wobble,0,2*Math.PI);else if(S.shape==="star")for(var R=Math.PI/2*3,J=4*S.scalar,z=8*S.scalar,le=S.x,E=S.y,_=5,O=Math.PI/_;_--;)le=S.x+Math.cos(R)*z,E=S.y+Math.sin(R)*z,T.lineTo(le,E),R+=O,le=S.x+Math.cos(R)*J,E=S.y+Math.sin(R)*J,T.lineTo(le,E),R+=O;else T.moveTo(Math.floor(S.x),Math.floor(S.y)),T.lineTo(Math.floor(S.wobbleX),Math.floor(ne)),T.lineTo(Math.floor(ee),Math.floor(re)),T.lineTo(Math.floor(Ae),Math.floor(S.wobbleY));return T.closePath(),T.fill(),S.tick<S.totalTicks}function Be(T,S,G,Ae,ne){var ee=S.slice(),re=T.getContext("2d"),pe,de,Ce=u(function(W){function j(){pe=de=null,re.clearRect(0,0,Ae.width,Ae.height),d.clear(),ne(),W()}function $(){r&&!(Ae.width===A.width&&Ae.height===A.height)&&(Ae.width=T.width=A.width,Ae.height=T.height=A.height),!Ae.width&&!Ae.height&&(G(T),Ae.width=T.width,Ae.height=T.height),re.clearRect(0,0,Ae.width,Ae.height),ee=ee.filter(function(N){return ve(re,N)}),ee.length?pe=h.frame($):j()}pe=h.frame($),de=j});return{addFettis:function(W){return ee=ee.concat(W),Ce},canvas:T,promise:Ce,reset:function(){pe&&h.cancel(pe),de&&de()}}}function te(T,S){var G=!T,Ae=!!y(S||{},"resize"),ne=!1,ee=y(S,"disableForReducedMotion",Boolean),re=i&&!!y(S||{},"useWorker"),pe=re?p():null,de=G?M:K,Ce=T&&pe?!!T.__confetti_initialized:!1,W=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,j;function $(R,J,z){for(var le=y(R,"particleCount",w),E=y(R,"angle",Number),_=y(R,"spread",Number),O=y(R,"startVelocity",Number),ie=y(R,"decay",Number),X=y(R,"gravity",Number),be=y(R,"drift",Number),we=y(R,"colors",F),ae=y(R,"ticks",Number),he=y(R,"shapes"),xe=y(R,"scalar"),Pe=!!y(R,"flat"),ot=D(R),$e=le,ht=[],Bt=T.width*ot.x,Et=T.height*ot.y;$e--;)ht.push(me({x:Bt,y:Et,angle:E,spread:_,startVelocity:O,color:we[$e%we.length],shape:he[C(0,he.length)],ticks:ae,decay:ie,gravity:X,drift:be,scalar:xe,flat:Pe}));return j?j.addFettis(ht):(j=Be(T,ht,de,J,z),j.promise)}function N(R){var J=ee||y(R,"disableForReducedMotion",Boolean),z=y(R,"zIndex",Number);if(J&&W)return u(function(O){O()});G&&j?T=j.canvas:G&&!T&&(T=q(z),document.body.appendChild(T)),Ae&&!Ce&&de(T);var le={width:T.width,height:T.height};pe&&!Ce&&pe.init(T),Ce=!0,pe&&(T.__confetti_initialized=!0);function E(){if(pe){var O={getBoundingClientRect:function(){if(!G)return T.getBoundingClientRect()}};de(O),pe.postMessage({resize:{width:O.width,height:O.height}});return}le.width=le.height=null}function _(){j=null,Ae&&(ne=!1,e.removeEventListener("resize",E)),G&&T&&(document.body.contains(T)&&document.body.removeChild(T),T=null,Ce=!1)}return Ae&&!ne&&(ne=!0,e.addEventListener("resize",E,!1)),pe?pe.fire(R,le,_):$(R,le,_)}return N.reset=function(){pe&&pe.reset(),j&&j.reset()},N}var V;function Y(){return V||(V=te(null,{useWorker:!0,resize:!0})),V}function x(T,S,G,Ae,ne,ee,re){var pe=new Path2D(T),de=new Path2D;de.addPath(pe,new DOMMatrix(S));var Ce=new Path2D;return Ce.addPath(de,new DOMMatrix([Math.cos(re)*ne,Math.sin(re)*ne,-Math.sin(re)*ee,Math.cos(re)*ee,G,Ae])),Ce}function Q(T){if(!o)throw new Error("path confetti are not supported in this browser");var S,G;typeof T=="string"?S=T:(S=T.path,G=T.matrix);var Ae=new Path2D(S),ne=document.createElement("canvas"),ee=ne.getContext("2d");if(!G){for(var re=1e3,pe=re,de=re,Ce=0,W=0,j,$,N=0;N<re;N+=2)for(var R=0;R<re;R+=2)ee.isPointInPath(Ae,N,R,"nonzero")&&(pe=Math.min(pe,N),de=Math.min(de,R),Ce=Math.max(Ce,N),W=Math.max(W,R));j=Ce-pe,$=W-de;var J=10,z=Math.min(J/j,J/$);G=[z,0,0,z,-Math.round(j/2+pe)*z,-Math.round($/2+de)*z]}return{type:"path",path:S,matrix:G}}function P(T){var S,G=1,Ae="#000000",ne='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof T=="string"?S=T:(S=T.text,G="scalar"in T?T.scalar:G,ne="fontFamily"in T?T.fontFamily:ne,Ae="color"in T?T.color:Ae);var ee=10*G,re=""+ee+"px "+ne,pe=new OffscreenCanvas(ee,ee),de=pe.getContext("2d");de.font=re;var Ce=de.measureText(S),W=Math.ceil(Ce.actualBoundingBoxRight+Ce.actualBoundingBoxLeft),j=Math.ceil(Ce.actualBoundingBoxAscent+Ce.actualBoundingBoxDescent),$=2,N=Ce.actualBoundingBoxLeft+$,R=Ce.actualBoundingBoxAscent+$;W+=$+$,j+=$+$,pe=new OffscreenCanvas(W,j),de=pe.getContext("2d"),de.font=re,de.fillStyle=Ae,de.fillText(S,N,R);var J=1/G;return{type:"bitmap",bitmap:pe.transferToImageBitmap(),matrix:[J,0,0,J,-W*J/2,-j*J/2]}}n.exports=function(){return Y().apply(this,arguments)},n.exports.reset=function(){Y().reset()},n.exports.create=te,n.exports.shapeFromPath=Q,n.exports.shapeFromText=P})((function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}})(),Ov,!1);const fJ=Ov.exports;Ov.exports.create;const Ax={default:{items:[{particleCount:80,spread:120,origin:{y:.625,x:.5}},{timeout:400,particleCount:80,spread:120,origin:{y:.625,x:.625}},{timeout:800,particleCount:80,spread:120,origin:{y:.625,x:.375}}]},randomDirection:{items:[{angle:Nv(55,125),spread:Nv(50,70),particleCount:Nv(50,100),origin:{y:.6}}]},pride:{items:[{timeout:20,particleCount:2,spread:32,origin:{x:0},colors:["#ff0000"]},{timeout:20,particleCount:2,spread:32,origin:{x:1},colors:["#ff0000"]}]}};function Nv(t,e){return Math.random()*(e-t)+t}const hJ=s.defineComponent({__name:"canvas-confetti",props:{preset:{type:String,default:"default"},items:{default:()=>[{}]},colors:{type:Array,default:()=>[]},loop:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(null),r=s.computed(()=>({...Ax[e.preset],items:Ax[e.preset].items.map((o,a)=>({...o,...e.items[a],...e.colors.length?{colors:e.colors}:{}}))}));async function A(o){return new Promise(a=>{requestAnimationFrame(()=>n.value?.confetti(JSON.parse(JSON.stringify(o)))),setTimeout(()=>a(),0)})}async function i(){await Promise.all(r.value.items.map(o=>new Promise(a=>setTimeout(()=>{a(A(o))},o.timeout||0)))),e.loop&&i()}return s.onMounted(()=>{typeof window<"u"&&n.value&&(n.value,n.value.confetti=n.value?.confetti||fJ.create(n.value,{resize:!0}),i())}),(o,a)=>(s.openBlock(),s.createElementBlock("canvas",{class:"canvas-confetti",ref_key:"canvas",ref:n},null,512))}});function ix(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(A){return Object.getOwnPropertyDescriptor(t,A).enumerable}))),n.push.apply(n,r)}return n}function xt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ix(Object(n),!0).forEach((function(r){lA(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ix(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function lA(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pJ(t,e){if(t==null)return{};var n,r,A=(function(o,a){if(o==null)return{};var l,u,d={},h=Object.keys(o);for(u=0;u<h.length;u++)l=h[u],a.indexOf(l)>=0||(d[l]=o[l]);return d})(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(A[n]=t[n])}return A}function Is(t){return(function(e){if(Array.isArray(e))return Lv(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,n){if(e){if(typeof e=="string")return Lv(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Lv(e,n)}})(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
178
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Lv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var ox,mJ,Yf,Qn=(ox=function(t){(function(){var e={}.hasOwnProperty;function n(){for(var r=[],A=0;A<arguments.length;A++){var i=arguments[A];if(i){var o=typeof i;if(o==="string"||o==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&r.push(a)}}else if(o==="object")if(i.toString===Object.prototype.toString)for(var l in i)e.call(i,l)&&i[l]&&r.push(l);else r.push(i.toString())}}return r.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n})()},ox(Yf={path:mJ,exports:{},require:function(t,e){return(function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")})(e==null&&Yf.path)}},Yf.exports),Yf.exports),DA=function(t){return function(e,n){if(!e)return t;var r;typeof e=="string"?r=e:n=e;var A=t;return r&&(A+="__"+r),A+(n?Object.keys(n).reduce((function(i,o){var a=n[o];return a&&(i+=" "+(typeof a=="boolean"?A+"--"+o:A+"--"+o+"_"+a)),i}),""):"")}};function Rv(t,e,n){var r,A,i,o,a;function l(){var d=Date.now()-o;d<e&&d>=0?r=setTimeout(l,e-d):(r=null,n||(a=t.apply(i,A),i=A=null))}e==null&&(e=100);var u=function(){i=this,A=arguments,o=Date.now();var d=n&&!r;return r||(r=setTimeout(l,e)),d&&(a=t.apply(i,A),i=A=null),a};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(a=t.apply(i,A),i=A=null,clearTimeout(r),r=null)},u}Rv.debounce=Rv;var Hv=Rv,Xe=function(){return Xe=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var A in e=arguments[n])Object.prototype.hasOwnProperty.call(e,A)&&(t[A]=e[A]);return t},Xe.apply(this,arguments)};function sx(t,e){var n,r;return t&&e?(n=""+t+e[0].toUpperCase()+e.slice(1),r=t+"-"+e):(n=t||e,r=t||e),{name:n,classname:r}}function ax(t){return/^blob:/.test(t)}function lx(t){return ax(t)||(function(e){return/^data:/.test(e)})(t)}function Da(t){return!!(t&&t.constructor&&t.call&&t.apply)}function Rn(t){return t===void 0}function qf(t){return typeof t=="object"&&t!==null}function Pv(t,e,n){var r={};return qf(t)?(Object.keys(e).forEach((function(A){Rn(t[A])?r[A]=e[A]:qf(e[A])?qf(t[A])?r[A]=Pv(t[A],e[A],n[A]):r[A]=t[A]?e[A]:n[A]:e[A]===!0||e[A]===!1?r[A]=!!t[A]:r[A]=t[A]})),r):t?e:n}function Xf(t){var e=Number(t);return Number.isNaN(e)?t:e}function cx(t){return typeof(t=="number"||(function(e){return typeof e=="object"&&e!==null})(t)&&toString.call(t)=="[object Number]")&&!ux(t)}function ux(t){return t!=t}function dx(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}var Sc=function(t,e){t===void 0&&(t={}),e===void 0&&(e={}),this.type="manipulateImage",this.move=t,this.scale=e},gJ=function(t,e){e===void 0&&(e={}),this.type="resize",this.directions=t,this.params=e},$v=function(t){this.type="move",this.directions=t},vJ=(function(){function t(e,n,r,A,i){this.type="drag",this.nativeEvent=e,this.position=r,this.previousPosition=A,this.element=n,this.anchor=i}return t.prototype.shift=function(){var e=this,n=e.element,r=e.anchor,A=e.position;if(n){var i=n.getBoundingClientRect(),o=i.left,a=i.top;return{left:A.left-o-r.left,top:A.top-a-r.top}}return{left:0,top:0}},t})(),Kv={name:"DraggableElement",props:{classname:{type:String}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){if(!this.$refs.draggable)throw new Error('You should add ref "draggable" to your root element to use draggable mixin');this.touches=[],this.hovered=!1},methods:{onMouseOver:function(){this.hovered||(this.hovered=!0,this.$emit("enter"))},onMouseLeave:function(){this.hovered&&!this.touches.length&&(this.hovered=!1,this.$emit("leave"))},onTouchStart:function(t){t.cancelable&&!this.disabled&&t.touches.length===1&&(this.touches=Is(t.touches),this.hovered||(this.$emit("enter"),this.hovered=!0),t.touches.length&&this.initAnchor(this.touches.reduce((function(e,n){return{clientX:e.clientX+n.clientX/t.touches.length,clientY:e.clientY+n.clientY/t.touches.length}}),{clientX:0,clientY:0})),t.preventDefault&&t.preventDefault(),t.stopPropagation())},onTouchEnd:function(){this.processEnd()},onTouchMove:function(t){this.touches.length&&(this.processMove(t,t.touches),t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation())},onMouseDown:function(t){if(!this.disabled){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.preventDefault())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.draggable.getBoundingClientRect(),n=e.left,r=e.right,A=e.bottom,i=e.top;this.anchor={left:t.clientX-n,top:t.clientY-i,bottom:A-t.clientY,right:r-t.clientX}},processMove:function(t,e){var n=Is(e);if(this.touches.length){if(this.touches.length===1&&n.length===1){var r=this.$refs.draggable;this.$emit("drag",new vJ(t,r,{left:n[0].clientX,top:n[0].clientY},{left:this.touches[0].clientX,top:this.touches[0].clientY},this.anchor))}this.touches=n}},processEnd:function(){this.touches.length&&this.$emit("drag-end"),this.hovered&&(this.$emit("leave"),this.hovered=!1),this.touches=[]}},emits:["drag","drag-end","leave","enter"]};Kv.render=function(t,e,n,r,A,i){return s.openBlock(),s.createBlock("div",{ref:"draggable",class:n.classname,onTouchstart:e[1]||(e[1]=function(){return i.onTouchStart&&i.onTouchStart.apply(i,arguments)}),onMousedown:e[2]||(e[2]=function(){return i.onMouseDown&&i.onMouseDown.apply(i,arguments)}),onMouseover:e[3]||(e[3]=function(){return i.onMouseOver&&i.onMouseOver.apply(i,arguments)}),onMouseleave:e[4]||(e[4]=function(){return i.onMouseLeave&&i.onMouseLeave.apply(i,arguments)})},[s.renderSlot(t.$slots,"default")],34)};var zv=DA("vue-handler-wrapper"),fx={name:"HandlerWrapper",components:{DraggableElement:Kv},props:{horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},computed:{classes:function(){var t;if(this.horizontalPosition||this.verticalPosition){var e,n=sx(this.horizontalPosition,this.verticalPosition);t=zv((lA(e={},n.classname,!0),lA(e,"disabled",this.disabled),e))}else t=zv({disabled:this.disabled});return{root:t,draggable:zv("draggable")}}},emits:["leave","enter","drag","drag-end"]};fx.render=function(t,e,n,r,A,i){var o=s.resolveComponent("DraggableElement");return s.openBlock(),s.createBlock("div",{class:i.classes.root},[s.createVNode(o,{class:i.classes.draggable,onDrag:e[1]||(e[1]=function(a){return t.$emit("drag",a)}),onDragEnd:e[2]||(e[2]=function(a){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(a){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(a){return t.$emit("enter")})},{default:s.withCtx((function(){return[s.renderSlot(t.$slots,"default")]})),_:3},8,["class"])],2)};var wJ=DA("vue-line-wrapper"),hx={name:"LineWrapper",components:{DraggableElement:Kv},props:{position:{type:String,required:!0},disabled:{type:Boolean,default:!1}},computed:{classname:function(){var t;return wJ((lA(t={},this.position,!0),lA(t,"disabled",this.disabled),t))}},emits:["leave","enter","drag","drag-end"]};hx.render=function(t,e,n,r,A,i){var o=s.resolveComponent("DraggableElement");return s.openBlock(),s.createBlock(o,{class:i.classname,onDrag:e[1]||(e[1]=function(a){return t.$emit("drag",a)}),onDragEnd:e[2]||(e[2]=function(a){return t.$emit("drag-end")}),onLeave:e[3]||(e[3]=function(a){return t.$emit("leave")}),onEnter:e[4]||(e[4]=function(a){return t.$emit("enter")})},{default:s.withCtx((function(){return[s.renderSlot(t.$slots,"default")]})),_:3},8,["class"])};var di=["left","right","top","bottom"],BJ=["left","right"],yJ=["top","bottom"],CJ=["left","top"],bJ=["fill-area","fit-area","stencil","none"],px={left:0,top:0,width:0,height:0};function mx(t,e,n){return!(n=n||["width","height","left","top"]).some((function(r){return t[r]!==e[r]}))}function fi(t){return{left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height}}function Oa(t,e){return{left:t.left-e.left,top:t.top-e.top}}function Yn(t){return{left:t.left+t.width/2,top:t.top+t.height/2}}function xc(t,e){var n={left:0,top:0,right:0,bottom:0};return di.forEach((function(r){var A=e[r],i=fi(t)[r];n[r]=A!==void 0&&i!==void 0?r==="left"||r==="top"?Math.max(0,A-i):Math.max(0,i-A):0})),n}function hi(t,e){return{left:t.left-e.left,top:t.top-e.top,width:t.width+e.left+e.right,height:t.height+e.top+e.bottom}}function Jf(t){return{left:-t.left,top:-t.top}}function Fr(t,e){return Xe(Xe({},t),{left:t.left+e.left,top:t.top+e.top})}function cA(t,e,n,r){if(e!==1){if(n){var A=Yn(t);return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2+(n.left-A.left)*(1-e),top:t.top+t.height*(1-e)/2+(n.top-A.top)*(1-e)}}return{width:t.width*e,height:t.height*e,left:t.left+t.width*(1-e)/2,top:t.top+t.height*(1-e)/2}}return t}function Ft(t){return t.width/t.height}function Na(t,e){return Math.min(e.right!==void 0&&e.left!==void 0?(e.right-e.left)/t.width:1/0,e.bottom!==void 0&&e.top!==void 0?(e.bottom-e.top)/t.height:1/0)}function La(t,e){var n={left:0,top:0},r=xc(t,e);return r.left&&r.left>0?n.left=r.left:r.right&&r.right>0&&(n.left=-r.right),r.top&&r.top>0?n.top=r.top:r.bottom&&r.bottom>0&&(n.top=-r.bottom),n}function Wv(t,e){var n;return e.minimum&&t<e.minimum?n=e.minimum:e.maximum&&t>e.maximum&&(n=e.maximum),n}function gx(t,e){var n=Ft(t),r=Ft(e);return e.width<1/0&&e.height<1/0?n>r?{width:e.width,height:e.width/n}:{width:e.height*n,height:e.height}:e.width<1/0?{width:e.width,height:e.width/n}:e.height<1/0?{width:e.height*n,height:e.height}:t}function vx(t,e){var n=e*Math.PI/180;return{width:Math.abs(t.width*Math.cos(n))+Math.abs(t.height*Math.sin(n)),height:Math.abs(t.width*Math.sin(n))+Math.abs(t.height*Math.cos(n))}}function Ro(t,e){var n=e*Math.PI/180;return{left:t.left*Math.cos(n)-t.top*Math.sin(n),top:t.left*Math.sin(n)+t.top*Math.cos(n)}}function jf(t,e){var n=xc(qn(t,e),e);return n.left+n.right+n.top+n.bottom?n.left+n.right>n.top+n.bottom?Math.min((t.width+n.left+n.right)/t.width,Na(t,e)):Math.min((t.height+n.top+n.bottom)/t.height,Na(t,e)):1}function qn(t,e,n){n===void 0&&(n=!1);var r=La(t,e);return Fr(t,n?Jf(r):r)}function Gv(t){return{width:t.right!==void 0&&t.left!==void 0?t.right-t.left:1/0,height:t.bottom!==void 0&&t.top!==void 0?t.bottom-t.top:1/0}}function EJ(t,e){return Xe(Xe({},t),{minWidth:Math.min(e.width,t.minWidth),minHeight:Math.min(e.height,t.minHeight),maxWidth:Math.min(e.width,t.maxWidth),maxHeight:Math.min(e.height,t.maxHeight)})}function wx(t,e,n){n===void 0&&(n=!0);var r={};return di.forEach((function(A){var i=t[A],o=e[A];i!==void 0&&o!==void 0?r[A]=A==="left"||A==="top"?n?Math.max(i,o):Math.min(i,o):n?Math.min(i,o):Math.max(i,o):o!==void 0?r[A]=o:i!==void 0&&(r[A]=i)})),r}function Zf(t,e){return wx(t,e,!0)}function Bx(t){var e=t.size,n=t.aspectRatio,r=t.ignoreMinimum,A=t.sizeRestrictions;return!!((e.correctRatio||Ft(e)>=n.minimum&&Ft(e)<=n.maximum)&&e.height<=A.maxHeight&&e.width<=A.maxWidth&&e.width&&e.height&&(r||e.height>=A.minHeight&&e.width>=A.minWidth))}function yx(t,e){return Math.pow(t.width-e.width,2)+Math.pow(t.height-e.height,2)}function Pi(t){var e=t.width,n=t.height,r=t.sizeRestrictions,A={minimum:t.aspectRatio&&t.aspectRatio.minimum||0,maximum:t.aspectRatio&&t.aspectRatio.maximum||1/0},i={width:Math.max(r.minWidth,Math.min(r.maxWidth,e)),height:Math.max(r.minHeight,Math.min(r.maxHeight,n))};function o(u,d){return d===void 0&&(d=!1),u.reduce((function(h,p){return Bx({size:p,aspectRatio:A,sizeRestrictions:r,ignoreMinimum:d})&&(!h||yx(p,{width:e,height:n})<yx(h,{width:e,height:n}))?p:h}),null)}var a=[];A&&[A.minimum,A.maximum].forEach((function(u){u&&a.push({width:i.width,height:i.width/u,correctRatio:!0},{width:i.height*u,height:i.height,correctRatio:!0})})),Bx({size:i,aspectRatio:A,sizeRestrictions:r})&&a.push(i);var l=o(a)||o(a,!0);return l&&{width:l.width,height:l.height}}function Yv(t){var e=t.event,n=t.coordinates,r=t.positionRestrictions,A=r===void 0?{}:r,i=Fr(n,e.directions);return Fr(i,La(i,A))}function kJ(t){var e=t.coordinates,n=t.transform,r=t.imageSize,A=t.sizeRestrictions,i=t.positionRestrictions,o=t.aspectRatio,a=t.visibleArea,l=function(d,h){return Yv({coordinates:d,positionRestrictions:i,event:new $v({left:h.left-d.left,top:h.top-d.top})})},u=Xe({},e);return(Array.isArray(n)?n:[n]).forEach((function(d){var h={};Rn((h=typeof d=="function"?d({coordinates:u,imageSize:r,visibleArea:a}):d).width)&&Rn(h.height)||(u=(function(p,m){var v=Xe(Xe(Xe({},p),Pi({width:m.width,height:m.height,sizeRestrictions:A,aspectRatio:o})),{left:0,top:0});return l(v,{left:p.left,top:p.top})})(u,Xe(Xe({},u),h))),Rn(h.left)&&Rn(h.top)||(u=l(u,Xe(Xe({},u),h)))})),u}function SJ(t){t.event;var e=t.getAreaRestrictions,n=t.boundaries,r=t.coordinates,A=t.visibleArea;t.aspectRatio;var i=t.stencilSize,o=t.sizeRestrictions,a=t.positionRestrictions;t.stencilReference;var l,u,d,h=Xe({},r),p=Xe({},A),m=Xe({},i);l=Ft(m),u=Ft(h),d===void 0&&(d=.001),(l===0||u===0?Math.abs(u-l)<d:Math.abs(u/l)<1+d&&Math.abs(u/l)>1-d)||(h=Xe(Xe({},h),Pi({sizeRestrictions:o,width:h.width,height:h.height,aspectRatio:{minimum:Ft(m),maximum:Ft(m)}})));var v=jf(p=cA(p,h.width*n.width/(p.width*m.width)),e({visibleArea:p,type:"resize"}));return v!==1&&(p=cA(p,v),h=cA(h,v)),p=qn(p=Fr(p,Oa(Yn(h),Yn(p))),e({visibleArea:p,type:"move"})),{coordinates:h=qn(h,Zf(fi(p),a)),visibleArea:p}}function xJ(t){var e=t.event,n=t.getAreaRestrictions,r=t.boundaries,A=t.coordinates,i=t.visibleArea;t.aspectRatio,t.stencilSize,t.sizeRestrictions;var o=t.positionRestrictions;t.stencilReference;var a=Xe({},A),l=Xe({},i);if(A&&i&&e.type!=="manipulateImage"){var u={width:0,height:0};l.width,r.width,Ft(r)>Ft(a)?(u.height=.8*r.height,u.width=u.height*Ft(a)):(u.width=.8*r.width,u.height=u.width*Ft(a));var d=jf(l=cA(l,a.width*r.width/(l.width*u.width)),n({visibleArea:l,type:"resize"}));l=cA(l,d),d!==1&&(u.height/=d,u.width/=d),l=qn(l=Fr(l,Oa(Yn(a),Yn(l))),n({visibleArea:l,type:"move"})),a=qn(a,Zf(fi(l),o))}return{coordinates:a,visibleArea:l}}function FJ(t){var e=t.event,n=t.coordinates,r=t.visibleArea,A=t.getAreaRestrictions,i=Xe({},r),o=Xe({},n);if(e.type==="setCoordinates"){var a=Math.max(0,o.width-i.width),l=Math.max(0,o.height-i.height);a>l?i=cA(i,Math.min(o.width/i.width,Na(i,A({visibleArea:i,type:"resize"})))):l>a&&(i=cA(i,Math.min(o.height/i.height,Na(i,A({visibleArea:i,type:"resize"}))))),i=qn(i=Fr(i,Jf(La(o,fi(i)))),A({visibleArea:i,type:"move"}))}return{visibleArea:i,coordinates:o}}function QJ(t){var e=t.imageSize,n=t.visibleArea,r=t.coordinates,A=n||e;return{left:(n?n.left:0)+A.width/2-r.width/2,top:(n?n.top:0)+A.height/2-r.height/2}}function TJ(t){var e=t.imageSize,n=t.visibleArea,r=t.aspectRatio,A=t.sizeRestrictions,i=n||e,o=Math.min(r.maximum||1/0,Math.max(r.minimum||0,Ft(i))),a=i.width<i.height?{width:.8*i.width,height:.8*i.width/o}:{height:.8*i.height,width:.8*i.height*o};return Pi(Xe(Xe({},a),{aspectRatio:r,sizeRestrictions:A}))}function MJ(t){var e,n,r=t.imageSize,A=t.visibleArea,i=t.boundaries,o=t.aspectRatio,a=t.sizeRestrictions,l=t.stencilSize,u=A||r;return Ft(u)>Ft(i)?n=(e=l.height*u.height/i.height)*Ft(l):e=(n=l.width*u.width/i.width)/Ft(l),Pi({width:n,height:e,aspectRatio:o,sizeRestrictions:a})}function IJ(t){var e=t.getAreaRestrictions,n=t.coordinates,r=t.imageSize,A=Ft(t.boundaries);if(n){var i={height:Math.max(n.height,r.height),width:Math.max(n.width,r.width)},o=gx({width:Ft(i)>A?i.width:i.height*A,height:Ft(i)>A?i.width/A:i.height},Gv(e())),a={left:n.left+n.width/2-o.width/2,top:n.top+n.height/2-o.height/2,width:o.width,height:o.height},l=xc(n,fi(Xe({left:0,top:0},r))),u={};return!l.left&&!l.right&&a.width<=r.width&&(u.left=0,u.right=r.width),!l.top&&!l.bottom&&a.height<=r.height&&(u.top=0,u.bottom=r.height),qn(a,u)}var d=Ft(r);return o={height:d>A?r.height:r.width/A,width:d>A?r.height*A:r.width},{left:r.width/2-o.width/2,top:r.height/2-o.height/2,width:o.width,height:o.height}}function Vf(t,e){return wx(t,fi(e))}function UJ(t){var e=t.event,n=t.coordinates,r=t.visibleArea,A=t.sizeRestrictions,i=t.getAreaRestrictions,o=t.positionRestrictions,a=t.adjustStencil,l=e.scale,u=e.move,d=Xe({},r),h=Xe({},n),p=1,m=1,v=l.factor&&Math.abs(l.factor-1)>.001;d=Fr(d,{left:u.left||0,top:u.top||0});var B={stencil:{minimum:Math.max(A.minWidth?A.minWidth/h.width:0,A.minHeight?A.minHeight/h.height:0),maximum:Math.min(A.maxWidth?A.maxWidth/h.width:1/0,A.maxHeight?A.maxHeight/h.height:1/0,Na(h,o))},area:{maximum:Na(d,i({visibleArea:d,type:"resize"}))}};l.factor&&v&&(l.factor<1?(m=Math.max(l.factor,B.stencil.minimum))>1&&(m=1):l.factor>1&&(m=Math.min(l.factor,Math.min(B.area.maximum,B.stencil.maximum)))<1&&(m=1)),m&&(d=cA(d,m,l.center));var y=n.left-r.left,w=r.width+r.left-(n.width+n.left),C=n.top-r.top,k=r.height+r.top-(n.height+n.top);return d=qn(d=Fr(d,La(d,{left:o.left!==void 0?o.left-y*m:void 0,top:o.top!==void 0?o.top-C*m:void 0,bottom:o.bottom!==void 0?o.bottom+k*m:void 0,right:o.right!==void 0?o.right+w*m:void 0})),i({visibleArea:d,type:"move"})),h.width=h.width*m,h.height=h.height*m,h.left=d.left+y*m,h.top=d.top+C*m,h=qn(h,Zf(fi(d),o)),l.factor&&v&&a&&(l.factor>1?p=Math.min(B.area.maximum,l.factor)/m:l.factor<1&&(p=Math.max(h.height/d.height,h.width/d.width,l.factor/m)),p!==1&&(d=Fr(d=qn(d=cA(d,p,l.factor>1?l.center:Yn(h)),i({visibleArea:d,type:"move"})),Jf(La(h,fi(d)))))),{coordinates:h,visibleArea:d}}function _J(t){var e=t.aspectRatio,n=t.getAreaRestrictions,r=t.coordinates,A=t.visibleArea,i=t.sizeRestrictions,o=t.positionRestrictions,a=t.imageSize,l=t.previousImageSize,u=t.angle,d=Xe({},r),h=Xe({},A),p=Ro(Yn(Xe({left:0,top:0},l)),u);return(d=Xe(Xe({},Pi({sizeRestrictions:i,aspectRatio:e,width:d.width,height:d.height})),Ro(Yn(d),u))).left-=p.left-a.width/2+d.width/2,d.top-=p.top-a.height/2+d.height/2,h=cA(h,jf(h,n({visibleArea:h,type:"resize"}))),{coordinates:d=qn(d,o),visibleArea:h=qn(h=Fr(h,Oa(Yn(d),Yn(r))),n({visibleArea:h,type:"move"}))}}function DJ(t){var e=t.flip,n=t.previousFlip,r=t.rotate,A=t.getAreaRestrictions,i=t.coordinates,o=t.visibleArea,a=t.imageSize,l=Xe({},i),u=Xe({},o),d=n.horizontal!==e.horizontal,h=n.vertical!==e.vertical;if(d||h){var p=Ro({left:a.width/2,top:a.height/2},-r),m=Ro(Yn(l),-r),v=Ro({left:d?p.left-(m.left-p.left):m.left,top:h?p.top-(m.top-p.top):m.top},r);l=Fr(l,Oa(v,Yn(l))),m=Ro(Yn(u),-r),u=qn(u=Fr(u,Oa(v=Ro({left:d?p.left-(m.left-p.left):m.left,top:h?p.top-(m.top-p.top):m.top},r),Yn(u))),A({visibleArea:u,type:"move"}))}return{coordinates:l,visibleArea:u}}function Cx(t){var e=t.directions,n=t.coordinates,r=t.positionRestrictions,A=r===void 0?{}:r,i=t.sizeRestrictions,o=t.preserveRatio,a=t.compensate,l=Xe({},e),u=hi(n,l).width,d=hi(n,l).height;u<0&&(l.left<0&&l.right<0?(l.left=-(n.width-i.minWidth)/(l.left/l.right),l.right=-(n.width-i.minWidth)/(l.right/l.left)):l.left<0?l.left=-(n.width-i.minWidth):l.right<0&&(l.right=-(n.width-i.minWidth))),d<0&&(l.top<0&&l.bottom<0?(l.top=-(n.height-i.minHeight)/(l.top/l.bottom),l.bottom=-(n.height-i.minHeight)/(l.bottom/l.top)):l.top<0?l.top=-(n.height-i.minHeight):l.bottom<0&&(l.bottom=-(n.height-i.minHeight)));var h=xc(hi(n,l),A);a&&(h.left&&h.left>0&&h.right===0?(l.right+=h.left,l.left-=h.left):h.right&&h.right>0&&h.left===0&&(l.left+=h.right,l.right-=h.right),h.top&&h.top>0&&h.bottom===0?(l.bottom+=h.top,l.top-=h.top):h.bottom&&h.bottom>0&&h.top===0&&(l.top+=h.bottom,l.bottom-=h.bottom),h=xc(hi(n,l),A));var p={width:1/0,height:1/0,left:1/0,right:1/0,top:1/0,bottom:1/0};if(di.forEach((function(B){var y=h[B];y&&l[B]&&(p[B]=Math.max(0,1-y/l[B]))})),o){var m=Math.min.apply(null,di.map((function(B){return p[B]})));m!==1/0&&di.forEach((function(B){l[B]*=m}))}else di.forEach((function(B){p[B]!==1/0&&(l[B]*=p[B])}));if(u=hi(n,l).width,d=hi(n,l).height,l.right+l.left&&(u>i.maxWidth?p.width=(i.maxWidth-n.width)/(l.right+l.left):u<i.minWidth&&(p.width=(i.minWidth-n.width)/(l.right+l.left))),l.bottom+l.top&&(d>i.maxHeight?p.height=(i.maxHeight-n.height)/(l.bottom+l.top):d<i.minHeight&&(p.height=(i.minHeight-n.height)/(l.bottom+l.top))),o){var v=Math.min(p.width,p.height);v!==1/0&&di.forEach((function(B){l[B]*=v}))}else p.width!==1/0&&BJ.forEach((function(B){l[B]*=p.width})),p.height!==1/0&&yJ.forEach((function(B){l[B]*=p.height}));return l}function eh(t,e,n){return e==0&&n==0?t/2:e==0?0:n==0?t:t*Math.abs(e/(e+n))}var OJ=DA("vue-simple-handler"),NJ=DA("vue-simple-handler-wrapper"),qv={name:"SimpleHandler",components:{HandlerWrapper:fx},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},horizontalPosition:{type:String},verticalPosition:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){var t,e=(lA(t={},this.horizontalPosition,!!this.horizontalPosition),lA(t,this.verticalPosition,!!this.verticalPosition),lA(t,"".concat(this.horizontalPosition,"-").concat(this.verticalPosition),!!(this.verticalPosition&&this.horizontalPosition)),lA(t,"hover",this.hover),t);return{default:Qn(OJ(e),this.defaultClass,this.hover&&this.hoverClass),wrapper:Qn(NJ(e),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};qv.render=function(t,e,n,r,A,i){var o=s.resolveComponent("HandlerWrapper");return s.openBlock(),s.createBlock(o,{class:i.classes.wrapper,"vertical-position":n.verticalPosition,"horizontal-position":n.horizontalPosition,disabled:n.disabled,onDrag:i.onDrag,onDragEnd:i.onDragEnd,onEnter:i.onEnter,onLeave:i.onLeave},{default:s.withCtx((function(){return[s.createVNode("div",{class:i.classes.default},null,2)]})),_:1},8,["class","vertical-position","horizontal-position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var LJ=DA("vue-simple-line"),RJ=DA("vue-simple-line-wrapper"),Xv={name:"SimpleLine",components:{LineWrapper:hx},props:{defaultClass:{type:String},hoverClass:{type:String},wrapperClass:{type:String},position:{type:String},disabled:{type:Boolean,default:!1}},data:function(){return{hover:!1}},computed:{classes:function(){return{root:Qn(LJ(lA({},this.position,!0)),this.defaultClass,this.hover&&this.hoverClass),wrapper:Qn(RJ(lA({},this.position,!0)),this.wrapperClass)}}},methods:{onDrag:function(t){this.$emit("drag",t)},onEnter:function(){this.hover=!0},onLeave:function(){this.hover=!1},onDragEnd:function(){this.$emit("drag-end")}},emits:["drag","drag-end"]};Xv.render=function(t,e,n,r,A,i){var o=s.resolveComponent("LineWrapper");return s.openBlock(),s.createBlock(o,{class:i.classes.wrapper,position:n.position,disabled:n.disabled,onDrag:i.onDrag,onDragEnd:i.onDragEnd,onEnter:i.onEnter,onLeave:i.onLeave},{default:s.withCtx((function(){return[s.createVNode("div",{class:i.classes.root},null,2)]})),_:1},8,["class","position","disabled","onDrag","onDragEnd","onEnter","onLeave"])};var Jv=DA("vue-bounding-box"),HJ=["east","west",null],PJ=["south","north",null],bx={name:"BoundingBox",props:{width:{type:Number},height:{type:Number},transitions:{type:Object},handlers:{type:Object,default:function(){return{eastNorth:!0,north:!0,westNorth:!0,west:!0,westSouth:!0,south:!0,eastSouth:!0,east:!0}}},handlersComponent:{type:[Object,String],default:function(){return qv}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}},lines:{type:Object,default:function(){return{west:!0,north:!0,east:!0,south:!0}}},linesComponent:{type:[Object,String],default:function(){return Xv}},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},resizable:{type:Boolean,default:!0}},data:function(){var t=[];return HJ.forEach((function(e){PJ.forEach((function(n){if(e!==n){var r=sx(e,n),A=r.name,i=r.classname;t.push({name:A,classname:i,verticalDirection:n,horizontalDirection:e})}}))})),{points:t}},computed:{style:function(){var t={};return this.width&&this.height&&(t.width="".concat(this.width,"px"),t.height="".concat(this.height,"px"),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction))),t},classes:function(){var t=this.handlersClasses,e=this.handlersWrappersClasses,n=this.linesClasses,r=this.linesWrappersClasses;return{root:Jv(),handlers:t,handlersWrappers:e,lines:n,linesWrappers:r}},lineNodes:function(){var t=this,e=[];return this.points.forEach((function(n){n.horizontalDirection&&n.verticalDirection||!t.lines[n.name]||e.push({name:n.name,component:t.linesComponent,class:Qn(t.classes.lines.default,t.classes.lines[n.name],!t.resizable&&t.classes.lines.disabled),wrapperClass:Qn(t.classes.linesWrappers.default,t.classes.linesWrappers[n.name],!t.resizable&&t.classes.linesWrappers.disabled),hoverClass:t.classes.lines.hover,verticalDirection:n.verticalDirection,horizontalDirection:n.horizontalDirection,disabled:!t.resizable})})),e},handlerNodes:function(){var t=this,e=[],n=this.width,r=this.height;return this.points.forEach((function(A){if(t.handlers[A.name]){var i={name:A.name,component:t.handlersComponent,class:Qn(t.classes.handlers.default,t.classes.handlers[A.name]),wrapperClass:Qn(t.classes.handlersWrappers.default,t.classes.handlersWrappers[A.name]),hoverClass:t.classes.handlers.hover,verticalDirection:A.verticalDirection,horizontalDirection:A.horizontalDirection,disabled:!t.resizable};if(n&&r){var o=A.horizontalDirection,a=A.verticalDirection,l=o==="east"?n:o==="west"?0:n/2,u=a==="south"?r:a==="north"?0:r/2;i.wrapperClass=Jv("handler"),i.wrapperStyle={transform:"translate(".concat(l,"px, ").concat(u,"px)")},t.transitions&&t.transitions.enabled&&(i.wrapperStyle.transition="".concat(t.transitions.time,"ms ").concat(t.transitions.timingFunction))}else i.wrapperClass=Jv("handler",lA({},A.classname,!0));e.push(i)}})),e}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[]},methods:{onEnd:function(){this.$emit("resize-end")},onHandlerDrag:function(t,e,n){var r,A=t.shift(),i=A.left,o=A.top,a={left:0,right:0,top:0,bottom:0};e==="west"?a.left-=i:e==="east"&&(a.right+=i),n==="north"?a.top-=o:n==="south"&&(a.bottom+=o),!n&&e?r="width":n&&!e&&(r="height"),this.resizable&&this.$emit("resize",new gJ(a,{allowedDirections:{left:e==="west"||!e,right:e==="east"||!e,bottom:n==="south"||!n,top:n==="north"||!n},preserveAspectRatio:t.nativeEvent&&t.nativeEvent.shiftKey,respectDirection:r}))}},emits:["resize","resize-end"]};bx.render=function(t,e,n,r,A,i){return s.openBlock(),s.createBlock("div",{ref:"box",class:i.classes.root,style:i.style},[s.renderSlot(t.$slots,"default"),s.createVNode("div",null,[(s.openBlock(!0),s.createBlock(s.Fragment,null,s.renderList(i.lineNodes,(function(o){return s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.component),{key:o.name,"default-class":o.class,"hover-class":o.hoverClass,"wrapper-class":o.wrapperClass,position:o.name,disabled:o.disabled,onDrag:function(a){return i.onHandlerDrag(a,o.horizontalDirection,o.verticalDirection)},onDragEnd:e[1]||(e[1]=function(a){return i.onEnd()})},null,8,["default-class","hover-class","wrapper-class","position","disabled","onDrag"])})),128))]),(s.openBlock(!0),s.createBlock(s.Fragment,null,s.renderList(i.handlerNodes,(function(o){return s.openBlock(),s.createBlock("div",{key:o.name,style:o.wrapperStyle,class:o.wrapperClass},[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(o.component),{"default-class":o.class,"hover-class":o.hoverClass,"wrapper-class":o.wrapperClass,"horizontal-position":o.horizontalDirection,"vertical-position":o.verticalDirection,disabled:o.disabled,onDrag:function(a){return i.onHandlerDrag(a,o.horizontalDirection,o.verticalDirection)},onDragEnd:e[2]||(e[2]=function(a){return i.onEnd()})},null,8,["default-class","hover-class","wrapper-class","horizontal-position","vertical-position","disabled","onDrag"]))],6)})),128))],6)};var $J=DA("vue-draggable-area"),Ex={name:"DraggableArea",props:{movable:{type:Boolean,default:!0},activationDistance:{type:Number,default:20}},computed:{classnames:function(){return{default:$J()}}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},mounted:function(){this.touches=[],this.touchStarted=!1},methods:{onTouchStart:function(t){if(t.cancelable){var e=this.movable&&t.touches.length===1;e&&(this.touches=Is(t.touches)),(this.touchStarted||e)&&(t.preventDefault(),t.stopPropagation())}},onTouchEnd:function(){this.touchStarted=!1,this.processEnd()},onTouchMove:function(t){this.touches.length>=1&&(this.touchStarted?(this.processMove(t,t.touches),t.preventDefault(),t.stopPropagation()):dx({x:this.touches[0].clientX,y:this.touches[0].clientY},{x:t.touches[0].clientX,y:t.touches[0].clientY})>this.activationDistance&&(this.initAnchor({clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}),this.touchStarted=!0))},onMouseDown:function(t){if(this.movable&&t.button===0){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.initAnchor(e),t.stopPropagation()}},onMouseMove:function(t){this.touches.length&&(this.processMove(t,[{fake:!0,clientX:t.clientX,clientY:t.clientY}]),t.preventDefault&&t.cancelable&&t.preventDefault(),t.stopPropagation())},onMouseUp:function(){this.processEnd()},initAnchor:function(t){var e=this.$refs.container.getBoundingClientRect(),n=e.left,r=e.top;this.anchor={x:t.clientX-n,y:t.clientY-r}},processMove:function(t,e){var n=Is(e);if(this.touches.length){var r=this.$refs.container.getBoundingClientRect(),A=r.left,i=r.top;this.touches.length===1&&n.length===1&&this.$emit("move",new $v({left:n[0].clientX-(A+this.anchor.x),top:n[0].clientY-(i+this.anchor.y)}))}},processEnd:function(){this.touches.length&&this.$emit("move-end"),this.touches=[]}},emits:["move","move-end"]};Ex.render=function(t,e,n,r,A,i){return s.openBlock(),s.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return i.onTouchStart&&i.onTouchStart.apply(i,arguments)}),onMousedown:e[2]||(e[2]=function(){return i.onMouseDown&&i.onMouseDown.apply(i,arguments)})},[s.renderSlot(t.$slots,"default")],544)};function jv(t){var e,n;return{rotate:t.rotate||0,flip:{horizontal:((e=t?.flip)===null||e===void 0?void 0:e.horizontal)||!1,vertical:((n=t?.flip)===null||n===void 0?void 0:n.vertical)||!1}}}function KJ(t){return new Promise((function(e,n){try{if(t)if(/^data:/i.test(t))e((function(l){l=l.replace(/^data:([^;]+);base64,/gim,"");for(var u=atob(l),d=u.length,h=new ArrayBuffer(d),p=new Uint8Array(h),m=0;m<d;m++)p[m]=u.charCodeAt(m);return h})(t));else if(/^blob:/i.test(t)){var r=new FileReader;r.onload=function(l){e(l.target.result)},i=t,o=function(l){r.readAsArrayBuffer(l)},(a=new XMLHttpRequest).open("GET",i,!0),a.responseType="blob",a.onload=function(){this.status!=200&&this.status!==0||o(this.response)},a.send()}else{var A=new XMLHttpRequest;A.onreadystatechange=function(){A.readyState===4&&(A.status===200||A.status===0?e(A.response):n("Warning: could not load an image to parse its orientation"),A=null)},A.onprogress=function(){A.getResponseHeader("content-type")!=="image/jpeg"&&A.abort()},A.withCredentials=!1,A.open("GET",t,!0),A.responseType="arraybuffer",A.send(null)}else n("Error: the image is empty")}catch(l){n(l)}var i,o,a}))}function kx(t){var e=t.rotate,n=t.flip,r=t.scaleX,A=t.scaleY,i="";return i+=" rotate("+e+"deg) ",i+=" scaleX("+r*(n.horizontal?-1:1)+") ",i+=" scaleY("+A*(n.vertical?-1:1)+") "}function zJ(t){try{var e,n=new DataView(t),r=void 0,A=void 0,i=void 0,o=void 0;if(n.getUint8(0)===255&&n.getUint8(1)===216)for(var a=n.byteLength,l=2;l+1<a;){if(n.getUint8(l)===255&&n.getUint8(l+1)===225){i=l;break}l++}if(i&&(r=i+10,(function(m,v,B){var y,w="";for(y=v,B+=v;y<B;y++)w+=String.fromCharCode(m.getUint8(y));return w})(n,i+4,4)==="Exif")){var u=n.getUint16(r);if(((A=u===18761)||u===19789)&&n.getUint16(r+2,A)===42){var d=n.getUint32(r+4,A);d>=8&&(o=r+d)}}if(o){for(var h=n.getUint16(o,A),p=0;p<h;p++)if(l=o+12*p+2,n.getUint16(l,A)===274){l+=8,e=n.getUint16(l,A),n.setUint16(l,1,A);break}}return e}catch{return null}}function Sx(t,e){var n=e.getBoundingClientRect(),r=n.left,A=n.top,i={left:0,top:0},o=0;return t.forEach((function(a){i.left+=(a.clientX-r)/t.length,i.top+=(a.clientY-A)/t.length})),t.forEach((function(a){o+=dx({x:i.left,y:i.top},{x:a.clientX-r,y:a.clientY-A})})),{centerMass:i,spread:o,count:t.length}}var xx={props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0},eventsFilter:{type:Function,required:!1}},beforeMount:function(){window.addEventListener("mouseup",this.onMouseUp,{passive:!1}),window.addEventListener("mousemove",this.onMouseMove,{passive:!1}),window.addEventListener("touchmove",this.onTouchMove,{passive:!1}),window.addEventListener("touchend",this.onTouchEnd,{passive:!1})},beforeUnmount:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("touchmove",this.onTouchMove),window.removeEventListener("touchend",this.onTouchEnd)},created:function(){this.transforming=!1,this.debouncedProcessEnd=Hv(this.processEnd),this.touches=[]},methods:{processMove:function(t,e){if(this.touches.length){if(this.touches.length===1&&e.length===1)this.$emit("move",new Sc({left:this.touches[0].clientX-e[0].clientX,top:this.touches[0].clientY-e[0].clientY}));else if(this.touches.length>1&&this.touchResize){var n=Sx(e,this.$refs.container),r=this.oldGeometricProperties;r.count===n.count&&r.count>1&&this.$emit("resize",new Sc({left:r.centerMass.left-n.centerMass.left,top:r.centerMass.top-n.centerMass.top},{factor:r.spread/n.spread,center:n.centerMass})),this.oldGeometricProperties=n}this.touches=e}},processEnd:function(){this.transforming&&(this.transforming=!1,this.$emit("transform-end"))},processStart:function(){this.transforming=!0,this.debouncedProcessEnd.clear()},processEvent:function(t){return this.eventsFilter?this.eventsFilter(t,this.transforming)!==!1:(t.preventDefault(),t.stopPropagation(),!0)},onTouchStart:function(t){if(t.cancelable&&(this.touchMove||this.touchResize&&t.touches.length>1)&&this.processEvent(t)){var e=this.$refs.container,n=e.getBoundingClientRect(),r=n.left,A=n.top,i=n.bottom,o=n.right;this.touches=Is(t.touches).filter((function(a){return a.clientX>r&&a.clientX<o&&a.clientY>A&&a.clientY<i})),this.oldGeometricProperties=Sx(this.touches,e)}},onTouchEnd:function(t){t.touches.length===0&&(this.touches=[],this.processEnd())},onTouchMove:function(t){var e=this;if(this.touches.length){var n=Is(t.touches).filter((function(r){return!r.identifier||e.touches.find((function(A){return A.identifier===r.identifier}))}));this.processEvent(t)&&(this.processMove(t,n),this.processStart())}},onMouseDown:function(t){if(this.mouseMove&&"buttons"in t&&t.buttons===1&&this.processEvent(t)){var e={fake:!0,clientX:t.clientX,clientY:t.clientY};this.touches=[e],this.processStart()}},onMouseMove:function(t){this.touches.length&&this.processEvent(t)&&this.processMove(t,[{clientX:t.clientX,clientY:t.clientY}])},onMouseUp:function(){this.touches=[],this.processEnd()},onWheel:function(t){if(this.wheelResize&&this.processEvent(t)){var e=this.$refs.container.getBoundingClientRect(),n=e.left,r=e.top,A=1+this.wheelResize.ratio*(o=t.deltaY||t.detail||t.wheelDelta,(a=+o)==0||ux(a)?a:a>0?1:-1),i={left:t.clientX-n,top:t.clientY-r};this.$emit("resize",new Sc({},{factor:A,center:i})),this.touches.length||this.debouncedProcessEnd()}var o,a}},emits:["resize","move","transform-end"]};xx.render=function(t,e,n,r,A,i){return s.openBlock(),s.createBlock("div",{ref:"container",onTouchstart:e[1]||(e[1]=function(){return i.onTouchStart&&i.onTouchStart.apply(i,arguments)}),onMousedown:e[2]||(e[2]=function(){return i.onMouseDown&&i.onMouseDown.apply(i,arguments)}),onWheel:e[3]||(e[3]=function(){return i.onWheel&&i.onWheel.apply(i,arguments)})},[s.renderSlot(t.$slots,"default")],544)};var Zv={components:{TransformableImage:xx},props:{touchMove:{type:Boolean,required:!0},mouseMove:{type:Boolean,required:!0},touchResize:{type:Boolean,required:!0},wheelResize:{type:[Boolean,Object],required:!0}},emits:["resize","move"]};Zv.render=function(t,e,n,r,A,i){var o=s.resolveComponent("transformable-image");return s.openBlock(),s.createBlock(o,{"touch-move":n.touchMove,"touch-resize":n.touchResize,"mouse-move":n.mouseMove,"wheel-resize":n.wheelResize,onMove:e[1]||(e[1]=function(a){return t.$emit("move",a)}),onResize:e[2]||(e[2]=function(a){return t.$emit("resize",a)})},{default:s.withCtx((function(){return[s.renderSlot(t.$slots,"default")]})),_:3},8,["touch-move","touch-resize","mouse-move","wheel-resize"])};var th=DA("vue-preview"),Fx={props:{coordinates:{type:Object},transitions:{type:Object},image:{type:Object,default:function(){return{}}},imageClass:{type:String},width:{type:Number},height:{type:Number},fill:{type:Boolean}},data:function(){return{calculatedImageSize:{width:0,height:0},calculatedSize:{width:0,height:0}}},computed:{classes:function(){return{root:th({fill:this.fill}),wrapper:th("wrapper"),imageWrapper:th("image-wrapper"),image:Qn(th("image"),this.imageClass)}},style:function(){if(this.fill)return{};var t={};return this.width&&(t.width="".concat(this.size.width,"px")),this.height&&(t.height="".concat(this.size.height,"px")),this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},wrapperStyle:function(){var t={width:"".concat(this.size.width,"px"),height:"".concat(this.size.height,"px"),left:"calc(50% - ".concat(this.size.width/2,"px)"),top:"calc(50% - ".concat(this.size.height/2,"px)")};return this.transitions&&this.transitions.enabled&&(t.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),t},imageStyle:function(){if(this.coordinates&&this.image){var t=this.coordinates.width/this.size.width,e=xt(xt({rotate:0,flip:{horizontal:!1,vertical:!1}},this.image.transforms),{},{scaleX:1/t,scaleY:1/t}),n=this.imageSize.width,r=this.imageSize.height,A=vx({width:n,height:r},e.rotate),i={width:"".concat(n,"px"),height:"".concat(r,"px"),left:"0px",top:"0px"},o={rotate:{left:(n-A.width)*e.scaleX/2,top:(r-A.height)*e.scaleY/2},scale:{left:(1-e.scaleX)*n/2,top:(1-e.scaleY)*r/2}};return i.transform=`translate(
|
|
179
|
-
`.concat(-this.coordinates.left/t-o.rotate.left-o.scale.left,"px,").concat(-this.coordinates.top/t-o.rotate.top-o.scale.top,"px) ")+kx(e),this.transitions&&this.transitions.enabled&&(i.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),i}return{}},size:function(){return{width:this.width||this.calculatedSize.width,height:this.height||this.calculatedSize.height}},imageSize:function(){return{width:this.image.width||this.calculatedImageSize.width,height:this.image.height||this.calculatedImageSize.height}}},watch:{image:function(t){(t.width||t.height)&&this.onChangeImage()}},mounted:function(){var t=this;this.onChangeImage(),this.$refs.image.addEventListener("load",(function(){t.refreshImage()})),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh)},methods:{refreshImage:function(){var t=this.$refs.image;this.calculatedImageSize.height=t.naturalHeight,this.calculatedImageSize.width=t.naturalWidth},refresh:function(){var t=this.$refs.root;this.width||(this.calculatedSize.width=t.clientWidth),this.height||(this.calculatedSize.height=t.clientHeight)},onChangeImage:function(){var t=this.$refs.image;t&&t.complete&&this.refreshImage(),this.refresh()}}};Fx.render=function(t,e,n,r,A,i){return s.openBlock(),s.createBlock("div",{ref:"root",class:i.classes.root,style:i.style},[s.createVNode("div",{ref:"wrapper",class:i.classes.wrapper,style:i.wrapperStyle},[s.withDirectives(s.createVNode("img",{ref:"image",src:n.image&&n.image.src,class:i.classes.image,style:i.imageStyle},null,14,["src"]),[[s.vShow,n.image&&n.image.src]])],6)],6)};var Qx={components:{Preview:Fx},inheritAttrs:!1};Qx.render=function(t,e,n,r,A,i){var o=s.resolveComponent("preview");return s.openBlock(),s.createBlock(o,s.mergeProps(t.$attrs,{fill:!0}),null,16)};var Vv=DA("vue-rectangle-stencil"),Tx={name:"RectangleStencil",components:{StencilPreview:Qx,BoundingBox:bx,DraggableArea:Ex},props:{image:{type:Object},coordinates:{type:Object},stencilCoordinates:{type:Object},handlers:{type:Object},handlersComponent:{type:[Object,String],default:function(){return qv}},lines:{type:Object},linesComponent:{type:[Object,String],default:function(){return Xv}},aspectRatio:{type:[Number,String]},minAspectRatio:{type:[Number,String]},maxAspectRatio:{type:[Number,String]},movable:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},transitions:{type:Object},movingClass:{type:String},resizingClass:{type:String},previewClass:{type:String},boundingBoxClass:{type:String},linesClasses:{type:Object,default:function(){return{}}},linesWrappersClasses:{type:Object,default:function(){return{}}},handlersClasses:{type:Object,default:function(){return{}}},handlersWrappersClasses:{type:Object,default:function(){return{}}}},data:function(){return{moving:!1,resizing:!1}},computed:{classes:function(){return{stencil:Qn(Vv({movable:this.movable,moving:this.moving,resizing:this.resizing}),this.moving&&this.movingClass,this.resizing&&this.resizingClass),preview:Qn(Vv("preview"),this.previewClass),boundingBox:Qn(Vv("bounding-box"),this.boundingBoxClass)}},style:function(){var t=this.stencilCoordinates,e=t.height,n=t.width,r=t.left,A=t.top,i={width:"".concat(n,"px"),height:"".concat(e,"px"),transform:"translate(".concat(r,"px, ").concat(A,"px)")};return this.transitions&&this.transitions.enabled&&(i.transition="".concat(this.transitions.time,"ms ").concat(this.transitions.timingFunction)),i}},methods:{onMove:function(t){this.$emit("move",t),this.moving=!0},onMoveEnd:function(){this.$emit("move-end"),this.moving=!1},onResize:function(t){this.$emit("resize",t),this.resizing=!0},onResizeEnd:function(){this.$emit("resize-end"),this.resizing=!1},aspectRatios:function(){return{minimum:this.aspectRatio||this.minAspectRatio,maximum:this.aspectRatio||this.maxAspectRatio}}},emits:["resize","resize-end","move","move-end"]};Tx.render=function(t,e,n,r,A,i){var o=s.resolveComponent("stencil-preview"),a=s.resolveComponent("draggable-area"),l=s.resolveComponent("bounding-box");return s.openBlock(),s.createBlock("div",{class:i.classes.stencil,style:i.style},[s.createVNode(l,{width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,transitions:n.transitions,class:i.classes.boundingBox,handlers:n.handlers,"handlers-component":n.handlersComponent,"handlers-classes":n.handlersClasses,"handlers-wrappers-classes":n.handlersWrappersClasses,lines:n.lines,"lines-component":n.linesComponent,"lines-classes":n.linesClasses,"lines-wrappers-classes":n.linesWrappersClasses,resizable:n.resizable,onResize:i.onResize,onResizeEnd:i.onResizeEnd},{default:s.withCtx((function(){return[s.createVNode(a,{movable:n.movable,onMove:i.onMove,onMoveEnd:i.onMoveEnd},{default:s.withCtx((function(){return[s.createVNode(o,{image:n.image,coordinates:n.coordinates,width:n.stencilCoordinates.width,height:n.stencilCoordinates.height,class:i.classes.preview,transitions:n.transitions},null,8,["image","coordinates","width","height","class","transitions"])]})),_:1},8,["movable","onMove","onMoveEnd"])]})),_:1},8,["width","height","transitions","class","handlers","handlers-component","handlers-classes","handlers-wrappers-classes","lines","lines-component","lines-classes","lines-wrappers-classes","resizable","onResize","onResizeEnd"])],6)};var WJ=["transitions"],$i=DA("vue-advanced-cropper"),Mx={name:"Cropper",components:{BackgroundWrapper:Zv},props:{src:{type:String,default:null},stencilComponent:{type:[Object,String],default:function(){return Tx}},backgroundWrapperComponent:{type:[Object,String],default:function(){return Zv}},stencilProps:{type:Object,default:function(){return{}}},autoZoom:{type:Boolean,default:!1},imageClass:{type:String},boundariesClass:{type:String},backgroundClass:{type:String},foregroundClass:{type:String},minWidth:{type:[Number,String]},minHeight:{type:[Number,String]},maxWidth:{type:[Number,String]},maxHeight:{type:[Number,String]},debounce:{type:[Boolean,Number],default:500},transitions:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},canvas:{type:[Object,Boolean],default:!0},crossOrigin:{type:[Boolean,String],default:void 0},transitionTime:{type:Number,default:300},imageRestriction:{type:String,default:"fit-area",validator:function(t){return bJ.indexOf(t)!==-1}},roundResult:{type:Boolean,default:!0},defaultSize:{type:[Function,Object]},defaultPosition:{type:[Function,Object]},defaultVisibleArea:{type:[Function,Object]},defaultTransforms:{type:[Function,Object]},defaultBoundaries:{type:[Function,String],validator:function(t){return!(typeof t=="string"&&t!=="fill"&&t!=="fit")}},priority:{type:String,default:"coordinates"},stencilSize:{type:[Object,Function]},resizeImage:{type:[Boolean,Object],default:!0},moveImage:{type:[Boolean,Object],default:!0},autoZoomAlgorithm:{type:Function},resizeAlgorithm:{type:Function,default:function(t){var e=t.event,n=t.coordinates,r=t.aspectRatio,A=t.positionRestrictions,i=t.sizeRestrictions,o=Xe(Xe({},n),{right:n.left+n.width,bottom:n.top+n.height}),a=e.params||{},l=Xe({},e.directions),u=a.allowedDirections||{left:!0,right:!0,bottom:!0,top:!0};i.widthFrozen&&(l.left=0,l.right=0),i.heightFrozen&&(l.top=0,l.bottom=0),di.forEach((function(F){u[F]||(l[F]=0)}));var d=hi(o,l=Cx({coordinates:o,directions:l,sizeRestrictions:i,positionRestrictions:A})).width,h=hi(o,l).height,p=a.preserveRatio?Ft(o):Wv(d/h,r);if(p){var m=a.respectDirection;if(m||(m=o.width>=o.height||p===1?"width":"height"),m==="width"){var v=d/p-o.height;if(u.top&&u.bottom){var B=l.top,y=l.bottom;l.bottom=eh(v,y,B),l.top=eh(v,B,y)}else u.bottom?l.bottom=v:u.top?l.top=v:u.right?l.right=0:u.left&&(l.left=0)}else if(m==="height"){var w=o.width-h*p;if(u.left&&u.right){var C=l.left,k=l.right;l.left=-eh(w,C,k),l.right=-eh(w,k,C)}else u.left?l.left=-w:u.right?l.right=-w:u.top?l.top=0:u.bottom&&(l.bottom=0)}l=Cx({directions:l,coordinates:o,sizeRestrictions:i,positionRestrictions:A,preserveRatio:!0,compensate:a.compensate})}return d=hi(o,l).width,h=hi(o,l).height,(p=a.preserveRatio?Ft(o):Wv(d/h,r))&&Math.abs(p-d/h)>.001&&di.forEach((function(F){u[F]||(l[F]=0)})),Yv({event:new $v({left:-l.left,top:-l.top}),coordinates:{width:n.width+l.right+l.left,height:n.height+l.top+l.bottom,left:n.left,top:n.top},positionRestrictions:A})}},moveAlgorithm:{type:Function,default:Yv},initStretcher:{type:Function,default:function(t){var e=t.stretcher,n=t.imageSize,r=Ft(n);e.style.width=n.width+"px",e.style.height=e.clientWidth/r+"px",e.style.width=e.clientWidth+"px"}},fitCoordinates:{type:Function,default:function(t){var e=t.visibleArea,n=t.coordinates,r=t.aspectRatio,A=t.sizeRestrictions,i=t.positionRestrictions,o=Xe(Xe({},n),Pi({width:n.width,height:n.height,aspectRatio:r,sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minHeight:Math.min(e.height,A.minHeight),minWidth:Math.min(e.width,A.minWidth)}}));return o=qn(o=Fr(o,Oa(Yn(n),Yn(o))),Zf(fi(e),i))}},fitVisibleArea:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,r=t.getAreaRestrictions,A=t.coordinates,i=Xe({},e);i.height=i.width/Ft(n),i.top+=(e.height-i.height)/2,(A.height-i.height>0||A.width-i.width>0)&&(i=cA(i,Math.max(A.height/i.height,A.width/i.width)));var o=Jf(La(A,fi(i=cA(i,jf(i,r({visibleArea:i,type:"resize"}))))));return i.width<A.width&&(o.left=0),i.height<A.height&&(o.top=0),i=qn(i=Fr(i,o),r({visibleArea:i,type:"move"}))}},areaRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.visibleArea,n=t.boundaries,r=t.imageSize,A=t.imageRestriction,i=t.type,o={};return A==="fill-area"?o={left:0,top:0,right:r.width,bottom:r.height}:A==="fit-area"&&(Ft(n)>Ft(r)?(o={top:0,bottom:r.height},e&&i==="move"&&(e.width>r.width?(o.left=-(e.width-r.width)/2,o.right=r.width-o.left):(o.left=0,o.right=r.width))):(o={left:0,right:r.width},e&&i==="move"&&(e.height>r.height?(o.top=-(e.height-r.height)/2,o.bottom=r.height-o.top):(o.top=0,o.bottom=r.height)))),o}},sizeRestrictionsAlgorithm:{type:Function,default:function(t){return{minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight}}},positionRestrictionsAlgorithm:{type:Function,default:function(t){var e=t.imageSize,n={};return t.imageRestriction!=="none"&&(n={left:0,top:0,right:e.width,bottom:e.height}),n}}},data:function(){return{transitionsActive:!1,imageLoaded:!1,imageAttributes:{width:null,height:null,crossOrigin:null,src:null},defaultImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},appliedImageTransforms:{rotate:0,flip:{horizontal:!1,vertical:!1}},boundaries:{width:0,height:0},visibleArea:null,coordinates:xt({},px)}},computed:{image:function(){return{src:this.imageAttributes.src,width:this.imageAttributes.width,height:this.imageAttributes.height,transforms:this.imageTransforms}},imageTransforms:function(){return{rotate:this.appliedImageTransforms.rotate,flip:{horizontal:this.appliedImageTransforms.flip.horizontal,vertical:this.appliedImageTransforms.flip.vertical},translateX:this.visibleArea?this.visibleArea.left/this.coefficient:0,translateY:this.visibleArea?this.visibleArea.top/this.coefficient:0,scaleX:1/this.coefficient,scaleY:1/this.coefficient}},imageSize:function(){var t=(function(e){return e*Math.PI/180})(this.imageTransforms.rotate);return{width:Math.abs(this.imageAttributes.width*Math.cos(t))+Math.abs(this.imageAttributes.height*Math.sin(t)),height:Math.abs(this.imageAttributes.width*Math.sin(t))+Math.abs(this.imageAttributes.height*Math.cos(t))}},initialized:function(){return!!(this.visibleArea&&this.imageLoaded)},settings:function(){var t=Pv(this.resizeImage,{touch:!0,wheel:{ratio:.1},adjustStencil:!0},{touch:!1,wheel:!1,adjustStencil:!1});return{moveImage:Pv(this.moveImage,{touch:!0,mouse:!0},{touch:!1,mouse:!1}),resizeImage:t}},coefficient:function(){return this.visibleArea?this.visibleArea.width/this.boundaries.width:0},areaRestrictions:function(){return this.imageLoaded?this.areaRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction,boundaries:this.boundaries}):{}},transitionsOptions:function(){return{enabled:this.transitionsActive,timingFunction:"ease-in-out",time:350}},sizeRestrictions:function(){if(this.boundaries.width&&this.boundaries.height&&this.imageSize.width&&this.imageSize.height){var t=this.sizeRestrictionsAlgorithm({imageSize:this.imageSize,minWidth:Rn(this.minWidth)?0:Xf(this.minWidth),minHeight:Rn(this.minHeight)?0:Xf(this.minHeight),maxWidth:Rn(this.maxWidth)?1/0:Xf(this.maxWidth),maxHeight:Rn(this.maxHeight)?1/0:Xf(this.maxHeight)});if(t=(function(r){var A=r.areaRestrictions,i=r.sizeRestrictions,o=r.boundaries,a=r.positionRestrictions,l=Xe(Xe({},i),{minWidth:i.minWidth!==void 0?i.minWidth:0,minHeight:i.minHeight!==void 0?i.minHeight:0,maxWidth:i.maxWidth!==void 0?i.maxWidth:1/0,maxHeight:i.maxHeight!==void 0?i.maxHeight:1/0});a.left!==void 0&&a.right!==void 0&&(l.maxWidth=Math.min(l.maxWidth,a.right-a.left)),a.bottom!==void 0&&a.top!==void 0&&(l.maxHeight=Math.min(l.maxHeight,a.bottom-a.top));var u=Gv(A),d=gx(o,u);return u.width<1/0&&(!l.maxWidth||l.maxWidth>d.width)&&(l.maxWidth=Math.min(l.maxWidth,d.width)),u.height<1/0&&(!l.maxHeight||l.maxHeight>d.height)&&(l.maxHeight=Math.min(l.maxHeight,d.height)),l.minWidth>l.maxWidth&&(l.minWidth=l.maxWidth,l.widthFrozen=!0),l.minHeight>l.maxHeight&&(l.minHeight=l.maxHeight,l.heightFrozen=!0),l})({sizeRestrictions:t,areaRestrictions:this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}),imageSize:this.imageSize,boundaries:this.boundaries,positionRestrictions:this.positionRestrictions,imageRestriction:this.imageRestriction,visibleArea:this.visibleArea,stencilSize:this.getStencilSize()}),this.visibleArea&&this.stencilSize){var e=this.getStencilSize(),n=Gv(this.getAreaRestrictions({visibleArea:this.visibleArea,type:"resize"}));t.maxWidth=Math.min(t.maxWidth,n.width*e.width/this.boundaries.width),t.maxHeight=Math.min(t.maxHeight,n.height*e.height/this.boundaries.height),t.maxWidth<t.minWidth&&(t.minWidth=t.maxWidth),t.maxHeight<t.minHeight&&(t.minHeight=t.maxHeight)}return t}return{minWidth:0,minHeight:0,maxWidth:0,maxHeight:0}},positionRestrictions:function(){return this.positionRestrictionsAlgorithm({imageSize:this.imageSize,imageRestriction:this.imageRestriction})},classes:function(){return{cropper:$i(),image:Qn($i("image"),this.imageClass),stencil:$i("stencil"),boundaries:Qn($i("boundaries"),this.boundariesClass),stretcher:Qn($i("stretcher")),background:Qn($i("background"),this.backgroundClass),foreground:Qn($i("foreground"),this.foregroundClass),imageWrapper:Qn($i("image-wrapper")),cropperWrapper:Qn($i("cropper-wrapper"))}},stencilCoordinates:function(){if(this.initialized){var t=this.coordinates,e=t.width,n=t.height,r=t.left,A=t.top;return{width:e/this.coefficient,height:n/this.coefficient,left:(r-this.visibleArea.left)/this.coefficient,top:(A-this.visibleArea.top)/this.coefficient}}return this.defaultCoordinates()},boundariesStyle:function(){var t={width:this.boundaries.width?"".concat(Math.round(this.boundaries.width),"px"):"auto",height:this.boundaries.height?"".concat(Math.round(this.boundaries.height),"px"):"auto",transition:"opacity ".concat(this.transitionTime,"ms"),pointerEvents:this.imageLoaded?"all":"none"};return this.imageLoaded||(t.opacity="0"),t},imageStyle:function(){var t=this.imageAttributes.width>this.imageAttributes.height?{width:Math.min(1024,this.imageAttributes.width),height:Math.min(1024,this.imageAttributes.width)/(this.imageAttributes.width/this.imageAttributes.height)}:{height:Math.min(1024,this.imageAttributes.height),width:Math.min(1024,this.imageAttributes.height)*(this.imageAttributes.width/this.imageAttributes.height)},e={left:(t.width-this.imageSize.width)/(2*this.coefficient),top:(t.height-this.imageSize.height)/(2*this.coefficient)},n={left:(1-1/this.coefficient)*t.width/2,top:(1-1/this.coefficient)*t.height/2},r=xt(xt({},this.imageTransforms),{},{scaleX:this.imageTransforms.scaleX*(this.imageAttributes.width/t.width),scaleY:this.imageTransforms.scaleY*(this.imageAttributes.height/t.height)}),A={width:"".concat(t.width,"px"),height:"".concat(t.height,"px"),left:"0px",top:"0px",transform:"translate(".concat(-e.left-n.left-this.imageTransforms.translateX,"px, ").concat(-e.top-n.top-this.imageTransforms.translateY,"px)")+kx(r)};return this.transitionsOptions.enabled&&(A.transition="".concat(this.transitionsOptions.time,"ms ").concat(this.transitionsOptions.timingFunction)),A}},watch:{src:function(){this.onChangeImage()},stencilComponent:function(){var t=this;this.$nextTick((function(){t.resetCoordinates(),t.runAutoZoom("setCoordinates"),t.onChange()}))},minWidth:function(){this.onPropsChange()},maxWidth:function(){this.onPropsChange()},minHeight:function(){this.onPropsChange()},maxHeight:function(){this.onPropsChange()},imageRestriction:function(){this.reset()},stencilProps:function(t,e){["aspectRatio","minAspectRatio","maxAspectRatio"].find((function(n){return t[n]!==e[n]}))&&this.$nextTick(this.onPropsChange)}},created:function(){this.debouncedUpdate=Hv(this.update,this.debounce),this.debouncedDisableTransitions=Hv(this.disableTransitions,this.transitionsOptions.time),this.awaiting=!1},mounted:function(){this.$refs.image.addEventListener("load",this.onSuccessLoadImage),this.$refs.image.addEventListener("error",this.onFailLoadImage),this.onChangeImage(),window.addEventListener("resize",this.refresh),window.addEventListener("orientationchange",this.refresh)},unmounted:function(){window.removeEventListener("resize",this.refresh),window.removeEventListener("orientationchange",this.refresh),this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.debouncedUpdate.clear(),this.debouncedDisableTransitions.clear()},methods:{getResult:function(){var t=this.initialized?this.prepareResult(xt({},this.coordinates)):this.defaultCoordinates(),e={rotate:this.imageTransforms.rotate%360,flip:xt({},this.imageTransforms.flip)};if(this.src&&this.imageLoaded){var n=this;return{image:this.image,coordinates:t,visibleArea:this.visibleArea?xt({},this.visibleArea):null,imageTransforms:e,get canvas(){return n.canvas?n.getCanvas():void 0}}}return{image:this.image,coordinates:t,visibleArea:this.visibleArea?xt({},this.visibleArea):null,canvas:void 0,imageTransforms:e}},zoom:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,A=r===void 0||r;this.onManipulateImage(new Sc({},{factor:1/t,center:e}),{normalize:!1,transitions:A})},move:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,A=r===void 0||r;this.onManipulateImage(new Sc({left:t||0,top:e||0}),{normalize:!1,transitions:A})},setCoordinates:function(t){var e=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.autoZoom,A=r===void 0||r,i=n.transitions,o=i===void 0||i;this.$nextTick((function(){e.imageLoaded?(e.transitionsActive||(o&&e.enableTransitions(),e.coordinates=e.applyTransform(t),A&&e.runAutoZoom("setCoordinates"),o&&e.debouncedDisableTransitions()),e.onChange()):e.delayedTransforms=t}))},refresh:function(){var t=this,e=this.$refs.image;if(this.src&&e)return this.initialized?this.updateVisibleArea().then((function(){t.onChange()})):this.resetVisibleArea().then((function(){t.onChange()}))},reset:function(){var t=this;return this.resetVisibleArea().then((function(){t.onChange(!1)}))},awaitRender:function(t){var e=this;this.awaiting||(this.awaiting=!0,this.$nextTick((function(){t(),e.awaiting=!1})))},prepareResult:function(t){return this.roundResult?(function(e){var n=e.coordinates,r=e.sizeRestrictions,A=e.positionRestrictions,i={width:Math.round(n.width),height:Math.round(n.height),left:Math.round(n.left),top:Math.round(n.top)};return i.width>r.maxWidth?i.width=Math.floor(n.width):i.width<r.minWidth&&(i.width=Math.ceil(n.width)),i.height>r.maxHeight?i.height=Math.floor(n.height):i.height<r.minHeight&&(i.height=Math.ceil(n.height)),qn(i,A)})(xt(xt({},this.getPublicProperties()),{},{positionRestrictions:Vf(this.positionRestrictions,this.visibleArea),coordinates:t})):t},processAutoZoom:function(t,e,n,r){var A=this.autoZoomAlgorithm;A||(A=this.stencilSize?SJ:this.autoZoom?xJ:FJ);var i=A({event:{type:t,params:r},visibleArea:e,coordinates:n,boundaries:this.boundaries,aspectRatio:this.getAspectRatio(),positionRestrictions:this.positionRestrictions,getAreaRestrictions:this.getAreaRestrictions,sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize()});return xt(xt({},i),{},{changed:!mx(i.visibleArea,e)||!mx(i.coordinates,n)})},runAutoZoom:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,r=n!==void 0&&n,A=pJ(e,WJ),i=this.processAutoZoom(t,this.visibleArea,this.coordinates,A),o=i.visibleArea,a=i.coordinates,l=i.changed;r&&l&&this.enableTransitions(),this.visibleArea=o,this.coordinates=a,r&&l&&this.debouncedDisableTransitions()},normalizeEvent:function(t){return(function(e){var n=e.event,r=e.visibleArea,A=e.coefficient;if(n.type==="manipulateImage")return Xe(Xe({},n),{move:{left:n.move&&n.move.left?A*n.move.left:0,top:n.move&&n.move.top?A*n.move.top:0},scale:{factor:n.scale&&n.scale.factor?n.scale.factor:1,center:n.scale&&n.scale.center?{left:n.scale.center.left*A+r.left,top:n.scale.center.top*A+r.top}:null}});if(n.type==="resize"){var i=Xe(Xe({},n),{directions:Xe({},n.directions)});return di.forEach((function(a){i.directions[a]*=A})),i}if(n.type==="move"){var o=Xe(Xe({},n),{directions:Xe({},n.directions)});return CJ.forEach((function(a){o.directions[a]*=A})),o}return n})(xt(xt({},this.getPublicProperties()),{},{event:t}))},getCanvas:function(){if(this.$refs.canvas){var t=this.$refs.canvas,e=this.$refs.image,n=this.imageTransforms.rotate!==0||this.imageTransforms.flip.horizontal||this.imageTransforms.flip.vertical?(function(a,l,u){var d=u.rotate,h=u.flip,p={width:l.naturalWidth,height:l.naturalHeight},m=vx(p,d),v=a.getContext("2d");a.height=m.height,a.width=m.width,v.save();var B=Ro(Yn(Xe({left:0,top:0},p)),d);return v.translate(-(B.left-m.width/2),-(B.top-m.height/2)),v.rotate(d*Math.PI/180),v.translate(h.horizontal?p.width:0,h.vertical?p.height:0),v.scale(h.horizontal?-1:1,h.vertical?-1:1),v.drawImage(l,0,0,p.width,p.height),v.restore(),a})(this.$refs.sourceCanvas,e,this.imageTransforms):e,r=xt({minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,maxArea:this.maxCanvasSize,imageSmoothingEnabled:!0,imageSmoothingQuality:"high",fillColor:"transparent"},this.canvas),A=function(a){return a.find((function(l){return u=l,!Number.isNaN(parseFloat(u))&&isFinite(u);var u}))},i=Pi({sizeRestrictions:{minWidth:A([r.width,r.minWidth])||0,minHeight:A([r.height,r.minHeight])||0,maxWidth:A([r.width,r.maxWidth])||1/0,maxHeight:A([r.height,r.maxHeight])||1/0},width:this.coordinates.width,height:this.coordinates.height,aspectRatio:{minimum:this.coordinates.width/this.coordinates.height,maximum:this.coordinates.width/this.coordinates.height}});if(r.maxArea&&i.width*i.height>r.maxArea){var o=Math.sqrt(r.maxArea/(i.width*i.height));i={width:Math.round(o*i.width),height:Math.round(o*i.height)}}return(function(a,l,u,d,h){a.width=d?d.width:u.width,a.height=d?d.height:u.height;var p=a.getContext("2d");p.clearRect(0,0,a.width,a.height),h&&(h.imageSmoothingEnabled&&(p.imageSmoothingEnabled=h.imageSmoothingEnabled),h.imageSmoothingQuality&&(p.imageSmoothingQuality=h.imageSmoothingQuality),h.fillColor&&(p.fillStyle=h.fillColor,p.fillRect(0,0,a.width,a.height),p.save()));var m=u.left<0?-u.left:0,v=u.top<0?-u.top:0;p.drawImage(l,u.left+m,u.top+v,u.width,u.height,m*(a.width/u.width),v*(a.height/u.height),a.width,a.height)})(t,n,this.coordinates,i,r),t}},update:function(){this.$emit("change",this.getResult())},applyTransform:function(t){var e=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.visibleArea&&e?EJ(this.sizeRestrictions,this.visibleArea):this.sizeRestrictions,r=this.visibleArea&&e?Vf(this.positionRestrictions,this.visibleArea):this.positionRestrictions;return kJ({transform:t,coordinates:this.coordinates,imageSize:this.imageSize,sizeRestrictions:n,positionRestrictions:r,aspectRatio:this.getAspectRatio(),visibleArea:this.visibleArea})},resetCoordinates:function(){var t=this;if(this.$refs.image){this.$refs.cropper,this.$refs.image;var e=this.defaultSize;e||(e=this.stencilSize?MJ:TJ);var n=this.sizeRestrictions;n.minWidth,n.minHeight,n.maxWidth,n.maxHeight;var r=Da(e)?e({boundaries:this.boundaries,imageSize:this.imageSize,aspectRatio:this.getAspectRatio(),sizeRestrictions:this.sizeRestrictions,stencilSize:this.getStencilSize(),visibleArea:this.visibleArea}):e,A=this.defaultPosition||QJ,i=[r,function(o){var a=o.coordinates;return xt({},Da(A)?A({coordinates:a,imageSize:t.imageSize,visibleArea:t.visibleArea}):t.defaultPosition)}];this.delayedTransforms&&i.push.apply(i,Is(Array.isArray(this.delayedTransforms)?this.delayedTransforms:[this.delayedTransforms])),this.coordinates=this.applyTransform(i,!0),this.delayedTransforms=null}},clearImage:function(){var t=this;this.imageLoaded=!1,setTimeout((function(){var e=t.$refs.stretcher;e&&(e.style.height="auto",e.style.width="auto"),t.coordinates=t.defaultCoordinates(),t.boundaries={width:0,height:0}}),this.transitionTime)},enableTransitions:function(){this.transitions&&(this.transitionsActive=!0)},disableTransitions:function(){this.transitionsActive=!1},updateBoundaries:function(){var t=this,e=this.$refs.stretcher,n=this.$refs.cropper;return this.initStretcher({cropper:n,stretcher:e,imageSize:this.imageSize}),this.$nextTick().then((function(){var r={cropper:n,imageSize:t.imageSize};if(Da(t.defaultBoundaries)?t.boundaries=t.defaultBoundaries(r):t.defaultBoundaries==="fit"?t.boundaries=(function(A){var i=A.cropper,o=A.imageSize,a=i.clientHeight,l=i.clientWidth,u=a,d=o.width*a/o.height;return d>l&&(d=l,u=o.height*l/o.width),{width:d,height:u}})(r):t.boundaries=(function(A){var i=A.cropper;return{width:i.clientWidth,height:i.clientHeight}})(r),!t.boundaries.width||!t.boundaries.height)throw new Error("It's impossible to fit the cropper in the current container")}))},resetVisibleArea:function(){var t=this;return this.appliedImageTransforms=xt(xt({},this.defaultImageTransforms),{},{flip:xt({},this.defaultImageTransforms.flip)}),this.updateBoundaries().then((function(){t.priority!=="visible-area"&&(t.visibleArea=null,t.resetCoordinates());var e,n,r,A,i,o,a=t.defaultVisibleArea||IJ;t.visibleArea=Da(a)?a({imageSize:t.imageSize,boundaries:t.boundaries,coordinates:t.priority!=="visible-area"?t.coordinates:null,getAreaRestrictions:t.getAreaRestrictions,stencilSize:t.getStencilSize()}):t.defaultVisibleArea,t.visibleArea=(e={visibleArea:t.visibleArea,boundaries:t.boundaries,getAreaRestrictions:t.getAreaRestrictions},n=e.visibleArea,r=e.boundaries,A=e.getAreaRestrictions,i=Xe({},n),o=Ft(r),i.width/i.height!==o&&(i.height=i.width/o),qn(i,A({visibleArea:i,type:"move"}))),t.priority==="visible-area"?t.resetCoordinates():t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("resetVisibleArea")})).catch((function(){t.visibleArea=null}))},updateVisibleArea:function(){var t=this;return this.updateBoundaries().then((function(){t.visibleArea=t.fitVisibleArea({imageSize:t.imageSize,boundaries:t.boundaries,visibleArea:t.visibleArea,coordinates:t.coordinates,getAreaRestrictions:t.getAreaRestrictions}),t.coordinates=t.fitCoordinates({visibleArea:t.visibleArea,coordinates:t.coordinates,aspectRatio:t.getAspectRatio(),positionRestrictions:t.positionRestrictions,sizeRestrictions:t.sizeRestrictions}),t.runAutoZoom("updateVisibleArea")})).catch((function(){t.visibleArea=null}))},onChange:function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];t&&this.debounce?this.debouncedUpdate():this.update()},onChangeImage:function(){var t,e=this;if(this.imageLoaded=!1,this.delayedTransforms=null,this.src){if((function(A){if(lx(A))return!1;var i=window.location,o=/(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(A)||[],a={protocol:o[1]||"",host:o[2]||"",port:o[3]||""},l=function(u){return u.port||((u.protocol||i.protocol)==="http"?80:433)};return!(!a.protocol&&!a.host&&!a.port||a.protocol&&a.protocol==i.protocol&&a.host&&a.host==i.host&&a.host&&l(a)==l(i))})(this.src)){var n=Rn(this.crossOrigin)?this.canvas:this.crossOrigin;n===!0&&(n="anonymous"),this.imageAttributes.crossOrigin=n||null}if(this.checkOrientation){var r=(t=this.src,new Promise((function(A){KJ(t).then((function(i){var o=zJ(i);A(i?{source:t,arrayBuffer:i,orientation:o}:{source:t,arrayBuffer:null,orientation:null})})).catch((function(i){console.warn(i),A({source:t,arrayBuffer:null,orientation:null})}))})));setTimeout((function(){r.then(e.onParseImage)}),this.transitionTime)}else setTimeout((function(){e.onParseImage({source:e.src})}),this.transitionTime)}else this.clearImage()},onFailLoadImage:function(){this.imageAttributes.src&&(this.clearImage(),this.$emit("error"))},onSuccessLoadImage:function(){var t=this,e=this.$refs.image;e&&!this.imageLoaded&&(this.imageAttributes.height=e.naturalHeight,this.imageAttributes.width=e.naturalWidth,this.imageLoaded=!0,this.resetVisibleArea().then((function(){t.$emit("ready"),t.onChange(!1)})))},onParseImage:function(t){var e=this,n=t.source,r=t.arrayBuffer,A=t.orientation;this.imageAttributes.revoke&&this.imageAttributes.src&&URL.revokeObjectURL(this.imageAttributes.src),this.imageAttributes.revoke=!1,r&&A&&A>1?ax(n)||!lx(n)?(this.imageAttributes.src=URL.createObjectURL(new Blob([r])),this.imageAttributes.revoke=!0):this.imageAttributes.src=(function(i){for(var o=[],a=new Uint8Array(i);a.length>0;){var l=a.subarray(0,8192);o.push(String.fromCharCode.apply(null,Array.from?Array.from(l):l.slice())),a=a.subarray(8192)}return"data:image/jpeg;base64,"+btoa(o.join(""))})(r):this.imageAttributes.src=n,Da(this.defaultTransforms)?this.appliedImageTransforms=jv(this.defaultTransforms()):qf(this.defaultTransforms)?this.appliedImageTransforms=jv(this.defaultTransforms):this.appliedImageTransforms=(function(i){var o=jv({});if(i)switch(i){case 2:o.flip.horizontal=!0;break;case 3:o.rotate=-180;break;case 4:o.flip.vertical=!0;break;case 5:o.rotate=90,o.flip.vertical=!0;break;case 6:o.rotate=90;break;case 7:o.rotate=90,o.flip.horizontal=!0;break;case 8:o.rotate=-90}return o})(A),this.defaultImageTransforms=xt(xt({},this.appliedImageTransforms),{},{flip:xt({},this.appliedImageTransforms.flip)}),this.$nextTick((function(){var i=e.$refs.image;i&&i.complete&&((function(o){return!!o.naturalWidth})(i)?e.onSuccessLoadImage():e.onFailLoadImage())}))},onResizeEnd:function(){this.runAutoZoom("resize",{transitions:!0})},onMoveEnd:function(){this.runAutoZoom("move",{transitions:!0})},onMove:function(t){var e=this;this.transitionsOptions.enabled||this.awaitRender((function(){e.coordinates=e.moveAlgorithm(xt(xt({},e.getPublicProperties()),{},{positionRestrictions:Vf(e.positionRestrictions,e.visibleArea),coordinates:e.coordinates,event:e.normalizeEvent(t)})),e.onChange()}))},onResize:function(t){var e=this;this.transitionsOptions.enabled||this.stencilSize&&!this.autoZoom||this.awaitRender((function(){var n=e.sizeRestrictions,r=Math.min(e.coordinates.width,e.coordinates.height,20*e.coefficient);e.coordinates=e.resizeAlgorithm(xt(xt({},e.getPublicProperties()),{},{positionRestrictions:Vf(e.positionRestrictions,e.visibleArea),sizeRestrictions:{maxWidth:Math.min(n.maxWidth,e.visibleArea.width),maxHeight:Math.min(n.maxHeight,e.visibleArea.height),minWidth:Math.max(n.minWidth,r),minHeight:Math.max(n.minHeight,r)},event:e.normalizeEvent(t)})),e.onChange(),e.ticking=!1}))},onManipulateImage:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.transitionsOptions.enabled){var n=e.transitions,r=n!==void 0&&n,A=e.normalize,i=A===void 0||A;r&&this.enableTransitions();var o=UJ(xt(xt({},this.getPublicProperties()),{},{event:i?this.normalizeEvent(t):t,getAreaRestrictions:this.getAreaRestrictions,imageRestriction:this.imageRestriction,adjustStencil:!this.stencilSize&&this.settings.resizeImage.adjustStencil})),a=o.visibleArea,l=o.coordinates;this.visibleArea=a,this.coordinates=l,this.runAutoZoom("manipulateImage"),this.onChange(),r&&this.debouncedDisableTransitions()}},onPropsChange:function(){this.coordinates=this.applyTransform(this.coordinates,!0),this.onChange(!1)},getAreaRestrictions:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.visibleArea,n=t.type,r=n===void 0?"move":n;return this.areaRestrictionsAlgorithm({boundaries:this.boundaries,imageSize:this.imageSize,imageRestriction:this.imageRestriction,visibleArea:e,type:r})},getAspectRatio:function(t){var e,n,r=this.stencilProps,A=r.aspectRatio,i=r.minAspectRatio,o=r.maxAspectRatio;if(this.$refs.stencil&&this.$refs.stencil.aspectRatios){var a=this.$refs.stencil.aspectRatios();e=a.minimum,n=a.maximum}if(Rn(e)&&(e=Rn(A)?i:A),Rn(n)&&(n=Rn(A)?o:A),!t&&(Rn(e)||Rn(n))){var l=this.getStencilSize(),u=l?Ft(l):null;Rn(e)&&(e=cx(u)?u:void 0),Rn(n)&&(n=cx(u)?u:void 0)}return{minimum:e,maximum:n}},getStencilSize:function(){if(this.stencilSize)return t={currentStencilSize:{width:this.stencilCoordinates.width,height:this.stencilCoordinates.height},stencilSize:this.stencilSize,boundaries:this.boundaries,coefficient:this.coefficient,coordinates:this.coordinates,aspectRatio:this.getAspectRatio(!0)},e=t.boundaries,n=t.stencilSize,r=t.aspectRatio,Wv(Ft(A=Da(n)?n({boundaries:e,aspectRatio:r}):n),r)&&(A=Pi({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:A.width,height:A.height,aspectRatio:{minimum:r.minimum,maximum:r.maximum}})),(A.width>e.width||A.height>e.height)&&(A=Pi({sizeRestrictions:{maxWidth:e.width,maxHeight:e.height,minWidth:0,minHeight:0},width:A.width,height:A.height,aspectRatio:{minimum:Ft(A),maximum:Ft(A)}})),A;var t,e,n,r,A},getPublicProperties:function(){return{coefficient:this.coefficient,visibleArea:this.visibleArea,coordinates:this.coordinates,boundaries:this.boundaries,sizeRestrictions:this.sizeRestrictions,positionRestrictions:this.positionRestrictions,aspectRatio:this.getAspectRatio(),imageRestriction:this.imageRestriction}},defaultCoordinates:function(){return xt({},px)},flip:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.transitions,A=r===void 0||r;if(!this.transitionsActive){A&&this.enableTransitions();var i=xt({},this.imageTransforms.flip),o=DJ({flip:{horizontal:t?!i.horizontal:i.horizontal,vertical:e?!i.vertical:i.vertical},previousFlip:i,rotate:this.imageTransforms.rotate,visibleArea:this.visibleArea,coordinates:this.coordinates,imageSize:this.imageSize,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),a=o.visibleArea,l=o.coordinates;t&&(this.appliedImageTransforms.flip.horizontal=!this.appliedImageTransforms.flip.horizontal),e&&(this.appliedImageTransforms.flip.vertical=!this.appliedImageTransforms.flip.vertical),this.visibleArea=a,this.coordinates=l,this.onChange(),A&&this.debouncedDisableTransitions()}},rotate:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.transitions,r=n===void 0||n;if(!this.transitionsActive){r&&this.enableTransitions();var A=xt({},this.imageSize);this.appliedImageTransforms.rotate+=t;var i=_J({visibleArea:this.visibleArea,coordinates:this.coordinates,previousImageSize:A,imageSize:this.imageSize,angle:t,positionRestrictions:this.positionRestrictions,sizeRestrictions:this.sizeRestrictions,getAreaRestrictions:this.getAreaRestrictions,aspectRatio:this.getAspectRatio()}),o=i.visibleArea,a=i.coordinates,l=this.processAutoZoom("rotateImage",o,a);o=l.visibleArea,a=l.coordinates,this.visibleArea=o,this.coordinates=a,this.onChange(),r&&this.debouncedDisableTransitions()}}},emits:["change","error","ready"]},GJ={key:0,ref:"canvas",style:{display:"none"}},YJ={key:1,ref:"sourceCanvas",style:{display:"none"}};Mx.render=function(t,e,n,r,A,i){return s.openBlock(),s.createBlock("div",{ref:"cropper",class:i.classes.cropper},[s.createVNode("div",{ref:"stretcher",class:i.classes.stretcher},null,2),s.createVNode("div",{class:i.classes.boundaries,style:i.boundariesStyle},[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.backgroundWrapperComponent),{class:i.classes.cropperWrapper,"wheel-resize":i.settings.resizeImage.wheel,"touch-resize":i.settings.resizeImage.touch,"touch-move":i.settings.moveImage.touch,"mouse-move":i.settings.moveImage.mouse,onMove:i.onManipulateImage,onResize:i.onManipulateImage},{default:s.withCtx((function(){return[s.createVNode("div",{class:i.classes.background,style:i.boundariesStyle},null,6),s.createVNode("div",{class:i.classes.imageWrapper},[s.createVNode("img",{ref:"image",crossorigin:A.imageAttributes.crossOrigin,src:A.imageAttributes.src,class:i.classes.image,style:i.imageStyle,onMousedown:e[1]||(e[1]=s.withModifiers((function(){}),["prevent"]))},null,46,["crossorigin","src"])],2),s.createVNode("div",{class:i.classes.foreground,style:i.boundariesStyle},null,6),s.withDirectives((s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.stencilComponent),s.mergeProps({ref:"stencil",image:i.image,coordinates:A.coordinates,"stencil-coordinates":i.stencilCoordinates,transitions:i.transitionsOptions},n.stencilProps,{onResize:i.onResize,onResizeEnd:i.onResizeEnd,onMove:i.onMove,onMoveEnd:i.onMoveEnd}),null,16,["image","coordinates","stencil-coordinates","transitions","onResize","onResizeEnd","onMove","onMoveEnd"])),[[s.vShow,A.imageLoaded]]),n.canvas?(s.openBlock(),s.createBlock("canvas",GJ,null,512)):s.createCommentVNode("",!0),n.canvas?(s.openBlock(),s.createBlock("canvas",YJ,null,512)):s.createCommentVNode("",!0)]})),_:1},8,["class","wheel-resize","touch-resize","touch-move","mouse-move","onMove","onResize"]))],6)],2)};const qJ={key:0,class:"image-crop"},XJ={class:"row mb-4"},JJ={class:"col"},jJ={class:"row"},ZJ={class:"col d-flex gap-2 justify-content-end gap-2"},Ix=s.defineComponent({__name:"image-crop",props:{modelValue:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},spinner:{type:Boolean,default:!1},ready:{type:Boolean,default:!1},aspectRatioOptions:{type:Array,default:()=>[{value:0,text:"Free"},{value:1,text:"1:1"},{value:4/3,text:"4:3"},{value:16/9,text:"16:9"},{value:3/4,text:"3:4"},{value:9/16,text:"9:16"}]},suggestedAspectRatio:Number},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.useTemplateRef("cropper"),i=s.ref(0);function o(){const{canvas:a}=A.value?.getResult(),l=a.toDataURL();r("update:modelValue",l)}return s.onBeforeMount(()=>{i.value=n.suggestedAspectRatio||0}),(a,l)=>{const u=s.resolveComponent("input-dropdown");return t.modelValue?(s.openBlock(),s.createElementBlock("div",qJ,[s.createElementVNode("div",XJ,[s.createElementVNode("div",JJ,[s.createVNode(s.unref(Mx),{ref:"cropper",class:"cropper",src:t.modelValue,"stencil-props":{...i.value!==0?{aspectRatio:i.value}:{}},"resize-image":!1},null,8,["src","stencil-props"])])]),l[1]||(l[1]=s.createElementVNode("hr",null,null,-1)),s.createElementVNode("div",jJ,[s.createElementVNode("div",ZJ,[s.createVNode(u,{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=d=>i.value=d),options:t.aspectRatioOptions,class:"mb-0"},null,8,["modelValue","options"]),s.renderSlot(a.$slots,"actions"),s.createElementVNode("button",{class:"btn btn-sm btn-primary",onClick:s.withModifiers(o,["prevent","stop"])},s.toDisplayString(a.$t("common.apply")),1)])])])):s.createCommentVNode("",!0)}}}),VJ={key:0,class:"image-editor position-relative"},ej={class:"row mb-3"},tj={class:"col"},nj={class:"row gap-2 mb-4"},rj={class:"col-12"},Aj={class:"input mb-2"},ij={class:"col"},oj={class:"input mb-0"},sj={class:"col"},aj={class:"input mb-0"},lj={class:"row"},cj={class:"col d-flex justify-content-end gap-2"},uj=["disabled"],Ux=s.defineComponent({__name:"image-resize",props:{modelValue:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},spinner:{type:Boolean,default:!1},ready:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,r=s.useTemplateRef("image"),A=s.ref(1),i=s.ref(0),o=s.ref(0),a=s.ref(null),l=s.ref(0),u=s.ref(0);function d(){a.value&&(n("update:modelValue",a.value),A.value=1)}const h=()=>{if(!l.value||!u.value)return;i.value=Math.round(l.value*A.value);const m=u.value/l.value;o.value=Math.round(i.value*m);const v=r.value?.$el;if(!v)return;const B=v.querySelector("img");B&&(a.value=SB(B,i.value,o.value,"image/png"))},p=_g.debounce(h,300);return s.watch(A,()=>{l.value&&(i.value=Math.round(l.value*A.value),p())}),s.watch(i,()=>{if(!l.value||i.value===0)return;const m=i.value/l.value;Math.abs(m-A.value)>1e-4&&(A.value=Number(m.toFixed(4)));const v=u.value/l.value;o.value=Math.round(i.value*v),p()}),s.watch(o,()=>{if(!u.value||o.value===0)return;const m=o.value/u.value;Math.abs(m-A.value)>1e-4&&(A.value=Number(m.toFixed(4)));const v=l.value/u.value;i.value=Math.round(o.value*v),p()}),s.onMounted(()=>{const m=r.value?.$el;if(!m)return;const v=m.querySelector("img");if(!v)return;const B=()=>{l.value=v.naturalWidth,u.value=v.naturalHeight,h()};v.complete?B():v.addEventListener("load",B)}),(m,v)=>{const B=s.resolveComponent("base-image"),y=s.resolveComponent("base-input");return t.modelValue?(s.openBlock(),s.createElementBlock("div",VJ,[s.createElementVNode("div",ej,[s.createElementVNode("div",tj,[s.createVNode(B,{ref_key:"image",ref:r,class:"d-none",src:t.modelValue,animate:!1},null,8,["src"]),a.value?(s.openBlock(),s.createBlock(B,{key:0,ref:"targetImage",class:"",src:a.value,animate:!1},null,8,["src"])):s.createCommentVNode("",!0)])]),s.createElementVNode("div",nj,[s.createElementVNode("div",rj,[s.createElementVNode("div",Aj,[s.withDirectives(s.createElementVNode("input",{type:"range",class:"form-range",id:"scaleRange","onUpdate:modelValue":v[0]||(v[0]=w=>A.value=w),min:"0",max:"2",step:"0.0001"},null,512),[[s.vModelText,A.value]])])]),s.createElementVNode("div",ij,[s.createElementVNode("div",oj,[s.createVNode(y,{type:"number",class:"form-input mb-0",id:"targetWidth",modelValue:i.value,"onUpdate:modelValue":v[1]||(v[1]=w=>i.value=w)},null,8,["modelValue"])])]),v[3]||(v[3]=s.createElementVNode("div",{class:"col-auto d-flex align-items-center"},[s.createElementVNode("output",null,"×")],-1)),s.createElementVNode("div",sj,[s.createElementVNode("div",aj,[s.createVNode(y,{type:"number",class:"form-input mb-0",id:"targetHeight",modelValue:o.value,"onUpdate:modelValue":v[2]||(v[2]=w=>o.value=w)},null,8,["modelValue"])])])]),s.createElementVNode("div",lj,[s.createElementVNode("div",cj,[s.renderSlot(m.$slots,"actions"),s.createElementVNode("button",{class:"btn btn-sm btn-primary",disabled:!a.value,onClick:s.withModifiers(d,["prevent","stop"])},s.toDisplayString(m.$t("common.apply")),9,uj)])])])):s.createCommentVNode("",!0)}}}),dj={key:0,class:"image-crop-resize position-relative"},fj={class:"row"},hj={class:"col"},pj={key:3,class:"alert alert-warning mt-4 small p-2"},mj={key:4},gj={class:"row"},vj={class:"col-12"},wj={class:"d-flex"},Bj={key:0,class:"d-flex gap-3"},yj={class:"caption"},Cj={class:"caption"},bj={key:1,class:"ms-auto"},_x=s.defineComponent({__name:"image-crop-resize",props:{modelValue:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},spinner:{type:Boolean,default:!1},ready:{type:Boolean,default:!1},aspectRatio:Number},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,A=s.ref(!1),i=s.ref(!1),o=s.computed({get:()=>n.modelValue,set:l=>r("update:modelValue",l)}),a=s.computed(()=>n.modelValue.startsWith("data:image/svg+xml"));return s.watch(()=>[A.value,o.value],(l,u)=>{l[0]&&l[0]===u[0]&&(A.value=!1)}),s.watch(()=>[i.value,o.value],(l,u)=>{l[0]&&l[0]===u[0]&&(i.value=!1)}),s.onMounted(()=>{}),(l,u)=>{const d=s.resolveComponent("base-image"),h=s.resolveComponent("svg-icon");return t.modelValue?(s.openBlock(),s.createElementBlock("div",dj,[s.createElementVNode("div",fj,[s.createElementVNode("div",hj,[A.value||i.value?A.value?(s.openBlock(),s.createBlock(Ux,{key:1,modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=p=>o.value=p)},{actions:s.withCtx(()=>[s.createElementVNode("button",{class:"btn btn-outline-ccontrast",onClick:u[0]||(u[0]=s.withModifiers(p=>A.value=!1,["prevent","stop"]))},s.toDisplayString(l.$t("common.cancel")),1)]),_:1},8,["modelValue"])):i.value?(s.openBlock(),s.createBlock(Ix,{key:2,modelValue:o.value,"onUpdate:modelValue":u[3]||(u[3]=p=>o.value=p),"suggested-aspect-ratio":t.aspectRatio},{actions:s.withCtx(()=>[s.createElementVNode("button",{class:"btn btn-sm btn-outline-ccontrast",onClick:u[2]||(u[2]=s.withModifiers(p=>i.value=!1,["prevent","stop"]))},s.toDisplayString(l.$t("common.cancel")),1)]),_:1},8,["modelValue","suggested-aspect-ratio"])):s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(d,{key:0,ref:"targetImage",class:"",animate:!1,src:t.modelValue},null,8,["src"])),a.value?(s.openBlock(),s.createElementBlock("div",pj,s.toDisplayString(l.$t("common.svgWarning")),1)):s.createCommentVNode("",!0),!i.value&&!A.value?(s.openBlock(),s.createElementBlock("hr",mj)):s.createCommentVNode("",!0),s.createElementVNode("div",gj,[s.createElementVNode("div",vj,[s.createElementVNode("div",wj,[!i.value&&!A.value?(s.openBlock(),s.createElementBlock("div",Bj,[s.createElementVNode("button",{type:"button",class:"btn btn-light",onClick:u[4]||(u[4]=s.withModifiers(p=>i.value=!i.value,["prevent","stop"]))},[s.createVNode(h,{symbol:"crop"}),s.createElementVNode("span",yj,s.toDisplayString(l.$t("common.crop")),1)]),s.createElementVNode("button",{type:"button",class:"btn btn-light",onClick:u[5]||(u[5]=s.withModifiers(p=>A.value=!A.value,["prevent","stop"]))},[s.createVNode(h,{symbol:"image-upscale"}),s.createElementVNode("span",Cj,s.toDisplayString(l.$t("common.resize")),1)])])):s.createCommentVNode("",!0),!i.value&&!A.value?(s.openBlock(),s.createElementBlock("div",bj,[s.renderSlot(l.$slots,"submit")])):s.createCommentVNode("",!0)])])])])])])):s.createCommentVNode("",!0)}}}),Ej={class:"image-upload__controls"},kj={class:"d-flex gap-1 align-items-center"},Sj={key:1,class:"image-upload__controls"},xj=["for"],Fj=["innerHTML"],Qj={key:0,class:"image-upload__loading-spinner"},Tj=s.defineComponent({__name:"image-upload",props:{modelValue:{type:Object,default:void 0},src:{type:String},name:{type:String,default:()=>gt()},id:{type:String,default:()=>gt()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},accept:{type:String,default:"image/*"},maxFileSize:{type:Number,default:0},endpoint:{type:String,default:""},toDataUrl:{type:Boolean,default:!0},authToken:{type:String,default:""},customFetch:null,baseResponsePath:{type:String,default:"/api/v1/assets"},enablePreview:{type:Boolean,default:!0},previewWidth:{type:Number,default:0},dropFiles:{type:Boolean,default:!1},enableReview:{type:Boolean,default:!0},maxImageWidth:{type:Number,default:4096},aspectRatio:Number},emits:["update:modelValue","update:src"],setup(t,{emit:e}){const n=t,r=e,A=s.ref(!1),i=s.ref(null),o=s.ref(null),a=s.ref(null),{pending:l,files:u,imgLoaded:d,isDragging:h,uploadFile:p,setupDragAndDrop:m,cleanupDragAndDrop:v}=jE(n,r),B=s.computed(()=>n.modelValue?n.modelValue:n.src?{type:"",src:n.src}:i.value);function y(){i.value=null,u.value=[],d.value=!1,r("update:modelValue",void 0),r("update:src","")}function w(){y()}s.watch(()=>u.value,async F=>{if(!F||!F.length||!F[0])return;d.value=!1;const U=await zT(F[0],n.maxImageWidth);n.enableReview?(o.value={src:await Xc(U),type:U.type},A.value=!0):i.value={src:n.toDataUrl?await Xc(U):await p(U),type:U.type}}),s.watch(()=>i.value,F=>{r("update:modelValue",F||void 0),r("update:src",F?.src||"")}),s.watch(()=>a.value,async F=>{F&&(i.value={src:await p(F),type:F.type},a.value=null)}),s.watch(()=>A.value,(F,U)=>{!F&&U&&o.value&&(o.value=null,w())}),s.watch(()=>n.src,F=>{!F&&i.value&&w()});function C(F,U){o.value={src:F,type:U},A.value=!0}async function k(){o.value&&(a.value=await kB(o.value.src,"file",o.value.type)),o.value=null,A.value=!1}return s.onMounted(()=>{m()}),s.onBeforeUnmount(()=>{v()}),(F,U)=>{const D=s.resolveComponent("base-image"),M=s.resolveComponent("svg-icon"),K=s.resolveComponent("input-file"),q=s.resolveComponent("modal-dialog");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["image-upload",{"has-dragging":t.dropFiles,"is-dragging":s.unref(h)}])},[!A.value&&B.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["mb-2",t.enablePreview?"image-upload__thumbnail":"image-upload__reset"])},[t.enablePreview?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(D,{src:`${B.value.src}${t.previewWidth?`?width=${t.previewWidth}`:""}`,class:"img-thumbnail rounded",ready:s.unref(d),"onUpdate:ready":U[0]||(U[0]=ce=>s.isRef(d)?d.value=ce:null),animate:!1,style:s.normalizeStyle({maxWidth:t.previewWidth?`${t.previewWidth}px`:"auto",height:"auto"})},null,8,["src","ready","style"]),s.createElementVNode("div",Ej,[s.createElementVNode("div",kj,[s.createElementVNode("button",{type:"button",onClick:U[1]||(U[1]=s.withModifiers(ce=>C(B.value.src,B.value.type),["prevent","stop"])),class:"btn btn--edit btn-sm btn-light"},[s.createVNode(M,{symbol:"edit-2"})]),s.createElementVNode("button",{type:"button",onClick:U[2]||(U[2]=s.withModifiers(ce=>y(),["prevent","stop"])),class:"btn btn--close btn-sm btn-light"},[s.createVNode(M,{symbol:"x"})])])])],64)):(s.openBlock(),s.createElementBlock("div",Sj,[s.createElementVNode("button",{onClick:U[3]||(U[3]=s.withModifiers(ce=>y(),["prevent","stop"])),class:"btn btn--close btn-outline-contrast"},[s.createVNode(M,{symbol:"x"})])]))],2)):s.createCommentVNode("",!0),s.createVNode(K,{modelValue:s.unref(u),"onUpdate:modelValue":U[4]||(U[4]=ce=>s.isRef(u)?u.value=ce:null),id:t.id,name:t.name,accept:t.accept,"max-file-size":t.maxFileSize,class:"d-none"},null,8,["modelValue","id","name","accept","max-file-size"]),t.src?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("label",{key:1,for:t.id,class:"image-upload__label"},[s.renderSlot(F.$slots,"button",{},()=>[s.createElementVNode("span",{class:"btn btn-outline-contrast",innerHTML:t.label||F.$t("common.selectFile")},null,8,Fj)]),s.createVNode(s.Transition,{name:"fade"},{default:s.withCtx(()=>[s.unref(l)?(s.openBlock(),s.createElementBlock("span",Qj,[...U[7]||(U[7]=[s.createElementVNode("span",{class:"spinner-border",role:"status"},[s.createElementVNode("span",{class:"visually-hidden"},"Loading...")],-1)])])):s.createCommentVNode("",!0)]),_:1})],8,xj)),s.createVNode(q,{modelValue:A.value,"onUpdate:modelValue":U[6]||(U[6]=ce=>A.value=ce),footer:!1},{default:s.withCtx(()=>[A.value&&o.value?(s.openBlock(),s.createBlock(_x,{key:0,modelValue:o.value.src,"onUpdate:modelValue":U[5]||(U[5]=ce=>o.value.src=ce),"aspect-ratio":t.aspectRatio},{submit:s.withCtx(()=>[s.createElementVNode("button",{class:"btn btn-primary",onClick:s.withModifiers(k,["prevent","stop"])},s.toDisplayString(F.$t("common.save")),1)]),_:1},8,["modelValue","aspect-ratio"])):s.createCommentVNode("",!0)]),_:1},8,["modelValue"])],2)}}});Ge.Accordion=nM,Ge.AccordionItem=jT,Ge.AssetUploader=s8,Ge.AutoSuggest=S5,Ge.BaseButton=AM,Ge.BaseCamera=q5,Ge.BaseCarousel=VE,Ge.BaseForm=jX,Ge.BaseHeadline=gT,Ge.BaseImage=pT,Ge.BaseInput=lM,Ge.BaseParagraph=HT,Ge.CanvasConfetti=hJ,Ge.CheckGroup=yR,Ge.ColorPalette=a5,Ge.CustomHtml=RR,Ge.DomRenderer=pX,Ge.FileUpload=JW,Ge.HintSystem=F8,Ge.ImageCrop=Ix,Ge.ImageCropResize=_x,Ge.ImageResize=Ux,Ge.ImageUpload=Tj,Ge.InputCheckbox=gM,Ge.InputColor=i5,Ge.InputDatepicker=dR,Ge.InputDatetime=yM,Ge.InputDropdown=y5,Ge.InputFile=OR,Ge.InputPasscode=pR,Ge.InputPassword=gR,Ge.InputTextarea=fM,Ge.LinkSharing=XX,Ge.LoadingSpinner=fT,Ge.MediaThumbnails=f8,Ge.ModalDialog=rJ,Ge.PopoverDialog=Lg,Ge.PopoverNotifications=K8,Ge.PopoverTooltip=L8,Ge.ProgressSteps=C8,Ge.QrCode=yX,Ge.RadioButtons=FR,Ge.RadioGroup=xu,Ge.RteEditor=t5,Ge.SelectMedia=$R,Ge.SortableList=lJ,Ge.SvgIcon=uT,Ge.TouchWrapper=dJ,Ge.UploadGroup=ZE,Ge.useCameraFilter=KE,Object.defineProperty(Ge,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(C,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("dompurify"),require("vue-i18n"),require("lodash"),require("ofetch"),require("vue-advanced-cropper"),require("html2canvas"),require("qr-code-styling")):typeof define=="function"&&define.amd?define(["exports","vue","dompurify","vue-i18n","lodash","ofetch","vue-advanced-cropper","html2canvas","qr-code-styling"],e):(C=typeof globalThis<"u"?globalThis:C||self,e(C.AblokComponents={},C.Vue,C.DOMPurify,C.VueI18n,C._,C.ofetch,C.VueAdvancedCropper,C.html2canvas,C.QRCodeStyling))})(this,(function(C,e,Te,Ne,Me,pe,ut,mt,xe){"use strict";const ft={class:"icon",preserveAspectRatio:"xMaxYMin"},pt=["xlink:href"],M=e.defineComponent({__name:"svg-icon",props:{basePath:{type:String,default:"/symbol-defs.svg"},prefix:{type:String,default:"icon-"},symbol:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(d,l)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(e.openBlock(),e.createElementBlock("svg",ft,[e.createElementVNode("use",{"xlink:href":`${t.basePath}#${t.prefix}${t.symbol}`,"xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0",y:"0"},null,8,pt)]))],2))}}),gt={class:"loading-spinner d-block"},ge=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(d,l)=>(e.openBlock(),e.createElementBlock("span",gt,[l[0]||(l[0]=e.createElementVNode("span",{class:"loading-spinner__animation"},[e.createElementVNode("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 100 100"},[e.createElementVNode("path",{d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})])])],-1)),e.renderSlot(d.$slots,"default")]))}}),ht=["src","alt"],oe=e.defineComponent({__name:"base-image",props:{src:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},alt:{type:String,default:""},spinner:{type:Boolean,default:!1},zoom:{type:Boolean,default:!1},animate:{type:Boolean,default:!0},ready:{type:Boolean,default:!1},pending:{type:Boolean,default:!1},emitPending:{type:Boolean,default:!0}},emits:["update:ready","update:pending"],setup(t,{emit:d}){const l=t,o=d,n=e.useTemplateRef("image"),a=e.ref(!1);function i(){a.value=!0,n.value?.addEventListener("transitionend",r,{once:!0})}function r(){o("update:ready",!0),l.emitPending&&o("update:pending",!1)}return e.onBeforeMount(()=>{l.emitPending&&o("update:pending",!0)}),(s,u)=>t.src?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["base-image",{"base-image--zoom":t.zoom}])},[t.spinner&&!a.value?(e.openBlock(),e.createBlock(ge,{key:0})):e.createCommentVNode("",!0),e.createElementVNode("img",{ref_key:"image",ref:n,class:e.normalizeClass(["",{"opacity-0":t.animate&&!a.value,"opacity-1":!t.animate||a.value}]),src:t.src,alt:t.alt,onLoad:i},null,42,ht)],2)):e.createCommentVNode("",!0)}}),yt=["innerHTML"],bt=e.defineComponent({__name:"base-headline",props:{tag:{},size:{},variant:{},text:{},className:{}},setup(t){const d=t,l=e.computed(()=>d.tag||"p");return(o,n)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{class:e.normalizeClass(["headline",`${t.size} headline--${t.size}${t.className||""}`])},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},()=>[e.createElementVNode("span",{class:"headline__text",innerHTML:t.text},null,8,yt)])]),_:3},8,["class"]))}});function he(t){return e.computed(()=>{const d=typeof t=="function"?t():typeof t=="string"?t:t.value;return Te.sanitize(d,{ALLOWED_TAGS:["b","i","em","strong","u","span","p","br","a","ul","ol","li","h1","h2","h3","h4","h5","h6","article","div","label"],ALLOWED_ATTR:["class","id","href","target","rel","title","data-countdown"],ALLOW_DATA_ATTR:!0})})}function F(t){return Te.sanitize(t,{ALLOWED_TAGS:["b","i","em","strong","u","span","p","br","a","ul","ol","li","h1","h2","h3","h4","h5","h6","article","div","label"],ALLOWED_ATTR:["class","id","href","target","rel","title","data-countdown","v-modal"],ALLOW_DATA_ATTR:!0})}const kt=["innerHTML"],wt=e.defineComponent({__name:"base-paragraph",props:{size:{},variant:{},text:{},className:{}},setup(t){const d=t;return he(()=>d.text||""),(l,o)=>(e.openBlock(),e.createElementBlock("p",{class:e.normalizeClass(["base-paragraph",`${t.size||""} ${t.className||""}`]),innerHTML:t.text},null,10,kt))}});function I(){return Math.random().toString(16).slice(2)}async function ye(t){return await new Promise(d=>{let l=new FileReader;l.onload=()=>d(l.result),l.readAsDataURL(t)})}function Bt(t){const d=atob(t.split(",")[1]),l=new ArrayBuffer(d.length),o=new Uint8Array(l);for(let n=0;n<d.length;n++)o[n]=d.charCodeAt(n);return new Blob([l],{type:"image/png"})}function Ct(t){return{"image/jpeg":"jpg","image/jpg":"jpg","image/png":"png","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","application/pdf":"pdf","video/mp4":"mp4","video/webm":"webm","video/ogg":"ogg"}[t]||"bin"}async function ze(t,d,l){const o=Ct(l),a=d.includes(".")?d:`${d}.${o}`;return fetch(t).then(function(i){return i.arrayBuffer()}).then(function(i){return new File([i],a,{type:l})})}async function Vt(t){return await new Promise((d,l)=>{const o=new Image;o.onload=()=>d(o),o.onerror=n=>l(n),o.src=t})}function Re(t,d,l,o="image/png",n){const a=document.createElement("canvas");a.width=d,a.height=l;const i=a.getContext("2d");return i?(i.drawImage(t,0,0,d,l),a.toDataURL(o,n)):t.src}async function Et(t,d,l){const o=(t.type||"").toLowerCase();if(!(o.startsWith("image/")&&o!=="image/svg+xml"))return t;const a=await ye(t),i=await Vt(a),r=i.naturalWidth,s=i.naturalHeight;if(!r||r<=d)return t;const u=Math.round(d),c=s/r,A=Math.round(u*c),m=Re(i,u,A,t.type||"image/png",l);return await ze(m,t.name,t.type||"image/png")}function Qe(t){return!t||typeof t!="string"?"":t.replace(/\0/g,"").replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/on\w+\s*=\s*["'][^"']*["']/gi,"").replace(/on\w+\s*=\s*[^\s>]*/gi,"").replace(/javascript:/gi,"").replace(/data:text\/html/gi,"")}const $t={class:"accordion-item"},St=["id"],Nt=["data-bs-target","aria-controls"],Mt={class:"flex-grow-1"},Dt=["id","aria-labelledby","data-bs-parent"],vt=["innerHTML"],Lt=e.defineComponent({__name:"accordion-item",props:{id:{type:String,default:()=>I()},modelValue:{type:Boolean,default:!1},title:{type:String,default:"Accordion Title"},body:{type:String,default:"<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nisi aut, nobis inventore repudiandae quo laboriosam. Dicta placeat ullam harum optio expedita. Harum fugiat suscipit sapiente quos, molestias neque eaque omnis?</p>"},parent:{type:String,default:""},noPadding:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=he(()=>l.body);function a(){o("update:modelValue",!l.modelValue)}return(i,r)=>(e.openBlock(),e.createElementBlock("div",$t,[e.createElementVNode("div",{class:"accordion-header",id:`heading-${t.id}`},[e.createElementVNode("button",{class:e.normalizeClass(["accordion-button",!t.modelValue&&"collapsed"]),type:"button","data-bs-toggle":"collapse","data-bs-target":`#target${t.id}`,"aria-expanded":"true","aria-controls":`target${t.id}`,onClick:a},[e.renderSlot(i.$slots,"toggle",{},()=>[e.createElementVNode("span",Mt,e.toDisplayString(t.title),1)])],10,Nt)],8,St),e.createElementVNode("div",{class:e.normalizeClass(["accordion-collapse collapse",t.modelValue&&"show"]),id:`target${t.id}`,"aria-labelledby":`heading${t.id}`,"data-bs-parent":t.parent},[e.createElementVNode("div",{class:e.normalizeClass(["accordion-body",t.noPadding?"p-0":""])},[e.renderSlot(i.$slots,"body",{},()=>[e.createElementVNode("article",{innerHTML:e.unref(n)},null,8,vt)])],2)],10,Dt)]))}}),It=(t,d)=>{const l=t.__vccOpts||t;for(const[o,n]of d)l[o]=n;return l},Pt={},Tt={class:"accordion"};function xt(t,d){return e.openBlock(),e.createElementBlock("div",Tt,[e.renderSlot(t.$slots,"default")])}const zt=It(Pt,[["render",xt]]),Rt=["type","disabled"],Fe=e.defineComponent({__name:"base-button",props:{type:{type:null},caption:{type:String},variant:{type:String},color:{type:String,default:"primary"},size:{type:String},icon:{type:String},disabled:{type:Boolean,default:!1},pending:{type:Boolean,default:!1},success:{type:Boolean,default:!1},error:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},circle:{type:Boolean,default:!1}},setup(t){const d=t,l=e.computed(()=>d.caption&&!d.circle);return(o,n)=>(e.openBlock(),e.createElementBlock("button",{type:t.type,disabled:t.disabled,class:e.normalizeClass(["btn",{disabled:t.disabled,pending:t.pending,rounded:t.rounded,"rounded-circle":t.circle,[`btn-${t.color}`]:!t.outlined,[`btn-outline-${t.color}`]:t.outlined,"btn-lg":t.size==="large","btn-sm":t.size==="small"}])},[t.pending?e.renderSlot(o.$slots,"pending-icon",{key:0},()=>[e.createVNode(ge)]):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},()=>[t.icon?(e.openBlock(),e.createBlock(M,{key:0,symbol:t.icon,class:"base-button__caption"},null,8,["symbol"])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["base-button__caption",{"icon-padding":t.icon}])},e.toDisplayString(t.caption),3)):e.createCommentVNode("",!0)])],10,Rt))}}),Qt={class:"input-group input__input-group"},Ft=["type","id","name","placeholder","pattern","disabled","readonly","required","maxlength","true-value","false-value","aria-label","role","autocomplete"],Ot=["for","innerHTML"],Ht={key:0,class:"input__error alert alert-danger mt-3"},Ae=e.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},min:{type:Number},max:{type:Number},maxlength:{type:Number},pattern:{type:String,default:null},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},role:{type:String,default:"presentation"},autocomplete:{type:String,default:"off"},validate:{type:Boolean,default:!1},valid:{type:Boolean,default:!0},sanitize:{type:Boolean,default:!0}},emits:["update:modelValue","update:valid"],setup(t,{emit:d}){const l=t,o=d,n=e.useTemplateRef("input"),a=e.ref(l.valid),i=e.ref(),r=e.computed(()=>F(`${l.label}${l.required?" *":""}`)),s=e.computed({get(){return l.modelValue},set(A){A=l.type==="number"?l.max&&Number(A)>l.max?l.max:l.min!==void 0&&Number(A)<l.min?l.min:Number(A):A,l.sanitize&&typeof A=="string"&&!["checkbox","radio","number","date","datetime-local","time","month","week","email","tel","url"].includes(l.type)&&(A=Qe(A)),o("update:modelValue",A)}}),u=e.computed(()=>{if(l.type==="number"){const{min:A,max:m}=l;return{...A!==void 0?{min:A}:{},...m!==void 0?{max:m}:{}}}return{}});function c(){l.validate&&n.value&&(a.value=n.value.checkValidity(),a.value?i.value=void 0:i.value=n.value.validationMessage,o("update:valid",a.value))}return e.watch(()=>l.modelValue,()=>{a.value===!1&&c()}),e.onMounted(()=>{let A=m=>{s.value=typeof m.detail=="string"||typeof m.detail=="number"?`${m.detail}`:""};n.value?.addEventListener("focusin",m=>{window.addEventListener("update-focussed-input",A)}),n.value?.addEventListener("focusout",m=>{window.removeEventListener("update-focussed-input",A)}),c()}),(A,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["input",`input--${t.type}${a.value?"":" input--invalid"}`])},[e.createElementVNode("div",Qt,[e.renderSlot(A.$slots,"input-prepend",{slotScope:"props"}),e.withDirectives(e.createElementVNode("input",e.mergeProps({ref_key:"input",ref:n,"onUpdate:modelValue":m[0]||(m[0]=f=>s.value=f),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,readonly:t.readOnly,required:t.required,maxlength:t.maxlength},u.value,{"true-value":t.trueValue,"false-value":t.falseValue,class:["form-control",{"form-check-input":t.type==="checkbox"}],"aria-label":t.label,role:t.role,autocomplete:t.autocomplete,onChange:c}),null,16,Ft),[[e.vModelDynamic,s.value]]),e.renderSlot(A.$slots,"input-append",{slotScope:"props"})]),e.renderSlot(A.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:t.id,class:e.normalizeClass(["input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:r.value},null,10,Ot)):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!a.value&&i.value?(e.openBlock(),e.createElementBlock("div",Ht,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0)]),_:1})],2))}}),Wt={class:"input input--textarea"},Ut=["type","id","name","placeholder","pattern","disabled","read-only","required","maxlength","aria-label"],qt=["for","innerHTML"],jt=e.defineComponent({__name:"input-textarea",props:{modelValue:{type:String,default:""},type:{type:String,default:"text"},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1},sanitize:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.computed({get(){return l.modelValue},set(a){l.sanitize&&typeof a=="string"&&(a=Qe(a)),o("update:modelValue",a)}});return(a,i)=>(e.openBlock(),e.createElementBlock("div",Wt,[e.renderSlot(a.$slots,"input-prepend"),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),type:t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,class:e.normalizeClass(["form-control",{}]),"aria-label":t.label},null,8,Ut),[[e.vModelText,n.value]]),e.renderSlot(a.$slots,"input-append"),e.renderSlot(a.$slots,"label",{},()=>[e.createElementVNode("label",{for:t.id,class:e.normalizeClass(["input__label",{"form-check-label":t.type==="checkbox"}]),innerHTML:`${t.label}${t.required?" *":""}`},null,10,qt)])]))}}),Jt={class:"form-check input input--checkbox"},_t=["value","id","name","required","disabled","true-value","false-value"],Gt=["for","innerHTML"],Yt=e.defineComponent({__name:"input-checkbox",props:{id:{type:String},name:{type:String},label:{type:String},error:{type:String},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},modelValue:{type:[Boolean,Array]},value:{type:[String,Object]},checked:{type:Boolean},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1}},emits:["update:modelValue","update:checked"],setup(t,{emit:d}){const l=t,o=d,n=e.computed({get(){return l.modelValue||l.checked},set(a){o("update:checked",a),o("update:modelValue",a)}});return(a,i)=>(e.openBlock(),e.createElementBlock("div",Jt,[e.withDirectives(e.createElementVNode("input",{ref:"input","onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),value:t.value,id:t.id,name:t.name,type:"checkbox",required:t.required,disabled:t.disabled,class:"form-check-input","true-value":t.trueValue,"false-value":t.falseValue},null,8,_t),[[e.vModelCheckbox,n.value]]),e.createElementVNode("label",{class:"input__label form-check-label",for:t.id,innerHTML:e.unref(F)(t.label||"")},null,8,Gt)]))}}),Kt={class:"input-group input__input-group"},Zt=["id","name","placeholder","pattern","disabled","read-only","required","aria-label"],Xt=["for","innerHTML"],ea=e.defineComponent({__name:"input-datetime",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.computed({get(){const a=l.modelValue&&new Date(`${l.modelValue}Z`),i=a&&new Date(a.getTime()+new Date().getTimezoneOffset()*-60*1e3).toISOString();return i&&i.replace("Z","")},set(a){const i=a&&new Date(a);a=i&&i.toISOString(),o("update:modelValue",a&&a.replace("Z",""))}});return(a,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["input",`input--${t.type}`])},[e.createElementVNode("div",Kt,[e.renderSlot(a.$slots,"input-prepend",{slotScope:"props"}),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),type:"datetime-local",id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,class:"form-control","aria-label":t.label},null,8,Zt),[[e.vModelText,n.value]]),e.renderSlot(a.$slots,"input-append",{slotScope:"props"})]),e.renderSlot(a.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:t.id,class:"input__label",innerHTML:e.unref(F)(`${t.label}${t.required?" *":""}`)},null,8,Xt)):e.createCommentVNode("",!0)])],2))}});function Z(t){return(d={})=>{const l=d.width?String(d.width):t.defaultWidth;return t.formats[l]||t.formats[t.defaultWidth]}}function O(t){return(d,l)=>{const o=l?.context?String(l.context):"standalone";let n;if(o==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,r=l?.width?String(l.width):i;n=t.formattingValues[r]||t.formattingValues[i]}else{const i=t.defaultWidth,r=l?.width?String(l.width):t.defaultWidth;n=t.values[r]||t.values[i]}const a=t.argumentCallback?t.argumentCallback(d):d;return n[a]}}function H(t){return(d,l={})=>{const o=l.width,n=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],a=d.match(n);if(!a)return null;const i=a[0],r=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(r)?aa(r,A=>A.test(i)):ta(r,A=>A.test(i));let u;u=t.valueCallback?t.valueCallback(s):s,u=l.valueCallback?l.valueCallback(u):u;const c=d.slice(i.length);return{value:u,rest:c}}}function ta(t,d){for(const l in t)if(Object.prototype.hasOwnProperty.call(t,l)&&d(t[l]))return l}function aa(t,d){for(let l=0;l<t.length;l++)if(d(t[l]))return l}function De(t){return(d,l={})=>{const o=d.match(t.matchPattern);if(!o)return null;const n=o[0],a=d.match(t.parsePattern);if(!a)return null;let i=t.valueCallback?t.valueCallback(a[0]):a[0];i=l.valueCallback?l.valueCallback(i):i;const r=d.slice(n.length);return{value:i,rest:r}}}const Oe={lessThanXSeconds:{standalone:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als 1 Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"1 Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"1 Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als 1 Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"1 Minute",other:"{{count}} Minuten"},withPreposition:{one:"1 Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa 1 Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"1 Stunde",other:"{{count}} Stunden"},withPreposition:{one:"1 Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"1 Tag",other:"{{count}} Tage"},withPreposition:{one:"1 Tag",other:"{{count}} Tagen"}},aboutXWeeks:{standalone:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"},withPreposition:{one:"etwa 1 Woche",other:"etwa {{count}} Wochen"}},xWeeks:{standalone:{one:"1 Woche",other:"{{count}} Wochen"},withPreposition:{one:"1 Woche",other:"{{count}} Wochen"}},aboutXMonths:{standalone:{one:"etwa 1 Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa 1 Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"1 Monat",other:"{{count}} Monate"},withPreposition:{one:"1 Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa 1 Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"1 Jahr",other:"{{count}} Jahre"},withPreposition:{one:"1 Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als 1 Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast 1 Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast 1 Jahr",other:"fast {{count}} Jahren"}}},na=(t,d,l)=>{let o;const n=l?.addSuffix?Oe[t].withPreposition:Oe[t].standalone;return typeof n=="string"?o=n:d===1?o=n.one:o=n.other.replace("{{count}}",String(d)),l?.addSuffix?l.comparison&&l.comparison>0?"in "+o:"vor "+o:o},la={full:"EEEE, do MMMM y",long:"do MMMM y",medium:"do MMM y",short:"dd.MM.y"},oa={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ia={full:"{{date}} 'um' {{time}}",long:"{{date}} 'um' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},ra={date:Z({formats:la,defaultWidth:"full"}),time:Z({formats:oa,defaultWidth:"full"}),dateTime:Z({formats:ia,defaultWidth:"full"})},Aa={lastWeek:"'letzten' eeee 'um' p",yesterday:"'gestern um' p",today:"'heute um' p",tomorrow:"'morgen um' p",nextWeek:"eeee 'um' p",other:"P"},sa=(t,d,l,o)=>Aa[t],ca={narrow:["v.Chr.","n.Chr."],abbreviated:["v.Chr.","n.Chr."],wide:["vor Christus","nach Christus"]},da={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. Quartal","2. Quartal","3. Quartal","4. Quartal"]},ve={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],wide:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]},ua={narrow:ve.narrow,abbreviated:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sep.","Okt.","Nov.","Dez."],wide:ve.wide},ma={narrow:["S","M","D","M","D","F","S"],short:["So","Mo","Di","Mi","Do","Fr","Sa"],abbreviated:["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],wide:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},fa={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachm.",evening:"Abend",night:"Nacht"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"Morgen",afternoon:"Nachmittag",evening:"Abend",night:"Nacht"}},pa={narrow:{am:"vm.",pm:"nm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachm.",evening:"abends",night:"nachts"},abbreviated:{am:"vorm.",pm:"nachm.",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"},wide:{am:"vormittags",pm:"nachmittags",midnight:"Mitternacht",noon:"Mittag",morning:"morgens",afternoon:"nachmittags",evening:"abends",night:"nachts"}},ga={ordinalNumber:t=>Number(t)+".",era:O({values:ca,defaultWidth:"wide"}),quarter:O({values:da,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ve,formattingValues:ua,defaultWidth:"wide"}),day:O({values:ma,defaultWidth:"wide"}),dayPeriod:O({values:fa,defaultWidth:"wide",formattingValues:pa,defaultFormattingWidth:"wide"})},ha=/^(\d+)(\.)?/i,ya=/\d+/i,ba={narrow:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,abbreviated:/^(v\.? ?Chr\.?|n\.? ?Chr\.?)/i,wide:/^(vor Christus|vor unserer Zeitrechnung|nach Christus|unserer Zeitrechnung)/i},ka={any:[/^v/i,/^n/i]},wa={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? Quartal/i},Ba={any:[/1/i,/2/i,/3/i,/4/i]},Ca={narrow:/^[jfmasond]/i,abbreviated:/^(j[aä]n|feb|mär[z]?|apr|mai|jun[i]?|jul[i]?|aug|sep|okt|nov|dez)\.?/i,wide:/^(januar|februar|märz|april|mai|juni|juli|august|september|oktober|november|dezember)/i},Va={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^j[aä]/i,/^f/i,/^mär/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ea={narrow:/^[smdmf]/i,short:/^(so|mo|di|mi|do|fr|sa)/i,abbreviated:/^(son?|mon?|die?|mit?|don?|fre?|sam?)\.?/i,wide:/^(sonntag|montag|dienstag|mittwoch|donnerstag|freitag|samstag)/i},$a={any:[/^so/i,/^mo/i,/^di/i,/^mi/i,/^do/i,/^f/i,/^sa/i]},Sa={narrow:/^(vm\.?|nm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,abbreviated:/^(vorm\.?|nachm\.?|Mitternacht|Mittag|morgens|nachm\.?|abends|nachts)/i,wide:/^(vormittags|nachmittags|Mitternacht|Mittag|morgens|nachmittags|abends|nachts)/i},Na={any:{am:/^v/i,pm:/^n/i,midnight:/^Mitte/i,noon:/^Mitta/i,morning:/morgens/i,afternoon:/nachmittags/i,evening:/abends/i,night:/nachts/i}},Ma={ordinalNumber:De({matchPattern:ha,parsePattern:ya,valueCallback:t=>parseInt(t)}),era:H({matchPatterns:ba,defaultMatchWidth:"wide",parsePatterns:ka,defaultParseWidth:"any"}),quarter:H({matchPatterns:wa,defaultMatchWidth:"wide",parsePatterns:Ba,defaultParseWidth:"any",valueCallback:t=>t+1}),month:H({matchPatterns:Ca,defaultMatchWidth:"wide",parsePatterns:Va,defaultParseWidth:"any"}),day:H({matchPatterns:Ea,defaultMatchWidth:"wide",parsePatterns:$a,defaultParseWidth:"any"}),dayPeriod:H({matchPatterns:Sa,defaultMatchWidth:"wide",parsePatterns:Na,defaultParseWidth:"any"})},Da={code:"de",formatDistance:na,formatLong:ra,formatRelative:sa,localize:ga,match:Ma,options:{weekStartsOn:1,firstWeekContainsDate:4}},va={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},La=(t,d,l)=>{let o;const n=va[t];return typeof n=="string"?o=n:d===1?o=n.one:o=n.other.replace("{{count}}",d.toString()),l?.addSuffix?l.comparison&&l.comparison>0?"in "+o:o+" ago":o},Ia={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Pa=(t,d,l,o)=>Ia[t],Ta={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xa={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},za={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ra={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Qa={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Fa={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Oa={ordinalNumber:(t,d)=>{const l=Number(t),o=l%100;if(o>20||o<10)switch(o%10){case 1:return l+"st";case 2:return l+"nd";case 3:return l+"rd"}return l+"th"},era:O({values:Ta,defaultWidth:"wide"}),quarter:O({values:xa,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:za,defaultWidth:"wide"}),day:O({values:Ra,defaultWidth:"wide"}),dayPeriod:O({values:Qa,defaultWidth:"wide",formattingValues:Fa,defaultFormattingWidth:"wide"})},Ha=/^(\d+)(th|st|nd|rd)?/i,Wa=/\d+/i,Ua={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},qa={any:[/^b/i,/^(a|c)/i]},ja={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ja={any:[/1/i,/2/i,/3/i,/4/i]},_a={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ga={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ya={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ka={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Za={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Xa={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},en={ordinalNumber:De({matchPattern:Ha,parsePattern:Wa,valueCallback:t=>parseInt(t,10)}),era:H({matchPatterns:Ua,defaultMatchWidth:"wide",parsePatterns:qa,defaultParseWidth:"any"}),quarter:H({matchPatterns:ja,defaultMatchWidth:"wide",parsePatterns:Ja,defaultParseWidth:"any",valueCallback:t=>t+1}),month:H({matchPatterns:_a,defaultMatchWidth:"wide",parsePatterns:Ga,defaultParseWidth:"any"}),day:H({matchPatterns:Ya,defaultMatchWidth:"wide",parsePatterns:Ka,defaultParseWidth:"any"}),dayPeriod:H({matchPatterns:Za,defaultMatchWidth:"any",parsePatterns:Xa,defaultParseWidth:"any"})},tn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},an={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},nn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ln={date:Z({formats:tn,defaultWidth:"full"}),time:Z({formats:an,defaultWidth:"full"}),dateTime:Z({formats:nn,defaultWidth:"full"})},He={code:"en-US",formatDistance:La,formatLong:ln,formatRelative:Pa,localize:Oa,match:en,options:{weekStartsOn:0,firstWeekContainsDate:1}},on={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},rn=(t,d,l)=>{let o;const n=on[t];return typeof n=="string"?o=n:d===1?o=n.one:o=n.other.replace("{{count}}",String(d)),l?.addSuffix?l.comparison&&l.comparison>0?"dans "+o:"il y a "+o:o},An={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},sn={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},cn={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dn={date:Z({formats:An,defaultWidth:"full"}),time:Z({formats:sn,defaultWidth:"full"}),dateTime:Z({formats:cn,defaultWidth:"full"})},un={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},mn=(t,d,l,o)=>un[t],fn={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},pn={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},gn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},hn={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},yn={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},bn=(t,d)=>{const l=Number(t),o=d?.unit;if(l===0)return"0";const n=["year","week","hour","minute","second"];let a;return l===1?a=o&&n.includes(o)?"ère":"er":a="ème",l+a},kn=["MMM","MMMM"],wn={preprocessor:(t,d)=>t.getDate()===1||!d.some(o=>o.isToken&&kn.includes(o.value))?d:d.map(o=>o.isToken&&o.value==="do"?{isToken:!0,value:"d"}:o),ordinalNumber:bn,era:O({values:fn,defaultWidth:"wide"}),quarter:O({values:pn,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:gn,defaultWidth:"wide"}),day:O({values:hn,defaultWidth:"wide"}),dayPeriod:O({values:yn,defaultWidth:"wide"})},Bn=/^(\d+)(ième|ère|ème|er|e)?/i,Cn=/\d+/i,Vn={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},En={any:[/^av/i,/^ap/i]},$n={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},Sn={any:[/1/i,/2/i,/3/i,/4/i]},Nn={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},Mn={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},Dn={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},vn={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},Ln={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},In={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},Pn={ordinalNumber:De({matchPattern:Bn,parsePattern:Cn,valueCallback:t=>parseInt(t)}),era:H({matchPatterns:Vn,defaultMatchWidth:"wide",parsePatterns:En,defaultParseWidth:"any"}),quarter:H({matchPatterns:$n,defaultMatchWidth:"wide",parsePatterns:Sn,defaultParseWidth:"any",valueCallback:t=>t+1}),month:H({matchPatterns:Nn,defaultMatchWidth:"wide",parsePatterns:Mn,defaultParseWidth:"any"}),day:H({matchPatterns:Dn,defaultMatchWidth:"wide",parsePatterns:vn,defaultParseWidth:"any"}),dayPeriod:H({matchPatterns:Ln,defaultMatchWidth:"any",parsePatterns:In,defaultParseWidth:"any"})},Tn={code:"fr",formatDistance:rn,formatLong:dn,formatRelative:mn,localize:wn,match:Pn,options:{weekStartsOn:1,firstWeekContainsDate:4}},xn={class:"row"},zn={class:"col-12"},Rn=["for","innerHTML"],Qn={key:0},Fn={class:"input-group justify-content-center"},On={key:0,class:"row"},Hn={class:"col-12 col-md-6"},Wn={class:"col-12 col-md-6"},Un={key:1,class:"row"},qn={class:"col-12"},jn=e.defineComponent({__name:"input-datepicker",props:{modelValue:{type:null,default:""},from:{type:[String,Number,Boolean,Date],default:""},to:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"datetime-local"},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},range:{type:Boolean,default:!1},textRange:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},textInput:{type:Boolean,default:!0},picker:{type:Boolean,default:!0},locale:{type:String,default:"en"},utcStore:{type:Boolean,default:!1}},emits:["update:modelValue","update:from","update:to"],setup(t,{emit:d}){const l=e.shallowRef(null);e.onMounted(async()=>{const{VueDatePicker:y}=await import("@vuepic/vue-datepicker");l.value=y});const o=t,n=d,{t:a,locale:i}=Ne.useI18n(),r={en:He,de:Da,fr:Tn},s=e.computed(()=>{const y=o.locale||i.value;return r[y]||He}),u=e.computed(()=>o.inline||!o.picker?{openMenu:!1,format:s.value}:!0),c=e.computed({get(){if(o.range){let y=o.from||(Array.isArray(o.modelValue)?o.modelValue[0]:null),g=o.to||(Array.isArray(o.modelValue)?o.modelValue[1]:null);return o.utcStore?(y=y?h(y):null,g=g?h(g):null):(y=y?new Date(`${y}Z`).toISOString().replace("Z",""):null,g=g?new Date(`${g}Z`).toISOString().replace("Z",""):null),[...y?[y]:[],...g?[g]:[]]}else{if(o.utcStore){const w=o.modelValue;return w&&h(w)||""}const y=o.modelValue?new Date(`${o.modelValue}Z`):null,g=y&&y.toISOString();return g&&g.replace("Z","")}},set(y){if(o.range&&Array.isArray(y)){let[g,w]=y;o.utcStore?(g=b(g)||null,w=b(w)||null):(g=g&&new Date(g),g?.setUTCHours(g.getHours()),g=g?.toISOString()?.replace("Z",""),w=w&&new Date(w),w?.setUTCHours(w.getHours()),w=w?.toISOString()?.replace("Z","")),n("update:modelValue",[g,w]),n("update:from",g),n("update:to",w)}else if(o.utcStore){const g=b(y);n("update:modelValue",g)}else{const g=y&&new Date(y);g?.setUTCHours(g?.getHours()),y=g&&g.toISOString(),n("update:modelValue",y&&y.replace("Z",""))}}}),A=e.computed({get(){return Array.isArray(c.value)?c.value[0]:c.value},set(y){c.value=Array.isArray(c.value)?[y,c.value[0]]:y}}),m=e.computed({get(){return Array.isArray(c.value)?c.value[1]:c.value},set(y){c.value=Array.isArray(c.value)?[c.value[0],y]:y}});e.watch(()=>[A.value,m.value],(y,g)=>{o.range&&y.some(w=>w===void 0)&&g.every(Boolean)&&(c.value=[])});function f(y){if(!y)return;const g=y.getDate(),w=y.getMonth()+1,D=y.getFullYear(),B=y.getMinutes(),$=y.getHours();switch(s.value){case"de":return`${g}.${w}.${D} ${$<10?"0"+$:$}:${B<10?"0"+B:B}`;case"fr":return`${g}/${w}/${D} ${$<10?"0"+$:$}:${B<10?"0"+B:B}`;default:return`${w}/${g}/${D} ${$<10?"0"+$:$}:${B<10?"0"+B:B}`}}function h(y){if(!y)return null;const g=y instanceof Date?new Date(y):new Date(`${y}Z`),w=g.getFullYear(),D=String(g.getMonth()+1).padStart(2,"0"),B=String(g.getDate()).padStart(2,"0"),$=String(g.getHours()).padStart(2,"0"),q=String(g.getMinutes()).padStart(2,"0"),X=String(g.getSeconds()).padStart(2,"0");return`${w}-${D}-${B}T${$}:${q}:${X}`}function b(y){return y?(y instanceof Date?new Date(y):new Date(String(y))).toISOString().split(".")[0]:null}const N=y=>(Array.isArray(y)?y=y.map(g=>f(g)).join(" - "):y=f(y),y);return(y,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["input","input--datepicker"])},[e.renderSlot(y.$slots,"label",{},()=>[e.createElementVNode("div",xn,[e.createElementVNode("div",zn,[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:t.id,class:"input__label",innerHTML:e.unref(F)(`${t.label}${t.required?" *":""}`)},null,8,Rn)):e.createCommentVNode("",!0)])])]),t.textInput?(e.openBlock(),e.createElementBlock("div",Qn,[e.createElementVNode("div",Fn,[e.renderSlot(y.$slots,"input-prepend",{slotScope:"props"}),t.range&&!t.textRange?(e.openBlock(),e.createElementBlock("div",On,[e.createElementVNode("div",Hn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{uid:`${t.id}-from`,modelValue:A.value,"onUpdate:modelValue":g[0]||(g[0]=w=>A.value=w),locale:s.value,format:N,"text-input":u.value,disabled:t.disabled,"read-only":t.readOnly,required:t.required,"auto-apply":!0},null,8,["uid","modelValue","locale","text-input","disabled","read-only","required"]))]),e.createElementVNode("div",Wn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{uid:`${t.id}-to`,modelValue:m.value,"onUpdate:modelValue":g[1]||(g[1]=w=>m.value=w),locale:s.value,format:N,"text-input":u.value,disabled:t.disabled,"read-only":t.readOnly,required:t.required,"auto-apply":!0},null,8,["uid","modelValue","locale","text-input","disabled","read-only","required"]))])])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{key:1,uid:`${t.id}-input-to`,modelValue:c.value,"onUpdate:modelValue":g[2]||(g[2]=w=>c.value=w),format:N,locale:s.value,range:t.textRange,"text-input":u.value,disabled:t.disabled,"read-only":t.readOnly,required:t.required,"auto-apply":!0},null,8,["uid","modelValue","locale","range","text-input","disabled","read-only","required"])),e.renderSlot(y.$slots,"input-append",{slotScope:"props"})])])):e.createCommentVNode("",!0),t.inline?(e.openBlock(),e.createElementBlock("div",Un,[e.createElementVNode("div",qn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value),{uid:`${t.id}-inline`,modelValue:c.value,"onUpdate:modelValue":g[3]||(g[3]=w=>c.value=w),locale:s.value,cancelText:"abbrechen",selectText:"auswählen",range:t.range,"multi-calendars":t.range,inline:{input:!1},"auto-apply":!0,"partial-range":t.range,"partial-flow":!0,"start-time":{hours:0,minutes:0},class:"justify-content-center",disabled:t.disabled,"read-only":t.readOnly,required:t.required,"month-name-format":"long"},null,8,["uid","modelValue","locale","range","multi-calendars","partial-range","disabled","read-only","required"]))])])):e.createCommentVNode("",!0)]))}}),Jn={class:"input-group input__input-group"},We=e.defineComponent({__name:"input-password",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},role:{type:String,default:"presentation"},autocomplete:{type:String,default:"off"},password:{type:String,default:""},confirm:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.computed({get(){return l.modelValue},set(a){l.password===a||!l.password?o("update:modelValue",a):o("update:modelValue","")}});return(a,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["input","input-password"])},[e.createElementVNode("div",Jn,[e.createVNode(Ae,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),type:"password",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readOnly,required:t.required,label:t.label},{"input-prepend":e.withCtx(r=>[e.renderSlot(a.$slots,"input-prepend",{slotScope:"props"})]),"input-append":e.withCtx(r=>[e.renderSlot(a.$slots,"input-append",{slotScope:"props"},()=>[t.confirm&&t.modelValue===t.password?(e.openBlock(),e.createBlock(M,{key:0,symbol:"check",class:"ms-2"})):e.createCommentVNode("",!0)])]),_:3},8,["modelValue","placeholder","disabled","readonly","required","label"])])]))}}),_n={class:"input-group input__input-group"},Gn=["onUpdate:modelValue","disabled","readonly","onPaste","onInput","onKeydown"],Yn=e.defineComponent({__name:"input-passcode",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},role:{type:String,default:"presentation"},autocomplete:{type:String,default:"off"},passcodeMatch:{type:String,default:""},confirm:{type:Boolean,default:!1},splitInput:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=e.ref([]),o=e.ref([]),n=t,a=d,i=e.computed({get(){return n.modelValue},set(c){n.passcodeMatch===c||!n.passcodeMatch?a("update:modelValue",c):a("update:modelValue","")}});e.watch(()=>n.modelValue,c=>{const A=c?.toString()||"";for(o.value=A.split("").slice(0,n.passcodeMatch?.length||6);o.value.length<(n.passcodeMatch?.length||6);)o.value.push("")},{immediate:!0}),e.watch(()=>o.value,c=>{const A=c.join("");n.passcodeMatch===A||!n.passcodeMatch?a("update:modelValue",A):a("update:modelValue","")},{deep:!0});const r=(c,A)=>{c.preventDefault();const m=c.clipboardData?.getData("text")||"";console.log("Paste detected:",m);const f=m.split(""),h=n.passcodeMatch?.length||6;f.forEach((N,y)=>{const g=A+y;g<h&&(o.value[g]=N)});const b=Math.min(A+f.length,h-1);setTimeout(()=>l.value[b]?.focus(),0)},s=(c,A)=>{n.passcodeMatch?.length,c.key==="Backspace"&&!o.value[A]&&A>0&&l.value[A-1]?.focus()},u=(c,A)=>{let f=c.target.value;f.length>1&&(f=f.slice(-1)),o.value[A]=f;const h=n.passcodeMatch?.length||6;f&&A<h-1&&setTimeout(()=>l.value[A+1]?.focus(),0)};return(c,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["input","input-passcode"])},[e.createElementVNode("div",_n,[t.splitInput?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.passcodeMatch,(m,f)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:f,"onUpdate:modelValue":h=>o.value[f]=h,type:"text",ref_for:!0,ref:h=>l.value[f]=h,maxlength:1,disabled:t.disabled,readonly:t.readOnly,onPaste:h=>r(h,f),onInput:h=>u(h,f),onKeydown:h=>s(h,f),size:"1",class:"form-control text-center"},null,40,Gn)),[[e.vModelText,o.value[f]]])),128)):(e.openBlock(),e.createBlock(We,{key:0,modelValue:i.value,"onUpdate:modelValue":A[0]||(A[0]=m=>i.value=m),type:t.type,placeholder:t.placeholder,disabled:t.disabled,readonly:t.readOnly,required:t.required,label:t.label},null,8,["modelValue","type","placeholder","disabled","readonly","required","label"]))])]))}}),Kn={class:"check-group"},Zn=["id","name","value","disabled","read-only","required"],Xn=["for","innerHTML"],el=e.defineComponent({__name:"check-group",props:{modelValue:{type:null,default:()=>[]},options:{type:Array,required:!0},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d;e.ref([]);const n=e.computed({get(){return l.modelValue},set(i){o("update:modelValue",i)}}),a=e.computed(()=>l.options&&l.options.map(i=>(i=typeof i=="string"?{text:i,value:i}:i,{...i,active:l.modelValue&&l.modelValue.includes(i.value)})));return(i,r)=>(e.openBlock(),e.createElementBlock("div",Kn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(s,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"form-check"},[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":r[0]||(r[0]=c=>n.value=c),id:`${t.id}-${u}`,name:t.name,class:"form-check-input",value:s.value||s,disabled:t.disabled,"read-only":t.readOnly,required:t.required},null,8,Zn),[[e.vModelCheckbox,n.value]]),e.createElementVNode("label",{class:"form-check-label",for:`${t.id}-${u}`,innerHTML:s.text},null,8,Xn)]))),128))]))}}),tl={class:"input radio-group"},al=["id","name","value","checked","disabled","read-only","required","onChange"],nl=["for","innerHTML"],ll=["for"],be=e.defineComponent({__name:"radio-group",props:{modelValue:{type:null},options:{type:Array,default:[]},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},keyOption:{type:null},itemClass:{type:String,default:""}},emits:["change","update:modelValue"],setup(t,{emit:d}){const l=d;function o(n){l("update:modelValue",n)}return(n,a)=>(e.openBlock(),e.createElementBlock("div",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(i,r)=>(e.openBlock(),e.createElementBlock("div",{key:r,class:e.normalizeClass(["form-check",t.itemClass])},[e.createElementVNode("input",{type:"radio",id:`${t.id}-${r}`,name:t.name,class:e.normalizeClass(["form-check-input",`
|
|
2
|
+
${r===t.keyOption||i.key?"form-check-input--key":""}
|
|
3
|
+
${(r===t.keyOption||i.key)&&i.value===t.modelValue?.value?"form-check-input--match":""}
|
|
4
|
+
`]),value:i.value||i,checked:i.value?i.value===t.modelValue?.value:i===t.modelValue,disabled:t.disabled,"read-only":t.readOnly,required:t.required,onChange:s=>o(i)},null,42,al),e.renderSlot(n.$slots,"option-label",{option:i,index:r},()=>[e.createElementVNode("label",{class:"form-check-label",for:`${t.id}-${r}`,innerHTML:e.unref(F)(i.text||"")},null,8,nl)])],2))),128)),e.renderSlot(n.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:t.id},e.toDisplayString(t.label),9,ll)):e.createCommentVNode("",!0)])]))}}),ol={class:"radio-buttons"},il=["for"],rl=e.defineComponent({__name:"radio-buttons",props:{modelValue:{type:null,default:""},options:{type:Array,default:[]},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},keyOption:{type:null},itemClass:{type:String,default:""}},emits:["update:modelValue","update:selection"],setup(t,{emit:d}){const l=t,o=d,n=e.computed({get(){return l.modelValue},set(a){o("update:modelValue",a)}});return(a,i)=>(e.openBlock(),e.createElementBlock("div",ol,[e.createVNode(be,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),options:t.options,name:t.name,id:t.id,disabled:t.disabled,required:t.required,class:"d-flex flex-column gap-3 justify-content-center"},{"option-label":e.withCtx(r=>[e.createElementVNode("label",{for:`${t.id}-${r.index}`,class:"d-block btn btn-outline-primary p-3 fw-bold",role:"button"},e.toDisplayString(r.option.text),9,il)]),_:1},8,["modelValue","options","name","id","disabled","required"])]))}}),Al=["id","name","multiple","accept","disabled"],sl={class:"input__input-group input-group"},cl=["value","id","name","disabled"],dl=["for","disabled"],ul={class:"btn btn-outline-contrast"},ml=["for"],fl=["innerHTML"],Le=e.defineComponent({__name:"input-file",props:{modelValue:{type:Array,default:[]},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String},maxFileSize:{type:Number,default:0},dropzone:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d;function n(s){const u=s.target&&s.target.files;u&&(i.splice(0,i.length),Array.from(u).forEach(c=>{if(l.maxFileSize&&c.size>l.maxFileSize){console.warn(`File ${c.name} exceeds the ${l.maxFileSize} bytes size limit and will not be added.`);return}i.push(c)}))}const a=e.ref(),i=e.reactive([]),r=e.computed(()=>i&&i.map(s=>s.name));return e.watch(()=>l.modelValue,(s,u)=>{s.length===0&&(a.value.value=null)},{deep:!0}),e.watch(()=>i,(s,u)=>{o("update:modelValue",s)},{deep:!0}),(s,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["input input-file","input-file--primary"])},[e.createElementVNode("input",{ref_key:"input",ref:a,type:"file",id:t.id,name:t.name,class:"d-none",onChange:n,multiple:t.multiple,accept:t.accept,disabled:t.disabled},null,40,Al),e.createElementVNode("div",sl,[e.renderSlot(s.$slots,"input-prepend"),e.createElementVNode("input",{type:"text",value:r.value,id:t.id,name:t.name,class:"form-control",disabled:t.disabled},null,8,cl),e.renderSlot(s.$slots,"input-append",{},()=>[e.createElementVNode("label",{for:t.id,disabled:t.disabled},[e.renderSlot(s.$slots,"button",{},()=>[e.createElementVNode("span",ul,e.toDisplayString(s.$t("common.selectFile")),1)])],8,dl)])]),e.createElementVNode("label",{for:t.id},[e.renderSlot(s.$slots,"label",{},()=>[e.createElementVNode("span",{class:"input__label",innerHTML:e.unref(F)(`${t.label}${t.required?" *":""}`)},null,8,fl)])],8,ml)]))}}),pl={key:0,class:"custom-html"},gl=["innerHTML"],hl=e.defineComponent({__name:"custom-html",props:{content:{}},setup(t){const d=e.ref(!1);return e.onMounted(()=>{window!==void 0&&(d.value=!0)}),(l,o)=>d.value?(e.openBlock(),e.createElementBlock("div",pl,[e.renderSlot(l.$slots,"default",{},()=>[e.createElementVNode("div",{class:"custom-html__content",innerHTML:t.content},null,8,gl)])])):e.createCommentVNode("",!0)}}),yl={class:"select-media"},bl=["for"],kl=e.defineComponent({__name:"select-media",props:{modelValue:{type:null,default:""},assets:{type:Array,default:[]},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},emitKey:{type:String,default:"src"}},emits:["update:modelValue","update:selection"],setup(t,{emit:d}){const l=t,o=d,n=e.computed({get(){return l.modelValue},set(a){const i=l.assets.find(r=>r.id===a);o("update:modelValue",l.emitKey?i[l.emitKey]:i),l.emitKey&&l.emitKey!=="id"&&o("update:selection",i.id)}});return(a,i)=>(e.openBlock(),e.createElementBlock("div",yl,[e.createVNode(be,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),options:t.assets.map(r=>r.id),name:t.name,id:t.id,disabled:t.disabled,required:t.required,class:"d-flex flex-wrap flex-row justify-content-center",itemClass:"col-6 p-2"},{"option-label":e.withCtx(r=>[e.createElementVNode("label",{for:`${t.id}-${r.index}`,class:e.normalizeClass(["w-100",{"is-active":t.assets[r.index].id===n.value}]),role:"button"},[t.assets[r.index].thumbnail?(e.openBlock(),e.createBlock(oe,{key:0,src:t.assets[r.index].thumbnail,alt:t.assets[r.index].id},null,8,["src","alt"])):e.createCommentVNode("",!0)],10,bl)]),_:1},8,["modelValue","options","name","id","disabled","required"])]))}}),wl={class:"rte-editor"},Bl={key:0,class:"rte-editor__controls mb-2"},Cl=["disabled"],Vl=["disabled"],El={class:"btn-group"},$l=["disabled"],Sl=["disabled"],Nl={class:"btn-group"},Ml={class:"dropdown"},Dl={class:"btn dropdown-toggle btn-light","data-bs-toggle":"dropdown",role:"button",type:"button"},vl={class:"dropdown-menu"},Ll={class:"dropdown"},Il={class:"btn dropdown-toggle btn-light","data-bs-toggle":"dropdown",role:"button",type:"button"},Pl={class:"dropdown-menu"},Tl={class:"btn-group"},xl=["disabled"],zl=["disabled"],Rl=e.defineComponent({__name:"rte-editor",props:{modelValue:{type:String,default:""},disabled:{type:Boolean,default:!1},iconBasePath:{type:String,default:"/rte-icons-defs.svg"}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.ref(!1),a=e.shallowRef(void 0),i=e.shallowRef(null);e.onMounted(async()=>{const[{Editor:c,mergeAttributes:A},{EditorContent:m},{default:f},{default:h},{default:b},{default:N},{default:y}]=await Promise.all([import("@tiptap/core"),import("@tiptap/vue-3"),import("@tiptap/extension-highlight"),import("@tiptap/extension-text-align"),import("@tiptap/extension-link"),import("@tiptap/starter-kit"),import("@tiptap/extension-bold")]);i.value=m,a.value=new c({content:l.modelValue,onUpdate:()=>{o("update:modelValue",a.value?.getHTML())},extensions:[N.configure({bold:!1,link:!1}),y.extend({addAttributes(){return{class:{default:null}}},parseHTML(){return[{tag:"strong"},{tag:"b"}]},renderHTML({HTMLAttributes:g}){return["strong",A(this.options.HTMLAttributes,g),0]}}),h.configure({types:["heading","paragraph"]}),f,b.extend({addAttributes(){return{...this.parent?.(),class:{default:null},id:{default:null},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:g=>({href:g.getAttribute("href"),target:g.getAttribute("target"),rel:g.getAttribute("rel"),class:g.getAttribute("class"),id:g.getAttribute("id"),title:g.getAttribute("title")})},{tag:"a:not([href])",getAttrs:g=>({href:null,target:g.getAttribute("target"),rel:g.getAttribute("rel"),class:g.getAttribute("class"),id:g.getAttribute("id"),title:g.getAttribute("title")})}]},renderHTML({HTMLAttributes:g}){if(!g.href){const{href:w,target:D,rel:B,...$}=g;return["a",A($),0]}return["a",A(this.options.HTMLAttributes,g),0]}}).configure({openOnClick:!1,autolink:!0,defaultProtocol:"https",protocols:["http","https"],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"}})]})}),e.onBeforeUnmount(()=>{a.value?.destroy()}),e.watch(()=>l.modelValue,(c,A)=>{if(a.value){if(a.value.getHTML()===c)return;a.value.commands.setContent(c)}});function r(){const c=a.value?.getAttributes("link").href,A=window.prompt("URL",c);if(A!==null){if(A===""){a.value?.chain().focus().extendMarkRange("link").unsetLink().run();return}try{a.value?.chain().focus().extendMarkRange("link").setLink({href:A}).run()}catch(m){alert(m.message)}}}const s=()=>{a.value?.commands.setContent(`<textarea>${a.value.getHTML()}</textarea>`),n.value=!0},u=()=>{a.value?.commands.setContent(a.value.getText()),n.value=!1};return(c,A)=>(e.openBlock(),e.createElementBlock("div",wl,[a.value?(e.openBlock(),e.createElementBlock("div",Bl,[n.value?(e.openBlock(),e.createElementBlock("button",{key:1,class:"btn btn-sm btn-light is-active",onClick:u,disabled:!a.value.can().chain().focus().toggleCode().run(),title:"Toggle Source"},[e.createVNode(M,{symbol:"source","base-path":t.iconBasePath},null,8,["base-path"])],8,Vl)):(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("code")}]),onClick:s,disabled:!a.value.can().chain().focus().toggleCode().run(),title:"Toggle Source"},[e.createVNode(M,{symbol:"source","base-path":t.iconBasePath},null,8,["base-path"])],10,Cl)),e.createElementVNode("div",El,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("bold")}]),onClick:A[0]||(A[0]=m=>a.value?.chain().focus().toggleBold().run()),disabled:!a.value.can().chain().focus().toggleBold().run(),title:"Toggle Bold"},[e.createVNode(M,{symbol:"bold","base-path":t.iconBasePath},null,8,["base-path"])],10,$l),e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("italic")}]),onClick:A[1]||(A[1]=m=>a.value?.chain().focus().toggleItalic().run()),disabled:!a.value.can().chain().focus().toggleItalic().run(),title:"Toggle Italic"},[e.createVNode(M,{symbol:"italic","base-path":t.iconBasePath},null,8,["base-path"])],10,Sl)]),e.createElementVNode("div",Nl,[e.createElementVNode("div",Ml,[e.createElementVNode("button",Dl,[a.value.isActive("heading",{level:1})?(e.openBlock(),e.createBlock(M,{key:0,symbol:"h1","base-path":t.iconBasePath},null,8,["base-path"])):a.value.isActive("heading",{level:2})?(e.openBlock(),e.createBlock(M,{key:1,symbol:"h2","base-path":t.iconBasePath},null,8,["base-path"])):a.value.isActive("heading",{level:3})?(e.openBlock(),e.createBlock(M,{key:2,symbol:"h3","base-path":t.iconBasePath},null,8,["base-path"])):a.value.isActive("heading",{level:4})?(e.openBlock(),e.createBlock(M,{key:3,symbol:"h4","base-path":t.iconBasePath},null,8,["base-path"])):(e.openBlock(),e.createBlock(M,{key:4,symbol:"headline","base-path":t.iconBasePath},null,8,["base-path"]))]),e.createElementVNode("ul",vl,[e.createElementVNode("li",null,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("heading",{level:1})}]),onClick:A[2]||(A[2]=m=>a.value?.chain().focus().setHeading({level:1}).run()),title:"Set Heading 1"},[e.createVNode(M,{symbol:"h1","base-path":t.iconBasePath},null,8,["base-path"])],2)]),e.createElementVNode("li",null,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("heading",{level:2})}]),onClick:A[3]||(A[3]=m=>a.value?.chain().focus().setHeading({level:2}).run()),title:"Set Heading 2"},[e.createVNode(M,{symbol:"h2","base-path":t.iconBasePath},null,8,["base-path"])],2)]),e.createElementVNode("li",null,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("heading",{level:3})}]),onClick:A[4]||(A[4]=m=>a.value?.chain().focus().setHeading({level:3}).run()),title:"Set Heading 3"},[e.createVNode(M,{symbol:"h3","base-path":t.iconBasePath},null,8,["base-path"])],2)]),e.createElementVNode("li",null,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("heading",{level:4})}]),onClick:A[5]||(A[5]=m=>a.value?.chain().focus().setHeading({level:4}).run()),title:"Set Heading 4"},[e.createVNode(M,{symbol:"h4","base-path":t.iconBasePath},null,8,["base-path"])],2)])])]),e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("paragraph")}]),onClick:A[6]||(A[6]=m=>a.value?.chain().focus().setParagraph().run()),title:"Set Paragraph"},[e.createVNode(M,{symbol:"paragraph","base-path":t.iconBasePath},null,8,["base-path"])],2),e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("bulletList")}]),onClick:A[7]||(A[7]=m=>a.value?.chain().focus().toggleBulletList().run()),title:"Toggle Bullet List"},[e.createVNode(M,{symbol:"list","base-path":t.iconBasePath},null,8,["base-path"])],2),e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("orderedList")}]),onClick:A[8]||(A[8]=m=>a.value?.chain().focus().toggleOrderedList().run()),title:"Toggle Ordered List"},[e.createVNode(M,{symbol:"ordered-list","base-path":t.iconBasePath},null,8,["base-path"])],2)]),e.createElementVNode("div",Ll,[e.createElementVNode("button",Il,[a.value.isActive({textAlign:"center"})?(e.openBlock(),e.createBlock(M,{key:0,symbol:"align-center","base-path":t.iconBasePath},null,8,["base-path"])):a.value.isActive({textAlign:"left"})?(e.openBlock(),e.createBlock(M,{key:1,symbol:"align-left","base-path":t.iconBasePath},null,8,["base-path"])):a.value.isActive({textAlign:"right"})?(e.openBlock(),e.createBlock(M,{key:2,symbol:"align-right","base-path":t.iconBasePath},null,8,["base-path"])):(e.openBlock(),e.createBlock(M,{key:3,symbol:"align-justify","base-path":t.iconBasePath},null,8,["base-path"]))]),e.createElementVNode("ul",Pl,[e.createElementVNode("li",null,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive({textAlign:"left"})}]),onClick:A[9]||(A[9]=m=>a.value?.chain().focus().setTextAlign("left").run())},[e.createVNode(M,{symbol:"align-left","base-path":t.iconBasePath},null,8,["base-path"])],2)]),e.createElementVNode("li",null,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive({textAlign:"center"})}]),onClick:A[10]||(A[10]=m=>a.value?.chain().focus().setTextAlign("center").run())},[e.createVNode(M,{symbol:"align-center","base-path":t.iconBasePath},null,8,["base-path"])],2)]),e.createElementVNode("li",null,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive({textAlign:"right"})}]),onClick:A[11]||(A[11]=m=>a.value?.chain().focus().setTextAlign("right").run())},[e.createVNode(M,{symbol:"align-right","base-path":t.iconBasePath},null,8,["base-path"])],2)]),e.createElementVNode("li",null,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive({textAlign:"pretty"})}]),onClick:A[12]||(A[12]=m=>a.value?.chain().focus().setTextAlign("right").run())},[e.createVNode(M,{symbol:"align-justify","base-path":t.iconBasePath},null,8,["base-path"])],2)])])]),a.value.isActive("link")?(e.openBlock(),e.createElementBlock("button",{key:3,class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("link")}]),onClick:A[13]||(A[13]=m=>a.value.chain().focus().unsetLink().run()),title:"Unset Link"},[e.createVNode(M,{symbol:"unlink","base-path":t.iconBasePath},null,8,["base-path"])],2)):(e.openBlock(),e.createElementBlock("button",{key:2,class:e.normalizeClass(["btn btn-sm btn-light",{"is-active":a.value.isActive("link")}]),onClick:r,title:"Set Link"},[e.createVNode(M,{symbol:"link","base-path":t.iconBasePath},null,8,["base-path"])],2)),e.createElementVNode("div",Tl,[e.createElementVNode("button",{class:"btn btn-sm btn-light",onClick:A[14]||(A[14]=m=>a.value?.chain().focus().undo().run()),disabled:!a.value.can().chain().focus().undo().run(),title:"Undo"},[e.createVNode(M,{symbol:"undo","base-path":t.iconBasePath},null,8,["base-path"])],8,xl),e.createElementVNode("button",{class:"btn btn-sm btn-light",onClick:A[15]||(A[15]=m=>a.value?.chain().focus().redo().run()),disabled:!a.value.can().chain().focus().redo().run(),title:"Redo"},[e.createVNode(M,{symbol:"redo","base-path":t.iconBasePath},null,8,["base-path"])],8,zl)])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value),{class:"rte-editor__content",editor:a.value},null,8,["editor"]))]))}}),Ql={class:"input-color"},Fl={class:"base-input__color-swatch"},Ol=["name","id","disabled","read-only","required","aria-label"],Hl=e.defineComponent({__name:"input-color",props:{modelValue:{type:[String,Number,Boolean,Date],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.computed({get(){return l.modelValue},set(a){o("update:modelValue",a)}});return(a,i)=>(e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(Ae,{modelValue:n.value,"onUpdate:modelValue":i[1]||(i[1]=r=>n.value=r),type:t.type==="color"?"text":t.type,id:t.id,name:t.name,placeholder:t.placeholder,pattern:t.pattern,label:t.label,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength},{"input-append":e.withCtx(r=>[e.createElementVNode("span",Fl,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),type:"color",name:`${t.name}-color`,id:`${t.id}-color`,disabled:t.disabled,"read-only":t.readOnly,required:t.required,class:"form-control","aria-label":t.label},null,8,Ol),[[e.vModelText,n.value]])])]),_:1},8,["modelValue","type","id","name","placeholder","pattern","label","disabled","read-only","required","maxlength"])]))}}),Wl={class:"color-palette"},Ul=["for"],ql=e.defineComponent({__name:"color-palette",props:{modelValue:{type:[String],default:""},colors:{type:Array,default:["#000000","#FFFFFF"]},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.computed({get(){return l.modelValue},set(a){o("update:modelValue",a)}});return(a,i)=>(e.openBlock(),e.createElementBlock("div",Wl,[e.createVNode(be,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),options:t.colors,name:t.name,id:t.id,label:t.label,disabled:t.disabled,required:t.required,class:"d-flex flex-wrap flex-row gap-2"},{"option-label":e.withCtx(r=>[e.createElementVNode("label",{for:`${t.id}-${r.index}`,class:"d-block rounded-circle",style:e.normalizeStyle({backgroundColor:r.option})},null,12,Ul)]),_:1},8,["modelValue","options","name","id","label","disabled","required"])]))}}),jl=["id"],Jl=["for","innerHTML"],_l={class:"dropdown"},Gl={class:"caption"},Yl=["innerHTML"],Kl={class:"caption__text"},Zl={class:"d-block text-truncate"},Xl={class:"dropdown-menu"},eo={class:"form-check d-flex"},to=["value","id","name","label","required","disabled"],ao=["value","id","name","label","required","disabled"],no=["for"],ke=e.defineComponent({__name:"input-dropdown",props:{id:{type:String},name:{type:String,default:()=>`dropdown-${I()}`},label:{type:String},error:{type:String},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},modelValue:{type:null},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},showSelectionCount:{type:Boolean,default:!1},toggleCaption:{type:String},placeholder:{type:String,default:""},icon:{default:"chevron-down",type:String},variant:{type:String,default:""},color:{type:String,default:""},outlined:{type:Boolean,default:!1},exactMatch:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const{t:l}=Ne.useI18n(),o=t,n=d,a=e.computed({get(){return o.multiple&&!o.modelValue?[]:o.modelValue},set(s){n("update:modelValue",s)}}),i=e.computed(()=>o.options&&o.options.map(s=>(s=typeof s=="string"?{text:s,value:s}:s,{...s,active:o.modelValue&&s.value&&(o.exactMatch?o.modelValue===s.value:o.multiple?o.modelValue.includes(s.value):o.modelValue===s.value)}))),r=e.computed(()=>{if(!o.modelValue)return o.placeholder||`${l("common.select")}`;if(o.multiple&&Array.isArray(o.modelValue)&&o.modelValue.length)return i.value.reduce((s,u)=>o.modelValue.includes(u.value)?`${s}${s?", ":""}${u.text}`:s,"");if(!o.multiple){const s=i.value.find(u=>typeof u.value=="object"&&u.value!==null?JSON.stringify(u.value)===JSON.stringify(o.modelValue):u.value===o.modelValue);return s?s.text:o.placeholder||`${l("common.select")}`}return o.placeholder||`${l("common.select")}`});return(s,u)=>(e.openBlock(),e.createElementBlock("div",{class:"input input-dropdown",id:`${t.id||t.name}`},[e.renderSlot(s.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:`${t.id||t.name}--dropdown-toggle`,class:"input__label",innerHTML:`${t.label}${t.required?" *":""}`},null,8,Jl)):e.createCommentVNode("",!0)]),e.createElementVNode("div",_l,[e.createVNode(Fe,{id:`${t.id||t.name}--dropdown-toggle`,"data-bs-toggle":"dropdown",role:"button",type:"button",title:r.value,class:"btn dropdown-toggle",color:t.color,outlined:t.outlined,disabled:t.disabled},{default:e.withCtx(()=>[e.createElementVNode("span",Gl,[e.createVNode(e.Transition,{name:"bounce"},{default:e.withCtx(()=>[t.showSelectionCount&&t.modelValue.length?(e.openBlock(),e.createElementBlock("i",{key:0,class:"caption__count",innerHTML:t.modelValue.length},null,8,Yl)):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("span",Kl,[e.createElementVNode("span",Zl,e.toDisplayString(t.toggleCaption||r.value),1)])])]),_:1},8,["id","title","color","outlined","disabled"]),e.createElementVNode("ul",Xl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(c,A)=>(e.openBlock(),e.createElementBlock("li",{key:`${c.value}-${A}`},[e.createElementVNode("div",{class:e.normalizeClass(["dropdown-item",c.active&&"active"])},[e.createElementVNode("div",eo,[t.multiple?e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"checkbox","onUpdate:modelValue":u[0]||(u[0]=m=>a.value=m),value:c.value,key:`${t.name}-${c.value}-${A}__if`,id:`${t.name}-${c.value}-${A}`,name:t.name,label:c.text,required:t.required,disabled:c.selectable===!1,class:"form-check-input"},null,8,to)),[[e.vModelCheckbox,a.value]]):e.withDirectives((e.openBlock(),e.createElementBlock("input",{type:"radio","onUpdate:modelValue":u[1]||(u[1]=m=>a.value=m),value:c.value,key:`${t.name}-${c.value}-${A}__else`,id:`${t.name}-${c.value}-${A}`,name:t.name,label:c.text,required:t.required,disabled:c.selectable===!1,class:"form-check-input visually-hidden"},null,8,ao)),[[e.vModelRadio,a.value]]),e.createElementVNode("label",{class:"form-check-label flex-grow-1",onclick:"event.stopPropagation",for:`${t.name}-${c.value}-${A}`},e.toDisplayString(c.text),9,no)])],2)]))),128))])])],8,jl))}}),lo={key:0,class:"auto-suggest__suggestions position-relative"},oo={class:"suggestions dropdown-menu show w-100 mt-2"},io=["onClick"],ro=["innerHTML"],Ue=e.defineComponent({__name:"auto-suggest",props:{modelValue:{type:String},id:{type:String},name:{type:String},label:{type:String},error:{type:String},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},options:{type:Array,default:[]},placeholder:{type:String,default:""},color:{type:String,default:""},outlined:{type:Boolean,default:!1},selection:{type:String}},emits:["update:modelValue","update:selection"],setup(t,{emit:d}){const l=t,o=d,n=e.ref(),a=e.ref(!1),i=e.computed({get(){return l.modelValue},set(f){o("update:modelValue",f)}}),r=e.computed(()=>{const f=new RegExp(`(${i.value})`,"i");return i.value?l.options.filter(h=>f.test(h)):l.options}),s=e.computed(()=>{const f=new RegExp(`(${i.value})`,"i");return r.value.map(h=>{const b=h.replace(f,"<strong>$1</strong>");return F(b)})});e.watch(()=>l.options,(f,h)=>{f.length&&(a.value=!0)},{deep:!0});function u(){l.options.length&&(a.value=!0)}function c(f){a.value=!1;const h=r.value[f];o("update:modelValue",h),o("update:selection",h)}const A=e.ref();function m(f){const h=f.target;a.value&&h&&!n.value.contains(h)&&(a.value=!1)}return e.onBeforeMount(()=>{A.value=document.addEventListener("click",m)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",A.value)}),(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:"auto-suggest",ref_key:"container",ref:n},[e.createElementVNode("div",{class:"auto-suggest__input",onFocusCapture:u},[e.renderSlot(f.$slots,"default",{},()=>[e.createVNode(Ae,e.mergeProps({modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=b=>i.value=b)},f.$props),null,16,["modelValue"])])],32),a.value&&r.value.length?(e.openBlock(),e.createElementBlock("div",lo,[e.createElementVNode("ul",oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(b,N)=>(e.openBlock(),e.createElementBlock("li",{key:b,class:"suggestions__item dropdown-item",onClick:e.withModifiers(y=>c(N),["prevent"])},[e.createElementVNode("p",{class:"text-truncate my-2",innerHTML:b},null,8,ro)],8,io))),128))])])):e.createCommentVNode("",!0)],512))}});function qe(t){const d=e.computed(()=>{if(!t.tintColor)return null;const i=t.tintColor.replace("#",""),r=parseInt(i.substring(0,2),16),s=parseInt(i.substring(2,4),16),u=parseInt(i.substring(4,6),16);return{r,g:s,b:u}});function l(i,r,s){if(t.filter==="none"&&!t.tintColor)return;const u=i.getImageData(0,0,r,s),c=u.data;if(t.filter==="grayscale")for(let A=0;A<c.length;A+=4){const m=.299*c[A]+.587*c[A+1]+.114*c[A+2];c[A]=m,c[A+1]=m,c[A+2]=m}else if(t.filter==="sepia")for(let A=0;A<c.length;A+=4){const m=c[A],f=c[A+1],h=c[A+2];c[A]=Math.min(255,.393*m+.769*f+.189*h),c[A+1]=Math.min(255,.349*m+.686*f+.168*h),c[A+2]=Math.min(255,.272*m+.534*f+.131*h)}if(t.tintColor&&d.value){const{r:A,g:m,b:f}=d.value,h=t.tintIntensity;for(let b=0;b<c.length;b+=4){const N=c[b],y=c[b+1],g=c[b+2],w=N*A/255,D=y*m/255,B=g*f/255;c[b]=N+(w-N)*h,c[b+1]=y+(D-y)*h,c[b+2]=g+(B-g)*h}}i.putImageData(u,0,0)}async function o(i){if(typeof i!="string")return i.complete&&i.naturalWidth>0||await new Promise((s,u)=>{i.onload=()=>s(),i.onerror=()=>u(new Error("Failed to load image element"))}),i;const r=new Image;return await new Promise((s,u)=>{r.onload=()=>s(),r.onerror=()=>u(new Error("Failed to load image source")),r.src=i}),r}async function n(i,r={}){const s=await o(i),u=document.createElement("canvas"),c=r.width||s.naturalWidth||s.width,A=r.height||s.naturalHeight||s.height;u.width=c,u.height=A;const m=u.getContext("2d");if(!m)throw new Error("Could not create canvas context");return m.drawImage(s,0,0,c,A),l(m,c,A),u.toDataURL(r.mimeType||"image/png",r.quality)}async function a(i,r={}){const s=await n(i,r);return(await fetch(s)).blob()}return{tintRgb:d,applyFilterToCanvas:l,applyFilterToImage:n,applyFilterToImageBlob:a}}const Ao="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAQACAYAAAB/HSuDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAHkJJREFUeNrs3Q1u8zaXgNHS8JK4/xVwTyzytgnS1HZsixR/7jlAgZkMBl+hT6Z1H1FyqrX+BQAAAOzt4hAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAEA0V4cAANaTc64j//NLKcl/CwCwllRrdRQAwJDfjDgAAHPyCAAAGP79uwOAAAAAAAAIAAAAAIAAAAAAAAgAAAAAwEn8CgAATOq3l+mNetv+rP9eAIAAAAAAAOF5BAAAAAAEAAAAAEAAAAAAAJZwdQgA2N2tl9Z5UZ1zwjkBQDReAghAmAHPwIdzA4DI7AAAINxwB8+eR0IAADuxAwCA0IO/Ac954jwBQAAAgE2HOUOd88Z5A0BEHgEAINwABy3OPyEAgNXYAQBAyMHf8OZcci4BIAAAwKbDmkEN5xcAAgAAGMxwvjnfABAAAGC1QcwQhnMQAAQAAAxd4JwEQAAAAEMWOEcBEAAAYKrBylCF8xUABAAANh2kDFE4hwFAAADA0ATOaQC44eIQAGBQgvcdOTdb/fQgADzDDgAADP7gXAdAAACAMQORYQjnPQAIAAAYgMDnAAAEAAAMPLD+58JnAgABAADDP/h8AIAAAMA6w43BBp8VnxUABAAADDPgs+OzA0BDF4cAgDMZYMBnAYAxrg4BAIYdGPu5ePf9AADwCjsAADD8g88IAAHYAQCAoQYm+rzYDQBAL3YAAGD4B58dAALwKwAANPF519LwAj5XAAgAAAAAwCAeAQAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAiyznXj38cCcA6A8AjqVZrOcCqF+S3/l5KSY4OYJ0B4Cc7AAA2uigHsAYBIAAAuDAHsJYACAAAuCgHsBYBCAAALHPB7dlcoIVn1hIRAEAAAGDQ8A9gbQJAAAAIcIHt7j/Q0rNriggAIAAAMOGFOoC1BUAAAGBCnvsHVogAdgEACAAAGP4BEQAAAQAAAAAQAAACc/cfmI1dAAACAACGf0AEEAEABAAADP+ACACAAAAAAAAIAACRuPsPrMIuAAABAADDPyACiAAAAgAAAAAgAAAE5e4/sCq7AAAEAAAM/4AIIAIACAAAAACAAAAQhLv/wC7sAgAQAADofEENYM0CQAAAmJg7YYC1DwABAMAFsDtpwJI8CgAgAADQ+AIawBoGgAAAMDF3vgCshQACAADunAHWMgAEAIDVueMFYE0EEAAAXOi6YwZsxQsBAQQAAAz/gLUNAAEAYD/ucAFYIwEEAADcIQOscQAIAACrc2cLwFoJIAAA4M4YYK0DQAAAWJ07WgDWTAABAAB3xABrHgACAMDq3MkCsHYCCAAAuBMGWPsAEAAAVvfbHSwXwIAI8P4aCoAAAAAAAAgAAHNw9x/AWgggAAAAAAACAMDq3PECsCYCCAAAAABAN6lWL1kF6OXzTdbucgFYLwEEAAAAAKA7jwAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACgEMAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAIAAAAAAAAgAAJHknOvHP44EgHUaYGWpVmslwL0Lyp9/K6UkRwbAWg2wIjsAAJ68oHz0dwCs1QACAAAAACAAAAAAAAIAwOlsHQWwlgMIAADBebEUAAACAAAAnEiUBRAAAAAAAAEA4D7PjAJY0wEEAAAAAEAAANidZ00BrM0AAgAAAAAgAAAAAAACAMAUvCwKwNoOIAAAAAAAAgDA7rxkCsAaDSAAAAAAAAIAAAAAIAAATMFLogCs8QACAAAAACAAAOzOy6UArNUAAgAAAAAgAAAAAAACAAAAACAAAJzD26EBrPUAAgAAAAAgAADszlulAazZAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAEAjfhYKwJoPIAAAAAAAAgDA7vycFIC1G0AAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAPiSc66OAoC1H0AAAAjM70gDWMMBBAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAAAQAAAAAAABACCMUkpyFACs5QACAICLQwCs/QDLSbVWRwEAAAA2ZwcAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgADgEAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAABAc1eHAIgs51x//q2UkhwZAGs8wG7sAABcGD75dwCs8QACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAFH5nWgAaziAAACwiVJKchQArP0AAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAIAAAMC/cs7VUQCwdgMIAAAbKKUkRwHAmg8gAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAA04fekAazZAAIAwCb8LjSAtR5AAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAABoxu9KA1irAQQAgE34fWgAAAQAAABYmMgLIAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAMBu/Lw1gjQYQAAA24WeiAKztAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAwEv8XBSANR1AAABwEQmANRpgWanW6igAAADA5uwAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAABACHAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAgLNdHQKA1+Wc6+f/XEpJjgiAtRdgdqnW6igAvHHx+Z0LUQDrL8DsPAIA0PHCFABrLIAAAAAAAAgAAAAAgAAAAAAACAAAAOzA8/8AAgCAi1QAABAAAPrwc1MA1mQAAQAAAAAQAAAAAAABAAAAABAAANbgRYAA1lQAAQBgE146BWAtBhAAAAAAAAEAAAAAEAAAtuCZVQBrKYAAAAAAAAgAAKvw8ikAazCAAAAAAAAIAAAAAIAAALAFL68CsIYCCAAAAACAAACwCi+hArD2AggAAAAAgAAAAAAACAAAW/ASKwBrJ4AAALAJz6ICWHMBBAAAAABAAAAAAAAEAIAteJYVwJoJIAAAAAAAAgDAKryUCsBaCyAAAAAAAAIAQASeaQWwVgIIAAAAAIAAALAKz6YCWGMBBAAAAABAAACIwLOtAAAIAAAAhCaSAggAAEvxjCqAtRVAAAAAAAAEAAAAAEAAANiCZ1wBrI0AAgDAJjyrCmBNBRAAAAAAAAEAIAJbXQGsiQACAAAAACAAAKzCM6sA1lIAAQAAAAAQAAAAAAABAGAZ97au2tIKYK0EEAAANr+wdUELYK0EGCnV6tdXAAAAYHd2AAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAKAQwAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAgAAAAAAACAAAAACAAADAQTnn+vGPIwFYvwBoJdVqfQaY6cL51t9LKcnRAaxfABxhBwAAAAAIAADMwHZawBoFgAAAAAAACAAAu3CHDbA2ASAAAAAAAAIAwCq8LRuwpgEgAABgqy1gTQJAAAAAAAAEAIBl2DILWMsAEAAAsOUWsBYBIAAAAAAAAgDAMn7bOuvOGzDSb2uQ7f8AAgAAAAAgAAAAAAACAEAwHgMAZmT7P4AAAAAAAAgAALzDnTTAmgWAAACAxwAAaw4AAgAAAAAgAAAsw8sAgRl4+R+AAAAAAAAIAAC04M4aYI0CQAAAwGMAgDUGAAEAAAAAEAAAluFlgMAIXv4HIAAAAAAAAgAAPdgFAJzJ3X8AAQAAAAAQAAAAAAABAIBDPAYAnMH2fwABAAAAABAAADiDXQBAT+7+AwgAAAAAgAAAwJnsAgB6cPcfQAAAAAAABAAAAABAAACgC48BAC3Z/g8gAAAAAAACAAAj2QUAtODuP4AAAAAAAAgAAMzALgDgCHf/AQQAAAAAQAAAYCZ2AQDvcPcfQAAAAAAABAAAZuROHWBNAUAAAAAAAAEAAAAAEAAAWIYtu4C1BIBbUq1eCg0AAAC7swMAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAAAQABwCAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAEAAD4JudcP/5xJMDnE4B1pVp9XwBwf7D4+bdSSnJkwGcUgPXYAQDA04PFo78DPqMACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAQfkZMfAZBkAAAAAAAAQAAHZXSkmOAvgsAiAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAABAHDnn6igAIAAAYGgAABAAAOA2vzsOPpMACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAfMk5V0cBfKYBEAAACMzvjYPPJgACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAABf/F44+GwDIAAAAAAAAgAAuyulJEcBfEYBEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAA+CPnXB0F8BkHQAAAIDC/Lw4+qwAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAA8xc+Kgc8sAAIAAAAAsJBUa3UUAPgj5/z1peBOIvgsAyAAAAAAAIvxCAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAADAIVeHAGAeOef682+llOTIANYwAI5KtVZHAWCSC+V7XEAD1jQAjrIDAGCyC2OAiGuiKAAgAAAY9AECr5/CAIAAAGDQBwi83goDAAIAgCEfIPgaLQ4A3OYlgICLyMkHfReygPXUegogAABsdGHqAhWw7lp3AQQAABeeANZl6zKAAACwykWmi0qANdZs6zWwIy8BBHDhCDDdmulFrAACAIAhHyD4GisOAAgAAAZ9gMDrsjAAIAAAGPQBAq/jwgDAP7wEENjWvQs+gz4AvicAAQAAAADY0sUhAAAAAAEAAAAAEAAAAACAFfgVAOBXt16S5AVJAOC7GViLlwACT11U3OJCAwB8TwPrsAMA8PvIABDg+10QAAQAcEEAAAgCgAAAGPgBAEEAEAAAAz8AIAgAS/ASQDD0v8VFAQD43gcEAGDDL35f/gDgmsA1AQgAgC93AMA1AyAAAL68AQDXFIAAAPhyBgBccwACAPjy9eULALgmAQQA8CXryxUAcK0CCAAQ6wvVlygA4PoFuOfqEMC6fGECAGdfb4x4ZAAQAMDADwAgCAACABj4AQAEAeCTdwDAyR59KRr4AQDXPoAAAAAAALzt4hAAAACAAAAAAAAIAAAAAIAAACf4eLGMt80CAOB6Ex7zEkCWXIAf/d+9TRYAANed8H9Xh4AdFl8AABh5jSoGIACAoR8AADEABAAw9AMAIAaAAIChHwAAxAAQADD0AwCAGADP8isAbDH0W0ABAHAtCwIAFkoAAHCNiwAgALDSomhBBADAdS8IAFj8AADA9TAIAKy00FnkAABwjewaGQGATRc1CxoAAK6bXTcjAGDxAgAA19OupxEAWGmhskgBAIBrbAQALEoAAOCa2zU3AgCrLUIWIAAAcB2OAIAFBwAAcF2OAMBqi4zFBQAAXKczr6tDwFEWFAAA6H+93foXBBAAwOAPAABCAAIAGPwBAEAIYEXeAcB/3FtEDP0AAOA6HgGAjRcPCwYAALiWRwAAAAAAFnFxCAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAACAG64OwRg55/r5P5dSkiMCAACYgegp1VodhUEn/Xc+AAAAgDmInjwCMMFJDwAAYEaiN48AOKkBAACGz0t2A/RnB4DhHwAAwOwkAOAEBgAAMEMJADQ5cW11AQAAdvbKzCMC9ONXAAYO/oZ/AADAvGReOosdAE5mAACAU7w6A9kNIAAY/gEAAEQAXuQRgJOHf4M/AACAWWoEOwCcsAAAAEN4OaAAYPgHAAAQAUQAAcDwDwAAIALwKu8A6Dj4G/4BAADMWwLA5iejExEAAMDsNROPADgBAQAApuKRAAHA8A8AACACiAACgOEfAABABEAAMPwDAACIAAIAhn8AAAARQAAw/Bv+AQAARAABwPAPAACACCAAGP4BAAAQAQQAwz8AAAAigABg+AcAAEAEEAAM/wAAACKACCAAGP4BAABEABEgcgAw/AMAAIgAAgCGfwAAALObALC6Z4uPEwgAAGC/CBB1F0C4AGD4BwAAEAEiRoBQAcDwDwAAIAJEjQBhAoDhHwAAQASIHAG8BNDwDwAAYMYTAJwYAAAAmPUEACcEAAAAZj4BwIkAAACA2U8AGP5fthMAAAAgdgSINBemWquzAAAAADbnHQAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAACAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAAAgAAAAAgAAAAAAACAAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAIAA4BAAAACAAAAAAAAIAAAAAIAAAAAAAAgAAAAAgAAAAAAANHId/S+Qc64//1ZKSf6rAQAAYFUzzrqX2Q7Io78DAADAisP/DLOuRwAAAAAggGEBwF1+AAAAohk5C9sBAAAAAAEMCQC/FQ8vAQQAAGBXo3YB2AEAAAAADc16U/v0AODuPwAAANEjwIhdAHYAAAAAQACnBgB3/wEAAIhitl0AdgAAAABAAKcFAHf/AQAAiGamXQB2AAAAAEAApwQAd/8BAACIapZdAHYAAAAAQADdA8CI3zYEAACAlZwxOw/fAWD7PwAAALubYfb1CAAAAAAE0DUAePkfAAAAPDcD934MwA4AAAAACKBbAHD3HwAAAF6bhXvuArADAAAAAAIYEgDc/QcAACCqUTNxlwBwxu8XAgAAwI56zdQeAQAAAIAAmgcAL/8DAACAx0a8DNAOAAAAAAjg1ADg7j8AAACMmZGbBgAv/wMAAIA5Z2yPAAAAAEAApwUA2/8BAABg3KzcLADY/g8AAABttZy1PQIAAAAAAZwSAGz/BwAAgLEzc5MAYPs/AAAA9NFq5vYIAAAAAATQPQDY/g8AAADjZ+fDAcD2fwAAAOirxeztEQAAAAAIoGsAsP0fAAAA5pihDwUA2/8BAADgHEdncI8AAAAAQADdAoDt/wAAADDPLG0HAAAAAATwdgDw/D8AAACc68gsbgcAAAAABNAlAHj+HwAAAOaaqe0AAAAAgADeDgD3ioS7/wAAAHBMj5n70vJfyPAPAAAAfSLA0Zk71epl/gAAALA77wAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAEAIcAAAAABAAAAABAAAAAAAAEAAAAAEAAAAAAAAQAAAAAQAAAAAAABAAAAABAAAAAAAABAAAAABAAAAAAAAEAAAAAEAAAAACAs13f+X/KOdfv/3spJTmUAAAA0EeLOfxy9D/03t8AAACA9sP/u3O4RwAAAAAggJcCgDv9AAAAMIdXZ3Q7AAAAACAAAQAAAAAEAAAAAEAAAADgb3bsWAAAAABgkL/1IPYWRgAgAAAAAAABAAAAAAgAAAAAQAAAAAAAAgAAAAAQAAAAACAAAAAAAAEAAAAACAAAAABAAAAAAAACAAAAABAAAAAAgAAAAAAABAAAAAAIAAAAAEAAAAAAAAIAAAAAEAAAAACAAAAAAAAEAAAAALAkwACd6iSVhnRezwAAAABJRU5ErkJggg==",so={class:"camera__preview"},co={key:0,class:"camera__bg-notification"},uo=["innerHTML"],mo=["width","height"],fo={key:1,class:"camera__countdown-overlay"},po=["innerHTML","data-countdown"],go=["src"],ho={class:"camera__controls"},yo={class:"container"},bo={class:"row"},ko={class:"col"},wo={class:"btn-group"},Bo={key:0},Co={key:1},Vo={key:0,class:"camera__switch-cam"},Eo={key:1,class:"base-camera__devices"},$o={name:"BaseCamera",inheritAttrs:!1},je={"1x1":{width:720,height:720},"2x3":{width:720,height:1080},"3x2":{width:1080,height:720},"3x4":{width:720,height:960},"4x3":{width:960,height:720},"4x5":{width:960,height:1200},"5x4":{width:1200,height:960},"16x9":{width:1280,height:720},"9x16":{width:720,height:1280}},So=e.defineComponent({...$o,props:{modelValue:{type:null},enableSwitchCamera:{type:Boolean,default:!0},defaultRearCamera:{type:Boolean,default:!1},enableMirrorCamera:{type:Boolean,default:!1},enableGuide:{type:Boolean,default:!0},guideSrc:{type:String,default:()=>Ao},countdown:{type:Number,default:0},ratio:{type:String,default:""},filter:{type:String,default:"none",validator:t=>["none","grayscale","sepia"].includes(t)},tintColor:{type:String,default:""},tintIntensity:{type:Number,default:.3},enableAudio:{type:Boolean,default:!1},enableSelectDevice:{type:Boolean,default:!1},enableCropImage:{type:Boolean,default:!0},resolutions:{type:Object,default:()=>je}},emits:["update:modelValue"],setup(t,{expose:d,emit:l}){const o=t,n=l,a=e.ref(),i=e.ref(),r=e.ref(!1),s=e.ref([]),u=e.ref(),c=e.ref(),A=e.ref(!1),m=e.ref(!1),f=e.ref(0),h=e.ref(0),b=e.ref(),N=e.computed(()=>({...je,...o.resolutions})),y=e.computed(()=>Object.values(N.value)[0]);function g(V){return String(V||"").trim().toLowerCase().replace(/\s+/g,"").replace(/[:/]/g,"x")}const w=e.computed(()=>{if(N.value[o.ratio])return o.ratio;const V=g(o.ratio);if(N.value[V])return V}),D=e.computed(()=>w.value?N.value[w.value]:y.value),B=e.computed(()=>{const V=w.value?N.value[w.value]:void 0;return V?`${V.width} / ${V.height}`:void 0}),$=e.computed(()=>s.value.filter(V=>V.kind==="videoinput")),q=e.computed(()=>s.value.filter(V=>V.kind==="audioinput")),X=e.computed({get(){return u.value&&u.value.deviceId},set(V){u.value=$.value.find(L=>L.deviceId===V)}}),j=e.computed({get(){return c.value&&c.value.deviceId},set(V){c.value=q.value.find(L=>L.deviceId===V)}}),ee=e.computed(()=>{const V=u.value&&$.value.findIndex(L=>L.deviceId===u.value.deviceId);return o.enableMirrorCamera&&V===0?"mirror-cam":""}),de=e.computed(()=>{const V=u.value&&s.value.findIndex(L=>L.deviceId===u.value.deviceId);return ee.value?`${ee.value} mirror-device-${V}`:""}),{tintRgb:Be,applyFilterToCanvas:x}=qe(o);function ie(){if(w.value&&D.value){f.value=D.value.width,h.value=D.value.height;return}f.value=a.value.parentElement&&a.value.parentElement.clientWidth,h.value=a.value.parentElement&&a.value.parentElement.clientHeight}const E=Me.debounce(()=>{ie()},300,{trailing:!0,leading:!1});async function v(){const V=D.value?{width:D.value.width,height:D.value.height}:void 0,L=V?V.width/V.height:void 0,z={audio:o.enableAudio&&{...c.value?{deviceId:c.value.deviceId}:{}},video:{...u.value?{deviceId:u.value.deviceId}:{},width:{ideal:V?.width},...w.value&&V?.height?{height:{ideal:V.height}}:{},...w.value&&L?{aspectRatio:{ideal:L}}:{}}};return navigator.mediaDevices.getUserMedia(z).catch(W=>{console.error(W,"navigator.mediaDevices.getUserMedia: failed")})}function P(){a.value&&a.value.srcObject&&a.value.srcObject.getTracks().forEach(L=>{L.stop()})}async function Q(){return a.value.srcObject=await v(),s.value=await navigator.mediaDevices.enumerateDevices(),{stream:a.value.srcObject,devices:s.value}}function G(){A.value?(A.value=!1,m.value=!1,P()):(A.value=!0,Q())}function ue(){s.value.length>1&&(P(),u.value=u.value&&u.value.deviceId===$.value[0].deviceId?$.value[$.value.length-1]:$.value[0],Q())}async function Ce(V,L){P(),V&&(!L||V.deviceId!==L.deviceId)&&await Q()}e.watch(()=>u.value,Ce),e.watch(()=>c.value,Ce);function me(){o.countdown?(b.value=b.value?b.value-1:o.countdown,b.value?setTimeout(me,1e3):Ve()):Ve()}d({onCapture:me,camera:a.value});function Ve(){m.value=!0;const V=i.value.getContext("2d"),L=a.value,z=L&&L.srcObject&&L.srcObject.getTracks(),{aspectRatio:W,width:Ee,height:re}=z.length&&z[0].getSettings(),J=L?.videoWidth||Ee||f.value,U=L?.videoHeight||re||h.value,Y=J&&U?J/U:W,te=D.value||{width:J,height:U},fe=te?.width||J,$e=w.value?te?.height||U:Math.round(fe/Y),ae=fe/$e;if(i.value.width=fe,i.value.height=$e,!J||!U||!Y)return;if(V.save(),ee.value&&(V.translate(i.value.width,0),V.scale(-1,1)),o.enableCropImage){let _=0,ne=0,K=J,le=U;Y>ae?(K=U*ae,_=(J-K)/2):Y<ae&&(le=J/ae,ne=(U-le)/2),V.drawImage(L,_,ne,K,le,0,0,i.value.width,i.value.height)}else{let _=i.value.width,ne=i.value.height,K=0,le=0;Y>ae?(ne=i.value.width/Y,le=(i.value.height-ne)/2):Y<ae&&(_=i.value.height*Y,K=(i.value.width-_)/2),ee.value&&(K=i.value.width-K-_),V.drawImage(L,0,0,J,U,K,le,_,ne)}V.restore(),x(V,i.value.width,i.value.height);const se=i.value.toDataURL("image/png");R(se)}function R(V){const L=Bt(V);n("update:modelValue",{name:`cam-pic-${new Date().toISOString()}`,id:`cam-pic-${new Date().toISOString()}`,blob:L,size:L.size})}return e.onMounted(async()=>{P(),await Q(),u.value=$.value[0],o.enableAudio&&(c.value=q.value[0]),navigator.mediaDevices.addEventListener("devicechange",async V=>{await Q()}),o.defaultRearCamera&&ue(),G(),window.addEventListener("resize",E),ie(),await e.nextTick(),r.value=!0}),e.onBeforeUnmount(()=>{A.value=!1,m.value=!1,P(),window.removeEventListener("resize",E)}),(V,L)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["camera",de.value])},[e.createElementVNode("div",so,[r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",co,[e.createVNode(ge,{color:"#000"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass("d-block text-center"),innerHTML:V.$t("camera.waitForCameraNotification")},null,8,uo)]),_:1})])),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["camera__video-wrapper",w.value?`aspect-ratio--${w.value}`:""]),style:e.normalizeStyle(B.value?{aspectRatio:B.value}:void 0)},[e.createElementVNode("video",{ref_key:"camera",ref:a,class:"camera__video",style:e.normalizeStyle({filter:o.filter==="grayscale"?"grayscale(100%)":o.filter==="sepia"?"sepia(100%)":"none"}),autoplay:"",playsinline:""},null,4),t.tintColor?(e.openBlock(),e.createElementBlock("div",{key:0,class:"camera__tint-overlay",style:e.normalizeStyle({backgroundColor:t.tintColor,opacity:t.tintIntensity,mixBlendMode:"multiply"})},null,4)):e.createCommentVNode("",!0)],6),[[e.vShow,r.value]]),e.withDirectives(e.createElementVNode("canvas",{ref_key:"canvas",ref:i,class:"camera__canvas",width:f.value,height:h.value},null,8,mo),[[e.vShow,m.value]]),b.value?(e.openBlock(),e.createElementBlock("div",fo,[(e.openBlock(),e.createElementBlock("p",{class:"countdown",key:b.value,innerHTML:b.value,"data-countdown":b.value},null,8,po))])):e.createCommentVNode("",!0),t.enableGuide&&A.value&&r.value?(e.openBlock(),e.createElementBlock("img",{key:2,class:"camera__guide",src:t.guideSrc},null,8,go)):e.createCommentVNode("",!0)]),e.createElementVNode("div",ho,[e.createElementVNode("div",yo,[e.createElementVNode("div",bo,[e.createElementVNode("div",ko,[e.createElementVNode("div",wo,[e.createElementVNode("button",{type:"button",class:"camera__toggle btn btn-primary",onClick:G},[A.value?(e.openBlock(),e.createElementBlock("span",Co,e.toDisplayString(V.$t("common.pause")),1)):(e.openBlock(),e.createElementBlock("span",Bo,e.toDisplayString(V.$t("common.play")),1))]),e.createElementVNode("button",{type:"button",class:"camera__capture btn btn-primary",onClick:me},e.toDisplayString(V.$t("camera.capture")),1)])])])])]),t.enableSwitchCamera&&$.value&&$.value.length>1?(e.openBlock(),e.createElementBlock("div",Vo,[e.createElementVNode("button",{class:"btn",onClick:e.withModifiers(ue,["prevent"])},[e.createVNode(M,{symbol:"switch-camera"})])])):e.createCommentVNode("",!0),t.enableSelectDevice?(e.openBlock(),e.createElementBlock("div",Eo,[q.value.length&&c.value?(e.openBlock(),e.createBlock(ke,{key:0,modelValue:j.value,"onUpdate:modelValue":L[0]||(L[0]=z=>j.value=z),options:q.value.map((z,W)=>({text:z.label||`Microphone ${W+1}`,value:z.deviceId}))},null,8,["modelValue","options"])):e.createCommentVNode("",!0),$.value.length?(e.openBlock(),e.createBlock(ke,{key:1,modelValue:X.value,"onUpdate:modelValue":L[1]||(L[1]=z=>X.value=z),options:$.value.map((z,W)=>({text:z.label||`Camera ${W+1}`,value:z.deviceId}))},null,8,["modelValue","options"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),No={class:"base-map"},Mo={key:0,class:"base-map__label"},Do={key:0,class:"base-map__hint"},Je=e.defineComponent({__name:"base-map",props:{label:{type:String,default:""},modelValue:{type:Object,default:null},center:{type:Object,default:()=>({lat:48.8566,lng:2.3522})},zoom:{type:Number,default:13},markers:{type:Array,default:()=>[]},routeCoordinates:{type:Array,default:()=>[]},routeColor:{type:String,default:"#2563eb"},routeWeight:{type:Number,default:5},selectionRadius:{type:Number,default:0},selectionRadiusCenter:{type:Object,default:null},selectionRadiusColor:{type:String,default:"#2563eb"},selectionRadiusFillColor:{type:String,default:"#60a5fa"},selectionRadiusFillOpacity:{type:Number,default:.14},selectionRadiusOpacity:{type:Number,default:.65},selectionRadiusStrokeWeight:{type:Number,default:2},userLocation:{type:Object,default:null},userLocationLabel:{type:String,default:"Your location"},selectedLocationLabel:{type:String,default:"Selected location"},height:{type:String,default:"20rem"},interactive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showSelectedMarker:{type:Boolean,default:!0},helperText:{type:String,default:""},mapStyle:{type:String,default:"streets"},tileLayerUrl:{type:String,default:""},tileLayerAttribution:{type:String,default:""}},emits:["update:modelValue","update:center","update:zoom","map-click","marker-click"],setup(t,{emit:d}){function l(E,v){return v({className:"base-map__marker-wrapper",html:`<span class="base-map__marker-pin base-map__marker-pin--${E}"><span class="base-map__marker-core"></span></span>`,iconSize:[24,24],iconAnchor:[12,24],popupAnchor:[0,-20]})}const o={lat:48.8566,lng:2.3522},n={streets:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'},light:{url:"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'},dark:{url:"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'},minimal:{url:"https://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'},popover:{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}{r}.png",attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'}},a=t,i=d,r=e.shallowRef(null),s=e.ref(null),u=e.ref(null),c=e.ref(a.zoom),A=e.ref(B(a.modelValue));e.onMounted(async()=>{if(typeof window>"u")return;const[E,v]=await Promise.all([import("@vue-leaflet/vue-leaflet"),import("leaflet")]);r.value=e.markRaw({LCircle:e.markRaw(E.LCircle),LMap:e.markRaw(E.LMap),LMarker:e.markRaw(E.LMarker),LPopup:e.markRaw(E.LPopup),LPolyline:e.markRaw(E.LPolyline),LTileLayer:e.markRaw(E.LTileLayer)}),s.value={list:l("list",v.divIcon),selected:l("selected",v.divIcon),search:l("search",v.divIcon),user:l("user",v.divIcon)}}),e.watch(()=>a.zoom,E=>{c.value=E}),e.watch(()=>a.modelValue,E=>{A.value=B(E)}),e.watch(()=>a.center,E=>{const v=B(E);v&&j(v)},{deep:!0}),e.watch(()=>[a.height,a.markers.length,a.routeCoordinates.length,a.center?.lat,a.center?.lng,a.modelValue?.lat,a.modelValue?.lng,a.userLocation?.lat,a.userLocation?.lng],()=>{X()},{flush:"post"});const m=e.computed(()=>B(a.userLocation)),f=e.computed(()=>B(a.selectionRadiusCenter)||A.value),h=e.computed(()=>{const E=(a.markers||[]).map(v=>{const P=B(v);return P?{...v,...P,type:v.type||(A.value&&q(v,A.value)?"selected":"list")}:null}).filter(v=>!!v);return a.showSelectedMarker&&A.value&&!E.some(v=>q(v,A.value))&&E.push({id:"selected-location",label:a.selectedLocationLabel,type:"search",...A.value}),E}),b=e.computed(()=>(a.routeCoordinates||[]).map(E=>$(E)).filter(E=>!!E)),N=e.computed(()=>{const E=B(a.center)||A.value||B(a.markers[0])||o;return[E.lat,E.lng]}),y=e.computed(()=>{if(a.tileLayerUrl.trim())return a.tileLayerUrl;const E=a.mapStyle==="custom"?"streets":a.mapStyle;return n[E].url}),g=e.computed(()=>{if(a.tileLayerAttribution.trim())return a.tileLayerAttribution;const E=a.mapStyle==="custom"?"streets":a.mapStyle;return n[E].attribution});function w(E="list"){if(s.value)return s.value[E]||s.value.list}function D(E="list"){switch(E){case"user":return 450;case"selected":return 350;case"search":return 250;default:return 150}}function B(E){if(!E)return null;const v=Number(E.lat),P=Number(E.lng);return Number.isNaN(v)||Number.isNaN(P)?null:{lat:v,lng:P}}function $(E){if(Array.isArray(E)){const P=Number(E[0]),Q=Number(E[1]);return Number.isFinite(P)&&Number.isFinite(Q)?[P,Q]:null}const v=B(E);return v?[v.lat,v.lng]:null}function q(E,v){const P=B(E),Q=B(v);return!P||!Q?!1:Math.abs(P.lat-Q.lat)<1e-6&&Math.abs(P.lng-Q.lng)<1e-6}async function X(){await e.nextTick(),u.value?.invalidateSize()}function j(E){u.value?.panTo([E.lat,E.lng])}function ee(E){u.value=E,j(B(a.center)||A.value||o),X()}function de(E){c.value=E,i("update:zoom",E)}function Be(E){const v=B(E);v&&(j(v),i("update:center",v))}function x(E){if(!a.interactive||a.disabled)return;const v={lat:Number(E.latlng.lat.toFixed(6)),lng:Number(E.latlng.lng.toFixed(6))};A.value=v,j(v),i("update:modelValue",v),i("update:center",v),i("map-click",v)}function ie(E){A.value={lat:Number(E.lat),lng:Number(E.lng)},j(A.value),i("update:modelValue",A.value),i("update:center",A.value),i("marker-click",E)}return(E,v)=>(e.openBlock(),e.createElementBlock("div",No,[e.renderSlot(E.$slots,"label",{},()=>[t.label?(e.openBlock(),e.createElementBlock("label",Mo,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:e.normalizeClass(["base-map__frame",{"base-map__frame--interactive":t.interactive&&!t.disabled,"base-map__frame--disabled":t.disabled}]),style:e.normalizeStyle({height:t.height}),"data-testid":"base-map"},[r.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value?.LMap),{key:0,class:"base-map__canvas","use-global-leaflet":!1,zoom:c.value,center:N.value,onReady:ee,onClick:x,"onUpdate:zoom":de,"onUpdate:center":Be},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value.LTileLayer),{url:y.value,attribution:g.value,"layer-type":"base",name:"OpenStreetMap"},null,8,["url","attribution"])),b.value.length>1?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value.LPolyline),{key:0,"lat-lngs":b.value,color:t.routeColor,weight:t.routeWeight},null,8,["lat-lngs","color","weight"])):e.createCommentVNode("",!0),f.value&&t.selectionRadius>0?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value.LCircle),{key:1,"lat-lng":[f.value.lat,f.value.lng],radius:t.selectionRadius,color:t.selectionRadiusColor,"fill-color":t.selectionRadiusFillColor,"fill-opacity":t.selectionRadiusFillOpacity,opacity:t.selectionRadiusOpacity,weight:t.selectionRadiusStrokeWeight},null,8,["lat-lng","radius","color","fill-color","fill-opacity","opacity","weight"])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(P,Q)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value.LMarker),{key:P.id??`${P.lat}-${P.lng}-${Q}`,"lat-lng":[P.lat,P.lng],icon:w(P.type),"z-index-offset":D(P.type),onClick:G=>ie(P)},{default:e.withCtx(()=>[P.label?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value.LPopup),{key:0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(P.label),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1032,["lat-lng","icon","z-index-offset","onClick"]))),128)),m.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value.LMarker),{key:`user-${m.value.lat}-${m.value.lng}`,"lat-lng":[m.value.lat,m.value.lng],icon:w("user"),"z-index-offset":D("user"),onClick:v[0]||(v[0]=P=>ie({id:"user-location",label:t.userLocationLabel,type:"user",...m.value}))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value.LPopup),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.userLocationLabel),1)]),_:1}))]),_:1},8,["lat-lng","icon","z-index-offset"])):e.createCommentVNode("",!0)]),_:1},40,["zoom","center"])):e.createCommentVNode("",!0)],6),t.interactive&&t.helperText?(e.openBlock(),e.createElementBlock("p",Do,e.toDisplayString(t.helperText),1)):e.createCommentVNode("",!0)]))}}),vo={class:"location-list","data-testid":"location-list"},Lo={key:0,class:"location-list__label"},Io={key:1,class:"location-list__items"},Po=["data-testid","onClick"],To={class:"location-list__title"},xo={key:0,class:"location-list__description"},zo={key:1,class:"location-list__distance"},Ro={key:2,class:"location-list__empty"},_e=e.defineComponent({__name:"location-list",props:{modelValue:{type:null,default:null},locations:{type:Array,default:()=>[]},label:{type:String,default:""},titleKey:{type:String,default:"title"},descriptionKey:{type:String,default:"address"},emptyText:{type:String,default:"No locations found."},showDistance:{type:Boolean,default:!0}},emits:["update:modelValue","select"],setup(t,{emit:d}){const l=t,o=d;function n(A){return A?.[l.titleKey]||A?.label||A?.name||"Location"}function a(A){return A?.[l.descriptionKey]||A?.description||A?.subtitle||""}function i(A,m=0){return A?typeof A!="object"?A:A.id??A.value??n(A)??m:m}function r(A,m=0){return`${i(A,m)}`.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function s(A,m=0){return i(l.modelValue)===i(A,m)}function u(A){return Number.isFinite(A)?A>=1e3?`${(A/1e3).toFixed(1)} km`:`${Math.round(A)} m`:"—"}function c(A){o("update:modelValue",A),o("select",A)}return(A,m)=>(e.openBlock(),e.createElementBlock("div",vo,[t.label?(e.openBlock(),e.createElementBlock("p",Lo,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),t.locations.length?(e.openBlock(),e.createElementBlock("div",Io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.locations,(f,h)=>(e.openBlock(),e.createElementBlock("button",{key:i(f,h),type:"button",class:e.normalizeClass(["location-list__item",{"location-list__item--active":s(f,h)}]),"data-testid":`location-option-${r(f,h)}`,onClick:b=>c(f)},[e.createElementVNode("strong",To,e.toDisplayString(n(f)),1),a(f)?(e.openBlock(),e.createElementBlock("small",xo,e.toDisplayString(a(f)),1)):e.createCommentVNode("",!0),t.showDistance&&f?.distance!==void 0&&f?.distance!==null?(e.openBlock(),e.createElementBlock("small",zo,e.toDisplayString(u(Number(f.distance)))+" away ",1)):e.createCommentVNode("",!0)],10,Po))),128))])):(e.openBlock(),e.createElementBlock("p",Ro,e.toDisplayString(t.emptyText),1))]))}});function Ge(t=null,d){const l=e.ref(!1),o=e.ref([]),n=e.ref([]),a=e.ref(!1),i=e.ref(!1),r=e.computed(()=>t.modelValue?.length?t.modelValue:t.src?[{type:"",src:t.src}]:n.value);async function s(b){const N=new FormData;N.append("file",b),l.value=!0;const g=await(t.customFetch||pe.ofetch)(t.endpoint,{method:"POST",...t.customFetch?{}:{headers:{Accept:"application/json",...t.authToken?{Authorization:`Bearer ${t.authToken}`}:{}}},body:N}).catch(D=>{console.error("Error",D)});return l.value=!1,`${t.baseResponsePath||"/api/v1/assets"}/${g.path}`}function u(b){const N=typeof b=="string"?parseInt(b,10):b,y=Array.isArray(t.modelValue)&&t.modelValue.length>0,g=Array.isArray(n.value)&&n.value.length>0;if(g&&N<n.value.length&&n.value.splice(N,1),y){const w=[...t.modelValue];N<w.length&&w.splice(N,1),d?.("update:modelValue",w),t.multiple||d?.("update:src",w[0]?.src||"")}else if(g){const w=t.multiple?n.value:n.value[0];d?.("update:modelValue",w),t.multiple||d?.("update:src",n.value[0]?.src||"")}else d?.("update:modelValue",t.multiple?[]:void 0),d?.("update:src","");o.value.splice(N,1),a.value=!1}function c(b){b.preventDefault(),i.value=!0}function A(b){b.preventDefault(),i.value=!1}function m(b){b.preventDefault(),i.value=!1;const N=b.dataTransfer,y=N&&Array.from(N.files||[]);o.value=y||[]}function f(){t.dropFiles&&(["dragenter","dragover"].forEach(b=>{document.body.addEventListener(b,c,!1)}),["dragleave","drop"].forEach(b=>{document.body.addEventListener(b,A,!1)}),document.body.addEventListener("drop",m,!1))}function h(){t.dropFiles&&(["dragenter","dragover"].forEach(b=>{document.body.removeEventListener(b,c,!1)}),["dragleave","drop"].forEach(b=>{document.body.removeEventListener(b,A,!1)}),document.body.removeEventListener("drop",m,!1))}return e.onMounted(()=>{f()}),e.onBeforeUnmount(()=>{h()}),{pending:l,files:o,dataUrls:n,imgLoaded:a,isDragging:i,thumbnails:r,uploadFile:s,removeFile:u,dragStart:c,dragStop:A,dragDrop:m,setupDragAndDrop:f,cleanupDragAndDrop:h}}const Qo=["src"],Fo=["onClick"],Oo=["onClick"],Ho=["for"],Wo=["innerHTML"],Uo={key:0,class:"file-upload__loading-spinner"},Ye=e.defineComponent({__name:"file-upload",props:{modelValue:{type:Array,default:[]},src:{type:String},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},multiple:{type:Boolean,default:!1},accept:{type:String},maxFileSize:{type:Number,default:0},endpoint:{type:String,default:""},toDataUrl:{type:Boolean,default:!0},authToken:{type:String,default:""},customFetch:null,baseResponsePath:{type:String,default:"/api/v1/assets"},enablePreview:{type:Boolean,default:!0},previewWidth:{type:Number,default:0},dropFiles:{type:Boolean,default:!1}},emits:["update:modelValue","update:src"],setup(t,{emit:d}){const l=t,o=d,{pending:n,files:a,dataUrls:i,isDragging:r,thumbnails:s,uploadFile:u,removeFile:c}=Ge(l,o);return e.watch(()=>a.value,async A=>{i.value=await Promise.all(A.map(async m=>({src:l.toDataUrl?await ye(m):await u(m),type:m.type})))},{deep:!0}),e.watch(()=>i.value,async A=>{const m=l.multiple?A:A[0];o("update:modelValue",m),l.multiple||o("update:src",A[0]&&A[0].src)},{deep:!0}),(A,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["file-upload",{"has-dragging":t.dropFiles,"is-dragging":e.unref(r)}])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.src,class:e.normalizeClass(t.enablePreview?"file-upload__thumbnail":"file-upload__reset")},[t.enablePreview?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("img",{src:`${f.src}${t.previewWidth?`?width=${t.previewWidth}`:""}`,class:"img-thumbnail rounded"},null,8,Qo),e.createElementVNode("button",{onClick:e.withModifiers(b=>e.unref(c)(h),["prevent"]),class:"btn btn--close"},[e.createVNode(M,{symbol:"x"})],8,Fo)],64)):(e.openBlock(),e.createElementBlock("button",{key:1,onClick:e.withModifiers(b=>e.unref(c)(h),["prevent"]),class:"btn btn--close btn-outline-contrast"},[e.createVNode(M,{symbol:"x"})],8,Oo))],2))),128)),e.createVNode(Le,{modelValue:e.unref(a),"onUpdate:modelValue":m[0]||(m[0]=f=>e.isRef(a)?a.value=f:null),id:t.id,name:t.name,accept:t.accept,"max-file-size":t.maxFileSize,class:"d-none"},null,8,["modelValue","id","name","accept","max-file-size"]),e.createElementVNode("label",{for:t.id,class:"file-upload__label"},[e.renderSlot(A.$slots,"button",{},()=>[e.createElementVNode("span",{class:"btn btn-outline-contrast",innerHTML:t.label||A.$t("common.selectFile")},null,8,Wo)]),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.unref(n)?(e.openBlock(),e.createElementBlock("span",Uo,[...m[1]||(m[1]=[e.createElementVNode("span",{class:"spinner-border",role:"status"},[e.createElementVNode("span",{class:"visually-hidden"},"Loading...")],-1)])])):e.createCommentVNode("",!0)]),_:1})],8,Ho)],2))}}),qo=["onDragenter","onDragover","onDragleave","onDragend","onDrop","innerHTML"],jo=["onDragstart","onDrag","onDragenter","onDragover","onDragleave","onDragend","onDrop"],Jo={key:0,class:"sortable-list__drag-handle"},_o={type:"button",class:"btn",draggable:"true"},Go={key:0,class:"sortable-list__item"},Ke=e.defineComponent({__name:"sortable-list",props:{modelValue:{type:Array,default:()=>[]},config:{type:Object,default:null},messages:{type:Object,default:{}},vertical:{type:Boolean,default:!0},showDragHandle:{type:Boolean,default:!1},showPreview:{type:Boolean,default:!0}},emits:["update:modelValue","update:isDragging","update:dragIndex","update:dragOverIndex"],setup(t,{emit:d}){const l=t,o=e.ref(!1),n=e.ref(null),a=e.ref(null),i=d,r=e.computed({get(){return l.modelValue},set(g){i("update:modelValue",g)}}),s=e.computed(()=>{const g=document.querySelector(".is-drag-item")?.outerHTML;return g?F(g):""}),u=e.useSlots(),c=e.computed(()=>u["list-append"]);function A(g,w){g.dataTransfer&&(g.dataTransfer.dropEffect="move",g.dataTransfer.effectAllowed="move",g.dataTransfer.setData("index",w.toLocaleString()),o.value=!0,n.value=w)}function m(g,w){o.value=!1,n.value=null,a.value=null}function f(g,w){}function h(g,w){a.value=n.value!==w?w:null}function b(g,w){a.value=n.value!==w?w:null}function N(g,w){}function y(g,w){if(g.dataTransfer){g.preventDefault();const D=Number(g.dataTransfer.getData("index")),B=w,$=[...r.value];(B||B===0)&&(D||D===0)&&$.splice(B,0,$.splice(D,1)[0]),r.value=$}}return e.watch(()=>o.value,g=>{i("update:isDragging",g)},{immediate:!0}),e.watch(()=>n.value,g=>{i("update:dragIndex",g)},{immediate:!0}),e.watch(()=>a.value,g=>{i("update:dragOverIndex",g)},{immediate:!0}),(g,w)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{name:"list",tag:"ul",class:e.normalizeClass(["sortable-list p-0 d-flex gap-2",{"flex-column":t.vertical,"flex-row flex-wrap":!t.vertical}]),onDragover:w[0]||(w[0]=e.withModifiers(()=>{},["prevent"])),onDragenter:w[1]||(w[1]=e.withModifiers(()=>{},["prevent"]))},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(D,B)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:B},[t.showPreview&&o.value&&a.value===B?(e.openBlock(),e.createElementBlock("li",{key:0,class:"sortable-list__item is-drop-target",onDragenter:$=>h($,B),onDragover:$=>b($,B),onDragleave:$=>void 0,onDragend:$=>m(),onDrop:$=>y($,B),innerHTML:s.value},null,40,qo)):e.createCommentVNode("",!0),e.createElementVNode("li",{class:e.normalizeClass(["sortable-list__item d-flex",{"is-drag-item":o.value&&n.value===B,"is-drop-target":o.value&&a.value===B&&!t.showPreview,"align-items-center gap-2":t.vertical}]),draggable:!0,onDragstart:$=>A($,B),onDrag:$=>void 0,onDragenter:$=>h($,B),onDragover:$=>b($,B),onDragleave:$=>void 0,onDragend:$=>m(),onDrop:$=>y($,B)},[t.showDragHandle?(e.openBlock(),e.createElementBlock("div",Jo,[e.createElementVNode("button",_o,[e.createVNode(M,{symbol:"drag"})])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["sortable-list__item-content",{"flex-grow-1":t.vertical}])},[e.renderSlot(g.$slots,"list-item",{item:D,index:B},()=>[e.createTextVNode(e.toDisplayString(D),1)])],2)],42,jo)],64))),128)),c.value?(e.openBlock(),e.createElementBlock("li",Go,[e.renderSlot(g.$slots,"list-append")])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}}),Yo={key:0,class:"image-editor position-relative"},Ko={class:"row mb-3"},Zo={class:"col"},Xo={class:"row gap-2 mb-4"},ei={class:"col-12"},ti={class:"input mb-2"},ai={class:"col"},ni={class:"input mb-0"},li={class:"col"},oi={class:"input mb-0"},ii={class:"row"},ri={class:"col d-flex justify-content-end gap-2"},Ai=["disabled"],Ze=e.defineComponent({__name:"image-resize",props:{modelValue:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},spinner:{type:Boolean,default:!1},ready:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=d,o=e.useTemplateRef("image"),n=e.ref(1),a=e.ref(0),i=e.ref(0),r=e.ref(null),s=e.ref(0),u=e.ref(0);function c(){r.value&&(l("update:modelValue",r.value),n.value=1)}const A=()=>{if(!s.value||!u.value)return;a.value=Math.round(s.value*n.value);const f=u.value/s.value;i.value=Math.round(a.value*f);const h=o.value?.$el;if(!h)return;const b=h.querySelector("img");b&&(r.value=Re(b,a.value,i.value,"image/png"))},m=Me.debounce(A,300);return e.watch(n,()=>{s.value&&(a.value=Math.round(s.value*n.value),m())}),e.watch(a,()=>{if(!s.value||a.value===0)return;const f=a.value/s.value;Math.abs(f-n.value)>1e-4&&(n.value=Number(f.toFixed(4)));const h=u.value/s.value;i.value=Math.round(a.value*h),m()}),e.watch(i,()=>{if(!u.value||i.value===0)return;const f=i.value/u.value;Math.abs(f-n.value)>1e-4&&(n.value=Number(f.toFixed(4)));const h=s.value/u.value;a.value=Math.round(i.value*h),m()}),e.onMounted(()=>{const f=o.value?.$el;if(!f)return;const h=f.querySelector("img");if(!h)return;const b=()=>{s.value=h.naturalWidth,u.value=h.naturalHeight,A()};h.complete?b():h.addEventListener("load",b)}),(f,h)=>t.modelValue?(e.openBlock(),e.createElementBlock("div",Yo,[e.createElementVNode("div",Ko,[e.createElementVNode("div",Zo,[e.createVNode(oe,{ref_key:"image",ref:o,class:"d-none",src:t.modelValue,animate:!1},null,8,["src"]),r.value?(e.openBlock(),e.createBlock(oe,{key:0,ref:"targetImage",class:"",src:r.value,animate:!1},null,8,["src"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Xo,[e.createElementVNode("div",ei,[e.createElementVNode("div",ti,[e.withDirectives(e.createElementVNode("input",{type:"range",class:"form-range",id:"scaleRange","onUpdate:modelValue":h[0]||(h[0]=b=>n.value=b),min:"0",max:"2",step:"0.0001"},null,512),[[e.vModelText,n.value]])])]),e.createElementVNode("div",ai,[e.createElementVNode("div",ni,[e.createVNode(Ae,{type:"number",class:"form-input mb-0",id:"targetWidth",modelValue:a.value,"onUpdate:modelValue":h[1]||(h[1]=b=>a.value=b)},null,8,["modelValue"])])]),h[3]||(h[3]=e.createElementVNode("div",{class:"col-auto d-flex align-items-center"},[e.createElementVNode("output",null,"×")],-1)),e.createElementVNode("div",li,[e.createElementVNode("div",oi,[e.createVNode(Ae,{type:"number",class:"form-input mb-0",id:"targetHeight",modelValue:i.value,"onUpdate:modelValue":h[2]||(h[2]=b=>i.value=b)},null,8,["modelValue"])])])]),e.createElementVNode("div",ii,[e.createElementVNode("div",ri,[e.renderSlot(f.$slots,"actions"),e.createElementVNode("button",{class:"btn btn-sm btn-primary",disabled:!r.value,onClick:e.withModifiers(c,["prevent","stop"])},e.toDisplayString(f.$t("common.apply")),9,Ai)])])])):e.createCommentVNode("",!0)}}),si={key:0,class:"image-crop"},ci={class:"row mb-4"},di={class:"col"},ui={class:"row"},mi={class:"col d-flex gap-2 justify-content-end gap-2"},Xe=e.defineComponent({__name:"image-crop",props:{modelValue:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},spinner:{type:Boolean,default:!1},ready:{type:Boolean,default:!1},aspectRatioOptions:{type:Array,default:()=>[{value:0,text:"Free"},{value:1,text:"1:1"},{value:4/3,text:"4:3"},{value:16/9,text:"16:9"},{value:3/4,text:"3:4"},{value:9/16,text:"9:16"}]},suggestedAspectRatio:Number},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.useTemplateRef("cropper"),a=e.ref(0);function i(){const{canvas:r}=n.value?.getResult(),s=r.toDataURL();o("update:modelValue",s)}return e.onBeforeMount(()=>{a.value=l.suggestedAspectRatio||0}),(r,s)=>t.modelValue?(e.openBlock(),e.createElementBlock("div",si,[e.createElementVNode("div",ci,[e.createElementVNode("div",di,[e.createVNode(e.unref(ut.Cropper),{ref:"cropper",class:"cropper",src:t.modelValue,"stencil-props":{...a.value!==0?{aspectRatio:a.value}:{}},"resize-image":!1},null,8,["src","stencil-props"])])]),s[1]||(s[1]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",ui,[e.createElementVNode("div",mi,[e.createVNode(ke,{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=u=>a.value=u),options:t.aspectRatioOptions,class:"mb-0"},null,8,["modelValue","options"]),e.renderSlot(r.$slots,"actions"),e.createElementVNode("button",{class:"btn btn-sm btn-primary",onClick:e.withModifiers(i,["prevent","stop"])},e.toDisplayString(r.$t("common.apply")),1)])])])):e.createCommentVNode("",!0)}}),fi={key:0,class:"image-crop-resize position-relative"},pi={class:"row"},gi={class:"col"},hi={key:3,class:"alert alert-warning mt-4 small p-2"},yi={key:4},bi={class:"row"},ki={class:"col-12"},wi={class:"d-flex"},Bi={key:0,class:"d-flex gap-3"},Ci={class:"caption"},Vi={class:"caption"},Ei={key:1,class:"ms-auto"},et=e.defineComponent({__name:"image-crop-resize",props:{modelValue:{type:String,default:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"/>',required:!0},spinner:{type:Boolean,default:!1},ready:{type:Boolean,default:!1},aspectRatio:Number},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.ref(!1),a=e.ref(!1),i=e.computed({get:()=>l.modelValue,set:s=>o("update:modelValue",s)}),r=e.computed(()=>l.modelValue.startsWith("data:image/svg+xml"));return e.watch(()=>[n.value,i.value],(s,u)=>{s[0]&&s[0]===u[0]&&(n.value=!1)}),e.watch(()=>[a.value,i.value],(s,u)=>{s[0]&&s[0]===u[0]&&(a.value=!1)}),e.onMounted(()=>{}),(s,u)=>t.modelValue?(e.openBlock(),e.createElementBlock("div",fi,[e.createElementVNode("div",pi,[e.createElementVNode("div",gi,[n.value||a.value?n.value?(e.openBlock(),e.createBlock(Ze,{key:1,modelValue:i.value,"onUpdate:modelValue":u[1]||(u[1]=c=>i.value=c)},{actions:e.withCtx(()=>[e.createElementVNode("button",{class:"btn btn-outline-ccontrast",onClick:u[0]||(u[0]=e.withModifiers(c=>n.value=!1,["prevent","stop"]))},e.toDisplayString(s.$t("common.cancel")),1)]),_:1},8,["modelValue"])):a.value?(e.openBlock(),e.createBlock(Xe,{key:2,modelValue:i.value,"onUpdate:modelValue":u[3]||(u[3]=c=>i.value=c),"suggested-aspect-ratio":t.aspectRatio},{actions:e.withCtx(()=>[e.createElementVNode("button",{class:"btn btn-sm btn-outline-ccontrast",onClick:u[2]||(u[2]=e.withModifiers(c=>a.value=!1,["prevent","stop"]))},e.toDisplayString(s.$t("common.cancel")),1)]),_:1},8,["modelValue","suggested-aspect-ratio"])):e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe,{key:0,ref:"targetImage",class:"",animate:!1,src:t.modelValue},null,8,["src"])),r.value?(e.openBlock(),e.createElementBlock("div",hi,e.toDisplayString(s.$t("common.svgWarning")),1)):e.createCommentVNode("",!0),!a.value&&!n.value?(e.openBlock(),e.createElementBlock("hr",yi)):e.createCommentVNode("",!0),e.createElementVNode("div",bi,[e.createElementVNode("div",ki,[e.createElementVNode("div",wi,[!a.value&&!n.value?(e.openBlock(),e.createElementBlock("div",Bi,[e.createElementVNode("button",{type:"button",class:"btn btn-light",onClick:u[4]||(u[4]=e.withModifiers(c=>a.value=!a.value,["prevent","stop"]))},[e.createVNode(M,{symbol:"crop"}),e.createElementVNode("span",Ci,e.toDisplayString(s.$t("common.crop")),1)]),e.createElementVNode("button",{type:"button",class:"btn btn-light",onClick:u[5]||(u[5]=e.withModifiers(c=>n.value=!n.value,["prevent","stop"]))},[e.createVNode(M,{symbol:"image-upscale"}),e.createElementVNode("span",Vi,e.toDisplayString(s.$t("common.resize")),1)])])):e.createCommentVNode("",!0),!a.value&&!n.value?(e.openBlock(),e.createElementBlock("div",Ei,[e.renderSlot(s.$slots,"submit")])):e.createCommentVNode("",!0)])])])])])])):e.createCommentVNode("",!0)}}),$i={class:"modal-dialog__content d-flex flex-column"},Si={class:"modal-dialog__header d-flex p-3 border-bottom"},Ni={key:0,class:"modal-dialog__title",id:"exampleModalLabel"},Mi={class:"modal-dialog__body"},Di={key:0,class:"modal-dialog__footer d-flex p-3 border-top"},tt=e.defineComponent({__name:"modal-dialog",props:{modelValue:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},size:{type:String,default:"md"},dismiss:{type:Boolean,default:!0},title:{type:String,default:""},footer:{type:Boolean,default:!0},classes:{type:String,default:""}},emits:["update:modelValue","confirm","cancel"],setup(t,{expose:d,emit:l}){const o=t,n=l,a=e.ref();function i(){document.documentElement.style.setProperty("--scroll-position",`${Math.round(document.documentElement.scrollTop)}px`),o.modal?a.value?.showModal():a.value?.show(),n("update:modelValue",!0)}function r(){const m=a.value&&new KeyframeEffect(a.value,[{translate:"0 -100%",opacity:"0"}],{duration:320,easing:"ease",direction:"normal"}),f=new Animation(m,document.timeline);f.play(),f.addEventListener("finish",()=>{a.value?.close(),s()}),n("update:modelValue",!1)}function s(){const m=getComputedStyle(document.documentElement).getPropertyValue("--scroll-position");document.documentElement.scrollTo({top:parseInt(m,10),behavior:"instant"}),n("update:modelValue",!1)}function u(m){i(),n("confirm",m)}function c(){r(),n("cancel")}function A(m){const f=m.target;f&&f.nodeName==="DIALOG"&&r()}return e.watch(()=>o.modelValue,(m,f)=>{m&&m!==f?i():f&&r()},{immediate:!0}),e.onMounted(()=>{a.value?.addEventListener("cancel",m=>{m.preventDefault(),r()}),o.dismiss&&document.addEventListener("click",A),o.modelValue&&i()}),e.onBeforeUnmount(()=>{o.dismiss&&document.removeEventListener("click",A)}),d({show:i,close:r,confirm:u,cancel:c}),(m,f)=>(e.openBlock(),e.createElementBlock("dialog",{ref_key:"dialog",ref:a,class:e.normalizeClass(["modal-dialog",{[`modal-dialog--${t.size}`]:t.size}]),onClose:s},[e.createElementVNode("div",$i,[e.createElementVNode("div",Si,[t.title?(e.openBlock(),e.createElementBlock("h5",Ni,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"btn-close ms-auto border-radius-none","aria-label":"Close",onClick:r})]),e.createElementVNode("div",Mi,[e.renderSlot(m.$slots,"default")]),t.footer?(e.openBlock(),e.createElementBlock("div",Di,[e.renderSlot(m.$slots,"footer"),e.createElementVNode("button",{type:"button",class:"btn ms-auto",onClick:r},e.toDisplayString(m.$t("common.close")),1)])):e.createCommentVNode("",!0)])],34))}}),vi={class:"image-upload__controls"},Li={class:"d-flex gap-1 align-items-center"},Ii={key:1,class:"image-upload__controls"},Pi=["for"],Ti=["innerHTML"],xi={key:0,class:"image-upload__loading-spinner"},at=e.defineComponent({__name:"image-upload",props:{modelValue:{type:Object,default:void 0},src:{type:String},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},pattern:{type:String,default:null},accept:{type:String,default:"image/*"},maxFileSize:{type:Number,default:0},endpoint:{type:String,default:""},toDataUrl:{type:Boolean,default:!0},authToken:{type:String,default:""},customFetch:null,baseResponsePath:{type:String,default:"/api/v1/assets"},enablePreview:{type:Boolean,default:!0},previewWidth:{type:Number,default:0},dropFiles:{type:Boolean,default:!1},enableReview:{type:Boolean,default:!0},maxImageWidth:{type:Number,default:4096},aspectRatio:Number},emits:["update:modelValue","update:src"],setup(t,{emit:d}){const l=t,o=d,n=e.ref(!1),a=e.ref(null),i=e.ref(null),r=e.ref(null),{pending:s,files:u,imgLoaded:c,isDragging:A,uploadFile:m,setupDragAndDrop:f,cleanupDragAndDrop:h}=Ge(l,o),b=e.computed(()=>l.modelValue?l.modelValue:l.src?{type:"",src:l.src}:a.value);function N(){a.value=null,u.value=[],c.value=!1,o("update:modelValue",void 0),o("update:src","")}function y(){N()}e.watch(()=>u.value,async D=>{if(!D||!D.length||!D[0])return;c.value=!1;const B=await Et(D[0],l.maxImageWidth);l.enableReview?(i.value={src:await ye(B),type:B.type},n.value=!0):a.value={src:l.toDataUrl?await ye(B):await m(B),type:B.type}}),e.watch(()=>a.value,D=>{o("update:modelValue",D||void 0),o("update:src",D?.src||"")}),e.watch(()=>r.value,async D=>{D&&(a.value={src:await m(D),type:D.type},r.value=null)}),e.watch(()=>n.value,(D,B)=>{!D&&B&&i.value&&(i.value=null,y())}),e.watch(()=>l.src,D=>{!D&&a.value&&y()});function g(D,B){i.value={src:D,type:B},n.value=!0}async function w(){i.value&&(r.value=await ze(i.value.src,"file",i.value.type)),i.value=null,n.value=!1}return e.onMounted(()=>{f()}),e.onBeforeUnmount(()=>{h()}),(D,B)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["image-upload",{"has-dragging":t.dropFiles,"is-dragging":e.unref(A)}])},[!n.value&&b.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mb-2",t.enablePreview?"image-upload__thumbnail":"image-upload__reset"])},[t.enablePreview?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(oe,{src:`${b.value.src}${t.previewWidth?`?width=${t.previewWidth}`:""}`,class:"img-thumbnail rounded",ready:e.unref(c),"onUpdate:ready":B[0]||(B[0]=$=>e.isRef(c)?c.value=$:null),animate:!1,style:e.normalizeStyle({maxWidth:t.previewWidth?`${t.previewWidth}px`:"auto",height:"auto"})},null,8,["src","ready","style"]),e.createElementVNode("div",vi,[e.createElementVNode("div",Li,[e.createElementVNode("button",{type:"button",onClick:B[1]||(B[1]=e.withModifiers($=>g(b.value.src,b.value.type),["prevent","stop"])),class:"btn btn--edit btn-sm btn-light"},[e.createVNode(M,{symbol:"edit-2"})]),e.createElementVNode("button",{type:"button",onClick:B[2]||(B[2]=e.withModifiers($=>N(),["prevent","stop"])),class:"btn btn--close btn-sm btn-light"},[e.createVNode(M,{symbol:"x"})])])])],64)):(e.openBlock(),e.createElementBlock("div",Ii,[e.createElementVNode("button",{onClick:B[3]||(B[3]=e.withModifiers($=>N(),["prevent","stop"])),class:"btn btn--close btn-outline-contrast"},[e.createVNode(M,{symbol:"x"})])]))],2)):e.createCommentVNode("",!0),e.createVNode(Le,{modelValue:e.unref(u),"onUpdate:modelValue":B[4]||(B[4]=$=>e.isRef(u)?u.value=$:null),id:t.id,name:t.name,accept:t.accept,"max-file-size":t.maxFileSize,class:"d-none"},null,8,["modelValue","id","name","accept","max-file-size"]),t.src?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("label",{key:1,for:t.id,class:"image-upload__label"},[e.renderSlot(D.$slots,"button",{},()=>[e.createElementVNode("span",{class:"btn btn-outline-contrast",innerHTML:t.label||D.$t("common.selectFile")},null,8,Ti)]),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createElementBlock("span",xi,[...B[7]||(B[7]=[e.createElementVNode("span",{class:"spinner-border",role:"status"},[e.createElementVNode("span",{class:"visually-hidden"},"Loading...")],-1)])])):e.createCommentVNode("",!0)]),_:1})],8,Pi)),e.createVNode(tt,{modelValue:n.value,"onUpdate:modelValue":B[6]||(B[6]=$=>n.value=$),footer:!1},{default:e.withCtx(()=>[n.value&&i.value?(e.openBlock(),e.createBlock(et,{key:0,modelValue:i.value.src,"onUpdate:modelValue":B[5]||(B[5]=$=>i.value.src=$),"aspect-ratio":t.aspectRatio},{submit:e.withCtx(()=>[e.createElementVNode("button",{class:"btn btn-primary",onClick:e.withModifiers(w,["prevent","stop"])},e.toDisplayString(D.$t("common.save")),1)]),_:1},8,["modelValue","aspect-ratio"])):e.createCommentVNode("",!0)]),_:1},8,["modelValue"])],2))}}),zi={class:"upload-group"},Ri=["innerHTML"],Qi={class:"upload-group__list"},Fi={class:"img-container"},Oi=["src"],Hi=["onClick"],Wi={role:"button",class:"img-thumbnail d-flex justify-content-center align-items-center"},Ui={role:"button",class:"img-thumbnail d-flex justify-content-center align-items-center"},nt=e.defineComponent({__name:"upload-group",props:{modelValue:{type:Array,default:()=>[]},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},accept:{type:String},maxFileSize:{type:Number,default:0},endpoint:{type:String,default:""},authToken:{type:String,default:""},customFetch:null,baseResponsePath:{type:String,default:"/api/v1/assets"},previewWidth:{type:Number,default:0},useImageUpload:{type:Boolean,default:!1},maxImageWidth:{type:Number,default:0},aspectRatio:Number},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.ref(""),a=e.computed({get(){return l.modelValue},set(r){o("update:modelValue",r)}});function i(r){a.value.splice(r,1),o("update:modelValue",a.value)}return e.watch(n,async(r,s)=>{r&&s!==r&&(o("update:modelValue",[...a.value,r]),await e.nextTick(),n.value="")}),(r,s)=>(e.openBlock(),e.createElementBlock("div",zi,[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,innerHTML:e.unref(F)(t.label)},null,8,Ri)):e.createCommentVNode("",!0),e.createElementVNode("div",Qi,[e.createVNode(Ke,{modelValue:a.value,"onUpdate:modelValue":s[2]||(s[2]=u=>a.value=u),vertical:!1,class:"mb-3"},{"list-item":e.withCtx(({item:u,index:c})=>[e.createElementVNode("div",Fi,[e.createElementVNode("img",{src:`${u}${t.previewWidth?`?width=${t.previewWidth}`:""}`,class:"img-thumbnail"},null,8,Oi),e.createElementVNode("button",{onClick:e.withModifiers(A=>i(c),["prevent"]),class:"btn btn--close"},[e.createVNode(M,{symbol:"x"})],8,Hi)])]),"list-append":e.withCtx(()=>[t.useImageUpload?(e.openBlock(),e.createBlock(at,{key:0,src:n.value,"onUpdate:src":s[0]||(s[0]=u=>n.value=u),endpoint:t.endpoint,"custom-fetch":t.customFetch,"to-data-url":!t.endpoint,"auth-token":t.authToken,disabled:t.disabled,"base-response-path":t.baseResponsePath,accept:t.accept,"max-file-size":t.maxFileSize,"max-image-width":t.maxImageWidth,"enable-preview":!1,"aspect-ratio":t.aspectRatio},{button:e.withCtx(()=>[e.createElementVNode("span",Wi,[e.createVNode(M,{symbol:"plus"})])]),_:1},8,["src","endpoint","custom-fetch","to-data-url","auth-token","disabled","base-response-path","accept","max-file-size","max-image-width","aspect-ratio"])):(e.openBlock(),e.createBlock(Ye,{key:1,src:n.value,"onUpdate:src":s[1]||(s[1]=u=>n.value=u),multiple:!1,endpoint:t.endpoint,"custom-fetch":t.customFetch,"to-data-url":!t.endpoint,"auth-token":t.authToken,disabled:t.disabled,"base-response-path":t.baseResponsePath,accept:t.accept,"max-file-size":t.maxFileSize,"max-image-width":t.maxImageWidth},{button:e.withCtx(()=>[e.createElementVNode("span",Ui,[e.createVNode(M,{symbol:"plus"})])]),_:1},8,["src","endpoint","custom-fetch","to-data-url","auth-token","disabled","base-response-path","accept","max-file-size","max-image-width"]))]),_:1},8,["modelValue"])])]))}}),qi={class:"asset-uploader"},ji=["innerHTML"],Ji=e.defineComponent({__name:"asset-uploader",props:{modelValue:{type:Array,default:()=>[]},name:{type:String,default:()=>I()},id:{type:String,default:()=>I()},type:{type:String,default:""},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},accept:{type:String},maxFileSize:{type:Number,default:0},endpoint:{type:String,default:""},authToken:{type:String,default:""},customFetch:null,mediaTypeMap:{type:Object,default:()=>({svg:"Svg",png:"Image",jpg:"Image"})},baseResponsePath:{type:String,default:"/api/v1/assets"},previewWidth:{type:Number,default:0},useImageUpload:{type:Boolean,default:!1},maxImageWidth:{type:Number,default:0},aspectRatio:Number},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.computed({get(){return l.modelValue.map(a=>a.src)},set(a){o("update:modelValue",a.map((i,r)=>({mediaType:l.modelValue[r]&&l.modelValue[r].mediaType||i.includes("data:image")?i.includes("data:image/svg")?"Svg":"Image":l.mediaTypeMap[i.split(".")[1]],src:i,name:l.modelValue[r]&&l.modelValue[r].name||`${l.name}-${r}`,...l.type?{type:l.type}:{}})))}});return(a,i)=>(e.openBlock(),e.createElementBlock("div",qi,[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,innerHTML:e.unref(F)(t.label)},null,8,ji)):e.createCommentVNode("",!0),e.createVNode(nt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),endpoint:t.endpoint,"custom-fetch":t.customFetch,"auth-token":t.authToken,disabled:t.disabled,"preview-width":t.previewWidth,"base-response-path":t.baseResponsePath,accept:t.accept,"max-file-size":t.maxFileSize,"use-image-upload":t.useImageUpload,"max-image-width":t.maxImageWidth,"aspect-ratio":t.aspectRatio},null,8,["modelValue","endpoint","custom-fetch","auth-token","disabled","preview-width","base-response-path","accept","max-file-size","use-image-upload","max-image-width","aspect-ratio"])]))}}),_i="https://router.project-osrm.org/route/v1";function lt(){const t=e.ref([]),d=e.ref(null),l=e.ref(null),o=e.ref([]),n=e.ref(!1),a=e.ref(""),i=e.computed(()=>t.value.length>1);function r(){t.value=[],d.value=null,l.value=null,o.value=[],a.value=""}async function s(u,c,A={}){if(!u||!c)return r(),null;n.value=!0;const m=A.customFetch||pe.ofetch,f=(A.endpoint||_i).replace(/\/$/,""),h=A.profile||"driving";try{const N=(await m(`${f}/${h}/${u.lng},${u.lat};${c.lng},${c.lat}`,{method:"GET",query:{alternatives:!1,overview:"full",steps:!0,geometries:"geojson"}}))?.routes?.[0];if(!N)throw new Error("No route available for these points.");return t.value=Array.isArray(N?.geometry?.coordinates)?N.geometry.coordinates.map(y=>[Number(y[1]),Number(y[0])]).filter(y=>Number.isFinite(y[0])&&Number.isFinite(y[1])):[],d.value=Number.isFinite(N?.distance)?Number(N.distance):null,l.value=Number.isFinite(N?.duration)?Number(N.duration):null,o.value=Array.isArray(N?.legs)?N.legs.flatMap(y=>Array.isArray(y?.steps)?y.steps.map(g=>Gi(g)):[]):[],a.value="",N}catch(b){return r(),a.value=b?.message||"Unable to load directions right now.",null}finally{n.value=!1}}return{routeCoordinates:t,distanceMeters:d,durationSeconds:l,steps:o,pending:n,error:a,hasRoute:i,fetchRoute:s,clearRoute:r}}function Gi(t){const d=`${t?.maneuver?.type||"continue"}`,l=t?.maneuver?.modifier?` ${t.maneuver.modifier}`:"",o=`${t?.name||""}`;return{instruction:`${Yi(d)}${l}${o?` on ${o}`:""}`.trim(),name:o,distance:Number.isFinite(t?.distance)?Number(t.distance):0,duration:Number.isFinite(t?.duration)?Number(t.duration):0}}function Yi(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Ki="https://nominatim.openstreetmap.org/search",Zi="https://nominatim.openstreetmap.org/reverse";function ot(){const t=e.ref([]),d=e.ref(!1),l=e.ref("");function o(){t.value=[],l.value=""}async function n(i,r={}){if(!i.trim())return o(),[];d.value=!0;const s=r.customFetch||pe.ofetch;try{const u=await s(r.endpoint||Ki,{method:"GET",headers:{Accept:"application/json",...r.language?{"Accept-Language":r.language}:{}},query:{q:i,format:"jsonv2",addressdetails:1,limit:r.limit||5}});return t.value=Array.isArray(u)?u.map((c,A)=>it(c,A,"geocoder")).filter(c=>!!c):[],l.value="",t.value}catch(u){return l.value=u?.message||"Unable to search locations right now.",t.value=[],[]}finally{d.value=!1}}async function a(i,r={}){d.value=!0;const s=r.customFetch||pe.ofetch;try{const u=await s(r.reverseEndpoint||Zi,{method:"GET",headers:{Accept:"application/json",...r.language?{"Accept-Language":r.language}:{}},query:{lat:i.lat,lon:i.lng,format:"jsonv2",addressdetails:1}}),c=it(u,0,"reverse-geocoder");return l.value="",c}catch(u){return l.value=u?.message||"Unable to resolve this location right now.",null}finally{d.value=!1}}return{results:t,pending:d,error:l,search:n,reverse:a,clearResults:o}}function it(t,d,l){const o=Number(t?.lat),n=Number(t?.lon??t?.lng);if(!Number.isFinite(o)||!Number.isFinite(n))return null;const a=`${t?.display_name||t?.name||"Location"}`,i=`${t?.name||a.split(",")[0]||"Location"}`.trim();return{id:`${l==="reverse-geocoder"?"reverse":"geo"}-${t?.place_id??d}`,title:i,address:a,lat:o,lng:n,source:l,raw:t}}function rt(t={}){const d=e.ref(null),l=e.ref(""),o=e.ref(!1),n=e.ref(!1),a=typeof window<"u"&&typeof navigator<"u"&&"geolocation"in navigator,i={enableHighAccuracy:!0,timeout:1e4,maximumAge:1e4,...t};let r=null;function s(f){d.value={lat:Number(f.latitude),lng:Number(f.longitude),accuracy:Number.isFinite(f.accuracy)?Number(f.accuracy):null},o.value=!1,l.value=""}function u(f){l.value=typeof f=="string"?f:f instanceof Error?f.message:f.message||"Unable to retrieve your location.",o.value=!1}async function c(){return a?(o.value=!0,new Promise(f=>{navigator.geolocation.getCurrentPosition(({coords:h})=>{s(h),f(d.value)},h=>{u(h),f(null)},i)})):(u("Geolocation is not supported in this browser."),null)}function A(){if(!a){u("Geolocation is not supported in this browser.");return}r===null&&(o.value=!0,n.value=!0,r=navigator.geolocation.watchPosition(({coords:f})=>{s(f)},f=>{u(f),n.value=!1},i))}function m(){if(!a||r===null){n.value=!1,o.value=!1;return}navigator.geolocation.clearWatch(r),r=null,n.value=!1,o.value=!1}return e.onBeforeUnmount(()=>{m()}),{supported:a,position:e.computed(()=>d.value),accuracy:e.computed(()=>d.value?.accuracy??null),error:l,pending:o,isTracking:n,locate:c,startTracking:A,stopTracking:m}}const Xi={class:"location-finder","data-testid":"location-finder"},er={class:"location-finder__actions"},tr=["disabled"],ar={key:1,class:"location-finder__notice","data-testid":"location-finder-error"},nr={class:"location-finder__map-panel"},lr=["aria-label"],or={class:"location-finder__legend-item"},ir={class:"location-finder__legend-item"},rr={class:"location-finder__legend-item"},Ar={class:"location-finder__legend-item"},sr={key:0,class:"location-finder__sidebar"},cr={key:1,class:"location-finder__summary","data-testid":"location-finder-directions"},dr={class:"location-finder__summary-title"},ur={key:0,class:"location-finder__summary-copy"},mr={class:"location-finder__summary-grid"},fr={class:"location-finder__summary-label"},pr={"data-testid":"location-finder-distance"},gr={class:"location-finder__summary-label"},hr={"data-testid":"location-finder-duration"},yr={key:0,class:"location-finder__steps"},br={key:0},kr={key:2,class:"location-finder__summary-copy"},wr=e.defineComponent({__name:"location-finder",props:{modelValue:{type:Object,default:null},locations:{type:Array,default:()=>[]},center:{type:Object,default:null},distance:{type:Number,default:null},userLocation:{type:Object,default:null},messages:{type:Object,default:()=>({})},mapHeight:{type:String,default:"26rem"},searchLabel:{type:String,default:""},searchPlaceholder:{type:String,default:""},resultsLabel:{type:String,default:""},emptyText:{type:String,default:""},locateButtonLabel:{type:String,default:""},stopTrackingLabel:{type:String,default:""},mapHelperText:{type:String,default:""},enableGeocoding:{type:Boolean,default:!1},geocodingEndpoint:{type:String,default:"https://nominatim.openstreetmap.org/search"},reverseGeocodingEndpoint:{type:String,default:"https://nominatim.openstreetmap.org/reverse"},geocodingLimit:{type:Number,default:5},geocodingMinQueryLength:{type:Number,default:3},customGeocodingFetch:null,enableDirections:{type:Boolean,default:!1},directionsEndpoint:{type:String,default:"https://router.project-osrm.org/route/v1"},routeProfile:{type:String,default:"driving"},customDirectionsFetch:null,showDirectionsSummary:{type:Boolean,default:!0},showDirectionsSteps:{type:Boolean,default:!0},directionsTitle:{type:String,default:""},directionsEmptyText:{type:String,default:""},distanceLabel:{type:String,default:""},durationLabel:{type:String,default:""},routeColor:{type:String,default:"#2563eb"},routeWeight:{type:Number,default:5},selectionRadius:{type:Number,default:0},selectionRadiusColor:{type:String,default:"#2563eb"},selectionRadiusFillColor:{type:String,default:"#60a5fa"},mapStyle:{type:String,default:"streets"},tileLayerUrl:{type:String,default:""},tileLayerAttribution:{type:String,default:""},disabled:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1},showSearch:{type:Boolean,default:!0},showLegend:{type:Boolean,default:!0},showSidebar:{type:Boolean,default:!0},showTrackButton:{type:Boolean,default:!0},trackUser:{type:Boolean,default:!0},autoLocate:{type:Boolean,default:!1}},emits:["update:modelValue","update:distance","select","search","track-user"],setup(t,{emit:d}){const l={lat:48.8566,lng:2.3522},o={searchLabel:"Search locations",searchPlaceholder:"Search by name or address",resultsLabel:"Locations",emptyText:"No locations found.",locateButtonLabel:"Use my location",stopTrackingLabel:"Stop tracking",mapHelperText:"Select a location from the list or use the map.",directionsTitle:"Directions",directionsEmptyText:"Select a destination and share your location to preview a route.",distanceLabel:"Distance",durationLabel:"ETA",loadingRoute:"Loading route…",legendAriaLabel:"Map marker types",legendLocations:"Locations",legendSelected:"Selected",legendSearchResult:"Search result",userLocationLabel:"Your location",pinnedLocationTitle:"Pinned location",selectedLocationLabel:"Selected location"},n=t,a=d,{t:i,te:r}=Ne.useI18n({useScope:"global"}),s=rt(),u=ot(),c=lt(),A=e.ref(""),m=e.ref(W(L(n.modelValue))),f=e.ref(W(L(n.modelValue))?null:L(n.modelValue)),h=e.ref(V(n.modelValue)||V(n.center)||V(n.locations[0])||l),b=e.ref(!1),N=e.computed(()=>V(n.userLocation)),y=e.computed(()=>s.position.value||N.value),g=e.computed(()=>V(f.value)),w=e.computed(()=>V(m.value)),D=e.computed(()=>y.value||g.value),B=e.computed(()=>!D.value||!w.value?null:fe(D.value,w.value)),$=e.computed(()=>V(n.modelValue)||g.value||w.value),q=e.computed(()=>s.error.value||u.error.value||c.error.value||""),X=e.computed(()=>n.showSearch||n.trackUser&&n.showTrackButton),j=e.computed(()=>n.enableDirections&&n.showDirectionsSummary),ee=e.computed(()=>n.showSidebar||j.value),de=e.computed(()=>$e(c.distanceMeters.value)),Be=e.computed(()=>ae(c.durationSeconds.value)),x=e.computed(()=>({searchLabel:R("searchLabel",n.searchLabel),searchPlaceholder:R("searchPlaceholder",n.searchPlaceholder),resultsLabel:R("resultsLabel",n.resultsLabel),emptyText:R("emptyText",n.emptyText),locateButtonLabel:R("locateButtonLabel",n.locateButtonLabel),stopTrackingLabel:R("stopTrackingLabel",n.stopTrackingLabel),mapHelperText:R("mapHelperText",n.mapHelperText),directionsTitle:R("directionsTitle",n.directionsTitle),directionsEmptyText:R("directionsEmptyText",n.directionsEmptyText),distanceLabel:R("distanceLabel",n.distanceLabel),durationLabel:R("durationLabel",n.durationLabel),loadingRoute:R("loadingRoute"),legendAriaLabel:R("legendAriaLabel"),legendLocations:R("legendLocations"),legendSelected:R("legendSelected"),legendSearchResult:R("legendSearchResult"),userLocationLabel:R("userLocationLabel"),pinnedLocationTitle:R("pinnedLocationTitle"),selectedLocationLabel:R("selectedLocationLabel")})),ie=e.computed(()=>f.value?re(f.value):x.value.selectedLocationLabel),E=e.computed(()=>s.isTracking.value&&b.value?x.value.stopTrackingLabel:x.value.locateButtonLabel);e.watch(()=>n.modelValue,p=>{const k=L(p),S=W(k);S?(m.value=S,f.value=null):k&&(f.value=k);const T=V(p);T&&(h.value=T)},{immediate:!0}),e.watch(()=>n.center,p=>{const k=V(p);k&&(h.value=k)},{deep:!0}),e.watch(y,p=>{p&&b.value&&(h.value=p)},{deep:!0}),e.watch(B,p=>{a("update:distance",p)},{immediate:!0}),e.watch(A,async p=>{if(a("search",p),!n.enableGeocoding){u.clearResults();return}const k=p.trim();if(k.length<n.geocodingMinQueryLength){u.clearResults();return}await u.search(k,{endpoint:n.geocodingEndpoint,customFetch:n.customGeocodingFetch,limit:n.geocodingLimit})}),e.watch(()=>({enabled:n.enableDirections,origin:y.value,destination:$.value,profile:n.routeProfile}),async({enabled:p,origin:k,destination:S,profile:T})=>{if(!p||!k||!S||te(k,S)){c.clearRoute();return}await c.fetchRoute(k,S,{endpoint:n.directionsEndpoint,profile:T,customFetch:n.customDirectionsFetch})},{immediate:!0,deep:!0}),e.onMounted(async()=>{n.autoLocate&&n.trackUser&&await ct()});const v=e.computed(()=>{const p=Ee(A.value).trim();return p?n.locations.filter(k=>[re(k),J(k)].filter(Boolean).some(S=>Ee(S).includes(p))):n.locations}),P=e.computed(()=>u.results.value.map(p=>({id:p.id,title:p.title,address:p.address,lat:p.lat,lng:p.lng,source:p.source}))),Q=e.computed(()=>{if(!A.value.trim())return n.locations;const p=v.value;return p.length?p:n.locations}),G=e.computed(()=>Q.value),ue=e.computed(()=>Y(Q.value,n.enableGeocoding?P.value:[])),Ce=e.computed(()=>Array.from(new Set(ue.value.map(p=>U(p))))),me=e.computed(()=>G.value.map(p=>{const k=V(p);return k?{id:z(p),label:re(p),...k,type:w.value&&te(k,w.value)?"selected":"list"}:null}).filter(p=>!!p)),Ve=e.computed(()=>b.value&&y.value?y.value:h.value||$.value||y.value||V(G.value[0])||l);function R(p,k){const S=n.messages?.[p];if(typeof S=="string"&&S.trim())return S;if(typeof k=="string"&&k.trim())return k;const T=`locationFinder.${String(p)}`;return r(T)?String(i(T)):o[p]}function V(p){if(!p)return null;const k=Number(p.lat),S=Number(p.lng);return!Number.isFinite(k)||!Number.isFinite(S)?null:{lat:k,lng:S}}function L(p){if(!p)return null;const k=V(p);return k?{...p,...k}:null}function z(p){return p?typeof p!="object"?p:p.id??p.value??U(p):null}function W(p){return p&&n.locations.find(k=>z(k)===z(p)||te(V(k),V(p)))||null}function Ee(p){return`${p??""}`.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function re(p){return`${p.title||p.label||p.name||"Location"}`}function J(p){return`${p.address||p.description||p.subtitle||""}`}function U(p){const k=re(p),S=J(p);return S?`${k} — ${S}`:k}function Y(p,k){const S=[...p];return k.forEach(T=>{S.some(Se=>z(Se)===z(T)||te(V(Se),V(T)))||S.push(T)}),S}function te(p,k){return!p||!k?!1:Math.abs(p.lat-k.lat)<1e-6&&Math.abs(p.lng-k.lng)<1e-6}function fe(p,k){const S=_A=>_A*(Math.PI/180),ce=S(k.lat-p.lat),Se=S(k.lng-p.lng),qA=S(p.lat),jA=S(k.lat),dt=Math.sin(ce/2)**2+Math.cos(qA)*Math.cos(jA)*Math.sin(Se/2)**2,JA=2*Math.atan2(Math.sqrt(dt),Math.sqrt(1-dt));return Math.round(6371e3*JA)}function $e(p){return p===null||!Number.isFinite(p)?"—":p>=1e3?`${(p/1e3).toFixed(1)} km`:`${Math.round(p)} m`}function ae(p){if(p===null||!Number.isFinite(p))return"—";const k=Math.max(1,Math.round(p/60));if(k<60)return`${k} min`;const S=Math.floor(k/60),T=k%60;return T?`${S} h ${T} min`:`${S} h`}function se(p){const k=L(p),S=W(k);if(b.value=!1,!k){a("update:modelValue",null);return}m.value=S||k;const T=V(k);T&&(h.value=T),a("update:modelValue",k),a("select",k)}function _(p){const k=L(p),S=W(k);if(b.value=!1,!k){a("update:modelValue",null);return}S?(m.value=S,f.value=null):f.value=k;const T=V(k);T&&(h.value=T),a("update:modelValue",k),a("select",k)}function ne(p){const k=ue.value.find(S=>U(S)===p||re(S)===p);if(k){if(W(k)){se(k),f.value=null;return}_(k)}}function K(p){se(p)}function le(p){if(p.id==="user-location"&&y.value){h.value=y.value,b.value=!0,a("track-user",y.value);return}const k=G.value.find(S=>z(S)===p.id)||G.value.find(S=>{const T=V(S);return T&&Math.abs(T.lat-p.lat)<1e-6&&Math.abs(T.lng-p.lng)<1e-6});if(k){se(k);return}f.value&&(z(f.value)===p.id||te(V(f.value),{lat:p.lat,lng:p.lng}))&&_(f.value)}async function WA(p){if(h.value=p,b.value=!1,!n.interactive)return;const k=G.value.find(T=>{const ce=V(T);return ce&&Math.abs(ce.lat-p.lat)<1e-6&&Math.abs(ce.lng-p.lng)<1e-6});if(k){se(k);return}const S=await UA(p,x.value.pinnedLocationTitle);_(S)}async function UA(p,k){if(!n.enableGeocoding)return{id:`pin-${p.lat}-${p.lng}`,title:k,lat:p.lat,lng:p.lng};const S=await u.reverse(p,{reverseEndpoint:n.reverseGeocodingEndpoint,customFetch:n.customGeocodingFetch});return S?{id:S.id,title:S.title||k,address:S.address,lat:S.lat,lng:S.lng,source:S.source}:{id:`pin-${p.lat}-${p.lng}`,title:k,lat:p.lat,lng:p.lng}}async function ct(){if(s.isTracking.value&&b.value){s.stopTracking(),b.value=!1;return}if(y.value){h.value=y.value,b.value=!0,a("track-user",y.value),!s.isTracking.value&&!N.value&&s.startTracking();return}const p=await s.locate();p&&(h.value=p,b.value=!0,a("track-user",p),s.startTracking())}return(p,k)=>(e.openBlock(),e.createElementBlock("div",Xi,[X.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["location-finder__toolbar",{"location-finder__toolbar--actions-only":!n.showSearch}])},[n.showSearch?(e.openBlock(),e.createBlock(Ue,{key:0,modelValue:A.value,"onUpdate:modelValue":k[0]||(k[0]=S=>A.value=S),class:"location-finder__search",label:x.value.searchLabel,placeholder:x.value.searchPlaceholder,options:Ce.value,disabled:t.disabled,"onUpdate:selection":ne},null,8,["modelValue","label","placeholder","options","disabled"])):e.createCommentVNode("",!0),e.createElementVNode("div",er,[t.trackUser&&n.showTrackButton?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"btn btn-outline-primary btn-sm location-finder__locate",disabled:t.disabled||e.unref(s).pending.value,"data-testid":"location-finder-locate",onClick:ct},e.toDisplayString(E.value),9,tr)):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),q.value?(e.openBlock(),e.createElementBlock("p",ar,e.toDisplayString(q.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["location-finder__layout",{"location-finder__layout--with-summary":j.value,"location-finder__layout--full-width":!ee.value}])},[e.createElementVNode("div",nr,[e.createVNode(Je,{class:"location-finder__map",center:Ve.value,markers:me.value,"model-value":g.value,"user-location":y.value,"user-location-label":x.value.userLocationLabel,"selected-location-label":ie.value,"route-coordinates":e.unref(c).routeCoordinates.value,"route-color":t.routeColor,"route-weight":t.routeWeight,"selection-radius":t.selectionRadius,"selection-radius-center":$.value,"selection-radius-color":t.selectionRadiusColor,"selection-radius-fill-color":t.selectionRadiusFillColor,"map-style":t.mapStyle,"tile-layer-url":t.tileLayerUrl,"tile-layer-attribution":t.tileLayerAttribution,height:t.mapHeight,interactive:t.interactive,disabled:t.disabled,"helper-text":x.value.mapHelperText,"onUpdate:modelValue":WA,onMarkerClick:le},null,8,["center","markers","model-value","user-location","user-location-label","selected-location-label","route-coordinates","route-color","route-weight","selection-radius","selection-radius-center","selection-radius-color","selection-radius-fill-color","map-style","tile-layer-url","tile-layer-attribution","height","interactive","disabled","helper-text"]),n.showLegend?(e.openBlock(),e.createElementBlock("div",{key:0,class:"location-finder__legend","data-testid":"location-finder-legend","aria-label":x.value.legendAriaLabel},[e.createElementVNode("span",or,[k[2]||(k[2]=e.createElementVNode("span",{class:"location-finder__legend-swatch location-finder__legend-swatch--list"},null,-1)),e.createTextVNode(" "+e.toDisplayString(x.value.legendLocations),1)]),e.createElementVNode("span",ir,[k[3]||(k[3]=e.createElementVNode("span",{class:"location-finder__legend-swatch location-finder__legend-swatch--selected"},null,-1)),e.createTextVNode(" "+e.toDisplayString(x.value.legendSelected),1)]),e.createElementVNode("span",rr,[k[4]||(k[4]=e.createElementVNode("span",{class:"location-finder__legend-swatch location-finder__legend-swatch--search"},null,-1)),e.createTextVNode(" "+e.toDisplayString(x.value.legendSearchResult),1)]),e.createElementVNode("span",Ar,[k[5]||(k[5]=e.createElementVNode("span",{class:"location-finder__legend-swatch location-finder__legend-swatch--user"},null,-1)),e.createTextVNode(" "+e.toDisplayString(x.value.userLocationLabel),1)])],8,lr)):e.createCommentVNode("",!0)]),ee.value?(e.openBlock(),e.createElementBlock("aside",sr,[n.showSidebar?(e.openBlock(),e.createBlock(_e,{key:0,modelValue:m.value,"onUpdate:modelValue":k[1]||(k[1]=S=>m.value=S),class:"location-finder__results",locations:G.value,label:x.value.resultsLabel,"empty-text":x.value.emptyText,onSelect:K},null,8,["modelValue","locations","label","empty-text"])):e.createCommentVNode("",!0),j.value?(e.openBlock(),e.createElementBlock("div",cr,[e.createElementVNode("p",dr,e.toDisplayString(x.value.directionsTitle),1),e.unref(c).pending.value?(e.openBlock(),e.createElementBlock("p",ur,e.toDisplayString(x.value.loadingRoute),1)):e.unref(c).hasRoute.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",mr,[e.createElementVNode("div",null,[e.createElementVNode("p",fr,e.toDisplayString(x.value.distanceLabel),1),e.createElementVNode("strong",pr,e.toDisplayString(de.value),1)]),e.createElementVNode("div",null,[e.createElementVNode("p",gr,e.toDisplayString(x.value.durationLabel),1),e.createElementVNode("strong",hr,e.toDisplayString(Be.value),1)])]),t.showDirectionsSteps&&e.unref(c).steps.value.length?(e.openBlock(),e.createElementBlock("ol",yr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c).steps.value.slice(0,5),(S,T)=>(e.openBlock(),e.createElementBlock("li",{key:`${S.instruction}-${T}`},[e.createElementVNode("span",null,e.toDisplayString(S.instruction),1),S.name?(e.openBlock(),e.createElementBlock("small",br,e.toDisplayString(S.name),1)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("p",kr,e.toDisplayString(x.value.directionsEmptyText),1))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)]))}}),Br={class:"carousel d-flex"},Cr=["onClick"],At=e.defineComponent({__name:"base-carousel",props:{modelValue:{type:Number,default:-1},config:{type:Object,default:null},messages:{type:Object,default:{}},items:{type:Array,default:[]},navigation:{type:Boolean,default:!0}},emits:["update:modelValue","select"],setup(t,{emit:d}){const l=d,o=e.ref(),n=e.ref();function a(){o.value.scrollTo({top:0,left:o.value.scrollLeft-o.value.clientWidth>0?o.value.scrollLeft-o.value.clientWidth:0,behavior:"smooth"})}function i(){o.value.scrollTo({top:0,left:o.value.scrollLeft-o.value.clientWidth<=n.value.clientWidth?o.value.scrollLeft+o.value.clientWidth:n.value.clientWidth,behavior:"smooth"})}function r(s){l("update:modelValue",s)}return(s,u)=>(e.openBlock(),e.createElementBlock("div",Br,[t.navigation?(e.openBlock(),e.createElementBlock("button",{key:0,class:"carousel__control btn btn-link text-light",type:"button",onClick:e.withModifiers(a,["prevent","stop"])},[e.createVNode(M,{symbol:"chevron-left"})])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"viewport",ref:o,class:"carousel__viewport flex-grow-1"},[e.createElementVNode("div",{ref_key:"track",ref:n,class:"carousel__track d-flex justify-center align-items-center"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(c,A)=>e.renderSlot(s.$slots,"carousel-item",{key:c.src,item:c,index:A},()=>[e.createElementVNode("div",{class:e.normalizeClass(["carousel__item",A===t.modelValue?"selected":""]),onClick:m=>r(A)},e.toDisplayString(c),11,Cr)])),128))],512)],512),t.navigation?(e.openBlock(),e.createElementBlock("button",{key:1,class:"carousel__control btn btn-link text-light",type:"button",onClick:e.withModifiers(i,["prevent","stop"])},[e.createVNode(M,{symbol:"chevron-right"})])):e.createCommentVNode("",!0)]))}}),Vr={class:"media-thumbnails"},Er=["onClick"],$r={class:"img-container"},Sr=e.defineComponent({__name:"media-thumbnails",props:{modelValue:{default:null},config:{type:Object,default:null},messages:{type:Object,default:{}},assets:{type:Array,default:[]}},emits:["update:modelValue","select"],setup(t,{emit:d}){const l=d,o=e.ref(-1);function n(a){o.value=a,l("update:modelValue",a),l("select",a)}return(a,i)=>(e.openBlock(),e.createElementBlock("div",Vr,[e.createVNode(At,{items:t.assets},{"carousel-item":e.withCtx(r=>[e.createElementVNode("a",{role:"button",class:e.normalizeClass(["carousel__item media-thumbnails__thumbnail",r.index===t.modelValue||r.index===o.value?"is-active":""]),onClick:s=>n(r.index)},[e.createElementVNode("div",$r,[e.createVNode(oe,{src:r.item.thumbnail||r.item.src,class:"img-fluid"},null,8,["src"])])],10,Er)]),_:1},8,["items"])]))}}),Nr={class:"progress-steps"},Mr={class:"progress-steps__list"},Dr={class:"progress-step"},vr=["checked","id","value","disabled","read-only","required","onChange"],Lr=["for"],Ir=["innerHTML"],Pr=["for"],Tr=["innerHTML"],xr=e.defineComponent({__name:"progress-steps",props:{modelValue:{type:Number,default:0},progress:{type:Number,default:0},steps:{type:Array},label:{type:String,default:""},reveal:{type:Boolean,default:!1}},emits:["update:modelValue","update:progress"],setup(t,{emit:d}){const l=t,o=d;function n(a){o("update:modelValue",a),a>=l.progress&&o("update:progress",a)}return(a,i)=>(e.openBlock(),e.createElementBlock("div",Nr,[e.createElementVNode("ul",Mr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.steps,(r,s)=>(e.openBlock(),e.createElementBlock("li",{key:s,class:e.normalizeClass(["progress-steps__step",{"progress-steps__step--disabled":s>t.progress+(t.reveal?1:0),"progress-steps__step--active":s===(t.modelValue||0)}])},[e.renderSlot(a.$slots,"step",{},()=>[e.createElementVNode("div",Dr,[e.createElementVNode("input",{type:"radio",checked:s<=(t.progress||0),id:`step-${s}`,name:"step",class:"form-check-input",value:r.value,disabled:r.disabled||s>t.progress+(t.reveal?1:0),"read-only":r.readOnly,required:r.required,onChange:u=>n(s)},null,40,vr),e.createElementVNode("label",{for:`step-${s}`},[e.renderSlot(a.$slots,"button",{step:r},()=>[e.createElementVNode("span",{class:"btn rounded-circle",innerHTML:e.unref(F)(r.text||"")},null,8,Ir)])],8,Lr),e.createElementVNode("label",{for:`step-${s}`},[e.renderSlot(a.$slots,"label",{step:r},()=>[e.createElementVNode("span",{class:"form-check-label",innerHTML:e.unref(F)(r.label||"")},null,8,Tr)])],8,Pr)])])],2))),128))])]))}}),zr={class:"hint-system"},Rr=["innerHTML"],Qr=["innerHTML"],Fr={key:1,class:"hint-system__hint-content"},Or=["disabled"],Hr=e.defineComponent({__name:"hint-system",props:{modelValue:{type:Number,default:0},hints:{type:Array,default:()=>[]},penalty:{type:Number,default:1},maxHints:{type:Number,default:void 0},htmlContent:{type:Boolean,default:!1},label:{type:String,default:"Show hint"},description:{type:String,default:""}},emits:["update:modelValue","hint-revealed"],setup(t,{emit:d}){const l=t,o=d,n=e.ref(l.modelValue);e.watch(()=>l.modelValue,u=>{n.value=u});const a=e.computed(()=>l.maxHints!==void 0?l.maxHints:l.hints.length),i=e.computed(()=>n.value<a.value),r=e.computed(()=>l.hints.slice(0,n.value));function s(){if(!i.value)return;const u=n.value;n.value++,o("update:modelValue",n.value),o("hint-revealed",{hint:l.hints[u],index:u,penaltyTotal:n.value*l.penalty})}return(u,c)=>(e.openBlock(),e.createElementBlock("div",zr,[t.description?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:e.unref(F)(t.description),class:"hint-system__description"},null,8,Rr)):e.createCommentVNode("",!0),r.value.length?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,name:"hint-reveal",tag:"ol",class:"hint-system__list"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(A,m)=>(e.openBlock(),e.createElementBlock("li",{key:m,class:"hint-system__hint"},[e.renderSlot(u.$slots,"hint",{hint:A,index:m,isNew:m===n.value-1},()=>[t.htmlContent?(e.openBlock(),e.createElementBlock("div",{key:0,class:"hint-system__hint-content",innerHTML:e.unref(F)(A.content||"")},null,8,Qr)):(e.openBlock(),e.createElementBlock("div",Fr,e.toDisplayString(A.content),1))])]))),128))]),_:3})):e.createCommentVNode("",!0),i.value?e.renderSlot(u.$slots,"trigger",{key:2,revealNext:s,canReveal:i.value,revealedCount:n.value,total:a.value},()=>[e.createElementVNode("button",{type:"button",class:"hint-system__trigger d-block w-100 text-center",disabled:!i.value,onClick:s},e.toDisplayString(t.label),9,Or)]):e.createCommentVNode("",!0)]))}}),Wr=["id","popover"],Ie=e.defineComponent({__name:"popover-dialog",props:{modelValue:{type:Boolean,default:!1},type:{type:String,default:"auto"},id:{type:String,default:()=>`popover-dialog-${Math.random().toString(36).substr(2,9)}`},title:{type:String,default:""},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1},classes:{type:String,default:""},hover:{type:Boolean,default:!1},hoverDelay:{type:Number,default:400},closeTimeout:{type:Number,default:0}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,o=d,n=e.ref(),a=e.ref(),i=e.ref(!1),r=e.computed(()=>"ontouchstart"in window||navigator.maxTouchPoints>0);function s(){clearTimeout(a.value),l.hover&&n.value?.showPopover()}function u(){i.value=!0,clearTimeout(a.value),s()}function c(){i.value=!1,(l.hover||l.closeTimeout)&&(a.value=setTimeout(()=>{n.value?.hidePopover()},l.closeTimeout||l.hoverDelay))}e.watch(()=>l.modelValue,(m,f)=>{m&&!f?n.value?.matches(":popover-open")||n.value?.showPopover():!m&&f&&n.value?.matches(":popover-open")&&n.value?.hidePopover()});function A(m){m.newState==="open"?(l.closeTimeout&&!i.value&&(clearTimeout(a.value),a.value=setTimeout(()=>{i.value||n.value?.hidePopover()},l.closeTimeout)),l.modelValue||o("update:modelValue",!0)):m.newState==="closed"&&(i.value=!1,l.modelValue&&o("update:modelValue",!1))}return e.onMounted(()=>{if(n.value?.addEventListener("toggle",A),l.modelValue&&n.value?.showPopover(),!r.value){n.value?.addEventListener("mouseenter",u),n.value?.addEventListener("mouseleave",c);const m=document.querySelector(`[popovertarget="${l.id}"]`);m&&(m.addEventListener("mouseenter",u),m.addEventListener("mouseleave",c))}}),e.onBeforeUnmount(()=>{if(clearTimeout(a.value),n.value?.removeEventListener("toggle",A),!r.value){n.value?.removeEventListener("mouseenter",u),n.value?.removeEventListener("mouseleave",c);const m=document.querySelector(`[popovertarget="${l.id}"]`);m&&(m.removeEventListener("mouseenter",u),m.removeEventListener("mouseleave",c))}}),(m,f)=>(e.openBlock(),e.createElementBlock("span",{class:"popover-dialog",id:t.id,popover:t.type,ref_key:"popover",ref:n},[e.renderSlot(m.$slots,"default",{},()=>[f[0]||(f[0]=e.createTextVNode(" Popover content goes here. ",-1))])],8,Wr))}}),Ur={class:"popover-tooltip"},qr=["popovertarget","disabled","aria-describedby","aria-label"],jr={class:"popover-tooltip__content d-flex flex-column"},Jr={key:0,class:"popover-tooltip__header d-flex p-3 border-bottom"},_r=["innerHTML"],Gr={class:"popover-tooltip__body"},Yr=["innerHTML"],Kr={key:1,class:"popover-tooltip__footer d-flex p-3 border-top"},Zr=e.defineComponent({__name:"popover-tooltip",props:{modelValue:{type:Boolean,default:!1},id:{type:String,default:()=>`popover-tooltip-${Math.random().toString(36).substr(2,9)}`},size:{type:String},exclusive:{type:Boolean,default:!0},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1},title:{type:String,default:""},content:{type:String,default:""},hover:{type:Boolean,default:!0},hoverDelay:{type:Number,default:400},disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:""}},emits:["update:modelValue","confirm","cancel"],setup(t,{emit:d}){const l=t,o=d,n=he(()=>l.title),a=he(()=>l.content),i=e.computed({get(){return l.modelValue},set(u){o("update:modelValue",u)}}),r=e.ref(),s=e.ref();return(u,c)=>(e.openBlock(),e.createElementBlock("span",Ur,[e.createElementVNode("button",{type:"button",popovertarget:t.id,disabled:t.disabled,"aria-describedby":t.id,"aria-label":t.ariaLabel||u.$te("common.moreInfo")?u.$t("common.moreInfo"):void 0,ref_key:"trigger",ref:r},[e.renderSlot(u.$slots,"button",{},()=>[c[3]||(c[3]=e.createElementVNode("span",{class:"popover-tooltip__trigger"}," i ",-1))])],8,qr),e.createVNode(Ie,{id:t.id,modelValue:i.value,"onUpdate:modelValue":c[2]||(c[2]=A=>i.value=A),hover:t.hover,"hover-delay":t.hoverDelay,ref_key:"dialog",ref:s,role:"tooltip",class:e.normalizeClass(t.size?`popover-tooltip--${t.size}`:"")},{default:e.withCtx(()=>[e.createElementVNode("div",jr,[t.header?(e.openBlock(),e.createElementBlock("div",Jr,[t.title?(e.openBlock(),e.createElementBlock("h5",{key:0,class:"popover-tooltip__title",innerHTML:e.unref(n)},null,8,_r)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"btn-close ms-auto border-radius-none","aria-label":"Close",onClick:c[0]||(c[0]=A=>i.value=!1)})])):e.createCommentVNode("",!0),e.createElementVNode("div",Gr,[e.renderSlot(u.$slots,"default",{},()=>[e.createElementVNode("span",{innerHTML:e.unref(a)},null,8,Yr)])]),t.footer?(e.openBlock(),e.createElementBlock("div",Kr,[e.renderSlot(u.$slots,"footer"),e.createElementVNode("button",{type:"button",class:"btn ms-auto",onClick:c[1]||(c[1]=A=>i.value=!1)},e.toDisplayString(u.$t("common.close")),1)])):e.createCommentVNode("",!0)])]),_:3},8,["id","modelValue","hover","hover-delay","class"])]))}}),Xr={class:"popover-notification__header d-flex justify-content-between mb-2"},eA={class:"popover-notification__title"},tA=["onClick"],aA=["innerHTML"],nA=e.defineComponent({__name:"popover-notifications",props:{modelValue:{type:Boolean,default:!1},id:{type:String,default:()=>`popover-notifications-${Math.random().toString(36).substr(2,9)}`},items:{type:Array,default:()=>[]},debounceItem:{type:Number,default:0},closeTimeout:{type:Number,default:8e3},collapsible:{type:Boolean,default:!0}},setup(t,{expose:d}){const l=t,o=e.ref([]),n=e.ref([]),a=e.computed(()=>o.value.map(m=>({...m,content:F(m.content||"")}))),i=e.ref(!1),r=e.computed(()=>l.collapsible&&o.value.length>3);function s(m,f){o.value=o.value.filter(h=>h.id!==m.id)}e.watch(()=>l.items,(m,f)=>{const h=m.filter(b=>!f.some(N=>N.id===b.id));n.value=[...n.value,...h]});function u(){setTimeout(()=>{const m=n.value.shift();m&&o.value.push({...m,closeTimeout:l.closeTimeout,visible:!0}),n.value.length>0&&u()},o.value.length?l.debounceItem:0)}function c(m){r.value&&(m.preventDefault(),m.stopPropagation(),i.value=!i.value)}function A(m){console.log("Adding item:",m),n.value.push(m),u()}return e.onMounted(()=>{n.value=l.items,n.value.length>3&&(i.value=!0),u()}),d({addItem:A}),(m,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["popover-notifications",{"popover-notifications--collapsed":i.value}]),style:{anchorName:"--popover-notifications"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(h,b)=>(e.openBlock(),e.createBlock(Ie,{key:h.id,id:h.id,"close-timeout":h.closeTimeout,type:"manual",class:"popover-notification",modelValue:h.visible,"onUpdate:modelValue":[N=>h.visible=N,N=>s(h)],onClick:c},{default:e.withCtx(()=>[e.renderSlot(m.$slots,"item",{item:h},()=>[e.createElementVNode("div",Xr,[e.createElementVNode("span",eA,e.toDisplayString(h.title),1),e.createElementVNode("button",{type:"button",class:"btn btn-close p-0",onClick:e.withModifiers(N=>h.visible=!1,["stop"]),"aria-label":"Close notification"},null,8,tA)]),e.createElementVNode("span",{innerHTML:h.content},null,8,aA)])]),_:2},1032,["id","close-timeout","modelValue","onUpdate:modelValue"]))),128))],2))}}),lA=e.defineComponent({__name:"dom-renderer",props:{modelValue:{type:String,default:""},fixedWidth:{type:Number,default:0},renderUpdates:{type:Boolean,default:!1},exportToSvg:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},pending:{type:Boolean,default:!1},emitPending:{type:Boolean,default:!1},debug:{type:Boolean,default:!1}},emits:["update:modelValue","update:pending"],setup(t,{emit:d}){const l=t,o=d,n=e.ref(),a=e.ref(""),i=e.ref(),r=e.ref(!0);async function s(){if(!n.value||!r.value)return"";const c=n.value;if(!c.isConnected)return"";try{l.emitPending&&o("update:pending",!0);const A=c.firstElementChild;if(!A)return"";const m=await mt(A,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,...l.options});if(!r.value||!n.value||!c.isConnected)return"";const f=m.toDataURL();if(o("update:modelValue",f),l.emitPending&&o("update:pending",!1),l.debug){const h=new Image;h.src=f,document.body.appendChild(h)}return f}catch(A){return r.value&&l.emitPending&&o("update:pending",!1),console.warn("dom-renderer: Render failed",A),""}}const u=Me.debounce(async()=>{a.value=await s()},300,{trailing:!0,leading:!1});return e.onMounted(()=>{const c=n.value;l.renderUpdates&&(i.value=new MutationObserver(async A=>{!r.value||!c.isConnected||(l.emitPending&&o("update:pending",!0),u())}),i.value.observe(c,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{l.emitPending&&o("update:pending",!0),u()},500)}),e.onBeforeUnmount(()=>{r.value=!1,i.value&&i.value.disconnect(),u.cancel()}),(c,A)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:n,style:e.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[e.renderSlot(c.$slots,"default")],6))}}),oA={class:"qr-code"},iA=["innerHTML"],rA=e.defineComponent({__name:"qr-code",props:{data:null,image:null,download:{type:Boolean,default:!1},filename:{type:String,default:"qr-code"}},emits:["update:dataUrl"],setup(t,{expose:d,emit:l}){const o=t,n=e.ref(),a=e.computed(()=>({width:300,height:300,type:"canvas",data:o.data,...o.image?{image:o.image}:{},margin:10,qrOptions:{typeNumber:0,mode:"Byte",errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,margin:20,crossOrigin:"anonymous"},dotsOptions:{type:"rounded"},backgroundOptions:{color:"#ffffff"},cornersSquareOptions:{color:"#333333",type:"extra-rounded"},cornersDotOptions:{color:"#333333",type:"dot"}}));function i(s=null,u=null){typeof window<"u"&&(n.value&&(n.value.innerHTML=""),new xe(s||a.value).append(n.value))}function r(){new xe({...a.value,width:1200,height:1200}).download({name:o.filename,extension:"png"})}return e.watch(()=>a.value,i,{deep:!0,immediate:!0}),e.onMounted(()=>{typeof window<"u"&&i()}),d({download:r}),(s,u)=>(e.openBlock(),e.createElementBlock("div",oA,[o.download?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn-outline-contrast mb-3",onClick:r,innerHTML:s.$t("qrlink.download")},null,8,iA)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"canvas",ref:n},null,512))]))}}),AA={class:"link-sharing"},sA={key:0,class:"link-sharing__links container"},cA={class:"row"},dA={key:0,class:"col-12 col-md-6"},uA=["href"],mA={class:"caption"},fA={key:1,class:"col-12 col-md-6"},pA=["href"],gA={class:"caption"},hA={key:2,class:"col-12 col-md-6"},yA={class:"caption"},bA={key:3,class:"col-12 col-md-6"},kA=["href"],wA={class:"caption"},BA={key:4,class:"col-12 col-md-6"},CA=["href"],VA={class:"caption"},EA={key:5,class:"col-12 col-md-6"},$A={class:"caption"},SA={key:6,class:"col-12 col-md-6"},NA=["href"],MA={class:"caption"},DA={key:1,class:"link-sharing__instructions pt-5"},vA={class:"row"},LA={class:"col-12 text-center py-0"},IA={class:"mb-5"},PA=t=>t.replace(/<(?:.|\n)*?>/gm,""),TA=e.defineComponent({__name:"link-sharing",props:{url:{type:String,default:""},subject:{type:String,default:""},hashtags:Array,text:{type:String,default:""},media:{type:String,default:""},services:{type:Object,default:{facebook:!0,instagram:!0,linkedin:!0,whatsapp:!0,mailto:!0,clipboard:!0,bluesky:!0}}},setup(t){const d=t,l=e.ref(!1),o=e.computed(()=>encodeURIComponent(d.url));e.computed(()=>encodeURIComponent(d.media));const n=e.computed(()=>PA(d.text)),a=e.computed(()=>!!(navigator&&navigator.userAgent&&/Mobi|Android/i.test(navigator.userAgent)));async function i(){const r=document.createElement("textarea");document.body.appendChild(r),r.value=d.url,r.select(),r.setSelectionRange(0,99999),navigator.clipboard.writeText(r.value),document.body.removeChild(r)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",AA,[l.value?(e.openBlock(),e.createElementBlock("div",DA,[e.createElementVNode("div",vA,[e.createElementVNode("div",LA,[e.createElementVNode("div",IA,[e.createElementVNode("p",null,e.toDisplayString(r.$t("sharing.instructions",{service:"Instagram"})),1),e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(Array.isArray(t.hashtags)?t.hashtags.join(", "):t.hashtags),1)]),e.createElementVNode("button",{type:"button",class:"btn btn-text",onClick:s[1]||(s[1]=e.withModifiers(u=>l.value=!l.value,["prevent"]))},[e.createVNode(M,{symbol:"arrow-left"}),e.createTextVNode(" "+e.toDisplayString(r.$t("common.back")),1)])])])])])):(e.openBlock(),e.createElementBlock("div",sA,[e.createElementVNode("div",cA,[t.services.facebook?(e.openBlock(),e.createElementBlock("div",dA,[e.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.facebook.com/sharer.php?u=${o.value}`,target:"_blank",rel:"noopener"},[e.createVNode(M,{symbol:"facebook"}),e.createElementVNode("span",mA,e.toDisplayString(r.$t("sharing.facebook")),1)],8,uA)])):e.createCommentVNode("",!0),t.services.bluesky?(e.openBlock(),e.createElementBlock("div",fA,[e.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://bsky.app/intent/compose?text=${n.value}${n.value?"%20":""}${t.url}`,target:"_blank",rel:"noopener"},[e.createVNode(M,{symbol:"bluesky-logo"}),e.createElementVNode("span",gA,e.toDisplayString(r.$t("sharing.bluesky")),1)],8,pA)])):e.createCommentVNode("",!0),t.services.instagram?(e.openBlock(),e.createElementBlock("div",hA,[e.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:s[0]||(s[0]=e.withModifiers(u=>l.value=!l.value,["prevent"]))},[e.createVNode(M,{symbol:"instagram"}),e.createElementVNode("span",yA,e.toDisplayString(r.$t("sharing.instagram")),1)])])):e.createCommentVNode("",!0),t.services.linkedin?(e.openBlock(),e.createElementBlock("div",bA,[e.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.linkedin.com/shareArticle?mini=true&url=${o.value}&title=${t.subject}`,target:"_blank",rel:"noopener"},[e.createVNode(M,{symbol:"linkedin"}),e.createElementVNode("span",wA,e.toDisplayString(r.$t("sharing.linkedin")),1)],8,kA)])):e.createCommentVNode("",!0),t.services.whatsapp&&a.value?(e.openBlock(),e.createElementBlock("div",BA,[e.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`whatsapp://send?text=${o.value}`,target:"_blank",rel:"noopener"},[e.createVNode(M,{symbol:"whatsapp"}),e.createElementVNode("span",VA,e.toDisplayString(r.$t("sharing.whatsapp")),1)],8,CA)])):e.createCommentVNode("",!0),t.services.clipboard?(e.openBlock(),e.createElementBlock("div",EA,[e.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:e.withModifiers(i,["prevent","stop"])},[e.createVNode(M,{symbol:"copy"}),e.createElementVNode("span",$A,e.toDisplayString(r.$t("sharing.clipboard")),1)])])):e.createCommentVNode("",!0),t.services.mailto?(e.openBlock(),e.createElementBlock("div",SA,[e.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`mailto:?subject=${t.subject}&body=${n.value}%0D%0A${t.url}`,target:"_blank",rel:"noopener"},[e.createVNode(M,{symbol:"mail"}),e.createElementVNode("span",MA,e.toDisplayString(r.$t("sharing.mailto")),1)],8,NA)])):e.createCommentVNode("",!0)])]))]))}}),xA={class:"base-form"},zA=e.defineComponent({__name:"base-form",props:{id:{},name:{},variant:{},disabled:{type:Boolean},pending:{type:Boolean}},setup(t){function d(n){console.log("input",n)}function l(n){console.log("reset",n)}function o(n){console.log("submit",n)}return(n,a)=>(e.openBlock(),e.createElementBlock("div",xA,[e.createElementVNode("form",{ref:"form",onInput:d,onReset:l,onSubmit:e.withModifiers(o,["prevent"])},[e.renderSlot(n.$slots,"default")],544)]))}}),RA={class:"touch-wrapper__controls"},QA={class:"btn-group",role:"group"},FA=e.defineComponent({__name:"touch-wrapper",props:{modelValue:{type:Number,default:1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=e.getCurrentInstance(),o=l&&l.appContext.config.globalProperties.$config,n=t,a=d,i=e.ref();function r(c){const A=n.modelValue+c;a("update:modelValue",c===0?1:A>=1?A:1)}function s(c){if(c.ctrlKey){c.preventDefault();const A=0-c.deltaY*.01;r(A)}}function u(c){c.preventDefault();const{scale:A}=c,m=A>1?A*.01:0-A;r(m)}return e.onMounted(()=>{i.value&&(i.value.addEventListener("wheel",s,!1),i.value.addEventListener("gesturestart",u,!1),i.value.addEventListener("gesturechange",u,!1),i.value.addEventListener("gestureend",u,!1))}),(c,A)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"touchElement",ref:i,class:"touch-wrapper"},[e.renderSlot(c.$slots,"controls",{on:{setScale:r}},()=>[e.createElementVNode("div",RA,[e.createElementVNode("div",QA,[e.createElementVNode("button",{type:"button",class:"btn",onClick:A[0]||(A[0]=m=>r(-1))},[e.createVNode(M,{symbol:"minus","base-path":e.unref(o).iconSprite},null,8,["base-path"])]),e.createElementVNode("button",{type:"button",class:"btn",onClick:A[1]||(A[1]=m=>r(0))},[e.createVNode(M,{symbol:"maximize","base-path":e.unref(o).iconSprite},null,8,["base-path"])]),e.createElementVNode("button",{type:"button",class:"btn",onClick:A[2]||(A[2]=m=>r(1))},[e.createVNode(M,{symbol:"plus","base-path":e.unref(o).iconSprite},null,8,["base-path"])])])])]),e.renderSlot(c.$slots,"default")],512))}});let we=null;async function OA(){if(typeof window>"u")return null;if(we)return we;const t=await import("canvas-confetti");return we=t.default||t,we}const st={default:{items:[{particleCount:80,spread:120,origin:{y:.625,x:.5}},{timeout:400,particleCount:80,spread:120,origin:{y:.625,x:.625}},{timeout:800,particleCount:80,spread:120,origin:{y:.625,x:.375}}]},randomDirection:{items:[{angle:Pe(55,125),spread:Pe(50,70),particleCount:Pe(50,100),origin:{y:.6}}]},pride:{items:[{timeout:20,particleCount:2,spread:32,origin:{x:0},colors:["#ff0000"]},{timeout:20,particleCount:2,spread:32,origin:{x:1},colors:["#ff0000"]}]}};function Pe(t,d){return Math.random()*(d-t)+t}const HA=e.defineComponent({__name:"canvas-confetti",props:{preset:{type:String,default:"default"},items:{default:()=>[{}]},colors:{type:Array,default:()=>[]},loop:{type:Boolean,default:!1}},setup(t){const d=t,l=e.ref(null),o=e.computed(()=>({...st[d.preset],items:st[d.preset].items.map((i,r)=>({...i,...d.items[r],...d.colors.length?{colors:d.colors}:{}}))}));async function n(i){return new Promise(r=>{(typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):u=>setTimeout(u,16))(()=>l.value?.confetti?.(JSON.parse(JSON.stringify(i)))),setTimeout(()=>r(),0)})}async function a(){await Promise.all(o.value.items.map(i=>new Promise(r=>setTimeout(()=>{r(n(i))},i.timeout||0)))),d.loop&&a()}return e.onMounted(async()=>{if(typeof window<"u"&&l.value){const i=await OA();if(!i)return;l.value.confetti=l.value?.confetti||i.create(l.value,{resize:!0}),a()}}),(i,r)=>(e.openBlock(),e.createElementBlock("canvas",{class:"canvas-confetti",ref_key:"canvas",ref:l},null,512))}});C.Accordion=zt,C.AccordionItem=Lt,C.AssetUploader=Ji,C.AutoSuggest=Ue,C.BaseButton=Fe,C.BaseCamera=So,C.BaseCarousel=At,C.BaseForm=zA,C.BaseHeadline=bt,C.BaseImage=oe,C.BaseInput=Ae,C.BaseMap=Je,C.BaseParagraph=wt,C.CanvasConfetti=HA,C.CheckGroup=el,C.ColorPalette=ql,C.CustomHtml=hl,C.DomRenderer=lA,C.FileUpload=Ye,C.HintSystem=Hr,C.ImageCrop=Xe,C.ImageCropResize=et,C.ImageResize=Ze,C.ImageUpload=at,C.InputCheckbox=Yt,C.InputColor=Hl,C.InputDatepicker=jn,C.InputDatetime=ea,C.InputDropdown=ke,C.InputFile=Le,C.InputPasscode=Yn,C.InputPassword=We,C.InputTextarea=jt,C.LinkSharing=TA,C.LoadingSpinner=ge,C.LocationFinder=wr,C.LocationList=_e,C.MediaThumbnails=Sr,C.ModalDialog=tt,C.PopoverDialog=Ie,C.PopoverNotifications=nA,C.PopoverTooltip=Zr,C.ProgressSteps=xr,C.QrCode=rA,C.RadioButtons=rl,C.RadioGroup=be,C.RteEditor=Rl,C.SelectMedia=kl,C.SortableList=Ke,C.SvgIcon=M,C.TouchWrapper=FA,C.UploadGroup=nt,C.useCameraFilter=qe,C.useDirections=lt,C.useGeocoding=ot,C.useGeolocation=rt,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})}));
|