@romainbx/wpic-components 0.0.112 → 0.0.114

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.
@@ -2,7 +2,7 @@
2
2
  * vee-validate v4.12.8
3
3
  * (c) 2024 Abdelrahman Awad
4
4
  * @license MIT
5
- */function Ke(t){return typeof t=="function"}function Pc(t){return t==null}const Ln=t=>t!==null&&!!t&&typeof t=="object"&&!Array.isArray(t);function Zs(t){return Number(t)>=0}function Yg(t){const e=parseFloat(t);return isNaN(e)?t:e}function qg(t){return typeof t=="object"&&t!==null}function Kg(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function Rc(t){if(!qg(t)||Kg(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ei(t,e){return Object.keys(e).forEach(n=>{if(Rc(e[n])&&Rc(t[n])){t[n]||(t[n]={}),Ei(t[n],e[n]);return}t[n]=e[n]}),t}function Ci(t){const e=t.split(".");if(!e.length)return"";let n=String(e[0]);for(let r=1;r<e.length;r++){if(Zs(e[r])){n+=`[${e[r]}]`;continue}n+=`.${e[r]}`}return n}const Fc={};function Gt(t,e){Jg(t,e),Fc[t]=e}function Gg(t){return Fc[t]}function Jg(t,e){if(!Ke(e))throw new Error(`Extension Error: The validator '${t}' must be a function.`)}function zc(t,e,n){typeof n.value=="object"&&(n.value=De(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function De(t){if(typeof t!="object")return t;var e=0,n,r,i,o=Object.prototype.toString.call(t);if(o==="[object Object]"?i=Object.create(t.__proto__||null):o==="[object Array]"?i=Array(t.length):o==="[object Set]"?(i=new Set,t.forEach(function(s){i.add(De(s))})):o==="[object Map]"?(i=new Map,t.forEach(function(s,l){i.set(De(l),De(s))})):o==="[object Date]"?i=new Date(+t):o==="[object RegExp]"?i=new RegExp(t.source,t.flags):o==="[object DataView]"?i=new t.constructor(De(t.buffer)):o==="[object ArrayBuffer]"?i=t.slice(0):o.slice(-6)==="Array]"&&(i=new t.constructor(t)),i){for(r=Object.getOwnPropertySymbols(t);e<r.length;e++)zc(i,r[e],Object.getOwnPropertyDescriptor(t,r[e]));for(e=0,r=Object.getOwnPropertyNames(t);e<r.length;e++)Object.hasOwnProperty.call(i,n=r[e])&&i[n]===t[n]||zc(i,n,Object.getOwnPropertyDescriptor(t,n))}return i||t}const Si=Symbol("vee-validate-form"),jc=Symbol("vee-validate-field-instance"),_o=Symbol("Default empty value"),Zg=typeof window<"u";function Xs(t){return Ke(t)&&!!t.__locatorRef}function Jt(t){return!!t&&Ke(t.parse)&&t.__type==="VVTypedSchema"}function Oo(t){return!!t&&Ke(t.validate)}function _i(t){return t==="checkbox"||t==="radio"}function Xg(t){return Ln(t)||Array.isArray(t)}function Qg(t){return Array.isArray(t)?t.length===0:Ln(t)&&Object.keys(t).length===0}function To(t){return/^\[.+\]$/i.test(t)}function e0(t){return Hc(t)&&t.multiple}function Hc(t){return t.tagName==="SELECT"}function t0(t,e){const n=![!1,null,void 0,0].includes(e.multiple)&&!Number.isNaN(e.multiple);return t==="select"&&"multiple"in e&&n}function n0(t,e){return!t0(t,e)&&e.type!=="file"&&!_i(e.type)}function Wc(t){return Qs(t)&&t.target&&"submit"in t.target}function Qs(t){return t?!!(typeof Event<"u"&&Ke(Event)&&t instanceof Event||t&&t.srcElement):!1}function Uc(t,e){return e in t&&t[e]!==_o}function mt(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!mt(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!mt(r[1],e.get(r[0])))return!1;return!0}if(Yc(t)&&Yc(e))return!(t.size!==e.size||t.name!==e.name||t.lastModified!==e.lastModified||t.type!==e.type);if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();for(i=Object.keys(t),n=i.length,r=n;r--!==0;){var o=i[r];if(!mt(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Yc(t){return Zg?t instanceof File:!1}function el(t){return To(t)?t.replace(/\[|\]/gi,""):t}function xt(t,e,n){return t?To(e)?t[el(e)]:(e||"").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((i,o)=>Xg(i)&&o in i?i[o]:n,t):n}function gn(t,e,n){if(To(e)){t[el(e)]=n;return}const r=e.split(/\.|\[(\d+)\]/).filter(Boolean);let i=t;for(let o=0;o<r.length;o++){if(o===r.length-1){i[r[o]]=n;return}(!(r[o]in i)||Pc(i[r[o]]))&&(i[r[o]]=Zs(r[o+1])?[]:{}),i=i[r[o]]}}function tl(t,e){if(Array.isArray(t)&&Zs(e)){t.splice(Number(e),1);return}Ln(t)&&delete t[e]}function qc(t,e){if(To(e)){delete t[el(e)];return}const n=e.split(/\.|\[(\d+)\]/).filter(Boolean);let r=t;for(let o=0;o<n.length;o++){if(o===n.length-1){tl(r,n[o]);break}if(!(n[o]in r)||Pc(r[n[o]]))break;r=r[n[o]]}const i=n.map((o,s)=>xt(t,n.slice(0,s).join(".")));for(let o=i.length-1;o>=0;o--)if(Qg(i[o])){if(o===0){tl(t,n[0]);continue}tl(i[o-1],n[o-1])}}function Et(t){return Object.keys(t)}function nl(t,e=void 0){const n=a.getCurrentInstance();return(n==null?void 0:n.provides[t])||a.inject(t,e)}function Kc(t,e,n){if(Array.isArray(t)){const r=[...t],i=r.findIndex(o=>mt(o,e));return i>=0?r.splice(i,1):r.push(e),r}return mt(t,e)?n:e}function r0(t,e){let n,r;return function(...i){const o=this;return n||(n=!0,setTimeout(()=>n=!1,e),r=t.apply(o,i)),r}}function Gc(t,e=0){let n=null,r=[];return function(...i){return n&&clearTimeout(n),n=setTimeout(()=>{const o=t(...i);r.forEach(s=>s(o)),r=[]},e),new Promise(o=>r.push(o))}}function i0(t,e){return Ln(e)&&e.number?Yg(t):t}function rl(t,e){let n;return async function(...i){const o=t(...i);n=o;const s=await o;return o!==n?s:(n=void 0,e(s,i))}}function il(t){return Array.isArray(t)?t:t?[t]:[]}function No(t,e){const n={};for(const r in t)e.includes(r)||(n[r]=t[r]);return n}function o0(t){let e=null,n=[];return function(...r){const i=a.nextTick(()=>{if(e!==i)return;const o=t(...r);n.forEach(s=>s(o)),n=[],e=null});return e=i,new Promise(o=>n.push(o))}}function ol(t,e,n){return e.slots.default?typeof t=="string"||!t?e.slots.default(n()):{default:()=>{var r,i;return(i=(r=e.slots).default)===null||i===void 0?void 0:i.call(r,n())}}:e.slots.default}function sl(t){if(Jc(t))return t._value}function Jc(t){return"_value"in t}function s0(t){return t.type==="number"||t.type==="range"?Number.isNaN(t.valueAsNumber)?t.value:t.valueAsNumber:t.value}function Mo(t){if(!Qs(t))return t;const e=t.target;if(_i(e.type)&&Jc(e))return sl(e);if(e.type==="file"&&e.files){const n=Array.from(e.files);return e.multiple?n:n[0]}if(e0(e))return Array.from(e.options).filter(n=>n.selected&&!n.disabled).map(sl);if(Hc(e)){const n=Array.from(e.options).find(r=>r.selected);return n?sl(n):e.value}return s0(e)}function Zc(t){const e={};return Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t?Ln(t)&&t._$$isNormalized?t:Ln(t)?Object.keys(t).reduce((n,r)=>{const i=l0(t[r]);return t[r]!==!1&&(n[r]=Xc(i)),n},e):typeof t!="string"?e:t.split("|").reduce((n,r)=>{const i=a0(r);return i.name&&(n[i.name]=Xc(i.params)),n},e):e}function l0(t){return t===!0?[]:Array.isArray(t)||Ln(t)?t:[t]}function Xc(t){const e=n=>typeof n=="string"&&n[0]==="@"?c0(n.slice(1)):n;return Array.isArray(t)?t.map(e):t instanceof RegExp?[t]:Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{})}const a0=t=>{let e=[];const n=t.split(":")[0];return t.includes(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:n,params:e}};function c0(t){const e=n=>xt(n,t)||n[t];return e.__locatorRef=t,e}function d0(t){return Array.isArray(t)?t.filter(Xs):Et(t).filter(e=>Xs(t[e])).map(e=>t[e])}let u0=Object.assign({},{generateMessage:({field:t})=>`${t} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const ar=()=>u0;async function Qc(t,e,n={}){const r=n==null?void 0:n.bails,i={name:(n==null?void 0:n.name)||"{field}",rules:e,label:n==null?void 0:n.label,bails:r??!0,formData:(n==null?void 0:n.values)||{}},s=(await f0(i,t)).errors;return{errors:s,valid:!s.length}}async function f0(t,e){if(Jt(t.rules)||Oo(t.rules))return p0(e,t.rules);if(Ke(t.rules)||Array.isArray(t.rules)){const s={field:t.label||t.name,name:t.name,label:t.label,form:t.formData,value:e},l=Array.isArray(t.rules)?t.rules:[t.rules],c=l.length,d=[];for(let u=0;u<c;u++){const f=l[u],h=await f(e,s);if(!(typeof h!="string"&&!Array.isArray(h)&&h)){if(Array.isArray(h))d.push(...h);else{const m=typeof h=="string"?h:td(s);d.push(m)}if(t.bails)return{errors:d}}}return{errors:d}}const n=Object.assign(Object.assign({},t),{rules:Zc(t.rules)}),r=[],i=Object.keys(n.rules),o=i.length;for(let s=0;s<o;s++){const l=i[s],c=await m0(n,e,{name:l,params:n.rules[l]});if(c.error&&(r.push(c.error),t.bails))return{errors:r}}return{errors:r}}function h0(t){return!!t&&t.name==="ValidationError"}function ed(t){return{__type:"VVTypedSchema",async parse(n){var r;try{return{output:await t.validate(n,{abortEarly:!1}),errors:[]}}catch(i){if(!h0(i))throw i;if(!(!((r=i.inner)===null||r===void 0)&&r.length)&&i.errors.length)return{errors:[{path:i.path,errors:i.errors}]};const o=i.inner.reduce((s,l)=>{const c=l.path||"";return s[c]||(s[c]={errors:[],path:c}),s[c].errors.push(...l.errors),s},{});return{errors:Object.values(o)}}}}}async function p0(t,e){const r=await(Jt(e)?e:ed(e)).parse(t),i=[];for(const o of r.errors)o.errors.length&&i.push(...o.errors);return{errors:i}}async function m0(t,e,n){const r=Gg(n.name);if(!r)throw new Error(`No such validator '${n.name}' exists.`);const i=g0(n.params,t.formData),o={field:t.label||t.name,name:t.name,label:t.label,value:e,form:t.formData,rule:Object.assign(Object.assign({},n),{params:i})},s=await r(e,i,o);return typeof s=="string"?{error:s}:{error:s?void 0:td(o)}}function td(t){const e=ar().generateMessage;return e?e(t):"Field is invalid"}function g0(t,e){const n=r=>Xs(r)?r(e):r;return Array.isArray(t)?t.map(n):Object.keys(t).reduce((r,i)=>(r[i]=n(t[i]),r),{})}async function y0(t,e){const r=await(Jt(t)?t:ed(t)).parse(De(e)),i={},o={};for(const s of r.errors){const l=s.errors,c=(s.path||"").replace(/\["(\d+)"\]/g,(d,u)=>`[${u}]`);i[c]={valid:!l.length,errors:l},l.length&&(o[c]=l[0])}return{valid:!r.errors.length,results:i,errors:o,values:r.value}}async function b0(t,e,n){const i=Et(t).map(async d=>{var u,f,h;const p=(u=n==null?void 0:n.names)===null||u===void 0?void 0:u[d],m=await Qc(xt(e,d),t[d],{name:(p==null?void 0:p.name)||d,label:p==null?void 0:p.label,values:e,bails:(h=(f=n==null?void 0:n.bailsMap)===null||f===void 0?void 0:f[d])!==null&&h!==void 0?h:!0});return Object.assign(Object.assign({},m),{path:d})});let o=!0;const s=await Promise.all(i),l={},c={};for(const d of s)l[d.path]={valid:d.valid,errors:d.errors},d.valid||(o=!1,c[d.path]=d.errors[0]);return{valid:o,results:l,errors:c}}let nd=0;function k0(t,e){const{value:n,initialValue:r,setInitialValue:i}=w0(t,e.modelValue,e.form);if(!e.form){let h=function(p){var m;"value"in p&&(n.value=p.value),"errors"in p&&d(p.errors),"touched"in p&&(f.touched=(m=p.touched)!==null&&m!==void 0?m:f.touched),"initialValue"in p&&i(p.initialValue)};const{errors:c,setErrors:d}=E0(),u=nd>=Number.MAX_SAFE_INTEGER?0:++nd,f=x0(n,r,c,e.schema);return{id:u,path:t,value:n,initialValue:r,meta:f,flags:{pendingUnmount:{[u]:!1},pendingReset:!1},errors:c,setState:h}}const o=e.form.createPathState(t,{bails:e.bails,label:e.label,type:e.type,validate:e.validate,schema:e.schema}),s=a.computed(()=>o.errors);function l(c){var d,u,f;"value"in c&&(n.value=c.value),"errors"in c&&((d=e.form)===null||d===void 0||d.setFieldError(a.unref(t),c.errors)),"touched"in c&&((u=e.form)===null||u===void 0||u.setFieldTouched(a.unref(t),(f=c.touched)!==null&&f!==void 0?f:!1)),"initialValue"in c&&i(c.initialValue)}return{id:Array.isArray(o.id)?o.id[o.id.length-1]:o.id,path:t,value:n,errors:s,meta:o,initialValue:r,flags:o.__flags,setState:l}}function w0(t,e,n){const r=a.ref(a.unref(e));function i(){return n?xt(n.initialValues.value,a.unref(t),a.unref(r)):a.unref(r)}function o(d){if(!n){r.value=d;return}n.setFieldInitialValue(a.unref(t),d,!0)}const s=a.computed(i);if(!n)return{value:a.ref(i()),initialValue:s,setInitialValue:o};const l=v0(e,n,s,t);return n.stageInitialValue(a.unref(t),l,!0),{value:a.computed({get(){return xt(n.values,a.unref(t))},set(d){n.setFieldValue(a.unref(t),d,!1)}}),initialValue:s,setInitialValue:o}}function v0(t,e,n,r){return a.isRef(t)?a.unref(t):t!==void 0?t:xt(e.values,a.unref(r),a.unref(n))}function x0(t,e,n,r){const i=a.computed(()=>{var s,l,c;return(c=(l=(s=a.toValue(r))===null||s===void 0?void 0:s.describe)===null||l===void 0?void 0:l.call(s).required)!==null&&c!==void 0?c:!1}),o=a.reactive({touched:!1,pending:!1,valid:!0,required:i,validated:!!a.unref(n).length,initialValue:a.computed(()=>a.unref(e)),dirty:a.computed(()=>!mt(a.unref(t),a.unref(e)))});return a.watch(n,s=>{o.valid=!s.length},{immediate:!0,flush:"sync"}),o}function E0(){const t=a.ref([]);return{errors:t,setErrors:e=>{t.value=il(e)}}}function rd(t){process.env.NODE_ENV!=="production"&&Ug({id:"vee-validate-devtools-plugin",label:"VeeValidate Plugin",packageName:"vee-validate",homepage:"https://vee-validate.logaretm.com/v4",app:t,logo:"https://vee-validate.logaretm.com/v4/logo.png"},_0)}const Oi={},Ti={};let yn;const Pr=r0(()=>{setTimeout(async()=>{await a.nextTick(),yn==null||yn.sendInspectorState(Rr),yn==null||yn.sendInspectorTree(Rr)},100)},100);function C0(t){const e=a.getCurrentInstance();if(!yn){const n=e==null?void 0:e.appContext.app;if(!n)return;rd(n)}Oi[t.formId]=Object.assign({},t),Oi[t.formId]._vm=e,a.onUnmounted(()=>{delete Oi[t.formId],Pr()}),Pr()}function S0(t){const e=a.getCurrentInstance();if(!yn){const n=e==null?void 0:e.appContext.app;if(!n)return;rd(n)}Ti[t.id]=Object.assign({},t),Ti[t.id]._vm=e,a.onUnmounted(()=>{delete Ti[t.id],Pr()}),Pr()}const Rr="vee-validate-inspector",Ct={error:12405579,success:448379,unknown:5522283,white:16777215,black:0,blue:218007,purple:12157168,orange:16099682,gray:12304330};let He=null;function _0(t){yn=t,t.addInspector({id:Rr,icon:"rule",label:"vee-validate",noSelectionText:"Select a vee-validate node to inspect",actions:[{icon:"done_outline",tooltip:"Validate selected item",action:async()=>{if(!He){console.error("There is not a valid selected vee-validate node or component");return}if(He.type==="field"){await He.field.validate();return}if(He.type==="form"){await He.form.validate();return}He.type==="pathState"&&await He.form.validateField(He.state.path)}},{icon:"delete_sweep",tooltip:"Clear validation state of the selected item",action:()=>{if(!He){console.error("There is not a valid selected vee-validate node or component");return}if(He.type==="field"){He.field.resetField();return}He.type==="form"&&He.form.resetForm(),He.type==="pathState"&&He.form.resetField(He.state.path)}}]}),t.on.getInspectorTree(e=>{if(e.inspectorId!==Rr)return;const n=Object.values(Oi),r=Object.values(Ti);e.rootNodes=[...n.map(O0),...r.map(i=>N0(i))]}),t.on.getInspectorState((e,n)=>{if(e.inspectorId!==Rr||n.currentTab!==`custom-inspector:${Rr}`)return;const{form:r,field:i,state:o,type:s}=M0(e.nodeId);if(r&&s==="form"){e.state=A0(r),He={type:"form",form:r};return}if(o&&s==="pathState"&&r){e.state=od(o),He={type:"pathState",state:o,form:r};return}if(i&&s==="field"){e.state=od({errors:i.errors.value,dirty:i.meta.dirty,valid:i.meta.valid,touched:i.meta.touched,value:i.value.value,initialValue:i.meta.initialValue}),He={field:i,type:"field"};return}He=null})}function O0(t){const{textColor:e,bgColor:n}=sd(t.meta.value.valid),r={};Object.values(t.getAllPathStates()).forEach(s=>{gn(r,a.unref(s.path),T0(s,t))});function i(s,l=[]){const c=[...l].pop();return"id"in s?Object.assign(Object.assign({},s),{label:c||s.label}):Ln(s)?{id:`${l.join(".")}`,label:c||"",children:Object.keys(s).map(d=>i(s[d],[...l,d]))}:Array.isArray(s)?{id:`${l.join(".")}`,label:`${c}[]`,children:s.map((d,u)=>i(d,[...l,String(u)]))}:{id:"",label:"",children:[]}}const{children:o}=i(r);return{id:ll(t),label:"Form",children:o,tags:[{label:"Form",textColor:e,backgroundColor:n},{label:`${t.getAllPathStates().length} fields`,textColor:Ct.white,backgroundColor:Ct.unknown}]}}function T0(t,e){return{id:ll(e,t),label:a.unref(t.path),tags:id(t.multiple,t.fieldsCount,t.type,t.valid,e)}}function N0(t,e){return{id:ll(e,t),label:a.unref(t.name),tags:id(!1,1,t.type,t.meta.valid,e)}}function id(t,e,n,r,i){const{textColor:o,bgColor:s}=sd(r);return[t?void 0:{label:"Field",textColor:o,backgroundColor:s},i?void 0:{label:"Standalone",textColor:Ct.black,backgroundColor:Ct.gray},n==="checkbox"?{label:"Checkbox",textColor:Ct.white,backgroundColor:Ct.blue}:void 0,n==="radio"?{label:"Radio",textColor:Ct.white,backgroundColor:Ct.purple}:void 0,t?{label:"Multiple",textColor:Ct.black,backgroundColor:Ct.orange}:void 0].filter(Boolean)}function ll(t,e){const n=e?"path"in e?"pathState":"field":"form",r=e?"path"in e?e==null?void 0:e.path:a.unref(e==null?void 0:e.name):"",i={f:t==null?void 0:t.formId,ff:r,type:n};return btoa(encodeURIComponent(JSON.stringify(i)))}function M0(t){try{const e=JSON.parse(decodeURIComponent(atob(t))),n=Oi[e.f];if(!n&&e.ff){const i=Ti[e.ff];return i?{type:e.type,field:i}:{}}if(!n)return{};const r=n.getPathState(e.ff);return{type:e.type,form:n,state:r}}catch{}return{}}function od(t){return{"Field state":[{key:"errors",value:t.errors},{key:"initialValue",value:t.initialValue},{key:"currentValue",value:t.value},{key:"touched",value:t.touched},{key:"dirty",value:t.dirty},{key:"valid",value:t.valid}]}}function A0(t){const{errorBag:e,meta:n,values:r,isSubmitting:i,isValidating:o,submitCount:s}=t;return{"Form state":[{key:"submitCount",value:s.value},{key:"isSubmitting",value:i.value},{key:"isValidating",value:o.value},{key:"touched",value:n.value.touched},{key:"dirty",value:n.value.dirty},{key:"valid",value:n.value.valid},{key:"initialValues",value:n.value.initialValues},{key:"currentValues",value:r},{key:"errors",value:Et(e.value).reduce((l,c)=>{var d;const u=(d=e.value[c])===null||d===void 0?void 0:d[0];return u&&(l[c]=u),l},{})}]}}function sd(t){return{bgColor:t?Ct.success:Ct.error,textColor:t?Ct.black:Ct.white}}function D0(t,e,n){return _i(n==null?void 0:n.type)?B0(t,e,n):ld(t,e,n)}function ld(t,e,n){const{initialValue:r,validateOnMount:i,bails:o,type:s,checkedValue:l,label:c,validateOnValueUpdate:d,uncheckedValue:u,controlled:f,keepValueOnUnmount:h,syncVModel:p,form:m}=L0(n),g=f?nl(Si):void 0,y=m||g,k=a.computed(()=>Ci(a.toValue(t))),x=a.computed(()=>{if(a.toValue(y==null?void 0:y.schema))return;const H=a.unref(e);return Oo(H)||Jt(H)||Ke(H)||Array.isArray(H)?H:Zc(H)}),w=!Ke(x.value)&&Jt(a.toValue(e)),{id:b,value:S,initialValue:v,meta:O,setState:B,errors:A,flags:V}=k0(k,{modelValue:r,form:y,bails:o,label:c,type:s,validate:x.value?C:void 0,schema:w?e:void 0}),$=a.computed(()=>A.value[0]);p&&$0({value:S,prop:p,handleChange:P,shouldValidate:()=>d&&!V.pendingReset});const L=(q,H=!1)=>{O.touched=!0,H&&F()};async function j(q){var H,ce;if(y!=null&&y.validateSchema){const{results:ae}=await y.validateSchema(q);return(H=ae[a.toValue(k)])!==null&&H!==void 0?H:{valid:!0,errors:[]}}return x.value?Qc(S.value,x.value,{name:a.toValue(k),label:a.toValue(c),values:(ce=y==null?void 0:y.values)!==null&&ce!==void 0?ce:{},bails:o}):{valid:!0,errors:[]}}const F=rl(async()=>(O.pending=!0,O.validated=!0,j("validated-only")),q=>(V.pendingUnmount[W.id]||(B({errors:q.errors}),O.pending=!1,O.valid=q.valid),q)),D=rl(async()=>j("silent"),q=>(O.valid=q.valid,q));function C(q){return(q==null?void 0:q.mode)==="silent"?D():F()}function P(q,H=!0){const ce=Mo(q);he(ce,H)}a.onMounted(()=>{if(i)return F();(!y||!y.validateSchema)&&D()});function R(q){O.touched=q}function Q(q){var H;const ce=q&&"value"in q?q.value:v.value;B({value:De(ce),initialValue:De(ce),touched:(H=q==null?void 0:q.touched)!==null&&H!==void 0?H:!1,errors:(q==null?void 0:q.errors)||[]}),O.pending=!1,O.validated=!1,D()}const ne=a.getCurrentInstance();function he(q,H=!0){S.value=ne&&p?i0(q,ne.props.modelModifiers):q,(H?F:D)()}function ue(q){B({errors:Array.isArray(q)?q:[q]})}const I=a.computed({get(){return S.value},set(q){he(q,d)}}),W={id:b,name:k,label:c,value:I,meta:O,errors:A,errorMessage:$,type:s,checkedValue:l,uncheckedValue:u,bails:o,keepValueOnUnmount:h,resetField:Q,handleReset:()=>Q(),validate:C,handleChange:P,handleBlur:L,setState:B,setTouched:R,setErrors:ue,setValue:he};if(a.provide(jc,W),a.isRef(e)&&typeof a.unref(e)!="function"&&a.watch(e,(q,H)=>{mt(q,H)||(O.validated?F():D())},{deep:!0}),process.env.NODE_ENV!=="production"&&(W._vm=a.getCurrentInstance(),a.watch(()=>Object.assign(Object.assign({errors:A.value},O),{value:S.value}),Pr,{deep:!0}),y||S0(W)),!y)return W;const K=a.computed(()=>{const q=x.value;return!q||Ke(q)||Oo(q)||Jt(q)||Array.isArray(q)?{}:Object.keys(q).reduce((H,ce)=>{const ae=d0(q[ce]).map(we=>we.__locatorRef).reduce((we,Ne)=>{const Ie=xt(y.values,Ne)||y.values[Ne];return Ie!==void 0&&(we[Ne]=Ie),we},{});return Object.assign(H,ae),H},{})});return a.watch(K,(q,H)=>{if(!Object.keys(q).length)return;!mt(q,H)&&(O.validated?F():D())}),a.onBeforeUnmount(()=>{var q;const H=(q=a.toValue(W.keepValueOnUnmount))!==null&&q!==void 0?q:a.toValue(y.keepValuesOnUnmount),ce=a.toValue(k);if(H||!y||V.pendingUnmount[W.id]){y==null||y.removePathState(ce,b);return}V.pendingUnmount[W.id]=!0;const ae=y.getPathState(ce);if(Array.isArray(ae==null?void 0:ae.id)&&(ae!=null&&ae.multiple)?ae!=null&&ae.id.includes(W.id):(ae==null?void 0:ae.id)===W.id){if(ae!=null&&ae.multiple&&Array.isArray(ae.value)){const Ne=ae.value.findIndex(Ie=>mt(Ie,a.toValue(W.checkedValue)));if(Ne>-1){const Ie=[...ae.value];Ie.splice(Ne,1),y.setFieldValue(ce,Ie)}Array.isArray(ae.id)&&ae.id.splice(ae.id.indexOf(W.id),1)}else y.unsetPathValue(a.toValue(k));y.removePathState(ce,b)}}),W}function L0(t){const e=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),n=!!(t!=null&&t.syncVModel),r=typeof(t==null?void 0:t.syncVModel)=="string"?t.syncVModel:(t==null?void 0:t.modelPropName)||"modelValue",i=n&&!("initialValue"in(t||{}))?al(a.getCurrentInstance(),r):t==null?void 0:t.initialValue;if(!t)return Object.assign(Object.assign({},e()),{initialValue:i});const o="valueProp"in t?t.valueProp:t.checkedValue,s="standalone"in t?!t.standalone:t.controlled,l=(t==null?void 0:t.modelPropName)||(t==null?void 0:t.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},e()),t||{}),{initialValue:i,controlled:s??!0,checkedValue:o,syncVModel:l})}function B0(t,e,n){const r=n!=null&&n.standalone?void 0:nl(Si),i=n==null?void 0:n.checkedValue,o=n==null?void 0:n.uncheckedValue;function s(l){const c=l.handleChange,d=a.computed(()=>{const f=a.toValue(l.value),h=a.toValue(i);return Array.isArray(f)?f.findIndex(p=>mt(p,h))>=0:mt(h,f)});function u(f,h=!0){var p,m;if(d.value===((p=f==null?void 0:f.target)===null||p===void 0?void 0:p.checked)){h&&l.validate();return}const g=a.toValue(t),y=r==null?void 0:r.getPathState(g),k=Mo(f);let x=(m=a.toValue(i))!==null&&m!==void 0?m:k;r&&(y!=null&&y.multiple)&&y.type==="checkbox"?x=Kc(xt(r.values,g)||[],x,void 0):(n==null?void 0:n.type)==="checkbox"&&(x=Kc(a.toValue(l.value),x,a.toValue(o))),c(x,h)}return Object.assign(Object.assign({},l),{checked:d,checkedValue:i,uncheckedValue:o,handleChange:u})}return s(ld(t,e,n))}function $0({prop:t,value:e,handleChange:n,shouldValidate:r}){const i=a.getCurrentInstance();if(!i||!t){process.env.NODE_ENV!=="production"&&console.warn("Failed to setup model events because `useField` was not called in setup.");return}const o=typeof t=="string"?t:"modelValue",s=`update:${o}`;o in i.props&&(a.watch(e,l=>{mt(l,al(i,o))||i.emit(s,l)}),a.watch(()=>al(i,o),l=>{if(l===_o&&e.value===void 0)return;const c=l===_o?void 0:l;mt(c,e.value)||n(c,r())}))}function al(t,e){if(t)return t.props[e]}const I0=a.defineComponent({name:"Field",inheritAttrs:!1,props:{as:{type:[String,Object],default:void 0},name:{type:String,required:!0},rules:{type:[Object,String,Function],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnBlur:{type:Boolean,default:void 0},validateOnChange:{type:Boolean,default:void 0},validateOnInput:{type:Boolean,default:void 0},validateOnModelUpdate:{type:Boolean,default:void 0},bails:{type:Boolean,default:()=>ar().bails},label:{type:String,default:void 0},uncheckedValue:{type:null,default:void 0},modelValue:{type:null,default:_o},modelModifiers:{type:null,default:()=>({})},"onUpdate:modelValue":{type:null,default:void 0},standalone:{type:Boolean,default:!1},keepValue:{type:Boolean,default:void 0}},setup(t,e){const n=a.toRef(t,"rules"),r=a.toRef(t,"name"),i=a.toRef(t,"label"),o=a.toRef(t,"uncheckedValue"),s=a.toRef(t,"keepValue"),{errors:l,value:c,errorMessage:d,validate:u,handleChange:f,handleBlur:h,setTouched:p,resetField:m,handleReset:g,meta:y,checked:k,setErrors:x}=D0(r,n,{validateOnMount:t.validateOnMount,bails:t.bails,standalone:t.standalone,type:e.attrs.type,initialValue:P0(t,e),checkedValue:e.attrs.value,uncheckedValue:o,label:i,validateOnValueUpdate:t.validateOnModelUpdate,keepValueOnUnmount:s,syncVModel:!0}),w=function(A,V=!0){f(A,V)},b=a.computed(()=>{const{validateOnInput:B,validateOnChange:A,validateOnBlur:V,validateOnModelUpdate:$}=V0(t);function L(C){h(C,V),Ke(e.attrs.onBlur)&&e.attrs.onBlur(C)}function j(C){w(C,B),Ke(e.attrs.onInput)&&e.attrs.onInput(C)}function F(C){w(C,A),Ke(e.attrs.onChange)&&e.attrs.onChange(C)}const D={name:t.name,onBlur:L,onInput:j,onChange:F};return D["onUpdate:modelValue"]=C=>w(C,$),D}),S=a.computed(()=>{const B=Object.assign({},b.value);_i(e.attrs.type)&&k&&(B.checked=k.value);const A=ad(t,e);return n0(A,e.attrs)&&(B.value=c.value),B}),v=a.computed(()=>Object.assign(Object.assign({},b.value),{modelValue:c.value}));function O(){return{field:S.value,componentField:v.value,value:c.value,meta:y,errors:l.value,errorMessage:d.value,validate:u,resetField:m,handleChange:w,handleInput:B=>w(B,!1),handleReset:g,handleBlur:b.value.onBlur,setTouched:p,setErrors:x}}return e.expose({value:c,meta:y,errors:l,errorMessage:d,setErrors:x,setTouched:p,reset:m,validate:u,handleChange:f}),()=>{const B=a.resolveDynamicComponent(ad(t,e)),A=ol(B,e,O);return B?a.h(B,Object.assign(Object.assign({},e.attrs),S.value),A):A}}});function ad(t,e){let n=t.as||"";return!t.as&&!e.slots.default&&(n="input"),n}function V0(t){var e,n,r,i;const{validateOnInput:o,validateOnChange:s,validateOnBlur:l,validateOnModelUpdate:c}=ar();return{validateOnInput:(e=t.validateOnInput)!==null&&e!==void 0?e:o,validateOnChange:(n=t.validateOnChange)!==null&&n!==void 0?n:s,validateOnBlur:(r=t.validateOnBlur)!==null&&r!==void 0?r:l,validateOnModelUpdate:(i=t.validateOnModelUpdate)!==null&&i!==void 0?i:c}}function P0(t,e){return _i(e.attrs.type)?Uc(t,"modelValue")?t.modelValue:void 0:Uc(t,"modelValue")?t.modelValue:e.attrs.value}const cr=I0;let R0=0;const Ao=["bails","fieldsCount","id","multiple","type","validate"];function cd(t){const e=(t==null?void 0:t.initialValues)||{},n=Object.assign({},a.toValue(e)),r=a.unref(t==null?void 0:t.validationSchema);return r&&Jt(r)&&Ke(r.cast)?De(r.cast(n)||{}):De(n)}function F0(t){var e;const n=R0++;let r=0;const i=a.ref(!1),o=a.ref(!1),s=a.ref(0),l=[],c=a.reactive(cd(t)),d=a.ref([]),u=a.ref({}),f=a.ref({}),h=o0(()=>{f.value=d.value.reduce((T,M)=>(T[Ci(a.toValue(M.path))]=M,T),{})});function p(T,M){const Y=C(T);if(!Y){typeof T=="string"&&(u.value[Ci(T)]=il(M));return}if(typeof T=="string"){const te=Ci(T);u.value[te]&&delete u.value[te]}Y.errors=il(M),Y.valid=!Y.errors.length}function m(T){Et(T).forEach(M=>{p(M,T[M])})}t!=null&&t.initialErrors&&m(t.initialErrors);const g=a.computed(()=>{const T=d.value.reduce((M,Y)=>(Y.errors.length&&(M[Y.path]=Y.errors),M),{});return Object.assign(Object.assign({},u.value),T)}),y=a.computed(()=>Et(g.value).reduce((T,M)=>{const Y=g.value[M];return Y!=null&&Y.length&&(T[M]=Y[0]),T},{})),k=a.computed(()=>d.value.reduce((T,M)=>(T[M.path]={name:M.path||"",label:M.label||""},T),{})),x=a.computed(()=>d.value.reduce((T,M)=>{var Y;return T[M.path]=(Y=M.bails)!==null&&Y!==void 0?Y:!0,T},{})),w=Object.assign({},(t==null?void 0:t.initialErrors)||{}),b=(e=t==null?void 0:t.keepValuesOnUnmount)!==null&&e!==void 0?e:!1,{initialValues:S,originalInitialValues:v,setInitialValues:O}=j0(d,c,t),B=z0(d,c,v,y),A=a.computed(()=>d.value.reduce((T,M)=>{const Y=xt(c,M.path);return gn(T,M.path,Y),T},{})),V=t==null?void 0:t.validationSchema;function $(T,M){var Y,te;const de=a.computed(()=>xt(S.value,a.toValue(T))),N=f.value[a.toValue(T)],X=(M==null?void 0:M.type)==="checkbox"||(M==null?void 0:M.type)==="radio";if(N&&X){N.multiple=!0;const vt=r++;return Array.isArray(N.id)?N.id.push(vt):N.id=[N.id,vt],N.fieldsCount++,N.__flags.pendingUnmount[vt]=!1,N}const ie=a.computed(()=>xt(c,a.toValue(T))),me=a.toValue(T),ye=R.findIndex(vt=>vt===me);ye!==-1&&R.splice(ye,1);const ve=a.computed(()=>{var vt,Ft,Ir,lr;const mn=a.toValue(V);if(Jt(mn))return(Ft=(vt=mn.describe)===null||vt===void 0?void 0:vt.call(mn,a.toValue(T)).required)!==null&&Ft!==void 0?Ft:!1;const So=a.toValue(M==null?void 0:M.schema);return Jt(So)&&(lr=(Ir=So.describe)===null||Ir===void 0?void 0:Ir.call(So).required)!==null&&lr!==void 0?lr:!1}),Ae=r++,je=a.reactive({id:Ae,path:T,touched:!1,pending:!1,valid:!0,validated:!!(!((Y=w[me])===null||Y===void 0)&&Y.length),required:ve,initialValue:de,errors:a.shallowRef([]),bails:(te=M==null?void 0:M.bails)!==null&&te!==void 0?te:!1,label:M==null?void 0:M.label,type:(M==null?void 0:M.type)||"default",value:ie,multiple:!1,__flags:{pendingUnmount:{[Ae]:!1},pendingReset:!1},fieldsCount:1,validate:M==null?void 0:M.validate,dirty:a.computed(()=>!mt(a.unref(ie),a.unref(de)))});return d.value.push(je),f.value[me]=je,h(),y.value[me]&&!w[me]&&a.nextTick(()=>{pt(me,{mode:"silent"})}),a.isRef(T)&&a.watch(T,vt=>{h();const Ft=De(ie.value);f.value[vt]=je,a.nextTick(()=>{gn(c,vt,Ft)})}),je}const L=Gc(se,5),j=Gc(se,5),F=rl(async T=>await(T==="silent"?L():j()),(T,[M])=>{const Y=Et(q.errorBag.value),de=[...new Set([...Et(T.results),...d.value.map(N=>N.path),...Y])].sort().reduce((N,X)=>{var ie;const me=X,ye=C(me)||P(me),ve=((ie=T.results[me])===null||ie===void 0?void 0:ie.errors)||[],Ae=a.toValue(ye==null?void 0:ye.path)||me,je=H0({errors:ve,valid:!ve.length},N.results[Ae]);return N.results[Ae]=je,je.valid||(N.errors[Ae]=je.errors[0]),ye&&u.value[Ae]&&delete u.value[Ae],ye?(ye.valid=je.valid,M==="silent"||M==="validated-only"&&!ye.validated||p(ye,je.errors),N):(p(Ae,ve),N)},{valid:T.valid,results:{},errors:{}});return T.values&&(de.values=T.values),Et(de.results).forEach(N=>{var X;const ie=C(N);ie&&M!=="silent"&&(M==="validated-only"&&!ie.validated||p(ie,(X=de.results[N])===null||X===void 0?void 0:X.errors))}),de});function D(T){d.value.forEach(T)}function C(T){const M=typeof T=="string"?Ci(T):T;return typeof M=="string"?f.value[M]:M}function P(T){return d.value.filter(Y=>T.startsWith(Y.path)).reduce((Y,te)=>Y?te.path.length>Y.path.length?te:Y:te,void 0)}let R=[],Q;function ne(T){return R.push(T),Q||(Q=a.nextTick(()=>{[...R].sort().reverse().forEach(Y=>{qc(c,Y)}),R=[],Q=null})),Q}function he(T){return function(Y,te){return function(N){return N instanceof Event&&(N.preventDefault(),N.stopPropagation()),D(X=>X.touched=!0),i.value=!0,s.value++,at().then(X=>{const ie=De(c);if(X.valid&&typeof Y=="function"){const me=De(A.value);let ye=T?me:ie;return X.values&&(ye=X.values),Y(ye,{evt:N,controlledValues:me,setErrors:m,setFieldError:p,setTouched:Ee,setFieldTouched:Ne,setValues:ae,setFieldValue:H,resetForm:lt,resetField:At})}!X.valid&&typeof te=="function"&&te({values:ie,evt:N,errors:X.errors,results:X.results})}).then(X=>(i.value=!1,X),X=>{throw i.value=!1,X})}}}const I=he(!1);I.withControlled=he(!0);function W(T,M){const Y=d.value.findIndex(de=>de.path===T&&(Array.isArray(de.id)?de.id.includes(M):de.id===M)),te=d.value[Y];if(!(Y===-1||!te)){if(a.nextTick(()=>{pt(T,{mode:"silent",warn:!1})}),te.multiple&&te.fieldsCount&&te.fieldsCount--,Array.isArray(te.id)){const de=te.id.indexOf(M);de>=0&&te.id.splice(de,1),delete te.__flags.pendingUnmount[M]}(!te.multiple||te.fieldsCount<=0)&&(d.value.splice(Y,1),E(T),h(),delete f.value[T])}}function K(T){Et(f.value).forEach(M=>{M.startsWith(T)&&delete f.value[M]}),d.value=d.value.filter(M=>!M.path.startsWith(T)),a.nextTick(()=>{h()})}const q={formId:n,values:c,controlledValues:A,errorBag:g,errors:y,schema:V,submitCount:s,meta:B,isSubmitting:i,isValidating:o,fieldArrays:l,keepValuesOnUnmount:b,validateSchema:a.unref(V)?F:void 0,validate:at,setFieldError:p,validateField:pt,setFieldValue:H,setValues:ae,setErrors:m,setFieldTouched:Ne,setTouched:Ee,resetForm:lt,resetField:At,handleSubmit:I,useFieldModel:Oe,defineInputBinds:z,defineComponentBinds:Z,defineField:_e,stageInitialValue:_,unsetInitialValue:E,setFieldInitialValue:U,createPathState:$,getPathState:C,unsetPathValue:ne,removePathState:W,initialValues:S,getAllPathStates:()=>d.value,destroyPath:K,isFieldTouched:Ie,isFieldDirty:tt,isFieldValid:ee};function H(T,M,Y=!0){const te=De(M),de=typeof T=="string"?T:T.path;C(de)||$(de),gn(c,de,te),Y&&pt(de)}function ce(T,M=!0){Et(c).forEach(Y=>{delete c[Y]}),Et(T).forEach(Y=>{H(Y,T[Y],!1)}),M&&at()}function ae(T,M=!0){Ei(c,T),l.forEach(Y=>Y&&Y.reset()),M&&at()}function we(T,M){const Y=C(a.toValue(T))||$(T);return a.computed({get(){return Y.value},set(te){var de;const N=a.toValue(T);H(N,te,(de=a.toValue(M))!==null&&de!==void 0?de:!1)}})}function Ne(T,M){const Y=C(T);Y&&(Y.touched=M)}function Ie(T){const M=C(T);return M?M.touched:d.value.filter(Y=>Y.path.startsWith(T)).some(Y=>Y.touched)}function tt(T){const M=C(T);return M?M.dirty:d.value.filter(Y=>Y.path.startsWith(T)).some(Y=>Y.dirty)}function ee(T){const M=C(T);return M?M.valid:d.value.filter(Y=>Y.path.startsWith(T)).every(Y=>Y.valid)}function Ee(T){if(typeof T=="boolean"){D(M=>{M.touched=T});return}Et(T).forEach(M=>{Ne(M,!!T[M])})}function At(T,M){var Y;const te=M&&"value"in M?M.value:xt(S.value,T),de=C(T);de&&(de.__flags.pendingReset=!0),U(T,De(te),!0),H(T,te,!1),Ne(T,(Y=M==null?void 0:M.touched)!==null&&Y!==void 0?Y:!1),p(T,(M==null?void 0:M.errors)||[]),a.nextTick(()=>{de&&(de.__flags.pendingReset=!1)})}function lt(T,M){let Y=De(T!=null&&T.values?T.values:v.value);Y=M!=null&&M.force?Y:Ei(v.value,Y),Y=Jt(V)&&Ke(V.cast)?V.cast(Y):Y,O(Y),D(te=>{var de;te.__flags.pendingReset=!0,te.validated=!1,te.touched=((de=T==null?void 0:T.touched)===null||de===void 0?void 0:de[te.path])||!1,H(te.path,xt(Y,te.path),!1),p(te.path,void 0)}),M!=null&&M.force?ce(Y,!1):ae(Y,!1),m((T==null?void 0:T.errors)||{}),s.value=(T==null?void 0:T.submitCount)||0,a.nextTick(()=>{at({mode:"silent"}),D(te=>{te.__flags.pendingReset=!1})})}async function at(T){const M=(T==null?void 0:T.mode)||"force";if(M==="force"&&D(N=>N.validated=!0),q.validateSchema)return q.validateSchema(M);o.value=!0;const Y=await Promise.all(d.value.map(N=>N.validate?N.validate(T).then(X=>({key:N.path,valid:X.valid,errors:X.errors})):Promise.resolve({key:N.path,valid:!0,errors:[]})));o.value=!1;const te={},de={};for(const N of Y)te[N.key]={valid:N.valid,errors:N.errors},N.errors.length&&(de[N.key]=N.errors[0]);return{valid:Y.every(N=>N.valid),results:te,errors:de}}async function pt(T,M){var Y;const te=C(T);if(te&&(M==null?void 0:M.mode)!=="silent"&&(te.validated=!0),V){const{results:N}=await F((M==null?void 0:M.mode)||"validated-only");return N[T]||{errors:[],valid:!0}}return te!=null&&te.validate?te.validate(M):(!te&&((Y=M==null?void 0:M.warn)!==null&&Y!==void 0?Y:!0)&&process.env.NODE_ENV!=="production"&&a.warn(`field with path ${T} was not found`),Promise.resolve({errors:[],valid:!0}))}function E(T){qc(S.value,T)}function _(T,M,Y=!1){U(T,M),gn(c,T,M),Y&&!(t!=null&&t.initialValues)&&gn(v.value,T,De(M))}function U(T,M,Y=!1){gn(S.value,T,De(M)),Y&&gn(v.value,T,De(M))}async function se(){const T=a.unref(V);if(!T)return{valid:!0,results:{},errors:{}};o.value=!0;const M=Oo(T)||Jt(T)?await y0(T,c):await b0(T,c,{names:k.value,bailsMap:x.value});return o.value=!1,M}const Me=I((T,{evt:M})=>{Wc(M)&&M.target.submit()});a.onMounted(()=>{if(t!=null&&t.initialErrors&&m(t.initialErrors),t!=null&&t.initialTouched&&Ee(t.initialTouched),t!=null&&t.validateOnMount){at();return}q.validateSchema&&q.validateSchema("silent")}),a.isRef(V)&&a.watch(V,()=>{var T;(T=q.validateSchema)===null||T===void 0||T.call(q,"validated-only")}),a.provide(Si,q),process.env.NODE_ENV!=="production"&&(C0(q),a.watch(()=>Object.assign(Object.assign({errors:g.value},B.value),{values:c,isSubmitting:i.value,isValidating:o.value,submitCount:s.value}),Pr,{deep:!0}));function _e(T,M){const Y=Ke(M)||M==null?void 0:M.label,te=C(a.toValue(T))||$(T,{label:Y}),de=()=>Ke(M)?M(No(te,Ao)):M||{};function N(){var ve;te.touched=!0,((ve=de().validateOnBlur)!==null&&ve!==void 0?ve:ar().validateOnBlur)&&pt(te.path)}function X(){var ve;((ve=de().validateOnInput)!==null&&ve!==void 0?ve:ar().validateOnInput)&&a.nextTick(()=>{pt(te.path)})}function ie(){var ve;((ve=de().validateOnChange)!==null&&ve!==void 0?ve:ar().validateOnChange)&&a.nextTick(()=>{pt(te.path)})}const me=a.computed(()=>{const ve={onChange:ie,onInput:X,onBlur:N};return Ke(M)?Object.assign(Object.assign({},ve),M(No(te,Ao)).props||{}):M!=null&&M.props?Object.assign(Object.assign({},ve),M.props(No(te,Ao))):ve});return[we(T,()=>{var ve,Ae,je;return(je=(ve=de().validateOnModelUpdate)!==null&&ve!==void 0?ve:(Ae=ar())===null||Ae===void 0?void 0:Ae.validateOnModelUpdate)!==null&&je!==void 0?je:!0}),me]}function Oe(T){return Array.isArray(T)?T.map(M=>we(M,!0)):we(T)}function z(T,M){const[Y,te]=_e(T,M);function de(){te.value.onBlur()}function N(ie){const me=Mo(ie);H(a.toValue(T),me,!1),te.value.onInput()}function X(ie){const me=Mo(ie);H(a.toValue(T),me,!1),te.value.onChange()}return a.computed(()=>Object.assign(Object.assign({},te.value),{onBlur:de,onInput:N,onChange:X,value:Y.value}))}function Z(T,M){const[Y,te]=_e(T,M),de=C(a.toValue(T));function N(X){Y.value=X}return a.computed(()=>{const X=Ke(M)?M(No(de,Ao)):M||{};return Object.assign({[X.model||"modelValue"]:Y.value,[`onUpdate:${X.model||"modelValue"}`]:N},te.value)})}return Object.assign(Object.assign({},q),{values:a.readonly(c),handleReset:()=>lt(),submitForm:Me})}function z0(t,e,n,r){const i={touched:"some",pending:"some",valid:"every"},o=a.computed(()=>!mt(e,a.unref(n)));function s(){const c=t.value;return Et(i).reduce((d,u)=>{const f=i[u];return d[u]=c[f](h=>h[u]),d},{})}const l=a.reactive(s());return a.watchEffect(()=>{const c=s();l.touched=c.touched,l.valid=c.valid,l.pending=c.pending}),a.computed(()=>Object.assign(Object.assign({initialValues:a.unref(n)},l),{valid:l.valid&&!Et(r.value).length,dirty:o.value}))}function j0(t,e,n){const r=cd(n),i=a.ref(r),o=a.ref(De(r));function s(l,c=!1){i.value=Ei(De(i.value)||{},De(l)),o.value=Ei(De(o.value)||{},De(l)),c&&t.value.forEach(d=>{if(d.touched)return;const f=xt(i.value,d.path);gn(e,d.path,De(f))})}return{initialValues:i,originalInitialValues:o,setInitialValues:s}}function H0(t,e){return e?{valid:t.valid&&e.valid,errors:[...t.errors,...e.errors]}:t}const W0=a.defineComponent({name:"Form",inheritAttrs:!1,props:{as:{type:null,default:"form"},validationSchema:{type:Object,default:void 0},initialValues:{type:Object,default:void 0},initialErrors:{type:Object,default:void 0},initialTouched:{type:Object,default:void 0},validateOnMount:{type:Boolean,default:!1},onSubmit:{type:Function,default:void 0},onInvalidSubmit:{type:Function,default:void 0},keepValues:{type:Boolean,default:!1}},setup(t,e){const n=a.toRef(t,"validationSchema"),r=a.toRef(t,"keepValues"),{errors:i,errorBag:o,values:s,meta:l,isSubmitting:c,isValidating:d,submitCount:u,controlledValues:f,validate:h,validateField:p,handleReset:m,resetForm:g,handleSubmit:y,setErrors:k,setFieldError:x,setFieldValue:w,setValues:b,setFieldTouched:S,setTouched:v,resetField:O}=F0({validationSchema:n.value?n:void 0,initialValues:t.initialValues,initialErrors:t.initialErrors,initialTouched:t.initialTouched,validateOnMount:t.validateOnMount,keepValuesOnUnmount:r}),B=y((C,{evt:P})=>{Wc(P)&&P.target.submit()},t.onInvalidSubmit),A=t.onSubmit?y(t.onSubmit,t.onInvalidSubmit):B;function V(C){Qs(C)&&C.preventDefault(),m(),typeof e.attrs.onReset=="function"&&e.attrs.onReset()}function $(C,P){return y(typeof C=="function"&&!P?C:P,t.onInvalidSubmit)(C)}function L(){return De(s)}function j(){return De(l.value)}function F(){return De(i.value)}function D(){return{meta:l.value,errors:i.value,errorBag:o.value,values:s,isSubmitting:c.value,isValidating:d.value,submitCount:u.value,controlledValues:f.value,validate:h,validateField:p,handleSubmit:$,handleReset:m,submitForm:B,setErrors:k,setFieldError:x,setFieldValue:w,setValues:b,setFieldTouched:S,setTouched:v,resetForm:g,resetField:O,getValues:L,getMeta:j,getErrors:F}}return e.expose({setFieldError:x,setErrors:k,setFieldValue:w,setValues:b,setFieldTouched:S,setTouched:v,resetForm:g,validate:h,validateField:p,resetField:O,getValues:L,getMeta:j,getErrors:F,values:s,meta:l,errors:i}),function(){const P=t.as==="form"?t.as:t.as?a.resolveDynamicComponent(t.as):null,R=ol(P,e,D);if(!P)return R;const Q=P==="form"?{novalidate:!0}:{};return a.h(P,Object.assign(Object.assign(Object.assign({},Q),e.attrs),{onSubmit:A,onReset:V}),R)}}}),U0=a.defineComponent({name:"ErrorMessage",props:{as:{type:String,default:void 0},name:{type:String,required:!0}},setup(t,e){const n=a.inject(Si,void 0),r=a.computed(()=>n==null?void 0:n.errors.value[t.name]);function i(){return{message:r.value}}return()=>{if(!r.value)return;const o=t.as?a.resolveDynamicComponent(t.as):t.as,s=ol(o,e,i),l=Object.assign({role:"alert"},e.attrs);return!o&&(Array.isArray(s)||!s)&&(s!=null&&s.length)?s:(Array.isArray(s)||!s)&&!(s!=null&&s.length)?a.h(o||"span",l,r.value):a.h(o,l,s)}}});function Y0(t){const e=nl(Si),n=t?void 0:a.inject(jc);return a.computed(()=>t?e==null?void 0:e.errors.value[a.toValue(t)]:n==null?void 0:n.errorMessage.value)}Gt("required",t=>typeof t=="number"&&t!=null||typeof t=="object"&&t!=null||typeof t=="boolean"&&t===!0?!0:!t||!t.length?"This field is required":!0),Gt("email",t=>{var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e.test(String(t).trim().toLowerCase())?!0:"This field must be a valid email"}),Gt("strong_password",t=>t?t.indexOf(" ")>-1?"Password shouldn't contain space":t.length<8||t.length>30?"Password must be between 8 and 30 characters":t.match(/[a-z]/)===null||t.match(/[A-Z]/)===null||t.match(/\d/)===null?"Password must contain at least one uppercase letter, one lowercase letter and one number digit":!0:"Password is required"),Gt("no_space",t=>(t==null?void 0:t.indexOf(" "))>-1?"This field shouldn't contain space":!0),Gt("minLength",(t,[e])=>!t||!t.length?!0:t.length<e?`This field must be at least ${e} characters`:!0),Gt("hasUppercaseLetter",t=>/[A-Z]/.test(t)?!0:"This field must have at least one uppercase character"),Gt("hasLowercaseLetter",t=>/[a-z]/.test(t)?!0:"This field must have at least one lowercase character"),Gt("hasNumber",t=>/\d/.test(t)?!0:"This field must have at least one number"),Gt("hasSpecialCharacter",t=>/[!@$%^&*(),.?":{}|]/.test(t)?!0:"This field must have at least one special character"),Gt("url",t=>{var e=/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi;return e.test(String(t).trim().toLowerCase())?!0:"This field must be a valid URL"}),Gt("number",t=>parseFloat(t)?!0:"This field must be a number");const be=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},q0={},K0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor"},G0=[a.createElementVNode("path",{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"},null,-1)];function J0(t,e){return a.openBlock(),a.createElementBlock("svg",K0,G0)}const Z0=be(q0,[["render",J0]]),X0={},Q0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor"},ey=[a.createElementVNode("path",{d:"M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z"},null,-1)];function ty(t,e){return a.openBlock(),a.createElementBlock("svg",Q0,ey)}const ny=be(X0,[["render",ty]]),ry={class:"relative"},Fr=Object.assign({name:"WpicSpinner"},{props:{color:{type:String,default:""}},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",ry,[a.createVNode(Z0,{class:"absolute opacity-25"}),a.createVNode(ny,{class:a.normalizeClass(["animate-spin",{[`${t.color}`]:!0}])},null,8,["class"])]))}});let fe={theme:"wpic-tools",popoverTarget:"body"};const iy=["is","type","disabled"],oy={key:0,class:"absolute inset-0 flex justify-center items-center"},sy={class:"rounded-lg py-1 min-w-48 bg-white border border-gray-300 dark:bg-gray-930 dark:border-gray-920 shadow-md"},ly=["onClick"],Ni=Object.assign({name:"WpicButton"},{props:{label:String,primary:Boolean,type:{type:String,default:"button"},secondary:Boolean,destructive:Boolean,inverse:Boolean,disabled:Boolean,hideDisabled:Boolean,full:Boolean,loading:Boolean,colorless:Boolean,outline:{type:Boolean,default:!0},medium:Boolean,small:Boolean,plain:Boolean,outlining:Boolean,square:Boolean,to:[String,Object],actions:{}},setup(t){const e=t,n=a.ref(null),r=a.ref(null),i=a.ref(!1),o=a.computed(()=>e.to?"router-link":"div"),s=k=>{r.value&&!r.value.contains(k.target)&&n.value&&!n.value.contains(k.target)&&(i.value=!1)};a.onMounted(()=>{document.addEventListener("click",s)}),a.onUnmounted(()=>{document.removeEventListener("click",s)});const l={pmi:"has-[.medium]:h-10 has-[.medium]:text-sm has-[.small]:h-8 has-[.small]:text-xs h-12","wpic-tools":"rounded-md has-[.medium]:h-8 has-[.medium]:text-sm has-[.small]:h-6 has-[.small]:text-xs h-10"},c={pmi:"","wpic-tools":"border-none ring-1 ring-black/5 dark:ring-white/10 bg-transparent text-iron-700 disabled:text-iron-700/50 enabled:hover:bg-iron-900/5 enabled:active:bg-iron-200 enabled:active:shadow-inner dark:enabled:border-iron-900 dark:disabled:border-iron-900 dark:text-iron-200 dark:enabled:hover:bg-iron-900 dark:enabled:active:bg-iron-930 dark:disabled:text-iron-400/50"},d={pmi:"","wpic-tools":"bg-transparent text-red-600 disabled:text-red-600/50 enabled:hover:bg-red-500/5 enabled:active:bg-red-100 enabled:active:shadow-inner dark:text-red-400 dark:enabled:hover:bg-red-500/10 dark:enabled:active:bg-red-500/25 dark:disabled:text-red-500/50"},u={pmi:"bg-violet-800 border border-violet-800 focus:bg-violet-800 text-white disabled:bg-zinc-100 disabled:text-zinc-400 disabled:border-zinc-100 enabled:hover:bg-violet-900 enabled:hover:border-violet-900 active:scale-95 enabled:transform","wpic-tools":"border-none! bg-linear-to-b bg-wpic-600 text-white disabled:text-white/50 border-none shadow-[0_1px_0_0_--theme(--color-white/30%)_inset,0_-1px_1px_0_--theme(--color-black/5%)_inset] enabled:active:shadow-inner enabled:hover:bg-wpic-500 enabled:active:text-white/80 dark:shadow-[0_1px_0_0_--theme(--color-white/5%)_inset,0_0_0_1px_--theme(--color-white/2%)_inset] dark:bg-wpic-700 dark:enabled:active:shadow-inner dark:enabled:hover:bg-wpic-600"},f={pmi:"bg-white text-violet-800 border-zinc-400 dark:border-zinc-700 dark:text-zinc-200 dark:bg-zinc-700 dark:hover:bg-zinc-600 dark:hover:border-zinc-600 disabled:text-zinc-400 active:scale-95 enabled:transform","wpic-tools":"border-none! bg-linear-to-b bg-iron-100 text-iron-800 disabled:text-iron-800/50 shadow-[0_1px_0_0_--theme(--color-white/30%)_inset,0_-1px_1px_0_--theme(--color-black/5%)_inset] enabled:active:shadow-inner enabled:hover:bg-iron-200 enabled:active:bg-iron-300 enabled:active:text-iron-800/80 dark:enabled:active:text-iron-200/80 dark:shadow-[0_1px_0_0_--theme(--color-white/5%)_inset,0_0_0_1px_--theme(--color-white/2%)_inset] dark:text-iron-200 dark:bg-iron-900 dark:disabled:text-iron-200/50 dark:enabled:active:shadow-inner dark:enabled:hover:bg-iron-800 dark:enabled:active:bg-iron-700"},h={pmi:"","wpic-tools":"border-none! text-white bg-linear-to-b bg-red-500 disabled:text-red-600/50 border-red-500 enabled:hover:bg-red-400 shadow-[0_1px_0_0_--theme(--color-white/30%)_inset,0_-1px_1px_0_--theme(--color-black/5%)_inset] enabled:hover:border-red-600 enabled:active:shadow-inner enabled:active:text-white/80 enabled:active:bg-red-700 enabled:active:border-red-700 dark:bg-red-400/70 dark:border-red-400/70"},p={pmi:"border-zinc-300 dark:border-zinc-700 dark:text-zinc-300","wpic-tools":" text-gray-950 disabled:text-gray-950/50 border-none ring-1 ring-black/5 shadow-xs enabled:hover:bg-gray-50 enabled:active:text-gray-950/60 bg-white dark:bg-transparent dark:ring-1 dark:ring-gray-800 dark:text-white dark:disabled:text-white/50 dark:shadow-[0_1px_0_0_--theme(--color-white/5%)_inset,0_0_0_1px_--theme(--color-white/2%)_inset] enabled:active:shadow-inner dark:hover:bg-white/10 dark:enabled:active:text-white/80"},m={pmi:"text-violet-800 hover:underline","wpic-tools":"text-lime-800 hover:underline"},g={pmi:"text-red-600 hover:text-red-500 hover:underline","wpic-tools":"text-red-600 disabled:text-red-600/50 hover:text-red-500 dark:text-red-400 dark:hover:text-red-500 hover:underline"},y={pmi:"hover:text-violet-800 hover:underline","wpic-tools":"dark:text-gray-200 hover:text-lime-800 hover:underline"};return(k,x)=>{var w;return a.openBlock(),a.createElementBlock("button",{ref_key:"reference",ref:n,is:o.value,type:t.type,disabled:t.disabled,onClick:x[0]||(x[0]=b=>{var S;return(S=t.actions)!=null&&S.length?i.value=!i.value:null}),class:a.normalizeClass([{"cursor-pointer":!t.disabled&&!t.loading,"active:outline active:outline-2 active:outline-offset-4":!t.disabled&&!t.loading&&t.outlining,"cursor-not-allowed":t.disabled&&!t.hideDisabled,"":t.outline&&!t.plain,"ring-0!":!t.outline,[`${l[a.unref(fe).theme]}`]:!0,[`${u[a.unref(fe).theme]}`]:t.primary&&!t.plain&&!t.inverse,[`${f[a.unref(fe).theme]}`]:t.secondary,[`${p[a.unref(fe).theme]}`]:!t.primary&&!t.secondary&&!t.plain&&!t.colorless&&!t.destructive,[`${m[a.unref(fe).theme]}`]:t.primary&&t.plain,[`${y[a.unref(fe).theme]}`]:!t.primary&&!t.destructive&&t.plain,[`${c[a.unref(fe).theme]}`]:t.colorless,[`${h[a.unref(fe).theme]}`]:t.destructive&&!t.plain&&!t.colorless,[`${g[a.unref(fe).theme]}`]:t.destructive&&t.plain,[`${d[a.unref(fe).theme]}`]:t.destructive&&t.colorless,"bg-zinc-50 border-violet-800 text-violet-800":t.primary&&t.inverse,"hover:bg-white":t.primary&&t.inverse&&!t.disabled&&!t.loading,"w-full":t.full,"text-opacity-50":t.disabled,"h-auto":t.plain,"rounded-sm":!t.plain,"aspect-square":t.square},"wpic-button leading-none font-medium no-underline appearance-none outline-zinc-600 focus:outline-hidden relative inline-flex justify-center items-center"])},[t.loading?(a.openBlock(),a.createElementBlock("div",oy,[a.createVNode(Fr,{class:"w-6 h-6"})])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.value),{to:t.to,class:a.normalizeClass(["flex items-center justify-center select-none whitespace-nowrap py-1 h-full",{medium:t.medium,small:t.small,"opacity-0":t.loading,"px-2":!!(t.small&&!t.plain),"px-3":!!(t.medium&&!t.plain),"px-4":!t.small&&!t.medium&&!t.plain,"px-0! aspect-square":t.square}])},{default:a.withCtx(()=>[a.renderSlot(k.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(t.label),1)])]),_:3},8,["to","class"])),(w=t.actions)!=null&&w.length&&i.value?(a.openBlock(),a.createElementBlock("div",{key:1,ref_key:"floating",ref:r,class:"absolute z-30 top-12 left-0"},[a.createElementVNode("div",sy,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.actions,b=>(a.openBlock(),a.createElementBlock("div",{onClick:b.value,class:"font-normal h-10 flex items-center px-4 hover:bg-gray-100 dark:hover:bg-white/5"},a.toDisplayString(b.label),9,ly))),256))])],512)):a.createCommentVNode("",!0)],10,iy)}}}),ay=Object.assign({name:"WpicButtonGroup"},{setup(t){const e={pmi:"border","wpic-tools":"border-gray-300"};return(n,r)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["wpic-button-group flex flex-wrap h-10",[e[a.unref(fe).theme]]])},[a.renderSlot(n.$slots,"default")],2))}}),cy={name:"WpicInputGroup"},dy={class:"wpic-input-group flex w-full"};function uy(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("div",dy,[a.renderSlot(t.$slots,"default")])}const fy=be(cy,[["render",uy]]),hy=Object.assign({name:"WpicForm"},{setup(t,{expose:e}){const n=a.ref();async function r(){return await n.value.validate()}function i(){n.value.resetForm()}function o(){return n.value}function s(){return n.value.errors}return e({validate:r,resetForm:i,getForm:o,errors:s}),(l,c)=>(a.openBlock(),a.createBlock(a.unref(W0),{ref_key:"myForm",ref:n},{default:a.withCtx(({values:d,meta:u,errors:f})=>[a.renderSlot(l.$slots,"default")]),_:3},512))}}),Mi=Math.min,zr=Math.max,Do=Math.round,Bn=t=>({x:t,y:t}),py={left:"right",right:"left",bottom:"top",top:"bottom"},my={start:"end",end:"start"};function cl(t,e,n){return zr(t,Mi(e,n))}function Ai(t,e){return typeof t=="function"?t(e):t}function dr(t){return t.split("-")[0]}function Di(t){return t.split("-")[1]}function dd(t){return t==="x"?"y":"x"}function dl(t){return t==="y"?"height":"width"}function Lo(t){return["top","bottom"].includes(dr(t))?"y":"x"}function ul(t){return dd(Lo(t))}function gy(t,e,n){n===void 0&&(n=!1);const r=Di(t),i=ul(t),o=dl(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Bo(s)),[s,Bo(s)]}function yy(t){const e=Bo(t);return[fl(t),e,fl(e)]}function fl(t){return t.replace(/start|end/g,e=>my[e])}function by(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}function ky(t,e,n,r){const i=Di(t);let o=by(dr(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(fl)))),o}function Bo(t){return t.replace(/left|right|bottom|top/g,e=>py[e])}function wy(t){return{top:0,right:0,bottom:0,left:0,...t}}function ud(t){return typeof t!="number"?wy(t):{top:t,right:t,bottom:t,left:t}}function $o(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function fd(t,e,n){let{reference:r,floating:i}=t;const o=Lo(e),s=ul(e),l=dl(s),c=dr(e),d=o==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[l]/2-i[l]/2;let p;switch(c){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Di(e)){case"start":p[s]-=h*(n&&d?-1:1);break;case"end":p[s]+=h*(n&&d?-1:1);break}return p}const vy=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,l=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let d=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=fd(d,r,c),h=r,p={},m=0;for(let g=0;g<l.length;g++){const{name:y,fn:k}=l[g],{x,y:w,data:b,reset:S}=await k({x:u,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:d,platform:s,elements:{reference:t,floating:e}});u=x??u,f=w??f,p={...p,[y]:{...p[y],...b}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(d=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:u,y:f}=fd(d,h,c)),g=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:p}};async function hd(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:l,strategy:c}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Ai(e,t),m=ud(p),y=l[h?f==="floating"?"reference":"floating":f],k=$o(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),x=f==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),b=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=$o(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(k.top-S.top+m.top)/b.y,bottom:(S.bottom-k.bottom+m.bottom)/b.y,left:(k.left-S.left+m.left)/b.x,right:(S.right-k.right+m.right)/b.x}}const xy=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:l,middlewareData:c}=e,{element:d,padding:u=0}=Ai(t,e)||{};if(d==null)return{};const f=ud(u),h={x:n,y:r},p=ul(i),m=dl(p),g=await s.getDimensions(d),y=p==="y",k=y?"top":"left",x=y?"bottom":"right",w=y?"clientHeight":"clientWidth",b=o.reference[m]+o.reference[p]-h[p]-o.floating[m],S=h[p]-o.reference[p],v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let O=v?v[w]:0;(!O||!await(s.isElement==null?void 0:s.isElement(v)))&&(O=l.floating[w]||o.floating[m]);const B=b/2-S/2,A=O/2-g[m]/2-1,V=Mi(f[k],A),$=Mi(f[x],A),L=V,j=O-g[m]-$,F=O/2-g[m]/2+B,D=cl(L,F,j),C=!c.arrow&&Di(i)!=null&&F!==D&&o.reference[m]/2-(F<L?V:$)-g[m]/2<0,P=C?F<L?F-L:F-j:0;return{[p]:h[p]+P,data:{[p]:D,centerOffset:F-D-P,...C&&{alignmentOffset:P}},reset:C}}}),Ey=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:l,platform:c,elements:d}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Ai(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const k=dr(i),x=dr(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),b=h||(x||!g?[Bo(l)]:yy(l));!h&&m!=="none"&&b.push(...ky(l,g,m,w));const S=[l,...b],v=await hd(e,y),O=[];let B=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&O.push(v[k]),f){const L=gy(i,s,w);O.push(v[L[0]],v[L[1]])}if(B=[...B,{placement:i,overflows:O}],!O.every(L=>L<=0)){var A,V;const L=(((A=o.flip)==null?void 0:A.index)||0)+1,j=S[L];if(j)return{data:{index:L,overflows:B},reset:{placement:j}};let F=(V=B.filter(D=>D.overflows[0]<=0).sort((D,C)=>D.overflows[1]-C.overflows[1])[0])==null?void 0:V.placement;if(!F)switch(p){case"bestFit":{var $;const D=($=B.map(C=>[C.placement,C.overflows.filter(P=>P>0).reduce((P,R)=>P+R,0)]).sort((C,P)=>C[1]-P[1])[0])==null?void 0:$[0];D&&(F=D);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}};async function Cy(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=dr(n),l=Di(n),c=Lo(n)==="y",d=["left","top"].includes(s)?-1:1,u=o&&c?-1:1,f=Ai(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof m=="number"&&(p=l==="end"?m*-1:m),c?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const Sy=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:l}=e,c=await Cy(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},_y=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:k,y:x}=y;return{x:k,y:x}}},...c}=Ai(t,e),d={x:n,y:r},u=await hd(e,c),f=Lo(dr(i)),h=dd(f);let p=d[h],m=d[f];if(o){const y=h==="y"?"top":"left",k=h==="y"?"bottom":"right",x=p+u[y],w=p-u[k];p=cl(x,p,w)}if(s){const y=f==="y"?"top":"left",k=f==="y"?"bottom":"right",x=m+u[y],w=m-u[k];m=cl(x,m,w)}const g=l.fn({...e,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}};function ur(t){return hl(t)?(t.nodeName||"").toLowerCase():"#document"}function Dt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $n(t){var e;return(e=(hl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function hl(t){return t instanceof Node||t instanceof Dt(t).Node}function rn(t){return t instanceof Element||t instanceof Dt(t).Element}function on(t){return t instanceof HTMLElement||t instanceof Dt(t).HTMLElement}function pd(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Dt(t).ShadowRoot}function Li(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Zt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function Oy(t){return["table","td","th"].includes(ur(t))}function pl(t){const e=ml(),n=Zt(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Ty(t){let e=In(t);for(;on(e)&&!jr(e);){if(pl(e))return e;e=In(e)}return null}function ml(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jr(t){return["html","body","#document"].includes(ur(t))}function Zt(t){return Dt(t).getComputedStyle(t)}function Io(t){return rn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function In(t){if(ur(t)==="html")return t;const e=t.assignedSlot||t.parentNode||pd(t)&&t.host||$n(t);return pd(e)?e.host:e}function md(t){const e=In(t);return jr(e)?t.ownerDocument?t.ownerDocument.body:t.body:on(e)&&Li(e)?e:md(e)}function gl(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=md(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=Dt(i);return o?e.concat(s,s.visualViewport||[],Li(i)?i:[],s.frameElement&&n?gl(s.frameElement):[]):e.concat(i,gl(i,[],n))}function gd(t){const e=Zt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=on(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,l=Do(n)!==o||Do(r)!==s;return l&&(n=o,r=s),{width:n,height:r,$:l}}function yd(t){return rn(t)?t:t.contextElement}function Hr(t){const e=yd(t);if(!on(e))return Bn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=gd(e);let s=(o?Do(n.width):n.width)/r,l=(o?Do(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Ny=Bn(0);function bd(t){const e=Dt(t);return!ml()||!e.visualViewport?Ny:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function My(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Dt(t)?!1:e}function Bi(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=yd(t);let s=Bn(1);e&&(r?rn(r)&&(s=Hr(r)):s=Hr(t));const l=My(o,n,r)?bd(o):Bn(0);let c=(i.left+l.x)/s.x,d=(i.top+l.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(o){const h=Dt(o),p=r&&rn(r)?Dt(r):r;let m=h,g=m.frameElement;for(;g&&r&&p!==m;){const y=Hr(g),k=g.getBoundingClientRect(),x=Zt(g),w=k.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,b=k.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,d*=y.y,u*=y.x,f*=y.y,c+=w,d+=b,m=Dt(g),g=m.frameElement}}return $o({width:u,height:f,x:c,y:d})}const Ay=[":popover-open",":modal"];function yl(t){return Ay.some(e=>{try{return t.matches(e)}catch{return!1}})}function Dy(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=$n(r),l=e?yl(e.floating):!1;if(r===s||l&&o)return n;let c={scrollLeft:0,scrollTop:0},d=Bn(1);const u=Bn(0),f=on(r);if((f||!f&&!o)&&((ur(r)!=="body"||Li(s))&&(c=Io(r)),on(r))){const h=Bi(r);d=Hr(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+u.x,y:n.y*d.y-c.scrollTop*d.y+u.y}}function Ly(t){return Array.from(t.getClientRects())}function kd(t){return Bi($n(t)).left+Io(t).scrollLeft}function By(t){const e=$n(t),n=Io(t),r=t.ownerDocument.body,i=zr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=zr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+kd(t);const l=-n.scrollTop;return Zt(r).direction==="rtl"&&(s+=zr(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:l}}function $y(t,e){const n=Dt(t),r=$n(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;const d=ml();(!d||d&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l,y:c}}function Iy(t,e){const n=Bi(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=on(t)?Hr(t):Bn(1),s=t.clientWidth*o.x,l=t.clientHeight*o.y,c=i*o.x,d=r*o.y;return{width:s,height:l,x:c,y:d}}function wd(t,e,n){let r;if(e==="viewport")r=$y(t,n);else if(e==="document")r=By($n(t));else if(rn(e))r=Iy(e,n);else{const i=bd(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return $o(r)}function vd(t,e){const n=In(t);return n===e||!rn(n)||jr(n)?!1:Zt(n).position==="fixed"||vd(n,e)}function Vy(t,e){const n=e.get(t);if(n)return n;let r=gl(t,[],!1).filter(l=>rn(l)&&ur(l)!=="body"),i=null;const o=Zt(t).position==="fixed";let s=o?In(t):t;for(;rn(s)&&!jr(s);){const l=Zt(s),c=pl(s);!c&&l.position==="fixed"&&(i=null),(o?!c&&!i:!c&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Li(s)&&!c&&vd(t,s))?r=r.filter(u=>u!==s):i=l,s=In(s)}return e.set(t,r),r}function Py(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?yl(e)?[]:Vy(e,this._c):[].concat(n),r],l=s[0],c=s.reduce((d,u)=>{const f=wd(e,u,i);return d.top=zr(f.top,d.top),d.right=Mi(f.right,d.right),d.bottom=Mi(f.bottom,d.bottom),d.left=zr(f.left,d.left),d},wd(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ry(t){const{width:e,height:n}=gd(t);return{width:e,height:n}}function Fy(t,e,n){const r=on(e),i=$n(e),o=n==="fixed",s=Bi(t,!0,o,e);let l={scrollLeft:0,scrollTop:0};const c=Bn(0);if(r||!r&&!o)if((ur(e)!=="body"||Li(i))&&(l=Io(e)),r){const f=Bi(e,!0,o,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&(c.x=kd(i));const d=s.left+l.scrollLeft-c.x,u=s.top+l.scrollTop-c.y;return{x:d,y:u,width:s.width,height:s.height}}function bl(t){return Zt(t).position==="static"}function xd(t,e){return!on(t)||Zt(t).position==="fixed"?null:e?e(t):t.offsetParent}function Ed(t,e){const n=Dt(t);if(yl(t))return n;if(!on(t)){let i=In(t);for(;i&&!jr(i);){if(rn(i)&&!bl(i))return i;i=In(i)}return n}let r=xd(t,e);for(;r&&Oy(r)&&bl(r);)r=xd(r,e);return r&&jr(r)&&bl(r)&&!pl(r)?n:r||Ty(t)||n}const zy=async function(t){const e=this.getOffsetParent||Ed,n=this.getDimensions,r=await n(t.floating);return{reference:Fy(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jy(t){return Zt(t).direction==="rtl"}const Hy={convertOffsetParentRelativeRectToViewportRelativeRect:Dy,getDocumentElement:$n,getClippingRect:Py,getOffsetParent:Ed,getElementRects:zy,getClientRects:Ly,getDimensions:Ry,getScale:Hr,isElement:rn,isRTL:jy},Cd=Sy,Sd=_y,_d=Ey,Wy=xy,Od=(t,e,n)=>{const r=new Map,i={platform:Hy,...n},o={...i.platform,_c:r};return vy(t,e,{...i,platform:o})};function Uy(t){return t!=null&&typeof t=="object"&&"$el"in t}function Yy(t){if(Uy(t)){const e=t.$el;return hl(e)&&ur(e)==="#comment"?null:e}return t}function qy(t){return{name:"arrow",options:t,fn(e){const n=Yy(a.unref(t.element));return n==null?{}:Wy({element:n,padding:t.padding}).fn(e)}}}const Ky={},Gy={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},Jy=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)];function Zy(t,e){return a.openBlock(),a.createElementBlock("svg",Gy,Jy)}const $i=be(Ky,[["render",Zy]]);let Vo;const Xy=new Uint8Array(16);function Qy(){if(!Vo&&(Vo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Vo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vo(Xy)}const nt=[];for(let t=0;t<256;++t)nt.push((t+256).toString(16).slice(1));function e1(t,e=0){return nt[t[e+0]]+nt[t[e+1]]+nt[t[e+2]]+nt[t[e+3]]+"-"+nt[t[e+4]]+nt[t[e+5]]+"-"+nt[t[e+6]]+nt[t[e+7]]+"-"+nt[t[e+8]]+nt[t[e+9]]+"-"+nt[t[e+10]]+nt[t[e+11]]+nt[t[e+12]]+nt[t[e+13]]+nt[t[e+14]]+nt[t[e+15]]}const Td={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function kl(t,e,n){if(Td.randomUUID&&!t)return Td.randomUUID();t=t||{};const r=t.random||(t.rng||Qy)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,e1(r)}let t1={isMobile(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},capitalize(t){return t?(t=t.toString(),t=t.replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()}).trim(),t.charAt(0).toUpperCase()+t.slice(1)):""},sortByKey(t,e,n="asc"){return[...t].sort((r,i)=>{let o=r[e],s=i[e];const l=!isNaN(Date.parse(o))&&/^\d{4}-\d{2}-\d{2}(T.*)?$/.test(o),c=!isNaN(Date.parse(s))&&/^\d{4}-\d{2}-\d{2}(T.*)?$/.test(s);if(l&&c)o=new Date(o).getTime(),s=new Date(s).getTime();else{const d=parseFloat(o),u=parseFloat(s),f=!isNaN(d)&&typeof o!="boolean",h=!isNaN(u)&&typeof s!="boolean";f&&h?(o=d,s=u):(o=String(o).toLowerCase(),s=String(s).toLowerCase())}return n==="asc"?o>s?1:o<s?-1:0:o<s?1:o>s?-1:0})}};const fr=Object.assign({name:"WpicPopover"},{props:{placement:{type:String,default:"bottom-start"},label:String,hover:Boolean,custom:Boolean,disabled:Boolean,offset:{type:Number,default:0},customWidth:{},maxWidth:{type:String,default:"600px"},transparent:Boolean,noBorder:Boolean,noShadow:Boolean,expand:Boolean,noCloseClasses:{type:Array,default:()=>[]}},emits:["show","hide"],setup(t,{expose:e,emit:n}){const r=kl(),i=n,o=t,s={pmi:"md:absolute md:block bg-white shadow-[0_5px_30px_0px_rgba(0,0,0,0.25)]","wpic-tools":"block absolute mt-2 bg-white border border-gray-300 dark:bg-gray-930 dark:border-gray-920 shadow-md"},l=a.ref(null),c=a.ref(null),d=a.ref(!0);function u(){o.disabled||(d.value=!1,p()),i("show"),document.dispatchEvent(new CustomEvent("submenu-open",{detail:{uuid:r}}))}function f(k){if(d.value)u();else{if(o.noCloseClasses.some(x=>k.target.closest(`.${x}`)))return;h()}}function h(){i("hide"),document.documentElement.style.overflow=null,document.querySelector("#app").style.overflow=null,d.value=!0}async function p(){const k=await Od(l.value,c.value,{placement:o.placement,middleware:[_d(),Sd(),Cd(o.offset)]});c.value.style.left=`${k.x}px`,c.value.style.top=`${k.y}px`}const m=k=>{c.value&&!c.value.contains(k.target)&&l.value&&!l.value.contains(k.target)&&h()};a.onMounted(()=>{document.addEventListener("click",m),document.addEventListener("submenu-open",k=>{k.detail.uuid!==r&&h()})}),a.onUnmounted(()=>{document.removeEventListener("click",m),document.removeEventListener("submenu-open",h)});function g(){o.hover&&u()}function y(){o.hover&&h()}return e({hide:h}),(k,x)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(),a.createElementBlock("div",{class:"flex-1",key:`reference_${a.unref(r)}`,ref_key:"reference",ref:l,onMouseenter:g,onMouseleave:y,onClick:x[0]||(x[0]=a.withModifiers(w=>f(w),["stop"]))},[a.renderSlot(k.$slots,"default",{isHidden:d.value})],32)),(a.openBlock(),a.createBlock(a.Teleport,{to:a.unref(fe).popoverTarget},[(a.openBlock(),a.createElementBlock("div",{key:`floating_${a.unref(r)}`,ref_key:"floating",ref:c,style:a.normalizeStyle({maxWidth:t.maxWidth}),class:a.normalizeClass(["z-30 rounded-md overflow-hidden",{[`${t.customWidth}`]:!0,hidden:d.value,[`${s[a.unref(fe).theme]}`]:!d.value,"bg-transparent!":t.transparent,"border-none!":t.noBorder,"shadow-none":t.noShadow,"rounded-md":!t.custom,"px-3 py-2":!t.custom&&!t.expand}])},[a.renderSlot(k.$slots,"content")],6))],8,["to"]))],64))}});/*!
5
+ */function Ke(t){return typeof t=="function"}function Pc(t){return t==null}const Ln=t=>t!==null&&!!t&&typeof t=="object"&&!Array.isArray(t);function Zs(t){return Number(t)>=0}function Yg(t){const e=parseFloat(t);return isNaN(e)?t:e}function qg(t){return typeof t=="object"&&t!==null}function Kg(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function Rc(t){if(!qg(t)||Kg(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ei(t,e){return Object.keys(e).forEach(n=>{if(Rc(e[n])&&Rc(t[n])){t[n]||(t[n]={}),Ei(t[n],e[n]);return}t[n]=e[n]}),t}function Ci(t){const e=t.split(".");if(!e.length)return"";let n=String(e[0]);for(let r=1;r<e.length;r++){if(Zs(e[r])){n+=`[${e[r]}]`;continue}n+=`.${e[r]}`}return n}const Fc={};function Gt(t,e){Jg(t,e),Fc[t]=e}function Gg(t){return Fc[t]}function Jg(t,e){if(!Ke(e))throw new Error(`Extension Error: The validator '${t}' must be a function.`)}function zc(t,e,n){typeof n.value=="object"&&(n.value=De(n.value)),!n.enumerable||n.get||n.set||!n.configurable||!n.writable||e==="__proto__"?Object.defineProperty(t,e,n):t[e]=n.value}function De(t){if(typeof t!="object")return t;var e=0,n,r,i,o=Object.prototype.toString.call(t);if(o==="[object Object]"?i=Object.create(t.__proto__||null):o==="[object Array]"?i=Array(t.length):o==="[object Set]"?(i=new Set,t.forEach(function(s){i.add(De(s))})):o==="[object Map]"?(i=new Map,t.forEach(function(s,l){i.set(De(l),De(s))})):o==="[object Date]"?i=new Date(+t):o==="[object RegExp]"?i=new RegExp(t.source,t.flags):o==="[object DataView]"?i=new t.constructor(De(t.buffer)):o==="[object ArrayBuffer]"?i=t.slice(0):o.slice(-6)==="Array]"&&(i=new t.constructor(t)),i){for(r=Object.getOwnPropertySymbols(t);e<r.length;e++)zc(i,r[e],Object.getOwnPropertyDescriptor(t,r[e]));for(e=0,r=Object.getOwnPropertyNames(t);e<r.length;e++)Object.hasOwnProperty.call(i,n=r[e])&&i[n]===t[n]||zc(i,n,Object.getOwnPropertyDescriptor(t,n))}return i||t}const Si=Symbol("vee-validate-form"),jc=Symbol("vee-validate-field-instance"),_o=Symbol("Default empty value"),Zg=typeof window<"u";function Xs(t){return Ke(t)&&!!t.__locatorRef}function Jt(t){return!!t&&Ke(t.parse)&&t.__type==="VVTypedSchema"}function Oo(t){return!!t&&Ke(t.validate)}function _i(t){return t==="checkbox"||t==="radio"}function Xg(t){return Ln(t)||Array.isArray(t)}function Qg(t){return Array.isArray(t)?t.length===0:Ln(t)&&Object.keys(t).length===0}function To(t){return/^\[.+\]$/i.test(t)}function e0(t){return Hc(t)&&t.multiple}function Hc(t){return t.tagName==="SELECT"}function t0(t,e){const n=![!1,null,void 0,0].includes(e.multiple)&&!Number.isNaN(e.multiple);return t==="select"&&"multiple"in e&&n}function n0(t,e){return!t0(t,e)&&e.type!=="file"&&!_i(e.type)}function Wc(t){return Qs(t)&&t.target&&"submit"in t.target}function Qs(t){return t?!!(typeof Event<"u"&&Ke(Event)&&t instanceof Event||t&&t.srcElement):!1}function Uc(t,e){return e in t&&t[e]!==_o}function mt(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;var n,r,i;if(Array.isArray(t)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(!mt(t[r],e[r]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;for(r of t.entries())if(!mt(r[1],e.get(r[0])))return!1;return!0}if(Yc(t)&&Yc(e))return!(t.size!==e.size||t.name!==e.name||t.lastModified!==e.lastModified||t.type!==e.type);if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(r of t.entries())if(!e.has(r[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(e)){if(n=t.length,n!=e.length)return!1;for(r=n;r--!==0;)if(t[r]!==e[r])return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===e.toString();for(i=Object.keys(t),n=i.length,r=n;r--!==0;){var o=i[r];if(!mt(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Yc(t){return Zg?t instanceof File:!1}function el(t){return To(t)?t.replace(/\[|\]/gi,""):t}function xt(t,e,n){return t?To(e)?t[el(e)]:(e||"").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((i,o)=>Xg(i)&&o in i?i[o]:n,t):n}function gn(t,e,n){if(To(e)){t[el(e)]=n;return}const r=e.split(/\.|\[(\d+)\]/).filter(Boolean);let i=t;for(let o=0;o<r.length;o++){if(o===r.length-1){i[r[o]]=n;return}(!(r[o]in i)||Pc(i[r[o]]))&&(i[r[o]]=Zs(r[o+1])?[]:{}),i=i[r[o]]}}function tl(t,e){if(Array.isArray(t)&&Zs(e)){t.splice(Number(e),1);return}Ln(t)&&delete t[e]}function qc(t,e){if(To(e)){delete t[el(e)];return}const n=e.split(/\.|\[(\d+)\]/).filter(Boolean);let r=t;for(let o=0;o<n.length;o++){if(o===n.length-1){tl(r,n[o]);break}if(!(n[o]in r)||Pc(r[n[o]]))break;r=r[n[o]]}const i=n.map((o,s)=>xt(t,n.slice(0,s).join(".")));for(let o=i.length-1;o>=0;o--)if(Qg(i[o])){if(o===0){tl(t,n[0]);continue}tl(i[o-1],n[o-1])}}function Et(t){return Object.keys(t)}function nl(t,e=void 0){const n=a.getCurrentInstance();return(n==null?void 0:n.provides[t])||a.inject(t,e)}function Kc(t,e,n){if(Array.isArray(t)){const r=[...t],i=r.findIndex(o=>mt(o,e));return i>=0?r.splice(i,1):r.push(e),r}return mt(t,e)?n:e}function r0(t,e){let n,r;return function(...i){const o=this;return n||(n=!0,setTimeout(()=>n=!1,e),r=t.apply(o,i)),r}}function Gc(t,e=0){let n=null,r=[];return function(...i){return n&&clearTimeout(n),n=setTimeout(()=>{const o=t(...i);r.forEach(s=>s(o)),r=[]},e),new Promise(o=>r.push(o))}}function i0(t,e){return Ln(e)&&e.number?Yg(t):t}function rl(t,e){let n;return async function(...i){const o=t(...i);n=o;const s=await o;return o!==n?s:(n=void 0,e(s,i))}}function il(t){return Array.isArray(t)?t:t?[t]:[]}function No(t,e){const n={};for(const r in t)e.includes(r)||(n[r]=t[r]);return n}function o0(t){let e=null,n=[];return function(...r){const i=a.nextTick(()=>{if(e!==i)return;const o=t(...r);n.forEach(s=>s(o)),n=[],e=null});return e=i,new Promise(o=>n.push(o))}}function ol(t,e,n){return e.slots.default?typeof t=="string"||!t?e.slots.default(n()):{default:()=>{var r,i;return(i=(r=e.slots).default)===null||i===void 0?void 0:i.call(r,n())}}:e.slots.default}function sl(t){if(Jc(t))return t._value}function Jc(t){return"_value"in t}function s0(t){return t.type==="number"||t.type==="range"?Number.isNaN(t.valueAsNumber)?t.value:t.valueAsNumber:t.value}function Mo(t){if(!Qs(t))return t;const e=t.target;if(_i(e.type)&&Jc(e))return sl(e);if(e.type==="file"&&e.files){const n=Array.from(e.files);return e.multiple?n:n[0]}if(e0(e))return Array.from(e.options).filter(n=>n.selected&&!n.disabled).map(sl);if(Hc(e)){const n=Array.from(e.options).find(r=>r.selected);return n?sl(n):e.value}return s0(e)}function Zc(t){const e={};return Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t?Ln(t)&&t._$$isNormalized?t:Ln(t)?Object.keys(t).reduce((n,r)=>{const i=l0(t[r]);return t[r]!==!1&&(n[r]=Xc(i)),n},e):typeof t!="string"?e:t.split("|").reduce((n,r)=>{const i=a0(r);return i.name&&(n[i.name]=Xc(i.params)),n},e):e}function l0(t){return t===!0?[]:Array.isArray(t)||Ln(t)?t:[t]}function Xc(t){const e=n=>typeof n=="string"&&n[0]==="@"?c0(n.slice(1)):n;return Array.isArray(t)?t.map(e):t instanceof RegExp?[t]:Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{})}const a0=t=>{let e=[];const n=t.split(":")[0];return t.includes(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:n,params:e}};function c0(t){const e=n=>xt(n,t)||n[t];return e.__locatorRef=t,e}function d0(t){return Array.isArray(t)?t.filter(Xs):Et(t).filter(e=>Xs(t[e])).map(e=>t[e])}let u0=Object.assign({},{generateMessage:({field:t})=>`${t} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const ar=()=>u0;async function Qc(t,e,n={}){const r=n==null?void 0:n.bails,i={name:(n==null?void 0:n.name)||"{field}",rules:e,label:n==null?void 0:n.label,bails:r??!0,formData:(n==null?void 0:n.values)||{}},s=(await f0(i,t)).errors;return{errors:s,valid:!s.length}}async function f0(t,e){if(Jt(t.rules)||Oo(t.rules))return p0(e,t.rules);if(Ke(t.rules)||Array.isArray(t.rules)){const s={field:t.label||t.name,name:t.name,label:t.label,form:t.formData,value:e},l=Array.isArray(t.rules)?t.rules:[t.rules],c=l.length,d=[];for(let u=0;u<c;u++){const f=l[u],h=await f(e,s);if(!(typeof h!="string"&&!Array.isArray(h)&&h)){if(Array.isArray(h))d.push(...h);else{const m=typeof h=="string"?h:td(s);d.push(m)}if(t.bails)return{errors:d}}}return{errors:d}}const n=Object.assign(Object.assign({},t),{rules:Zc(t.rules)}),r=[],i=Object.keys(n.rules),o=i.length;for(let s=0;s<o;s++){const l=i[s],c=await m0(n,e,{name:l,params:n.rules[l]});if(c.error&&(r.push(c.error),t.bails))return{errors:r}}return{errors:r}}function h0(t){return!!t&&t.name==="ValidationError"}function ed(t){return{__type:"VVTypedSchema",async parse(n){var r;try{return{output:await t.validate(n,{abortEarly:!1}),errors:[]}}catch(i){if(!h0(i))throw i;if(!(!((r=i.inner)===null||r===void 0)&&r.length)&&i.errors.length)return{errors:[{path:i.path,errors:i.errors}]};const o=i.inner.reduce((s,l)=>{const c=l.path||"";return s[c]||(s[c]={errors:[],path:c}),s[c].errors.push(...l.errors),s},{});return{errors:Object.values(o)}}}}}async function p0(t,e){const r=await(Jt(e)?e:ed(e)).parse(t),i=[];for(const o of r.errors)o.errors.length&&i.push(...o.errors);return{errors:i}}async function m0(t,e,n){const r=Gg(n.name);if(!r)throw new Error(`No such validator '${n.name}' exists.`);const i=g0(n.params,t.formData),o={field:t.label||t.name,name:t.name,label:t.label,value:e,form:t.formData,rule:Object.assign(Object.assign({},n),{params:i})},s=await r(e,i,o);return typeof s=="string"?{error:s}:{error:s?void 0:td(o)}}function td(t){const e=ar().generateMessage;return e?e(t):"Field is invalid"}function g0(t,e){const n=r=>Xs(r)?r(e):r;return Array.isArray(t)?t.map(n):Object.keys(t).reduce((r,i)=>(r[i]=n(t[i]),r),{})}async function y0(t,e){const r=await(Jt(t)?t:ed(t)).parse(De(e)),i={},o={};for(const s of r.errors){const l=s.errors,c=(s.path||"").replace(/\["(\d+)"\]/g,(d,u)=>`[${u}]`);i[c]={valid:!l.length,errors:l},l.length&&(o[c]=l[0])}return{valid:!r.errors.length,results:i,errors:o,values:r.value}}async function b0(t,e,n){const i=Et(t).map(async d=>{var u,f,h;const p=(u=n==null?void 0:n.names)===null||u===void 0?void 0:u[d],m=await Qc(xt(e,d),t[d],{name:(p==null?void 0:p.name)||d,label:p==null?void 0:p.label,values:e,bails:(h=(f=n==null?void 0:n.bailsMap)===null||f===void 0?void 0:f[d])!==null&&h!==void 0?h:!0});return Object.assign(Object.assign({},m),{path:d})});let o=!0;const s=await Promise.all(i),l={},c={};for(const d of s)l[d.path]={valid:d.valid,errors:d.errors},d.valid||(o=!1,c[d.path]=d.errors[0]);return{valid:o,results:l,errors:c}}let nd=0;function k0(t,e){const{value:n,initialValue:r,setInitialValue:i}=w0(t,e.modelValue,e.form);if(!e.form){let h=function(p){var m;"value"in p&&(n.value=p.value),"errors"in p&&d(p.errors),"touched"in p&&(f.touched=(m=p.touched)!==null&&m!==void 0?m:f.touched),"initialValue"in p&&i(p.initialValue)};const{errors:c,setErrors:d}=E0(),u=nd>=Number.MAX_SAFE_INTEGER?0:++nd,f=x0(n,r,c,e.schema);return{id:u,path:t,value:n,initialValue:r,meta:f,flags:{pendingUnmount:{[u]:!1},pendingReset:!1},errors:c,setState:h}}const o=e.form.createPathState(t,{bails:e.bails,label:e.label,type:e.type,validate:e.validate,schema:e.schema}),s=a.computed(()=>o.errors);function l(c){var d,u,f;"value"in c&&(n.value=c.value),"errors"in c&&((d=e.form)===null||d===void 0||d.setFieldError(a.unref(t),c.errors)),"touched"in c&&((u=e.form)===null||u===void 0||u.setFieldTouched(a.unref(t),(f=c.touched)!==null&&f!==void 0?f:!1)),"initialValue"in c&&i(c.initialValue)}return{id:Array.isArray(o.id)?o.id[o.id.length-1]:o.id,path:t,value:n,errors:s,meta:o,initialValue:r,flags:o.__flags,setState:l}}function w0(t,e,n){const r=a.ref(a.unref(e));function i(){return n?xt(n.initialValues.value,a.unref(t),a.unref(r)):a.unref(r)}function o(d){if(!n){r.value=d;return}n.setFieldInitialValue(a.unref(t),d,!0)}const s=a.computed(i);if(!n)return{value:a.ref(i()),initialValue:s,setInitialValue:o};const l=v0(e,n,s,t);return n.stageInitialValue(a.unref(t),l,!0),{value:a.computed({get(){return xt(n.values,a.unref(t))},set(d){n.setFieldValue(a.unref(t),d,!1)}}),initialValue:s,setInitialValue:o}}function v0(t,e,n,r){return a.isRef(t)?a.unref(t):t!==void 0?t:xt(e.values,a.unref(r),a.unref(n))}function x0(t,e,n,r){const i=a.computed(()=>{var s,l,c;return(c=(l=(s=a.toValue(r))===null||s===void 0?void 0:s.describe)===null||l===void 0?void 0:l.call(s).required)!==null&&c!==void 0?c:!1}),o=a.reactive({touched:!1,pending:!1,valid:!0,required:i,validated:!!a.unref(n).length,initialValue:a.computed(()=>a.unref(e)),dirty:a.computed(()=>!mt(a.unref(t),a.unref(e)))});return a.watch(n,s=>{o.valid=!s.length},{immediate:!0,flush:"sync"}),o}function E0(){const t=a.ref([]);return{errors:t,setErrors:e=>{t.value=il(e)}}}function rd(t){process.env.NODE_ENV!=="production"&&Ug({id:"vee-validate-devtools-plugin",label:"VeeValidate Plugin",packageName:"vee-validate",homepage:"https://vee-validate.logaretm.com/v4",app:t,logo:"https://vee-validate.logaretm.com/v4/logo.png"},_0)}const Oi={},Ti={};let yn;const Pr=r0(()=>{setTimeout(async()=>{await a.nextTick(),yn==null||yn.sendInspectorState(Rr),yn==null||yn.sendInspectorTree(Rr)},100)},100);function C0(t){const e=a.getCurrentInstance();if(!yn){const n=e==null?void 0:e.appContext.app;if(!n)return;rd(n)}Oi[t.formId]=Object.assign({},t),Oi[t.formId]._vm=e,a.onUnmounted(()=>{delete Oi[t.formId],Pr()}),Pr()}function S0(t){const e=a.getCurrentInstance();if(!yn){const n=e==null?void 0:e.appContext.app;if(!n)return;rd(n)}Ti[t.id]=Object.assign({},t),Ti[t.id]._vm=e,a.onUnmounted(()=>{delete Ti[t.id],Pr()}),Pr()}const Rr="vee-validate-inspector",Ct={error:12405579,success:448379,unknown:5522283,white:16777215,black:0,blue:218007,purple:12157168,orange:16099682,gray:12304330};let He=null;function _0(t){yn=t,t.addInspector({id:Rr,icon:"rule",label:"vee-validate",noSelectionText:"Select a vee-validate node to inspect",actions:[{icon:"done_outline",tooltip:"Validate selected item",action:async()=>{if(!He){console.error("There is not a valid selected vee-validate node or component");return}if(He.type==="field"){await He.field.validate();return}if(He.type==="form"){await He.form.validate();return}He.type==="pathState"&&await He.form.validateField(He.state.path)}},{icon:"delete_sweep",tooltip:"Clear validation state of the selected item",action:()=>{if(!He){console.error("There is not a valid selected vee-validate node or component");return}if(He.type==="field"){He.field.resetField();return}He.type==="form"&&He.form.resetForm(),He.type==="pathState"&&He.form.resetField(He.state.path)}}]}),t.on.getInspectorTree(e=>{if(e.inspectorId!==Rr)return;const n=Object.values(Oi),r=Object.values(Ti);e.rootNodes=[...n.map(O0),...r.map(i=>N0(i))]}),t.on.getInspectorState((e,n)=>{if(e.inspectorId!==Rr||n.currentTab!==`custom-inspector:${Rr}`)return;const{form:r,field:i,state:o,type:s}=M0(e.nodeId);if(r&&s==="form"){e.state=A0(r),He={type:"form",form:r};return}if(o&&s==="pathState"&&r){e.state=od(o),He={type:"pathState",state:o,form:r};return}if(i&&s==="field"){e.state=od({errors:i.errors.value,dirty:i.meta.dirty,valid:i.meta.valid,touched:i.meta.touched,value:i.value.value,initialValue:i.meta.initialValue}),He={field:i,type:"field"};return}He=null})}function O0(t){const{textColor:e,bgColor:n}=sd(t.meta.value.valid),r={};Object.values(t.getAllPathStates()).forEach(s=>{gn(r,a.unref(s.path),T0(s,t))});function i(s,l=[]){const c=[...l].pop();return"id"in s?Object.assign(Object.assign({},s),{label:c||s.label}):Ln(s)?{id:`${l.join(".")}`,label:c||"",children:Object.keys(s).map(d=>i(s[d],[...l,d]))}:Array.isArray(s)?{id:`${l.join(".")}`,label:`${c}[]`,children:s.map((d,u)=>i(d,[...l,String(u)]))}:{id:"",label:"",children:[]}}const{children:o}=i(r);return{id:ll(t),label:"Form",children:o,tags:[{label:"Form",textColor:e,backgroundColor:n},{label:`${t.getAllPathStates().length} fields`,textColor:Ct.white,backgroundColor:Ct.unknown}]}}function T0(t,e){return{id:ll(e,t),label:a.unref(t.path),tags:id(t.multiple,t.fieldsCount,t.type,t.valid,e)}}function N0(t,e){return{id:ll(e,t),label:a.unref(t.name),tags:id(!1,1,t.type,t.meta.valid,e)}}function id(t,e,n,r,i){const{textColor:o,bgColor:s}=sd(r);return[t?void 0:{label:"Field",textColor:o,backgroundColor:s},i?void 0:{label:"Standalone",textColor:Ct.black,backgroundColor:Ct.gray},n==="checkbox"?{label:"Checkbox",textColor:Ct.white,backgroundColor:Ct.blue}:void 0,n==="radio"?{label:"Radio",textColor:Ct.white,backgroundColor:Ct.purple}:void 0,t?{label:"Multiple",textColor:Ct.black,backgroundColor:Ct.orange}:void 0].filter(Boolean)}function ll(t,e){const n=e?"path"in e?"pathState":"field":"form",r=e?"path"in e?e==null?void 0:e.path:a.unref(e==null?void 0:e.name):"",i={f:t==null?void 0:t.formId,ff:r,type:n};return btoa(encodeURIComponent(JSON.stringify(i)))}function M0(t){try{const e=JSON.parse(decodeURIComponent(atob(t))),n=Oi[e.f];if(!n&&e.ff){const i=Ti[e.ff];return i?{type:e.type,field:i}:{}}if(!n)return{};const r=n.getPathState(e.ff);return{type:e.type,form:n,state:r}}catch{}return{}}function od(t){return{"Field state":[{key:"errors",value:t.errors},{key:"initialValue",value:t.initialValue},{key:"currentValue",value:t.value},{key:"touched",value:t.touched},{key:"dirty",value:t.dirty},{key:"valid",value:t.valid}]}}function A0(t){const{errorBag:e,meta:n,values:r,isSubmitting:i,isValidating:o,submitCount:s}=t;return{"Form state":[{key:"submitCount",value:s.value},{key:"isSubmitting",value:i.value},{key:"isValidating",value:o.value},{key:"touched",value:n.value.touched},{key:"dirty",value:n.value.dirty},{key:"valid",value:n.value.valid},{key:"initialValues",value:n.value.initialValues},{key:"currentValues",value:r},{key:"errors",value:Et(e.value).reduce((l,c)=>{var d;const u=(d=e.value[c])===null||d===void 0?void 0:d[0];return u&&(l[c]=u),l},{})}]}}function sd(t){return{bgColor:t?Ct.success:Ct.error,textColor:t?Ct.black:Ct.white}}function D0(t,e,n){return _i(n==null?void 0:n.type)?B0(t,e,n):ld(t,e,n)}function ld(t,e,n){const{initialValue:r,validateOnMount:i,bails:o,type:s,checkedValue:l,label:c,validateOnValueUpdate:d,uncheckedValue:u,controlled:f,keepValueOnUnmount:h,syncVModel:p,form:m}=L0(n),g=f?nl(Si):void 0,y=m||g,k=a.computed(()=>Ci(a.toValue(t))),x=a.computed(()=>{if(a.toValue(y==null?void 0:y.schema))return;const H=a.unref(e);return Oo(H)||Jt(H)||Ke(H)||Array.isArray(H)?H:Zc(H)}),w=!Ke(x.value)&&Jt(a.toValue(e)),{id:b,value:S,initialValue:v,meta:O,setState:B,errors:A,flags:P}=k0(k,{modelValue:r,form:y,bails:o,label:c,type:s,validate:x.value?C:void 0,schema:w?e:void 0}),$=a.computed(()=>A.value[0]);p&&$0({value:S,prop:p,handleChange:I,shouldValidate:()=>d&&!P.pendingReset});const L=(q,H=!1)=>{O.touched=!0,H&&z()};async function j(q){var H,de;if(y!=null&&y.validateSchema){const{results:ae}=await y.validateSchema(q);return(H=ae[a.toValue(k)])!==null&&H!==void 0?H:{valid:!0,errors:[]}}return x.value?Qc(S.value,x.value,{name:a.toValue(k),label:a.toValue(c),values:(de=y==null?void 0:y.values)!==null&&de!==void 0?de:{},bails:o}):{valid:!0,errors:[]}}const z=rl(async()=>(O.pending=!0,O.validated=!0,j("validated-only")),q=>(P.pendingUnmount[W.id]||(B({errors:q.errors}),O.pending=!1,O.valid=q.valid),q)),D=rl(async()=>j("silent"),q=>(O.valid=q.valid,q));function C(q){return(q==null?void 0:q.mode)==="silent"?D():z()}function I(q,H=!0){const de=Mo(q);ce(de,H)}a.onMounted(()=>{if(i)return z();(!y||!y.validateSchema)&&D()});function R(q){O.touched=q}function ee(q){var H;const de=q&&"value"in q?q.value:v.value;B({value:De(de),initialValue:De(de),touched:(H=q==null?void 0:q.touched)!==null&&H!==void 0?H:!1,errors:(q==null?void 0:q.errors)||[]}),O.pending=!1,O.validated=!1,D()}const te=a.getCurrentInstance();function ce(q,H=!0){S.value=te&&p?i0(q,te.props.modelModifiers):q,(H?z:D)()}function ue(q){B({errors:Array.isArray(q)?q:[q]})}const V=a.computed({get(){return S.value},set(q){ce(q,d)}}),W={id:b,name:k,label:c,value:V,meta:O,errors:A,errorMessage:$,type:s,checkedValue:l,uncheckedValue:u,bails:o,keepValueOnUnmount:h,resetField:ee,handleReset:()=>ee(),validate:C,handleChange:I,handleBlur:L,setState:B,setTouched:R,setErrors:ue,setValue:ce};if(a.provide(jc,W),a.isRef(e)&&typeof a.unref(e)!="function"&&a.watch(e,(q,H)=>{mt(q,H)||(O.validated?z():D())},{deep:!0}),process.env.NODE_ENV!=="production"&&(W._vm=a.getCurrentInstance(),a.watch(()=>Object.assign(Object.assign({errors:A.value},O),{value:S.value}),Pr,{deep:!0}),y||S0(W)),!y)return W;const K=a.computed(()=>{const q=x.value;return!q||Ke(q)||Oo(q)||Jt(q)||Array.isArray(q)?{}:Object.keys(q).reduce((H,de)=>{const ae=d0(q[de]).map(we=>we.__locatorRef).reduce((we,Ne)=>{const Ie=xt(y.values,Ne)||y.values[Ne];return Ie!==void 0&&(we[Ne]=Ie),we},{});return Object.assign(H,ae),H},{})});return a.watch(K,(q,H)=>{if(!Object.keys(q).length)return;!mt(q,H)&&(O.validated?z():D())}),a.onBeforeUnmount(()=>{var q;const H=(q=a.toValue(W.keepValueOnUnmount))!==null&&q!==void 0?q:a.toValue(y.keepValuesOnUnmount),de=a.toValue(k);if(H||!y||P.pendingUnmount[W.id]){y==null||y.removePathState(de,b);return}P.pendingUnmount[W.id]=!0;const ae=y.getPathState(de);if(Array.isArray(ae==null?void 0:ae.id)&&(ae!=null&&ae.multiple)?ae!=null&&ae.id.includes(W.id):(ae==null?void 0:ae.id)===W.id){if(ae!=null&&ae.multiple&&Array.isArray(ae.value)){const Ne=ae.value.findIndex(Ie=>mt(Ie,a.toValue(W.checkedValue)));if(Ne>-1){const Ie=[...ae.value];Ie.splice(Ne,1),y.setFieldValue(de,Ie)}Array.isArray(ae.id)&&ae.id.splice(ae.id.indexOf(W.id),1)}else y.unsetPathValue(a.toValue(k));y.removePathState(de,b)}}),W}function L0(t){const e=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),n=!!(t!=null&&t.syncVModel),r=typeof(t==null?void 0:t.syncVModel)=="string"?t.syncVModel:(t==null?void 0:t.modelPropName)||"modelValue",i=n&&!("initialValue"in(t||{}))?al(a.getCurrentInstance(),r):t==null?void 0:t.initialValue;if(!t)return Object.assign(Object.assign({},e()),{initialValue:i});const o="valueProp"in t?t.valueProp:t.checkedValue,s="standalone"in t?!t.standalone:t.controlled,l=(t==null?void 0:t.modelPropName)||(t==null?void 0:t.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},e()),t||{}),{initialValue:i,controlled:s??!0,checkedValue:o,syncVModel:l})}function B0(t,e,n){const r=n!=null&&n.standalone?void 0:nl(Si),i=n==null?void 0:n.checkedValue,o=n==null?void 0:n.uncheckedValue;function s(l){const c=l.handleChange,d=a.computed(()=>{const f=a.toValue(l.value),h=a.toValue(i);return Array.isArray(f)?f.findIndex(p=>mt(p,h))>=0:mt(h,f)});function u(f,h=!0){var p,m;if(d.value===((p=f==null?void 0:f.target)===null||p===void 0?void 0:p.checked)){h&&l.validate();return}const g=a.toValue(t),y=r==null?void 0:r.getPathState(g),k=Mo(f);let x=(m=a.toValue(i))!==null&&m!==void 0?m:k;r&&(y!=null&&y.multiple)&&y.type==="checkbox"?x=Kc(xt(r.values,g)||[],x,void 0):(n==null?void 0:n.type)==="checkbox"&&(x=Kc(a.toValue(l.value),x,a.toValue(o))),c(x,h)}return Object.assign(Object.assign({},l),{checked:d,checkedValue:i,uncheckedValue:o,handleChange:u})}return s(ld(t,e,n))}function $0({prop:t,value:e,handleChange:n,shouldValidate:r}){const i=a.getCurrentInstance();if(!i||!t){process.env.NODE_ENV!=="production"&&console.warn("Failed to setup model events because `useField` was not called in setup.");return}const o=typeof t=="string"?t:"modelValue",s=`update:${o}`;o in i.props&&(a.watch(e,l=>{mt(l,al(i,o))||i.emit(s,l)}),a.watch(()=>al(i,o),l=>{if(l===_o&&e.value===void 0)return;const c=l===_o?void 0:l;mt(c,e.value)||n(c,r())}))}function al(t,e){if(t)return t.props[e]}const I0=a.defineComponent({name:"Field",inheritAttrs:!1,props:{as:{type:[String,Object],default:void 0},name:{type:String,required:!0},rules:{type:[Object,String,Function],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnBlur:{type:Boolean,default:void 0},validateOnChange:{type:Boolean,default:void 0},validateOnInput:{type:Boolean,default:void 0},validateOnModelUpdate:{type:Boolean,default:void 0},bails:{type:Boolean,default:()=>ar().bails},label:{type:String,default:void 0},uncheckedValue:{type:null,default:void 0},modelValue:{type:null,default:_o},modelModifiers:{type:null,default:()=>({})},"onUpdate:modelValue":{type:null,default:void 0},standalone:{type:Boolean,default:!1},keepValue:{type:Boolean,default:void 0}},setup(t,e){const n=a.toRef(t,"rules"),r=a.toRef(t,"name"),i=a.toRef(t,"label"),o=a.toRef(t,"uncheckedValue"),s=a.toRef(t,"keepValue"),{errors:l,value:c,errorMessage:d,validate:u,handleChange:f,handleBlur:h,setTouched:p,resetField:m,handleReset:g,meta:y,checked:k,setErrors:x}=D0(r,n,{validateOnMount:t.validateOnMount,bails:t.bails,standalone:t.standalone,type:e.attrs.type,initialValue:P0(t,e),checkedValue:e.attrs.value,uncheckedValue:o,label:i,validateOnValueUpdate:t.validateOnModelUpdate,keepValueOnUnmount:s,syncVModel:!0}),w=function(A,P=!0){f(A,P)},b=a.computed(()=>{const{validateOnInput:B,validateOnChange:A,validateOnBlur:P,validateOnModelUpdate:$}=V0(t);function L(C){h(C,P),Ke(e.attrs.onBlur)&&e.attrs.onBlur(C)}function j(C){w(C,B),Ke(e.attrs.onInput)&&e.attrs.onInput(C)}function z(C){w(C,A),Ke(e.attrs.onChange)&&e.attrs.onChange(C)}const D={name:t.name,onBlur:L,onInput:j,onChange:z};return D["onUpdate:modelValue"]=C=>w(C,$),D}),S=a.computed(()=>{const B=Object.assign({},b.value);_i(e.attrs.type)&&k&&(B.checked=k.value);const A=ad(t,e);return n0(A,e.attrs)&&(B.value=c.value),B}),v=a.computed(()=>Object.assign(Object.assign({},b.value),{modelValue:c.value}));function O(){return{field:S.value,componentField:v.value,value:c.value,meta:y,errors:l.value,errorMessage:d.value,validate:u,resetField:m,handleChange:w,handleInput:B=>w(B,!1),handleReset:g,handleBlur:b.value.onBlur,setTouched:p,setErrors:x}}return e.expose({value:c,meta:y,errors:l,errorMessage:d,setErrors:x,setTouched:p,reset:m,validate:u,handleChange:f}),()=>{const B=a.resolveDynamicComponent(ad(t,e)),A=ol(B,e,O);return B?a.h(B,Object.assign(Object.assign({},e.attrs),S.value),A):A}}});function ad(t,e){let n=t.as||"";return!t.as&&!e.slots.default&&(n="input"),n}function V0(t){var e,n,r,i;const{validateOnInput:o,validateOnChange:s,validateOnBlur:l,validateOnModelUpdate:c}=ar();return{validateOnInput:(e=t.validateOnInput)!==null&&e!==void 0?e:o,validateOnChange:(n=t.validateOnChange)!==null&&n!==void 0?n:s,validateOnBlur:(r=t.validateOnBlur)!==null&&r!==void 0?r:l,validateOnModelUpdate:(i=t.validateOnModelUpdate)!==null&&i!==void 0?i:c}}function P0(t,e){return _i(e.attrs.type)?Uc(t,"modelValue")?t.modelValue:void 0:Uc(t,"modelValue")?t.modelValue:e.attrs.value}const cr=I0;let R0=0;const Ao=["bails","fieldsCount","id","multiple","type","validate"];function cd(t){const e=(t==null?void 0:t.initialValues)||{},n=Object.assign({},a.toValue(e)),r=a.unref(t==null?void 0:t.validationSchema);return r&&Jt(r)&&Ke(r.cast)?De(r.cast(n)||{}):De(n)}function F0(t){var e;const n=R0++;let r=0;const i=a.ref(!1),o=a.ref(!1),s=a.ref(0),l=[],c=a.reactive(cd(t)),d=a.ref([]),u=a.ref({}),f=a.ref({}),h=o0(()=>{f.value=d.value.reduce((T,M)=>(T[Ci(a.toValue(M.path))]=M,T),{})});function p(T,M){const Y=C(T);if(!Y){typeof T=="string"&&(u.value[Ci(T)]=il(M));return}if(typeof T=="string"){const ne=Ci(T);u.value[ne]&&delete u.value[ne]}Y.errors=il(M),Y.valid=!Y.errors.length}function m(T){Et(T).forEach(M=>{p(M,T[M])})}t!=null&&t.initialErrors&&m(t.initialErrors);const g=a.computed(()=>{const T=d.value.reduce((M,Y)=>(Y.errors.length&&(M[Y.path]=Y.errors),M),{});return Object.assign(Object.assign({},u.value),T)}),y=a.computed(()=>Et(g.value).reduce((T,M)=>{const Y=g.value[M];return Y!=null&&Y.length&&(T[M]=Y[0]),T},{})),k=a.computed(()=>d.value.reduce((T,M)=>(T[M.path]={name:M.path||"",label:M.label||""},T),{})),x=a.computed(()=>d.value.reduce((T,M)=>{var Y;return T[M.path]=(Y=M.bails)!==null&&Y!==void 0?Y:!0,T},{})),w=Object.assign({},(t==null?void 0:t.initialErrors)||{}),b=(e=t==null?void 0:t.keepValuesOnUnmount)!==null&&e!==void 0?e:!1,{initialValues:S,originalInitialValues:v,setInitialValues:O}=j0(d,c,t),B=z0(d,c,v,y),A=a.computed(()=>d.value.reduce((T,M)=>{const Y=xt(c,M.path);return gn(T,M.path,Y),T},{})),P=t==null?void 0:t.validationSchema;function $(T,M){var Y,ne;const fe=a.computed(()=>xt(S.value,a.toValue(T))),N=f.value[a.toValue(T)],X=(M==null?void 0:M.type)==="checkbox"||(M==null?void 0:M.type)==="radio";if(N&&X){N.multiple=!0;const vt=r++;return Array.isArray(N.id)?N.id.push(vt):N.id=[N.id,vt],N.fieldsCount++,N.__flags.pendingUnmount[vt]=!1,N}const ie=a.computed(()=>xt(c,a.toValue(T))),me=a.toValue(T),ye=R.findIndex(vt=>vt===me);ye!==-1&&R.splice(ye,1);const ve=a.computed(()=>{var vt,Ft,Ir,lr;const mn=a.toValue(P);if(Jt(mn))return(Ft=(vt=mn.describe)===null||vt===void 0?void 0:vt.call(mn,a.toValue(T)).required)!==null&&Ft!==void 0?Ft:!1;const So=a.toValue(M==null?void 0:M.schema);return Jt(So)&&(lr=(Ir=So.describe)===null||Ir===void 0?void 0:Ir.call(So).required)!==null&&lr!==void 0?lr:!1}),Ae=r++,je=a.reactive({id:Ae,path:T,touched:!1,pending:!1,valid:!0,validated:!!(!((Y=w[me])===null||Y===void 0)&&Y.length),required:ve,initialValue:fe,errors:a.shallowRef([]),bails:(ne=M==null?void 0:M.bails)!==null&&ne!==void 0?ne:!1,label:M==null?void 0:M.label,type:(M==null?void 0:M.type)||"default",value:ie,multiple:!1,__flags:{pendingUnmount:{[Ae]:!1},pendingReset:!1},fieldsCount:1,validate:M==null?void 0:M.validate,dirty:a.computed(()=>!mt(a.unref(ie),a.unref(fe)))});return d.value.push(je),f.value[me]=je,h(),y.value[me]&&!w[me]&&a.nextTick(()=>{pt(me,{mode:"silent"})}),a.isRef(T)&&a.watch(T,vt=>{h();const Ft=De(ie.value);f.value[vt]=je,a.nextTick(()=>{gn(c,vt,Ft)})}),je}const L=Gc(se,5),j=Gc(se,5),z=rl(async T=>await(T==="silent"?L():j()),(T,[M])=>{const Y=Et(q.errorBag.value),fe=[...new Set([...Et(T.results),...d.value.map(N=>N.path),...Y])].sort().reduce((N,X)=>{var ie;const me=X,ye=C(me)||I(me),ve=((ie=T.results[me])===null||ie===void 0?void 0:ie.errors)||[],Ae=a.toValue(ye==null?void 0:ye.path)||me,je=H0({errors:ve,valid:!ve.length},N.results[Ae]);return N.results[Ae]=je,je.valid||(N.errors[Ae]=je.errors[0]),ye&&u.value[Ae]&&delete u.value[Ae],ye?(ye.valid=je.valid,M==="silent"||M==="validated-only"&&!ye.validated||p(ye,je.errors),N):(p(Ae,ve),N)},{valid:T.valid,results:{},errors:{}});return T.values&&(fe.values=T.values),Et(fe.results).forEach(N=>{var X;const ie=C(N);ie&&M!=="silent"&&(M==="validated-only"&&!ie.validated||p(ie,(X=fe.results[N])===null||X===void 0?void 0:X.errors))}),fe});function D(T){d.value.forEach(T)}function C(T){const M=typeof T=="string"?Ci(T):T;return typeof M=="string"?f.value[M]:M}function I(T){return d.value.filter(Y=>T.startsWith(Y.path)).reduce((Y,ne)=>Y?ne.path.length>Y.path.length?ne:Y:ne,void 0)}let R=[],ee;function te(T){return R.push(T),ee||(ee=a.nextTick(()=>{[...R].sort().reverse().forEach(Y=>{qc(c,Y)}),R=[],ee=null})),ee}function ce(T){return function(Y,ne){return function(N){return N instanceof Event&&(N.preventDefault(),N.stopPropagation()),D(X=>X.touched=!0),i.value=!0,s.value++,at().then(X=>{const ie=De(c);if(X.valid&&typeof Y=="function"){const me=De(A.value);let ye=T?me:ie;return X.values&&(ye=X.values),Y(ye,{evt:N,controlledValues:me,setErrors:m,setFieldError:p,setTouched:Ee,setFieldTouched:Ne,setValues:ae,setFieldValue:H,resetForm:lt,resetField:At})}!X.valid&&typeof ne=="function"&&ne({values:ie,evt:N,errors:X.errors,results:X.results})}).then(X=>(i.value=!1,X),X=>{throw i.value=!1,X})}}}const V=ce(!1);V.withControlled=ce(!0);function W(T,M){const Y=d.value.findIndex(fe=>fe.path===T&&(Array.isArray(fe.id)?fe.id.includes(M):fe.id===M)),ne=d.value[Y];if(!(Y===-1||!ne)){if(a.nextTick(()=>{pt(T,{mode:"silent",warn:!1})}),ne.multiple&&ne.fieldsCount&&ne.fieldsCount--,Array.isArray(ne.id)){const fe=ne.id.indexOf(M);fe>=0&&ne.id.splice(fe,1),delete ne.__flags.pendingUnmount[M]}(!ne.multiple||ne.fieldsCount<=0)&&(d.value.splice(Y,1),E(T),h(),delete f.value[T])}}function K(T){Et(f.value).forEach(M=>{M.startsWith(T)&&delete f.value[M]}),d.value=d.value.filter(M=>!M.path.startsWith(T)),a.nextTick(()=>{h()})}const q={formId:n,values:c,controlledValues:A,errorBag:g,errors:y,schema:P,submitCount:s,meta:B,isSubmitting:i,isValidating:o,fieldArrays:l,keepValuesOnUnmount:b,validateSchema:a.unref(P)?z:void 0,validate:at,setFieldError:p,validateField:pt,setFieldValue:H,setValues:ae,setErrors:m,setFieldTouched:Ne,setTouched:Ee,resetForm:lt,resetField:At,handleSubmit:V,useFieldModel:Oe,defineInputBinds:F,defineComponentBinds:Z,defineField:_e,stageInitialValue:_,unsetInitialValue:E,setFieldInitialValue:U,createPathState:$,getPathState:C,unsetPathValue:te,removePathState:W,initialValues:S,getAllPathStates:()=>d.value,destroyPath:K,isFieldTouched:Ie,isFieldDirty:tt,isFieldValid:Q};function H(T,M,Y=!0){const ne=De(M),fe=typeof T=="string"?T:T.path;C(fe)||$(fe),gn(c,fe,ne),Y&&pt(fe)}function de(T,M=!0){Et(c).forEach(Y=>{delete c[Y]}),Et(T).forEach(Y=>{H(Y,T[Y],!1)}),M&&at()}function ae(T,M=!0){Ei(c,T),l.forEach(Y=>Y&&Y.reset()),M&&at()}function we(T,M){const Y=C(a.toValue(T))||$(T);return a.computed({get(){return Y.value},set(ne){var fe;const N=a.toValue(T);H(N,ne,(fe=a.toValue(M))!==null&&fe!==void 0?fe:!1)}})}function Ne(T,M){const Y=C(T);Y&&(Y.touched=M)}function Ie(T){const M=C(T);return M?M.touched:d.value.filter(Y=>Y.path.startsWith(T)).some(Y=>Y.touched)}function tt(T){const M=C(T);return M?M.dirty:d.value.filter(Y=>Y.path.startsWith(T)).some(Y=>Y.dirty)}function Q(T){const M=C(T);return M?M.valid:d.value.filter(Y=>Y.path.startsWith(T)).every(Y=>Y.valid)}function Ee(T){if(typeof T=="boolean"){D(M=>{M.touched=T});return}Et(T).forEach(M=>{Ne(M,!!T[M])})}function At(T,M){var Y;const ne=M&&"value"in M?M.value:xt(S.value,T),fe=C(T);fe&&(fe.__flags.pendingReset=!0),U(T,De(ne),!0),H(T,ne,!1),Ne(T,(Y=M==null?void 0:M.touched)!==null&&Y!==void 0?Y:!1),p(T,(M==null?void 0:M.errors)||[]),a.nextTick(()=>{fe&&(fe.__flags.pendingReset=!1)})}function lt(T,M){let Y=De(T!=null&&T.values?T.values:v.value);Y=M!=null&&M.force?Y:Ei(v.value,Y),Y=Jt(P)&&Ke(P.cast)?P.cast(Y):Y,O(Y),D(ne=>{var fe;ne.__flags.pendingReset=!0,ne.validated=!1,ne.touched=((fe=T==null?void 0:T.touched)===null||fe===void 0?void 0:fe[ne.path])||!1,H(ne.path,xt(Y,ne.path),!1),p(ne.path,void 0)}),M!=null&&M.force?de(Y,!1):ae(Y,!1),m((T==null?void 0:T.errors)||{}),s.value=(T==null?void 0:T.submitCount)||0,a.nextTick(()=>{at({mode:"silent"}),D(ne=>{ne.__flags.pendingReset=!1})})}async function at(T){const M=(T==null?void 0:T.mode)||"force";if(M==="force"&&D(N=>N.validated=!0),q.validateSchema)return q.validateSchema(M);o.value=!0;const Y=await Promise.all(d.value.map(N=>N.validate?N.validate(T).then(X=>({key:N.path,valid:X.valid,errors:X.errors})):Promise.resolve({key:N.path,valid:!0,errors:[]})));o.value=!1;const ne={},fe={};for(const N of Y)ne[N.key]={valid:N.valid,errors:N.errors},N.errors.length&&(fe[N.key]=N.errors[0]);return{valid:Y.every(N=>N.valid),results:ne,errors:fe}}async function pt(T,M){var Y;const ne=C(T);if(ne&&(M==null?void 0:M.mode)!=="silent"&&(ne.validated=!0),P){const{results:N}=await z((M==null?void 0:M.mode)||"validated-only");return N[T]||{errors:[],valid:!0}}return ne!=null&&ne.validate?ne.validate(M):(!ne&&((Y=M==null?void 0:M.warn)!==null&&Y!==void 0?Y:!0)&&process.env.NODE_ENV!=="production"&&a.warn(`field with path ${T} was not found`),Promise.resolve({errors:[],valid:!0}))}function E(T){qc(S.value,T)}function _(T,M,Y=!1){U(T,M),gn(c,T,M),Y&&!(t!=null&&t.initialValues)&&gn(v.value,T,De(M))}function U(T,M,Y=!1){gn(S.value,T,De(M)),Y&&gn(v.value,T,De(M))}async function se(){const T=a.unref(P);if(!T)return{valid:!0,results:{},errors:{}};o.value=!0;const M=Oo(T)||Jt(T)?await y0(T,c):await b0(T,c,{names:k.value,bailsMap:x.value});return o.value=!1,M}const Me=V((T,{evt:M})=>{Wc(M)&&M.target.submit()});a.onMounted(()=>{if(t!=null&&t.initialErrors&&m(t.initialErrors),t!=null&&t.initialTouched&&Ee(t.initialTouched),t!=null&&t.validateOnMount){at();return}q.validateSchema&&q.validateSchema("silent")}),a.isRef(P)&&a.watch(P,()=>{var T;(T=q.validateSchema)===null||T===void 0||T.call(q,"validated-only")}),a.provide(Si,q),process.env.NODE_ENV!=="production"&&(C0(q),a.watch(()=>Object.assign(Object.assign({errors:g.value},B.value),{values:c,isSubmitting:i.value,isValidating:o.value,submitCount:s.value}),Pr,{deep:!0}));function _e(T,M){const Y=Ke(M)||M==null?void 0:M.label,ne=C(a.toValue(T))||$(T,{label:Y}),fe=()=>Ke(M)?M(No(ne,Ao)):M||{};function N(){var ve;ne.touched=!0,((ve=fe().validateOnBlur)!==null&&ve!==void 0?ve:ar().validateOnBlur)&&pt(ne.path)}function X(){var ve;((ve=fe().validateOnInput)!==null&&ve!==void 0?ve:ar().validateOnInput)&&a.nextTick(()=>{pt(ne.path)})}function ie(){var ve;((ve=fe().validateOnChange)!==null&&ve!==void 0?ve:ar().validateOnChange)&&a.nextTick(()=>{pt(ne.path)})}const me=a.computed(()=>{const ve={onChange:ie,onInput:X,onBlur:N};return Ke(M)?Object.assign(Object.assign({},ve),M(No(ne,Ao)).props||{}):M!=null&&M.props?Object.assign(Object.assign({},ve),M.props(No(ne,Ao))):ve});return[we(T,()=>{var ve,Ae,je;return(je=(ve=fe().validateOnModelUpdate)!==null&&ve!==void 0?ve:(Ae=ar())===null||Ae===void 0?void 0:Ae.validateOnModelUpdate)!==null&&je!==void 0?je:!0}),me]}function Oe(T){return Array.isArray(T)?T.map(M=>we(M,!0)):we(T)}function F(T,M){const[Y,ne]=_e(T,M);function fe(){ne.value.onBlur()}function N(ie){const me=Mo(ie);H(a.toValue(T),me,!1),ne.value.onInput()}function X(ie){const me=Mo(ie);H(a.toValue(T),me,!1),ne.value.onChange()}return a.computed(()=>Object.assign(Object.assign({},ne.value),{onBlur:fe,onInput:N,onChange:X,value:Y.value}))}function Z(T,M){const[Y,ne]=_e(T,M),fe=C(a.toValue(T));function N(X){Y.value=X}return a.computed(()=>{const X=Ke(M)?M(No(fe,Ao)):M||{};return Object.assign({[X.model||"modelValue"]:Y.value,[`onUpdate:${X.model||"modelValue"}`]:N},ne.value)})}return Object.assign(Object.assign({},q),{values:a.readonly(c),handleReset:()=>lt(),submitForm:Me})}function z0(t,e,n,r){const i={touched:"some",pending:"some",valid:"every"},o=a.computed(()=>!mt(e,a.unref(n)));function s(){const c=t.value;return Et(i).reduce((d,u)=>{const f=i[u];return d[u]=c[f](h=>h[u]),d},{})}const l=a.reactive(s());return a.watchEffect(()=>{const c=s();l.touched=c.touched,l.valid=c.valid,l.pending=c.pending}),a.computed(()=>Object.assign(Object.assign({initialValues:a.unref(n)},l),{valid:l.valid&&!Et(r.value).length,dirty:o.value}))}function j0(t,e,n){const r=cd(n),i=a.ref(r),o=a.ref(De(r));function s(l,c=!1){i.value=Ei(De(i.value)||{},De(l)),o.value=Ei(De(o.value)||{},De(l)),c&&t.value.forEach(d=>{if(d.touched)return;const f=xt(i.value,d.path);gn(e,d.path,De(f))})}return{initialValues:i,originalInitialValues:o,setInitialValues:s}}function H0(t,e){return e?{valid:t.valid&&e.valid,errors:[...t.errors,...e.errors]}:t}const W0=a.defineComponent({name:"Form",inheritAttrs:!1,props:{as:{type:null,default:"form"},validationSchema:{type:Object,default:void 0},initialValues:{type:Object,default:void 0},initialErrors:{type:Object,default:void 0},initialTouched:{type:Object,default:void 0},validateOnMount:{type:Boolean,default:!1},onSubmit:{type:Function,default:void 0},onInvalidSubmit:{type:Function,default:void 0},keepValues:{type:Boolean,default:!1}},setup(t,e){const n=a.toRef(t,"validationSchema"),r=a.toRef(t,"keepValues"),{errors:i,errorBag:o,values:s,meta:l,isSubmitting:c,isValidating:d,submitCount:u,controlledValues:f,validate:h,validateField:p,handleReset:m,resetForm:g,handleSubmit:y,setErrors:k,setFieldError:x,setFieldValue:w,setValues:b,setFieldTouched:S,setTouched:v,resetField:O}=F0({validationSchema:n.value?n:void 0,initialValues:t.initialValues,initialErrors:t.initialErrors,initialTouched:t.initialTouched,validateOnMount:t.validateOnMount,keepValuesOnUnmount:r}),B=y((C,{evt:I})=>{Wc(I)&&I.target.submit()},t.onInvalidSubmit),A=t.onSubmit?y(t.onSubmit,t.onInvalidSubmit):B;function P(C){Qs(C)&&C.preventDefault(),m(),typeof e.attrs.onReset=="function"&&e.attrs.onReset()}function $(C,I){return y(typeof C=="function"&&!I?C:I,t.onInvalidSubmit)(C)}function L(){return De(s)}function j(){return De(l.value)}function z(){return De(i.value)}function D(){return{meta:l.value,errors:i.value,errorBag:o.value,values:s,isSubmitting:c.value,isValidating:d.value,submitCount:u.value,controlledValues:f.value,validate:h,validateField:p,handleSubmit:$,handleReset:m,submitForm:B,setErrors:k,setFieldError:x,setFieldValue:w,setValues:b,setFieldTouched:S,setTouched:v,resetForm:g,resetField:O,getValues:L,getMeta:j,getErrors:z}}return e.expose({setFieldError:x,setErrors:k,setFieldValue:w,setValues:b,setFieldTouched:S,setTouched:v,resetForm:g,validate:h,validateField:p,resetField:O,getValues:L,getMeta:j,getErrors:z,values:s,meta:l,errors:i}),function(){const I=t.as==="form"?t.as:t.as?a.resolveDynamicComponent(t.as):null,R=ol(I,e,D);if(!I)return R;const ee=I==="form"?{novalidate:!0}:{};return a.h(I,Object.assign(Object.assign(Object.assign({},ee),e.attrs),{onSubmit:A,onReset:P}),R)}}}),U0=a.defineComponent({name:"ErrorMessage",props:{as:{type:String,default:void 0},name:{type:String,required:!0}},setup(t,e){const n=a.inject(Si,void 0),r=a.computed(()=>n==null?void 0:n.errors.value[t.name]);function i(){return{message:r.value}}return()=>{if(!r.value)return;const o=t.as?a.resolveDynamicComponent(t.as):t.as,s=ol(o,e,i),l=Object.assign({role:"alert"},e.attrs);return!o&&(Array.isArray(s)||!s)&&(s!=null&&s.length)?s:(Array.isArray(s)||!s)&&!(s!=null&&s.length)?a.h(o||"span",l,r.value):a.h(o,l,s)}}});function Y0(t){const e=nl(Si),n=t?void 0:a.inject(jc);return a.computed(()=>t?e==null?void 0:e.errors.value[a.toValue(t)]:n==null?void 0:n.errorMessage.value)}Gt("required",t=>typeof t=="number"&&t!=null||typeof t=="object"&&t!=null||typeof t=="boolean"&&t===!0?!0:!t||!t.length?"This field is required":!0),Gt("email",t=>{var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return e.test(String(t).trim().toLowerCase())?!0:"This field must be a valid email"}),Gt("strong_password",t=>t?t.indexOf(" ")>-1?"Password shouldn't contain space":t.length<8||t.length>30?"Password must be between 8 and 30 characters":t.match(/[a-z]/)===null||t.match(/[A-Z]/)===null||t.match(/\d/)===null?"Password must contain at least one uppercase letter, one lowercase letter and one number digit":!0:"Password is required"),Gt("no_space",t=>(t==null?void 0:t.indexOf(" "))>-1?"This field shouldn't contain space":!0),Gt("minLength",(t,[e])=>!t||!t.length?!0:t.length<e?`This field must be at least ${e} characters`:!0),Gt("hasUppercaseLetter",t=>/[A-Z]/.test(t)?!0:"This field must have at least one uppercase character"),Gt("hasLowercaseLetter",t=>/[a-z]/.test(t)?!0:"This field must have at least one lowercase character"),Gt("hasNumber",t=>/\d/.test(t)?!0:"This field must have at least one number"),Gt("hasSpecialCharacter",t=>/[!@$%^&*(),.?":{}|]/.test(t)?!0:"This field must have at least one special character"),Gt("url",t=>{var e=/(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi;return e.test(String(t).trim().toLowerCase())?!0:"This field must be a valid URL"}),Gt("number",t=>parseFloat(t)?!0:"This field must be a number");const be=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},q0={},K0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor"},G0=[a.createElementVNode("path",{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z"},null,-1)];function J0(t,e){return a.openBlock(),a.createElementBlock("svg",K0,G0)}const Z0=be(q0,[["render",J0]]),X0={},Q0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor"},ey=[a.createElementVNode("path",{d:"M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z"},null,-1)];function ty(t,e){return a.openBlock(),a.createElementBlock("svg",Q0,ey)}const ny=be(X0,[["render",ty]]),ry={class:"relative"},Fr=Object.assign({name:"WpicSpinner"},{props:{color:{type:String,default:""}},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",ry,[a.createVNode(Z0,{class:"absolute opacity-25"}),a.createVNode(ny,{class:a.normalizeClass(["animate-spin",{[`${t.color}`]:!0}])},null,8,["class"])]))}});let he={theme:"wpic-tools",popoverTarget:"body"};const iy=["is","type","disabled"],oy={key:0,class:"absolute inset-0 flex justify-center items-center"},sy={class:"rounded-lg py-1 min-w-48 bg-white border border-gray-300 dark:bg-gray-930 dark:border-gray-920 shadow-md"},ly=["onClick"],Ni=Object.assign({name:"WpicButton"},{props:{label:String,primary:Boolean,type:{type:String,default:"button"},secondary:Boolean,destructive:Boolean,inverse:Boolean,disabled:Boolean,hideDisabled:Boolean,full:Boolean,loading:Boolean,colorless:Boolean,outline:{type:Boolean,default:!0},medium:Boolean,small:Boolean,plain:Boolean,outlining:Boolean,square:Boolean,to:[String,Object],actions:{}},setup(t){const e=t,n=a.ref(null),r=a.ref(null),i=a.ref(!1),o=a.computed(()=>e.to?"router-link":"div"),s=k=>{r.value&&!r.value.contains(k.target)&&n.value&&!n.value.contains(k.target)&&(i.value=!1)};a.onMounted(()=>{document.addEventListener("click",s)}),a.onUnmounted(()=>{document.removeEventListener("click",s)});const l={pmi:"has-[.medium]:h-10 has-[.medium]:text-sm has-[.small]:h-8 has-[.small]:text-xs h-12","wpic-tools":"rounded-md has-[.medium]:h-8 has-[.medium]:text-sm has-[.small]:h-6 has-[.small]:text-xs h-10"},c={pmi:"","wpic-tools":"border-none ring-1 ring-black/5 dark:ring-white/10 bg-transparent text-iron-700 disabled:text-iron-700/50 enabled:hover:bg-iron-900/5 enabled:active:bg-iron-200 enabled:active:shadow-inner dark:enabled:border-iron-900 dark:disabled:border-iron-900 dark:text-iron-200 dark:enabled:hover:bg-iron-900 dark:enabled:active:bg-iron-930 dark:disabled:text-iron-400/50"},d={pmi:"","wpic-tools":"bg-transparent text-red-600 disabled:text-red-600/50 enabled:hover:bg-red-500/5 enabled:active:bg-red-100 enabled:active:shadow-inner dark:text-red-400 dark:enabled:hover:bg-red-500/10 dark:enabled:active:bg-red-500/25 dark:disabled:text-red-500/50"},u={pmi:"bg-violet-800 border border-violet-800 focus:bg-violet-800 text-white disabled:bg-zinc-100 disabled:text-zinc-400 disabled:border-zinc-100 enabled:hover:bg-violet-900 enabled:hover:border-violet-900 active:scale-95 enabled:transform","wpic-tools":"border-none! bg-linear-to-b bg-wpic-600 text-white disabled:text-white/50 border-none shadow-[0_1px_0_0_--theme(--color-white/30%)_inset,0_-1px_1px_0_--theme(--color-black/5%)_inset] enabled:active:shadow-inner enabled:hover:bg-wpic-500 enabled:active:text-white/80 dark:shadow-[0_1px_0_0_--theme(--color-white/5%)_inset,0_0_0_1px_--theme(--color-white/2%)_inset] dark:bg-wpic-700 dark:enabled:active:shadow-inner dark:enabled:hover:bg-wpic-600"},f={pmi:"bg-white text-violet-800 border-zinc-400 dark:border-zinc-700 dark:text-zinc-200 dark:bg-zinc-700 dark:hover:bg-zinc-600 dark:hover:border-zinc-600 disabled:text-zinc-400 active:scale-95 enabled:transform","wpic-tools":"border-none! bg-linear-to-b bg-iron-100 text-iron-800 disabled:text-iron-800/50 shadow-[0_1px_0_0_--theme(--color-white/30%)_inset,0_-1px_1px_0_--theme(--color-black/5%)_inset] enabled:active:shadow-inner enabled:hover:bg-iron-200 enabled:active:bg-iron-300 enabled:active:text-iron-800/80 dark:enabled:active:text-iron-200/80 dark:shadow-[0_1px_0_0_--theme(--color-white/5%)_inset,0_0_0_1px_--theme(--color-white/2%)_inset] dark:text-iron-200 dark:bg-iron-900 dark:disabled:text-iron-200/50 dark:enabled:active:shadow-inner dark:enabled:hover:bg-iron-800 dark:enabled:active:bg-iron-700"},h={pmi:"","wpic-tools":"border-none! text-white bg-linear-to-b bg-red-500 disabled:text-red-600/50 border-red-500 enabled:hover:bg-red-400 shadow-[0_1px_0_0_--theme(--color-white/30%)_inset,0_-1px_1px_0_--theme(--color-black/5%)_inset] enabled:hover:border-red-600 enabled:active:shadow-inner enabled:active:text-white/80 enabled:active:bg-red-700 enabled:active:border-red-700 dark:bg-red-400/70 dark:border-red-400/70"},p={pmi:"border-zinc-300 dark:border-zinc-700 dark:text-zinc-300","wpic-tools":" text-gray-950 disabled:text-gray-950/50 border-none ring-1 ring-black/5 shadow-xs enabled:hover:bg-gray-50 enabled:active:text-gray-950/60 bg-white dark:bg-transparent dark:ring-1 dark:ring-gray-800 dark:text-white dark:disabled:text-white/50 dark:shadow-[0_1px_0_0_--theme(--color-white/5%)_inset,0_0_0_1px_--theme(--color-white/2%)_inset] enabled:active:shadow-inner dark:hover:bg-white/10 dark:enabled:active:text-white/80"},m={pmi:"text-violet-800 hover:underline","wpic-tools":"text-lime-800 hover:underline"},g={pmi:"text-red-600 hover:text-red-500 hover:underline","wpic-tools":"text-red-600 disabled:text-red-600/50 hover:text-red-500 dark:text-red-400 dark:hover:text-red-500 hover:underline"},y={pmi:"hover:text-violet-800 hover:underline","wpic-tools":"dark:text-gray-200 hover:text-lime-800 hover:underline"};return(k,x)=>{var w;return a.openBlock(),a.createElementBlock("button",{ref_key:"reference",ref:n,is:o.value,type:t.type,disabled:t.disabled,onClick:x[0]||(x[0]=b=>{var S;return(S=t.actions)!=null&&S.length?i.value=!i.value:null}),class:a.normalizeClass([{"cursor-pointer":!t.disabled&&!t.loading,"active:outline active:outline-2 active:outline-offset-4":!t.disabled&&!t.loading&&t.outlining,"cursor-not-allowed":t.disabled&&!t.hideDisabled,"":t.outline&&!t.plain,"ring-0!":!t.outline,[`${l[a.unref(he).theme]}`]:!0,[`${u[a.unref(he).theme]}`]:t.primary&&!t.plain&&!t.inverse,[`${f[a.unref(he).theme]}`]:t.secondary,[`${p[a.unref(he).theme]}`]:!t.primary&&!t.secondary&&!t.plain&&!t.colorless&&!t.destructive,[`${m[a.unref(he).theme]}`]:t.primary&&t.plain,[`${y[a.unref(he).theme]}`]:!t.primary&&!t.destructive&&t.plain,[`${c[a.unref(he).theme]}`]:t.colorless,[`${h[a.unref(he).theme]}`]:t.destructive&&!t.plain&&!t.colorless,[`${g[a.unref(he).theme]}`]:t.destructive&&t.plain,[`${d[a.unref(he).theme]}`]:t.destructive&&t.colorless,"bg-zinc-50 border-violet-800 text-violet-800":t.primary&&t.inverse,"hover:bg-white":t.primary&&t.inverse&&!t.disabled&&!t.loading,"w-full":t.full,"text-opacity-50":t.disabled,"h-auto":t.plain,"rounded-sm":!t.plain,"aspect-square":t.square},"wpic-button leading-none font-medium no-underline appearance-none outline-zinc-600 focus:outline-hidden relative inline-flex justify-center items-center"])},[t.loading?(a.openBlock(),a.createElementBlock("div",oy,[a.createVNode(Fr,{class:"w-6 h-6"})])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.value),{to:t.to,class:a.normalizeClass(["flex items-center justify-center select-none whitespace-nowrap py-1 h-full",{medium:t.medium,small:t.small,"opacity-0":t.loading,"px-2":!!(t.small&&!t.plain),"px-3":!!(t.medium&&!t.plain),"px-4":!t.small&&!t.medium&&!t.plain,"px-0! aspect-square":t.square}])},{default:a.withCtx(()=>[a.renderSlot(k.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(t.label),1)])]),_:3},8,["to","class"])),(w=t.actions)!=null&&w.length&&i.value?(a.openBlock(),a.createElementBlock("div",{key:1,ref_key:"floating",ref:r,class:"absolute z-30 top-12 left-0"},[a.createElementVNode("div",sy,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.actions,b=>(a.openBlock(),a.createElementBlock("div",{onClick:b.value,class:"font-normal h-10 flex items-center px-4 hover:bg-gray-100 dark:hover:bg-white/5"},a.toDisplayString(b.label),9,ly))),256))])],512)):a.createCommentVNode("",!0)],10,iy)}}}),ay=Object.assign({name:"WpicButtonGroup"},{setup(t){const e={pmi:"border","wpic-tools":"border-gray-300"};return(n,r)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["wpic-button-group flex flex-wrap h-10",[e[a.unref(he).theme]]])},[a.renderSlot(n.$slots,"default")],2))}}),cy={name:"WpicInputGroup"},dy={class:"wpic-input-group flex w-full"};function uy(t,e,n,r,i,o){return a.openBlock(),a.createElementBlock("div",dy,[a.renderSlot(t.$slots,"default")])}const fy=be(cy,[["render",uy]]),hy=Object.assign({name:"WpicForm"},{setup(t,{expose:e}){const n=a.ref();async function r(){return await n.value.validate()}function i(){n.value.resetForm()}function o(){return n.value}function s(){return n.value.errors}return e({validate:r,resetForm:i,getForm:o,errors:s}),(l,c)=>(a.openBlock(),a.createBlock(a.unref(W0),{ref_key:"myForm",ref:n},{default:a.withCtx(({values:d,meta:u,errors:f})=>[a.renderSlot(l.$slots,"default")]),_:3},512))}}),Mi=Math.min,zr=Math.max,Do=Math.round,Bn=t=>({x:t,y:t}),py={left:"right",right:"left",bottom:"top",top:"bottom"},my={start:"end",end:"start"};function cl(t,e,n){return zr(t,Mi(e,n))}function Ai(t,e){return typeof t=="function"?t(e):t}function dr(t){return t.split("-")[0]}function Di(t){return t.split("-")[1]}function dd(t){return t==="x"?"y":"x"}function dl(t){return t==="y"?"height":"width"}function Lo(t){return["top","bottom"].includes(dr(t))?"y":"x"}function ul(t){return dd(Lo(t))}function gy(t,e,n){n===void 0&&(n=!1);const r=Di(t),i=ul(t),o=dl(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=Bo(s)),[s,Bo(s)]}function yy(t){const e=Bo(t);return[fl(t),e,fl(e)]}function fl(t){return t.replace(/start|end/g,e=>my[e])}function by(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:s;default:return[]}}function ky(t,e,n,r){const i=Di(t);let o=by(dr(t),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),e&&(o=o.concat(o.map(fl)))),o}function Bo(t){return t.replace(/left|right|bottom|top/g,e=>py[e])}function wy(t){return{top:0,right:0,bottom:0,left:0,...t}}function ud(t){return typeof t!="number"?wy(t):{top:t,right:t,bottom:t,left:t}}function $o(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function fd(t,e,n){let{reference:r,floating:i}=t;const o=Lo(e),s=ul(e),l=dl(s),c=dr(e),d=o==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[l]/2-i[l]/2;let p;switch(c){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Di(e)){case"start":p[s]-=h*(n&&d?-1:1);break;case"end":p[s]+=h*(n&&d?-1:1);break}return p}const vy=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,l=o.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(e));let d=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=fd(d,r,c),h=r,p={},m=0;for(let g=0;g<l.length;g++){const{name:y,fn:k}=l[g],{x,y:w,data:b,reset:S}=await k({x:u,y:f,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:d,platform:s,elements:{reference:t,floating:e}});u=x??u,f=w??f,p={...p,[y]:{...p[y],...b}},S&&m<=50&&(m++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(d=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:u,y:f}=fd(d,h,c)),g=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:p}};async function hd(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:o,rects:s,elements:l,strategy:c}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Ai(e,t),m=ud(p),y=l[h?f==="floating"?"reference":"floating":f],k=$o(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:d,rootBoundary:u,strategy:c})),x=f==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),b=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},S=$o(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:w,strategy:c}):x);return{top:(k.top-S.top+m.top)/b.y,bottom:(S.bottom-k.bottom+m.bottom)/b.y,left:(k.left-S.left+m.left)/b.x,right:(S.right-k.right+m.right)/b.x}}const xy=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:s,elements:l,middlewareData:c}=e,{element:d,padding:u=0}=Ai(t,e)||{};if(d==null)return{};const f=ud(u),h={x:n,y:r},p=ul(i),m=dl(p),g=await s.getDimensions(d),y=p==="y",k=y?"top":"left",x=y?"bottom":"right",w=y?"clientHeight":"clientWidth",b=o.reference[m]+o.reference[p]-h[p]-o.floating[m],S=h[p]-o.reference[p],v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let O=v?v[w]:0;(!O||!await(s.isElement==null?void 0:s.isElement(v)))&&(O=l.floating[w]||o.floating[m]);const B=b/2-S/2,A=O/2-g[m]/2-1,P=Mi(f[k],A),$=Mi(f[x],A),L=P,j=O-g[m]-$,z=O/2-g[m]/2+B,D=cl(L,z,j),C=!c.arrow&&Di(i)!=null&&z!==D&&o.reference[m]/2-(z<L?P:$)-g[m]/2<0,I=C?z<L?z-L:z-j:0;return{[p]:h[p]+I,data:{[p]:D,centerOffset:z-D-I,...C&&{alignmentOffset:I}},reset:C}}}),Ey=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:l,platform:c,elements:d}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Ai(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const k=dr(i),x=dr(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(d.floating)),b=h||(x||!g?[Bo(l)]:yy(l));!h&&m!=="none"&&b.push(...ky(l,g,m,w));const S=[l,...b],v=await hd(e,y),O=[];let B=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&O.push(v[k]),f){const L=gy(i,s,w);O.push(v[L[0]],v[L[1]])}if(B=[...B,{placement:i,overflows:O}],!O.every(L=>L<=0)){var A,P;const L=(((A=o.flip)==null?void 0:A.index)||0)+1,j=S[L];if(j)return{data:{index:L,overflows:B},reset:{placement:j}};let z=(P=B.filter(D=>D.overflows[0]<=0).sort((D,C)=>D.overflows[1]-C.overflows[1])[0])==null?void 0:P.placement;if(!z)switch(p){case"bestFit":{var $;const D=($=B.map(C=>[C.placement,C.overflows.filter(I=>I>0).reduce((I,R)=>I+R,0)]).sort((C,I)=>C[1]-I[1])[0])==null?void 0:$[0];D&&(z=D);break}case"initialPlacement":z=l;break}if(i!==z)return{reset:{placement:z}}}return{}}}};async function Cy(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=dr(n),l=Di(n),c=Lo(n)==="y",d=["left","top"].includes(s)?-1:1,u=o&&c?-1:1,f=Ai(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return l&&typeof m=="number"&&(p=l==="end"?m*-1:m),c?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const Sy=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:s,middlewareData:l}=e,c=await Cy(e,t);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:s}}}}},_y=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:k,y:x}=y;return{x:k,y:x}}},...c}=Ai(t,e),d={x:n,y:r},u=await hd(e,c),f=Lo(dr(i)),h=dd(f);let p=d[h],m=d[f];if(o){const y=h==="y"?"top":"left",k=h==="y"?"bottom":"right",x=p+u[y],w=p-u[k];p=cl(x,p,w)}if(s){const y=f==="y"?"top":"left",k=f==="y"?"bottom":"right",x=m+u[y],w=m-u[k];m=cl(x,m,w)}const g=l.fn({...e,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-r}}}}};function ur(t){return hl(t)?(t.nodeName||"").toLowerCase():"#document"}function Dt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $n(t){var e;return(e=(hl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function hl(t){return t instanceof Node||t instanceof Dt(t).Node}function rn(t){return t instanceof Element||t instanceof Dt(t).Element}function on(t){return t instanceof HTMLElement||t instanceof Dt(t).HTMLElement}function pd(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Dt(t).ShadowRoot}function Li(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Zt(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function Oy(t){return["table","td","th"].includes(ur(t))}function pl(t){const e=ml(),n=Zt(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Ty(t){let e=In(t);for(;on(e)&&!jr(e);){if(pl(e))return e;e=In(e)}return null}function ml(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function jr(t){return["html","body","#document"].includes(ur(t))}function Zt(t){return Dt(t).getComputedStyle(t)}function Io(t){return rn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function In(t){if(ur(t)==="html")return t;const e=t.assignedSlot||t.parentNode||pd(t)&&t.host||$n(t);return pd(e)?e.host:e}function md(t){const e=In(t);return jr(e)?t.ownerDocument?t.ownerDocument.body:t.body:on(e)&&Li(e)?e:md(e)}function gl(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=md(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),s=Dt(i);return o?e.concat(s,s.visualViewport||[],Li(i)?i:[],s.frameElement&&n?gl(s.frameElement):[]):e.concat(i,gl(i,[],n))}function gd(t){const e=Zt(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=on(t),o=i?t.offsetWidth:n,s=i?t.offsetHeight:r,l=Do(n)!==o||Do(r)!==s;return l&&(n=o,r=s),{width:n,height:r,$:l}}function yd(t){return rn(t)?t:t.contextElement}function Hr(t){const e=yd(t);if(!on(e))return Bn(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=gd(e);let s=(o?Do(n.width):n.width)/r,l=(o?Do(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Ny=Bn(0);function bd(t){const e=Dt(t);return!ml()||!e.visualViewport?Ny:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function My(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Dt(t)?!1:e}function Bi(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=yd(t);let s=Bn(1);e&&(r?rn(r)&&(s=Hr(r)):s=Hr(t));const l=My(o,n,r)?bd(o):Bn(0);let c=(i.left+l.x)/s.x,d=(i.top+l.y)/s.y,u=i.width/s.x,f=i.height/s.y;if(o){const h=Dt(o),p=r&&rn(r)?Dt(r):r;let m=h,g=m.frameElement;for(;g&&r&&p!==m;){const y=Hr(g),k=g.getBoundingClientRect(),x=Zt(g),w=k.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,b=k.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,d*=y.y,u*=y.x,f*=y.y,c+=w,d+=b,m=Dt(g),g=m.frameElement}}return $o({width:u,height:f,x:c,y:d})}const Ay=[":popover-open",":modal"];function yl(t){return Ay.some(e=>{try{return t.matches(e)}catch{return!1}})}function Dy(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",s=$n(r),l=e?yl(e.floating):!1;if(r===s||l&&o)return n;let c={scrollLeft:0,scrollTop:0},d=Bn(1);const u=Bn(0),f=on(r);if((f||!f&&!o)&&((ur(r)!=="body"||Li(s))&&(c=Io(r)),on(r))){const h=Bi(r);d=Hr(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+u.x,y:n.y*d.y-c.scrollTop*d.y+u.y}}function Ly(t){return Array.from(t.getClientRects())}function kd(t){return Bi($n(t)).left+Io(t).scrollLeft}function By(t){const e=$n(t),n=Io(t),r=t.ownerDocument.body,i=zr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=zr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+kd(t);const l=-n.scrollTop;return Zt(r).direction==="rtl"&&(s+=zr(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:l}}function $y(t,e){const n=Dt(t),r=$n(t),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;const d=ml();(!d||d&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l,y:c}}function Iy(t,e){const n=Bi(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=on(t)?Hr(t):Bn(1),s=t.clientWidth*o.x,l=t.clientHeight*o.y,c=i*o.x,d=r*o.y;return{width:s,height:l,x:c,y:d}}function wd(t,e,n){let r;if(e==="viewport")r=$y(t,n);else if(e==="document")r=By($n(t));else if(rn(e))r=Iy(e,n);else{const i=bd(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return $o(r)}function vd(t,e){const n=In(t);return n===e||!rn(n)||jr(n)?!1:Zt(n).position==="fixed"||vd(n,e)}function Vy(t,e){const n=e.get(t);if(n)return n;let r=gl(t,[],!1).filter(l=>rn(l)&&ur(l)!=="body"),i=null;const o=Zt(t).position==="fixed";let s=o?In(t):t;for(;rn(s)&&!jr(s);){const l=Zt(s),c=pl(s);!c&&l.position==="fixed"&&(i=null),(o?!c&&!i:!c&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Li(s)&&!c&&vd(t,s))?r=r.filter(u=>u!==s):i=l,s=In(s)}return e.set(t,r),r}function Py(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const s=[...n==="clippingAncestors"?yl(e)?[]:Vy(e,this._c):[].concat(n),r],l=s[0],c=s.reduce((d,u)=>{const f=wd(e,u,i);return d.top=zr(f.top,d.top),d.right=Mi(f.right,d.right),d.bottom=Mi(f.bottom,d.bottom),d.left=zr(f.left,d.left),d},wd(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ry(t){const{width:e,height:n}=gd(t);return{width:e,height:n}}function Fy(t,e,n){const r=on(e),i=$n(e),o=n==="fixed",s=Bi(t,!0,o,e);let l={scrollLeft:0,scrollTop:0};const c=Bn(0);if(r||!r&&!o)if((ur(e)!=="body"||Li(i))&&(l=Io(e)),r){const f=Bi(e,!0,o,e);c.x=f.x+e.clientLeft,c.y=f.y+e.clientTop}else i&&(c.x=kd(i));const d=s.left+l.scrollLeft-c.x,u=s.top+l.scrollTop-c.y;return{x:d,y:u,width:s.width,height:s.height}}function bl(t){return Zt(t).position==="static"}function xd(t,e){return!on(t)||Zt(t).position==="fixed"?null:e?e(t):t.offsetParent}function Ed(t,e){const n=Dt(t);if(yl(t))return n;if(!on(t)){let i=In(t);for(;i&&!jr(i);){if(rn(i)&&!bl(i))return i;i=In(i)}return n}let r=xd(t,e);for(;r&&Oy(r)&&bl(r);)r=xd(r,e);return r&&jr(r)&&bl(r)&&!pl(r)?n:r||Ty(t)||n}const zy=async function(t){const e=this.getOffsetParent||Ed,n=this.getDimensions,r=await n(t.floating);return{reference:Fy(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function jy(t){return Zt(t).direction==="rtl"}const Hy={convertOffsetParentRelativeRectToViewportRelativeRect:Dy,getDocumentElement:$n,getClippingRect:Py,getOffsetParent:Ed,getElementRects:zy,getClientRects:Ly,getDimensions:Ry,getScale:Hr,isElement:rn,isRTL:jy},Cd=Sy,Sd=_y,_d=Ey,Wy=xy,Od=(t,e,n)=>{const r=new Map,i={platform:Hy,...n},o={...i.platform,_c:r};return vy(t,e,{...i,platform:o})};function Uy(t){return t!=null&&typeof t=="object"&&"$el"in t}function Yy(t){if(Uy(t)){const e=t.$el;return hl(e)&&ur(e)==="#comment"?null:e}return t}function qy(t){return{name:"arrow",options:t,fn(e){const n=Yy(a.unref(t.element));return n==null?{}:Wy({element:n,padding:t.padding}).fn(e)}}}const Ky={},Gy={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},Jy=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)];function Zy(t,e){return a.openBlock(),a.createElementBlock("svg",Gy,Jy)}const $i=be(Ky,[["render",Zy]]);let Vo;const Xy=new Uint8Array(16);function Qy(){if(!Vo&&(Vo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Vo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Vo(Xy)}const nt=[];for(let t=0;t<256;++t)nt.push((t+256).toString(16).slice(1));function e1(t,e=0){return nt[t[e+0]]+nt[t[e+1]]+nt[t[e+2]]+nt[t[e+3]]+"-"+nt[t[e+4]]+nt[t[e+5]]+"-"+nt[t[e+6]]+nt[t[e+7]]+"-"+nt[t[e+8]]+nt[t[e+9]]+"-"+nt[t[e+10]]+nt[t[e+11]]+nt[t[e+12]]+nt[t[e+13]]+nt[t[e+14]]+nt[t[e+15]]}const Td={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function kl(t,e,n){if(Td.randomUUID&&!t)return Td.randomUUID();t=t||{};const r=t.random||(t.rng||Qy)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,e1(r)}let t1={isMobile(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},capitalize(t){return t?(t=t.toString(),t=t.replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()}).trim(),t.charAt(0).toUpperCase()+t.slice(1)):""},sortByKey(t,e,n="asc"){return[...t].sort((r,i)=>{let o=r[e],s=i[e];const l=!isNaN(Date.parse(o))&&/^\d{4}-\d{2}-\d{2}(T.*)?$/.test(o),c=!isNaN(Date.parse(s))&&/^\d{4}-\d{2}-\d{2}(T.*)?$/.test(s);if(l&&c)o=new Date(o).getTime(),s=new Date(s).getTime();else{const d=parseFloat(o),u=parseFloat(s),f=!isNaN(d)&&typeof o!="boolean",h=!isNaN(u)&&typeof s!="boolean";f&&h?(o=d,s=u):(o=String(o).toLowerCase(),s=String(s).toLowerCase())}return n==="asc"?o>s?1:o<s?-1:0:o<s?1:o>s?-1:0})}};const fr=Object.assign({name:"WpicPopover"},{props:{placement:{type:String,default:"bottom-start"},label:String,hover:Boolean,custom:Boolean,disabled:Boolean,offset:{type:Number,default:0},customWidth:{},maxWidth:{type:String,default:"600px"},transparent:Boolean,noBorder:Boolean,noShadow:Boolean,expand:Boolean,noCloseClasses:{type:Array,default:()=>[]}},emits:["show","hide"],setup(t,{expose:e,emit:n}){const r=kl(),i=n,o=t,s={pmi:"md:absolute md:block bg-white shadow-[0_5px_30px_0px_rgba(0,0,0,0.25)]","wpic-tools":"block absolute mt-2 bg-white border border-gray-300 dark:bg-gray-930 dark:border-gray-920 shadow-md"},l=a.ref(null),c=a.ref(null),d=a.ref(!0);function u(){o.disabled||(d.value=!1,p()),i("show"),document.dispatchEvent(new CustomEvent("submenu-open",{detail:{uuid:r}}))}function f(k){if(d.value)u();else{if(o.noCloseClasses.some(x=>k.target.closest(`.${x}`)))return;h()}}function h(){i("hide"),document.documentElement.style.overflow=null,document.querySelector("#app").style.overflow=null,d.value=!0}async function p(){const k=await Od(l.value,c.value,{placement:o.placement,middleware:[_d(),Sd(),Cd(o.offset)]});c.value.style.left=`${k.x}px`,c.value.style.top=`${k.y}px`}const m=k=>{c.value&&!c.value.contains(k.target)&&l.value&&!l.value.contains(k.target)&&h()};a.onMounted(()=>{document.addEventListener("click",m),document.addEventListener("submenu-open",k=>{k.detail.uuid!==r&&h()})}),a.onUnmounted(()=>{document.removeEventListener("click",m),document.removeEventListener("submenu-open",h)});function g(){o.hover&&u()}function y(){o.hover&&h()}return e({hide:h}),(k,x)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(),a.createElementBlock("div",{class:"flex-1",key:`reference_${a.unref(r)}`,ref_key:"reference",ref:l,onMouseenter:g,onMouseleave:y,onClick:x[0]||(x[0]=a.withModifiers(w=>f(w),["stop"]))},[a.renderSlot(k.$slots,"default",{isHidden:d.value})],32)),(a.openBlock(),a.createBlock(a.Teleport,{to:a.unref(he).popoverTarget},[(a.openBlock(),a.createElementBlock("div",{key:`floating_${a.unref(r)}`,ref_key:"floating",ref:c,style:a.normalizeStyle({maxWidth:t.maxWidth}),class:a.normalizeClass(["z-30 rounded-md overflow-hidden",{[`${t.customWidth}`]:!0,hidden:d.value,[`${s[a.unref(he).theme]}`]:!d.value,"bg-transparent!":t.transparent,"border-none!":t.noBorder,"shadow-none":t.noShadow,"rounded-md":!t.custom,"px-3 py-2":!t.custom&&!t.expand}])},[a.renderSlot(k.$slots,"content")],6))],8,["to"]))],64))}});/*!
6
6
  * shared v9.14.4
7
7
  * (c) 2025 kazuya kawaguchi
8
8
  * Released under the MIT License.
@@ -12,19 +12,19 @@
12
12
  * (c) 2025 kazuya kawaguchi
13
13
  * Released under the MIT License.
14
14
  */function h1(t,e,n){return{line:t,column:e,offset:n}}function jo(t,e,n){return{start:t,end:e}}const p1=/\{([0-9a-zA-Z]+)\}/g;function Id(t,...e){return e.length===1&&m1(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),t.replace(p1,(n,r)=>e.hasOwnProperty(r)?e[r]:"")}const Vd=Object.assign,Pd=t=>typeof t=="string",m1=t=>t!==null&&typeof t=="object";function Rd(t,e=""){return t.reduce((n,r,i)=>i===0?n+r:n+e+r,"")}const Ho={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},g1={[Ho.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};function y1(t,e,...n){const r=Id(g1[t],...n||[]),i={message:String(r),code:t};return e&&(i.location=e),i}const ge={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},b1={[ge.EXPECTED_TOKEN]:"Expected token: '{0}'",[ge.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[ge.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[ge.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[ge.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[ge.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[ge.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[ge.EMPTY_PLACEHOLDER]:"Empty placeholder",[ge.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[ge.INVALID_LINKED_FORMAT]:"Invalid linked format",[ge.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[ge.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[ge.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[ge.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[ge.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[ge.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Ur(t,e,n={}){const{domain:r,messages:i,args:o}=n,s=Id((i||b1)[t]||"",...o||[]),l=new SyntaxError(String(s));return l.code=t,e&&(l.location=e),l.domain=r,l}function k1(t){throw t}const w1=/<\/?[\w\s="/.':;#-\/]+>/,v1=t=>w1.test(t),xn=" ",x1="\r",gt=`
15
- `,E1="\u2028",C1="\u2029";function S1(t){const e=t;let n=0,r=1,i=1,o=0;const s=O=>e[O]===x1&&e[O+1]===gt,l=O=>e[O]===gt,c=O=>e[O]===C1,d=O=>e[O]===E1,u=O=>s(O)||l(O)||c(O)||d(O),f=()=>n,h=()=>r,p=()=>i,m=()=>o,g=O=>s(O)||c(O)||d(O)?gt:e[O],y=()=>g(n),k=()=>g(n+o);function x(){return o=0,u(n)&&(r++,i=0),s(n)&&n++,n++,i++,e[n]}function w(){return s(n+o)&&o++,o++,e[n+o]}function b(){n=0,r=1,i=1,o=0}function S(O=0){o=O}function v(){const O=n+o;for(;O!==n;)x();o=0}return{index:f,line:h,column:p,peekOffset:m,charAt:g,currentChar:y,currentPeek:k,next:x,peek:w,reset:b,resetPeek:S,skipToPeek:v}}const Vn=void 0,_1=".",Fd="'",O1="tokenizer";function T1(t,e={}){const n=e.location!==!1,r=S1(t),i=()=>r.index(),o=()=>h1(r.line(),r.column(),r.index()),s=o(),l=i(),c={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},d=()=>c,{onError:u}=e;function f(E,_,U,...se){const Me=d();if(_.column+=U,_.offset+=U,u){const _e=n?jo(Me.startLoc,_):null,Oe=Ur(E,_e,{domain:O1,args:se});u(Oe)}}function h(E,_,U){E.endLoc=o(),E.currentType=_;const se={type:_};return n&&(se.loc=jo(E.startLoc,E.endLoc)),U!=null&&(se.value=U),se}const p=E=>h(E,14);function m(E,_){return E.currentChar()===_?(E.next(),_):(f(ge.EXPECTED_TOKEN,o(),0,_),"")}function g(E){let _="";for(;E.currentPeek()===xn||E.currentPeek()===gt;)_+=E.currentPeek(),E.peek();return _}function y(E){const _=g(E);return E.skipToPeek(),_}function k(E){if(E===Vn)return!1;const _=E.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_===95}function x(E){if(E===Vn)return!1;const _=E.charCodeAt(0);return _>=48&&_<=57}function w(E,_){const{currentType:U}=_;if(U!==2)return!1;g(E);const se=k(E.currentPeek());return E.resetPeek(),se}function b(E,_){const{currentType:U}=_;if(U!==2)return!1;g(E);const se=E.currentPeek()==="-"?E.peek():E.currentPeek(),Me=x(se);return E.resetPeek(),Me}function S(E,_){const{currentType:U}=_;if(U!==2)return!1;g(E);const se=E.currentPeek()===Fd;return E.resetPeek(),se}function v(E,_){const{currentType:U}=_;if(U!==8)return!1;g(E);const se=E.currentPeek()===".";return E.resetPeek(),se}function O(E,_){const{currentType:U}=_;if(U!==9)return!1;g(E);const se=k(E.currentPeek());return E.resetPeek(),se}function B(E,_){const{currentType:U}=_;if(!(U===8||U===12))return!1;g(E);const se=E.currentPeek()===":";return E.resetPeek(),se}function A(E,_){const{currentType:U}=_;if(U!==10)return!1;const se=()=>{const _e=E.currentPeek();return _e==="{"?k(E.peek()):_e==="@"||_e==="%"||_e==="|"||_e===":"||_e==="."||_e===xn||!_e?!1:_e===gt?(E.peek(),se()):L(E,!1)},Me=se();return E.resetPeek(),Me}function V(E){g(E);const _=E.currentPeek()==="|";return E.resetPeek(),_}function $(E){const _=g(E),U=E.currentPeek()==="%"&&E.peek()==="{";return E.resetPeek(),{isModulo:U,hasSpace:_.length>0}}function L(E,_=!0){const U=(Me=!1,_e="",Oe=!1)=>{const z=E.currentPeek();return z==="{"?_e==="%"?!1:Me:z==="@"||!z?_e==="%"?!0:Me:z==="%"?(E.peek(),U(Me,"%",!0)):z==="|"?_e==="%"||Oe?!0:!(_e===xn||_e===gt):z===xn?(E.peek(),U(!0,xn,Oe)):z===gt?(E.peek(),U(!0,gt,Oe)):!0},se=U();return _&&E.resetPeek(),se}function j(E,_){const U=E.currentChar();return U===Vn?Vn:_(U)?(E.next(),U):null}function F(E){const _=E.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36}function D(E){return j(E,F)}function C(E){const _=E.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36||_===45}function P(E){return j(E,C)}function R(E){const _=E.charCodeAt(0);return _>=48&&_<=57}function Q(E){return j(E,R)}function ne(E){const _=E.charCodeAt(0);return _>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102}function he(E){return j(E,ne)}function ue(E){let _="",U="";for(;_=Q(E);)U+=_;return U}function I(E){y(E);const _=E.currentChar();return _!=="%"&&f(ge.EXPECTED_TOKEN,o(),0,_),E.next(),"%"}function W(E){let _="";for(;;){const U=E.currentChar();if(U==="{"||U==="}"||U==="@"||U==="|"||!U)break;if(U==="%")if(L(E))_+=U,E.next();else break;else if(U===xn||U===gt)if(L(E))_+=U,E.next();else{if(V(E))break;_+=U,E.next()}else _+=U,E.next()}return _}function K(E){y(E);let _="",U="";for(;_=P(E);)U+=_;return E.currentChar()===Vn&&f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),U}function q(E){y(E);let _="";return E.currentChar()==="-"?(E.next(),_+=`-${ue(E)}`):_+=ue(E),E.currentChar()===Vn&&f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),_}function H(E){return E!==Fd&&E!==gt}function ce(E){y(E),m(E,"'");let _="",U="";for(;_=j(E,H);)_==="\\"?U+=ae(E):U+=_;const se=E.currentChar();return se===gt||se===Vn?(f(ge.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),se===gt&&(E.next(),m(E,"'")),U):(m(E,"'"),U)}function ae(E){const _=E.currentChar();switch(_){case"\\":case"'":return E.next(),`\\${_}`;case"u":return we(E,_,4);case"U":return we(E,_,6);default:return f(ge.UNKNOWN_ESCAPE_SEQUENCE,o(),0,_),""}}function we(E,_,U){m(E,_);let se="";for(let Me=0;Me<U;Me++){const _e=he(E);if(!_e){f(ge.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${_}${se}${E.currentChar()}`);break}se+=_e}return`\\${_}${se}`}function Ne(E){return E!=="{"&&E!=="}"&&E!==xn&&E!==gt}function Ie(E){y(E);let _="",U="";for(;_=j(E,Ne);)U+=_;return U}function tt(E){let _="",U="";for(;_=D(E);)U+=_;return U}function ee(E){const _=U=>{const se=E.currentChar();return se==="{"||se==="%"||se==="@"||se==="|"||se==="("||se===")"||!se||se===xn?U:(U+=se,E.next(),_(U))};return _("")}function Ee(E){y(E);const _=m(E,"|");return y(E),_}function At(E,_){let U=null;switch(E.currentChar()){case"{":return _.braceNest>=1&&f(ge.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),E.next(),U=h(_,2,"{"),y(E),_.braceNest++,U;case"}":return _.braceNest>0&&_.currentType===2&&f(ge.EMPTY_PLACEHOLDER,o(),0),E.next(),U=h(_,3,"}"),_.braceNest--,_.braceNest>0&&y(E),_.inLinked&&_.braceNest===0&&(_.inLinked=!1),U;case"@":return _.braceNest>0&&f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),U=lt(E,_)||p(_),_.braceNest=0,U;default:{let Me=!0,_e=!0,Oe=!0;if(V(E))return _.braceNest>0&&f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),U=h(_,1,Ee(E)),_.braceNest=0,_.inLinked=!1,U;if(_.braceNest>0&&(_.currentType===5||_.currentType===6||_.currentType===7))return f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),_.braceNest=0,at(E,_);if(Me=w(E,_))return U=h(_,5,K(E)),y(E),U;if(_e=b(E,_))return U=h(_,6,q(E)),y(E),U;if(Oe=S(E,_))return U=h(_,7,ce(E)),y(E),U;if(!Me&&!_e&&!Oe)return U=h(_,13,Ie(E)),f(ge.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,U.value),y(E),U;break}}return U}function lt(E,_){const{currentType:U}=_;let se=null;const Me=E.currentChar();switch((U===8||U===9||U===12||U===10)&&(Me===gt||Me===xn)&&f(ge.INVALID_LINKED_FORMAT,o(),0),Me){case"@":return E.next(),se=h(_,8,"@"),_.inLinked=!0,se;case".":return y(E),E.next(),h(_,9,".");case":":return y(E),E.next(),h(_,10,":");default:return V(E)?(se=h(_,1,Ee(E)),_.braceNest=0,_.inLinked=!1,se):v(E,_)||B(E,_)?(y(E),lt(E,_)):O(E,_)?(y(E),h(_,12,tt(E))):A(E,_)?(y(E),Me==="{"?At(E,_)||se:h(_,11,ee(E))):(U===8&&f(ge.INVALID_LINKED_FORMAT,o(),0),_.braceNest=0,_.inLinked=!1,at(E,_))}}function at(E,_){let U={type:14};if(_.braceNest>0)return At(E,_)||p(_);if(_.inLinked)return lt(E,_)||p(_);switch(E.currentChar()){case"{":return At(E,_)||p(_);case"}":return f(ge.UNBALANCED_CLOSING_BRACE,o(),0),E.next(),h(_,3,"}");case"@":return lt(E,_)||p(_);default:{if(V(E))return U=h(_,1,Ee(E)),_.braceNest=0,_.inLinked=!1,U;const{isModulo:Me,hasSpace:_e}=$(E);if(Me)return _e?h(_,0,W(E)):h(_,4,I(E));if(L(E))return h(_,0,W(E));break}}return U}function pt(){const{currentType:E,offset:_,startLoc:U,endLoc:se}=c;return c.lastType=E,c.lastOffset=_,c.lastStartLoc=U,c.lastEndLoc=se,c.offset=i(),c.startLoc=o(),r.currentChar()===Vn?h(c,14):at(r,c)}return{nextToken:pt,currentOffset:i,currentPosition:o,context:d}}const N1="parser",M1=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function A1(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 D1(t={}){const e=t.location!==!1,{onError:n,onWarn:r}=t;function i(w,b,S,v,...O){const B=w.currentPosition();if(B.offset+=v,B.column+=v,n){const A=e?jo(S,B):null,V=Ur(b,A,{domain:N1,args:O});n(V)}}function o(w,b,S,v,...O){const B=w.currentPosition();if(B.offset+=v,B.column+=v,r){const A=e?jo(S,B):null;r(y1(b,A,O))}}function s(w,b,S){const v={type:w};return e&&(v.start=b,v.end=b,v.loc={start:S,end:S}),v}function l(w,b,S,v){e&&(w.end=b,w.loc&&(w.loc.end=S))}function c(w,b){const S=w.context(),v=s(3,S.offset,S.startLoc);return v.value=b,l(v,w.currentOffset(),w.currentPosition()),v}function d(w,b){const S=w.context(),{lastOffset:v,lastStartLoc:O}=S,B=s(5,v,O);return B.index=parseInt(b,10),w.nextToken(),l(B,w.currentOffset(),w.currentPosition()),B}function u(w,b,S){const v=w.context(),{lastOffset:O,lastStartLoc:B}=v,A=s(4,O,B);return A.key=b,S===!0&&(A.modulo=!0),w.nextToken(),l(A,w.currentOffset(),w.currentPosition()),A}function f(w,b){const S=w.context(),{lastOffset:v,lastStartLoc:O}=S,B=s(9,v,O);return B.value=b.replace(M1,A1),w.nextToken(),l(B,w.currentOffset(),w.currentPosition()),B}function h(w){const b=w.nextToken(),S=w.context(),{lastOffset:v,lastStartLoc:O}=S,B=s(8,v,O);return b.type!==12?(i(w,ge.UNEXPECTED_EMPTY_LINKED_MODIFIER,S.lastStartLoc,0),B.value="",l(B,v,O),{nextConsumeToken:b,node:B}):(b.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,Qt(b)),B.value=b.value||"",l(B,w.currentOffset(),w.currentPosition()),{node:B})}function p(w,b){const S=w.context(),v=s(7,S.offset,S.startLoc);return v.value=b,l(v,w.currentOffset(),w.currentPosition()),v}function m(w){const b=w.context(),S=s(6,b.offset,b.startLoc);let v=w.nextToken();if(v.type===9){const O=h(w);S.modifier=O.node,v=O.nextConsumeToken||w.nextToken()}switch(v.type!==10&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),v=w.nextToken(),v.type===2&&(v=w.nextToken()),v.type){case 11:v.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),S.key=p(w,v.value||"");break;case 5:v.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),S.key=u(w,v.value||"");break;case 6:v.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),S.key=d(w,v.value||"");break;case 7:v.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),S.key=f(w,v.value||"");break;default:{i(w,ge.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const O=w.context(),B=s(7,O.offset,O.startLoc);return B.value="",l(B,O.offset,O.startLoc),S.key=B,l(S,O.offset,O.startLoc),{nextConsumeToken:v,node:S}}}return l(S,w.currentOffset(),w.currentPosition()),{node:S}}function g(w){const b=w.context(),S=b.currentType===1?w.currentOffset():b.offset,v=b.currentType===1?b.endLoc:b.startLoc,O=s(2,S,v);O.items=[];let B=null,A=null;do{const L=B||w.nextToken();switch(B=null,L.type){case 0:L.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(L)),O.items.push(c(w,L.value||""));break;case 6:L.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(L)),O.items.push(d(w,L.value||""));break;case 4:A=!0;break;case 5:L.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(L)),O.items.push(u(w,L.value||"",!!A)),A&&(o(w,Ho.USE_MODULO_SYNTAX,b.lastStartLoc,0,Qt(L)),A=null);break;case 7:L.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(L)),O.items.push(f(w,L.value||""));break;case 8:{const j=m(w);O.items.push(j.node),B=j.nextConsumeToken||null;break}}}while(b.currentType!==14&&b.currentType!==1);const V=b.currentType===1?b.lastOffset:w.currentOffset(),$=b.currentType===1?b.lastEndLoc:w.currentPosition();return l(O,V,$),O}function y(w,b,S,v){const O=w.context();let B=v.items.length===0;const A=s(1,b,S);A.cases=[],A.cases.push(v);do{const V=g(w);B||(B=V.items.length===0),A.cases.push(V)}while(O.currentType!==14);return B&&i(w,ge.MUST_HAVE_MESSAGES_IN_PLURAL,S,0),l(A,w.currentOffset(),w.currentPosition()),A}function k(w){const b=w.context(),{offset:S,startLoc:v}=b,O=g(w);return b.currentType===14?O:y(w,S,v,O)}function x(w){const b=T1(w,Vd({},t)),S=b.context(),v=s(0,S.offset,S.startLoc);return e&&v.loc&&(v.loc.source=w),v.body=k(b),t.onCacheKey&&(v.cacheKey=t.onCacheKey(w)),S.currentType!==14&&i(b,ge.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,w[S.offset]||""),l(v,b.currentOffset(),b.currentPosition()),v}return{parse:x}}function Qt(t){if(t.type===14)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function L1(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:o=>(n.helpers.add(o),o)}}function zd(t,e){for(let n=0;n<t.length;n++)vl(t[n],e)}function vl(t,e){switch(t.type){case 1:zd(t.cases,e),e.helper("plural");break;case 2:zd(t.items,e);break;case 6:{vl(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 B1(t,e={}){const n=L1(t);n.helper("normalize"),t.body&&vl(t.body,n);const r=n.context();t.helpers=Array.from(r.helpers)}function $1(t){const e=t.body;return e.type===2?jd(e):e.cases.forEach(n=>jd(n)),t}function jd(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=Rd(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 I1="minifier";function Yr(t){switch(t.t=t.type,t.type){case 0:{const e=t;Yr(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++)Yr(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++)Yr(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;Yr(e.key),e.k=e.key,delete e.key,e.modifier&&(Yr(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:throw Ur(ge.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:I1,args:[t.type]})}delete t.type}const V1="parser";function P1(t,e){const{filename:n,breakLineCode:r,needIndent:i}=e,o=e.location!==!1,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:i,indentLevel:0};o&&t.loc&&(s.source=t.loc.source);const l=()=>s;function c(g,y){s.code+=g}function d(g,y=!0){const k=y?r:"";c(i?k+" ".repeat(g):k)}function u(g=!0){const y=++s.indentLevel;g&&d(y)}function f(g=!0){const y=--s.indentLevel;g&&d(y)}function h(){d(s.indentLevel)}return{context:l,push:c,indent:u,deindent:f,newline:h,helper:g=>`_${g}`,needIndent:()=>s.needIndent}}function R1(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),qr(t,e.key),e.modifier?(t.push(", "),qr(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function F1(t,e){const{helper:n,needIndent:r}=t;t.push(`${n("normalize")}([`),t.indent(r());const i=e.items.length;for(let o=0;o<i&&(qr(t,e.items[o]),o!==i-1);o++)t.push(", ");t.deindent(r()),t.push("])")}function z1(t,e){const{helper:n,needIndent:r}=t;if(e.cases.length>1){t.push(`${n("plural")}([`),t.indent(r());const i=e.cases.length;for(let o=0;o<i&&(qr(t,e.cases[o]),o!==i-1);o++)t.push(", ");t.deindent(r()),t.push("])")}}function j1(t,e){e.body?qr(t,e.body):t.push("null")}function qr(t,e){const{helper:n}=t;switch(e.type){case 0:j1(t,e);break;case 1:z1(t,e);break;case 2:F1(t,e);break;case 6:R1(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:throw Ur(ge.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:V1,args:[e.type]})}}const H1=(t,e={})=>{const n=Pd(e.mode)?e.mode:"normal",r=Pd(e.filename)?e.filename:"message.intl";e.sourceMap;const i=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":`
15
+ `,E1="\u2028",C1="\u2029";function S1(t){const e=t;let n=0,r=1,i=1,o=0;const s=O=>e[O]===x1&&e[O+1]===gt,l=O=>e[O]===gt,c=O=>e[O]===C1,d=O=>e[O]===E1,u=O=>s(O)||l(O)||c(O)||d(O),f=()=>n,h=()=>r,p=()=>i,m=()=>o,g=O=>s(O)||c(O)||d(O)?gt:e[O],y=()=>g(n),k=()=>g(n+o);function x(){return o=0,u(n)&&(r++,i=0),s(n)&&n++,n++,i++,e[n]}function w(){return s(n+o)&&o++,o++,e[n+o]}function b(){n=0,r=1,i=1,o=0}function S(O=0){o=O}function v(){const O=n+o;for(;O!==n;)x();o=0}return{index:f,line:h,column:p,peekOffset:m,charAt:g,currentChar:y,currentPeek:k,next:x,peek:w,reset:b,resetPeek:S,skipToPeek:v}}const Vn=void 0,_1=".",Fd="'",O1="tokenizer";function T1(t,e={}){const n=e.location!==!1,r=S1(t),i=()=>r.index(),o=()=>h1(r.line(),r.column(),r.index()),s=o(),l=i(),c={currentType:14,offset:l,startLoc:s,endLoc:s,lastType:14,lastOffset:l,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},d=()=>c,{onError:u}=e;function f(E,_,U,...se){const Me=d();if(_.column+=U,_.offset+=U,u){const _e=n?jo(Me.startLoc,_):null,Oe=Ur(E,_e,{domain:O1,args:se});u(Oe)}}function h(E,_,U){E.endLoc=o(),E.currentType=_;const se={type:_};return n&&(se.loc=jo(E.startLoc,E.endLoc)),U!=null&&(se.value=U),se}const p=E=>h(E,14);function m(E,_){return E.currentChar()===_?(E.next(),_):(f(ge.EXPECTED_TOKEN,o(),0,_),"")}function g(E){let _="";for(;E.currentPeek()===xn||E.currentPeek()===gt;)_+=E.currentPeek(),E.peek();return _}function y(E){const _=g(E);return E.skipToPeek(),_}function k(E){if(E===Vn)return!1;const _=E.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_===95}function x(E){if(E===Vn)return!1;const _=E.charCodeAt(0);return _>=48&&_<=57}function w(E,_){const{currentType:U}=_;if(U!==2)return!1;g(E);const se=k(E.currentPeek());return E.resetPeek(),se}function b(E,_){const{currentType:U}=_;if(U!==2)return!1;g(E);const se=E.currentPeek()==="-"?E.peek():E.currentPeek(),Me=x(se);return E.resetPeek(),Me}function S(E,_){const{currentType:U}=_;if(U!==2)return!1;g(E);const se=E.currentPeek()===Fd;return E.resetPeek(),se}function v(E,_){const{currentType:U}=_;if(U!==8)return!1;g(E);const se=E.currentPeek()===".";return E.resetPeek(),se}function O(E,_){const{currentType:U}=_;if(U!==9)return!1;g(E);const se=k(E.currentPeek());return E.resetPeek(),se}function B(E,_){const{currentType:U}=_;if(!(U===8||U===12))return!1;g(E);const se=E.currentPeek()===":";return E.resetPeek(),se}function A(E,_){const{currentType:U}=_;if(U!==10)return!1;const se=()=>{const _e=E.currentPeek();return _e==="{"?k(E.peek()):_e==="@"||_e==="%"||_e==="|"||_e===":"||_e==="."||_e===xn||!_e?!1:_e===gt?(E.peek(),se()):L(E,!1)},Me=se();return E.resetPeek(),Me}function P(E){g(E);const _=E.currentPeek()==="|";return E.resetPeek(),_}function $(E){const _=g(E),U=E.currentPeek()==="%"&&E.peek()==="{";return E.resetPeek(),{isModulo:U,hasSpace:_.length>0}}function L(E,_=!0){const U=(Me=!1,_e="",Oe=!1)=>{const F=E.currentPeek();return F==="{"?_e==="%"?!1:Me:F==="@"||!F?_e==="%"?!0:Me:F==="%"?(E.peek(),U(Me,"%",!0)):F==="|"?_e==="%"||Oe?!0:!(_e===xn||_e===gt):F===xn?(E.peek(),U(!0,xn,Oe)):F===gt?(E.peek(),U(!0,gt,Oe)):!0},se=U();return _&&E.resetPeek(),se}function j(E,_){const U=E.currentChar();return U===Vn?Vn:_(U)?(E.next(),U):null}function z(E){const _=E.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36}function D(E){return j(E,z)}function C(E){const _=E.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36||_===45}function I(E){return j(E,C)}function R(E){const _=E.charCodeAt(0);return _>=48&&_<=57}function ee(E){return j(E,R)}function te(E){const _=E.charCodeAt(0);return _>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102}function ce(E){return j(E,te)}function ue(E){let _="",U="";for(;_=ee(E);)U+=_;return U}function V(E){y(E);const _=E.currentChar();return _!=="%"&&f(ge.EXPECTED_TOKEN,o(),0,_),E.next(),"%"}function W(E){let _="";for(;;){const U=E.currentChar();if(U==="{"||U==="}"||U==="@"||U==="|"||!U)break;if(U==="%")if(L(E))_+=U,E.next();else break;else if(U===xn||U===gt)if(L(E))_+=U,E.next();else{if(P(E))break;_+=U,E.next()}else _+=U,E.next()}return _}function K(E){y(E);let _="",U="";for(;_=I(E);)U+=_;return E.currentChar()===Vn&&f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),U}function q(E){y(E);let _="";return E.currentChar()==="-"?(E.next(),_+=`-${ue(E)}`):_+=ue(E),E.currentChar()===Vn&&f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),_}function H(E){return E!==Fd&&E!==gt}function de(E){y(E),m(E,"'");let _="",U="";for(;_=j(E,H);)_==="\\"?U+=ae(E):U+=_;const se=E.currentChar();return se===gt||se===Vn?(f(ge.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),se===gt&&(E.next(),m(E,"'")),U):(m(E,"'"),U)}function ae(E){const _=E.currentChar();switch(_){case"\\":case"'":return E.next(),`\\${_}`;case"u":return we(E,_,4);case"U":return we(E,_,6);default:return f(ge.UNKNOWN_ESCAPE_SEQUENCE,o(),0,_),""}}function we(E,_,U){m(E,_);let se="";for(let Me=0;Me<U;Me++){const _e=ce(E);if(!_e){f(ge.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${_}${se}${E.currentChar()}`);break}se+=_e}return`\\${_}${se}`}function Ne(E){return E!=="{"&&E!=="}"&&E!==xn&&E!==gt}function Ie(E){y(E);let _="",U="";for(;_=j(E,Ne);)U+=_;return U}function tt(E){let _="",U="";for(;_=D(E);)U+=_;return U}function Q(E){const _=U=>{const se=E.currentChar();return se==="{"||se==="%"||se==="@"||se==="|"||se==="("||se===")"||!se||se===xn?U:(U+=se,E.next(),_(U))};return _("")}function Ee(E){y(E);const _=m(E,"|");return y(E),_}function At(E,_){let U=null;switch(E.currentChar()){case"{":return _.braceNest>=1&&f(ge.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),E.next(),U=h(_,2,"{"),y(E),_.braceNest++,U;case"}":return _.braceNest>0&&_.currentType===2&&f(ge.EMPTY_PLACEHOLDER,o(),0),E.next(),U=h(_,3,"}"),_.braceNest--,_.braceNest>0&&y(E),_.inLinked&&_.braceNest===0&&(_.inLinked=!1),U;case"@":return _.braceNest>0&&f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),U=lt(E,_)||p(_),_.braceNest=0,U;default:{let Me=!0,_e=!0,Oe=!0;if(P(E))return _.braceNest>0&&f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),U=h(_,1,Ee(E)),_.braceNest=0,_.inLinked=!1,U;if(_.braceNest>0&&(_.currentType===5||_.currentType===6||_.currentType===7))return f(ge.UNTERMINATED_CLOSING_BRACE,o(),0),_.braceNest=0,at(E,_);if(Me=w(E,_))return U=h(_,5,K(E)),y(E),U;if(_e=b(E,_))return U=h(_,6,q(E)),y(E),U;if(Oe=S(E,_))return U=h(_,7,de(E)),y(E),U;if(!Me&&!_e&&!Oe)return U=h(_,13,Ie(E)),f(ge.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,U.value),y(E),U;break}}return U}function lt(E,_){const{currentType:U}=_;let se=null;const Me=E.currentChar();switch((U===8||U===9||U===12||U===10)&&(Me===gt||Me===xn)&&f(ge.INVALID_LINKED_FORMAT,o(),0),Me){case"@":return E.next(),se=h(_,8,"@"),_.inLinked=!0,se;case".":return y(E),E.next(),h(_,9,".");case":":return y(E),E.next(),h(_,10,":");default:return P(E)?(se=h(_,1,Ee(E)),_.braceNest=0,_.inLinked=!1,se):v(E,_)||B(E,_)?(y(E),lt(E,_)):O(E,_)?(y(E),h(_,12,tt(E))):A(E,_)?(y(E),Me==="{"?At(E,_)||se:h(_,11,Q(E))):(U===8&&f(ge.INVALID_LINKED_FORMAT,o(),0),_.braceNest=0,_.inLinked=!1,at(E,_))}}function at(E,_){let U={type:14};if(_.braceNest>0)return At(E,_)||p(_);if(_.inLinked)return lt(E,_)||p(_);switch(E.currentChar()){case"{":return At(E,_)||p(_);case"}":return f(ge.UNBALANCED_CLOSING_BRACE,o(),0),E.next(),h(_,3,"}");case"@":return lt(E,_)||p(_);default:{if(P(E))return U=h(_,1,Ee(E)),_.braceNest=0,_.inLinked=!1,U;const{isModulo:Me,hasSpace:_e}=$(E);if(Me)return _e?h(_,0,W(E)):h(_,4,V(E));if(L(E))return h(_,0,W(E));break}}return U}function pt(){const{currentType:E,offset:_,startLoc:U,endLoc:se}=c;return c.lastType=E,c.lastOffset=_,c.lastStartLoc=U,c.lastEndLoc=se,c.offset=i(),c.startLoc=o(),r.currentChar()===Vn?h(c,14):at(r,c)}return{nextToken:pt,currentOffset:i,currentPosition:o,context:d}}const N1="parser",M1=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function A1(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 D1(t={}){const e=t.location!==!1,{onError:n,onWarn:r}=t;function i(w,b,S,v,...O){const B=w.currentPosition();if(B.offset+=v,B.column+=v,n){const A=e?jo(S,B):null,P=Ur(b,A,{domain:N1,args:O});n(P)}}function o(w,b,S,v,...O){const B=w.currentPosition();if(B.offset+=v,B.column+=v,r){const A=e?jo(S,B):null;r(y1(b,A,O))}}function s(w,b,S){const v={type:w};return e&&(v.start=b,v.end=b,v.loc={start:S,end:S}),v}function l(w,b,S,v){e&&(w.end=b,w.loc&&(w.loc.end=S))}function c(w,b){const S=w.context(),v=s(3,S.offset,S.startLoc);return v.value=b,l(v,w.currentOffset(),w.currentPosition()),v}function d(w,b){const S=w.context(),{lastOffset:v,lastStartLoc:O}=S,B=s(5,v,O);return B.index=parseInt(b,10),w.nextToken(),l(B,w.currentOffset(),w.currentPosition()),B}function u(w,b,S){const v=w.context(),{lastOffset:O,lastStartLoc:B}=v,A=s(4,O,B);return A.key=b,S===!0&&(A.modulo=!0),w.nextToken(),l(A,w.currentOffset(),w.currentPosition()),A}function f(w,b){const S=w.context(),{lastOffset:v,lastStartLoc:O}=S,B=s(9,v,O);return B.value=b.replace(M1,A1),w.nextToken(),l(B,w.currentOffset(),w.currentPosition()),B}function h(w){const b=w.nextToken(),S=w.context(),{lastOffset:v,lastStartLoc:O}=S,B=s(8,v,O);return b.type!==12?(i(w,ge.UNEXPECTED_EMPTY_LINKED_MODIFIER,S.lastStartLoc,0),B.value="",l(B,v,O),{nextConsumeToken:b,node:B}):(b.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,Qt(b)),B.value=b.value||"",l(B,w.currentOffset(),w.currentPosition()),{node:B})}function p(w,b){const S=w.context(),v=s(7,S.offset,S.startLoc);return v.value=b,l(v,w.currentOffset(),w.currentPosition()),v}function m(w){const b=w.context(),S=s(6,b.offset,b.startLoc);let v=w.nextToken();if(v.type===9){const O=h(w);S.modifier=O.node,v=O.nextConsumeToken||w.nextToken()}switch(v.type!==10&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),v=w.nextToken(),v.type===2&&(v=w.nextToken()),v.type){case 11:v.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),S.key=p(w,v.value||"");break;case 5:v.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),S.key=u(w,v.value||"");break;case 6:v.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),S.key=d(w,v.value||"");break;case 7:v.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(v)),S.key=f(w,v.value||"");break;default:{i(w,ge.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const O=w.context(),B=s(7,O.offset,O.startLoc);return B.value="",l(B,O.offset,O.startLoc),S.key=B,l(S,O.offset,O.startLoc),{nextConsumeToken:v,node:S}}}return l(S,w.currentOffset(),w.currentPosition()),{node:S}}function g(w){const b=w.context(),S=b.currentType===1?w.currentOffset():b.offset,v=b.currentType===1?b.endLoc:b.startLoc,O=s(2,S,v);O.items=[];let B=null,A=null;do{const L=B||w.nextToken();switch(B=null,L.type){case 0:L.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(L)),O.items.push(c(w,L.value||""));break;case 6:L.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(L)),O.items.push(d(w,L.value||""));break;case 4:A=!0;break;case 5:L.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(L)),O.items.push(u(w,L.value||"",!!A)),A&&(o(w,Ho.USE_MODULO_SYNTAX,b.lastStartLoc,0,Qt(L)),A=null);break;case 7:L.value==null&&i(w,ge.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Qt(L)),O.items.push(f(w,L.value||""));break;case 8:{const j=m(w);O.items.push(j.node),B=j.nextConsumeToken||null;break}}}while(b.currentType!==14&&b.currentType!==1);const P=b.currentType===1?b.lastOffset:w.currentOffset(),$=b.currentType===1?b.lastEndLoc:w.currentPosition();return l(O,P,$),O}function y(w,b,S,v){const O=w.context();let B=v.items.length===0;const A=s(1,b,S);A.cases=[],A.cases.push(v);do{const P=g(w);B||(B=P.items.length===0),A.cases.push(P)}while(O.currentType!==14);return B&&i(w,ge.MUST_HAVE_MESSAGES_IN_PLURAL,S,0),l(A,w.currentOffset(),w.currentPosition()),A}function k(w){const b=w.context(),{offset:S,startLoc:v}=b,O=g(w);return b.currentType===14?O:y(w,S,v,O)}function x(w){const b=T1(w,Vd({},t)),S=b.context(),v=s(0,S.offset,S.startLoc);return e&&v.loc&&(v.loc.source=w),v.body=k(b),t.onCacheKey&&(v.cacheKey=t.onCacheKey(w)),S.currentType!==14&&i(b,ge.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,w[S.offset]||""),l(v,b.currentOffset(),b.currentPosition()),v}return{parse:x}}function Qt(t){if(t.type===14)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function L1(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:o=>(n.helpers.add(o),o)}}function zd(t,e){for(let n=0;n<t.length;n++)vl(t[n],e)}function vl(t,e){switch(t.type){case 1:zd(t.cases,e),e.helper("plural");break;case 2:zd(t.items,e);break;case 6:{vl(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 B1(t,e={}){const n=L1(t);n.helper("normalize"),t.body&&vl(t.body,n);const r=n.context();t.helpers=Array.from(r.helpers)}function $1(t){const e=t.body;return e.type===2?jd(e):e.cases.forEach(n=>jd(n)),t}function jd(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=Rd(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 I1="minifier";function Yr(t){switch(t.t=t.type,t.type){case 0:{const e=t;Yr(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++)Yr(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++)Yr(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;Yr(e.key),e.k=e.key,delete e.key,e.modifier&&(Yr(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:throw Ur(ge.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:I1,args:[t.type]})}delete t.type}const V1="parser";function P1(t,e){const{filename:n,breakLineCode:r,needIndent:i}=e,o=e.location!==!1,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:i,indentLevel:0};o&&t.loc&&(s.source=t.loc.source);const l=()=>s;function c(g,y){s.code+=g}function d(g,y=!0){const k=y?r:"";c(i?k+" ".repeat(g):k)}function u(g=!0){const y=++s.indentLevel;g&&d(y)}function f(g=!0){const y=--s.indentLevel;g&&d(y)}function h(){d(s.indentLevel)}return{context:l,push:c,indent:u,deindent:f,newline:h,helper:g=>`_${g}`,needIndent:()=>s.needIndent}}function R1(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),qr(t,e.key),e.modifier?(t.push(", "),qr(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function F1(t,e){const{helper:n,needIndent:r}=t;t.push(`${n("normalize")}([`),t.indent(r());const i=e.items.length;for(let o=0;o<i&&(qr(t,e.items[o]),o!==i-1);o++)t.push(", ");t.deindent(r()),t.push("])")}function z1(t,e){const{helper:n,needIndent:r}=t;if(e.cases.length>1){t.push(`${n("plural")}([`),t.indent(r());const i=e.cases.length;for(let o=0;o<i&&(qr(t,e.cases[o]),o!==i-1);o++)t.push(", ");t.deindent(r()),t.push("])")}}function j1(t,e){e.body?qr(t,e.body):t.push("null")}function qr(t,e){const{helper:n}=t;switch(e.type){case 0:j1(t,e);break;case 1:z1(t,e);break;case 2:F1(t,e);break;case 6:R1(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:throw Ur(ge.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:V1,args:[e.type]})}}const H1=(t,e={})=>{const n=Pd(e.mode)?e.mode:"normal",r=Pd(e.filename)?e.filename:"message.intl";e.sourceMap;const i=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":`
16
16
  `,o=e.needIndent?e.needIndent:n!=="arrow",s=t.helpers||[],l=P1(t,{filename:r,breakLineCode:i,needIndent:o});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(o),s.length>0&&(l.push(`const { ${Rd(s.map(u=>`${u}: _${u}`),", ")} } = ctx`),l.newline()),l.push("return "),qr(l,t),l.deindent(o),l.push("}"),delete t.helpers;const{code:c,map:d}=l.context();return{ast:t,code:c,map:d?d.toJSON():void 0}};function W1(t,e={}){const n=Vd({},e),r=!!n.jit,i=!!n.minify,o=n.optimize==null?!0:n.optimize,l=D1(n).parse(t);return r?(o&&$1(l),i&&Yr(l),{ast:l,code:""}):(B1(l,n),H1(l,n))}/*!
17
17
  * core-base v9.14.4
18
18
  * (c) 2025 kazuya kawaguchi
19
19
  * Released under the MIT License.
20
- */function U1(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(wn().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(wn().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(wn().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function en(t){return Te(t)&&xl(t)===0&&(Xt(t,"b")||Xt(t,"body"))}const Hd=["b","body"];function Y1(t){return Pn(t,Hd)}const Wd=["c","cases"];function q1(t){return Pn(t,Wd,[])}const Ud=["s","static"];function K1(t){return Pn(t,Ud)}const Yd=["i","items"];function G1(t){return Pn(t,Yd,[])}const qd=["t","type"];function xl(t){return Pn(t,qd)}const Kd=["v","value"];function Wo(t,e){const n=Pn(t,Kd);if(n!=null)return n;throw Ii(e)}const Gd=["m","modifier"];function J1(t){return Pn(t,Gd)}const Jd=["k","key"];function Z1(t){const e=Pn(t,Jd);if(e)return e;throw Ii(6)}function Pn(t,e,n){for(let r=0;r<e.length;r++){const i=e[r];if(Xt(t,i)&&t[i]!=null)return t[i]}return n}const Zd=[...Hd,...Wd,...Ud,...Yd,...Jd,...Gd,...Kd,...qd];function Ii(t){return new Error(`unhandled node type: ${t}`)}const Rn=[];Rn[0]={w:[0],i:[3,0],"[":[4],o:[7]},Rn[1]={w:[1],".":[2],"[":[4],o:[7]},Rn[2]={w:[2],i:[3,0],0:[3,0]},Rn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Rn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Rn[5]={"'":[4,0],o:8,l:[5,0]},Rn[6]={'"':[4,0],o:8,l:[6,0]};const X1=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Q1(t){return X1.test(t)}function eb(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 tb(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 nb(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:Q1(e)?eb(e):"*"+e}function rb(t){const e=[];let n=-1,r=0,i=0,o,s,l,c,d,u,f;const h=[];h[0]=()=>{s===void 0?s=l:s+=l},h[1]=()=>{s!==void 0&&(e.push(s),s=void 0)},h[2]=()=>{h[0](),i++},h[3]=()=>{if(i>0)i--,r=4,h[0]();else{if(i=0,s===void 0||(s=nb(s),s===!1))return!1;h[1]()}};function p(){const m=t[n+1];if(r===5&&m==="'"||r===6&&m==='"')return n++,l="\\"+m,h[0](),!0}for(;r!==null;)if(n++,o=t[n],!(o==="\\"&&p())){if(c=tb(o),f=Rn[r],d=f[c]||f.l||8,d===8||(r=d[0],d[1]!==void 0&&(u=h[d[1]],u&&(l=o,u()===!1))))return;if(r===7)return e}}const Xd=new Map;function ib(t,e){return Te(t)?t[e]:null}function ob(t,e){if(!Te(t))return null;let n=Xd.get(e);if(n||(n=rb(e),n&&Xd.set(e,n)),!n)return null;const r=n.length;let i=t,o=0;for(;o<r;){const s=n[o];if(Zd.includes(s)&&en(i))return null;const l=i[s];if(l===void 0||Ve(i))return null;i=l,o++}return i}const sb=t=>t,lb=t=>"",ab="text",cb=t=>t.length===0?"":d1(t),db=c1;function Qd(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function ub(t){const e=Ge(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Ge(t.named.count)||Ge(t.named.n))?Ge(t.named.count)?t.named.count:Ge(t.named.n)?t.named.n:e:e}function fb(t,e){e.count||(e.count=t),e.n||(e.n=t)}function hb(t={}){const e=t.locale,n=ub(t),r=Te(t.pluralRules)&&oe(e)&&Ve(t.pluralRules[e])?t.pluralRules[e]:Qd,i=Te(t.pluralRules)&&oe(e)&&Ve(t.pluralRules[e])?Qd:void 0,o=k=>k[r(n,k.length,i)],s=t.list||[],l=k=>s[k],c=t.named||Le();Ge(t.pluralIndex)&&fb(n,c);const d=k=>c[k];function u(k){const x=Ve(t.messages)?t.messages(k):Te(t.messages)?t.messages[k]:!1;return x||(t.parent?t.parent.message(k):lb)}const f=k=>t.modifiers?t.modifiers[k]:sb,h=Se(t.processor)&&Ve(t.processor.normalize)?t.processor.normalize:cb,p=Se(t.processor)&&Ve(t.processor.interpolate)?t.processor.interpolate:db,m=Se(t.processor)&&oe(t.processor.type)?t.processor.type:ab,y={list:l,named:d,plural:o,linked:(k,...x)=>{const[w,b]=x;let S="text",v="";x.length===1?Te(w)?(v=w.modifier||v,S=w.type||S):oe(w)&&(v=w||v):x.length===2&&(oe(w)&&(v=w||v),oe(b)&&(S=b||S));const O=u(k)(y),B=S==="vnode"&&We(O)&&v?O[0]:O;return v?f(v)(B,S):B},message:u,type:m,interpolate:p,normalize:h,values:dt(Le(),s,c)};return y}let Vi=null;function pb(t){Vi=t}function mb(t,e,n){Vi&&Vi.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const gb=yb("function:translate");function yb(t){return e=>Vi&&Vi.emit(t,e)}const eu=Ho.__EXTEND_POINT__,pr=Ro(eu),yt={NOT_FOUND_KEY:eu,FALLBACK_TO_TRANSLATE:pr(),CANNOT_FORMAT_NUMBER:pr(),FALLBACK_TO_NUMBER_FORMAT:pr(),CANNOT_FORMAT_DATE:pr(),FALLBACK_TO_DATE_FORMAT:pr(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:pr(),__EXTEND_POINT__:pr()},bb={[yt.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[yt.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[yt.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[yt.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[yt.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[yt.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[yt.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 mr(t,...e){return wl(bb[t],...e)}const tu=ge.__EXTEND_POINT__,gr=Ro(tu),Je={INVALID_ARGUMENT:tu,INVALID_DATE_ARGUMENT:gr(),INVALID_ISO_DATE_ARGUMENT:gr(),NOT_SUPPORT_NON_STRING_MESSAGE:gr(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:gr(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:gr(),NOT_SUPPORT_LOCALE_TYPE:gr(),__EXTEND_POINT__:gr()};function sn(t){return Ur(t,null,process.env.NODE_ENV!=="production"?{messages:kb}:void 0)}const kb={[Je.INVALID_ARGUMENT]:"Invalid arguments",[Je.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[Je.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[Je.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[Je.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[Je.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[Je.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function El(t,e){return e.locale!=null?nu(e.locale):nu(t.locale)}let Cl;function nu(t){if(oe(t))return t;if(Ve(t)){if(t.resolvedOnce&&Cl!=null)return Cl;if(t.constructor.name==="Function"){const e=t();if(a1(e))throw sn(Je.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Cl=e}else throw sn(Je.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw sn(Je.NOT_SUPPORT_LOCALE_TYPE)}function wb(t,e,n){return[...new Set([n,...We(e)?e:Te(e)?Object.keys(e):oe(e)?[e]:[n]])]}function ru(t,e,n){const r=oe(n)?n:Pi,i=t;i.__localeChainCache||(i.__localeChainCache=new Map);let o=i.__localeChainCache.get(r);if(!o){o=[];let s=[n];for(;We(s);)s=iu(o,s,e);const l=We(e)||!Se(e)?e:e.default?e.default:null;s=oe(l)?[l]:l,We(s)&&iu(o,s,!1),i.__localeChainCache.set(r,o)}return o}function iu(t,e,n){let r=!0;for(let i=0;i<e.length&&Be(r);i++){const o=e[i];oe(o)&&(r=vb(t,e[i],n))}return r}function vb(t,e,n){let r;const i=e.split("-");do{const o=i.join("-");r=xb(t,o,n),i.splice(-1,1)}while(i.length&&r===!0);return r}function xb(t,e,n){let r=!1;if(!t.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const i=e.replace(/!/g,"");t.push(i),(We(n)||Se(n))&&n[i]&&(r=n[i])}return r}const Eb="9.14.4",Uo=-1,Pi="en-US",Yo="",ou=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function Cb(){return{upper:(t,e)=>e==="text"&&oe(t)?t.toUpperCase():e==="vnode"&&Te(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&oe(t)?t.toLowerCase():e==="vnode"&&Te(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&oe(t)?ou(t):e==="vnode"&&Te(t)&&"__v_isVNode"in t?ou(t.children):t}}let su;function lu(t){su=t}let au;function Sb(t){au=t}let cu;function _b(t){cu=t}let du=null;const Ob=t=>{du=t},Tb=()=>du;let uu=null;const fu=t=>{uu=t},Nb=()=>uu;let hu=0;function Mb(t={}){const e=Ve(t.onWarn)?t.onWarn:vn,n=oe(t.version)?t.version:Eb,r=oe(t.locale)||Ve(t.locale)?t.locale:Pi,i=Ve(r)?Pi:r,o=We(t.fallbackLocale)||Se(t.fallbackLocale)||oe(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:i,s=Se(t.messages)?t.messages:Sl(i),l=Se(t.datetimeFormats)?t.datetimeFormats:Sl(i),c=Se(t.numberFormats)?t.numberFormats:Sl(i),d=dt(Le(),t.modifiers,Cb()),u=t.pluralRules||Le(),f=Ve(t.missing)?t.missing:null,h=Be(t.missingWarn)||Wr(t.missingWarn)?t.missingWarn:!0,p=Be(t.fallbackWarn)||Wr(t.fallbackWarn)?t.fallbackWarn:!0,m=!!t.fallbackFormat,g=!!t.unresolving,y=Ve(t.postTranslation)?t.postTranslation:null,k=Se(t.processor)?t.processor:null,x=Be(t.warnHtmlMessage)?t.warnHtmlMessage:!0,w=!!t.escapeParameter,b=Ve(t.messageCompiler)?t.messageCompiler:su;process.env.NODE_ENV!=="production"&&Ve(t.messageCompiler)&&$d(mr(yt.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const S=Ve(t.messageResolver)?t.messageResolver:au||ib,v=Ve(t.localeFallbacker)?t.localeFallbacker:cu||wb,O=Te(t.fallbackContext)?t.fallbackContext:void 0,B=t,A=Te(B.__datetimeFormatters)?B.__datetimeFormatters:new Map,V=Te(B.__numberFormatters)?B.__numberFormatters:new Map,$=Te(B.__meta)?B.__meta:{};hu++;const L={version:n,cid:hu,locale:r,fallbackLocale:o,messages:s,modifiers:d,pluralRules:u,missing:f,missingWarn:h,fallbackWarn:p,fallbackFormat:m,unresolving:g,postTranslation:y,processor:k,warnHtmlMessage:x,escapeParameter:w,messageCompiler:b,messageResolver:S,localeFallbacker:v,fallbackContext:O,onWarn:e,__meta:$};return L.datetimeFormats=l,L.numberFormats=c,L.__datetimeFormatters=A,L.__numberFormatters=V,process.env.NODE_ENV!=="production"&&(L.__v_emitter=B.__v_emitter!=null?B.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&mb(L,n,$),L}const Sl=t=>({[t]:Le()});function qo(t,e){return t instanceof RegExp?t.test(e):t}function pu(t,e){return t instanceof RegExp?t.test(e):t}function _l(t,e,n,r,i){const{missing:o,onWarn:s}=t;if(process.env.NODE_ENV!=="production"){const l=t.__v_emitter;l&&l.emit("missing",{locale:n,key:e,type:i,groupId:`${i}:${e}`})}if(o!==null){const l=o(t,n,e,i);return oe(l)?l:e}else return process.env.NODE_ENV!=="production"&&pu(r,e)&&s(mr(yt.NOT_FOUND_KEY,{key:e,locale:n})),e}function Ri(t,e,n){const r=t;r.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function mu(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function Ab(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let r=n+1;r<e.length;r++)if(mu(t,e[r]))return!0;return!1}function Ol(t){return n=>Db(n,t)}function Db(t,e){const n=Y1(e);if(n==null)throw Ii(0);if(xl(n)===1){const o=q1(n);return t.plural(o.reduce((s,l)=>[...s,gu(t,l)],[]))}else return gu(t,n)}function gu(t,e){const n=K1(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const r=G1(e).reduce((i,o)=>[...i,Tl(t,o)],[]);return t.normalize(r)}}function Tl(t,e){const n=xl(e);switch(n){case 3:return Wo(e,n);case 9:return Wo(e,n);case 4:{const r=e;if(Xt(r,"k")&&r.k)return t.interpolate(t.named(r.k));if(Xt(r,"key")&&r.key)return t.interpolate(t.named(r.key));throw Ii(n)}case 5:{const r=e;if(Xt(r,"i")&&Ge(r.i))return t.interpolate(t.list(r.i));if(Xt(r,"index")&&Ge(r.index))return t.interpolate(t.list(r.index));throw Ii(n)}case 6:{const r=e,i=J1(r),o=Z1(r);return t.linked(Tl(t,o),i?Tl(t,i):void 0,t.type)}case 7:return Wo(e,n);case 8:return Wo(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Lb="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function yu(t,e){e&&v1(t)&&vn(wl(Lb,{source:t}))}const bu=t=>t;let Kr=Le();function ku(t){t.code===Ho.USE_MODULO_SYNTAX&&vn(`The use of named interpolation with modulo syntax is deprecated. It will be removed in v10.
20
+ */function U1(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(wn().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(wn().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(wn().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function en(t){return Te(t)&&xl(t)===0&&(Xt(t,"b")||Xt(t,"body"))}const Hd=["b","body"];function Y1(t){return Pn(t,Hd)}const Wd=["c","cases"];function q1(t){return Pn(t,Wd,[])}const Ud=["s","static"];function K1(t){return Pn(t,Ud)}const Yd=["i","items"];function G1(t){return Pn(t,Yd,[])}const qd=["t","type"];function xl(t){return Pn(t,qd)}const Kd=["v","value"];function Wo(t,e){const n=Pn(t,Kd);if(n!=null)return n;throw Ii(e)}const Gd=["m","modifier"];function J1(t){return Pn(t,Gd)}const Jd=["k","key"];function Z1(t){const e=Pn(t,Jd);if(e)return e;throw Ii(6)}function Pn(t,e,n){for(let r=0;r<e.length;r++){const i=e[r];if(Xt(t,i)&&t[i]!=null)return t[i]}return n}const Zd=[...Hd,...Wd,...Ud,...Yd,...Jd,...Gd,...Kd,...qd];function Ii(t){return new Error(`unhandled node type: ${t}`)}const Rn=[];Rn[0]={w:[0],i:[3,0],"[":[4],o:[7]},Rn[1]={w:[1],".":[2],"[":[4],o:[7]},Rn[2]={w:[2],i:[3,0],0:[3,0]},Rn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Rn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Rn[5]={"'":[4,0],o:8,l:[5,0]},Rn[6]={'"':[4,0],o:8,l:[6,0]};const X1=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Q1(t){return X1.test(t)}function eb(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 tb(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 nb(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:Q1(e)?eb(e):"*"+e}function rb(t){const e=[];let n=-1,r=0,i=0,o,s,l,c,d,u,f;const h=[];h[0]=()=>{s===void 0?s=l:s+=l},h[1]=()=>{s!==void 0&&(e.push(s),s=void 0)},h[2]=()=>{h[0](),i++},h[3]=()=>{if(i>0)i--,r=4,h[0]();else{if(i=0,s===void 0||(s=nb(s),s===!1))return!1;h[1]()}};function p(){const m=t[n+1];if(r===5&&m==="'"||r===6&&m==='"')return n++,l="\\"+m,h[0](),!0}for(;r!==null;)if(n++,o=t[n],!(o==="\\"&&p())){if(c=tb(o),f=Rn[r],d=f[c]||f.l||8,d===8||(r=d[0],d[1]!==void 0&&(u=h[d[1]],u&&(l=o,u()===!1))))return;if(r===7)return e}}const Xd=new Map;function ib(t,e){return Te(t)?t[e]:null}function ob(t,e){if(!Te(t))return null;let n=Xd.get(e);if(n||(n=rb(e),n&&Xd.set(e,n)),!n)return null;const r=n.length;let i=t,o=0;for(;o<r;){const s=n[o];if(Zd.includes(s)&&en(i))return null;const l=i[s];if(l===void 0||Ve(i))return null;i=l,o++}return i}const sb=t=>t,lb=t=>"",ab="text",cb=t=>t.length===0?"":d1(t),db=c1;function Qd(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function ub(t){const e=Ge(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(Ge(t.named.count)||Ge(t.named.n))?Ge(t.named.count)?t.named.count:Ge(t.named.n)?t.named.n:e:e}function fb(t,e){e.count||(e.count=t),e.n||(e.n=t)}function hb(t={}){const e=t.locale,n=ub(t),r=Te(t.pluralRules)&&oe(e)&&Ve(t.pluralRules[e])?t.pluralRules[e]:Qd,i=Te(t.pluralRules)&&oe(e)&&Ve(t.pluralRules[e])?Qd:void 0,o=k=>k[r(n,k.length,i)],s=t.list||[],l=k=>s[k],c=t.named||Le();Ge(t.pluralIndex)&&fb(n,c);const d=k=>c[k];function u(k){const x=Ve(t.messages)?t.messages(k):Te(t.messages)?t.messages[k]:!1;return x||(t.parent?t.parent.message(k):lb)}const f=k=>t.modifiers?t.modifiers[k]:sb,h=Se(t.processor)&&Ve(t.processor.normalize)?t.processor.normalize:cb,p=Se(t.processor)&&Ve(t.processor.interpolate)?t.processor.interpolate:db,m=Se(t.processor)&&oe(t.processor.type)?t.processor.type:ab,y={list:l,named:d,plural:o,linked:(k,...x)=>{const[w,b]=x;let S="text",v="";x.length===1?Te(w)?(v=w.modifier||v,S=w.type||S):oe(w)&&(v=w||v):x.length===2&&(oe(w)&&(v=w||v),oe(b)&&(S=b||S));const O=u(k)(y),B=S==="vnode"&&We(O)&&v?O[0]:O;return v?f(v)(B,S):B},message:u,type:m,interpolate:p,normalize:h,values:dt(Le(),s,c)};return y}let Vi=null;function pb(t){Vi=t}function mb(t,e,n){Vi&&Vi.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const gb=yb("function:translate");function yb(t){return e=>Vi&&Vi.emit(t,e)}const eu=Ho.__EXTEND_POINT__,pr=Ro(eu),yt={NOT_FOUND_KEY:eu,FALLBACK_TO_TRANSLATE:pr(),CANNOT_FORMAT_NUMBER:pr(),FALLBACK_TO_NUMBER_FORMAT:pr(),CANNOT_FORMAT_DATE:pr(),FALLBACK_TO_DATE_FORMAT:pr(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:pr(),__EXTEND_POINT__:pr()},bb={[yt.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[yt.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[yt.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[yt.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[yt.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[yt.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[yt.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 mr(t,...e){return wl(bb[t],...e)}const tu=ge.__EXTEND_POINT__,gr=Ro(tu),Je={INVALID_ARGUMENT:tu,INVALID_DATE_ARGUMENT:gr(),INVALID_ISO_DATE_ARGUMENT:gr(),NOT_SUPPORT_NON_STRING_MESSAGE:gr(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:gr(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:gr(),NOT_SUPPORT_LOCALE_TYPE:gr(),__EXTEND_POINT__:gr()};function sn(t){return Ur(t,null,process.env.NODE_ENV!=="production"?{messages:kb}:void 0)}const kb={[Je.INVALID_ARGUMENT]:"Invalid arguments",[Je.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[Je.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[Je.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[Je.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[Je.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[Je.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function El(t,e){return e.locale!=null?nu(e.locale):nu(t.locale)}let Cl;function nu(t){if(oe(t))return t;if(Ve(t)){if(t.resolvedOnce&&Cl!=null)return Cl;if(t.constructor.name==="Function"){const e=t();if(a1(e))throw sn(Je.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Cl=e}else throw sn(Je.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw sn(Je.NOT_SUPPORT_LOCALE_TYPE)}function wb(t,e,n){return[...new Set([n,...We(e)?e:Te(e)?Object.keys(e):oe(e)?[e]:[n]])]}function ru(t,e,n){const r=oe(n)?n:Pi,i=t;i.__localeChainCache||(i.__localeChainCache=new Map);let o=i.__localeChainCache.get(r);if(!o){o=[];let s=[n];for(;We(s);)s=iu(o,s,e);const l=We(e)||!Se(e)?e:e.default?e.default:null;s=oe(l)?[l]:l,We(s)&&iu(o,s,!1),i.__localeChainCache.set(r,o)}return o}function iu(t,e,n){let r=!0;for(let i=0;i<e.length&&Be(r);i++){const o=e[i];oe(o)&&(r=vb(t,e[i],n))}return r}function vb(t,e,n){let r;const i=e.split("-");do{const o=i.join("-");r=xb(t,o,n),i.splice(-1,1)}while(i.length&&r===!0);return r}function xb(t,e,n){let r=!1;if(!t.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const i=e.replace(/!/g,"");t.push(i),(We(n)||Se(n))&&n[i]&&(r=n[i])}return r}const Eb="9.14.4",Uo=-1,Pi="en-US",Yo="",ou=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function Cb(){return{upper:(t,e)=>e==="text"&&oe(t)?t.toUpperCase():e==="vnode"&&Te(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&oe(t)?t.toLowerCase():e==="vnode"&&Te(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&oe(t)?ou(t):e==="vnode"&&Te(t)&&"__v_isVNode"in t?ou(t.children):t}}let su;function lu(t){su=t}let au;function Sb(t){au=t}let cu;function _b(t){cu=t}let du=null;const Ob=t=>{du=t},Tb=()=>du;let uu=null;const fu=t=>{uu=t},Nb=()=>uu;let hu=0;function Mb(t={}){const e=Ve(t.onWarn)?t.onWarn:vn,n=oe(t.version)?t.version:Eb,r=oe(t.locale)||Ve(t.locale)?t.locale:Pi,i=Ve(r)?Pi:r,o=We(t.fallbackLocale)||Se(t.fallbackLocale)||oe(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:i,s=Se(t.messages)?t.messages:Sl(i),l=Se(t.datetimeFormats)?t.datetimeFormats:Sl(i),c=Se(t.numberFormats)?t.numberFormats:Sl(i),d=dt(Le(),t.modifiers,Cb()),u=t.pluralRules||Le(),f=Ve(t.missing)?t.missing:null,h=Be(t.missingWarn)||Wr(t.missingWarn)?t.missingWarn:!0,p=Be(t.fallbackWarn)||Wr(t.fallbackWarn)?t.fallbackWarn:!0,m=!!t.fallbackFormat,g=!!t.unresolving,y=Ve(t.postTranslation)?t.postTranslation:null,k=Se(t.processor)?t.processor:null,x=Be(t.warnHtmlMessage)?t.warnHtmlMessage:!0,w=!!t.escapeParameter,b=Ve(t.messageCompiler)?t.messageCompiler:su;process.env.NODE_ENV!=="production"&&Ve(t.messageCompiler)&&$d(mr(yt.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const S=Ve(t.messageResolver)?t.messageResolver:au||ib,v=Ve(t.localeFallbacker)?t.localeFallbacker:cu||wb,O=Te(t.fallbackContext)?t.fallbackContext:void 0,B=t,A=Te(B.__datetimeFormatters)?B.__datetimeFormatters:new Map,P=Te(B.__numberFormatters)?B.__numberFormatters:new Map,$=Te(B.__meta)?B.__meta:{};hu++;const L={version:n,cid:hu,locale:r,fallbackLocale:o,messages:s,modifiers:d,pluralRules:u,missing:f,missingWarn:h,fallbackWarn:p,fallbackFormat:m,unresolving:g,postTranslation:y,processor:k,warnHtmlMessage:x,escapeParameter:w,messageCompiler:b,messageResolver:S,localeFallbacker:v,fallbackContext:O,onWarn:e,__meta:$};return L.datetimeFormats=l,L.numberFormats=c,L.__datetimeFormatters=A,L.__numberFormatters=P,process.env.NODE_ENV!=="production"&&(L.__v_emitter=B.__v_emitter!=null?B.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&mb(L,n,$),L}const Sl=t=>({[t]:Le()});function qo(t,e){return t instanceof RegExp?t.test(e):t}function pu(t,e){return t instanceof RegExp?t.test(e):t}function _l(t,e,n,r,i){const{missing:o,onWarn:s}=t;if(process.env.NODE_ENV!=="production"){const l=t.__v_emitter;l&&l.emit("missing",{locale:n,key:e,type:i,groupId:`${i}:${e}`})}if(o!==null){const l=o(t,n,e,i);return oe(l)?l:e}else return process.env.NODE_ENV!=="production"&&pu(r,e)&&s(mr(yt.NOT_FOUND_KEY,{key:e,locale:n})),e}function Ri(t,e,n){const r=t;r.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function mu(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function Ab(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let r=n+1;r<e.length;r++)if(mu(t,e[r]))return!0;return!1}function Ol(t){return n=>Db(n,t)}function Db(t,e){const n=Y1(e);if(n==null)throw Ii(0);if(xl(n)===1){const o=q1(n);return t.plural(o.reduce((s,l)=>[...s,gu(t,l)],[]))}else return gu(t,n)}function gu(t,e){const n=K1(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const r=G1(e).reduce((i,o)=>[...i,Tl(t,o)],[]);return t.normalize(r)}}function Tl(t,e){const n=xl(e);switch(n){case 3:return Wo(e,n);case 9:return Wo(e,n);case 4:{const r=e;if(Xt(r,"k")&&r.k)return t.interpolate(t.named(r.k));if(Xt(r,"key")&&r.key)return t.interpolate(t.named(r.key));throw Ii(n)}case 5:{const r=e;if(Xt(r,"i")&&Ge(r.i))return t.interpolate(t.list(r.i));if(Xt(r,"index")&&Ge(r.index))return t.interpolate(t.list(r.index));throw Ii(n)}case 6:{const r=e,i=J1(r),o=Z1(r);return t.linked(Tl(t,o),i?Tl(t,i):void 0,t.type)}case 7:return Wo(e,n);case 8:return Wo(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const Lb="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function yu(t,e){e&&v1(t)&&vn(wl(Lb,{source:t}))}const bu=t=>t;let Kr=Le();function ku(t){t.code===Ho.USE_MODULO_SYNTAX&&vn(`The use of named interpolation with modulo syntax is deprecated. It will be removed in v10.
21
21
  reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format
22
- (message compiler warning message: ${t.message})`)}function wu(t,e={}){let n=!1;const r=e.onError||k1;return e.onError=i=>{n=!0,r(i)},{...W1(t,e),detectError:n}}const Bb=(t,e)=>{if(!oe(t))throw sn(Je.NOT_SUPPORT_NON_STRING_MESSAGE);process.env.NODE_ENV!=="production"&&(e.onWarn=ku);{const n=Be(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&yu(t,n);const i=(e.onCacheKey||bu)(t),o=Kr[i];if(o)return o;const{code:s,detectError:l}=wu(t,e),c=new Function(`return ${s}`)();return l?c:Kr[i]=c}};function $b(t,e){if(process.env.NODE_ENV!=="production"&&(e.onWarn=ku),__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&oe(t)){const n=Be(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&yu(t,n);const i=(e.onCacheKey||bu)(t),o=Kr[i];if(o)return o;const{ast:s,detectError:l}=wu(t,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),c=Ol(s);return l?c:Kr[i]=c}else{if(process.env.NODE_ENV!=="production"&&!en(t))return vn(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>t;const n=t.cacheKey;if(n){const r=Kr[n];return r||(Kr[n]=Ol(t))}else return Ol(t)}}const vu=()=>"",zt=t=>Ve(t);function xu(t,...e){const{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:o,fallbackLocale:s,messages:l}=t,[c,d]=Nl(...e),u=Be(d.missingWarn)?d.missingWarn:t.missingWarn,f=Be(d.fallbackWarn)?d.fallbackWarn:t.fallbackWarn,h=Be(d.escapeParameter)?d.escapeParameter:t.escapeParameter,p=!!d.resolvedMessage,m=oe(d.default)||Be(d.default)?Be(d.default)?o?c:()=>c:d.default:n?o?c:()=>c:"",g=n||m!=="",y=El(t,d);h&&Ib(d);let[k,x,w]=p?[c,y,l[y]||Le()]:Eu(t,c,y,s,f,u),b=k,S=c;if(!p&&!(oe(b)||en(b)||zt(b))&&g&&(b=m,S=b),!p&&(!(oe(b)||en(b)||zt(b))||!oe(x)))return i?Uo:c;if(process.env.NODE_ENV!=="production"&&oe(b)&&t.messageCompiler==null)return vn(`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 '${c}'.`),c;let v=!1;const O=()=>{v=!0},B=zt(b)?b:Cu(t,c,x,b,S,O);if(v)return b;const A=Fb(t,x,w,d),V=hb(A),$=Vb(t,B,V),L=r?r($,c):$;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const j={timestamp:Date.now(),key:oe(c)?c:zt(b)?b.key:"",locale:x||(zt(b)?b.locale:""),format:oe(b)?b:zt(b)?b.source:"",message:L};j.meta=dt({},t.__meta,Tb()||{}),gb(j)}return L}function Ib(t){We(t.list)?t.list=t.list.map(e=>oe(e)?Md(e):e):Te(t.named)&&Object.keys(t.named).forEach(e=>{oe(t.named[e])&&(t.named[e]=Md(t.named[e]))})}function Eu(t,e,n,r,i,o){const{messages:s,onWarn:l,messageResolver:c,localeFallbacker:d}=t,u=d(t,r,n);let f=Le(),h,p=null,m=n,g=null;const y="translate";for(let k=0;k<u.length;k++){if(h=g=u[k],process.env.NODE_ENV!=="production"&&n!==h&&!mu(n,h)&&qo(i,e)&&l(mr(yt.FALLBACK_TO_TRANSLATE,{key:e,target:h})),process.env.NODE_ENV!=="production"&&n!==h){const S=t.__v_emitter;S&&S.emit("fallback",{type:y,key:e,from:m,to:g,groupId:`${y}:${e}`})}f=s[h]||Le();let x=null,w,b;if(process.env.NODE_ENV!=="production"&&bn&&(x=window.performance.now(),w="intlify-message-resolve-start",b="intlify-message-resolve-end",Lt&&Lt(w)),(p=c(f,e))===null&&(p=f[e]),process.env.NODE_ENV!=="production"&&bn){const S=window.performance.now(),v=t.__v_emitter;v&&x&&p&&v.emit("message-resolve",{type:"message-resolve",key:e,message:p,time:S-x,groupId:`${y}:${e}`}),w&&b&&Lt&&hr&&(Lt(b),hr("intlify message resolve",w,b))}if(oe(p)||en(p)||zt(p))break;if(!Ab(h,u)){const S=_l(t,e,h,o,y);S!==e&&(p=S)}m=g}return[p,h,f]}function Cu(t,e,n,r,i,o){const{messageCompiler:s,warnHtmlMessage:l}=t;if(zt(r)){const h=r;return h.locale=h.locale||n,h.key=h.key||e,h}if(s==null){const h=()=>r;return h.locale=n,h.key=e,h}let c=null,d,u;process.env.NODE_ENV!=="production"&&bn&&(c=window.performance.now(),d="intlify-message-compilation-start",u="intlify-message-compilation-end",Lt&&Lt(d));const f=s(r,Pb(t,n,i,r,l,o));if(process.env.NODE_ENV!=="production"&&bn){const h=window.performance.now(),p=t.__v_emitter;p&&c&&p.emit("message-compilation",{type:"message-compilation",message:r,time:h-c,groupId:`translate:${e}`}),d&&u&&Lt&&hr&&(Lt(u),hr("intlify message compilation",d,u))}return f.locale=n,f.key=e,f.source=r,f}function Vb(t,e,n){let r=null,i,o;process.env.NODE_ENV!=="production"&&bn&&(r=window.performance.now(),i="intlify-message-evaluation-start",o="intlify-message-evaluation-end",Lt&&Lt(i));const s=e(n);if(process.env.NODE_ENV!=="production"&&bn){const l=window.performance.now(),c=t.__v_emitter;c&&r&&c.emit("message-evaluation",{type:"message-evaluation",value:s,time:l-r,groupId:`translate:${e.key}`}),i&&o&&Lt&&hr&&(Lt(o),hr("intlify message evaluation",i,o))}return s}function Nl(...t){const[e,n,r]=t,i=Le();if(!oe(e)&&!Ge(e)&&!zt(e)&&!en(e))throw sn(Je.INVALID_ARGUMENT);const o=Ge(e)?String(e):(zt(e),e);return Ge(n)?i.plural=n:oe(n)?i.default=n:Se(n)&&!Po(n)?i.named=n:We(n)&&(i.list=n),Ge(r)?i.plural=r:oe(r)?i.default=r:Se(r)&&dt(i,r),[o,i]}function Pb(t,e,n,r,i,o){return{locale:e,key:n,warnHtmlMessage:i,onError:s=>{if(o&&o(s),process.env.NODE_ENV!=="production"){const l=Rb(r),c=`Message compilation error: ${s.message}`,d=s.location&&l&&u1(l,s.location.start.offset,s.location.end.offset),u=t.__v_emitter;u&&l&&u.emit("compile-error",{message:l,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${n}`}),console.error(d?`${c}
23
- ${d}`:c)}else throw s},onCacheKey:s=>r1(e,n,s)}}function Rb(t){if(oe(t))return t;if(t.loc&&t.loc.source)return t.loc.source}function Fb(t,e,n,r){const{modifiers:i,pluralRules:o,messageResolver:s,fallbackLocale:l,fallbackWarn:c,missingWarn:d,fallbackContext:u}=t,h={locale:e,modifiers:i,pluralRules:o,messages:p=>{let m=s(n,p);if(m==null&&u){const[,,g]=Eu(u,p,e,l,c,d);m=s(g,p)}if(oe(m)||en(m)){let g=!1;const k=Cu(t,p,e,m,p,()=>{g=!0});return g?vu:k}else return zt(m)?m:vu}};return t.processor&&(h.processor=t.processor),r.list&&(h.list=r.list),r.named&&(h.named=r.named),Ge(r.plural)&&(h.pluralIndex=r.plural),h}const Su=typeof Intl<"u",_u={dateTimeFormat:Su&&typeof Intl.DateTimeFormat<"u",numberFormat:Su&&typeof Intl.NumberFormat<"u"};function Ou(t,...e){const{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:o,localeFallbacker:s}=t,{__datetimeFormatters:l}=t;if(process.env.NODE_ENV!=="production"&&!_u.dateTimeFormat)return o(mr(yt.CANNOT_FORMAT_DATE)),Yo;const[c,d,u,f]=Ml(...e),h=Be(u.missingWarn)?u.missingWarn:t.missingWarn,p=Be(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn,m=!!u.part,g=El(t,u),y=s(t,i,g);if(!oe(c)||c==="")return new Intl.DateTimeFormat(g,f).format(d);let k={},x,w=null,b=g,S=null;const v="datetime format";for(let A=0;A<y.length;A++){if(x=S=y[A],process.env.NODE_ENV!=="production"&&g!==x&&qo(p,c)&&o(mr(yt.FALLBACK_TO_DATE_FORMAT,{key:c,target:x})),process.env.NODE_ENV!=="production"&&g!==x){const V=t.__v_emitter;V&&V.emit("fallback",{type:v,key:c,from:b,to:S,groupId:`${v}:${c}`})}if(k=n[x]||{},w=k[c],Se(w))break;_l(t,c,x,h,v),b=S}if(!Se(w)||!oe(x))return r?Uo:c;let O=`${x}__${c}`;Po(f)||(O=`${O}__${JSON.stringify(f)}`);let B=l.get(O);return B||(B=new Intl.DateTimeFormat(x,dt({},w,f)),l.set(O,B)),m?B.formatToParts(d):B.format(d)}const Tu=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ml(...t){const[e,n,r,i]=t,o=Le();let s=Le(),l;if(oe(e)){const c=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw sn(Je.INVALID_ISO_DATE_ARGUMENT);const d=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();l=new Date(d);try{l.toISOString()}catch{throw sn(Je.INVALID_ISO_DATE_ARGUMENT)}}else if(o1(e)){if(isNaN(e.getTime()))throw sn(Je.INVALID_DATE_ARGUMENT);l=e}else if(Ge(e))l=e;else throw sn(Je.INVALID_ARGUMENT);return oe(n)?o.key=n:Se(n)&&Object.keys(n).forEach(c=>{Tu.includes(c)?s[c]=n[c]:o[c]=n[c]}),oe(r)?o.locale=r:Se(r)&&(s=r),Se(i)&&(s=i),[o.key||"",l,o,s]}function Nu(t,e,n){const r=t;for(const i in n){const o=`${e}__${i}`;r.__datetimeFormatters.has(o)&&r.__datetimeFormatters.delete(o)}}function Mu(t,...e){const{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:o,localeFallbacker:s}=t,{__numberFormatters:l}=t;if(process.env.NODE_ENV!=="production"&&!_u.numberFormat)return o(mr(yt.CANNOT_FORMAT_NUMBER)),Yo;const[c,d,u,f]=Al(...e),h=Be(u.missingWarn)?u.missingWarn:t.missingWarn,p=Be(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn,m=!!u.part,g=El(t,u),y=s(t,i,g);if(!oe(c)||c==="")return new Intl.NumberFormat(g,f).format(d);let k={},x,w=null,b=g,S=null;const v="number format";for(let A=0;A<y.length;A++){if(x=S=y[A],process.env.NODE_ENV!=="production"&&g!==x&&qo(p,c)&&o(mr(yt.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:x})),process.env.NODE_ENV!=="production"&&g!==x){const V=t.__v_emitter;V&&V.emit("fallback",{type:v,key:c,from:b,to:S,groupId:`${v}:${c}`})}if(k=n[x]||{},w=k[c],Se(w))break;_l(t,c,x,h,v),b=S}if(!Se(w)||!oe(x))return r?Uo:c;let O=`${x}__${c}`;Po(f)||(O=`${O}__${JSON.stringify(f)}`);let B=l.get(O);return B||(B=new Intl.NumberFormat(x,dt({},w,f)),l.set(O,B)),m?B.formatToParts(d):B.format(d)}const Au=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Al(...t){const[e,n,r,i]=t,o=Le();let s=Le();if(!Ge(e))throw sn(Je.INVALID_ARGUMENT);const l=e;return oe(n)?o.key=n:Se(n)&&Object.keys(n).forEach(c=>{Au.includes(c)?s[c]=n[c]:o[c]=n[c]}),oe(r)?o.locale=r:Se(r)&&(s=r),Se(i)&&(s=i),[o.key||"",l,o,s]}function Du(t,e,n){const r=t;for(const i in n){const o=`${e}__${i}`;r.__numberFormatters.has(o)&&r.__numberFormatters.delete(o)}}U1();/*!
22
+ (message compiler warning message: ${t.message})`)}function wu(t,e={}){let n=!1;const r=e.onError||k1;return e.onError=i=>{n=!0,r(i)},{...W1(t,e),detectError:n}}const Bb=(t,e)=>{if(!oe(t))throw sn(Je.NOT_SUPPORT_NON_STRING_MESSAGE);process.env.NODE_ENV!=="production"&&(e.onWarn=ku);{const n=Be(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&yu(t,n);const i=(e.onCacheKey||bu)(t),o=Kr[i];if(o)return o;const{code:s,detectError:l}=wu(t,e),c=new Function(`return ${s}`)();return l?c:Kr[i]=c}};function $b(t,e){if(process.env.NODE_ENV!=="production"&&(e.onWarn=ku),__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&oe(t)){const n=Be(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&yu(t,n);const i=(e.onCacheKey||bu)(t),o=Kr[i];if(o)return o;const{ast:s,detectError:l}=wu(t,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),c=Ol(s);return l?c:Kr[i]=c}else{if(process.env.NODE_ENV!=="production"&&!en(t))return vn(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>t;const n=t.cacheKey;if(n){const r=Kr[n];return r||(Kr[n]=Ol(t))}else return Ol(t)}}const vu=()=>"",zt=t=>Ve(t);function xu(t,...e){const{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:o,fallbackLocale:s,messages:l}=t,[c,d]=Nl(...e),u=Be(d.missingWarn)?d.missingWarn:t.missingWarn,f=Be(d.fallbackWarn)?d.fallbackWarn:t.fallbackWarn,h=Be(d.escapeParameter)?d.escapeParameter:t.escapeParameter,p=!!d.resolvedMessage,m=oe(d.default)||Be(d.default)?Be(d.default)?o?c:()=>c:d.default:n?o?c:()=>c:"",g=n||m!=="",y=El(t,d);h&&Ib(d);let[k,x,w]=p?[c,y,l[y]||Le()]:Eu(t,c,y,s,f,u),b=k,S=c;if(!p&&!(oe(b)||en(b)||zt(b))&&g&&(b=m,S=b),!p&&(!(oe(b)||en(b)||zt(b))||!oe(x)))return i?Uo:c;if(process.env.NODE_ENV!=="production"&&oe(b)&&t.messageCompiler==null)return vn(`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 '${c}'.`),c;let v=!1;const O=()=>{v=!0},B=zt(b)?b:Cu(t,c,x,b,S,O);if(v)return b;const A=Fb(t,x,w,d),P=hb(A),$=Vb(t,B,P),L=r?r($,c):$;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const j={timestamp:Date.now(),key:oe(c)?c:zt(b)?b.key:"",locale:x||(zt(b)?b.locale:""),format:oe(b)?b:zt(b)?b.source:"",message:L};j.meta=dt({},t.__meta,Tb()||{}),gb(j)}return L}function Ib(t){We(t.list)?t.list=t.list.map(e=>oe(e)?Md(e):e):Te(t.named)&&Object.keys(t.named).forEach(e=>{oe(t.named[e])&&(t.named[e]=Md(t.named[e]))})}function Eu(t,e,n,r,i,o){const{messages:s,onWarn:l,messageResolver:c,localeFallbacker:d}=t,u=d(t,r,n);let f=Le(),h,p=null,m=n,g=null;const y="translate";for(let k=0;k<u.length;k++){if(h=g=u[k],process.env.NODE_ENV!=="production"&&n!==h&&!mu(n,h)&&qo(i,e)&&l(mr(yt.FALLBACK_TO_TRANSLATE,{key:e,target:h})),process.env.NODE_ENV!=="production"&&n!==h){const S=t.__v_emitter;S&&S.emit("fallback",{type:y,key:e,from:m,to:g,groupId:`${y}:${e}`})}f=s[h]||Le();let x=null,w,b;if(process.env.NODE_ENV!=="production"&&bn&&(x=window.performance.now(),w="intlify-message-resolve-start",b="intlify-message-resolve-end",Lt&&Lt(w)),(p=c(f,e))===null&&(p=f[e]),process.env.NODE_ENV!=="production"&&bn){const S=window.performance.now(),v=t.__v_emitter;v&&x&&p&&v.emit("message-resolve",{type:"message-resolve",key:e,message:p,time:S-x,groupId:`${y}:${e}`}),w&&b&&Lt&&hr&&(Lt(b),hr("intlify message resolve",w,b))}if(oe(p)||en(p)||zt(p))break;if(!Ab(h,u)){const S=_l(t,e,h,o,y);S!==e&&(p=S)}m=g}return[p,h,f]}function Cu(t,e,n,r,i,o){const{messageCompiler:s,warnHtmlMessage:l}=t;if(zt(r)){const h=r;return h.locale=h.locale||n,h.key=h.key||e,h}if(s==null){const h=()=>r;return h.locale=n,h.key=e,h}let c=null,d,u;process.env.NODE_ENV!=="production"&&bn&&(c=window.performance.now(),d="intlify-message-compilation-start",u="intlify-message-compilation-end",Lt&&Lt(d));const f=s(r,Pb(t,n,i,r,l,o));if(process.env.NODE_ENV!=="production"&&bn){const h=window.performance.now(),p=t.__v_emitter;p&&c&&p.emit("message-compilation",{type:"message-compilation",message:r,time:h-c,groupId:`translate:${e}`}),d&&u&&Lt&&hr&&(Lt(u),hr("intlify message compilation",d,u))}return f.locale=n,f.key=e,f.source=r,f}function Vb(t,e,n){let r=null,i,o;process.env.NODE_ENV!=="production"&&bn&&(r=window.performance.now(),i="intlify-message-evaluation-start",o="intlify-message-evaluation-end",Lt&&Lt(i));const s=e(n);if(process.env.NODE_ENV!=="production"&&bn){const l=window.performance.now(),c=t.__v_emitter;c&&r&&c.emit("message-evaluation",{type:"message-evaluation",value:s,time:l-r,groupId:`translate:${e.key}`}),i&&o&&Lt&&hr&&(Lt(o),hr("intlify message evaluation",i,o))}return s}function Nl(...t){const[e,n,r]=t,i=Le();if(!oe(e)&&!Ge(e)&&!zt(e)&&!en(e))throw sn(Je.INVALID_ARGUMENT);const o=Ge(e)?String(e):(zt(e),e);return Ge(n)?i.plural=n:oe(n)?i.default=n:Se(n)&&!Po(n)?i.named=n:We(n)&&(i.list=n),Ge(r)?i.plural=r:oe(r)?i.default=r:Se(r)&&dt(i,r),[o,i]}function Pb(t,e,n,r,i,o){return{locale:e,key:n,warnHtmlMessage:i,onError:s=>{if(o&&o(s),process.env.NODE_ENV!=="production"){const l=Rb(r),c=`Message compilation error: ${s.message}`,d=s.location&&l&&u1(l,s.location.start.offset,s.location.end.offset),u=t.__v_emitter;u&&l&&u.emit("compile-error",{message:l,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${n}`}),console.error(d?`${c}
23
+ ${d}`:c)}else throw s},onCacheKey:s=>r1(e,n,s)}}function Rb(t){if(oe(t))return t;if(t.loc&&t.loc.source)return t.loc.source}function Fb(t,e,n,r){const{modifiers:i,pluralRules:o,messageResolver:s,fallbackLocale:l,fallbackWarn:c,missingWarn:d,fallbackContext:u}=t,h={locale:e,modifiers:i,pluralRules:o,messages:p=>{let m=s(n,p);if(m==null&&u){const[,,g]=Eu(u,p,e,l,c,d);m=s(g,p)}if(oe(m)||en(m)){let g=!1;const k=Cu(t,p,e,m,p,()=>{g=!0});return g?vu:k}else return zt(m)?m:vu}};return t.processor&&(h.processor=t.processor),r.list&&(h.list=r.list),r.named&&(h.named=r.named),Ge(r.plural)&&(h.pluralIndex=r.plural),h}const Su=typeof Intl<"u",_u={dateTimeFormat:Su&&typeof Intl.DateTimeFormat<"u",numberFormat:Su&&typeof Intl.NumberFormat<"u"};function Ou(t,...e){const{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:o,localeFallbacker:s}=t,{__datetimeFormatters:l}=t;if(process.env.NODE_ENV!=="production"&&!_u.dateTimeFormat)return o(mr(yt.CANNOT_FORMAT_DATE)),Yo;const[c,d,u,f]=Ml(...e),h=Be(u.missingWarn)?u.missingWarn:t.missingWarn,p=Be(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn,m=!!u.part,g=El(t,u),y=s(t,i,g);if(!oe(c)||c==="")return new Intl.DateTimeFormat(g,f).format(d);let k={},x,w=null,b=g,S=null;const v="datetime format";for(let A=0;A<y.length;A++){if(x=S=y[A],process.env.NODE_ENV!=="production"&&g!==x&&qo(p,c)&&o(mr(yt.FALLBACK_TO_DATE_FORMAT,{key:c,target:x})),process.env.NODE_ENV!=="production"&&g!==x){const P=t.__v_emitter;P&&P.emit("fallback",{type:v,key:c,from:b,to:S,groupId:`${v}:${c}`})}if(k=n[x]||{},w=k[c],Se(w))break;_l(t,c,x,h,v),b=S}if(!Se(w)||!oe(x))return r?Uo:c;let O=`${x}__${c}`;Po(f)||(O=`${O}__${JSON.stringify(f)}`);let B=l.get(O);return B||(B=new Intl.DateTimeFormat(x,dt({},w,f)),l.set(O,B)),m?B.formatToParts(d):B.format(d)}const Tu=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ml(...t){const[e,n,r,i]=t,o=Le();let s=Le(),l;if(oe(e)){const c=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!c)throw sn(Je.INVALID_ISO_DATE_ARGUMENT);const d=c[3]?c[3].trim().startsWith("T")?`${c[1].trim()}${c[3].trim()}`:`${c[1].trim()}T${c[3].trim()}`:c[1].trim();l=new Date(d);try{l.toISOString()}catch{throw sn(Je.INVALID_ISO_DATE_ARGUMENT)}}else if(o1(e)){if(isNaN(e.getTime()))throw sn(Je.INVALID_DATE_ARGUMENT);l=e}else if(Ge(e))l=e;else throw sn(Je.INVALID_ARGUMENT);return oe(n)?o.key=n:Se(n)&&Object.keys(n).forEach(c=>{Tu.includes(c)?s[c]=n[c]:o[c]=n[c]}),oe(r)?o.locale=r:Se(r)&&(s=r),Se(i)&&(s=i),[o.key||"",l,o,s]}function Nu(t,e,n){const r=t;for(const i in n){const o=`${e}__${i}`;r.__datetimeFormatters.has(o)&&r.__datetimeFormatters.delete(o)}}function Mu(t,...e){const{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:o,localeFallbacker:s}=t,{__numberFormatters:l}=t;if(process.env.NODE_ENV!=="production"&&!_u.numberFormat)return o(mr(yt.CANNOT_FORMAT_NUMBER)),Yo;const[c,d,u,f]=Al(...e),h=Be(u.missingWarn)?u.missingWarn:t.missingWarn,p=Be(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn,m=!!u.part,g=El(t,u),y=s(t,i,g);if(!oe(c)||c==="")return new Intl.NumberFormat(g,f).format(d);let k={},x,w=null,b=g,S=null;const v="number format";for(let A=0;A<y.length;A++){if(x=S=y[A],process.env.NODE_ENV!=="production"&&g!==x&&qo(p,c)&&o(mr(yt.FALLBACK_TO_NUMBER_FORMAT,{key:c,target:x})),process.env.NODE_ENV!=="production"&&g!==x){const P=t.__v_emitter;P&&P.emit("fallback",{type:v,key:c,from:b,to:S,groupId:`${v}:${c}`})}if(k=n[x]||{},w=k[c],Se(w))break;_l(t,c,x,h,v),b=S}if(!Se(w)||!oe(x))return r?Uo:c;let O=`${x}__${c}`;Po(f)||(O=`${O}__${JSON.stringify(f)}`);let B=l.get(O);return B||(B=new Intl.NumberFormat(x,dt({},w,f)),l.set(O,B)),m?B.formatToParts(d):B.format(d)}const Au=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Al(...t){const[e,n,r,i]=t,o=Le();let s=Le();if(!Ge(e))throw sn(Je.INVALID_ARGUMENT);const l=e;return oe(n)?o.key=n:Se(n)&&Object.keys(n).forEach(c=>{Au.includes(c)?s[c]=n[c]:o[c]=n[c]}),oe(r)?o.locale=r:Se(r)&&(s=r),Se(i)&&(s=i),[o.key||"",l,o,s]}function Du(t,e,n){const r=t;for(const i in n){const o=`${e}__${i}`;r.__numberFormatters.has(o)&&r.__numberFormatters.delete(o)}}U1();/*!
24
24
  * vue-i18n v9.14.4
25
25
  * (c) 2025 kazuya kawaguchi
26
26
  * Released under the MIT License.
27
- */const zb="9.14.4";function jb(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(wn().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(wn().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(wn().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(wn().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(wn().__INTLIFY_PROD_DEVTOOLS__=!1)}const Lu=yt.__EXTEND_POINT__,En=Ro(Lu),St={FALLBACK_TO_ROOT:Lu,NOT_SUPPORTED_PRESERVE:En(),NOT_SUPPORTED_FORMATTER:En(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:En(),NOT_SUPPORTED_GET_CHOICE_INDEX:En(),COMPONENT_NAME_LEGACY_COMPATIBLE:En(),NOT_FOUND_PARENT_SCOPE:En(),IGNORE_OBJ_FLATTEN:En(),NOTICE_DROP_ALLOW_COMPOSITION:En(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:En()},Hb={[St.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[St.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[St.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[St.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[St.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[St.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[St.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[St.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[St.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[St.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function Ko(t,...e){return wl(Hb[t],...e)}const Bu=Je.__EXTEND_POINT__,_t=Ro(Bu),Re={UNEXPECTED_RETURN_TYPE:Bu,INVALID_ARGUMENT:_t(),MUST_BE_CALL_SETUP_TOP:_t(),NOT_INSTALLED:_t(),NOT_AVAILABLE_IN_LEGACY_MODE:_t(),REQUIRED_VALUE:_t(),INVALID_VALUE:_t(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:_t(),NOT_INSTALLED_WITH_PROVIDE:_t(),UNEXPECTED_ERROR:_t(),NOT_COMPATIBLE_LEGACY_VUE_I18N:_t(),BRIDGE_SUPPORT_VUE_2_ONLY:_t(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:_t(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:_t(),__EXTEND_POINT__:_t()};function Fn(t,...e){return Ur(t,null,process.env.NODE_ENV!=="production"?{messages:Wb,args:e}:void 0)}const Wb={[Re.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Re.INVALID_ARGUMENT]:"Invalid argument",[Re.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Re.NOT_INSTALLED]:"Need to install with `app.use` function",[Re.UNEXPECTED_ERROR]:"Unexpected error",[Re.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[Re.REQUIRED_VALUE]:"Required in value: {0}",[Re.INVALID_VALUE]:"Invalid value",[Re.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Re.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Re.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Re.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[Re.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[Re.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Dl=kn("__translateVNode"),Ll=kn("__datetimeParts"),Bl=kn("__numberParts"),$l=kn("__enableEmitter"),Il=kn("__disableEmitter"),Ub=kn("__setPluralRules"),$u=kn("__injectWithOption"),Vl=kn("__dispose");function Fi(t){if(!Te(t)||en(t))return t;for(const e in t)if(Xt(t,e))if(!e.includes("."))Te(t[e])&&Fi(t[e]);else{const n=e.split("."),r=n.length-1;let i=t,o=!1;for(let s=0;s<r;s++){if(n[s]==="__proto__")throw new Error(`unsafe key: ${n[s]}`);if(n[s]in i||(i[n[s]]=Le()),!Te(i[n[s]])){process.env.NODE_ENV!=="production"&&vn(Ko(St.IGNORE_OBJ_FLATTEN,{key:n[s]})),o=!0;break}i=i[n[s]]}if(o||(en(i)?Zd.includes(n[r])||delete t[e]:(i[n[r]]=t[e],delete t[e])),!en(i)){const s=i[n[r]];Te(s)&&Fi(s)}}return t}function Pl(t,e){const{messages:n,__i18n:r,messageResolver:i,flatJson:o}=e,s=Se(n)?n:We(r)?Le():{[t]:Le()};if(We(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:c,resource:d}=l;c?(s[c]=s[c]||Le(),zo(d,s[c])):zo(d,s)}else oe(l)&&zo(JSON.parse(l),s)}),i==null&&o)for(const l in s)Xt(s,l)&&Fi(s[l]);return s}function Iu(t){return t.type}function Yb(t,e,n){let r=Te(e.messages)?e.messages:Le();"__i18nGlobal"in n&&(r=Pl(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(o=>{t.mergeLocaleMessage(o,r[o])});{if(Te(e.datetimeFormats)){const o=Object.keys(e.datetimeFormats);o.length&&o.forEach(s=>{t.mergeDateTimeFormat(s,e.datetimeFormats[s])})}if(Te(e.numberFormats)){const o=Object.keys(e.numberFormats);o.length&&o.forEach(s=>{t.mergeNumberFormat(s,e.numberFormats[s])})}}}function Vu(t){return a.createVNode(a.Text,null,t,0)}const Pu="__INTLIFY_META__",Ru=()=>[],qb=()=>!1;let Fu=0;function zu(t){return(e,n,r,i)=>t(n,r,a.getCurrentInstance()||void 0,i)}const Kb=()=>{const t=a.getCurrentInstance();let e=null;return t&&(e=Iu(t)[Pu])?{[Pu]:e}:null};function Gb(t={},e){const{__root:n,__injectWithOption:r}=t,i=n===void 0,o=t.flatJson,s=bn?a.ref:a.shallowRef,l=!!t.translateExistCompatible;process.env.NODE_ENV!=="production"&&l&&$d(Ko(St.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let c=Be(t.inheritLocale)?t.inheritLocale:!0;const d=s(n&&c?n.locale.value:oe(t.locale)?t.locale:Pi),u=s(n&&c?n.fallbackLocale.value:oe(t.fallbackLocale)||We(t.fallbackLocale)||Se(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:d.value),f=s(Pl(d.value,t)),h=s(Se(t.datetimeFormats)?t.datetimeFormats:{[d.value]:{}}),p=s(Se(t.numberFormats)?t.numberFormats:{[d.value]:{}});let m=n?n.missingWarn:Be(t.missingWarn)||Wr(t.missingWarn)?t.missingWarn:!0,g=n?n.fallbackWarn:Be(t.fallbackWarn)||Wr(t.fallbackWarn)?t.fallbackWarn:!0,y=n?n.fallbackRoot:Be(t.fallbackRoot)?t.fallbackRoot:!0,k=!!t.fallbackFormat,x=Ve(t.missing)?t.missing:null,w=Ve(t.missing)?zu(t.missing):null,b=Ve(t.postTranslation)?t.postTranslation:null,S=n?n.warnHtmlMessage:Be(t.warnHtmlMessage)?t.warnHtmlMessage:!0,v=!!t.escapeParameter;const O=n?n.modifiers:Se(t.modifiers)?t.modifiers:{};let B=t.pluralRules||n&&n.pluralRules,A;A=(()=>{i&&fu(null);const z={version:zb,locale:d.value,fallbackLocale:u.value,messages:f.value,modifiers:O,pluralRules:B,missing:w===null?void 0:w,missingWarn:m,fallbackWarn:g,fallbackFormat:k,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:S,escapeParameter:v,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};z.datetimeFormats=h.value,z.numberFormats=p.value,z.__datetimeFormatters=Se(A)?A.__datetimeFormatters:void 0,z.__numberFormatters=Se(A)?A.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(z.__v_emitter=Se(A)?A.__v_emitter:void 0);const Z=Mb(z);return i&&fu(Z),Z})(),Ri(A,d.value,u.value);function $(){return[d.value,u.value,f.value,h.value,p.value]}const L=a.computed({get:()=>d.value,set:z=>{d.value=z,A.locale=d.value}}),j=a.computed({get:()=>u.value,set:z=>{u.value=z,A.fallbackLocale=u.value,Ri(A,d.value,z)}}),F=a.computed(()=>f.value),D=a.computed(()=>h.value),C=a.computed(()=>p.value);function P(){return Ve(b)?b:null}function R(z){b=z,A.postTranslation=z}function Q(){return x}function ne(z){z!==null&&(w=zu(z)),x=z,A.missing=w}function he(z,Z){return z!=="translate"||!Z.resolvedMessage}const ue=(z,Z,T,M,Y,te)=>{$();let de;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,i||(A.fallbackContext=n?Nb():void 0),de=z(A)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,i||(A.fallbackContext=void 0)}if(T!=="translate exists"&&Ge(de)&&de===Uo||T==="translate exists"&&!de){const[N,X]=Z();if(process.env.NODE_ENV!=="production"&&n&&oe(N)&&he(T,X)&&(y&&(qo(g,N)||pu(m,N))&&vn(Ko(St.FALLBACK_TO_ROOT,{key:N,type:T})),process.env.NODE_ENV!=="production")){const{__v_emitter:ie}=A;ie&&y&&ie.emit("fallback",{type:T,key:N,to:"global",groupId:`${T}:${N}`})}return n&&y?M(n):Y(N)}else{if(te(de))return de;throw Fn(Re.UNEXPECTED_RETURN_TYPE)}};function I(...z){return ue(Z=>Reflect.apply(xu,null,[Z,...z]),()=>Nl(...z),"translate",Z=>Reflect.apply(Z.t,Z,[...z]),Z=>Z,Z=>oe(Z))}function W(...z){const[Z,T,M]=z;if(M&&!Te(M))throw Fn(Re.INVALID_ARGUMENT);return I(Z,T,dt({resolvedMessage:!0},M||{}))}function K(...z){return ue(Z=>Reflect.apply(Ou,null,[Z,...z]),()=>Ml(...z),"datetime format",Z=>Reflect.apply(Z.d,Z,[...z]),()=>Yo,Z=>oe(Z))}function q(...z){return ue(Z=>Reflect.apply(Mu,null,[Z,...z]),()=>Al(...z),"number format",Z=>Reflect.apply(Z.n,Z,[...z]),()=>Yo,Z=>oe(Z))}function H(z){return z.map(Z=>oe(Z)||Ge(Z)||Be(Z)?Vu(String(Z)):Z)}const ae={normalize:H,interpolate:z=>z,type:"vnode"};function we(...z){return ue(Z=>{let T;const M=Z;try{M.processor=ae,T=Reflect.apply(xu,null,[M,...z])}finally{M.processor=null}return T},()=>Nl(...z),"translate",Z=>Z[Dl](...z),Z=>[Vu(Z)],Z=>We(Z))}function Ne(...z){return ue(Z=>Reflect.apply(Mu,null,[Z,...z]),()=>Al(...z),"number format",Z=>Z[Bl](...z),Ru,Z=>oe(Z)||We(Z))}function Ie(...z){return ue(Z=>Reflect.apply(Ou,null,[Z,...z]),()=>Ml(...z),"datetime format",Z=>Z[Ll](...z),Ru,Z=>oe(Z)||We(Z))}function tt(z){B=z,A.pluralRules=B}function ee(z,Z){return ue(()=>{if(!z)return!1;const T=oe(Z)?Z:d.value,M=lt(T),Y=A.messageResolver(M,z);return l?Y!=null:en(Y)||zt(Y)||oe(Y)},()=>[z],"translate exists",T=>Reflect.apply(T.te,T,[z,Z]),qb,T=>Be(T))}function Ee(z){let Z=null;const T=ru(A,u.value,d.value);for(let M=0;M<T.length;M++){const Y=f.value[T[M]]||{},te=A.messageResolver(Y,z);if(te!=null){Z=te;break}}return Z}function At(z){const Z=Ee(z);return Z??(n?n.tm(z)||{}:{})}function lt(z){return f.value[z]||{}}function at(z,Z){if(o){const T={[z]:Z};for(const M in T)Xt(T,M)&&Fi(T[M]);Z=T[z]}f.value[z]=Z,A.messages=f.value}function pt(z,Z){f.value[z]=f.value[z]||{};const T={[z]:Z};if(o)for(const M in T)Xt(T,M)&&Fi(T[M]);Z=T[z],zo(Z,f.value[z]),A.messages=f.value}function E(z){return h.value[z]||{}}function _(z,Z){h.value[z]=Z,A.datetimeFormats=h.value,Nu(A,z,Z)}function U(z,Z){h.value[z]=dt(h.value[z]||{},Z),A.datetimeFormats=h.value,Nu(A,z,Z)}function se(z){return p.value[z]||{}}function Me(z,Z){p.value[z]=Z,A.numberFormats=p.value,Du(A,z,Z)}function _e(z,Z){p.value[z]=dt(p.value[z]||{},Z),A.numberFormats=p.value,Du(A,z,Z)}Fu++,n&&bn&&(a.watch(n.locale,z=>{c&&(d.value=z,A.locale=z,Ri(A,d.value,u.value))}),a.watch(n.fallbackLocale,z=>{c&&(u.value=z,A.fallbackLocale=z,Ri(A,d.value,u.value))}));const Oe={id:Fu,locale:L,fallbackLocale:j,get inheritLocale(){return c},set inheritLocale(z){c=z,z&&n&&(d.value=n.locale.value,u.value=n.fallbackLocale.value,Ri(A,d.value,u.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:F,get modifiers(){return O},get pluralRules(){return B||{}},get isGlobal(){return i},get missingWarn(){return m},set missingWarn(z){m=z,A.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(z){g=z,A.fallbackWarn=g},get fallbackRoot(){return y},set fallbackRoot(z){y=z},get fallbackFormat(){return k},set fallbackFormat(z){k=z,A.fallbackFormat=k},get warnHtmlMessage(){return S},set warnHtmlMessage(z){S=z,A.warnHtmlMessage=z},get escapeParameter(){return v},set escapeParameter(z){v=z,A.escapeParameter=z},t:I,getLocaleMessage:lt,setLocaleMessage:at,mergeLocaleMessage:pt,getPostTranslationHandler:P,setPostTranslationHandler:R,getMissingHandler:Q,setMissingHandler:ne,[Ub]:tt};return Oe.datetimeFormats=D,Oe.numberFormats=C,Oe.rt=W,Oe.te=ee,Oe.tm=At,Oe.d=K,Oe.n=q,Oe.getDateTimeFormat=E,Oe.setDateTimeFormat=_,Oe.mergeDateTimeFormat=U,Oe.getNumberFormat=se,Oe.setNumberFormat=Me,Oe.mergeNumberFormat=_e,Oe[$u]=r,Oe[Dl]=we,Oe[Ll]=Ie,Oe[Bl]=Ne,process.env.NODE_ENV!=="production"&&(Oe[$l]=z=>{A.__v_emitter=z},Oe[Il]=()=>{A.__v_emitter=void 0}),Oe}const Rl={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function Jb({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,i)=>[...r,...i.type===a.Fragment?i.children:[i]],[]):e.reduce((n,r)=>{const i=t[r];return i&&(n[r]=i()),n},Le())}function ju(t){return a.Fragment}dt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Ge(t)||!isNaN(t)}},Rl);function Zb(t){return We(t)&&!oe(t[0])}function Hu(t,e,n,r){const{slots:i,attrs:o}=e;return()=>{const s={part:!0};let l=Le();t.locale&&(s.locale=t.locale),oe(t.format)?s.key=t.format:Te(t.format)&&(oe(t.format.key)&&(s.key=t.format.key),l=Object.keys(t.format).reduce((h,p)=>n.includes(p)?dt(Le(),h,{[p]:t.format[p]}):h,Le()));const c=r(t.value,s,l);let d=[s.key];We(c)?d=c.map((h,p)=>{const m=i[h.type],g=m?m({[h.type]:h.value,index:p,parts:c}):[h.value];return Zb(g)&&(g[0].key=`${h.type}-${p}`),g}):oe(c)&&(d=[c]);const u=dt(Le(),o),f=oe(t.tag)||Te(t.tag)?t.tag:ju();return a.h(f,u,d)}}dt({value:{type:Number,required:!0},format:{type:[String,Object]}},Rl),dt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Rl);function Wu(t,e){}const Xb=kn("global-vue-i18n");function zn(t={}){const e=a.getCurrentInstance();if(e==null)throw Fn(Re.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Fn(Re.NOT_INSTALLED);const n=Qb(e),r=tk(n),i=Iu(e),o=ek(t,i);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!t.__useComponent){if(!n.allowComposition)throw Fn(Re.NOT_AVAILABLE_IN_LEGACY_MODE);return ok(e,o,r,t)}if(o==="global")return Yb(r,t,i),r;if(o==="parent"){let c=nk(n,e,t.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&vn(Ko(St.NOT_FOUND_PARENT_SCOPE)),c=r),c}const s=n;let l=s.__getInstance(e);if(l==null){const c=dt({},t);"__i18n"in i&&(c.__i18n=i.__i18n),r&&(c.__root=r),l=Gb(c),s.__composerExtend&&(l[Vl]=s.__composerExtend(l)),ik(s,e,l),s.__setInstance(e,l)}return l}function Qb(t){{const e=a.inject(t.isCE?Xb:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Fn(t.isCE?Re.NOT_INSTALLED_WITH_PROVIDE:Re.UNEXPECTED_ERROR);return e}}function ek(t,e){return Po(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function tk(t){return t.mode==="composition"?t.global:t.global.__composer}function nk(t,e,n=!1){let r=null;const i=e.root;let o=rk(e,n);for(;o!=null;){const s=t;if(t.mode==="composition")r=s.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const l=s.__getInstance(o);l!=null&&(r=l.__composer,n&&r&&!r[$u]&&(r=null))}if(r!=null||i===o)break;o=o.parent}return r}function rk(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function ik(t,e,n){let r=null;a.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=n,r=f1();const i=n;i[$l]&&i[$l](r),r.on("*",Wu)}},e),a.onUnmounted(()=>{const i=n;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",Wu),i[Il]&&i[Il](),delete e.vnode.el.__VUE_I18N__),t.__deleteInstance(e);const o=i[Vl];o&&(o(),delete i[Vl])},e)}function ok(t,e,n,r={}){const i=e==="local",o=a.shallowRef(null);if(i&&t.proxy&&!(t.proxy.$options.i18n||t.proxy.$options.__i18n))throw Fn(Re.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=Be(r.inheritLocale)?r.inheritLocale:!oe(r.locale),l=a.ref(!i||s?n.locale.value:oe(r.locale)?r.locale:Pi),c=a.ref(!i||s?n.fallbackLocale.value:oe(r.fallbackLocale)||We(r.fallbackLocale)||Se(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:l.value),d=a.ref(Pl(l.value,r)),u=a.ref(Se(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),f=a.ref(Se(r.numberFormats)?r.numberFormats:{[l.value]:{}}),h=i?n.missingWarn:Be(r.missingWarn)||Wr(r.missingWarn)?r.missingWarn:!0,p=i?n.fallbackWarn:Be(r.fallbackWarn)||Wr(r.fallbackWarn)?r.fallbackWarn:!0,m=i?n.fallbackRoot:Be(r.fallbackRoot)?r.fallbackRoot:!0,g=!!r.fallbackFormat,y=Ve(r.missing)?r.missing:null,k=Ve(r.postTranslation)?r.postTranslation:null,x=i?n.warnHtmlMessage:Be(r.warnHtmlMessage)?r.warnHtmlMessage:!0,w=!!r.escapeParameter,b=i?n.modifiers:Se(r.modifiers)?r.modifiers:{},S=r.pluralRules||i&&n.pluralRules;function v(){return[l.value,c.value,d.value,u.value,f.value]}const O=a.computed({get:()=>o.value?o.value.locale.value:l.value,set:ee=>{o.value&&(o.value.locale.value=ee),l.value=ee}}),B=a.computed({get:()=>o.value?o.value.fallbackLocale.value:c.value,set:ee=>{o.value&&(o.value.fallbackLocale.value=ee),c.value=ee}}),A=a.computed(()=>o.value?o.value.messages.value:d.value),V=a.computed(()=>u.value),$=a.computed(()=>f.value);function L(){return o.value?o.value.getPostTranslationHandler():k}function j(ee){o.value&&o.value.setPostTranslationHandler(ee)}function F(){return o.value?o.value.getMissingHandler():y}function D(ee){o.value&&o.value.setMissingHandler(ee)}function C(ee){return v(),ee()}function P(...ee){return o.value?C(()=>Reflect.apply(o.value.t,null,[...ee])):C(()=>"")}function R(...ee){return o.value?Reflect.apply(o.value.rt,null,[...ee]):""}function Q(...ee){return o.value?C(()=>Reflect.apply(o.value.d,null,[...ee])):C(()=>"")}function ne(...ee){return o.value?C(()=>Reflect.apply(o.value.n,null,[...ee])):C(()=>"")}function he(ee){return o.value?o.value.tm(ee):{}}function ue(ee,Ee){return o.value?o.value.te(ee,Ee):!1}function I(ee){return o.value?o.value.getLocaleMessage(ee):{}}function W(ee,Ee){o.value&&(o.value.setLocaleMessage(ee,Ee),d.value[ee]=Ee)}function K(ee,Ee){o.value&&o.value.mergeLocaleMessage(ee,Ee)}function q(ee){return o.value?o.value.getDateTimeFormat(ee):{}}function H(ee,Ee){o.value&&(o.value.setDateTimeFormat(ee,Ee),u.value[ee]=Ee)}function ce(ee,Ee){o.value&&o.value.mergeDateTimeFormat(ee,Ee)}function ae(ee){return o.value?o.value.getNumberFormat(ee):{}}function we(ee,Ee){o.value&&(o.value.setNumberFormat(ee,Ee),f.value[ee]=Ee)}function Ne(ee,Ee){o.value&&o.value.mergeNumberFormat(ee,Ee)}const Ie={get id(){return o.value?o.value.id:-1},locale:O,fallbackLocale:B,messages:A,datetimeFormats:V,numberFormats:$,get inheritLocale(){return o.value?o.value.inheritLocale:s},set inheritLocale(ee){o.value&&(o.value.inheritLocale=ee)},get availableLocales(){return o.value?o.value.availableLocales:Object.keys(d.value)},get modifiers(){return o.value?o.value.modifiers:b},get pluralRules(){return o.value?o.value.pluralRules:S},get isGlobal(){return o.value?o.value.isGlobal:!1},get missingWarn(){return o.value?o.value.missingWarn:h},set missingWarn(ee){o.value&&(o.value.missingWarn=ee)},get fallbackWarn(){return o.value?o.value.fallbackWarn:p},set fallbackWarn(ee){o.value&&(o.value.missingWarn=ee)},get fallbackRoot(){return o.value?o.value.fallbackRoot:m},set fallbackRoot(ee){o.value&&(o.value.fallbackRoot=ee)},get fallbackFormat(){return o.value?o.value.fallbackFormat:g},set fallbackFormat(ee){o.value&&(o.value.fallbackFormat=ee)},get warnHtmlMessage(){return o.value?o.value.warnHtmlMessage:x},set warnHtmlMessage(ee){o.value&&(o.value.warnHtmlMessage=ee)},get escapeParameter(){return o.value?o.value.escapeParameter:w},set escapeParameter(ee){o.value&&(o.value.escapeParameter=ee)},t:P,getPostTranslationHandler:L,setPostTranslationHandler:j,getMissingHandler:F,setMissingHandler:D,rt:R,d:Q,n:ne,tm:he,te:ue,getLocaleMessage:I,setLocaleMessage:W,mergeLocaleMessage:K,getDateTimeFormat:q,setDateTimeFormat:H,mergeDateTimeFormat:ce,getNumberFormat:ae,setNumberFormat:we,mergeNumberFormat:Ne};function tt(ee){ee.locale.value=l.value,ee.fallbackLocale.value=c.value,Object.keys(d.value).forEach(Ee=>{ee.mergeLocaleMessage(Ee,d.value[Ee])}),Object.keys(u.value).forEach(Ee=>{ee.mergeDateTimeFormat(Ee,u.value[Ee])}),Object.keys(f.value).forEach(Ee=>{ee.mergeNumberFormat(Ee,f.value[Ee])}),ee.escapeParameter=w,ee.fallbackFormat=g,ee.fallbackRoot=m,ee.fallbackWarn=p,ee.missingWarn=h,ee.warnHtmlMessage=x}return a.onBeforeMount(()=>{if(t.proxy==null||t.proxy.$i18n==null)throw Fn(Re.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const ee=o.value=t.proxy.$i18n.__composer;e==="global"?(l.value=ee.locale.value,c.value=ee.fallbackLocale.value,d.value=ee.messages.value,u.value=ee.datetimeFormats.value,f.value=ee.numberFormats.value):i&&tt(ee)}),Ie}if(jb(),__INTLIFY_JIT_COMPILATION__?lu($b):lu(Bb),Sb(ob),_b(ru),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=wn();t.__INTLIFY__=!0,pb(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const sk={},lk={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},ak=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)];function ck(t,e){return a.openBlock(),a.createElementBlock("svg",lk,ak)}const Uu=be(sk,[["render",ck]]),dk={},uk={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},fk=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"},null,-1)];function hk(t,e){return a.openBlock(),a.createElementBlock("svg",uk,fk)}const Fl=be(dk,[["render",hk]]),pk={key:0,class:"mb-2 wpic-form-label text-base text-gray-500 dark:text-gray-500 flex items-center justify-between"},mk={class:"flex items-center gap-2"},gk={key:0},yk={class:""},bk={class:"flex justify-end"},kk={key:0,class:"absolute dark:text-gray-400 left-0 ml-0 w-9 h-full flex items-center justify-center text-center"},wk={class:"flex items-center justify-center text-center opacity-50 w-4 h-4 leading-none overflow-hidden"},vk={key:1,class:"absolute right-0 mr-2 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},zi=Object.assign({name:"WpicFormInput"},{props:{label:String,info:String,disabled:Boolean,large:Boolean,small:Boolean,clearable:Boolean,loading:Boolean,invalid:Boolean,slim:Boolean,required:Boolean,hideRequired:Boolean,material:Boolean,naked:Boolean},emits:["onClear","update:modelValue"],setup(t,{emit:e}){const n={pmi:"shadow-inner border-zinc-400 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 bg-zinc-100 dark:bg-zinc-700/25 dark:border-zinc-700/50 dark:text-zinc-300","wpic-tools":"text-gray-800 bg-white border-gray-300 focus:border-lime-400 focus-within:border-lime-400 dark:bg-gray-930 dark:border-gray-920 dark:hover:bg-gray-920 dark:text-gray-400"},r={pmi:"border-opacity-50 border-zinc-300 text-zinc-400","wpic-tools":"border-gray-200! text-gray-400! dark:text-gray-800! bg-gray-50! dark:border-gray-900! dark:bg-gray-940!"},i=e;function o(){i("onClear")}return(s,l)=>(a.openBlock(),a.createElementBlock("div",null,[t.label?(a.openBlock(),a.createElementBlock("div",pk,[a.createElementVNode("div",mk,[a.createElementVNode("span",null,a.toDisplayString(t.label),1),t.required&&!t.hideRequired?(a.openBlock(),a.createElementBlock("span",gk,"*")):a.createCommentVNode("",!0),a.createElementVNode("div",yk,[t.info?(a.openBlock(),a.createBlock(fr,{key:0,hover:""},{content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.info),1)]),default:a.withCtx(()=>[a.createVNode(Fl,{class:"w-4 h-4 text-zinc-600"})]),_:1})):a.createCommentVNode("",!0)])]),a.createElementVNode("div",bk,[a.renderSlot(s.$slots,"more")])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["wpic-input overflow-auto leading-none flex relative items-center",{"border rounded-sm pr-3":!t.naked,"!pl-0 pr-1 !bg-transparent":t.naked,"border-b":t.material,"pl-4":!s.$slots.prepend,"pl-8":s.$slots.prepend,[`${n[a.unref(fe).theme]}`]:!0,"h-8 text-sm":t.small,"h-10":!t.large&&!t.small,"h-12":t.large,[`${r[a.unref(fe).theme]}`]:t.disabled,"cursor-pointer":!t.disabled,"border-red-600! focus-within:outline-red-600":t.invalid}])},[s.$slots.prepend?(a.openBlock(),a.createElementBlock("div",kk,[a.createElementVNode("div",wk,[a.renderSlot(s.$slots,"prepend")])])):a.createCommentVNode("",!0),a.renderSlot(s.$slots,"default"),t.loading?(a.openBlock(),a.createElementBlock("div",vk,[a.createVNode(Fr,{class:"w-6 h-6 opacity-50"})])):t.clearable?(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(o,["stop"]),style:{"z-index":"2"},class:"absolute right-0 mr-2 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode($i,{class:"w-5 h-5 opacity-50"})])):a.createCommentVNode("",!0)],2)]))}});var Yu=typeof global=="object"&&global&&global.Object===Object&&global,xk=typeof self=="object"&&self&&self.Object===Object&&self,ln=Yu||xk||Function("return this")(),Gr=ln.Symbol,qu=Object.prototype,Ek=qu.hasOwnProperty,Ck=qu.toString,ji=Gr?Gr.toStringTag:void 0;function Sk(t){var e=Ek.call(t,ji),n=t[ji];try{t[ji]=void 0;var r=!0}catch{}var i=Ck.call(t);return r&&(e?t[ji]=n:delete t[ji]),i}var _k=Object.prototype,Ok=_k.toString;function Tk(t){return Ok.call(t)}var Nk="[object Null]",Mk="[object Undefined]",Ku=Gr?Gr.toStringTag:void 0;function Jr(t){return t==null?t===void 0?Mk:Nk:Ku&&Ku in Object(t)?Sk(t):Tk(t)}function Zr(t){return t!=null&&typeof t=="object"}var Ak="[object Symbol]";function Dk(t){return typeof t=="symbol"||Zr(t)&&Jr(t)==Ak}var Go=Array.isArray,Lk=/\s/;function Bk(t){for(var e=t.length;e--&&Lk.test(t.charAt(e)););return e}var $k=/^\s+/;function Ik(t){return t&&t.slice(0,Bk(t)+1).replace($k,"")}function Hi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Gu=NaN,Vk=/^[-+]0x[0-9a-f]+$/i,Pk=/^0b[01]+$/i,Rk=/^0o[0-7]+$/i,Fk=parseInt;function Ju(t){if(typeof t=="number")return t;if(Dk(t))return Gu;if(Hi(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Hi(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ik(t);var n=Pk.test(t);return n||Rk.test(t)?Fk(t.slice(2),n?2:8):Vk.test(t)?Gu:+t}var zk="[object AsyncFunction]",jk="[object Function]",Hk="[object GeneratorFunction]",Wk="[object Proxy]";function Zu(t){if(!Hi(t))return!1;var e=Jr(t);return e==jk||e==Hk||e==zk||e==Wk}var zl=ln["__core-js_shared__"],Xu=function(){var t=/[^.]+$/.exec(zl&&zl.keys&&zl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Uk(t){return!!Xu&&Xu in t}var Yk=Function.prototype,qk=Yk.toString;function yr(t){if(t!=null){try{return qk.call(t)}catch{}try{return t+""}catch{}}return""}var Kk=/[\\^$.*+?()[\]{}|]/g,Gk=/^\[object .+?Constructor\]$/,Jk=Function.prototype,Zk=Object.prototype,Xk=Jk.toString,Qk=Zk.hasOwnProperty,e2=RegExp("^"+Xk.call(Qk).replace(Kk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function t2(t){if(!Hi(t)||Uk(t))return!1;var e=Zu(t)?e2:Gk;return e.test(yr(t))}function n2(t,e){return t==null?void 0:t[e]}function Xr(t,e){var n=n2(t,e);return t2(n)?n:void 0}var jl=Xr(ln,"WeakMap"),r2=9007199254740991,i2=/^(?:0|[1-9]\d*)$/;function o2(t,e){var n=typeof t;return e=e??r2,!!e&&(n=="number"||n!="symbol"&&i2.test(t))&&t>-1&&t%1==0&&t<e}function Qu(t,e){return t===e||t!==t&&e!==e}var s2=9007199254740991;function ef(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=s2}function l2(t){return t!=null&&ef(t.length)&&!Zu(t)}var a2=Object.prototype;function c2(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||a2;return t===n}function d2(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var u2="[object Arguments]";function tf(t){return Zr(t)&&Jr(t)==u2}var nf=Object.prototype,f2=nf.hasOwnProperty,h2=nf.propertyIsEnumerable,p2=tf(function(){return arguments}())?tf:function(t){return Zr(t)&&f2.call(t,"callee")&&!h2.call(t,"callee")};function m2(){return!1}var rf=typeof ct=="object"&&ct&&!ct.nodeType&&ct,of=rf&&typeof module=="object"&&module&&!module.nodeType&&module,g2=of&&of.exports===rf,sf=g2?ln.Buffer:void 0,y2=sf?sf.isBuffer:void 0,Hl=y2||m2,b2="[object Arguments]",k2="[object Array]",w2="[object Boolean]",v2="[object Date]",x2="[object Error]",E2="[object Function]",C2="[object Map]",S2="[object Number]",_2="[object Object]",O2="[object RegExp]",T2="[object Set]",N2="[object String]",M2="[object WeakMap]",A2="[object ArrayBuffer]",D2="[object DataView]",L2="[object Float32Array]",B2="[object Float64Array]",$2="[object Int8Array]",I2="[object Int16Array]",V2="[object Int32Array]",P2="[object Uint8Array]",R2="[object Uint8ClampedArray]",F2="[object Uint16Array]",z2="[object Uint32Array]",Pe={};Pe[L2]=Pe[B2]=Pe[$2]=Pe[I2]=Pe[V2]=Pe[P2]=Pe[R2]=Pe[F2]=Pe[z2]=!0,Pe[b2]=Pe[k2]=Pe[A2]=Pe[w2]=Pe[D2]=Pe[v2]=Pe[x2]=Pe[E2]=Pe[C2]=Pe[S2]=Pe[_2]=Pe[O2]=Pe[T2]=Pe[N2]=Pe[M2]=!1;function j2(t){return Zr(t)&&ef(t.length)&&!!Pe[Jr(t)]}function H2(t){return function(e){return t(e)}}var lf=typeof ct=="object"&&ct&&!ct.nodeType&&ct,Wi=lf&&typeof module=="object"&&module&&!module.nodeType&&module,W2=Wi&&Wi.exports===lf,Wl=W2&&Yu.process,af=function(){try{var t=Wi&&Wi.require&&Wi.require("util").types;return t||Wl&&Wl.binding&&Wl.binding("util")}catch{}}(),cf=af&&af.isTypedArray,df=cf?H2(cf):j2,U2=Object.prototype,Y2=U2.hasOwnProperty;function q2(t,e){var n=Go(t),r=!n&&p2(t),i=!n&&!r&&Hl(t),o=!n&&!r&&!i&&df(t),s=n||r||i||o,l=s?d2(t.length,String):[],c=l.length;for(var d in t)Y2.call(t,d)&&!(s&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||o2(d,c)))&&l.push(d);return l}function K2(t,e){return function(n){return t(e(n))}}var G2=K2(Object.keys,Object),J2=Object.prototype,Z2=J2.hasOwnProperty;function X2(t){if(!c2(t))return G2(t);var e=[];for(var n in Object(t))Z2.call(t,n)&&n!="constructor"&&e.push(n);return e}function Q2(t){return l2(t)?q2(t):X2(t)}var Ui=Xr(Object,"create");function ew(){this.__data__=Ui?Ui(null):{},this.size=0}function tw(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var nw="__lodash_hash_undefined__",rw=Object.prototype,iw=rw.hasOwnProperty;function ow(t){var e=this.__data__;if(Ui){var n=e[t];return n===nw?void 0:n}return iw.call(e,t)?e[t]:void 0}var sw=Object.prototype,lw=sw.hasOwnProperty;function aw(t){var e=this.__data__;return Ui?e[t]!==void 0:lw.call(e,t)}var cw="__lodash_hash_undefined__";function dw(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ui&&e===void 0?cw:e,this}function br(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}br.prototype.clear=ew,br.prototype.delete=tw,br.prototype.get=ow,br.prototype.has=aw,br.prototype.set=dw;function uw(){this.__data__=[],this.size=0}function Jo(t,e){for(var n=t.length;n--;)if(Qu(t[n][0],e))return n;return-1}var fw=Array.prototype,hw=fw.splice;function pw(t){var e=this.__data__,n=Jo(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():hw.call(e,n,1),--this.size,!0}function mw(t){var e=this.__data__,n=Jo(e,t);return n<0?void 0:e[n][1]}function gw(t){return Jo(this.__data__,t)>-1}function yw(t,e){var n=this.__data__,r=Jo(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Cn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Cn.prototype.clear=uw,Cn.prototype.delete=pw,Cn.prototype.get=mw,Cn.prototype.has=gw,Cn.prototype.set=yw;var Yi=Xr(ln,"Map");function bw(){this.size=0,this.__data__={hash:new br,map:new(Yi||Cn),string:new br}}function kw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Zo(t,e){var n=t.__data__;return kw(e)?n[typeof e=="string"?"string":"hash"]:n.map}function ww(t){var e=Zo(this,t).delete(t);return this.size-=e?1:0,e}function vw(t){return Zo(this,t).get(t)}function xw(t){return Zo(this,t).has(t)}function Ew(t,e){var n=Zo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function kr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}kr.prototype.clear=bw,kr.prototype.delete=ww,kr.prototype.get=vw,kr.prototype.has=xw,kr.prototype.set=Ew;function Cw(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Sw(){this.__data__=new Cn,this.size=0}function _w(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Ow(t){return this.__data__.get(t)}function Tw(t){return this.__data__.has(t)}var Nw=200;function Mw(t,e){var n=this.__data__;if(n instanceof Cn){var r=n.__data__;if(!Yi||r.length<Nw-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new kr(r)}return n.set(t,e),this.size=n.size,this}function jn(t){var e=this.__data__=new Cn(t);this.size=e.size}jn.prototype.clear=Sw,jn.prototype.delete=_w,jn.prototype.get=Ow,jn.prototype.has=Tw,jn.prototype.set=Mw;function Aw(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function Dw(){return[]}var Lw=Object.prototype,Bw=Lw.propertyIsEnumerable,uf=Object.getOwnPropertySymbols,$w=uf?function(t){return t==null?[]:(t=Object(t),Aw(uf(t),function(e){return Bw.call(t,e)}))}:Dw;function Iw(t,e,n){var r=e(t);return Go(t)?r:Cw(r,n(t))}function ff(t){return Iw(t,Q2,$w)}var Ul=Xr(ln,"DataView"),Yl=Xr(ln,"Promise"),ql=Xr(ln,"Set"),hf="[object Map]",Vw="[object Object]",pf="[object Promise]",mf="[object Set]",gf="[object WeakMap]",yf="[object DataView]",Pw=yr(Ul),Rw=yr(Yi),Fw=yr(Yl),zw=yr(ql),jw=yr(jl),Hn=Jr;(Ul&&Hn(new Ul(new ArrayBuffer(1)))!=yf||Yi&&Hn(new Yi)!=hf||Yl&&Hn(Yl.resolve())!=pf||ql&&Hn(new ql)!=mf||jl&&Hn(new jl)!=gf)&&(Hn=function(t){var e=Jr(t),n=e==Vw?t.constructor:void 0,r=n?yr(n):"";if(r)switch(r){case Pw:return yf;case Rw:return hf;case Fw:return pf;case zw:return mf;case jw:return gf}return e});var bf=ln.Uint8Array,Hw="__lodash_hash_undefined__";function Ww(t){return this.__data__.set(t,Hw),this}function Uw(t){return this.__data__.has(t)}function Xo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new kr;++e<n;)this.add(t[e])}Xo.prototype.add=Xo.prototype.push=Ww,Xo.prototype.has=Uw;function Yw(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function qw(t,e){return t.has(e)}var Kw=1,Gw=2;function kf(t,e,n,r,i,o){var s=n&Kw,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var d=o.get(t),u=o.get(e);if(d&&u)return d==e&&u==t;var f=-1,h=!0,p=n&Gw?new Xo:void 0;for(o.set(t,e),o.set(e,t);++f<l;){var m=t[f],g=e[f];if(r)var y=s?r(g,m,f,e,t,o):r(m,g,f,t,e,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!Yw(e,function(k,x){if(!qw(p,x)&&(m===k||i(m,k,n,r,o)))return p.push(x)})){h=!1;break}}else if(!(m===g||i(m,g,n,r,o))){h=!1;break}}return o.delete(t),o.delete(e),h}function Jw(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Zw(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Xw=1,Qw=2,ev="[object Boolean]",tv="[object Date]",nv="[object Error]",rv="[object Map]",iv="[object Number]",ov="[object RegExp]",sv="[object Set]",lv="[object String]",av="[object Symbol]",cv="[object ArrayBuffer]",dv="[object DataView]",wf=Gr?Gr.prototype:void 0,Kl=wf?wf.valueOf:void 0;function uv(t,e,n,r,i,o,s){switch(n){case dv:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case cv:return!(t.byteLength!=e.byteLength||!o(new bf(t),new bf(e)));case ev:case tv:case iv:return Qu(+t,+e);case nv:return t.name==e.name&&t.message==e.message;case ov:case lv:return t==e+"";case rv:var l=Jw;case sv:var c=r&Xw;if(l||(l=Zw),t.size!=e.size&&!c)return!1;var d=s.get(t);if(d)return d==e;r|=Qw,s.set(t,e);var u=kf(l(t),l(e),r,i,o,s);return s.delete(t),u;case av:if(Kl)return Kl.call(t)==Kl.call(e)}return!1}var fv=1,hv=Object.prototype,pv=hv.hasOwnProperty;function mv(t,e,n,r,i,o){var s=n&fv,l=ff(t),c=l.length,d=ff(e),u=d.length;if(c!=u&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in e:pv.call(e,h)))return!1}var p=o.get(t),m=o.get(e);if(p&&m)return p==e&&m==t;var g=!0;o.set(t,e),o.set(e,t);for(var y=s;++f<c;){h=l[f];var k=t[h],x=e[h];if(r)var w=s?r(x,k,h,e,t,o):r(k,x,h,t,e,o);if(!(w===void 0?k===x||i(k,x,n,r,o):w)){g=!1;break}y||(y=h=="constructor")}if(g&&!y){var b=t.constructor,S=e.constructor;b!=S&&"constructor"in t&&"constructor"in e&&!(typeof b=="function"&&b instanceof b&&typeof S=="function"&&S instanceof S)&&(g=!1)}return o.delete(t),o.delete(e),g}var gv=1,vf="[object Arguments]",xf="[object Array]",Qo="[object Object]",yv=Object.prototype,Ef=yv.hasOwnProperty;function bv(t,e,n,r,i,o){var s=Go(t),l=Go(e),c=s?xf:Hn(t),d=l?xf:Hn(e);c=c==vf?Qo:c,d=d==vf?Qo:d;var u=c==Qo,f=d==Qo,h=c==d;if(h&&Hl(t)){if(!Hl(e))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new jn),s||df(t)?kf(t,e,n,r,i,o):uv(t,e,c,n,r,i,o);if(!(n&gv)){var p=u&&Ef.call(t,"__wrapped__"),m=f&&Ef.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,y=m?e.value():e;return o||(o=new jn),i(g,y,n,r,o)}}return h?(o||(o=new jn),mv(t,e,n,r,i,o)):!1}function Cf(t,e,n,r,i){return t===e?!0:t==null||e==null||!Zr(t)&&!Zr(e)?t!==t&&e!==e:bv(t,e,n,r,Cf,i)}var Gl=function(){return ln.Date.now()},kv="Expected a function",wv=Math.max,vv=Math.min;function Jl(t,e,n){var r,i,o,s,l,c,d=0,u=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(kv);e=Ju(e)||0,Hi(n)&&(u=!!n.leading,f="maxWait"in n,o=f?wv(Ju(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function p(v){var O=r,B=i;return r=i=void 0,d=v,s=t.apply(B,O),s}function m(v){return d=v,l=setTimeout(k,e),u?p(v):s}function g(v){var O=v-c,B=v-d,A=e-O;return f?vv(A,o-B):A}function y(v){var O=v-c,B=v-d;return c===void 0||O>=e||O<0||f&&B>=o}function k(){var v=Gl();if(y(v))return x(v);l=setTimeout(k,g(v))}function x(v){return l=void 0,h&&r?p(v):(r=i=void 0,s)}function w(){l!==void 0&&clearTimeout(l),d=0,r=c=i=l=void 0}function b(){return l===void 0?s:x(Gl())}function S(){var v=Gl(),O=y(v);if(r=arguments,i=this,c=v,O){if(l===void 0)return m(c);if(f)return clearTimeout(l),l=setTimeout(k,e),p(c)}return l===void 0&&(l=setTimeout(k,e)),s}return S.cancel=w,S.flush=b,S}function qi(t,e){return Cf(t,e)}const xv={},Ev={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Cv=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"},null,-1)];function Sv(t,e){return a.openBlock(),a.createElementBlock("svg",Ev,Cv)}const _v=be(xv,[["render",Sv]]),Ov={key:0,class:"leading-none"},Tv={key:1},Nv={key:0,class:"p-3 sticky top-0 z-[1] bg-white dark:bg-gray-930"},Mv={key:1},Av={key:0,class:"z-0 px-4 py-2 flex items-center justify-between text-sm gap-6 dark:text-gray-400"},Dv=["onClick"],Lv={class:"select-none flex w-full items-center justify-between"},Bv={class:"flex-1"},$v={key:0,class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400 text-center"},Iv={key:1,class:"px-4 py-2 text-sm text-gray-400 text-center"},Sf=Object.assign({name:"WpicChoiceList"},{props:{modelValue:{},value:{},name:String,small:Boolean,hideSelect:Boolean,label:String,placeholder:{type:String,default:"Select..."},options:Array,multiple:Boolean,required:Boolean,disabled:Boolean,isInvalid:Boolean,maxDisplay:{type:Number},batchSelect:{type:Boolean,default:!1},allSelectedText:String,filterable:Boolean,remoteMethod:{},noDataText:String,clearable:Boolean,debounce:{type:Number,default:0},loading:Boolean,material:Boolean,naked:Boolean,hideChevron:Boolean,summaryText:String,oneLine:Boolean,total:{type:Number,default:null},groupSelected:{type:Boolean,default:!1}},emits:["blur-sm","input","change","update:modelValue"],setup(t,{expose:e,emit:n}){const r=t,{t:i}=zn(),o=a.computed(()=>r.placeholder==="Select..."?i("wpiccomponents.placeholder_select"):r.placeholder),s=a.ref(!1),l=a.ref(r.options);a.watch(()=>r.options,()=>{const j=[...(Array.isArray(r.modelValue)?r.modelValue:r.modelValue!==null&&r.modelValue!==void 0?[r.modelValue]:[]).map(F=>l.value.find(D=>qi(D.value,F))||r.options.find(D=>qi(D.value,F))).filter(Boolean)];for(const F of r.options)j.some(D=>qi(D.value,F.value))||j.push(F);l.value=j},{immediate:!0,deep:!0});const c=n,d=a.ref(),u=a.ref();function f($){var L,j;if(r.multiple){if($){let F=r.modelValue||[];F.indexOf($)>=0?F.splice(F.indexOf($),1):F.push($),c("update:modelValue",F),g(F),((L=r.modelValue)==null?void 0:L.length)===((j=r.options)==null?void 0:j.length)?s.value=!0:s.value=!1}}else c("update:modelValue",$),g($),d.value=null,u.value.hide()}async function h($){var L,j;c("update:modelValue",$),g($),await a.nextTick(),((L=r.modelValue)==null?void 0:L.length)===((j=r.options)==null?void 0:j.length)&&(s.value=!0)}function p($){c("update:modelValue",$),s.value=!1,g($)}function m(){s.value=!1,r.multiple?(c("update:modelValue",[]),g([])):(c("update:modelValue",null),g(null))}const g=Jl(function($){c("change",$)},r.debounce),y=a.computed(()=>{var $,L,j;if(r.multiple){const F=(($=l.value)==null?void 0:$.filter(D=>{var C;return(C=r.modelValue)==null?void 0:C.includes(D.value)}))||[];if(r.summaryText&&F.length){const D=i(r.summaryText,F.length);return i("wpiccomponents.summary_items",{count:F.length,type:D})}if(r.maxDisplay){const D=F.slice(0,r.maxDisplay);return F.length-D.length>0?`${D.map(C=>C.label).join(", ")} (+${F.length-D.length})`:D.map(C=>C.label).join(", ")}else return F.map(D=>D.label).join(", ")}else return((j=(L=l.value)==null?void 0:L.find(F=>F.value===r.modelValue))==null?void 0:j.label)||r.modelValue});function k($){var L;try{return r.multiple?r.modelValue!==null&&((L=r.modelValue)==null?void 0:L.some(j=>qi(j,$))):r.modelValue!==null&&qi($,r.modelValue)}catch(j){return console.log(j),!1}}const x={pmi:"group-[.is-selected]:bg-violet-50 hover:group-[.is-selected]:bg-violet-100","wpic-tools":"hover:bg-gray-50 group-[.is-selected]:text-gray-800 group-[.is-selected]:font-semibold text-gray-600 dark:hover:bg-white/5 dark:text-gray-400 dark:group-[.is-selected]:text-white"},w=a.computed(()=>{var $,L;return(($=r.modelValue)==null?void 0:$.length)===((L=r.options)==null?void 0:L.length)}),b=a.computed(()=>{var C;const $=l.value||[];let L=$;if(r.filterable&&!r.remoteMethod&&((C=d.value)!=null&&C.trim().length)){const P=d.value.trim().toLowerCase();L=$.filter(R=>{var Q;return(Q=R.label)==null?void 0:Q.toLowerCase().includes(P)})}if(!r.groupSelected||!r.multiple)return L;const j=r.modelValue||[],F=L.filter(P=>j.includes(P.value)),D=L.filter(P=>!j.includes(P.value));return[...F,...D]});function S(){v.value=1,r.remoteMethod&&(O.value=!0,V(d.value,v.value,()=>{O.value=!1}))}const v=a.ref(1),O=a.ref(!1),B=a.computed(()=>{var $;return r.total!==void 0&&(($=r.options)==null?void 0:$.length)>=r.total});function A($){const L=$.target;L.scrollTop+L.clientHeight>=L.scrollHeight-30&&!O.value&&!B.value&&(O.value=!0,v.value+=1,V(d.value,v.value,()=>{O.value=!1}))}const V=Jl(($,L,j)=>{r.remoteMethod($,L).finally(()=>{j==null||j()})},r.debounce||300);return e({allSelected:s,isAllSelected:w}),($,L)=>(a.openBlock(),a.createBlock(fr,{custom:"",ref_key:"myPopover",ref:u,label:t.label,disabled:t.disabled},{default:a.withCtx(({isHidden:j})=>[a.createVNode(zi,{material:t.material,naked:t.naked,disabled:t.disabled,small:t.small,invalid:t.isInvalid,loading:t.loading},{default:a.withCtx(()=>{var F,D,C,P,R,Q;return[a.createElementVNode("span",{class:a.normalizeClass(["select-none w-full text-left flex-1",{"whitespace-pre":!t.multiple}])},[t.modelValue&&(!t.multiple||t.multiple&&((F=t.modelValue)==null?void 0:F.length)>0)&&!t.hideSelect?(a.openBlock(),a.createElementBlock("span",Ov,[w.value&&((D=t.allSelectedText)!=null&&D.length)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(a.toDisplayString(t.allSelectedText)+" ("+a.toDisplayString((C=t.options)==null?void 0:C.length)+")",1)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(y.value),1)],64))])):!t.multiple&&((P=t.options)!=null&&P.find(ne=>ne.value===null))?(a.openBlock(),a.createElementBlock("span",Tv,a.toDisplayString((Q=(R=t.options)==null?void 0:R.find(ne=>ne.value===null))==null?void 0:Q.label),1)):a.renderSlot($.$slots,"default",{key:2},()=>[a.createTextVNode(a.toDisplayString(o.value),1)])],2),t.modelValue&&t.clearable?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:a.withModifiers(m,["stop"]),style:{"z-index":"2"},class:"absolute right-6 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode($i,{class:"w-4 h-4"})])):a.createCommentVNode("",!0),!t.hideChevron&&!t.loading?(a.openBlock(),a.createBlock(_v,{key:1,class:"h-5 w-5 -mr-[2px]"})):a.createCommentVNode("",!0)]}),_:3},8,["material","naked","disabled","small","invalid","loading"])]),content:a.withCtx(()=>{var j,F;return[a.createElementVNode("div",{class:"flex flex-col max-h-80 overflow-y-auto",onScrollPassive:A},[t.filterable?(a.openBlock(),a.createElementBlock("div",Nv,[a.createVNode(Nf,{slim:"",placeholder:$.$t("wpiccomponents.placeholder_search"),clearable:"",modelValue:d.value,"onUpdate:modelValue":[L[0]||(L[0]=D=>d.value=D),S]},null,8,["placeholder","modelValue"])])):a.createCommentVNode("",!0),!t.options&&((j=t.options)==null?void 0:j.length)==0?(a.openBlock(),a.createElementBlock("span",Mv,"No data.")):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[t.multiple&&t.batchSelect?(a.openBlock(),a.createElementBlock("div",Av,[a.createElementVNode("span",{class:"cursor-pointer opacity-50 hover:opacity-100",onClick:L[1]||(L[1]=D=>{var C;return h((C=b.value)==null?void 0:C.filter(P=>P.value).map(P=>P.value))})},a.toDisplayString($.$t("wpiccomponents.select_all")),1),a.createElementVNode("span",{class:"cursor-pointer opacity-50 hover:opacity-100",onClick:L[2]||(L[2]=D=>p([]))},a.toDisplayString($.$t("wpiccomponents.select_none")),1)])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,D=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["group",{"is-selected":!!k(D.value)}])},[a.createElementVNode("div",{class:a.normalizeClass(["flex items-center py-2 px-4 min-w-64 text-base",{"cursor-pointer":!t.multiple||D.value,[`${x[a.unref(fe).theme]}`]:!0}]),onClick:C=>D.disabled?null:f(D.value)},[a.createElementVNode("div",Lv,[a.createElementVNode("div",Bv,[a.createElementVNode("div",{class:a.normalizeClass(["",{"opacity-25":D.disabled,"line-clamp-1":t.oneLine}])},a.toDisplayString(D.label||D.value),3),D.description?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["text-xs opacity-50 font-normal!",{"opacity-10":D.disabled}])},a.toDisplayString(D.description),3)):a.createCommentVNode("",!0)]),t.multiple&&k(D.value)?(a.openBlock(),a.createBlock(Uu,{key:0,class:"w-4 h-4"})):a.createCommentVNode("",!0)])],10,Dv)],2))),256)),r.remoteMethod?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[O.value?(a.openBlock(),a.createElementBlock("div",$v,a.toDisplayString($.$t("wpiccomponents.loading_more")),1)):B.value&&((F=t.options)==null?void 0:F.length)>0?(a.openBlock(),a.createElementBlock("div",Iv,a.toDisplayString($.$t("wpiccomponents.no_more_results")),1)):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)],64))],32)]}),_:3},8,["label","disabled"]))}}),_f=Object.assign({name:"WpicToggleSwitch"},{props:{modelValue:Boolean,label:String,disabled:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e;function i(){n.disabled||r("update:modelValue",!n.modelValue)}return(o,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["inline-flex items-center gap-3 select-none",{"opacity-50":t.disabled,"cursor-pointer":!t.disabled}]),onClick:i},[a.createElementVNode("div",{class:a.normalizeClass(["w-11 h-6 rounded-full shadow-inner flex items-center transition-all duration-100",{"bg-lime-500 dark:bg-lime-600":t.modelValue,"bg-gray-300 dark:bg-gray-800":!t.modelValue}])},[a.createElementVNode("div",{class:a.normalizeClass(["w-5 h-5 rounded-full bg-white dark:bg-gray-500 shadow-md transition-all duration-100 transform",{"translate-x-[calc(100%+3px)] dark:!bg-gray-200":t.modelValue,"translate-x-px":!t.modelValue}])},null,2)],2),a.createElementVNode("span",{class:a.normalizeClass({"text-gray-500":!t.modelValue,"text-gray-700 dark:text-gray-300":t.modelValue})},a.toDisplayString(t.label),3)],2))}}),Vv={key:0,class:"mb-2 gap-2 wpic-form-label text-base text-zinc-600 dark:text-zinc-300 flex items-center"},Pv={class:""},Rv=["value","disabled","rows","placeholder"],Of=Object.assign({name:"WpicTextarea"},{props:{modelValue:{},label:String,disabled:Boolean,noResize:Boolean,autoResize:Boolean,placeholder:String,isInvalid:Boolean,required:Boolean,minHeight:{type:[String,Number],default:50},maxHeight:{type:[String,Number],default:300},rows:{type:[String,Number],default:3}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const r=t,i=a.ref(null),o=a.ref(!1);a.watch(()=>r.modelValue,d=>{i.value.style.height="auto",r.autoResize&&a.nextTick(()=>{r.minHeight&&(i.value.style.height=`${i.value.scrollHeight<r.minHeight?r.minHeight:i.value.scrollHeight}px`),r.maxHeight&&(i.value.scrollHeight>r.maxHeight?(i.value.style.height=`${r.maxHeight}px`,o.value=!0):o.value=!1)})},{deep:!0});const s=n;function l(d){s("update:modelValue",d==null?void 0:d.target.value)}function c(){i.value.focus()}return e({focus:c}),(d,u)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[t.label?(a.openBlock(),a.createElementBlock("div",Vv,[a.createTextVNode(a.toDisplayString(t.label)+" ",1),a.createElementVNode("div",Pv,[d.info?(a.openBlock(),a.createBlock(fr,{key:0,hover:""},{content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(d.info),1)]),default:a.withCtx(()=>[a.createVNode(Fl,{class:"w-4 h-4 text-zinc-600"})]),_:1})):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),a.createElementVNode("textarea",{ref_key:"myTextarea",ref:i,class:a.normalizeClass(["relative appearance-none outline-hidden flex w-full h-full rounded-sm px-4 py-2 bg-transparent opacity-100 active:border-lime-400 focus:border-lime-400 focus-visible:border-none placeholder:opacity-30 dark:text-gray-400",{"cursor-not-allowed":t.disabled,"resize-none":t.noResize,"overflow-hidden":t.autoResize&&!o.value,"overflow-auto":t.autoResize||o.value}]),style:a.normalizeStyle({"min-height":t.autoResize&&`${t.minHeight}px`,maxHeight:t.autoResize&&`${t.maxHeight}px`}),value:t.modelValue,disabled:t.disabled,rows:t.rows,onInput:l,placeholder:t.placeholder},null,46,Rv)],64))}}),Fv=["placeholder"],Tf={__name:"ColorPicker",props:{modelValue:String,defaultColor:{type:String},loading:Boolean,material:Boolean,naked:Boolean,isInvalid:Boolean,placeholder:String,disabled:Boolean,small:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=a.ref(n.modelValue||n.defaultColor),o=()=>{r("update:modelValue",i.value)};return a.watch(()=>n.modelValue,s=>{s!==i.value&&(i.value=s)}),(s,l)=>(a.openBlock(),a.createBlock(zi,{material:t.material,naked:t.naked,disabled:t.disabled,small:t.small,invalid:t.isInvalid,loading:t.loading},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("input",{type:"color","onUpdate:modelValue":l[0]||(l[0]=c=>i.value=c),onInput:o,class:"w-6 h-6 !rounded-md cursor-pointer outline-hidden appearance-none"},null,544),[[a.vModelText,i.value]]),a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":l[1]||(l[1]=c=>i.value=c),onInput:o,class:"w-full p-2 outline-hidden appearance-none",placeholder:t.placeholder},null,40,Fv),[[a.vModelText,i.value]])]),_:1},8,["material","naked","disabled","small","invalid","loading"]))}},zv={},jv={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},Hv=[a.createElementVNode("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"},null,-1),a.createElementVNode("path",{"fill-rule":"evenodd",d:"M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z","clip-rule":"evenodd"},null,-1)];function Wv(t,e){return a.openBlock(),a.createElementBlock("svg",jv,Hv)}const Uv=be(zv,[["render",Wv]]),Yv={},qv={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},Kv=[a.createElementVNode("path",{d:"M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z"},null,-1),a.createElementVNode("path",{d:"M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z"},null,-1),a.createElementVNode("path",{d:"M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z"},null,-1)];function Gv(t,e){return a.openBlock(),a.createElementBlock("svg",qv,Kv)}const Jv=be(Yv,[["render",Gv]]),Zv={},Xv={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},Qv=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 12h-15"},null,-1)];function ex(t,e){return a.openBlock(),a.createElementBlock("svg",Xv,Qv)}const tx=be(Zv,[["render",ex]]),nx={class:"flex items-center gap-2"},rx={key:0},ix={class:""},ox=["innerHTML"],sx={class:"flex justify-end"},lx=["name","value","checked"],ax={class:"flex items-center justify-center text-center opacity-50 w-4 h-4 leading-none"},cx={key:5,class:"absolute z-10 right-0 mr-3 h-full flex items-center"},dx={class:"min-w-5 h-5 leading-tight cursor-pointer dark:text-gray-400"},ux={key:7,class:"text-red-700 dark:text-red-400/90 mt-1 text-base"},Nf=Object.assign({name:"WpicFormField"},{props:{label:{type:[String,Number]},placeholder:String,name:{type:String,default:null},select:Boolean,checkbox:Boolean,radio:Boolean,textarea:Boolean,rules:{},type:{type:String,default:"text"},tag:{type:String,default:null},options:{type:Array},required:Boolean,email:Boolean,multiple:Boolean,slim:Boolean,error:{type:Boolean,default:!0},clearable:Boolean,modelValue:{},checkboxValue:{},uncheckedValue:{},radioValue:{},disabled:Boolean,debounce:{type:Number,default:0},loading:Boolean,password:Boolean,addLabel:{type:String,default:"Add"},help:String,labelName:Boolean,half:Boolean,hideSelect:Boolean,date:Boolean,range:Boolean,rows:{type:[String,Number],default:3},transparent:Boolean,loadingPercent:{type:Number,default:null},loadingPulse:{type:Boolean,default:!1},blur:{type:Boolean,default:!1},large:Boolean,noResize:Boolean,autoResize:Boolean,minHeight:{type:[String,Number],default:50},maxHeight:{type:[String,Number],default:300},hideFocus:Boolean,min:{type:[String,Number],default:-1/0},max:{type:[String,Number],default:1/0},info:{type:String},small:Boolean,maxDisplay:{type:Number},filterable:Boolean,remoteMethod:{},noDataText:String,batchSelect:{type:Boolean,default:!1},allSelectedText:String,hideRequired:Boolean,material:Boolean,naked:Boolean,toggleSwitch:Boolean,color:Boolean,summaryText:String,oneLine:Boolean,total:Number},emits:["onChange","update:modelValue","onClear"],setup(t,{expose:e,emit:n}){const r={pmi:"shadow-inner border-zinc-400 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 bg-zinc-100 dark:bg-zinc-700/25 dark:border-zinc-700/50 dark:text-zinc-300","wpic-tools":"text-gray-800 disabled:text-gray-400 disabled:border-gray-200 bg-white border-gray-300 dark:bg-gray-930 dark:border-gray-920 focus-within:border-lime-400 dark:focus-within:bg-gray-920 disabled:bg-gray-50"},i={pmi:"rounded-xs group-[.is-active]:border-zinc-400 group-[.is-selected]:bg-violet-800 group-[.is-selected]:border-violet-800 group-[.is-selected]:text-white group-[.is-disabled]:bg-opacity-50 group-[.is-disabled]:border-opacity-50 group-[.is-disabled]:text-opacity-75","wpic-tools":"rounded-sm group-[.is-active]:border-gray-300 dark:group-[.is-active]:bg-gray-950 dark:group-[.is-active]:border-gray-800 group-[.is-selected]:bg-lime-600 group-[.is-selected]:border-lime-600 group-[.is-selected]:text-white dark:group-[.is-disabled]:border-gray-800/50 group-[.is-disabled]:!text-gray-300 group-[.is-disabled]:!border-gray-100 group-[.is-disabled]:!bg-gray-100 dark:group-[.is-disabled]:!border-gray-900 dark:group-[.is-disabled]:!text-gray-700 dark:group-[.is-disabled]:!bg-gray-900"},o=t,s=a.computed(()=>o.name?o.name:kl()),l=Y0(s.value),c=a.computed(()=>{if(o.label)return o.label;if(o.name&&o.labelName)return`${o.name}#${o.labelName}`}),d=a.ref(!0),u=a.computed(()=>(o.type=="password"||o.password)&&d.value?"password":o.type);function f(){d.value=!d.value}const h=a.computed(()=>{var V;if(o.rules&&typeof o.rules=="string"){let $=(V=o.rules)==null?void 0:V.split("|");return o.required&&$.push("required"),o.email&&$.push("email"),$.join("|")}else if(!o.rules){let $=[];return o.required&&$.push("required"),o.email&&$.push("email"),$.join("|")}return"required"});function p(V){let $=V&&V.target?V.target.value:V;x($)}const m=n;function g(V){V===!0||V===!1?m("update:modelValue",!V):m("update:modelValue",V)}function y(V){let $=V&&V.target?V.target.value:V;m("update:modelValue",$),m("onChange",$)}function k(){m("update:modelValue",null),m("onChange",null),m("onClear")}const x=Jl(function(V){m("update:modelValue",V),m("onChange",V)},o.debounce),w=a.ref(null),b=a.ref();function S(){var V,$;o.textarea?(V=b.value)==null||V.focus():($=w.value)==null||$.$el.focus()}function v(){return w.value.meta.valid}const O=a.ref(),B=a.computed(()=>O.value.allSelected),A=a.computed(()=>O.value.isAllSelected);return e({focus:S,isValid:v,allSelected:B,isAllSelected:A}),(V,$)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["wpic-form-field",{"mb-6":!t.slim}])},[c.value&&!t.checkbox&&!t.radio&&!t.toggleSwitch?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass([{"text-sm":t.small,"text-base":!t.small},"mb-2 wpic-form-label text-gray-500 dark:text-gray-500 flex items-center justify-between"])},[a.createElementVNode("div",nx,[a.createElementVNode("span",null,a.toDisplayString(c.value),1),t.required&&!t.hideRequired?(a.openBlock(),a.createElementBlock("span",rx,"*")):a.createCommentVNode("",!0),a.createElementVNode("div",ix,[t.info?(a.openBlock(),a.createBlock(fr,{key:0,hover:""},{content:a.withCtx(()=>[a.createElementVNode("div",{class:"whitespace-break-spaces",innerHTML:t.info},null,8,ox)]),default:a.withCtx(()=>[a.createVNode(Fl,{class:"w-4 h-4 text-zinc-600"})]),_:1})):a.createCommentVNode("",!0)])]),a.createElementVNode("div",sx,[a.renderSlot(V.$slots,"more")])],2)):a.createCommentVNode("",!0),t.checkbox?(a.openBlock(),a.createBlock(a.unref(cr),{key:1,ref_key:"myInput",ref:w,name:s.value,rules:h.value,value:t.checkboxValue,"unchecked-value":t.uncheckedValue,modelValue:t.modelValue},{default:a.withCtx(({field:L})=>[a.createElementVNode("div",{class:a.normalizeClass(["inline-flex group items-center gap-2",{"is-disabled":t.disabled,"is-active":!t.disabled&&!t.modelValue,"is-selected":t.modelValue===!0}]),onClick:$[0]||($[0]=j=>t.disabled?void 0:g(t.modelValue))},[a.createElementVNode("div",{class:a.normalizeClass(["w-4 h-4 border dark:border-gray-800 cursor-pointer",{[`${i[a.unref(fe).theme]}`]:!0}])},[t.modelValue===!0?(a.openBlock(),a.createBlock(Uu,{key:0})):a.createCommentVNode("",!0)],2),a.createElementVNode("span",{class:a.normalizeClass(["text-base cursor-pointer select-none text-gray-600 dark:text-gray-500",{"!text-gray-500/50 dark:text-gray-700/50":t.disabled}])},[a.renderSlot(V.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(c.value),1)])],2)],2)]),_:3},8,["name","rules","value","unchecked-value","modelValue"])):t.radio?(a.openBlock(),a.createBlock(a.unref(cr),{key:2,ref_key:"myInput",ref:w,name:s.value,value:t.radioValue,modelValue:t.modelValue},{default:a.withCtx(({field:L})=>[a.createElementVNode("div",{onClick:$[2]||($[2]=()=>{t.disabled||y(t.radioValue)}),class:a.normalizeClass([{"cursor-pointer":!t.disabled},"inline-flex items-center gap-2 select-none"])},[a.createElementVNode("span",{class:a.normalizeClass(["h-4 w-4 border border-zinc-400 rounded-full p-[2px]",{"border-opacity-50":t.disabled}])},[t.radioValue==t.modelValue?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["flex rounded-full h-full w-full bg-violet-800",{"bg-opacity-50":t.disabled}])},null,2)):a.createCommentVNode("",!0)],2),a.createElementVNode("input",{class:"hidden",type:"radio",name:t.name,value:t.radioValue,onChange:$[1]||($[1]=(...j)=>V.onChange&&V.onChange(...j)),checked:t.radioValue==t.modelValue},null,40,lx),c.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["text-base",{"opacity-50":t.disabled}])},a.toDisplayString(c.value),3)):a.createCommentVNode("",!0)],2)]),_:1},8,["name","value","modelValue"])):t.select?(a.openBlock(),a.createBlock(a.unref(cr),{key:3,ref_key:"myInput",ref:w,modelValue:t.modelValue,rules:h.value,name:s.value},{default:a.withCtx(({field:L})=>{var j;return[a.createVNode(Sf,{ref_key:"myChoiceList",ref:O,modelValue:t.modelValue,"onUpdate:modelValue":y,disabled:t.disabled,options:t.options,small:t.small,oneLine:t.oneLine,clearable:t.clearable,hideSelect:t.hideSelect,"remote-method":t.remoteMethod,multiple:t.multiple,filterable:t.filterable,maxDisplay:t.maxDisplay,batchSelect:t.batchSelect,allSelectedText:t.allSelectedText,summaryText:t.summaryText,debounce:t.debounce,total:t.total,isInvalid:!!(t.error&&a.unref(l)),required:t.required||((j=h.value)==null?void 0:j.indexOf("required"))>=0,label:c.value,placeholder:t.placeholder,loading:t.loading,material:t.material,naked:t.naked},null,8,["modelValue","disabled","options","small","oneLine","clearable","hideSelect","remote-method","multiple","filterable","maxDisplay","batchSelect","allSelectedText","summaryText","debounce","total","isInvalid","required","label","placeholder","loading","material","naked"])]}),_:1},8,["modelValue","rules","name"])):t.color?(a.openBlock(),a.createBlock(a.unref(cr),{key:4,ref_key:"myInput",ref:w,modelValue:t.modelValue,rules:h.value,name:s.value},{default:a.withCtx(({field:L})=>[a.createVNode(Tf,{placeholder:t.placeholder,modelValue:t.modelValue,"onUpdate:modelValue":y},null,8,["placeholder","modelValue"])]),_:1},8,["modelValue","rules","name"])):t.toggleSwitch?(a.openBlock(),a.createBlock(a.unref(cr),{key:5,ref_key:"myInput",ref:w,modelValue:t.modelValue,rules:h.value,name:s.value},{default:a.withCtx(({field:L})=>[a.createVNode(_f,{modelValue:t.modelValue,"onUpdate:modelValue":y,label:c.value,disabled:t.disabled},null,8,["modelValue","label","disabled"])]),_:1},8,["modelValue","rules","name"])):(a.openBlock(),a.createElementBlock("div",{key:6,class:a.normalizeClass(["wpic-input flex relative",{"rounded-sm border":!t.naked,"border-b":t.material,"!bg-transparent":t.naked,[`${r[a.unref(fe).theme]}`]:!0,"bg-transparent!":t.transparent,"h-10":!t.textarea&&!t.large,"h-12":!t.textarea&&t.large,"border-gray-200! bg-gray-50! dark:bg-gray-940! dark:border-gray-900! text-gray-400 dark:text-gray-800":t.disabled,"border-red-600! focus-within:outline-red-600 dark:border-red-400/70!":a.unref(l)}])},[V.$slots.prepend?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["absolute dark:text-gray-400 left-0 ml-0 w-9 h-full flex items-center text-center",{"justify-center":!t.naked}])},[a.createElementVNode("div",ax,[a.renderSlot(V.$slots,"prepend")])],2)):a.createCommentVNode("",!0),t.textarea?(a.openBlock(),a.createBlock(a.unref(cr),{key:1,ref_key:"myInput",ref:w,modelValue:t.modelValue,rules:h.value,name:s.value},{default:a.withCtx(()=>{var L;return[a.createVNode(Of,{ref_key:"myTextarea",ref:b,modelValue:t.modelValue,"onUpdate:modelValue":p,rows:t.rows,disabled:t.disabled,noResize:t.noResize,autoResize:t.autoResize,placeholder:t.placeholder,minHeight:t.minHeight,maxHeight:t.maxHeight,isInvalid:!!(t.error&&a.unref(l)),required:t.required||((L=h.value)==null?void 0:L.indexOf("required"))>=0},null,8,["modelValue","rows","disabled","noResize","autoResize","placeholder","minHeight","maxHeight","isInvalid","required"])]}),_:1},8,["modelValue","rules","name"])):(a.openBlock(),a.createBlock(a.unref(cr),{key:2,ref_key:"myInput",ref:w,autocomplete:"off",style:{"z-index":"1"},class:a.normalizeClass(["flex w-full h-full rounded-sm pr-4 bg-transparent outline-hidden appearance-none dark:text-gray-400 dark:placeholder:text-gray-700",{"pl-4":!V.$slots.prepend&&!t.naked,"pl-8":V.$slots.prepend&&!t.naked,"pl-6":V.$slots.prepend&&t.naked,"py-2":t.textarea,"text-sm":t.small,"cursor-not-allowed dark:placeholder:text-gray-800!":t.disabled}]),type:u.value,min:t.min,max:t.max,rows:t.rows,name:s.value,disabled:t.disabled,modelValue:t.modelValue,onInput:p,"no-data-text":t.noDataText,placeholder:t.placeholder,validateOnInput:!!a.unref(l),rules:h.value},null,8,["class","type","min","max","rows","name","disabled","modelValue","no-data-text","placeholder","validateOnInput","rules"])),t.loading?(a.openBlock(),a.createElementBlock("div",{key:3,onClick:a.withModifiers(k,["stop"]),class:"absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode(Fr,{class:"w-6 h-6 opacity-50"})])):t.clearable&&t.modelValue?(a.openBlock(),a.createElementBlock("div",{key:4,onClick:a.withModifiers(k,["stop"]),style:{"z-index":"2"},class:"absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode($i,{class:"w-5 h-5 opacity-50"})])):a.createCommentVNode("",!0),V.$slots.append||t.password||t.type=="password"?(a.openBlock(),a.createElementBlock("div",cx,[a.createElementVNode("div",dx,[a.renderSlot(V.$slots,"append",{},()=>[a.withDirectives(a.createVNode(Uv,{class:"text-zinc-600 select-none",onClick:f},null,512),[[a.vShow,d.value]]),a.withDirectives(a.createVNode(Jv,{class:"text-zinc-600 select-none",onClick:f},null,512),[[a.vShow,!d.value]])])])])):a.createCommentVNode("",!0)],2)),t.error&&a.unref(l)?(a.openBlock(),a.createElementBlock("div",ux,[a.createVNode(a.unref(U0),{name:s.value},{default:a.withCtx(L=>[a.createTextVNode(a.toDisplayString(L.message),1)]),_:1},8,["name"])])):a.createCommentVNode("",!0),V.$slots.help||t.help?(a.openBlock(),a.createElementBlock("div",{key:8,class:a.normalizeClass(["text-base mt-1",{"ml-7":t.type=="checkbox","opacity-50":t.disabled}])},[a.renderSlot(V.$slots,"help",{},()=>[a.createTextVNode(a.toDisplayString(t.help),1)])],2)):a.createCommentVNode("",!0)],2))}}),fx=["innerHTML"],Mf=Object.assign({name:"WpicTooltip"},{props:{placement:{type:String,default:"top"},full:Boolean,text:String,offset:{type:Number,default:5},delay:{type:Number,default:500}},setup(t){const e=a.ref(),n=a.ref(),r=a.ref();kl();const i=t;function o(){i.text&&(n.value.style.display="block",l())}function s(){n.value.style.display=""}async function l(){var h,p;await a.nextTick();const c=await Od(e.value,n.value,{placement:i.placement,middleware:[_d(),Sd(),Cd(i.offset),qy({element:r.value})]});n.value.style.left=`${c.x}px`,n.value.style.top=`${c.y}px`;const{x:d,y:u}=c.middlewareData.arrow,f={top:"bottom",right:"left",bottom:"top",left:"right"}[(h=i.placement)==null?void 0:h.split("-")[0]];r.value&&Object.assign((p=r.value)==null?void 0:p.style,{left:d!=null?`${d}px`:"",top:u!=null?`${u}px`:"",right:"",bottom:"",[f]:"-4px"})}return(c,d)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("span",{ref_key:"button",ref:e,class:a.normalizeClass({"w-full h-full":t.full}),"aria-describedby":"tooltip",onMouseenter:o,onMouseleave:s},[a.renderSlot(c.$slots,"default")],34),a.createElementVNode("div",{ref_key:"tooltip",ref:n,class:"tooltip z-30 px-3 py-2 border border-zinc-200 dark:border-gray-900 text-sm absolute top-0 left-0 bg-black text-white rounded-md hidden",role:"tooltip"},[a.createElementVNode("span",{innerHTML:t.text},null,8,fx),a.createElementVNode("div",{ref_key:"arrowElement",ref:r,class:"arrow"},null,512)],512)],64))}}),hx={key:1,class:"flex justify-between items-baseline pt-4 px-6"},px={class:""},mx={key:2,class:"flex items-center justify-end py-4 px-6"},gx=Object.assign({name:"WpicCard"},{props:{title:String,inline:Boolean,loading:Boolean},setup(t){const e={pmi:"bg-white dark:bg-zinc-800/50 shadow-[0_4px_16px_0px_rgba(0,0,0,0.1)]","wpic-tools":"bg-white border border-gray-200 dark:bg-gray-940 dark:border-gray-920"},n={pmi:"font-bold","wpic-tools":"font-medium dark:text-gray-300"};return(r,i)=>{const o=a.resolveComponent("wpic-loading-panel");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["rounded-lg wpic-card relative",{[e[a.unref(fe).theme]]:!0,"wpic-card-inline":t.inline,"has-header":t.title||r.$slots.actions||r.$slots.title}])},[t.loading?(a.openBlock(),a.createBlock(o,{key:0,class:"absolute top-0 left-0 z-10",wave:""})):a.createCommentVNode("",!0),t.title||r.$slots.title||r.$slots.actions?(a.openBlock(),a.createElementBlock("div",hx,[t.title||r.$slots.title||r.$slots.actions?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["text-lg 2xl:text-xl flex items-center",[n[a.unref(fe).theme]]])},[a.renderSlot(r.$slots,"title",{},()=>[a.createTextVNode(a.toDisplayString(t.title),1)])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",px,[a.renderSlot(r.$slots,"actions")])])):a.createCommentVNode("",!0),a.renderSlot(r.$slots,"default"),r.$slots.buttons?(a.openBlock(),a.createElementBlock("div",mx,[a.renderSlot(r.$slots,"buttons")])):a.createCommentVNode("",!0)],2)}}}),yx={key:0,class:"pb-3 flex justify-betweeen h-12 items-center"},bx={class:"flex-1 text-lg dark:text-gray-300 font-semibold flex items-center"},kx=Object.assign({name:"WpicCardSection"},{props:{title:String,sub:Boolean,expand:Boolean},setup(t){const e={pmi:"mx-6","wpic-tools":"px-6"};return(n,r)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["border-b relative dark:border-gray-900 dark:text-gray-300 last:border-0 pb-6",{[`${e[a.unref(fe).theme]}`]:!0,"pt-3":!(t.title&&n.$slots.actions&&n.$slots.title),"pt-6":!t.title&&!n.$slots.actions&&!n.$slots.title,"bg-gray-50 dark:bg-gray-930 last:rounded-b-lg":t.sub,"p-0! m-0!":t.expand}])},[t.title||n.$slots.title||n.$slots.actions?(a.openBlock(),a.createElementBlock("div",yx,[a.createElementVNode("div",bx,[a.renderSlot(n.$slots,"title",{},()=>[a.createTextVNode(a.toDisplayString(t.title),1)])]),a.renderSlot(n.$slots,"actions")])):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"default")],2))}}),wx=a.createElementVNode("div",{class:""},null,-1),vx=a.createStaticVNode('<div class="-mt-2"><div class="absolute left-1/4 h-8 border-r border-gray-100 dark:border-gray-900"></div><div class="absolute left-1/2 h-8 border-r border-gray-100 dark:border-gray-900"></div><div class="absolute left-3/4 h-8 border-r border-gray-100 dark:border-gray-900"></div></div><div class="mt-7 text-gray-500 dark:text-gray-600"><div class="absolute left-0 text-xs">0%</div><div class="absolute left-1/4 -translate-x-1/4 text-xs">25%</div><div class="absolute left-1/2 -translate-x-1/2 text-xs">50%</div><div class="absolute right-1/4 translate-x-3/4 text-xs">75%</div><div class="absolute right-0 text-xs">100%</div></div>',2),xx=Object.assign({name:"WpicProgressBar"},{props:{percent:Number,value:Number,indicators:Boolean,background:{type:String,default:null},max:{type:Number,default:100},text:String},setup(t){const e=t,n=a.computed(()=>e.percent?e.percent:100/e.max*e.value),r={pmi:"h-2 ring-1 rounded-full ring-zinc-400","wpic-tools":"bg-gray-100 rounded-xs h-4 dark:bg-gray-900"},i={pmi:"bg-cyan-400 rounded-full ring-1 ring-cyan-400","wpic-tools":"bg-lime-500 rounded-xs dark:bg-lime-700"};return(o,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["relative flex",{"mb-4":t.indicators}])},[a.createElementVNode("div",{class:a.normalizeClass(["flex w-full relative",r[a.unref(fe).theme]]),style:{"z-index":"1"}},[n.value>0?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({width:`${n.value}%`}),class:a.normalizeClass(["flex h-full",{[`${t.background}`]:!0,[`${i[a.unref(fe).theme]}`]:!0}])},[a.createVNode(Mf,{full:"",text:`${n.value}%${t.text?t.text:""}`},{default:a.withCtx(()=>[wx]),_:1},8,["text"])],6)):a.createCommentVNode("",!0)],2),t.indicators?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[vx],64)):a.createCommentVNode("",!0)],2))}}),Ex={class:"leading-none"},Cx=Object.assign({name:"WpicTag"},{props:{clearable:Boolean,small:Boolean},emits:["clear"],setup(t,{emit:e}){const n={pmi:"border-cyan-500 bg-cyan-50 text-cyan-600 text-base ","wpic-tools":"border-none bg-gray-200 text-gray-700 text-sm dark:text-gray-400 dark:bg-gray-810"},r=e;function i(){r("clear")}return(o,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["wpic-tag select-none border inline-flex rounded-sm h-8 items-center justify-center pl-3 py-1",{"pr-3":!t.clearable,"pr-1":t.clearable,[n[a.unref(fe).theme]]:!0}])},[a.createElementVNode("span",Ex,[a.renderSlot(o.$slots,"default")]),t.clearable?(a.openBlock(),a.createElementBlock("span",{key:0,onClick:i,class:"ml-2 mt-px cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode($i,{class:"w-4 h-4"})])):a.createCommentVNode("",!0)],2))}}),Sx=Object.assign({name:"WpicTagGroup"},{props:{full:Boolean},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass({"w-full":t.full})},[a.createElementVNode("div",{class:a.normalizeClass(["ui-tag-group flex flex-wrap gap-2",{"w-full":t.full}])},[a.renderSlot(e.$slots,"default")],2)],2))}}),_x=t=>(a.pushScopeId("data-v-947735f2"),t=t(),a.popScopeId(),t),Ox={key:1,class:"w-full min-h-10 h-full rounded-lg bg-gray-100 dark:bg-gray-940 relative overflow-hidden"},Tx=[_x(()=>a.createElementVNode("div",{class:"absolute top-0 left-0 h-full w-full shimmer dark:dark-shimmer"},null,-1))],Nx=be(Object.assign({name:"WpicLoadingPanel"},{props:{color:{type:String,default:""},wave:{type:Boolean,default:!1}},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["w-full h-full flex items-center justify-center",{"py-3":!t.wave}])},[t.wave?(a.openBlock(),a.createElementBlock("div",Ox,Tx)):(a.openBlock(),a.createBlock(Fr,{key:0,color:t.color,class:"w-10 h-10"},null,8,["color"]))],2))}}),[["__scopeId","data-v-947735f2"]]),Mx={class:"text-base font-medium select-none"},Ki=Object.assign({name:"WpicPaginationItem"},{props:{active:Boolean,disabled:Boolean},setup(t){const e={pmi:"border-zinc-300 dark:border-zinc-700 text-zinc-600 dark:text-zinc-300 hover:bg-zinc-500 hover:text-white","wpic-tools":"dark:text-gray-400 hover:text-lime-600 dark:border-gray-900"},n={pmi:"bg-violet-800 border-violet-800 hover:bg-violet-900 hover:border-violet-900 text-white","wpic-tools":"bg-lime-500 border-lime-500 text-white dark:bg-lime-700 dark:border-lime-700"},r={pmi:"text-zinc-300","wpic-tools":"text-gray-300 dark:text-gray-700 dark:border-gray-900"};return(i,o)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["border rounded-sm flex items-center justify-center w-10 h-10 cursor-pointer",{[e[a.unref(fe).theme]]:!t.active&&!t.disabled,[n[a.unref(fe).theme]]:t.active&&!t.disabled,[r[a.unref(fe).theme]]:t.disabled}])},[a.createElementVNode("span",Mx,[a.renderSlot(i.$slots,"default")])],2))}}),Ax={},Dx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},Lx=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L6.31 10l3.72-3.72a.75.75 0 1 0-1.06-1.06L4.72 9.47Zm9.25-4.25L9.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L11.31 10l3.72-3.72a.75.75 0 0 0-1.06-1.06Z","clip-rule":"evenodd"},null,-1)];function Bx(t,e){return a.openBlock(),a.createElementBlock("svg",Dx,Lx)}const Af=be(Ax,[["render",Bx]]),$x={},Ix={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},Vx=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z","clip-rule":"evenodd"},null,-1)];function Px(t,e){return a.openBlock(),a.createElementBlock("svg",Ix,Vx)}const Df=be($x,[["render",Px]]),Rx={},Fx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},zx=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M15.28 9.47a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L13.69 10 9.97 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25ZM6.03 5.22l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L8.69 10 4.97 6.28a.75.75 0 0 1 1.06-1.06Z","clip-rule":"evenodd"},null,-1)];function jx(t,e){return a.openBlock(),a.createElementBlock("svg",Fx,zx)}const Lf=be(Rx,[["render",jx]]),Hx={},Wx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},Ux=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)];function Yx(t,e){return a.openBlock(),a.createElementBlock("svg",Wx,Ux)}const Bf=be(Hx,[["render",Yx]]),qx={class:"wpic-pagination flex justify-between"},Kx={key:0,class:"flex items-center"},Gx={key:0},Jx={key:1,class:"flex flex-wrap gap-2"},Zx=Object.assign({name:"WpicPagination"},{props:{info:{type:Boolean,default:!0},pages:{type:Boolean,default:!0},perPages:{type:Boolean,default:!1},total:Number,perPage:{type:Number,default:10},currentPage:{type:Number,default:1},perPageOptions:{type:Array,default:()=>[10,20,50,100,200]}},emits:["update:perPage","update:currentPage","update:perPage"],setup(t,{expose:e,emit:n}){const{t:r}=zn(),i=t,o=a.computed(()=>i.perPageOptions.map(p=>({value:Number(p),label:r("wpiccomponents.per_page",{count:p})}))),s=n,l=a.computed(()=>Math.ceil(i.total/i.perPage)),c=a.computed(()=>{const p=l.value;if(!p||p===1)return[1];const m=i.currentPage,g=1;let y=Math.max(2,m-g),k=Math.min(p-1,m+g);m<=g+2&&(y=2,k=Math.min(2*g+2,p-1)),m>=p-g-1&&(y=Math.max(2,p-2*g-1),k=p-1);const x=[];for(let w=y;w<=k;w++)x.push(w);return y>2&&x.unshift("..."),k<p-1&&x.push("..."),[1,...x,p]});function d(p){p>=1&&p<=l.value&&s("update:currentPage",p)}function u(){return i.perPage*(i.currentPage-1)+1}function f(){return i.perPage*i.currentPage>i.total?i.total:i.perPage*i.currentPage}async function h(p){s("update:perPage",p),s("update:currentPage",1)}return e({getStart:u,getEnd:f}),(p,m)=>{const g=a.resolveComponent("wpic-choice-list");return a.openBlock(),a.createElementBlock("div",qx,[t.info?(a.openBlock(),a.createElementBlock("div",Kx,[t.total>0?(a.openBlock(),a.createElementBlock("span",Gx,a.toDisplayString(p.$t("wpiccomponents.pagination",{start:u(),end:f(),total:t.total})),1)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.pages?(a.openBlock(),a.createElementBlock("div",Jx,[a.createVNode(Ki,{onClick:m[0]||(m[0]=y=>d(1)),disabled:t.currentPage===1||l.value==0||!l.value},{default:a.withCtx(()=>[a.createVNode(Af,{class:"w-5 h-5 select-none"})]),_:1},8,["disabled"]),a.createVNode(Ki,{onClick:m[1]||(m[1]=y=>d(t.currentPage-1)),disabled:t.currentPage===1||l.value==0||!l.value},{default:a.withCtx(()=>[a.createVNode(Df,{class:"w-5 h-5 select-none"})]),_:1},8,["disabled"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,y=>(a.openBlock(),a.createBlock(Ki,{key:`page_${y}`,onClick:k=>d(y),active:y===t.currentPage,disabled:l.value==0||!l.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(y),1)]),_:2},1032,["onClick","active","disabled"]))),128)),a.createVNode(Ki,{onClick:m[2]||(m[2]=y=>d(t.currentPage+1)),disabled:t.currentPage===l.value||l.value==0||!l.value},{default:a.withCtx(()=>[a.createVNode(Bf,{class:"w-5 h-5 select-none"})]),_:1},8,["disabled"]),a.createVNode(Ki,{onClick:m[3]||(m[3]=y=>d(l.value)),disabled:t.currentPage===l.value||l.value==0||!l.value},{default:a.withCtx(()=>[a.createVNode(Lf,{class:"w-5 h-5 select-none"})]),_:1},8,["disabled"]),t.perPages?(a.openBlock(),a.createBlock(g,{key:0,modelValue:t.perPage,"onUpdate:modelValue":h,options:o.value},null,8,["modelValue","options"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)])}}}),$f=(t,e)=>{const n=t.column.children&&t.column.children.default&&typeof t.column.children.default=="function"?t.column.children.default({item:t.item}):t.column.children;return a.h("td",e.attrs,n)};$f.props=["column","item","rowIndex"];const es=$f,Xx={},Qx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},eE=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)];function tE(t,e){return a.openBlock(),a.createElementBlock("svg",Qx,eE)}const nE=be(Xx,[["render",tE]]),rE={class:"font-semibold"},If={__name:"TotalRow",props:{columns:Array,noXPadding:Boolean,totalItem:{},position:String,checkable:Boolean},setup(t){const e={pmi:"bg-white dark:text-zinc-300 dark:border-zinc-900 dark:bg-zinc-800","wpic-tools":"bg-gray-50 border-gray-200 dark:text-gray-300 dark:border-gray-900 dark:bg-gray-810/45"};return(n,r)=>(a.openBlock(),a.createElementBlock("tr",rE,[t.checkable?(a.openBlock(),a.createBlock(es,{class:a.normalizeClass(["py-3 first:pl-6 pr-6 border-t",{[`${e[a.unref(fe).theme]}`]:!0,"sticky left-0":!0,"border-b":t.position==="header","border-t":t.position==="footer","first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":t.position==="footer","first:rounded-bl-lg":t.position==="footer"}]),id:"total_0",column:{},key:"tr_total_0"},null,8,["class"])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.columns,(i,o)=>(a.openBlock(),a.createBlock(es,{class:a.normalizeClass(["py-3 first:pl-6 pr-6 border-t",{[`${e[a.unref(fe).theme]}`]:!0,"sticky left-0":o===0,"border-b":t.position==="header","border-t":t.position==="footer","first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":t.position==="footer","first:rounded-bl-lg":t.position==="footer","text-center":i.align=="center","text-right":i.align=="right"}]),id:`total_${o}`,column:i,item:t.totalItem,key:`tr_total_${o}`},null,8,["class","id","column","item"]))),128))]))}},iE={},oE={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6"},sE=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"},null,-1)];function lE(t,e){return a.openBlock(),a.createElementBlock("svg",oE,sE)}const aE=be(iE,[["render",lE]]),cE={},dE={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},uE=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"},null,-1)];function fE(t,e){return a.openBlock(),a.createElementBlock("svg",dE,uE)}const hE=be(cE,[["render",fE]]),pE={class:"wpic-table"},mE={key:0,class:"px-2 py-1 flex justify-between border-b dark:border-gray-900"},gE={class:"flex items-center gap-2"},yE={class:"flex items-center gap-2"},bE={class:"w-full rounded-lg"},kE={key:0,class:"w-16"},wE=["width"],vE=["width"],xE={class:"flex justify-center items-center h-full"},EE=["onClick"],CE={class:"rounded-b-lg relative"},SE={key:0},_E=[a.createElementVNode("td",{class:"text-center py-3"},"   ",-1)],OE={class:"flex justify-center items-center h-full"},TE={key:1},NE={key:0,class:"text-center text-gray-400 py-3"},ME=Object.assign({name:"WpicTable"},{props:{data:{type:Array,default:()=>[]},stripe:Boolean,loading:Boolean,hideHeaders:Boolean,sortOptions:{},border:Boolean,noXPadding:Boolean,totalItem:{},totalOnBottom:Boolean,totalOnTop:Boolean,valign:{type:String,default:"center"},small:Boolean,noRadius:Boolean,stickyHeader:Boolean,columnToggleable:Boolean,checkable:Boolean,itemId:{type:String,default:"id"}},emits:["changeSort","expandRow"],setup(t,{expose:e,emit:n}){const r=t,i={pmi:"","wpic-tools":"border-gray-300 dark:border-gray-700"},o={pmi:"bg-zinc-50 dark:bg-zinc-800/60 text-zinc-500 dark:text-zinc-400 dark:border-zinc-900","wpic-tools":"bg-gray-100 text-gray-600 border-gray-200 dark:bg-gray-930 dark:border-gray-900 dark:text-gray-500"},s={pmi:"","wpic-tools":"dark:border-gray-900"},l={pmi:"","wpic-tools":""},c={pmi:"bg-white dark:bg-zinc-800 dark:text-zinc-300 dark:border-zinc-900","wpic-tools":"bg-white text-gray-500 !font-normal border-gray-200 dark:bg-gray-940 dark:border-gray-920 dark:text-gray-400"},d={pmi:"group-[.is-odd]:bg-white group-[.is-even]:bg-gray-50","wpic-tools":"group-[.is-odd]:bg-white group-[.is-even]:bg-gray-50 border-gray-200 dark:group-[.is-odd]:bg-gray-940 dark:group-[.is-even]:bg-gray-930"},u={pmi:"bg-zinc-900/10","wpic-tools":"bg-gray-900/10"},f=n;a.onMounted(()=>{k()});const h=a.getCurrentInstance();a.provide("wtable",h==null?void 0:h.proxy);const p=a.useSlots(),m=a.ref([]),g=a.ref([]),y=a.computed(()=>r.columnToggleable?m.value.filter(L=>g.value.includes(L.field)||!L.selectable):m.value.filter(L=>L.visible||!L.selectable));function k(){const L=(D,C)=>{let P={};for(let R in D){if(typeof D[R].default=="boolean"&&C[R]!==void 0){P[R]=C[R]!==!1;continue}if(C[R]!==void 0){P[R]=C[R];continue}if(typeof D[R].default=="function"){P[R]=D[R].default();continue}P[R]=D[R].default}return P};let j=[];(p.default&&p.default()||[]).forEach(D=>{var C,P;((C=D.type)==null?void 0:C.name)==="WpicTableColumn"?j.push(D):(P=D.children)!=null&&P.length&&D.children.forEach(R=>{var Q;((Q=R.type)==null?void 0:Q.name)==="WpicTableColumn"&&j.push(R)})}),m.value=j.map(D=>{let C=D.children,P=D.props||{},{field:R,label:Q,help:ne,width:he,minWidth:ue,maxWidth:I,sortable:W,selectable:K,render:q,type:H,align:ce,visible:ae,noPadding:we}=L(D.type.props,P);return R||(R=$(Q)),K&&ae&&g.value.push(R),{label:Q,help:ne,width:he,minWidth:ue,maxWidth:I,type:H,align:ce,sortable:W,selectable:K,field:R,render:q,children:C,visible:ae,noPadding:we}})}function x(L){var F,D;let j=(F=r.sortOptions)==null?void 0:F.sortDirection;((D=r.sortOptions)==null?void 0:D.sortBy)===L&&(j=j==="asc"?"desc":"asc"),f("changeSort",{sortDirection:j,sortBy:L})}a.watch(()=>p.default,L=>{k()},{deep:!0});const w=a.reactive({});function b({index:L,item:j}){w[L]?w[L]=null:(w[L]=!0,f("expandRow",{index:L,item:j}))}const S=a.ref([]);function v(L){const j=V(L,r.itemId);S.value.includes(j)?(S.value.splice(S.value.indexOf(j),1),O.value=!1):S.value.push(j)}const O=a.ref(!1);function B(){if(O.value=!O.value,S.value=[],O.value)for(let L of r.data){let j=V(L,r.itemId);S.value.push(j)}}function A(){O.value=!1,S.value=[]}e({buildColumns:k,selectedRows:S,selectedColumns:g,resetSelectedRows:A});function V(L,j){return j.split(".").reduce((F,D)=>F?F[D]:void 0,L)}function $(L){return!L||typeof L!="string"?"":L.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")}return(L,j)=>{const F=a.resolveComponent("wpic-choice-list"),D=a.resolveComponent("wpic-form-field");return a.openBlock(),a.createElementBlock("div",pE,[L.$slots.header||L.$slots.actions||t.columnToggleable?(a.openBlock(),a.createElementBlock("div",mE,[a.createElementVNode("div",gE,[a.renderSlot(L.$slots,"header")]),a.createElementVNode("div",yE,[a.renderSlot(L.$slots,"actions"),a.createVNode(F,{multiple:"",modelValue:g.value,"onUpdate:modelValue":j[0]||(j[0]=C=>g.value=C),"hide-select":"","hide-chevron":"",naked:"",options:m.value.filter(C=>C.selectable).map(C=>({label:C.label,value:C.field}))},{default:a.withCtx(()=>[a.createVNode(Ni,{medium:"",square:"",colorless:"",class:"ml-px"},{default:a.withCtx(()=>[a.createVNode(hE,{class:"w-5 h-5"})]),_:1})]),_:1},8,["modelValue","options"])])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["wpic-table-content relative w-full rounded-lg overflow-hidden-",{"no-radius rounded-none":t.noRadius||t.columnToggleable,border:t.border,[`${i[a.unref(fe).theme]}`]:!0}])},[a.createElementVNode("div",{class:a.normalizeClass(["",{"overflow-y-auto":!t.stickyHeader}])},[a.createElementVNode("table",bE,[a.createElementVNode("colgroup",null,[t.checkable?(a.openBlock(),a.createElementBlock("col",kE)):a.createCommentVNode("",!0),y.value.find(C=>C.type=="expand")?(a.openBlock(),a.createElementBlock("col",{key:1,style:a.normalizeStyle({minWidth:`${y.value.find(C=>C.type=="expand").minWidth}px`}),width:y.value.find(C=>C.type=="expand").width,class:"w-16"},null,12,wE)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value.filter(C=>C.type!="expand"),(C,P)=>(a.openBlock(),a.createElementBlock("col",{style:a.normalizeStyle({minWidth:`${C.minWidth}px`,maxWidth:`${C.maxWidth}px`}),width:C.width,key:P},null,12,vE))),128))]),t.hideHeaders?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("thead",{key:0,class:a.normalizeClass(["rounded-t-lg",{"sticky top-0 z-10":t.stickyHeader}])},[a.createElementVNode("tr",null,[t.checkable?(a.openBlock(),a.createElementBlock("th",{key:0,class:a.normalizeClass(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6",[`${o[a.unref(fe).theme]}`]])},[a.createElementVNode("div",xE,[a.createVNode(D,{slim:"","hide-error":"",checkbox:"",modelValue:O.value,"onUpdate:modelValue":B},null,8,["modelValue"])])],2)):a.createCommentVNode("",!0),y.value.find(C=>C.type=="expand")?(a.openBlock(),a.createElementBlock("th",{key:1,class:a.normalizeClass(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6",[`${o[a.unref(fe).theme]}`]])},null,2)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value.filter(C=>C.type!="expand"),(C,P)=>{var R,Q;return a.openBlock(),a.createElementBlock("th",{class:a.normalizeClass(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6",{[`${o[a.unref(fe).theme]}`]:!0,"sticky top-0 left-0":P===0}]),style:a.normalizeStyle({maxWidth:`${C.maxWidth}px`})},[a.createElementVNode("div",{onClick:()=>{C.sortable&&x(C.field)},class:a.normalizeClass(["flex items-center lg:text-base rounded-lg",{"py-3":!t.small,"py-1 text-sm":t.small,"cursor-pointer":C.sortable&&C.field,"justify-center":C.align=="center","justify-end":C.align=="right"}])},[a.createElementVNode("span",{class:a.normalizeClass(["select-none font-medium text-sm",{"text-right":C.align=="right"}])},a.toDisplayString(C.label),3),C.sortable&&C.field?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["ml-1",{"opacity-25":C.field!=((R=t.sortOptions)==null?void 0:R.sortBy)}])},[a.createVNode(nE,{class:a.normalizeClass(["w-4 h-4",{"rotate-180":((Q=t.sortOptions)==null?void 0:Q.sortDirection)==="asc"}])},null,8,["class"])],2)):a.createCommentVNode("",!0)],10,EE)],6)}),256))])],2)),a.createElementVNode("tbody",CE,[t.loading?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",{class:a.normalizeClass(["inset-0 z-10 absolute flex items-center justify-center",[u[a.unref(fe).theme]]])},[a.createVNode(Fr,{class:"w-6 h-6"})],2),t.data.length?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("tr",SE,_E))],64)):a.createCommentVNode("",!0),t.totalItem&&t.totalOnTop?(a.openBlock(),a.createBlock(If,{key:1,checkable:t.checkable,position:"header",columns:y.value,noXPadding:t.noXPadding,totalItem:t.totalItem},null,8,["checkable","columns","noXPadding","totalItem"])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.data,(C,P)=>{var R,Q,ne,he,ue;return a.openBlock(),a.createElementBlock(a.Fragment,{key:`tr_${P}`},[a.createElementVNode("tr",{class:a.normalizeClass(["tr group border-b last:border-b-0 overflow-hidden",{"is-odd":P%2==0,"is-even":P%2!=0,[s[a.unref(fe).theme]]:!0}])},[t.checkable?(a.openBlock(),a.createElementBlock("td",{key:0,class:a.normalizeClass([{[`${c[a.unref(fe).theme]}`]:!0,[`${d[a.unref(fe).theme]}`]:t.stripe}])},[a.createElementVNode("div",OE,[a.createVNode(D,{slim:"","hide-error":"",checkbox:"",modelValue:S.value.includes(V(C,t.itemId)),checkboxValue:V(C,t.itemId),"onUpdate:modelValue":I=>v(C)},null,8,["modelValue","checkboxValue","onUpdate:modelValue"])])],2)):a.createCommentVNode("",!0),y.value.find(I=>I.type=="expand")?(a.openBlock(),a.createElementBlock("td",{key:1,class:a.normalizeClass([[{"first:pl-6 pr-6 last:pr-6":!t.noXPadding,"first:pl-0 pr-6 last:pr-0":t.noXPadding,"align-top py-5":t.valign=="top",[`${c[a.unref(fe).theme]}`]:!0,[`${d[a.unref(fe).theme]}`]:t.stripe}],"border-t border-gray-200 leading-tight h-16 py-2 dark:border-gray-920"])},[a.createVNode(Ni,{small:"",square:"",onClick:I=>b({item:C,index:P})},{default:a.withCtx(()=>[w[P]?(a.openBlock(),a.createBlock(tx,{key:0,class:"w-4 h-4"})):(a.openBlock(),a.createBlock(aE,{key:1,class:"w-4 h-4"}))]),_:2},1032,["onClick"])],2)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value.filter(I=>I.type!="expand"),(I,W)=>{var K,q;return a.openBlock(),a.createBlock(es,{class:a.normalizeClass(["lg:text-base h-full table-cell",{"text-sm lg:text-sm py-1!":t.small,"sticky left-0 shadow-sm":W===0,[`${c[a.unref(fe).theme]}`]:!0,[`${d[a.unref(fe).theme]}`]:t.stripe,"py-3 first:pl-6 pr-6":!I.noPadding,"first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":P===((K=t.data)==null?void 0:K.length)-1&&!t.totalItem&&!y.value.find(H=>H.type=="expand")&&!t.noRadius,"first:rounded-bl-lg":P===((q=t.data)==null?void 0:q.length)-1&&!t.totalItem&&!y.value.find(H=>H.type=="expand")&&!t.noRadius,"text-center justify-center":I.align=="center","text-right justify-end":I.align=="right","align-top py-5":t.valign=="top"}]),style:a.normalizeStyle({maxWidth:`${I.maxWidth}px`}),id:`${P}_${W}`,column:I,item:C,rowIndex:P,key:W},null,8,["class","style","id","column","item","rowIndex"])}),128))],2),y.value.find(I=>I.type=="expand")?a.withDirectives((a.openBlock(),a.createElementBlock("tr",{key:0,class:a.normalizeClass([{[s[a.unref(fe).theme]]:!t.stripe,[l[a.unref(fe).theme]]:t.stripe},"tr border-b last:border-b-0 overflow-hidden"])},[a.createVNode(es,{class:a.normalizeClass(["lg:text-base bg-gray-50! dark:bg-gray-940!",{[`${c[a.unref(fe).theme]}`]:!0,"py-3 first:pl-6 pr-6":!((R=y.value.find(I=>I.type=="expand"))!=null&&R.noPadding),"p-0":(Q=y.value.find(I=>I.type=="expand"))==null?void 0:Q.noPadding,"first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":P===((ne=t.data)==null?void 0:ne.length)-1&&!t.totalItem,"first:rounded-bl-lg":P===((he=t.data)==null?void 0:he.length)-1&&!t.totalItem,"text-center":y.value.find(I=>I.type=="expand").align=="center","text-right":y.value.find(I=>I.type=="expand").align=="right"}]),column:y.value.find(I=>I.type=="expand"),rowIndex:P,colspan:(ue=y.value)==null?void 0:ue.length,item:C},null,8,["class","column","rowIndex","colspan","item"])],2)),[[a.vShow,w[P]]]):a.createCommentVNode("",!0)],64)}),128))]),t.totalItem&&t.totalOnBottom?(a.openBlock(),a.createElementBlock("tfoot",TE,[a.createVNode(If,{checkable:t.checkable,position:"footer",columns:y.value,noXPadding:t.noXPadding,totalItem:t.totalItem},null,8,["checkable","columns","noXPadding","totalItem"])])):a.createCommentVNode("",!0)])],2),!t.loading&&!t.data.length?(a.openBlock(),a.createElementBlock("div",NE," No Data ")):a.createCommentVNode("",!0)],2)])}}}),AE={name:"WpicTableColumn",props:{label:{type:String},help:{type:String},field:{type:String,default:""},selectable:{type:Boolean,default:!0},sortable:{type:Boolean,default:!1},type:{type:String,default:"default"},width:{type:[String,Number],default:null},minWidth:{type:[String,Number],default:null},maxWidth:{type:[String,Number],default:null},align:{type:String,default:"left"},visible:{type:Boolean,default:!0},noPadding:{type:Boolean,default:!1}},setup(t){const e=inject("wtable",null);return onMounted(()=>{e&&e.buildColumns&&e.buildColumns()}),onBeforeUnmount(()=>{e&&e.buildColumns&&e.buildColumns()}),()=>null}};function rt(t){this.content=t}rt.prototype={constructor:rt,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new rt(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new rt(n)},addToStart:function(t,e){return new rt([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new rt(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new rt(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=rt.from(t),t.size?new rt(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=rt.from(t),t.size?new rt(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=rt.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}},rt.from=function(t){if(t instanceof rt)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new rt(e)};function Vf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=Vf(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function Pf(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),l=e.child(--o),c=s.nodeSize;if(s==l){n-=c,r-=c;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let d=0,u=Math.min(s.text.length,l.text.length);for(;d<u&&s.text[s.text.length-d-1]==l.text[l.text.length-d-1];)d++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let d=Pf(s.content,l.content,n-1,r-1);if(d)return d}n-=c,r-=c}}class J{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,l=0;l<n;s++){let c=this.content[s],d=l+c.nodeSize;if(d>e&&r(c,i+l,o||null,s)!==!1&&c.content.size){let u=l+1;c.nodesBetween(Math.max(0,e-u),Math.min(c.content.size,n-u),r,i+u)}l=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(l,c)=>{let d=l.isText?l.text.slice(Math.max(e,c)-c,n-c):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&d||l.isTextblock)&&r&&(s?s=!1:o+=r),o+=d},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new J(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let l=this.content[o],c=s+l.nodeSize;c>e&&((s<e||c>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),i+=l.nodeSize),s=c}return new J(r,i)}cutByIndex(e,n){return e==n?J.empty:e==0&&n==this.content.length?this:new J(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new J(i,o)}addToStart(e){return new J([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new J(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return Vf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Pf(this,e,n,r)}findIndex(e,n=-1){if(e==0)return ts(0,e);if(e==this.size)return ts(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||n>0?ts(r+1,s):ts(r,i);i=s}}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 J.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new J(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return J.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new J(n||e,r)}static from(e){if(!e)return J.empty;if(e instanceof J)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new J([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}J.empty=new J([],0);const Zl={index:0,offset:0};function ts(t,e){return Zl.index=t,Zl.offset=e,Zl}function ns(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(!ns(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!ns(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $e=class Bc{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}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&&ns(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Bc.none;if(e instanceof Bc)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$e.none=[];class rs extends Error{}class re{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=Ff(this.content,e+this.openStart,n);return r&&new re(r,this.openStart,this.openEnd)}removeBetween(e,n){return new re(Rf(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 re.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new re(J.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new re(e,r,i)}}re.empty=new re(J.empty,0,0);function Rf(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(i==e||o.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Rf(o.content,e-i-1,n-i-1)))}function Ff(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return t.cut(0,e).append(n).append(t.cut(e));let l=Ff(s.content,e-o-1,n);return l&&t.replaceChild(i,s.copy(l))}function DE(t,e,n){if(n.openStart>t.depth)throw new rs("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new rs("Inconsistent open depths");return zf(t,e,n,0)}function zf(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=zf(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,l=s.content;return vr(s,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=LE(n,t);return vr(o,Hf(t,s,l,e,r))}else return vr(o,is(t,e,r))}function jf(t,e){if(!e.type.compatibleContent(t.type))throw new rs("Cannot join "+e.type.name+" onto "+t.type.name)}function Xl(t,e,n){let r=t.node(n);return jf(r,e.node(n)),r}function wr(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 Gi(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(wr(t.nodeAfter,r),o++));for(let l=o;l<s;l++)wr(i.child(l),r);e&&e.depth==n&&e.textOffset&&wr(e.nodeBefore,r)}function vr(t,e){return t.type.checkContent(e),t.copy(e)}function Hf(t,e,n,r,i){let o=t.depth>i&&Xl(t,e,i+1),s=r.depth>i&&Xl(n,r,i+1),l=[];return Gi(null,t,i,l),o&&s&&e.index(i)==n.index(i)?(jf(o,s),wr(vr(o,Hf(t,e,n,r,i+1)),l)):(o&&wr(vr(o,is(t,e,i+1)),l),Gi(e,n,i,l),s&&wr(vr(s,is(n,r,i+1)),l)),Gi(r,null,i,l),new J(l)}function is(t,e,n){let r=[];if(Gi(null,t,n,r),t.depth>n){let i=Xl(t,e,n+1);wr(vr(i,is(t,e,n+1)),r)}return Gi(e,null,n,r),new J(r)}function LE(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(J.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Ji{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $e.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].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 ss(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:l,offset:c}=s.content.findIndex(o),d=o-c;if(r.push(s,l,i+c),!d||(s=s.child(l),s.isText))break;o=d-1,i+=c+1}return new Ji(n,r,o)}static resolveCached(e,n){let r=Wf.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else Wf.set(e,r=new BE);let i=r.elts[r.i]=Ji.resolve(e,n);return r.i=(r.i+1)%$E,i}}class BE{constructor(){this.elts=[],this.i=0}}const $E=12,Wf=new WeakMap;class ss{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 IE=Object.create(null);let Wn=class $c{constructor(e,n,r,i=$e.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||J.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&ns(this.attrs,n||e.defaultAttrs||IE)&&$e.sameSet(this.marks,r||$e.none)}copy(e=null){return e==this.content?this:new $c(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new $c(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 re.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),l=i.start(s),d=i.node(s).content.cut(i.pos-l,o.pos-l);return new re(d,i.depth-s,o.depth-s)}replace(e,n,r){return DE(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Ji.resolveCached(this,e)}resolveNoCache(e){return Ji.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Uf(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=J.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let c=i;c<o;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.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=$e.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(!$e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=J.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};Wn.prototype.text=void 0;class ls extends Wn{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Uf(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 ls(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ls(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 Uf(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class xr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new VE(e,n);if(r.next==null)return xr.empty;let i=Yf(r);r.next&&r.err("Unexpected trailing text");let o=WE(HE(i));return UE(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(s,l){let c=s.matchFragment(e,r);if(c&&(!n||c.validEnd))return J.from(l.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:u,next:f}=s.next[d];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,l.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let l=i;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||c.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
27
+ */const zb="9.14.4";function jb(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(wn().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(wn().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(wn().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(wn().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(wn().__INTLIFY_PROD_DEVTOOLS__=!1)}const Lu=yt.__EXTEND_POINT__,En=Ro(Lu),St={FALLBACK_TO_ROOT:Lu,NOT_SUPPORTED_PRESERVE:En(),NOT_SUPPORTED_FORMATTER:En(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:En(),NOT_SUPPORTED_GET_CHOICE_INDEX:En(),COMPONENT_NAME_LEGACY_COMPATIBLE:En(),NOT_FOUND_PARENT_SCOPE:En(),IGNORE_OBJ_FLATTEN:En(),NOTICE_DROP_ALLOW_COMPOSITION:En(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:En()},Hb={[St.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[St.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[St.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[St.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[St.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[St.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[St.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[St.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[St.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[St.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function Ko(t,...e){return wl(Hb[t],...e)}const Bu=Je.__EXTEND_POINT__,_t=Ro(Bu),Re={UNEXPECTED_RETURN_TYPE:Bu,INVALID_ARGUMENT:_t(),MUST_BE_CALL_SETUP_TOP:_t(),NOT_INSTALLED:_t(),NOT_AVAILABLE_IN_LEGACY_MODE:_t(),REQUIRED_VALUE:_t(),INVALID_VALUE:_t(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:_t(),NOT_INSTALLED_WITH_PROVIDE:_t(),UNEXPECTED_ERROR:_t(),NOT_COMPATIBLE_LEGACY_VUE_I18N:_t(),BRIDGE_SUPPORT_VUE_2_ONLY:_t(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:_t(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:_t(),__EXTEND_POINT__:_t()};function Fn(t,...e){return Ur(t,null,process.env.NODE_ENV!=="production"?{messages:Wb,args:e}:void 0)}const Wb={[Re.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Re.INVALID_ARGUMENT]:"Invalid argument",[Re.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Re.NOT_INSTALLED]:"Need to install with `app.use` function",[Re.UNEXPECTED_ERROR]:"Unexpected error",[Re.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[Re.REQUIRED_VALUE]:"Required in value: {0}",[Re.INVALID_VALUE]:"Invalid value",[Re.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Re.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Re.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Re.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[Re.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[Re.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Dl=kn("__translateVNode"),Ll=kn("__datetimeParts"),Bl=kn("__numberParts"),$l=kn("__enableEmitter"),Il=kn("__disableEmitter"),Ub=kn("__setPluralRules"),$u=kn("__injectWithOption"),Vl=kn("__dispose");function Fi(t){if(!Te(t)||en(t))return t;for(const e in t)if(Xt(t,e))if(!e.includes("."))Te(t[e])&&Fi(t[e]);else{const n=e.split("."),r=n.length-1;let i=t,o=!1;for(let s=0;s<r;s++){if(n[s]==="__proto__")throw new Error(`unsafe key: ${n[s]}`);if(n[s]in i||(i[n[s]]=Le()),!Te(i[n[s]])){process.env.NODE_ENV!=="production"&&vn(Ko(St.IGNORE_OBJ_FLATTEN,{key:n[s]})),o=!0;break}i=i[n[s]]}if(o||(en(i)?Zd.includes(n[r])||delete t[e]:(i[n[r]]=t[e],delete t[e])),!en(i)){const s=i[n[r]];Te(s)&&Fi(s)}}return t}function Pl(t,e){const{messages:n,__i18n:r,messageResolver:i,flatJson:o}=e,s=Se(n)?n:We(r)?Le():{[t]:Le()};if(We(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:c,resource:d}=l;c?(s[c]=s[c]||Le(),zo(d,s[c])):zo(d,s)}else oe(l)&&zo(JSON.parse(l),s)}),i==null&&o)for(const l in s)Xt(s,l)&&Fi(s[l]);return s}function Iu(t){return t.type}function Yb(t,e,n){let r=Te(e.messages)?e.messages:Le();"__i18nGlobal"in n&&(r=Pl(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(o=>{t.mergeLocaleMessage(o,r[o])});{if(Te(e.datetimeFormats)){const o=Object.keys(e.datetimeFormats);o.length&&o.forEach(s=>{t.mergeDateTimeFormat(s,e.datetimeFormats[s])})}if(Te(e.numberFormats)){const o=Object.keys(e.numberFormats);o.length&&o.forEach(s=>{t.mergeNumberFormat(s,e.numberFormats[s])})}}}function Vu(t){return a.createVNode(a.Text,null,t,0)}const Pu="__INTLIFY_META__",Ru=()=>[],qb=()=>!1;let Fu=0;function zu(t){return(e,n,r,i)=>t(n,r,a.getCurrentInstance()||void 0,i)}const Kb=()=>{const t=a.getCurrentInstance();let e=null;return t&&(e=Iu(t)[Pu])?{[Pu]:e}:null};function Gb(t={},e){const{__root:n,__injectWithOption:r}=t,i=n===void 0,o=t.flatJson,s=bn?a.ref:a.shallowRef,l=!!t.translateExistCompatible;process.env.NODE_ENV!=="production"&&l&&$d(Ko(St.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let c=Be(t.inheritLocale)?t.inheritLocale:!0;const d=s(n&&c?n.locale.value:oe(t.locale)?t.locale:Pi),u=s(n&&c?n.fallbackLocale.value:oe(t.fallbackLocale)||We(t.fallbackLocale)||Se(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:d.value),f=s(Pl(d.value,t)),h=s(Se(t.datetimeFormats)?t.datetimeFormats:{[d.value]:{}}),p=s(Se(t.numberFormats)?t.numberFormats:{[d.value]:{}});let m=n?n.missingWarn:Be(t.missingWarn)||Wr(t.missingWarn)?t.missingWarn:!0,g=n?n.fallbackWarn:Be(t.fallbackWarn)||Wr(t.fallbackWarn)?t.fallbackWarn:!0,y=n?n.fallbackRoot:Be(t.fallbackRoot)?t.fallbackRoot:!0,k=!!t.fallbackFormat,x=Ve(t.missing)?t.missing:null,w=Ve(t.missing)?zu(t.missing):null,b=Ve(t.postTranslation)?t.postTranslation:null,S=n?n.warnHtmlMessage:Be(t.warnHtmlMessage)?t.warnHtmlMessage:!0,v=!!t.escapeParameter;const O=n?n.modifiers:Se(t.modifiers)?t.modifiers:{};let B=t.pluralRules||n&&n.pluralRules,A;A=(()=>{i&&fu(null);const F={version:zb,locale:d.value,fallbackLocale:u.value,messages:f.value,modifiers:O,pluralRules:B,missing:w===null?void 0:w,missingWarn:m,fallbackWarn:g,fallbackFormat:k,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:S,escapeParameter:v,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};F.datetimeFormats=h.value,F.numberFormats=p.value,F.__datetimeFormatters=Se(A)?A.__datetimeFormatters:void 0,F.__numberFormatters=Se(A)?A.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(F.__v_emitter=Se(A)?A.__v_emitter:void 0);const Z=Mb(F);return i&&fu(Z),Z})(),Ri(A,d.value,u.value);function $(){return[d.value,u.value,f.value,h.value,p.value]}const L=a.computed({get:()=>d.value,set:F=>{d.value=F,A.locale=d.value}}),j=a.computed({get:()=>u.value,set:F=>{u.value=F,A.fallbackLocale=u.value,Ri(A,d.value,F)}}),z=a.computed(()=>f.value),D=a.computed(()=>h.value),C=a.computed(()=>p.value);function I(){return Ve(b)?b:null}function R(F){b=F,A.postTranslation=F}function ee(){return x}function te(F){F!==null&&(w=zu(F)),x=F,A.missing=w}function ce(F,Z){return F!=="translate"||!Z.resolvedMessage}const ue=(F,Z,T,M,Y,ne)=>{$();let fe;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,i||(A.fallbackContext=n?Nb():void 0),fe=F(A)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,i||(A.fallbackContext=void 0)}if(T!=="translate exists"&&Ge(fe)&&fe===Uo||T==="translate exists"&&!fe){const[N,X]=Z();if(process.env.NODE_ENV!=="production"&&n&&oe(N)&&ce(T,X)&&(y&&(qo(g,N)||pu(m,N))&&vn(Ko(St.FALLBACK_TO_ROOT,{key:N,type:T})),process.env.NODE_ENV!=="production")){const{__v_emitter:ie}=A;ie&&y&&ie.emit("fallback",{type:T,key:N,to:"global",groupId:`${T}:${N}`})}return n&&y?M(n):Y(N)}else{if(ne(fe))return fe;throw Fn(Re.UNEXPECTED_RETURN_TYPE)}};function V(...F){return ue(Z=>Reflect.apply(xu,null,[Z,...F]),()=>Nl(...F),"translate",Z=>Reflect.apply(Z.t,Z,[...F]),Z=>Z,Z=>oe(Z))}function W(...F){const[Z,T,M]=F;if(M&&!Te(M))throw Fn(Re.INVALID_ARGUMENT);return V(Z,T,dt({resolvedMessage:!0},M||{}))}function K(...F){return ue(Z=>Reflect.apply(Ou,null,[Z,...F]),()=>Ml(...F),"datetime format",Z=>Reflect.apply(Z.d,Z,[...F]),()=>Yo,Z=>oe(Z))}function q(...F){return ue(Z=>Reflect.apply(Mu,null,[Z,...F]),()=>Al(...F),"number format",Z=>Reflect.apply(Z.n,Z,[...F]),()=>Yo,Z=>oe(Z))}function H(F){return F.map(Z=>oe(Z)||Ge(Z)||Be(Z)?Vu(String(Z)):Z)}const ae={normalize:H,interpolate:F=>F,type:"vnode"};function we(...F){return ue(Z=>{let T;const M=Z;try{M.processor=ae,T=Reflect.apply(xu,null,[M,...F])}finally{M.processor=null}return T},()=>Nl(...F),"translate",Z=>Z[Dl](...F),Z=>[Vu(Z)],Z=>We(Z))}function Ne(...F){return ue(Z=>Reflect.apply(Mu,null,[Z,...F]),()=>Al(...F),"number format",Z=>Z[Bl](...F),Ru,Z=>oe(Z)||We(Z))}function Ie(...F){return ue(Z=>Reflect.apply(Ou,null,[Z,...F]),()=>Ml(...F),"datetime format",Z=>Z[Ll](...F),Ru,Z=>oe(Z)||We(Z))}function tt(F){B=F,A.pluralRules=B}function Q(F,Z){return ue(()=>{if(!F)return!1;const T=oe(Z)?Z:d.value,M=lt(T),Y=A.messageResolver(M,F);return l?Y!=null:en(Y)||zt(Y)||oe(Y)},()=>[F],"translate exists",T=>Reflect.apply(T.te,T,[F,Z]),qb,T=>Be(T))}function Ee(F){let Z=null;const T=ru(A,u.value,d.value);for(let M=0;M<T.length;M++){const Y=f.value[T[M]]||{},ne=A.messageResolver(Y,F);if(ne!=null){Z=ne;break}}return Z}function At(F){const Z=Ee(F);return Z??(n?n.tm(F)||{}:{})}function lt(F){return f.value[F]||{}}function at(F,Z){if(o){const T={[F]:Z};for(const M in T)Xt(T,M)&&Fi(T[M]);Z=T[F]}f.value[F]=Z,A.messages=f.value}function pt(F,Z){f.value[F]=f.value[F]||{};const T={[F]:Z};if(o)for(const M in T)Xt(T,M)&&Fi(T[M]);Z=T[F],zo(Z,f.value[F]),A.messages=f.value}function E(F){return h.value[F]||{}}function _(F,Z){h.value[F]=Z,A.datetimeFormats=h.value,Nu(A,F,Z)}function U(F,Z){h.value[F]=dt(h.value[F]||{},Z),A.datetimeFormats=h.value,Nu(A,F,Z)}function se(F){return p.value[F]||{}}function Me(F,Z){p.value[F]=Z,A.numberFormats=p.value,Du(A,F,Z)}function _e(F,Z){p.value[F]=dt(p.value[F]||{},Z),A.numberFormats=p.value,Du(A,F,Z)}Fu++,n&&bn&&(a.watch(n.locale,F=>{c&&(d.value=F,A.locale=F,Ri(A,d.value,u.value))}),a.watch(n.fallbackLocale,F=>{c&&(u.value=F,A.fallbackLocale=F,Ri(A,d.value,u.value))}));const Oe={id:Fu,locale:L,fallbackLocale:j,get inheritLocale(){return c},set inheritLocale(F){c=F,F&&n&&(d.value=n.locale.value,u.value=n.fallbackLocale.value,Ri(A,d.value,u.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:z,get modifiers(){return O},get pluralRules(){return B||{}},get isGlobal(){return i},get missingWarn(){return m},set missingWarn(F){m=F,A.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(F){g=F,A.fallbackWarn=g},get fallbackRoot(){return y},set fallbackRoot(F){y=F},get fallbackFormat(){return k},set fallbackFormat(F){k=F,A.fallbackFormat=k},get warnHtmlMessage(){return S},set warnHtmlMessage(F){S=F,A.warnHtmlMessage=F},get escapeParameter(){return v},set escapeParameter(F){v=F,A.escapeParameter=F},t:V,getLocaleMessage:lt,setLocaleMessage:at,mergeLocaleMessage:pt,getPostTranslationHandler:I,setPostTranslationHandler:R,getMissingHandler:ee,setMissingHandler:te,[Ub]:tt};return Oe.datetimeFormats=D,Oe.numberFormats=C,Oe.rt=W,Oe.te=Q,Oe.tm=At,Oe.d=K,Oe.n=q,Oe.getDateTimeFormat=E,Oe.setDateTimeFormat=_,Oe.mergeDateTimeFormat=U,Oe.getNumberFormat=se,Oe.setNumberFormat=Me,Oe.mergeNumberFormat=_e,Oe[$u]=r,Oe[Dl]=we,Oe[Ll]=Ie,Oe[Bl]=Ne,process.env.NODE_ENV!=="production"&&(Oe[$l]=F=>{A.__v_emitter=F},Oe[Il]=()=>{A.__v_emitter=void 0}),Oe}const Rl={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function Jb({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,i)=>[...r,...i.type===a.Fragment?i.children:[i]],[]):e.reduce((n,r)=>{const i=t[r];return i&&(n[r]=i()),n},Le())}function ju(t){return a.Fragment}dt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Ge(t)||!isNaN(t)}},Rl);function Zb(t){return We(t)&&!oe(t[0])}function Hu(t,e,n,r){const{slots:i,attrs:o}=e;return()=>{const s={part:!0};let l=Le();t.locale&&(s.locale=t.locale),oe(t.format)?s.key=t.format:Te(t.format)&&(oe(t.format.key)&&(s.key=t.format.key),l=Object.keys(t.format).reduce((h,p)=>n.includes(p)?dt(Le(),h,{[p]:t.format[p]}):h,Le()));const c=r(t.value,s,l);let d=[s.key];We(c)?d=c.map((h,p)=>{const m=i[h.type],g=m?m({[h.type]:h.value,index:p,parts:c}):[h.value];return Zb(g)&&(g[0].key=`${h.type}-${p}`),g}):oe(c)&&(d=[c]);const u=dt(Le(),o),f=oe(t.tag)||Te(t.tag)?t.tag:ju();return a.h(f,u,d)}}dt({value:{type:Number,required:!0},format:{type:[String,Object]}},Rl),dt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Rl);function Wu(t,e){}const Xb=kn("global-vue-i18n");function zn(t={}){const e=a.getCurrentInstance();if(e==null)throw Fn(Re.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Fn(Re.NOT_INSTALLED);const n=Qb(e),r=tk(n),i=Iu(e),o=ek(t,i);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!t.__useComponent){if(!n.allowComposition)throw Fn(Re.NOT_AVAILABLE_IN_LEGACY_MODE);return ok(e,o,r,t)}if(o==="global")return Yb(r,t,i),r;if(o==="parent"){let c=nk(n,e,t.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&vn(Ko(St.NOT_FOUND_PARENT_SCOPE)),c=r),c}const s=n;let l=s.__getInstance(e);if(l==null){const c=dt({},t);"__i18n"in i&&(c.__i18n=i.__i18n),r&&(c.__root=r),l=Gb(c),s.__composerExtend&&(l[Vl]=s.__composerExtend(l)),ik(s,e,l),s.__setInstance(e,l)}return l}function Qb(t){{const e=a.inject(t.isCE?Xb:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Fn(t.isCE?Re.NOT_INSTALLED_WITH_PROVIDE:Re.UNEXPECTED_ERROR);return e}}function ek(t,e){return Po(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function tk(t){return t.mode==="composition"?t.global:t.global.__composer}function nk(t,e,n=!1){let r=null;const i=e.root;let o=rk(e,n);for(;o!=null;){const s=t;if(t.mode==="composition")r=s.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const l=s.__getInstance(o);l!=null&&(r=l.__composer,n&&r&&!r[$u]&&(r=null))}if(r!=null||i===o)break;o=o.parent}return r}function rk(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function ik(t,e,n){let r=null;a.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=n,r=f1();const i=n;i[$l]&&i[$l](r),r.on("*",Wu)}},e),a.onUnmounted(()=>{const i=n;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",Wu),i[Il]&&i[Il](),delete e.vnode.el.__VUE_I18N__),t.__deleteInstance(e);const o=i[Vl];o&&(o(),delete i[Vl])},e)}function ok(t,e,n,r={}){const i=e==="local",o=a.shallowRef(null);if(i&&t.proxy&&!(t.proxy.$options.i18n||t.proxy.$options.__i18n))throw Fn(Re.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const s=Be(r.inheritLocale)?r.inheritLocale:!oe(r.locale),l=a.ref(!i||s?n.locale.value:oe(r.locale)?r.locale:Pi),c=a.ref(!i||s?n.fallbackLocale.value:oe(r.fallbackLocale)||We(r.fallbackLocale)||Se(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:l.value),d=a.ref(Pl(l.value,r)),u=a.ref(Se(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),f=a.ref(Se(r.numberFormats)?r.numberFormats:{[l.value]:{}}),h=i?n.missingWarn:Be(r.missingWarn)||Wr(r.missingWarn)?r.missingWarn:!0,p=i?n.fallbackWarn:Be(r.fallbackWarn)||Wr(r.fallbackWarn)?r.fallbackWarn:!0,m=i?n.fallbackRoot:Be(r.fallbackRoot)?r.fallbackRoot:!0,g=!!r.fallbackFormat,y=Ve(r.missing)?r.missing:null,k=Ve(r.postTranslation)?r.postTranslation:null,x=i?n.warnHtmlMessage:Be(r.warnHtmlMessage)?r.warnHtmlMessage:!0,w=!!r.escapeParameter,b=i?n.modifiers:Se(r.modifiers)?r.modifiers:{},S=r.pluralRules||i&&n.pluralRules;function v(){return[l.value,c.value,d.value,u.value,f.value]}const O=a.computed({get:()=>o.value?o.value.locale.value:l.value,set:Q=>{o.value&&(o.value.locale.value=Q),l.value=Q}}),B=a.computed({get:()=>o.value?o.value.fallbackLocale.value:c.value,set:Q=>{o.value&&(o.value.fallbackLocale.value=Q),c.value=Q}}),A=a.computed(()=>o.value?o.value.messages.value:d.value),P=a.computed(()=>u.value),$=a.computed(()=>f.value);function L(){return o.value?o.value.getPostTranslationHandler():k}function j(Q){o.value&&o.value.setPostTranslationHandler(Q)}function z(){return o.value?o.value.getMissingHandler():y}function D(Q){o.value&&o.value.setMissingHandler(Q)}function C(Q){return v(),Q()}function I(...Q){return o.value?C(()=>Reflect.apply(o.value.t,null,[...Q])):C(()=>"")}function R(...Q){return o.value?Reflect.apply(o.value.rt,null,[...Q]):""}function ee(...Q){return o.value?C(()=>Reflect.apply(o.value.d,null,[...Q])):C(()=>"")}function te(...Q){return o.value?C(()=>Reflect.apply(o.value.n,null,[...Q])):C(()=>"")}function ce(Q){return o.value?o.value.tm(Q):{}}function ue(Q,Ee){return o.value?o.value.te(Q,Ee):!1}function V(Q){return o.value?o.value.getLocaleMessage(Q):{}}function W(Q,Ee){o.value&&(o.value.setLocaleMessage(Q,Ee),d.value[Q]=Ee)}function K(Q,Ee){o.value&&o.value.mergeLocaleMessage(Q,Ee)}function q(Q){return o.value?o.value.getDateTimeFormat(Q):{}}function H(Q,Ee){o.value&&(o.value.setDateTimeFormat(Q,Ee),u.value[Q]=Ee)}function de(Q,Ee){o.value&&o.value.mergeDateTimeFormat(Q,Ee)}function ae(Q){return o.value?o.value.getNumberFormat(Q):{}}function we(Q,Ee){o.value&&(o.value.setNumberFormat(Q,Ee),f.value[Q]=Ee)}function Ne(Q,Ee){o.value&&o.value.mergeNumberFormat(Q,Ee)}const Ie={get id(){return o.value?o.value.id:-1},locale:O,fallbackLocale:B,messages:A,datetimeFormats:P,numberFormats:$,get inheritLocale(){return o.value?o.value.inheritLocale:s},set inheritLocale(Q){o.value&&(o.value.inheritLocale=Q)},get availableLocales(){return o.value?o.value.availableLocales:Object.keys(d.value)},get modifiers(){return o.value?o.value.modifiers:b},get pluralRules(){return o.value?o.value.pluralRules:S},get isGlobal(){return o.value?o.value.isGlobal:!1},get missingWarn(){return o.value?o.value.missingWarn:h},set missingWarn(Q){o.value&&(o.value.missingWarn=Q)},get fallbackWarn(){return o.value?o.value.fallbackWarn:p},set fallbackWarn(Q){o.value&&(o.value.missingWarn=Q)},get fallbackRoot(){return o.value?o.value.fallbackRoot:m},set fallbackRoot(Q){o.value&&(o.value.fallbackRoot=Q)},get fallbackFormat(){return o.value?o.value.fallbackFormat:g},set fallbackFormat(Q){o.value&&(o.value.fallbackFormat=Q)},get warnHtmlMessage(){return o.value?o.value.warnHtmlMessage:x},set warnHtmlMessage(Q){o.value&&(o.value.warnHtmlMessage=Q)},get escapeParameter(){return o.value?o.value.escapeParameter:w},set escapeParameter(Q){o.value&&(o.value.escapeParameter=Q)},t:I,getPostTranslationHandler:L,setPostTranslationHandler:j,getMissingHandler:z,setMissingHandler:D,rt:R,d:ee,n:te,tm:ce,te:ue,getLocaleMessage:V,setLocaleMessage:W,mergeLocaleMessage:K,getDateTimeFormat:q,setDateTimeFormat:H,mergeDateTimeFormat:de,getNumberFormat:ae,setNumberFormat:we,mergeNumberFormat:Ne};function tt(Q){Q.locale.value=l.value,Q.fallbackLocale.value=c.value,Object.keys(d.value).forEach(Ee=>{Q.mergeLocaleMessage(Ee,d.value[Ee])}),Object.keys(u.value).forEach(Ee=>{Q.mergeDateTimeFormat(Ee,u.value[Ee])}),Object.keys(f.value).forEach(Ee=>{Q.mergeNumberFormat(Ee,f.value[Ee])}),Q.escapeParameter=w,Q.fallbackFormat=g,Q.fallbackRoot=m,Q.fallbackWarn=p,Q.missingWarn=h,Q.warnHtmlMessage=x}return a.onBeforeMount(()=>{if(t.proxy==null||t.proxy.$i18n==null)throw Fn(Re.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const Q=o.value=t.proxy.$i18n.__composer;e==="global"?(l.value=Q.locale.value,c.value=Q.fallbackLocale.value,d.value=Q.messages.value,u.value=Q.datetimeFormats.value,f.value=Q.numberFormats.value):i&&tt(Q)}),Ie}if(jb(),__INTLIFY_JIT_COMPILATION__?lu($b):lu(Bb),Sb(ob),_b(ru),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=wn();t.__INTLIFY__=!0,pb(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const sk={},lk={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},ak=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)];function ck(t,e){return a.openBlock(),a.createElementBlock("svg",lk,ak)}const Uu=be(sk,[["render",ck]]),dk={},uk={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},fk=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"},null,-1)];function hk(t,e){return a.openBlock(),a.createElementBlock("svg",uk,fk)}const Fl=be(dk,[["render",hk]]),pk={key:0,class:"mb-2 wpic-form-label text-base text-gray-500 dark:text-gray-500 flex items-center justify-between"},mk={class:"flex items-center gap-2"},gk={key:0},yk={class:""},bk={class:"flex justify-end"},kk={key:0,class:"absolute dark:text-gray-400 left-0 ml-0 w-9 h-full flex items-center justify-center text-center"},wk={class:"flex items-center justify-center text-center opacity-50 w-4 h-4 leading-none overflow-hidden"},vk={key:1,class:"absolute right-0 mr-2 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},zi=Object.assign({name:"WpicFormInput"},{props:{label:String,info:String,disabled:Boolean,large:Boolean,small:Boolean,clearable:Boolean,loading:Boolean,invalid:Boolean,slim:Boolean,required:Boolean,hideRequired:Boolean,material:Boolean,naked:Boolean},emits:["onClear","update:modelValue"],setup(t,{emit:e}){const n={pmi:"shadow-inner border-zinc-400 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 bg-zinc-100 dark:bg-zinc-700/25 dark:border-zinc-700/50 dark:text-zinc-300","wpic-tools":"text-gray-800 bg-white border-gray-300 focus:border-lime-400 focus-within:border-lime-400 dark:bg-gray-930 dark:border-gray-920 dark:hover:bg-gray-920 dark:text-gray-400"},r={pmi:"border-opacity-50 border-zinc-300 text-zinc-400","wpic-tools":"border-gray-200! text-gray-400! dark:text-gray-800! bg-gray-50! dark:border-gray-900! dark:bg-gray-940!"},i=e;function o(){i("onClear")}return(s,l)=>(a.openBlock(),a.createElementBlock("div",null,[t.label?(a.openBlock(),a.createElementBlock("div",pk,[a.createElementVNode("div",mk,[a.createElementVNode("span",null,a.toDisplayString(t.label),1),t.required&&!t.hideRequired?(a.openBlock(),a.createElementBlock("span",gk,"*")):a.createCommentVNode("",!0),a.createElementVNode("div",yk,[t.info?(a.openBlock(),a.createBlock(fr,{key:0,hover:""},{content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(t.info),1)]),default:a.withCtx(()=>[a.createVNode(Fl,{class:"w-4 h-4 text-zinc-600"})]),_:1})):a.createCommentVNode("",!0)])]),a.createElementVNode("div",bk,[a.renderSlot(s.$slots,"more")])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["wpic-input overflow-auto leading-none flex relative items-center",{"border rounded-sm pr-3":!t.naked,"!pl-0 pr-1 !bg-transparent":t.naked,"border-b":t.material,"pl-4":!s.$slots.prepend,"pl-8":s.$slots.prepend,[`${n[a.unref(he).theme]}`]:!0,"h-8 text-sm":t.small,"h-10":!t.large&&!t.small,"h-12":t.large,[`${r[a.unref(he).theme]}`]:t.disabled,"cursor-pointer":!t.disabled,"border-red-600! focus-within:outline-red-600":t.invalid}])},[s.$slots.prepend?(a.openBlock(),a.createElementBlock("div",kk,[a.createElementVNode("div",wk,[a.renderSlot(s.$slots,"prepend")])])):a.createCommentVNode("",!0),a.renderSlot(s.$slots,"default"),t.loading?(a.openBlock(),a.createElementBlock("div",vk,[a.createVNode(Fr,{class:"w-6 h-6 opacity-50"})])):t.clearable?(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(o,["stop"]),style:{"z-index":"2"},class:"absolute right-0 mr-2 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode($i,{class:"w-5 h-5 opacity-50"})])):a.createCommentVNode("",!0)],2)]))}});var Yu=typeof global=="object"&&global&&global.Object===Object&&global,xk=typeof self=="object"&&self&&self.Object===Object&&self,ln=Yu||xk||Function("return this")(),Gr=ln.Symbol,qu=Object.prototype,Ek=qu.hasOwnProperty,Ck=qu.toString,ji=Gr?Gr.toStringTag:void 0;function Sk(t){var e=Ek.call(t,ji),n=t[ji];try{t[ji]=void 0;var r=!0}catch{}var i=Ck.call(t);return r&&(e?t[ji]=n:delete t[ji]),i}var _k=Object.prototype,Ok=_k.toString;function Tk(t){return Ok.call(t)}var Nk="[object Null]",Mk="[object Undefined]",Ku=Gr?Gr.toStringTag:void 0;function Jr(t){return t==null?t===void 0?Mk:Nk:Ku&&Ku in Object(t)?Sk(t):Tk(t)}function Zr(t){return t!=null&&typeof t=="object"}var Ak="[object Symbol]";function Dk(t){return typeof t=="symbol"||Zr(t)&&Jr(t)==Ak}var Go=Array.isArray,Lk=/\s/;function Bk(t){for(var e=t.length;e--&&Lk.test(t.charAt(e)););return e}var $k=/^\s+/;function Ik(t){return t&&t.slice(0,Bk(t)+1).replace($k,"")}function Hi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Gu=NaN,Vk=/^[-+]0x[0-9a-f]+$/i,Pk=/^0b[01]+$/i,Rk=/^0o[0-7]+$/i,Fk=parseInt;function Ju(t){if(typeof t=="number")return t;if(Dk(t))return Gu;if(Hi(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Hi(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Ik(t);var n=Pk.test(t);return n||Rk.test(t)?Fk(t.slice(2),n?2:8):Vk.test(t)?Gu:+t}var zk="[object AsyncFunction]",jk="[object Function]",Hk="[object GeneratorFunction]",Wk="[object Proxy]";function Zu(t){if(!Hi(t))return!1;var e=Jr(t);return e==jk||e==Hk||e==zk||e==Wk}var zl=ln["__core-js_shared__"],Xu=function(){var t=/[^.]+$/.exec(zl&&zl.keys&&zl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Uk(t){return!!Xu&&Xu in t}var Yk=Function.prototype,qk=Yk.toString;function yr(t){if(t!=null){try{return qk.call(t)}catch{}try{return t+""}catch{}}return""}var Kk=/[\\^$.*+?()[\]{}|]/g,Gk=/^\[object .+?Constructor\]$/,Jk=Function.prototype,Zk=Object.prototype,Xk=Jk.toString,Qk=Zk.hasOwnProperty,e2=RegExp("^"+Xk.call(Qk).replace(Kk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function t2(t){if(!Hi(t)||Uk(t))return!1;var e=Zu(t)?e2:Gk;return e.test(yr(t))}function n2(t,e){return t==null?void 0:t[e]}function Xr(t,e){var n=n2(t,e);return t2(n)?n:void 0}var jl=Xr(ln,"WeakMap"),r2=9007199254740991,i2=/^(?:0|[1-9]\d*)$/;function o2(t,e){var n=typeof t;return e=e??r2,!!e&&(n=="number"||n!="symbol"&&i2.test(t))&&t>-1&&t%1==0&&t<e}function Qu(t,e){return t===e||t!==t&&e!==e}var s2=9007199254740991;function ef(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=s2}function l2(t){return t!=null&&ef(t.length)&&!Zu(t)}var a2=Object.prototype;function c2(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||a2;return t===n}function d2(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var u2="[object Arguments]";function tf(t){return Zr(t)&&Jr(t)==u2}var nf=Object.prototype,f2=nf.hasOwnProperty,h2=nf.propertyIsEnumerable,p2=tf(function(){return arguments}())?tf:function(t){return Zr(t)&&f2.call(t,"callee")&&!h2.call(t,"callee")};function m2(){return!1}var rf=typeof ct=="object"&&ct&&!ct.nodeType&&ct,of=rf&&typeof module=="object"&&module&&!module.nodeType&&module,g2=of&&of.exports===rf,sf=g2?ln.Buffer:void 0,y2=sf?sf.isBuffer:void 0,Hl=y2||m2,b2="[object Arguments]",k2="[object Array]",w2="[object Boolean]",v2="[object Date]",x2="[object Error]",E2="[object Function]",C2="[object Map]",S2="[object Number]",_2="[object Object]",O2="[object RegExp]",T2="[object Set]",N2="[object String]",M2="[object WeakMap]",A2="[object ArrayBuffer]",D2="[object DataView]",L2="[object Float32Array]",B2="[object Float64Array]",$2="[object Int8Array]",I2="[object Int16Array]",V2="[object Int32Array]",P2="[object Uint8Array]",R2="[object Uint8ClampedArray]",F2="[object Uint16Array]",z2="[object Uint32Array]",Pe={};Pe[L2]=Pe[B2]=Pe[$2]=Pe[I2]=Pe[V2]=Pe[P2]=Pe[R2]=Pe[F2]=Pe[z2]=!0,Pe[b2]=Pe[k2]=Pe[A2]=Pe[w2]=Pe[D2]=Pe[v2]=Pe[x2]=Pe[E2]=Pe[C2]=Pe[S2]=Pe[_2]=Pe[O2]=Pe[T2]=Pe[N2]=Pe[M2]=!1;function j2(t){return Zr(t)&&ef(t.length)&&!!Pe[Jr(t)]}function H2(t){return function(e){return t(e)}}var lf=typeof ct=="object"&&ct&&!ct.nodeType&&ct,Wi=lf&&typeof module=="object"&&module&&!module.nodeType&&module,W2=Wi&&Wi.exports===lf,Wl=W2&&Yu.process,af=function(){try{var t=Wi&&Wi.require&&Wi.require("util").types;return t||Wl&&Wl.binding&&Wl.binding("util")}catch{}}(),cf=af&&af.isTypedArray,df=cf?H2(cf):j2,U2=Object.prototype,Y2=U2.hasOwnProperty;function q2(t,e){var n=Go(t),r=!n&&p2(t),i=!n&&!r&&Hl(t),o=!n&&!r&&!i&&df(t),s=n||r||i||o,l=s?d2(t.length,String):[],c=l.length;for(var d in t)Y2.call(t,d)&&!(s&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||o2(d,c)))&&l.push(d);return l}function K2(t,e){return function(n){return t(e(n))}}var G2=K2(Object.keys,Object),J2=Object.prototype,Z2=J2.hasOwnProperty;function X2(t){if(!c2(t))return G2(t);var e=[];for(var n in Object(t))Z2.call(t,n)&&n!="constructor"&&e.push(n);return e}function Q2(t){return l2(t)?q2(t):X2(t)}var Ui=Xr(Object,"create");function ew(){this.__data__=Ui?Ui(null):{},this.size=0}function tw(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var nw="__lodash_hash_undefined__",rw=Object.prototype,iw=rw.hasOwnProperty;function ow(t){var e=this.__data__;if(Ui){var n=e[t];return n===nw?void 0:n}return iw.call(e,t)?e[t]:void 0}var sw=Object.prototype,lw=sw.hasOwnProperty;function aw(t){var e=this.__data__;return Ui?e[t]!==void 0:lw.call(e,t)}var cw="__lodash_hash_undefined__";function dw(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ui&&e===void 0?cw:e,this}function br(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}br.prototype.clear=ew,br.prototype.delete=tw,br.prototype.get=ow,br.prototype.has=aw,br.prototype.set=dw;function uw(){this.__data__=[],this.size=0}function Jo(t,e){for(var n=t.length;n--;)if(Qu(t[n][0],e))return n;return-1}var fw=Array.prototype,hw=fw.splice;function pw(t){var e=this.__data__,n=Jo(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():hw.call(e,n,1),--this.size,!0}function mw(t){var e=this.__data__,n=Jo(e,t);return n<0?void 0:e[n][1]}function gw(t){return Jo(this.__data__,t)>-1}function yw(t,e){var n=this.__data__,r=Jo(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Cn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Cn.prototype.clear=uw,Cn.prototype.delete=pw,Cn.prototype.get=mw,Cn.prototype.has=gw,Cn.prototype.set=yw;var Yi=Xr(ln,"Map");function bw(){this.size=0,this.__data__={hash:new br,map:new(Yi||Cn),string:new br}}function kw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Zo(t,e){var n=t.__data__;return kw(e)?n[typeof e=="string"?"string":"hash"]:n.map}function ww(t){var e=Zo(this,t).delete(t);return this.size-=e?1:0,e}function vw(t){return Zo(this,t).get(t)}function xw(t){return Zo(this,t).has(t)}function Ew(t,e){var n=Zo(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function kr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}kr.prototype.clear=bw,kr.prototype.delete=ww,kr.prototype.get=vw,kr.prototype.has=xw,kr.prototype.set=Ew;function Cw(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Sw(){this.__data__=new Cn,this.size=0}function _w(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Ow(t){return this.__data__.get(t)}function Tw(t){return this.__data__.has(t)}var Nw=200;function Mw(t,e){var n=this.__data__;if(n instanceof Cn){var r=n.__data__;if(!Yi||r.length<Nw-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new kr(r)}return n.set(t,e),this.size=n.size,this}function jn(t){var e=this.__data__=new Cn(t);this.size=e.size}jn.prototype.clear=Sw,jn.prototype.delete=_w,jn.prototype.get=Ow,jn.prototype.has=Tw,jn.prototype.set=Mw;function Aw(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function Dw(){return[]}var Lw=Object.prototype,Bw=Lw.propertyIsEnumerable,uf=Object.getOwnPropertySymbols,$w=uf?function(t){return t==null?[]:(t=Object(t),Aw(uf(t),function(e){return Bw.call(t,e)}))}:Dw;function Iw(t,e,n){var r=e(t);return Go(t)?r:Cw(r,n(t))}function ff(t){return Iw(t,Q2,$w)}var Ul=Xr(ln,"DataView"),Yl=Xr(ln,"Promise"),ql=Xr(ln,"Set"),hf="[object Map]",Vw="[object Object]",pf="[object Promise]",mf="[object Set]",gf="[object WeakMap]",yf="[object DataView]",Pw=yr(Ul),Rw=yr(Yi),Fw=yr(Yl),zw=yr(ql),jw=yr(jl),Hn=Jr;(Ul&&Hn(new Ul(new ArrayBuffer(1)))!=yf||Yi&&Hn(new Yi)!=hf||Yl&&Hn(Yl.resolve())!=pf||ql&&Hn(new ql)!=mf||jl&&Hn(new jl)!=gf)&&(Hn=function(t){var e=Jr(t),n=e==Vw?t.constructor:void 0,r=n?yr(n):"";if(r)switch(r){case Pw:return yf;case Rw:return hf;case Fw:return pf;case zw:return mf;case jw:return gf}return e});var bf=ln.Uint8Array,Hw="__lodash_hash_undefined__";function Ww(t){return this.__data__.set(t,Hw),this}function Uw(t){return this.__data__.has(t)}function Xo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new kr;++e<n;)this.add(t[e])}Xo.prototype.add=Xo.prototype.push=Ww,Xo.prototype.has=Uw;function Yw(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function qw(t,e){return t.has(e)}var Kw=1,Gw=2;function kf(t,e,n,r,i,o){var s=n&Kw,l=t.length,c=e.length;if(l!=c&&!(s&&c>l))return!1;var d=o.get(t),u=o.get(e);if(d&&u)return d==e&&u==t;var f=-1,h=!0,p=n&Gw?new Xo:void 0;for(o.set(t,e),o.set(e,t);++f<l;){var m=t[f],g=e[f];if(r)var y=s?r(g,m,f,e,t,o):r(m,g,f,t,e,o);if(y!==void 0){if(y)continue;h=!1;break}if(p){if(!Yw(e,function(k,x){if(!qw(p,x)&&(m===k||i(m,k,n,r,o)))return p.push(x)})){h=!1;break}}else if(!(m===g||i(m,g,n,r,o))){h=!1;break}}return o.delete(t),o.delete(e),h}function Jw(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Zw(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var Xw=1,Qw=2,ev="[object Boolean]",tv="[object Date]",nv="[object Error]",rv="[object Map]",iv="[object Number]",ov="[object RegExp]",sv="[object Set]",lv="[object String]",av="[object Symbol]",cv="[object ArrayBuffer]",dv="[object DataView]",wf=Gr?Gr.prototype:void 0,Kl=wf?wf.valueOf:void 0;function uv(t,e,n,r,i,o,s){switch(n){case dv:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case cv:return!(t.byteLength!=e.byteLength||!o(new bf(t),new bf(e)));case ev:case tv:case iv:return Qu(+t,+e);case nv:return t.name==e.name&&t.message==e.message;case ov:case lv:return t==e+"";case rv:var l=Jw;case sv:var c=r&Xw;if(l||(l=Zw),t.size!=e.size&&!c)return!1;var d=s.get(t);if(d)return d==e;r|=Qw,s.set(t,e);var u=kf(l(t),l(e),r,i,o,s);return s.delete(t),u;case av:if(Kl)return Kl.call(t)==Kl.call(e)}return!1}var fv=1,hv=Object.prototype,pv=hv.hasOwnProperty;function mv(t,e,n,r,i,o){var s=n&fv,l=ff(t),c=l.length,d=ff(e),u=d.length;if(c!=u&&!s)return!1;for(var f=c;f--;){var h=l[f];if(!(s?h in e:pv.call(e,h)))return!1}var p=o.get(t),m=o.get(e);if(p&&m)return p==e&&m==t;var g=!0;o.set(t,e),o.set(e,t);for(var y=s;++f<c;){h=l[f];var k=t[h],x=e[h];if(r)var w=s?r(x,k,h,e,t,o):r(k,x,h,t,e,o);if(!(w===void 0?k===x||i(k,x,n,r,o):w)){g=!1;break}y||(y=h=="constructor")}if(g&&!y){var b=t.constructor,S=e.constructor;b!=S&&"constructor"in t&&"constructor"in e&&!(typeof b=="function"&&b instanceof b&&typeof S=="function"&&S instanceof S)&&(g=!1)}return o.delete(t),o.delete(e),g}var gv=1,vf="[object Arguments]",xf="[object Array]",Qo="[object Object]",yv=Object.prototype,Ef=yv.hasOwnProperty;function bv(t,e,n,r,i,o){var s=Go(t),l=Go(e),c=s?xf:Hn(t),d=l?xf:Hn(e);c=c==vf?Qo:c,d=d==vf?Qo:d;var u=c==Qo,f=d==Qo,h=c==d;if(h&&Hl(t)){if(!Hl(e))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new jn),s||df(t)?kf(t,e,n,r,i,o):uv(t,e,c,n,r,i,o);if(!(n&gv)){var p=u&&Ef.call(t,"__wrapped__"),m=f&&Ef.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,y=m?e.value():e;return o||(o=new jn),i(g,y,n,r,o)}}return h?(o||(o=new jn),mv(t,e,n,r,i,o)):!1}function Cf(t,e,n,r,i){return t===e?!0:t==null||e==null||!Zr(t)&&!Zr(e)?t!==t&&e!==e:bv(t,e,n,r,Cf,i)}var Gl=function(){return ln.Date.now()},kv="Expected a function",wv=Math.max,vv=Math.min;function Jl(t,e,n){var r,i,o,s,l,c,d=0,u=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(kv);e=Ju(e)||0,Hi(n)&&(u=!!n.leading,f="maxWait"in n,o=f?wv(Ju(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function p(v){var O=r,B=i;return r=i=void 0,d=v,s=t.apply(B,O),s}function m(v){return d=v,l=setTimeout(k,e),u?p(v):s}function g(v){var O=v-c,B=v-d,A=e-O;return f?vv(A,o-B):A}function y(v){var O=v-c,B=v-d;return c===void 0||O>=e||O<0||f&&B>=o}function k(){var v=Gl();if(y(v))return x(v);l=setTimeout(k,g(v))}function x(v){return l=void 0,h&&r?p(v):(r=i=void 0,s)}function w(){l!==void 0&&clearTimeout(l),d=0,r=c=i=l=void 0}function b(){return l===void 0?s:x(Gl())}function S(){var v=Gl(),O=y(v);if(r=arguments,i=this,c=v,O){if(l===void 0)return m(c);if(f)return clearTimeout(l),l=setTimeout(k,e),p(c)}return l===void 0&&(l=setTimeout(k,e)),s}return S.cancel=w,S.flush=b,S}function qi(t,e){return Cf(t,e)}const xv={},Ev={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Cv=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9"},null,-1)];function Sv(t,e){return a.openBlock(),a.createElementBlock("svg",Ev,Cv)}const _v=be(xv,[["render",Sv]]),Ov={key:0,class:"leading-none"},Tv={key:1},Nv={key:0,class:"p-3 sticky top-0 z-[1] bg-white dark:bg-gray-930"},Mv={key:1},Av={key:0,class:"z-0 px-4 py-2 flex items-center justify-between text-sm gap-6 dark:text-gray-400"},Dv=["onClick"],Lv={class:"select-none flex w-full items-center justify-between"},Bv={class:"flex-1"},$v={key:0,class:"px-4 py-2 text-sm text-gray-500 dark:text-gray-400 text-center"},Iv={key:1,class:"px-4 py-2 text-sm text-gray-400 text-center"},Sf=Object.assign({name:"WpicChoiceList"},{props:{modelValue:{},value:{},name:String,small:Boolean,hideSelect:Boolean,label:String,placeholder:{type:String,default:"Select..."},options:Array,multiple:Boolean,required:Boolean,disabled:Boolean,isInvalid:Boolean,maxDisplay:{type:Number},batchSelect:{type:Boolean,default:!1},allSelectedText:String,filterable:Boolean,remoteMethod:{},noDataText:String,clearable:Boolean,debounce:{type:Number,default:0},loading:Boolean,material:Boolean,naked:Boolean,hideChevron:Boolean,summaryText:String,oneLine:Boolean,total:{type:Number,default:null},groupSelected:{type:Boolean,default:!1}},emits:["blur-sm","input","change","update:modelValue"],setup(t,{expose:e,emit:n}){const r=t,{t:i}=zn(),o=a.computed(()=>r.placeholder==="Select..."?i("wpiccomponents.placeholder_select"):r.placeholder),s=a.ref(!1),l=a.ref(r.options);a.watch(()=>r.options,()=>{const j=[...(Array.isArray(r.modelValue)?r.modelValue:r.modelValue!==null&&r.modelValue!==void 0?[r.modelValue]:[]).map(z=>l.value.find(D=>qi(D.value,z))||r.options.find(D=>qi(D.value,z))).filter(Boolean)];for(const z of r.options)j.some(D=>qi(D.value,z.value))||j.push(z);l.value=j},{immediate:!0,deep:!0});const c=n,d=a.ref(),u=a.ref();function f($){var L,j;if(r.multiple){if($){let z=r.modelValue||[];z.indexOf($)>=0?z.splice(z.indexOf($),1):z.push($),c("update:modelValue",z),g(z),((L=r.modelValue)==null?void 0:L.length)===((j=r.options)==null?void 0:j.length)?s.value=!0:s.value=!1}}else c("update:modelValue",$),g($),d.value=null,u.value.hide()}async function h($){var L,j;c("update:modelValue",$),g($),await a.nextTick(),((L=r.modelValue)==null?void 0:L.length)===((j=r.options)==null?void 0:j.length)&&(s.value=!0)}function p($){c("update:modelValue",$),s.value=!1,g($)}function m(){s.value=!1,r.multiple?(c("update:modelValue",[]),g([])):(c("update:modelValue",null),g(null))}const g=Jl(function($){c("change",$)},r.debounce),y=a.computed(()=>{var $,L,j,z;if(r.multiple){const D=(($=l.value)==null?void 0:$.filter(I=>{var R;return(R=r.modelValue)==null?void 0:R.includes(I.value)}))||[],C=((L=r.modelValue)==null?void 0:L.length)||0;if(r.summaryText&&C>0){const I=i(r.summaryText,C);return i("wpiccomponents.summary_items",{count:C,type:I})}if(r.maxDisplay){const I=D.slice(0,r.maxDisplay);return D.length-I.length>0?`${I.map(R=>R.label).join(", ")} (+${D.length-I.length})`:I.map(R=>R.label).join(", ")}else return D.map(I=>I.label).join(", ")}else return((z=(j=l.value)==null?void 0:j.find(D=>D.value===r.modelValue))==null?void 0:z.label)||r.modelValue});function k($){var L;try{return r.multiple?r.modelValue!==null&&((L=r.modelValue)==null?void 0:L.some(j=>qi(j,$))):r.modelValue!==null&&qi($,r.modelValue)}catch(j){return console.log(j),!1}}const x={pmi:"group-[.is-selected]:bg-violet-50 hover:group-[.is-selected]:bg-violet-100","wpic-tools":"hover:bg-gray-50 group-[.is-selected]:text-gray-800 group-[.is-selected]:font-semibold text-gray-600 dark:hover:bg-white/5 dark:text-gray-400 dark:group-[.is-selected]:text-white"},w=a.computed(()=>{var $,L;return(($=r.modelValue)==null?void 0:$.length)===((L=r.options)==null?void 0:L.length)}),b=a.computed(()=>{var D;const $=l.value||[];if(r.filterable&&!r.remoteMethod&&((D=d.value)!=null&&D.trim().length)){const C=d.value.trim().toLowerCase(),I=$.filter(ce=>{var ue;return(ue=ce.label)==null?void 0:ue.toLowerCase().includes(C)});if(!r.groupSelected||!r.multiple)return I;const R=r.modelValue||[],ee=I.filter(ce=>R.includes(ce.value)),te=I.filter(ce=>!R.includes(ce.value));return[...ee,...te]}if(!r.groupSelected||!r.multiple)return $;const L=r.modelValue||[],j=$.filter(C=>L.includes(C.value)),z=$.filter(C=>!L.includes(C.value));return[...j,...z]});function S(){v.value=1,r.remoteMethod&&(O.value=!0,P(d.value,v.value,()=>{O.value=!1}))}const v=a.ref(1),O=a.ref(!1),B=a.computed(()=>{var $;return r.total!==void 0&&(($=r.options)==null?void 0:$.length)>=r.total});function A($){const L=$.target;L.scrollTop+L.clientHeight>=L.scrollHeight-30&&!O.value&&!B.value&&(O.value=!0,v.value+=1,P(d.value,v.value,()=>{O.value=!1}))}const P=Jl(($,L,j)=>{r.remoteMethod($,L).finally(()=>{j==null||j()})},r.debounce||300);return e({allSelected:s,isAllSelected:w}),($,L)=>(a.openBlock(),a.createBlock(fr,{custom:"",ref_key:"myPopover",ref:u,label:t.label,disabled:t.disabled},{default:a.withCtx(({isHidden:j})=>[a.createVNode(zi,{material:t.material,naked:t.naked,disabled:t.disabled,small:t.small,invalid:t.isInvalid,loading:t.loading},{default:a.withCtx(()=>{var z,D,C,I,R,ee;return[a.createElementVNode("span",{class:a.normalizeClass(["select-none w-full text-left flex-1",{"whitespace-pre":!t.multiple}])},[t.modelValue&&(!t.multiple||t.multiple&&((z=t.modelValue)==null?void 0:z.length)>0)&&!t.hideSelect?(a.openBlock(),a.createElementBlock("span",Ov,[w.value&&((D=t.allSelectedText)!=null&&D.length)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(a.toDisplayString(t.allSelectedText)+" ("+a.toDisplayString((C=t.options)==null?void 0:C.length)+")",1)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(y.value),1)],64))])):!t.multiple&&((I=t.options)!=null&&I.find(te=>te.value===null))?(a.openBlock(),a.createElementBlock("span",Tv,a.toDisplayString((ee=(R=t.options)==null?void 0:R.find(te=>te.value===null))==null?void 0:ee.label),1)):a.renderSlot($.$slots,"default",{key:2},()=>[a.createTextVNode(a.toDisplayString(o.value),1)])],2),t.modelValue&&t.clearable?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:a.withModifiers(m,["stop"]),style:{"z-index":"2"},class:"absolute right-6 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode($i,{class:"w-4 h-4"})])):a.createCommentVNode("",!0),!t.hideChevron&&!t.loading?(a.openBlock(),a.createBlock(_v,{key:1,class:"h-5 w-5 -mr-[2px]"})):a.createCommentVNode("",!0)]}),_:3},8,["material","naked","disabled","small","invalid","loading"])]),content:a.withCtx(()=>{var j,z;return[a.createElementVNode("div",{class:"flex flex-col max-h-80 overflow-y-auto",onScrollPassive:A},[t.filterable?(a.openBlock(),a.createElementBlock("div",Nv,[a.createVNode(Nf,{slim:"",placeholder:$.$t("wpiccomponents.placeholder_search"),clearable:"",modelValue:d.value,"onUpdate:modelValue":[L[0]||(L[0]=D=>d.value=D),S]},null,8,["placeholder","modelValue"])])):a.createCommentVNode("",!0),!t.options&&((j=t.options)==null?void 0:j.length)==0?(a.openBlock(),a.createElementBlock("span",Mv,"No data.")):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[t.multiple&&t.batchSelect?(a.openBlock(),a.createElementBlock("div",Av,[a.createElementVNode("span",{class:"cursor-pointer opacity-50 hover:opacity-100",onClick:L[1]||(L[1]=D=>{var C;return h((C=b.value)==null?void 0:C.filter(I=>I.value).map(I=>I.value))})},a.toDisplayString($.$t("wpiccomponents.select_all")),1),a.createElementVNode("span",{class:"cursor-pointer opacity-50 hover:opacity-100",onClick:L[2]||(L[2]=D=>p([]))},a.toDisplayString($.$t("wpiccomponents.select_none")),1)])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,D=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["group",{"is-selected":!!k(D.value)}])},[a.createElementVNode("div",{class:a.normalizeClass(["flex items-center py-2 px-4 min-w-64 text-base",{"cursor-pointer":!t.multiple||D.value,[`${x[a.unref(he).theme]}`]:!0}]),onClick:C=>D.disabled?null:f(D.value)},[a.createElementVNode("div",Lv,[a.createElementVNode("div",Bv,[a.createElementVNode("div",{class:a.normalizeClass(["",{"opacity-25":D.disabled,"line-clamp-1":t.oneLine}])},a.toDisplayString(D.label||D.value),3),D.description?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["text-xs opacity-50 font-normal!",{"opacity-10":D.disabled}])},a.toDisplayString(D.description),3)):a.createCommentVNode("",!0)]),t.multiple&&k(D.value)?(a.openBlock(),a.createBlock(Uu,{key:0,class:"w-4 h-4"})):a.createCommentVNode("",!0)])],10,Dv)],2))),256)),r.remoteMethod?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[O.value?(a.openBlock(),a.createElementBlock("div",$v,a.toDisplayString($.$t("wpiccomponents.loading_more")),1)):B.value&&((z=t.options)==null?void 0:z.length)>0?(a.openBlock(),a.createElementBlock("div",Iv,a.toDisplayString($.$t("wpiccomponents.no_more_results")),1)):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)],64))],32)]}),_:3},8,["label","disabled"]))}}),_f=Object.assign({name:"WpicToggleSwitch"},{props:{modelValue:Boolean,label:String,disabled:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e;function i(){n.disabled||r("update:modelValue",!n.modelValue)}return(o,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["inline-flex items-center gap-3 select-none",{"opacity-50":t.disabled,"cursor-pointer":!t.disabled}]),onClick:i},[a.createElementVNode("div",{class:a.normalizeClass(["w-11 h-6 rounded-full shadow-inner flex items-center transition-all duration-100",{"bg-lime-500 dark:bg-lime-600":t.modelValue,"bg-gray-300 dark:bg-gray-800":!t.modelValue}])},[a.createElementVNode("div",{class:a.normalizeClass(["w-5 h-5 rounded-full bg-white dark:bg-gray-500 shadow-md transition-all duration-100 transform",{"translate-x-[calc(100%+3px)] dark:!bg-gray-200":t.modelValue,"translate-x-px":!t.modelValue}])},null,2)],2),a.createElementVNode("span",{class:a.normalizeClass({"text-gray-500":!t.modelValue,"text-gray-700 dark:text-gray-300":t.modelValue})},a.toDisplayString(t.label),3)],2))}}),Vv={key:0,class:"mb-2 gap-2 wpic-form-label text-base text-zinc-600 dark:text-zinc-300 flex items-center"},Pv={class:""},Rv=["value","disabled","rows","placeholder"],Of=Object.assign({name:"WpicTextarea"},{props:{modelValue:{},label:String,disabled:Boolean,noResize:Boolean,autoResize:Boolean,placeholder:String,isInvalid:Boolean,required:Boolean,minHeight:{type:[String,Number],default:50},maxHeight:{type:[String,Number],default:300},rows:{type:[String,Number],default:3}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const r=t,i=a.ref(null),o=a.ref(!1);a.watch(()=>r.modelValue,d=>{i.value.style.height="auto",r.autoResize&&a.nextTick(()=>{r.minHeight&&(i.value.style.height=`${i.value.scrollHeight<r.minHeight?r.minHeight:i.value.scrollHeight}px`),r.maxHeight&&(i.value.scrollHeight>r.maxHeight?(i.value.style.height=`${r.maxHeight}px`,o.value=!0):o.value=!1)})},{deep:!0});const s=n;function l(d){s("update:modelValue",d==null?void 0:d.target.value)}function c(){i.value.focus()}return e({focus:c}),(d,u)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[t.label?(a.openBlock(),a.createElementBlock("div",Vv,[a.createTextVNode(a.toDisplayString(t.label)+" ",1),a.createElementVNode("div",Pv,[d.info?(a.openBlock(),a.createBlock(fr,{key:0,hover:""},{content:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(d.info),1)]),default:a.withCtx(()=>[a.createVNode(Fl,{class:"w-4 h-4 text-zinc-600"})]),_:1})):a.createCommentVNode("",!0)])])):a.createCommentVNode("",!0),a.createElementVNode("textarea",{ref_key:"myTextarea",ref:i,class:a.normalizeClass(["relative appearance-none outline-hidden flex w-full h-full rounded-sm px-4 py-2 bg-transparent opacity-100 active:border-lime-400 focus:border-lime-400 focus-visible:border-none placeholder:opacity-30 dark:text-gray-400",{"cursor-not-allowed":t.disabled,"resize-none":t.noResize,"overflow-hidden":t.autoResize&&!o.value,"overflow-auto":t.autoResize||o.value}]),style:a.normalizeStyle({"min-height":t.autoResize&&`${t.minHeight}px`,maxHeight:t.autoResize&&`${t.maxHeight}px`}),value:t.modelValue,disabled:t.disabled,rows:t.rows,onInput:l,placeholder:t.placeholder},null,46,Rv)],64))}}),Fv=["placeholder"],Tf={__name:"ColorPicker",props:{modelValue:String,defaultColor:{type:String},loading:Boolean,material:Boolean,naked:Boolean,isInvalid:Boolean,placeholder:String,disabled:Boolean,small:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=a.ref(n.modelValue||n.defaultColor),o=()=>{r("update:modelValue",i.value)};return a.watch(()=>n.modelValue,s=>{s!==i.value&&(i.value=s)}),(s,l)=>(a.openBlock(),a.createBlock(zi,{material:t.material,naked:t.naked,disabled:t.disabled,small:t.small,invalid:t.isInvalid,loading:t.loading},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("input",{type:"color","onUpdate:modelValue":l[0]||(l[0]=c=>i.value=c),onInput:o,class:"w-6 h-6 !rounded-md cursor-pointer outline-hidden appearance-none"},null,544),[[a.vModelText,i.value]]),a.withDirectives(a.createElementVNode("input",{type:"text","onUpdate:modelValue":l[1]||(l[1]=c=>i.value=c),onInput:o,class:"w-full p-2 outline-hidden appearance-none",placeholder:t.placeholder},null,40,Fv),[[a.vModelText,i.value]])]),_:1},8,["material","naked","disabled","small","invalid","loading"]))}},zv={},jv={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},Hv=[a.createElementVNode("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z"},null,-1),a.createElementVNode("path",{"fill-rule":"evenodd",d:"M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 0 1 0-1.113ZM17.25 12a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0Z","clip-rule":"evenodd"},null,-1)];function Wv(t,e){return a.openBlock(),a.createElementBlock("svg",jv,Hv)}const Uv=be(zv,[["render",Wv]]),Yv={},qv={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},Kv=[a.createElementVNode("path",{d:"M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z"},null,-1),a.createElementVNode("path",{d:"M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z"},null,-1),a.createElementVNode("path",{d:"M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z"},null,-1)];function Gv(t,e){return a.openBlock(),a.createElementBlock("svg",qv,Kv)}const Jv=be(Yv,[["render",Gv]]),Zv={},Xv={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor"},Qv=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 12h-15"},null,-1)];function ex(t,e){return a.openBlock(),a.createElementBlock("svg",Xv,Qv)}const tx=be(Zv,[["render",ex]]),nx={class:"flex items-center gap-2"},rx={key:0},ix={class:""},ox=["innerHTML"],sx={class:"flex justify-end"},lx=["name","value","checked"],ax={class:"flex items-center justify-center text-center opacity-50 w-4 h-4 leading-none"},cx={key:5,class:"absolute z-10 right-0 mr-3 h-full flex items-center"},dx={class:"min-w-5 h-5 leading-tight cursor-pointer dark:text-gray-400"},ux={key:7,class:"text-red-700 dark:text-red-400/90 mt-1 text-base"},Nf=Object.assign({name:"WpicFormField"},{props:{label:{type:[String,Number]},placeholder:String,name:{type:String,default:null},select:Boolean,checkbox:Boolean,radio:Boolean,textarea:Boolean,rules:{},type:{type:String,default:"text"},tag:{type:String,default:null},options:{type:Array},required:Boolean,email:Boolean,multiple:Boolean,slim:Boolean,error:{type:Boolean,default:!0},clearable:Boolean,modelValue:{},checkboxValue:{},uncheckedValue:{},radioValue:{},disabled:Boolean,debounce:{type:Number,default:0},loading:Boolean,password:Boolean,addLabel:{type:String,default:"Add"},help:String,labelName:Boolean,half:Boolean,hideSelect:Boolean,date:Boolean,range:Boolean,rows:{type:[String,Number],default:3},transparent:Boolean,loadingPercent:{type:Number,default:null},loadingPulse:{type:Boolean,default:!1},blur:{type:Boolean,default:!1},large:Boolean,noResize:Boolean,autoResize:Boolean,minHeight:{type:[String,Number],default:50},maxHeight:{type:[String,Number],default:300},hideFocus:Boolean,min:{type:[String,Number],default:-1/0},max:{type:[String,Number],default:1/0},info:{type:String},small:Boolean,maxDisplay:{type:Number},filterable:Boolean,remoteMethod:{},noDataText:String,batchSelect:{type:Boolean,default:!1},allSelectedText:String,hideRequired:Boolean,material:Boolean,naked:Boolean,toggleSwitch:Boolean,color:Boolean,summaryText:String,oneLine:Boolean,total:Number},emits:["onChange","update:modelValue","onClear"],setup(t,{expose:e,emit:n}){const r={pmi:"shadow-inner border-zinc-400 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 bg-zinc-100 dark:bg-zinc-700/25 dark:border-zinc-700/50 dark:text-zinc-300","wpic-tools":"text-gray-800 disabled:text-gray-400 disabled:border-gray-200 bg-white border-gray-300 dark:bg-gray-930 dark:border-gray-920 focus-within:border-lime-400 dark:focus-within:bg-gray-920 disabled:bg-gray-50"},i={pmi:"rounded-xs group-[.is-active]:border-zinc-400 group-[.is-selected]:bg-violet-800 group-[.is-selected]:border-violet-800 group-[.is-selected]:text-white group-[.is-disabled]:bg-opacity-50 group-[.is-disabled]:border-opacity-50 group-[.is-disabled]:text-opacity-75","wpic-tools":"rounded-sm group-[.is-active]:border-gray-300 dark:group-[.is-active]:bg-gray-950 dark:group-[.is-active]:border-gray-800 group-[.is-selected]:bg-lime-600 group-[.is-selected]:border-lime-600 group-[.is-selected]:text-white dark:group-[.is-disabled]:border-gray-800/50 group-[.is-disabled]:!text-gray-300 group-[.is-disabled]:!border-gray-100 group-[.is-disabled]:!bg-gray-100 dark:group-[.is-disabled]:!border-gray-900 dark:group-[.is-disabled]:!text-gray-700 dark:group-[.is-disabled]:!bg-gray-900"},o=t,s=a.computed(()=>o.name?o.name:kl()),l=Y0(s.value),c=a.computed(()=>{if(o.label)return o.label;if(o.name&&o.labelName)return`${o.name}#${o.labelName}`}),d=a.ref(!0),u=a.computed(()=>(o.type=="password"||o.password)&&d.value?"password":o.type);function f(){d.value=!d.value}const h=a.computed(()=>{var P;if(o.rules&&typeof o.rules=="string"){let $=(P=o.rules)==null?void 0:P.split("|");return o.required&&$.push("required"),o.email&&$.push("email"),$.join("|")}else if(!o.rules){let $=[];return o.required&&$.push("required"),o.email&&$.push("email"),$.join("|")}return"required"});function p(P){let $=P&&P.target?P.target.value:P;x($)}const m=n;function g(P){P===!0||P===!1?m("update:modelValue",!P):m("update:modelValue",P)}function y(P){let $=P&&P.target?P.target.value:P;m("update:modelValue",$),m("onChange",$)}function k(){m("update:modelValue",null),m("onChange",null),m("onClear")}const x=Jl(function(P){m("update:modelValue",P),m("onChange",P)},o.debounce),w=a.ref(null),b=a.ref();function S(){var P,$;o.textarea?(P=b.value)==null||P.focus():($=w.value)==null||$.$el.focus()}function v(){return w.value.meta.valid}const O=a.ref(),B=a.computed(()=>O.value.allSelected),A=a.computed(()=>O.value.isAllSelected);return e({focus:S,isValid:v,allSelected:B,isAllSelected:A}),(P,$)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["wpic-form-field",{"mb-6":!t.slim}])},[c.value&&!t.checkbox&&!t.radio&&!t.toggleSwitch?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass([{"text-sm":t.small,"text-base":!t.small},"mb-2 wpic-form-label text-gray-500 dark:text-gray-500 flex items-center justify-between"])},[a.createElementVNode("div",nx,[a.createElementVNode("span",null,a.toDisplayString(c.value),1),t.required&&!t.hideRequired?(a.openBlock(),a.createElementBlock("span",rx,"*")):a.createCommentVNode("",!0),a.createElementVNode("div",ix,[t.info?(a.openBlock(),a.createBlock(fr,{key:0,hover:""},{content:a.withCtx(()=>[a.createElementVNode("div",{class:"whitespace-break-spaces",innerHTML:t.info},null,8,ox)]),default:a.withCtx(()=>[a.createVNode(Fl,{class:"w-4 h-4 text-zinc-600"})]),_:1})):a.createCommentVNode("",!0)])]),a.createElementVNode("div",sx,[a.renderSlot(P.$slots,"more")])],2)):a.createCommentVNode("",!0),t.checkbox?(a.openBlock(),a.createBlock(a.unref(cr),{key:1,ref_key:"myInput",ref:w,name:s.value,rules:h.value,value:t.checkboxValue,"unchecked-value":t.uncheckedValue,modelValue:t.modelValue},{default:a.withCtx(({field:L})=>[a.createElementVNode("div",{class:a.normalizeClass(["inline-flex group items-center gap-2",{"is-disabled":t.disabled,"is-active":!t.disabled&&!t.modelValue,"is-selected":t.modelValue===!0}]),onClick:$[0]||($[0]=j=>t.disabled?void 0:g(t.modelValue))},[a.createElementVNode("div",{class:a.normalizeClass(["w-4 h-4 border dark:border-gray-800 cursor-pointer",{[`${i[a.unref(he).theme]}`]:!0}])},[t.modelValue===!0?(a.openBlock(),a.createBlock(Uu,{key:0})):a.createCommentVNode("",!0)],2),a.createElementVNode("span",{class:a.normalizeClass(["text-base cursor-pointer select-none text-gray-600 dark:text-gray-500",{"!text-gray-500/50 dark:text-gray-700/50":t.disabled}])},[a.renderSlot(P.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(c.value),1)])],2)],2)]),_:3},8,["name","rules","value","unchecked-value","modelValue"])):t.radio?(a.openBlock(),a.createBlock(a.unref(cr),{key:2,ref_key:"myInput",ref:w,name:s.value,value:t.radioValue,modelValue:t.modelValue},{default:a.withCtx(({field:L})=>[a.createElementVNode("div",{onClick:$[2]||($[2]=()=>{t.disabled||y(t.radioValue)}),class:a.normalizeClass([{"cursor-pointer":!t.disabled},"inline-flex items-center gap-2 select-none"])},[a.createElementVNode("span",{class:a.normalizeClass(["h-4 w-4 border border-zinc-400 rounded-full p-[2px]",{"border-opacity-50":t.disabled}])},[t.radioValue==t.modelValue?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["flex rounded-full h-full w-full bg-violet-800",{"bg-opacity-50":t.disabled}])},null,2)):a.createCommentVNode("",!0)],2),a.createElementVNode("input",{class:"hidden",type:"radio",name:t.name,value:t.radioValue,onChange:$[1]||($[1]=(...j)=>P.onChange&&P.onChange(...j)),checked:t.radioValue==t.modelValue},null,40,lx),c.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["text-base",{"opacity-50":t.disabled}])},a.toDisplayString(c.value),3)):a.createCommentVNode("",!0)],2)]),_:1},8,["name","value","modelValue"])):t.select?(a.openBlock(),a.createBlock(a.unref(cr),{key:3,ref_key:"myInput",ref:w,modelValue:t.modelValue,rules:h.value,name:s.value},{default:a.withCtx(({field:L})=>{var j;return[a.createVNode(Sf,{ref_key:"myChoiceList",ref:O,modelValue:t.modelValue,"onUpdate:modelValue":y,disabled:t.disabled,options:t.options,small:t.small,oneLine:t.oneLine,clearable:t.clearable,hideSelect:t.hideSelect,"remote-method":t.remoteMethod,multiple:t.multiple,filterable:t.filterable,maxDisplay:t.maxDisplay,batchSelect:t.batchSelect,allSelectedText:t.allSelectedText,summaryText:t.summaryText,debounce:t.debounce,total:t.total,isInvalid:!!(t.error&&a.unref(l)),required:t.required||((j=h.value)==null?void 0:j.indexOf("required"))>=0,label:c.value,placeholder:t.placeholder,loading:t.loading,material:t.material,naked:t.naked},null,8,["modelValue","disabled","options","small","oneLine","clearable","hideSelect","remote-method","multiple","filterable","maxDisplay","batchSelect","allSelectedText","summaryText","debounce","total","isInvalid","required","label","placeholder","loading","material","naked"])]}),_:1},8,["modelValue","rules","name"])):t.color?(a.openBlock(),a.createBlock(a.unref(cr),{key:4,ref_key:"myInput",ref:w,modelValue:t.modelValue,rules:h.value,name:s.value},{default:a.withCtx(({field:L})=>[a.createVNode(Tf,{placeholder:t.placeholder,modelValue:t.modelValue,"onUpdate:modelValue":y},null,8,["placeholder","modelValue"])]),_:1},8,["modelValue","rules","name"])):t.toggleSwitch?(a.openBlock(),a.createBlock(a.unref(cr),{key:5,ref_key:"myInput",ref:w,modelValue:t.modelValue,rules:h.value,name:s.value},{default:a.withCtx(({field:L})=>[a.createVNode(_f,{modelValue:t.modelValue,"onUpdate:modelValue":y,label:c.value,disabled:t.disabled},null,8,["modelValue","label","disabled"])]),_:1},8,["modelValue","rules","name"])):(a.openBlock(),a.createElementBlock("div",{key:6,class:a.normalizeClass(["wpic-input flex relative",{"rounded-sm border":!t.naked,"border-b":t.material,"!bg-transparent":t.naked,[`${r[a.unref(he).theme]}`]:!0,"bg-transparent!":t.transparent,"h-10":!t.textarea&&!t.large,"h-12":!t.textarea&&t.large,"border-gray-200! bg-gray-50! dark:bg-gray-940! dark:border-gray-900! text-gray-400 dark:text-gray-800":t.disabled,"border-red-600! focus-within:outline-red-600 dark:border-red-400/70!":a.unref(l)}])},[P.$slots.prepend?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["absolute dark:text-gray-400 left-0 ml-0 w-9 h-full flex items-center text-center",{"justify-center":!t.naked}])},[a.createElementVNode("div",ax,[a.renderSlot(P.$slots,"prepend")])],2)):a.createCommentVNode("",!0),t.textarea?(a.openBlock(),a.createBlock(a.unref(cr),{key:1,ref_key:"myInput",ref:w,modelValue:t.modelValue,rules:h.value,name:s.value},{default:a.withCtx(()=>{var L;return[a.createVNode(Of,{ref_key:"myTextarea",ref:b,modelValue:t.modelValue,"onUpdate:modelValue":p,rows:t.rows,disabled:t.disabled,noResize:t.noResize,autoResize:t.autoResize,placeholder:t.placeholder,minHeight:t.minHeight,maxHeight:t.maxHeight,isInvalid:!!(t.error&&a.unref(l)),required:t.required||((L=h.value)==null?void 0:L.indexOf("required"))>=0},null,8,["modelValue","rows","disabled","noResize","autoResize","placeholder","minHeight","maxHeight","isInvalid","required"])]}),_:1},8,["modelValue","rules","name"])):(a.openBlock(),a.createBlock(a.unref(cr),{key:2,ref_key:"myInput",ref:w,autocomplete:"off",style:{"z-index":"1"},class:a.normalizeClass(["flex w-full h-full rounded-sm pr-4 bg-transparent outline-hidden appearance-none dark:text-gray-400 dark:placeholder:text-gray-700",{"pl-4":!P.$slots.prepend&&!t.naked,"pl-8":P.$slots.prepend&&!t.naked,"pl-6":P.$slots.prepend&&t.naked,"py-2":t.textarea,"text-sm":t.small,"cursor-not-allowed dark:placeholder:text-gray-800!":t.disabled}]),type:u.value,min:t.min,max:t.max,rows:t.rows,name:s.value,disabled:t.disabled,modelValue:t.modelValue,onInput:p,"no-data-text":t.noDataText,placeholder:t.placeholder,validateOnInput:!!a.unref(l),rules:h.value},null,8,["class","type","min","max","rows","name","disabled","modelValue","no-data-text","placeholder","validateOnInput","rules"])),t.loading?(a.openBlock(),a.createElementBlock("div",{key:3,onClick:a.withModifiers(k,["stop"]),class:"absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode(Fr,{class:"w-6 h-6 opacity-50"})])):t.clearable&&t.modelValue?(a.openBlock(),a.createElementBlock("div",{key:4,onClick:a.withModifiers(k,["stop"]),style:{"z-index":"2"},class:"absolute right-0 mr-3 h-full flex items-center cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode($i,{class:"w-5 h-5 opacity-50"})])):a.createCommentVNode("",!0),P.$slots.append||t.password||t.type=="password"?(a.openBlock(),a.createElementBlock("div",cx,[a.createElementVNode("div",dx,[a.renderSlot(P.$slots,"append",{},()=>[a.withDirectives(a.createVNode(Uv,{class:"text-zinc-600 select-none",onClick:f},null,512),[[a.vShow,d.value]]),a.withDirectives(a.createVNode(Jv,{class:"text-zinc-600 select-none",onClick:f},null,512),[[a.vShow,!d.value]])])])])):a.createCommentVNode("",!0)],2)),t.error&&a.unref(l)?(a.openBlock(),a.createElementBlock("div",ux,[a.createVNode(a.unref(U0),{name:s.value},{default:a.withCtx(L=>[a.createTextVNode(a.toDisplayString(L.message),1)]),_:1},8,["name"])])):a.createCommentVNode("",!0),P.$slots.help||t.help?(a.openBlock(),a.createElementBlock("div",{key:8,class:a.normalizeClass(["text-base mt-1",{"ml-7":t.type=="checkbox","opacity-50":t.disabled}])},[a.renderSlot(P.$slots,"help",{},()=>[a.createTextVNode(a.toDisplayString(t.help),1)])],2)):a.createCommentVNode("",!0)],2))}}),fx=["innerHTML"],Mf=Object.assign({name:"WpicTooltip"},{props:{placement:{type:String,default:"top"},full:Boolean,text:String,offset:{type:Number,default:5},delay:{type:Number,default:500}},setup(t){const e=a.ref(),n=a.ref(),r=a.ref();kl();const i=t;function o(){i.text&&(n.value.style.display="block",l())}function s(){n.value.style.display=""}async function l(){var h,p;await a.nextTick();const c=await Od(e.value,n.value,{placement:i.placement,middleware:[_d(),Sd(),Cd(i.offset),qy({element:r.value})]});n.value.style.left=`${c.x}px`,n.value.style.top=`${c.y}px`;const{x:d,y:u}=c.middlewareData.arrow,f={top:"bottom",right:"left",bottom:"top",left:"right"}[(h=i.placement)==null?void 0:h.split("-")[0]];r.value&&Object.assign((p=r.value)==null?void 0:p.style,{left:d!=null?`${d}px`:"",top:u!=null?`${u}px`:"",right:"",bottom:"",[f]:"-4px"})}return(c,d)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("span",{ref_key:"button",ref:e,class:a.normalizeClass({"w-full h-full":t.full}),"aria-describedby":"tooltip",onMouseenter:o,onMouseleave:s},[a.renderSlot(c.$slots,"default")],34),a.createElementVNode("div",{ref_key:"tooltip",ref:n,class:"tooltip z-30 px-3 py-2 border border-zinc-200 dark:border-gray-900 text-sm absolute top-0 left-0 bg-black text-white rounded-md hidden",role:"tooltip"},[a.createElementVNode("span",{innerHTML:t.text},null,8,fx),a.createElementVNode("div",{ref_key:"arrowElement",ref:r,class:"arrow"},null,512)],512)],64))}}),hx={key:1,class:"flex justify-between items-baseline pt-4 px-6"},px={class:""},mx={key:2,class:"flex items-center justify-end py-4 px-6"},gx=Object.assign({name:"WpicCard"},{props:{title:String,inline:Boolean,loading:Boolean},setup(t){const e={pmi:"bg-white dark:bg-zinc-800/50 shadow-[0_4px_16px_0px_rgba(0,0,0,0.1)]","wpic-tools":"bg-white border border-gray-200 dark:bg-gray-940 dark:border-gray-920"},n={pmi:"font-bold","wpic-tools":"font-medium dark:text-gray-300"};return(r,i)=>{const o=a.resolveComponent("wpic-loading-panel");return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["rounded-lg wpic-card relative",{[e[a.unref(he).theme]]:!0,"wpic-card-inline":t.inline,"has-header":t.title||r.$slots.actions||r.$slots.title}])},[t.loading?(a.openBlock(),a.createBlock(o,{key:0,class:"absolute top-0 left-0 z-10",wave:""})):a.createCommentVNode("",!0),t.title||r.$slots.title||r.$slots.actions?(a.openBlock(),a.createElementBlock("div",hx,[t.title||r.$slots.title||r.$slots.actions?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["text-lg 2xl:text-xl flex items-center",[n[a.unref(he).theme]]])},[a.renderSlot(r.$slots,"title",{},()=>[a.createTextVNode(a.toDisplayString(t.title),1)])],2)):a.createCommentVNode("",!0),a.createElementVNode("div",px,[a.renderSlot(r.$slots,"actions")])])):a.createCommentVNode("",!0),a.renderSlot(r.$slots,"default"),r.$slots.buttons?(a.openBlock(),a.createElementBlock("div",mx,[a.renderSlot(r.$slots,"buttons")])):a.createCommentVNode("",!0)],2)}}}),yx={key:0,class:"pb-3 flex justify-betweeen h-12 items-center"},bx={class:"flex-1 text-lg dark:text-gray-300 font-semibold flex items-center"},kx=Object.assign({name:"WpicCardSection"},{props:{title:String,sub:Boolean,expand:Boolean},setup(t){const e={pmi:"mx-6","wpic-tools":"px-6"};return(n,r)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["border-b relative dark:border-gray-900 dark:text-gray-300 last:border-0 pb-6",{[`${e[a.unref(he).theme]}`]:!0,"pt-3":!(t.title&&n.$slots.actions&&n.$slots.title),"pt-6":!t.title&&!n.$slots.actions&&!n.$slots.title,"bg-gray-50 dark:bg-gray-930 last:rounded-b-lg":t.sub,"p-0! m-0!":t.expand}])},[t.title||n.$slots.title||n.$slots.actions?(a.openBlock(),a.createElementBlock("div",yx,[a.createElementVNode("div",bx,[a.renderSlot(n.$slots,"title",{},()=>[a.createTextVNode(a.toDisplayString(t.title),1)])]),a.renderSlot(n.$slots,"actions")])):a.createCommentVNode("",!0),a.renderSlot(n.$slots,"default")],2))}}),wx=a.createElementVNode("div",{class:""},null,-1),vx=a.createStaticVNode('<div class="-mt-2"><div class="absolute left-1/4 h-8 border-r border-gray-100 dark:border-gray-900"></div><div class="absolute left-1/2 h-8 border-r border-gray-100 dark:border-gray-900"></div><div class="absolute left-3/4 h-8 border-r border-gray-100 dark:border-gray-900"></div></div><div class="mt-7 text-gray-500 dark:text-gray-600"><div class="absolute left-0 text-xs">0%</div><div class="absolute left-1/4 -translate-x-1/4 text-xs">25%</div><div class="absolute left-1/2 -translate-x-1/2 text-xs">50%</div><div class="absolute right-1/4 translate-x-3/4 text-xs">75%</div><div class="absolute right-0 text-xs">100%</div></div>',2),xx=Object.assign({name:"WpicProgressBar"},{props:{percent:Number,value:Number,indicators:Boolean,background:{type:String,default:null},max:{type:Number,default:100},text:String},setup(t){const e=t,n=a.computed(()=>e.percent?e.percent:100/e.max*e.value),r={pmi:"h-2 ring-1 rounded-full ring-zinc-400","wpic-tools":"bg-gray-100 rounded-xs h-4 dark:bg-gray-900"},i={pmi:"bg-cyan-400 rounded-full ring-1 ring-cyan-400","wpic-tools":"bg-lime-500 rounded-xs dark:bg-lime-700"};return(o,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["relative flex",{"mb-4":t.indicators}])},[a.createElementVNode("div",{class:a.normalizeClass(["flex w-full relative",r[a.unref(he).theme]]),style:{"z-index":"1"}},[n.value>0?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({width:`${n.value}%`}),class:a.normalizeClass(["flex h-full",{[`${t.background}`]:!0,[`${i[a.unref(he).theme]}`]:!0}])},[a.createVNode(Mf,{full:"",text:`${n.value}%${t.text?t.text:""}`},{default:a.withCtx(()=>[wx]),_:1},8,["text"])],6)):a.createCommentVNode("",!0)],2),t.indicators?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[vx],64)):a.createCommentVNode("",!0)],2))}}),Ex={class:"leading-none"},Cx=Object.assign({name:"WpicTag"},{props:{clearable:Boolean,small:Boolean},emits:["clear"],setup(t,{emit:e}){const n={pmi:"border-cyan-500 bg-cyan-50 text-cyan-600 text-base ","wpic-tools":"border-none bg-gray-200 text-gray-700 text-sm dark:text-gray-400 dark:bg-gray-810"},r=e;function i(){r("clear")}return(o,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["wpic-tag select-none border inline-flex rounded-sm h-8 items-center justify-center pl-3 py-1",{"pr-3":!t.clearable,"pr-1":t.clearable,[n[a.unref(he).theme]]:!0}])},[a.createElementVNode("span",Ex,[a.renderSlot(o.$slots,"default")]),t.clearable?(a.openBlock(),a.createElementBlock("span",{key:0,onClick:i,class:"ml-2 mt-px cursor-pointer opacity-75 hover:opacity-100"},[a.createVNode($i,{class:"w-4 h-4"})])):a.createCommentVNode("",!0)],2))}}),Sx=Object.assign({name:"WpicTagGroup"},{props:{full:Boolean},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass({"w-full":t.full})},[a.createElementVNode("div",{class:a.normalizeClass(["ui-tag-group flex flex-wrap gap-2",{"w-full":t.full}])},[a.renderSlot(e.$slots,"default")],2)],2))}}),_x=t=>(a.pushScopeId("data-v-947735f2"),t=t(),a.popScopeId(),t),Ox={key:1,class:"w-full min-h-10 h-full rounded-lg bg-gray-100 dark:bg-gray-940 relative overflow-hidden"},Tx=[_x(()=>a.createElementVNode("div",{class:"absolute top-0 left-0 h-full w-full shimmer dark:dark-shimmer"},null,-1))],Nx=be(Object.assign({name:"WpicLoadingPanel"},{props:{color:{type:String,default:""},wave:{type:Boolean,default:!1}},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["w-full h-full flex items-center justify-center",{"py-3":!t.wave}])},[t.wave?(a.openBlock(),a.createElementBlock("div",Ox,Tx)):(a.openBlock(),a.createBlock(Fr,{key:0,color:t.color,class:"w-10 h-10"},null,8,["color"]))],2))}}),[["__scopeId","data-v-947735f2"]]),Mx={class:"text-base font-medium select-none"},Ki=Object.assign({name:"WpicPaginationItem"},{props:{active:Boolean,disabled:Boolean},setup(t){const e={pmi:"border-zinc-300 dark:border-zinc-700 text-zinc-600 dark:text-zinc-300 hover:bg-zinc-500 hover:text-white","wpic-tools":"dark:text-gray-400 hover:text-lime-600 dark:border-gray-900"},n={pmi:"bg-violet-800 border-violet-800 hover:bg-violet-900 hover:border-violet-900 text-white","wpic-tools":"bg-lime-500 border-lime-500 text-white dark:bg-lime-700 dark:border-lime-700"},r={pmi:"text-zinc-300","wpic-tools":"text-gray-300 dark:text-gray-700 dark:border-gray-900"};return(i,o)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["border rounded-sm flex items-center justify-center w-10 h-10 cursor-pointer",{[e[a.unref(he).theme]]:!t.active&&!t.disabled,[n[a.unref(he).theme]]:t.active&&!t.disabled,[r[a.unref(he).theme]]:t.disabled}])},[a.createElementVNode("span",Mx,[a.renderSlot(i.$slots,"default")])],2))}}),Ax={},Dx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},Lx=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L6.31 10l3.72-3.72a.75.75 0 1 0-1.06-1.06L4.72 9.47Zm9.25-4.25L9.72 9.47a.75.75 0 0 0 0 1.06l4.25 4.25a.75.75 0 1 0 1.06-1.06L11.31 10l3.72-3.72a.75.75 0 0 0-1.06-1.06Z","clip-rule":"evenodd"},null,-1)];function Bx(t,e){return a.openBlock(),a.createElementBlock("svg",Dx,Lx)}const Af=be(Ax,[["render",Bx]]),$x={},Ix={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},Vx=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z","clip-rule":"evenodd"},null,-1)];function Px(t,e){return a.openBlock(),a.createElementBlock("svg",Ix,Vx)}const Df=be($x,[["render",Px]]),Rx={},Fx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},zx=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M15.28 9.47a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 1 1-1.06-1.06L13.69 10 9.97 6.28a.75.75 0 0 1 1.06-1.06l4.25 4.25ZM6.03 5.22l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L8.69 10 4.97 6.28a.75.75 0 0 1 1.06-1.06Z","clip-rule":"evenodd"},null,-1)];function jx(t,e){return a.openBlock(),a.createElementBlock("svg",Fx,zx)}const Lf=be(Rx,[["render",jx]]),Hx={},Wx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},Ux=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)];function Yx(t,e){return a.openBlock(),a.createElementBlock("svg",Wx,Ux)}const Bf=be(Hx,[["render",Yx]]),qx={class:"wpic-pagination flex justify-between"},Kx={key:0,class:"flex items-center"},Gx={key:0},Jx={key:1,class:"flex flex-wrap gap-2"},Zx=Object.assign({name:"WpicPagination"},{props:{info:{type:Boolean,default:!0},pages:{type:Boolean,default:!0},perPages:{type:Boolean,default:!1},total:Number,perPage:{type:Number,default:10},currentPage:{type:Number,default:1},perPageOptions:{type:Array,default:()=>[10,20,50,100,200]}},emits:["update:perPage","update:currentPage","update:perPage"],setup(t,{expose:e,emit:n}){const{t:r}=zn(),i=t,o=a.computed(()=>i.perPageOptions.map(p=>({value:Number(p),label:r("wpiccomponents.per_page",{count:p})}))),s=n,l=a.computed(()=>Math.ceil(i.total/i.perPage)),c=a.computed(()=>{const p=l.value;if(!p||p===1)return[1];const m=i.currentPage,g=1;let y=Math.max(2,m-g),k=Math.min(p-1,m+g);m<=g+2&&(y=2,k=Math.min(2*g+2,p-1)),m>=p-g-1&&(y=Math.max(2,p-2*g-1),k=p-1);const x=[];for(let w=y;w<=k;w++)x.push(w);return y>2&&x.unshift("..."),k<p-1&&x.push("..."),[1,...x,p]});function d(p){p>=1&&p<=l.value&&s("update:currentPage",p)}function u(){return i.perPage*(i.currentPage-1)+1}function f(){return i.perPage*i.currentPage>i.total?i.total:i.perPage*i.currentPage}async function h(p){s("update:perPage",p),s("update:currentPage",1)}return e({getStart:u,getEnd:f}),(p,m)=>{const g=a.resolveComponent("wpic-choice-list");return a.openBlock(),a.createElementBlock("div",qx,[t.info?(a.openBlock(),a.createElementBlock("div",Kx,[t.total>0?(a.openBlock(),a.createElementBlock("span",Gx,a.toDisplayString(p.$t("wpiccomponents.pagination",{start:u(),end:f(),total:t.total})),1)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),t.pages?(a.openBlock(),a.createElementBlock("div",Jx,[a.createVNode(Ki,{onClick:m[0]||(m[0]=y=>d(1)),disabled:t.currentPage===1||l.value==0||!l.value},{default:a.withCtx(()=>[a.createVNode(Af,{class:"w-5 h-5 select-none"})]),_:1},8,["disabled"]),a.createVNode(Ki,{onClick:m[1]||(m[1]=y=>d(t.currentPage-1)),disabled:t.currentPage===1||l.value==0||!l.value},{default:a.withCtx(()=>[a.createVNode(Df,{class:"w-5 h-5 select-none"})]),_:1},8,["disabled"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,y=>(a.openBlock(),a.createBlock(Ki,{key:`page_${y}`,onClick:k=>d(y),active:y===t.currentPage,disabled:l.value==0||!l.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(y),1)]),_:2},1032,["onClick","active","disabled"]))),128)),a.createVNode(Ki,{onClick:m[2]||(m[2]=y=>d(t.currentPage+1)),disabled:t.currentPage===l.value||l.value==0||!l.value},{default:a.withCtx(()=>[a.createVNode(Bf,{class:"w-5 h-5 select-none"})]),_:1},8,["disabled"]),a.createVNode(Ki,{onClick:m[3]||(m[3]=y=>d(l.value)),disabled:t.currentPage===l.value||l.value==0||!l.value},{default:a.withCtx(()=>[a.createVNode(Lf,{class:"w-5 h-5 select-none"})]),_:1},8,["disabled"]),t.perPages?(a.openBlock(),a.createBlock(g,{key:0,modelValue:t.perPage,"onUpdate:modelValue":h,options:o.value},null,8,["modelValue","options"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)])}}}),$f=(t,e)=>{const n=t.column.children&&t.column.children.default&&typeof t.column.children.default=="function"?t.column.children.default({item:t.item}):t.column.children;return a.h("td",e.attrs,n)};$f.props=["column","item","rowIndex"];const es=$f,Xx={},Qx={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},eE=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"},null,-1)];function tE(t,e){return a.openBlock(),a.createElementBlock("svg",Qx,eE)}const nE=be(Xx,[["render",tE]]),rE={class:"font-semibold"},If={__name:"TotalRow",props:{columns:Array,noXPadding:Boolean,totalItem:{},position:String,checkable:Boolean},setup(t){const e={pmi:"bg-white dark:text-zinc-300 dark:border-zinc-900 dark:bg-zinc-800","wpic-tools":"bg-gray-50 border-gray-200 dark:text-gray-300 dark:border-gray-900 dark:bg-gray-810/45"};return(n,r)=>(a.openBlock(),a.createElementBlock("tr",rE,[t.checkable?(a.openBlock(),a.createBlock(es,{class:a.normalizeClass(["py-3 first:pl-6 pr-6 border-t",{[`${e[a.unref(he).theme]}`]:!0,"sticky left-0":!0,"border-b":t.position==="header","border-t":t.position==="footer","first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":t.position==="footer","first:rounded-bl-lg":t.position==="footer"}]),id:"total_0",column:{},key:"tr_total_0"},null,8,["class"])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.columns,(i,o)=>(a.openBlock(),a.createBlock(es,{class:a.normalizeClass(["py-3 first:pl-6 pr-6 border-t",{[`${e[a.unref(he).theme]}`]:!0,"sticky left-0":o===0,"border-b":t.position==="header","border-t":t.position==="footer","first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":t.position==="footer","first:rounded-bl-lg":t.position==="footer","text-center":i.align=="center","text-right":i.align=="right"}]),id:`total_${o}`,column:i,item:t.totalItem,key:`tr_total_${o}`},null,8,["class","id","column","item"]))),128))]))}},iE={},oE={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6"},sE=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"},null,-1)];function lE(t,e){return a.openBlock(),a.createElementBlock("svg",oE,sE)}const aE=be(iE,[["render",lE]]),cE={},dE={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},uE=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"},null,-1)];function fE(t,e){return a.openBlock(),a.createElementBlock("svg",dE,uE)}const hE=be(cE,[["render",fE]]),pE={class:"wpic-table"},mE={key:0,class:"px-2 py-1 flex justify-between border-b dark:border-gray-900"},gE={class:"flex items-center gap-2"},yE={class:"flex items-center gap-2"},bE={class:"w-full rounded-lg"},kE={key:0,class:"w-16"},wE=["width"],vE=["width"],xE={class:"flex justify-center items-center h-full"},EE=["onClick"],CE={class:"rounded-b-lg relative"},SE={key:0},_E=[a.createElementVNode("td",{class:"text-center py-3"},"   ",-1)],OE={class:"flex justify-center items-center h-full"},TE={key:1},NE={key:0,class:"text-center text-gray-400 py-3"},ME=Object.assign({name:"WpicTable"},{props:{data:{type:Array,default:()=>[]},stripe:Boolean,loading:Boolean,hideHeaders:Boolean,sortOptions:{},border:Boolean,noXPadding:Boolean,totalItem:{},totalOnBottom:Boolean,totalOnTop:Boolean,valign:{type:String,default:"center"},small:Boolean,noRadius:Boolean,stickyHeader:Boolean,columnToggleable:Boolean,checkable:Boolean,itemId:{type:String,default:"id"}},emits:["changeSort","expandRow"],setup(t,{expose:e,emit:n}){const r=t,i={pmi:"","wpic-tools":"border-gray-300 dark:border-gray-700"},o={pmi:"bg-zinc-50 dark:bg-zinc-800/60 text-zinc-500 dark:text-zinc-400 dark:border-zinc-900","wpic-tools":"bg-gray-100 text-gray-600 border-gray-200 dark:bg-gray-930 dark:border-gray-900 dark:text-gray-500"},s={pmi:"","wpic-tools":"dark:border-gray-900"},l={pmi:"","wpic-tools":""},c={pmi:"bg-white dark:bg-zinc-800 dark:text-zinc-300 dark:border-zinc-900","wpic-tools":"bg-white text-gray-500 !font-normal border-gray-200 dark:bg-gray-940 dark:border-gray-920 dark:text-gray-400"},d={pmi:"group-[.is-odd]:bg-white group-[.is-even]:bg-gray-50","wpic-tools":"group-[.is-odd]:bg-white group-[.is-even]:bg-gray-50 border-gray-200 dark:group-[.is-odd]:bg-gray-940 dark:group-[.is-even]:bg-gray-930"},u={pmi:"bg-zinc-900/10","wpic-tools":"bg-gray-900/10"},f=n;a.onMounted(()=>{k()});const h=a.getCurrentInstance();a.provide("wtable",h==null?void 0:h.proxy);const p=a.useSlots(),m=a.ref([]),g=a.ref([]),y=a.computed(()=>r.columnToggleable?m.value.filter(L=>g.value.includes(L.field)||!L.selectable):m.value.filter(L=>L.visible||!L.selectable));function k(){const L=(D,C)=>{let I={};for(let R in D){if(typeof D[R].default=="boolean"&&C[R]!==void 0){I[R]=C[R]!==!1;continue}if(C[R]!==void 0){I[R]=C[R];continue}if(typeof D[R].default=="function"){I[R]=D[R].default();continue}I[R]=D[R].default}return I};let j=[];(p.default&&p.default()||[]).forEach(D=>{var C,I;((C=D.type)==null?void 0:C.name)==="WpicTableColumn"?j.push(D):(I=D.children)!=null&&I.length&&D.children.forEach(R=>{var ee;((ee=R.type)==null?void 0:ee.name)==="WpicTableColumn"&&j.push(R)})}),m.value=j.map(D=>{let C=D.children,I=D.props||{},{field:R,label:ee,help:te,width:ce,minWidth:ue,maxWidth:V,sortable:W,selectable:K,render:q,type:H,align:de,visible:ae,noPadding:we}=L(D.type.props,I);return R||(R=$(ee)),K&&ae&&g.value.push(R),{label:ee,help:te,width:ce,minWidth:ue,maxWidth:V,type:H,align:de,sortable:W,selectable:K,field:R,render:q,children:C,visible:ae,noPadding:we}})}function x(L){var z,D;let j=(z=r.sortOptions)==null?void 0:z.sortDirection;((D=r.sortOptions)==null?void 0:D.sortBy)===L&&(j=j==="asc"?"desc":"asc"),f("changeSort",{sortDirection:j,sortBy:L})}a.watch(()=>p.default,L=>{k()},{deep:!0});const w=a.reactive({});function b({index:L,item:j}){w[L]?w[L]=null:(w[L]=!0,f("expandRow",{index:L,item:j}))}const S=a.ref([]);function v(L){const j=P(L,r.itemId);S.value.includes(j)?(S.value.splice(S.value.indexOf(j),1),O.value=!1):S.value.push(j)}const O=a.ref(!1);function B(){if(O.value=!O.value,S.value=[],O.value)for(let L of r.data){let j=P(L,r.itemId);S.value.push(j)}}function A(){O.value=!1,S.value=[]}e({buildColumns:k,selectedRows:S,selectedColumns:g,resetSelectedRows:A});function P(L,j){return j.split(".").reduce((z,D)=>z?z[D]:void 0,L)}function $(L){return!L||typeof L!="string"?"":L.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"")}return(L,j)=>{const z=a.resolveComponent("wpic-choice-list"),D=a.resolveComponent("wpic-form-field");return a.openBlock(),a.createElementBlock("div",pE,[L.$slots.header||L.$slots.actions||t.columnToggleable?(a.openBlock(),a.createElementBlock("div",mE,[a.createElementVNode("div",gE,[a.renderSlot(L.$slots,"header")]),a.createElementVNode("div",yE,[a.renderSlot(L.$slots,"actions"),a.createVNode(z,{multiple:"",modelValue:g.value,"onUpdate:modelValue":j[0]||(j[0]=C=>g.value=C),"hide-select":"","hide-chevron":"",naked:"",options:m.value.filter(C=>C.selectable).map(C=>({label:C.label,value:C.field}))},{default:a.withCtx(()=>[a.createVNode(Ni,{medium:"",square:"",colorless:"",class:"ml-px"},{default:a.withCtx(()=>[a.createVNode(hE,{class:"w-5 h-5"})]),_:1})]),_:1},8,["modelValue","options"])])])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["wpic-table-content relative w-full rounded-lg overflow-hidden-",{"no-radius rounded-none":t.noRadius||t.columnToggleable,border:t.border,[`${i[a.unref(he).theme]}`]:!0}])},[a.createElementVNode("div",{class:a.normalizeClass(["",{"overflow-y-auto":!t.stickyHeader}])},[a.createElementVNode("table",bE,[a.createElementVNode("colgroup",null,[t.checkable?(a.openBlock(),a.createElementBlock("col",kE)):a.createCommentVNode("",!0),y.value.find(C=>C.type=="expand")?(a.openBlock(),a.createElementBlock("col",{key:1,style:a.normalizeStyle({minWidth:`${y.value.find(C=>C.type=="expand").minWidth}px`}),width:y.value.find(C=>C.type=="expand").width,class:"w-16"},null,12,wE)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value.filter(C=>C.type!="expand"),(C,I)=>(a.openBlock(),a.createElementBlock("col",{style:a.normalizeStyle({minWidth:`${C.minWidth}px`,maxWidth:`${C.maxWidth}px`}),width:C.width,key:I},null,12,vE))),128))]),t.hideHeaders?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("thead",{key:0,class:a.normalizeClass(["rounded-t-lg",{"sticky top-0 z-10":t.stickyHeader}])},[a.createElementVNode("tr",null,[t.checkable?(a.openBlock(),a.createElementBlock("th",{key:0,class:a.normalizeClass(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6",[`${o[a.unref(he).theme]}`]])},[a.createElementVNode("div",xE,[a.createVNode(D,{slim:"","hide-error":"",checkbox:"",modelValue:O.value,"onUpdate:modelValue":B},null,8,["modelValue"])])],2)):a.createCommentVNode("",!0),y.value.find(C=>C.type=="expand")?(a.openBlock(),a.createElementBlock("th",{key:1,class:a.normalizeClass(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6",[`${o[a.unref(he).theme]}`]])},null,2)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value.filter(C=>C.type!="expand"),(C,I)=>{var R,ee;return a.openBlock(),a.createElementBlock("th",{class:a.normalizeClass(["first:rounded-tl-lg last:rounded-tr-lg py-0 border-b first:pl-6 pr-6",{[`${o[a.unref(he).theme]}`]:!0,"sticky top-0 left-0":I===0}]),style:a.normalizeStyle({maxWidth:`${C.maxWidth}px`})},[a.createElementVNode("div",{onClick:()=>{C.sortable&&x(C.field)},class:a.normalizeClass(["flex items-center lg:text-base rounded-lg",{"py-3":!t.small,"py-1 text-sm":t.small,"cursor-pointer":C.sortable&&C.field,"justify-center":C.align=="center","justify-end":C.align=="right"}])},[a.createElementVNode("span",{class:a.normalizeClass(["select-none font-medium text-sm",{"text-right":C.align=="right"}])},a.toDisplayString(C.label),3),C.sortable&&C.field?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["ml-1",{"opacity-25":C.field!=((R=t.sortOptions)==null?void 0:R.sortBy)}])},[a.createVNode(nE,{class:a.normalizeClass(["w-4 h-4",{"rotate-180":((ee=t.sortOptions)==null?void 0:ee.sortDirection)==="asc"}])},null,8,["class"])],2)):a.createCommentVNode("",!0)],10,EE)],6)}),256))])],2)),a.createElementVNode("tbody",CE,[t.loading?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createElementVNode("div",{class:a.normalizeClass(["inset-0 z-10 absolute flex items-center justify-center",[u[a.unref(he).theme]]])},[a.createVNode(Fr,{class:"w-6 h-6"})],2),t.data.length?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("tr",SE,_E))],64)):a.createCommentVNode("",!0),t.totalItem&&t.totalOnTop?(a.openBlock(),a.createBlock(If,{key:1,checkable:t.checkable,position:"header",columns:y.value,noXPadding:t.noXPadding,totalItem:t.totalItem},null,8,["checkable","columns","noXPadding","totalItem"])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.data,(C,I)=>{var R,ee,te,ce,ue;return a.openBlock(),a.createElementBlock(a.Fragment,{key:`tr_${I}`},[a.createElementVNode("tr",{class:a.normalizeClass(["tr group border-b last:border-b-0 overflow-hidden",{"is-odd":I%2==0,"is-even":I%2!=0,[s[a.unref(he).theme]]:!0}])},[t.checkable?(a.openBlock(),a.createElementBlock("td",{key:0,class:a.normalizeClass([{[`${c[a.unref(he).theme]}`]:!0,[`${d[a.unref(he).theme]}`]:t.stripe}])},[a.createElementVNode("div",OE,[a.createVNode(D,{slim:"","hide-error":"",checkbox:"",modelValue:S.value.includes(P(C,t.itemId)),checkboxValue:P(C,t.itemId),"onUpdate:modelValue":V=>v(C)},null,8,["modelValue","checkboxValue","onUpdate:modelValue"])])],2)):a.createCommentVNode("",!0),y.value.find(V=>V.type=="expand")?(a.openBlock(),a.createElementBlock("td",{key:1,class:a.normalizeClass([[{"first:pl-6 pr-6 last:pr-6":!t.noXPadding,"first:pl-0 pr-6 last:pr-0":t.noXPadding,"align-top py-5":t.valign=="top",[`${c[a.unref(he).theme]}`]:!0,[`${d[a.unref(he).theme]}`]:t.stripe}],"border-t border-gray-200 leading-tight h-16 py-2 dark:border-gray-920"])},[a.createVNode(Ni,{small:"",square:"",onClick:V=>b({item:C,index:I})},{default:a.withCtx(()=>[w[I]?(a.openBlock(),a.createBlock(tx,{key:0,class:"w-4 h-4"})):(a.openBlock(),a.createBlock(aE,{key:1,class:"w-4 h-4"}))]),_:2},1032,["onClick"])],2)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value.filter(V=>V.type!="expand"),(V,W)=>{var K,q;return a.openBlock(),a.createBlock(es,{class:a.normalizeClass(["lg:text-base h-full table-cell",{"text-sm lg:text-sm py-1!":t.small,"sticky left-0 shadow-sm":W===0,[`${c[a.unref(he).theme]}`]:!0,[`${d[a.unref(he).theme]}`]:t.stripe,"py-3 first:pl-6 pr-6":!V.noPadding,"first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":I===((K=t.data)==null?void 0:K.length)-1&&!t.totalItem&&!y.value.find(H=>H.type=="expand")&&!t.noRadius,"first:rounded-bl-lg":I===((q=t.data)==null?void 0:q.length)-1&&!t.totalItem&&!y.value.find(H=>H.type=="expand")&&!t.noRadius,"text-center justify-center":V.align=="center","text-right justify-end":V.align=="right","align-top py-5":t.valign=="top"}]),style:a.normalizeStyle({maxWidth:`${V.maxWidth}px`}),id:`${I}_${W}`,column:V,item:C,rowIndex:I,key:W},null,8,["class","style","id","column","item","rowIndex"])}),128))],2),y.value.find(V=>V.type=="expand")?a.withDirectives((a.openBlock(),a.createElementBlock("tr",{key:0,class:a.normalizeClass([{[s[a.unref(he).theme]]:!t.stripe,[l[a.unref(he).theme]]:t.stripe},"tr border-b last:border-b-0 overflow-hidden"])},[a.createVNode(es,{class:a.normalizeClass(["lg:text-base bg-gray-50! dark:bg-gray-940!",{[`${c[a.unref(he).theme]}`]:!0,"py-3 first:pl-6 pr-6":!((R=y.value.find(V=>V.type=="expand"))!=null&&R.noPadding),"p-0":(ee=y.value.find(V=>V.type=="expand"))==null?void 0:ee.noPadding,"first:pl-0 last:pr-0":t.noXPadding,"last:rounded-br-lg":I===((te=t.data)==null?void 0:te.length)-1&&!t.totalItem,"first:rounded-bl-lg":I===((ce=t.data)==null?void 0:ce.length)-1&&!t.totalItem,"text-center":y.value.find(V=>V.type=="expand").align=="center","text-right":y.value.find(V=>V.type=="expand").align=="right"}]),column:y.value.find(V=>V.type=="expand"),rowIndex:I,colspan:(ue=y.value)==null?void 0:ue.length,item:C},null,8,["class","column","rowIndex","colspan","item"])],2)),[[a.vShow,w[I]]]):a.createCommentVNode("",!0)],64)}),128))]),t.totalItem&&t.totalOnBottom?(a.openBlock(),a.createElementBlock("tfoot",TE,[a.createVNode(If,{checkable:t.checkable,position:"footer",columns:y.value,noXPadding:t.noXPadding,totalItem:t.totalItem},null,8,["checkable","columns","noXPadding","totalItem"])])):a.createCommentVNode("",!0)])],2),!t.loading&&!t.data.length?(a.openBlock(),a.createElementBlock("div",NE," No Data ")):a.createCommentVNode("",!0)],2)])}}}),AE={name:"WpicTableColumn",props:{label:{type:String},help:{type:String},field:{type:String,default:""},selectable:{type:Boolean,default:!0},sortable:{type:Boolean,default:!1},type:{type:String,default:"default"},width:{type:[String,Number],default:null},minWidth:{type:[String,Number],default:null},maxWidth:{type:[String,Number],default:null},align:{type:String,default:"left"},visible:{type:Boolean,default:!0},noPadding:{type:Boolean,default:!1}},setup(t){const e=inject("wtable",null);return onMounted(()=>{e&&e.buildColumns&&e.buildColumns()}),onBeforeUnmount(()=>{e&&e.buildColumns&&e.buildColumns()}),()=>null}};function rt(t){this.content=t}rt.prototype={constructor:rt,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new rt(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new rt(n)},addToStart:function(t,e){return new rt([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new rt(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new rt(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=rt.from(t),t.size?new rt(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=rt.from(t),t.size?new rt(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=rt.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}},rt.from=function(t){if(t instanceof rt)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new rt(e)};function Vf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=Vf(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function Pf(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),l=e.child(--o),c=s.nodeSize;if(s==l){n-=c,r-=c;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let d=0,u=Math.min(s.text.length,l.text.length);for(;d<u&&s.text[s.text.length-d-1]==l.text[l.text.length-d-1];)d++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let d=Pf(s.content,l.content,n-1,r-1);if(d)return d}n-=c,r-=c}}class J{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,l=0;l<n;s++){let c=this.content[s],d=l+c.nodeSize;if(d>e&&r(c,i+l,o||null,s)!==!1&&c.content.size){let u=l+1;c.nodesBetween(Math.max(0,e-u),Math.min(c.content.size,n-u),r,i+u)}l=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(l,c)=>{let d=l.isText?l.text.slice(Math.max(e,c)-c,n-c):l.isLeaf?i?typeof i=="function"?i(l):i:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&d||l.isTextblock)&&r&&(s?s=!1:o+=r),o+=d},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new J(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let l=this.content[o],c=s+l.nodeSize;c>e&&((s<e||c>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),i+=l.nodeSize),s=c}return new J(r,i)}cutByIndex(e,n){return e==n?J.empty:e==0&&n==this.content.length?this:new J(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new J(i,o)}addToStart(e){return new J([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new J(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return Vf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Pf(this,e,n,r)}findIndex(e,n=-1){if(e==0)return ts(0,e);if(e==this.size)return ts(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=e)return s==e||n>0?ts(r+1,s):ts(r,i);i=s}}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 J.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new J(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return J.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new J(n||e,r)}static from(e){if(!e)return J.empty;if(e instanceof J)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new J([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}J.empty=new J([],0);const Zl={index:0,offset:0};function ts(t,e){return Zl.index=t,Zl.offset=e,Zl}function ns(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(!ns(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!ns(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let $e=class Bc{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}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&&ns(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Bc.none;if(e instanceof Bc)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};$e.none=[];class rs extends Error{}class re{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=Ff(this.content,e+this.openStart,n);return r&&new re(r,this.openStart,this.openEnd)}removeBetween(e,n){return new re(Rf(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 re.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new re(J.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new re(e,r,i)}}re.empty=new re(J.empty,0,0);function Rf(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(i==e||o.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Rf(o.content,e-i-1,n-i-1)))}function Ff(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return t.cut(0,e).append(n).append(t.cut(e));let l=Ff(s.content,e-o-1,n);return l&&t.replaceChild(i,s.copy(l))}function DE(t,e,n){if(n.openStart>t.depth)throw new rs("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new rs("Inconsistent open depths");return zf(t,e,n,0)}function zf(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=zf(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,l=s.content;return vr(s,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=LE(n,t);return vr(o,Hf(t,s,l,e,r))}else return vr(o,is(t,e,r))}function jf(t,e){if(!e.type.compatibleContent(t.type))throw new rs("Cannot join "+e.type.name+" onto "+t.type.name)}function Xl(t,e,n){let r=t.node(n);return jf(r,e.node(n)),r}function wr(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 Gi(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(wr(t.nodeAfter,r),o++));for(let l=o;l<s;l++)wr(i.child(l),r);e&&e.depth==n&&e.textOffset&&wr(e.nodeBefore,r)}function vr(t,e){return t.type.checkContent(e),t.copy(e)}function Hf(t,e,n,r,i){let o=t.depth>i&&Xl(t,e,i+1),s=r.depth>i&&Xl(n,r,i+1),l=[];return Gi(null,t,i,l),o&&s&&e.index(i)==n.index(i)?(jf(o,s),wr(vr(o,Hf(t,e,n,r,i+1)),l)):(o&&wr(vr(o,is(t,e,i+1)),l),Gi(e,n,i,l),s&&wr(vr(s,is(n,r,i+1)),l)),Gi(r,null,i,l),new J(l)}function is(t,e,n){let r=[];if(Gi(null,t,n,r),t.depth>n){let i=Xl(t,e,n+1);wr(vr(i,is(t,e,n+1)),r)}return Gi(e,null,n,r),new J(r)}function LE(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(J.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Ji{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return $e.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let l=r;r=i,i=l}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].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 ss(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:l,offset:c}=s.content.findIndex(o),d=o-c;if(r.push(s,l,i+c),!d||(s=s.child(l),s.isText))break;o=d-1,i+=c+1}return new Ji(n,r,o)}static resolveCached(e,n){let r=Wf.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else Wf.set(e,r=new BE);let i=r.elts[r.i]=Ji.resolve(e,n);return r.i=(r.i+1)%$E,i}}class BE{constructor(){this.elts=[],this.i=0}}const $E=12,Wf=new WeakMap;class ss{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 IE=Object.create(null);let Wn=class $c{constructor(e,n,r,i=$e.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||J.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&ns(this.attrs,n||e.defaultAttrs||IE)&&$e.sameSet(this.marks,r||$e.none)}copy(e=null){return e==this.content?this:new $c(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new $c(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 re.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),l=i.start(s),d=i.node(s).content.cut(i.pos-l,o.pos-l);return new re(d,i.depth-s,o.depth-s)}replace(e,n,r){return DE(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Ji.resolveCached(this,e)}resolveNoCache(e){return Ji.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Uf(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=J.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let c=i;c<o;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.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=$e.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(!$e.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=J.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};Wn.prototype.text=void 0;class ls extends Wn{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Uf(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 ls(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ls(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 Uf(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class xr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new VE(e,n);if(r.next==null)return xr.empty;let i=Yf(r);r.next&&r.err("Unexpected trailing text");let o=WE(HE(i));return UE(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(s,l){let c=s.matchFragment(e,r);if(c&&(!n||c.validEnd))return J.from(l.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:u,next:f}=s.next[d];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let h=o(f,l.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let l=i;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:l,next:c}=o.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!i.type||c.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),n[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
28
28
  `)}}xr.empty=new xr(!0);class VE{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 Yf(t){let e=[];do e.push(PE(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function PE(t){let e=[];do e.push(RE(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function RE(t){let e=jE(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=FE(t,e);else break;return e}function qf(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function FE(t,e){let n=qf(t),r=n;return t.eat(",")&&(t.next!="}"?r=qf(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function zE(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function jE(t){if(t.eat("(")){let e=Yf(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=zE(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 HE(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,c){let d={term:c,to:l};return e[s].push(d),d}function i(s,l){s.forEach(c=>c.to=l)}function o(s,l){if(s.type=="choice")return s.exprs.reduce((c,d)=>c.concat(o(d,l)),[]);if(s.type=="seq")for(let c=0;;c++){let d=o(s.exprs[c],l);if(c==s.exprs.length-1)return d;i(d,l=n())}else if(s.type=="star"){let c=n();return r(l,c),i(o(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=n();return i(o(s.expr,l),c),i(o(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(l)].concat(o(s.expr,l));if(s.type=="range"){let c=l;for(let d=0;d<s.min;d++){let u=n();i(o(s.expr,c),u),c=u}if(s.max==-1)i(o(s.expr,c),c);else for(let d=s.min;d<s.max;d++){let u=n();r(c,u),i(o(s.expr,c),u),c=u}return[r(c)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function Kf(t,e){return e-t}function Gf(t,e){let n=[];return r(e),n.sort(Kf);function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:l,to:c}=o[s];!l&&n.indexOf(c)==-1&&r(c)}}}function WE(t){let e=Object.create(null);return n(Gf(t,0));function n(r){let i=[];r.forEach(s=>{t[s].forEach(({term:l,to:c})=>{if(!l)return;let d;for(let u=0;u<i.length;u++)i[u][0]==l&&(d=i[u][1]);Gf(t,c).forEach(u=>{d||i.push([l,d=[]]),d.indexOf(u)==-1&&d.push(u)})})});let o=e[r.join(",")]=new xr(r.indexOf(t.length-1)>-1);for(let s=0;s<i.length;s++){let l=i[s][1].sort(Kf);o.next.push({type:i[s][0],next:e[l.join(",")]||n(l)})}return o}}function UE(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let l=0;l<i.next.length;l++){let{type:c,next:d}=i.next[l];s.push(c.name),o&&!(c.isText||c.hasRequiredAttrs())&&(o=!1),r.indexOf(d)==-1&&r.push(d)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Jf(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 Zf(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Xf(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function Qf(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new qE(t,r,e[r]);return n}let eh=class Vg{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=Qf(e,r.attrs),this.defaultAttrs=Jf(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==xr.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:Zf(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Wn(this,this.computeAttrs(e),J.from(n),$e.setFrom(r))}createChecked(e=null,n,r){return n=J.from(n),this.checkContent(n),new Wn(this,this.computeAttrs(e),n,$e.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=J.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(J.empty,!0);return o?new Wn(this,e,n.append(o),$e.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){Xf(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:$e.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new Vg(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function YE(t,e,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}class qE{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?YE(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class as{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=Qf(e,i.attrs),this.excluded=null;let o=Jf(this.attrs);this.instance=o?new $e(this,o):null}create(e=null){return!e&&this.instance?this.instance:new $e(this,Zf(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new as(o,i++,n,s)),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){Xf(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class th{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=rt.from(e.nodes),n.marks=rt.from(e.marks||{}),this.nodes=eh.compile(this.spec.nodes,this),this.marks=as.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",l=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=xr.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=l=="_"?null:l?nh(this,l.split(" ")):l==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:nh(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof eh){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new ls(r,r.defaultAttrs,e,$e.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return Wn.fromJSON(this,e)}markFromJSON(e){return $e.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function nh(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let l in t.marks){let c=t.marks[l];(i=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function KE(t){return t.tag!=null}function GE(t){return t.style!=null}class Un{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(KE(i))this.tags.push(i);else if(GE(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new sh(this,n,!1);return r.addAll(e,$e.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new sh(this,n,!0);return r.addAll(e,$e.none,n.from,n.to),re.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(XE(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let c=s.getAttrs(n);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let l=n[s];if((l.priority==null?50:l.priority)<o)break}n.splice(s,0,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=lh(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=lh(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Un(e,Un.schemaRules(e)))}}const rh={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},JE={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},ih={ol:!0,ul:!0},Zi=1,Ql=2,cs=4;function oh(t,e,n){return e!=null?(e?Zi:0)|(e==="full"?Ql:0):t&&t.whitespace=="pre"?Zi|Ql:n&-5}class ds{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=$e.none,this.match=o||(s&cs?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(J.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Zi)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=J.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(J.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&&!rh.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class sh{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,o,s=oh(null,n.preserveWhitespace,0)|(r?cs:0);i?o=new ds(i.type,i.attrs,$e.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new ds(null,null,$e.none,!0,null,s):o=new ds(e.schema.topNodeType,null,$e.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,o=i.options&Ql?"full":this.localPreserveWS||(i.options&Zi)>0;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)o!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
29
29
  `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],l=e.previousSibling;(!s||l&&l.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;ih.hasOwnProperty(s)&&this.parser.normalizeLists&&ZE(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(c?c.ignore:JE.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(e=c.skip);let d,u=this.needsBlock;if(rh.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),d=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let f=c&&c.skip?n:this.readStyles(e,n);f&&this.addAll(e,f),d&&this.sync(o),this.needsBlock=u}else{let d=this.readStyles(e,n);d&&this.addElementByRule(e,c,d,c.consuming===!1?l:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
30
30
  `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let l=void 0;;){let c=this.parser.matchStyle(o,s,this,l);if(!c)break;if(c.ignore)return null;if(c.clearMark?n=n.filter(d=>!c.clearMark(d)):n=n.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)l=c;else break}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r)||this.leafFallback(e,r);else{let c=this.enter(s,n.attrs||null,r,n.preserveWhitespace);c&&(o=!0,r=c)}else{let c=this.parser.schema.marks[n.mark];r=r.concat(c.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(c=>this.insertNode(c,r));else{let c=e;typeof n.contentElement=="string"?c=e.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(e):n.contentElement&&(c=n.contentElement),this.findAround(e,c,!0),this.addAll(c,r),this.findAround(e,c,!1)}o&&this.sync(l)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=i==null?null:e.childNodes[i];s!=l;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],l=s.findWrapping(e);if(l&&(!r||r.length>l.length)&&(r=l,i=s,!l.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)n=this.enterInner(r[o],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let r=this.findPlace(e,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=$e.none;for(let s of r.concat(e.marks))(i.type?i.type.allowsMarkType(s.type):ah(s.type,e.type))&&(o=s.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=oh(e,o,s.options);s.options&cs&&s.content.length==0&&(l|=cs);let c=$e.none;return r=r.filter(d=>(s.type?s.type.allowsMarkType(d.type):ah(d.type,e))?(c=d.addToSet(c),!1):!0),this.nodes.push(new ds(e,n,c,i,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Zi)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(l,c)=>{for(;l>=0;l--){let d=n[l];if(d==""){if(l==n.length-1||l==0)continue;for(;c>=o;c--)if(s(l-1,c))return!0;return!1}else{let u=c>0||c==0&&i?this.nodes[c].type:r&&c>=o?r.node(c-o).type:null;if(!u||u.name!=d&&!u.isInGroup(d))return!1;c--}}return!0};return s(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 ZE(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&ih.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function XE(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function lh(t){let e={};for(let n in t)e[n]=t[n];return e}function ah(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=l=>{o.push(l);for(let c=0;c<l.edgeCount;c++){let{type:d,next:u}=l.edge(c);if(d==e||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class Er{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=ea(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let l=0,c=0;for(;l<o.length&&c<s.marks.length;){let d=s.marks[c];if(!this.marks[d.type.name]){c++;continue}if(!d.eq(o[l][0])||d.type.spec.spanning===!1)break;l++,c++}for(;l<o.length;)i=o.pop()[1];for(;c<s.marks.length;){let d=s.marks[c++],u=this.serializeMark(d,s.isInline,n);u&&(o.push([d,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=us(ea(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&us(ea(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return us(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Er(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=ch(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return ch(e.marks)}}function ch(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ea(t){return t.document||window.document}const dh=new WeakMap;function QE(t){let e=dh.get(t);return e===void 0&&dh.set(t,e=eC(t)),e}function eC(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function us(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=QE(r))&&o.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 s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let l,c=n?t.createElementNS(n,i):t.createElement(i),d=e[1],u=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){u=2;for(let f in d)if(d[f]!=null){let h=f.indexOf(" ");h>0?c.setAttributeNS(f.slice(0,h),f.slice(h+1),d[f]):c.setAttribute(f,d[f])}}for(let f=u;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:p,contentDOM:m}=us(t,h,n,r);if(c.appendChild(p),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:c,contentDOM:l}}const uh=65535,fh=Math.pow(2,16);function tC(t,e){return t+e*fh}function hh(t){return t&uh}function nC(t){return(t-(t&uh))/fh}const ph=1,mh=2,fs=4,gh=8;class ta{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&gh)>0}get deletedBefore(){return(this.delInfo&(ph|fs))>0}get deletedAfter(){return(this.delInfo&(mh|fs))>0}get deletedAcross(){return(this.delInfo&fs)>0}}class Bt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Bt.empty)return Bt.empty}recover(e){let n=0,r=hh(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+nC(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?i:0);if(c>e)break;let d=this.ranges[l+o],u=this.ranges[l+s],f=c+d;if(e<=f){let h=d?e==c?-1:e==f?1:n:n,p=c+i+(h<0?0:u);if(r)return p;let m=e==(n<0?c:f)?null:tC(l/3,e-c),g=e==c?mh:e==f?ph:fs;return(n<0?e!=c:e!=f)&&(g|=gh),new ta(p,g,m)}i+=u-d}return r?e+i:new ta(e+i,0,null)}touches(e,n){let r=0,i=hh(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;let d=this.ranges[l+o],u=c+d;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+s]-d}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],l=s-(this.inverted?o:0),c=s+(this.inverted?0:o),d=this.ranges[i+n],u=this.ranges[i+r];e(l,l+d,c,c+u),o+=u-d}}invert(){return new Bt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Bt.empty:new Bt(e<0?[0,-e,0]:[0,0,e])}}Bt.empty=new Bt([]);class Qr{constructor(e=[],n,r=0,i=e.length){this.maps=e,this.mirror=n,this.from=r,this.to=i}slice(e=0,n=this.maps.length){return new Qr(this.maps,this.mirror,e,n)}copy(){return new Qr(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,n){this.to=this.maps.push(e),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(e){for(let n=0,r=this.maps.length;n<e.maps.length;n++){let i=e.getMirror(n);this.appendMap(e.maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this.maps.length+e.maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e.maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Qr;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this.maps[o],l=s.mapResult(e,n);if(l.recover!=null){let c=this.getMirror(o);if(c!=null&&c>o&&c<this.to){o=c,e=this.maps[c].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new ta(e,i,null)}}const na=Object.create(null);class ut{getMap(){return Bt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=na[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 na)throw new RangeError("Duplicate use of step JSON ID "+e);return na[e]=n,n.prototype.jsonID=e,n}}class Ue{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ue(e,null)}static fail(e){return new Ue(null,e)}static fromReplace(e,n,r,i){try{return Ue.ok(e.replace(n,r,i))}catch(o){if(o instanceof rs)return Ue.fail(o.message);throw o}}}function ra(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(ra(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return J.fromArray(r)}class Yn extends ut{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new re(ra(n.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return Ue.fromReplace(e,this.from,this.to,o)}invert(){return new an(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 Yn(n.pos,r.pos,this.mark)}merge(e){return e instanceof Yn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Yn(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 Yn(n.from,n.to,e.markFromJSON(n.mark))}}ut.jsonID("addMark",Yn);class an extends ut{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 re(ra(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Ue.fromReplace(e,this.from,this.to,r)}invert(){return new Yn(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 an(n.pos,r.pos,this.mark)}merge(e){return e instanceof an&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new an(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 an(n.from,n.to,e.markFromJSON(n.mark))}}ut.jsonID("removeMark",an);class qn extends ut{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ue.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ue.fromReplace(e,this.pos,this.pos+1,new re(J.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new qn(this.pos,n.marks[i]);return new qn(this.pos,this.mark)}}return new ei(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new qn(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 qn(n.pos,e.markFromJSON(n.mark))}}ut.jsonID("addNodeMark",qn);class ei extends ut{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ue.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ue.fromReplace(e,this.pos,this.pos+1,new re(J.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new qn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ei(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 ei(n.pos,e.markFromJSON(n.mark))}}ut.jsonID("removeNodeMark",ei);class Ze extends ut{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&ia(e,this.from,this.to)?Ue.fail("Structure replace would overwrite content"):Ue.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Bt([this.from,this.to-this.from,this.slice.size])}invert(e){return new Ze(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 Ze(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Ze)||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?re.empty:new re(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Ze(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?re.empty:new re(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Ze(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 Ze(n.from,n.to,re.fromJSON(e,n.slice),!!n.structure)}}ut.jsonID("replace",Ze);class Xe extends ut{constructor(e,n,r,i,o,s,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=l}apply(e){if(this.structure&&(ia(e,this.from,this.gapFrom)||ia(e,this.gapTo,this.to)))return Ue.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ue.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Ue.fromReplace(e,this.from,this.to,r):Ue.fail("Content does not fit in gap")}getMap(){return new Bt([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 Xe(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new Xe(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,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 Xe(n.from,n.to,n.gapFrom,n.gapTo,re.fromJSON(e,n.slice),n.insert,!!n.structure)}}ut.jsonID("replaceAround",Xe);function ia(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function rC(t,e,n,r){let i=[],o=[],s,l;t.doc.nodesBetween(e,n,(c,d,u)=>{if(!c.isInline)return;let f=c.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(d,e),p=Math.min(d+c.nodeSize,n),m=r.addToSet(f);for(let g=0;g<f.length;g++)f[g].isInSet(m)||(s&&s.to==h&&s.mark.eq(f[g])?s.to=p:i.push(s=new an(h,p,f[g])));l&&l.to==h?l.to=p:o.push(l=new Yn(h,p,r))}}),i.forEach(c=>t.step(c)),o.forEach(c=>t.step(c))}function iC(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;o++;let c=null;if(r instanceof as){let d=s.marks,u;for(;u=r.isInSet(d);)(c||(c=[])).push(u),d=u.removeFromSet(d)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let d=Math.min(l+s.nodeSize,n);for(let u=0;u<c.length;u++){let f=c[u],h;for(let p=0;p<i.length;p++){let m=i[p];m.step==o-1&&f.eq(i[p].style)&&(h=m)}h?(h.to=d,h.step=o):i.push({style:f,from:Math.max(l,e),to:d,step:o})}}}),i.forEach(s=>t.step(new an(s.from,s.to,s.style)))}function oa(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],l=e+1;for(let c=0;c<o.childCount;c++){let d=o.child(c),u=l+d.nodeSize,f=r.matchType(d.type);if(!f)s.push(new Ze(l,u,re.empty));else{r=f;for(let h=0;h<d.marks.length;h++)n.allowsMarkType(d.marks[h].type)||t.step(new an(l,u,d.marks[h]));if(i&&d.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,m;for(;h=p.exec(d.text);)m||(m=new re(J.from(n.schema.text(" ",n.allowedMarks(d.marks))),0,0)),s.push(new Ze(l+h.index,l+h.index+h[0].length,m))}}l=u}if(!r.validEnd){let c=r.fillBefore(J.empty,!0);t.replace(l,l,new re(c,0,0))}for(let c=s.length-1;c>=0;c--)t.step(s[c])}function oC(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function ti(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth;;--r){let i=t.$from.node(r),o=t.$from.index(r),s=t.$to.indexAfter(r);if(r<t.depth&&i.canReplace(o,s,n))return r;if(r==0||i.type.spec.isolating||!oC(i,o,s))break}return null}function sC(t,e,n){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),l=i.after(o+1),c=s,d=l,u=J.empty,f=0;for(let m=o,g=!1;m>n;m--)g||r.index(m)>0?(g=!0,u=J.from(r.node(m).copy(u)),f++):c--;let h=J.empty,p=0;for(let m=o,g=!1;m>n;m--)g||i.after(m+1)<i.end(m)?(g=!0,h=J.from(i.node(m).copy(h)),p++):d++;t.step(new Xe(c,d,s,l,new re(u.append(h),f,p),u.size-f,!0))}function sa(t,e,n=null,r=t){let i=lC(t,e),o=i&&aC(r,e);return o?i.map(yh).concat({type:e,attrs:n}).concat(o.map(yh)):null}function yh(t){return{type:t,attrs:null}}function lC(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}function aC(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let c=(s.length?s[s.length-1]:e).contentMatch;for(let d=r;c&&d<i;d++)c=c.matchType(n.child(d).type);return!c||!c.validEnd?null:s}function cC(t,e,n){let r=J.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=J.from(n[s].type.create(n[s].attrs,r))}let i=e.start,o=e.end;t.step(new Xe(i,o,i,o,new re(r,0,0),n.length,!0))}function dC(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{let c=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,c)&&uC(t.doc,t.mapping.slice(o).map(l),r)){let d=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?d=!1:!p&&m&&(d=!0)}d===!1&&kh(t,s,l,o),oa(t,t.mapping.slice(o).map(l,1),r,void 0,d===null);let u=t.mapping.slice(o),f=u.map(l,1),h=u.map(l+s.nodeSize,1);return t.step(new Xe(f,h,f+1,h-1,new re(J.from(r.create(c,null,s.marks)),0,0),1,!0)),d===!0&&bh(t,s,l,o),!1}})}function bh(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(i.text);){let c=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function kh(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
@@ -32,7 +32,7 @@ ${d}`:c)}else throw s},onCacheKey:s=>r1(e,n,s)}}function Rb(t){if(oe(t))return t
32
32
  `),f&&m==p.nodeValue.length)for(let g=p,y;g;g=g.parentNode){if(y=g.nextSibling){y.nodeName=="BR"&&(l=c={node:y.parentNode,offset:ot(y)+1});break}let k=g.pmViewDesc;if(k&&k.node&&k.node.isBlock)break}}else{let g=p.childNodes[m-1];f=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(tn&&u.focusNode&&u.focusNode!=c.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||f&&bt)&&Cr(l.node,l.offset,u.anchorNode,u.anchorOffset)&&Cr(c.node,c.offset,u.focusNode,u.focusOffset))return;let h=!1;if((d.extend||e==n)&&!f){d.collapse(l.node,l.offset);try{e!=n&&d.extend(c.node,c.offset),h=!0}catch{}}if(!h){if(e>n){let m=l;l=c,c=m}let p=document.createRange();p.setEnd(c.node,c.offset),p.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(p)}}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,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let l=r+o.border,c=s-o.border;if(e>=l&&n<=c){this.dirty=e==r||n==s?_r:Jh,e==l&&n==c&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=dn:o.markDirty(e-l,n-l);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?_r:dn}r=s}this.dirty=_r}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?_r:Jh;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class Zh extends so{constructor(e,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==Wt&&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 side(){return this.widget.type.side}}class XC extends so{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}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 Or extends so{constructor(e,n,r,i,o){super(e,[],r,i),this.mark=n,this.spec=o}static create(e,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return(!s||!s.dom)&&(s=Er.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Or(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&dn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=dn&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Wt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Wt}}slice(e,n,r){let i=Or.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=wa(o,n,s,r)),e>0&&(o=wa(o,0,e,r));for(let l=0;l<o.length;l++)o[l].parent=i;return i.children=o,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Xn extends so{constructor(e,n,r,i,o,s,l,c,d){super(e,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=l}static create(e,n,r,i,o,s){let l=o.nodeViews[n.type.name],c,d=l&&l(n,o,()=>{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=d&&d.dom,f=d&&d.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:f}=Er.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=np(u,r,n),d?c=new QC(e,n,r,i,u,f||null,h,d,o,s+1):n.isText?new ys(e,n,r,i,u,h,o):new Xn(e,n,r,i,u,f||null,h,o,s+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=()=>J.empty)}return e}matchesNode(e,n,r){return this.dirty==Wt&&e.eq(this.node)&&bs(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,i=n,o=e.composing?this.localCompositionInfo(e,n):null,s=o&&o.pos>-1?o:null,l=o&&o.pos<0,c=new tS(this,s&&s.node,e);iS(this.node,this.innerDeco,(d,u,f)=>{d.spec.marks?c.syncToMarks(d.spec.marks,r,e):d.type.side>=0&&!f&&c.syncToMarks(u==this.node.childCount?$e.none:this.node.child(u).marks,r,e),c.placeWidget(d,e,i)},(d,u,f,h)=>{c.syncToMarks(d.marks,r,e);let p;c.findNodeMatch(d,u,f,h)||l&&e.state.selection.from>i&&e.state.selection.to<i+d.nodeSize&&(p=c.findIndexWithChild(o.node))>-1&&c.updateNodeAt(d,u,f,p,e)||c.updateNextNode(d,u,f,e,h,i)||c.addNode(d,u,f,e,i),i+=d.nodeSize}),c.syncToMarks([],r,e),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==_r)&&(s&&this.protectLocalComposition(e,s),ep(this.contentDOM,this.children,e),si&&oS(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof ke)||r<n||i>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,l=sS(this.node.content,s,r-n,i-n);return l<0?null:{node:o,pos:l,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new XC(this,o,n,i);e.input.compositionNodes.push(s),this.children=wa(this.children,r,r+i.length,e,s)}update(e,n,r,i){return this.dirty==dn||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Wt}updateOuterDeco(e){if(bs(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=tp(this.dom,this.nodeDOM,ka(this.outerDeco,this.node,n),ka(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 Xh(t,e,n,r,i){np(r,e,t);let o=new Xn(void 0,t,e,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class ys extends Xn{constructor(e,n,r,i,o,s,l){super(e,n,r,i,o,null,s,l,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,i){return this.dirty==dn||this.dirty!=Wt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Wt||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=Wt,!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 i=this.node.cut(e,n),o=document.createTextNode(i.text);return new ys(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=dn)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Qh extends so{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Wt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class QC extends Xn{constructor(e,n,r,i,o,s,l,c,d,u){super(e,n,r,i,o,s,l,d,u),this.spec=c}update(e,n,r,i){if(this.dirty==dn)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let o=this.spec.update(e,n,r);return o&&this.updateInner(e,n,r,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}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 ep(t,e,n){let r=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let s=e[o],l=s.dom;if(l.parentNode==t){for(;l!=r;)r=rp(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(l,r);if(s instanceof Or){let c=r?r.previousSibling:t.lastChild;ep(s.contentDOM,s.children,n),r=c?c.nextSibling:t.firstChild}}for(;r;)r=rp(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const lo=function(t){t&&(this.nodeName=t)};lo.prototype=Object.create(null);const Tr=[new lo];function ka(t,e,n){if(t.length==0)return Tr;let r=n?Tr[0]:new lo,i=[r];for(let o=0;o<t.length;o++){let s=t[o].type.attrs;if(s){s.nodeName&&i.push(r=new lo(s.nodeName));for(let l in s){let c=s[l];c!=null&&(n&&i.length==1&&i.push(r=new lo(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+c:l=="style"?r.style=(r.style?r.style+";":"")+c:l!="nodeName"&&(r[l]=c))}}}return i}function tp(t,e,n,r){if(n==Tr&&r==Tr)return e;let i=e;for(let o=0;o<r.length;o++){let s=r[o],l=n[o];if(o){let c;l&&l.nodeName==s.nodeName&&i!=t&&(c=i.parentNode)&&c.nodeName.toLowerCase()==s.nodeName||(c=document.createElement(s.nodeName),c.pmIsDeco=!0,c.appendChild(i),l=Tr[0]),i=c}eS(i,l||Tr[0],s)}return i}function eS(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):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&t.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function np(t,e,n){return tp(t,t,Tr,ka(e,n,t.nodeType!=1))}function bs(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 rp(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class tS{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=nS(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 i=0,o=this.stack.length>>1,s=Math.min(o,e.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=Wt,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let c=this.index;c<Math.min(this.index+3,this.top.children.length);c++){let d=this.top.children[c];if(d.matchesMark(e[o])&&!this.isLocked(d.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=Or.create(this.top,e[o],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))o=this.top.children.indexOf(s,this.index);else for(let l=this.index,c=Math.min(this.top.children.length,l+5);l<c;l++){let d=this.top.children[l];if(d.matchesNode(e,n,r)&&!this.preMatch.matched.has(d)){o=l;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,r,i,o){let s=this.top.children[i];return s.dirty==dn&&s.dom==s.contentDOM&&(s.dirty=_r),s.update(e,n,r,o)?(this.destroyBetween(this.index,i),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 i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,o,s){for(let l=this.index;l<this.top.children.length;l++){let c=this.top.children[l];if(c instanceof Xn){let d=this.preMatch.matched.get(c);if(d!=null&&d!=o)return!1;let u=c.dom,f,h=this.isLocked(u)&&!(e.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==e.text&&c.dirty!=dn&&bs(n,c.outerDeco));if(!h&&c.update(e,n,r,i))return this.destroyBetween(this.index,l),c.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(c,e,n,r,i,s)))return this.destroyBetween(this.index,l),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=_r,f.updateChildren(i,s+1),f.dirty=Wt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,o,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!bs(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let l=Xn.create(this.top,n,r,i,o,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let c of l.children)c.parent=l}return e.destroy(),l}addNode(e,n,r,i,o){let s=Xn.create(this.top,e,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new Zh(this.top,e,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof Or;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof ys)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((bt||ft)&&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 i=new Qh(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function nS(t,e){let n=e,r=n.children.length,i=t.childCount,o=new Map,s=[];e:for(;i>0;){let l;for(;;)if(r){let d=n.children[r-1];if(d instanceof Or)n=d,r=d.children.length;else{l=d,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=l.node;if(c){if(c!=t.child(i-1))break;--i,o.set(l,i),s.push(l)}}return{index:i,matched:o,matches:s.reverse()}}function rS(t,e){return t.type.side-e.type.side}function iS(t,e,n,r){let i=e.locals(t),o=0;if(i.length==0){for(let d=0;d<t.childCount;d++){let u=t.child(d);r(u,i,e.forChild(o,u),d),o+=u.nodeSize}return}let s=0,l=[],c=null;for(let d=0;;){let u,f;for(;s<i.length&&i[s].to==o;){let y=i[s++];y.widget&&(u?(f||(f=[u])).push(y):u=y)}if(u)if(f){f.sort(rS);for(let y=0;y<f.length;y++)n(f[y],d,!!c)}else n(u,d,!!c);let h,p;if(c)p=-1,h=c,c=null;else if(d<t.childCount)p=d,h=t.child(d++);else break;for(let y=0;y<l.length;y++)l[y].to<=o&&l.splice(y--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)l.push(i[s++]);let m=o+h.nodeSize;if(h.isText){let y=m;s<i.length&&i[s].from<y&&(y=i[s].from);for(let k=0;k<l.length;k++)l[k].to<y&&(y=l[k].to);y<m&&(c=h.cut(y-o),h=h.cut(0,y-o),m=y,p=-1)}else for(;s<i.length&&i[s].to<m;)s++;let g=h.isInline&&!h.isLeaf?l.filter(y=>!y.inline):l.slice();r(h,g,e.forChild(o,h),p),o=m}}function oS(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 sS(t,e,n,r){for(let i=0,o=0;i<t.childCount&&o<=r;){let s=t.child(i++),l=o;if(o+=s.nodeSize,!s.isText)continue;let c=s.text;for(;i<t.childCount;){let d=t.child(i++);if(o+=d.nodeSize,!d.isText)break;c+=d.text}if(o>=n){if(o>=r&&c.slice(r-e.length-l,r-l)==e)return r-e.length;let d=l<r?c.lastIndexOf(e,r-l-1):-1;if(d>=0&&d+e.length+l>=n)return l+d;if(n==r&&c.length>=r+e.length-l&&c.slice(r-l,r-l+e.length)==e)return r}}return-1}function wa(t,e,n,r,i){let o=[];for(let s=0,l=0;s<t.length;s++){let c=t[s],d=l,u=l+=c.size;d>=n||u<=e?o.push(c):(d<e&&o.push(c.slice(0,e-d,r)),i&&(o.push(i),i=void 0),u>n&&o.push(c.slice(n-d,c.size,r)))}return o}function va(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),c,d;if(gs(n)){for(c=s;i&&!i.node;)i=i.parent;let f=i.node;if(i&&f.isAtom&&pe.isSelectable(f)&&i.parent&&!(f.isInline&&DC(n.focusNode,n.focusOffset,i.dom))){let h=i.posBefore;d=new pe(s==h?l:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=s,h=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);f=Math.min(f,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(f<0)return null;[c,s]=h==t.state.selection.anchor?[h,f]:[f,h],l=r.resolve(s)}else c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!d){let f=e=="pointer"||t.state.selection.head<l.pos&&!o?1:-1;d=Ea(t,u,l,f)}return d}function ip(t){return t.editable?t.hasFocus():up(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Nn(t,e=!1){let n=t.state.selection;if(ap(t,n),!!ip(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&ft){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Cr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)aS(t);else{let{anchor:r,head:i}=n,o,s;op&&!(n instanceof ke)&&(n.$from.parent.inlineContent||(o=sp(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=sp(t,n.to))),t.docView.setSelection(r,i,t,e),op&&(o&&lp(o),s&&lp(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&lS(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const op=bt||ft&&Ph<63;function sp(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(bt&&i&&i.contentEditable=="false")return xa(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return xa(i);if(o)return xa(o)}}function xa(t){return t.contentEditable="true",bt&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function lp(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function lS(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!ip(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function aS(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let r=t.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setStart(r.parentNode,ot(r)+1):n.setStart(r,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&Ot&&Jn<=11&&(r.disabled=!0,r.disabled=!1)}function ap(t,e){if(e instanceof pe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(cp(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else cp(t)}function cp(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Ea(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||ke.between(e,n,r)}function dp(t){return t.editable&&!t.hasFocus()?!1:up(t)}function up(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 cS(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Cr(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Ca(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&xe.findFrom(o,e)}function Qn(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function fp(t,e,n){let r=t.state.selection;if(r instanceof ke)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Qn(t,new ke(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=Ca(t.state,e);return i&&i instanceof pe?Qn(t,i):!1}else if(!(Ht&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let l=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM?pe.isSelectable(o)?Qn(t,new pe(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):io?Qn(t,new ke(t.state.doc.resolve(e<0?l:l+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof pe&&r.node.isInline)return Qn(t,new ke(e>0?r.$to:r.$from));{let i=Ca(t.state,e);return i?Qn(t,i):!1}}}function ks(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function ao(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ai(t,e){return e<0?dS(t):uS(t)}function dS(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,o,s=!1;for(tn&&n.nodeType==1&&r<ks(n)&&ao(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(ao(l,-1))i=n,o=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(hp(n))break;{let l=n.previousSibling;for(;l&&ao(l,-1);)i=n.parentNode,o=ot(l),l=l.previousSibling;if(l)n=l,r=ks(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Sa(t,n,r):i&&Sa(t,i,o)}function uS(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=ks(n),o,s;for(;;)if(r<i){if(n.nodeType!=1)break;let l=n.childNodes[r];if(ao(l,1))o=n,s=++r;else break}else{if(hp(n))break;{let l=n.nextSibling;for(;l&&ao(l,1);)o=l.parentNode,s=ot(l)+1,l=l.nextSibling;if(l)n=l,r=0,i=ks(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}o&&Sa(t,o,s)}function hp(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function fS(t,e){for(;t&&e==t.childNodes.length&&!ro(t);)e=ot(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 hS(t,e){for(;t&&!e&&!ro(t);)e=ot(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 Sa(t,e,n){if(e.nodeType!=3){let o,s;(s=fS(e,n))?(e=s,n=0):(o=hS(e,n))&&(e=o,n=o.nodeValue.length)}let r=t.domSelection();if(!r)return;if(gs(r)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&Nn(t)},50)}function pp(t,e){let n=t.state.doc.resolve(e);if(!(ft||$C)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function mp(t,e,n){let r=t.state.selection;if(r instanceof ke&&!r.empty||n.indexOf("s")>-1||Ht&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=Ca(t.state,e);if(s&&s instanceof pe)return Qn(t,s)}if(!i.parent.inlineContent){let s=e<0?i:o,l=r instanceof $t?xe.near(s,e):xe.findFrom(s,e);return l?Qn(t,l):!1}return!1}function gp(t,e){if(!(t.state.selection instanceof ke))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=t.state.tr;return e<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),t.dispatch(s),!0}return!1}function yp(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function pS(t){if(!bt||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;yp(t,r,"true"),setTimeout(()=>yp(t,r,"false"),20)}return!1}function mS(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function gS(t,e){let n=e.keyCode,r=mS(e);if(n==8||Ht&&n==72&&r=="c")return gp(t,-1)||ai(t,-1);if(n==46&&!e.shiftKey||Ht&&n==68&&r=="c")return gp(t,1)||ai(t,1);if(n==13||n==27)return!0;if(n==37||Ht&&n==66&&r=="c"){let i=n==37?pp(t,t.state.selection.from)=="ltr"?-1:1:-1;return fp(t,i,r)||ai(t,i)}else if(n==39||Ht&&n==70&&r=="c"){let i=n==39?pp(t,t.state.selection.from)=="ltr"?1:-1:1;return fp(t,i,r)||ai(t,i)}else{if(n==38||Ht&&n==80&&r=="c")return mp(t,-1,r)||ai(t,-1);if(n==40||Ht&&n==78&&r=="c")return pS(t)||mp(t,1,r)||ai(t,1);if(r==(Ht?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function _a(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||Er.fromSchema(t.state.schema),l=Sp(),c=l.createElement("div");c.appendChild(s.serializeFragment(r,{document:l}));let d=c.firstChild,u,f=0;for(;d&&d.nodeType==1&&(u=Ep[d.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=l.createElement(u[p]);for(;c.firstChild;)m.appendChild(c.firstChild);c.appendChild(m),f++}d=c.firstChild}d&&d.nodeType==1&&d.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
33
33
 
34
34
  `);return{dom:c,text:h,slice:e}}function bp(t,e,n,r,i){let o=i.parent.type.spec.code,s,l;if(!n&&!e)return null;let c=e&&(r||o||!n);if(c){if(t.someProp("transformPastedText",h=>{e=h(e,o||r,t)}),o)return e?new re(J.from(t.state.schema.text(e.replace(/\r\n?/g,`
35
- `))),0,0):re.empty;let f=t.someProp("clipboardTextParser",h=>h(e,i,r,t));if(f)l=f;else{let h=i.marks(),{schema:p}=t.state,m=Er.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let y=s.appendChild(document.createElement("p"));g&&y.appendChild(m.serializeNode(p.text(g,h)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),s=wS(n),io&&vS(s);let d=s&&s.querySelector("[data-pm-slice]"),u=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Un.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!yS.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)l=xS(xp(l,+u[1],+u[2]),u[4]);else if(l=re.maxOpen(bS(l.content,i),!0),l.openStart||l.openEnd){let f=0,h=0;for(let p=l.content.firstChild;f<l.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=l.content.lastChild;h<l.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);l=xp(l,f,h)}return t.someProp("transformPasted",f=>{l=f(l,t)}),l}const yS=/^(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 bS(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),o,s=[];if(t.forEach(l=>{if(!s)return;let c=i.findWrapping(l.type),d;if(!c)return s=null;if(d=s.length&&o.length&&wp(c,o,l,s[s.length-1],0))s[s.length-1]=d;else{s.length&&(s[s.length-1]=vp(s[s.length-1],o.length));let u=kp(l,c);s.push(u),i=i.matchType(u.type),o=c}}),s)return J.from(s)}return t}function kp(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,J.from(t));return t}function wp(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=wp(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(J.from(kp(n,t,i+1))))}}function vp(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,vp(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(J.empty,!0);return t.copy(n.append(r))}function Oa(t,e,n,r,i,o){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(o=0),i<r-1&&(l=Oa(l,e,n,r,i+1,o)),i>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,o<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(J.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function xp(t,e,n){return e<t.openStart&&(t=new re(Oa(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new re(Oa(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Ep={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 Cp=null;function Sp(){return Cp||(Cp=document.implementation.createHTMLDocument("title"))}let Ta=null;function kS(t){let e=window.trustedTypes;return e?(Ta||(Ta=e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Ta.createHTML(t)):t}function wS(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Sp().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),i;if((i=r&&Ep[r[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=kS(t),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function vS(t){let e=t.querySelectorAll(ft?"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 xS(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:i,openStart:o,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let c=n.nodes[r[l]];if(!c||c.hasRequiredAttrs())break;i=J.from(c.create(r[l+1],i)),o++,s++}return new re(i,o,s)}const kt={},wt={},ES={touchstart:!0,touchmove:!0};class CS{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.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 SS(t){for(let e in kt){let n=kt[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{OS(t,r)&&!Ma(t,r)&&(t.editable||!(r.type in wt))&&n(t,r)},ES[e]?{passive:!0}:void 0)}bt&&t.dom.addEventListener("input",()=>null),Na(t)}function er(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function _S(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 Na(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Ma(t,r))})}function Ma(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function OS(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 TS(t,e){!Ma(t,e)&&kt[e.type]&&(t.editable||!(e.type in wt))&&kt[e.type](t,e)}wt.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Op(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(On&&ft&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),si&&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",i=>i(t,Sr(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||gS(t,n)?n.preventDefault():er(t,"key")},wt.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},wt.keypress=(t,e)=>{let n=e;if(Op(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ht&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof ke)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,i))&&t.dispatch(t.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function ws(t){return{left:t.clientX,top:t.clientY}}function NS(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Aa(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,l=>s>o.depth?l(t,n,o.nodeAfter,o.before(s),i,!0):l(t,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function ci(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 MS(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&pe.isSelectable(r)?(ci(t,new pe(n)),!0):!1}function AS(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof pe&&(r=n.node);let o=t.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let l=s>o.depth?o.nodeAfter:o.node(s);if(pe.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(s);break}}return i!=null?(ci(t,pe.create(t.state.doc,i)),!0):!1}function DS(t,e,n,r,i){return Aa(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?AS(t,n):MS(t,n))}function LS(t,e,n,r){return Aa(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function BS(t,e,n,r){return Aa(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||$S(t,n,r)}function $S(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(ci(t,ke.create(r,0,r.content.size)),!0):!1;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),l=i.before(o);if(s.inlineContent)ci(t,ke.create(r,l+1,l+1+s.content.size));else if(pe.isSelectable(s))ci(t,pe.create(r,l));else continue;return!0}}function Da(t){return vs(t)}const _p=Ht?"metaKey":"ctrlKey";kt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Da(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&NS(n,t.input.lastClick)&&!n[_p]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=t.posAtCoords(ws(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new IS(t,s,n,!!r)):(o=="doubleClick"?LS:BS)(t,s.pos,s.inside,n)?n.preventDefault():er(t,"pointer"))};class IS{constructor(e,n,r,i){this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[_p],this.allowDefault=r.shiftKey;let o,s;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let u=e.state.doc.resolve(n.pos);o=u.parent,s=u.depth?u.before():0}const l=i?null:r.target,c=l?e.docView.nearestDesc(l,!0):null;this.target=c&&c.dom.nodeType==1?c.dom:null;let{selection:d}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||d instanceof pe&&d.from<=s&&d.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&tn&&!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)),er(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(()=>Nn(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(ws(e))),this.updateAllowDefault(e),this.allowDefault||!n?er(this.view,"pointer"):DS(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||bt&&this.mightDrag&&!this.mightDrag.node.isAtom||ft&&!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)?(ci(this.view,xe.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):er(this.view,"pointer")}move(e){this.updateAllowDefault(e),er(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)}}kt.touchstart=t=>{t.input.lastTouch=Date.now(),Da(t),er(t,"pointer")},kt.touchmove=t=>{t.input.lastTouch=Date.now(),er(t,"pointer")},kt.contextmenu=t=>Da(t);function Op(t,e){return t.composing?!0:bt&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const VS=On?5e3:-1;wt.compositionstart=wt.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof ke&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),vs(t,!0),t.markCursor=null;else if(vs(t,!e.selection.empty),tn&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let l=t.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}t.input.composing=!0}Tp(t,VS)},wt.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++,Tp(t,20))};function Tp(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>vs(t),e))}function Np(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=RS());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function PS(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=MC(e.focusNode,e.focusOffset),r=AC(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function RS(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function vs(t,e=!1){if(!(On&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Np(t),e||t.docView&&t.docView.dirty){let n=va(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function FS(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(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const co=Ot&&Jn<15||si&&IC<604;kt.copy=wt.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=co?null:n.clipboardData,s=r.content(),{dom:l,text:c}=_a(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",c)):FS(t,l),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function zS(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function jS(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 i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?uo(t,r.value,null,i,e):uo(t,r.textContent,r.innerHTML,i,e)},50)}function uo(t,e,n,r,i){let o=bp(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",c=>c(t,i,o||re.empty)))return!0;if(!o)return!1;let s=zS(o),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(o);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Mp(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," "):""}wt.paste=(t,e)=>{let n=e;if(t.composing&&!On)return;let r=co?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&uo(t,Mp(r),r.getData("text/html"),i,n)?n.preventDefault():jS(t,n)};class Ap{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Dp=Ht?"altKey":"ctrlKey";kt.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(ws(n)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof pe?i.to-1:i.to))){if(r&&r.mightDrag)s=pe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=pe.create(t.state.doc,f.posBefore))}}let l=(s||t.state.selection).content(),{dom:c,text:d,slice:u}=_a(t,l);(!n.dataTransfer.files.length||!ft||Ph>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(co?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",co||n.dataTransfer.setData("text/plain",d),t.dragging=new Ap(u,!n[Dp],s)},kt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},wt.dragover=wt.dragenter=(t,e)=>e.preventDefault(),wt.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(ws(n));if(!i)return;let o=t.state.doc.resolve(i.pos),s=r&&r.slice;s?t.someProp("transformPasted",m=>{s=m(s,t)}):s=bp(t,Mp(n.dataTransfer),co?null:n.dataTransfer.getData("text/html"),!1,o);let l=!!(r&&!n[Dp]);if(t.someProp("handleDrop",m=>m(t,n,s||re.empty,l))){n.preventDefault();return}if(!s)return;n.preventDefault();let c=s?vh(t.state.doc,o.pos,s):o.pos;c==null&&(c=o.pos);let d=t.state.tr;if(l){let{node:m}=r;m?m.replace(d):d.deleteSelection()}let u=d.mapping.map(c),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=d.doc;if(f?d.replaceRangeWith(u,u,s.content.firstChild):d.replaceRange(u,u,s),d.doc.eq(h))return;let p=d.doc.resolve(u);if(f&&pe.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))d.setSelection(new pe(p));else{let m=d.mapping.map(c);d.mapping.maps[d.mapping.maps.length-1].forEach((g,y,k,x)=>m=x),d.setSelection(Ea(t,p,d.doc.resolve(m)))}t.focus(),t.dispatch(d.setMeta("uiEvent","drop"))},kt.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())&&Nn(t)},20))},kt.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)},kt.beforeinput=(t,e)=>{if(ft&&On&&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",o=>o(t,Sr(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in wt)kt[t]=wt[t];function fo(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 xs{constructor(e,n){this.toDOM=e,this.spec=n||Nr,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:s}=e.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Vt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof xs&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&fo(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class tr{constructor(e,n){this.attrs=e,this.spec=n||Nr}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Vt(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof tr&&fo(this.attrs,e.attrs)&&fo(this.spec,e.spec)}static is(e){return e.type instanceof tr}destroy(){}}class La{constructor(e,n){this.attrs=e,this.spec=n||Nr}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let s=e.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Vt(o.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),o;return i==n.from&&!(o=e.child(r)).isText&&i+o.nodeSize==n.to}eq(e){return this==e||e instanceof La&&fo(this.attrs,e.attrs)&&fo(this.spec,e.spec)}destroy(){}}class Vt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Vt(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 Vt(e,e,new xs(n,r))}static inline(e,n,r,i){return new Vt(e,n,new tr(r,i))}static node(e,n,r,i){return new Vt(e,n,new La(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof tr}get widget(){return this.type instanceof xs}}const di=[],Nr={};class Ye{constructor(e,n){this.local=e.length?e:di,this.children=n.length?n:di}static create(e,n){return n.length?Es(n,e,0,Nr):ht}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,o){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=n&&l.to>=e&&(!o||o(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,i+l,o)}}map(e,n,r){return this==ht||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Nr)}mapInner(e,n,r,i,o){let s;for(let l=0;l<this.local.length;l++){let c=this.local[l].map(e,r,i);c&&c.type.valid(n,c)?(s||(s=[])).push(c):o.onRemove&&o.onRemove(this.local[l].spec)}return this.children.length?HS(this.children,s||[],e,n,r,i,o):s?new Ye(s.sort(Mr),di):ht}add(e,n){return n.length?this==ht?Ye.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((l,c)=>{let d=c+r,u;if(u=Bp(n,l,d)){for(i||(i=this.children.slice());o<i.length&&i[o]<c;)o+=3;i[o]==c?i[o+2]=i[o+2].addInner(l,u,d+1):i.splice(o,0,c,c+l.nodeSize,Es(u,l,d+1,Nr)),o+=3}});let s=Lp(o?$p(n):n,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new Ye(s.length?this.local.concat(s).sort(Mr):this.local,i||this.children)}remove(e){return e.length==0||this==ht?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,l=r[o]+n,c=r[o+1]+n;for(let u=0,f;u<e.length;u++)(f=e[u])&&f.from>l&&f.to<c&&(e[u]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let d=r[o+2].removeInner(s,l+1);d!=ht?r[o+2]=d:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let l=0;l<i.length;l++)i[l].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(l--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Ye(i,r):ht}forChild(e,n){if(this==ht)return this;if(n.isLeaf)return Ye.empty;let r,i;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let o=e+1,s=o+n.content.size;for(let l=0;l<this.local.length;l++){let c=this.local[l];if(c.from<s&&c.to>o&&c.type instanceof tr){let d=Math.max(o,c.from)-o,u=Math.min(s,c.to)-o;d<u&&(i||(i=[])).push(c.copy(d,u))}}if(i){let l=new Ye(i.sort(Mr),di);return r?new nr([l,r]):l}return r||ht}eq(e){if(this==e)return!0;if(!(e instanceof Ye)||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 Ba(this.localsInner(e))}localsInner(e){if(this==ht)return di;if(e.inlineContent||!this.local.some(tr.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof tr||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Ye.empty=new Ye([],[]),Ye.removeOverlap=Ba;const ht=Ye.empty;class nr{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,Nr));return nr.from(r)}forChild(e,n){if(n.isLeaf)return Ye.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=ht&&(o instanceof nr?r=r.concat(o.members):r.push(o))}return nr.from(r)}eq(e){if(!(e instanceof nr)||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 i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?Ba(r?n:n.sort(Mr)):di}static from(e){switch(e.length){case 0:return ht;case 1:return e[0];default:return new nr(e.every(n=>n instanceof Ye)?e:e.reduce((n,r)=>n.concat(r instanceof Ye?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function HS(t,e,n,r,i,o,s){let l=t.slice();for(let d=0,u=o;d<n.maps.length;d++){let f=0;n.maps[d].forEach((h,p,m,g)=>{let y=g-m-(p-h);for(let k=0;k<l.length;k+=3){let x=l[k+1];if(x<0||h>x+u-f)continue;let w=l[k]+u-f;p>=w?l[k+1]=h<=w?-2:-1:h>=u&&y&&(l[k]+=y,l[k+1]+=y)}f+=y}),u=n.maps[d].map(u,-1)}let c=!1;for(let d=0;d<l.length;d+=3)if(l[d+1]<0){if(l[d+1]==-2){c=!0,l[d+1]=-1;continue}let u=n.map(t[d]+o),f=u-i;if(f<0||f>=r.content.size){c=!0;continue}let h=n.map(t[d+1]+o,-1),p=h-i,{index:m,offset:g}=r.content.findIndex(f),y=r.maybeChild(m);if(y&&g==f&&g+y.nodeSize==p){let k=l[d+2].mapInner(n,y,u+1,t[d]+o+1,s);k!=ht?(l[d]=f,l[d+1]=p,l[d+2]=k):(l[d+1]=-2,c=!0)}else c=!0}if(c){let d=WS(l,t,e,n,i,o,s),u=Es(d,r,0,s);e=u.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,h=0;f<u.children.length;f+=3){let p=u.children[f];for(;h<l.length&&l[h]<p;)h+=3;l.splice(h,0,u.children[f],u.children[f+1],u.children[f+2])}}return new Ye(e.sort(Mr),l)}function Lp(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Vt(i.from+e,i.to+e,i.type))}return n}function WS(t,e,n,r,i,o,s){function l(c,d){for(let u=0;u<c.local.length;u++){let f=c.local[u].map(r,i,d);f?n.push(f):s.onRemove&&s.onRemove(c.local[u].spec)}for(let u=0;u<c.children.length;u+=3)l(c.children[u+2],c.children[u]+d+1)}for(let c=0;c<t.length;c+=3)t[c+1]==-1&&l(t[c+2],e[c]+o+1);return n}function Bp(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o=0,s;o<t.length;o++)(s=t[o])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),t[o]=null);return i}function $p(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Es(t,e,n,r){let i=[],o=!1;e.forEach((l,c)=>{let d=Bp(t,l,c+n);if(d){o=!0;let u=Es(d,l,n+c+1,r);u!=ht&&i.push(c,c+l.nodeSize,u)}});let s=Lp(o?$p(t):t,-n).sort(Mr);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||i.length?new Ye(s,i):ht}function Mr(t,e){return t.from-e.from||t.to-e.to}function Ba(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),Ip(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),Ip(e,i,r.copy(o.from,r.to)));break}}}return e}function Ip(t,e,n){for(;e<t.length&&Mr(n,t[e])>0;)e++;t.splice(e,0,n)}function $a(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=ht&&e.push(r)}),t.cursorWrapper&&e.push(Ye.create(t.state.doc,[t.cursorWrapper.deco])),nr.from(e)}const US={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},YS=Ot&&Jn<=11;class qS{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 KS{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new qS,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Ot&&Jn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),YS&&(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,US)),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(dp(this.view)){if(this.suppressingSelectionUpdates)return Nn(this.view);if(Ot&&Jn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Cr(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 o=e.focusNode;o;o=no(o))n.add(o);for(let o=e.anchorNode;o;o=no(o))if(n.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.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(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&dp(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,l=!1,c=[];if(e.editable)for(let u=0;u<n.length;u++){let f=this.registerMutation(n[u],c);f&&(o=o<0?f.from:Math.min(f.from,o),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(l=!0))}if(tn&&c.length){let u=c.filter(f=>f.nodeName=="BR");if(u.length==2){let[f,h]=u;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of u){let p=h.parentNode;p&&p.nodeName=="LI"&&(!f||ZS(e,f)!=p)&&h.remove()}}}let d=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&gs(r)&&(d=va(e))&&d.eq(xe.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Nn(e),this.currentSelection.set(r)):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),GS(e)),this.handleDOMChange(o,s,l,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Nn(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 u=0;u<e.addedNodes.length;u++){let f=e.addedNodes[u];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(Ot&&Jn<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:f,nextSibling:h}=e.addedNodes[u];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==e.target?ot(i)+1:0,l=r.localPosFromDOM(e.target,s,-1),c=o&&o.parentNode==e.target?ot(o):e.target.childNodes.length,d=r.localPosFromDOM(e.target,c,1);return{from:l,to:d}}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 Vp=new WeakMap,Pp=!1;function GS(t){if(!Vp.has(t)&&(Vp.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=tn,Pp)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."),Pp=!0}}function Rp(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return Cr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function JS(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Rp(t,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Rp(t,n):null}function ZS(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 XS(t,e,n){let{node:r,fromOffset:i,toOffset:o,from:s,to:l}=t.docView.parseRange(e,n),c=t.domSelectionRange(),d,u=c.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(d=[{node:u,offset:c.anchorOffset}],gs(c)||d.push({node:c.focusNode,offset:c.focusOffset})),ft&&t.input.lastKeyCode===8)for(let y=o;y>i;y--){let k=r.childNodes[y-1],x=k.pmViewDesc;if(k.nodeName=="BR"&&!x){o=y;break}if(!x||x.size)break}let f=t.state.doc,h=t.someProp("domParser")||Un.fromSchema(t.state.schema),p=f.resolve(s),m=null,g=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:d,ruleFromNode:QS,context:p});if(d&&d[0].pos!=null){let y=d[0].pos,k=d[1]&&d[1].pos;k==null&&(k=y),m={anchor:y+s,head:k+s}}return{doc:g,sel:m,from:s,to:l}}function QS(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(bt&&/^(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||bt&&/^(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 e_=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function t_(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let A=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,V=va(t,A);if(V&&!t.state.selection.eq(V)){if(ft&&On&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",L=>L(t,Sr(13,"Enter"))))return;let $=t.state.tr.setSelection(V);A=="pointer"?$.setMeta("pointer",!0):A=="key"&&$.scrollIntoView(),o&&$.setMeta("composition",o),t.dispatch($)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let c=t.state.selection,d=XS(t,e,n),u=t.state.doc,f=u.slice(d.from,d.to),h,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,p="end"):(h=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let m=i_(f.content,d.doc.content,d.from,h,p);if(m&&t.input.domChangeCount++,(si&&t.input.lastIOSEnter>Date.now()-225||On)&&i.some(A=>A.nodeType==1&&!e_.test(A.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",A=>A(t,Sr(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof ke&&!c.empty&&c.$head.sameParent(c.$anchor)&&!t.composing&&!(d.sel&&d.sel.anchor!=d.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(d.sel){let A=Fp(t,t.state.doc,d.sel);if(A&&!A.eq(t.state.selection)){let V=t.state.tr.setSelection(A);o&&V.setMeta("composition",o),t.dispatch(V)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof ke&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Ot&&Jn<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>d.from&&d.doc.textBetween(m.start-d.from-1,m.start-d.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let g=d.doc.resolveNoCache(m.start-d.from),y=d.doc.resolveNoCache(m.endB-d.from),k=u.resolve(m.start),x=g.sameParent(y)&&g.parent.inlineContent&&k.end()>=m.endA,w;if((si&&t.input.lastIOSEnter>Date.now()-225&&(!x||i.some(A=>A.nodeName=="DIV"||A.nodeName=="P"))||!x&&g.pos<d.doc.content.size&&!g.sameParent(y)&&(w=xe.findFrom(d.doc.resolve(g.pos+1),1,!0))&&w.head==y.pos)&&t.someProp("handleKeyDown",A=>A(t,Sr(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&r_(u,m.start,m.endA,g,y)&&t.someProp("handleKeyDown",A=>A(t,Sr(8,"Backspace")))){On&&ft&&t.domObserver.suppressSelectionUpdates();return}ft&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),On&&!x&&g.start()!=y.start()&&y.parentOffset==0&&g.depth==y.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==m.endA&&(m.endB-=2,y=d.doc.resolveNoCache(m.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(A){return A(t,Sr(13,"Enter"))})},20));let b=m.start,S=m.endA,v,O,B;if(x){if(g.pos==y.pos)Ot&&Jn<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Nn(t),20)),v=t.state.tr.delete(b,S),O=u.resolve(m.start).marksAcross(u.resolve(m.endA));else if(m.endA==m.endB&&(B=n_(g.parent.content.cut(g.parentOffset,y.parentOffset),k.parent.content.cut(k.parentOffset,m.endA-k.start()))))v=t.state.tr,B.type=="add"?v.addMark(b,S,B.mark):v.removeMark(b,S,B.mark);else if(g.parent.child(g.index()).isText&&g.index()==y.index()-(y.textOffset?0:1)){let A=g.parent.textBetween(g.parentOffset,y.parentOffset);if(t.someProp("handleTextInput",V=>V(t,b,S,A)))return;v=t.state.tr.insertText(A,b,S)}}if(v||(v=t.state.tr.replace(b,S,d.doc.slice(m.start-d.from,m.endB-d.from))),d.sel){let A=Fp(t,v.doc,d.sel);A&&!(ft&&t.composing&&A.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(A.head==b||A.head==v.mapping.map(S)-1)||Ot&&A.empty&&A.head==b)&&v.setSelection(A)}O&&v.ensureMarks(O),o&&v.setMeta("composition",o),t.dispatch(v.scrollIntoView())}function Fp(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Ea(t,e.resolve(n.anchor),e.resolve(n.head))}function n_(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,o=r,s,l,c;for(let u=0;u<r.length;u++)i=r[u].removeFromSet(i);for(let u=0;u<n.length;u++)o=n[u].removeFromSet(o);if(i.length==1&&o.length==0)l=i[0],s="add",c=u=>u.mark(l.addToSet(u.marks));else if(i.length==0&&o.length==1)l=o[0],s="remove",c=u=>u.mark(l.removeFromSet(u.marks));else return null;let d=[];for(let u=0;u<e.childCount;u++)d.push(c(e.child(u)));if(J.from(d).eq(t))return{mark:l,type:s}}function r_(t,e,n,r,i){if(n-e<=i.pos-r.pos||Ia(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let l=o.nodeAfter;return l!=null&&n==e+l.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(Ia(o,!0,!0));return!s.parent.isTextblock||s.pos>n||Ia(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Ia(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function i_(t,e,n,r,i){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(i=="end"){let c=Math.max(0,o-Math.min(s,l));r-=s+c-o}if(s<o&&t.size<e.size){let c=r<=o&&r>=s?o-r:0;o-=c,o&&o<e.size&&zp(e.textBetween(o-1,o+1))&&(o+=c?1:-1),l=o+(l-s),s=o}else if(l<o){let c=r<=o&&r>=l?o-r:0;o-=c,o&&o<t.size&&zp(t.textBetween(o-1,o+1))&&(o+=c?1:-1),s=o+(s-l),l=o}return{start:o,endA:s,endB:l}}function zp(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 o_{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 CS,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Yp),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=Wp(this),Hp(this),this.nodeViews=Up(this),this.docView=Xh(this.state.doc,jp(this),$a(this),this.dom,this),this.domObserver=new KS(this,(r,i,o,s)=>t_(this,r,i,o,s)),this.domObserver.start(),SS(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&&Na(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Yp),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 i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(Np(this),s=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=Up(this);l_(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&Na(this),this.editable=Wp(this),Hp(this);let c=$a(this),d=jp(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(e.doc,d,c);(f||!e.selection.eq(i.selection))&&(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&RC(this);if(s){this.domObserver.stop();let p=f&&(Ot||ft)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&s_(i.selection,e.selection);if(f){let m=ft?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=PS(this)),(o||!this.docView.update(e.doc,d,c,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=Xh(e.doc,d,c,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&cS(this))?Nn(this,p):(ap(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&FC(h)}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 pe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Rh(this,n.getBoundingClientRect(),e)}else Rh(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,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new Ap(e.slice,e.move,i<0?void 0:pe.create(this.state.doc,i))}someProp(e,n){let r=this._props&&this._props[e],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(i=n?n(l):l))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let l=o[s].props[e];if(l!=null&&(i=n?n(l):l))return i}}hasFocus(){if(Ot){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&&zC(this.dom),Nn(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 YC(this,e)}coordsAtPos(e,n=1){return Uh(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 i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return ZC(this,n||this.state,e)}pasteHTML(e,n){return uo(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return uo(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return _a(this,e)}destroy(){this.docView&&(_S(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],$a(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,TC())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return TS(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?bt&&this.root.nodeType===11&&LC(this.dom.ownerDocument)==this.dom&&JS(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function jp(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"),[Vt.node(0,t.state.doc.content.size,e)]}function Hp(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:Vt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Wp(t){return!t.someProp("editable",e=>e(t.state)===!1)}function s_(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 Up(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function l_(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r}function Yp(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 rr={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:"'"},Cs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},a_=typeof navigator<"u"&&/Mac/.test(navigator.platform),c_=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),st=0;st<10;st++)rr[48+st]=rr[96+st]=String(st);for(var st=1;st<=24;st++)rr[st+111]="F"+st;for(var st=65;st<=90;st++)rr[st]=String.fromCharCode(st+32),Cs[st]=String.fromCharCode(st);for(var Va in rr)Cs.hasOwnProperty(Va)||(Cs[Va]=rr[Va]);function d_(t){var e=a_&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||c_&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Cs:rr)[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 u_=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function f_(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,o,s;for(let l=0;l<e.length-1;l++){let c=e[l];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))u_?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function h_(t){let e=Object.create(null);for(let n in t)e[f_(n)]=t[n];return e}function Pa(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 p_(t){return new it({props:{handleKeyDown:qp(t)}})}function qp(t){let e=h_(t);return function(n,r){let i=d_(r),o,s=e[Pa(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let l=e[Pa(i,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=rr[r.keyCode])&&o!=i){let l=e[Pa(o,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const Ra=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Kp(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Gp=(t,e,n)=>{let r=Kp(t,n);if(!r)return!1;let i=Fa(r);if(!i){let s=r.blockRange(),l=s&&ti(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let o=i.nodeBefore;if(im(t,i,e,-1))return!0;if(r.parent.content.size==0&&(ui(o,"end")||pe.isSelectable(o)))for(let s=r.depth;;s--){let l=ps(t.doc,r.before(s),r.after(s),re.empty);if(l&&l.slice.size<l.to-l.from){if(e){let c=t.tr.step(l);c.setSelection(ui(o,"end")?xe.findFrom(c.doc.resolve(c.mapping.map(i.pos,-1)),-1):pe.create(c.doc,i.pos-o.nodeSize)),e(c.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},m_=(t,e,n)=>{let r=Kp(t,n);if(!r)return!1;let i=Fa(r);return i?Jp(t,i,e):!1},g_=(t,e,n)=>{let r=Xp(t,n);if(!r)return!1;let i=za(r);return i?Jp(t,i,e):!1};function Jp(t,e,n){let r=e.nodeBefore,i=r,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let u=i.lastChild;if(!u)return!1;i=u}let s=e.nodeAfter,l=s,c=e.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let u=l.firstChild;if(!u)return!1;l=u}let d=ps(t.doc,o,c,re.empty);if(!d||d.from!=o||d instanceof Ze&&d.slice.size>=c-o)return!1;if(n){let u=t.tr.step(d);u.setSelection(ke.create(u.doc,o)),n(u.scrollIntoView())}return!0}function ui(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 Zp=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=Fa(r)}let s=o&&o.nodeBefore;return!s||!pe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(pe.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function Fa(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 Xp(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Qp=(t,e,n)=>{let r=Xp(t,n);if(!r)return!1;let i=za(r);if(!i)return!1;let o=i.nodeAfter;if(im(t,i,e,1))return!0;if(r.parent.content.size==0&&(ui(o,"start")||pe.isSelectable(o))){let s=ps(t.doc,r.before(),r.after(),re.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=t.tr.step(s);l.setSelection(ui(o,"start")?xe.findFrom(l.doc.resolve(l.mapping.map(i.pos)),1):pe.create(l.doc,l.mapping.map(i.pos))),e(l.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},em=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=za(r)}let s=o&&o.nodeAfter;return!s||!pe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(pe.create(t.doc,o.pos)).scrollIntoView()),!0)};function za(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 y_=(t,e)=>{let n=t.selection,r=n instanceof pe,i;if(r){if(n.node.isTextblock||!Kn(t.doc,n.from))return!1;i=n.from}else if(i=hs(t.doc,n.from,-1),i==null)return!1;if(e){let o=t.tr.join(i);r&&o.setSelection(pe.create(o.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},b_=(t,e)=>{let n=t.selection,r;if(n instanceof pe){if(n.node.isTextblock||!Kn(t.doc,n.to))return!1;r=n.to}else if(r=hs(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},k_=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),o=i&&ti(i);return o==null?!1:(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)},tm=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
35
+ `))),0,0):re.empty;let f=t.someProp("clipboardTextParser",h=>h(e,i,r,t));if(f)l=f;else{let h=i.marks(),{schema:p}=t.state,m=Er.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let y=s.appendChild(document.createElement("p"));g&&y.appendChild(m.serializeNode(p.text(g,h)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),s=wS(n),io&&vS(s);let d=s&&s.querySelector("[data-pm-slice]"),u=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Un.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!yS.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)l=xS(xp(l,+u[1],+u[2]),u[4]);else if(l=re.maxOpen(bS(l.content,i),!0),l.openStart||l.openEnd){let f=0,h=0;for(let p=l.content.firstChild;f<l.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=l.content.lastChild;h<l.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);l=xp(l,f,h)}return t.someProp("transformPasted",f=>{l=f(l,t)}),l}const yS=/^(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 bS(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),o,s=[];if(t.forEach(l=>{if(!s)return;let c=i.findWrapping(l.type),d;if(!c)return s=null;if(d=s.length&&o.length&&wp(c,o,l,s[s.length-1],0))s[s.length-1]=d;else{s.length&&(s[s.length-1]=vp(s[s.length-1],o.length));let u=kp(l,c);s.push(u),i=i.matchType(u.type),o=c}}),s)return J.from(s)}return t}function kp(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,J.from(t));return t}function wp(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=wp(t,e,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(J.from(kp(n,t,i+1))))}}function vp(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,vp(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(J.empty,!0);return t.copy(n.append(r))}function Oa(t,e,n,r,i,o){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(o=0),i<r-1&&(l=Oa(l,e,n,r,i+1,o)),i>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,o<=i).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(J.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function xp(t,e,n){return e<t.openStart&&(t=new re(Oa(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new re(Oa(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Ep={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 Cp=null;function Sp(){return Cp||(Cp=document.implementation.createHTMLDocument("title"))}let Ta=null;function kS(t){let e=window.trustedTypes;return e?(Ta||(Ta=e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Ta.createHTML(t)):t}function wS(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Sp().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),i;if((i=r&&Ep[r[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=kS(t),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function vS(t){let e=t.querySelectorAll(ft?"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 xS(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:i,openStart:o,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let c=n.nodes[r[l]];if(!c||c.hasRequiredAttrs())break;i=J.from(c.create(r[l+1],i)),o++,s++}return new re(i,o,s)}const kt={},wt={},ES={touchstart:!0,touchmove:!0};class CS{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.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 SS(t){for(let e in kt){let n=kt[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{OS(t,r)&&!Ma(t,r)&&(t.editable||!(r.type in wt))&&n(t,r)},ES[e]?{passive:!0}:void 0)}bt&&t.dom.addEventListener("input",()=>null),Na(t)}function er(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function _S(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 Na(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Ma(t,r))})}function Ma(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function OS(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 TS(t,e){!Ma(t,e)&&kt[e.type]&&(t.editable||!(e.type in wt))&&kt[e.type](t,e)}wt.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Op(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(On&&ft&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),si&&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",i=>i(t,Sr(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||gS(t,n)?n.preventDefault():er(t,"key")},wt.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},wt.keypress=(t,e)=>{let n=e;if(Op(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ht&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof ke)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,i))&&t.dispatch(t.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function ws(t){return{left:t.clientX,top:t.clientY}}function NS(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Aa(t,e,n,r,i){if(r==-1)return!1;let o=t.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(t.someProp(e,l=>s>o.depth?l(t,n,o.nodeAfter,o.before(s),i,!0):l(t,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function ci(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 MS(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&pe.isSelectable(r)?(ci(t,new pe(n)),!0):!1}function AS(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof pe&&(r=n.node);let o=t.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let l=s>o.depth?o.nodeAfter:o.node(s);if(pe.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(s);break}}return i!=null?(ci(t,pe.create(t.state.doc,i)),!0):!1}function DS(t,e,n,r,i){return Aa(t,"handleClickOn",e,n,r)||t.someProp("handleClick",o=>o(t,e,r))||(i?AS(t,n):MS(t,n))}function LS(t,e,n,r){return Aa(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function BS(t,e,n,r){return Aa(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||$S(t,n,r)}function $S(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(ci(t,ke.create(r,0,r.content.size)),!0):!1;let i=r.resolve(e);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),l=i.before(o);if(s.inlineContent)ci(t,ke.create(r,l+1,l+1+s.content.size));else if(pe.isSelectable(s))ci(t,pe.create(r,l));else continue;return!0}}function Da(t){return vs(t)}const _p=Ht?"metaKey":"ctrlKey";kt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Da(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&NS(n,t.input.lastClick)&&!n[_p]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=t.posAtCoords(ws(n));s&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new IS(t,s,n,!!r)):(o=="doubleClick"?LS:BS)(t,s.pos,s.inside,n)?n.preventDefault():er(t,"pointer"))};class IS{constructor(e,n,r,i){this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[_p],this.allowDefault=r.shiftKey;let o,s;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),s=n.inside;else{let u=e.state.doc.resolve(n.pos);o=u.parent,s=u.depth?u.before():0}const l=i?null:r.target,c=l?e.docView.nearestDesc(l,!0):null;this.target=c&&c.dom.nodeType==1?c.dom:null;let{selection:d}=e.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||d instanceof pe&&d.from<=s&&d.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&tn&&!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)),er(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(()=>Nn(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(ws(e))),this.updateAllowDefault(e),this.allowDefault||!n?er(this.view,"pointer"):DS(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||bt&&this.mightDrag&&!this.mightDrag.node.isAtom||ft&&!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)?(ci(this.view,xe.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):er(this.view,"pointer")}move(e){this.updateAllowDefault(e),er(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)}}kt.touchstart=t=>{t.input.lastTouch=Date.now(),Da(t),er(t,"pointer")},kt.touchmove=t=>{t.input.lastTouch=Date.now(),er(t,"pointer")},kt.contextmenu=t=>Da(t);function Op(t,e){return t.composing?!0:bt&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const VS=On?5e3:-1;wt.compositionstart=wt.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof ke&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),vs(t,!0),t.markCursor=null;else if(vs(t,!e.selection.empty),tn&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let l=t.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}t.input.composing=!0}Tp(t,VS)},wt.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++,Tp(t,20))};function Tp(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>vs(t),e))}function Np(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=RS());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function PS(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=MC(e.focusNode,e.focusOffset),r=AC(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function RS(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function vs(t,e=!1){if(!(On&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Np(t),e||t.docView&&t.docView.dirty){let n=va(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function FS(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(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const co=Ot&&Jn<15||si&&IC<604;kt.copy=wt.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let o=co?null:n.clipboardData,s=r.content(),{dom:l,text:c}=_a(t,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",l.innerHTML),o.setData("text/plain",c)):FS(t,l),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function zS(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function jS(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 i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?uo(t,r.value,null,i,e):uo(t,r.textContent,r.innerHTML,i,e)},50)}function uo(t,e,n,r,i){let o=bp(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",c=>c(t,i,o||re.empty)))return!0;if(!o)return!1;let s=zS(o),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(o);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Mp(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," "):""}wt.paste=(t,e)=>{let n=e;if(t.composing&&!On)return;let r=co?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&uo(t,Mp(r),r.getData("text/html"),i,n)?n.preventDefault():jS(t,n)};class Ap{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Dp=Ht?"altKey":"ctrlKey";kt.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(ws(n)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof pe?i.to-1:i.to))){if(r&&r.mightDrag)s=pe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=pe.create(t.state.doc,f.posBefore))}}let l=(s||t.state.selection).content(),{dom:c,text:d,slice:u}=_a(t,l);(!n.dataTransfer.files.length||!ft||Ph>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(co?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",co||n.dataTransfer.setData("text/plain",d),t.dragging=new Ap(u,!n[Dp],s)},kt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},wt.dragover=wt.dragenter=(t,e)=>e.preventDefault(),wt.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(ws(n));if(!i)return;let o=t.state.doc.resolve(i.pos),s=r&&r.slice;s?t.someProp("transformPasted",m=>{s=m(s,t)}):s=bp(t,Mp(n.dataTransfer),co?null:n.dataTransfer.getData("text/html"),!1,o);let l=!!(r&&!n[Dp]);if(t.someProp("handleDrop",m=>m(t,n,s||re.empty,l))){n.preventDefault();return}if(!s)return;n.preventDefault();let c=s?vh(t.state.doc,o.pos,s):o.pos;c==null&&(c=o.pos);let d=t.state.tr;if(l){let{node:m}=r;m?m.replace(d):d.deleteSelection()}let u=d.mapping.map(c),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,h=d.doc;if(f?d.replaceRangeWith(u,u,s.content.firstChild):d.replaceRange(u,u,s),d.doc.eq(h))return;let p=d.doc.resolve(u);if(f&&pe.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))d.setSelection(new pe(p));else{let m=d.mapping.map(c);d.mapping.maps[d.mapping.maps.length-1].forEach((g,y,k,x)=>m=x),d.setSelection(Ea(t,p,d.doc.resolve(m)))}t.focus(),t.dispatch(d.setMeta("uiEvent","drop"))},kt.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())&&Nn(t)},20))},kt.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)},kt.beforeinput=(t,e)=>{if(ft&&On&&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",o=>o(t,Sr(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in wt)kt[t]=wt[t];function fo(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 xs{constructor(e,n){this.toDOM=e,this.spec=n||Nr,this.side=this.spec.side||0}map(e,n,r,i){let{pos:o,deleted:s}=e.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Vt(o-r,o-r,this)}valid(){return!0}eq(e){return this==e||e instanceof xs&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&fo(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class tr{constructor(e,n){this.attrs=e,this.spec=n||Nr}map(e,n,r,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Vt(o,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof tr&&fo(this.attrs,e.attrs)&&fo(this.spec,e.spec)}static is(e){return e.type instanceof tr}destroy(){}}class La{constructor(e,n){this.attrs=e,this.spec=n||Nr}map(e,n,r,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let s=e.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Vt(o.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),o;return i==n.from&&!(o=e.child(r)).isText&&i+o.nodeSize==n.to}eq(e){return this==e||e instanceof La&&fo(this.attrs,e.attrs)&&fo(this.spec,e.spec)}destroy(){}}class Vt{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Vt(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 Vt(e,e,new xs(n,r))}static inline(e,n,r,i){return new Vt(e,n,new tr(r,i))}static node(e,n,r,i){return new Vt(e,n,new La(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof tr}get widget(){return this.type instanceof xs}}const di=[],Nr={};class Ye{constructor(e,n){this.local=e.length?e:di,this.children=n.length?n:di}static create(e,n){return n.length?Es(n,e,0,Nr):ht}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,o){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=n&&l.to>=e&&(!o||o(l.spec))&&r.push(l.copy(l.from+i,l.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,i+l,o)}}map(e,n,r){return this==ht||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Nr)}mapInner(e,n,r,i,o){let s;for(let l=0;l<this.local.length;l++){let c=this.local[l].map(e,r,i);c&&c.type.valid(n,c)?(s||(s=[])).push(c):o.onRemove&&o.onRemove(this.local[l].spec)}return this.children.length?HS(this.children,s||[],e,n,r,i,o):s?new Ye(s.sort(Mr),di):ht}add(e,n){return n.length?this==ht?Ye.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,o=0;e.forEach((l,c)=>{let d=c+r,u;if(u=Bp(n,l,d)){for(i||(i=this.children.slice());o<i.length&&i[o]<c;)o+=3;i[o]==c?i[o+2]=i[o+2].addInner(l,u,d+1):i.splice(o,0,c,c+l.nodeSize,Es(u,l,d+1,Nr)),o+=3}});let s=Lp(o?$p(n):n,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new Ye(s.length?this.local.concat(s).sort(Mr):this.local,i||this.children)}remove(e){return e.length==0||this==ht?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,l=r[o]+n,c=r[o+1]+n;for(let u=0,f;u<e.length;u++)(f=e[u])&&f.from>l&&f.to<c&&(e[u]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let d=r[o+2].removeInner(s,l+1);d!=ht?r[o+2]=d:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<e.length;o++)if(s=e[o])for(let l=0;l<i.length;l++)i[l].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(l--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new Ye(i,r):ht}forChild(e,n){if(this==ht)return this;if(n.isLeaf)return Ye.empty;let r,i;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let o=e+1,s=o+n.content.size;for(let l=0;l<this.local.length;l++){let c=this.local[l];if(c.from<s&&c.to>o&&c.type instanceof tr){let d=Math.max(o,c.from)-o,u=Math.min(s,c.to)-o;d<u&&(i||(i=[])).push(c.copy(d,u))}}if(i){let l=new Ye(i.sort(Mr),di);return r?new nr([l,r]):l}return r||ht}eq(e){if(this==e)return!0;if(!(e instanceof Ye)||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 Ba(this.localsInner(e))}localsInner(e){if(this==ht)return di;if(e.inlineContent||!this.local.some(tr.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof tr||n.push(this.local[r]);return n}forEachSet(e){e(this)}}Ye.empty=new Ye([],[]),Ye.removeOverlap=Ba;const ht=Ye.empty;class nr{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,Nr));return nr.from(r)}forChild(e,n){if(n.isLeaf)return Ye.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=ht&&(o instanceof nr?r=r.concat(o.members):r.push(o))}return nr.from(r)}eq(e){if(!(e instanceof nr)||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 i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?Ba(r?n:n.sort(Mr)):di}static from(e){switch(e.length){case 0:return ht;case 1:return e[0];default:return new nr(e.every(n=>n instanceof Ye)?e:e.reduce((n,r)=>n.concat(r instanceof Ye?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function HS(t,e,n,r,i,o,s){let l=t.slice();for(let d=0,u=o;d<n.maps.length;d++){let f=0;n.maps[d].forEach((h,p,m,g)=>{let y=g-m-(p-h);for(let k=0;k<l.length;k+=3){let x=l[k+1];if(x<0||h>x+u-f)continue;let w=l[k]+u-f;p>=w?l[k+1]=h<=w?-2:-1:h>=u&&y&&(l[k]+=y,l[k+1]+=y)}f+=y}),u=n.maps[d].map(u,-1)}let c=!1;for(let d=0;d<l.length;d+=3)if(l[d+1]<0){if(l[d+1]==-2){c=!0,l[d+1]=-1;continue}let u=n.map(t[d]+o),f=u-i;if(f<0||f>=r.content.size){c=!0;continue}let h=n.map(t[d+1]+o,-1),p=h-i,{index:m,offset:g}=r.content.findIndex(f),y=r.maybeChild(m);if(y&&g==f&&g+y.nodeSize==p){let k=l[d+2].mapInner(n,y,u+1,t[d]+o+1,s);k!=ht?(l[d]=f,l[d+1]=p,l[d+2]=k):(l[d+1]=-2,c=!0)}else c=!0}if(c){let d=WS(l,t,e,n,i,o,s),u=Es(d,r,0,s);e=u.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,h=0;f<u.children.length;f+=3){let p=u.children[f];for(;h<l.length&&l[h]<p;)h+=3;l.splice(h,0,u.children[f],u.children[f+1],u.children[f+2])}}return new Ye(e.sort(Mr),l)}function Lp(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Vt(i.from+e,i.to+e,i.type))}return n}function WS(t,e,n,r,i,o,s){function l(c,d){for(let u=0;u<c.local.length;u++){let f=c.local[u].map(r,i,d);f?n.push(f):s.onRemove&&s.onRemove(c.local[u].spec)}for(let u=0;u<c.children.length;u+=3)l(c.children[u+2],c.children[u]+d+1)}for(let c=0;c<t.length;c+=3)t[c+1]==-1&&l(t[c+2],e[c]+o+1);return n}function Bp(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let o=0,s;o<t.length;o++)(s=t[o])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),t[o]=null);return i}function $p(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Es(t,e,n,r){let i=[],o=!1;e.forEach((l,c)=>{let d=Bp(t,l,c+n);if(d){o=!0;let u=Es(d,l,n+c+1,r);u!=ht&&i.push(c,c+l.nodeSize,u)}});let s=Lp(o?$p(t):t,-n).sort(Mr);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||i.length?new Ye(s,i):ht}function Mr(t,e){return t.from-e.from||t.to-e.to}function Ba(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from==r.from){o.to!=r.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,r.to),Ip(e,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,o.from),Ip(e,i,r.copy(o.from,r.to)));break}}}return e}function Ip(t,e,n){for(;e<t.length&&Mr(n,t[e])>0;)e++;t.splice(e,0,n)}function $a(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=ht&&e.push(r)}),t.cursorWrapper&&e.push(Ye.create(t.state.doc,[t.cursorWrapper.deco])),nr.from(e)}const US={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},YS=Ot&&Jn<=11;class qS{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 KS{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new qS,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Ot&&Jn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),YS&&(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,US)),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(dp(this.view)){if(this.suppressingSelectionUpdates)return Nn(this.view);if(Ot&&Jn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Cr(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 o=e.focusNode;o;o=no(o))n.add(o);for(let o=e.anchorNode;o;o=no(o))if(n.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.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(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&dp(e)&&!this.ignoreSelectionChange(r),o=-1,s=-1,l=!1,c=[];if(e.editable)for(let u=0;u<n.length;u++){let f=this.registerMutation(n[u],c);f&&(o=o<0?f.from:Math.min(f.from,o),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(l=!0))}if(tn&&c.length){let u=c.filter(f=>f.nodeName=="BR");if(u.length==2){let[f,h]=u;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of u){let p=h.parentNode;p&&p.nodeName=="LI"&&(!f||ZS(e,f)!=p)&&h.remove()}}}let d=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&gs(r)&&(d=va(e))&&d.eq(xe.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Nn(e),this.currentSelection.set(r)):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,s),GS(e)),this.handleDOMChange(o,s,l,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Nn(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 u=0;u<e.addedNodes.length;u++){let f=e.addedNodes[u];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,o=e.nextSibling;if(Ot&&Jn<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:f,nextSibling:h}=e.addedNodes[u];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==e.target?ot(i)+1:0,l=r.localPosFromDOM(e.target,s,-1),c=o&&o.parentNode==e.target?ot(o):e.target.childNodes.length,d=r.localPosFromDOM(e.target,c,1);return{from:l,to:d}}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 Vp=new WeakMap,Pp=!1;function GS(t){if(!Vp.has(t)&&(Vp.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=tn,Pp)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."),Pp=!0}}function Rp(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return Cr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function JS(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Rp(t,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Rp(t,n):null}function ZS(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 XS(t,e,n){let{node:r,fromOffset:i,toOffset:o,from:s,to:l}=t.docView.parseRange(e,n),c=t.domSelectionRange(),d,u=c.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(d=[{node:u,offset:c.anchorOffset}],gs(c)||d.push({node:c.focusNode,offset:c.focusOffset})),ft&&t.input.lastKeyCode===8)for(let y=o;y>i;y--){let k=r.childNodes[y-1],x=k.pmViewDesc;if(k.nodeName=="BR"&&!x){o=y;break}if(!x||x.size)break}let f=t.state.doc,h=t.someProp("domParser")||Un.fromSchema(t.state.schema),p=f.resolve(s),m=null,g=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:o,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:d,ruleFromNode:QS,context:p});if(d&&d[0].pos!=null){let y=d[0].pos,k=d[1]&&d[1].pos;k==null&&(k=y),m={anchor:y+s,head:k+s}}return{doc:g,sel:m,from:s,to:l}}function QS(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(bt&&/^(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||bt&&/^(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 e_=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function t_(t,e,n,r,i){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let A=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,P=va(t,A);if(P&&!t.state.selection.eq(P)){if(ft&&On&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",L=>L(t,Sr(13,"Enter"))))return;let $=t.state.tr.setSelection(P);A=="pointer"?$.setMeta("pointer",!0):A=="key"&&$.scrollIntoView(),o&&$.setMeta("composition",o),t.dispatch($)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let c=t.state.selection,d=XS(t,e,n),u=t.state.doc,f=u.slice(d.from,d.to),h,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,p="end"):(h=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let m=i_(f.content,d.doc.content,d.from,h,p);if(m&&t.input.domChangeCount++,(si&&t.input.lastIOSEnter>Date.now()-225||On)&&i.some(A=>A.nodeType==1&&!e_.test(A.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",A=>A(t,Sr(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof ke&&!c.empty&&c.$head.sameParent(c.$anchor)&&!t.composing&&!(d.sel&&d.sel.anchor!=d.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(d.sel){let A=Fp(t,t.state.doc,d.sel);if(A&&!A.eq(t.state.selection)){let P=t.state.tr.setSelection(A);o&&P.setMeta("composition",o),t.dispatch(P)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof ke&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Ot&&Jn<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>d.from&&d.doc.textBetween(m.start-d.from-1,m.start-d.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let g=d.doc.resolveNoCache(m.start-d.from),y=d.doc.resolveNoCache(m.endB-d.from),k=u.resolve(m.start),x=g.sameParent(y)&&g.parent.inlineContent&&k.end()>=m.endA,w;if((si&&t.input.lastIOSEnter>Date.now()-225&&(!x||i.some(A=>A.nodeName=="DIV"||A.nodeName=="P"))||!x&&g.pos<d.doc.content.size&&!g.sameParent(y)&&(w=xe.findFrom(d.doc.resolve(g.pos+1),1,!0))&&w.head==y.pos)&&t.someProp("handleKeyDown",A=>A(t,Sr(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&r_(u,m.start,m.endA,g,y)&&t.someProp("handleKeyDown",A=>A(t,Sr(8,"Backspace")))){On&&ft&&t.domObserver.suppressSelectionUpdates();return}ft&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),On&&!x&&g.start()!=y.start()&&y.parentOffset==0&&g.depth==y.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==m.endA&&(m.endB-=2,y=d.doc.resolveNoCache(m.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(A){return A(t,Sr(13,"Enter"))})},20));let b=m.start,S=m.endA,v,O,B;if(x){if(g.pos==y.pos)Ot&&Jn<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Nn(t),20)),v=t.state.tr.delete(b,S),O=u.resolve(m.start).marksAcross(u.resolve(m.endA));else if(m.endA==m.endB&&(B=n_(g.parent.content.cut(g.parentOffset,y.parentOffset),k.parent.content.cut(k.parentOffset,m.endA-k.start()))))v=t.state.tr,B.type=="add"?v.addMark(b,S,B.mark):v.removeMark(b,S,B.mark);else if(g.parent.child(g.index()).isText&&g.index()==y.index()-(y.textOffset?0:1)){let A=g.parent.textBetween(g.parentOffset,y.parentOffset);if(t.someProp("handleTextInput",P=>P(t,b,S,A)))return;v=t.state.tr.insertText(A,b,S)}}if(v||(v=t.state.tr.replace(b,S,d.doc.slice(m.start-d.from,m.endB-d.from))),d.sel){let A=Fp(t,v.doc,d.sel);A&&!(ft&&t.composing&&A.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(A.head==b||A.head==v.mapping.map(S)-1)||Ot&&A.empty&&A.head==b)&&v.setSelection(A)}O&&v.ensureMarks(O),o&&v.setMeta("composition",o),t.dispatch(v.scrollIntoView())}function Fp(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Ea(t,e.resolve(n.anchor),e.resolve(n.head))}function n_(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,o=r,s,l,c;for(let u=0;u<r.length;u++)i=r[u].removeFromSet(i);for(let u=0;u<n.length;u++)o=n[u].removeFromSet(o);if(i.length==1&&o.length==0)l=i[0],s="add",c=u=>u.mark(l.addToSet(u.marks));else if(i.length==0&&o.length==1)l=o[0],s="remove",c=u=>u.mark(l.removeFromSet(u.marks));else return null;let d=[];for(let u=0;u<e.childCount;u++)d.push(c(e.child(u)));if(J.from(d).eq(t))return{mark:l,type:s}}function r_(t,e,n,r,i){if(n-e<=i.pos-r.pos||Ia(r,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!r.parent.isTextblock){let l=o.nodeAfter;return l!=null&&n==e+l.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=t.resolve(Ia(o,!0,!0));return!s.parent.isTextblock||s.pos>n||Ia(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Ia(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let o=t.node(r).maybeChild(t.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function i_(t,e,n,r,i){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(i=="end"){let c=Math.max(0,o-Math.min(s,l));r-=s+c-o}if(s<o&&t.size<e.size){let c=r<=o&&r>=s?o-r:0;o-=c,o&&o<e.size&&zp(e.textBetween(o-1,o+1))&&(o+=c?1:-1),l=o+(l-s),s=o}else if(l<o){let c=r<=o&&r>=l?o-r:0;o-=c,o&&o<t.size&&zp(t.textBetween(o-1,o+1))&&(o+=c?1:-1),s=o+(s-l),l=o}return{start:o,endA:s,endB:l}}function zp(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 o_{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 CS,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Yp),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=Wp(this),Hp(this),this.nodeViews=Up(this),this.docView=Xh(this.state.doc,jp(this),$a(this),this.dom,this),this.domObserver=new KS(this,(r,i,o,s)=>t_(this,r,i,o,s)),this.domObserver.start(),SS(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&&Na(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Yp),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 i=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(Np(this),s=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=Up(this);l_(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&Na(this),this.editable=Wp(this),Hp(this);let c=$a(this),d=jp(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(e.doc,d,c);(f||!e.selection.eq(i.selection))&&(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&RC(this);if(s){this.domObserver.stop();let p=f&&(Ot||ft)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&s_(i.selection,e.selection);if(f){let m=ft?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=PS(this)),(o||!this.docView.update(e.doc,d,c,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=Xh(e.doc,d,c,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&cS(this))?Nn(this,p):(ap(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&FC(h)}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 pe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Rh(this,n.getBoundingClientRect(),e)}else Rh(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,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new Ap(e.slice,e.move,i<0?void 0:pe.create(this.state.doc,i))}someProp(e,n){let r=this._props&&this._props[e],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(i=n?n(l):l))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let l=o[s].props[e];if(l!=null&&(i=n?n(l):l))return i}}hasFocus(){if(Ot){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&&zC(this.dom),Nn(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 YC(this,e)}coordsAtPos(e,n=1){return Uh(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 i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return ZC(this,n||this.state,e)}pasteHTML(e,n){return uo(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return uo(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return _a(this,e)}destroy(){this.docView&&(_S(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],$a(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,TC())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return TS(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?bt&&this.root.nodeType===11&&LC(this.dom.ownerDocument)==this.dom&&JS(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function jp(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"),[Vt.node(0,t.state.doc.content.size,e)]}function Hp(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:Vt.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Wp(t){return!t.someProp("editable",e=>e(t.state)===!1)}function s_(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 Up(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function l_(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r}function Yp(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 rr={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:"'"},Cs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},a_=typeof navigator<"u"&&/Mac/.test(navigator.platform),c_=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),st=0;st<10;st++)rr[48+st]=rr[96+st]=String(st);for(var st=1;st<=24;st++)rr[st+111]="F"+st;for(var st=65;st<=90;st++)rr[st]=String.fromCharCode(st+32),Cs[st]=String.fromCharCode(st);for(var Va in rr)Cs.hasOwnProperty(Va)||(Cs[Va]=rr[Va]);function d_(t){var e=a_&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||c_&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Cs:rr)[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 u_=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function f_(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,o,s;for(let l=0;l<e.length-1;l++){let c=e[l];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))o=!0;else if(/^mod$/i.test(c))u_?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function h_(t){let e=Object.create(null);for(let n in t)e[f_(n)]=t[n];return e}function Pa(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 p_(t){return new it({props:{handleKeyDown:qp(t)}})}function qp(t){let e=h_(t);return function(n,r){let i=d_(r),o,s=e[Pa(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let l=e[Pa(i,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=rr[r.keyCode])&&o!=i){let l=e[Pa(o,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}const Ra=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Kp(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Gp=(t,e,n)=>{let r=Kp(t,n);if(!r)return!1;let i=Fa(r);if(!i){let s=r.blockRange(),l=s&&ti(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let o=i.nodeBefore;if(im(t,i,e,-1))return!0;if(r.parent.content.size==0&&(ui(o,"end")||pe.isSelectable(o)))for(let s=r.depth;;s--){let l=ps(t.doc,r.before(s),r.after(s),re.empty);if(l&&l.slice.size<l.to-l.from){if(e){let c=t.tr.step(l);c.setSelection(ui(o,"end")?xe.findFrom(c.doc.resolve(c.mapping.map(i.pos,-1)),-1):pe.create(c.doc,i.pos-o.nodeSize)),e(c.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},m_=(t,e,n)=>{let r=Kp(t,n);if(!r)return!1;let i=Fa(r);return i?Jp(t,i,e):!1},g_=(t,e,n)=>{let r=Xp(t,n);if(!r)return!1;let i=za(r);return i?Jp(t,i,e):!1};function Jp(t,e,n){let r=e.nodeBefore,i=r,o=e.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let u=i.lastChild;if(!u)return!1;i=u}let s=e.nodeAfter,l=s,c=e.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let u=l.firstChild;if(!u)return!1;l=u}let d=ps(t.doc,o,c,re.empty);if(!d||d.from!=o||d instanceof Ze&&d.slice.size>=c-o)return!1;if(n){let u=t.tr.step(d);u.setSelection(ke.create(u.doc,o)),n(u.scrollIntoView())}return!0}function ui(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 Zp=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;o=Fa(r)}let s=o&&o.nodeBefore;return!s||!pe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(pe.create(t.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function Fa(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 Xp(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Qp=(t,e,n)=>{let r=Xp(t,n);if(!r)return!1;let i=za(r);if(!i)return!1;let o=i.nodeAfter;if(im(t,i,e,1))return!0;if(r.parent.content.size==0&&(ui(o,"start")||pe.isSelectable(o))){let s=ps(t.doc,r.before(),r.after(),re.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=t.tr.step(s);l.setSelection(ui(o,"start")?xe.findFrom(l.doc.resolve(l.mapping.map(i.pos)),1):pe.create(l.doc,l.mapping.map(i.pos))),e(l.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},em=(t,e,n)=>{let{$head:r,empty:i}=t.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;o=za(r)}let s=o&&o.nodeAfter;return!s||!pe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(pe.create(t.doc,o.pos)).scrollIntoView()),!0)};function za(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 y_=(t,e)=>{let n=t.selection,r=n instanceof pe,i;if(r){if(n.node.isTextblock||!Kn(t.doc,n.from))return!1;i=n.from}else if(i=hs(t.doc,n.from,-1),i==null)return!1;if(e){let o=t.tr.join(i);r&&o.setSelection(pe.create(o.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},b_=(t,e)=>{let n=t.selection,r;if(n instanceof pe){if(n.node.isTextblock||!Kn(t.doc,n.to))return!1;r=n.to}else if(r=hs(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},k_=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),o=i&&ti(i);return o==null?!1:(e&&e(t.tr.lift(i,o).scrollIntoView()),!0)},tm=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
36
36
  `).scrollIntoView()),!0)};function ja(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 w_=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=ja(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(e){let l=n.after(),c=t.tr.replaceWith(l,l,s.createAndFill());c.setSelection(xe.near(c.doc.resolve(l),1)),e(c.scrollIntoView())}return!0},nm=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof $t||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=ja(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=t.tr.insert(s,o.createAndFill());l.setSelection(ke.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},rm=(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 o=n.before();if(Sn(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&ti(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)};function v_(t){return(e,n)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof pe&&e.selection.node.isBlock)return!r.parentOffset||!Sn(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let o=[],s,l,c=!1,d=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){c=r.end(p)==r.pos+(r.depth-p),d=r.start(p)==r.pos-(r.depth-p),l=ja(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),o.unshift(c&&l?{type:l}:null),s=p;break}else{if(p==1)return!1;o.unshift(null)}let u=e.tr;(e.selection instanceof ke||e.selection instanceof $t)&&u.deleteSelection();let f=u.mapping.map(r.pos),h=Sn(u.doc,f,o.length,o);if(h||(o[0]=l?{type:l}:null,h=Sn(u.doc,f,o.length,o)),u.split(f,o.length,o),!c&&d&&r.node(s).type!=l){let p=u.mapping.map(r.before(s)),m=u.doc.resolve(p);l&&r.node(s-1).canReplaceWith(m.index(),m.index()+1,l)&&u.setNodeMarkup(u.mapping.map(r.before(s)),l)}return n&&n(u.scrollIntoView()),!0}}const x_=v_(),E_=(t,e)=>{let{$from:n,to:r}=t.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),e&&e(t.tr.setSelection(pe.create(t.doc,i))),!0)};function C_(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,o=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||Kn(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function im(t,e,n,r){let i=e.nodeBefore,o=e.nodeAfter,s,l,c=i.type.spec.isolating||o.type.spec.isolating;if(!c&&C_(t,e,n))return!0;let d=!c&&e.parent.canReplace(e.index(),e.index()+1);if(d&&(s=(l=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&l.matchType(s[0]||o.type).validEnd){if(n){let p=e.pos+o.nodeSize,m=J.empty;for(let k=s.length-1;k>=0;k--)m=J.from(s[k].create(null,m));m=J.from(i.copy(m));let g=t.tr.step(new Xe(e.pos-1,p,e.pos,p,new re(m,1,0),s.length,!0)),y=g.doc.resolve(p+2*s.length);y.nodeAfter&&y.nodeAfter.type==i.type&&Kn(g.doc,y.pos)&&g.join(y.pos),n(g.scrollIntoView())}return!0}let u=o.type.spec.isolating||r>0&&c?null:xe.findFrom(e,1),f=u&&u.$from.blockRange(u.$to),h=f&&ti(f);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(f,h).scrollIntoView()),!0;if(d&&ui(o,"start",!0)&&ui(i,"end")){let p=i,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let g=o,y=1;for(;!g.isTextblock;g=g.firstChild)y++;if(p.canReplace(p.childCount,p.childCount,g.content)){if(n){let k=J.empty;for(let w=m.length-1;w>=0;w--)k=J.from(m[w].copy(k));let x=t.tr.step(new Xe(e.pos-m.length,e.pos+o.nodeSize,e.pos+y,e.pos+o.nodeSize-y,new re(k,m.length,0),0,!0));n(x.scrollIntoView())}return!0}}return!1}function om(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(e.tr.setSelection(ke.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const S_=om(-1),__=om(1);function O_(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),l=s&&sa(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function sm(t,e=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[o];n.doc.nodesBetween(s,l,(c,d)=>{if(i)return!1;if(!(!c.isTextblock||c.hasMarkup(t,e)))if(c.type==t)i=!0;else{let u=n.doc.resolve(d),f=u.index();i=u.parent.canReplaceWith(f,f+1,t)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:c}}=n.selection.ranges[s];o.setBlockType(l,c,t,e)}r(o.scrollIntoView())}return!0}}function Ha(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}Ha(Ra,Gp,Zp),Ha(Ra,Qp,em),Ha(tm,nm,rm,x_),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function T_(t,e=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o);if(!s)return!1;let l=r?n.tr:null;return N_(l,s,t,e)?(r&&r(l.scrollIntoView()),!0):!1}}function N_(t,e,n,r=null){let i=!1,o=e,s=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 c=s.resolve(e.start-2);o=new ss(c,c,e.depth),e.endIndex<e.parent.childCount&&(e=new ss(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let l=sa(o,n,r,e);return l?(t&&M_(t,e,l,i,n),!0):!1}function M_(t,e,n,r,i){let o=J.empty;for(let u=n.length-1;u>=0;u--)o=J.from(n[u].type.create(n[u].attrs,o));t.step(new Xe(e.start-(r?2:0),e.end,e.start,e.end,new re(o,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==i&&(s=u+1);let l=n.length-s,c=e.start+n.length-(r?2:0),d=e.parent;for(let u=e.startIndex,f=e.endIndex,h=!0;u<f;u++,h=!1)!h&&Sn(t.doc,c,l)&&(t.split(c,l),c+=2*l),c+=d.child(u).nodeSize;return t}function A_(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==t);return o?n?r.node(o.depth-1).type==t?D_(e,n,t,o):L_(e,n,o):!0:!1}}function D_(t,e,n,r){let i=t.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new Xe(o-1,s,o,s,new re(J.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new ss(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const l=ti(r);if(l==null)return!1;i.lift(r,l);let c=i.mapping.map(o,-1)-1;return Kn(i.doc,c)&&i.join(c),e(i.scrollIntoView()),!0}function L_(t,e,n){let r=t.tr,i=n.parent;for(let p=n.end,m=n.endIndex-1,g=n.startIndex;m>g;m--)p-=i.child(m).nodeSize,r.delete(p-1,p+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,c=n.endIndex==i.childCount,d=o.node(-1),u=o.index(-1);if(!d.canReplace(u+(l?0:1),u+1,s.content.append(c?J.empty:J.from(i))))return!1;let f=o.pos,h=f+s.nodeSize;return r.step(new Xe(f-(l?1:0),h+(c?1:0),f+1,h-1,new re((l?J.empty:J.from(i.copy(J.empty))).append(c?J.empty:J.from(i.copy(J.empty))),l?0:1,c?0:1),l?0:1)),e(r.scrollIntoView()),!0}function B_(t){return function(e,n){let{$from:r,$to:i}=e.selection,o=r.blockRange(i,d=>d.childCount>0&&d.firstChild.type==t);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let l=o.parent,c=l.child(s-1);if(c.type!=t)return!1;if(n){let d=c.lastChild&&c.lastChild.type==l.type,u=J.from(d?t.create():null),f=new re(J.from(t.create(null,J.from(l.type.create(null,u)))),d?3:1,0),h=o.start,p=o.end;n(e.tr.step(new Xe(h-(d?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}function Ss(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=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 o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}class _s{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:n,state:r}=this,{view:i}=n,{tr:o}=r,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([l,c])=>[l,(...u)=>{const f=c(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(o),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,l=[],c=!!e,d=e||o.tr,u=()=>(!c&&n&&!d.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(d),l.every(h=>h===!0)),f={...Object.fromEntries(Object.entries(r).map(([h,p])=>[h,(...g)=>{const y=this.buildProps(d,n),k=p(...g)(y);return l.push(k),f}])),run:u};return f}createCan(e){const{rawCommands:n,state:r}=this,i=!1,o=e||r.tr,s=this.buildProps(o,i);return{...Object.fromEntries(Object.entries(n).map(([c,d])=>[c,(...u)=>d(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,i)}}buildProps(e,n=!0){const{rawCommands:r,editor:i,state:o}=this,{view:s}=i,l={tr:e,editor:i,view:s,state:Ss({state:o,transaction:e}),dispatch:n?()=>{}:void 0,chain:()=>this.createChain(e,n),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([c,d])=>[c,(...u)=>d(...u)(l)]))}};return l}}class $_{constructor(){this.callbacks={}}on(e,n){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(n),this}emit(e,...n){const r=this.callbacks[e];return r&&r.forEach(i=>i.apply(this,n)),this}off(e,n){const r=this.callbacks[e];return r&&(n?this.callbacks[e]=r.filter(i=>i!==n):delete this.callbacks[e]),this}once(e,n){const r=(...i)=>{this.off(e,r),n.apply(this,i)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function le(t,e,n){return t.config[e]===void 0&&t.parent?le(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?le(t.parent,e,n):null}):t.config[e]}function Os(t){const e=t.filter(i=>i.type==="extension"),n=t.filter(i=>i.type==="node"),r=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function lm(t){const e=[],{nodeExtensions:n,markExtensions:r}=Os(t),i=[...n,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return t.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage,extensions:i},c=le(s,"addGlobalAttributes",l);if(!c)return;c().forEach(u=>{u.types.forEach(f=>{Object.entries(u.attributes).forEach(([h,p])=>{e.push({type:f,name:h,attribute:{...o,...p}})})})})}),i.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage},c=le(s,"addAttributes",l);if(!c)return;const d=c();Object.entries(d).forEach(([u,f])=>{const h={...o,...f};typeof(h==null?void 0:h.default)=="function"&&(h.default=h.default()),h!=null&&h.isRequired&&(h==null?void 0:h.default)===void 0&&delete h.default,e.push({type:s.name,name:u,attribute:h})})}),e}function Qe(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}function Fe(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const l=o?String(o).split(" "):[],c=r[i]?r[i].split(" "):[],d=l.filter(u=>!c.includes(u));r[i]=[...c,...d].join(" ")}else if(i==="style"){const l=o?o.split(";").map(u=>u.trim()).filter(Boolean):[],c=r[i]?r[i].split(";").map(u=>u.trim()).filter(Boolean):[],d=new Map;c.forEach(u=>{const[f,h]=u.split(":").map(p=>p.trim());d.set(f,h)}),l.forEach(u=>{const[f,h]=u.split(":").map(p=>p.trim());d.set(f,h)}),r[i]=Array.from(d.entries()).map(([u,f])=>`${u}: ${f}`).join("; ")}else r[i]=o}),r},{})}function Wa(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)=>Fe(n,r),{})}function am(t){return typeof t=="function"}function Ce(t,e=void 0,...n){return am(t)?e?t.bind(e)(...n):t(...n):t}function I_(t={}){return Object.keys(t).length===0&&t.constructor===Object}function V_(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function cm(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 i=e.reduce((o,s)=>{const l=s.attribute.parseHTML?s.attribute.parseHTML(n):V_(n.getAttribute(s.name));return l==null?o:{...o,[s.name]:l}},{});return{...r,...i}}}}function dm(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&I_(n)?!1:n!=null))}function P_(t,e){var n;const r=lm(t),{nodeExtensions:i,markExtensions:o}=Os(t),s=(n=i.find(d=>le(d,"topNode")))===null||n===void 0?void 0:n.name,l=Object.fromEntries(i.map(d=>{const u=r.filter(k=>k.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((k,x)=>{const w=le(x,"extendNodeSchema",f);return{...k,...w?w(d):{}}},{}),p=dm({...h,content:Ce(le(d,"content",f)),marks:Ce(le(d,"marks",f)),group:Ce(le(d,"group",f)),inline:Ce(le(d,"inline",f)),atom:Ce(le(d,"atom",f)),selectable:Ce(le(d,"selectable",f)),draggable:Ce(le(d,"draggable",f)),code:Ce(le(d,"code",f)),whitespace:Ce(le(d,"whitespace",f)),linebreakReplacement:Ce(le(d,"linebreakReplacement",f)),defining:Ce(le(d,"defining",f)),isolating:Ce(le(d,"isolating",f)),attrs:Object.fromEntries(u.map(k=>{var x;return[k.name,{default:(x=k==null?void 0:k.attribute)===null||x===void 0?void 0:x.default}]}))}),m=Ce(le(d,"parseHTML",f));m&&(p.parseDOM=m.map(k=>cm(k,u)));const g=le(d,"renderHTML",f);g&&(p.toDOM=k=>g({node:k,HTMLAttributes:Wa(k,u)}));const y=le(d,"renderText",f);return y&&(p.toText=y),[d.name,p]})),c=Object.fromEntries(o.map(d=>{const u=r.filter(y=>y.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((y,k)=>{const x=le(k,"extendMarkSchema",f);return{...y,...x?x(d):{}}},{}),p=dm({...h,inclusive:Ce(le(d,"inclusive",f)),excludes:Ce(le(d,"excludes",f)),group:Ce(le(d,"group",f)),spanning:Ce(le(d,"spanning",f)),code:Ce(le(d,"code",f)),attrs:Object.fromEntries(u.map(y=>{var k;return[y.name,{default:(k=y==null?void 0:y.attribute)===null||k===void 0?void 0:k.default}]}))}),m=Ce(le(d,"parseHTML",f));m&&(p.parseDOM=m.map(y=>cm(y,u)));const g=le(d,"renderHTML",f);return g&&(p.toDOM=y=>g({mark:y,HTMLAttributes:Wa(y,u)})),[d.name,p]}));return new th({topNode:s,nodes:l,marks:c})}function Ua(t,e){return e.nodes[t]||e.marks[t]||null}function um(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function Ya(t,e){const n=Er.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}const R_=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(i,o,s,l)=>{var c,d;const u=((d=(c=i.type.spec).toText)===null||d===void 0?void 0:d.call(c,{node:i,pos:o,parent:s,index:l}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?u:u.slice(0,Math.max(0,r-o))}),n};function qa(t){return Object.prototype.toString.call(t)==="[object RegExp]"}class Ts{constructor(e){this.find=e.find,this.handler=e.handler}}const F_=(t,e)=>{if(qa(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 Ns(t){var e;const{editor:n,from:r,to:i,text:o,rules:s,plugin:l}=t,{view:c}=n;if(c.composing)return!1;const d=c.state.doc.resolve(r);if(d.parent.type.spec.code||!((e=d.nodeBefore||d.nodeAfter)===null||e===void 0)&&e.marks.find(h=>h.type.spec.code))return!1;let u=!1;const f=R_(d)+o;return s.forEach(h=>{if(u)return;const p=F_(f,h.find);if(!p)return;const m=c.state.tr,g=Ss({state:c.state,transaction:m}),y={from:r-(p[0].length-o.length),to:i},{commands:k,chain:x,can:w}=new _s({editor:n,state:g});h.handler({state:g,range:y,match:p,commands:k,chain:x,can:w})===null||!m.steps.length||(m.setMeta(l,{transform:m,from:r,to:i,text:o}),c.dispatch(m),u=!0)}),u}function z_(t){const{editor:e,rules:n}=t,r=new it({state:{init(){return null},apply(i,o,s){const l=i.getMeta(r);if(l)return l;const c=i.getMeta("applyInputRules");return!!c&&setTimeout(()=>{let{text:u}=c;typeof u=="string"?u=u:u=Ya(J.from(u),s.schema);const{from:f}=c,h=f+u.length;Ns({editor:e,from:f,to:h,text:u,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:o}},props:{handleTextInput(i,o,s,l){return Ns({editor:e,from:o,to:s,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&Ns({editor:e,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,o){if(o.key!=="Enter")return!1;const{$cursor:s}=i.state.selection;return s?Ns({editor:e,from:s.pos,to:s.pos,text:`
37
37
  `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function j_(t){return Object.prototype.toString.call(t).slice(8,-1)}function Ms(t){return j_(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function As(t,e){const n={...t};return Ms(t)&&Ms(e)&&Object.keys(e).forEach(r=>{Ms(e[r])&&Ms(t[r])?n[r]=As(t[r],e[r]):n[r]=e[r]}),n}class Ut{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ce(le(this,"addOptions",{name:this.name}))),this.storage=Ce(le(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ut(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>As(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Ut(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ce(le(n,"addOptions",{name:n.name})),n.storage=Ce(le(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(d=>(d==null?void 0:d.type.name)===n.name))return!1;const c=s.find(d=>(d==null?void 0:d.type.name)===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}}function H_(t){return typeof t=="number"}class W_{constructor(e){this.find=e.find,this.handler=e.handler}}const U_=(t,e,n)=>{if(qa(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=t,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function Y_(t){const{editor:e,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:l}=t,{commands:c,chain:d,can:u}=new _s({editor:e,state:n}),f=[];return n.doc.nodesBetween(r,i,(p,m)=>{if(!p.isTextblock||p.type.spec.code)return;const g=Math.max(r,m),y=Math.min(i,m+p.content.size),k=p.textBetween(g-m,y-m,void 0,"");U_(k,o.find,s).forEach(w=>{if(w.index===void 0)return;const b=g+w.index+1,S=b+w[0].length,v={from:n.tr.mapping.map(b),to:n.tr.mapping.map(S)},O=o.handler({state:n,range:v,match:w,commands:c,chain:d,can:u,pasteEvent:s,dropEvent:l});f.push(O)})}),f.every(p=>p!==null)}let Ds=null;const q_=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)===null||e===void 0||e.setData("text/html",t),n};function K_(t){const{editor:e,rules:n}=t;let r=null,i=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const c=({state:u,from:f,to:h,rule:p,pasteEvt:m})=>{const g=u.tr,y=Ss({state:u,transaction:g});if(!(!Y_({editor:e,state:y,from:Math.max(f-1,0),to:h.b-1,rule:p,pasteEvent:m,dropEvent:l})||!g.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g}};return n.map(u=>new it({view(f){const h=m=>{var g;r=!((g=f.dom.parentElement)===null||g===void 0)&&g.contains(m.target)?f.dom.parentElement:null,r&&(Ds=e)},p=()=>{Ds&&(Ds=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(f,h)=>{if(o=r===f.dom.parentElement,l=h,!o){const p=Ds;p&&setTimeout(()=>{const m=p.state.selection;m&&p.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(f,h)=>{var p;const m=(p=h.clipboardData)===null||p===void 0?void 0:p.getData("text/html");return s=h,i=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(f,h,p)=>{const m=f[0],g=m.getMeta("uiEvent")==="paste"&&!i,y=m.getMeta("uiEvent")==="drop"&&!o,k=m.getMeta("applyPasteRules"),x=!!k;if(!g&&!y&&!x)return;if(x){let{text:S}=k;typeof S=="string"?S=S:S=Ya(J.from(S),p.schema);const{from:v}=k,O=v+S.length,B=q_(S);return c({rule:u,state:p,from:v,to:{b:O},pasteEvt:B})}const w=h.doc.content.findDiffStart(p.doc.content),b=h.doc.content.findDiffEnd(p.doc.content);if(!(!H_(w)||!b||w===b.b))return c({rule:u,state:p,from:w,to:b,pasteEvt:s})}}))}function G_(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}class fi{constructor(e,n){this.splittableMarks=[],this.editor=n,this.extensions=fi.resolve(e),this.schema=P_(this.extensions,n),this.setupExtensions()}static resolve(e){const n=fi.sort(fi.flatten(e)),r=G_(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),n}static flatten(e){return e.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},i=le(n,"addExtensions",r);return i?[n,...this.flatten(i())]:n}).flat(10)}static sort(e){return e.sort((r,i)=>{const o=le(r,"priority")||100,s=le(i,"priority")||100;return o>s?-1:o<s?1:0})}get commands(){return this.extensions.reduce((e,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:Ua(n.name,this.schema)},i=le(n,"addCommands",r);return i?{...e,...i()}:e},{})}get plugins(){const{editor:e}=this,n=fi.sort([...this.extensions].reverse()),r=[],i=[],o=n.map(s=>{const l={name:s.name,options:s.options,storage:s.storage,editor:e,type:Ua(s.name,this.schema)},c=[],d=le(s,"addKeyboardShortcuts",l);let u={};if(s.type==="mark"&&le(s,"exitable",l)&&(u.ArrowRight=()=>Ut.handleExit({editor:e,mark:s})),d){const g=Object.fromEntries(Object.entries(d()).map(([y,k])=>[y,()=>k({editor:e})]));u={...u,...g}}const f=p_(u);c.push(f);const h=le(s,"addInputRules",l);um(s,e.options.enableInputRules)&&h&&r.push(...h());const p=le(s,"addPasteRules",l);um(s,e.options.enablePasteRules)&&p&&i.push(...p());const m=le(s,"addProseMirrorPlugins",l);if(m){const g=m();c.push(...g)}return c}).flat();return[z_({editor:e,rules:r}),...K_({editor:e,rules:i}),...o]}get attributes(){return lm(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:n}=Os(this.extensions);return Object.fromEntries(n.filter(r=>!!le(r,"addNodeView")).map(r=>{const i=this.attributes.filter(c=>c.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:e,type:Qe(r.name,this.schema)},s=le(r,"addNodeView",o);if(!s)return[];const l=(c,d,u,f,h)=>{const p=Wa(c,i);return s()({node:c,view:d,getPos:u,decorations:f,innerDecorations:h,editor:e,extension:r,HTMLAttributes:p})};return[r.name,l]}))}setupExtensions(){this.extensions.forEach(e=>{var n;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:Ua(e.name,this.schema)};e.type==="mark"&&(!((n=Ce(le(e,"keepOnSplit",r)))!==null&&n!==void 0)||n)&&this.splittableMarks.push(e.name);const i=le(e,"onBeforeCreate",r),o=le(e,"onCreate",r),s=le(e,"onUpdate",r),l=le(e,"onSelectionUpdate",r),c=le(e,"onTransaction",r),d=le(e,"onFocus",r),u=le(e,"onBlur",r),f=le(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),o&&this.editor.on("create",o),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),c&&this.editor.on("transaction",c),d&&this.editor.on("focus",d),u&&this.editor.on("blur",u),f&&this.editor.on("destroy",f)})}}class qe{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ce(le(this,"addOptions",{name:this.name}))),this.storage=Ce(le(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new qe(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>As(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new qe({...this.config,...e});return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ce(le(n,"addOptions",{name:n.name})),n.storage=Ce(le(n,"addStorage",{name:n.name,options:n.options})),n}}function fm(t,e,n){const{from:r,to:i}=e,{blockSeparator:o=`
38
38
 
@@ -112,7 +112,7 @@ img.ProseMirror-separator {
112
112
  opacity: 0
113
113
  }`;function fT(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}let hT=class extends $_{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:n,slice:r,moved:i})=>this.options.onDrop(n,r,i)),this.on("paste",({event:n,slice:r})=>this.options.onPaste(n,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=fT(uT,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,n){const r=am(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(e).forEach(o=>{const s=typeof o=="string"?`${o}$`:o.key;r=n.filter(l=>!l.key.startsWith(s))}),n.length===r.length)return;const i=this.state.reconfigure({plugins:r});return this.view.updateState(i),i}createExtensionManager(){var e,n;const i=[...this.options.enableCoreExtensions?[sT,J_.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),iT,lT,aT,dT,oT,cT].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new fi(i,this)}createCommandManager(){this.commandManager=new _s({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let n;try{n=Za(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(l=>l.name!=="collaboration"),this.createExtensionManager()}}),n=Za(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=gm(n,this.options.autofocus);this.view=new o_(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:oi.create({doc:n,selection:r||void 0})});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const 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(s=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(s)});return}const n=this.state.apply(e),r=!this.state.selection.eq(n.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const i=e.getMeta("focus"),o=e.getMeta("blur");i&&this.emit("focus",{editor:this,event:i.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return UO(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,i=typeof e=="string"?n:e;return YO(this.state,r,i)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Ya(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
114
114
 
115
- `,textSerializers:r={}}=e||{};return HO(this.state.doc,{blockSeparator:n,textSerializers:{...hm(this.schema),...r}})}get isEmpty(){return ec(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new Ar(n,this)}get $doc(){return this.$pos(0)}};function hi(t){return new Ts({find:t.find,handler:({state:e,range:n,match:r})=>{const i=Ce(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=e,s=r[r.length-1],l=r[0];if(s){const c=l.search(/\S/),d=n.from+l.indexOf(s),u=d+s.length;if(wm(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===t.type&&g!==p.mark.type)).filter(p=>p.to>d).length)return null;u<n.to&&o.delete(u,n.to),d>n.from&&o.delete(n.from+c,d);const h=n.from+c+s.length;o.addMark(n.from+c,h,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}function Cm(t){return new Ts({find:t.find,handler:({state:e,range:n,match:r})=>{const i=Ce(t.getAttributes,void 0,r)||{},{tr:o}=e,s=n.from;let l=n.to;const c=t.type.create(i);if(r[1]){const d=r[0].lastIndexOf(r[1]);let u=s+d;u>l?u=l:l=u+r[1].length;const f=r[0][r[0].length-1];o.insertText(f,s+r[0].length-1),o.replaceWith(u,l,c)}else if(r[0]){const d=t.type.isInline?s:s-1;o.insert(d,t.type.create(i)).delete(o.mapping.map(s),o.mapping.map(l))}o.scrollIntoView()}})}function rc(t){return new Ts({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),o=Ce(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)}})}function po(t){return new Ts({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const o=Ce(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),d=c&&sa(c,t.type,o);if(!d)return null;if(s.wrap(c,d),t.keepMarks&&t.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:p}=t.editor.extensionManager,m=h||f.$to.parentOffset&&f.$from.marks();if(m){const g=m.filter(y=>p.includes(y.type.name));s.ensureMarks(g)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,o).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Kn(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&s.join(n.from-1)}})}let Tt=class Ic{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ce(le(this,"addOptions",{name:this.name}))),this.storage=Ce(le(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ic(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>As(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Ic(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ce(le(n,"addOptions",{name:n.name})),n.storage=Ce(le(n,"addStorage",{name:n.name,options:n.options})),n}};function pi(t){return new W_({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const o=Ce(t.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=e,l=r[r.length-1],c=r[0];let d=n.to;if(l){const u=c.search(/\S/),f=n.from+c.indexOf(l),h=f+l.length;if(wm(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(y=>y===t.type&&y!==m.mark.type)).filter(m=>m.to>f).length)return null;h<n.to&&s.delete(h,n.to),f>n.from&&s.delete(n.from+u,f),d=n.from+u+l.length,s.addMark(n.from+u,d,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}var Nt="top",Yt="bottom",qt="right",Mt="left",ic="auto",mo=[Nt,Yt,qt,Mt],mi="start",go="end",pT="clippingParents",Sm="viewport",yo="popper",mT="reference",_m=mo.reduce(function(t,e){return t.concat([e+"-"+mi,e+"-"+go])},[]),Om=[].concat(mo,[ic]).reduce(function(t,e){return t.concat([e,e+"-"+mi,e+"-"+go])},[]),gT="beforeRead",yT="read",bT="afterRead",kT="beforeMain",wT="main",vT="afterMain",xT="beforeWrite",ET="write",CT="afterWrite",ST=[gT,yT,bT,kT,wT,vT,xT,ET,CT];function un(t){return t?(t.nodeName||"").toLowerCase():null}function Pt(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Dr(t){var e=Pt(t).Element;return t instanceof e||t instanceof Element}function Kt(t){var e=Pt(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function oc(t){if(typeof ShadowRoot>"u")return!1;var e=Pt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function _T(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!Kt(o)||!un(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function OT(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!Kt(i)||!un(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Tm={name:"applyStyles",enabled:!0,phase:"write",fn:_T,effect:OT,requires:["computeStyles"]};function fn(t){return t.split("-")[0]}var Lr=Math.max,Rs=Math.min,gi=Math.round;function sc(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Nm(){return!/^((?!chrome|android).)*safari/i.test(sc())}function yi(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&Kt(t)&&(i=t.offsetWidth>0&&gi(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&gi(r.height)/t.offsetHeight||1);var s=Dr(t)?Pt(t):window,l=s.visualViewport,c=!Nm()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,u=(r.top+(c&&l?l.offsetTop:0))/o,f=r.width/i,h=r.height/o;return{width:f,height:h,top:u,right:d+f,bottom:u+h,left:d,x:d,y:u}}function lc(t){var e=yi(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function Mm(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&oc(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function An(t){return Pt(t).getComputedStyle(t)}function TT(t){return["table","td","th"].indexOf(un(t))>=0}function or(t){return((Dr(t)?t.ownerDocument:t.document)||window.document).documentElement}function Fs(t){return un(t)==="html"?t:t.assignedSlot||t.parentNode||(oc(t)?t.host:null)||or(t)}function Am(t){return!Kt(t)||An(t).position==="fixed"?null:t.offsetParent}function NT(t){var e=/firefox/i.test(sc()),n=/Trident/i.test(sc());if(n&&Kt(t)){var r=An(t);if(r.position==="fixed")return null}var i=Fs(t);for(oc(i)&&(i=i.host);Kt(i)&&["html","body"].indexOf(un(i))<0;){var o=An(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function bo(t){for(var e=Pt(t),n=Am(t);n&&TT(n)&&An(n).position==="static";)n=Am(n);return n&&(un(n)==="html"||un(n)==="body"&&An(n).position==="static")?e:n||NT(t)||e}function ac(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ko(t,e,n){return Lr(t,Rs(e,n))}function MT(t,e,n){var r=ko(t,e,n);return r>n?n:r}function Dm(){return{top:0,right:0,bottom:0,left:0}}function Lm(t){return Object.assign({},Dm(),t)}function Bm(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var AT=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,Lm(typeof e!="number"?e:Bm(e,mo))};function DT(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=fn(n.placement),c=ac(l),d=[Mt,qt].indexOf(l)>=0,u=d?"height":"width";if(!(!o||!s)){var f=AT(i.padding,n),h=lc(o),p=c==="y"?Nt:Mt,m=c==="y"?Yt:qt,g=n.rects.reference[u]+n.rects.reference[c]-s[c]-n.rects.popper[u],y=s[c]-n.rects.reference[c],k=bo(o),x=k?c==="y"?k.clientHeight||0:k.clientWidth||0:0,w=g/2-y/2,b=f[p],S=x-h[u]-f[m],v=x/2-h[u]/2+w,O=ko(b,v,S),B=c;n.modifiersData[r]=(e={},e[B]=O,e.centerOffset=O-v,e)}}function LT(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||Mm(e.elements.popper,i)&&(e.elements.arrow=i))}const BT={name:"arrow",enabled:!0,phase:"main",fn:DT,effect:LT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function bi(t){return t.split("-")[1]}var $T={top:"auto",right:"auto",bottom:"auto",left:"auto"};function IT(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:gi(n*i)/i||0,y:gi(r*i)/i||0}}function $m(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,l=t.position,c=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,f=t.isFixed,h=s.x,p=h===void 0?0:h,m=s.y,g=m===void 0?0:m,y=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=y.x,g=y.y;var k=s.hasOwnProperty("x"),x=s.hasOwnProperty("y"),w=Mt,b=Nt,S=window;if(d){var v=bo(n),O="clientHeight",B="clientWidth";if(v===Pt(n)&&(v=or(n),An(v).position!=="static"&&l==="absolute"&&(O="scrollHeight",B="scrollWidth")),v=v,i===Nt||(i===Mt||i===qt)&&o===go){b=Yt;var A=f&&v===S&&S.visualViewport?S.visualViewport.height:v[O];g-=A-r.height,g*=c?1:-1}if(i===Mt||(i===Nt||i===Yt)&&o===go){w=qt;var V=f&&v===S&&S.visualViewport?S.visualViewport.width:v[B];p-=V-r.width,p*=c?1:-1}}var $=Object.assign({position:l},d&&$T),L=u===!0?IT({x:p,y:g},Pt(n)):{x:p,y:g};if(p=L.x,g=L.y,c){var j;return Object.assign({},$,(j={},j[b]=x?"0":"",j[w]=k?"0":"",j.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",j))}return Object.assign({},$,(e={},e[b]=x?g+"px":"",e[w]=k?p+"px":"",e.transform="",e))}function VT(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:fn(e.placement),variation:bi(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,$m(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,$m(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const PT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:VT,data:{}};var zs={passive:!0};function RT(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Pt(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&d.forEach(function(u){u.addEventListener("scroll",n.update,zs)}),l&&c.addEventListener("resize",n.update,zs),function(){o&&d.forEach(function(u){u.removeEventListener("scroll",n.update,zs)}),l&&c.removeEventListener("resize",n.update,zs)}}const FT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:RT,data:{}};var zT={left:"right",right:"left",bottom:"top",top:"bottom"};function js(t){return t.replace(/left|right|bottom|top/g,function(e){return zT[e]})}var jT={start:"end",end:"start"};function Im(t){return t.replace(/start|end/g,function(e){return jT[e]})}function cc(t){var e=Pt(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function dc(t){return yi(or(t)).left+cc(t).scrollLeft}function HT(t,e){var n=Pt(t),r=or(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=Nm();(d||!d&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+dc(t),y:c}}function WT(t){var e,n=or(t),r=cc(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Lr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Lr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+dc(t),c=-r.scrollTop;return An(i||n).direction==="rtl"&&(l+=Lr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function uc(t){var e=An(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Vm(t){return["html","body","#document"].indexOf(un(t))>=0?t.ownerDocument.body:Kt(t)&&uc(t)?t:Vm(Fs(t))}function wo(t,e){var n;e===void 0&&(e=[]);var r=Vm(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Pt(r),s=i?[o].concat(o.visualViewport||[],uc(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(wo(Fs(s)))}function fc(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function UT(t,e){var n=yi(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Pm(t,e,n){return e===Sm?fc(HT(t,n)):Dr(e)?UT(e,n):fc(WT(or(t)))}function YT(t){var e=wo(Fs(t)),n=["absolute","fixed"].indexOf(An(t).position)>=0,r=n&&Kt(t)?bo(t):t;return Dr(r)?e.filter(function(i){return Dr(i)&&Mm(i,r)&&un(i)!=="body"}):[]}function qT(t,e,n,r){var i=e==="clippingParents"?YT(t):[].concat(e),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var u=Pm(t,d,r);return c.top=Lr(u.top,c.top),c.right=Rs(u.right,c.right),c.bottom=Rs(u.bottom,c.bottom),c.left=Lr(u.left,c.left),c},Pm(t,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Rm(t){var e=t.reference,n=t.element,r=t.placement,i=r?fn(r):null,o=r?bi(r):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,c;switch(i){case Nt:c={x:s,y:e.y-n.height};break;case Yt:c={x:s,y:e.y+e.height};break;case qt:c={x:e.x+e.width,y:l};break;case Mt:c={x:e.x-n.width,y:l};break;default:c={x:e.x,y:e.y}}var d=i?ac(i):null;if(d!=null){var u=d==="y"?"height":"width";switch(o){case mi:c[d]=c[d]-(e[u]/2-n[u]/2);break;case go:c[d]=c[d]+(e[u]/2-n[u]/2);break}}return c}function vo(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,s=o===void 0?t.strategy:o,l=n.boundary,c=l===void 0?pT:l,d=n.rootBoundary,u=d===void 0?Sm:d,f=n.elementContext,h=f===void 0?yo:f,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,y=g===void 0?0:g,k=Lm(typeof y!="number"?y:Bm(y,mo)),x=h===yo?mT:yo,w=t.rects.popper,b=t.elements[m?x:h],S=qT(Dr(b)?b:b.contextElement||or(t.elements.popper),c,u,s),v=yi(t.elements.reference),O=Rm({reference:v,element:w,placement:i}),B=fc(Object.assign({},w,O)),A=h===yo?B:v,V={top:S.top-A.top+k.top,bottom:A.bottom-S.bottom+k.bottom,left:S.left-A.left+k.left,right:A.right-S.right+k.right},$=t.modifiersData.offset;if(h===yo&&$){var L=$[i];Object.keys(V).forEach(function(j){var F=[qt,Yt].indexOf(j)>=0?1:-1,D=[Nt,Yt].indexOf(j)>=0?"y":"x";V[j]+=L[D]*F})}return V}function KT(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?Om:c,u=bi(r),f=u?l?_m:_m.filter(function(m){return bi(m)===u}):mo,h=f.filter(function(m){return d.indexOf(m)>=0});h.length===0&&(h=f);var p=h.reduce(function(m,g){return m[g]=vo(t,{placement:g,boundary:i,rootBoundary:o,padding:s})[fn(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function GT(t){if(fn(t)===ic)return[];var e=js(t);return[Im(t),e,Im(e)]}function JT(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,y=e.options.placement,k=fn(y),x=k===y,w=c||(x||!m?[js(y)]:GT(y)),b=[y].concat(w).reduce(function(W,K){return W.concat(fn(K)===ic?KT(e,{placement:K,boundary:u,rootBoundary:f,padding:d,flipVariations:m,allowedAutoPlacements:g}):K)},[]),S=e.rects.reference,v=e.rects.popper,O=new Map,B=!0,A=b[0],V=0;V<b.length;V++){var $=b[V],L=fn($),j=bi($)===mi,F=[Nt,Yt].indexOf(L)>=0,D=F?"width":"height",C=vo(e,{placement:$,boundary:u,rootBoundary:f,altBoundary:h,padding:d}),P=F?j?qt:Mt:j?Yt:Nt;S[D]>v[D]&&(P=js(P));var R=js(P),Q=[];if(o&&Q.push(C[L]<=0),l&&Q.push(C[P]<=0,C[R]<=0),Q.every(function(W){return W})){A=$,B=!1;break}O.set($,Q)}if(B)for(var ne=m?3:1,he=function(K){var q=b.find(function(H){var ce=O.get(H);if(ce)return ce.slice(0,K).every(function(ae){return ae})});if(q)return A=q,"break"},ue=ne;ue>0;ue--){var I=he(ue);if(I==="break")break}e.placement!==A&&(e.modifiersData[r]._skip=!0,e.placement=A,e.reset=!0)}}const ZT={name:"flip",enabled:!0,phase:"main",fn:JT,requiresIfExists:["offset"],data:{_skip:!1}};function Fm(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function zm(t){return[Nt,qt,Yt,Mt].some(function(e){return t[e]>=0})}function XT(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=vo(e,{elementContext:"reference"}),l=vo(e,{altBoundary:!0}),c=Fm(s,r),d=Fm(l,i,o),u=zm(c),f=zm(d);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const QT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:XT};function e5(t,e,n){var r=fn(t),i=[Mt,Nt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[Mt,qt].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function t5(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,s=Om.reduce(function(u,f){return u[f]=e5(f,e.rects,o),u},{}),l=s[e.placement],c=l.x,d=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=s}const n5={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:t5};function r5(t){var e=t.state,n=t.name;e.modifiersData[n]=Rm({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const i5={name:"popperOffsets",enabled:!0,phase:"read",fn:r5,data:{}};function o5(t){return t==="x"?"y":"x"}function s5(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,g=m===void 0?0:m,y=vo(e,{boundary:c,rootBoundary:d,padding:f,altBoundary:u}),k=fn(e.placement),x=bi(e.placement),w=!x,b=ac(k),S=o5(b),v=e.modifiersData.popperOffsets,O=e.rects.reference,B=e.rects.popper,A=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,V=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),$=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(v){if(o){var j,F=b==="y"?Nt:Mt,D=b==="y"?Yt:qt,C=b==="y"?"height":"width",P=v[b],R=P+y[F],Q=P-y[D],ne=p?-B[C]/2:0,he=x===mi?O[C]:B[C],ue=x===mi?-B[C]:-O[C],I=e.elements.arrow,W=p&&I?lc(I):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Dm(),q=K[F],H=K[D],ce=ko(0,O[C],W[C]),ae=w?O[C]/2-ne-ce-q-V.mainAxis:he-ce-q-V.mainAxis,we=w?-O[C]/2+ne+ce+H+V.mainAxis:ue+ce+H+V.mainAxis,Ne=e.elements.arrow&&bo(e.elements.arrow),Ie=Ne?b==="y"?Ne.clientTop||0:Ne.clientLeft||0:0,tt=(j=$==null?void 0:$[b])!=null?j:0,ee=P+ae-tt-Ie,Ee=P+we-tt,At=ko(p?Rs(R,ee):R,P,p?Lr(Q,Ee):Q);v[b]=At,L[b]=At-P}if(l){var lt,at=b==="x"?Nt:Mt,pt=b==="x"?Yt:qt,E=v[S],_=S==="y"?"height":"width",U=E+y[at],se=E-y[pt],Me=[Nt,Mt].indexOf(k)!==-1,_e=(lt=$==null?void 0:$[S])!=null?lt:0,Oe=Me?U:E-O[_]-B[_]-_e+V.altAxis,z=Me?E+O[_]+B[_]-_e-V.altAxis:se,Z=p&&Me?MT(Oe,E,z):ko(p?Oe:U,E,p?z:se);v[S]=Z,L[S]=Z-E}e.modifiersData[r]=L}}const l5={name:"preventOverflow",enabled:!0,phase:"main",fn:s5,requiresIfExists:["offset"]};function a5(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function c5(t){return t===Pt(t)||!Kt(t)?cc(t):a5(t)}function d5(t){var e=t.getBoundingClientRect(),n=gi(e.width)/t.offsetWidth||1,r=gi(e.height)/t.offsetHeight||1;return n!==1||r!==1}function u5(t,e,n){n===void 0&&(n=!1);var r=Kt(e),i=Kt(e)&&d5(e),o=or(e),s=yi(t,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((un(e)!=="body"||uc(o))&&(l=c5(e)),Kt(e)?(c=yi(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):o&&(c.x=dc(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function f5(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=e.get(l);c&&i(c)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function h5(t){var e=f5(t);return ST.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function p5(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function m5(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var jm={placement:"bottom",modifiers:[],strategy:"absolute"};function Hm(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function g5(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?jm:i;return function(l,c,d){d===void 0&&(d=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},jm,o),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],h=!1,p={state:u,setOptions:function(k){var x=typeof k=="function"?k(u.options):k;g(),u.options=Object.assign({},o,u.options,x),u.scrollParents={reference:Dr(l)?wo(l):l.contextElement?wo(l.contextElement):[],popper:wo(c)};var w=h5(m5([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(b){return b.enabled}),m(),p.update()},forceUpdate:function(){if(!h){var k=u.elements,x=k.reference,w=k.popper;if(Hm(x,w)){u.rects={reference:u5(x,bo(w),u.options.strategy==="fixed"),popper:lc(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(V){return u.modifiersData[V.name]=Object.assign({},V.data)});for(var b=0;b<u.orderedModifiers.length;b++){if(u.reset===!0){u.reset=!1,b=-1;continue}var S=u.orderedModifiers[b],v=S.fn,O=S.options,B=O===void 0?{}:O,A=S.name;typeof v=="function"&&(u=v({state:u,options:B,name:A,instance:p})||u)}}}},update:p5(function(){return new Promise(function(y){p.forceUpdate(),y(u)})}),destroy:function(){g(),h=!0}};if(!Hm(l,c))return p;p.setOptions(d).then(function(y){!h&&d.onFirstUpdate&&d.onFirstUpdate(y)});function m(){u.orderedModifiers.forEach(function(y){var k=y.name,x=y.options,w=x===void 0?{}:x,b=y.effect;if(typeof b=="function"){var S=b({state:u,name:k,instance:p,options:w}),v=function(){};f.push(S||v)}})}function g(){f.forEach(function(y){return y()}),f=[]}return p}}var y5=[FT,i5,PT,Tm,n5,ZT,l5,BT,QT],b5=g5({defaultModifiers:y5}),k5="tippy-box",Wm="tippy-content",w5="tippy-backdrop",Um="tippy-arrow",Ym="tippy-svg-arrow",Br={passive:!0,capture:!0},qm=function(){return document.body};function v5(t,e){return{}.hasOwnProperty.call(t,e)}function hc(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function pc(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function Km(t,e){return typeof t=="function"?t.apply(void 0,e):t}function Gm(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function x5(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function E5(t){return t.split(/\s+/).filter(Boolean)}function ki(t){return[].concat(t)}function Jm(t,e){t.indexOf(e)===-1&&t.push(e)}function C5(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function S5(t){return t.split("-")[0]}function Hs(t){return[].slice.call(t)}function Zm(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function xo(){return document.createElement("div")}function Eo(t){return["Element","Fragment"].some(function(e){return pc(t,e)})}function _5(t){return pc(t,"NodeList")}function O5(t){return pc(t,"MouseEvent")}function T5(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function N5(t){return Eo(t)?[t]:_5(t)?Hs(t):Array.isArray(t)?t:Hs(document.querySelectorAll(t))}function mc(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function Xm(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function M5(t){var e,n=ki(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function A5(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var o=i.popperRect,s=i.popperState,l=i.props,c=l.interactiveBorder,d=S5(s.placement),u=s.modifiersData.offset;if(!u)return!0;var f=d==="bottom"?u.top.y:0,h=d==="top"?u.bottom.y:0,p=d==="right"?u.left.x:0,m=d==="left"?u.right.x:0,g=o.top-r+f>c,y=r-o.bottom-h>c,k=o.left-n+p>c,x=n-o.right-m>c;return g||y||k||x})}function gc(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function Qm(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var hn={isTouch:!1},eg=0;function D5(){hn.isTouch||(hn.isTouch=!0,window.performance&&document.addEventListener("mousemove",tg))}function tg(){var t=performance.now();t-eg<20&&(hn.isTouch=!1,document.removeEventListener("mousemove",tg)),eg=t}function L5(){var t=document.activeElement;if(T5(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function B5(){document.addEventListener("touchstart",D5,Br),window.addEventListener("blur",L5)}var $5=typeof window<"u"&&typeof document<"u",I5=$5?!!window.msCrypto:!1;function wi(t){var e=t==="destroy"?"n already-":" ";return[t+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function ng(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function V5(t){return ng(`
115
+ `,textSerializers:r={}}=e||{};return HO(this.state.doc,{blockSeparator:n,textSerializers:{...hm(this.schema),...r}})}get isEmpty(){return ec(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new Ar(n,this)}get $doc(){return this.$pos(0)}};function hi(t){return new Ts({find:t.find,handler:({state:e,range:n,match:r})=>{const i=Ce(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=e,s=r[r.length-1],l=r[0];if(s){const c=l.search(/\S/),d=n.from+l.indexOf(s),u=d+s.length;if(wm(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===t.type&&g!==p.mark.type)).filter(p=>p.to>d).length)return null;u<n.to&&o.delete(u,n.to),d>n.from&&o.delete(n.from+c,d);const h=n.from+c+s.length;o.addMark(n.from+c,h,t.type.create(i||{})),o.removeStoredMark(t.type)}}})}function Cm(t){return new Ts({find:t.find,handler:({state:e,range:n,match:r})=>{const i=Ce(t.getAttributes,void 0,r)||{},{tr:o}=e,s=n.from;let l=n.to;const c=t.type.create(i);if(r[1]){const d=r[0].lastIndexOf(r[1]);let u=s+d;u>l?u=l:l=u+r[1].length;const f=r[0][r[0].length-1];o.insertText(f,s+r[0].length-1),o.replaceWith(u,l,c)}else if(r[0]){const d=t.type.isInline?s:s-1;o.insert(d,t.type.create(i)).delete(o.mapping.map(s),o.mapping.map(l))}o.scrollIntoView()}})}function rc(t){return new Ts({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),o=Ce(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,o)}})}function po(t){return new Ts({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const o=Ce(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),d=c&&sa(c,t.type,o);if(!d)return null;if(s.wrap(c,d),t.keepMarks&&t.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:p}=t.editor.extensionManager,m=h||f.$to.parentOffset&&f.$from.marks();if(m){const g=m.filter(y=>p.includes(y.type.name));s.ensureMarks(g)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,o).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Kn(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&s.join(n.from-1)}})}let Tt=class Ic{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ce(le(this,"addOptions",{name:this.name}))),this.storage=Ce(le(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ic(e)}configure(e={}){const n=this.extend({...this.config,addOptions:()=>As(this.options,e)});return n.name=this.name,n.parent=this.parent,n}extend(e={}){const n=new Ic(e);return n.parent=this,this.child=n,n.name=e.name?e.name:n.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Ce(le(n,"addOptions",{name:n.name})),n.storage=Ce(le(n,"addStorage",{name:n.name,options:n.options})),n}};function pi(t){return new W_({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const o=Ce(t.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=e,l=r[r.length-1],c=r[0];let d=n.to;if(l){const u=c.search(/\S/),f=n.from+c.indexOf(l),h=f+l.length;if(wm(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(y=>y===t.type&&y!==m.mark.type)).filter(m=>m.to>f).length)return null;h<n.to&&s.delete(h,n.to),f>n.from&&s.delete(n.from+u,f),d=n.from+u+l.length,s.addMark(n.from+u,d,t.type.create(o||{})),s.removeStoredMark(t.type)}}})}var Nt="top",Yt="bottom",qt="right",Mt="left",ic="auto",mo=[Nt,Yt,qt,Mt],mi="start",go="end",pT="clippingParents",Sm="viewport",yo="popper",mT="reference",_m=mo.reduce(function(t,e){return t.concat([e+"-"+mi,e+"-"+go])},[]),Om=[].concat(mo,[ic]).reduce(function(t,e){return t.concat([e,e+"-"+mi,e+"-"+go])},[]),gT="beforeRead",yT="read",bT="afterRead",kT="beforeMain",wT="main",vT="afterMain",xT="beforeWrite",ET="write",CT="afterWrite",ST=[gT,yT,bT,kT,wT,vT,xT,ET,CT];function un(t){return t?(t.nodeName||"").toLowerCase():null}function Pt(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Dr(t){var e=Pt(t).Element;return t instanceof e||t instanceof Element}function Kt(t){var e=Pt(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function oc(t){if(typeof ShadowRoot>"u")return!1;var e=Pt(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function _T(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!Kt(o)||!un(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function OT(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],o=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!Kt(i)||!un(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Tm={name:"applyStyles",enabled:!0,phase:"write",fn:_T,effect:OT,requires:["computeStyles"]};function fn(t){return t.split("-")[0]}var Lr=Math.max,Rs=Math.min,gi=Math.round;function sc(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Nm(){return!/^((?!chrome|android).)*safari/i.test(sc())}function yi(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),i=1,o=1;e&&Kt(t)&&(i=t.offsetWidth>0&&gi(r.width)/t.offsetWidth||1,o=t.offsetHeight>0&&gi(r.height)/t.offsetHeight||1);var s=Dr(t)?Pt(t):window,l=s.visualViewport,c=!Nm()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,u=(r.top+(c&&l?l.offsetTop:0))/o,f=r.width/i,h=r.height/o;return{width:f,height:h,top:u,right:d+f,bottom:u+h,left:d,x:d,y:u}}function lc(t){var e=yi(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function Mm(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&oc(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function An(t){return Pt(t).getComputedStyle(t)}function TT(t){return["table","td","th"].indexOf(un(t))>=0}function or(t){return((Dr(t)?t.ownerDocument:t.document)||window.document).documentElement}function Fs(t){return un(t)==="html"?t:t.assignedSlot||t.parentNode||(oc(t)?t.host:null)||or(t)}function Am(t){return!Kt(t)||An(t).position==="fixed"?null:t.offsetParent}function NT(t){var e=/firefox/i.test(sc()),n=/Trident/i.test(sc());if(n&&Kt(t)){var r=An(t);if(r.position==="fixed")return null}var i=Fs(t);for(oc(i)&&(i=i.host);Kt(i)&&["html","body"].indexOf(un(i))<0;){var o=An(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function bo(t){for(var e=Pt(t),n=Am(t);n&&TT(n)&&An(n).position==="static";)n=Am(n);return n&&(un(n)==="html"||un(n)==="body"&&An(n).position==="static")?e:n||NT(t)||e}function ac(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ko(t,e,n){return Lr(t,Rs(e,n))}function MT(t,e,n){var r=ko(t,e,n);return r>n?n:r}function Dm(){return{top:0,right:0,bottom:0,left:0}}function Lm(t){return Object.assign({},Dm(),t)}function Bm(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var AT=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,Lm(typeof e!="number"?e:Bm(e,mo))};function DT(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=fn(n.placement),c=ac(l),d=[Mt,qt].indexOf(l)>=0,u=d?"height":"width";if(!(!o||!s)){var f=AT(i.padding,n),h=lc(o),p=c==="y"?Nt:Mt,m=c==="y"?Yt:qt,g=n.rects.reference[u]+n.rects.reference[c]-s[c]-n.rects.popper[u],y=s[c]-n.rects.reference[c],k=bo(o),x=k?c==="y"?k.clientHeight||0:k.clientWidth||0:0,w=g/2-y/2,b=f[p],S=x-h[u]-f[m],v=x/2-h[u]/2+w,O=ko(b,v,S),B=c;n.modifiersData[r]=(e={},e[B]=O,e.centerOffset=O-v,e)}}function LT(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||Mm(e.elements.popper,i)&&(e.elements.arrow=i))}const BT={name:"arrow",enabled:!0,phase:"main",fn:DT,effect:LT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function bi(t){return t.split("-")[1]}var $T={top:"auto",right:"auto",bottom:"auto",left:"auto"};function IT(t,e){var n=t.x,r=t.y,i=e.devicePixelRatio||1;return{x:gi(n*i)/i||0,y:gi(r*i)/i||0}}function $m(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,s=t.offsets,l=t.position,c=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,f=t.isFixed,h=s.x,p=h===void 0?0:h,m=s.y,g=m===void 0?0:m,y=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=y.x,g=y.y;var k=s.hasOwnProperty("x"),x=s.hasOwnProperty("y"),w=Mt,b=Nt,S=window;if(d){var v=bo(n),O="clientHeight",B="clientWidth";if(v===Pt(n)&&(v=or(n),An(v).position!=="static"&&l==="absolute"&&(O="scrollHeight",B="scrollWidth")),v=v,i===Nt||(i===Mt||i===qt)&&o===go){b=Yt;var A=f&&v===S&&S.visualViewport?S.visualViewport.height:v[O];g-=A-r.height,g*=c?1:-1}if(i===Mt||(i===Nt||i===Yt)&&o===go){w=qt;var P=f&&v===S&&S.visualViewport?S.visualViewport.width:v[B];p-=P-r.width,p*=c?1:-1}}var $=Object.assign({position:l},d&&$T),L=u===!0?IT({x:p,y:g},Pt(n)):{x:p,y:g};if(p=L.x,g=L.y,c){var j;return Object.assign({},$,(j={},j[b]=x?"0":"",j[w]=k?"0":"",j.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",j))}return Object.assign({},$,(e={},e[b]=x?g+"px":"",e[w]=k?p+"px":"",e.transform="",e))}function VT(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:fn(e.placement),variation:bi(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,$m(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,$m(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const PT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:VT,data:{}};var zs={passive:!0};function RT(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Pt(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&d.forEach(function(u){u.addEventListener("scroll",n.update,zs)}),l&&c.addEventListener("resize",n.update,zs),function(){o&&d.forEach(function(u){u.removeEventListener("scroll",n.update,zs)}),l&&c.removeEventListener("resize",n.update,zs)}}const FT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:RT,data:{}};var zT={left:"right",right:"left",bottom:"top",top:"bottom"};function js(t){return t.replace(/left|right|bottom|top/g,function(e){return zT[e]})}var jT={start:"end",end:"start"};function Im(t){return t.replace(/start|end/g,function(e){return jT[e]})}function cc(t){var e=Pt(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function dc(t){return yi(or(t)).left+cc(t).scrollLeft}function HT(t,e){var n=Pt(t),r=or(t),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=Nm();(d||!d&&e==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+dc(t),y:c}}function WT(t){var e,n=or(t),r=cc(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Lr(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Lr(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+dc(t),c=-r.scrollTop;return An(i||n).direction==="rtl"&&(l+=Lr(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function uc(t){var e=An(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Vm(t){return["html","body","#document"].indexOf(un(t))>=0?t.ownerDocument.body:Kt(t)&&uc(t)?t:Vm(Fs(t))}function wo(t,e){var n;e===void 0&&(e=[]);var r=Vm(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=Pt(r),s=i?[o].concat(o.visualViewport||[],uc(r)?r:[]):r,l=e.concat(s);return i?l:l.concat(wo(Fs(s)))}function fc(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function UT(t,e){var n=yi(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function Pm(t,e,n){return e===Sm?fc(HT(t,n)):Dr(e)?UT(e,n):fc(WT(or(t)))}function YT(t){var e=wo(Fs(t)),n=["absolute","fixed"].indexOf(An(t).position)>=0,r=n&&Kt(t)?bo(t):t;return Dr(r)?e.filter(function(i){return Dr(i)&&Mm(i,r)&&un(i)!=="body"}):[]}function qT(t,e,n,r){var i=e==="clippingParents"?YT(t):[].concat(e),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var u=Pm(t,d,r);return c.top=Lr(u.top,c.top),c.right=Rs(u.right,c.right),c.bottom=Rs(u.bottom,c.bottom),c.left=Lr(u.left,c.left),c},Pm(t,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Rm(t){var e=t.reference,n=t.element,r=t.placement,i=r?fn(r):null,o=r?bi(r):null,s=e.x+e.width/2-n.width/2,l=e.y+e.height/2-n.height/2,c;switch(i){case Nt:c={x:s,y:e.y-n.height};break;case Yt:c={x:s,y:e.y+e.height};break;case qt:c={x:e.x+e.width,y:l};break;case Mt:c={x:e.x-n.width,y:l};break;default:c={x:e.x,y:e.y}}var d=i?ac(i):null;if(d!=null){var u=d==="y"?"height":"width";switch(o){case mi:c[d]=c[d]-(e[u]/2-n[u]/2);break;case go:c[d]=c[d]+(e[u]/2-n[u]/2);break}}return c}function vo(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.strategy,s=o===void 0?t.strategy:o,l=n.boundary,c=l===void 0?pT:l,d=n.rootBoundary,u=d===void 0?Sm:d,f=n.elementContext,h=f===void 0?yo:f,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,y=g===void 0?0:g,k=Lm(typeof y!="number"?y:Bm(y,mo)),x=h===yo?mT:yo,w=t.rects.popper,b=t.elements[m?x:h],S=qT(Dr(b)?b:b.contextElement||or(t.elements.popper),c,u,s),v=yi(t.elements.reference),O=Rm({reference:v,element:w,placement:i}),B=fc(Object.assign({},w,O)),A=h===yo?B:v,P={top:S.top-A.top+k.top,bottom:A.bottom-S.bottom+k.bottom,left:S.left-A.left+k.left,right:A.right-S.right+k.right},$=t.modifiersData.offset;if(h===yo&&$){var L=$[i];Object.keys(P).forEach(function(j){var z=[qt,Yt].indexOf(j)>=0?1:-1,D=[Nt,Yt].indexOf(j)>=0?"y":"x";P[j]+=L[D]*z})}return P}function KT(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?Om:c,u=bi(r),f=u?l?_m:_m.filter(function(m){return bi(m)===u}):mo,h=f.filter(function(m){return d.indexOf(m)>=0});h.length===0&&(h=f);var p=h.reduce(function(m,g){return m[g]=vo(t,{placement:g,boundary:i,rootBoundary:o,padding:s})[fn(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function GT(t){if(fn(t)===ic)return[];var e=js(t);return[Im(t),e,Im(e)]}function JT(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,y=e.options.placement,k=fn(y),x=k===y,w=c||(x||!m?[js(y)]:GT(y)),b=[y].concat(w).reduce(function(W,K){return W.concat(fn(K)===ic?KT(e,{placement:K,boundary:u,rootBoundary:f,padding:d,flipVariations:m,allowedAutoPlacements:g}):K)},[]),S=e.rects.reference,v=e.rects.popper,O=new Map,B=!0,A=b[0],P=0;P<b.length;P++){var $=b[P],L=fn($),j=bi($)===mi,z=[Nt,Yt].indexOf(L)>=0,D=z?"width":"height",C=vo(e,{placement:$,boundary:u,rootBoundary:f,altBoundary:h,padding:d}),I=z?j?qt:Mt:j?Yt:Nt;S[D]>v[D]&&(I=js(I));var R=js(I),ee=[];if(o&&ee.push(C[L]<=0),l&&ee.push(C[I]<=0,C[R]<=0),ee.every(function(W){return W})){A=$,B=!1;break}O.set($,ee)}if(B)for(var te=m?3:1,ce=function(K){var q=b.find(function(H){var de=O.get(H);if(de)return de.slice(0,K).every(function(ae){return ae})});if(q)return A=q,"break"},ue=te;ue>0;ue--){var V=ce(ue);if(V==="break")break}e.placement!==A&&(e.modifiersData[r]._skip=!0,e.placement=A,e.reset=!0)}}const ZT={name:"flip",enabled:!0,phase:"main",fn:JT,requiresIfExists:["offset"],data:{_skip:!1}};function Fm(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function zm(t){return[Nt,qt,Yt,Mt].some(function(e){return t[e]>=0})}function XT(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=vo(e,{elementContext:"reference"}),l=vo(e,{altBoundary:!0}),c=Fm(s,r),d=Fm(l,i,o),u=zm(c),f=zm(d);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const QT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:XT};function e5(t,e,n){var r=fn(t),i=[Mt,Nt].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[Mt,qt].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function t5(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,s=Om.reduce(function(u,f){return u[f]=e5(f,e.rects,o),u},{}),l=s[e.placement],c=l.x,d=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=s}const n5={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:t5};function r5(t){var e=t.state,n=t.name;e.modifiersData[n]=Rm({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const i5={name:"popperOffsets",enabled:!0,phase:"read",fn:r5,data:{}};function o5(t){return t==="x"?"y":"x"}function s5(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,g=m===void 0?0:m,y=vo(e,{boundary:c,rootBoundary:d,padding:f,altBoundary:u}),k=fn(e.placement),x=bi(e.placement),w=!x,b=ac(k),S=o5(b),v=e.modifiersData.popperOffsets,O=e.rects.reference,B=e.rects.popper,A=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,P=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),$=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(v){if(o){var j,z=b==="y"?Nt:Mt,D=b==="y"?Yt:qt,C=b==="y"?"height":"width",I=v[b],R=I+y[z],ee=I-y[D],te=p?-B[C]/2:0,ce=x===mi?O[C]:B[C],ue=x===mi?-B[C]:-O[C],V=e.elements.arrow,W=p&&V?lc(V):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Dm(),q=K[z],H=K[D],de=ko(0,O[C],W[C]),ae=w?O[C]/2-te-de-q-P.mainAxis:ce-de-q-P.mainAxis,we=w?-O[C]/2+te+de+H+P.mainAxis:ue+de+H+P.mainAxis,Ne=e.elements.arrow&&bo(e.elements.arrow),Ie=Ne?b==="y"?Ne.clientTop||0:Ne.clientLeft||0:0,tt=(j=$==null?void 0:$[b])!=null?j:0,Q=I+ae-tt-Ie,Ee=I+we-tt,At=ko(p?Rs(R,Q):R,I,p?Lr(ee,Ee):ee);v[b]=At,L[b]=At-I}if(l){var lt,at=b==="x"?Nt:Mt,pt=b==="x"?Yt:qt,E=v[S],_=S==="y"?"height":"width",U=E+y[at],se=E-y[pt],Me=[Nt,Mt].indexOf(k)!==-1,_e=(lt=$==null?void 0:$[S])!=null?lt:0,Oe=Me?U:E-O[_]-B[_]-_e+P.altAxis,F=Me?E+O[_]+B[_]-_e-P.altAxis:se,Z=p&&Me?MT(Oe,E,F):ko(p?Oe:U,E,p?F:se);v[S]=Z,L[S]=Z-E}e.modifiersData[r]=L}}const l5={name:"preventOverflow",enabled:!0,phase:"main",fn:s5,requiresIfExists:["offset"]};function a5(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function c5(t){return t===Pt(t)||!Kt(t)?cc(t):a5(t)}function d5(t){var e=t.getBoundingClientRect(),n=gi(e.width)/t.offsetWidth||1,r=gi(e.height)/t.offsetHeight||1;return n!==1||r!==1}function u5(t,e,n){n===void 0&&(n=!1);var r=Kt(e),i=Kt(e)&&d5(e),o=or(e),s=yi(t,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((un(e)!=="body"||uc(o))&&(l=c5(e)),Kt(e)?(c=yi(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):o&&(c.x=dc(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function f5(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=e.get(l);c&&i(c)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function h5(t){var e=f5(t);return ST.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function p5(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function m5(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var jm={placement:"bottom",modifiers:[],strategy:"absolute"};function Hm(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function g5(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?jm:i;return function(l,c,d){d===void 0&&(d=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},jm,o),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],h=!1,p={state:u,setOptions:function(k){var x=typeof k=="function"?k(u.options):k;g(),u.options=Object.assign({},o,u.options,x),u.scrollParents={reference:Dr(l)?wo(l):l.contextElement?wo(l.contextElement):[],popper:wo(c)};var w=h5(m5([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(b){return b.enabled}),m(),p.update()},forceUpdate:function(){if(!h){var k=u.elements,x=k.reference,w=k.popper;if(Hm(x,w)){u.rects={reference:u5(x,bo(w),u.options.strategy==="fixed"),popper:lc(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(P){return u.modifiersData[P.name]=Object.assign({},P.data)});for(var b=0;b<u.orderedModifiers.length;b++){if(u.reset===!0){u.reset=!1,b=-1;continue}var S=u.orderedModifiers[b],v=S.fn,O=S.options,B=O===void 0?{}:O,A=S.name;typeof v=="function"&&(u=v({state:u,options:B,name:A,instance:p})||u)}}}},update:p5(function(){return new Promise(function(y){p.forceUpdate(),y(u)})}),destroy:function(){g(),h=!0}};if(!Hm(l,c))return p;p.setOptions(d).then(function(y){!h&&d.onFirstUpdate&&d.onFirstUpdate(y)});function m(){u.orderedModifiers.forEach(function(y){var k=y.name,x=y.options,w=x===void 0?{}:x,b=y.effect;if(typeof b=="function"){var S=b({state:u,name:k,instance:p,options:w}),v=function(){};f.push(S||v)}})}function g(){f.forEach(function(y){return y()}),f=[]}return p}}var y5=[FT,i5,PT,Tm,n5,ZT,l5,BT,QT],b5=g5({defaultModifiers:y5}),k5="tippy-box",Wm="tippy-content",w5="tippy-backdrop",Um="tippy-arrow",Ym="tippy-svg-arrow",Br={passive:!0,capture:!0},qm=function(){return document.body};function v5(t,e){return{}.hasOwnProperty.call(t,e)}function hc(t,e,n){if(Array.isArray(t)){var r=t[e];return r??(Array.isArray(n)?n[e]:n)}return t}function pc(t,e){var n={}.toString.call(t);return n.indexOf("[object")===0&&n.indexOf(e+"]")>-1}function Km(t,e){return typeof t=="function"?t.apply(void 0,e):t}function Gm(t,e){if(e===0)return t;var n;return function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)}}function x5(t,e){var n=Object.assign({},t);return e.forEach(function(r){delete n[r]}),n}function E5(t){return t.split(/\s+/).filter(Boolean)}function ki(t){return[].concat(t)}function Jm(t,e){t.indexOf(e)===-1&&t.push(e)}function C5(t){return t.filter(function(e,n){return t.indexOf(e)===n})}function S5(t){return t.split("-")[0]}function Hs(t){return[].slice.call(t)}function Zm(t){return Object.keys(t).reduce(function(e,n){return t[n]!==void 0&&(e[n]=t[n]),e},{})}function xo(){return document.createElement("div")}function Eo(t){return["Element","Fragment"].some(function(e){return pc(t,e)})}function _5(t){return pc(t,"NodeList")}function O5(t){return pc(t,"MouseEvent")}function T5(t){return!!(t&&t._tippy&&t._tippy.reference===t)}function N5(t){return Eo(t)?[t]:_5(t)?Hs(t):Array.isArray(t)?t:Hs(document.querySelectorAll(t))}function mc(t,e){t.forEach(function(n){n&&(n.style.transitionDuration=e+"ms")})}function Xm(t,e){t.forEach(function(n){n&&n.setAttribute("data-state",e)})}function M5(t){var e,n=ki(t),r=n[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function A5(t,e){var n=e.clientX,r=e.clientY;return t.every(function(i){var o=i.popperRect,s=i.popperState,l=i.props,c=l.interactiveBorder,d=S5(s.placement),u=s.modifiersData.offset;if(!u)return!0;var f=d==="bottom"?u.top.y:0,h=d==="top"?u.bottom.y:0,p=d==="right"?u.left.x:0,m=d==="left"?u.right.x:0,g=o.top-r+f>c,y=r-o.bottom-h>c,k=o.left-n+p>c,x=n-o.right-m>c;return g||y||k||x})}function gc(t,e,n){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){t[r](i,n)})}function Qm(t,e){for(var n=e;n;){var r;if(t.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var hn={isTouch:!1},eg=0;function D5(){hn.isTouch||(hn.isTouch=!0,window.performance&&document.addEventListener("mousemove",tg))}function tg(){var t=performance.now();t-eg<20&&(hn.isTouch=!1,document.removeEventListener("mousemove",tg)),eg=t}function L5(){var t=document.activeElement;if(T5(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}function B5(){document.addEventListener("touchstart",D5,Br),window.addEventListener("blur",L5)}var $5=typeof window<"u"&&typeof document<"u",I5=$5?!!window.msCrypto:!1;function wi(t){var e=t==="destroy"?"n already-":" ";return[t+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function ng(t){var e=/[ \t]{2,}/g,n=/^[ \t]*/gm;return t.replace(e," ").replace(n,"").trim()}function V5(t){return ng(`
116
116
  %ctippy.js
117
117
 
118
118
  %c`+ng(t)+`
@@ -121,13 +121,13 @@ img.ProseMirror-separator {
121
121
  `)}function rg(t){return[V5(t),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Co;process.env.NODE_ENV!=="production"&&P5();function P5(){Co=new Set}function Dn(t,e){if(t&&!Co.has(e)){var n;Co.add(e),(n=console).warn.apply(n,rg(e))}}function yc(t,e){if(t&&!Co.has(e)){var n;Co.add(e),(n=console).error.apply(n,rg(e))}}function R5(t){var e=!t,n=Object.prototype.toString.call(t)==="[object Object]"&&!t.addEventListener;yc(e,["tippy() was passed","`"+String(t)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),yc(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var ig={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},F5={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Rt=Object.assign({appendTo:qm,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},ig,F5),z5=Object.keys(Rt),j5=function(e){process.env.NODE_ENV!=="production"&&lg(e,[]);var n=Object.keys(e);n.forEach(function(r){Rt[r]=e[r]})};function og(t){var e=t.plugins||[],n=e.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var l;r[o]=t[o]!==void 0?t[o]:(l=Rt[o])!=null?l:s}return r},{});return Object.assign({},t,n)}function H5(t,e){var n=e?Object.keys(og(Object.assign({},Rt,{plugins:e}))):z5,r=n.reduce(function(i,o){var s=(t.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function sg(t,e){var n=Object.assign({},e,{content:Km(e.content,[t])},e.ignoreAttributes?{}:H5(t,e.plugins));return n.aria=Object.assign({},Rt.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?e.interactive:n.aria.expanded,content:n.aria.content==="auto"?e.interactive?null:"describedby":n.aria.content},n}function lg(t,e){t===void 0&&(t={}),e===void 0&&(e=[]);var n=Object.keys(t);n.forEach(function(r){var i=x5(Rt,Object.keys(ig)),o=!v5(i,r);o&&(o=e.filter(function(s){return s.name===r}).length===0),Dn(o,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
122
122
 
123
123
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
124
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var W5=function(){return"innerHTML"};function bc(t,e){t[W5()]=e}function ag(t){var e=xo();return t===!0?e.className=Um:(e.className=Ym,Eo(t)?e.appendChild(t):bc(e,t)),e}function cg(t,e){Eo(e.content)?(bc(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?bc(t,e.content):t.textContent=e.content)}function kc(t){var e=t.firstElementChild,n=Hs(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(Wm)}),arrow:n.find(function(r){return r.classList.contains(Um)||r.classList.contains(Ym)}),backdrop:n.find(function(r){return r.classList.contains(w5)})}}function dg(t){var e=xo(),n=xo();n.className=k5,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=xo();r.className=Wm,r.setAttribute("data-state","hidden"),cg(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props);function i(o,s){var l=kc(e),c=l.box,d=l.content,u=l.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&cg(d,t.props),s.arrow?u?o.arrow!==s.arrow&&(c.removeChild(u),c.appendChild(ag(s.arrow))):c.appendChild(ag(s.arrow)):u&&c.removeChild(u)}return{popper:e,onUpdate:i}}dg.$$tippy=!0;var U5=1,Ws=[],wc=[];function Y5(t,e){var n=sg(t,Object.assign({},Rt,og(Zm(e)))),r,i,o,s=!1,l=!1,c=!1,d=!1,u,f,h,p=[],m=Gm(ee,n.interactiveDebounce),g,y=U5++,k=null,x=C5(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},b={id:y,reference:t,popper:xo(),popperInstance:k,props:n,state:w,plugins:x,clearDelayTimeouts:Oe,setProps:z,setContent:Z,show:T,hide:M,hideWithInteractivity:Y,enable:Me,disable:_e,unmount:te,destroy:de};if(!n.render)return process.env.NODE_ENV!=="production"&&yc(!0,"render() function has not been supplied."),b;var S=n.render(b),v=S.popper,O=S.onUpdate;v.setAttribute("data-tippy-root",""),v.id="tippy-"+b.id,b.popper=v,t._tippy=b,v._tippy=b;var B=x.map(function(N){return N.fn(b)}),A=t.hasAttribute("aria-expanded");return Ne(),ne(),P(),R("onCreate",[b]),n.showOnCreate&&U(),v.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),v.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&F().addEventListener("mousemove",m)}),b;function V(){var N=b.props.touch;return Array.isArray(N)?N:[N,0]}function $(){return V()[0]==="hold"}function L(){var N;return!!((N=b.props.render)!=null&&N.$$tippy)}function j(){return g||t}function F(){var N=j().parentNode;return N?M5(N):document}function D(){return kc(v)}function C(N){return b.state.isMounted&&!b.state.isVisible||hn.isTouch||u&&u.type==="focus"?0:hc(b.props.delay,N?0:1,Rt.delay)}function P(N){N===void 0&&(N=!1),v.style.pointerEvents=b.props.interactive&&!N?"":"none",v.style.zIndex=""+b.props.zIndex}function R(N,X,ie){if(ie===void 0&&(ie=!0),B.forEach(function(ye){ye[N]&&ye[N].apply(ye,X)}),ie){var me;(me=b.props)[N].apply(me,X)}}function Q(){var N=b.props.aria;if(N.content){var X="aria-"+N.content,ie=v.id,me=ki(b.props.triggerTarget||t);me.forEach(function(ye){var ve=ye.getAttribute(X);if(b.state.isVisible)ye.setAttribute(X,ve?ve+" "+ie:ie);else{var Ae=ve&&ve.replace(ie,"").trim();Ae?ye.setAttribute(X,Ae):ye.removeAttribute(X)}})}}function ne(){if(!(A||!b.props.aria.expanded)){var N=ki(b.props.triggerTarget||t);N.forEach(function(X){b.props.interactive?X.setAttribute("aria-expanded",b.state.isVisible&&X===j()?"true":"false"):X.removeAttribute("aria-expanded")})}}function he(){F().removeEventListener("mousemove",m),Ws=Ws.filter(function(N){return N!==m})}function ue(N){if(!(hn.isTouch&&(c||N.type==="mousedown"))){var X=N.composedPath&&N.composedPath()[0]||N.target;if(!(b.props.interactive&&Qm(v,X))){if(ki(b.props.triggerTarget||t).some(function(ie){return Qm(ie,X)})){if(hn.isTouch||b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else R("onClickOutside",[b,N]);b.props.hideOnClick===!0&&(b.clearDelayTimeouts(),b.hide(),l=!0,setTimeout(function(){l=!1}),b.state.isMounted||q())}}}function I(){c=!0}function W(){c=!1}function K(){var N=F();N.addEventListener("mousedown",ue,!0),N.addEventListener("touchend",ue,Br),N.addEventListener("touchstart",W,Br),N.addEventListener("touchmove",I,Br)}function q(){var N=F();N.removeEventListener("mousedown",ue,!0),N.removeEventListener("touchend",ue,Br),N.removeEventListener("touchstart",W,Br),N.removeEventListener("touchmove",I,Br)}function H(N,X){ae(N,function(){!b.state.isVisible&&v.parentNode&&v.parentNode.contains(v)&&X()})}function ce(N,X){ae(N,X)}function ae(N,X){var ie=D().box;function me(ye){ye.target===ie&&(gc(ie,"remove",me),X())}if(N===0)return X();gc(ie,"remove",f),gc(ie,"add",me),f=me}function we(N,X,ie){ie===void 0&&(ie=!1);var me=ki(b.props.triggerTarget||t);me.forEach(function(ye){ye.addEventListener(N,X,ie),p.push({node:ye,eventType:N,handler:X,options:ie})})}function Ne(){$()&&(we("touchstart",tt,{passive:!0}),we("touchend",Ee,{passive:!0})),E5(b.props.trigger).forEach(function(N){if(N!=="manual")switch(we(N,tt),N){case"mouseenter":we("mouseleave",Ee);break;case"focus":we(I5?"focusout":"blur",At);break;case"focusin":we("focusout",At);break}})}function Ie(){p.forEach(function(N){var X=N.node,ie=N.eventType,me=N.handler,ye=N.options;X.removeEventListener(ie,me,ye)}),p=[]}function tt(N){var X,ie=!1;if(!(!b.state.isEnabled||lt(N)||l)){var me=((X=u)==null?void 0:X.type)==="focus";u=N,g=N.currentTarget,ne(),!b.state.isVisible&&O5(N)&&Ws.forEach(function(ye){return ye(N)}),N.type==="click"&&(b.props.trigger.indexOf("mouseenter")<0||s)&&b.props.hideOnClick!==!1&&b.state.isVisible?ie=!0:U(N),N.type==="click"&&(s=!ie),ie&&!me&&se(N)}}function ee(N){var X=N.target,ie=j().contains(X)||v.contains(X);if(!(N.type==="mousemove"&&ie)){var me=_().concat(v).map(function(ye){var ve,Ae=ye._tippy,je=(ve=Ae.popperInstance)==null?void 0:ve.state;return je?{popperRect:ye.getBoundingClientRect(),popperState:je,props:n}:null}).filter(Boolean);A5(me,N)&&(he(),se(N))}}function Ee(N){var X=lt(N)||b.props.trigger.indexOf("click")>=0&&s;if(!X){if(b.props.interactive){b.hideWithInteractivity(N);return}se(N)}}function At(N){b.props.trigger.indexOf("focusin")<0&&N.target!==j()||b.props.interactive&&N.relatedTarget&&v.contains(N.relatedTarget)||se(N)}function lt(N){return hn.isTouch?$()!==N.type.indexOf("touch")>=0:!1}function at(){pt();var N=b.props,X=N.popperOptions,ie=N.placement,me=N.offset,ye=N.getReferenceClientRect,ve=N.moveTransition,Ae=L()?kc(v).arrow:null,je=ye?{getBoundingClientRect:ye,contextElement:ye.contextElement||j()}:t,vt={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(lr){var mn=lr.state;if(L()){var So=D(),Lc=So.box;["placement","reference-hidden","escaped"].forEach(function(Gs){Gs==="placement"?Lc.setAttribute("data-placement",mn.placement):mn.attributes.popper["data-popper-"+Gs]?Lc.setAttribute("data-"+Gs,""):Lc.removeAttribute("data-"+Gs)}),mn.attributes.popper={}}}},Ft=[{name:"offset",options:{offset:me}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ve}},vt];L()&&Ae&&Ft.push({name:"arrow",options:{element:Ae,padding:3}}),Ft.push.apply(Ft,(X==null?void 0:X.modifiers)||[]),b.popperInstance=b5(je,v,Object.assign({},X,{placement:ie,onFirstUpdate:h,modifiers:Ft}))}function pt(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function E(){var N=b.props.appendTo,X,ie=j();b.props.interactive&&N===qm||N==="parent"?X=ie.parentNode:X=Km(N,[ie]),X.contains(v)||X.appendChild(v),b.state.isMounted=!0,at(),process.env.NODE_ENV!=="production"&&Dn(b.props.interactive&&N===Rt.appendTo&&ie.nextElementSibling!==v,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
124
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var W5=function(){return"innerHTML"};function bc(t,e){t[W5()]=e}function ag(t){var e=xo();return t===!0?e.className=Um:(e.className=Ym,Eo(t)?e.appendChild(t):bc(e,t)),e}function cg(t,e){Eo(e.content)?(bc(t,""),t.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?bc(t,e.content):t.textContent=e.content)}function kc(t){var e=t.firstElementChild,n=Hs(e.children);return{box:e,content:n.find(function(r){return r.classList.contains(Wm)}),arrow:n.find(function(r){return r.classList.contains(Um)||r.classList.contains(Ym)}),backdrop:n.find(function(r){return r.classList.contains(w5)})}}function dg(t){var e=xo(),n=xo();n.className=k5,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=xo();r.className=Wm,r.setAttribute("data-state","hidden"),cg(r,t.props),e.appendChild(n),n.appendChild(r),i(t.props,t.props);function i(o,s){var l=kc(e),c=l.box,d=l.content,u=l.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&cg(d,t.props),s.arrow?u?o.arrow!==s.arrow&&(c.removeChild(u),c.appendChild(ag(s.arrow))):c.appendChild(ag(s.arrow)):u&&c.removeChild(u)}return{popper:e,onUpdate:i}}dg.$$tippy=!0;var U5=1,Ws=[],wc=[];function Y5(t,e){var n=sg(t,Object.assign({},Rt,og(Zm(e)))),r,i,o,s=!1,l=!1,c=!1,d=!1,u,f,h,p=[],m=Gm(Q,n.interactiveDebounce),g,y=U5++,k=null,x=C5(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},b={id:y,reference:t,popper:xo(),popperInstance:k,props:n,state:w,plugins:x,clearDelayTimeouts:Oe,setProps:F,setContent:Z,show:T,hide:M,hideWithInteractivity:Y,enable:Me,disable:_e,unmount:ne,destroy:fe};if(!n.render)return process.env.NODE_ENV!=="production"&&yc(!0,"render() function has not been supplied."),b;var S=n.render(b),v=S.popper,O=S.onUpdate;v.setAttribute("data-tippy-root",""),v.id="tippy-"+b.id,b.popper=v,t._tippy=b,v._tippy=b;var B=x.map(function(N){return N.fn(b)}),A=t.hasAttribute("aria-expanded");return Ne(),te(),I(),R("onCreate",[b]),n.showOnCreate&&U(),v.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),v.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&z().addEventListener("mousemove",m)}),b;function P(){var N=b.props.touch;return Array.isArray(N)?N:[N,0]}function $(){return P()[0]==="hold"}function L(){var N;return!!((N=b.props.render)!=null&&N.$$tippy)}function j(){return g||t}function z(){var N=j().parentNode;return N?M5(N):document}function D(){return kc(v)}function C(N){return b.state.isMounted&&!b.state.isVisible||hn.isTouch||u&&u.type==="focus"?0:hc(b.props.delay,N?0:1,Rt.delay)}function I(N){N===void 0&&(N=!1),v.style.pointerEvents=b.props.interactive&&!N?"":"none",v.style.zIndex=""+b.props.zIndex}function R(N,X,ie){if(ie===void 0&&(ie=!0),B.forEach(function(ye){ye[N]&&ye[N].apply(ye,X)}),ie){var me;(me=b.props)[N].apply(me,X)}}function ee(){var N=b.props.aria;if(N.content){var X="aria-"+N.content,ie=v.id,me=ki(b.props.triggerTarget||t);me.forEach(function(ye){var ve=ye.getAttribute(X);if(b.state.isVisible)ye.setAttribute(X,ve?ve+" "+ie:ie);else{var Ae=ve&&ve.replace(ie,"").trim();Ae?ye.setAttribute(X,Ae):ye.removeAttribute(X)}})}}function te(){if(!(A||!b.props.aria.expanded)){var N=ki(b.props.triggerTarget||t);N.forEach(function(X){b.props.interactive?X.setAttribute("aria-expanded",b.state.isVisible&&X===j()?"true":"false"):X.removeAttribute("aria-expanded")})}}function ce(){z().removeEventListener("mousemove",m),Ws=Ws.filter(function(N){return N!==m})}function ue(N){if(!(hn.isTouch&&(c||N.type==="mousedown"))){var X=N.composedPath&&N.composedPath()[0]||N.target;if(!(b.props.interactive&&Qm(v,X))){if(ki(b.props.triggerTarget||t).some(function(ie){return Qm(ie,X)})){if(hn.isTouch||b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else R("onClickOutside",[b,N]);b.props.hideOnClick===!0&&(b.clearDelayTimeouts(),b.hide(),l=!0,setTimeout(function(){l=!1}),b.state.isMounted||q())}}}function V(){c=!0}function W(){c=!1}function K(){var N=z();N.addEventListener("mousedown",ue,!0),N.addEventListener("touchend",ue,Br),N.addEventListener("touchstart",W,Br),N.addEventListener("touchmove",V,Br)}function q(){var N=z();N.removeEventListener("mousedown",ue,!0),N.removeEventListener("touchend",ue,Br),N.removeEventListener("touchstart",W,Br),N.removeEventListener("touchmove",V,Br)}function H(N,X){ae(N,function(){!b.state.isVisible&&v.parentNode&&v.parentNode.contains(v)&&X()})}function de(N,X){ae(N,X)}function ae(N,X){var ie=D().box;function me(ye){ye.target===ie&&(gc(ie,"remove",me),X())}if(N===0)return X();gc(ie,"remove",f),gc(ie,"add",me),f=me}function we(N,X,ie){ie===void 0&&(ie=!1);var me=ki(b.props.triggerTarget||t);me.forEach(function(ye){ye.addEventListener(N,X,ie),p.push({node:ye,eventType:N,handler:X,options:ie})})}function Ne(){$()&&(we("touchstart",tt,{passive:!0}),we("touchend",Ee,{passive:!0})),E5(b.props.trigger).forEach(function(N){if(N!=="manual")switch(we(N,tt),N){case"mouseenter":we("mouseleave",Ee);break;case"focus":we(I5?"focusout":"blur",At);break;case"focusin":we("focusout",At);break}})}function Ie(){p.forEach(function(N){var X=N.node,ie=N.eventType,me=N.handler,ye=N.options;X.removeEventListener(ie,me,ye)}),p=[]}function tt(N){var X,ie=!1;if(!(!b.state.isEnabled||lt(N)||l)){var me=((X=u)==null?void 0:X.type)==="focus";u=N,g=N.currentTarget,te(),!b.state.isVisible&&O5(N)&&Ws.forEach(function(ye){return ye(N)}),N.type==="click"&&(b.props.trigger.indexOf("mouseenter")<0||s)&&b.props.hideOnClick!==!1&&b.state.isVisible?ie=!0:U(N),N.type==="click"&&(s=!ie),ie&&!me&&se(N)}}function Q(N){var X=N.target,ie=j().contains(X)||v.contains(X);if(!(N.type==="mousemove"&&ie)){var me=_().concat(v).map(function(ye){var ve,Ae=ye._tippy,je=(ve=Ae.popperInstance)==null?void 0:ve.state;return je?{popperRect:ye.getBoundingClientRect(),popperState:je,props:n}:null}).filter(Boolean);A5(me,N)&&(ce(),se(N))}}function Ee(N){var X=lt(N)||b.props.trigger.indexOf("click")>=0&&s;if(!X){if(b.props.interactive){b.hideWithInteractivity(N);return}se(N)}}function At(N){b.props.trigger.indexOf("focusin")<0&&N.target!==j()||b.props.interactive&&N.relatedTarget&&v.contains(N.relatedTarget)||se(N)}function lt(N){return hn.isTouch?$()!==N.type.indexOf("touch")>=0:!1}function at(){pt();var N=b.props,X=N.popperOptions,ie=N.placement,me=N.offset,ye=N.getReferenceClientRect,ve=N.moveTransition,Ae=L()?kc(v).arrow:null,je=ye?{getBoundingClientRect:ye,contextElement:ye.contextElement||j()}:t,vt={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(lr){var mn=lr.state;if(L()){var So=D(),Lc=So.box;["placement","reference-hidden","escaped"].forEach(function(Gs){Gs==="placement"?Lc.setAttribute("data-placement",mn.placement):mn.attributes.popper["data-popper-"+Gs]?Lc.setAttribute("data-"+Gs,""):Lc.removeAttribute("data-"+Gs)}),mn.attributes.popper={}}}},Ft=[{name:"offset",options:{offset:me}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ve}},vt];L()&&Ae&&Ft.push({name:"arrow",options:{element:Ae,padding:3}}),Ft.push.apply(Ft,(X==null?void 0:X.modifiers)||[]),b.popperInstance=b5(je,v,Object.assign({},X,{placement:ie,onFirstUpdate:h,modifiers:Ft}))}function pt(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function E(){var N=b.props.appendTo,X,ie=j();b.props.interactive&&N===qm||N==="parent"?X=ie.parentNode:X=Km(N,[ie]),X.contains(v)||X.appendChild(v),b.state.isMounted=!0,at(),process.env.NODE_ENV!=="production"&&Dn(b.props.interactive&&N===Rt.appendTo&&ie.nextElementSibling!==v,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
125
125
 
126
126
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
127
127
 
128
128
  `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
129
129
 
130
- `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function _(){return Hs(v.querySelectorAll("[data-tippy-root]"))}function U(N){b.clearDelayTimeouts(),N&&R("onTrigger",[b,N]),K();var X=C(!0),ie=V(),me=ie[0],ye=ie[1];hn.isTouch&&me==="hold"&&ye&&(X=ye),X?r=setTimeout(function(){b.show()},X):b.show()}function se(N){if(b.clearDelayTimeouts(),R("onUntrigger",[b,N]),!b.state.isVisible){q();return}if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(N.type)>=0&&s)){var X=C(!1);X?i=setTimeout(function(){b.state.isVisible&&b.hide()},X):o=requestAnimationFrame(function(){b.hide()})}}function Me(){b.state.isEnabled=!0}function _e(){b.hide(),b.state.isEnabled=!1}function Oe(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function z(N){if(process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("setProps")),!b.state.isDestroyed){R("onBeforeUpdate",[b,N]),Ie();var X=b.props,ie=sg(t,Object.assign({},X,Zm(N),{ignoreAttributes:!0}));b.props=ie,Ne(),X.interactiveDebounce!==ie.interactiveDebounce&&(he(),m=Gm(ee,ie.interactiveDebounce)),X.triggerTarget&&!ie.triggerTarget?ki(X.triggerTarget).forEach(function(me){me.removeAttribute("aria-expanded")}):ie.triggerTarget&&t.removeAttribute("aria-expanded"),ne(),P(),O&&O(X,ie),b.popperInstance&&(at(),_().forEach(function(me){requestAnimationFrame(me._tippy.popperInstance.forceUpdate)})),R("onAfterUpdate",[b,N])}}function Z(N){b.setProps({content:N})}function T(){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("show"));var N=b.state.isVisible,X=b.state.isDestroyed,ie=!b.state.isEnabled,me=hn.isTouch&&!b.props.touch,ye=hc(b.props.duration,0,Rt.duration);if(!(N||X||ie||me)&&!j().hasAttribute("disabled")&&(R("onShow",[b],!1),b.props.onShow(b)!==!1)){if(b.state.isVisible=!0,L()&&(v.style.visibility="visible"),P(),K(),b.state.isMounted||(v.style.transition="none"),L()){var ve=D(),Ae=ve.box,je=ve.content;mc([Ae,je],0)}h=function(){var Ft;if(!(!b.state.isVisible||d)){if(d=!0,v.offsetHeight,v.style.transition=b.props.moveTransition,L()&&b.props.animation){var Ir=D(),lr=Ir.box,mn=Ir.content;mc([lr,mn],ye),Xm([lr,mn],"visible")}Q(),ne(),Jm(wc,b),(Ft=b.popperInstance)==null||Ft.forceUpdate(),R("onMount",[b]),b.props.animation&&L()&&ce(ye,function(){b.state.isShown=!0,R("onShown",[b])})}},E()}}function M(){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("hide"));var N=!b.state.isVisible,X=b.state.isDestroyed,ie=!b.state.isEnabled,me=hc(b.props.duration,1,Rt.duration);if(!(N||X||ie)&&(R("onHide",[b],!1),b.props.onHide(b)!==!1)){if(b.state.isVisible=!1,b.state.isShown=!1,d=!1,s=!1,L()&&(v.style.visibility="hidden"),he(),q(),P(!0),L()){var ye=D(),ve=ye.box,Ae=ye.content;b.props.animation&&(mc([ve,Ae],me),Xm([ve,Ae],"hidden"))}Q(),ne(),b.props.animation?L()&&H(me,b.unmount):b.unmount()}}function Y(N){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("hideWithInteractivity")),F().addEventListener("mousemove",m),Jm(Ws,m),m(N)}function te(){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("unmount")),b.state.isVisible&&b.hide(),b.state.isMounted&&(pt(),_().forEach(function(N){N._tippy.unmount()}),v.parentNode&&v.parentNode.removeChild(v),wc=wc.filter(function(N){return N!==b}),b.state.isMounted=!1,R("onHidden",[b]))}function de(){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("destroy")),!b.state.isDestroyed&&(b.clearDelayTimeouts(),b.unmount(),Ie(),delete t._tippy,b.state.isDestroyed=!0,R("onDestroy",[b]))}}function vi(t,e){e===void 0&&(e={});var n=Rt.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(R5(t),lg(e,n)),B5();var r=Object.assign({},e,{plugins:n}),i=N5(t);if(process.env.NODE_ENV!=="production"){var o=Eo(r.content),s=i.length>1;Dn(o&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
130
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function _(){return Hs(v.querySelectorAll("[data-tippy-root]"))}function U(N){b.clearDelayTimeouts(),N&&R("onTrigger",[b,N]),K();var X=C(!0),ie=P(),me=ie[0],ye=ie[1];hn.isTouch&&me==="hold"&&ye&&(X=ye),X?r=setTimeout(function(){b.show()},X):b.show()}function se(N){if(b.clearDelayTimeouts(),R("onUntrigger",[b,N]),!b.state.isVisible){q();return}if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(N.type)>=0&&s)){var X=C(!1);X?i=setTimeout(function(){b.state.isVisible&&b.hide()},X):o=requestAnimationFrame(function(){b.hide()})}}function Me(){b.state.isEnabled=!0}function _e(){b.hide(),b.state.isEnabled=!1}function Oe(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function F(N){if(process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("setProps")),!b.state.isDestroyed){R("onBeforeUpdate",[b,N]),Ie();var X=b.props,ie=sg(t,Object.assign({},X,Zm(N),{ignoreAttributes:!0}));b.props=ie,Ne(),X.interactiveDebounce!==ie.interactiveDebounce&&(ce(),m=Gm(Q,ie.interactiveDebounce)),X.triggerTarget&&!ie.triggerTarget?ki(X.triggerTarget).forEach(function(me){me.removeAttribute("aria-expanded")}):ie.triggerTarget&&t.removeAttribute("aria-expanded"),te(),I(),O&&O(X,ie),b.popperInstance&&(at(),_().forEach(function(me){requestAnimationFrame(me._tippy.popperInstance.forceUpdate)})),R("onAfterUpdate",[b,N])}}function Z(N){b.setProps({content:N})}function T(){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("show"));var N=b.state.isVisible,X=b.state.isDestroyed,ie=!b.state.isEnabled,me=hn.isTouch&&!b.props.touch,ye=hc(b.props.duration,0,Rt.duration);if(!(N||X||ie||me)&&!j().hasAttribute("disabled")&&(R("onShow",[b],!1),b.props.onShow(b)!==!1)){if(b.state.isVisible=!0,L()&&(v.style.visibility="visible"),I(),K(),b.state.isMounted||(v.style.transition="none"),L()){var ve=D(),Ae=ve.box,je=ve.content;mc([Ae,je],0)}h=function(){var Ft;if(!(!b.state.isVisible||d)){if(d=!0,v.offsetHeight,v.style.transition=b.props.moveTransition,L()&&b.props.animation){var Ir=D(),lr=Ir.box,mn=Ir.content;mc([lr,mn],ye),Xm([lr,mn],"visible")}ee(),te(),Jm(wc,b),(Ft=b.popperInstance)==null||Ft.forceUpdate(),R("onMount",[b]),b.props.animation&&L()&&de(ye,function(){b.state.isShown=!0,R("onShown",[b])})}},E()}}function M(){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("hide"));var N=!b.state.isVisible,X=b.state.isDestroyed,ie=!b.state.isEnabled,me=hc(b.props.duration,1,Rt.duration);if(!(N||X||ie)&&(R("onHide",[b],!1),b.props.onHide(b)!==!1)){if(b.state.isVisible=!1,b.state.isShown=!1,d=!1,s=!1,L()&&(v.style.visibility="hidden"),ce(),q(),I(!0),L()){var ye=D(),ve=ye.box,Ae=ye.content;b.props.animation&&(mc([ve,Ae],me),Xm([ve,Ae],"hidden"))}ee(),te(),b.props.animation?L()&&H(me,b.unmount):b.unmount()}}function Y(N){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("hideWithInteractivity")),z().addEventListener("mousemove",m),Jm(Ws,m),m(N)}function ne(){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("unmount")),b.state.isVisible&&b.hide(),b.state.isMounted&&(pt(),_().forEach(function(N){N._tippy.unmount()}),v.parentNode&&v.parentNode.removeChild(v),wc=wc.filter(function(N){return N!==b}),b.state.isMounted=!1,R("onHidden",[b]))}function fe(){process.env.NODE_ENV!=="production"&&Dn(b.state.isDestroyed,wi("destroy")),!b.state.isDestroyed&&(b.clearDelayTimeouts(),b.unmount(),Ie(),delete t._tippy,b.state.isDestroyed=!0,R("onDestroy",[b]))}}function vi(t,e){e===void 0&&(e={});var n=Rt.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(R5(t),lg(e,n)),B5();var r=Object.assign({},e,{plugins:n}),i=N5(t);if(process.env.NODE_ENV!=="production"){var o=Eo(r.content),s=i.length>1;Dn(o&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
131
131
 
132
132
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
133
133
 
@@ -139,7 +139,7 @@ img.ProseMirror-separator {
139
139
  `},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,c=o||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:u})=>{if(u&&c&&s){const f=c.filter(h=>l.includes(h.type.name));d.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),_N=Tt.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]}`,Fe(this.options.HTMLAttributes,e),0]},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=>rc({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var Ys=200,et=function(){};et.prototype.append=function(e){return e.length?(e=et.from(e),!this.length&&e||e.length<Ys&&this.leafAppend(e)||this.length<Ys&&e.leafPrepend(this)||this.appendInner(e)):this},et.prototype.prepend=function(e){return e.length?et.from(e).append(this):this},et.prototype.appendInner=function(e){return new ON(this,e)},et.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?et.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},et.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},et.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)},et.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(e(o,s))},n,r),i},et.from=function(e){return e instanceof et?e:e&&e.length?new gg(e):et.empty};var gg=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,s,l){for(var c=o;c<s;c++)if(i(this.values[c],l+c)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,s,l){for(var c=o-1;c>=s;c--)if(i(this.values[c],l+c)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Ys)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Ys)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(et);et.empty=new gg([]);var ON=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,o,s){var l=this.left.length;if(i<l&&this.left.forEachInner(r,i,Math.min(o,l),s)===!1||o>l&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,o)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,o,s){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(o,l)-l,s+l)===!1||o<l&&this.left.forEachInvertedInner(r,Math.min(i,l),o,s)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(et);const TN=500;class nn{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=e.tr,l,c,d=[],u=[];return this.items.forEach((f,h)=>{if(!f.step){i||(i=this.remapping(r,h+1),o=i.maps.length),o--,u.push(f);return}if(i){u.push(new pn(f.map));let p=f.step.map(i.slice(o)),m;p&&s.maybeStep(p).doc&&(m=s.mapping.maps[s.mapping.maps.length-1],d.push(new pn(m,void 0,void 0,d.length+u.length))),o--,m&&i.appendMap(m,o)}else s.maybeStep(f.step);if(f.selection)return l=i?f.selection.map(i.slice(o)):f.selection,c=new nn(this.items.slice(0,r).append(u.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:l}}addTransform(e,n,r,i){let o=[],s=this.eventCount,l=this.items,c=!i&&l.length?l.get(l.length-1):null;for(let u=0;u<e.steps.length;u++){let f=e.steps[u].invert(e.docs[u]),h=new pn(e.mapping.maps[u],f,n),p;(p=c&&c.merge(h))&&(h=p,u?o.pop():l=l.slice(0,l.length-1)),o.push(h),n&&(s++,n=void 0),i||(c=h)}let d=s-r.depth;return d>MN&&(l=NN(l,d),s-=d),new nn(l.append(o),s)}remapping(e,n){let r=new Qr;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new nn(this.items.append(e.map(n=>new pn(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},i);let c=n;this.items.forEach(h=>{let p=o.getMirror(--c);if(p==null)return;s=Math.min(s,p);let m=o.maps[p];if(h.step){let g=e.steps[p].invert(e.docs[p]),y=h.selection&&h.selection.map(o.slice(c+1,p));y&&l++,r.push(new pn(m,g,y))}else r.push(new pn(m))},i);let d=[];for(let h=n;h<s;h++)d.push(new pn(o.maps[h]));let u=this.items.slice(0,i).append(d).append(r),f=new nn(u,l);return f.emptyItemCount()>TN&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],o=0;return this.items.forEach((s,l)=>{if(l>=e)i.push(s),s.selection&&o++;else if(s.step){let c=s.step.map(n.slice(r)),d=c&&c.getMap();if(r--,d&&n.appendMap(d,r),c){let u=s.selection&&s.selection.map(n.slice(r));u&&o++;let f=new pn(d.invert(),c,u),h,p=i.length-1;(h=i.length&&i[p].merge(f))?i[p]=h:i.push(f)}}else s.map&&r--},this.items.length,0),new nn(et.from(i.reverse()),o)}}nn.empty=new nn(et.empty,0);function NN(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class pn{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new pn(n.getMap().invert(),n,this.selection)}}}class sr{constructor(e,n,r,i,o){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const MN=20;function AN(t,e,n,r){let i=n.getMeta($r),o;if(i)return i.historyState;n.getMeta(BN)&&(t=new sr(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta($r))return s.getMeta($r).redo?new sr(t.done.addTransform(n,void 0,r,qs(e)),t.undone,yg(n.mapping.maps),t.prevTime,t.prevComposition):new sr(t.done,t.undone.addTransform(n,void 0,r,qs(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),c=t.prevTime==0||!s&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!DN(n,t.prevRanges)),d=s?xc(t.prevRanges,n.mapping):yg(n.mapping.maps);return new sr(t.done.addTransform(n,c?e.selection.getBookmark():void 0,r,qs(e)),nn.empty,d,n.time,l??t.prevComposition)}else return(o=n.getMeta("rebased"))?new sr(t.done.rebased(n,o),t.undone.rebased(n,o),xc(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new sr(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),xc(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function DN(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<e.length;o+=2)r<=e[o+1]&&i>=e[o]&&(n=!0)}),n}function yg(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,o,s)=>e.push(o,s));return e}function xc(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),o=e.map(t[r+1],-1);i<=o&&n.push(i,o)}return n}function LN(t,e,n){let r=qs(e),i=$r.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),l=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,r),c=new sr(n?l:o.remaining,n?o.remaining:l,null,0,-1);return o.transform.setSelection(s).setMeta($r,{redo:n,historyState:c})}let Ec=!1,bg=null;function qs(t){let e=t.plugins;if(bg!=e){Ec=!1,bg=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Ec=!0;break}}return Ec}const $r=new It("history"),BN=new It("closeHistory");function $N(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new it({key:$r,state:{init(){return new sr(nn.empty,nn.empty,null,0,-1)},apply(e,n,r){return AN(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?wg:r=="historyRedo"?vg:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function kg(t,e){return(n,r)=>{let i=$r.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let o=LN(i,n,t);o&&r(e?o.scrollIntoView():o)}return!0}}const wg=kg(!1,!0),vg=kg(!0,!0),IN=qe.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>wg(t,e),redo:()=>({state:t,dispatch:e})=>vg(t,e)}},addProseMirrorPlugins(){return[$N(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()}}}),VN=Tt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Fe(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{$to:n}=e.selection,r=t();return n.parentOffset===0?r.insertContentAt(Math.max(n.pos-2,0),{type:this.name}):r.insertContent({type:this.name}),r.command(({tr:i,dispatch:o})=>{var s;if(o){const{$to:l}=i.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?i.setSelection(ke.create(i.doc,l.pos+1)):l.nodeAfter.isBlock?i.setSelection(pe.create(i.doc,l.pos)):i.setSelection(ke.create(i.doc,l.pos));else{const d=(s=l.parent.type.contentMatch.defaultType)===null||s===void 0?void 0:s.create();d&&(i.insert(c,d),i.setSelection(ke.create(i.doc,c+1)))}i.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Cm({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),PN=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,RN=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,FN=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,zN=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,jN=Ut.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Fe(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)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[hi({find:PN,type:this.type}),hi({find:FN,type:this.type})]},addPasteRules(){return[pi({find:RN,type:this.type}),pi({find:zN,type:this.type})]}}),HN=Tt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Fe(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),WN=Tt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Fe(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),xg=Ut.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["span",Fe(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:t,commands:e})=>{const n=Vs(t,this.type);return Object.entries(n).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),Eg=/^(\d+)\.\s$/,UN=Tt.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}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Fe(this.options.HTMLAttributes,n),0]:["ol",Fe(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(WN.name,this.editor.getAttributes(xg.name)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=po({find:Eg,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=po({find:Eg,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(xg.name)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),YN=Tt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Fe(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),qN=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,KN=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,GN=Ut.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",Fe(this.options.HTMLAttributes,t),0]},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[hi({find:qN,type:this.type})]},addPasteRules(){return[pi({find:KN,type:this.type})]}}),JN=Tt.create({name:"text",group:"inline"}),ZN=qe.create({name:"starterKit",addExtensions(){var t,e,n,r,i,o,s,l,c,d,u,f,h,p,m,g,y,k;const x=[];return this.options.blockquote!==!1&&x.push(Q5.configure((t=this.options)===null||t===void 0?void 0:t.blockquote)),this.options.bold!==!1&&x.push(iN.configure((e=this.options)===null||e===void 0?void 0:e.bold)),this.options.bulletList!==!1&&x.push(sN.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&x.push(cN.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&x.push(fN.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&x.push(hN.configure((o=this.options)===null||o===void 0?void 0:o.document)),this.options.dropcursor!==!1&&x.push(gN.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&x.push(CN.configure((l=this.options)===null||l===void 0?void 0:l.gapcursor)),this.options.hardBreak!==!1&&x.push(SN.configure((c=this.options)===null||c===void 0?void 0:c.hardBreak)),this.options.heading!==!1&&x.push(_N.configure((d=this.options)===null||d===void 0?void 0:d.heading)),this.options.history!==!1&&x.push(IN.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&x.push(VN.configure((f=this.options)===null||f===void 0?void 0:f.horizontalRule)),this.options.italic!==!1&&x.push(jN.configure((h=this.options)===null||h===void 0?void 0:h.italic)),this.options.listItem!==!1&&x.push(HN.configure((p=this.options)===null||p===void 0?void 0:p.listItem)),this.options.orderedList!==!1&&x.push(UN.configure((m=this.options)===null||m===void 0?void 0:m.orderedList)),this.options.paragraph!==!1&&x.push(YN.configure((g=this.options)===null||g===void 0?void 0:g.paragraph)),this.options.strike!==!1&&x.push(GN.configure((y=this.options)===null||y===void 0?void 0:y.strike)),this.options.text!==!1&&x.push(JN.configure((k=this.options)===null||k===void 0?void 0:k.text)),x}}),XN=qe.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,considerAnyAsEmpty:!1,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new it({key:new It("placeholder"),props:{decorations:({doc:t,selection:e})=>{var n;const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=e,o=[];if(!r)return null;const{firstChild:s}=t.content,l=s&&s.type.isLeaf,c=s&&s.isAtom,d=this.options.considerAnyAsEmpty?!0:s&&s.type.name===((n=t.type.contentMatch.defaultType)===null||n===void 0?void 0:n.name),u=t.content.childCount<=1&&s&&d&&s.nodeSize<=2&&(!l||!c);return t.descendants((f,h)=>{const p=i>=h&&i<=h+f.nodeSize,m=!f.isLeaf&&!f.childCount;if((p||!this.options.showOnlyCurrent)&&m){const g=[this.options.emptyNodeClass];u&&g.push(this.options.emptyEditorClass);const y=Vt.node(h,h+f.nodeSize,{class:g.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:f,pos:h,hasAnchor:p}):this.options.placeholder});o.push(y)}return this.options.includeChildren}),Ye.create(t,o)}}})]}}),QN=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/;Tt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",Fe(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[Cm({find:QN,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}});const eM=qe.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})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),tM=Ut.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",Fe(this.options.HTMLAttributes,t),0]},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()}}}),nM=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,i;const o=n.getAttribute("style"),s=(i=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||i===void 0?void 0:i.getAttribute("style");n.setAttribute("style",`${s};${o}`)})},rM=Ut.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&nM(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Fe(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(o=>!!o))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),iM=qe.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),oM={},sM={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},lM=[a.createElementVNode("path",{d:"M3 4.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM6.25 3a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 7.25a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 11.5a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM4 12.25a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM3 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"},null,-1)];function aM(t,e){return a.openBlock(),a.createElementBlock("svg",sM,lM)}const cM=be(oM,[["render",aM]]),dM={},uM={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},fM=[a.createElementVNode("path",{d:"M2.995 1a.625.625 0 1 0 0 1.25h.38v2.125a.625.625 0 1 0 1.25 0v-2.75A.625.625 0 0 0 4 1H2.995ZM3.208 7.385a2.37 2.37 0 0 1 1.027-.124L2.573 8.923a.625.625 0 0 0 .439 1.067l1.987.011a.625.625 0 0 0 .006-1.25l-.49-.003.777-.776c.215-.215.335-.506.335-.809 0-.465-.297-.957-.842-1.078a3.636 3.636 0 0 0-1.993.121.625.625 0 1 0 .416 1.179ZM2.625 11a.625.625 0 1 0 0 1.25H4.25a.125.125 0 0 1 0 .25H3.5a.625.625 0 1 0 0 1.25h.75a.125.125 0 0 1 0 .25H2.625a.625.625 0 1 0 0 1.25H4.25a1.375 1.375 0 0 0 1.153-2.125A1.375 1.375 0 0 0 4.25 11H2.625ZM7.25 2a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5h-6ZM7.25 7.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5h-6ZM6.5 13.25a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 0 1.5h-6a.75.75 0 0 1-.75-.75Z"},null,-1)];function hM(t,e){return a.openBlock(),a.createElementBlock("svg",uM,fM)}const pM=be(dM,[["render",hM]]),mM={},gM={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},yM=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.5 9.75A2.75 2.75 0 0 0 9.75 7H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 1.06L4.56 5.5h5.19a4.25 4.25 0 0 1 0 8.5h-1a.75.75 0 0 1 0-1.5h1a2.75 2.75 0 0 0 2.75-2.75Z","clip-rule":"evenodd"},null,-1)];function bM(t,e){return a.openBlock(),a.createElementBlock("svg",gM,yM)}const kM=be(mM,[["render",bM]]),wM={},vM={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},xM=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M3.5 9.75A2.75 2.75 0 0 1 6.25 7h5.19L9.22 9.22a.75.75 0 1 0 1.06 1.06l3.5-3.5a.75.75 0 0 0 0-1.06l-3.5-3.5a.75.75 0 1 0-1.06 1.06l2.22 2.22H6.25a4.25 4.25 0 0 0 0 8.5h1a.75.75 0 0 0 0-1.5h-1A2.75 2.75 0 0 1 3.5 9.75Z","clip-rule":"evenodd"},null,-1)];function EM(t,e){return a.openBlock(),a.createElementBlock("svg",vM,xM)}const CM=be(wM,[["render",EM]]),SM={},_M={fill:"currentColor",width:"800px",height:"800px",viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},OM=[a.createElementVNode("path",{d:"M754.429 0v274.423h235.885L647.457 1645.85H343V1920h822.994v-274.149H930.11l342.857-1371.428h304.32V0z","fill-rule":"evenodd"},null,-1)];function TM(t,e){return a.openBlock(),a.createElementBlock("svg",_M,OM)}const NM=be(SM,[["render",TM]]),MM={},AM={fill:"currentColor",viewBox:"0 0 1920 1920",xmlns:"http://www.w3.org/2000/svg"},DM=[a.createElementVNode("path",{d:"M480.286 822.857h548.571c151.269 0 274.286-123.017 274.286-274.286 0-151.268-123.017-274.285-274.286-274.285H480.286v548.571Zm0 822.857H1166c151.269 0 274.286-123.017 274.286-274.285 0-151.269-123.017-274.286-274.286-274.286H480.286v548.571ZM1166 1920H206V0h822.857c302.537 0 548.572 246.034 548.572 548.571 0 134.263-48.549 257.418-128.778 352.732 159.223 96.137 265.92 270.994 265.92 470.126 0 302.537-246.034 548.571-548.571 548.571Z","fill-rule":"evenodd"},null,-1)];function LM(t,e){return a.openBlock(),a.createElementBlock("svg",AM,DM)}const BM=be(MM,[["render",LM]]),$M={},IM={fill:"currentColor",version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"800px",height:"800px",viewBox:"0 0 96.639 96.639","xml:space":"preserve"},VM=[a.createElementVNode("g",null,[a.createElementVNode("g",null,[a.createElementVNode("path",{d:`M95.263,12.29V2.277C95.263,1.019,94.245,0,92.987,0H36.921C25.539,0,17.05,2.442,10.969,7.47\r
140
140
  c-6.364,5.265-9.594,12.724-9.594,22.167c0,10.367,3.124,18.054,9.547,23.499c6.399,5.423,15.696,8.175,27.63,8.175h10.38v33.051\r
141
141
  c0,1.258,1.02,2.277,2.278,2.277h7.096c1.257,0,2.276-1.02,2.276-2.277V14.566h9.146v79.795c0,1.258,1.021,2.276,2.277,2.276\r
142
- h6.873c1.257,0,2.277-1.021,2.277-2.276V14.566h11.83C94.247,14.566,95.263,13.547,95.263,12.29z`})])],-1)];function PM(t,e){return a.openBlock(),a.createElementBlock("svg",IM,VM)}const RM=be($M,[["render",PM]]),FM={},zM={viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"currentColor"},jM=[a.createStaticVNode('<g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><title>Heading_1_fill</title> <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Editor" transform="translate(-432.000000, -48.000000)" fill-rule="nonzero"><g id="Heading_1_fill" transform="translate(432.000000, 48.000000)"><path d="M24,0 L24,24 L0,24 L0,0 L24,0 Z M12.5934901,23.257841 L12.5819402,23.2595131 L12.5108777,23.2950439 L12.4918791,23.2987469 L12.4918791,23.2987469 L12.4767152,23.2950439 L12.4056548,23.2595131 C12.3958229,23.2563662 12.3870493,23.2590235 12.3821421,23.2649074 L12.3780323,23.275831 L12.360941,23.7031097 L12.3658947,23.7234994 L12.3769048,23.7357139 L12.4804777,23.8096931 L12.4953491,23.8136134 L12.4953491,23.8136134 L12.5071152,23.8096931 L12.6106902,23.7357139 L12.6232938,23.7196733 L12.6232938,23.7196733 L12.6266527,23.7031097 L12.609561,23.275831 C12.6075724,23.2657013 12.6010112,23.2592993 12.5934901,23.257841 L12.5934901,23.257841 Z M12.8583906,23.1452862 L12.8445485,23.1473072 L12.6598443,23.2396597 L12.6498822,23.2499052 L12.6498822,23.2499052 L12.6471943,23.2611114 L12.6650943,23.6906389 L12.6699349,23.7034178 L12.6699349,23.7034178 L12.678386,23.7104931 L12.8793402,23.8032389 C12.8914285,23.8068999 12.9022333,23.8029875 12.9078286,23.7952264 L12.9118235,23.7811639 L12.8776777,23.1665331 C12.8752882,23.1545897 12.8674102,23.1470016 12.8583906,23.1452862 L12.8583906,23.1452862 Z M12.1430473,23.1473072 C12.1332178,23.1423925 12.1221763,23.1452606 12.1156365,23.1525954 L12.1099173,23.1665331 L12.0757714,23.7811639 C12.0751323,23.7926639 12.0828099,23.8018602 12.0926481,23.8045676 L12.108256,23.8032389 L12.3092106,23.7104931 L12.3186497,23.7024347 L12.3186497,23.7024347 L12.3225043,23.6906389 L12.340401,23.2611114 L12.337245,23.2485176 L12.337245,23.2485176 L12.3277531,23.2396597 L12.1430473,23.1473072 Z" id="MingCute" fill-rule="nonzero"></path> <path d="M13,2.5 C13.7796706,2.5 14.4204457,3.09488554 14.4931332,3.85553954 L14.5,4 L14.5,20 C14.5,20.8284 13.8284,21.5 13,21.5 C12.2203294,21.5 11.5795543,20.9050879 11.5068668,20.1444558 L11.5,20 L11.5,13.5 L5.5,13.5 L5.5,20 C5.5,20.8284 4.82843,21.5 4,21.5 C3.22030118,21.5 2.579551,20.9050879 2.50686655,20.1444558 L2.5,20 L2.5,4 C2.5,3.17157 3.17157,2.5 4,2.5 C4.77969882,2.5 5.420449,3.09488554 5.49313345,3.85553954 L5.5,4 L5.5,10.5 L11.5,10.5 L11.5,4 C11.5,3.17157 12.1716,2.5 13,2.5 Z M19.0001,13.5187 L19.0001,20 C19.0001,20.5523 18.5524,21 18.0001,21 C17.4478,21 17.0001,20.5523 17.0001,20 L17.0001,15.366 C16.5471,15.6281 15.9624,15.4962 15.6681,15.0547 C15.3617,14.5951 15.4859,13.9743 15.9454,13.6679 L17.4299,12.6783 C18.101,12.2308 19.0001,12.712 19.0001,13.5187 Z" id="形状" fill="currentColor"></path></g></g></g></g>',3)];function HM(t,e){return a.openBlock(),a.createElementBlock("svg",zM,jM)}const WM=be(FM,[["render",HM]]),UM={},YM={viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"currentColor"},qM=[a.createStaticVNode('<g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><title>Heading_2_fill</title> <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Editor" transform="translate(-480.000000, -48.000000)" fill-rule="nonzero"><g id="Heading_2_fill" transform="translate(480.000000, 48.000000)"><path d="M24,0 L24,24 L0,24 L0,0 L24,0 Z M12.5934901,23.257841 L12.5819402,23.2595131 L12.5108777,23.2950439 L12.4918791,23.2987469 L12.4918791,23.2987469 L12.4767152,23.2950439 L12.4056548,23.2595131 C12.3958229,23.2563662 12.3870493,23.2590235 12.3821421,23.2649074 L12.3780323,23.275831 L12.360941,23.7031097 L12.3658947,23.7234994 L12.3769048,23.7357139 L12.4804777,23.8096931 L12.4953491,23.8136134 L12.4953491,23.8136134 L12.5071152,23.8096931 L12.6106902,23.7357139 L12.6232938,23.7196733 L12.6232938,23.7196733 L12.6266527,23.7031097 L12.609561,23.275831 C12.6075724,23.2657013 12.6010112,23.2592993 12.5934901,23.257841 L12.5934901,23.257841 Z M12.8583906,23.1452862 L12.8445485,23.1473072 L12.6598443,23.2396597 L12.6498822,23.2499052 L12.6498822,23.2499052 L12.6471943,23.2611114 L12.6650943,23.6906389 L12.6699349,23.7034178 L12.6699349,23.7034178 L12.678386,23.7104931 L12.8793402,23.8032389 C12.8914285,23.8068999 12.9022333,23.8029875 12.9078286,23.7952264 L12.9118235,23.7811639 L12.8776777,23.1665331 C12.8752882,23.1545897 12.8674102,23.1470016 12.8583906,23.1452862 L12.8583906,23.1452862 Z M12.1430473,23.1473072 C12.1332178,23.1423925 12.1221763,23.1452606 12.1156365,23.1525954 L12.1099173,23.1665331 L12.0757714,23.7811639 C12.0751323,23.7926639 12.0828099,23.8018602 12.0926481,23.8045676 L12.108256,23.8032389 L12.3092106,23.7104931 L12.3186497,23.7024347 L12.3186497,23.7024347 L12.3225043,23.6906389 L12.340401,23.2611114 L12.337245,23.2485176 L12.337245,23.2485176 L12.3277531,23.2396597 L12.1430473,23.1473072 Z" id="MingCute" fill-rule="nonzero"></path> <path d="M13,2.5 C13.7796706,2.5 14.4204457,3.09488554 14.4931332,3.85553954 L14.5,4 L14.5,20 C14.5,20.8284 13.8284,21.5 13,21.5 C12.2203294,21.5 11.5795543,20.9050879 11.5068668,20.1444558 L11.5,20 L11.5,13.5 L5.5,13.5 L5.5,20 C5.5,20.8284 4.82843,21.5 4,21.5 C3.22030118,21.5 2.579551,20.9050879 2.50686655,20.1444558 L2.5,20 L2.5,4 C2.5,3.17157 3.17157,2.5 4,2.5 C4.77969882,2.5 5.420449,3.09488554 5.49313345,3.85553954 L5.5,4 L5.5,10.5 L11.5,10.5 L11.5,4 C11.5,3.17157 12.1716,2.5 13,2.5 Z M17.6575,12.6792 C18.2901,12.521 18.9499,12.6085 19.5304,12.8987 C20.6957,13.4814 21.2873,14.8195 20.9732,16.0757 C20.8743714,16.4711857 20.6906857,16.8394878 20.4358711,17.1556055 L20.3026,17.3092 L18.7244,19.0001 L20.3542,19.0001 C20.9065,19.0001 21.3542,19.4478 21.3542,20.0001 C21.3542,20.51295 20.968173,20.9356092 20.4708239,20.9933725 L20.3542,21.0001 L16.6492,21.0001 C16.0918,21.0001 15.6399,20.5482 15.6399,19.9908 C15.6399,19.69785 15.6621031,19.4213609 15.830043,19.1827703 L15.9113,19.0829 L18.8405,15.9446 C19.313,15.4383 18.8904,14.4325 18.1425,14.6195 C17.8287222,14.6979889 17.6756556,14.9547296 17.6455145,15.2464465 L17.6399,15.3572 C17.6399,15.9095 17.1922,16.3572 16.6399,16.3572 C16.0876,16.3572 15.6399,15.9095 15.6399,15.3572 C15.6399,14.1109 16.4218,12.9881 17.6575,12.6792 Z" id="形状" fill="currentColor"></path></g></g></g></g>',3)];function KM(t,e){return a.openBlock(),a.createElementBlock("svg",YM,qM)}const GM=be(UM,[["render",KM]]),JM={},ZM={viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"currentColor"},XM=[a.createStaticVNode('<g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><title>Heading_3_fill</title> <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Editor" transform="translate(-528.000000, -48.000000)" fill-rule="nonzero"><g id="Heading_3_fill" transform="translate(528.000000, 48.000000)"><path d="M24,0 L24,24 L0,24 L0,0 L24,0 Z M12.5934901,23.257841 L12.5819402,23.2595131 L12.5108777,23.2950439 L12.4918791,23.2987469 L12.4918791,23.2987469 L12.4767152,23.2950439 L12.4056548,23.2595131 C12.3958229,23.2563662 12.3870493,23.2590235 12.3821421,23.2649074 L12.3780323,23.275831 L12.360941,23.7031097 L12.3658947,23.7234994 L12.3769048,23.7357139 L12.4804777,23.8096931 L12.4953491,23.8136134 L12.4953491,23.8136134 L12.5071152,23.8096931 L12.6106902,23.7357139 L12.6232938,23.7196733 L12.6232938,23.7196733 L12.6266527,23.7031097 L12.609561,23.275831 C12.6075724,23.2657013 12.6010112,23.2592993 12.5934901,23.257841 L12.5934901,23.257841 Z M12.8583906,23.1452862 L12.8445485,23.1473072 L12.6598443,23.2396597 L12.6498822,23.2499052 L12.6498822,23.2499052 L12.6471943,23.2611114 L12.6650943,23.6906389 L12.6699349,23.7034178 L12.6699349,23.7034178 L12.678386,23.7104931 L12.8793402,23.8032389 C12.8914285,23.8068999 12.9022333,23.8029875 12.9078286,23.7952264 L12.9118235,23.7811639 L12.8776777,23.1665331 C12.8752882,23.1545897 12.8674102,23.1470016 12.8583906,23.1452862 L12.8583906,23.1452862 Z M12.1430473,23.1473072 C12.1332178,23.1423925 12.1221763,23.1452606 12.1156365,23.1525954 L12.1099173,23.1665331 L12.0757714,23.7811639 C12.0751323,23.7926639 12.0828099,23.8018602 12.0926481,23.8045676 L12.108256,23.8032389 L12.3092106,23.7104931 L12.3186497,23.7024347 L12.3186497,23.7024347 L12.3225043,23.6906389 L12.340401,23.2611114 L12.337245,23.2485176 L12.337245,23.2485176 L12.3277531,23.2396597 L12.1430473,23.1473072 Z" id="MingCute" fill-rule="nonzero"></path> <path d="M13,2.5 C13.7796706,2.5 14.4204457,3.09488554 14.4931332,3.85553954 L14.5,4 L14.5,20 C14.5,20.8284 13.8284,21.5 13,21.5 C12.2203294,21.5 11.5795543,20.9050879 11.5068668,20.1444558 L11.5,20 L11.5,13.5 L5.5,13.5 L5.5,20 C5.5,20.8284 4.82843,21.5 4,21.5 C3.22030118,21.5 2.579551,20.9050879 2.50686655,20.1444558 L2.5,20 L2.5,4 C2.5,3.17157 3.17157,2.5 4,2.5 C4.77969882,2.5 5.420449,3.09488554 5.49313345,3.85553954 L5.5,4 L5.5,10.5 L11.5,10.5 L11.5,4 C11.5,3.17157 12.1716,2.5 13,2.5 Z M18.3715,12.5 C19.827,12.5 21.0001,13.6854 21.0001,15.1334 C21.0001,15.7245 20.8,16.2932 20.4418,16.7501 C20.7999,17.2069 20.9999,17.7756 20.9999,18.3666 C20.9999,19.8146 19.8268,21 18.3713,21 C17.3195,21 16.332,20.6496 15.8873,19.6016 C15.6461,19.033 15.6582,18.3518 16.3235,18.0694 C16.7955857,17.8691071 17.3354439,18.0594112 17.5829394,18.4946729 L17.6347,18.5994 C17.7727273,18.9247091 17.9135661,18.9858645 18.1765622,18.9973488 L18.3713,19 L18.3713,19 C18.7147,19 18.9999,18.7176 18.9999,18.3666 C18.9999,17.9941455 18.7151893,17.7892942 18.3855875,17.7551267 L18.2856,17.75 C17.7333,17.75 17.2856,17.3023 17.2856,16.75 C17.2856,16.23715 17.6717995,15.8144908 18.1691731,15.7567275 L18.2858,15.75 C18.6556,15.75 19.0001,15.5431 19.0001,15.1334 C19.0001,14.7824 18.7149,14.5 18.3715,14.5 L18.1767622,14.5026512 C17.9429879,14.5128595 17.8057329,14.562314 17.6811769,14.8016529 L17.6349,14.9006 C17.4192,15.409 16.8322,15.6463 16.3238,15.4306 C15.6584,15.1482 15.6463,14.467 15.8876,13.8984 C16.3323,12.8504 17.3197,12.5 18.3715,12.5 Z" id="形状" fill="currentColor"></path></g></g></g></g>',3)];function QM(t,e){return a.openBlock(),a.createElementBlock("svg",ZM,XM)}const eA=be(JM,[["render",QM]]),tA={},nA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},rA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Zm0 4.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"},null,-1)];function iA(t,e){return a.openBlock(),a.createElementBlock("svg",nA,rA)}const oA=be(tA,[["render",iA]]),sA={},lA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},aA=[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8ZM5.5 12.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"},null,-1)];function cA(t,e){return a.openBlock(),a.createElementBlock("svg",lA,aA)}const dA=be(sA,[["render",cA]]),uA={},fA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},hA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Zm6 4.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"},null,-1)];function pA(t,e){return a.openBlock(),a.createElementBlock("svg",fA,hA)}const mA=be(uA,[["render",pA]]),gA={},yA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},bA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Zm0 4.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"},null,-1)];function kA(t,e){return a.openBlock(),a.createElementBlock("svg",yA,bA)}const wA=be(gA,[["render",kA]]),vA={},xA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},EA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.75 2a.75.75 0 0 1 .75.75V7a2.5 2.5 0 0 0 5 0V2.75a.75.75 0 0 1 1.5 0V7a4 4 0 0 1-8 0V2.75A.75.75 0 0 1 4.75 2ZM2 13.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"},null,-1)];function CA(t,e){return a.openBlock(),a.createElementBlock("svg",xA,EA)}const SA=be(vA,[["render",CA]]),_A={},OA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},TA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.165 3.654c-.95-.255-1.921-.273-2.693-.042-.769.231-1.087.624-1.173.947-.087.323-.008.822.543 1.407.389.412.927.77 1.55 1.034H13a.75.75 0 0 1 0 1.5H3A.75.75 0 0 1 3 7h1.756l-.006-.006c-.787-.835-1.161-1.849-.9-2.823.26-.975 1.092-1.666 2.191-1.995 1.097-.33 2.36-.28 3.512.029.75.2 1.478.518 2.11.939a.75.75 0 0 1-.833 1.248 5.682 5.682 0 0 0-1.665-.738Zm2.074 6.365a.75.75 0 0 1 .91.543 2.44 2.44 0 0 1-.35 2.024c-.405.585-1.052 1.003-1.84 1.24-1.098.329-2.36.279-3.512-.03-1.152-.308-2.27-.897-3.056-1.73a.75.75 0 0 1 1.092-1.029c.552.586 1.403 1.056 2.352 1.31.95.255 1.92.273 2.692.042.55-.165.873-.417 1.038-.656a.942.942 0 0 0 .13-.803.75.75 0 0 1 .544-.91Z","clip-rule":"evenodd"},null,-1)];function NA(t,e){return a.openBlock(),a.createElementBlock("svg",OA,TA)}const MA=be(_A,[["render",NA]]),AA={},DA={fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},LA=[a.createElementVNode("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"},null,-1),a.createElementVNode("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("g",{id:"SVGRepo_iconCarrier"},[a.createElementVNode("path",{d:"M5 18h14v3H5zm7.5-14h-1c-.401 0-.764.24-.921.609L5.745 16h2.173l1.273-3h5.604l1.268 3h2.171L13.421 4.61A1 1 0 0 0 12.5 4zm-2.46 7 1.959-4.616L13.95 11h-3.91z"})],-1)];function BA(t,e){return a.openBlock(),a.createElementBlock("svg",DA,LA)}const $A=be(AA,[["render",BA]]),IA={class:"py-1 px-1 border-b dark:border-gray-900 dark:bg-gray-810"},VA={class:"flex gap-px"},PA=["onClick"],RA={key:1,class:"text-sm"},FA=Object.assign({name:"WpicTextEditor"},{props:{modelValue:{type:String,default:""},heading:Boolean,textAlign:Boolean,underline:Boolean,strike:Boolean,customStyles:{type:{},default:()=>{}},color:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=a.ref("#000000"),i=a.ref(!1),o=a.ref(),s={pmi:"shadow-inner border-zinc-400 dark:border-zinc-700/50 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 dark:text-zinc-300 bg-zinc-100 dark:bg-zinc-700/25","wpic-tools":"bg-white border border-gray-300 dark:text-gray-200 dark:bg-gray-930 dark:border-gray-900"},l=[{method:"toggleBold",type:"chain",label:"bold",icon:BM,smallIcon:!0,disableCheck:!0,active:!0},{method:"toggleItalic",type:"chain",label:"italic",icon:NM,smallIcon:!0,disableCheck:!0,active:!0},{method:"toggleUnderline",type:"chain",label:"underline",icon:SA,disableCheck:!0,active:n.underline},{method:"toggleStrike",type:"chain",label:"strike",icon:MA,disableCheck:!0,active:n.strike},{method:"setParagraph",type:"chain",label:"paragraph",icon:RM,smallIcon:!0,disableCheck:!1,active:!0},{method:"toggleHeading",type:"chain",label:"h1",icon:WM,params:{level:1},disableCheck:!0,active:n.heading},{method:"toggleHeading",type:"chain",label:"h2",icon:GM,params:{level:2},disableCheck:!1,active:n.heading},{method:"toggleHeading",type:"chain",label:"h3",icon:eA,params:{level:3},disableCheck:!1,active:n.heading},{method:"setTextAlign",type:"chain",label:"left",icon:oA,disableCheck:!1,active:n.textAlign,params:"left"},{method:"setTextAlign",type:"chain",label:"center",icon:dA,disableCheck:!1,active:n.textAlign,params:"center"},{method:"setTextAlign",type:"chain",label:"right",icon:mA,disableCheck:!1,active:n.textAlign,params:"right"},{method:"setTextAlign",type:"chain",label:"justify",icon:wA,disableCheck:!1,active:n.textAlign,params:"justify"},{method:"toggleBulletList",type:"chain",label:"bullet list",icon:cM,disableCheck:!1,active:!0},{method:"toggleOrderedList",type:"chain",label:"ordered list",icon:pM,disableCheck:!1,active:!0},{method:"undo",type:"chain",label:"undo",icon:kM,disableCheck:!0,active:!0},{method:"redo",type:"chain",label:"redo",icon:CM,disableCheck:!0,active:!0}],c=e,d=Z5({content:n.modelValue,extensions:[ZN,tM,iM,rM,eM.configure({types:["heading","paragraph"]}),XN.configure({placeholder:"..."})],onUpdate:()=>{c("update:modelValue",d.value.getHTML())}});a.onBeforeUnmount(()=>{d.value.destroy()}),a.watch(()=>n.modelValue,m=>{m!==d.value.getHTML()&&d.value.commands.setContent(m,!1)});function u(m,g,y){if(m==="setTextAlign"){d.value.isActive({textAlign:y})?d.value.chain().focus().unsetTextAlign().run():d.value.chain().focus().setTextAlign(y).run();return}g==="chain"?y?d.value.chain().focus()[m](y).run():d.value.chain().focus()[m]().run():d.value[m]()()}function f(m,g,y,k){return k?g==="chain"?y?!d.value.can().chain().focus()[m](y).run():!d.value.can().chain().focus()[m]().run():!d.value.can()[m]().run():!1}const h=()=>{d.value.chain().focus().setColor(r.value).run(),i.value=!1},p=()=>{o.value.click()};return(m,g)=>{var y;return a.unref(d)?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["pt-px relative flex flex-col rounded-sm border",s[a.unref(fe).theme]])},[a.createElementVNode("div",IA,[a.createElementVNode("div",VA,[t.color?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:p,class:"w-8 h-8 relative flex cursor-pointer items-center justify-center text-xs rounded-sm text-gray-800 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-white/10"},[a.createVNode($A,{class:"w-5 h-5",style:{}}),a.withDirectives(a.createElementVNode("input",{ref_key:"myColorPicker",ref:o,type:"color","onUpdate:modelValue":g[0]||(g[0]=k=>r.value=k),class:"w-0",onInput:h},null,544),[[a.vModelText,r.value]])])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.filter(k=>k.active),k=>(a.openBlock(),a.createElementBlock("div",{key:k.method,class:a.normalizeClass(["w-8 h-8 flex items-center justify-center text-xs rounded-sm text-gray-800 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-white/10",{"cursor-pointer":!f(k.method,k.type,k.params,k.disableCheck),"is-active text-gray-800 bg-gray-200 dark:text-white dark:bg-white/10":k.label.startsWith("h")?a.unref(d).isActive("heading",{level:k.params.level}):k.method==="setTextAlign"?a.unref(d).isActive({textAlign:k.params}):a.unref(d).isActive(k.label)}]),onClick:x=>u(k.method,k.type,k.params)},[k.icon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(k.icon),{key:0,class:a.normalizeClass(["",{"w-3 h-3":k.smallIcon,"w-4 h-4":!k.smallIcon&&!k.largeIcon,"w-5 h-5":k.largeIcon}])},null,8,["class"])):(a.openBlock(),a.createElementBlock("span",RA,a.toDisplayString(a.unref(t1).capitalize(k.label)),1))],10,PA))),128))])]),a.createElementVNode("div",{class:"max-h-72 w-full overflow-auto px-4 py-3 rounded-b-sm",style:a.normalizeStyle({backgroundColor:(y=t.customStyles)==null?void 0:y.backgroundColor})},[a.createVNode(a.unref(J5),{editor:a.unref(d)},null,8,["editor"])],4)],2)):a.createCommentVNode("",!0)}}}),zA={},jA={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},HA=[a.createElementVNode("rect",{x:"2",y:"2",width:"20",height:"20",rx:"7",fill:"currentColor","stroke-width":"2.5"},null,-1)];function WA(t,e){return a.openBlock(),a.createElementBlock("svg",jA,HA)}const UA=be(zA,[["render",WA]]),YA={},qA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"none"},KA=[a.createElementVNode("rect",{x:"2",y:"2",width:"20",height:"20",rx:"7",fill:"none",stroke:"currentColor","stroke-width":"3"},null,-1)];function GA(t,e){return a.openBlock(),a.createElementBlock("svg",qA,KA)}const JA=be(YA,[["render",GA]]),ZA={},XA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},QA=[a.createElementVNode("rect",{x:"2",y:"2",width:"20",height:"20",rx:"7",fill:"none",stroke:"currentColor","stroke-width":"3"},null,-1),a.createElementVNode("line",{x1:"7.5",y1:"2",x2:"22",y2:"16",stroke:"currentColor",class:"opacity-75","stroke-width":"2.5"},null,-1),a.createElementVNode("line",{x1:"2",y1:"7.5",x2:"16",y2:"22",stroke:"currentColor",class:"opacity-75","stroke-width":"2.5"},null,-1)];function e3(t,e){return a.openBlock(),a.createElementBlock("svg",XA,QA)}const t3=be(ZA,[["render",e3]]),n3={class:"flex-1"},r3=Object.assign({name:"WpicBadge"},{props:{success:Boolean,warning:Boolean,error:Boolean,complete:Boolean,incomplete:Boolean,partially:Boolean,info:Boolean},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("span",{class:a.normalizeClass(["inline-flex items-center justify-center border-0 font-normal rounded-md min-h-6 gap-1 leading-none text-sm px-2",{"bg-green-100 border-green-200 text-green-700 dark:border-green-600/30 dark:bg-green-800/15 dark:text-green-500/85":t.success,"bg-yellow-100 border-yellow-200 text-yellow-700 dark:border-yellow-600/30 dark:bg-yellow-800/15 dark:text-yellow-500/85":t.warning,"bg-red-100 border-red-200 text-red-700 dark:border-red-600/30 dark:bg-red-800/15 dark:text-red-500/85":t.error,"bg-purple-100 border-purple-200 text-purple-700 dark:border-purple-600/30 dark:bg-purple-800/25 dark:text-purple-500/85":t.info,"bg-gray-100 border-gray-200 text-gray-700 dark:border-gray-600/30 dark:bg-white/5 dark:text-gray-400/85":!t.info&&!t.success&&!t.warning&&!t.error}])},[t.complete?(a.openBlock(),a.createBlock(UA,{key:0,class:"w-2.5 h-2.5"})):a.createCommentVNode("",!0),t.incomplete?(a.openBlock(),a.createBlock(JA,{key:1,class:"w-2.5 h-2.5 opacity-80"})):a.createCommentVNode("",!0),t.partially?(a.openBlock(),a.createBlock(t3,{key:2,class:"w-2.5 h-2.5 opacity-80"})):a.createCommentVNode("",!0),a.createElementVNode("span",n3,[a.renderSlot(e.$slots,"default")])],2))}}),Cc={__name:"DayItem",props:{day:{},today:Boolean,selected:Boolean,between:Boolean,firstDay:Boolean,lastDay:Boolean,off:Boolean,disabled:Boolean,highlight:Boolean},setup(t){const e={pmi:"","wpic-tools":`
142
+ h6.873c1.257,0,2.277-1.021,2.277-2.276V14.566h11.83C94.247,14.566,95.263,13.547,95.263,12.29z`})])],-1)];function PM(t,e){return a.openBlock(),a.createElementBlock("svg",IM,VM)}const RM=be($M,[["render",PM]]),FM={},zM={viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"currentColor"},jM=[a.createStaticVNode('<g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><title>Heading_1_fill</title> <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Editor" transform="translate(-432.000000, -48.000000)" fill-rule="nonzero"><g id="Heading_1_fill" transform="translate(432.000000, 48.000000)"><path d="M24,0 L24,24 L0,24 L0,0 L24,0 Z M12.5934901,23.257841 L12.5819402,23.2595131 L12.5108777,23.2950439 L12.4918791,23.2987469 L12.4918791,23.2987469 L12.4767152,23.2950439 L12.4056548,23.2595131 C12.3958229,23.2563662 12.3870493,23.2590235 12.3821421,23.2649074 L12.3780323,23.275831 L12.360941,23.7031097 L12.3658947,23.7234994 L12.3769048,23.7357139 L12.4804777,23.8096931 L12.4953491,23.8136134 L12.4953491,23.8136134 L12.5071152,23.8096931 L12.6106902,23.7357139 L12.6232938,23.7196733 L12.6232938,23.7196733 L12.6266527,23.7031097 L12.609561,23.275831 C12.6075724,23.2657013 12.6010112,23.2592993 12.5934901,23.257841 L12.5934901,23.257841 Z M12.8583906,23.1452862 L12.8445485,23.1473072 L12.6598443,23.2396597 L12.6498822,23.2499052 L12.6498822,23.2499052 L12.6471943,23.2611114 L12.6650943,23.6906389 L12.6699349,23.7034178 L12.6699349,23.7034178 L12.678386,23.7104931 L12.8793402,23.8032389 C12.8914285,23.8068999 12.9022333,23.8029875 12.9078286,23.7952264 L12.9118235,23.7811639 L12.8776777,23.1665331 C12.8752882,23.1545897 12.8674102,23.1470016 12.8583906,23.1452862 L12.8583906,23.1452862 Z M12.1430473,23.1473072 C12.1332178,23.1423925 12.1221763,23.1452606 12.1156365,23.1525954 L12.1099173,23.1665331 L12.0757714,23.7811639 C12.0751323,23.7926639 12.0828099,23.8018602 12.0926481,23.8045676 L12.108256,23.8032389 L12.3092106,23.7104931 L12.3186497,23.7024347 L12.3186497,23.7024347 L12.3225043,23.6906389 L12.340401,23.2611114 L12.337245,23.2485176 L12.337245,23.2485176 L12.3277531,23.2396597 L12.1430473,23.1473072 Z" id="MingCute" fill-rule="nonzero"></path> <path d="M13,2.5 C13.7796706,2.5 14.4204457,3.09488554 14.4931332,3.85553954 L14.5,4 L14.5,20 C14.5,20.8284 13.8284,21.5 13,21.5 C12.2203294,21.5 11.5795543,20.9050879 11.5068668,20.1444558 L11.5,20 L11.5,13.5 L5.5,13.5 L5.5,20 C5.5,20.8284 4.82843,21.5 4,21.5 C3.22030118,21.5 2.579551,20.9050879 2.50686655,20.1444558 L2.5,20 L2.5,4 C2.5,3.17157 3.17157,2.5 4,2.5 C4.77969882,2.5 5.420449,3.09488554 5.49313345,3.85553954 L5.5,4 L5.5,10.5 L11.5,10.5 L11.5,4 C11.5,3.17157 12.1716,2.5 13,2.5 Z M19.0001,13.5187 L19.0001,20 C19.0001,20.5523 18.5524,21 18.0001,21 C17.4478,21 17.0001,20.5523 17.0001,20 L17.0001,15.366 C16.5471,15.6281 15.9624,15.4962 15.6681,15.0547 C15.3617,14.5951 15.4859,13.9743 15.9454,13.6679 L17.4299,12.6783 C18.101,12.2308 19.0001,12.712 19.0001,13.5187 Z" id="形状" fill="currentColor"></path></g></g></g></g>',3)];function HM(t,e){return a.openBlock(),a.createElementBlock("svg",zM,jM)}const WM=be(FM,[["render",HM]]),UM={},YM={viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"currentColor"},qM=[a.createStaticVNode('<g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><title>Heading_2_fill</title> <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Editor" transform="translate(-480.000000, -48.000000)" fill-rule="nonzero"><g id="Heading_2_fill" transform="translate(480.000000, 48.000000)"><path d="M24,0 L24,24 L0,24 L0,0 L24,0 Z M12.5934901,23.257841 L12.5819402,23.2595131 L12.5108777,23.2950439 L12.4918791,23.2987469 L12.4918791,23.2987469 L12.4767152,23.2950439 L12.4056548,23.2595131 C12.3958229,23.2563662 12.3870493,23.2590235 12.3821421,23.2649074 L12.3780323,23.275831 L12.360941,23.7031097 L12.3658947,23.7234994 L12.3769048,23.7357139 L12.4804777,23.8096931 L12.4953491,23.8136134 L12.4953491,23.8136134 L12.5071152,23.8096931 L12.6106902,23.7357139 L12.6232938,23.7196733 L12.6232938,23.7196733 L12.6266527,23.7031097 L12.609561,23.275831 C12.6075724,23.2657013 12.6010112,23.2592993 12.5934901,23.257841 L12.5934901,23.257841 Z M12.8583906,23.1452862 L12.8445485,23.1473072 L12.6598443,23.2396597 L12.6498822,23.2499052 L12.6498822,23.2499052 L12.6471943,23.2611114 L12.6650943,23.6906389 L12.6699349,23.7034178 L12.6699349,23.7034178 L12.678386,23.7104931 L12.8793402,23.8032389 C12.8914285,23.8068999 12.9022333,23.8029875 12.9078286,23.7952264 L12.9118235,23.7811639 L12.8776777,23.1665331 C12.8752882,23.1545897 12.8674102,23.1470016 12.8583906,23.1452862 L12.8583906,23.1452862 Z M12.1430473,23.1473072 C12.1332178,23.1423925 12.1221763,23.1452606 12.1156365,23.1525954 L12.1099173,23.1665331 L12.0757714,23.7811639 C12.0751323,23.7926639 12.0828099,23.8018602 12.0926481,23.8045676 L12.108256,23.8032389 L12.3092106,23.7104931 L12.3186497,23.7024347 L12.3186497,23.7024347 L12.3225043,23.6906389 L12.340401,23.2611114 L12.337245,23.2485176 L12.337245,23.2485176 L12.3277531,23.2396597 L12.1430473,23.1473072 Z" id="MingCute" fill-rule="nonzero"></path> <path d="M13,2.5 C13.7796706,2.5 14.4204457,3.09488554 14.4931332,3.85553954 L14.5,4 L14.5,20 C14.5,20.8284 13.8284,21.5 13,21.5 C12.2203294,21.5 11.5795543,20.9050879 11.5068668,20.1444558 L11.5,20 L11.5,13.5 L5.5,13.5 L5.5,20 C5.5,20.8284 4.82843,21.5 4,21.5 C3.22030118,21.5 2.579551,20.9050879 2.50686655,20.1444558 L2.5,20 L2.5,4 C2.5,3.17157 3.17157,2.5 4,2.5 C4.77969882,2.5 5.420449,3.09488554 5.49313345,3.85553954 L5.5,4 L5.5,10.5 L11.5,10.5 L11.5,4 C11.5,3.17157 12.1716,2.5 13,2.5 Z M17.6575,12.6792 C18.2901,12.521 18.9499,12.6085 19.5304,12.8987 C20.6957,13.4814 21.2873,14.8195 20.9732,16.0757 C20.8743714,16.4711857 20.6906857,16.8394878 20.4358711,17.1556055 L20.3026,17.3092 L18.7244,19.0001 L20.3542,19.0001 C20.9065,19.0001 21.3542,19.4478 21.3542,20.0001 C21.3542,20.51295 20.968173,20.9356092 20.4708239,20.9933725 L20.3542,21.0001 L16.6492,21.0001 C16.0918,21.0001 15.6399,20.5482 15.6399,19.9908 C15.6399,19.69785 15.6621031,19.4213609 15.830043,19.1827703 L15.9113,19.0829 L18.8405,15.9446 C19.313,15.4383 18.8904,14.4325 18.1425,14.6195 C17.8287222,14.6979889 17.6756556,14.9547296 17.6455145,15.2464465 L17.6399,15.3572 C17.6399,15.9095 17.1922,16.3572 16.6399,16.3572 C16.0876,16.3572 15.6399,15.9095 15.6399,15.3572 C15.6399,14.1109 16.4218,12.9881 17.6575,12.6792 Z" id="形状" fill="currentColor"></path></g></g></g></g>',3)];function KM(t,e){return a.openBlock(),a.createElementBlock("svg",YM,qM)}const GM=be(UM,[["render",KM]]),JM={},ZM={viewBox:"0 0 24 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"currentColor"},XM=[a.createStaticVNode('<g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><title>Heading_3_fill</title> <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Editor" transform="translate(-528.000000, -48.000000)" fill-rule="nonzero"><g id="Heading_3_fill" transform="translate(528.000000, 48.000000)"><path d="M24,0 L24,24 L0,24 L0,0 L24,0 Z M12.5934901,23.257841 L12.5819402,23.2595131 L12.5108777,23.2950439 L12.4918791,23.2987469 L12.4918791,23.2987469 L12.4767152,23.2950439 L12.4056548,23.2595131 C12.3958229,23.2563662 12.3870493,23.2590235 12.3821421,23.2649074 L12.3780323,23.275831 L12.360941,23.7031097 L12.3658947,23.7234994 L12.3769048,23.7357139 L12.4804777,23.8096931 L12.4953491,23.8136134 L12.4953491,23.8136134 L12.5071152,23.8096931 L12.6106902,23.7357139 L12.6232938,23.7196733 L12.6232938,23.7196733 L12.6266527,23.7031097 L12.609561,23.275831 C12.6075724,23.2657013 12.6010112,23.2592993 12.5934901,23.257841 L12.5934901,23.257841 Z M12.8583906,23.1452862 L12.8445485,23.1473072 L12.6598443,23.2396597 L12.6498822,23.2499052 L12.6498822,23.2499052 L12.6471943,23.2611114 L12.6650943,23.6906389 L12.6699349,23.7034178 L12.6699349,23.7034178 L12.678386,23.7104931 L12.8793402,23.8032389 C12.8914285,23.8068999 12.9022333,23.8029875 12.9078286,23.7952264 L12.9118235,23.7811639 L12.8776777,23.1665331 C12.8752882,23.1545897 12.8674102,23.1470016 12.8583906,23.1452862 L12.8583906,23.1452862 Z M12.1430473,23.1473072 C12.1332178,23.1423925 12.1221763,23.1452606 12.1156365,23.1525954 L12.1099173,23.1665331 L12.0757714,23.7811639 C12.0751323,23.7926639 12.0828099,23.8018602 12.0926481,23.8045676 L12.108256,23.8032389 L12.3092106,23.7104931 L12.3186497,23.7024347 L12.3186497,23.7024347 L12.3225043,23.6906389 L12.340401,23.2611114 L12.337245,23.2485176 L12.337245,23.2485176 L12.3277531,23.2396597 L12.1430473,23.1473072 Z" id="MingCute" fill-rule="nonzero"></path> <path d="M13,2.5 C13.7796706,2.5 14.4204457,3.09488554 14.4931332,3.85553954 L14.5,4 L14.5,20 C14.5,20.8284 13.8284,21.5 13,21.5 C12.2203294,21.5 11.5795543,20.9050879 11.5068668,20.1444558 L11.5,20 L11.5,13.5 L5.5,13.5 L5.5,20 C5.5,20.8284 4.82843,21.5 4,21.5 C3.22030118,21.5 2.579551,20.9050879 2.50686655,20.1444558 L2.5,20 L2.5,4 C2.5,3.17157 3.17157,2.5 4,2.5 C4.77969882,2.5 5.420449,3.09488554 5.49313345,3.85553954 L5.5,4 L5.5,10.5 L11.5,10.5 L11.5,4 C11.5,3.17157 12.1716,2.5 13,2.5 Z M18.3715,12.5 C19.827,12.5 21.0001,13.6854 21.0001,15.1334 C21.0001,15.7245 20.8,16.2932 20.4418,16.7501 C20.7999,17.2069 20.9999,17.7756 20.9999,18.3666 C20.9999,19.8146 19.8268,21 18.3713,21 C17.3195,21 16.332,20.6496 15.8873,19.6016 C15.6461,19.033 15.6582,18.3518 16.3235,18.0694 C16.7955857,17.8691071 17.3354439,18.0594112 17.5829394,18.4946729 L17.6347,18.5994 C17.7727273,18.9247091 17.9135661,18.9858645 18.1765622,18.9973488 L18.3713,19 L18.3713,19 C18.7147,19 18.9999,18.7176 18.9999,18.3666 C18.9999,17.9941455 18.7151893,17.7892942 18.3855875,17.7551267 L18.2856,17.75 C17.7333,17.75 17.2856,17.3023 17.2856,16.75 C17.2856,16.23715 17.6717995,15.8144908 18.1691731,15.7567275 L18.2858,15.75 C18.6556,15.75 19.0001,15.5431 19.0001,15.1334 C19.0001,14.7824 18.7149,14.5 18.3715,14.5 L18.1767622,14.5026512 C17.9429879,14.5128595 17.8057329,14.562314 17.6811769,14.8016529 L17.6349,14.9006 C17.4192,15.409 16.8322,15.6463 16.3238,15.4306 C15.6584,15.1482 15.6463,14.467 15.8876,13.8984 C16.3323,12.8504 17.3197,12.5 18.3715,12.5 Z" id="形状" fill="currentColor"></path></g></g></g></g>',3)];function QM(t,e){return a.openBlock(),a.createElementBlock("svg",ZM,XM)}const eA=be(JM,[["render",QM]]),tA={},nA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},rA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Zm0 4.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"},null,-1)];function iA(t,e){return a.openBlock(),a.createElementBlock("svg",nA,rA)}const oA=be(tA,[["render",iA]]),sA={},lA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},aA=[a.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8ZM5.5 12.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"},null,-1)];function cA(t,e){return a.openBlock(),a.createElementBlock("svg",lA,aA)}const dA=be(sA,[["render",cA]]),uA={},fA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},hA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Zm6 4.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"},null,-1)];function pA(t,e){return a.openBlock(),a.createElementBlock("svg",fA,hA)}const mA=be(uA,[["render",pA]]),gA={},yA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},bA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M2 3.75A.75.75 0 0 1 2.75 3h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 3.75ZM2 8a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75A.75.75 0 0 1 2 8Zm0 4.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"},null,-1)];function kA(t,e){return a.openBlock(),a.createElementBlock("svg",yA,bA)}const wA=be(gA,[["render",kA]]),vA={},xA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},EA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.75 2a.75.75 0 0 1 .75.75V7a2.5 2.5 0 0 0 5 0V2.75a.75.75 0 0 1 1.5 0V7a4 4 0 0 1-8 0V2.75A.75.75 0 0 1 4.75 2ZM2 13.25a.75.75 0 0 1 .75-.75h10.5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"},null,-1)];function CA(t,e){return a.openBlock(),a.createElementBlock("svg",xA,EA)}const SA=be(vA,[["render",CA]]),_A={},OA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor"},TA=[a.createElementVNode("path",{"fill-rule":"evenodd",d:"M9.165 3.654c-.95-.255-1.921-.273-2.693-.042-.769.231-1.087.624-1.173.947-.087.323-.008.822.543 1.407.389.412.927.77 1.55 1.034H13a.75.75 0 0 1 0 1.5H3A.75.75 0 0 1 3 7h1.756l-.006-.006c-.787-.835-1.161-1.849-.9-2.823.26-.975 1.092-1.666 2.191-1.995 1.097-.33 2.36-.28 3.512.029.75.2 1.478.518 2.11.939a.75.75 0 0 1-.833 1.248 5.682 5.682 0 0 0-1.665-.738Zm2.074 6.365a.75.75 0 0 1 .91.543 2.44 2.44 0 0 1-.35 2.024c-.405.585-1.052 1.003-1.84 1.24-1.098.329-2.36.279-3.512-.03-1.152-.308-2.27-.897-3.056-1.73a.75.75 0 0 1 1.092-1.029c.552.586 1.403 1.056 2.352 1.31.95.255 1.92.273 2.692.042.55-.165.873-.417 1.038-.656a.942.942 0 0 0 .13-.803.75.75 0 0 1 .544-.91Z","clip-rule":"evenodd"},null,-1)];function NA(t,e){return a.openBlock(),a.createElementBlock("svg",OA,TA)}const MA=be(_A,[["render",NA]]),AA={},DA={fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},LA=[a.createElementVNode("g",{id:"SVGRepo_bgCarrier","stroke-width":"0"},null,-1),a.createElementVNode("g",{id:"SVGRepo_tracerCarrier","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("g",{id:"SVGRepo_iconCarrier"},[a.createElementVNode("path",{d:"M5 18h14v3H5zm7.5-14h-1c-.401 0-.764.24-.921.609L5.745 16h2.173l1.273-3h5.604l1.268 3h2.171L13.421 4.61A1 1 0 0 0 12.5 4zm-2.46 7 1.959-4.616L13.95 11h-3.91z"})],-1)];function BA(t,e){return a.openBlock(),a.createElementBlock("svg",DA,LA)}const $A=be(AA,[["render",BA]]),IA={class:"py-1 px-1 border-b dark:border-gray-900 dark:bg-gray-810"},VA={class:"flex gap-px"},PA=["onClick"],RA={key:1,class:"text-sm"},FA=Object.assign({name:"WpicTextEditor"},{props:{modelValue:{type:String,default:""},heading:Boolean,textAlign:Boolean,underline:Boolean,strike:Boolean,customStyles:{type:{},default:()=>{}},color:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=a.ref("#000000"),i=a.ref(!1),o=a.ref(),s={pmi:"shadow-inner border-zinc-400 dark:border-zinc-700/50 focus-within:border-zinc-500 focus-within:outline focus-within:outline-2 focus-within:outline-offset-3 dark:text-zinc-300 bg-zinc-100 dark:bg-zinc-700/25","wpic-tools":"bg-white border border-gray-300 dark:text-gray-200 dark:bg-gray-930 dark:border-gray-900"},l=[{method:"toggleBold",type:"chain",label:"bold",icon:BM,smallIcon:!0,disableCheck:!0,active:!0},{method:"toggleItalic",type:"chain",label:"italic",icon:NM,smallIcon:!0,disableCheck:!0,active:!0},{method:"toggleUnderline",type:"chain",label:"underline",icon:SA,disableCheck:!0,active:n.underline},{method:"toggleStrike",type:"chain",label:"strike",icon:MA,disableCheck:!0,active:n.strike},{method:"setParagraph",type:"chain",label:"paragraph",icon:RM,smallIcon:!0,disableCheck:!1,active:!0},{method:"toggleHeading",type:"chain",label:"h1",icon:WM,params:{level:1},disableCheck:!0,active:n.heading},{method:"toggleHeading",type:"chain",label:"h2",icon:GM,params:{level:2},disableCheck:!1,active:n.heading},{method:"toggleHeading",type:"chain",label:"h3",icon:eA,params:{level:3},disableCheck:!1,active:n.heading},{method:"setTextAlign",type:"chain",label:"left",icon:oA,disableCheck:!1,active:n.textAlign,params:"left"},{method:"setTextAlign",type:"chain",label:"center",icon:dA,disableCheck:!1,active:n.textAlign,params:"center"},{method:"setTextAlign",type:"chain",label:"right",icon:mA,disableCheck:!1,active:n.textAlign,params:"right"},{method:"setTextAlign",type:"chain",label:"justify",icon:wA,disableCheck:!1,active:n.textAlign,params:"justify"},{method:"toggleBulletList",type:"chain",label:"bullet list",icon:cM,disableCheck:!1,active:!0},{method:"toggleOrderedList",type:"chain",label:"ordered list",icon:pM,disableCheck:!1,active:!0},{method:"undo",type:"chain",label:"undo",icon:kM,disableCheck:!0,active:!0},{method:"redo",type:"chain",label:"redo",icon:CM,disableCheck:!0,active:!0}],c=e,d=Z5({content:n.modelValue,extensions:[ZN,tM,iM,rM,eM.configure({types:["heading","paragraph"]}),XN.configure({placeholder:"..."})],onUpdate:()=>{c("update:modelValue",d.value.getHTML())}});a.onBeforeUnmount(()=>{d.value.destroy()}),a.watch(()=>n.modelValue,m=>{m!==d.value.getHTML()&&d.value.commands.setContent(m,!1)});function u(m,g,y){if(m==="setTextAlign"){d.value.isActive({textAlign:y})?d.value.chain().focus().unsetTextAlign().run():d.value.chain().focus().setTextAlign(y).run();return}g==="chain"?y?d.value.chain().focus()[m](y).run():d.value.chain().focus()[m]().run():d.value[m]()()}function f(m,g,y,k){return k?g==="chain"?y?!d.value.can().chain().focus()[m](y).run():!d.value.can().chain().focus()[m]().run():!d.value.can()[m]().run():!1}const h=()=>{d.value.chain().focus().setColor(r.value).run(),i.value=!1},p=()=>{o.value.click()};return(m,g)=>{var y;return a.unref(d)?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["pt-px relative flex flex-col rounded-sm border",s[a.unref(he).theme]])},[a.createElementVNode("div",IA,[a.createElementVNode("div",VA,[t.color?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:p,class:"w-8 h-8 relative flex cursor-pointer items-center justify-center text-xs rounded-sm text-gray-800 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-white/10"},[a.createVNode($A,{class:"w-5 h-5",style:{}}),a.withDirectives(a.createElementVNode("input",{ref_key:"myColorPicker",ref:o,type:"color","onUpdate:modelValue":g[0]||(g[0]=k=>r.value=k),class:"w-0",onInput:h},null,544),[[a.vModelText,r.value]])])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.filter(k=>k.active),k=>(a.openBlock(),a.createElementBlock("div",{key:k.method,class:a.normalizeClass(["w-8 h-8 flex items-center justify-center text-xs rounded-sm text-gray-800 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-white/10",{"cursor-pointer":!f(k.method,k.type,k.params,k.disableCheck),"is-active text-gray-800 bg-gray-200 dark:text-white dark:bg-white/10":k.label.startsWith("h")?a.unref(d).isActive("heading",{level:k.params.level}):k.method==="setTextAlign"?a.unref(d).isActive({textAlign:k.params}):a.unref(d).isActive(k.label)}]),onClick:x=>u(k.method,k.type,k.params)},[k.icon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(k.icon),{key:0,class:a.normalizeClass(["",{"w-3 h-3":k.smallIcon,"w-4 h-4":!k.smallIcon&&!k.largeIcon,"w-5 h-5":k.largeIcon}])},null,8,["class"])):(a.openBlock(),a.createElementBlock("span",RA,a.toDisplayString(a.unref(t1).capitalize(k.label)),1))],10,PA))),128))])]),a.createElementVNode("div",{class:"max-h-72 w-full overflow-auto px-4 py-3 rounded-b-sm",style:a.normalizeStyle({backgroundColor:(y=t.customStyles)==null?void 0:y.backgroundColor})},[a.createVNode(a.unref(J5),{editor:a.unref(d)},null,8,["editor"])],4)],2)):a.createCommentVNode("",!0)}}}),zA={},jA={viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},HA=[a.createElementVNode("rect",{x:"2",y:"2",width:"20",height:"20",rx:"7",fill:"currentColor","stroke-width":"2.5"},null,-1)];function WA(t,e){return a.openBlock(),a.createElementBlock("svg",jA,HA)}const UA=be(zA,[["render",WA]]),YA={},qA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"none"},KA=[a.createElementVNode("rect",{x:"2",y:"2",width:"20",height:"20",rx:"7",fill:"none",stroke:"currentColor","stroke-width":"3"},null,-1)];function GA(t,e){return a.openBlock(),a.createElementBlock("svg",qA,KA)}const JA=be(YA,[["render",GA]]),ZA={},XA={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},QA=[a.createElementVNode("rect",{x:"2",y:"2",width:"20",height:"20",rx:"7",fill:"none",stroke:"currentColor","stroke-width":"3"},null,-1),a.createElementVNode("line",{x1:"7.5",y1:"2",x2:"22",y2:"16",stroke:"currentColor",class:"opacity-75","stroke-width":"2.5"},null,-1),a.createElementVNode("line",{x1:"2",y1:"7.5",x2:"16",y2:"22",stroke:"currentColor",class:"opacity-75","stroke-width":"2.5"},null,-1)];function e3(t,e){return a.openBlock(),a.createElementBlock("svg",XA,QA)}const t3=be(ZA,[["render",e3]]),n3={class:"flex-1"},r3=Object.assign({name:"WpicBadge"},{props:{success:Boolean,warning:Boolean,error:Boolean,complete:Boolean,incomplete:Boolean,partially:Boolean,info:Boolean},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("span",{class:a.normalizeClass(["inline-flex items-center justify-center border-0 font-normal rounded-md min-h-6 gap-1 leading-none text-sm px-2",{"bg-green-100 border-green-200 text-green-700 dark:border-green-600/30 dark:bg-green-800/15 dark:text-green-500/85":t.success,"bg-yellow-100 border-yellow-200 text-yellow-700 dark:border-yellow-600/30 dark:bg-yellow-800/15 dark:text-yellow-500/85":t.warning,"bg-red-100 border-red-200 text-red-700 dark:border-red-600/30 dark:bg-red-800/15 dark:text-red-500/85":t.error,"bg-purple-100 border-purple-200 text-purple-700 dark:border-purple-600/30 dark:bg-purple-800/25 dark:text-purple-500/85":t.info,"bg-gray-100 border-gray-200 text-gray-700 dark:border-gray-600/30 dark:bg-white/5 dark:text-gray-400/85":!t.info&&!t.success&&!t.warning&&!t.error}])},[t.complete?(a.openBlock(),a.createBlock(UA,{key:0,class:"w-2.5 h-2.5"})):a.createCommentVNode("",!0),t.incomplete?(a.openBlock(),a.createBlock(JA,{key:1,class:"w-2.5 h-2.5 opacity-80"})):a.createCommentVNode("",!0),t.partially?(a.openBlock(),a.createBlock(t3,{key:2,class:"w-2.5 h-2.5 opacity-80"})):a.createCommentVNode("",!0),a.createElementVNode("span",n3,[a.renderSlot(e.$slots,"default")])],2))}}),Cc={__name:"DayItem",props:{day:{},today:Boolean,selected:Boolean,between:Boolean,firstDay:Boolean,lastDay:Boolean,off:Boolean,disabled:Boolean,highlight:Boolean},setup(t){const e={pmi:"","wpic-tools":`
143
143
  hover:text-lime-500
144
144
  rounded-full
145
145
 
@@ -152,4 +152,4 @@ img.ProseMirror-separator {
152
152
  group-[.is-off]:text-gray-300
153
153
  dark:group-[.is-off]:text-gray-800
154
154
 
155
- `},n={pmi:"","wpic-tools":"group-[.is-highlight]:bg-gray-200"},r={pmi:"","wpic-tools":"bg-gray-100 dark:bg-gray-800"},i={pmi:"","wpic-tools":"bg-gray-100 dark:bg-gray-800 rounded-l-0"},o={pmi:"","wpic-tools":"bg-gray-100 dark:bg-gray-800 rounded-r-0"},s={pmi:"","wpic-tools":"bg-gray-200"};return(l,c)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["relative flex items-center justify-center text-sm py-2 group",{"is-today":t.today&&!t.selected,"is-selected":t.selected&&!t.off,"is-off":t.off,"is-highlight":t.highlight,"cursor-pointer":!t.disabled}])},[a.createElementVNode("div",{class:a.normalizeClass(["h-8 w-full flex justify-center items-center",{[`${r[a.unref(fe).theme]}`]:t.between,[`${i[a.unref(fe).theme]}`]:t.firstDay,[`${o[a.unref(fe).theme]}`]:t.lastDay,[`${s[a.unref(fe).theme]}`]:t.highlight}]),style:a.normalizeStyle({marginLeft:t.firstDay?"50%":void 0,marginRight:t.lastDay?"50%":void 0})},[a.createElementVNode("span",{class:a.normalizeClass(["absolute w-8 h-8 flex items-center justify-center dark:text-gray-400",{[`${e[a.unref(fe).theme]}`]:!0,[`${n[a.unref(fe).theme]}`]:t.highlight&&(t.firstDay||t.lastDay)}]),style:{left:"50%",transform:"translateX(-50%)"}},[a.renderSlot(l.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(t.day),1)])],2)],6)],2))}};var xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _c={exports:{}},Cg;function Ks(){return Cg||(Cg=1,function(t,e){(function(n,r){t.exports=r()})(xi,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",s="second",l="minute",c="hour",d="day",u="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var D=["th","st","nd","rd"],C=F%100;return"["+F+(D[(C-20)%10]||D[C]||D[0])+"]"}},w=function(F,D,C){var P=String(F);return!P||P.length>=D?F:""+Array(D+1-P.length).join(C)+F},b={s:w,z:function(F){var D=-F.utcOffset(),C=Math.abs(D),P=Math.floor(C/60),R=C%60;return(D<=0?"+":"-")+w(P,2,"0")+":"+w(R,2,"0")},m:function F(D,C){if(D.date()<C.date())return-F(C,D);var P=12*(C.year()-D.year())+(C.month()-D.month()),R=D.clone().add(P,f),Q=C-R<0,ne=D.clone().add(P+(Q?-1:1),f);return+(-(P+(C-R)/(Q?R-ne:ne-R))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:p,w:u,d,D:m,h:c,m:l,s,ms:o,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},S="en",v={};v[S]=x;var O="$isDayjsObject",B=function(F){return F instanceof L||!(!F||!F[O])},A=function F(D,C,P){var R;if(!D)return S;if(typeof D=="string"){var Q=D.toLowerCase();v[Q]&&(R=Q),C&&(v[Q]=C,R=Q);var ne=D.split("-");if(!R&&ne.length>1)return F(ne[0])}else{var he=D.name;v[he]=D,R=he}return!P&&R&&(S=R),R||!P&&S},V=function(F,D){if(B(F))return F.clone();var C=typeof D=="object"?D:{};return C.date=F,C.args=arguments,new L(C)},$=b;$.l=A,$.i=B,$.w=function(F,D){return V(F,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var L=function(){function F(C){this.$L=A(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[O]=!0}var D=F.prototype;return D.parse=function(C){this.$d=function(P){var R=P.date,Q=P.utc;if(R===null)return new Date(NaN);if($.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var ne=R.match(y);if(ne){var he=ne[2]-1||0,ue=(ne[7]||"0").substring(0,3);return Q?new Date(Date.UTC(ne[1],he,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,ue)):new Date(ne[1],he,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,ue)}}return new Date(R)}(C),this.init()},D.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},D.$utils=function(){return $},D.isValid=function(){return this.$d.toString()!==g},D.isSame=function(C,P){var R=V(C);return this.startOf(P)<=R&&R<=this.endOf(P)},D.isAfter=function(C,P){return V(C)<this.startOf(P)},D.isBefore=function(C,P){return this.endOf(P)<V(C)},D.$g=function(C,P,R){return $.u(C)?this[P]:this.set(R,C)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(C,P){var R=this,Q=!!$.u(P)||P,ne=$.p(C),he=function(ae,we){var Ne=$.w(R.$u?Date.UTC(R.$y,we,ae):new Date(R.$y,we,ae),R);return Q?Ne:Ne.endOf(d)},ue=function(ae,we){return $.w(R.toDate()[ae].apply(R.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(we)),R)},I=this.$W,W=this.$M,K=this.$D,q="set"+(this.$u?"UTC":"");switch(ne){case p:return Q?he(1,0):he(31,11);case f:return Q?he(1,W):he(0,W+1);case u:var H=this.$locale().weekStart||0,ce=(I<H?I+7:I)-H;return he(Q?K-ce:K+(6-ce),W);case d:case m:return ue(q+"Hours",0);case c:return ue(q+"Minutes",1);case l:return ue(q+"Seconds",2);case s:return ue(q+"Milliseconds",3);default:return this.clone()}},D.endOf=function(C){return this.startOf(C,!1)},D.$set=function(C,P){var R,Q=$.p(C),ne="set"+(this.$u?"UTC":""),he=(R={},R[d]=ne+"Date",R[m]=ne+"Date",R[f]=ne+"Month",R[p]=ne+"FullYear",R[c]=ne+"Hours",R[l]=ne+"Minutes",R[s]=ne+"Seconds",R[o]=ne+"Milliseconds",R)[Q],ue=Q===d?this.$D+(P-this.$W):P;if(Q===f||Q===p){var I=this.clone().set(m,1);I.$d[he](ue),I.init(),this.$d=I.set(m,Math.min(this.$D,I.daysInMonth())).$d}else he&&this.$d[he](ue);return this.init(),this},D.set=function(C,P){return this.clone().$set(C,P)},D.get=function(C){return this[$.p(C)]()},D.add=function(C,P){var R,Q=this;C=Number(C);var ne=$.p(P),he=function(W){var K=V(Q);return $.w(K.date(K.date()+Math.round(W*C)),Q)};if(ne===f)return this.set(f,this.$M+C);if(ne===p)return this.set(p,this.$y+C);if(ne===d)return he(1);if(ne===u)return he(7);var ue=(R={},R[l]=r,R[c]=i,R[s]=n,R)[ne]||1,I=this.$d.getTime()+C*ue;return $.w(I,this)},D.subtract=function(C,P){return this.add(-1*C,P)},D.format=function(C){var P=this,R=this.$locale();if(!this.isValid())return R.invalidDate||g;var Q=C||"YYYY-MM-DDTHH:mm:ssZ",ne=$.z(this),he=this.$H,ue=this.$m,I=this.$M,W=R.weekdays,K=R.months,q=R.meridiem,H=function(we,Ne,Ie,tt){return we&&(we[Ne]||we(P,Q))||Ie[Ne].slice(0,tt)},ce=function(we){return $.s(he%12||12,we,"0")},ae=q||function(we,Ne,Ie){var tt=we<12?"AM":"PM";return Ie?tt.toLowerCase():tt};return Q.replace(k,function(we,Ne){return Ne||function(Ie){switch(Ie){case"YY":return String(P.$y).slice(-2);case"YYYY":return $.s(P.$y,4,"0");case"M":return I+1;case"MM":return $.s(I+1,2,"0");case"MMM":return H(R.monthsShort,I,K,3);case"MMMM":return H(K,I);case"D":return P.$D;case"DD":return $.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return H(R.weekdaysMin,P.$W,W,2);case"ddd":return H(R.weekdaysShort,P.$W,W,3);case"dddd":return W[P.$W];case"H":return String(he);case"HH":return $.s(he,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return ae(he,ue,!0);case"A":return ae(he,ue,!1);case"m":return String(ue);case"mm":return $.s(ue,2,"0");case"s":return String(P.$s);case"ss":return $.s(P.$s,2,"0");case"SSS":return $.s(P.$ms,3,"0");case"Z":return ne}return null}(we)||ne.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(C,P,R){var Q,ne=this,he=$.p(P),ue=V(C),I=(ue.utcOffset()-this.utcOffset())*r,W=this-ue,K=function(){return $.m(ne,ue)};switch(he){case p:Q=K()/12;break;case f:Q=K();break;case h:Q=K()/3;break;case u:Q=(W-I)/6048e5;break;case d:Q=(W-I)/864e5;break;case c:Q=W/i;break;case l:Q=W/r;break;case s:Q=W/n;break;default:Q=W}return R?Q:$.a(Q)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return v[this.$L]},D.locale=function(C,P){if(!C)return this.$L;var R=this.clone(),Q=A(C,P,!0);return Q&&(R.$L=Q),R},D.clone=function(){return $.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},F}(),j=L.prototype;return V.prototype=j,[["$ms",o],["$s",s],["$m",l],["$H",c],["$W",d],["$M",f],["$y",p],["$D",m]].forEach(function(F){j[F[1]]=function(D){return this.$g(D,F[0],F[1])}}),V.extend=function(F,D){return F.$i||(F(D,L,V),F.$i=!0),V},V.locale=A,V.isDayjs=B,V.unix=function(F){return V(1e3*F)},V.en=v[S],V.Ls=v,V.p={},V})}(_c)),_c.exports}var i3=Ks();const G=Sc(i3);var o3={exports:{}};(function(t,e){(function(n,r){t.exports=r(Ks())})(xi,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=r(n),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var c=100*s+l;return c<600?"凌晨":c<900?"早上":c<1100?"上午":c<1300?"中午":c<1800?"下午":"晚上"}};return i.default.locale(o,null,!0),o})})(o3);var s3={exports:{}};(function(t,e){(function(n,r){t.exports=r(Ks())})(xi,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=r(n),o={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s){return s+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(s){return s<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return i.default.locale(o,null,!0),o})})(s3);var l3={exports:{}};(function(t,e){(function(n,r){t.exports=r(Ks())})(xi,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=r(n),o={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(s){return s+"일"},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(s){return s<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return i.default.locale(o,null,!0),o})})(l3);var Sg={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(xi,function(){var n="week",r="year";return function(i,o,s){var l=o.prototype;l.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=s(this).startOf(r).add(1,r).date(d),f=s(this).endOf(n);if(u.isBefore(f))return 1}var h=s(this).startOf(r).date(d).startOf(n).subtract(1,"millisecond"),p=this.diff(h,n,!0);return p<0?s(this).startOf("week").week():Math.ceil(p)},l.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(Sg);var a3=Sg.exports;const c3=Sc(a3);var _g={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(xi,function(){return function(n,r,i){r.prototype.isBetween=function(o,s,l,c){var d=i(o),u=i(s),f=(c=c||"()")[0]==="(",h=c[1]===")";return(f?this.isAfter(d,l):!this.isBefore(d,l))&&(h?this.isBefore(u,l):!this.isAfter(u,l))||(f?this.isBefore(d,l):!this.isAfter(d,l))&&(h?this.isAfter(u,l):!this.isBefore(u,l))}}})})(_g);var d3=_g.exports;const u3=Sc(d3),f3={class:"w-full dark:text-gray-400"},h3={class:"flex justify-between items-center mb-3"},p3={class:"flex"},m3={class:"font-medium flex items-center gap-2"},g3=["value","onChange"],y3=["value"],b3=["value","onChange"],k3=["value"],w3={class:"flex"},v3={class:"grid grid-cols-7 border-b dark:border-gray-800 mb-2 pb-2"},Oc=Object.assign({name:"WpicCalendar"},{props:{modelValue:{},range:Boolean,doubleMonths:Boolean,displayYearStart:Number,displayMonthStart:Number,displayYearEnd:Number,displayMonthEnd:Number,maxDate:{},minDate:{},week:Boolean,initDates:{},defaultMinYear:{type:Number,default:2019},defaultMaxYear:{type:Number,default:G().year()+10}},emits:["update:modelValue"],setup(t,{emit:e}){const{locale:n}=zn();G.extend(u3),G.extend(c3);const r=t,i=a.computed(()=>Array.from({length:7},(W,K)=>G().day((1+K)%7).locale(n.value).format("ddd"))),o=a.ref([G(new Date).subtract(1,"month"),G(new Date)]);a.watch(()=>r.initDates,()=>{var I;if(!r.range&&r.initDates)o.value[0]=G(r.initDates);else if(!r.range&&!r.initDates)o.value[0]=G(new Date);else if(r.range&&((I=r.initDates)==null?void 0:I.length)===2){let W=G(r.initDates[0]),K=G(r.initDates[1]);K.isBefore(W,"month")&&(K=W.add(1,"month")),W.isSame(K,"month")&&(K=W.add(1,"month")),o.value=[W,K]}},{immediate:!0,once:!0}),a.watch(()=>[r.displayYearStart,r.displayMonthStart],([I,W])=>{I&&W&&(o.value[0]=G().year(Number(I)).month(Number(W)).startOf("month"),o.value[1]=G().year(Number(I)).month(Number(W)).startOf("month").add(1,"month"))},{immediate:!0}),a.watch(()=>[r.displayYearEnd,r.displayMonthEnd],([I,W])=>{if(I&&W){const K=o.value[0],q=G().year(Number(I)).month(Number(W)).startOf("month");q.isAfter(K,"month")&&(o.value[1]=q)}},{immediate:!0});const s=e,l=a.computed(()=>r.doubleMonths||r.range?[0,1]:[0]);function c(I){if(r.week)s("update:modelValue",[G(I).startOf("week"),G(I).endOf("week")]);else if(r.range){const W=r.modelValue.filter(K=>K).length;if(W==0)s("update:modelValue",[I]);else if(W==2)s("update:modelValue",[I]);else if(W==1){let K=[G(r.modelValue[0]),G(I)];K=K.sort((q,H)=>q-H),s("update:modelValue",K)}}else s("update:modelValue",G(I))}function d(I){const W=G(I).daysInMonth(),K=[],q=G(I).startOf("month");for(let H=1;H<=W;H++){let ce=q.clone().date(H);K.push(ce)}return K}function u(I){return G(I).startOf("month").day()}function f(I,W){const K=G(`${I}-${W}-01`,"YYYY-MM-DD"),H=K.day(),ce=[];for(let ae=0;ae<H;ae++)ce.push(K.clone().subtract(H-ae,"days"));return ce}function h(I,W){const K=G(`${I}-${W}`,"YYYY-MM").endOf("month"),H=6-K.day(),ce=[];for(let ae=1;ae<=H;ae++)ce.push(K.clone().add(ae,"days"));return ce}function p(I){const W=G();return G(I).isSame(W,"day")}function m(I){var W,K;if(r.range){if(((W=r.modelValue)==null?void 0:W.length)==1)return G(I).isSame(G(r.modelValue[0]),"day");if(((K=r.modelValue)==null?void 0:K.length)==2)return G(I).isSame(G(r.modelValue[0]),"day")||G(I).isSame(G(r.modelValue[1]),"day")}else if(r.modelValue)return G(I).isSame(G(r.modelValue),"day")}function g(I){var W;if(r.range&&((W=r.modelValue)==null?void 0:W.length)==2)return G(I).isBetween(G(r.modelValue[0]),G(r.modelValue[1]))}function y(I){var W;if(r.range&&((W=r.modelValue)==null?void 0:W.length)==2)return G(I).isSame(G(r.modelValue[0]),"day")}function k(I){var W;if(r.range&&((W=r.modelValue)==null?void 0:W.length)==2)return G(I).isSame(G(r.modelValue[1]),"day")}function x(I){try{return r.minDate?G(I).isBefore(G(r.minDate)):!1}catch(W){return console.log(W),!1}}function w(I){try{return r.maxDate?G(I).isAfter(G(r.maxDate)):!1}catch(W){return console.log(W),!1}}function b(I){L(I,o.value[I].subtract(1,"month"))}function S(I){L(I,o.value[I].add(1,"month"))}function v(I){L(I,o.value[I].subtract(1,"year"))}function O(I){L(I,o.value[I].add(1,"year"))}const B=I=>l.value.length===1||I===0?!0:o.value[I].subtract(1,"month").isAfter(o.value[0],"month"),A=I=>l.value.length===1||I===1?!0:o.value[I].add(1,"month").isBefore(o.value[1],"month"),V=I=>l.value.length===1||I===0?!0:o.value[I].subtract(1,"year").isAfter(o.value[0],"year"),$=I=>l.value.length===1||I===1?!0:o.value[I].add(1,"year").isBefore(o.value[1],"year");function L(I,W){if(I===0){if(!l.value.length===1&&!W.isBefore(o.value[1],"month"))return;o.value=[W,o.value[1]]}else{if(!l.value.length===1&&!W.isAfter(o.value[0],"month"))return;(W.isBefore(o.value[0],"month")||W.isSame(o.value[0],"month"))&&(W=o.value[0].add(1,"month")),o.value=[o.value[0],W]}}const j=a.ref();function F(I){r.week&&(j.value=G(I).week())}function D(I){return G(I).week()===j.value}function C(I){return G(I).week()===j.value?G(I).format("YYYY-MM-DD")===G().week(j.value).startOf("week").format("YYYY-MM-DD"):!1}function P(I){return G(I).week()===j.value?G(I).format("YYYY-MM-DD")===G().week(j.value).endOf("week").format("YYYY-MM-DD"):!1}function R(){j.value=null}function Q(I,W){const K=o.value[I].year(Number(W));L(I,K)}function ne(I,W){const K=o.value[I].month(Number(W));L(I,K)}const he=a.computed(()=>{const I=r.defaultMinYear,W=r.defaultMaxYear,K=[];for(let q=I;q<=W;q++)K.push(q);return K}),ue=a.computed(()=>Array.from({length:12},(I,W)=>G().month(W).locale(n.value).format("MMMM")));return(I,W)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["shrink-0 flex gap-6",{"min-w-96":l.value.length===1,"min-w-192":l.value.length===2}])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.value,K=>{var q;return a.openBlock(),a.createElementBlock("div",f3,[a.createElementVNode("div",h3,[a.createElementVNode("div",p3,[a.createVNode(Af,{class:a.normalizeClass(["w-5 h-5 cursor-pointer select-none",{"opacity-25 cursor-not-allowed":!V(K),"hover:opacity-100":V(K)}]),onClick:H=>V(K)?v(K):null},null,8,["class","onClick"]),a.createVNode(Df,{class:a.normalizeClass(["w-5 h-5 cursor-pointer select-none",{"opacity-25 cursor-not-allowed":!B(K),"hover:opacity-100":B(K)}]),onClick:H=>B(K)?b(K):null},null,8,["class","onClick"])]),a.createElementVNode("div",m3,[a.createElementVNode("select",{value:o.value[K].format("YYYY"),onChange:H=>Q(K,H.target.value),class:"bg-none appearance-none outline-hidden cursor-pointer"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(he.value,H=>(a.openBlock(),a.createElementBlock("option",{key:H,value:H},a.toDisplayString(H),9,y3))),128))],40,g3),a.createElementVNode("select",{value:o.value[K].month(),onChange:H=>ne(K,H.target.value),class:"bg-none appearance-none outline-hidden cursor-pointer"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ue.value,(H,ce)=>(a.openBlock(),a.createElementBlock("option",{key:ce,value:ce},a.toDisplayString(H),9,k3))),128))],40,b3)]),a.createElementVNode("div",w3,[a.createVNode(Bf,{class:a.normalizeClass(["w-5 h-5 cursor-pointer select-none",{"opacity-25 cursor-not-allowed":!A(K),"hover:opacity-100":A(K)}]),onClick:H=>A(K)?S(K):null},null,8,["class","onClick"]),a.createVNode(Lf,{class:a.normalizeClass(["w-5 h-5 cursor-pointer select-none",{"opacity-25 cursor-not-allowed":!$(K),"hover:opacity-100":$(K)}]),onClick:H=>$(K)?O(K):null},null,8,["class","onClick"])])]),a.createElementVNode("div",v3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,(H,ce)=>(a.openBlock(),a.createElementBlock("div",{key:ce,class:"flex justify-center text-sm"},a.toDisplayString(H),1))),128))]),a.createElementVNode("div",{class:"grid grid-cols-7",onMouseout:R},[u(o.value[K])>0?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(f(a.unref(G)(o.value[K]).year(),a.unref(G)(o.value[K]).month()+1),H=>(a.openBlock(),a.createBlock(Cc,{onClick:ce=>!w(H)&&!x(H)?c(H):null,off:""},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(G)(H).format("D")),1)]),_:2},1032,["onClick"]))),256)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d(o.value[K].clone()),H=>(a.openBlock(),a.createBlock(Cc,{onMouseover:ce=>F(H),onClick:ce=>!w(H)&&!x(H)?c(H):null,today:p(H),selected:m(H),firstDay:y(H)||C(H),lastDay:k(H)||P(H),between:g(H),disabled:w(H)||x(H),off:w(H)||x(H),highlight:D(H)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(G)(H).format("D")),1)]),_:2},1032,["onMouseover","onClick","today","selected","firstDay","lastDay","between","disabled","off","highlight"]))),256)),((q=h(a.unref(G)(o.value[K]).year(),a.unref(G)(o.value[K]).month()+1))==null?void 0:q.length)>0?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(h(a.unref(G)(o.value[K]).year(),a.unref(G)(o.value[K]).month()+1),H=>(a.openBlock(),a.createBlock(Cc,{onClick:ce=>!w(H)&&!x(H)?c(H):null,off:""},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(G)(H).format("D")),1)]),_:2},1032,["onClick"]))),256)):a.createCommentVNode("",!0)],32)])}),256))],2))}}),x3={},E3={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},C3=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 2.994v2.25m10.5-2.25v2.25m-14.252 13.5V7.491a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v11.251m-18 0a2.25 2.25 0 0 0 2.25 2.25h13.5a2.25 2.25 0 0 0 2.25-2.25m-18 0v-7.5a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v7.5m-6.75-6h2.25m-9 2.25h4.5m.002-2.25h.005v.006H12v-.006Zm-.001 4.5h.006v.006h-.006v-.005Zm-2.25.001h.005v.006H9.75v-.006Zm-2.25 0h.005v.005h-.006v-.005Zm6.75-2.247h.005v.005h-.005v-.005Zm0 2.247h.006v.006h-.006v-.006Zm2.25-2.248h.006V15H16.5v-.005Z"},null,-1)];function S3(t,e){return a.openBlock(),a.createElementBlock("svg",E3,C3)}const Og=be(x3,[["render",S3]]),_3={},O3={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},T3=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"},null,-1)];function N3(t,e){return a.openBlock(),a.createElementBlock("svg",O3,T3)}const Tg=be(_3,[["render",N3]]),M3={class:"flex gap-3"},A3={key:0,class:"w-32 py-2 border-r dark:border-gray-800 flex flex-col gap-3 shrink-0"},D3=["onClick"],L3=Object.assign({name:"WpicDateField"},{props:{modelValue:{},label:String,placeholder:{type:String,default:"Select date"},week:Boolean,range:Boolean,disabled:Boolean,large:Boolean,info:String,doubleMonths:Boolean,clearable:Boolean,minDate:{},maxDate:{},initDates:{},shortcuts:Boolean,slim:Boolean,required:Boolean,hideRequired:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const{t:n}=zn(),r=t,i=a.computed(()=>r.placeholder==="Select date"?n("wpiccomponents.select_date"):r.placeholder),o=e;function s(d){o("update:modelValue",d)}const l=a.computed(()=>{var d;if(r.range)return(d=r.modelValue)==null?void 0:d.map(u=>G(u).format("YYYY-MM-DD")).join(" to ");if(r.modelValue)return G(r.modelValue).format("YYYY-MM-DD")}),c=a.reactive([{text:a.computed(()=>n("wpiccomponents.month_to_date")),onClick(d){const u=G().subtract(1,"day"),f=G().startOf("month");o("update:modelValue",[f,u])}},{text:a.computed(()=>n("wpiccomponents.last_month")),onClick(d){const u=G().startOf("month").subtract(1,"month"),f=G(u).endOf("month");o("update:modelValue",[u,f])}},{text:a.computed(()=>n("wpiccomponents.year_to_date")),onClick(d){const u=G().subtract(1,"day"),f=G().startOf("year");o("update:modelValue",[f,u])}}]);return(d,u)=>(a.openBlock(),a.createBlock(fr,{disabled:t.disabled,maxWidth:"1280px"},{content:a.withCtx(()=>[a.createElementVNode("div",M3,[t.shortcuts?(a.openBlock(),a.createElementBlock("div",A3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c,f=>(a.openBlock(),a.createElementBlock("div",{class:"opacity-50 hover:opacity-100 dark:text-gray-300 cursor-pointer",onClick:h=>f.onClick()},a.toDisplayString(f.text),9,D3))),256))])):a.createCommentVNode("",!0),a.createVNode(Oc,{doubleMonths:t.doubleMonths,initDates:t.initDates,week:t.week,"min-date":t.minDate,"max-date":t.maxDate,modelValue:t.modelValue,"onUpdate:modelValue":s,range:t.range},null,8,["doubleMonths","initDates","week","min-date","max-date","modelValue","range"])])]),default:a.withCtx(()=>{var f;return[a.createVNode(zi,{label:t.label,required:t.required,hideRequired:t.hideRequired,slim:t.slim,disabled:t.disabled,large:t.large,info:t.info,clearable:!!(t.clearable&&((f=l.value)!=null&&f.length)),onOnClear:u[0]||(u[0]=h=>s(null))},{prepend:a.withCtx(()=>[t.range?(a.openBlock(),a.createBlock(Og,{key:0,class:"dark:text-gray-400"})):(a.openBlock(),a.createBlock(Tg,{key:1,class:"dark:text-gray-400"}))]),default:a.withCtx(()=>[a.createTextVNode(" "+a.toDisplayString(l.value||i.value),1)]),_:1},8,["label","required","hideRequired","slim","disabled","large","info","clearable"])]}),_:1},8,["disabled"]))}}),B3={class:"relative inline-block tabular-nums"},$3=["value","placeholder","maxlength"],Tc={__name:"DateSegment",props:{modelValue:String,placeholder:String,segment:{type:String,default:"monthOrDay"},disabled:Boolean},emits:["update:modelValue","blur"],setup(t,{emit:e}){const n=t,r=e,i=a.ref(null),o=a.computed(()=>n.segment==="year"?4:2);function s(c){const d=c.target.value.replace(/\D/g,"");r("update:modelValue",d.slice(0,o.value)),d.length>=o.value&&n.nextRef&&a.nextTick(()=>{n.nextRef.focus()})}function l(){r("blur")}return(c,d)=>(a.openBlock(),a.createElementBlock("div",B3,[a.createElementVNode("input",{ref_key:"inputRef",ref:i,type:"text",value:t.modelValue,onInput:s,onKeydown:d[0]||(d[0]=(...u)=>c.onKeydown&&c.onKeydown(...u)),onBlur:l,placeholder:t.placeholder,class:a.normalizeClass(["date-segment bg-transparent text-gray-900 dark:text-gray-400 focus:outline-none border-b border-transparent focus:border-gray-800 dark:focus:border-gray-300 transition-all duration-200 ease-in-out hover:bg-gray-50 dark:hover:bg-gray-800 focus:bg-white dark:focus:bg-gray-900 placeholder:opacity-25 placeholder:tracking-wider placeholder:pl-1",{"w-[4ch]":o.value===4,"w-[2ch]":o.value===2}]),inputmode:"numeric",pattern:"\\d*",maxlength:o.value},null,42,$3)]))}},I3={class:"flex items-center gap-0"},V3=a.createElementVNode("span",{class:"px-px text-gray-400 dark:text-gray-700"},"/",-1),P3=a.createElementVNode("span",{class:"px-px text-gray-400 dark:text-gray-600"},"/",-1),Nc={__name:"DateInput",props:{modelValue:String,disabled:Boolean},emits:["update:modelValue","update:initDates","update:displayYear","update:displayMonth"],setup(t,{emit:e}){const n=t,r=e,i=a.ref(""),o=a.ref(""),s=a.ref(""),l=a.ref(null),c=a.ref(null),d=a.ref(null);a.watch(()=>n.modelValue,k=>{n.range?Array.isArray(k)&&k.length===2?(yearStart.value=k[0]?G(k[0]).format("YYYY"):"",monthStart.value=k[0]?G(k[0]).format("MM"):"",dayStart.value=k[0]?G(k[0]).format("DD"):"",yearEnd.value=k[1]?G(k[1]).format("YYYY"):"",monthEnd.value=k[1]?G(k[1]).format("MM"):"",dayEnd.value=k[1]?G(k[1]).format("DD"):""):(yearStart.value=monthStart.value=dayStart.value="",yearEnd.value=monthEnd.value=dayEnd.value=""):k?(i.value=G(k).format("YYYY"),o.value=G(k).format("MM"),s.value=G(k).format("DD")):i.value=o.value=s.value=""},{immediate:!0});function u(){i.value.length===4&&o.value.length===2&&s.value.length===2&&r("update:modelValue",`${i.value}-${o.value}-${s.value}`)}function f(k){k.length===4&&r("update:displayYear",Number(k)),u()}function h(k){k.length===2&&r("update:displayMonth",Number(k)-1),u()}function p(k){s.value=k,u()}function m(){i.value||(i.value=G().format("YYYY")),u()}function g(){o.value||(o.value=G().format("MM")),u()}function y(){s.value||(s.value=G().format("DD")),u()}return(k,x)=>(a.openBlock(),a.createElementBlock("div",I3,[a.createVNode(Tc,{modelValue:i.value,"onUpdate:modelValue":[x[0]||(x[0]=w=>i.value=w),f],segment:"year",disabled:t.disabled,placeholder:"••••",onBlur:m,ref_key:"yearRef",ref:l},null,8,["modelValue","disabled"]),V3,a.createVNode(Tc,{modelValue:o.value,"onUpdate:modelValue":[x[1]||(x[1]=w=>o.value=w),h],segment:"monthOrDay",disabled:t.disabled,placeholder:"••",onBlur:g,ref_key:"monthRef",ref:c},null,8,["modelValue","disabled"]),P3,a.createVNode(Tc,{modelValue:s.value,"onUpdate:modelValue":[x[2]||(x[2]=w=>s.value=w),p],segment:"monthOrDay",disabled:t.disabled,placeholder:"••",onBlur:y,ref_key:"dayRef",ref:d},null,8,["modelValue","disabled"])]))}},R3={class:"tabular-nums"},F3={key:1,class:"flex items-center"},z3=a.createElementVNode("span",{class:"px-1 text-gray-400 dark:text-gray-600"},"➞",-1),j3={class:"flex gap-3"},H3={key:0,class:"w-32 py-2 border-r dark:border-gray-800 flex flex-col gap-3 shrink-0"},W3=["onClick"],U3=Object.assign({name:"WpicAdvDateField"},{props:{modelValue:{},label:String,placeholder:{type:String,default:"Select date"},week:Boolean,range:Boolean,disabled:Boolean,large:Boolean,info:String,doubleMonths:Boolean,clearable:Boolean,minDate:{},maxDate:{},initDates:{},shortcuts:Boolean,slim:Boolean,required:Boolean,hideRequired:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const{t:n}=zn(),r=t,i=e,o=a.computed(()=>r.placeholder==="Select date"?n("wpiccomponents.select_date"):r.placeholder);a.ref(!1);const s=a.ref(G().year()),l=a.ref(G().month()),c=a.ref(null),d=a.ref(null);function u(){i("update:modelValue",null)}a.watch(()=>r.initDates,m=>{var g;r.range&&((g=r.initDates)==null?void 0:g.length)==2?(s.value=G(r.initDates[0]).year(),l.value=G(r.initDates[0]).month(),c.value=G(r.initDates[1]).year(),d.value=G(r.initDates[1]).month()):r.initDates&&(s.value=G(r.initDates).year(),l.value=G(r.initDates).month())},{immediate:!0});const f=a.ref(r.range?[]:"");a.watch(()=>r.modelValue,m=>{if(r.range){const g=m!=null&&m[0]?G(m[0]).format("YYYY-MM-DD"):"",y=m!=null&&m[1]?G(m[1]).format("YYYY-MM-DD"):"";(f.value[0]!==g||f.value[1]!==y)&&(f.value=[g,y])}else{const g=m?G(m).format("YYYY-MM-DD"):"";f.value!==g&&(f.value=g)}},{immediate:!0}),a.watch(()=>f.value,m=>{var g,y;if(r.range){const k=m[0]&&m[0].length===10?G(m[0]).toDate():null,x=m[1]&&m[1].length===10?G(m[1]).toDate():null;(!((g=r.modelValue)!=null&&g[0])||r.modelValue[0]!==k||!((y=r.modelValue)!=null&&y[1])||r.modelValue[1]!==x)&&i("update:modelValue",[k,x])}else if(m&&m.length===10){const k=G(m,"YYYY-MM-DD",!0);k.isValid()&&r.modelValue!==k.toDate()&&i("update:modelValue",k.toDate())}},{deep:!0});function h(m){i("update:modelValue",m)}const p=a.reactive([{text:a.computed(()=>n("wpiccomponents.month_to_date")),onClick(m){const g=G().subtract(1,"day"),y=G().startOf("month");i("update:modelValue",[y,g])}},{text:a.computed(()=>n("wpiccomponents.last_month")),onClick(m){const g=G().startOf("month").subtract(1,"month"),y=G(g).endOf("month");i("update:modelValue",[g,y])}},{text:a.computed(()=>n("wpiccomponents.year_to_date")),onClick(m){const g=G().subtract(1,"day"),y=G().startOf("year");i("update:modelValue",[y,g])}}]);return(m,g)=>(a.openBlock(),a.createBlock(fr,{disabled:t.disabled,maxWidth:"1280px",noCloseClasses:["date-segment"]},{content:a.withCtx(()=>[a.createElementVNode("div",j3,[t.shortcuts?(a.openBlock(),a.createElementBlock("div",H3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p,y=>(a.openBlock(),a.createElementBlock("div",{class:"opacity-50 hover:opacity-100 dark:text-gray-300 cursor-pointer",onClick:k=>y.onClick()},a.toDisplayString(y.text),9,W3))),256))])):a.createCommentVNode("",!0),a.createVNode(Oc,{doubleMonths:t.doubleMonths,displayYearStart:s.value,displayMonthStart:l.value,displayYearEnd:c.value,displayMonthEnd:d.value,shortcuts:t.shortcuts,week:t.week,"min-date":t.minDate,"max-date":t.maxDate,modelValue:r.range?[...f.value]:f.value,"onUpdate:modelValue":h,range:t.range},null,8,["doubleMonths","displayYearStart","displayMonthStart","displayYearEnd","displayMonthEnd","shortcuts","week","min-date","max-date","modelValue","range"])])]),default:a.withCtx(()=>[a.createVNode(zi,{label:t.label,required:t.required,hideRequired:t.hideRequired,slim:t.slim,disabled:t.disabled,large:t.large,info:t.info,clearable:t.clearable&&!!t.modelValue,onOnClear:u},{prepend:a.withCtx(()=>[t.range?(a.openBlock(),a.createBlock(Og,{key:0,class:"dark:text-gray-400"})):(a.openBlock(),a.createBlock(Tg,{key:1,class:"dark:text-gray-400"}))]),default:a.withCtx(()=>[a.createElementVNode("div",R3,[t.range?t.range?(a.openBlock(),a.createElementBlock("div",F3,[a.createVNode(Nc,{modelValue:f.value[0],"onUpdate:modelValue":g[3]||(g[3]=y=>f.value[0]=y),disabled:t.disabled,"onUpdate:displayYear":g[4]||(g[4]=y=>s.value=y),"onUpdate:displayMonth":g[5]||(g[5]=y=>l.value=y)},null,8,["modelValue","disabled"]),z3,a.createVNode(Nc,{modelValue:f.value[1],"onUpdate:modelValue":g[6]||(g[6]=y=>f.value[1]=y),disabled:t.disabled,"onUpdate:displayYear":g[7]||(g[7]=y=>{c.value=y}),"onUpdate:displayMonth":g[8]||(g[8]=y=>{d.value=y})},null,8,["modelValue","disabled"])])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode(a.toDisplayString(o.value),1)],64)):(a.openBlock(),a.createBlock(Nc,{key:0,modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=y=>f.value=y),disabled:t.disabled,"onUpdate:displayYear":g[1]||(g[1]=y=>s.value=y),"onUpdate:displayMonth":g[2]||(g[2]=y=>l.value=y)},null,8,["modelValue","disabled"]))])]),_:1},8,["label","required","hideRequired","slim","disabled","large","info","clearable"])]),_:1},8,["disabled"]))}}),Y3=Object.assign({name:"WpicSlidePanel"},{props:{visible:{type:Boolean,default:!1},backgroundColor:{type:String,default:"bg-white"},options:{type:Object,default:()=>({width:"w-96",mr:"mr-0",zIndex:"z-15"})},expand:Boolean,island:Boolean},emits:["close"],setup(t,{expose:e,emit:n}){const r={pmi:"dark:bg-zinc-800","wpic-tools":"dark:bg-gray-940"},i=n;function o(){i("close")}e({goBottom:c,goTop:l});const s=a.ref(null);function l(){s.value.scrollTop=0}function c(){s.value.scrollTop=s.value.scrollHeight}return(d,u)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["fixed inset-0 h-full flex justify-end bg-black/10 dark:bg-black/50 backdrop-blur-md transition-opacity",{"p-4":t.island,"opacity-0 pointer-events-none":!t.visible,"opacity-100":t.visible,[t.options.mr]:!0,[t.options.zIndex]:!0}]),onClick:a.withModifiers(o,["self"])},[a.createElementVNode("div",{class:a.normalizeClass(["h-full transform-gpu transition-transform",{"rounded-lg":t.island,"translate-x-0":t.visible,"translate-x-full":!t.visible,[t.backgroundColor]:!0,[t.options.width]:!0,[r[a.unref(fe).theme]]:!0}])},[a.createElementVNode("div",{ref_key:"panel",ref:s,class:a.normalizeClass(["h-full overflow-y-auto",{"p-6":!t.expand}])},[a.renderSlot(d.$slots,"default")],2)],2)],2))}}),q3={class:"absolute inset-0 flex items-center justify-center py-12"},K3={class:"text-lg font-medium dark:text-gray-300"},G3={key:0,class:"flex justify-end px-6 pb-4"},J3=Object.assign({name:"WpicDialog"},{props:{title:String,visible:Boolean,large:Boolean,extraLarge:Boolean,smooth:Boolean,expand:Boolean,border:Boolean,high:Boolean,overflow:Boolean,blur:Boolean},emits:["close"],setup(t,{expose:e,emit:n}){const r=t,i=n;function o(){i("close")}const s=a.ref(null),l=a.ref(!1);function c(){s.value.scrollTop=0}function d(){s.value.scrollTop=s.value.scrollHeight}function u(){s.value&&r.visible&&(l.value=s.value.scrollTop+s.value.clientHeight>=s.value.scrollHeight-20)}return a.onMounted(async()=>{s.value&&(s.value.addEventListener("scroll",u),u())}),a.onBeforeUnmount(()=>{s.value&&s.value.removeEventListener("scroll",u)}),e({goBottom:d,goTop:c,isScrolledToBottom:l}),(f,h)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["",{flex:t.visible,hidden:!t.visible}])},[a.createElementVNode("div",q3,[a.createElementVNode("div",{class:a.normalizeClass(["absolute transition-opacity inset-0 bg-black/10 dark:bg-black/50 z-10",{"backdrop-blur-md":t.blur}]),onClick:o},null,2),a.createElementVNode("div",{class:a.normalizeClass(["relative flex flex-col justify-between bg-white dark:border dark:border-gray-900 dark:bg-gray-940 rounded-lg z-20 max-h-full",{"w-3/5":t.large,"w-4/5":t.extraLarge,"w-192":!t.large&&!t.extraLarge,"h-full":t.high,"overflow-hidden":!t.overflow}])},[a.createElementVNode("div",{class:a.normalizeClass(["px-6 pt-4 pb-4 flex items-center justify-between",{"border-b pb-3 dark:border-gray-900":t.border}])},[a.createElementVNode("span",K3,a.toDisplayString(t.title),1),a.createElementVNode("span",{class:"cursor-pointer",onClick:o},[a.createVNode($i,{class:"w-6 h-6"})])],2),a.createElementVNode("div",{ref_key:"panel",ref:s,class:a.normalizeClass(["flex-1 overflow-y-auto",{"p-6":!t.expand,"scroll-smooth":t.smooth}])},[a.renderSlot(f.$slots,"default")],2),f.$slots.buttons?(a.openBlock(),a.createElementBlock("div",G3,[a.renderSlot(f.$slots,"buttons")])):a.createCommentVNode("",!0)],2)])],2))}}),Z3=["onClick"],X3=Object.assign({name:"WpicTabs"},{props:{modelValue:{type:String,required:!0},pills:Boolean,contrastPills:Boolean,nowrap:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=a.ref([]),o=c=>{r("update:modelValue",c)},s=c=>{i.value.push(c)},l=a.computed(()=>n.modelValue);return a.provide("addTab",s),a.provide("modelValue",l),(c,d)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:a.normalizeClass(["wpic-tabs flex dark:border-gray-930 overflow-x-auto overflow-y-hidden",{"border-b-[1px]":!t.pills}])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,u=>(a.openBlock(),a.createElementBlock("div",{key:u.name,class:a.normalizeClass(["items-center flex leading-snug cursor-pointer px-6 -mb-[px]",{"py-2":t.pills,"border-b-[2px] py-3":!t.pills,"border-transparent":!t.pills&&u.name!=t.modelValue,"dark:border-gray-930 hover:text-gray-800 dark:hover:text-gray-400 hover:border-gray-200":u.name!=t.modelValue,"text-wpic-500 border-b-wpic-500 dark:text-wpic-600 dark:border-b-wpic-600":!t.pills&&u.name===t.modelValue,"rounded-lg":t.pills,"bg-black/5 dark:bg-white/10 text-gray-800 dark:!text-gray-300":t.pills&&u.name===t.modelValue,"bg-gray-900 dark:bg-gray-300! text-white! dark:text-gray-800!":t.pills&&t.contrastPills&&u.name===t.modelValue,"text-gray-500 dark:text-gray-500":!u.disabled,"text-gray-300 dark:text-gray-700":u.disabled}]),onClick:f=>u.disabled?null:o(u.name)},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u.labelSlot||"span"),{class:a.normalizeClass({"whitespace-nowrap text-ellipsis overflow-hidden":t.nowrap})},{default:a.withCtx(()=>[u.labelSlot?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(a.toDisplayString(u.label),1)],64))]),_:2},1032,["class"]))],10,Z3))),128))],2),a.createElementVNode("div",null,[a.renderSlot(c.$slots,"default")])],64))}}),Q3=Object.assign({name:"WpicTabPane"},{props:{label:{type:String,required:!0},name:{type:String,required:!0},noStyle:Boolean,disabled:Boolean},setup(t){const e=t,n=a.ref(!1),r=a.inject("addTab"),i=a.inject("modelValue"),o=a.useSlots();return a.onMounted(()=>{r({label:e.label,name:e.name,disabled:e.disabled,labelSlot:o.label})}),a.watch(()=>i.value,s=>{n.value=s===e.name},{immediate:!0,deep:!0}),(s,l)=>n.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["wpic-tab-pane",{"py-3 px-6":!t.noStyle}])},[a.renderSlot(s.$slots,"default")],2)):a.createCommentVNode("",!0)}}),eD={},tD={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},nD=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"},null,-1)];function rD(t,e){return a.openBlock(),a.createElementBlock("svg",tD,nD)}const iD=be(eD,[["render",rD]]),oD={},sD={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},lD=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"},null,-1)];function aD(t,e){return a.openBlock(),a.createElementBlock("svg",sD,lD)}const cD=be(oD,[["render",aD]]),dD={},uD={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},fD=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"},null,-1)];function hD(t,e){return a.openBlock(),a.createElementBlock("svg",uD,fD)}const pD=be(dD,[["render",hD]]),mD={},gD={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},yD=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"},null,-1)];function bD(t,e){return a.openBlock(),a.createElementBlock("svg",gD,yD)}const kD=be(mD,[["render",bD]]),wD={key:0,class:"w-6 opacity-50"},vD={class:"flex-1"},xD={key:0,class:"mb-2"},ED=Object.assign({name:"WpicAlert"},{props:{title:String,text:String,warning:Boolean,success:Boolean,error:Boolean,info:Boolean},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["py-3 rounded-md text-base flex gap-3 pr-6 mb-3",{"bg-iron-500/10 text-iron-900 dark:bg-iron-500/20 dark:text-iron-200/90":!t.warning&&!t.info&&!t.error&&!t.success,"bg-yellow-500/10 text-yellow-900 dark:bg-yellow-500/20 dark:text-yellow-200/90":t.warning,"bg-purple-500/10 text-purple-900 dark:bg-purple-500/20 dark:text-purple-200/90":t.info,"bg-red-500/10 text-red-900 dark:bg-red-500/20 dark:text-red-200/90":t.error,"bg-emerald-500/10 text-emerald-900 dark:bg-emerald-500/20 dark:text-emerald-200/90":t.success,"pl-4":t.warning||t.info||t.success||t.error,"pl-6":!t.warning&&!t.info&&!t.success&&!t.error}])},[t.warning||t.info||t.success||t.error?(a.openBlock(),a.createElementBlock("div",wD,[t.warning?(a.openBlock(),a.createBlock(iD,{key:0,class:"w-full aspect-square"})):t.info?(a.openBlock(),a.createBlock(cD,{key:1,class:"w-full aspect-square"})):t.success?(a.openBlock(),a.createBlock(pD,{key:2,class:"w-full aspect-square"})):t.error?(a.openBlock(),a.createBlock(kD,{key:3,class:"w-full aspect-square"})):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",vD,[t.title?(a.openBlock(),a.createElementBlock("div",xD,a.toDisplayString(t.title),1)):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(["",{"":!t.warning&&!t.info&&!t.error&&!t.success,"":t.warning,"":t.info,"":t.error,"":t.success}])},[a.renderSlot(e.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(t.text),1)])],2)])],2))}}),Mc=a.ref(!1),Ng=a.ref(""),Mg=a.ref(""),Ag=a.ref(!1),Dg=a.ref(!1),Lg=a.ref(!1);let Bg=()=>{},$g=()=>{};function Ac(){const t=({title:i,text:o,positive:s=!1,negative:l=!1,onConfirm:c,onCancel:d,blur:u=!1})=>{Ng.value=i,Mg.value=o,Ag.value=s,Dg.value=l,Lg.value=u,Bg=c||(()=>{}),$g=d||(()=>{}),Mc.value=!0},e=()=>{Mc.value=!1};return{visible:Mc,title:Ng,text:Mg,positive:Ag,negative:Dg,show:t,onConfirm:()=>{Bg(),e()},onCancel:()=>{$g(),e()},blur:Lg}}const CD={class:"bg-white dark:border dark:border-gray-900 dark:bg-gray-940 p-6 rounded-lg w-128 flex flex-col"},SD={class:"text-lg font-semibold mb-6"},_D={class:"mb-12"},OD={class:"flex justify-end"},Dc={WpicColorPicker:Tf,WpicAlert:ED,WpicToggleSwitch:_f,WpicAdvDateField:U3,WpicCalendar:Oc,WpicTextarea:Of,WpicDialog:J3,WpicSlidePanel:Y3,WpicDateField:L3,WpicFormInput:zi,WpicButton:Ni,WpicBadge:r3,WpicTextEditor:FA,WpicInputGroup:fy,WpicButtonGroup:ay,WpicForm:hy,WpicFormField:Nf,WpicSpinner:Fr,WpicTooltip:Mf,WpicPopover:fr,WpicChoiceList:Sf,WpicCard:gx,WpicCardSection:kx,WpicProgressBar:xx,WpicTag:Cx,WpicTagGroup:Sx,WpicPagination:Zx,WpicLoadingPanel:Nx,WpicTable:ME,WpicTableColumn:AE,WpicTabs:X3,WpicTabPane:Q3,WpicConfirm:be(Object.assign({name:"WpicConfirm"},{setup(t){const{visible:e,title:n,text:r,positive:i,negative:o,onConfirm:s,onCancel:l,blur:c}=Ac();return(d,u)=>a.unref(e)?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["z-40 fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black/10 dark:bg-black/50 transition-opacity",{"backdrop-blur-md":a.unref(c)}])},[a.createElementVNode("div",CD,[a.createElementVNode("div",SD,a.toDisplayString(a.unref(n)),1),a.createElementVNode("div",_D,a.toDisplayString(a.unref(r)),1),a.createElementVNode("div",OD,[a.createVNode(Ni,{onClick:a.unref(l)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(d.$t("wpiccomponents.cancel")),1)]),_:1},8,["onClick"]),a.createVNode(Ni,{primary:a.unref(i),destructive:a.unref(o),onClick:a.unref(s)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(d.$t("wpiccomponents.confirm")),1)]),_:1},8,["primary","destructive","onClick"])])])],2)):a.createCommentVNode("",!0)}}),[["__scopeId","data-v-e79ca400"]])};function Ig(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(typeof e[n]=="object"&&t[n]?Ig(t[n],e[n]):t[n]=e[n])}const TD={useConfirm:Ac};function ND(t,e){Ig(fe,e);for(const n in Dc)if(Dc.hasOwnProperty(n)){const r=Dc[n];t.component(r.name,r)}}const MD={install:ND,composables:TD,options:fe};ct.default=MD,ct.useConfirm=Ac,Object.defineProperties(ct,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
155
+ `},n={pmi:"","wpic-tools":"group-[.is-highlight]:bg-gray-200"},r={pmi:"","wpic-tools":"bg-gray-100 dark:bg-gray-800"},i={pmi:"","wpic-tools":"bg-gray-100 dark:bg-gray-800 rounded-l-0"},o={pmi:"","wpic-tools":"bg-gray-100 dark:bg-gray-800 rounded-r-0"},s={pmi:"","wpic-tools":"bg-gray-200"};return(l,c)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["relative flex items-center justify-center text-sm py-2 group",{"is-today":t.today&&!t.selected,"is-selected":t.selected&&!t.off,"is-off":t.off,"is-highlight":t.highlight,"cursor-pointer":!t.disabled}])},[a.createElementVNode("div",{class:a.normalizeClass(["h-8 w-full flex justify-center items-center",{[`${r[a.unref(he).theme]}`]:t.between,[`${i[a.unref(he).theme]}`]:t.firstDay,[`${o[a.unref(he).theme]}`]:t.lastDay,[`${s[a.unref(he).theme]}`]:t.highlight}]),style:a.normalizeStyle({marginLeft:t.firstDay?"50%":void 0,marginRight:t.lastDay?"50%":void 0})},[a.createElementVNode("span",{class:a.normalizeClass(["absolute w-8 h-8 flex items-center justify-center dark:text-gray-400",{[`${e[a.unref(he).theme]}`]:!0,[`${n[a.unref(he).theme]}`]:t.highlight&&(t.firstDay||t.lastDay)}]),style:{left:"50%",transform:"translateX(-50%)"}},[a.renderSlot(l.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(t.day),1)])],2)],6)],2))}};var xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _c={exports:{}},Cg;function Ks(){return Cg||(Cg=1,function(t,e){(function(n,r){t.exports=r()})(xi,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",s="second",l="minute",c="hour",d="day",u="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,k=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var D=["th","st","nd","rd"],C=z%100;return"["+z+(D[(C-20)%10]||D[C]||D[0])+"]"}},w=function(z,D,C){var I=String(z);return!I||I.length>=D?z:""+Array(D+1-I.length).join(C)+z},b={s:w,z:function(z){var D=-z.utcOffset(),C=Math.abs(D),I=Math.floor(C/60),R=C%60;return(D<=0?"+":"-")+w(I,2,"0")+":"+w(R,2,"0")},m:function z(D,C){if(D.date()<C.date())return-z(C,D);var I=12*(C.year()-D.year())+(C.month()-D.month()),R=D.clone().add(I,f),ee=C-R<0,te=D.clone().add(I+(ee?-1:1),f);return+(-(I+(C-R)/(ee?R-te:te-R))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:f,y:p,w:u,d,D:m,h:c,m:l,s,ms:o,Q:h}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},S="en",v={};v[S]=x;var O="$isDayjsObject",B=function(z){return z instanceof L||!(!z||!z[O])},A=function z(D,C,I){var R;if(!D)return S;if(typeof D=="string"){var ee=D.toLowerCase();v[ee]&&(R=ee),C&&(v[ee]=C,R=ee);var te=D.split("-");if(!R&&te.length>1)return z(te[0])}else{var ce=D.name;v[ce]=D,R=ce}return!I&&R&&(S=R),R||!I&&S},P=function(z,D){if(B(z))return z.clone();var C=typeof D=="object"?D:{};return C.date=z,C.args=arguments,new L(C)},$=b;$.l=A,$.i=B,$.w=function(z,D){return P(z,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var L=function(){function z(C){this.$L=A(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[O]=!0}var D=z.prototype;return D.parse=function(C){this.$d=function(I){var R=I.date,ee=I.utc;if(R===null)return new Date(NaN);if($.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var te=R.match(y);if(te){var ce=te[2]-1||0,ue=(te[7]||"0").substring(0,3);return ee?new Date(Date.UTC(te[1],ce,te[3]||1,te[4]||0,te[5]||0,te[6]||0,ue)):new Date(te[1],ce,te[3]||1,te[4]||0,te[5]||0,te[6]||0,ue)}}return new Date(R)}(C),this.init()},D.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},D.$utils=function(){return $},D.isValid=function(){return this.$d.toString()!==g},D.isSame=function(C,I){var R=P(C);return this.startOf(I)<=R&&R<=this.endOf(I)},D.isAfter=function(C,I){return P(C)<this.startOf(I)},D.isBefore=function(C,I){return this.endOf(I)<P(C)},D.$g=function(C,I,R){return $.u(C)?this[I]:this.set(R,C)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(C,I){var R=this,ee=!!$.u(I)||I,te=$.p(C),ce=function(ae,we){var Ne=$.w(R.$u?Date.UTC(R.$y,we,ae):new Date(R.$y,we,ae),R);return ee?Ne:Ne.endOf(d)},ue=function(ae,we){return $.w(R.toDate()[ae].apply(R.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(we)),R)},V=this.$W,W=this.$M,K=this.$D,q="set"+(this.$u?"UTC":"");switch(te){case p:return ee?ce(1,0):ce(31,11);case f:return ee?ce(1,W):ce(0,W+1);case u:var H=this.$locale().weekStart||0,de=(V<H?V+7:V)-H;return ce(ee?K-de:K+(6-de),W);case d:case m:return ue(q+"Hours",0);case c:return ue(q+"Minutes",1);case l:return ue(q+"Seconds",2);case s:return ue(q+"Milliseconds",3);default:return this.clone()}},D.endOf=function(C){return this.startOf(C,!1)},D.$set=function(C,I){var R,ee=$.p(C),te="set"+(this.$u?"UTC":""),ce=(R={},R[d]=te+"Date",R[m]=te+"Date",R[f]=te+"Month",R[p]=te+"FullYear",R[c]=te+"Hours",R[l]=te+"Minutes",R[s]=te+"Seconds",R[o]=te+"Milliseconds",R)[ee],ue=ee===d?this.$D+(I-this.$W):I;if(ee===f||ee===p){var V=this.clone().set(m,1);V.$d[ce](ue),V.init(),this.$d=V.set(m,Math.min(this.$D,V.daysInMonth())).$d}else ce&&this.$d[ce](ue);return this.init(),this},D.set=function(C,I){return this.clone().$set(C,I)},D.get=function(C){return this[$.p(C)]()},D.add=function(C,I){var R,ee=this;C=Number(C);var te=$.p(I),ce=function(W){var K=P(ee);return $.w(K.date(K.date()+Math.round(W*C)),ee)};if(te===f)return this.set(f,this.$M+C);if(te===p)return this.set(p,this.$y+C);if(te===d)return ce(1);if(te===u)return ce(7);var ue=(R={},R[l]=r,R[c]=i,R[s]=n,R)[te]||1,V=this.$d.getTime()+C*ue;return $.w(V,this)},D.subtract=function(C,I){return this.add(-1*C,I)},D.format=function(C){var I=this,R=this.$locale();if(!this.isValid())return R.invalidDate||g;var ee=C||"YYYY-MM-DDTHH:mm:ssZ",te=$.z(this),ce=this.$H,ue=this.$m,V=this.$M,W=R.weekdays,K=R.months,q=R.meridiem,H=function(we,Ne,Ie,tt){return we&&(we[Ne]||we(I,ee))||Ie[Ne].slice(0,tt)},de=function(we){return $.s(ce%12||12,we,"0")},ae=q||function(we,Ne,Ie){var tt=we<12?"AM":"PM";return Ie?tt.toLowerCase():tt};return ee.replace(k,function(we,Ne){return Ne||function(Ie){switch(Ie){case"YY":return String(I.$y).slice(-2);case"YYYY":return $.s(I.$y,4,"0");case"M":return V+1;case"MM":return $.s(V+1,2,"0");case"MMM":return H(R.monthsShort,V,K,3);case"MMMM":return H(K,V);case"D":return I.$D;case"DD":return $.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return H(R.weekdaysMin,I.$W,W,2);case"ddd":return H(R.weekdaysShort,I.$W,W,3);case"dddd":return W[I.$W];case"H":return String(ce);case"HH":return $.s(ce,2,"0");case"h":return de(1);case"hh":return de(2);case"a":return ae(ce,ue,!0);case"A":return ae(ce,ue,!1);case"m":return String(ue);case"mm":return $.s(ue,2,"0");case"s":return String(I.$s);case"ss":return $.s(I.$s,2,"0");case"SSS":return $.s(I.$ms,3,"0");case"Z":return te}return null}(we)||te.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(C,I,R){var ee,te=this,ce=$.p(I),ue=P(C),V=(ue.utcOffset()-this.utcOffset())*r,W=this-ue,K=function(){return $.m(te,ue)};switch(ce){case p:ee=K()/12;break;case f:ee=K();break;case h:ee=K()/3;break;case u:ee=(W-V)/6048e5;break;case d:ee=(W-V)/864e5;break;case c:ee=W/i;break;case l:ee=W/r;break;case s:ee=W/n;break;default:ee=W}return R?ee:$.a(ee)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return v[this.$L]},D.locale=function(C,I){if(!C)return this.$L;var R=this.clone(),ee=A(C,I,!0);return ee&&(R.$L=ee),R},D.clone=function(){return $.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},z}(),j=L.prototype;return P.prototype=j,[["$ms",o],["$s",s],["$m",l],["$H",c],["$W",d],["$M",f],["$y",p],["$D",m]].forEach(function(z){j[z[1]]=function(D){return this.$g(D,z[0],z[1])}}),P.extend=function(z,D){return z.$i||(z(D,L,P),z.$i=!0),P},P.locale=A,P.isDayjs=B,P.unix=function(z){return P(1e3*z)},P.en=v[S],P.Ls=v,P.p={},P})}(_c)),_c.exports}var i3=Ks();const G=Sc(i3);var o3={exports:{}};(function(t,e){(function(n,r){t.exports=r(Ks())})(xi,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=r(n),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var c=100*s+l;return c<600?"凌晨":c<900?"早上":c<1100?"上午":c<1300?"中午":c<1800?"下午":"晚上"}};return i.default.locale(o,null,!0),o})})(o3);var s3={exports:{}};(function(t,e){(function(n,r){t.exports=r(Ks())})(xi,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=r(n),o={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s){return s+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(s){return s<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return i.default.locale(o,null,!0),o})})(s3);var l3={exports:{}};(function(t,e){(function(n,r){t.exports=r(Ks())})(xi,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var i=r(n),o={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(s){return s+"일"},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(s){return s<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return i.default.locale(o,null,!0),o})})(l3);var Sg={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(xi,function(){var n="week",r="year";return function(i,o,s){var l=o.prototype;l.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=s(this).startOf(r).add(1,r).date(d),f=s(this).endOf(n);if(u.isBefore(f))return 1}var h=s(this).startOf(r).date(d).startOf(n).subtract(1,"millisecond"),p=this.diff(h,n,!0);return p<0?s(this).startOf("week").week():Math.ceil(p)},l.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(Sg);var a3=Sg.exports;const c3=Sc(a3);var _g={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(xi,function(){return function(n,r,i){r.prototype.isBetween=function(o,s,l,c){var d=i(o),u=i(s),f=(c=c||"()")[0]==="(",h=c[1]===")";return(f?this.isAfter(d,l):!this.isBefore(d,l))&&(h?this.isBefore(u,l):!this.isAfter(u,l))||(f?this.isBefore(d,l):!this.isAfter(d,l))&&(h?this.isAfter(u,l):!this.isBefore(u,l))}}})})(_g);var d3=_g.exports;const u3=Sc(d3),f3={class:"w-full dark:text-gray-400"},h3={class:"flex justify-between items-center mb-3"},p3={class:"flex"},m3={class:"font-medium flex items-center gap-2"},g3=["value","onChange"],y3=["value"],b3=["value","onChange"],k3=["value"],w3={class:"flex"},v3={class:"grid grid-cols-7 border-b dark:border-gray-800 mb-2 pb-2"},Oc=Object.assign({name:"WpicCalendar"},{props:{modelValue:{},range:Boolean,doubleMonths:Boolean,displayYearStart:Number,displayMonthStart:Number,displayYearEnd:Number,displayMonthEnd:Number,maxDate:{},minDate:{},week:Boolean,initDates:{},defaultMinYear:{type:Number,default:2019},defaultMaxYear:{type:Number,default:G().year()+10}},emits:["update:modelValue"],setup(t,{emit:e}){const{locale:n}=zn();G.extend(u3),G.extend(c3);const r=t,i=a.computed(()=>Array.from({length:7},(W,K)=>G().day((1+K)%7).locale(n.value).format("ddd"))),o=a.ref([G(new Date).subtract(1,"month"),G(new Date)]);a.watch(()=>r.initDates,()=>{var V;if(!r.range&&r.initDates)o.value[0]=G(r.initDates);else if(!r.range&&!r.initDates)o.value[0]=G(new Date);else if(r.range&&((V=r.initDates)==null?void 0:V.length)===2){let W=G(r.initDates[0]),K=G(r.initDates[1]);K.isBefore(W,"month")&&(K=W.add(1,"month")),W.isSame(K,"month")&&(K=W.add(1,"month")),o.value=[W,K]}},{immediate:!0,once:!0}),a.watch(()=>[r.displayYearStart,r.displayMonthStart],([V,W])=>{V&&W&&(o.value[0]=G().year(Number(V)).month(Number(W)).startOf("month"),o.value[1]=G().year(Number(V)).month(Number(W)).startOf("month").add(1,"month"))},{immediate:!0}),a.watch(()=>[r.displayYearEnd,r.displayMonthEnd],([V,W])=>{if(V&&W){const K=o.value[0],q=G().year(Number(V)).month(Number(W)).startOf("month");q.isAfter(K,"month")&&(o.value[1]=q)}},{immediate:!0});const s=e,l=a.computed(()=>r.doubleMonths||r.range?[0,1]:[0]);function c(V){if(r.week)s("update:modelValue",[G(V).startOf("week"),G(V).endOf("week")]);else if(r.range){const W=r.modelValue.filter(K=>K).length;if(W==0)s("update:modelValue",[V]);else if(W==2)s("update:modelValue",[V]);else if(W==1){let K=[G(r.modelValue[0]),G(V)];K=K.sort((q,H)=>q-H),s("update:modelValue",K)}}else s("update:modelValue",G(V))}function d(V){const W=G(V).daysInMonth(),K=[],q=G(V).startOf("month");for(let H=1;H<=W;H++){let de=q.clone().date(H);K.push(de)}return K}function u(V){return G(V).startOf("month").day()}function f(V,W){const K=G(`${V}-${W}-01`,"YYYY-MM-DD"),H=K.day(),de=[];for(let ae=0;ae<H;ae++)de.push(K.clone().subtract(H-ae,"days"));return de}function h(V,W){const K=G(`${V}-${W}`,"YYYY-MM").endOf("month"),H=6-K.day(),de=[];for(let ae=1;ae<=H;ae++)de.push(K.clone().add(ae,"days"));return de}function p(V){const W=G();return G(V).isSame(W,"day")}function m(V){var W,K;if(r.range){if(((W=r.modelValue)==null?void 0:W.length)==1)return G(V).isSame(G(r.modelValue[0]),"day");if(((K=r.modelValue)==null?void 0:K.length)==2)return G(V).isSame(G(r.modelValue[0]),"day")||G(V).isSame(G(r.modelValue[1]),"day")}else if(r.modelValue)return G(V).isSame(G(r.modelValue),"day")}function g(V){var W;if(r.range&&((W=r.modelValue)==null?void 0:W.length)==2)return G(V).isBetween(G(r.modelValue[0]),G(r.modelValue[1]))}function y(V){var W;if(r.range&&((W=r.modelValue)==null?void 0:W.length)==2)return G(V).isSame(G(r.modelValue[0]),"day")}function k(V){var W;if(r.range&&((W=r.modelValue)==null?void 0:W.length)==2)return G(V).isSame(G(r.modelValue[1]),"day")}function x(V){try{return r.minDate?G(V).isBefore(G(r.minDate)):!1}catch(W){return console.log(W),!1}}function w(V){try{return r.maxDate?G(V).isAfter(G(r.maxDate)):!1}catch(W){return console.log(W),!1}}function b(V){L(V,o.value[V].subtract(1,"month"))}function S(V){L(V,o.value[V].add(1,"month"))}function v(V){L(V,o.value[V].subtract(1,"year"))}function O(V){L(V,o.value[V].add(1,"year"))}const B=V=>l.value.length===1||V===0?!0:o.value[V].subtract(1,"month").isAfter(o.value[0],"month"),A=V=>l.value.length===1||V===1?!0:o.value[V].add(1,"month").isBefore(o.value[1],"month"),P=V=>l.value.length===1||V===0?!0:o.value[V].subtract(1,"year").isAfter(o.value[0],"year"),$=V=>l.value.length===1||V===1?!0:o.value[V].add(1,"year").isBefore(o.value[1],"year");function L(V,W){if(V===0){if(!l.value.length===1&&!W.isBefore(o.value[1],"month"))return;o.value=[W,o.value[1]]}else{if(!l.value.length===1&&!W.isAfter(o.value[0],"month"))return;(W.isBefore(o.value[0],"month")||W.isSame(o.value[0],"month"))&&(W=o.value[0].add(1,"month")),o.value=[o.value[0],W]}}const j=a.ref();function z(V){r.week&&(j.value=G(V).week())}function D(V){return G(V).week()===j.value}function C(V){return G(V).week()===j.value?G(V).format("YYYY-MM-DD")===G().week(j.value).startOf("week").format("YYYY-MM-DD"):!1}function I(V){return G(V).week()===j.value?G(V).format("YYYY-MM-DD")===G().week(j.value).endOf("week").format("YYYY-MM-DD"):!1}function R(){j.value=null}function ee(V,W){const K=o.value[V].year(Number(W));L(V,K)}function te(V,W){const K=o.value[V].month(Number(W));L(V,K)}const ce=a.computed(()=>{const V=r.defaultMinYear,W=r.defaultMaxYear,K=[];for(let q=V;q<=W;q++)K.push(q);return K}),ue=a.computed(()=>Array.from({length:12},(V,W)=>G().month(W).locale(n.value).format("MMMM")));return(V,W)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["shrink-0 flex gap-6",{"min-w-96":l.value.length===1,"min-w-192":l.value.length===2}])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.value,K=>{var q;return a.openBlock(),a.createElementBlock("div",f3,[a.createElementVNode("div",h3,[a.createElementVNode("div",p3,[a.createVNode(Af,{class:a.normalizeClass(["w-5 h-5 cursor-pointer select-none",{"opacity-25 cursor-not-allowed":!P(K),"hover:opacity-100":P(K)}]),onClick:H=>P(K)?v(K):null},null,8,["class","onClick"]),a.createVNode(Df,{class:a.normalizeClass(["w-5 h-5 cursor-pointer select-none",{"opacity-25 cursor-not-allowed":!B(K),"hover:opacity-100":B(K)}]),onClick:H=>B(K)?b(K):null},null,8,["class","onClick"])]),a.createElementVNode("div",m3,[a.createElementVNode("select",{value:o.value[K].format("YYYY"),onChange:H=>ee(K,H.target.value),class:"bg-none appearance-none outline-hidden cursor-pointer"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ce.value,H=>(a.openBlock(),a.createElementBlock("option",{key:H,value:H},a.toDisplayString(H),9,y3))),128))],40,g3),a.createElementVNode("select",{value:o.value[K].month(),onChange:H=>te(K,H.target.value),class:"bg-none appearance-none outline-hidden cursor-pointer"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(ue.value,(H,de)=>(a.openBlock(),a.createElementBlock("option",{key:de,value:de},a.toDisplayString(H),9,k3))),128))],40,b3)]),a.createElementVNode("div",w3,[a.createVNode(Bf,{class:a.normalizeClass(["w-5 h-5 cursor-pointer select-none",{"opacity-25 cursor-not-allowed":!A(K),"hover:opacity-100":A(K)}]),onClick:H=>A(K)?S(K):null},null,8,["class","onClick"]),a.createVNode(Lf,{class:a.normalizeClass(["w-5 h-5 cursor-pointer select-none",{"opacity-25 cursor-not-allowed":!$(K),"hover:opacity-100":$(K)}]),onClick:H=>$(K)?O(K):null},null,8,["class","onClick"])])]),a.createElementVNode("div",v3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,(H,de)=>(a.openBlock(),a.createElementBlock("div",{key:de,class:"flex justify-center text-sm"},a.toDisplayString(H),1))),128))]),a.createElementVNode("div",{class:"grid grid-cols-7",onMouseout:R},[u(o.value[K])>0?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(f(a.unref(G)(o.value[K]).year(),a.unref(G)(o.value[K]).month()+1),H=>(a.openBlock(),a.createBlock(Cc,{onClick:de=>!w(H)&&!x(H)?c(H):null,off:""},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(G)(H).format("D")),1)]),_:2},1032,["onClick"]))),256)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(d(o.value[K].clone()),H=>(a.openBlock(),a.createBlock(Cc,{onMouseover:de=>z(H),onClick:de=>!w(H)&&!x(H)?c(H):null,today:p(H),selected:m(H),firstDay:y(H)||C(H),lastDay:k(H)||I(H),between:g(H),disabled:w(H)||x(H),off:w(H)||x(H),highlight:D(H)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(G)(H).format("D")),1)]),_:2},1032,["onMouseover","onClick","today","selected","firstDay","lastDay","between","disabled","off","highlight"]))),256)),((q=h(a.unref(G)(o.value[K]).year(),a.unref(G)(o.value[K]).month()+1))==null?void 0:q.length)>0?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(h(a.unref(G)(o.value[K]).year(),a.unref(G)(o.value[K]).month()+1),H=>(a.openBlock(),a.createBlock(Cc,{onClick:de=>!w(H)&&!x(H)?c(H):null,off:""},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(G)(H).format("D")),1)]),_:2},1032,["onClick"]))),256)):a.createCommentVNode("",!0)],32)])}),256))],2))}}),x3={},E3={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},C3=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 2.994v2.25m10.5-2.25v2.25m-14.252 13.5V7.491a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v11.251m-18 0a2.25 2.25 0 0 0 2.25 2.25h13.5a2.25 2.25 0 0 0 2.25-2.25m-18 0v-7.5a2.25 2.25 0 0 1 2.25-2.25h13.5a2.25 2.25 0 0 1 2.25 2.25v7.5m-6.75-6h2.25m-9 2.25h4.5m.002-2.25h.005v.006H12v-.006Zm-.001 4.5h.006v.006h-.006v-.005Zm-2.25.001h.005v.006H9.75v-.006Zm-2.25 0h.005v.005h-.006v-.005Zm6.75-2.247h.005v.005h-.005v-.005Zm0 2.247h.006v.006h-.006v-.006Zm2.25-2.248h.006V15H16.5v-.005Z"},null,-1)];function S3(t,e){return a.openBlock(),a.createElementBlock("svg",E3,C3)}const Og=be(x3,[["render",S3]]),_3={},O3={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},T3=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z"},null,-1)];function N3(t,e){return a.openBlock(),a.createElementBlock("svg",O3,T3)}const Tg=be(_3,[["render",N3]]),M3={class:"flex gap-3"},A3={key:0,class:"w-32 py-2 border-r dark:border-gray-800 flex flex-col gap-3 shrink-0"},D3=["onClick"],L3=Object.assign({name:"WpicDateField"},{props:{modelValue:{},label:String,placeholder:{type:String,default:"Select date"},week:Boolean,range:Boolean,disabled:Boolean,large:Boolean,info:String,doubleMonths:Boolean,clearable:Boolean,minDate:{},maxDate:{},initDates:{},shortcuts:Boolean,slim:Boolean,required:Boolean,hideRequired:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const{t:n}=zn(),r=t,i=a.computed(()=>r.placeholder==="Select date"?n("wpiccomponents.select_date"):r.placeholder),o=e;function s(d){o("update:modelValue",d)}const l=a.computed(()=>{var d;if(r.range)return(d=r.modelValue)==null?void 0:d.map(u=>G(u).format("YYYY-MM-DD")).join(" to ");if(r.modelValue)return G(r.modelValue).format("YYYY-MM-DD")}),c=a.reactive([{text:a.computed(()=>n("wpiccomponents.month_to_date")),onClick(d){const u=G().subtract(1,"day"),f=G().startOf("month");o("update:modelValue",[f,u])}},{text:a.computed(()=>n("wpiccomponents.last_month")),onClick(d){const u=G().startOf("month").subtract(1,"month"),f=G(u).endOf("month");o("update:modelValue",[u,f])}},{text:a.computed(()=>n("wpiccomponents.year_to_date")),onClick(d){const u=G().subtract(1,"day"),f=G().startOf("year");o("update:modelValue",[f,u])}}]);return(d,u)=>(a.openBlock(),a.createBlock(fr,{disabled:t.disabled,maxWidth:"1280px"},{content:a.withCtx(()=>[a.createElementVNode("div",M3,[t.shortcuts?(a.openBlock(),a.createElementBlock("div",A3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c,f=>(a.openBlock(),a.createElementBlock("div",{class:"opacity-50 hover:opacity-100 dark:text-gray-300 cursor-pointer",onClick:h=>f.onClick()},a.toDisplayString(f.text),9,D3))),256))])):a.createCommentVNode("",!0),a.createVNode(Oc,{doubleMonths:t.doubleMonths,initDates:t.initDates,week:t.week,"min-date":t.minDate,"max-date":t.maxDate,modelValue:t.modelValue,"onUpdate:modelValue":s,range:t.range},null,8,["doubleMonths","initDates","week","min-date","max-date","modelValue","range"])])]),default:a.withCtx(()=>{var f;return[a.createVNode(zi,{label:t.label,required:t.required,hideRequired:t.hideRequired,slim:t.slim,disabled:t.disabled,large:t.large,info:t.info,clearable:!!(t.clearable&&((f=l.value)!=null&&f.length)),onOnClear:u[0]||(u[0]=h=>s(null))},{prepend:a.withCtx(()=>[t.range?(a.openBlock(),a.createBlock(Og,{key:0,class:"dark:text-gray-400"})):(a.openBlock(),a.createBlock(Tg,{key:1,class:"dark:text-gray-400"}))]),default:a.withCtx(()=>[a.createTextVNode(" "+a.toDisplayString(l.value||i.value),1)]),_:1},8,["label","required","hideRequired","slim","disabled","large","info","clearable"])]}),_:1},8,["disabled"]))}}),B3={class:"relative inline-block tabular-nums"},$3=["value","placeholder","maxlength"],Tc={__name:"DateSegment",props:{modelValue:String,placeholder:String,segment:{type:String,default:"monthOrDay"},disabled:Boolean},emits:["update:modelValue","blur"],setup(t,{emit:e}){const n=t,r=e,i=a.ref(null),o=a.computed(()=>n.segment==="year"?4:2);function s(c){const d=c.target.value.replace(/\D/g,"");r("update:modelValue",d.slice(0,o.value)),d.length>=o.value&&n.nextRef&&a.nextTick(()=>{n.nextRef.focus()})}function l(){r("blur")}return(c,d)=>(a.openBlock(),a.createElementBlock("div",B3,[a.createElementVNode("input",{ref_key:"inputRef",ref:i,type:"text",value:t.modelValue,onInput:s,onKeydown:d[0]||(d[0]=(...u)=>c.onKeydown&&c.onKeydown(...u)),onBlur:l,placeholder:t.placeholder,class:a.normalizeClass(["date-segment bg-transparent text-gray-900 dark:text-gray-400 focus:outline-none border-b border-transparent focus:border-gray-800 dark:focus:border-gray-300 transition-all duration-200 ease-in-out hover:bg-gray-50 dark:hover:bg-gray-800 focus:bg-white dark:focus:bg-gray-900 placeholder:opacity-25 placeholder:tracking-wider placeholder:pl-1",{"w-[4ch]":o.value===4,"w-[2ch]":o.value===2}]),inputmode:"numeric",pattern:"\\d*",maxlength:o.value},null,42,$3)]))}},I3={class:"flex items-center gap-0"},V3=a.createElementVNode("span",{class:"px-px text-gray-400 dark:text-gray-700"},"/",-1),P3=a.createElementVNode("span",{class:"px-px text-gray-400 dark:text-gray-600"},"/",-1),Nc={__name:"DateInput",props:{modelValue:String,disabled:Boolean},emits:["update:modelValue","update:initDates","update:displayYear","update:displayMonth"],setup(t,{emit:e}){const n=t,r=e,i=a.ref(""),o=a.ref(""),s=a.ref(""),l=a.ref(null),c=a.ref(null),d=a.ref(null);a.watch(()=>n.modelValue,k=>{n.range?Array.isArray(k)&&k.length===2?(yearStart.value=k[0]?G(k[0]).format("YYYY"):"",monthStart.value=k[0]?G(k[0]).format("MM"):"",dayStart.value=k[0]?G(k[0]).format("DD"):"",yearEnd.value=k[1]?G(k[1]).format("YYYY"):"",monthEnd.value=k[1]?G(k[1]).format("MM"):"",dayEnd.value=k[1]?G(k[1]).format("DD"):""):(yearStart.value=monthStart.value=dayStart.value="",yearEnd.value=monthEnd.value=dayEnd.value=""):k?(i.value=G(k).format("YYYY"),o.value=G(k).format("MM"),s.value=G(k).format("DD")):i.value=o.value=s.value=""},{immediate:!0});function u(){i.value.length===4&&o.value.length===2&&s.value.length===2&&r("update:modelValue",`${i.value}-${o.value}-${s.value}`)}function f(k){k.length===4&&r("update:displayYear",Number(k)),u()}function h(k){k.length===2&&r("update:displayMonth",Number(k)-1),u()}function p(k){s.value=k,u()}function m(){i.value||(i.value=G().format("YYYY")),u()}function g(){o.value||(o.value=G().format("MM")),u()}function y(){s.value||(s.value=G().format("DD")),u()}return(k,x)=>(a.openBlock(),a.createElementBlock("div",I3,[a.createVNode(Tc,{modelValue:i.value,"onUpdate:modelValue":[x[0]||(x[0]=w=>i.value=w),f],segment:"year",disabled:t.disabled,placeholder:"••••",onBlur:m,ref_key:"yearRef",ref:l},null,8,["modelValue","disabled"]),V3,a.createVNode(Tc,{modelValue:o.value,"onUpdate:modelValue":[x[1]||(x[1]=w=>o.value=w),h],segment:"monthOrDay",disabled:t.disabled,placeholder:"••",onBlur:g,ref_key:"monthRef",ref:c},null,8,["modelValue","disabled"]),P3,a.createVNode(Tc,{modelValue:s.value,"onUpdate:modelValue":[x[2]||(x[2]=w=>s.value=w),p],segment:"monthOrDay",disabled:t.disabled,placeholder:"••",onBlur:y,ref_key:"dayRef",ref:d},null,8,["modelValue","disabled"])]))}},R3={class:"tabular-nums"},F3={key:1,class:"flex items-center"},z3=a.createElementVNode("span",{class:"px-1 text-gray-400 dark:text-gray-600"},"➞",-1),j3={class:"flex gap-3"},H3={key:0,class:"w-32 py-2 border-r dark:border-gray-800 flex flex-col gap-3 shrink-0"},W3=["onClick"],U3=Object.assign({name:"WpicAdvDateField"},{props:{modelValue:{},label:String,placeholder:{type:String,default:"Select date"},week:Boolean,range:Boolean,disabled:Boolean,large:Boolean,info:String,doubleMonths:Boolean,clearable:Boolean,minDate:{},maxDate:{},initDates:{},shortcuts:Boolean,slim:Boolean,required:Boolean,hideRequired:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const{t:n}=zn(),r=t,i=e,o=a.computed(()=>r.placeholder==="Select date"?n("wpiccomponents.select_date"):r.placeholder);a.ref(!1);const s=a.ref(G().year()),l=a.ref(G().month()),c=a.ref(null),d=a.ref(null);function u(){i("update:modelValue",null)}a.watch(()=>r.initDates,m=>{var g;r.range&&((g=r.initDates)==null?void 0:g.length)==2?(s.value=G(r.initDates[0]).year(),l.value=G(r.initDates[0]).month(),c.value=G(r.initDates[1]).year(),d.value=G(r.initDates[1]).month()):r.initDates&&(s.value=G(r.initDates).year(),l.value=G(r.initDates).month())},{immediate:!0});const f=a.ref(r.range?[]:"");a.watch(()=>r.modelValue,m=>{if(r.range){const g=m!=null&&m[0]?G(m[0]).format("YYYY-MM-DD"):"",y=m!=null&&m[1]?G(m[1]).format("YYYY-MM-DD"):"";(f.value[0]!==g||f.value[1]!==y)&&(f.value=[g,y])}else{const g=m?G(m).format("YYYY-MM-DD"):"";f.value!==g&&(f.value=g)}},{immediate:!0}),a.watch(()=>f.value,m=>{var g,y;if(r.range){const k=m[0]&&m[0].length===10?G(m[0]).toDate():null,x=m[1]&&m[1].length===10?G(m[1]).toDate():null;(!((g=r.modelValue)!=null&&g[0])||r.modelValue[0]!==k||!((y=r.modelValue)!=null&&y[1])||r.modelValue[1]!==x)&&i("update:modelValue",[k,x])}else if(m&&m.length===10){const k=G(m,"YYYY-MM-DD",!0);k.isValid()&&r.modelValue!==k.toDate()&&i("update:modelValue",k.toDate())}},{deep:!0});function h(m){i("update:modelValue",m)}const p=a.reactive([{text:a.computed(()=>n("wpiccomponents.month_to_date")),onClick(m){const g=G().subtract(1,"day"),y=G().startOf("month");i("update:modelValue",[y,g])}},{text:a.computed(()=>n("wpiccomponents.last_month")),onClick(m){const g=G().startOf("month").subtract(1,"month"),y=G(g).endOf("month");i("update:modelValue",[g,y])}},{text:a.computed(()=>n("wpiccomponents.year_to_date")),onClick(m){const g=G().subtract(1,"day"),y=G().startOf("year");i("update:modelValue",[y,g])}}]);return(m,g)=>(a.openBlock(),a.createBlock(fr,{disabled:t.disabled,maxWidth:"1280px",noCloseClasses:["date-segment"]},{content:a.withCtx(()=>[a.createElementVNode("div",j3,[t.shortcuts?(a.openBlock(),a.createElementBlock("div",H3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(p,y=>(a.openBlock(),a.createElementBlock("div",{class:"opacity-50 hover:opacity-100 dark:text-gray-300 cursor-pointer",onClick:k=>y.onClick()},a.toDisplayString(y.text),9,W3))),256))])):a.createCommentVNode("",!0),a.createVNode(Oc,{doubleMonths:t.doubleMonths,displayYearStart:s.value,displayMonthStart:l.value,displayYearEnd:c.value,displayMonthEnd:d.value,shortcuts:t.shortcuts,week:t.week,"min-date":t.minDate,"max-date":t.maxDate,modelValue:r.range?[...f.value]:f.value,"onUpdate:modelValue":h,range:t.range},null,8,["doubleMonths","displayYearStart","displayMonthStart","displayYearEnd","displayMonthEnd","shortcuts","week","min-date","max-date","modelValue","range"])])]),default:a.withCtx(()=>[a.createVNode(zi,{label:t.label,required:t.required,hideRequired:t.hideRequired,slim:t.slim,disabled:t.disabled,large:t.large,info:t.info,clearable:t.clearable&&!!t.modelValue,onOnClear:u},{prepend:a.withCtx(()=>[t.range?(a.openBlock(),a.createBlock(Og,{key:0,class:"dark:text-gray-400"})):(a.openBlock(),a.createBlock(Tg,{key:1,class:"dark:text-gray-400"}))]),default:a.withCtx(()=>[a.createElementVNode("div",R3,[t.range?t.range?(a.openBlock(),a.createElementBlock("div",F3,[a.createVNode(Nc,{modelValue:f.value[0],"onUpdate:modelValue":g[3]||(g[3]=y=>f.value[0]=y),disabled:t.disabled,"onUpdate:displayYear":g[4]||(g[4]=y=>s.value=y),"onUpdate:displayMonth":g[5]||(g[5]=y=>l.value=y)},null,8,["modelValue","disabled"]),z3,a.createVNode(Nc,{modelValue:f.value[1],"onUpdate:modelValue":g[6]||(g[6]=y=>f.value[1]=y),disabled:t.disabled,"onUpdate:displayYear":g[7]||(g[7]=y=>{c.value=y}),"onUpdate:displayMonth":g[8]||(g[8]=y=>{d.value=y})},null,8,["modelValue","disabled"])])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[a.createTextVNode(a.toDisplayString(o.value),1)],64)):(a.openBlock(),a.createBlock(Nc,{key:0,modelValue:f.value,"onUpdate:modelValue":g[0]||(g[0]=y=>f.value=y),disabled:t.disabled,"onUpdate:displayYear":g[1]||(g[1]=y=>s.value=y),"onUpdate:displayMonth":g[2]||(g[2]=y=>l.value=y)},null,8,["modelValue","disabled"]))])]),_:1},8,["label","required","hideRequired","slim","disabled","large","info","clearable"])]),_:1},8,["disabled"]))}}),Y3=Object.assign({name:"WpicSlidePanel"},{props:{visible:{type:Boolean,default:!1},backgroundColor:{type:String,default:"bg-white"},options:{type:Object,default:()=>({width:"w-96",mr:"mr-0",zIndex:"z-15"})},expand:Boolean,island:Boolean},emits:["close"],setup(t,{expose:e,emit:n}){const r={pmi:"dark:bg-zinc-800","wpic-tools":"dark:bg-gray-940"},i=n;function o(){i("close")}e({goBottom:c,goTop:l});const s=a.ref(null);function l(){s.value.scrollTop=0}function c(){s.value.scrollTop=s.value.scrollHeight}return(d,u)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["fixed inset-0 h-full flex justify-end bg-black/10 dark:bg-black/50 backdrop-blur-md transition-opacity",{"p-4":t.island,"opacity-0 pointer-events-none":!t.visible,"opacity-100":t.visible,[t.options.mr]:!0,[t.options.zIndex]:!0}]),onClick:a.withModifiers(o,["self"])},[a.createElementVNode("div",{class:a.normalizeClass(["h-full transform-gpu transition-transform",{"rounded-lg":t.island,"translate-x-0":t.visible,"translate-x-full":!t.visible,[t.backgroundColor]:!0,[t.options.width]:!0,[r[a.unref(he).theme]]:!0}])},[a.createElementVNode("div",{ref_key:"panel",ref:s,class:a.normalizeClass(["h-full overflow-y-auto",{"p-6":!t.expand}])},[a.renderSlot(d.$slots,"default")],2)],2)],2))}}),q3={class:"absolute inset-0 flex items-center justify-center py-12"},K3={class:"text-lg font-medium dark:text-gray-300"},G3={key:0,class:"flex justify-end px-6 pb-4"},J3=Object.assign({name:"WpicDialog"},{props:{title:String,visible:Boolean,large:Boolean,extraLarge:Boolean,smooth:Boolean,expand:Boolean,border:Boolean,high:Boolean,overflow:Boolean,blur:Boolean},emits:["close"],setup(t,{expose:e,emit:n}){const r=t,i=n;function o(){i("close")}const s=a.ref(null),l=a.ref(!1);function c(){s.value.scrollTop=0}function d(){s.value.scrollTop=s.value.scrollHeight}function u(){s.value&&r.visible&&(l.value=s.value.scrollTop+s.value.clientHeight>=s.value.scrollHeight-20)}return a.onMounted(async()=>{s.value&&(s.value.addEventListener("scroll",u),u())}),a.onBeforeUnmount(()=>{s.value&&s.value.removeEventListener("scroll",u)}),e({goBottom:d,goTop:c,isScrolledToBottom:l}),(f,h)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["",{flex:t.visible,hidden:!t.visible}])},[a.createElementVNode("div",q3,[a.createElementVNode("div",{class:a.normalizeClass(["absolute transition-opacity inset-0 bg-black/10 dark:bg-black/50 z-10",{"backdrop-blur-md":t.blur}]),onClick:o},null,2),a.createElementVNode("div",{class:a.normalizeClass(["relative flex flex-col justify-between bg-white dark:border dark:border-gray-900 dark:bg-gray-940 rounded-lg z-20 max-h-full",{"w-3/5":t.large,"w-4/5":t.extraLarge,"w-192":!t.large&&!t.extraLarge,"h-full":t.high,"overflow-hidden":!t.overflow}])},[a.createElementVNode("div",{class:a.normalizeClass(["px-6 pt-4 pb-4 flex items-center justify-between",{"border-b pb-3 dark:border-gray-900":t.border}])},[a.createElementVNode("span",K3,a.toDisplayString(t.title),1),a.createElementVNode("span",{class:"cursor-pointer",onClick:o},[a.createVNode($i,{class:"w-6 h-6"})])],2),a.createElementVNode("div",{ref_key:"panel",ref:s,class:a.normalizeClass(["flex-1 overflow-y-auto",{"p-6":!t.expand,"scroll-smooth":t.smooth}])},[a.renderSlot(f.$slots,"default")],2),f.$slots.buttons?(a.openBlock(),a.createElementBlock("div",G3,[a.renderSlot(f.$slots,"buttons")])):a.createCommentVNode("",!0)],2)])],2))}}),Z3=["onClick"],X3=Object.assign({name:"WpicTabs"},{props:{modelValue:{type:String,required:!0},pills:Boolean,contrastPills:Boolean,nowrap:Boolean},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=a.ref([]),o=c=>{r("update:modelValue",c)},s=c=>{i.value.push(c)},l=a.computed(()=>n.modelValue);return a.provide("addTab",s),a.provide("modelValue",l),(c,d)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:a.normalizeClass(["wpic-tabs flex dark:border-gray-930 overflow-x-auto overflow-y-hidden",{"border-b-[1px]":!t.pills}])},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(i.value,u=>(a.openBlock(),a.createElementBlock("div",{key:u.name,class:a.normalizeClass(["items-center flex leading-snug cursor-pointer px-6 -mb-[px]",{"py-2":t.pills,"border-b-[2px] py-3":!t.pills,"border-transparent":!t.pills&&u.name!=t.modelValue,"dark:border-gray-930 hover:text-gray-800 dark:hover:text-gray-400 hover:border-gray-200":u.name!=t.modelValue,"text-wpic-500 border-b-wpic-500 dark:text-wpic-600 dark:border-b-wpic-600":!t.pills&&u.name===t.modelValue,"rounded-lg":t.pills,"bg-black/5 dark:bg-white/10 text-gray-800 dark:!text-gray-300":t.pills&&u.name===t.modelValue,"bg-gray-900 dark:bg-gray-300! text-white! dark:text-gray-800!":t.pills&&t.contrastPills&&u.name===t.modelValue,"text-gray-500 dark:text-gray-500":!u.disabled,"text-gray-300 dark:text-gray-700":u.disabled}]),onClick:f=>u.disabled?null:o(u.name)},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u.labelSlot||"span"),{class:a.normalizeClass({"whitespace-nowrap text-ellipsis overflow-hidden":t.nowrap})},{default:a.withCtx(()=>[u.labelSlot?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(a.toDisplayString(u.label),1)],64))]),_:2},1032,["class"]))],10,Z3))),128))],2),a.createElementVNode("div",null,[a.renderSlot(c.$slots,"default")])],64))}}),Q3=Object.assign({name:"WpicTabPane"},{props:{label:{type:String,required:!0},name:{type:String,required:!0},noStyle:Boolean,disabled:Boolean},setup(t){const e=t,n=a.ref(!1),r=a.inject("addTab"),i=a.inject("modelValue"),o=a.useSlots();return a.onMounted(()=>{r({label:e.label,name:e.name,disabled:e.disabled,labelSlot:o.label})}),a.watch(()=>i.value,s=>{n.value=s===e.name},{immediate:!0,deep:!0}),(s,l)=>n.value?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["wpic-tab-pane",{"py-3 px-6":!t.noStyle}])},[a.renderSlot(s.$slots,"default")],2)):a.createCommentVNode("",!0)}}),eD={},tD={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},nD=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"},null,-1)];function rD(t,e){return a.openBlock(),a.createElementBlock("svg",tD,nD)}const iD=be(eD,[["render",rD]]),oD={},sD={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},lD=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"},null,-1)];function aD(t,e){return a.openBlock(),a.createElementBlock("svg",sD,lD)}const cD=be(oD,[["render",aD]]),dD={},uD={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},fD=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"},null,-1)];function hD(t,e){return a.openBlock(),a.createElementBlock("svg",uD,fD)}const pD=be(dD,[["render",hD]]),mD={},gD={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},yD=[a.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"},null,-1)];function bD(t,e){return a.openBlock(),a.createElementBlock("svg",gD,yD)}const kD=be(mD,[["render",bD]]),wD={key:0,class:"w-6 opacity-50"},vD={class:"flex-1"},xD={key:0,class:"mb-2"},ED=Object.assign({name:"WpicAlert"},{props:{title:String,text:String,warning:Boolean,success:Boolean,error:Boolean,info:Boolean},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["py-3 rounded-md text-base flex gap-3 pr-6 mb-3",{"bg-iron-500/10 text-iron-900 dark:bg-iron-500/20 dark:text-iron-200/90":!t.warning&&!t.info&&!t.error&&!t.success,"bg-yellow-500/10 text-yellow-900 dark:bg-yellow-500/20 dark:text-yellow-200/90":t.warning,"bg-purple-500/10 text-purple-900 dark:bg-purple-500/20 dark:text-purple-200/90":t.info,"bg-red-500/10 text-red-900 dark:bg-red-500/20 dark:text-red-200/90":t.error,"bg-emerald-500/10 text-emerald-900 dark:bg-emerald-500/20 dark:text-emerald-200/90":t.success,"pl-4":t.warning||t.info||t.success||t.error,"pl-6":!t.warning&&!t.info&&!t.success&&!t.error}])},[t.warning||t.info||t.success||t.error?(a.openBlock(),a.createElementBlock("div",wD,[t.warning?(a.openBlock(),a.createBlock(iD,{key:0,class:"w-full aspect-square"})):t.info?(a.openBlock(),a.createBlock(cD,{key:1,class:"w-full aspect-square"})):t.success?(a.openBlock(),a.createBlock(pD,{key:2,class:"w-full aspect-square"})):t.error?(a.openBlock(),a.createBlock(kD,{key:3,class:"w-full aspect-square"})):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",vD,[t.title?(a.openBlock(),a.createElementBlock("div",xD,a.toDisplayString(t.title),1)):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(["",{"":!t.warning&&!t.info&&!t.error&&!t.success,"":t.warning,"":t.info,"":t.error,"":t.success}])},[a.renderSlot(e.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(t.text),1)])],2)])],2))}}),Mc=a.ref(!1),Ng=a.ref(""),Mg=a.ref(""),Ag=a.ref(!1),Dg=a.ref(!1),Lg=a.ref(!1);let Bg=()=>{},$g=()=>{};function Ac(){const t=({title:i,text:o,positive:s=!1,negative:l=!1,onConfirm:c,onCancel:d,blur:u=!1})=>{Ng.value=i,Mg.value=o,Ag.value=s,Dg.value=l,Lg.value=u,Bg=c||(()=>{}),$g=d||(()=>{}),Mc.value=!0},e=()=>{Mc.value=!1};return{visible:Mc,title:Ng,text:Mg,positive:Ag,negative:Dg,show:t,onConfirm:()=>{Bg(),e()},onCancel:()=>{$g(),e()},blur:Lg}}const CD={class:"bg-white dark:border dark:border-gray-900 dark:bg-gray-940 p-6 rounded-lg w-128 flex flex-col"},SD={class:"text-lg font-semibold mb-6"},_D={class:"mb-12"},OD={class:"flex justify-end"},Dc={WpicColorPicker:Tf,WpicAlert:ED,WpicToggleSwitch:_f,WpicAdvDateField:U3,WpicCalendar:Oc,WpicTextarea:Of,WpicDialog:J3,WpicSlidePanel:Y3,WpicDateField:L3,WpicFormInput:zi,WpicButton:Ni,WpicBadge:r3,WpicTextEditor:FA,WpicInputGroup:fy,WpicButtonGroup:ay,WpicForm:hy,WpicFormField:Nf,WpicSpinner:Fr,WpicTooltip:Mf,WpicPopover:fr,WpicChoiceList:Sf,WpicCard:gx,WpicCardSection:kx,WpicProgressBar:xx,WpicTag:Cx,WpicTagGroup:Sx,WpicPagination:Zx,WpicLoadingPanel:Nx,WpicTable:ME,WpicTableColumn:AE,WpicTabs:X3,WpicTabPane:Q3,WpicConfirm:be(Object.assign({name:"WpicConfirm"},{setup(t){const{visible:e,title:n,text:r,positive:i,negative:o,onConfirm:s,onCancel:l,blur:c}=Ac();return(d,u)=>a.unref(e)?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(["z-40 fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black/10 dark:bg-black/50 transition-opacity",{"backdrop-blur-md":a.unref(c)}])},[a.createElementVNode("div",CD,[a.createElementVNode("div",SD,a.toDisplayString(a.unref(n)),1),a.createElementVNode("div",_D,a.toDisplayString(a.unref(r)),1),a.createElementVNode("div",OD,[a.createVNode(Ni,{onClick:a.unref(l)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(d.$t("wpiccomponents.cancel")),1)]),_:1},8,["onClick"]),a.createVNode(Ni,{primary:a.unref(i),destructive:a.unref(o),onClick:a.unref(s)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(d.$t("wpiccomponents.confirm")),1)]),_:1},8,["primary","destructive","onClick"])])])],2)):a.createCommentVNode("",!0)}}),[["__scopeId","data-v-e79ca400"]])};function Ig(t,e){for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(typeof e[n]=="object"&&t[n]?Ig(t[n],e[n]):t[n]=e[n])}const TD={useConfirm:Ac};function ND(t,e){Ig(he,e);for(const n in Dc)if(Dc.hasOwnProperty(n)){const r=Dc[n];t.component(r.name,r)}}const MD={install:ND,composables:TD,options:he};ct.default=MD,ct.useConfirm=Ac,Object.defineProperties(ct,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});