function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["./SharedMoreDropdown-DFRHrrY-.js","./floating-ui.vue-BNompikD.js","./SharedMoreDropdown-BWKlox8E.css","./index-5u5REPT4.js","./serialization-DJC7NP0N.js","./Arrow.dom-GBJpMYQS.js","./BlueprintToolbar-Dxc3x0ie.js","./useBlueprintRun-4XdGdDyn.js","./BaseTransitionSlideFade-Cz5sXvu2.js","./BaseTransitionSlideFade-D8wg9qv6.css","./BlueprintToolbar-DwToUjfc.css","./ComponentRenderer-DhkaDGOy.js","./instancePath-BsbOTTI8.js","./ComponentRenderer-Cev5uai4.css","./BuilderApp-CNfRViSf.js","./marked.esm-273vDTCT.js","./BuilderApp-BGEFsTLM.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();const A1="modulepreload",C1=function(e,t){return new URL(e,t).href},jp={},tn=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),i=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.all(n.map(l=>{if(l=C1(l,r),l in jp)return;jp[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(!!r)for(let v=a.length-1;v>=0;v--){const y=a[v];if(y.href===l&&(!c||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${u}`))return;const h=document.createElement("link");if(h.rel=c?"stylesheet":A1,c||(h.as="script",h.crossOrigin=""),h.href=l,i&&h.setAttribute("nonce",i),document.head.appendChild(h),c)return new Promise((v,y)=>{h.addEventListener("load",v),h.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${l}`)))})}))}return o.then(()=>t()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})};/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Nl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Et={},Ma=[],ur=()=>{},$1=()=>!1,oi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),td=e=>e.startsWith("onUpdate:"),Ht=Object.assign,nd=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},S1=Object.prototype.hasOwnProperty,Ot=(e,t)=>S1.call(e,t),Ze=Array.isArray,Oa=e=>Xa(e)==="[object Map]",ua=e=>Xa(e)==="[object Set]",Vp=e=>Xa(e)==="[object Date]",I1=e=>Xa(e)==="[object RegExp]",lt=e=>typeof e=="function",Jt=e=>typeof e=="string",Er=e=>typeof e=="symbol",Vt=e=>e!==null&&typeof e=="object",rd=e=>(Vt(e)||lt(e))&&lt(e.then)&&lt(e.catch),Gm=Object.prototype.toString,Xa=e=>Gm.call(e),E1=e=>Xa(e).slice(8,-1),Rl=e=>Xa(e)==="[object Object]",od=e=>Jt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Na=Nl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ll=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},k1=/-(\w)/g,En=Ll(e=>e.replace(k1,(t,n)=>n?n.toUpperCase():"")),T1=/\B([A-Z])/g,Jn=Ll(e=>e.replace(T1,"-$1").toLowerCase()),ai=Ll(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ms=Ll(e=>e?`on${ai(e)}`:""),Vn=(e,t)=>!Object.is(e,t),Ra=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Jm=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},cl=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ul=e=>{const t=Jt(e)?Number(e):NaN;return isNaN(t)?e:t};let Up;const Dl=()=>Up||(Up=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),x1="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol",P1=Nl(x1);function $t(e){if(Ze(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],o=Jt(r)?R1(r):$t(r);if(o)for(const a in o)t[a]=o[a]}return t}else if(Jt(e)||Vt(e))return e}const M1=/;(?![^(]*\))/g,O1=/:([^]+)/,N1=/\/\*[^]*?\*\//g;function R1(e){const t={};return e.replace(N1,"").split(M1).forEach(n=>{if(n){const r=n.split(O1);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function ct(e){let t="";if(Jt(e))t=e;else if(Ze(e))for(let n=0;n<e.length;n++){const r=ct(e[n]);r&&(t+=r+" ")}else if(Vt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function L1(e){if(!e)return null;let{class:t,style:n}=e;return t&&!Jt(t)&&(e.class=ct(t)),n&&(e.style=$t(n)),e}const D1="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",B1=Nl(D1);function Ym(e){return!!e||e===""}function F1(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Oo(e[r],t[r]);return n}function Oo(e,t){if(e===t)return!0;let n=Vp(e),r=Vp(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Er(e),r=Er(t),n||r)return e===t;if(n=Ze(e),r=Ze(t),n||r)return n&&r?F1(e,t):!1;if(n=Vt(e),r=Vt(t),n||r){if(!n||!r)return!1;const o=Object.keys(e).length,a=Object.keys(t).length;if(o!==a)return!1;for(const s in e){const i=e.hasOwnProperty(s),l=t.hasOwnProperty(s);if(i&&!l||!i&&l||!Oo(e[s],t[s]))return!1}}return String(e)===String(t)}function Bl(e,t){return e.findIndex(n=>Oo(n,t))}const Xm=e=>!!(e&&e.__v_isRef===!0),Me=e=>Jt(e)?e:e==null?"":Ze(e)||Vt(e)&&(e.toString===Gm||!lt(e.toString))?Xm(e)?Me(e.value):JSON.stringify(e,Qm,2):String(e),Qm=(e,t)=>Xm(t)?Qm(e,t.value):Oa(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],a)=>(n[Uc(r,a)+" =>"]=o,n),{})}:ua(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Uc(n))}:Er(t)?Uc(t):Vt(t)&&!Ze(t)&&!Rl(t)?String(t):t,Uc=(e,t="")=>{var n;return Er(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Fn;class ad{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Fn,!t&&Fn&&(this.index=(Fn.scopes||(Fn.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Fn;try{return Fn=this,t()}finally{Fn=n}}}on(){Fn=this}off(){Fn=this.parent}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function j1(e){return new ad(e)}function Zm(){return Fn}function V1(e,t=!1){Fn&&Fn.cleanups.push(e)}let Gt;const Hc=new WeakSet;class Ws{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Fn&&Fn.active&&Fn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Hc.has(this)&&(Hc.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||tv(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Hp(this),nv(this);const t=Gt,n=Sr;Gt=this,Sr=!0;try{return this.fn()}finally{rv(this),Gt=t,Sr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ld(t);this.deps=this.depsTail=void 0,Hp(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Hc.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){gu(this)&&this.run()}get dirty(){return gu(this)}}let ev=0,Os,Ns;function tv(e,t=!1){if(e.flags|=8,t){e.next=Ns,Ns=e;return}e.next=Os,Os=e}function sd(){ev++}function id(){if(--ev>0)return;if(Ns){let t=Ns;for(Ns=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Os;){let t=Os;for(Os=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function nv(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function rv(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),ld(r),U1(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function gu(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ov(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ov(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qs))return;e.globalVersion=qs;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!gu(e)){e.flags&=-3;return}const n=Gt,r=Sr;Gt=e,Sr=!0;try{nv(e);const o=e.fn(e._value);(t.version===0||Vn(o,e._value))&&(e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Gt=n,Sr=r,rv(e),e.flags&=-3}}function ld(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)ld(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function U1(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function H1(e,t){e.effect instanceof Ws&&(e=e.effect.fn);const n=new Ws(e);t&&Ht(n,t);try{n.run()}catch(o){throw n.stop(),o}const r=n.run.bind(n);return r.effect=n,r}function z1(e){e.effect.stop()}let Sr=!0;const av=[];function jo(){av.push(Sr),Sr=!1}function Vo(){const e=av.pop();Sr=e===void 0?!0:e}function Hp(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Gt;Gt=void 0;try{t()}finally{Gt=n}}}let qs=0;class K1{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Fl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!Gt||!Sr||Gt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Gt)n=this.activeLink=new K1(Gt,this),Gt.deps?(n.prevDep=Gt.depsTail,Gt.depsTail.nextDep=n,Gt.depsTail=n):Gt.deps=Gt.depsTail=n,sv(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=Gt.depsTail,n.nextDep=void 0,Gt.depsTail.nextDep=n,Gt.depsTail=n,Gt.deps===n&&(Gt.deps=r)}return n}trigger(t){this.version++,qs++,this.notify(t)}notify(t){sd();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{id()}}}function sv(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)sv(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const dl=new WeakMap,na=Symbol(""),yu=Symbol(""),Gs=Symbol("");function Mn(e,t,n){if(Sr&&Gt){let r=dl.get(e);r||dl.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Fl),o.map=r,o.key=n),o.track()}}function Xr(e,t,n,r,o,a){const s=dl.get(e);if(!s){qs++;return}const i=l=>{l&&l.trigger()};if(sd(),t==="clear")s.forEach(i);else{const l=Ze(e),c=l&&od(n);if(l&&n==="length"){const u=Number(r);s.forEach((d,h)=>{(h==="length"||h===Gs||!Er(h)&&h>=u)&&i(d)})}else switch((n!==void 0||s.has(void 0))&&i(s.get(n)),c&&i(s.get(Gs)),t){case"add":l?c&&i(s.get("length")):(i(s.get(na)),Oa(e)&&i(s.get(yu)));break;case"delete":l||(i(s.get(na)),Oa(e)&&i(s.get(yu)));break;case"set":Oa(e)&&i(s.get(na));break}}id()}function W1(e,t){const n=dl.get(e);return n&&n.get(t)}function Ca(e){const t=gt(e);return t===e?t:(Mn(t,"iterate",Gs),nr(e)?t:t.map(On))}function jl(e){return Mn(e=gt(e),"iterate",Gs),e}const q1={__proto__:null,[Symbol.iterator](){return zc(this,Symbol.iterator,On)},concat(...e){return Ca(this).concat(...e.map(t=>Ze(t)?Ca(t):t))},entries(){return zc(this,"entries",e=>(e[1]=On(e[1]),e))},every(e,t){return Gr(this,"every",e,t,void 0,arguments)},filter(e,t){return Gr(this,"filter",e,t,n=>n.map(On),arguments)},find(e,t){return Gr(this,"find",e,t,On,arguments)},findIndex(e,t){return Gr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Gr(this,"findLast",e,t,On,arguments)},findLastIndex(e,t){return Gr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Gr(this,"forEach",e,t,void 0,arguments)},includes(...e){return Kc(this,"includes",e)},indexOf(...e){return Kc(this,"indexOf",e)},join(e){return Ca(this).join(e)},lastIndexOf(...e){return Kc(this,"lastIndexOf",e)},map(e,t){return Gr(this,"map",e,t,void 0,arguments)},pop(){return gs(this,"pop")},push(...e){return gs(this,"push",e)},reduce(e,...t){return zp(this,"reduce",e,t)},reduceRight(e,...t){return zp(this,"reduceRight",e,t)},shift(){return gs(this,"shift")},some(e,t){return Gr(this,"some",e,t,void 0,arguments)},splice(...e){return gs(this,"splice",e)},toReversed(){return Ca(this).toReversed()},toSorted(e){return Ca(this).toSorted(e)},toSpliced(...e){return Ca(this).toSpliced(...e)},unshift(...e){return gs(this,"unshift",e)},values(){return zc(this,"values",On)}};function zc(e,t,n){const r=jl(e),o=r[t]();return r!==e&&!nr(e)&&(o._next=o.next,o.next=()=>{const a=o._next();return a.value&&(a.value=n(a.value)),a}),o}const G1=Array.prototype;function Gr(e,t,n,r,o,a){const s=jl(e),i=s!==e&&!nr(e),l=s[t];if(l!==G1[t]){const d=l.apply(e,a);return i?On(d):d}let c=n;s!==e&&(i?c=function(d,h){return n.call(this,On(d),h,e)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,e)}));const u=l.call(s,c,r);return i&&o?o(u):u}function zp(e,t,n,r){const o=jl(e);let a=n;return o!==e&&(nr(e)?n.length>3&&(a=function(s,i,l){return n.call(this,s,i,l,e)}):a=function(s,i,l){return n.call(this,s,On(i),l,e)}),o[t](a,...r)}function Kc(e,t,n){const r=gt(e);Mn(r,"iterate",Gs);const o=r[t](...n);return(o===-1||o===!1)&&zl(n[0])?(n[0]=gt(n[0]),r[t](...n)):o}function gs(e,t,n=[]){jo(),sd();const r=gt(e)[t].apply(e,n);return id(),Vo(),r}const J1=Nl("__proto__,__v_isRef,__isVue"),iv=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Er));function Y1(e){Er(e)||(e=String(e));const t=gt(this);return Mn(t,"has",e),t.hasOwnProperty(e)}class lv{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return r===(o?a?hv:pv:a?fv:dv).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const s=Ze(t);if(!o){let l;if(s&&(l=q1[n]))return l;if(n==="hasOwnProperty")return Y1}const i=Reflect.get(t,n,an(t)?t:r);return(Er(n)?iv.has(n):J1(n))||(o||Mn(t,"get",n),a)?i:an(i)?s&&od(n)?i:i.value:Vt(i)?o?Sn(i):Ul(i):i}}class cv extends lv{constructor(t=!1){super(!1,t)}set(t,n,r,o){let a=t[n];if(!this._isShallow){const l=No(a);if(!nr(r)&&!No(r)&&(a=gt(a),r=gt(r)),!Ze(t)&&an(a)&&!an(r))return l?!1:(a.value=r,!0)}const s=Ze(t)&&od(n)?Number(n)<t.length:Ot(t,n),i=Reflect.set(t,n,r,an(t)?t:o);return t===gt(o)&&(s?Vn(r,a)&&Xr(t,"set",n,r):Xr(t,"add",n,r)),i}deleteProperty(t,n){const r=Ot(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&r&&Xr(t,"delete",n,void 0),o}has(t,n){const r=Reflect.has(t,n);return(!Er(n)||!iv.has(n))&&Mn(t,"has",n),r}ownKeys(t){return Mn(t,"iterate",Ze(t)?"length":na),Reflect.ownKeys(t)}}class uv extends lv{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const X1=new cv,Q1=new uv,Z1=new cv(!0),eA=new uv(!0),_u=e=>e,ki=e=>Reflect.getPrototypeOf(e);function tA(e,t,n){return function(...r){const o=this.__v_raw,a=gt(o),s=Oa(a),i=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,c=o[e](...r),u=n?_u:t?bu:On;return!t&&Mn(a,"iterate",l?yu:na),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:i?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Ti(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function nA(e,t){const n={get(o){const a=this.__v_raw,s=gt(a),i=gt(o);e||(Vn(o,i)&&Mn(s,"get",o),Mn(s,"get",i));const{has:l}=ki(s),c=t?_u:e?bu:On;if(l.call(s,o))return c(a.get(o));if(l.call(s,i))return c(a.get(i));a!==s&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Mn(gt(o),"iterate",na),Reflect.get(o,"size",o)},has(o){const a=this.__v_raw,s=gt(a),i=gt(o);return e||(Vn(o,i)&&Mn(s,"has",o),Mn(s,"has",i)),o===i?a.has(o):a.has(o)||a.has(i)},forEach(o,a){const s=this,i=s.__v_raw,l=gt(i),c=t?_u:e?bu:On;return!e&&Mn(l,"iterate",na),i.forEach((u,d)=>o.call(a,c(u),c(d),s))}};return Ht(n,e?{add:Ti("add"),set:Ti("set"),delete:Ti("delete"),clear:Ti("clear")}:{add(o){!t&&!nr(o)&&!No(o)&&(o=gt(o));const a=gt(this);return ki(a).has.call(a,o)||(a.add(o),Xr(a,"add",o,o)),this},set(o,a){!t&&!nr(a)&&!No(a)&&(a=gt(a));const s=gt(this),{has:i,get:l}=ki(s);let c=i.call(s,o);c||(o=gt(o),c=i.call(s,o));const u=l.call(s,o);return s.set(o,a),c?Vn(a,u)&&Xr(s,"set",o,a):Xr(s,"add",o,a),this},delete(o){const a=gt(this),{has:s,get:i}=ki(a);let l=s.call(a,o);l||(o=gt(o),l=s.call(a,o)),i&&i.call(a,o);const c=a.delete(o);return l&&Xr(a,"delete",o,void 0),c},clear(){const o=gt(this),a=o.size!==0,s=o.clear();return a&&Xr(o,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=tA(o,e,t)}),n}function Vl(e,t){const n=nA(e,t);return(r,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?r:Reflect.get(Ot(n,o)&&o in r?n:r,o,a)}const rA={get:Vl(!1,!1)},oA={get:Vl(!1,!0)},aA={get:Vl(!0,!1)},sA={get:Vl(!0,!0)},dv=new WeakMap,fv=new WeakMap,pv=new WeakMap,hv=new WeakMap;function iA(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function lA(e){return e.__v_skip||!Object.isExtensible(e)?0:iA(E1(e))}function Ul(e){return No(e)?e:Hl(e,!1,X1,rA,dv)}function mv(e){return Hl(e,!1,Z1,oA,fv)}function Sn(e){return Hl(e,!0,Q1,aA,pv)}function cA(e){return Hl(e,!0,eA,sA,hv)}function Hl(e,t,n,r,o){if(!Vt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=o.get(e);if(a)return a;const s=lA(e);if(s===0)return e;const i=new Proxy(e,s===2?r:n);return o.set(e,i),i}function ko(e){return No(e)?ko(e.__v_raw):!!(e&&e.__v_isReactive)}function No(e){return!!(e&&e.__v_isReadonly)}function nr(e){return!!(e&&e.__v_isShallow)}function zl(e){return e?!!e.__v_raw:!1}function gt(e){const t=e&&e.__v_raw;return t?gt(t):e}function vv(e){return!Ot(e,"__v_skip")&&Object.isExtensible(e)&&Jm(e,"__v_skip",!0),e}const On=e=>Vt(e)?Ul(e):e,bu=e=>Vt(e)?Sn(e):e;function an(e){return e?e.__v_isRef===!0:!1}function Pe(e){return gv(e,!1)}function Pn(e){return gv(e,!0)}function gv(e,t){return an(e)?e:new uA(e,t)}class uA{constructor(t,n){this.dep=new Fl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:gt(t),this._value=n?t:On(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||nr(t)||No(t);t=r?t:gt(t),Vn(t,n)&&(this._rawValue=t,this._value=r?t:On(t),this.dep.trigger())}}function dA(e){e.dep&&e.dep.trigger()}function x(e){return an(e)?e.value:e}function fA(e){return lt(e)?e():x(e)}const pA={get:(e,t,n)=>t==="__v_raw"?e:x(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return an(o)&&!an(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function cd(e){return ko(e)?e:new Proxy(e,pA)}class hA{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Fl,{get:r,set:o}=t(n.track.bind(n),n.trigger.bind(n));this._get=r,this._set=o}get value(){return this._value=this._get()}set value(t){this._set(t)}}function yv(e){return new hA(e)}function Kl(e){const t=Ze(e)?new Array(e.length):{};for(const n in e)t[n]=_v(e,n);return t}class mA{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return W1(gt(this._object),this._key)}}class vA{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function no(e,t,n){return an(e)?e:lt(e)?new vA(e):Vt(e)&&arguments.length>1?_v(e,t,n):Pe(e)}function _v(e,t,n){const r=e[t];return an(r)?r:new mA(e,t,n)}class gA{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Fl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Gt!==this)return tv(this,!0),!0}get value(){const t=this.dep.track();return ov(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function yA(e,t,n=!1){let r,o;return lt(e)?r=e:(r=e.get,o=e.set),new gA(r,o,n)}const _A={GET:"get",HAS:"has",ITERATE:"iterate"},bA={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},xi={},fl=new WeakMap;let Co;function wA(){return Co}function bv(e,t=!1,n=Co){if(n){let r=fl.get(n);r||fl.set(n,r=[]),r.push(e)}}function AA(e,t,n=Et){const{immediate:r,deep:o,once:a,scheduler:s,augmentJob:i,call:l}=n,c=p=>o?p:nr(p)||o===!1||o===0?Qr(p,1):Qr(p);let u,d,h,v,y=!1,g=!1;if(an(e)?(d=()=>e.value,y=nr(e)):ko(e)?(d=()=>c(e),y=!0):Ze(e)?(g=!0,y=e.some(p=>ko(p)||nr(p)),d=()=>e.map(p=>{if(an(p))return p.value;if(ko(p))return c(p);if(lt(p))return l?l(p,2):p()})):lt(e)?t?d=l?()=>l(e,2):e:d=()=>{if(h){jo();try{h()}finally{Vo()}}const p=Co;Co=u;try{return l?l(e,3,[v]):e(v)}finally{Co=p}}:d=ur,t&&o){const p=d,_=o===!0?1/0:o;d=()=>Qr(p(),_)}const w=Zm(),A=()=>{u.stop(),w&&w.active&&nd(w.effects,u)};if(a&&t){const p=t;t=(..._)=>{p(..._),A()}}let C=g?new Array(e.length).fill(xi):xi;const b=p=>{if(!(!(u.flags&1)||!u.dirty&&!p))if(t){const _=u.run();if(o||y||(g?_.some((S,R)=>Vn(S,C[R])):Vn(_,C))){h&&h();const S=Co;Co=u;try{const R=[_,C===xi?void 0:g&&C[0]===xi?[]:C,v];l?l(t,3,R):t(...R),C=_}finally{Co=S}}}else u.run()};return i&&i(b),u=new Ws(d),u.scheduler=s?()=>s(b,!1):b,v=p=>bv(p,!1,u),h=u.onStop=()=>{const p=fl.get(u);if(p){if(l)l(p,4);else for(const _ of p)_();fl.delete(u)}},t?r?b(!0):C=u.run():s?s(b.bind(null,!0),!0):u.run(),A.pause=u.pause.bind(u),A.resume=u.resume.bind(u),A.stop=A,A}function Qr(e,t=1/0,n){if(t<=0||!Vt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,an(e))Qr(e.value,t,n);else if(Ze(e))for(let r=0;r<e.length;r++)Qr(e[r],t,n);else if(ua(e)||Oa(e))e.forEach(r=>{Qr(r,t,n)});else if(Rl(e)){for(const r in e)Qr(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Qr(e[r],t,n)}return e}/**
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const wv=[];function CA(e){wv.push(e)}function $A(){wv.pop()}function SA(e,t){}const IA={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},EA={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function Qa(e,t,n,r){try{return r?e(...r):e()}catch(o){da(o,t,n)}}function fr(e,t,n,r){if(lt(e)){const o=Qa(e,t,n,r);return o&&rd(o)&&o.catch(a=>{da(a,t,n)}),o}if(Ze(e)){const o=[];for(let a=0;a<e.length;a++)o.push(fr(e[a],t,n,r));return o}}function da(e,t,n,r=!0){const o=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||Et;if(t){let i=t.parent;const l=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;i;){const u=i.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,l,c)===!1)return}i=i.parent}if(a){jo(),Qa(a,null,10,[e,l,c]),Vo();return}}kA(e,n,o,r,s)}function kA(e,t,n,r=!0,o=!1){if(o)throw e;console.error(e)}const Un=[];let Nr=-1;const La=[];let $o=null,Ea=0;const Av=Promise.resolve();let pl=null;function Hn(e){const t=pl||Av;return e?t.then(this?e.bind(this):e):t}function TA(e){let t=Nr+1,n=Un.length;for(;t<n;){const r=t+n>>>1,o=Un[r],a=Ys(o);a<e||a===e&&o.flags&2?t=r+1:n=r}return t}function ud(e){if(!(e.flags&1)){const t=Ys(e),n=Un[Un.length-1];!n||!(e.flags&2)&&t>=Ys(n)?Un.push(e):Un.splice(TA(t),0,e),e.flags|=1,Cv()}}function Cv(){pl||(pl=Av.then($v))}function Js(e){Ze(e)?La.push(...e):$o&&e.id===-1?$o.splice(Ea+1,0,e):e.flags&1||(La.push(e),e.flags|=1),Cv()}function Kp(e,t,n=Nr+1){for(;n<Un.length;n++){const r=Un[n];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;Un.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function hl(e){if(La.length){const t=[...new Set(La)].sort((n,r)=>Ys(n)-Ys(r));if(La.length=0,$o){$o.push(...t);return}for($o=t,Ea=0;Ea<$o.length;Ea++){const n=$o[Ea];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}$o=null,Ea=0}}const Ys=e=>e.id==null?e.flags&2?-1:1/0:e.id;function $v(e){try{for(Nr=0;Nr<Un.length;Nr++){const t=Un[Nr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Qa(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Nr<Un.length;Nr++){const t=Un[Nr];t&&(t.flags&=-2)}Nr=-1,Un.length=0,hl(),pl=null,(Un.length||La.length)&&$v()}}let ka,Pi=[];function Sv(e,t){var n,r;ka=e,ka?(ka.enabled=!0,Pi.forEach(({event:o,args:a})=>ka.emit(o,...a)),Pi=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{Sv(a,t)}),setTimeout(()=>{ka||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Pi=[])},3e3)):Pi=[]}let pn=null,Wl=null;function Xs(e){const t=pn;return pn=e,Wl=e&&e.type.__scopeId||null,t}function xA(e){Wl=e}function PA(){Wl=null}const MA=e=>et;function et(e,t=pn,n){if(!t||e._n)return e;const r=(...o)=>{r._d&&ku(-1);const a=Xs(t);let s;try{s=e(...o)}finally{Xs(a),r._d&&ku(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function hn(e,t){if(pn===null)return e;const n=li(pn),r=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[a,s,i,l=Et]=t[o];a&&(lt(a)&&(a={mounted:a,updated:a}),a.deep&&Qr(s),r.push({dir:a,instance:n,value:s,oldValue:void 0,arg:i,modifiers:l}))}return e}function Rr(e,t,n,r){const o=e.dirs,a=t&&t.dirs;for(let s=0;s<o.length;s++){const i=o[s];a&&(i.oldValue=a[s].value);let l=i.dir[r];l&&(jo(),fr(l,n,8,[e.el,i,e,t]),Vo())}}const Iv=Symbol("_vte"),Ev=e=>e.__isTeleport,Rs=e=>e&&(e.disabled||e.disabled===""),Wp=e=>e&&(e.defer||e.defer===""),qp=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Gp=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,wu=(e,t)=>{const n=e&&e.to;return Jt(n)?t?t(n):null:n},kv={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,a,s,i,l,c){const{mc:u,pc:d,pbc:h,o:{insert:v,querySelector:y,createText:g,createComment:w}}=c,A=Rs(t.props);let{shapeFlag:C,children:b,dynamicChildren:p}=t;if(e==null){const _=t.el=g(""),S=t.anchor=g("");v(_,n,r),v(S,n,r);const R=(X,te)=>{C&16&&(o&&o.isCE&&(o.ce._teleportTarget=X),u(b,X,te,o,a,s,i,l))},Y=()=>{const X=t.target=wu(t.props,y),te=xv(X,t,g,v);X&&(s!=="svg"&&qp(X)?s="svg":s!=="mathml"&&Gp(X)&&(s="mathml"),A||(R(X,te),Qi(t,!1)))};A&&(R(n,S),Qi(t,!0)),Wp(t.props)?un(()=>{Y(),t.el.__isMounted=!0},a):Y()}else{if(Wp(t.props)&&!e.el.__isMounted){un(()=>{kv.process(e,t,n,r,o,a,s,i,l,c),delete e.el.__isMounted},a);return}t.el=e.el,t.targetStart=e.targetStart;const _=t.anchor=e.anchor,S=t.target=e.target,R=t.targetAnchor=e.targetAnchor,Y=Rs(e.props),X=Y?n:S,te=Y?_:R;if(s==="svg"||qp(S)?s="svg":(s==="mathml"||Gp(S))&&(s="mathml"),p?(h(e.dynamicChildren,p,X,o,a,s,i),bd(e,t,!0)):l||d(e,t,X,te,o,a,s,i,!1),A)Y?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Mi(t,n,_,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const $e=t.target=wu(t.props,y);$e&&Mi(t,$e,null,c,0)}else Y&&Mi(t,S,R,c,1);Qi(t,A)}},remove(e,t,n,{um:r,o:{remove:o}},a){const{shapeFlag:s,children:i,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=e;if(d&&(o(c),o(u)),a&&o(l),s&16){const v=a||!Rs(h);for(let y=0;y<i.length;y++){const g=i[y];r(g,t,n,v,!!g.dynamicChildren)}}},move:Mi,hydrate:OA};function Mi(e,t,n,{o:{insert:r},m:o},a=2){a===0&&r(e.targetAnchor,t,n);const{el:s,anchor:i,shapeFlag:l,children:c,props:u}=e,d=a===2;if(d&&r(s,t,n),(!d||Rs(u))&&l&16)for(let h=0;h<c.length;h++)o(c[h],t,n,2);d&&r(i,t,n)}function OA(e,t,n,r,o,a,{o:{nextSibling:s,parentNode:i,querySelector:l,insert:c,createText:u}},d){const h=t.target=wu(t.props,l);if(h){const v=Rs(t.props),y=h._lpa||h.firstChild;if(t.shapeFlag&16)if(v)t.anchor=d(s(e),t,i(e),n,r,o,a),t.targetStart=y,t.targetAnchor=y&&s(y);else{t.anchor=s(e);let g=y;for(;g;){if(g&&g.nodeType===8){if(g.data==="teleport start anchor")t.targetStart=g;else if(g.data==="teleport anchor"){t.targetAnchor=g,h._lpa=t.targetAnchor&&s(t.targetAnchor);break}}g=s(g)}t.targetAnchor||xv(h,t,u,c),d(y&&s(y),t,h,n,r,o,a)}Qi(t,v)}return t.anchor&&s(t.anchor)}const Tv=kv;function Qi(e,t){const n=e.ctx;if(n&&n.ut){let r,o;for(t?(r=e.el,o=e.anchor):(r=e.targetStart,o=e.targetAnchor);r&&r!==o;)r.nodeType===1&&r.setAttribute("data-v-owner",n.uid),r=r.nextSibling;n.ut()}}function xv(e,t,n,r){const o=t.targetStart=n(""),a=t.targetAnchor=n("");return o[Iv]=a,e&&(r(o,e),r(a,e)),a}const So=Symbol("_leaveCb"),Oi=Symbol("_enterCb");function dd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return bn(()=>{e.isMounted=!0}),lo(()=>{e.isUnmounting=!0}),e}const ir=[Function,Array],fd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ir,onEnter:ir,onAfterEnter:ir,onEnterCancelled:ir,onBeforeLeave:ir,onLeave:ir,onAfterLeave:ir,onLeaveCancelled:ir,onBeforeAppear:ir,onAppear:ir,onAfterAppear:ir,onAppearCancelled:ir},Pv=e=>{const t=e.subTree;return t.component?Pv(t.component):t},NA={name:"BaseTransition",props:fd,setup(e,{slots:t}){const n=pr(),r=dd();return()=>{const o=t.default&&ql(t.default(),!0);if(!o||!o.length)return;const a=Mv(o),s=gt(e),{mode:i}=s;if(r.isLeaving)return Wc(a);const l=Jp(a);if(!l)return Wc(a);let c=Ha(l,s,r,n,d=>c=d);l.type!==on&&ro(l,c);let u=n.subTree&&Jp(n.subTree);if(u&&u.type!==on&&!Ar(l,u)&&Pv(n).type!==on){let d=Ha(u,s,r,n);if(ro(u,d),i==="out-in"&&l.type!==on)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},Wc(a);i==="in-out"&&l.type!==on?d.delayLeave=(h,v,y)=>{const g=Nv(r,u);g[String(u.key)]=u,h[So]=()=>{v(),h[So]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{y(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return a}}};function Mv(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==on){t=n;break}}return t}const Ov=NA;function Nv(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Ha(e,t,n,r,o){const{appear:a,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:v,onAfterLeave:y,onLeaveCancelled:g,onBeforeAppear:w,onAppear:A,onAfterAppear:C,onAppearCancelled:b}=t,p=String(e.key),_=Nv(n,e),S=(X,te)=>{X&&fr(X,r,9,te)},R=(X,te)=>{const $e=te[1];S(X,te),Ze(X)?X.every(pe=>pe.length<=1)&&$e():X.length<=1&&$e()},Y={mode:s,persisted:i,beforeEnter(X){let te=l;if(!n.isMounted)if(a)te=w||l;else return;X[So]&&X[So](!0);const $e=_[p];$e&&Ar(e,$e)&&$e.el[So]&&$e.el[So](),S(te,[X])},enter(X){let te=c,$e=u,pe=d;if(!n.isMounted)if(a)te=A||c,$e=C||u,pe=b||d;else return;let we=!1;const ye=X[Oi]=qe=>{we||(we=!0,qe?S(pe,[X]):S($e,[X]),Y.delayedLeave&&Y.delayedLeave(),X[Oi]=void 0)};te?R(te,[X,ye]):ye()},leave(X,te){const $e=String(e.key);if(X[Oi]&&X[Oi](!0),n.isUnmounting)return te();S(h,[X]);let pe=!1;const we=X[So]=ye=>{pe||(pe=!0,te(),ye?S(g,[X]):S(y,[X]),X[So]=void 0,_[$e]===e&&delete _[$e])};_[$e]=e,v?R(v,[X,we]):we()},clone(X){const te=Ha(X,t,n,r,o);return o&&o(te),te}};return Y}function Wc(e){if(si(e))return e=jr(e),e.children=null,e}function Jp(e){if(!si(e))return Ev(e.type)&&e.children?Mv(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&lt(n.default))return n.default()}}function ro(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ro(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ql(e,t=!1,n){let r=[],o=0;for(let a=0;a<e.length;a++){let s=e[a];const i=n==null?s.key:String(n)+String(s.key!=null?s.key:a);s.type===ze?(s.patchFlag&128&&o++,r=r.concat(ql(s.children,t,i))):(t||s.type!==on)&&r.push(i!=null?jr(s,{key:i}):s)}if(o>1)for(let a=0;a<r.length;a++)r[a].patchFlag=-2;return r}/*! #__NO_SIDE_EFFECTS__ */function Ie(e,t){return lt(e)?Ht({name:e.name},t,{setup:e}):e}function RA(){const e=pr();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function pd(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function st(e){const t=pr(),n=Pn(null);if(t){const o=t.refs===Et?t.refs={}:t.refs;Object.defineProperty(o,e,{enumerable:!0,get:()=>n.value,set:a=>n.value=a})}return n}function Qs(e,t,n,r,o=!1){if(Ze(e)){e.forEach((y,g)=>Qs(y,t&&(Ze(t)?t[g]:t),n,r,o));return}if(To(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Qs(e,t,n,r.component.subTree);return}const a=r.shapeFlag&4?li(r.component):r.el,s=o?null:a,{i,r:l}=e,c=t&&t.r,u=i.refs===Et?i.refs={}:i.refs,d=i.setupState,h=gt(d),v=d===Et?()=>!1:y=>Ot(h,y);if(c!=null&&c!==l&&(Jt(c)?(u[c]=null,v(c)&&(d[c]=null)):an(c)&&(c.value=null)),lt(l))Qa(l,i,12,[s,u]);else{const y=Jt(l),g=an(l);if(y||g){const w=()=>{if(e.f){const A=y?v(l)?d[l]:u[l]:l.value;o?Ze(A)&&nd(A,a):Ze(A)?A.includes(a)||A.push(a):y?(u[l]=[a],v(l)&&(d[l]=u[l])):(l.value=[a],e.k&&(u[e.k]=l.value))}else y?(u[l]=s,v(l)&&(d[l]=s)):g&&(l.value=s,e.k&&(u[e.k]=s))};s?(w.id=-1,un(w,n)):w()}}}let Yp=!1;const $a=()=>{Yp||(console.error("Hydration completed but contains mismatches."),Yp=!0)},LA=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",DA=e=>e.namespaceURI.includes("MathML"),Ni=e=>{if(e.nodeType===1){if(LA(e))return"svg";if(DA(e))return"mathml"}},Pa=e=>e.nodeType===8;function BA(e){const{mt:t,p:n,o:{patchProp:r,createText:o,nextSibling:a,parentNode:s,remove:i,insert:l,createComment:c}}=e,u=(b,p)=>{if(!p.hasChildNodes()){n(null,b,p),hl(),p._vnode=b;return}d(p.firstChild,b,null,null,null),hl(),p._vnode=b},d=(b,p,_,S,R,Y=!1)=>{Y=Y||!!p.dynamicChildren;const X=Pa(b)&&b.data==="[",te=()=>g(b,p,_,S,R,X),{type:$e,ref:pe,shapeFlag:we,patchFlag:ye}=p;let qe=b.nodeType;p.el=b,ye===-2&&(Y=!1,p.dynamicChildren=null);let Te=null;switch($e){case xo:qe!==3?p.children===""?(l(p.el=o(""),s(b),b),Te=b):Te=te():(b.data!==p.children&&($a(),b.data=p.children),Te=a(b));break;case on:C(b)?(Te=a(b),A(p.el=b.content.firstChild,b,_)):qe!==8||X?Te=te():Te=a(b);break;case oa:if(X&&(b=a(b),qe=b.nodeType),qe===1||qe===3){Te=b;const Ce=!p.children.length;for(let be=0;be<p.staticCount;be++)Ce&&(p.children+=Te.nodeType===1?Te.outerHTML:Te.data),be===p.staticCount-1&&(p.anchor=Te),Te=a(Te);return X?a(Te):Te}else te();break;case ze:X?Te=y(b,p,_,S,R,Y):Te=te();break;default:if(we&1)(qe!==1||p.type.toLowerCase()!==b.tagName.toLowerCase())&&!C(b)?Te=te():Te=h(b,p,_,S,R,Y);else if(we&6){p.slotScopeIds=R;const Ce=s(b);if(X?Te=w(b):Pa(b)&&b.data==="teleport start"?Te=w(b,b.data,"teleport end"):Te=a(b),t(p,Ce,null,_,S,Ni(Ce),Y),To(p)&&!p.type.__asyncResolved){let be;X?(be=He(ze),be.anchor=Te?Te.previousSibling:Ce.lastChild):be=b.nodeType===3?Bt(""):He("div"),be.el=b,p.component.subTree=be}}else we&64?qe!==8?Te=te():Te=p.type.hydrate(b,p,_,S,R,Y,e,v):we&128&&(Te=p.type.hydrate(b,p,_,S,Ni(s(b)),R,Y,e,d))}return pe!=null&&Qs(pe,null,S,p),Te},h=(b,p,_,S,R,Y)=>{Y=Y||!!p.dynamicChildren;const{type:X,props:te,patchFlag:$e,shapeFlag:pe,dirs:we,transition:ye}=p,qe=X==="input"||X==="option";if(qe||$e!==-1){we&&Rr(p,null,_,"created");let Te=!1;if(C(b)){Te=sg(null,ye)&&_&&_.vnode.props&&_.vnode.props.appear;const be=b.content.firstChild;Te&&ye.beforeEnter(be),A(be,b,_),p.el=b=be}if(pe&16&&!(te&&(te.innerHTML||te.textContent))){let be=v(b.firstChild,p,b,_,S,R,Y);for(;be;){Ri(b,1)||$a();const fe=be;be=be.nextSibling,i(fe)}}else if(pe&8){let be=p.children;be[0]===`
`&&(b.tagName==="PRE"||b.tagName==="TEXTAREA")&&(be=be.slice(1)),b.textContent!==be&&(Ri(b,0)||$a(),b.textContent=p.children)}if(te){if(qe||!Y||$e&48){const be=b.tagName.includes("-");for(const fe in te)(qe&&(fe.endsWith("value")||fe==="indeterminate")||oi(fe)&&!Na(fe)||fe[0]==="."||be)&&r(b,fe,null,te[fe],void 0,_)}else if(te.onClick)r(b,"onClick",null,te.onClick,void 0,_);else if($e&4&&ko(te.style))for(const be in te.style)te.style[be]}let Ce;(Ce=te&&te.onVnodeBeforeMount)&&Wn(Ce,_,p),we&&Rr(p,null,_,"beforeMount"),((Ce=te&&te.onVnodeMounted)||we||Te)&&mg(()=>{Ce&&Wn(Ce,_,p),Te&&ye.enter(b),we&&Rr(p,null,_,"mounted")},S)}return b.nextSibling},v=(b,p,_,S,R,Y,X)=>{X=X||!!p.dynamicChildren;const te=p.children,$e=te.length;for(let pe=0;pe<$e;pe++){const we=X?te[pe]:te[pe]=Gn(te[pe]),ye=we.type===xo;b?(ye&&!X&&pe+1<$e&&Gn(te[pe+1]).type===xo&&(l(o(b.data.slice(we.children.length)),_,a(b)),b.data=we.children),b=d(b,we,S,R,Y,X)):ye&&!we.children?l(we.el=o(""),_):(Ri(_,1)||$a(),n(null,we,_,null,S,R,Ni(_),Y))}return b},y=(b,p,_,S,R,Y)=>{const{slotScopeIds:X}=p;X&&(R=R?R.concat(X):X);const te=s(b),$e=v(a(b),p,te,_,S,R,Y);return $e&&Pa($e)&&$e.data==="]"?a(p.anchor=$e):($a(),l(p.anchor=c("]"),te,$e),$e)},g=(b,p,_,S,R,Y)=>{if(Ri(b.parentElement,1)||$a(),p.el=null,Y){const $e=w(b);for(;;){const pe=a(b);if(pe&&pe!==$e)i(pe);else break}}const X=a(b),te=s(b);return i(b),n(null,p,te,X,_,S,Ni(te),R),_&&(_.vnode.el=p.el,Xl(_,p.el)),X},w=(b,p="[",_="]")=>{let S=0;for(;b;)if(b=a(b),b&&Pa(b)&&(b.data===p&&S++,b.data===_)){if(S===0)return a(b);S--}return b},A=(b,p,_)=>{const S=p.parentNode;S&&S.replaceChild(b,p);let R=_;for(;R;)R.vnode.el===p&&(R.vnode.el=R.subTree.el=b),R=R.parent},C=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[u,d]}const Xp="data-allow-mismatch",FA={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Ri(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Xp);)e=e.parentElement;const n=e&&e.getAttribute(Xp);if(n==null)return!1;if(n==="")return!0;{const r=n.split(",");return t===0&&r.includes("children")?!0:n.split(",").includes(FA[t])}}const jA=Dl().requestIdleCallback||(e=>setTimeout(e,1)),VA=Dl().cancelIdleCallback||(e=>clearTimeout(e)),UA=(e=1e4)=>t=>{const n=jA(t,{timeout:e});return()=>VA(n)};function HA(e){const{top:t,left:n,bottom:r,right:o}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:s}=window;return(t>0&&t<a||r>0&&r<a)&&(n>0&&n<s||o>0&&o<s)}const zA=e=>(t,n)=>{const r=new IntersectionObserver(o=>{for(const a of o)if(a.isIntersecting){r.disconnect(),t();break}},e);return n(o=>{if(o instanceof Element){if(HA(o))return t(),r.disconnect(),!1;r.observe(o)}}),()=>r.disconnect()},KA=e=>t=>{if(e){const n=matchMedia(e);if(n.matches)t();else return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t)}},WA=(e=[])=>(t,n)=>{Jt(e)&&(e=[e]);let r=!1;const o=s=>{r||(r=!0,a(),t(),s.target.dispatchEvent(new s.constructor(s.type,s)))},a=()=>{n(s=>{for(const i of e)s.removeEventListener(i,o)})};return n(s=>{for(const i of e)s.addEventListener(i,o,{once:!0})}),a};function qA(e,t){if(Pa(e)&&e.data==="["){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(Pa(r))if(r.data==="]"){if(--n===0)break}else r.data==="["&&n++;r=r.nextSibling}}else t(e)}const To=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function za(e){lt(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:o=200,hydrate:a,timeout:s,suspensible:i=!0,onError:l}=e;let c=null,u,d=0;const h=()=>(d++,c=null,v()),v=()=>{let y;return c||(y=c=t().catch(g=>{if(g=g instanceof Error?g:new Error(String(g)),l)return new Promise((w,A)=>{l(g,()=>w(h()),()=>A(g),d+1)});throw g}).then(g=>y!==c&&c?c:(g&&(g.__esModule||g[Symbol.toStringTag]==="Module")&&(g=g.default),u=g,g)))};return Ie({name:"AsyncComponentWrapper",__asyncLoader:v,__asyncHydrate(y,g,w){const A=a?()=>{const C=a(w,b=>qA(y,b));C&&(g.bum||(g.bum=[])).push(C)}:w;u?A():v().then(()=>!g.isUnmounted&&A())},get __asyncResolved(){return u},setup(){const y=fn;if(pd(y),u)return()=>qc(u,y);const g=b=>{c=null,da(b,y,13,!r)};if(i&&y.suspense||Ka)return v().then(b=>()=>qc(b,y)).catch(b=>(g(b),()=>r?He(r,{error:b}):null));const w=Pe(!1),A=Pe(),C=Pe(!!o);return o&&setTimeout(()=>{C.value=!1},o),s!=null&&setTimeout(()=>{if(!w.value&&!A.value){const b=new Error(`Async component timed out after ${s}ms.`);g(b),A.value=b}},s),v().then(()=>{w.value=!0,y.parent&&si(y.parent.vnode)&&y.parent.update()}).catch(b=>{g(b),A.value=b}),()=>{if(w.value&&u)return qc(u,y);if(A.value&&r)return He(r,{error:A.value});if(n&&!C.value)return He(n)}}})}function qc(e,t){const{ref:n,props:r,children:o,ce:a}=t.vnode,s=He(e,r,o);return s.ref=n,s.ce=a,delete t.vnode.ce,s}const si=e=>e.type.__isKeepAlive,GA={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=pr(),r=n.ctx;if(!r.renderer)return()=>{const C=t.default&&t.default();return C&&C.length===1?C[0]:C};const o=new Map,a=new Set;let s=null;const i=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=r,h=d("div");r.activate=(C,b,p,_,S)=>{const R=C.component;c(C,b,p,0,i),l(R.vnode,C,b,p,R,i,_,C.slotScopeIds,S),un(()=>{R.isDeactivated=!1,R.a&&Ra(R.a);const Y=C.props&&C.props.onVnodeMounted;Y&&Wn(Y,R.parent,C)},i)},r.deactivate=C=>{const b=C.component;vl(b.m),vl(b.a),c(C,h,null,1,i),un(()=>{b.da&&Ra(b.da);const p=C.props&&C.props.onVnodeUnmounted;p&&Wn(p,b.parent,C),b.isDeactivated=!0},i)};function v(C){Gc(C),u(C,n,i,!0)}function y(C){o.forEach((b,p)=>{const _=Ou(b.type);_&&!C(_)&&g(p)})}function g(C){const b=o.get(C);b&&(!s||!Ar(b,s))?v(b):s&&Gc(s),o.delete(C),a.delete(C)}Ge(()=>[e.include,e.exclude],([C,b])=>{C&&y(p=>Es(C,p)),b&&y(p=>!Es(b,p))},{flush:"post",deep:!0});let w=null;const A=()=>{w!=null&&(gl(n.subTree.type)?un(()=>{o.set(w,Li(n.subTree))},n.subTree.suspense):o.set(w,Li(n.subTree)))};return bn(A),Jl(A),lo(()=>{o.forEach(C=>{const{subTree:b,suspense:p}=n,_=Li(b);if(C.type===_.type&&C.key===_.key){Gc(_);const S=_.component.da;S&&un(S,p);return}v(C)})}),()=>{if(w=null,!t.default)return s=null;const C=t.default(),b=C[0];if(C.length>1)return s=null,C;if(!ao(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return s=null,b;let p=Li(b);if(p.type===on)return s=null,p;const _=p.type,S=Ou(To(p)?p.type.__asyncResolved||{}:_),{include:R,exclude:Y,max:X}=e;if(R&&(!S||!Es(R,S))||Y&&S&&Es(Y,S))return p.shapeFlag&=-257,s=p,b;const te=p.key==null?_:p.key,$e=o.get(te);return p.el&&(p=jr(p),b.shapeFlag&128&&(b.ssContent=p)),w=te,$e?(p.el=$e.el,p.component=$e.component,p.transition&&ro(p,p.transition),p.shapeFlag|=512,a.delete(te),a.add(te)):(a.add(te),X&&a.size>parseInt(X,10)&&g(a.values().next().value)),p.shapeFlag|=256,s=p,gl(b.type)?b:p}}},JA=GA;function Es(e,t){return Ze(e)?e.some(n=>Es(n,t)):Jt(e)?e.split(",").includes(t):I1(e)?(e.lastIndex=0,e.test(t)):!1}function Rv(e,t){Dv(e,"a",t)}function Lv(e,t){Dv(e,"da",t)}function Dv(e,t,n=fn){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Gl(t,r,n),n){let o=n.parent;for(;o&&o.parent;)si(o.parent.vnode)&&YA(r,t,n,o),o=o.parent}}function YA(e,t,n,r){const o=Gl(t,e,r,!0);Pr(()=>{nd(r[t],o)},n)}function Gc(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Li(e){return e.shapeFlag&128?e.ssContent:e}function Gl(e,t,n=fn,r=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...s)=>{jo();const i=sa(n),l=fr(t,n,e,s);return i(),Vo(),l});return r?o.unshift(a):o.push(a),a}}const io=e=>(t,n=fn)=>{(!Ka||e==="sp")&&Gl(e,(...r)=>t(...r),n)},Za=io("bm"),bn=io("m"),hd=io("bu"),Jl=io("u"),lo=io("bum"),Pr=io("um"),Bv=io("sp"),Fv=io("rtg"),jv=io("rtc");function Vv(e,t=fn){Gl("ec",e,t)}const md="components",XA="directives";function QA(e,t){return vd(md,e,!0,t)||e}const Uv=Symbol.for("v-ndc");function es(e){return Jt(e)?vd(md,e,!1)||e:e||Uv}function Hv(e){return vd(XA,e)}function vd(e,t,n=!0,r=!1){const o=pn||fn;if(o){const a=o.type;if(e===md){const i=Ou(a,!1);if(i&&(i===t||i===En(t)||i===ai(En(t))))return a}const s=Qp(o[e]||a[e],t)||Qp(o.appContext[e],t);return!s&&r?a:s}}function Qp(e,t){return e&&(e[t]||e[En(t)]||e[ai(En(t))])}function xt(e,t,n,r){let o;const a=n&&n[r],s=Ze(e);if(s||Jt(e)){const i=s&&ko(e);let l=!1;i&&(l=!nr(e),e=jl(e)),o=new Array(e.length);for(let c=0,u=e.length;c<u;c++)o[c]=t(l?On(e[c]):e[c],c,void 0,a&&a[c])}else if(typeof e=="number"){o=new Array(e);for(let i=0;i<e;i++)o[i]=t(i+1,i,void 0,a&&a[i])}else if(Vt(e))if(e[Symbol.iterator])o=Array.from(e,(i,l)=>t(i,l,void 0,a&&a[l]));else{const i=Object.keys(e);o=new Array(i.length);for(let l=0,c=i.length;l<c;l++){const u=i[l];o[l]=t(e[u],u,l,a&&a[l])}}else o=[];return n&&(n[r]=o),o}function ZA(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(Ze(r))for(let o=0;o<r.length;o++)e[r[o].name]=r[o].fn;else r&&(e[r.name]=r.key?(...o)=>{const a=r.fn(...o);return a&&(a.key=r.key),a}:r.fn)}return e}function Yt(e,t,n={},r,o){if(pn.ce||pn.parent&&To(pn.parent)&&pn.parent.ce)return t!=="default"&&(n.name=t),I(),Ve(ze,null,[He("slot",n,r&&r())],64);let a=e[t];a&&a._c&&(a._d=!1),I();const s=a&&gd(a(n)),i=n.key||s&&s.key,l=Ve(ze,{key:(i&&!Er(i)?i:`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&e._===1?64:-2);return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),a&&a._c&&(a._d=!0),l}function gd(e){return e.some(t=>ao(t)?!(t.type===on||t.type===ze&&!gd(t.children)):!0)?e:null}function eC(e,t){const n={};for(const r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:Ms(r)]=e[r];return n}const Au=e=>e?wg(e)?li(e):Au(e.parent):null,Ls=Ht(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Au(e.parent),$root:e=>Au(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>yd(e),$forceUpdate:e=>e.f||(e.f=()=>{ud(e.update)}),$nextTick:e=>e.n||(e.n=Hn.bind(e.proxy)),$watch:e=>PC.bind(e)}),Jc=(e,t)=>e!==Et&&!e.__isScriptSetup&&Ot(e,t),Cu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:a,accessCache:s,type:i,appContext:l}=e;let c;if(t[0]!=="$"){const v=s[t];if(v!==void 0)switch(v){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(Jc(r,t))return s[t]=1,r[t];if(o!==Et&&Ot(o,t))return s[t]=2,o[t];if((c=e.propsOptions[0])&&Ot(c,t))return s[t]=3,a[t];if(n!==Et&&Ot(n,t))return s[t]=4,n[t];$u&&(s[t]=0)}}const u=Ls[t];let d,h;if(u)return t==="$attrs"&&Mn(e.attrs,"get",""),u(e);if((d=i.__cssModules)&&(d=d[t]))return d;if(n!==Et&&Ot(n,t))return s[t]=4,n[t];if(h=l.config.globalProperties,Ot(h,t))return h[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:a}=e;return Jc(o,t)?(o[t]=n,!0):r!==Et&&Ot(r,t)?(r[t]=n,!0):Ot(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,propsOptions:a}},s){let i;return!!n[s]||e!==Et&&Ot(e,s)||Jc(t,s)||(i=a[0])&&Ot(i,s)||Ot(r,s)||Ot(Ls,s)||Ot(o.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ot(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},tC=Ht({},Cu,{get(e,t){if(t!==Symbol.unscopables)return Cu.get(e,t,e)},has(e,t){return t[0]!=="_"&&!P1(t)}});function nC(){return null}function rC(){return null}function oC(e){}function aC(e){}function sC(){return null}function iC(){}function lC(e,t){return null}function cC(){return zv().slots}function uC(){return zv().attrs}function zv(){const e=pr();return e.setupContext||(e.setupContext=$g(e))}function Zs(e){return Ze(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function dC(e,t){const n=Zs(e);for(const r in t){if(r.startsWith("__skip"))continue;let o=n[r];o?Ze(o)||lt(o)?o=n[r]={type:o,default:t[r]}:o.default=t[r]:o===null&&(o=n[r]={default:t[r]}),o&&t[`__skip_${r}`]&&(o.skipFactory=!0)}return n}function oo(e,t){return!e||!t?e||t:Ze(e)&&Ze(t)?e.concat(t):Ht({},Zs(e),Zs(t))}function fC(e,t){const n={};for(const r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function pC(e){const t=pr();let n=e();return xu(),rd(n)&&(n=n.catch(r=>{throw sa(t),r})),[n,()=>sa(t)]}let $u=!0;function hC(e){const t=yd(e),n=e.proxy,r=e.ctx;$u=!1,t.beforeCreate&&Zp(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:s,watch:i,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:v,updated:y,activated:g,deactivated:w,beforeDestroy:A,beforeUnmount:C,destroyed:b,unmounted:p,render:_,renderTracked:S,renderTriggered:R,errorCaptured:Y,serverPrefetch:X,expose:te,inheritAttrs:$e,components:pe,directives:we,filters:ye}=t;if(c&&mC(c,r,null),s)for(const Ce in s){const be=s[Ce];lt(be)&&(r[Ce]=be.bind(n))}if(o){const Ce=o.call(n,n);Vt(Ce)&&(e.data=Ul(Ce))}if($u=!0,a)for(const Ce in a){const be=a[Ce],fe=lt(be)?be.bind(n,n):lt(be.get)?be.get.bind(n,n):ur,de=!lt(be)&&lt(be.set)?be.set.bind(n):ur,L=W({get:fe,set:de});Object.defineProperty(r,Ce,{enumerable:!0,configurable:!0,get:()=>L.value,set:le=>L.value=le})}if(i)for(const Ce in i)Kv(i[Ce],r,n,Ce);if(l){const Ce=lt(l)?l.call(n):l;Reflect.ownKeys(Ce).forEach(be=>{qv(be,Ce[be])})}u&&Zp(u,e,"c");function Te(Ce,be){Ze(be)?be.forEach(fe=>Ce(fe.bind(n))):be&&Ce(be.bind(n))}if(Te(Za,d),Te(bn,h),Te(hd,v),Te(Jl,y),Te(Rv,g),Te(Lv,w),Te(Vv,Y),Te(jv,S),Te(Fv,R),Te(lo,C),Te(Pr,p),Te(Bv,X),Ze(te))if(te.length){const Ce=e.exposed||(e.exposed={});te.forEach(be=>{Object.defineProperty(Ce,be,{get:()=>n[be],set:fe=>n[be]=fe})})}else e.exposed||(e.exposed={});_&&e.render===ur&&(e.render=_),$e!=null&&(e.inheritAttrs=$e),pe&&(e.components=pe),we&&(e.directives=we),X&&pd(e)}function mC(e,t,n=ur){Ze(e)&&(e=Su(e));for(const r in e){const o=e[r];let a;Vt(o)?"default"in o?a=ee(o.from||r,o.default,!0):a=ee(o.from||r):a=ee(o),an(a)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>a.value,set:s=>a.value=s}):t[r]=a}}function Zp(e,t,n){fr(Ze(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Kv(e,t,n,r){let o=r.includes(".")?dg(n,r):()=>n[r];if(Jt(e)){const a=t[e];lt(a)&&Ge(o,a)}else if(lt(e))Ge(o,e.bind(n));else if(Vt(e))if(Ze(e))e.forEach(a=>Kv(a,t,n,r));else{const a=lt(e.handler)?e.handler.bind(n):t[e.handler];lt(a)&&Ge(o,a,e)}}function yd(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:s}}=e.appContext,i=a.get(t);let l;return i?l=i:!o.length&&!n&&!r?l=t:(l={},o.length&&o.forEach(c=>ml(l,c,s,!0)),ml(l,t,s)),Vt(t)&&a.set(t,l),l}function ml(e,t,n,r=!1){const{mixins:o,extends:a}=t;a&&ml(e,a,n,!0),o&&o.forEach(s=>ml(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const i=vC[s]||n&&n[s];e[s]=i?i(e[s],t[s]):t[s]}return e}const vC={data:eh,props:th,emits:th,methods:ks,computed:ks,beforeCreate:Bn,created:Bn,beforeMount:Bn,mounted:Bn,beforeUpdate:Bn,updated:Bn,beforeDestroy:Bn,beforeUnmount:Bn,destroyed:Bn,unmounted:Bn,activated:Bn,deactivated:Bn,errorCaptured:Bn,serverPrefetch:Bn,components:ks,directives:ks,watch:yC,provide:eh,inject:gC};function eh(e,t){return t?e?function(){return Ht(lt(e)?e.call(this,this):e,lt(t)?t.call(this,this):t)}:t:e}function gC(e,t){return ks(Su(e),Su(t))}function Su(e){if(Ze(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Bn(e,t){return e?[...new Set([].concat(e,t))]:t}function ks(e,t){return e?Ht(Object.create(null),e,t):t}function th(e,t){return e?Ze(e)&&Ze(t)?[...new Set([...e,...t])]:Ht(Object.create(null),Zs(e),Zs(t??{})):t}function yC(e,t){if(!e)return t;if(!t)return e;const n=Ht(Object.create(null),e);for(const r in t)n[r]=Bn(e[r],t[r]);return n}function Wv(){return{app:null,config:{isNativeTag:$1,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let _C=0;function bC(e,t){return function(r,o=null){lt(r)||(r=Ht({},r)),o!=null&&!Vt(o)&&(o=null);const a=Wv(),s=new WeakSet,i=[];let l=!1;const c=a.app={_uid:_C++,_component:r,_props:o,_container:null,_context:a,_instance:null,version:Ig,get config(){return a.config},set config(u){},use(u,...d){return s.has(u)||(u&&lt(u.install)?(s.add(u),u.install(c,...d)):lt(u)&&(s.add(u),u(c,...d))),c},mixin(u){return a.mixins.includes(u)||a.mixins.push(u),c},component(u,d){return d?(a.components[u]=d,c):a.components[u]},directive(u,d){return d?(a.directives[u]=d,c):a.directives[u]},mount(u,d,h){if(!l){const v=c._ceVNode||He(r,o);return v.appContext=a,h===!0?h="svg":h===!1&&(h=void 0),d&&t?t(v,u):e(v,u,h),l=!0,c._container=u,u.__vue_app__=c,li(v.component)}},onUnmount(u){i.push(u)},unmount(){l&&(fr(i,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return a.provides[u]=d,c},runWithContext(u){const d=ra;ra=c;try{return u()}finally{ra=d}}};return c}}let ra=null;function qv(e,t){if(fn){let n=fn.provides;const r=fn.parent&&fn.parent.provides;r===n&&(n=fn.provides=Object.create(r)),n[e]=t}}function ee(e,t,n=!1){const r=fn||pn;if(r||ra){const o=ra?ra._context.provides:r?r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&lt(t)?t.call(r&&r.proxy):t}}function wC(){return!!(fn||pn||ra)}const Gv={},Jv=()=>Object.create(Gv),Yv=e=>Object.getPrototypeOf(e)===Gv;function AC(e,t,n,r=!1){const o={},a=Jv();e.propsDefaults=Object.create(null),Xv(e,t,o,a);for(const s in e.propsOptions[0])s in o||(o[s]=void 0);n?e.props=r?o:mv(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function CC(e,t,n,r){const{props:o,attrs:a,vnode:{patchFlag:s}}=e,i=gt(o),[l]=e.propsOptions;let c=!1;if((r||s>0)&&!(s&16)){if(s&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(Yl(e.emitsOptions,h))continue;const v=t[h];if(l)if(Ot(a,h))v!==a[h]&&(a[h]=v,c=!0);else{const y=En(h);o[y]=Iu(l,i,y,v,e,!1)}else v!==a[h]&&(a[h]=v,c=!0)}}}else{Xv(e,t,o,a)&&(c=!0);let u;for(const d in i)(!t||!Ot(t,d)&&((u=Jn(d))===d||!Ot(t,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(o[d]=Iu(l,i,d,void 0,e,!0)):delete o[d]);if(a!==i)for(const d in a)(!t||!Ot(t,d))&&(delete a[d],c=!0)}c&&Xr(e.attrs,"set","")}function Xv(e,t,n,r){const[o,a]=e.propsOptions;let s=!1,i;if(t)for(let l in t){if(Na(l))continue;const c=t[l];let u;o&&Ot(o,u=En(l))?!a||!a.includes(u)?n[u]=c:(i||(i={}))[u]=c:Yl(e.emitsOptions,l)||(!(l in r)||c!==r[l])&&(r[l]=c,s=!0)}if(a){const l=gt(n),c=i||Et;for(let u=0;u<a.length;u++){const d=a[u];n[d]=Iu(o,l,d,c[d],e,!Ot(c,d))}}return s}function Iu(e,t,n,r,o,a){const s=e[n];if(s!=null){const i=Ot(s,"default");if(i&&r===void 0){const l=s.default;if(s.type!==Function&&!s.skipFactory&&lt(l)){const{propsDefaults:c}=o;if(n in c)r=c[n];else{const u=sa(o);r=c[n]=l.call(null,t),u()}}else r=l;o.ce&&o.ce._setProp(n,r)}s[0]&&(a&&!i?r=!1:s[1]&&(r===""||r===Jn(n))&&(r=!0))}return r}const $C=new WeakMap;function Qv(e,t,n=!1){const r=n?$C:t.propsCache,o=r.get(e);if(o)return o;const a=e.props,s={},i=[];let l=!1;if(!lt(e)){const u=d=>{l=!0;const[h,v]=Qv(d,t,!0);Ht(s,h),v&&i.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!a&&!l)return Vt(e)&&r.set(e,Ma),Ma;if(Ze(a))for(let u=0;u<a.length;u++){const d=En(a[u]);nh(d)&&(s[d]=Et)}else if(a)for(const u in a){const d=En(u);if(nh(d)){const h=a[u],v=s[d]=Ze(h)||lt(h)?{type:h}:Ht({},h),y=v.type;let g=!1,w=!0;if(Ze(y))for(let A=0;A<y.length;++A){const C=y[A],b=lt(C)&&C.name;if(b==="Boolean"){g=!0;break}else b==="String"&&(w=!1)}else g=lt(y)&&y.name==="Boolean";v[0]=g,v[1]=w,(g||Ot(v,"default"))&&i.push(d)}}const c=[s,i];return Vt(e)&&r.set(e,c),c}function nh(e){return e[0]!=="$"&&!Na(e)}const Zv=e=>e[0]==="_"||e==="$stable",_d=e=>Ze(e)?e.map(Gn):[Gn(e)],SC=(e,t,n)=>{if(t._n)return t;const r=et((...o)=>_d(t(...o)),n);return r._c=!1,r},eg=(e,t,n)=>{const r=e._ctx;for(const o in e){if(Zv(o))continue;const a=e[o];if(lt(a))t[o]=SC(o,a,r);else if(a!=null){const s=_d(a);t[o]=()=>s}}},tg=(e,t)=>{const n=_d(t);e.slots.default=()=>n},ng=(e,t,n)=>{for(const r in t)(n||r!=="_")&&(e[r]=t[r])},IC=(e,t,n)=>{const r=e.slots=Jv();if(e.vnode.shapeFlag&32){const o=t._;o?(ng(r,t,n),n&&Jm(r,"_",o,!0)):eg(t,r)}else t&&tg(e,t)},EC=(e,t,n)=>{const{vnode:r,slots:o}=e;let a=!0,s=Et;if(r.shapeFlag&32){const i=t._;i?n&&i===1?a=!1:ng(o,t,n):(a=!t.$stable,eg(t,o)),s=t}else t&&(tg(e,t),s={default:1});if(a)for(const i in o)!Zv(i)&&s[i]==null&&delete o[i]},un=mg;function rg(e){return ag(e)}function og(e){return ag(e,BA)}function ag(e,t){const n=Dl();n.__VUE__=!0;const{insert:r,remove:o,patchProp:a,createElement:s,createText:i,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:v=ur,insertStaticContent:y}=e,g=(k,P,ie,ve=null,F=null,K=null,oe=void 0,V=null,H=!!P.dynamicChildren)=>{if(k===P)return;k&&!Ar(k,P)&&(ve=Be(k),le(k,F,K,!0),k=null),P.patchFlag===-2&&(H=!1,P.dynamicChildren=null);const{type:G,ref:he,shapeFlag:ge}=P;switch(G){case xo:w(k,P,ie,ve);break;case on:A(k,P,ie,ve);break;case oa:k==null&&C(P,ie,ve,oe);break;case ze:pe(k,P,ie,ve,F,K,oe,V,H);break;default:ge&1?_(k,P,ie,ve,F,K,oe,V,H):ge&6?we(k,P,ie,ve,F,K,oe,V,H):(ge&64||ge&128)&&G.process(k,P,ie,ve,F,K,oe,V,H,Q)}he!=null&&F&&Qs(he,k&&k.ref,K,P||k,!P)},w=(k,P,ie,ve)=>{if(k==null)r(P.el=i(P.children),ie,ve);else{const F=P.el=k.el;P.children!==k.children&&c(F,P.children)}},A=(k,P,ie,ve)=>{k==null?r(P.el=l(P.children||""),ie,ve):P.el=k.el},C=(k,P,ie,ve)=>{[k.el,k.anchor]=y(k.children,P,ie,ve,k.el,k.anchor)},b=({el:k,anchor:P},ie,ve)=>{let F;for(;k&&k!==P;)F=h(k),r(k,ie,ve),k=F;r(P,ie,ve)},p=({el:k,anchor:P})=>{let ie;for(;k&&k!==P;)ie=h(k),o(k),k=ie;o(P)},_=(k,P,ie,ve,F,K,oe,V,H)=>{P.type==="svg"?oe="svg":P.type==="math"&&(oe="mathml"),k==null?S(P,ie,ve,F,K,oe,V,H):X(k,P,F,K,oe,V,H)},S=(k,P,ie,ve,F,K,oe,V)=>{let H,G;const{props:he,shapeFlag:ge,transition:xe,dirs:Fe}=k;if(H=k.el=s(k.type,K,he&&he.is,he),ge&8?u(H,k.children):ge&16&&Y(k.children,H,null,ve,F,Yc(k,K),oe,V),Fe&&Rr(k,null,ve,"created"),R(H,k,k.scopeId,oe,ve),he){for(const pt in he)pt!=="value"&&!Na(pt)&&a(H,pt,null,he[pt],K,ve);"value"in he&&a(H,"value",null,he.value,K),(G=he.onVnodeBeforeMount)&&Wn(G,ve,k)}Fe&&Rr(k,null,ve,"beforeMount");const ot=sg(F,xe);ot&&xe.beforeEnter(H),r(H,P,ie),((G=he&&he.onVnodeMounted)||ot||Fe)&&un(()=>{G&&Wn(G,ve,k),ot&&xe.enter(H),Fe&&Rr(k,null,ve,"mounted")},F)},R=(k,P,ie,ve,F)=>{if(ie&&v(k,ie),ve)for(let K=0;K<ve.length;K++)v(k,ve[K]);if(F){let K=F.subTree;if(P===K||gl(K.type)&&(K.ssContent===P||K.ssFallback===P)){const oe=F.vnode;R(k,oe,oe.scopeId,oe.slotScopeIds,F.parent)}}},Y=(k,P,ie,ve,F,K,oe,V,H=0)=>{for(let G=H;G<k.length;G++){const he=k[G]=V?Io(k[G]):Gn(k[G]);g(null,he,P,ie,ve,F,K,oe,V)}},X=(k,P,ie,ve,F,K,oe)=>{const V=P.el=k.el;let{patchFlag:H,dynamicChildren:G,dirs:he}=P;H|=k.patchFlag&16;const ge=k.props||Et,xe=P.props||Et;let Fe;if(ie&&Go(ie,!1),(Fe=xe.onVnodeBeforeUpdate)&&Wn(Fe,ie,P,k),he&&Rr(P,k,ie,"beforeUpdate"),ie&&Go(ie,!0),(ge.innerHTML&&xe.innerHTML==null||ge.textContent&&xe.textContent==null)&&u(V,""),G?te(k.dynamicChildren,G,V,ie,ve,Yc(P,F),K):oe||be(k,P,V,null,ie,ve,Yc(P,F),K,!1),H>0){if(H&16)$e(V,ge,xe,ie,F);else if(H&2&&ge.class!==xe.class&&a(V,"class",null,xe.class,F),H&4&&a(V,"style",ge.style,xe.style,F),H&8){const ot=P.dynamicProps;for(let pt=0;pt<ot.length;pt++){const dt=ot[pt],Xt=ge[dt],Nt=xe[dt];(Nt!==Xt||dt==="value")&&a(V,dt,Xt,Nt,F,ie)}}H&1&&k.children!==P.children&&u(V,P.children)}else!oe&&G==null&&$e(V,ge,xe,ie,F);((Fe=xe.onVnodeUpdated)||he)&&un(()=>{Fe&&Wn(Fe,ie,P,k),he&&Rr(P,k,ie,"updated")},ve)},te=(k,P,ie,ve,F,K,oe)=>{for(let V=0;V<P.length;V++){const H=k[V],G=P[V],he=H.el&&(H.type===ze||!Ar(H,G)||H.shapeFlag&70)?d(H.el):ie;g(H,G,he,null,ve,F,K,oe,!0)}},$e=(k,P,ie,ve,F)=>{if(P!==ie){if(P!==Et)for(const K in P)!Na(K)&&!(K in ie)&&a(k,K,P[K],null,F,ve);for(const K in ie){if(Na(K))continue;const oe=ie[K],V=P[K];oe!==V&&K!=="value"&&a(k,K,V,oe,F,ve)}"value"in ie&&a(k,"value",P.value,ie.value,F)}},pe=(k,P,ie,ve,F,K,oe,V,H)=>{const G=P.el=k?k.el:i(""),he=P.anchor=k?k.anchor:i("");let{patchFlag:ge,dynamicChildren:xe,slotScopeIds:Fe}=P;Fe&&(V=V?V.concat(Fe):Fe),k==null?(r(G,ie,ve),r(he,ie,ve),Y(P.children||[],ie,he,F,K,oe,V,H)):ge>0&&ge&64&&xe&&k.dynamicChildren?(te(k.dynamicChildren,xe,ie,F,K,oe,V),(P.key!=null||F&&P===F.subTree)&&bd(k,P,!0)):be(k,P,ie,he,F,K,oe,V,H)},we=(k,P,ie,ve,F,K,oe,V,H)=>{P.slotScopeIds=V,k==null?P.shapeFlag&512?F.ctx.activate(P,ie,ve,oe,H):ye(P,ie,ve,F,K,oe,H):qe(k,P,H)},ye=(k,P,ie,ve,F,K,oe)=>{const V=k.component=bg(k,ve,F);if(si(k)&&(V.ctx.renderer=Q),Ag(V,!1,oe),V.asyncDep){if(F&&F.registerDep(V,Te,oe),!k.el){const H=V.subTree=He(on);A(null,H,P,ie)}}else Te(V,k,P,ie,F,K,oe)},qe=(k,P,ie)=>{const ve=P.component=k.component;if(LC(k,P,ie))if(ve.asyncDep&&!ve.asyncResolved){Ce(ve,P,ie);return}else ve.next=P,ve.update();else P.el=k.el,ve.vnode=P},Te=(k,P,ie,ve,F,K,oe)=>{const V=()=>{if(k.isMounted){let{next:ge,bu:xe,u:Fe,parent:ot,vnode:pt}=k;{const ce=ig(k);if(ce){ge&&(ge.el=pt.el,Ce(k,ge,oe)),ce.asyncDep.then(()=>{k.isUnmounted||V()});return}}let dt=ge,Xt;Go(k,!1),ge?(ge.el=pt.el,Ce(k,ge,oe)):ge=pt,xe&&Ra(xe),(Xt=ge.props&&ge.props.onVnodeBeforeUpdate)&&Wn(Xt,ot,ge,pt),Go(k,!0);const Nt=Zi(k),en=k.subTree;k.subTree=Nt,g(en,Nt,d(en.el),Be(en),k,F,K),ge.el=Nt.el,dt===null&&Xl(k,Nt.el),Fe&&un(Fe,F),(Xt=ge.props&&ge.props.onVnodeUpdated)&&un(()=>Wn(Xt,ot,ge,pt),F)}else{let ge;const{el:xe,props:Fe}=P,{bm:ot,m:pt,parent:dt,root:Xt,type:Nt}=k,en=To(P);if(Go(k,!1),ot&&Ra(ot),!en&&(ge=Fe&&Fe.onVnodeBeforeMount)&&Wn(ge,dt,P),Go(k,!0),xe&&Se){const ce=()=>{k.subTree=Zi(k),Se(xe,k.subTree,k,F,null)};en&&Nt.__asyncHydrate?Nt.__asyncHydrate(xe,k,ce):ce()}else{Xt.ce&&Xt.ce._injectChildStyle(Nt);const ce=k.subTree=Zi(k);g(null,ce,ie,ve,k,F,K),P.el=ce.el}if(pt&&un(pt,F),!en&&(ge=Fe&&Fe.onVnodeMounted)){const ce=P;un(()=>Wn(ge,dt,ce),F)}(P.shapeFlag&256||dt&&To(dt.vnode)&&dt.vnode.shapeFlag&256)&&k.a&&un(k.a,F),k.isMounted=!0,P=ie=ve=null}};k.scope.on();const H=k.effect=new Ws(V);k.scope.off();const G=k.update=H.run.bind(H),he=k.job=H.runIfDirty.bind(H);he.i=k,he.id=k.uid,H.scheduler=()=>ud(he),Go(k,!0),G()},Ce=(k,P,ie)=>{P.component=k;const ve=k.vnode.props;k.vnode=P,k.next=null,CC(k,P.props,ve,ie),EC(k,P.children,ie),jo(),Kp(k),Vo()},be=(k,P,ie,ve,F,K,oe,V,H=!1)=>{const G=k&&k.children,he=k?k.shapeFlag:0,ge=P.children,{patchFlag:xe,shapeFlag:Fe}=P;if(xe>0){if(xe&128){de(G,ge,ie,ve,F,K,oe,V,H);return}else if(xe&256){fe(G,ge,ie,ve,F,K,oe,V,H);return}}Fe&8?(he&16&&ue(G,F,K),ge!==G&&u(ie,ge)):he&16?Fe&16?de(G,ge,ie,ve,F,K,oe,V,H):ue(G,F,K,!0):(he&8&&u(ie,""),Fe&16&&Y(ge,ie,ve,F,K,oe,V,H))},fe=(k,P,ie,ve,F,K,oe,V,H)=>{k=k||Ma,P=P||Ma;const G=k.length,he=P.length,ge=Math.min(G,he);let xe;for(xe=0;xe<ge;xe++){const Fe=P[xe]=H?Io(P[xe]):Gn(P[xe]);g(k[xe],Fe,ie,null,F,K,oe,V,H)}G>he?ue(k,F,K,!0,!1,ge):Y(P,ie,ve,F,K,oe,V,H,ge)},de=(k,P,ie,ve,F,K,oe,V,H)=>{let G=0;const he=P.length;let ge=k.length-1,xe=he-1;for(;G<=ge&&G<=xe;){const Fe=k[G],ot=P[G]=H?Io(P[G]):Gn(P[G]);if(Ar(Fe,ot))g(Fe,ot,ie,null,F,K,oe,V,H);else break;G++}for(;G<=ge&&G<=xe;){const Fe=k[ge],ot=P[xe]=H?Io(P[xe]):Gn(P[xe]);if(Ar(Fe,ot))g(Fe,ot,ie,null,F,K,oe,V,H);else break;ge--,xe--}if(G>ge){if(G<=xe){const Fe=xe+1,ot=Fe<he?P[Fe].el:ve;for(;G<=xe;)g(null,P[G]=H?Io(P[G]):Gn(P[G]),ie,ot,F,K,oe,V,H),G++}}else if(G>xe)for(;G<=ge;)le(k[G],F,K,!0),G++;else{const Fe=G,ot=G,pt=new Map;for(G=ot;G<=xe;G++){const Ae=P[G]=H?Io(P[G]):Gn(P[G]);Ae.key!=null&&pt.set(Ae.key,G)}let dt,Xt=0;const Nt=xe-ot+1;let en=!1,ce=0;const Ee=new Array(Nt);for(G=0;G<Nt;G++)Ee[G]=0;for(G=Fe;G<=ge;G++){const Ae=k[G];if(Xt>=Nt){le(Ae,F,K,!0);continue}let je;if(Ae.key!=null)je=pt.get(Ae.key);else for(dt=ot;dt<=xe;dt++)if(Ee[dt-ot]===0&&Ar(Ae,P[dt])){je=dt;break}je===void 0?le(Ae,F,K,!0):(Ee[je-ot]=G+1,je>=ce?ce=je:en=!0,g(Ae,P[je],ie,null,F,K,oe,V,H),Xt++)}const Le=en?kC(Ee):Ma;for(dt=Le.length-1,G=Nt-1;G>=0;G--){const Ae=ot+G,je=P[Ae],rt=Ae+1<he?P[Ae+1].el:ve;Ee[G]===0?g(null,je,ie,rt,F,K,oe,V,H):en&&(dt<0||G!==Le[dt]?L(je,ie,rt,2):dt--)}}},L=(k,P,ie,ve,F=null)=>{const{el:K,type:oe,transition:V,children:H,shapeFlag:G}=k;if(G&6){L(k.component.subTree,P,ie,ve);return}if(G&128){k.suspense.move(P,ie,ve);return}if(G&64){oe.move(k,P,ie,Q);return}if(oe===ze){r(K,P,ie);for(let ge=0;ge<H.length;ge++)L(H[ge],P,ie,ve);r(k.anchor,P,ie);return}if(oe===oa){b(k,P,ie);return}if(ve!==2&&G&1&&V)if(ve===0)V.beforeEnter(K),r(K,P,ie),un(()=>V.enter(K),F);else{const{leave:ge,delayLeave:xe,afterLeave:Fe}=V,ot=()=>r(K,P,ie),pt=()=>{ge(K,()=>{ot(),Fe&&Fe()})};xe?xe(K,ot,pt):pt()}else r(K,P,ie)},le=(k,P,ie,ve=!1,F=!1)=>{const{type:K,props:oe,ref:V,children:H,dynamicChildren:G,shapeFlag:he,patchFlag:ge,dirs:xe,cacheIndex:Fe}=k;if(ge===-2&&(F=!1),V!=null&&Qs(V,null,ie,k,!0),Fe!=null&&(P.renderCache[Fe]=void 0),he&256){P.ctx.deactivate(k);return}const ot=he&1&&xe,pt=!To(k);let dt;if(pt&&(dt=oe&&oe.onVnodeBeforeUnmount)&&Wn(dt,P,k),he&6)O(k.component,ie,ve);else{if(he&128){k.suspense.unmount(ie,ve);return}ot&&Rr(k,null,P,"beforeUnmount"),he&64?k.type.remove(k,P,ie,Q,ve):G&&!G.hasOnce&&(K!==ze||ge>0&&ge&64)?ue(G,P,ie,!1,!0):(K===ze&&ge&384||!F&&he&16)&&ue(H,P,ie),ve&&j(k)}(pt&&(dt=oe&&oe.onVnodeUnmounted)||ot)&&un(()=>{dt&&Wn(dt,P,k),ot&&Rr(k,null,P,"unmounted")},ie)},j=k=>{const{type:P,el:ie,anchor:ve,transition:F}=k;if(P===ze){E(ie,ve);return}if(P===oa){p(k);return}const K=()=>{o(ie),F&&!F.persisted&&F.afterLeave&&F.afterLeave()};if(k.shapeFlag&1&&F&&!F.persisted){const{leave:oe,delayLeave:V}=F,H=()=>oe(ie,K);V?V(k.el,K,H):H()}else K()},E=(k,P)=>{let ie;for(;k!==P;)ie=h(k),o(k),k=ie;o(P)},O=(k,P,ie)=>{const{bum:ve,scope:F,job:K,subTree:oe,um:V,m:H,a:G}=k;vl(H),vl(G),ve&&Ra(ve),F.stop(),K&&(K.flags|=8,le(oe,k,P,ie)),V&&un(V,P),un(()=>{k.isUnmounted=!0},P),P&&P.pendingBranch&&!P.isUnmounted&&k.asyncDep&&!k.asyncResolved&&k.suspenseId===P.pendingId&&(P.deps--,P.deps===0&&P.resolve())},ue=(k,P,ie,ve=!1,F=!1,K=0)=>{for(let oe=K;oe<k.length;oe++)le(k[oe],P,ie,ve,F)},Be=k=>{if(k.shapeFlag&6)return Be(k.component.subTree);if(k.shapeFlag&128)return k.suspense.next();const P=h(k.anchor||k.el),ie=P&&P[Iv];return ie?h(ie):P};let U=!1;const Z=(k,P,ie)=>{k==null?P._vnode&&le(P._vnode,null,null,!0):g(P._vnode||null,k,P,null,null,null,ie),P._vnode=k,U||(U=!0,Kp(),hl(),U=!1)},Q={p:g,um:le,m:L,r:j,mt:ye,mc:Y,pc:be,pbc:te,n:Be,o:e};let se,Se;return t&&([se,Se]=t(Q)),{render:Z,hydrate:se,createApp:bC(Z,se)}}function Yc({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Go({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function sg(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function bd(e,t,n=!1){const r=e.children,o=t.children;if(Ze(r)&&Ze(o))for(let a=0;a<r.length;a++){const s=r[a];let i=o[a];i.shapeFlag&1&&!i.dynamicChildren&&((i.patchFlag<=0||i.patchFlag===32)&&(i=o[a]=Io(o[a]),i.el=s.el),!n&&i.patchFlag!==-2&&bd(s,i)),i.type===xo&&(i.el=s.el)}}function kC(e){const t=e.slice(),n=[0];let r,o,a,s,i;const l=e.length;for(r=0;r<l;r++){const c=e[r];if(c!==0){if(o=n[n.length-1],e[o]<c){t[r]=o,n.push(r);continue}for(a=0,s=n.length-1;a<s;)i=a+s>>1,e[n[i]]<c?a=i+1:s=i;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,s=n[a-1];a-- >0;)n[a]=s,s=t[s];return n}function ig(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ig(t)}function vl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const lg=Symbol.for("v-scx"),cg=()=>ee(lg);function TC(e,t){return ii(e,null,t)}function xC(e,t){return ii(e,null,{flush:"post"})}function ug(e,t){return ii(e,null,{flush:"sync"})}function Ge(e,t,n){return ii(e,t,n)}function ii(e,t,n=Et){const{immediate:r,deep:o,flush:a,once:s}=n,i=Ht({},n),l=t&&r||!t&&a!=="post";let c;if(Ka){if(a==="sync"){const v=cg();c=v.__watcherHandles||(v.__watcherHandles=[])}else if(!l){const v=()=>{};return v.stop=ur,v.resume=ur,v.pause=ur,v}}const u=fn;i.call=(v,y,g)=>fr(v,u,y,g);let d=!1;a==="post"?i.scheduler=v=>{un(v,u&&u.suspense)}:a!=="sync"&&(d=!0,i.scheduler=(v,y)=>{y?v():ud(v)}),i.augmentJob=v=>{t&&(v.flags|=4),d&&(v.flags|=2,u&&(v.id=u.uid,v.i=u))};const h=AA(e,t,i);return Ka&&(c?c.push(h):l&&h()),h}function PC(e,t,n){const r=this.proxy,o=Jt(e)?e.includes(".")?dg(r,e):()=>r[e]:e.bind(r,r);let a;lt(t)?a=t:(a=t.handler,n=t);const s=sa(this),i=ii(o,a.bind(r),n);return s(),i}function dg(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o<n.length&&r;o++)r=r[n[o]];return r}}function co(e,t,n=Et){const r=pr(),o=En(t),a=Jn(t),s=fg(e,o),i=yv((l,c)=>{let u,d=Et,h;return ug(()=>{const v=e[o];Vn(u,v)&&(u=v,c())}),{get(){return l(),n.get?n.get(u):u},set(v){const y=n.set?n.set(v):v;if(!Vn(y,u)&&!(d!==Et&&Vn(v,d)))return;const g=r.vnode.props;g&&(t in g||o in g||a in g)&&(`onUpdate:${t}`in g||`onUpdate:${o}`in g||`onUpdate:${a}`in g)||(u=v,c()),r.emit(`update:${t}`,y),Vn(v,y)&&Vn(v,d)&&!Vn(y,h)&&c(),d=v,h=y}}});return i[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?s||Et:i,done:!1}:{done:!0}}}},i}const fg=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${En(t)}Modifiers`]||e[`${Jn(t)}Modifiers`];function MC(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Et;let o=n;const a=t.startsWith("update:"),s=a&&fg(r,t.slice(7));s&&(s.trim&&(o=n.map(u=>Jt(u)?u.trim():u)),s.number&&(o=n.map(cl)));let i,l=r[i=Ms(t)]||r[i=Ms(En(t))];!l&&a&&(l=r[i=Ms(Jn(t))]),l&&fr(l,e,6,o);const c=r[i+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[i])return;e.emitted[i]=!0,fr(c,e,6,o)}}function pg(e,t,n=!1){const r=t.emitsCache,o=r.get(e);if(o!==void 0)return o;const a=e.emits;let s={},i=!1;if(!lt(e)){const l=c=>{const u=pg(c,t,!0);u&&(i=!0,Ht(s,u))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!a&&!i?(Vt(e)&&r.set(e,null),null):(Ze(a)?a.forEach(l=>s[l]=null):Ht(s,a),Vt(e)&&r.set(e,s),s)}function Yl(e,t){return!e||!oi(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ot(e,t[0].toLowerCase()+t.slice(1))||Ot(e,Jn(t))||Ot(e,t))}function Zi(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[a],slots:s,attrs:i,emit:l,render:c,renderCache:u,props:d,data:h,setupState:v,ctx:y,inheritAttrs:g}=e,w=Xs(e);let A,C;try{if(n.shapeFlag&4){const p=o||r,_=p;A=Gn(c.call(_,p,u,d,v,h,y)),C=i}else{const p=t;A=Gn(p.length>1?p(d,{attrs:i,slots:s,emit:l}):p(d,null)),C=t.props?i:NC(i)}}catch(p){Ds.length=0,da(p,e,1),A=He(on)}let b=A;if(C&&g!==!1){const p=Object.keys(C),{shapeFlag:_}=b;p.length&&_&7&&(a&&p.some(td)&&(C=RC(C,a)),b=jr(b,C,!1,!0))}return n.dirs&&(b=jr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ro(b,n.transition),A=b,Xs(w),A}function OC(e,t=!0){let n;for(let r=0;r<e.length;r++){const o=e[r];if(ao(o)){if(o.type!==on||o.children==="v-if"){if(n)return;n=o}}else return}return n}const NC=e=>{let t;for(const n in e)(n==="class"||n==="style"||oi(n))&&((t||(t={}))[n]=e[n]);return t},RC=(e,t)=>{const n={};for(const r in e)(!td(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function LC(e,t,n){const{props:r,children:o,component:a}=e,{props:s,children:i,patchFlag:l}=t,c=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?rh(r,s,c):!!s;if(l&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(s[h]!==r[h]&&!Yl(c,h))return!0}}}else return(o||i)&&(!i||!i.$stable)?!0:r===s?!1:r?s?rh(r,s,c):!0:!!s;return!1}function rh(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let o=0;o<r.length;o++){const a=r[o];if(t[a]!==e[a]&&!Yl(n,a))return!0}return!1}function Xl({vnode:e,parent:t},n){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.el=e.el),r===e)(e=t.vnode).el=n,t=t.parent;else break}}const gl=e=>e.__isSuspense;let Eu=0;const DC={name:"Suspense",__isSuspense:!0,process(e,t,n,r,o,a,s,i,l,c){if(e==null)FC(t,n,r,o,a,s,i,l,c);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}jC(e,t,n,r,o,s,i,l,c)}},hydrate:VC,normalize:UC},BC=DC;function ei(e,t){const n=e.props&&e.props[t];lt(n)&&n()}function FC(e,t,n,r,o,a,s,i,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=e.suspense=hg(e,o,r,t,d,n,a,s,i,l);c(null,h.pendingBranch=e.ssContent,d,null,r,h,a,s),h.deps>0?(ei(e,"onPending"),ei(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,a,s),Da(h,e.ssFallback)):h.resolve(!1,!0)}function jC(e,t,n,r,o,a,s,i,{p:l,um:c,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const h=t.ssContent,v=t.ssFallback,{activeBranch:y,pendingBranch:g,isInFallback:w,isHydrating:A}=d;if(g)d.pendingBranch=h,Ar(h,g)?(l(g,h,d.hiddenContainer,null,o,d,a,s,i),d.deps<=0?d.resolve():w&&(A||(l(y,v,n,r,o,null,a,s,i),Da(d,v)))):(d.pendingId=Eu++,A?(d.isHydrating=!1,d.activeBranch=g):c(g,o,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),w?(l(null,h,d.hiddenContainer,null,o,d,a,s,i),d.deps<=0?d.resolve():(l(y,v,n,r,o,null,a,s,i),Da(d,v))):y&&Ar(h,y)?(l(y,h,n,r,o,d,a,s,i),d.resolve(!0)):(l(null,h,d.hiddenContainer,null,o,d,a,s,i),d.deps<=0&&d.resolve()));else if(y&&Ar(h,y))l(y,h,n,r,o,d,a,s,i),Da(d,h);else if(ei(t,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=Eu++,l(null,h,d.hiddenContainer,null,o,d,a,s,i),d.deps<=0)d.resolve();else{const{timeout:C,pendingId:b}=d;C>0?setTimeout(()=>{d.pendingId===b&&d.fallback(v)},C):C===0&&d.fallback(v)}}function hg(e,t,n,r,o,a,s,i,l,c,u=!1){const{p:d,m:h,um:v,n:y,o:{parentNode:g,remove:w}}=c;let A;const C=HC(e);C&&t&&t.pendingBranch&&(A=t.pendingId,t.deps++);const b=e.props?ul(e.props.timeout):void 0,p=a,_={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:o,deps:0,pendingId:Eu++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(S=!1,R=!1){const{vnode:Y,activeBranch:X,pendingBranch:te,pendingId:$e,effects:pe,parentComponent:we,container:ye}=_;let qe=!1;_.isHydrating?_.isHydrating=!1:S||(qe=X&&te.transition&&te.transition.mode==="out-in",qe&&(X.transition.afterLeave=()=>{$e===_.pendingId&&(h(te,ye,a===p?y(X):a,0),Js(pe))}),X&&(g(X.el)===ye&&(a=y(X)),v(X,we,_,!0)),qe||h(te,ye,a,0)),Da(_,te),_.pendingBranch=null,_.isInFallback=!1;let Te=_.parent,Ce=!1;for(;Te;){if(Te.pendingBranch){Te.effects.push(...pe),Ce=!0;break}Te=Te.parent}!Ce&&!qe&&Js(pe),_.effects=[],C&&t&&t.pendingBranch&&A===t.pendingId&&(t.deps--,t.deps===0&&!R&&t.resolve()),ei(Y,"onResolve")},fallback(S){if(!_.pendingBranch)return;const{vnode:R,activeBranch:Y,parentComponent:X,container:te,namespace:$e}=_;ei(R,"onFallback");const pe=y(Y),we=()=>{_.isInFallback&&(d(null,S,te,pe,X,null,$e,i,l),Da(_,S))},ye=S.transition&&S.transition.mode==="out-in";ye&&(Y.transition.afterLeave=we),_.isInFallback=!0,v(Y,X,null,!0),ye||we()},move(S,R,Y){_.activeBranch&&h(_.activeBranch,S,R,Y),_.container=S},next(){return _.activeBranch&&y(_.activeBranch)},registerDep(S,R,Y){const X=!!_.pendingBranch;X&&_.deps++;const te=S.vnode.el;S.asyncDep.catch($e=>{da($e,S,0)}).then($e=>{if(S.isUnmounted||_.isUnmounted||_.pendingId!==S.suspenseId)return;S.asyncResolved=!0;const{vnode:pe}=S;Pu(S,$e,!1),te&&(pe.el=te);const we=!te&&S.subTree.el;R(S,pe,g(te||S.subTree.el),te?null:y(S.subTree),_,s,Y),we&&w(we),Xl(S,pe.el),X&&--_.deps===0&&_.resolve()})},unmount(S,R){_.isUnmounted=!0,_.activeBranch&&v(_.activeBranch,n,S,R),_.pendingBranch&&v(_.pendingBranch,n,S,R)}};return _}function VC(e,t,n,r,o,a,s,i,l){const c=t.suspense=hg(t,r,n,e.parentNode,document.createElement("div"),null,o,a,s,i,!0),u=l(e,c.pendingBranch=t.ssContent,n,c,a,s);return c.deps===0&&c.resolve(!1,!0),u}function UC(e){const{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=oh(r?n.default:n),e.ssFallback=r?oh(n.fallback):He(on)}function oh(e){let t;if(lt(e)){const n=aa&&e._c;n&&(e._d=!1,I()),e=e(),n&&(e._d=!0,t=Rn,vg())}return Ze(e)&&(e=OC(e)),e=Gn(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function mg(e,t){t&&t.pendingBranch?Ze(e)?t.effects.push(...e):t.effects.push(e):Js(e)}function Da(e,t){e.activeBranch=t;const{vnode:n,parentComponent:r}=e;let o=t.el;for(;!o&&t.component;)t=t.component.subTree,o=t.el;n.el=o,r&&r.subTree===n&&(r.vnode.el=o,Xl(r,o))}function HC(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const ze=Symbol.for("v-fgt"),xo=Symbol.for("v-txt"),on=Symbol.for("v-cmt"),oa=Symbol.for("v-stc"),Ds=[];let Rn=null;function I(e=!1){Ds.push(Rn=e?null:[])}function vg(){Ds.pop(),Rn=Ds[Ds.length-1]||null}let aa=1;function ku(e,t=!1){aa+=e,e<0&&Rn&&t&&(Rn.hasOnce=!0)}function gg(e){return e.dynamicChildren=aa>0?Rn||Ma:null,vg(),aa>0&&Rn&&Rn.push(e),e}function M(e,t,n,r,o,a){return gg(D(e,t,n,r,o,a,!0))}function Ve(e,t,n,r,o){return gg(He(e,t,n,r,o,!0))}function ao(e){return e?e.__v_isVNode===!0:!1}function Ar(e,t){return e.type===t.type&&e.key===t.key}function zC(e){}const yg=({key:e})=>e??null,el=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Jt(e)||an(e)||lt(e)?{i:pn,r:e,k:t,f:!!n}:e:null);function D(e,t=null,n=null,r=0,o=null,a=e===ze?0:1,s=!1,i=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yg(t),ref:t&&el(t),scopeId:Wl,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:pn};return i?(wd(l,n),a&128&&e.normalize(l)):n&&(l.shapeFlag|=Jt(n)?8:16),aa>0&&!s&&Rn&&(l.patchFlag>0||a&6)&&l.patchFlag!==32&&Rn.push(l),l}const He=KC;function KC(e,t=null,n=null,r=0,o=null,a=!1){if((!e||e===Uv)&&(e=on),ao(e)){const i=jr(e,t,!0);return n&&wd(i,n),aa>0&&!a&&Rn&&(i.shapeFlag&6?Rn[Rn.indexOf(e)]=i:Rn.push(i)),i.patchFlag=-2,i}if(ZC(e)&&(e=e.__vccOpts),t){t=_g(t);let{class:i,style:l}=t;i&&!Jt(i)&&(t.class=ct(i)),Vt(l)&&(zl(l)&&!Ze(l)&&(l=Ht({},l)),t.style=$t(l))}const s=Jt(e)?1:gl(e)?128:Ev(e)?64:Vt(e)?4:lt(e)?2:0;return D(e,t,n,r,o,s,a,!0)}function _g(e){return e?zl(e)||Yv(e)?Ht({},e):e:null}function jr(e,t,n=!1,r=!1){const{props:o,ref:a,patchFlag:s,children:i,transition:l}=e,c=t?Ba(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&yg(c),ref:t&&t.ref?n&&a?Ze(a)?a.concat(el(t)):[a,el(t)]:el(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ze?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&jr(e.ssContent),ssFallback:e.ssFallback&&jr(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&r&&ro(u,l.clone(u)),u}function Bt(e=" ",t=0){return He(xo,null,e,t)}function WC(e,t){const n=He(oa,null,e);return n.staticCount=t,n}function _e(e="",t=!1){return t?(I(),Ve(on,null,e)):He(on,null,e)}function Gn(e){return e==null||typeof e=="boolean"?He(on):Ze(e)?He(ze,null,e.slice()):ao(e)?Io(e):He(xo,null,String(e))}function Io(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:jr(e)}function wd(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ze(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),wd(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Yv(t)?t._ctx=pn:o===3&&pn&&(pn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else lt(t)?(t={default:t,_ctx:pn},n=32):(t=String(t),r&64?(n=16,t=[Bt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ba(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const o in r)if(o==="class")t.class!==r.class&&(t.class=ct([t.class,r.class]));else if(o==="style")t.style=$t([t.style,r.style]);else if(oi(o)){const a=t[o],s=r[o];s&&a!==s&&!(Ze(a)&&a.includes(s))&&(t[o]=a?[].concat(a,s):s)}else o!==""&&(t[o]=r[o])}return t}function Wn(e,t,n,r=null){fr(e,t,7,[n,r])}const qC=Wv();let GC=0;function bg(e,t,n){const r=e.type,o=(t?t.appContext:e.appContext)||qC,a={uid:GC++,vnode:e,type:r,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ad(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Qv(r,o),emitsOptions:pg(r,o),emit:null,emitted:null,propsDefaults:Et,inheritAttrs:r.inheritAttrs,ctx:Et,data:Et,props:Et,attrs:Et,slots:Et,refs:Et,setupState:Et,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=MC.bind(null,a),e.ce&&e.ce(a),a}let fn=null;const pr=()=>fn||pn;let yl,Tu;{const e=Dl(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),a=>{o.length>1?o.forEach(s=>s(a)):o[0](a)}};yl=t("__VUE_INSTANCE_SETTERS__",n=>fn=n),Tu=t("__VUE_SSR_SETTERS__",n=>Ka=n)}const sa=e=>{const t=fn;return yl(e),e.scope.on(),()=>{e.scope.off(),yl(t)}},xu=()=>{fn&&fn.scope.off(),yl(null)};function wg(e){return e.vnode.shapeFlag&4}let Ka=!1;function Ag(e,t=!1,n=!1){t&&Tu(t);const{props:r,children:o}=e.vnode,a=wg(e);AC(e,r,a,t),IC(e,o,n);const s=a?JC(e,t):void 0;return t&&Tu(!1),s}function JC(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Cu);const{setup:r}=n;if(r){jo();const o=e.setupContext=r.length>1?$g(e):null,a=sa(e),s=Qa(r,e,0,[e.props,o]),i=rd(s);if(Vo(),a(),(i||e.sp)&&!To(e)&&pd(e),i){if(s.then(xu,xu),t)return s.then(l=>{Pu(e,l,t)}).catch(l=>{da(l,e,0)});e.asyncDep=s}else Pu(e,s,t)}else Cg(e,t)}function Pu(e,t,n){lt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Vt(t)&&(e.setupState=cd(t)),Cg(e,n)}let _l,Mu;function YC(e){_l=e,Mu=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,tC))}}const XC=()=>!_l;function Cg(e,t,n){const r=e.type;if(!e.render){if(!t&&_l&&!r.render){const o=r.template||yd(e).template;if(o){const{isCustomElement:a,compilerOptions:s}=e.appContext.config,{delimiters:i,compilerOptions:l}=r,c=Ht(Ht({isCustomElement:a,delimiters:i},s),l);r.render=_l(o,c)}}e.render=r.render||ur,Mu&&Mu(e)}{const o=sa(e);jo();try{hC(e)}finally{Vo(),o()}}}const QC={get(e,t){return Mn(e,"get",""),e[t]}};function $g(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,QC),slots:e.slots,emit:e.emit,expose:t}}function li(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(cd(vv(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ls)return Ls[n](e)},has(t,n){return n in t||n in Ls}})):e.proxy}function Ou(e,t=!0){return lt(e)?e.displayName||e.name:e.name||t&&e.__name}function ZC(e){return lt(e)&&"__vccOpts"in e}const W=(e,t)=>yA(e,t,Ka);function Ro(e,t,n){const r=arguments.length;return r===2?Vt(t)&&!Ze(t)?ao(t)?He(e,null,[t]):He(e,t):He(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&ao(n)&&(n=[n]),He(e,t,n))}function e$(){}function t$(e,t,n,r){const o=n[r];if(o&&Sg(o,e))return o;const a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function Sg(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let r=0;r<n.length;r++)if(Vn(n[r],t[r]))return!1;return aa>0&&Rn&&Rn.push(e),!0}const Ig="3.5.13",n$=ur,r$=EA,o$=ka,a$=Sv,s$={createComponentInstance:bg,setupComponent:Ag,renderComponentRoot:Zi,setCurrentRenderingInstance:Xs,isVNode:ao,normalizeVNode:Gn,getComponentPublicInstance:li,ensureValidVNode:gd,pushWarningContext:CA,popWarningContext:$A},i$=s$,l$=null,c$=null,u$=null;/**
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Nu;const ah=typeof window<"u"&&window.trustedTypes;if(ah)try{Nu=ah.createPolicy("vue",{createHTML:e=>e})}catch{}const Eg=Nu?e=>Nu.createHTML(e):e=>e,d$="http://www.w3.org/2000/svg",f$="http://www.w3.org/1998/Math/MathML",Yr=typeof document<"u"?document:null,sh=Yr&&Yr.createElement("template"),p$={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Yr.createElementNS(d$,e):t==="mathml"?Yr.createElementNS(f$,e):n?Yr.createElement(e,{is:n}):Yr.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Yr.createTextNode(e),createComment:e=>Yr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Yr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,a){const s=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{sh.innerHTML=Eg(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const i=sh.content;if(r==="svg"||r==="mathml"){const l=i.firstChild;for(;l.firstChild;)i.appendChild(l.firstChild);i.removeChild(l)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},_o="transition",ys="animation",Wa=Symbol("_vtc"),kg={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Tg=Ht({},fd,kg),h$=e=>(e.displayName="Transition",e.props=Tg,e),xg=h$((e,{slots:t})=>Ro(Ov,Pg(e),t)),Jo=(e,t=[])=>{Ze(e)?e.forEach(n=>n(...t)):e&&e(...t)},ih=e=>e?Ze(e)?e.some(t=>t.length>1):e.length>1:!1;function Pg(e){const t={};for(const pe in e)pe in kg||(t[pe]=e[pe]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:c=s,appearToClass:u=i,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,y=m$(o),g=y&&y[0],w=y&&y[1],{onBeforeEnter:A,onEnter:C,onEnterCancelled:b,onLeave:p,onLeaveCancelled:_,onBeforeAppear:S=A,onAppear:R=C,onAppearCancelled:Y=b}=t,X=(pe,we,ye,qe)=>{pe._enterCancelled=qe,Ao(pe,we?u:i),Ao(pe,we?c:s),ye&&ye()},te=(pe,we)=>{pe._isLeaving=!1,Ao(pe,d),Ao(pe,v),Ao(pe,h),we&&we()},$e=pe=>(we,ye)=>{const qe=pe?R:C,Te=()=>X(we,pe,ye);Jo(qe,[we,Te]),lh(()=>{Ao(we,pe?l:a),Or(we,pe?u:i),ih(qe)||ch(we,r,g,Te)})};return Ht(t,{onBeforeEnter(pe){Jo(A,[pe]),Or(pe,a),Or(pe,s)},onBeforeAppear(pe){Jo(S,[pe]),Or(pe,l),Or(pe,c)},onEnter:$e(!1),onAppear:$e(!0),onLeave(pe,we){pe._isLeaving=!0;const ye=()=>te(pe,we);Or(pe,d),pe._enterCancelled?(Or(pe,h),Ru()):(Ru(),Or(pe,h)),lh(()=>{pe._isLeaving&&(Ao(pe,d),Or(pe,v),ih(p)||ch(pe,r,w,ye))}),Jo(p,[pe,ye])},onEnterCancelled(pe){X(pe,!1,void 0,!0),Jo(b,[pe])},onAppearCancelled(pe){X(pe,!0,void 0,!0),Jo(Y,[pe])},onLeaveCancelled(pe){te(pe),Jo(_,[pe])}})}function m$(e){if(e==null)return null;if(Vt(e))return[Xc(e.enter),Xc(e.leave)];{const t=Xc(e);return[t,t]}}function Xc(e){return ul(e)}function Or(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Wa]||(e[Wa]=new Set)).add(t)}function Ao(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Wa];n&&(n.delete(t),n.size||(e[Wa]=void 0))}function lh(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let v$=0;function ch(e,t,n,r){const o=e._endId=++v$,a=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(a,n);const{type:s,timeout:i,propCount:l}=Mg(e,t);if(!s)return r();const c=s+"end";let u=0;const d=()=>{e.removeEventListener(c,h),a()},h=v=>{v.target===e&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},i+1),e.addEventListener(c,h)}function Mg(e,t){const n=window.getComputedStyle(e),r=y=>(n[y]||"").split(", "),o=r(`${_o}Delay`),a=r(`${_o}Duration`),s=uh(o,a),i=r(`${ys}Delay`),l=r(`${ys}Duration`),c=uh(i,l);let u=null,d=0,h=0;t===_o?s>0&&(u=_o,d=s,h=a.length):t===ys?c>0&&(u=ys,d=c,h=l.length):(d=Math.max(s,c),u=d>0?s>c?_o:ys:null,h=u?u===_o?a.length:l.length:0);const v=u===_o&&/\b(transform|all)(,|$)/.test(r(`${_o}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:v}}function uh(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>dh(n)+dh(e[r])))}function dh(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ru(){return document.body.offsetHeight}function g$(e,t,n){const r=e[Wa];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const bl=Symbol("_vod"),Og=Symbol("_vsh"),or={beforeMount(e,{value:t},{transition:n}){e[bl]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):_s(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),_s(e,!0),r.enter(e)):r.leave(e,()=>{_s(e,!1)}):_s(e,t))},beforeUnmount(e,{value:t}){_s(e,t)}};function _s(e,t){e.style.display=t?e[bl]:"none",e[Og]=!t}function y$(){or.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Ng=Symbol("");function ts(e){const t=pr();if(!t)return;const n=t.ut=(o=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(a=>wl(a,o))},r=()=>{const o=e(t.proxy);t.ce?wl(t.ce,o):Lu(t.subTree,o),n(o)};hd(()=>{Js(r)}),bn(()=>{Ge(r,ur,{flush:"post"});const o=new MutationObserver(r);o.observe(t.subTree.el.parentNode,{childList:!0}),Pr(()=>o.disconnect())})}function Lu(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Lu(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)wl(e.el,t);else if(e.type===ze)e.children.forEach(n=>Lu(n,t));else if(e.type===oa){let{el:n,anchor:r}=e;for(;n&&(wl(n,t),n!==r);)n=n.nextSibling}}function wl(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const o in t)n.setProperty(`--${o}`,t[o]),r+=`--${o}: ${t[o]};`;n[Ng]=r}}const _$=/(^|;)\s*display\s*:/;function b$(e,t,n){const r=e.style,o=Jt(n);let a=!1;if(n&&!o){if(t)if(Jt(t))for(const s of t.split(";")){const i=s.slice(0,s.indexOf(":")).trim();n[i]==null&&tl(r,i,"")}else for(const s in t)n[s]==null&&tl(r,s,"");for(const s in n)s==="display"&&(a=!0),tl(r,s,n[s])}else if(o){if(t!==n){const s=r[Ng];s&&(n+=";"+s),r.cssText=n,a=_$.test(n)}}else t&&e.removeAttribute("style");bl in e&&(e[bl]=a?r.display:"",e[Og]&&(r.display="none"))}const fh=/\s*!important$/;function tl(e,t,n){if(Ze(n))n.forEach(r=>tl(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=w$(e,t);fh.test(n)?e.setProperty(Jn(r),n.replace(fh,""),"important"):e[r]=n}}const ph=["Webkit","Moz","ms"],Qc={};function w$(e,t){const n=Qc[t];if(n)return n;let r=En(t);if(r!=="filter"&&r in e)return Qc[t]=r;r=ai(r);for(let o=0;o<ph.length;o++){const a=ph[o]+r;if(a in e)return Qc[t]=a}return t}const hh="http://www.w3.org/1999/xlink";function mh(e,t,n,r,o,a=B1(t)){r&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(hh,t.slice(6,t.length)):e.setAttributeNS(hh,t,n):n==null||a&&!Ym(n)?e.removeAttribute(t):e.setAttribute(t,a?"":Er(n)?String(n):n)}function vh(e,t,n,r,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Eg(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const i=a==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(i!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const i=typeof e[t];i==="boolean"?n=Ym(n):n==null&&i==="string"?(n="",s=!0):i==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(o||t)}function Zr(e,t,n,r){e.addEventListener(t,n,r)}function A$(e,t,n,r){e.removeEventListener(t,n,r)}const gh=Symbol("_vei");function C$(e,t,n,r,o=null){const a=e[gh]||(e[gh]={}),s=a[t];if(r&&s)s.value=r;else{const[i,l]=$$(t);if(r){const c=a[t]=E$(r,o);Zr(e,i,c,l)}else s&&(A$(e,i,s,l),a[t]=void 0)}}const yh=/(?:Once|Passive|Capture)$/;function $$(e){let t;if(yh.test(e)){t={};let r;for(;r=e.match(yh);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Jn(e.slice(2)),t]}let Zc=0;const S$=Promise.resolve(),I$=()=>Zc||(S$.then(()=>Zc=0),Zc=Date.now());function E$(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;fr(k$(r,n.value),t,5,[r])};return n.value=e,n.attached=I$(),n}function k$(e,t){if(Ze(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const _h=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,T$=(e,t,n,r,o,a)=>{const s=o==="svg";t==="class"?g$(e,r,s):t==="style"?b$(e,n,r):oi(t)?td(t)||C$(e,t,n,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):x$(e,t,r,s))?(vh(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&mh(e,t,r,s,a,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Jt(r))?vh(e,En(t),r,a,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),mh(e,t,r,s))};function x$(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&_h(t)&&lt(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return _h(t)&&Jt(n)?!1:t in e}const bh={};/*! #__NO_SIDE_EFFECTS__ */function Rg(e,t,n){const r=Ie(e,t);Rl(r)&&Ht(r,t);class o extends Ql{constructor(s){super(r,s,n)}}return o.def=r,o}/*! #__NO_SIDE_EFFECTS__ */const P$=(e,t)=>Rg(e,t,Kg),M$=typeof HTMLElement<"u"?HTMLElement:class{};class Ql extends M${constructor(t,n={},r=$l){super(),this._def=t,this._props=n,this._createApp=r,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&r!==$l?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Ql){this._parent=t;break}this._instance||(this._resolved?(this._setParent(),this._update()):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._instance.provides=t._instance.provides)}disconnectedCallback(){this._connected=!1,Hn(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let r=0;r<this.attributes.length;r++)this._setAttr(this.attributes[r].name);this._ob=new MutationObserver(r=>{for(const o of r)this._setAttr(o.attributeName)}),this._ob.observe(this,{attributes:!0});const t=(r,o=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:a,styles:s}=r;let i;if(a&&!Ze(a))for(const l in a){const c=a[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=ul(this._props[l])),(i||(i=Object.create(null)))[En(l)]=!0)}this._numberProps=i,o&&this._resolveProps(r),this.shadowRoot&&this._applyStyles(s),this._mount(r)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(r=>t(this._def=r,!0)):t(this._def)}_mount(t){this._app=this._createApp(t),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const r in n)Ot(this,r)||Object.defineProperty(this,r,{get:()=>x(n[r])})}_resolveProps(t){const{props:n}=t,r=Ze(n)?n:Object.keys(n||{});for(const o of Object.keys(this))o[0]!=="_"&&r.includes(o)&&this._setProp(o,this[o]);for(const o of r.map(En))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(a){this._setProp(o,a,!0,!0)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let r=n?this.getAttribute(t):bh;const o=En(t);n&&this._numberProps&&this._numberProps[o]&&(r=ul(r)),this._setProp(o,r,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,r=!0,o=!1){if(n!==this._props[t]&&(n===bh?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),o&&this._instance&&this._update(),r)){const a=this._ob;a&&a.disconnect(),n===!0?this.setAttribute(Jn(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Jn(t),n+""):n||this.removeAttribute(Jn(t)),a&&a.observe(this,{attributes:!0})}}_update(){zg(this._createVNode(),this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=He(this._def,Ht(t,this._props));return this._instance||(n.ce=r=>{this._instance=r,r.ce=this,r.isCE=!0;const o=(a,s)=>{this.dispatchEvent(new CustomEvent(a,Rl(s[0])?Ht({detail:s},s[0]):{detail:s}))};r.emit=(a,...s)=>{o(a,s),Jn(a)!==a&&o(Jn(a),s)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const r=this._nonce;for(let o=t.length-1;o>=0;o--){const a=document.createElement("style");r&&a.setAttribute("nonce",r),a.textContent=t[o],this.shadowRoot.prepend(a)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const r=n.nodeType===1&&n.getAttribute("slot")||"default";(t[r]||(t[r]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=(this._teleportTarget||this).querySelectorAll("slot"),n=this._instance.type.__scopeId;for(let r=0;r<t.length;r++){const o=t[r],a=o.getAttribute("name")||"default",s=this._slots[a],i=o.parentNode;if(s)for(const l of s){if(n&&l.nodeType===1){const c=n+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}i.insertBefore(l,o)}else for(;o.firstChild;)i.insertBefore(o.firstChild,o);i.removeChild(o)}}_injectChildStyle(t){this._applyStyles(t.styles,t)}_removeChildStyle(t){}}function Lg(e){const t=pr(),n=t&&t.ce;return n||null}function O$(){const e=Lg();return e&&e.shadowRoot}function N$(e="$style"){{const t=pr();if(!t)return Et;const n=t.type.__cssModules;if(!n)return Et;const r=n[e];return r||Et}}const Dg=new WeakMap,Bg=new WeakMap,Al=Symbol("_moveCb"),wh=Symbol("_enterCb"),R$=e=>(delete e.props.mode,e),L$=R$({name:"TransitionGroup",props:Ht({},Tg,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=pr(),r=dd();let o,a;return Jl(()=>{if(!o.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!V$(o[0].el,n.vnode.el,s))return;o.forEach(B$),o.forEach(F$);const i=o.filter(j$);Ru(),i.forEach(l=>{const c=l.el,u=c.style;Or(c,s),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Al]=h=>{h&&h.target!==c||(!h||/transform$/.test(h.propertyName))&&(c.removeEventListener("transitionend",d),c[Al]=null,Ao(c,s))};c.addEventListener("transitionend",d)})}),()=>{const s=gt(e),i=Pg(s);let l=s.tag||ze;if(o=[],a)for(let c=0;c<a.length;c++){const u=a[c];u.el&&u.el instanceof Element&&(o.push(u),ro(u,Ha(u,i,r,n)),Dg.set(u,u.el.getBoundingClientRect()))}a=t.default?ql(t.default()):[];for(let c=0;c<a.length;c++){const u=a[c];u.key!=null&&ro(u,Ha(u,i,r,n))}return He(l,null,a)}}}),D$=L$;function B$(e){const t=e.el;t[Al]&&t[Al](),t[wh]&&t[wh]()}function F$(e){Bg.set(e,e.el.getBoundingClientRect())}function j$(e){const t=Dg.get(e),n=Bg.get(e),r=t.left-n.left,o=t.top-n.top;if(r||o){const a=e.el.style;return a.transform=a.webkitTransform=`translate(${r}px,${o}px)`,a.transitionDuration="0s",e}}function V$(e,t,n){const r=e.cloneNode(),o=e[Wa];o&&o.forEach(i=>{i.split(/\s+/).forEach(l=>l&&r.classList.remove(l))}),n.split(/\s+/).forEach(i=>i&&r.classList.add(i)),r.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(r);const{hasTransform:s}=Mg(r);return a.removeChild(r),s}const Lo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ze(t)?n=>Ra(t,n):t};function U$(e){e.target.composing=!0}function Ah(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const dr=Symbol("_assign"),ia={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e[dr]=Lo(o);const a=r||o.props&&o.props.type==="number";Zr(e,t?"change":"input",s=>{if(s.target.composing)return;let i=e.value;n&&(i=i.trim()),a&&(i=cl(i)),e[dr](i)}),n&&Zr(e,"change",()=>{e.value=e.value.trim()}),t||(Zr(e,"compositionstart",U$),Zr(e,"compositionend",Ah),Zr(e,"change",Ah))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:a}},s){if(e[dr]=Lo(s),e.composing)return;const i=(a||e.type==="number")&&!/^0\d/.test(e.value)?cl(e.value):e.value,l=t??"";i!==l&&(document.activeElement===e&&e.type!=="range"&&(r&&t===n||o&&e.value.trim()===l)||(e.value=l))}},Ad={deep:!0,created(e,t,n){e[dr]=Lo(n),Zr(e,"change",()=>{const r=e._modelValue,o=qa(e),a=e.checked,s=e[dr];if(Ze(r)){const i=Bl(r,o),l=i!==-1;if(a&&!l)s(r.concat(o));else if(!a&&l){const c=[...r];c.splice(i,1),s(c)}}else if(ua(r)){const i=new Set(r);a?i.add(o):i.delete(o),s(i)}else s(Fg(e,a))})},mounted:Ch,beforeUpdate(e,t,n){e[dr]=Lo(n),Ch(e,t,n)}};function Ch(e,{value:t,oldValue:n},r){e._modelValue=t;let o;if(Ze(t))o=Bl(t,r.props.value)>-1;else if(ua(t))o=t.has(r.props.value);else{if(t===n)return;o=Oo(t,Fg(e,!0))}e.checked!==o&&(e.checked=o)}const Cd={created(e,{value:t},n){e.checked=Oo(t,n.props.value),e[dr]=Lo(n),Zr(e,"change",()=>{e[dr](qa(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[dr]=Lo(r),t!==n&&(e.checked=Oo(t,r.props.value))}},$d={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const o=ua(t);Zr(e,"change",()=>{const a=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?cl(qa(s)):qa(s));e[dr](e.multiple?o?new Set(a):a:a[0]),e._assigning=!0,Hn(()=>{e._assigning=!1})}),e[dr]=Lo(r)},mounted(e,{value:t}){$h(e,t)},beforeUpdate(e,t,n){e[dr]=Lo(n)},updated(e,{value:t}){e._assigning||$h(e,t)}};function $h(e,t){const n=e.multiple,r=Ze(t);if(!(n&&!r&&!ua(t))){for(let o=0,a=e.options.length;o<a;o++){const s=e.options[o],i=qa(s);if(n)if(r){const l=typeof i;l==="string"||l==="number"?s.selected=t.some(c=>String(c)===String(i)):s.selected=Bl(t,i)>-1}else s.selected=t.has(i);else if(Oo(qa(s),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function qa(e){return"_value"in e?e._value:e.value}function Fg(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Cl={created(e,t,n){Di(e,t,n,null,"created")},mounted(e,t,n){Di(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Di(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Di(e,t,n,r,"updated")}};function jg(e,t){switch(e){case"SELECT":return $d;case"TEXTAREA":return ia;default:switch(t){case"checkbox":return Ad;case"radio":return Cd;default:return ia}}}function Di(e,t,n,r,o){const s=jg(e.tagName,n.props&&n.props.type)[o];s&&s(e,t,n,r)}function H$(){ia.getSSRProps=({value:e})=>({value:e}),Cd.getSSRProps=({value:e},t)=>{if(t.props&&Oo(t.props.value,e))return{checked:!0}},Ad.getSSRProps=({value:e},t)=>{if(Ze(e)){if(t.props&&Bl(e,t.props.value)>-1)return{checked:!0}}else if(ua(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Cl.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const n=jg(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}const z$=["ctrl","shift","alt","meta"],K$={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>z$.some(n=>e[`${n}Key`]&&!t.includes(n))},$r=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...a)=>{for(let s=0;s<t.length;s++){const i=K$[t[s]];if(i&&i(o,t))return}return e(o,...a)})},W$={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Do=(e,t)=>{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const a=Jn(o.key);if(t.some(s=>s===a||W$[s]===a))return e(o)})},Vg=Ht({patchProp:T$},p$);let Bs,Sh=!1;function Ug(){return Bs||(Bs=rg(Vg))}function Hg(){return Bs=Sh?Bs:og(Vg),Sh=!0,Bs}const zg=(...e)=>{Ug().render(...e)},q$=(...e)=>{Hg().hydrate(...e)},$l=(...e)=>{const t=Ug().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=qg(r);if(!o)return;const a=t._component;!lt(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const s=n(o,!1,Wg(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},Kg=(...e)=>{const t=Hg().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=qg(r);if(o)return n(o,!0,Wg(o))},t};function Wg(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qg(e){return Jt(e)?document.querySelector(e):e}let Ih=!1;const G$=()=>{Ih||(Ih=!0,H$(),y$())};/**
* vue v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const J$=()=>{},Y$=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Ov,BaseTransitionPropsValidators:fd,Comment:on,DeprecationTypes:u$,EffectScope:ad,ErrorCodes:IA,ErrorTypeStrings:r$,Fragment:ze,KeepAlive:JA,ReactiveEffect:Ws,Static:oa,Suspense:BC,Teleport:Tv,Text:xo,TrackOpTypes:_A,Transition:xg,TransitionGroup:D$,TriggerOpTypes:bA,VueElement:Ql,assertNumber:SA,callWithAsyncErrorHandling:fr,callWithErrorHandling:Qa,camelize:En,capitalize:ai,cloneVNode:jr,compatUtils:c$,compile:J$,computed:W,createApp:$l,createBlock:Ve,createCommentVNode:_e,createElementBlock:M,createElementVNode:D,createHydrationRenderer:og,createPropsRestProxy:fC,createRenderer:rg,createSSRApp:Kg,createSlots:ZA,createStaticVNode:WC,createTextVNode:Bt,createVNode:He,customRef:yv,defineAsyncComponent:za,defineComponent:Ie,defineCustomElement:Rg,defineEmits:rC,defineExpose:oC,defineModel:iC,defineOptions:aC,defineProps:nC,defineSSRCustomElement:P$,defineSlots:sC,devtools:o$,effect:H1,effectScope:j1,getCurrentInstance:pr,getCurrentScope:Zm,getCurrentWatcher:wA,getTransitionRawChildren:ql,guardReactiveProps:_g,h:Ro,handleError:da,hasInjectionContext:wC,hydrate:q$,hydrateOnIdle:UA,hydrateOnInteraction:WA,hydrateOnMediaQuery:KA,hydrateOnVisible:zA,initCustomFormatter:e$,initDirectivesForSSR:G$,inject:ee,isMemoSame:Sg,isProxy:zl,isReactive:ko,isReadonly:No,isRef:an,isRuntimeOnly:XC,isShallow:nr,isVNode:ao,markRaw:vv,mergeDefaults:dC,mergeModels:oo,mergeProps:Ba,nextTick:Hn,normalizeClass:ct,normalizeProps:L1,normalizeStyle:$t,onActivated:Rv,onBeforeMount:Za,onBeforeUnmount:lo,onBeforeUpdate:hd,onDeactivated:Lv,onErrorCaptured:Vv,onMounted:bn,onRenderTracked:jv,onRenderTriggered:Fv,onScopeDispose:V1,onServerPrefetch:Bv,onUnmounted:Pr,onUpdated:Jl,onWatcherCleanup:bv,openBlock:I,popScopeId:PA,provide:qv,proxyRefs:cd,pushScopeId:xA,queuePostFlushCb:Js,reactive:Ul,readonly:Sn,ref:Pe,registerRuntimeCompiler:YC,render:zg,renderList:xt,renderSlot:Yt,resolveComponent:QA,resolveDirective:Hv,resolveDynamicComponent:es,resolveFilter:l$,resolveTransitionHooks:Ha,setBlockTracking:ku,setDevtoolsHook:a$,setTransitionHooks:ro,shallowReactive:mv,shallowReadonly:cA,shallowRef:Pn,ssrContextKey:lg,ssrUtils:i$,stop:z1,toDisplayString:Me,toHandlerKey:Ms,toHandlers:eC,toRaw:gt,toRef:no,toRefs:Kl,toValue:fA,transformVNodeArgs:zC,triggerRef:dA,unref:x,useAttrs:uC,useCssModule:N$,useCssVars:ts,useHost:Lg,useId:RA,useModel:co,useSSRContext:cg,useShadowRoot:O$,useSlots:cC,useTemplateRef:st,useTransitionState:dd,vModelCheckbox:Ad,vModelDynamic:Cl,vModelRadio:Cd,vModelSelect:$d,vModelText:ia,vShow:or,version:Ig,warn:n$,watch:Ge,watchEffect:TC,watchPostEffect:xC,watchSyncEffect:ug,withAsyncContext:pC,withCtx:et,withDefaults:lC,withDirectives:hn,withKeys:Do,withMemo:t$,withModifiers:$r,withScopeId:MA},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE */const{entries:Gg,setPrototypeOf:Eh,isFrozen:X$,getPrototypeOf:Q$,getOwnPropertyDescriptor:Z$}=Object;let{freeze:zn,seal:kr,create:Jg}=Object,{apply:Du,construct:Bu}=typeof Reflect<"u"&&Reflect;zn||(zn=function(t){return t});kr||(kr=function(t){return t});Du||(Du=function(t,n,r){return t.apply(n,r)});Bu||(Bu=function(t,n){return new t(...n)});const Bi=ar(Array.prototype.forEach),kh=ar(Array.prototype.pop),bs=ar(Array.prototype.push),nl=ar(String.prototype.toLowerCase),eu=ar(String.prototype.toString),eS=ar(String.prototype.match),ws=ar(String.prototype.replace),tS=ar(String.prototype.indexOf),nS=ar(String.prototype.trim),br=ar(Object.prototype.hasOwnProperty),tr=ar(RegExp.prototype.test),As=rS(TypeError);function ar(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Du(e,t,r)}}function rS(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bu(e,n)}}function Ct(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:nl;Eh&&Eh(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const a=n(o);a!==o&&(X$(t)||(t[r]=a),o=a)}e[o]=!0}return e}function oS(e){for(let t=0;t<e.length;t++)br(e,t)||(e[t]=null);return e}function Xo(e){const t=Jg(null);for(const[n,r]of Gg(e))br(e,n)&&(Array.isArray(r)?t[n]=oS(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Xo(r):t[n]=r);return t}function Fi(e,t){for(;e!==null;){const r=Z$(e,t);if(r){if(r.get)return ar(r.get);if(typeof r.value=="function")return ar(r.value)}e=Q$(e)}function n(){return null}return n}const Th=zn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),tu=zn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),nu=zn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),aS=zn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ru=zn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),sS=zn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xh=zn(["#text"]),Ph=zn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),ou=zn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Mh=zn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ji=zn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),iS=kr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),lS=kr(/<%[\w\W]*|[\w\W]*%>/gm),cS=kr(/\${[\w\W]*}/gm),uS=kr(/^data-[\-\w.\u00B7-\uFFFF]/),dS=kr(/^aria-[\-\w]+$/),Yg=kr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fS=kr(/^(?:\w+script|data):/i),pS=kr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Xg=kr(/^html$/i);var Oh=Object.freeze({__proto__:null,MUSTACHE_EXPR:iS,ERB_EXPR:lS,TMPLIT_EXPR:cS,DATA_ATTR:uS,ARIA_ATTR:dS,IS_ALLOWED_URI:Yg,IS_SCRIPT_OR_DATA:fS,ATTR_WHITESPACE:pS,DOCTYPE_NAME:Xg});const hS=function(){return typeof window>"u"?null:window},mS=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function Qg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hS();const t=tt=>Qg(tt);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:i,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:v}=e,y=l.prototype,g=Fi(y,"cloneNode"),w=Fi(y,"nextSibling"),A=Fi(y,"childNodes"),C=Fi(y,"parentNode");if(typeof s=="function"){const tt=n.createElement("template");tt.content&&tt.content.ownerDocument&&(n=tt.content.ownerDocument)}let b,p="";const{implementation:_,createNodeIterator:S,createDocumentFragment:R,getElementsByTagName:Y}=n,{importNode:X}=r;let te={};t.isSupported=typeof Gg=="function"&&typeof C=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:$e,ERB_EXPR:pe,TMPLIT_EXPR:we,DATA_ATTR:ye,ARIA_ATTR:qe,IS_SCRIPT_OR_DATA:Te,ATTR_WHITESPACE:Ce}=Oh;let{IS_ALLOWED_URI:be}=Oh,fe=null;const de=Ct({},[...Th,...tu,...nu,...ru,...xh]);let L=null;const le=Ct({},[...Ph,...ou,...Mh,...ji]);let j=Object.seal(Jg(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),E=null,O=null,ue=!0,Be=!0,U=!1,Z=!0,Q=!1,se=!1,Se=!1,k=!1,P=!1,ie=!1,ve=!1,F=!0,K=!1;const oe="user-content-";let V=!0,H=!1,G={},he=null;const ge=Ct({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let xe=null;const Fe=Ct({},["audio","video","img","source","image","track"]);let ot=null;const pt=Ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dt="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",Nt="http://www.w3.org/1999/xhtml";let en=Nt,ce=!1,Ee=null;const Le=Ct({},[dt,Xt,Nt],eu);let Ae=null;const je=["application/xhtml+xml","text/html"],rt="text/html";let Ye=null,wt=null;const ht=n.createElement("form"),Ft=function(J){return J instanceof RegExp||J instanceof Function},zt=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wt&&wt===J)){if((!J||typeof J!="object")&&(J={}),J=Xo(J),Ae=je.indexOf(J.PARSER_MEDIA_TYPE)===-1?rt:J.PARSER_MEDIA_TYPE,Ye=Ae==="application/xhtml+xml"?eu:nl,fe=br(J,"ALLOWED_TAGS")?Ct({},J.ALLOWED_TAGS,Ye):de,L=br(J,"ALLOWED_ATTR")?Ct({},J.ALLOWED_ATTR,Ye):le,Ee=br(J,"ALLOWED_NAMESPACES")?Ct({},J.ALLOWED_NAMESPACES,eu):Le,ot=br(J,"ADD_URI_SAFE_ATTR")?Ct(Xo(pt),J.ADD_URI_SAFE_ATTR,Ye):pt,xe=br(J,"ADD_DATA_URI_TAGS")?Ct(Xo(Fe),J.ADD_DATA_URI_TAGS,Ye):Fe,he=br(J,"FORBID_CONTENTS")?Ct({},J.FORBID_CONTENTS,Ye):ge,E=br(J,"FORBID_TAGS")?Ct({},J.FORBID_TAGS,Ye):{},O=br(J,"FORBID_ATTR")?Ct({},J.FORBID_ATTR,Ye):{},G=br(J,"USE_PROFILES")?J.USE_PROFILES:!1,ue=J.ALLOW_ARIA_ATTR!==!1,Be=J.ALLOW_DATA_ATTR!==!1,U=J.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=J.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=J.SAFE_FOR_TEMPLATES||!1,se=J.WHOLE_DOCUMENT||!1,P=J.RETURN_DOM||!1,ie=J.RETURN_DOM_FRAGMENT||!1,ve=J.RETURN_TRUSTED_TYPE||!1,k=J.FORCE_BODY||!1,F=J.SANITIZE_DOM!==!1,K=J.SANITIZE_NAMED_PROPS||!1,V=J.KEEP_CONTENT!==!1,H=J.IN_PLACE||!1,be=J.ALLOWED_URI_REGEXP||Yg,en=J.NAMESPACE||Nt,j=J.CUSTOM_ELEMENT_HANDLING||{},J.CUSTOM_ELEMENT_HANDLING&&Ft(J.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=J.CUSTOM_ELEMENT_HANDLING.tagNameCheck),J.CUSTOM_ELEMENT_HANDLING&&Ft(J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=J.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),J.CUSTOM_ELEMENT_HANDLING&&typeof J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=J.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(Be=!1),ie&&(P=!0),G&&(fe=Ct({},xh),L=[],G.html===!0&&(Ct(fe,Th),Ct(L,Ph)),G.svg===!0&&(Ct(fe,tu),Ct(L,ou),Ct(L,ji)),G.svgFilters===!0&&(Ct(fe,nu),Ct(L,ou),Ct(L,ji)),G.mathMl===!0&&(Ct(fe,ru),Ct(L,Mh),Ct(L,ji))),J.ADD_TAGS&&(fe===de&&(fe=Xo(fe)),Ct(fe,J.ADD_TAGS,Ye)),J.ADD_ATTR&&(L===le&&(L=Xo(L)),Ct(L,J.ADD_ATTR,Ye)),J.ADD_URI_SAFE_ATTR&&Ct(ot,J.ADD_URI_SAFE_ATTR,Ye),J.FORBID_CONTENTS&&(he===ge&&(he=Xo(he)),Ct(he,J.FORBID_CONTENTS,Ye)),V&&(fe["#text"]=!0),se&&Ct(fe,["html","head","body"]),fe.table&&(Ct(fe,["tbody"]),delete E.tbody),J.TRUSTED_TYPES_POLICY){if(typeof J.TRUSTED_TYPES_POLICY.createHTML!="function")throw As('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof J.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw As('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');b=J.TRUSTED_TYPES_POLICY,p=b.createHTML("")}else b===void 0&&(b=mS(v,o)),b!==null&&typeof p=="string"&&(p=b.createHTML(""));zn&&zn(J),wt=J}},Kt=Ct({},["mi","mo","mn","ms","mtext"]),Wt=Ct({},["foreignobject","desc","title","annotation-xml"]),wn=Ct({},["title","style","font","a","script"]),po=Ct({},[...tu,...nu,...aS]),fa=Ct({},[...ru,...sS]),ds=function(J){let De=C(J);(!De||!De.tagName)&&(De={namespaceURI:en,tagName:"template"});const Qe=nl(J.tagName),jt=nl(De.tagName);return Ee[J.namespaceURI]?J.namespaceURI===Xt?De.namespaceURI===Nt?Qe==="svg":De.namespaceURI===dt?Qe==="svg"&&(jt==="annotation-xml"||Kt[jt]):!!po[Qe]:J.namespaceURI===dt?De.namespaceURI===Nt?Qe==="math":De.namespaceURI===Xt?Qe==="math"&&Wt[jt]:!!fa[Qe]:J.namespaceURI===Nt?De.namespaceURI===Xt&&!Wt[jt]||De.namespaceURI===dt&&!Kt[jt]?!1:!fa[Qe]&&(wn[Qe]||!po[Qe]):!!(Ae==="application/xhtml+xml"&&Ee[J.namespaceURI]):!1},sr=function(J){bs(t.removed,{element:J});try{J.parentNode.removeChild(J)}catch{J.remove()}},ho=function(J,De){try{bs(t.removed,{attribute:De.getAttributeNode(J),from:De})}catch{bs(t.removed,{attribute:null,from:De})}if(De.removeAttribute(J),J==="is"&&!L[J])if(P||ie)try{sr(De)}catch{}else try{De.setAttribute(J,"")}catch{}},Kr=function(J){let De=null,Qe=null;if(k)J="<remove></remove>"+J;else{const vn=eS(J,/^[\r\n\t ]+/);Qe=vn&&vn[0]}Ae==="application/xhtml+xml"&&en===Nt&&(J='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+J+"</body></html>");const jt=b?b.createHTML(J):J;if(en===Nt)try{De=new h().parseFromString(jt,Ae)}catch{}if(!De||!De.documentElement){De=_.createDocument(en,"template",null);try{De.documentElement.innerHTML=ce?p:jt}catch{}}const ln=De.body||De.documentElement;return J&&Qe&&ln.insertBefore(n.createTextNode(Qe),ln.childNodes[0]||null),en===Nt?Y.call(De,se?"html":"body")[0]:se?De.documentElement:ln},fs=function(J){return S.call(J.ownerDocument||J,J,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null)},pc=function(J){return J instanceof d&&(typeof J.nodeName!="string"||typeof J.textContent!="string"||typeof J.removeChild!="function"||!(J.attributes instanceof u)||typeof J.removeAttribute!="function"||typeof J.setAttribute!="function"||typeof J.namespaceURI!="string"||typeof J.insertBefore!="function"||typeof J.hasChildNodes!="function")},mi=function(J){return typeof i=="function"&&J instanceof i},hr=function(J,De,Qe){te[J]&&Bi(te[J],jt=>{jt.call(t,De,Qe,wt)})},Ho=function(J){let De=null;if(hr("beforeSanitizeElements",J,null),pc(J))return sr(J),!0;const Qe=Ye(J.nodeName);if(hr("uponSanitizeElement",J,{tagName:Qe,allowedTags:fe}),J.hasChildNodes()&&!mi(J.firstElementChild)&&tr(/<[/\w]/g,J.innerHTML)&&tr(/<[/\w]/g,J.textContent))return sr(J),!0;if(!fe[Qe]||E[Qe]){if(!E[Qe]&&ps(Qe)&&(j.tagNameCheck instanceof RegExp&&tr(j.tagNameCheck,Qe)||j.tagNameCheck instanceof Function&&j.tagNameCheck(Qe)))return!1;if(V&&!he[Qe]){const jt=C(J)||J.parentNode,ln=A(J)||J.childNodes;if(ln&&jt){const vn=ln.length;for(let kn=vn-1;kn>=0;--kn)jt.insertBefore(g(ln[kn],!0),w(J))}}return sr(J),!0}return J instanceof l&&!ds(J)||(Qe==="noscript"||Qe==="noembed"||Qe==="noframes")&&tr(/<\/no(script|embed|frames)/i,J.innerHTML)?(sr(J),!0):(Q&&J.nodeType===3&&(De=J.textContent,Bi([$e,pe,we],jt=>{De=ws(De,jt," ")}),J.textContent!==De&&(bs(t.removed,{element:J.cloneNode()}),J.textContent=De)),hr("afterSanitizeElements",J,null),!1)},vi=function(J,De,Qe){if(F&&(De==="id"||De==="name")&&(Qe in n||Qe in ht))return!1;if(!(Be&&!O[De]&&tr(ye,De))){if(!(ue&&tr(qe,De))){if(!L[De]||O[De]){if(!(ps(J)&&(j.tagNameCheck instanceof RegExp&&tr(j.tagNameCheck,J)||j.tagNameCheck instanceof Function&&j.tagNameCheck(J))&&(j.attributeNameCheck instanceof RegExp&&tr(j.attributeNameCheck,De)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(De))||De==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&tr(j.tagNameCheck,Qe)||j.tagNameCheck instanceof Function&&j.tagNameCheck(Qe))))return!1}else if(!ot[De]){if(!tr(be,ws(Qe,Ce,""))){if(!((De==="src"||De==="xlink:href"||De==="href")&&J!=="script"&&tS(Qe,"data:")===0&&xe[J])){if(!(U&&!tr(Te,ws(Qe,Ce,"")))){if(Qe)return!1}}}}}}return!0},ps=function(J){return J!=="annotation-xml"&&J.indexOf("-")>0},gi=function(J){hr("beforeSanitizeAttributes",J,null);const{attributes:De}=J;if(!De)return;const Qe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:L};let jt=De.length;for(;jt--;){const ln=De[jt],{name:vn,namespaceURI:kn,value:Mr}=ln,zo=Ye(vn);let Tn=vn==="value"?Mr:nS(Mr);if(Qe.attrName=zo,Qe.attrValue=Tn,Qe.keepAttr=!0,Qe.forceKeepAttr=void 0,hr("uponSanitizeAttribute",J,Qe),Tn=Qe.attrValue,Qe.forceKeepAttr||(ho(vn,J),!Qe.keepAttr))continue;if(!Z&&tr(/\/>/i,Tn)){ho(vn,J);continue}Q&&Bi([$e,pe,we],_i=>{Tn=ws(Tn,_i," ")});const yi=Ye(J.nodeName);if(vi(yi,zo,Tn)){if(K&&(zo==="id"||zo==="name")&&(ho(vn,J),Tn=oe+Tn),b&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!kn)switch(v.getAttributeType(yi,zo)){case"TrustedHTML":{Tn=b.createHTML(Tn);break}case"TrustedScriptURL":{Tn=b.createScriptURL(Tn);break}}try{kn?J.setAttributeNS(kn,vn,Tn):J.setAttribute(vn,Tn),kh(t.removed)}catch{}}}hr("afterSanitizeAttributes",J,null)},hc=function tt(J){let De=null;const Qe=fs(J);for(hr("beforeSanitizeShadowDOM",J,null);De=Qe.nextNode();)hr("uponSanitizeShadowNode",De,null),!Ho(De)&&(De.content instanceof a&&tt(De.content),gi(De));hr("afterSanitizeShadowDOM",J,null)};return t.sanitize=function(tt){let J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},De=null,Qe=null,jt=null,ln=null;if(ce=!tt,ce&&(tt="<!-->"),typeof tt!="string"&&!mi(tt))if(typeof tt.toString=="function"){if(tt=tt.toString(),typeof tt!="string")throw As("dirty is not a string, aborting")}else throw As("toString is not a function");if(!t.isSupported)return tt;if(Se||zt(J),t.removed=[],typeof tt=="string"&&(H=!1),H){if(tt.nodeName){const Mr=Ye(tt.nodeName);if(!fe[Mr]||E[Mr])throw As("root node is forbidden and cannot be sanitized in-place")}}else if(tt instanceof i)De=Kr("<!---->"),Qe=De.ownerDocument.importNode(tt,!0),Qe.nodeType===1&&Qe.nodeName==="BODY"||Qe.nodeName==="HTML"?De=Qe:De.appendChild(Qe);else{if(!P&&!Q&&!se&&tt.indexOf("<")===-1)return b&&ve?b.createHTML(tt):tt;if(De=Kr(tt),!De)return P?null:ve?p:""}De&&k&&sr(De.firstChild);const vn=fs(H?tt:De);for(;jt=vn.nextNode();)Ho(jt)||(jt.content instanceof a&&hc(jt.content),gi(jt));if(H)return tt;if(P){if(ie)for(ln=R.call(De.ownerDocument);De.firstChild;)ln.appendChild(De.firstChild);else ln=De;return(L.shadowroot||L.shadowrootmode)&&(ln=X.call(r,ln,!0)),ln}let kn=se?De.outerHTML:De.innerHTML;return se&&fe["!doctype"]&&De.ownerDocument&&De.ownerDocument.doctype&&De.ownerDocument.doctype.name&&tr(Xg,De.ownerDocument.doctype.name)&&(kn="<!DOCTYPE "+De.ownerDocument.doctype.name+`>
`+kn),Q&&Bi([$e,pe,we],Mr=>{kn=ws(kn,Mr," ")}),b&&ve?b.createHTML(kn):kn},t.setConfig=function(){let tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zt(tt),Se=!0},t.clearConfig=function(){wt=null,Se=!1},t.isValidAttribute=function(tt,J,De){wt||zt({});const Qe=Ye(tt),jt=Ye(J);return vi(Qe,jt,De)},t.addHook=function(tt,J){typeof J=="function"&&(te[tt]=te[tt]||[],bs(te[tt],J))},t.removeHook=function(tt){if(te[tt])return kh(te[tt])},t.removeHooks=function(tt){te[tt]&&(te[tt]=[])},t.removeAllHooks=function(){te={}},t}var vS=Qg();function gS(e,t){const n=e.hooks??{};let r;for(r in n){const o=n[r];o!==void 0&&t.addHook(r,o)}}function Zg(){return vS()}function yS(e={},t=Zg){const n=t();gS(e,n);const r=function(o,a){const s=a.value;if(a.oldValue===s)return;const i=`${s}`,l=a.arg,c=e.namedConfigurations,u=e.default??{};if(c&&l!==void 0){o.innerHTML=n.sanitize(i,c[l]??u);return}o.innerHTML=n.sanitize(i,u)};return{mounted:r,updated:r}}const _S={install(e,t={},n=Zg){e.directive("dompurify-html",yS(t,n))}};function bS(e,t){return W({get(){const n=localStorage.getItem(e);if(n)try{const r=JSON.parse(n);if((t==null?void 0:t(r))===!1){localStorage.removeItem(e);return}return r}catch{localStorage.removeItem(e);return}},set(n){n===void 0?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(n))}})}function Ln(){return{log:console.log,warn:console.warn,info:console.info,error:console.error}}const wS=1500,AS=1e3,CS=100,$S=Ln();var SS=(e=>(e[e.None=0]="None",e[e.Single=1]="Single",e[e.Multiple=2]="Multiple",e))(SS||{});function IS(){const e=bS("generateBuilderManager__mode"),t={mode:e.value??"ui",selection:[],clipboard:null,mutationTransactionsSnapshot:{undo:null,redo:null},logEntries:[]},n=Pe(t);let r=null,o=0;const a=[],s=fe=>{l.value=fe},i=()=>n.value.mode,l=W({get:()=>n.value.mode,set(fe){n.value.mode=fe,e.value=fe}}),c=W(()=>l.value=="blueprints"?"blueprints_root":"root"),u=(fe,de,L)=>{if(fe===null){n.value.selection=[];return}n.value.selection.length!==0&&(n.value.selection=[]),d(fe,de,L)},d=(fe,de,L)=>{let le=de;if(typeof le>"u"){const j=document.querySelector(`.ComponentRenderer [data-writer-id="${fe}"]`);le=j==null?void 0:j.dataset.writerInstancePath}n.value.selection.push({componentId:fe,instancePath:le,source:L})},h=(fe,de,L,le)=>{if(!fe.shiftKey&&!fe.ctrlKey&&!fe.metaKey)return u(de,L,le);v(de)?y(de):d(de,L,le)},v=fe=>n.value.selection.some(de=>de.componentId===fe),y=fe=>{const de=n.value.selection.filter(L=>L.componentId!==fe);de.length!==n.value.selection.length&&(n.value.selection=de)},g=W(()=>n.value.selection.length===0?0:n.value.selection.length===1?1:2),w=W(()=>g.value===1),A=W(()=>n.value.selection[0]),C=W(()=>{var fe;return(fe=n.value.selection[0])==null?void 0:fe.componentId}),b=fe=>{n.value.clipboard=fe},p=()=>n.value.clipboard,_=(fe,de,L=!1)=>{if(r!==null)return;o<0&&(a.splice(o),o=0);const le=a[a.length-1],j=Date.now()-(le==null?void 0:le.timestamp);if(le!=null&&le.enableDebounce&&(le==null?void 0:le.id)==fe&&j<AS){r=a.pop();return}r={id:fe,desc:de,timestamp:null,enableDebounce:L,mutations:{}}},S=fe=>{r.mutations[fe.id]||(r.mutations[fe.id]={jsonPre:fe?JSON.stringify(fe):void 0})},R=fe=>{r.mutations[fe.id]||(r.mutations[fe.id]={}),r.mutations[fe.id].jsonPost=fe?JSON.stringify(fe):void 0},Y=fe=>{if(r.id!==fe){$S.warn("Mutation transaction mismatch.",fe,r.id);return}r.timestamp=Date.now(),a.push(r),r=null,$e()},X=()=>{const fe=a.length-1+o,de=a[fe];return de&&o--,$e(),de},te=()=>{const fe=a.length+o,de=a[fe];return de&&o++,$e(),de},$e=()=>{const fe=a.length-1+o,de=a[fe],L=a.length+o,le=a[L];n.value.mutationTransactionsSnapshot={undo:de,redo:le}},pe=()=>n.value.mutationTransactionsSnapshot;async function we(fe){const de=JSON.stringify(fe);let L=5981;for(let j=0;j<de.length;j++)L=(L<<5)+L+de.charCodeAt(j);return L.toString(16).padStart(2,"0")}const ye=async fe=>{const{type:de,title:L,message:le,code:j,blueprintExecution:E,id:O}=fe,ue=await we(fe);if(O){const Be=n.value.logEntries.findIndex(U=>U.id===O);Be!==-1&&n.value.logEntries.splice(Be,1)}else{const Be=n.value.logEntries.find(U=>U.fingerprint===ue);if(Be){Be.repeated++,Be.timestampReceived=new Date,n.value.logEntries.sort((U,Z)=>U.timestampReceived<Z.timestampReceived?1:-1);return}}n.value.logEntries.unshift({id:O,type:de,title:L,message:le,code:j,blueprintExecution:E,timestampReceived:new Date,fingerprint:ue,repeated:0}),n.value.logEntries.splice(CS)},qe=()=>n.value.logEntries.length,Te=()=>{n.value.logEntries=[]},Ce=()=>n.value.logEntries;return{setMode:s,getMode:i,mode:l,activeRootId:c,openPanels:Pe(new Set),isSettingsBarCollapsed:Pe(!1),isComponentIdSelected:v,selectionStatus:g,isSingleSelectionActive:w,firstSelectedId:C,firstSelectedItem:A,removeSelectedComponentId:y,setSelection:u,appendSelection:d,handleSelectionFromEvent:h,selection:W(()=>n.value.selection),setClipboard:b,getClipboard:p,mutationTransactions:Sn(a),openMutationTransaction:_,registerPreMutation:S,registerPostMutation:R,closeMutationTransaction:Y,consumeUndoTransaction:X,consumeRedoTransaction:te,getMutationTransactionsSnapshot:pe,handleLogEntry:ye,getLogEntryCount:qe,clearLogEntries:Te,getLogEntries:Ce}}const re={core:Symbol(),builderManager:Symbol(),evaluatedFields:Symbol(),componentId:Symbol(),isBeingEdited:Symbol(),isDisabled:Symbol(),getChildrenVNodes:Symbol(),renderProxiedComponent:Symbol(),instancePath:Symbol(),flattenedInstancePath:Symbol(),instanceData:Symbol()};var Ta=(e=>(e.Cut="cut",e.Copy="copy",e))(Ta||{}),q=(e=>(e.Text="Text",e.Boolean="Boolean",e.KeyValue="Key-Value",e.Color="Color",e.Shadow="Shadow",e.Number="Number",e.Object="Object",e.IdKey="Identifying Key",e.Width="Width",e.HAlign="Align (H)",e.VAlign="Align (V)",e.Padding="Padding",e.Tools="Tools",e.ComponentPicker="Component",e.Code="Code",e.BlueprintKey="Blueprint Key",e.Handler="Handler",e.WriterGraphId="Graph Id",e.WriterAppId="App Id",e.ComponentId="Component Id",e.ComponentEventType="Component Event Type",e))(q||{}),We=(e=>(e.General="General",e.Style="Style",e.Tools="Tools",e))(We||{}),Zl=(e=>(e.Text="Text",e.Textarea="Textarea",e))(Zl||{});const ES={class:"WdsNumberInput__right"},kS=Ie({inheritAttrs:!1,__name:"WdsNumberInput",props:oo({step:{type:Number,default:1},class:{type:String,default:void 0}},{modelValue:{type:Number,required:!1,default:void 0},modelModifiers:{}}),emits:oo({focusout:e=>typeof e=="number"},["update:modelValue"]),setup(e,{expose:t}){const n=co(e,"modelValue"),r=e;t({focus:s});const o=Pe();function a(i){n.value=(n.value??0)+i,s()}function s(){var i;(i=o.value)==null||i.focus()}return(i,l)=>(I(),M("div",{class:ct(["WdsNumberInput colorTransformer",r.class])},[hn(D("input",Ba({ref_key:"input",ref:o,"onUpdate:modelValue":l[0]||(l[0]=c=>n.value=c),class:"WdsNumberInput__input"},i.$attrs,{type:"number",onFocusout:l[1]||(l[1]=c=>i.$emit("focusout",n.value))}),null,16),[[ia,n.value]]),D("div",ES,[D("button",{class:"WdsNumberInput__right__arrow",type:"button",onClick:l[2]||(l[2]=$r(c=>a(e.step),["prevent"])),onPointerdown:l[3]||(l[3]=$r(()=>{},["prevent"]))},l[6]||(l[6]=[D("span",{class:"WdsNumberInput__right__arrow__up"},null,-1)]),32),D("button",{class:"WdsNumberInput__right__arrow",type:"button",onClick:l[4]||(l[4]=$r(c=>a(-e.step),["prevent"])),onPointerdown:l[5]||(l[5]=$r(()=>{},["prevent"]))},l[7]||(l[7]=[D("span",{class:"WdsNumberInput__right__arrow__down"},null,-1)]),32)])],2))}}),Ne=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},TS=Ne(kS,[["__scopeId","data-v-e225ba84"]]),xS={key:1,class:"CoreDataframeCellNumber--text"},PS=Ie({__name:"CoreDataframeCellNumber",props:{value:{validator:e=>typeof e=="number"||typeof e=="bigint",required:!0},editable:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="number"},setup(e,{emit:t}){const n=e,r=t;function o(a){a!==n.value&&r("change",a)}return(a,s)=>e.editable?(I(),Ve(TS,{key:0,class:"CoreDataframeCellNumber--input","model-value":Number(e.value),onFocusout:s[0]||(s[0]=i=>o(i))},null,8,["model-value"])):(I(),M("div",xS,Me(e.value),1))}}),MS=Ne(PS,[["__scopeId","data-v-76f0032c"]]),OS={class:"markdown"},NS=Ie({__name:"BaseMarkdownRaw",props:{rawMarkdown:{type:String,required:!0}},setup(e){return(t,n)=>{const r=Hv("dompurify-html");return hn((I(),M("div",OS,null,512)),[[r,e.rawMarkdown]])}}}),ey=Ne(NS,[["__scopeId","data-v-2220bc7a"]]),ty=Ie({__name:"BaseMarkdown",props:{rawText:{}},setup(e){let t;const n=Pe(!1),r=e;return Za(async()=>{t=await tn(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url),n.value=!0}),(o,a)=>n.value?(I(),Ve(ey,{key:0,"raw-markdown":String(x(t).parse(r.rawText)).trim(),class:"BaseMarkdown"},null,8,["raw-markdown"])):_e("",!0)}}),RS=["aria-invalid"],LS=Ie({__name:"WdsTextareaInput",props:oo({invalid:{type:Boolean,required:!1}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=co(e,"modelValue");t({focus:i,getSelection:s,value:n,setSelectionEnd:a,setSelectionStart:o});const r=st("input");function o(l){r.value&&(r.value.selectionStart=l)}function a(l){r.value&&(r.value.selectionEnd=l)}function s(){var l,c;return{selectionStart:(l=r.value)==null?void 0:l.selectionStart,selectionEnd:(c=r.value)==null?void 0:c.selectionEnd}}function i(){var l;(l=r.value)==null||l.focus()}return(l,c)=>hn((I(),M("textarea",{ref_key:"input",ref:r,"onUpdate:modelValue":c[0]||(c[0]=u=>n.value=u),"aria-invalid":e.invalid},null,8,RS)),[[ia,n.value]])}}),Sd=Ne(LS,[["__scopeId","data-v-4c9293dd"]]),DS={key:2,class:"CoreDataframeCellText--text"},BS=Ie({__name:"CoreDataframeCellText",props:{value:{validator:()=>!0,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,r=t,o=st("textarea");function a(){o.value.value!==n.value&&r("change",o.value.value)}return(s,i)=>e.editable?(I(),Ve(Sd,{key:0,ref_key:"textarea",ref:o,class:"CoreDataframeCellText--textarea",rows:"1","model-value":String(e.value),onFocusout:a},null,8,["model-value"])):e.useMarkdown?(I(),Ve(ty,{key:1,"raw-text":String(e.value)},null,8,["raw-text"])):(I(),M("div",DS,[D("p",{class:ct({"CoreDataframeCellText__content--noWrap":!e.wrapText})},Me(e.value),3)]))}}),FS=Ne(BS,[["__scopeId","data-v-992ae253"]]),jS=["checked","readonly","tabindex"],VS=Ie({__name:"CoreDataframeCellBoolean",props:{value:{type:Boolean,required:!0},editable:{type:Boolean,required:!1}},emits:{change:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=e,r=t;function o(a){if(!n.editable){a.preventDefault(),a.stopPropagation();return}r("change",a.target.checked)}return(a,s)=>(I(),M("div",{class:ct(["CoreDataframeCellBoolean",{"CoreDataframeCellBoolean--disabled":!e.editable}])},[D("input",{type:"checkbox",checked:e.value,readonly:!e.editable,tabindex:e.editable?0:-1,onChange:o},null,40,jS)],2))}}),US=Ne(VS,[["__scopeId","data-v-2d30bc74"]]);function ny(e,t){return typeof t=="bigint"?t.toString()+"n":t}const HS={class:"CoreDataframeCellUnknown"},zS=Ie({__name:"CoreDataframeCellUnknown",props:{value:{validator:()=>!0,required:!0},wrapText:{type:Boolean,required:!1}},setup(e){const t=e,n=W(()=>JSON.stringify(t.value,ny));return(r,o)=>(I(),M("div",HS,[D("p",{class:ct({"CoreDataframeCellUnknown__content--noWrap":!e.wrapText})},Me(n.value),3)]))}}),KS=Ne(zS,[["__scopeId","data-v-06d2511b"]]),WS=Ie({__name:"CoreDataframeCell",props:{value:{validator:()=>!0,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1}},emits:{change:e=>e!==void 0},setup(e){const t=e,n=W(()=>{switch(typeof t.value){case"number":case"bigint":return MS;case"boolean":return US;case"string":return FS;default:return KS}});return(r,o)=>(I(),Ve(es(n.value),{value:e.value,"use-markdown":e.useMarkdown,editable:e.editable,"wrap-text":e.wrapText,onChange:o[0]||(o[0]=a=>r.$emit("change",a))},null,40,["value","use-markdown","editable","wrap-text"]))}}),cr="__internal_arquero_id",qS="data:application/vnd.apache.arrow.file;base64,QVJST1cxAAD/////iAMAABAAAAAAAAoADgAGAAUACAAKAAAAAAEEABAAAAAAAAoADAAAAAQACAAKAAAAlAIAAAQAAAABAAAADAAAAAgADAAEAAgACAAAAGwCAAAEAAAAXwIAAHsiaW5kZXhfY29sdW1ucyI6IFsiX19pbmRleF9sZXZlbF8wX18iXSwgImNvbHVtbl9pbmRleGVzIjogW3sibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogbnVsbCwgInBhbmRhc190eXBlIjogInVuaWNvZGUiLCAibnVtcHlfdHlwZSI6ICJvYmplY3QiLCAibWV0YWRhdGEiOiB7ImVuY29kaW5nIjogIlVURi04In19XSwgImNvbHVtbnMiOiBbeyJuYW1lIjogImNvbF9hIiwgImZpZWxkX25hbWUiOiAiY29sX2EiLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9LCB7Im5hbWUiOiAiY29sX2IiLCAiZmllbGRfbmFtZSI6ICJjb2xfYiIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6IG51bGwsICJmaWVsZF9uYW1lIjogIl9faW5kZXhfbGV2ZWxfMF9fIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfV0sICJjcmVhdG9yIjogeyJsaWJyYXJ5IjogInB5YXJyb3ciLCAidmVyc2lvbiI6ICIxMi4wLjAifSwgInBhbmRhc192ZXJzaW9uIjogIjEuNS4zIn0ABgAAAHBhbmRhcwAAAwAAAIgAAABEAAAABAAAAJT///8AAAECEAAAACQAAAAEAAAAAAAAABEAAABfX2luZGV4X2xldmVsXzBfXwAAAJD///8AAAABQAAAAND///8AAAECEAAAABgAAAAEAAAAAAAAAAUAAABjb2xfYgAAAMD///8AAAABQAAAABAAFAAIAAYABwAMAAAAEAAQAAAAAAABAhAAAAAgAAAABAAAAAAAAAAFAAAAY29sX2EAAAAIAAwACAAHAAgAAAAAAAABQAAAAAAAAAD/////6AAAABQAAAAAAAAADAAWAAYABQAIAAwADAAAAAADBAAYAAAAMAAAAAAAAAAAAAoAGAAMAAQACAAKAAAAfAAAABAAAAACAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAABAAAAAAAAAAAAAAAAMAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAIAAAAAAAAAAwAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAD/////AAAAABAAAAAMABQABgAIAAwAEAAMAAAAAAAEADwAAAAoAAAABAAAAAEAAACYAwAAAAAAAPAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAACgAMAAAABAAIAAoAAACUAgAABAAAAAEAAAAMAAAACAAMAAQACAAIAAAAbAIAAAQAAABfAgAAeyJpbmRleF9jb2x1bW5zIjogWyJfX2luZGV4X2xldmVsXzBfXyJdLCAiY29sdW1uX2luZGV4ZXMiOiBbeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiBudWxsLCAicGFuZGFzX3R5cGUiOiAidW5pY29kZSIsICJudW1weV90eXBlIjogIm9iamVjdCIsICJtZXRhZGF0YSI6IHsiZW5jb2RpbmciOiAiVVRGLTgifX1dLCAiY29sdW1ucyI6IFt7Im5hbWUiOiAiY29sX2EiLCAiZmllbGRfbmFtZSI6ICJjb2xfYSIsICJwYW5kYXNfdHlwZSI6ICJpbnQ2NCIsICJudW1weV90eXBlIjogImludDY0IiwgIm1ldGFkYXRhIjogbnVsbH0sIHsibmFtZSI6ICJjb2xfYiIsICJmaWVsZF9uYW1lIjogImNvbF9iIiwgInBhbmRhc190eXBlIjogImludDY0IiwgIm51bXB5X3R5cGUiOiAiaW50NjQiLCAibWV0YWRhdGEiOiBudWxsfSwgeyJuYW1lIjogbnVsbCwgImZpZWxkX25hbWUiOiAiX19pbmRleF9sZXZlbF8wX18iLCAicGFuZGFzX3R5cGUiOiAiaW50NjQiLCAibnVtcHlfdHlwZSI6ICJpbnQ2NCIsICJtZXRhZGF0YSI6IG51bGx9XSwgImNyZWF0b3IiOiB7ImxpYnJhcnkiOiAicHlhcnJvdyIsICJ2ZXJzaW9uIjogIjEyLjAuMCJ9LCAicGFuZGFzX3ZlcnNpb24iOiAiMS41LjMifQAGAAAAcGFuZGFzAAADAAAAiAAAAEQAAAAEAAAAlP///wAAAQIQAAAAJAAAAAQAAAAAAAAAEQAAAF9faW5kZXhfbGV2ZWxfMF9fAAAAkP///wAAAAFAAAAA0P///wAAAQIQAAAAGAAAAAQAAAAAAAAABQAAAGNvbF9iAAAAwP///wAAAAFAAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAECEAAAACAAAAAEAAAAAAAAAAUAAABjb2xfYQAAAAgADAAIAAcACAAAAAAAAAFAAAAAsAMAAEFSUk9XMQ==",ry=/^__index_level_[0-9]+__$/;function GS(e){const t=Pe(!1),n=new AbortController;function r(){t.value=!0}function o(a){const s=a.currentTarget;document.hasFocus()?s.contains(a.relatedTarget)||(t.value=!1):window.addEventListener("focus",function i(){window.removeEventListener("focus",i),s.isConnected&&!s.contains(document.activeElement)&&(t.value=!1)},{signal:n.signal})}return Ge(e,(a,s)=>{s&&(s.removeEventListener("focusin",r),s.removeEventListener("focusout",o)),e&&(e.value.addEventListener("focusin",r,{signal:n.signal}),e.value.addEventListener("focusout",o,{signal:n.signal}))}),lo(()=>{n.abort()}),Sn(t)}const JS=["top","right","bottom","left"],Nh=["start","end"],Rh=JS.reduce((e,t)=>e.concat(t,t+"-"+Nh[0],t+"-"+Nh[1]),[]),Fu=Math.min,Fa=Math.max,Sl=Math.round,Fr=e=>({x:e,y:e}),YS={left:"right",right:"left",bottom:"top",top:"bottom"},XS={start:"end",end:"start"};function Lh(e,t,n){return Fa(e,Fu(t,n))}function ec(e,t){return typeof e=="function"?e(t):e}function ns(e){return e.split("-")[0]}function Po(e){return e.split("-")[1]}function oy(e){return e==="x"?"y":"x"}function ay(e){return e==="y"?"height":"width"}function tc(e){return["top","bottom"].includes(ns(e))?"y":"x"}function sy(e){return oy(tc(e))}function QS(e,t,n){n===void 0&&(n=!1);const r=Po(e),o=sy(e),a=ay(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Dh(s)),[s,Dh(s)]}function ZS(e){return e.replace(/start|end/g,t=>XS[t])}function Dh(e){return e.replace(/left|right|bottom|top/g,t=>YS[t])}function eI(e){return{top:0,right:0,bottom:0,left:0,...e}}function tI(e){return typeof e!="number"?eI(e):{top:e,right:e,bottom:e,left:e}}function Il(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Bh(e,t,n){let{reference:r,floating:o}=e;const a=tc(t),s=sy(t),i=ay(s),l=ns(t),c=a==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let v;switch(l){case"top":v={x:u,y:r.y-o.height};break;case"bottom":v={x:u,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-o.width,y:d};break;default:v={x:r.x,y:r.y}}switch(Po(t)){case"start":v[s]-=h*(n&&c?-1:1);break;case"end":v[s]+=h*(n&&c?-1:1);break}return v}const nI=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Bh(c,r,l),h=r,v={},y=0;for(let g=0;g<i.length;g++){const{name:w,fn:A}=i[g],{x:C,y:b,data:p,reset:_}=await A({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:v,rects:c,platform:s,elements:{reference:e,floating:t}});u=C??u,d=b??d,v={...v,[w]:{...v[w],...p}},_&&y<=50&&(y++,typeof _=="object"&&(_.placement&&(h=_.placement),_.rects&&(c=_.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):_.rects),{x:u,y:d}=Bh(c,h,l)),g=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:v}};async function iy(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:v=0}=ec(t,e),y=tI(v),w=i[h?d==="floating"?"reference":"floating":d],A=Il(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(w)))==null||n?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:c,rootBoundary:u,strategy:l})),C=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),p=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},_=Il(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:C,offsetParent:b,strategy:l}):C);return{top:(A.top-_.top+y.top)/p.y,bottom:(_.bottom-A.bottom+y.bottom)/p.y,left:(A.left-_.left+y.left)/p.x,right:(_.right-A.right+y.right)/p.x}}function rI(e,t,n){return(e?[...n.filter(o=>Po(o)===e),...n.filter(o=>Po(o)!==e)]:n.filter(o=>ns(o)===o)).filter(o=>e?Po(o)===e||(t?ZS(o)!==o:!1):!0)}const oI=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:a,middlewareData:s,placement:i,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:h=Rh,autoAlignment:v=!0,...y}=ec(e,t),g=d!==void 0||h===Rh?rI(d||null,v,h):h,w=await iy(t,y),A=((n=s.autoPlacement)==null?void 0:n.index)||0,C=g[A];if(C==null)return{};const b=QS(C,a,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(i!==C)return{reset:{placement:g[0]}};const p=[w[ns(C)],w[b[0]],w[b[1]]],_=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:C,overflows:p}],S=g[A+1];if(S)return{data:{index:A+1,overflows:_},reset:{placement:S}};const R=_.map(te=>{const $e=Po(te.placement);return[te.placement,$e&&u?te.overflows.slice(0,2).reduce((pe,we)=>pe+we,0):te.overflows[0],te.overflows]}).sort((te,$e)=>te[1]-$e[1]),X=((o=R.filter(te=>te[2].slice(0,Po(te[0])?2:3).every($e=>$e<=0))[0])==null?void 0:o[0])||R[0][0];return X!==i?{data:{index:A+1,overflows:_},reset:{placement:X}}:{}}}};async function aI(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=ns(n),i=Po(n),l=tc(n)==="y",c=["left","top"].includes(s)?-1:1,u=a&&l?-1:1,d=ec(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof y=="number"&&(v=i==="end"?y*-1:y),l?{x:v*u,y:h*c}:{x:h*c,y:v*u}}const sI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await aI(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},iI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:w=>{let{x:A,y:C}=w;return{x:A,y:C}}},...l}=ec(e,t),c={x:n,y:r},u=await iy(t,l),d=tc(ns(o)),h=oy(d);let v=c[h],y=c[d];if(a){const w=h==="y"?"top":"left",A=h==="y"?"bottom":"right",C=v+u[w],b=v-u[A];v=Lh(C,v,b)}if(s){const w=d==="y"?"top":"left",A=d==="y"?"bottom":"right",C=y+u[w],b=y-u[A];y=Lh(C,y,b)}const g=i.fn({...t,[h]:v,[d]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:a,[d]:s}}}}}};function nc(){return typeof window<"u"}function rs(e){return ly(e)?(e.nodeName||"").toLowerCase():"#document"}function rr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function uo(e){var t;return(t=(ly(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ly(e){return nc()?e instanceof Node||e instanceof rr(e).Node:!1}function Tr(e){return nc()?e instanceof Element||e instanceof rr(e).Element:!1}function Vr(e){return nc()?e instanceof HTMLElement||e instanceof rr(e).HTMLElement:!1}function Fh(e){return!nc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof rr(e).ShadowRoot}function ci(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=xr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function lI(e){return["table","td","th"].includes(rs(e))}function rc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Id(e){const t=Ed(),n=Tr(e)?xr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(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 cI(e){let t=Bo(e);for(;Vr(t)&&!Ga(t);){if(Id(t))return t;if(rc(t))return null;t=Bo(t)}return null}function Ed(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ga(e){return["html","body","#document"].includes(rs(e))}function xr(e){return rr(e).getComputedStyle(e)}function oc(e){return Tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Bo(e){if(rs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fh(e)&&e.host||uo(e);return Fh(t)?t.host:t}function cy(e){const t=Bo(e);return Ga(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&ci(t)?t:cy(t)}function ju(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=cy(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=rr(o);if(a){const i=Vu(s);return t.concat(s,s.visualViewport||[],ci(o)?o:[],i&&n?ju(i):[])}return t.concat(o,ju(o,[],n))}function Vu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uy(e){const t=xr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Vr(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Sl(n)!==a||Sl(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function dy(e){return Tr(e)?e:e.contextElement}function ja(e){const t=dy(e);if(!Vr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=uy(t);let s=(a?Sl(n.width):n.width)/r,i=(a?Sl(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const uI=Fr(0);function fy(e){const t=rr(e);return!Ed()||!t.visualViewport?uI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==rr(e)?!1:t}function ti(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=dy(e);let s=Fr(1);t&&(r?Tr(r)&&(s=ja(r)):s=ja(e));const i=dI(a,n,r)?fy(a):Fr(0);let l=(o.left+i.x)/s.x,c=(o.top+i.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(a){const h=rr(a),v=r&&Tr(r)?rr(r):r;let y=h,g=Vu(y);for(;g&&r&&v!==y;){const w=ja(g),A=g.getBoundingClientRect(),C=xr(g),b=A.left+(g.clientLeft+parseFloat(C.paddingLeft))*w.x,p=A.top+(g.clientTop+parseFloat(C.paddingTop))*w.y;l*=w.x,c*=w.y,u*=w.x,d*=w.y,l+=b,c+=p,y=rr(g),g=Vu(y)}}return Il({width:u,height:d,x:l,y:c})}function kd(e,t){const n=oc(e).scrollLeft;return t?t.left+n:ti(uo(e)).left+n}function py(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:kd(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function fI(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=uo(r),i=t?rc(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Fr(1);const u=Fr(0),d=Vr(r);if((d||!d&&!a)&&((rs(r)!=="body"||ci(s))&&(l=oc(r)),Vr(r))){const v=ti(r);c=ja(r),u.x=v.x+r.clientLeft,u.y=v.y+r.clientTop}const h=s&&!d&&!a?py(s,l,!0):Fr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function pI(e){return Array.from(e.getClientRects())}function hI(e){const t=uo(e),n=oc(e),r=e.ownerDocument.body,o=Fa(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Fa(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+kd(e);const i=-n.scrollTop;return xr(r).direction==="rtl"&&(s+=Fa(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function mI(e,t){const n=rr(e),r=uo(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const c=Ed();(!c||c&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}function vI(e,t){const n=ti(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Vr(e)?ja(e):Fr(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,c=r*a.y;return{width:s,height:i,x:l,y:c}}function jh(e,t,n){let r;if(t==="viewport")r=mI(e,n);else if(t==="document")r=hI(uo(e));else if(Tr(t))r=vI(t,n);else{const o=fy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Il(r)}function hy(e,t){const n=Bo(e);return n===t||!Tr(n)||Ga(n)?!1:xr(n).position==="fixed"||hy(n,t)}function gI(e,t){const n=t.get(e);if(n)return n;let r=ju(e,[],!1).filter(i=>Tr(i)&&rs(i)!=="body"),o=null;const a=xr(e).position==="fixed";let s=a?Bo(e):e;for(;Tr(s)&&!Ga(s);){const i=xr(s),l=Id(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||ci(s)&&!l&&hy(e,s))?r=r.filter(u=>u!==s):o=i,s=Bo(s)}return t.set(e,r),r}function yI(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?rc(t)?[]:gI(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((c,u)=>{const d=jh(t,u,o);return c.top=Fa(d.top,c.top),c.right=Fu(d.right,c.right),c.bottom=Fu(d.bottom,c.bottom),c.left=Fa(d.left,c.left),c},jh(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _I(e){const{width:t,height:n}=uy(e);return{width:t,height:n}}function bI(e,t,n){const r=Vr(t),o=uo(t),a=n==="fixed",s=ti(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=Fr(0);if(r||!r&&!a)if((rs(t)!=="body"||ci(o))&&(i=oc(t)),r){const h=ti(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=kd(o));const c=o&&!r&&!a?py(o,i):Fr(0),u=s.left+i.scrollLeft-l.x-c.x,d=s.top+i.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function au(e){return xr(e).position==="static"}function Vh(e,t){if(!Vr(e)||xr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return uo(e)===n&&(n=n.ownerDocument.body),n}function my(e,t){const n=rr(e);if(rc(e))return n;if(!Vr(e)){let o=Bo(e);for(;o&&!Ga(o);){if(Tr(o)&&!au(o))return o;o=Bo(o)}return n}let r=Vh(e,t);for(;r&&lI(r)&&au(r);)r=Vh(r,t);return r&&Ga(r)&&au(r)&&!Id(r)?n:r||cI(e)||n}const wI=async function(e){const t=this.getOffsetParent||my,n=this.getDimensions,r=await n(e.floating);return{reference:bI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function AI(e){return xr(e).direction==="rtl"}const CI={convertOffsetParentRelativeRectToViewportRelativeRect:fI,getDocumentElement:uo,getClippingRect:yI,getOffsetParent:my,getElementRects:wI,getClientRects:pI,getDimensions:_I,getScale:ja,isElement:Tr,isRTL:AI},$I=sI,_4=oI,SI=iI,b4=(e,t,n)=>{const r=new Map,o={platform:CI,...n},a={...o.platform,_c:r};return nI(e,t,{...o,platform:a})},II={key:0,class:"CoreDataframeRow__cell CoreDataframeRow__cell--index"},EI=Ie({__name:"CoreDataframeRow",props:{showIndex:{type:Boolean,required:!1},wrapText:{type:Boolean,required:!1},indexText:{type:[Number,String],required:!0},columns:{type:Array,required:!0},row:{type:Object,required:!0},useMarkdown:{type:Boolean,required:!1},editable:{type:Boolean,required:!1},actions:{type:Object,required:!0},displayShadowOnSticky:{type:Boolean}},emits:{change:(e,t,n)=>typeof e=="string"&&typeof t=="number"&&n!==void 0,action:(e,t)=>typeof t=="number"&&typeof e=="string"},setup(e){const t=za(()=>tn(()=>import("./SharedMoreDropdown-DFRHrrY-.js"),__vite__mapDeps([0,1,2]),import.meta.url)),n=[$I(16),SI()],r=e,o=Pe(),a=GS(o),s=Pe(!1),i=W(()=>Object.keys(r.actions||{}).length>0),l=W(()=>Object.entries(r.actions||{}).map(([c,u])=>({value:c,label:u})));return(c,u)=>(I(),M("div",{ref_key:"root",ref:o,class:"CoreDataframeRow",tabindex:"0",onMouseover:u[1]||(u[1]=d=>s.value=!0),onMouseleave:u[2]||(u[2]=d=>s.value=!1),onFocusin:u[3]||(u[3]=d=>s.value=!0)},[u[4]||(u[4]=D("div",{class:"CoreDataframeRow__spacer"},null,-1)),e.showIndex?(I(),M("div",II,Me(e.indexText),1)):_e("",!0),(I(!0),M(ze,null,xt(e.columns,d=>(I(),M("div",{key:`${e.row[x(cr)]}_${d}`,class:"CoreDataframeRow__cell"},[He(WS,{value:e.row[d],"use-markdown":e.useMarkdown,editable:e.editable&&(s.value||x(a)),"wrap-text":e.wrapText,class:"CoreDataframeRow__cell__content",onChange:h=>c.$emit("change",d,e.row[x(cr)],h)},null,8,["value","use-markdown","editable","wrap-text","onChange"])]))),128)),i.value?(I(),M("div",{key:1,class:ct(["CoreDataframeRow__options",{"CoreDataframeRow__options--shadow":e.displayShadowOnSticky}])},[He(x(t),{options:l.value,"hide-icons":"","dropdown-placement":"left","floating-middleware":n,onSelect:u[0]||(u[0]=d=>c.$emit("action",d,e.row[x(cr)]))},null,8,["options"])],2)):_e("",!0)],544))}}),kI=Ne(EI,[["__scopeId","data-v-8f242726"]]);var TI=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function w4(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Uu={exports:{}},gy={},Ir={},Ja={},ui={},bt={},ni={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(C){if(super(),!e.IDENTIFIER.test(C))throw new Error("CodeGen: name must be a valid identifier");this.str=C}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(C){super(),this._items=typeof C=="string"?[C]:C}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const C=this._items[0];return C===""||C==='""'}get str(){var C;return(C=this._str)!==null&&C!==void 0?C:this._str=this._items.reduce((b,p)=>`${b}${p}`,"")}get names(){var C;return(C=this._names)!==null&&C!==void 0?C:this._names=this._items.reduce((b,p)=>(p instanceof n&&(b[p.str]=(b[p.str]||0)+1),b),{})}}e._Code=r,e.nil=new r("");function o(A,...C){const b=[A[0]];let p=0;for(;p<C.length;)i(b,C[p]),b.push(A[++p]);return new r(b)}e._=o;const a=new r("+");function s(A,...C){const b=[v(A[0])];let p=0;for(;p<C.length;)b.push(a),i(b,C[p]),b.push(a,v(A[++p]));return l(b),new r(b)}e.str=s;function i(A,C){C instanceof r?A.push(...C._items):C instanceof n?A.push(C):A.push(d(C))}e.addCodeArg=i;function l(A){let C=1;for(;C<A.length-1;){if(A[C]===a){const b=c(A[C-1],A[C+1]);if(b!==void 0){A.splice(C-1,3,b);continue}A[C++]="+"}C++}}function c(A,C){if(C==='""')return A;if(A==='""')return C;if(typeof A=="string")return C instanceof n||A[A.length-1]!=='"'?void 0:typeof C!="string"?`${A.slice(0,-1)}${C}"`:C[0]==='"'?A.slice(0,-1)+C.slice(1):void 0;if(typeof C=="string"&&C[0]==='"'&&!(A instanceof n))return`"${A}${C.slice(1)}`}function u(A,C){return C.emptyStr()?A:A.emptyStr()?C:s`${A}${C}`}e.strConcat=u;function d(A){return typeof A=="number"||typeof A=="boolean"||A===null?A:v(Array.isArray(A)?A.join(","):A)}function h(A){return new r(v(A))}e.stringify=h;function v(A){return JSON.stringify(A).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function y(A){return typeof A=="string"&&e.IDENTIFIER.test(A)?new r(`.${A}`):o`[${A}]`}e.getProperty=y;function g(A){if(typeof A=="string"&&e.IDENTIFIER.test(A))return new r(`${A}`);throw new Error(`CodeGen: invalid export name: ${A}, use explicit $id name mapping`)}e.getEsmExportName=g;function w(A){return new r(A.toString())}e.regexpCode=w})(ni);var Hu={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=ni;class n extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}}var r;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:c,parent:u}={}){this._names={},this._prefixes=c,this._parent=u}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){const u=this._names[c]||this._nameGroup(c);return`${c}${u.index++}`}_nameGroup(c){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}}e.Scope=o;class a extends t.Name{constructor(c,u){super(u),this.prefix=c}setValue(c,{property:u,itemIndex:d}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(u)}[${d}]`}}e.ValueScopeName=a;const s=(0,t._)`\n`;class i extends o{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?s:t.nil}}get(){return this._scope}name(c){return new a(c,this._newName(c))}value(c,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const h=this.toName(c),{prefix:v}=h,y=(d=u.key)!==null&&d!==void 0?d:u.ref;let g=this._values[v];if(g){const C=g.get(y);if(C)return C}else g=this._values[v]=new Map;g.set(y,h);const w=this._scope[v]||(this._scope[v]=[]),A=w.length;return w[A]=u.ref,h.setValue(u,{property:v,itemIndex:A}),h}getValue(c,u){const d=this._values[c];if(d)return d.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${c}${d.scopePath}`})}scopeCode(c=this._values,u,d){return this._reduceValues(c,h=>{if(h.value===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return h.value.code},u,d)}_reduceValues(c,u,d={},h){let v=t.nil;for(const y in c){const g=c[y];if(!g)continue;const w=d[y]=d[y]||new Map;g.forEach(A=>{if(w.has(A))return;w.set(A,r.Started);let C=u(A);if(C){const b=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${b} ${A} = ${C};${this.opts._n}`}else if(C=h==null?void 0:h(A))v=(0,t._)`${v}${C}${this.opts._n}`;else throw new n(A);w.set(A,r.Completed)})}return v}}e.ValueScope=i})(Hu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=ni,n=Hu;var r=ni;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var o=Hu;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(E,O){return this}}class s extends a{constructor(E,O,ue){super(),this.varKind=E,this.name=O,this.rhs=ue}render({es5:E,_n:O}){const ue=E?n.varKinds.var:this.varKind,Be=this.rhs===void 0?"":` = ${this.rhs}`;return`${ue} ${this.name}${Be};`+O}optimizeNames(E,O){if(E[this.name.str])return this.rhs&&(this.rhs=ye(this.rhs,E,O)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class i extends a{constructor(E,O,ue){super(),this.lhs=E,this.rhs=O,this.sideEffects=ue}render({_n:E}){return`${this.lhs} = ${this.rhs};`+E}optimizeNames(E,O){if(!(this.lhs instanceof t.Name&&!E[this.lhs.str]&&!this.sideEffects))return this.rhs=ye(this.rhs,E,O),this}get names(){const E=this.lhs instanceof t.Name?{}:{...this.lhs.names};return we(E,this.rhs)}}class l extends i{constructor(E,O,ue,Be){super(E,ue,Be),this.op=O}render({_n:E}){return`${this.lhs} ${this.op}= ${this.rhs};`+E}}class c extends a{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`${this.label}:`+E}}class u extends a{constructor(E){super(),this.label=E,this.names={}}render({_n:E}){return`break${this.label?` ${this.label}`:""};`+E}}class d extends a{constructor(E){super(),this.error=E}render({_n:E}){return`throw ${this.error};`+E}get names(){return this.error.names}}class h extends a{constructor(E){super(),this.code=E}render({_n:E}){return`${this.code};`+E}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(E,O){return this.code=ye(this.code,E,O),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends a{constructor(E=[]){super(),this.nodes=E}render(E){return this.nodes.reduce((O,ue)=>O+ue.render(E),"")}optimizeNodes(){const{nodes:E}=this;let O=E.length;for(;O--;){const ue=E[O].optimizeNodes();Array.isArray(ue)?E.splice(O,1,...ue):ue?E[O]=ue:E.splice(O,1)}return E.length>0?this:void 0}optimizeNames(E,O){const{nodes:ue}=this;let Be=ue.length;for(;Be--;){const U=ue[Be];U.optimizeNames(E,O)||(qe(E,U.names),ue.splice(Be,1))}return ue.length>0?this:void 0}get names(){return this.nodes.reduce((E,O)=>pe(E,O.names),{})}}class y extends v{render(E){return"{"+E._n+super.render(E)+"}"+E._n}}class g extends v{}class w extends y{}w.kind="else";class A extends y{constructor(E,O){super(O),this.condition=E}render(E){let O=`if(${this.condition})`+super.render(E);return this.else&&(O+="else "+this.else.render(E)),O}optimizeNodes(){super.optimizeNodes();const E=this.condition;if(E===!0)return this.nodes;let O=this.else;if(O){const ue=O.optimizeNodes();O=this.else=Array.isArray(ue)?new w(ue):ue}if(O)return E===!1?O instanceof A?O:O.nodes:this.nodes.length?this:new A(Te(E),O instanceof A?[O]:O.nodes);if(!(E===!1||!this.nodes.length))return this}optimizeNames(E,O){var ue;if(this.else=(ue=this.else)===null||ue===void 0?void 0:ue.optimizeNames(E,O),!!(super.optimizeNames(E,O)||this.else))return this.condition=ye(this.condition,E,O),this}get names(){const E=super.names;return we(E,this.condition),this.else&&pe(E,this.else.names),E}}A.kind="if";class C extends y{}C.kind="for";class b extends C{constructor(E){super(),this.iteration=E}render(E){return`for(${this.iteration})`+super.render(E)}optimizeNames(E,O){if(super.optimizeNames(E,O))return this.iteration=ye(this.iteration,E,O),this}get names(){return pe(super.names,this.iteration.names)}}class p extends C{constructor(E,O,ue,Be){super(),this.varKind=E,this.name=O,this.from=ue,this.to=Be}render(E){const O=E.es5?n.varKinds.var:this.varKind,{name:ue,from:Be,to:U}=this;return`for(${O} ${ue}=${Be}; ${ue}<${U}; ${ue}++)`+super.render(E)}get names(){const E=we(super.names,this.from);return we(E,this.to)}}class _ extends C{constructor(E,O,ue,Be){super(),this.loop=E,this.varKind=O,this.name=ue,this.iterable=Be}render(E){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(E)}optimizeNames(E,O){if(super.optimizeNames(E,O))return this.iterable=ye(this.iterable,E,O),this}get names(){return pe(super.names,this.iterable.names)}}class S extends y{constructor(E,O,ue){super(),this.name=E,this.args=O,this.async=ue}render(E){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(E)}}S.kind="func";class R extends v{render(E){return"return "+super.render(E)}}R.kind="return";class Y extends y{render(E){let O="try"+super.render(E);return this.catch&&(O+=this.catch.render(E)),this.finally&&(O+=this.finally.render(E)),O}optimizeNodes(){var E,O;return super.optimizeNodes(),(E=this.catch)===null||E===void 0||E.optimizeNodes(),(O=this.finally)===null||O===void 0||O.optimizeNodes(),this}optimizeNames(E,O){var ue,Be;return super.optimizeNames(E,O),(ue=this.catch)===null||ue===void 0||ue.optimizeNames(E,O),(Be=this.finally)===null||Be===void 0||Be.optimizeNames(E,O),this}get names(){const E=super.names;return this.catch&&pe(E,this.catch.names),this.finally&&pe(E,this.finally.names),E}}class X extends y{constructor(E){super(),this.error=E}render(E){return`catch(${this.error})`+super.render(E)}}X.kind="catch";class te extends y{render(E){return"finally"+super.render(E)}}te.kind="finally";class $e{constructor(E,O={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...O,_n:O.lines?`
`:""},this._extScope=E,this._scope=new n.Scope({parent:E}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(E){return this._scope.name(E)}scopeName(E){return this._extScope.name(E)}scopeValue(E,O){const ue=this._extScope.value(E,O);return(this._values[ue.prefix]||(this._values[ue.prefix]=new Set)).add(ue),ue}getScopeValue(E,O){return this._extScope.getValue(E,O)}scopeRefs(E){return this._extScope.scopeRefs(E,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(E,O,ue,Be){const U=this._scope.toName(O);return ue!==void 0&&Be&&(this._constants[U.str]=ue),this._leafNode(new s(E,U,ue)),U}const(E,O,ue){return this._def(n.varKinds.const,E,O,ue)}let(E,O,ue){return this._def(n.varKinds.let,E,O,ue)}var(E,O,ue){return this._def(n.varKinds.var,E,O,ue)}assign(E,O,ue){return this._leafNode(new i(E,O,ue))}add(E,O){return this._leafNode(new l(E,e.operators.ADD,O))}code(E){return typeof E=="function"?E():E!==t.nil&&this._leafNode(new h(E)),this}object(...E){const O=["{"];for(const[ue,Be]of E)O.length>1&&O.push(","),O.push(ue),(ue!==Be||this.opts.es5)&&(O.push(":"),(0,t.addCodeArg)(O,Be));return O.push("}"),new t._Code(O)}if(E,O,ue){if(this._blockNode(new A(E)),O&&ue)this.code(O).else().code(ue).endIf();else if(O)this.code(O).endIf();else if(ue)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(E){return this._elseNode(new A(E))}else(){return this._elseNode(new w)}endIf(){return this._endBlockNode(A,w)}_for(E,O){return this._blockNode(E),O&&this.code(O).endFor(),this}for(E,O){return this._for(new b(E),O)}forRange(E,O,ue,Be,U=this.opts.es5?n.varKinds.var:n.varKinds.let){const Z=this._scope.toName(E);return this._for(new p(U,Z,O,ue),()=>Be(Z))}forOf(E,O,ue,Be=n.varKinds.const){const U=this._scope.toName(E);if(this.opts.es5){const Z=O instanceof t.Name?O:this.var("_arr",O);return this.forRange("_i",0,(0,t._)`${Z}.length`,Q=>{this.var(U,(0,t._)`${Z}[${Q}]`),ue(U)})}return this._for(new _("of",Be,U,O),()=>ue(U))}forIn(E,O,ue,Be=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(E,(0,t._)`Object.keys(${O})`,ue);const U=this._scope.toName(E);return this._for(new _("in",Be,U,O),()=>ue(U))}endFor(){return this._endBlockNode(C)}label(E){return this._leafNode(new c(E))}break(E){return this._leafNode(new u(E))}return(E){const O=new R;if(this._blockNode(O),this.code(E),O.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R)}try(E,O,ue){if(!O&&!ue)throw new Error('CodeGen: "try" without "catch" and "finally"');const Be=new Y;if(this._blockNode(Be),this.code(E),O){const U=this.name("e");this._currNode=Be.catch=new X(U),O(U)}return ue&&(this._currNode=Be.finally=new te,this.code(ue)),this._endBlockNode(X,te)}throw(E){return this._leafNode(new d(E))}block(E,O){return this._blockStarts.push(this._nodes.length),E&&this.code(E).endBlock(O),this}endBlock(E){const O=this._blockStarts.pop();if(O===void 0)throw new Error("CodeGen: not in self-balancing block");const ue=this._nodes.length-O;if(ue<0||E!==void 0&&ue!==E)throw new Error(`CodeGen: wrong number of nodes: ${ue} vs ${E} expected`);return this._nodes.length=O,this}func(E,O=t.nil,ue,Be){return this._blockNode(new S(E,O,ue)),Be&&this.code(Be).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(E=1){for(;E-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(E){return this._currNode.nodes.push(E),this}_blockNode(E){this._currNode.nodes.push(E),this._nodes.push(E)}_endBlockNode(E,O){const ue=this._currNode;if(ue instanceof E||O&&ue instanceof O)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${O?`${E.kind}/${O.kind}`:E.kind}"`)}_elseNode(E){const O=this._currNode;if(!(O instanceof A))throw new Error('CodeGen: "else" without "if"');return this._currNode=O.else=E,this}get _root(){return this._nodes[0]}get _currNode(){const E=this._nodes;return E[E.length-1]}set _currNode(E){const O=this._nodes;O[O.length-1]=E}}e.CodeGen=$e;function pe(j,E){for(const O in E)j[O]=(j[O]||0)+(E[O]||0);return j}function we(j,E){return E instanceof t._CodeOrName?pe(j,E.names):j}function ye(j,E,O){if(j instanceof t.Name)return ue(j);if(!Be(j))return j;return new t._Code(j._items.reduce((U,Z)=>(Z instanceof t.Name&&(Z=ue(Z)),Z instanceof t._Code?U.push(...Z._items):U.push(Z),U),[]));function ue(U){const Z=O[U.str];return Z===void 0||E[U.str]!==1?U:(delete E[U.str],Z)}function Be(U){return U instanceof t._Code&&U._items.some(Z=>Z instanceof t.Name&&E[Z.str]===1&&O[Z.str]!==void 0)}}function qe(j,E){for(const O in E)j[O]=(j[O]||0)-(E[O]||0)}function Te(j){return typeof j=="boolean"||typeof j=="number"||j===null?!j:(0,t._)`!${le(j)}`}e.not=Te;const Ce=L(e.operators.AND);function be(...j){return j.reduce(Ce)}e.and=be;const fe=L(e.operators.OR);function de(...j){return j.reduce(fe)}e.or=de;function L(j){return(E,O)=>E===t.nil?O:O===t.nil?E:(0,t._)`${le(E)} ${j} ${le(O)}`}function le(j){return j instanceof t.Name?j:(0,t._)`(${j})`}})(bt);var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.checkStrictMode=Ke.getErrorPath=Ke.Type=Ke.useFunc=Ke.setEvaluated=Ke.evaluatedPropsToName=Ke.mergeEvaluated=Ke.eachItem=Ke.unescapeJsonPointer=Ke.escapeJsonPointer=Ke.escapeFragment=Ke.unescapeFragment=Ke.schemaRefOrVal=Ke.schemaHasRulesButRef=Ke.schemaHasRules=Ke.checkUnknownRules=Ke.alwaysValidSchema=Ke.toHash=void 0;const Ut=bt,xI=ni;function PI(e){const t={};for(const n of e)t[n]=!0;return t}Ke.toHash=PI;function MI(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(yy(e,t),!_y(t,e.self.RULES.all))}Ke.alwaysValidSchema=MI;function yy(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema||typeof t=="boolean")return;const o=r.RULES.keywords;for(const a in t)o[a]||Ay(e,`unknown keyword: "${a}"`)}Ke.checkUnknownRules=yy;function _y(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(t[n])return!0;return!1}Ke.schemaHasRules=_y;function OI(e,t){if(typeof e=="boolean")return!e;for(const n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}Ke.schemaHasRulesButRef=OI;function NI({topSchemaRef:e,schemaPath:t},n,r,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Ut._)`${n}`}return(0,Ut._)`${e}${t}${(0,Ut.getProperty)(r)}`}Ke.schemaRefOrVal=NI;function RI(e){return by(decodeURIComponent(e))}Ke.unescapeFragment=RI;function LI(e){return encodeURIComponent(Td(e))}Ke.escapeFragment=LI;function Td(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ke.escapeJsonPointer=Td;function by(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ke.unescapeJsonPointer=by;function DI(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)}Ke.eachItem=DI;function Uh({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:r}){return(o,a,s,i)=>{const l=s===void 0?a:s instanceof Ut.Name?(a instanceof Ut.Name?e(o,a,s):t(o,a,s),s):a instanceof Ut.Name?(t(o,s,a),a):n(a,s);return i===Ut.Name&&!(l instanceof Ut.Name)?r(o,l):l}}Ke.mergeEvaluated={props:Uh({mergeNames:(e,t,n)=>e.if((0,Ut._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,Ut._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,Ut._)`${n} || {}`).code((0,Ut._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,Ut._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,Ut._)`${n} || {}`),xd(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:wy}),items:Uh({mergeNames:(e,t,n)=>e.if((0,Ut._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,Ut._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,Ut._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,Ut._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function wy(e,t){if(t===!0)return e.var("props",!0);const n=e.var("props",(0,Ut._)`{}`);return t!==void 0&&xd(e,n,t),n}Ke.evaluatedPropsToName=wy;function xd(e,t,n){Object.keys(n).forEach(r=>e.assign((0,Ut._)`${t}${(0,Ut.getProperty)(r)}`,!0))}Ke.setEvaluated=xd;const Hh={};function BI(e,t){return e.scopeValue("func",{ref:t,code:Hh[t.code]||(Hh[t.code]=new xI._Code(t.code))})}Ke.useFunc=BI;var zu;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(zu||(Ke.Type=zu={}));function FI(e,t,n){if(e instanceof Ut.Name){const r=t===zu.Num;return n?r?(0,Ut._)`"[" + ${e} + "]"`:(0,Ut._)`"['" + ${e} + "']"`:r?(0,Ut._)`"/" + ${e}`:(0,Ut._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Ut.getProperty)(e).toString():"/"+Td(e)}Ke.getErrorPath=FI;function Ay(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}Ke.checkStrictMode=Ay;var Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});const xn=bt,jI={data:new xn.Name("data"),valCxt:new xn.Name("valCxt"),instancePath:new xn.Name("instancePath"),parentData:new xn.Name("parentData"),parentDataProperty:new xn.Name("parentDataProperty"),rootData:new xn.Name("rootData"),dynamicAnchors:new xn.Name("dynamicAnchors"),vErrors:new xn.Name("vErrors"),errors:new xn.Name("errors"),this:new xn.Name("this"),self:new xn.Name("self"),scope:new xn.Name("scope"),json:new xn.Name("json"),jsonPos:new xn.Name("jsonPos"),jsonLen:new xn.Name("jsonLen"),jsonPart:new xn.Name("jsonPart")};Ur.default=jI;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=bt,n=Ke,r=Ur;e.keywordError={message:({keyword:w})=>(0,t.str)`must pass "${w}" keyword validation`},e.keyword$DataError={message:({keyword:w,schemaType:A})=>A?(0,t.str)`"${w}" keyword must be ${A} ($data)`:(0,t.str)`"${w}" keyword is invalid ($data)`};function o(w,A=e.keywordError,C,b){const{it:p}=w,{gen:_,compositeRule:S,allErrors:R}=p,Y=d(w,A,C);b??(S||R)?l(_,Y):c(p,(0,t._)`[${Y}]`)}e.reportError=o;function a(w,A=e.keywordError,C){const{it:b}=w,{gen:p,compositeRule:_,allErrors:S}=b,R=d(w,A,C);l(p,R),_||S||c(b,r.default.vErrors)}e.reportExtraError=a;function s(w,A){w.assign(r.default.errors,A),w.if((0,t._)`${r.default.vErrors} !== null`,()=>w.if(A,()=>w.assign((0,t._)`${r.default.vErrors}.length`,A),()=>w.assign(r.default.vErrors,null)))}e.resetErrorsCount=s;function i({gen:w,keyword:A,schemaValue:C,data:b,errsCount:p,it:_}){if(p===void 0)throw new Error("ajv implementation error");const S=w.name("err");w.forRange("i",p,r.default.errors,R=>{w.const(S,(0,t._)`${r.default.vErrors}[${R}]`),w.if((0,t._)`${S}.instancePath === undefined`,()=>w.assign((0,t._)`${S}.instancePath`,(0,t.strConcat)(r.default.instancePath,_.errorPath))),w.assign((0,t._)`${S}.schemaPath`,(0,t.str)`${_.errSchemaPath}/${A}`),_.opts.verbose&&(w.assign((0,t._)`${S}.schema`,C),w.assign((0,t._)`${S}.data`,b))})}e.extendErrors=i;function l(w,A){const C=w.const("err",A);w.if((0,t._)`${r.default.vErrors} === null`,()=>w.assign(r.default.vErrors,(0,t._)`[${C}]`),(0,t._)`${r.default.vErrors}.push(${C})`),w.code((0,t._)`${r.default.errors}++`)}function c(w,A){const{gen:C,validateName:b,schemaEnv:p}=w;p.$async?C.throw((0,t._)`new ${w.ValidationError}(${A})`):(C.assign((0,t._)`${b}.errors`,A),C.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(w,A,C){const{createErrors:b}=w.it;return b===!1?(0,t._)`{}`:h(w,A,C)}function h(w,A,C={}){const{gen:b,it:p}=w,_=[v(p,C),y(w,C)];return g(w,A,_),b.object(..._)}function v({errorPath:w},{instancePath:A}){const C=A?(0,t.str)`${w}${(0,n.getErrorPath)(A,n.Type.Str)}`:w;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,C)]}function y({keyword:w,it:{errSchemaPath:A}},{schemaPath:C,parentSchema:b}){let p=b?A:(0,t.str)`${A}/${w}`;return C&&(p=(0,t.str)`${p}${(0,n.getErrorPath)(C,n.Type.Str)}`),[u.schemaPath,p]}function g(w,{params:A,message:C},b){const{keyword:p,data:_,schemaValue:S,it:R}=w,{opts:Y,propertyName:X,topSchemaRef:te,schemaPath:$e}=R;b.push([u.keyword,p],[u.params,typeof A=="function"?A(w):A||(0,t._)`{}`]),Y.messages&&b.push([u.message,typeof C=="function"?C(w):C]),Y.verbose&&b.push([u.schema,S],[u.parentSchema,(0,t._)`${te}${$e}`],[r.default.data,_]),X&&b.push([u.propertyName,X])}})(ui);Object.defineProperty(Ja,"__esModule",{value:!0});Ja.boolOrEmptySchema=Ja.topBoolOrEmptySchema=void 0;const VI=ui,UI=bt,HI=Ur,zI={message:"boolean schema is false"};function KI(e){const{gen:t,schema:n,validateName:r}=e;n===!1?Cy(e,!1):typeof n=="object"&&n.$async===!0?t.return(HI.default.data):(t.assign((0,UI._)`${r}.errors`,null),t.return(!0))}Ja.topBoolOrEmptySchema=KI;function WI(e,t){const{gen:n,schema:r}=e;r===!1?(n.var(t,!1),Cy(e)):n.var(t,!0)}Ja.boolOrEmptySchema=WI;function Cy(e,t){const{gen:n,data:r}=e,o={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,VI.reportError)(o,zI,void 0,t)}var dn={},la={};Object.defineProperty(la,"__esModule",{value:!0});la.getRules=la.isJSONType=void 0;const qI=["string","number","integer","boolean","null","object","array"],GI=new Set(qI);function JI(e){return typeof e=="string"&&GI.has(e)}la.isJSONType=JI;function YI(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}la.getRules=YI;var eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.shouldUseRule=eo.shouldUseGroup=eo.schemaHasRulesForType=void 0;function XI({schema:e,self:t},n){const r=t.RULES.types[n];return r&&r!==!0&&$y(e,r)}eo.schemaHasRulesForType=XI;function $y(e,t){return t.rules.some(n=>Sy(e,n))}eo.shouldUseGroup=$y;function Sy(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(r=>e[r]!==void 0))}eo.shouldUseRule=Sy;Object.defineProperty(dn,"__esModule",{value:!0});dn.reportTypeError=dn.checkDataTypes=dn.checkDataType=dn.coerceAndCheckDataType=dn.getJSONTypes=dn.getSchemaTypes=dn.DataType=void 0;const QI=la,ZI=eo,eE=ui,ft=bt,Iy=Ke;var Va;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(Va||(dn.DataType=Va={}));function tE(e){const t=Ey(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}dn.getSchemaTypes=tE;function Ey(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(QI.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}dn.getJSONTypes=Ey;function nE(e,t){const{gen:n,data:r,opts:o}=e,a=rE(t,o.coerceTypes),s=t.length>0&&!(a.length===0&&t.length===1&&(0,ZI.schemaHasRulesForType)(e,t[0]));if(s){const i=Pd(t,r,o.strictNumbers,Va.Wrong);n.if(i,()=>{a.length?oE(e,t,a):Md(e)})}return s}dn.coerceAndCheckDataType=nE;const ky=new Set(["string","number","integer","boolean","null"]);function rE(e,t){return t?e.filter(n=>ky.has(n)||t==="array"&&n==="array"):[]}function oE(e,t,n){const{gen:r,data:o,opts:a}=e,s=r.let("dataType",(0,ft._)`typeof ${o}`),i=r.let("coerced",(0,ft._)`undefined`);a.coerceTypes==="array"&&r.if((0,ft._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>r.assign(o,(0,ft._)`${o}[0]`).assign(s,(0,ft._)`typeof ${o}`).if(Pd(t,o,a.strictNumbers),()=>r.assign(i,o))),r.if((0,ft._)`${i} !== undefined`);for(const c of n)(ky.has(c)||c==="array"&&a.coerceTypes==="array")&&l(c);r.else(),Md(e),r.endIf(),r.if((0,ft._)`${i} !== undefined`,()=>{r.assign(o,i),aE(e,i)});function l(c){switch(c){case"string":r.elseIf((0,ft._)`${s} == "number" || ${s} == "boolean"`).assign(i,(0,ft._)`"" + ${o}`).elseIf((0,ft._)`${o} === null`).assign(i,(0,ft._)`""`);return;case"number":r.elseIf((0,ft._)`${s} == "boolean" || ${o} === null
              || (${s} == "string" && ${o} && ${o} == +${o})`).assign(i,(0,ft._)`+${o}`);return;case"integer":r.elseIf((0,ft._)`${s} === "boolean" || ${o} === null
              || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(i,(0,ft._)`+${o}`);return;case"boolean":r.elseIf((0,ft._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(i,!1).elseIf((0,ft._)`${o} === "true" || ${o} === 1`).assign(i,!0);return;case"null":r.elseIf((0,ft._)`${o} === "" || ${o} === 0 || ${o} === false`),r.assign(i,null);return;case"array":r.elseIf((0,ft._)`${s} === "string" || ${s} === "number"
              || ${s} === "boolean" || ${o} === null`).assign(i,(0,ft._)`[${o}]`)}}}function aE({gen:e,parentData:t,parentDataProperty:n},r){e.if((0,ft._)`${t} !== undefined`,()=>e.assign((0,ft._)`${t}[${n}]`,r))}function Ku(e,t,n,r=Va.Correct){const o=r===Va.Correct?ft.operators.EQ:ft.operators.NEQ;let a;switch(e){case"null":return(0,ft._)`${t} ${o} null`;case"array":a=(0,ft._)`Array.isArray(${t})`;break;case"object":a=(0,ft._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=s((0,ft._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=s();break;default:return(0,ft._)`typeof ${t} ${o} ${e}`}return r===Va.Correct?a:(0,ft.not)(a);function s(i=ft.nil){return(0,ft.and)((0,ft._)`typeof ${t} == "number"`,i,n?(0,ft._)`isFinite(${t})`:ft.nil)}}dn.checkDataType=Ku;function Pd(e,t,n,r){if(e.length===1)return Ku(e[0],t,n,r);let o;const a=(0,Iy.toHash)(e);if(a.array&&a.object){const s=(0,ft._)`typeof ${t} != "object"`;o=a.null?s:(0,ft._)`!${t} || ${s}`,delete a.null,delete a.array,delete a.object}else o=ft.nil;a.number&&delete a.integer;for(const s in a)o=(0,ft.and)(o,Ku(s,t,n,r));return o}dn.checkDataTypes=Pd;const sE={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ft._)`{type: ${e}}`:(0,ft._)`{type: ${t}}`};function Md(e){const t=iE(e);(0,eE.reportError)(t,sE)}dn.reportTypeError=Md;function iE(e){const{gen:t,data:n,schema:r}=e,o=(0,Iy.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:e}}var ac={};Object.defineProperty(ac,"__esModule",{value:!0});ac.assignDefaults=void 0;const Sa=bt,lE=Ke;function cE(e,t){const{properties:n,items:r}=e.schema;if(t==="object"&&n)for(const o in n)zh(e,o,n[o].default);else t==="array"&&Array.isArray(r)&&r.forEach((o,a)=>zh(e,a,o.default))}ac.assignDefaults=cE;function zh(e,t,n){const{gen:r,compositeRule:o,data:a,opts:s}=e;if(n===void 0)return;const i=(0,Sa._)`${a}${(0,Sa.getProperty)(t)}`;if(o){(0,lE.checkStrictMode)(e,`default is ignored for: ${i}`);return}let l=(0,Sa._)`${i} === undefined`;s.useDefaults==="empty"&&(l=(0,Sa._)`${l} || ${i} === null || ${i} === ""`),r.if(l,(0,Sa._)`${i} = ${(0,Sa.stringify)(n)}`)}var Dr={},_t={};Object.defineProperty(_t,"__esModule",{value:!0});_t.validateUnion=_t.validateArray=_t.usePattern=_t.callValidateCode=_t.schemaProperties=_t.allSchemaProperties=_t.noPropertyInData=_t.propertyInData=_t.isOwnProperty=_t.hasPropFunc=_t.reportMissingProp=_t.checkMissingProp=_t.checkReportMissingProp=void 0;const Qt=bt,Od=Ke,bo=Ur,uE=Ke;function dE(e,t){const{gen:n,data:r,it:o}=e;n.if(Rd(n,r,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Qt._)`${t}`},!0),e.error()})}_t.checkReportMissingProp=dE;function fE({gen:e,data:t,it:{opts:n}},r,o){return(0,Qt.or)(...r.map(a=>(0,Qt.and)(Rd(e,t,a,n.ownProperties),(0,Qt._)`${o} = ${a}`)))}_t.checkMissingProp=fE;function pE(e,t){e.setParams({missingProperty:t},!0),e.error()}_t.reportMissingProp=pE;function Ty(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Qt._)`Object.prototype.hasOwnProperty`})}_t.hasPropFunc=Ty;function Nd(e,t,n){return(0,Qt._)`${Ty(e)}.call(${t}, ${n})`}_t.isOwnProperty=Nd;function hE(e,t,n,r){const o=(0,Qt._)`${t}${(0,Qt.getProperty)(n)} !== undefined`;return r?(0,Qt._)`${o} && ${Nd(e,t,n)}`:o}_t.propertyInData=hE;function Rd(e,t,n,r){const o=(0,Qt._)`${t}${(0,Qt.getProperty)(n)} === undefined`;return r?(0,Qt.or)(o,(0,Qt.not)(Nd(e,t,n))):o}_t.noPropertyInData=Rd;function xy(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}_t.allSchemaProperties=xy;function mE(e,t){return xy(t).filter(n=>!(0,Od.alwaysValidSchema)(e,t[n]))}_t.schemaProperties=mE;function vE({schemaCode:e,data:t,it:{gen:n,topSchemaRef:r,schemaPath:o,errorPath:a},it:s},i,l,c){const u=c?(0,Qt._)`${e}, ${t}, ${r}${o}`:t,d=[[bo.default.instancePath,(0,Qt.strConcat)(bo.default.instancePath,a)],[bo.default.parentData,s.parentData],[bo.default.parentDataProperty,s.parentDataProperty],[bo.default.rootData,bo.default.rootData]];s.opts.dynamicRef&&d.push([bo.default.dynamicAnchors,bo.default.dynamicAnchors]);const h=(0,Qt._)`${u}, ${n.object(...d)}`;return l!==Qt.nil?(0,Qt._)`${i}.call(${l}, ${h})`:(0,Qt._)`${i}(${h})`}_t.callValidateCode=vE;const gE=(0,Qt._)`new RegExp`;function yE({gen:e,it:{opts:t}},n){const r=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(n,r);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:(0,Qt._)`${o.code==="new RegExp"?gE:(0,uE.useFunc)(e,o)}(${n}, ${r})`})}_t.usePattern=yE;function _E(e){const{gen:t,data:n,keyword:r,it:o}=e,a=t.name("valid");if(o.allErrors){const i=t.let("valid",!0);return s(()=>t.assign(i,!1)),i}return t.var(a,!0),s(()=>t.break()),a;function s(i){const l=t.const("len",(0,Qt._)`${n}.length`);t.forRange("i",0,l,c=>{e.subschema({keyword:r,dataProp:c,dataPropType:Od.Type.Num},a),t.if((0,Qt.not)(a),i)})}}_t.validateArray=_E;function bE(e){const{gen:t,schema:n,keyword:r,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(l=>(0,Od.alwaysValidSchema)(o,l))&&!o.opts.unevaluated)return;const s=t.let("valid",!1),i=t.name("_valid");t.block(()=>n.forEach((l,c)=>{const u=e.subschema({keyword:r,schemaProp:c,compositeRule:!0},i);t.assign(s,(0,Qt._)`${s} || ${i}`),e.mergeValidEvaluated(u,i)||t.if((0,Qt.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}_t.validateUnion=bE;Object.defineProperty(Dr,"__esModule",{value:!0});Dr.validateKeywordUsage=Dr.validSchemaType=Dr.funcKeywordCode=Dr.macroKeywordCode=void 0;const jn=bt,Qo=Ur,wE=_t,AE=ui;function CE(e,t){const{gen:n,keyword:r,schema:o,parentSchema:a,it:s}=e,i=t.macro.call(s.self,o,a,s),l=Py(n,r,i);s.opts.validateSchema!==!1&&s.self.validateSchema(i,!0);const c=n.name("valid");e.subschema({schema:i,schemaPath:jn.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:l,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}Dr.macroKeywordCode=CE;function $E(e,t){var n;const{gen:r,keyword:o,schema:a,parentSchema:s,$data:i,it:l}=e;IE(l,t);const c=!i&&t.compile?t.compile.call(l.self,a,s,l):t.validate,u=Py(r,o,c),d=r.let("valid");e.block$data(d,h),e.ok((n=t.valid)!==null&&n!==void 0?n:d);function h(){if(t.errors===!1)g(),t.modifying&&Kh(e),w(()=>e.error());else{const A=t.async?v():y();t.modifying&&Kh(e),w(()=>SE(e,A))}}function v(){const A=r.let("ruleErrs",null);return r.try(()=>g((0,jn._)`await `),C=>r.assign(d,!1).if((0,jn._)`${C} instanceof ${l.ValidationError}`,()=>r.assign(A,(0,jn._)`${C}.errors`),()=>r.throw(C))),A}function y(){const A=(0,jn._)`${u}.errors`;return r.assign(A,null),g(jn.nil),A}function g(A=t.async?(0,jn._)`await `:jn.nil){const C=l.opts.passContext?Qo.default.this:Qo.default.self,b=!("compile"in t&&!i||t.schema===!1);r.assign(d,(0,jn._)`${A}${(0,wE.callValidateCode)(e,u,C,b)}`,t.modifying)}function w(A){var C;r.if((0,jn.not)((C=t.valid)!==null&&C!==void 0?C:d),A)}}Dr.funcKeywordCode=$E;function Kh(e){const{gen:t,data:n,it:r}=e;t.if(r.parentData,()=>t.assign(n,(0,jn._)`${r.parentData}[${r.parentDataProperty}]`))}function SE(e,t){const{gen:n}=e;n.if((0,jn._)`Array.isArray(${t})`,()=>{n.assign(Qo.default.vErrors,(0,jn._)`${Qo.default.vErrors} === null ? ${t} : ${Qo.default.vErrors}.concat(${t})`).assign(Qo.default.errors,(0,jn._)`${Qo.default.vErrors}.length`),(0,AE.extendErrors)(e)},()=>e.error())}function IE({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Py(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,jn.stringify)(n)})}function EE(e,t,n=!1){return!t.length||t.some(r=>r==="array"?Array.isArray(e):r==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==r||n&&typeof e>"u")}Dr.validSchemaType=EE;function kE({schema:e,opts:t,self:n,errSchemaPath:r},o,a){if(Array.isArray(o.keyword)?!o.keyword.includes(a):o.keyword!==a)throw new Error("ajv implementation error");const s=o.dependencies;if(s!=null&&s.some(i=>!Object.prototype.hasOwnProperty.call(e,i)))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[a])){const l=`keyword "${a}" value is invalid at path "${r}": `+n.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(l);else throw new Error(l)}}Dr.validateKeywordUsage=kE;var Mo={};Object.defineProperty(Mo,"__esModule",{value:!0});Mo.extendSubschemaMode=Mo.extendSubschemaData=Mo.getSubschema=void 0;const Lr=bt,My=Ke;function TE(e,{keyword:t,schemaProp:n,schema:r,schemaPath:o,errSchemaPath:a,topSchemaRef:s}){if(t!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const i=e.schema[t];return n===void 0?{schema:i,schemaPath:(0,Lr._)`${e.schemaPath}${(0,Lr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[n],schemaPath:(0,Lr._)`${e.schemaPath}${(0,Lr.getProperty)(t)}${(0,Lr.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,My.escapeFragment)(n)}`}}if(r!==void 0){if(o===void 0||a===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:o,topSchemaRef:s,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')}Mo.getSubschema=TE;function xE(e,t,{dataProp:n,dataPropType:r,data:o,dataTypes:a,propertyName:s}){if(o!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:i}=t;if(n!==void 0){const{errorPath:c,dataPathArr:u,opts:d}=t,h=i.let("data",(0,Lr._)`${t.data}${(0,Lr.getProperty)(n)}`,!0);l(h),e.errorPath=(0,Lr.str)`${c}${(0,My.getErrorPath)(n,r,d.jsPropertySyntax)}`,e.parentDataProperty=(0,Lr._)`${n}`,e.dataPathArr=[...u,e.parentDataProperty]}if(o!==void 0){const c=o instanceof Lr.Name?o:i.let("data",o,!0);l(c),s!==void 0&&(e.propertyName=s)}a&&(e.dataTypes=a);function l(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}Mo.extendSubschemaData=xE;function PE(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:r,createErrors:o,allErrors:a}){r!==void 0&&(e.compositeRule=r),o!==void 0&&(e.createErrors=o),a!==void 0&&(e.allErrors=a),e.jtdDiscriminator=t,e.jtdMetadata=n}Mo.extendSubschemaMode=PE;var In={},Oy=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;o--!==0;){var s=a[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n},Ny={exports:{}},Eo=Ny.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var r=typeof n=="function"?n:n.pre||function(){},o=n.post||function(){};rl(t,r,o,e,"",e)};Eo.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Eo.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Eo.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Eo.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function rl(e,t,n,r,o,a,s,i,l,c){if(r&&typeof r=="object"&&!Array.isArray(r)){t(r,o,a,s,i,l,c);for(var u in r){var d=r[u];if(Array.isArray(d)){if(u in Eo.arrayKeywords)for(var h=0;h<d.length;h++)rl(e,t,n,d[h],o+"/"+u+"/"+h,a,o,u,r,h)}else if(u in Eo.propsKeywords){if(d&&typeof d=="object")for(var v in d)rl(e,t,n,d[v],o+"/"+u+"/"+ME(v),a,o,u,r,v)}else(u in Eo.keywords||e.allKeys&&!(u in Eo.skipKeywords))&&rl(e,t,n,d,o+"/"+u,a,o,u,r)}n(r,o,a,s,i,l,c)}}function ME(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var OE=Ny.exports;Object.defineProperty(In,"__esModule",{value:!0});In.getSchemaRefs=In.resolveUrl=In.normalizeId=In._getFullPath=In.getFullPath=In.inlineRef=void 0;const NE=Ke,RE=Oy,LE=OE,DE=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function BE(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Wu(e):t?Ry(e)<=t:!1}In.inlineRef=BE;const FE=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Wu(e){for(const t in e){if(FE.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(Wu)||typeof n=="object"&&Wu(n))return!0}return!1}function Ry(e){let t=0;for(const n in e){if(n==="$ref")return 1/0;if(t++,!DE.has(n)&&(typeof e[n]=="object"&&(0,NE.eachItem)(e[n],r=>t+=Ry(r)),t===1/0))return 1/0}return t}function Ly(e,t="",n){n!==!1&&(t=Ua(t));const r=e.parse(t);return Dy(e,r)}In.getFullPath=Ly;function Dy(e,t){return e.serialize(t).split("#")[0]+"#"}In._getFullPath=Dy;const jE=/#\/?$/;function Ua(e){return e?e.replace(jE,""):""}In.normalizeId=Ua;function VE(e,t,n){return n=Ua(n),e.resolve(t,n)}In.resolveUrl=VE;const UE=/^[a-z_][-a-z0-9._]*$/i;function HE(e,t){if(typeof e=="boolean")return{};const{schemaId:n,uriResolver:r}=this.opts,o=Ua(e[n]||t),a={"":o},s=Ly(r,o,!1),i={},l=new Set;return LE(e,{allKeys:!0},(d,h,v,y)=>{if(y===void 0)return;const g=s+h;let w=a[y];typeof d[n]=="string"&&(w=A.call(this,d[n])),C.call(this,d.$anchor),C.call(this,d.$dynamicAnchor),a[h]=w;function A(b){const p=this.opts.uriResolver.resolve;if(b=Ua(w?p(w,b):b),l.has(b))throw u(b);l.add(b);let _=this.refs[b];return typeof _=="string"&&(_=this.refs[_]),typeof _=="object"?c(d,_.schema,b):b!==Ua(g)&&(b[0]==="#"?(c(d,i[b],b),i[b]=d):this.refs[b]=g),b}function C(b){if(typeof b=="string"){if(!UE.test(b))throw new Error(`invalid anchor "${b}"`);A.call(this,`#${b}`)}}}),i;function c(d,h,v){if(h!==void 0&&!RE(d,h))throw u(v)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}In.getSchemaRefs=HE;Object.defineProperty(Ir,"__esModule",{value:!0});Ir.getData=Ir.KeywordCxt=Ir.validateFunctionCode=void 0;const By=Ja,Wh=dn,Ld=eo,El=dn,zE=ac,Fs=Dr,su=Mo,nt=bt,ut=Ur,KE=In,to=Ke,Cs=ui;function WE(e){if(Vy(e)&&(Uy(e),jy(e))){JE(e);return}Fy(e,()=>(0,By.topBoolOrEmptySchema)(e))}Ir.validateFunctionCode=WE;function Fy({gen:e,validateName:t,schema:n,schemaEnv:r,opts:o},a){o.code.es5?e.func(t,(0,nt._)`${ut.default.data}, ${ut.default.valCxt}`,r.$async,()=>{e.code((0,nt._)`"use strict"; ${qh(n,o)}`),GE(e,o),e.code(a)}):e.func(t,(0,nt._)`${ut.default.data}, ${qE(o)}`,r.$async,()=>e.code(qh(n,o)).code(a))}function qE(e){return(0,nt._)`{${ut.default.instancePath}="", ${ut.default.parentData}, ${ut.default.parentDataProperty}, ${ut.default.rootData}=${ut.default.data}${e.dynamicRef?(0,nt._)`, ${ut.default.dynamicAnchors}={}`:nt.nil}}={}`}function GE(e,t){e.if(ut.default.valCxt,()=>{e.var(ut.default.instancePath,(0,nt._)`${ut.default.valCxt}.${ut.default.instancePath}`),e.var(ut.default.parentData,(0,nt._)`${ut.default.valCxt}.${ut.default.parentData}`),e.var(ut.default.parentDataProperty,(0,nt._)`${ut.default.valCxt}.${ut.default.parentDataProperty}`),e.var(ut.default.rootData,(0,nt._)`${ut.default.valCxt}.${ut.default.rootData}`),t.dynamicRef&&e.var(ut.default.dynamicAnchors,(0,nt._)`${ut.default.valCxt}.${ut.default.dynamicAnchors}`)},()=>{e.var(ut.default.instancePath,(0,nt._)`""`),e.var(ut.default.parentData,(0,nt._)`undefined`),e.var(ut.default.parentDataProperty,(0,nt._)`undefined`),e.var(ut.default.rootData,ut.default.data),t.dynamicRef&&e.var(ut.default.dynamicAnchors,(0,nt._)`{}`)})}function JE(e){const{schema:t,opts:n,gen:r}=e;Fy(e,()=>{n.$comment&&t.$comment&&zy(e),ek(e),r.let(ut.default.vErrors,null),r.let(ut.default.errors,0),n.unevaluated&&YE(e),Hy(e),rk(e)})}function YE(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,nt._)`${n}.evaluated`),t.if((0,nt._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,nt._)`${e.evaluated}.props`,(0,nt._)`undefined`)),t.if((0,nt._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,nt._)`${e.evaluated}.items`,(0,nt._)`undefined`))}function qh(e,t){const n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,nt._)`/*# sourceURL=${n} */`:nt.nil}function XE(e,t){if(Vy(e)&&(Uy(e),jy(e))){QE(e,t);return}(0,By.boolOrEmptySchema)(e,t)}function jy({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function Vy(e){return typeof e.schema!="boolean"}function QE(e,t){const{schema:n,gen:r,opts:o}=e;o.$comment&&n.$comment&&zy(e),tk(e),nk(e);const a=r.const("_errs",ut.default.errors);Hy(e,a),r.var(t,(0,nt._)`${a} === ${ut.default.errors}`)}function Uy(e){(0,to.checkUnknownRules)(e),ZE(e)}function Hy(e,t){if(e.opts.jtd)return Gh(e,[],!1,t);const n=(0,Wh.getSchemaTypes)(e.schema),r=(0,Wh.coerceAndCheckDataType)(e,n);Gh(e,n,!r,t)}function ZE(e){const{schema:t,errSchemaPath:n,opts:r,self:o}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,to.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function ek(e){const{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,to.checkStrictMode)(e,"default is ignored in the schema root")}function tk(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,KE.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function nk(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function zy({gen:e,schemaEnv:t,schema:n,errSchemaPath:r,opts:o}){const a=n.$comment;if(o.$comment===!0)e.code((0,nt._)`${ut.default.self}.logger.log(${a})`);else if(typeof o.$comment=="function"){const s=(0,nt.str)`${r}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code((0,nt._)`${ut.default.self}.opts.$comment(${a}, ${s}, ${i}.schema)`)}}function rk(e){const{gen:t,schemaEnv:n,validateName:r,ValidationError:o,opts:a}=e;n.$async?t.if((0,nt._)`${ut.default.errors} === 0`,()=>t.return(ut.default.data),()=>t.throw((0,nt._)`new ${o}(${ut.default.vErrors})`)):(t.assign((0,nt._)`${r}.errors`,ut.default.vErrors),a.unevaluated&&ok(e),t.return((0,nt._)`${ut.default.errors} === 0`))}function ok({gen:e,evaluated:t,props:n,items:r}){n instanceof nt.Name&&e.assign((0,nt._)`${t}.props`,n),r instanceof nt.Name&&e.assign((0,nt._)`${t}.items`,r)}function Gh(e,t,n,r){const{gen:o,schema:a,data:s,allErrors:i,opts:l,self:c}=e,{RULES:u}=c;if(a.$ref&&(l.ignoreKeywordsWithRef||!(0,to.schemaHasRulesButRef)(a,u))){o.block(()=>qy(e,"$ref",u.all.$ref.definition));return}l.jtd||ak(e,t),o.block(()=>{for(const h of u.rules)d(h);d(u.post)});function d(h){(0,Ld.shouldUseGroup)(a,h)&&(h.type?(o.if((0,El.checkDataType)(h.type,s,l.strictNumbers)),Jh(e,h),t.length===1&&t[0]===h.type&&n&&(o.else(),(0,El.reportTypeError)(e)),o.endIf()):Jh(e,h),i||o.if((0,nt._)`${ut.default.errors} === ${r||0}`))}}function Jh(e,t){const{gen:n,schema:r,opts:{useDefaults:o}}=e;o&&(0,zE.assignDefaults)(e,t.type),n.block(()=>{for(const a of t.rules)(0,Ld.shouldUseRule)(r,a)&&qy(e,a.keyword,a.definition,t.type)})}function ak(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(sk(e,t),e.opts.allowUnionTypes||ik(e,t),lk(e,e.dataTypes))}function sk(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{Ky(e.dataTypes,n)||Dd(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),uk(e,t)}}function ik(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Dd(e,"use allowUnionTypes to allow union type keyword")}function lk(e,t){const n=e.self.RULES.all;for(const r in n){const o=n[r];if(typeof o=="object"&&(0,Ld.shouldUseRule)(e.schema,o)){const{type:a}=o.definition;a.length&&!a.some(s=>ck(t,s))&&Dd(e,`missing type "${a.join(",")}" for keyword "${r}"`)}}}function ck(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Ky(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function uk(e,t){const n=[];for(const r of e.dataTypes)Ky(t,r)?n.push(r):t.includes("integer")&&r==="number"&&n.push("integer");e.dataTypes=n}function Dd(e,t){const n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,to.checkStrictMode)(e,t,e.opts.strictTypes)}class Wy{constructor(t,n,r){if((0,Fs.validateKeywordUsage)(t,n,r),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=r,this.data=t.data,this.schema=t.schema[r],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,to.schemaRefOrVal)(t,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",Gy(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Fs.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",ut.default.errors))}result(t,n,r){this.failResult((0,nt.not)(t),n,r)}failResult(t,n,r){this.gen.if(t),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,nt.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:n}=this;this.fail((0,nt._)`${n} !== undefined && (${(0,nt.or)(this.invalid$data(),t)})`)}error(t,n,r){if(n){this.setParams(n),this._error(t,r),this.setParams({});return}this._error(t,r)}_error(t,n){(t?Cs.reportExtraError:Cs.reportError)(this,this.def.error,n)}$dataError(){(0,Cs.reportError)(this,this.def.$dataError||Cs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Cs.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,r=nt.nil){this.gen.block(()=>{this.check$data(t,r),n()})}check$data(t=nt.nil,n=nt.nil){if(!this.$data)return;const{gen:r,schemaCode:o,schemaType:a,def:s}=this;r.if((0,nt.or)((0,nt._)`${o} === undefined`,n)),t!==nt.nil&&r.assign(t,!0),(a.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),t!==nt.nil&&r.assign(t,!1)),r.else()}invalid$data(){const{gen:t,schemaCode:n,schemaType:r,def:o,it:a}=this;return(0,nt.or)(s(),i());function s(){if(r.length){if(!(n instanceof nt.Name))throw new Error("ajv implementation error");const l=Array.isArray(r)?r:[r];return(0,nt._)`${(0,El.checkDataTypes)(l,n,a.opts.strictNumbers,El.DataType.Wrong)}`}return nt.nil}function i(){if(o.validateSchema){const l=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,nt._)`!${l}(${n})`}return nt.nil}}subschema(t,n){const r=(0,su.getSubschema)(this.it,t);(0,su.extendSubschemaData)(r,this.it,t),(0,su.extendSubschemaMode)(r,t);const o={...this.it,...r,items:void 0,props:void 0};return XE(o,n),o}mergeEvaluated(t,n){const{it:r,gen:o}=this;r.opts.unevaluated&&(r.props!==!0&&t.props!==void 0&&(r.props=to.mergeEvaluated.props(o,t.props,r.props,n)),r.items!==!0&&t.items!==void 0&&(r.items=to.mergeEvaluated.items(o,t.items,r.items,n)))}mergeValidEvaluated(t,n){const{it:r,gen:o}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return o.if(n,()=>this.mergeEvaluated(t,nt.Name)),!0}}Ir.KeywordCxt=Wy;function qy(e,t,n,r){const o=new Wy(e,n,t);"code"in n?n.code(o,r):o.$data&&n.validate?(0,Fs.funcKeywordCode)(o,n):"macro"in n?(0,Fs.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,Fs.funcKeywordCode)(o,n)}const dk=/^\/(?:[^~]|~0|~1)*$/,fk=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Gy(e,{dataLevel:t,dataNames:n,dataPathArr:r}){let o,a;if(e==="")return ut.default.rootData;if(e[0]==="/"){if(!dk.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,a=ut.default.rootData}else{const c=fk.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const u=+c[1];if(o=c[2],o==="#"){if(u>=t)throw new Error(l("property/index",u));return r[t-u]}if(u>t)throw new Error(l("data",u));if(a=n[t-u],!o)return a}let s=a;const i=o.split("/");for(const c of i)c&&(a=(0,nt._)`${a}${(0,nt.getProperty)((0,to.unescapeJsonPointer)(c))}`,s=(0,nt._)`${s} && ${a}`);return s;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${t}`}}Ir.getData=Gy;var di={};Object.defineProperty(di,"__esModule",{value:!0});class pk extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}di.default=pk;var os={};Object.defineProperty(os,"__esModule",{value:!0});const iu=In;class hk extends Error{constructor(t,n,r,o){super(o||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,iu.resolveUrl)(t,n,r),this.missingSchema=(0,iu.normalizeId)((0,iu.getFullPath)(t,this.missingRef))}}os.default=hk;var Yn={};Object.defineProperty(Yn,"__esModule",{value:!0});Yn.resolveSchema=Yn.getCompilingSchema=Yn.resolveRef=Yn.compileSchema=Yn.SchemaEnv=void 0;const yr=bt,mk=di,Yo=Ur,Cr=In,Yh=Ke,vk=Ir;class sc{constructor(t){var n;this.refs={},this.dynamicAnchors={};let r;typeof t.schema=="object"&&(r=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,Cr.normalizeId)(r==null?void 0:r[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=r==null?void 0:r.$async,this.refs={}}}Yn.SchemaEnv=sc;function Bd(e){const t=Jy.call(this,e);if(t)return t;const n=(0,Cr.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:r,lines:o}=this.opts.code,{ownProperties:a}=this.opts,s=new yr.CodeGen(this.scope,{es5:r,lines:o,ownProperties:a});let i;e.$async&&(i=s.scopeValue("Error",{ref:mk.default,code:(0,yr._)`require("ajv/dist/runtime/validation_error").default`}));const l=s.scopeName("validate");e.validateName=l;const c={gen:s,allErrors:this.opts.allErrors,data:Yo.default.data,parentData:Yo.default.parentData,parentDataProperty:Yo.default.parentDataProperty,dataNames:[Yo.default.data],dataPathArr:[yr.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,yr.stringify)(e.schema)}:{ref:e.schema}),validateName:l,ValidationError:i,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:yr.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,yr._)`""`,opts:this.opts,self:this};let u;try{this._compilations.add(e),(0,vk.validateFunctionCode)(c),s.optimize(this.opts.code.optimize);const d=s.toString();u=`${s.scopeRefs(Yo.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,e));const v=new Function(`${Yo.default.self}`,`${Yo.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:v}),v.errors=null,v.schema=e.schema,v.schemaEnv=e,e.$async&&(v.$async=!0),this.opts.code.source===!0&&(v.source={validateName:l,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){const{props:y,items:g}=c;v.evaluated={props:y instanceof yr.Name?void 0:y,items:g instanceof yr.Name?void 0:g,dynamicProps:y instanceof yr.Name,dynamicItems:g instanceof yr.Name},v.source&&(v.source.evaluated=(0,yr.stringify)(v.evaluated))}return e.validate=v,e}catch(d){throw delete e.validate,delete e.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(e)}}Yn.compileSchema=Bd;function gk(e,t,n){var r;n=(0,Cr.resolveUrl)(this.opts.uriResolver,t,n);const o=e.refs[n];if(o)return o;let a=bk.call(this,e,n);if(a===void 0){const s=(r=e.localRefs)===null||r===void 0?void 0:r[n],{schemaId:i}=this.opts;s&&(a=new sc({schema:s,schemaId:i,root:e,baseId:t}))}if(a!==void 0)return e.refs[n]=yk.call(this,a)}Yn.resolveRef=gk;function yk(e){return(0,Cr.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Bd.call(this,e)}function Jy(e){for(const t of this._compilations)if(_k(t,e))return t}Yn.getCompilingSchema=Jy;function _k(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function bk(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||ic.call(this,e,t)}function ic(e,t){const n=this.opts.uriResolver.parse(t),r=(0,Cr._getFullPath)(this.opts.uriResolver,n);let o=(0,Cr.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===o)return lu.call(this,n,e);const a=(0,Cr.normalizeId)(r),s=this.refs[a]||this.schemas[a];if(typeof s=="string"){const i=ic.call(this,e,s);return typeof(i==null?void 0:i.schema)!="object"?void 0:lu.call(this,n,i)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||Bd.call(this,s),a===(0,Cr.normalizeId)(t)){const{schema:i}=s,{schemaId:l}=this.opts,c=i[l];return c&&(o=(0,Cr.resolveUrl)(this.opts.uriResolver,o,c)),new sc({schema:i,schemaId:l,root:e,baseId:o})}return lu.call(this,n,s)}}Yn.resolveSchema=ic;const wk=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function lu(e,{baseId:t,schema:n,root:r}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(const i of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;const l=n[(0,Yh.unescapeFragment)(i)];if(l===void 0)return;n=l;const c=typeof n=="object"&&n[this.opts.schemaId];!wk.has(i)&&c&&(t=(0,Cr.resolveUrl)(this.opts.uriResolver,t,c))}let a;if(typeof n!="boolean"&&n.$ref&&!(0,Yh.schemaHasRulesButRef)(n,this.RULES)){const i=(0,Cr.resolveUrl)(this.opts.uriResolver,t,n.$ref);a=ic.call(this,r,i)}const{schemaId:s}=this.opts;if(a=a||new sc({schema:n,schemaId:s,root:r,baseId:t}),a.schema!==a.root.schema)return a}const Ak="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Ck="Meta-schema for $data reference (JSON AnySchema extension proposal)",$k="object",Sk=["$data"],Ik={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Ek=!1,kk={$id:Ak,description:Ck,type:$k,required:Sk,properties:Ik,additionalProperties:Ek};var Fd={},lc={exports:{}};const Tk={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};var xk={HEX:Tk};const{HEX:Pk}=xk;function Yy(e){if(Qy(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[n]=t;return n?{host:Ok(n,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function qu(e,t=!1){let n="",r=!0;for(const o of e){if(Pk[o]===void 0)return;o!=="0"&&r===!0&&(r=!1),r||(n+=o)}return t&&n.length===0&&(n="0"),n}function Mk(e){let t=0;const n={error:!1,address:"",zone:""},r=[],o=[];let a=!1,s=!1,i=!1;function l(){if(o.length){if(a===!1){const c=qu(o);if(c!==void 0)r.push(c);else return n.error=!0,!1}o.length=0}return!0}for(let c=0;c<e.length;c++){const u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(s===!0&&(i=!0),!l())break;if(t++,r.push(":"),t>7){n.error=!0;break}c-1>=0&&e[c-1]===":"&&(s=!0);continue}else if(u==="%"){if(!l())break;a=!0}else{o.push(u);continue}}return o.length&&(a?n.zone=o.join(""):i?r.push(o.join("")):r.push(qu(o))),n.address=r.join(""),n}function Xy(e,t={}){if(Qy(e,":")<2)return{host:e,isIPV6:!1};const n=Mk(e);if(n.error)return{host:e,isIPV6:!1};{let r=n.address,o=n.address;return n.zone&&(r+="%"+n.zone,o+="%25"+n.zone),{host:r,escapedHost:o,isIPV6:!0}}}function Ok(e,t){let n="",r=!0;const o=e.length;for(let a=0;a<o;a++){const s=e[a];s==="0"&&r?(a+1<=o&&e[a+1]===t||a+1===o)&&(n+=s,r=!1):(s===t?r=!0:r=!1,n+=s)}return n}function Qy(e,t){let n=0;for(let r=0;r<e.length;r++)e[r]===t&&n++;return n}const Xh=/^\.\.?\//u,Qh=/^\/\.(?:\/|$)/u,Zh=/^\/\.\.(?:\/|$)/u,Nk=/^\/?(?:.|\n)*?(?=\/|$)/u;function Rk(e){const t=[];for(;e.length;)if(e.match(Xh))e=e.replace(Xh,"");else if(e.match(Qh))e=e.replace(Qh,"/");else if(e.match(Zh))e=e.replace(Zh,"/"),t.pop();else if(e==="."||e==="..")e="";else{const n=e.match(Nk);if(n){const r=n[0];e=e.slice(r.length),t.push(r)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function Lk(e,t){const n=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function Dk(e,t){const n=[];if(e.userinfo!==void 0&&(n.push(e.userinfo),n.push("@")),e.host!==void 0){let r=unescape(e.host);const o=Yy(r);if(o.isIPV4)r=o.host;else{const a=Xy(o.host,{isIPV4:!1});a.isIPV6===!0?r=`[${a.escapedHost}]`:r=e.host}n.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Bk={recomposeAuthority:Dk,normalizeComponentEncoding:Lk,removeDotSegments:Rk,normalizeIPv4:Yy,normalizeIPv6:Xy,stringArrayToHexStripped:qu};const Fk=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,jk=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Zy(e){return typeof e.secure=="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}function e_(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function t_(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function Vk(e){return e.secure=Zy(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function Uk(e){if((e.port===(Zy(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function Hk(e,t){if(!e.path)return e.error="URN can not be parsed",e;const n=e.path.match(jk);if(n){const r=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];const o=`${r}:${t.nid||e.nid}`,a=jd[o];e.path=void 0,a&&(e=a.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function zk(e,t){const n=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),o=`${n}:${t.nid||r}`,a=jd[o];a&&(e=a.serialize(e,t));const s=e,i=e.nss;return s.path=`${r||t.nid}:${i}`,t.skipEscape=!0,s}function Kk(e,t){const n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!Fk.test(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function Wk(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const n_={scheme:"http",domainHost:!0,parse:e_,serialize:t_},qk={scheme:"https",domainHost:n_.domainHost,parse:e_,serialize:t_},ol={scheme:"ws",domainHost:!0,parse:Vk,serialize:Uk},Gk={scheme:"wss",domainHost:ol.domainHost,parse:ol.parse,serialize:ol.serialize},Jk={scheme:"urn",parse:Hk,serialize:zk,skipNormalize:!0},Yk={scheme:"urn:uuid",parse:Kk,serialize:Wk,skipNormalize:!0},jd={http:n_,https:qk,ws:ol,wss:Gk,urn:Jk,"urn:uuid":Yk};var Xk=jd;const{normalizeIPv6:Qk,normalizeIPv4:Zk,removeDotSegments:Ts,recomposeAuthority:eT,normalizeComponentEncoding:Vi}=Bk,Vd=Xk;function tT(e,t){return typeof e=="string"?e=Br(so(e,t),t):typeof e=="object"&&(e=so(Br(e,t),t)),e}function nT(e,t,n){const r=Object.assign({scheme:"null"},n),o=r_(so(e,r),so(t,r),r,!0);return Br(o,{...r,skipEscape:!0})}function r_(e,t,n,r){const o={};return r||(e=so(Br(e,n),n),t=so(Br(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Ts(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Ts(t.path||""),o.query=t.query):(t.path?(t.path.charAt(0)==="/"?o.path=Ts(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=Ts(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function rT(e,t,n){return typeof e=="string"?(e=unescape(e),e=Br(Vi(so(e,n),!0),{...n,skipEscape:!0})):typeof e=="object"&&(e=Br(Vi(e,!0),{...n,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Br(Vi(so(t,n),!0),{...n,skipEscape:!0})):typeof t=="object"&&(t=Br(Vi(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Br(e,t){const n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),o=[],a=Vd[(r.scheme||n.scheme||"").toLowerCase()];a&&a.serialize&&a.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&o.push(n.scheme,":");const s=eT(n,r);if(s!==void 0&&(r.reference!=="suffix"&&o.push("//"),o.push(s),n.path&&n.path.charAt(0)!=="/"&&o.push("/")),n.path!==void 0){let i=n.path;!r.absolutePath&&(!a||!a.absolutePath)&&(i=Ts(i)),s===void 0&&(i=i.replace(/^\/\//u,"/%2F")),o.push(i)}return n.query!==void 0&&o.push("?",n.query),n.fragment!==void 0&&o.push("#",n.fragment),o.join("")}const oT=Array.from({length:127},(e,t)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function aT(e){let t=0;for(let n=0,r=e.length;n<r;++n)if(t=e.charCodeAt(n),t>126||oT[t])return!0;return!1}const sT=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function so(e,t){const n=Object.assign({},t),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=e.indexOf("%")!==-1;let a=!1;n.reference==="suffix"&&(e=(n.scheme?n.scheme+":":"")+"//"+e);const s=e.match(sT);if(s){if(r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5]),r.host){const l=Zk(r.host);if(l.isIPV4===!1){const c=Qk(l.host,{isIPV4:!1});r.host=c.host.toLowerCase(),a=c.isIPV6}else r.host=l.host,a=!0}r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&!r.path&&r.query===void 0?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");const i=Vd[(n.scheme||r.scheme||"").toLowerCase()];if(!n.unicodeSupport&&(!i||!i.unicodeSupport)&&r.host&&(n.domainHost||i&&i.domainHost)&&a===!1&&aT(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}(!i||i&&!i.skipNormalize)&&(o&&r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),o&&r.host!==void 0&&(r.host=unescape(r.host)),r.path!==void 0&&r.path.length&&(r.path=escape(unescape(r.path))),r.fragment!==void 0&&r.fragment.length&&(r.fragment=encodeURI(decodeURIComponent(r.fragment)))),i&&i.parse&&i.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return r}const Ud={SCHEMES:Vd,normalize:tT,resolve:nT,resolveComponents:r_,equal:rT,serialize:Br,parse:so};lc.exports=Ud;lc.exports.default=Ud;lc.exports.fastUri=Ud;var iT=lc.exports;Object.defineProperty(Fd,"__esModule",{value:!0});const o_=iT;o_.code='require("ajv/dist/runtime/uri").default';Fd.default=o_;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Ir;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=bt;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=di,o=os,a=la,s=Yn,i=bt,l=In,c=dn,u=Ke,d=kk,h=Fd,v=(de,L)=>new RegExp(de,L);v.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),w={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},A={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},C=200;function b(de){var L,le,j,E,O,ue,Be,U,Z,Q,se,Se,k,P,ie,ve,F,K,oe,V,H,G,he,ge,xe;const Fe=de.strict,ot=(L=de.code)===null||L===void 0?void 0:L.optimize,pt=ot===!0||ot===void 0?1:ot||0,dt=(j=(le=de.code)===null||le===void 0?void 0:le.regExp)!==null&&j!==void 0?j:v,Xt=(E=de.uriResolver)!==null&&E!==void 0?E:h.default;return{strictSchema:(ue=(O=de.strictSchema)!==null&&O!==void 0?O:Fe)!==null&&ue!==void 0?ue:!0,strictNumbers:(U=(Be=de.strictNumbers)!==null&&Be!==void 0?Be:Fe)!==null&&U!==void 0?U:!0,strictTypes:(Q=(Z=de.strictTypes)!==null&&Z!==void 0?Z:Fe)!==null&&Q!==void 0?Q:"log",strictTuples:(Se=(se=de.strictTuples)!==null&&se!==void 0?se:Fe)!==null&&Se!==void 0?Se:"log",strictRequired:(P=(k=de.strictRequired)!==null&&k!==void 0?k:Fe)!==null&&P!==void 0?P:!1,code:de.code?{...de.code,optimize:pt,regExp:dt}:{optimize:pt,regExp:dt},loopRequired:(ie=de.loopRequired)!==null&&ie!==void 0?ie:C,loopEnum:(ve=de.loopEnum)!==null&&ve!==void 0?ve:C,meta:(F=de.meta)!==null&&F!==void 0?F:!0,messages:(K=de.messages)!==null&&K!==void 0?K:!0,inlineRefs:(oe=de.inlineRefs)!==null&&oe!==void 0?oe:!0,schemaId:(V=de.schemaId)!==null&&V!==void 0?V:"$id",addUsedSchema:(H=de.addUsedSchema)!==null&&H!==void 0?H:!0,validateSchema:(G=de.validateSchema)!==null&&G!==void 0?G:!0,validateFormats:(he=de.validateFormats)!==null&&he!==void 0?he:!0,unicodeRegExp:(ge=de.unicodeRegExp)!==null&&ge!==void 0?ge:!0,int32range:(xe=de.int32range)!==null&&xe!==void 0?xe:!0,uriResolver:Xt}}class p{constructor(L={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,L=this.opts={...L,...b(L)};const{es5:le,lines:j}=this.opts.code;this.scope=new i.ValueScope({scope:{},prefixes:g,es5:le,lines:j}),this.logger=pe(L.logger);const E=L.validateFormats;L.validateFormats=!1,this.RULES=(0,a.getRules)(),_.call(this,w,L,"NOT SUPPORTED"),_.call(this,A,L,"DEPRECATED","warn"),this._metaOpts=te.call(this),L.formats&&Y.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),L.keywords&&X.call(this,L.keywords),typeof L.meta=="object"&&this.addMetaSchema(L.meta),R.call(this),L.validateFormats=E}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:L,meta:le,schemaId:j}=this.opts;let E=d;j==="id"&&(E={...d},E.id=E.$id,delete E.$id),le&&L&&this.addMetaSchema(E,E[j],!1)}defaultMeta(){const{meta:L,schemaId:le}=this.opts;return this.opts.defaultMeta=typeof L=="object"?L[le]||L:void 0}validate(L,le){let j;if(typeof L=="string"){if(j=this.getSchema(L),!j)throw new Error(`no schema with key or ref "${L}"`)}else j=this.compile(L);const E=j(le);return"$async"in j||(this.errors=j.errors),E}compile(L,le){const j=this._addSchema(L,le);return j.validate||this._compileSchemaEnv(j)}compileAsync(L,le){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:j}=this.opts;return E.call(this,L,le);async function E(Q,se){await O.call(this,Q.$schema);const Se=this._addSchema(Q,se);return Se.validate||ue.call(this,Se)}async function O(Q){Q&&!this.getSchema(Q)&&await E.call(this,{$ref:Q},!0)}async function ue(Q){try{return this._compileSchemaEnv(Q)}catch(se){if(!(se instanceof o.default))throw se;return Be.call(this,se),await U.call(this,se.missingSchema),ue.call(this,Q)}}function Be({missingSchema:Q,missingRef:se}){if(this.refs[Q])throw new Error(`AnySchema ${Q} is loaded but ${se} cannot be resolved`)}async function U(Q){const se=await Z.call(this,Q);this.refs[Q]||await O.call(this,se.$schema),this.refs[Q]||this.addSchema(se,Q,le)}async function Z(Q){const se=this._loading[Q];if(se)return se;try{return await(this._loading[Q]=j(Q))}finally{delete this._loading[Q]}}}addSchema(L,le,j,E=this.opts.validateSchema){if(Array.isArray(L)){for(const ue of L)this.addSchema(ue,void 0,j,E);return this}let O;if(typeof L=="object"){const{schemaId:ue}=this.opts;if(O=L[ue],O!==void 0&&typeof O!="string")throw new Error(`schema ${ue} must be string`)}return le=(0,l.normalizeId)(le||O),this._checkUnique(le),this.schemas[le]=this._addSchema(L,j,le,E,!0),this}addMetaSchema(L,le,j=this.opts.validateSchema){return this.addSchema(L,le,!0,j),this}validateSchema(L,le){if(typeof L=="boolean")return!0;let j;if(j=L.$schema,j!==void 0&&typeof j!="string")throw new Error("$schema must be a string");if(j=j||this.opts.defaultMeta||this.defaultMeta(),!j)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const E=this.validate(j,L);if(!E&&le){const O="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(O);else throw new Error(O)}return E}getSchema(L){let le;for(;typeof(le=S.call(this,L))=="string";)L=le;if(le===void 0){const{schemaId:j}=this.opts,E=new s.SchemaEnv({schema:{},schemaId:j});if(le=s.resolveSchema.call(this,E,L),!le)return;this.refs[L]=le}return le.validate||this._compileSchemaEnv(le)}removeSchema(L){if(L instanceof RegExp)return this._removeAllSchemas(this.schemas,L),this._removeAllSchemas(this.refs,L),this;switch(typeof L){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const le=S.call(this,L);return typeof le=="object"&&this._cache.delete(le.schema),delete this.schemas[L],delete this.refs[L],this}case"object":{const le=L;this._cache.delete(le);let j=L[this.opts.schemaId];return j&&(j=(0,l.normalizeId)(j),delete this.schemas[j],delete this.refs[j]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(L){for(const le of L)this.addKeyword(le);return this}addKeyword(L,le){let j;if(typeof L=="string")j=L,typeof le=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),le.keyword=j);else if(typeof L=="object"&&le===void 0){if(le=L,j=le.keyword,Array.isArray(j)&&!j.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ye.call(this,j,le),!le)return(0,u.eachItem)(j,O=>qe.call(this,O)),this;Ce.call(this,le);const E={...le,type:(0,c.getJSONTypes)(le.type),schemaType:(0,c.getJSONTypes)(le.schemaType)};return(0,u.eachItem)(j,E.type.length===0?O=>qe.call(this,O,E):O=>E.type.forEach(ue=>qe.call(this,O,E,ue))),this}getKeyword(L){const le=this.RULES.all[L];return typeof le=="object"?le.definition:!!le}removeKeyword(L){const{RULES:le}=this;delete le.keywords[L],delete le.all[L];for(const j of le.rules){const E=j.rules.findIndex(O=>O.keyword===L);E>=0&&j.rules.splice(E,1)}return this}addFormat(L,le){return typeof le=="string"&&(le=new RegExp(le)),this.formats[L]=le,this}errorsText(L=this.errors,{separator:le=", ",dataVar:j="data"}={}){return!L||L.length===0?"No errors":L.map(E=>`${j}${E.instancePath} ${E.message}`).reduce((E,O)=>E+le+O)}$dataMetaSchema(L,le){const j=this.RULES.all;L=JSON.parse(JSON.stringify(L));for(const E of le){const O=E.split("/").slice(1);let ue=L;for(const Be of O)ue=ue[Be];for(const Be in j){const U=j[Be];if(typeof U!="object")continue;const{$data:Z}=U.definition,Q=ue[Be];Z&&Q&&(ue[Be]=fe(Q))}}return L}_removeAllSchemas(L,le){for(const j in L){const E=L[j];(!le||le.test(j))&&(typeof E=="string"?delete L[j]:E&&!E.meta&&(this._cache.delete(E.schema),delete L[j]))}}_addSchema(L,le,j,E=this.opts.validateSchema,O=this.opts.addUsedSchema){let ue;const{schemaId:Be}=this.opts;if(typeof L=="object")ue=L[Be];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof L!="boolean")throw new Error("schema must be object or boolean")}let U=this._cache.get(L);if(U!==void 0)return U;j=(0,l.normalizeId)(ue||j);const Z=l.getSchemaRefs.call(this,L,j);return U=new s.SchemaEnv({schema:L,schemaId:Be,meta:le,baseId:j,localRefs:Z}),this._cache.set(U.schema,U),O&&!j.startsWith("#")&&(j&&this._checkUnique(j),this.refs[j]=U),E&&this.validateSchema(L,!0),U}_checkUnique(L){if(this.schemas[L]||this.refs[L])throw new Error(`schema with key or id "${L}" already exists`)}_compileSchemaEnv(L){if(L.meta?this._compileMetaSchema(L):s.compileSchema.call(this,L),!L.validate)throw new Error("ajv implementation error");return L.validate}_compileMetaSchema(L){const le=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,L)}finally{this.opts=le}}}p.ValidationError=r.default,p.MissingRefError=o.default,e.default=p;function _(de,L,le,j="error"){for(const E in de){const O=E;O in L&&this.logger[j](`${le}: option ${E}. ${de[O]}`)}}function S(de){return de=(0,l.normalizeId)(de),this.schemas[de]||this.refs[de]}function R(){const de=this.opts.schemas;if(de)if(Array.isArray(de))this.addSchema(de);else for(const L in de)this.addSchema(de[L],L)}function Y(){for(const de in this.opts.formats){const L=this.opts.formats[de];L&&this.addFormat(de,L)}}function X(de){if(Array.isArray(de)){this.addVocabulary(de);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const L in de){const le=de[L];le.keyword||(le.keyword=L),this.addKeyword(le)}}function te(){const de={...this.opts};for(const L of y)delete de[L];return de}const $e={log(){},warn(){},error(){}};function pe(de){if(de===!1)return $e;if(de===void 0)return console;if(de.log&&de.warn&&de.error)return de;throw new Error("logger must implement log, warn and error methods")}const we=/^[a-z_$][a-z0-9_$:-]*$/i;function ye(de,L){const{RULES:le}=this;if((0,u.eachItem)(de,j=>{if(le.keywords[j])throw new Error(`Keyword ${j} is already defined`);if(!we.test(j))throw new Error(`Keyword ${j} has invalid name`)}),!!L&&L.$data&&!("code"in L||"validate"in L))throw new Error('$data keyword must have "code" or "validate" function')}function qe(de,L,le){var j;const E=L==null?void 0:L.post;if(le&&E)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:O}=this;let ue=E?O.post:O.rules.find(({type:U})=>U===le);if(ue||(ue={type:le,rules:[]},O.rules.push(ue)),O.keywords[de]=!0,!L)return;const Be={keyword:de,definition:{...L,type:(0,c.getJSONTypes)(L.type),schemaType:(0,c.getJSONTypes)(L.schemaType)}};L.before?Te.call(this,ue,Be,L.before):ue.rules.push(Be),O.all[de]=Be,(j=L.implements)===null||j===void 0||j.forEach(U=>this.addKeyword(U))}function Te(de,L,le){const j=de.rules.findIndex(E=>E.keyword===le);j>=0?de.rules.splice(j,0,L):(de.rules.push(L),this.logger.warn(`rule ${le} is not defined`))}function Ce(de){let{metaSchema:L}=de;L!==void 0&&(de.$data&&this.opts.$data&&(L=fe(L)),de.validateSchema=this.compile(L,!0))}const be={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(de){return{anyOf:[de,be]}}})(gy);var Hd={},zd={},Kd={};Object.defineProperty(Kd,"__esModule",{value:!0});const lT={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Kd.default=lT;var ca={};Object.defineProperty(ca,"__esModule",{value:!0});ca.callRef=ca.getValidate=void 0;const cT=os,em=_t,qn=bt,Ia=Ur,tm=Yn,Ui=Ke,uT={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:n,it:r}=e,{baseId:o,schemaEnv:a,validateName:s,opts:i,self:l}=r,{root:c}=a;if((n==="#"||n==="#/")&&o===c.baseId)return d();const u=tm.resolveRef.call(l,c,o,n);if(u===void 0)throw new cT.default(r.opts.uriResolver,o,n);if(u instanceof tm.SchemaEnv)return h(u);return v(u);function d(){if(a===c)return al(e,s,a,a.$async);const y=t.scopeValue("root",{ref:c});return al(e,(0,qn._)`${y}.validate`,c,c.$async)}function h(y){const g=a_(e,y);al(e,g,y,y.$async)}function v(y){const g=t.scopeValue("schema",i.code.source===!0?{ref:y,code:(0,qn.stringify)(y)}:{ref:y}),w=t.name("valid"),A=e.subschema({schema:y,dataTypes:[],schemaPath:qn.nil,topSchemaRef:g,errSchemaPath:n},w);e.mergeEvaluated(A),e.ok(w)}}};function a_(e,t){const{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,qn._)`${n.scopeValue("wrapper",{ref:t})}.validate`}ca.getValidate=a_;function al(e,t,n,r){const{gen:o,it:a}=e,{allErrors:s,schemaEnv:i,opts:l}=a,c=l.passContext?Ia.default.this:qn.nil;r?u():d();function u(){if(!i.$async)throw new Error("async schema referenced by sync schema");const y=o.let("valid");o.try(()=>{o.code((0,qn._)`await ${(0,em.callValidateCode)(e,t,c)}`),v(t),s||o.assign(y,!0)},g=>{o.if((0,qn._)`!(${g} instanceof ${a.ValidationError})`,()=>o.throw(g)),h(g),s||o.assign(y,!1)}),e.ok(y)}function d(){e.result((0,em.callValidateCode)(e,t,c),()=>v(t),()=>h(t))}function h(y){const g=(0,qn._)`${y}.errors`;o.assign(Ia.default.vErrors,(0,qn._)`${Ia.default.vErrors} === null ? ${g} : ${Ia.default.vErrors}.concat(${g})`),o.assign(Ia.default.errors,(0,qn._)`${Ia.default.vErrors}.length`)}function v(y){var g;if(!a.opts.unevaluated)return;const w=(g=n==null?void 0:n.validate)===null||g===void 0?void 0:g.evaluated;if(a.props!==!0)if(w&&!w.dynamicProps)w.props!==void 0&&(a.props=Ui.mergeEvaluated.props(o,w.props,a.props));else{const A=o.var("props",(0,qn._)`${y}.evaluated.props`);a.props=Ui.mergeEvaluated.props(o,A,a.props,qn.Name)}if(a.items!==!0)if(w&&!w.dynamicItems)w.items!==void 0&&(a.items=Ui.mergeEvaluated.items(o,w.items,a.items));else{const A=o.var("items",(0,qn._)`${y}.evaluated.items`);a.items=Ui.mergeEvaluated.items(o,A,a.items,qn.Name)}}}ca.callRef=al;ca.default=uT;Object.defineProperty(zd,"__esModule",{value:!0});const dT=Kd,fT=ca,pT=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",dT.default,fT.default];zd.default=pT;var Wd={},qd={};Object.defineProperty(qd,"__esModule",{value:!0});const kl=bt,wo=kl.operators,Tl={maximum:{okStr:"<=",ok:wo.LTE,fail:wo.GT},minimum:{okStr:">=",ok:wo.GTE,fail:wo.LT},exclusiveMaximum:{okStr:"<",ok:wo.LT,fail:wo.GTE},exclusiveMinimum:{okStr:">",ok:wo.GT,fail:wo.LTE}},hT={message:({keyword:e,schemaCode:t})=>(0,kl.str)`must be ${Tl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,kl._)`{comparison: ${Tl[e].okStr}, limit: ${t}}`},mT={keyword:Object.keys(Tl),type:"number",schemaType:"number",$data:!0,error:hT,code(e){const{keyword:t,data:n,schemaCode:r}=e;e.fail$data((0,kl._)`${n} ${Tl[t].fail} ${r} || isNaN(${n})`)}};qd.default=mT;var Gd={};Object.defineProperty(Gd,"__esModule",{value:!0});const js=bt,vT={message:({schemaCode:e})=>(0,js.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,js._)`{multipleOf: ${e}}`},gT={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:vT,code(e){const{gen:t,data:n,schemaCode:r,it:o}=e,a=o.opts.multipleOfPrecision,s=t.let("res"),i=a?(0,js._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:(0,js._)`${s} !== parseInt(${s})`;e.fail$data((0,js._)`(${r} === 0 || (${s} = ${n}/${r}, ${i}))`)}};Gd.default=gT;var Jd={},Yd={};Object.defineProperty(Yd,"__esModule",{value:!0});function s_(e){const t=e.length;let n=0,r=0,o;for(;r<t;)n++,o=e.charCodeAt(r++),o>=55296&&o<=56319&&r<t&&(o=e.charCodeAt(r),(o&64512)===56320&&r++);return n}Yd.default=s_;s_.code='require("ajv/dist/runtime/ucs2length").default';Object.defineProperty(Jd,"__esModule",{value:!0});const Zo=bt,yT=Ke,_T=Yd,bT={message({keyword:e,schemaCode:t}){const n=e==="maxLength"?"more":"fewer";return(0,Zo.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,Zo._)`{limit: ${e}}`},wT={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:bT,code(e){const{keyword:t,data:n,schemaCode:r,it:o}=e,a=t==="maxLength"?Zo.operators.GT:Zo.operators.LT,s=o.opts.unicode===!1?(0,Zo._)`${n}.length`:(0,Zo._)`${(0,yT.useFunc)(e.gen,_T.default)}(${n})`;e.fail$data((0,Zo._)`${s} ${a} ${r}`)}};Jd.default=wT;var Xd={};Object.defineProperty(Xd,"__esModule",{value:!0});const AT=_t,xl=bt,CT={message:({schemaCode:e})=>(0,xl.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,xl._)`{pattern: ${e}}`},$T={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:CT,code(e){const{data:t,$data:n,schema:r,schemaCode:o,it:a}=e,s=a.opts.unicodeRegExp?"u":"",i=n?(0,xl._)`(new RegExp(${o}, ${s}))`:(0,AT.usePattern)(e,r);e.fail$data((0,xl._)`!${i}.test(${t})`)}};Xd.default=$T;var Qd={};Object.defineProperty(Qd,"__esModule",{value:!0});const Vs=bt,ST={message({keyword:e,schemaCode:t}){const n=e==="maxProperties"?"more":"fewer";return(0,Vs.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,Vs._)`{limit: ${e}}`},IT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ST,code(e){const{keyword:t,data:n,schemaCode:r}=e,o=t==="maxProperties"?Vs.operators.GT:Vs.operators.LT;e.fail$data((0,Vs._)`Object.keys(${n}).length ${o} ${r}`)}};Qd.default=IT;var Zd={};Object.defineProperty(Zd,"__esModule",{value:!0});const $s=_t,Us=bt,ET=Ke,kT={message:({params:{missingProperty:e}})=>(0,Us.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Us._)`{missingProperty: ${e}}`},TT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:kT,code(e){const{gen:t,schema:n,schemaCode:r,data:o,$data:a,it:s}=e,{opts:i}=s;if(!a&&n.length===0)return;const l=n.length>=i.loopRequired;if(s.allErrors?c():u(),i.strictRequired){const v=e.parentSchema.properties,{definedProperties:y}=e.it;for(const g of n)if((v==null?void 0:v[g])===void 0&&!y.has(g)){const w=s.schemaEnv.baseId+s.errSchemaPath,A=`required property "${g}" is not defined at "${w}" (strictRequired)`;(0,ET.checkStrictMode)(s,A,s.opts.strictRequired)}}function c(){if(l||a)e.block$data(Us.nil,d);else for(const v of n)(0,$s.checkReportMissingProp)(e,v)}function u(){const v=t.let("missing");if(l||a){const y=t.let("valid",!0);e.block$data(y,()=>h(v,y)),e.ok(y)}else t.if((0,$s.checkMissingProp)(e,n,v)),(0,$s.reportMissingProp)(e,v),t.else()}function d(){t.forOf("prop",r,v=>{e.setParams({missingProperty:v}),t.if((0,$s.noPropertyInData)(t,o,v,i.ownProperties),()=>e.error())})}function h(v,y){e.setParams({missingProperty:v}),t.forOf(v,r,()=>{t.assign(y,(0,$s.propertyInData)(t,o,v,i.ownProperties)),t.if((0,Us.not)(y),()=>{e.error(),t.break()})},Us.nil)}}};Zd.default=TT;var ef={};Object.defineProperty(ef,"__esModule",{value:!0});const Hs=bt,xT={message({keyword:e,schemaCode:t}){const n=e==="maxItems"?"more":"fewer";return(0,Hs.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,Hs._)`{limit: ${e}}`},PT={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:xT,code(e){const{keyword:t,data:n,schemaCode:r}=e,o=t==="maxItems"?Hs.operators.GT:Hs.operators.LT;e.fail$data((0,Hs._)`${n}.length ${o} ${r}`)}};ef.default=PT;var tf={},fi={};Object.defineProperty(fi,"__esModule",{value:!0});const i_=Oy;i_.code='require("ajv/dist/runtime/equal").default';fi.default=i_;Object.defineProperty(tf,"__esModule",{value:!0});const cu=dn,$n=bt,MT=Ke,OT=fi,NT={message:({params:{i:e,j:t}})=>(0,$n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,$n._)`{i: ${e}, j: ${t}}`},RT={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:NT,code(e){const{gen:t,data:n,$data:r,schema:o,parentSchema:a,schemaCode:s,it:i}=e;if(!r&&!o)return;const l=t.let("valid"),c=a.items?(0,cu.getSchemaTypes)(a.items):[];e.block$data(l,u,(0,$n._)`${s} === false`),e.ok(l);function u(){const y=t.let("i",(0,$n._)`${n}.length`),g=t.let("j");e.setParams({i:y,j:g}),t.assign(l,!0),t.if((0,$n._)`${y} > 1`,()=>(d()?h:v)(y,g))}function d(){return c.length>0&&!c.some(y=>y==="object"||y==="array")}function h(y,g){const w=t.name("item"),A=(0,cu.checkDataTypes)(c,w,i.opts.strictNumbers,cu.DataType.Wrong),C=t.const("indices",(0,$n._)`{}`);t.for((0,$n._)`;${y}--;`,()=>{t.let(w,(0,$n._)`${n}[${y}]`),t.if(A,(0,$n._)`continue`),c.length>1&&t.if((0,$n._)`typeof ${w} == "string"`,(0,$n._)`${w} += "_"`),t.if((0,$n._)`typeof ${C}[${w}] == "number"`,()=>{t.assign(g,(0,$n._)`${C}[${w}]`),e.error(),t.assign(l,!1).break()}).code((0,$n._)`${C}[${w}] = ${y}`)})}function v(y,g){const w=(0,MT.useFunc)(t,OT.default),A=t.name("outer");t.label(A).for((0,$n._)`;${y}--;`,()=>t.for((0,$n._)`${g} = ${y}; ${g}--;`,()=>t.if((0,$n._)`${w}(${n}[${y}], ${n}[${g}])`,()=>{e.error(),t.assign(l,!1).break(A)})))}}};tf.default=RT;var nf={};Object.defineProperty(nf,"__esModule",{value:!0});const Gu=bt,LT=Ke,DT=fi,BT={message:"must be equal to constant",params:({schemaCode:e})=>(0,Gu._)`{allowedValue: ${e}}`},FT={keyword:"const",$data:!0,error:BT,code(e){const{gen:t,data:n,$data:r,schemaCode:o,schema:a}=e;r||a&&typeof a=="object"?e.fail$data((0,Gu._)`!${(0,LT.useFunc)(t,DT.default)}(${n}, ${o})`):e.fail((0,Gu._)`${a} !== ${n}`)}};nf.default=FT;var rf={};Object.defineProperty(rf,"__esModule",{value:!0});const xs=bt,jT=Ke,VT=fi,UT={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,xs._)`{allowedValues: ${e}}`},HT={keyword:"enum",schemaType:"array",$data:!0,error:UT,code(e){const{gen:t,data:n,$data:r,schema:o,schemaCode:a,it:s}=e;if(!r&&o.length===0)throw new Error("enum must have non-empty array");const i=o.length>=s.opts.loopEnum;let l;const c=()=>l??(l=(0,jT.useFunc)(t,VT.default));let u;if(i||r)u=t.let("valid"),e.block$data(u,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");const v=t.const("vSchema",a);u=(0,xs.or)(...o.map((y,g)=>h(v,g)))}e.pass(u);function d(){t.assign(u,!1),t.forOf("v",a,v=>t.if((0,xs._)`${c()}(${n}, ${v})`,()=>t.assign(u,!0).break()))}function h(v,y){const g=o[y];return typeof g=="object"&&g!==null?(0,xs._)`${c()}(${n}, ${v}[${y}])`:(0,xs._)`${n} === ${g}`}}};rf.default=HT;Object.defineProperty(Wd,"__esModule",{value:!0});const zT=qd,KT=Gd,WT=Jd,qT=Xd,GT=Qd,JT=Zd,YT=ef,XT=tf,QT=nf,ZT=rf,ex=[zT.default,KT.default,WT.default,qT.default,GT.default,JT.default,YT.default,XT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},QT.default,ZT.default];Wd.default=ex;var of={},as={};Object.defineProperty(as,"__esModule",{value:!0});as.validateAdditionalItems=void 0;const ea=bt,Ju=Ke,tx={message:({params:{len:e}})=>(0,ea.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ea._)`{limit: ${e}}`},nx={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:tx,code(e){const{parentSchema:t,it:n}=e,{items:r}=t;if(!Array.isArray(r)){(0,Ju.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}l_(e,r)}};function l_(e,t){const{gen:n,schema:r,data:o,keyword:a,it:s}=e;s.items=!0;const i=n.const("len",(0,ea._)`${o}.length`);if(r===!1)e.setParams({len:t.length}),e.pass((0,ea._)`${i} <= ${t.length}`);else if(typeof r=="object"&&!(0,Ju.alwaysValidSchema)(s,r)){const c=n.var("valid",(0,ea._)`${i} <= ${t.length}`);n.if((0,ea.not)(c),()=>l(c)),e.ok(c)}function l(c){n.forRange("i",t.length,i,u=>{e.subschema({keyword:a,dataProp:u,dataPropType:Ju.Type.Num},c),s.allErrors||n.if((0,ea.not)(c),()=>n.break())})}}as.validateAdditionalItems=l_;as.default=nx;var af={},ss={};Object.defineProperty(ss,"__esModule",{value:!0});ss.validateTuple=void 0;const nm=bt,sl=Ke,rx=_t,ox={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:n}=e;if(Array.isArray(t))return c_(e,"additionalItems",t);n.items=!0,!(0,sl.alwaysValidSchema)(n,t)&&e.ok((0,rx.validateArray)(e))}};function c_(e,t,n=e.schema){const{gen:r,parentSchema:o,data:a,keyword:s,it:i}=e;u(o),i.opts.unevaluated&&n.length&&i.items!==!0&&(i.items=sl.mergeEvaluated.items(r,n.length,i.items));const l=r.name("valid"),c=r.const("len",(0,nm._)`${a}.length`);n.forEach((d,h)=>{(0,sl.alwaysValidSchema)(i,d)||(r.if((0,nm._)`${c} > ${h}`,()=>e.subschema({keyword:s,schemaProp:h,dataProp:h},l)),e.ok(l))});function u(d){const{opts:h,errSchemaPath:v}=i,y=n.length,g=y===d.minItems&&(y===d.maxItems||d[t]===!1);if(h.strictTuples&&!g){const w=`"${s}" is ${y}-tuple, but minItems or maxItems/${t} are not specified or different at path "${v}"`;(0,sl.checkStrictMode)(i,w,h.strictTuples)}}}ss.validateTuple=c_;ss.default=ox;Object.defineProperty(af,"__esModule",{value:!0});const ax=ss,sx={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,ax.validateTuple)(e,"items")};af.default=sx;var sf={};Object.defineProperty(sf,"__esModule",{value:!0});const rm=bt,ix=Ke,lx=_t,cx=as,ux={message:({params:{len:e}})=>(0,rm.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,rm._)`{limit: ${e}}`},dx={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:ux,code(e){const{schema:t,parentSchema:n,it:r}=e,{prefixItems:o}=n;r.items=!0,!(0,ix.alwaysValidSchema)(r,t)&&(o?(0,cx.validateAdditionalItems)(e,o):e.ok((0,lx.validateArray)(e)))}};sf.default=dx;var lf={};Object.defineProperty(lf,"__esModule",{value:!0});const lr=bt,Hi=Ke,fx={message:({params:{min:e,max:t}})=>t===void 0?(0,lr.str)`must contain at least ${e} valid item(s)`:(0,lr.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,lr._)`{minContains: ${e}}`:(0,lr._)`{minContains: ${e}, maxContains: ${t}}`},px={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:fx,code(e){const{gen:t,schema:n,parentSchema:r,data:o,it:a}=e;let s,i;const{minContains:l,maxContains:c}=r;a.opts.next?(s=l===void 0?1:l,i=c):s=1;const u=t.const("len",(0,lr._)`${o}.length`);if(e.setParams({min:s,max:i}),i===void 0&&s===0){(0,Hi.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(i!==void 0&&s>i){(0,Hi.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Hi.alwaysValidSchema)(a,n)){let g=(0,lr._)`${u} >= ${s}`;i!==void 0&&(g=(0,lr._)`${g} && ${u} <= ${i}`),e.pass(g);return}a.items=!0;const d=t.name("valid");i===void 0&&s===1?v(d,()=>t.if(d,()=>t.break())):s===0?(t.let(d,!0),i!==void 0&&t.if((0,lr._)`${o}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,()=>e.reset());function h(){const g=t.name("_valid"),w=t.let("count",0);v(g,()=>t.if(g,()=>y(w)))}function v(g,w){t.forRange("i",0,u,A=>{e.subschema({keyword:"contains",dataProp:A,dataPropType:Hi.Type.Num,compositeRule:!0},g),w()})}function y(g){t.code((0,lr._)`${g}++`),i===void 0?t.if((0,lr._)`${g} >= ${s}`,()=>t.assign(d,!0).break()):(t.if((0,lr._)`${g} > ${i}`,()=>t.assign(d,!1).break()),s===1?t.assign(d,!0):t.if((0,lr._)`${g} >= ${s}`,()=>t.assign(d,!0)))}}};lf.default=px;var u_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=bt,n=Ke,r=_t;e.error={message:({params:{property:l,depsCount:c,deps:u}})=>{const d=c===1?"property":"properties";return(0,t.str)`must have ${d} ${u} when property ${l} is present`},params:({params:{property:l,depsCount:c,deps:u,missingProperty:d}})=>(0,t._)`{property: ${l},
    missingProperty: ${d},
    depsCount: ${c},
    deps: ${u}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){const[c,u]=a(l);s(l,c),i(l,u)}};function a({schema:l}){const c={},u={};for(const d in l){if(d==="__proto__")continue;const h=Array.isArray(l[d])?c:u;h[d]=l[d]}return[c,u]}function s(l,c=l.schema){const{gen:u,data:d,it:h}=l;if(Object.keys(c).length===0)return;const v=u.let("missing");for(const y in c){const g=c[y];if(g.length===0)continue;const w=(0,r.propertyInData)(u,d,y,h.opts.ownProperties);l.setParams({property:y,depsCount:g.length,deps:g.join(", ")}),h.allErrors?u.if(w,()=>{for(const A of g)(0,r.checkReportMissingProp)(l,A)}):(u.if((0,t._)`${w} && (${(0,r.checkMissingProp)(l,g,v)})`),(0,r.reportMissingProp)(l,v),u.else())}}e.validatePropertyDeps=s;function i(l,c=l.schema){const{gen:u,data:d,keyword:h,it:v}=l,y=u.name("valid");for(const g in c)(0,n.alwaysValidSchema)(v,c[g])||(u.if((0,r.propertyInData)(u,d,g,v.opts.ownProperties),()=>{const w=l.subschema({keyword:h,schemaProp:g},y);l.mergeValidEvaluated(w,y)},()=>u.var(y,!0)),l.ok(y))}e.validateSchemaDeps=i,e.default=o})(u_);var cf={};Object.defineProperty(cf,"__esModule",{value:!0});const d_=bt,hx=Ke,mx={message:"property name must be valid",params:({params:e})=>(0,d_._)`{propertyName: ${e.propertyName}}`},vx={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:mx,code(e){const{gen:t,schema:n,data:r,it:o}=e;if((0,hx.alwaysValidSchema)(o,n))return;const a=t.name("valid");t.forIn("key",r,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},a),t.if((0,d_.not)(a),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(a)}};cf.default=vx;var cc={};Object.defineProperty(cc,"__esModule",{value:!0});const zi=_t,_r=bt,gx=Ur,Ki=Ke,yx={message:"must NOT have additional properties",params:({params:e})=>(0,_r._)`{additionalProperty: ${e.additionalProperty}}`},_x={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:yx,code(e){const{gen:t,schema:n,parentSchema:r,data:o,errsCount:a,it:s}=e;if(!a)throw new Error("ajv implementation error");const{allErrors:i,opts:l}=s;if(s.props=!0,l.removeAdditional!=="all"&&(0,Ki.alwaysValidSchema)(s,n))return;const c=(0,zi.allSchemaProperties)(r.properties),u=(0,zi.allSchemaProperties)(r.patternProperties);d(),e.ok((0,_r._)`${a} === ${gx.default.errors}`);function d(){t.forIn("key",o,w=>{!c.length&&!u.length?y(w):t.if(h(w),()=>y(w))})}function h(w){let A;if(c.length>8){const C=(0,Ki.schemaRefOrVal)(s,r.properties,"properties");A=(0,zi.isOwnProperty)(t,C,w)}else c.length?A=(0,_r.or)(...c.map(C=>(0,_r._)`${w} === ${C}`)):A=_r.nil;return u.length&&(A=(0,_r.or)(A,...u.map(C=>(0,_r._)`${(0,zi.usePattern)(e,C)}.test(${w})`))),(0,_r.not)(A)}function v(w){t.code((0,_r._)`delete ${o}[${w}]`)}function y(w){if(l.removeAdditional==="all"||l.removeAdditional&&n===!1){v(w);return}if(n===!1){e.setParams({additionalProperty:w}),e.error(),i||t.break();return}if(typeof n=="object"&&!(0,Ki.alwaysValidSchema)(s,n)){const A=t.name("valid");l.removeAdditional==="failing"?(g(w,A,!1),t.if((0,_r.not)(A),()=>{e.reset(),v(w)})):(g(w,A),i||t.if((0,_r.not)(A),()=>t.break()))}}function g(w,A,C){const b={keyword:"additionalProperties",dataProp:w,dataPropType:Ki.Type.Str};C===!1&&Object.assign(b,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(b,A)}}};cc.default=_x;var uf={};Object.defineProperty(uf,"__esModule",{value:!0});const bx=Ir,om=_t,uu=Ke,am=cc,wx={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,parentSchema:r,data:o,it:a}=e;a.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&am.default.code(new bx.KeywordCxt(a,am.default,"additionalProperties"));const s=(0,om.allSchemaProperties)(n);for(const d of s)a.definedProperties.add(d);a.opts.unevaluated&&s.length&&a.props!==!0&&(a.props=uu.mergeEvaluated.props(t,(0,uu.toHash)(s),a.props));const i=s.filter(d=>!(0,uu.alwaysValidSchema)(a,n[d]));if(i.length===0)return;const l=t.name("valid");for(const d of i)c(d)?u(d):(t.if((0,om.propertyInData)(t,o,d,a.opts.ownProperties)),u(d),a.allErrors||t.else().var(l,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(l);function c(d){return a.opts.useDefaults&&!a.compositeRule&&n[d].default!==void 0}function u(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};uf.default=wx;var df={};Object.defineProperty(df,"__esModule",{value:!0});const sm=_t,Wi=bt,im=Ke,lm=Ke,Ax={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:n,data:r,parentSchema:o,it:a}=e,{opts:s}=a,i=(0,sm.allSchemaProperties)(n),l=i.filter(g=>(0,im.alwaysValidSchema)(a,n[g]));if(i.length===0||l.length===i.length&&(!a.opts.unevaluated||a.props===!0))return;const c=s.strictSchema&&!s.allowMatchingProperties&&o.properties,u=t.name("valid");a.props!==!0&&!(a.props instanceof Wi.Name)&&(a.props=(0,lm.evaluatedPropsToName)(t,a.props));const{props:d}=a;h();function h(){for(const g of i)c&&v(g),a.allErrors?y(g):(t.var(u,!0),y(g),t.if(u))}function v(g){for(const w in c)new RegExp(g).test(w)&&(0,im.checkStrictMode)(a,`property ${w} matches pattern ${g} (use allowMatchingProperties)`)}function y(g){t.forIn("key",r,w=>{t.if((0,Wi._)`${(0,sm.usePattern)(e,g)}.test(${w})`,()=>{const A=l.includes(g);A||e.subschema({keyword:"patternProperties",schemaProp:g,dataProp:w,dataPropType:lm.Type.Str},u),a.opts.unevaluated&&d!==!0?t.assign((0,Wi._)`${d}[${w}]`,!0):!A&&!a.allErrors&&t.if((0,Wi.not)(u),()=>t.break())})})}}};df.default=Ax;var ff={};Object.defineProperty(ff,"__esModule",{value:!0});const Cx=Ke,$x={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:n,it:r}=e;if((0,Cx.alwaysValidSchema)(r,n)){e.fail();return}const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};ff.default=$x;var pf={};Object.defineProperty(pf,"__esModule",{value:!0});const Sx=_t,Ix={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Sx.validateUnion,error:{message:"must match a schema in anyOf"}};pf.default=Ix;var hf={};Object.defineProperty(hf,"__esModule",{value:!0});const il=bt,Ex=Ke,kx={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,il._)`{passingSchemas: ${e.passing}}`},Tx={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:kx,code(e){const{gen:t,schema:n,parentSchema:r,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&r.discriminator)return;const a=n,s=t.let("valid",!1),i=t.let("passing",null),l=t.name("_valid");e.setParams({passing:i}),t.block(c),e.result(s,()=>e.reset(),()=>e.error(!0));function c(){a.forEach((u,d)=>{let h;(0,Ex.alwaysValidSchema)(o,u)?t.var(l,!0):h=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&t.if((0,il._)`${l} && ${s}`).assign(s,!1).assign(i,(0,il._)`[${i}, ${d}]`).else(),t.if(l,()=>{t.assign(s,!0),t.assign(i,d),h&&e.mergeEvaluated(h,il.Name)})})}}};hf.default=Tx;var mf={};Object.defineProperty(mf,"__esModule",{value:!0});const xx=Ke,Px={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const o=t.name("valid");n.forEach((a,s)=>{if((0,xx.alwaysValidSchema)(r,a))return;const i=e.subschema({keyword:"allOf",schemaProp:s},o);e.ok(o),e.mergeEvaluated(i)})}};mf.default=Px;var vf={};Object.defineProperty(vf,"__esModule",{value:!0});const Pl=bt,f_=Ke,Mx={message:({params:e})=>(0,Pl.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Pl._)`{failingKeyword: ${e.ifClause}}`},Ox={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Mx,code(e){const{gen:t,parentSchema:n,it:r}=e;n.then===void 0&&n.else===void 0&&(0,f_.checkStrictMode)(r,'"if" without "then" and "else" is ignored');const o=cm(r,"then"),a=cm(r,"else");if(!o&&!a)return;const s=t.let("valid",!0),i=t.name("_valid");if(l(),e.reset(),o&&a){const u=t.let("ifClause");e.setParams({ifClause:u}),t.if(i,c("then",u),c("else",u))}else o?t.if(i,c("then")):t.if((0,Pl.not)(i),c("else"));e.pass(s,()=>e.error(!0));function l(){const u=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);e.mergeEvaluated(u)}function c(u,d){return()=>{const h=e.subschema({keyword:u},i);t.assign(s,i),e.mergeValidEvaluated(h,s),d?t.assign(d,(0,Pl._)`${u}`):e.setParams({ifClause:u})}}}};function cm(e,t){const n=e.schema[t];return n!==void 0&&!(0,f_.alwaysValidSchema)(e,n)}vf.default=Ox;var gf={};Object.defineProperty(gf,"__esModule",{value:!0});const Nx=Ke,Rx={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,Nx.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};gf.default=Rx;Object.defineProperty(of,"__esModule",{value:!0});const Lx=as,Dx=af,Bx=ss,Fx=sf,jx=lf,Vx=u_,Ux=cf,Hx=cc,zx=uf,Kx=df,Wx=ff,qx=pf,Gx=hf,Jx=mf,Yx=vf,Xx=gf;function Qx(e=!1){const t=[Wx.default,qx.default,Gx.default,Jx.default,Yx.default,Xx.default,Ux.default,Hx.default,Vx.default,zx.default,Kx.default];return e?t.push(Dx.default,Fx.default):t.push(Lx.default,Bx.default),t.push(jx.default),t}of.default=Qx;var yf={},_f={};Object.defineProperty(_f,"__esModule",{value:!0});const nn=bt,Zx={message:({schemaCode:e})=>(0,nn.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,nn._)`{format: ${e}}`},e2={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Zx,code(e,t){const{gen:n,data:r,$data:o,schema:a,schemaCode:s,it:i}=e,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=i;if(!l.validateFormats)return;o?h():v();function h(){const y=n.scopeValue("formats",{ref:d.formats,code:l.code.formats}),g=n.const("fDef",(0,nn._)`${y}[${s}]`),w=n.let("fType"),A=n.let("format");n.if((0,nn._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>n.assign(w,(0,nn._)`${g}.type || "string"`).assign(A,(0,nn._)`${g}.validate`),()=>n.assign(w,(0,nn._)`"string"`).assign(A,g)),e.fail$data((0,nn.or)(C(),b()));function C(){return l.strictSchema===!1?nn.nil:(0,nn._)`${s} && !${A}`}function b(){const p=u.$async?(0,nn._)`(${g}.async ? await ${A}(${r}) : ${A}(${r}))`:(0,nn._)`${A}(${r})`,_=(0,nn._)`(typeof ${A} == "function" ? ${p} : ${A}.test(${r}))`;return(0,nn._)`${A} && ${A} !== true && ${w} === ${t} && !${_}`}}function v(){const y=d.formats[a];if(!y){C();return}if(y===!0)return;const[g,w,A]=b(y);g===t&&e.pass(p());function C(){if(l.strictSchema===!1){d.logger.warn(_());return}throw new Error(_());function _(){return`unknown format "${a}" ignored in schema at path "${c}"`}}function b(_){const S=_ instanceof RegExp?(0,nn.regexpCode)(_):l.code.formats?(0,nn._)`${l.code.formats}${(0,nn.getProperty)(a)}`:void 0,R=n.scopeValue("formats",{key:a,ref:_,code:S});return typeof _=="object"&&!(_ instanceof RegExp)?[_.type||"string",_.validate,(0,nn._)`${R}.validate`]:["string",_,R]}function p(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!u.$async)throw new Error("async format in sync schema");return(0,nn._)`await ${A}(${r})`}return typeof w=="function"?(0,nn._)`${A}(${r})`:(0,nn._)`${A}.test(${r})`}}}};_f.default=e2;Object.defineProperty(yf,"__esModule",{value:!0});const t2=_f,n2=[t2.default];yf.default=n2;var Ya={};Object.defineProperty(Ya,"__esModule",{value:!0});Ya.contentVocabulary=Ya.metadataVocabulary=void 0;Ya.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ya.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Hd,"__esModule",{value:!0});const r2=zd,o2=Wd,a2=of,s2=yf,um=Ya,i2=[r2.default,o2.default,(0,a2.default)(),s2.default,um.metadataVocabulary,um.contentVocabulary];Hd.default=i2;var bf={},uc={};Object.defineProperty(uc,"__esModule",{value:!0});uc.DiscrError=void 0;var dm;(function(e){e.Tag="tag",e.Mapping="mapping"})(dm||(uc.DiscrError=dm={}));Object.defineProperty(bf,"__esModule",{value:!0});const xa=bt,Yu=uc,fm=Yn,l2=os,c2=Ke,u2={message:({params:{discrError:e,tagName:t}})=>e===Yu.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,xa._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},d2={keyword:"discriminator",type:"object",schemaType:"object",error:u2,code(e){const{gen:t,data:n,schema:r,parentSchema:o,it:a}=e,{oneOf:s}=o;if(!a.opts.discriminator)throw new Error("discriminator: requires discriminator option");const i=r.propertyName;if(typeof i!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const l=t.let("valid",!1),c=t.const("tag",(0,xa._)`${n}${(0,xa.getProperty)(i)}`);t.if((0,xa._)`typeof ${c} == "string"`,()=>u(),()=>e.error(!1,{discrError:Yu.DiscrError.Tag,tag:c,tagName:i})),e.ok(l);function u(){const v=h();t.if(!1);for(const y in v)t.elseIf((0,xa._)`${c} === ${y}`),t.assign(l,d(v[y]));t.else(),e.error(!1,{discrError:Yu.DiscrError.Mapping,tag:c,tagName:i}),t.endIf()}function d(v){const y=t.name("valid"),g=e.subschema({keyword:"oneOf",schemaProp:v},y);return e.mergeEvaluated(g,xa.Name),y}function h(){var v;const y={},g=A(o);let w=!0;for(let p=0;p<s.length;p++){let _=s[p];if(_!=null&&_.$ref&&!(0,c2.schemaHasRulesButRef)(_,a.self.RULES)){const R=_.$ref;if(_=fm.resolveRef.call(a.self,a.schemaEnv.root,a.baseId,R),_ instanceof fm.SchemaEnv&&(_=_.schema),_===void 0)throw new l2.default(a.opts.uriResolver,a.baseId,R)}const S=(v=_==null?void 0:_.properties)===null||v===void 0?void 0:v[i];if(typeof S!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);w=w&&(g||A(_)),C(S,p)}if(!w)throw new Error(`discriminator: "${i}" must be required`);return y;function A({required:p}){return Array.isArray(p)&&p.includes(i)}function C(p,_){if(p.const)b(p.const,_);else if(p.enum)for(const S of p.enum)b(S,_);else throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`)}function b(p,_){if(typeof p!="string"||p in y)throw new Error(`discriminator: "${i}" values must be unique strings`);y[p]=_}}}};bf.default=d2;const f2="http://json-schema.org/draft-07/schema#",p2="http://json-schema.org/draft-07/schema#",h2="Core schema meta-schema",m2={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},v2=["object","boolean"],g2={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},y2={$schema:f2,$id:p2,title:h2,definitions:m2,type:v2,properties:g2,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=gy,r=Hd,o=bf,a=y2,s=["/properties"],i="http://json-schema.org/draft-07/schema";class l extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const y=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(y,i,!1),this.refs["http://json-schema.org/schema"]=i}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=Ir;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=bt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=di;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var h=os;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(Uu,Uu.exports);var _2=Uu.exports;const b2=vy(_2);var w2=(e=>(e.WriterBlueprintKey="writer#blueprintKey",e.CssClassnames="cssClassnames",e.CssSize="cssSize",e.Uri="uri",e.Uuid="uuid",e))(w2||{});function Qn(e){return`https://dev.writer.com/framework/${encodeURIComponent(e)}.json`}function A4(e){return{$id:Qn(e.join(",")),type:"string",enum:e}}function zs(e,t){return{$id:Qn(`between-${e}-${t}`),type:"number",minimum:e,maximum:t}}const A2={$id:Qn("cssClassname"),type:"string",format:"cssClassnames"},p_={$id:Qn("cssSize"),type:"string",format:"cssSize"},h_={$id:Qn("arrayOfString"),type:"array",items:{type:"string"}},wf=zs(-90,90),Af=zs(-180,180),C2={$id:Qn("gpsMarker"),type:"object",properties:{name:{type:"string"},lat:wf,lng:Af},required:["lat","lng","name"],additionalProperties:!1},m_={$id:Qn("gpsMarkers"),type:"array",items:C2},Fo={$id:Qn("objectRecordNotNested"),type:"object",patternProperties:{"^.*$":{type:["string","number","boolean"]}},additionalProperties:!0},$2={$id:Qn("anotatedText"),type:"array",items:{oneOf:[{type:"string"},{type:"array",items:{type:"string"}}]}},S2={$id:Qn("repeaterObject"),oneOf:[{type:"object",patternProperties:{"^.*$":{type:"object"}},additionalProperties:!0},{type:"array",items:{type:"object"}}]},I2={$id:Qn("chatBotMessage"),type:"object",properties:{role:{type:"string"},content:{type:"string"},tools:{type:"array",items:{type:"object",properties:{type:{type:"string"}},required:["type"],additionalProperties:!0}}},required:["role"],additionalProperties:!0},E2={$id:Qn("chatBotMessages"),type:"array",items:I2},Xn={$id:Qn("positiveNumber"),type:"number",minimum:0},v_={$id:Qn("uri"),type:"string",format:"uri"},ll=new b2({strict:!0,allowUnionTypes:!0});function C4(e){return(e==null?void 0:e.$id)===void 0?ll.compile(e):ll.getSchema(e.$id)||ll.compile(e)}const k2={uri:{format:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,errorMessage:"must be a valid URL"},uuid:{format:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,errorMessage:"must be a valid UUID"},cssClassnames:{format:/(^\s*[a-zA-Z_][-\w]*(\s+[a-zA-Z_][-\w]*)*\s*$)|(^$)/,errorMessage:"must be a valid list of CSS classes separated by spaces"},cssSize:{format:/(^([+-]?\d*\.?\d+)(px|em|%|vh|vw|rem|pt|pc|in|cm|mm|ex|ch|vmin|vmax|fr)$)|(^$)/,errorMessage:"must be a valid CSS size"},"writer#blueprintKey":{format:{type:"string",validate:e=>{const t=ee(re.core);return t?t.getComponents().filter(r=>r.type==="blueprints_blueprint").map(r=>r.content.key).includes(e):!0}},errorMessage:"must correspond to an existing blueprint key"}};Object.entries(k2).map(([e,t])=>ll.addFormat(e,t.format));const mn={name:"Accent",type:q.Color,category:We.Style,applyStyleVariable:!0},Zt={name:"Primary text",type:q.Color,category:We.Style,applyStyleVariable:!0},Zn={name:"Secondary text",type:q.Color,category:We.Style,applyStyleVariable:!0},g_={name:"Emptiness",desc:"Page background color",type:q.Color,category:We.Style,applyStyleVariable:!0},fo={name:"Container background",type:q.Color,category:We.Style,applyStyleVariable:!0},is={name:"Container shadow",type:q.Shadow,category:We.Style,applyStyleVariable:!0},sn={name:"Separator",type:q.Color,category:We.Style,applyStyleVariable:!0},Hr={name:"Button",type:q.Color,category:We.Style,applyStyleVariable:!0},zr={name:"Button text",type:q.Color,category:We.Style,applyStyleVariable:!0},Uo={name:"Button shadow",type:q.Shadow,category:We.Style,applyStyleVariable:!0},at={name:"Custom CSS classes",type:q.Text,category:We.Style,desc:"CSS classes, separated by spaces. You can define classes in custom stylesheets.",validator:A2},T2={name:"Content width",type:q.Width,default:"100%",category:We.Style,desc:"Configure content width using CSS units, e.g. 100px, 50%, 10vw, etc.",validator:p_},ls={name:"Content alignment (H)",type:q.HAlign,default:"unset",category:We.Style},Cf={name:"Content alignment (V)",type:q.VAlign,default:"unset",category:We.Style},cs={name:"Padding",type:q.Padding,default:"0",category:We.Style},Pt=Object.freeze({type:q.Boolean,options:{yes:"Yes",no:"No"},validator:{type:"boolean"}}),y_={...Pt,name:"Collapsible",default:"no",category:We.Style},$f={...Pt,name:"Start collapsed",category:We.Style,default:"no",desc:"Only applied when the component is collapsible."},x2=["aria-invalid"],P2={key:0,class:"material-symbols-outlined"},M2={key:1,class:"WdsTextInput__rightText"},O2=["aria-invalid"],N2=Ie({inheritAttrs:!1,__name:"WdsTextInput",props:oo({leftIcon:{type:String,required:!1,default:void 0},invalid:{type:Boolean,required:!1},variant:{type:String,default:void 0},enableClearButton:{type:Boolean,required:!1},rightText:{type:String,required:!1,default:""}},{modelValue:{type:String},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){const n=co(e,"modelValue"),r=e;t({focus:c,getSelection:l,value:n,setSelectionEnd:i,setSelectionStart:s});const o=st("input"),a=W(()=>[r.leftIcon?"auto":void 0,"1fr",r.rightText?"auto":void 0,r.enableClearButton?"auto":void 0].filter(Boolean).join(" "));function s(u){o.value&&(o.value.selectionStart=u)}function i(u){o.value&&(o.value.selectionEnd=u)}function l(){var u,d;return{selectionStart:(u=o.value)==null?void 0:u.selectionStart,selectionEnd:(d=o.value)==null?void 0:d.selectionEnd}}function c(){var u;(u=o.value)==null||u.focus()}return(u,d)=>e.leftIcon||e.enableClearButton?(I(),M("div",Ba({key:0,class:["WdsTextInput WdsTextInput--leftIcon colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]},u.$attrs,{"aria-invalid":e.invalid,style:{gridTemplateColumns:a.value},onClick:c}),[e.leftIcon?(I(),M("i",P2,Me(e.leftIcon),1)):_e("",!0),hn(D("input",Ba({ref_key:"input",ref:o,"onUpdate:modelValue":d[0]||(d[0]=h=>n.value=h)},u.$attrs),null,16),[[Cl,n.value]]),e.rightText?(I(),M("p",M2,Me(e.rightText),1)):_e("",!0),e.enableClearButton&&n.value?(I(),M("button",{key:2,class:"WdsTextInput__clearBtn",type:"button",onClick:d[1]||(d[1]=h=>n.value="")},d[3]||(d[3]=[D("i",{class:"material-symbols-outlined"},"close",-1)]))):_e("",!0)],16,x2)):hn((I(),M("input",Ba({key:1},u.$attrs,{ref_key:"input",ref:o,"onUpdate:modelValue":d[2]||(d[2]=h=>n.value=h),"aria-invalid":e.invalid,class:["WdsTextInput colorTransformer",{"WdsTextInput--ghost":e.variant==="ghost"}]}),null,16,O2)),[[Cl,n.value]])}}),__=Ne(N2,[["__scopeId","data-v-9092817d"]]),R2={};function L2(e,t){return I(),M("button",null,[Yt(e.$slots,"default",{},void 0,!0)])}const wr=Ne(R2,[["render",L2],["__scopeId","data-v-75345289"]]);function D2(e){const t=Pn([]),n=Pe(!1),r=Ln();async function o(){if(!n.value){for(n.value=!0;t.value.length;){const[s,...i]=t.value;try{await e(s)}catch(l){r.error("Error during handling job",s,l)}finally{t.value=i}}n.value=!1}}function a(s){if(t.value=[...t.value,s],!n.value)return o()}return{push:a,isBusy:Sn(n)}}function Sf(e,t,n){function r(i){return i.type==="blueprints_uieventtrigger"&&i.content.refComponentId===x(t)&&i.content.refEventType===x(n)}const o=W(()=>[...new Set(a.value.map(l=>l.parentId))].map(l=>e.getComponentById(l)).filter(Boolean)),a=W(()=>e.getComponents("blueprints_root").flatMap(i=>e.getComponents(i.id).filter(r))),s=W(()=>a.value.length>0);return{blueprints:o,triggers:a,isLinked:s}}function B2(e,t,n,r){const o=t.at(-1).componentId,a=W(()=>e.getComponentById(o)),{push:s,isBusy:i}=D2(l);async function l(y){switch(y.eventType){case"wf-dataframe-add":await c(...y.payload);break;case"wf-dataframe-update":await d(...y.payload);break;case"wf-dataframe-action":await u(...y.payload);break}}async function c(){const y="wf-dataframe-add",g=r.value.numRows(),w=await tn(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([3,4]),import.meta.url),A=w.escape(_=>_[cr]===g),C=r.value.filter(A).object();if(!C)throw Error("Could not find record");const b=V2(C),p=w.from([b]);if(r.value=r.value.concat(p).derive({[cr]:()=>w.op.row_number()}),!!h(y))return new Promise(_=>{const S=new CustomEvent(y,{detail:{payload:{record:b,record_index:g},callback:_}});v(S)})}async function u(y,g){const w="wf-dataframe-action";if(!r.value)throw Error("Table is not ready");if(!h(w))return;const A=g-1;return new Promise(C=>{const b=new CustomEvent(w,{detail:{payload:{action:y,record_index:A},callback:C}});v(b)})}async function d(y,g,w){if(!r.value)throw Error("Table is not ready");if(g===void 0)throw Error("Must specify the index to update a row");const A="wf-dataframe-update",C=g-1,b=await tn(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([3,4]),import.meta.url),p=b.escape(te=>te[cr]===g),_=r.value.filter(p).object();if(!_)throw Error("Could not find record");const S=_[y],R=F2(S,w),Y=b.escape(te=>te[cr]===g?R:te[y]);if(r.value=r.value.derive({[y]:Y}),!h(A))return;const X=j2(r.value.filter(p).object());return new Promise(te=>{const $e=new CustomEvent(A,{detail:{payload:{record:X,record_index:C},callback:te}});v($e)})}function h(y){var C,b;const g=(C=a.value.handlers)==null?void 0:C[y],w=((b=a.value.binding)==null?void 0:b.eventType)==y,A=Sf(e,o,y).isLinked.value;return!!(g||w||A)}function v(y){n.value instanceof HTMLElement?n.value.dispatchEvent(y):n.value.$el.dispatchEvent(y)}return{isBusy:i,handleUpdateCell:(...y)=>s({eventType:"wf-dataframe-update",payload:y}),handleAddRow:(...y)=>s({eventType:"wf-dataframe-add",payload:y}),handleActionRow:(...y)=>s({eventType:"wf-dataframe-action",payload:y})}}function F2(e,t){switch(typeof e){case"number":return Number(t);case"string":return String(t);case"boolean":return!!t;case"bigint":return BigInt(String(t));default:throw Error(`Could not update a field of type ${typeof e}`)}}function b_(e){return e===cr||ry.test(e)}function j2(e){return Object.entries(e).filter(([t])=>!b_(t)).reduce((t,[n,r])=>(t[n]=r,t),{})}function V2(e){return Object.entries(e).filter(([t])=>!b_(t)).reduce((t,[n,r])=>(t[n]=U2(r),t),{})}function U2(e){switch(typeof e){case"number":return 0;case"string":return"";case"boolean":return!1;case"bigint":return BigInt(0);case"object":return{};default:throw Error(`Could not get default value a field of type ${typeof e}`)}}const H2=["disabled"],z2={key:0,class:"WdsButton__loader"},K2=Ie({__name:"WdsButton",props:{variant:{type:String,default:"primary"},size:{type:String,default:"big"},customSize:{type:String,required:!1,default:void 0},loading:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1}},setup(e){const t=za(()=>tn(()=>import("./WdsLoaderDots-B3jiV24t.js"),[],import.meta.url)),n=e,r=W(()=>{if(n.customSize)return{width:n.customSize,height:n.customSize}}),o=W(()=>["WdsButton",`WdsButton--${n.variant}`,n.customSize?void 0:`WdsButton--${n.size}`]);return(a,s)=>(I(),M("button",{class:ct(["WdsButton colorTransformer",o.value]),role:"button",style:$t(r.value),disabled:e.disabled||e.loading},[e.loading?(I(),M("div",z2,[He(x(t),{color:"white",size:24})])):_e("",!0),Yt(a.$slots,"default",{},void 0,!0)],14,H2))}}),Nn=Ne(K2,[["__scopeId","data-v-3b815c67"]]);var St=(e=>(e.White="#ffffff",e.Black="#000000",e.Blue1="#f3f5ff",e.Blue2="#e4e9ff",e.Blue3="#bfcbff",e.Blue4="#6985ff",e.Blue5="#5551ff",e.Blue6="#4a46da",e.Gray0="#fbfbfd",e.Gray1="#f5f5f9",e.Gray2="#e4e7ed",e.Gray3="#d2d4d7",e.Gray4="#828282",e.Gray5="#4f4f4f",e.Gray6="#333333",e.Purple1="#f6effd",e.Purple2="#ede2ff",e.Purple3="#d4b2f7",e.Purple4="#a95ef8",e.Purple5="#721cc9",e.Orange1="#fff4f1",e.Orange2="#ffcfc2",e.Orange4="#ff8866",e.Orange5="#ff643c",e.Green1="#f2fffb",e.Green2="#d4fff2",e.Green3="#a9f9e1",e.Green5="#3bdcab",e.Green6="#078660",e))(St||{}),w_=(e=>(e.Box="0px 2px 0px 0px #f3f3f3",e.Menu="0px 1px 8px 0px #bfcbff40",e.Large="0px 3px 40px 0px #acb9dc66",e))(w_||{});const $4=Object.freeze(Object.fromEntries([...Object.entries(St).map(([e,t])=>[`--wdsColor${e}`,t]),...Object.entries(w_).map(([e,t])=>[`--wdsShadow${e}`,t])])),W2=["aria-busy"],q2={key:0},G2={class:"CoreDataframe__table__row CoreDataframe__table__row--head"},J2={key:0,"data-writer-grid-col":"0",class:"CoreDataframe__table__th CoreDataframe__table__th--index"},Y2=["data-writer-grid-col"],X2=["onClick"],Q2={key:0,class:"CoreDataframe__table__th__icon material-symbols-outlined"},Z2={key:1,class:"CoreDataframe__table__th CoreDataframe__table__th--stickyRight"},eP={key:0,class:"CoreDataframe__newRow"},tP="A component to display Pandas DataFrames.",nP=`
# Subscribe this event handler to the \`wf-dataframe-update\` event
#
# more on : https://dev.writer.com/framework/dataframe
def on_record_change(state, payload):
    state['mydf'].record_update(payload) # should contain an EditableDataFrame instance`,rP=`
# Subscribe this event handler to the \`wf-dataframe-add\` event
#
# more on : https://dev.writer.com/framework/dataframe
def on_record_add(state, payload):
	payload['record']['sales'] = 0 # default value inside the dataframe
	state['mydf'].record_add(payload) # should contain an EditableDataFrame instance`,oP=`
# Subscribe this event handler to the \`wf-dataframe-action\` event
#
# more on : https://dev.writer.com/framework/dataframe
def on_record_action(state, payload):
	# state['mydf'] should contains an EditableDataFrame instance
	record_index = payload['record_index']
	if payload['action'] == 'remove':
		state['mydf'].record_remove(payload) # should contain an EditableDataFrame instance
	if payload['action'] == 'open':
		state['record'] = state['mydf'].record(record_index) # dict representation of record`,aP={writer:{name:"DataFrame",description:tP,category:"Content",events:{"wf-dataframe-add":{desc:"Capture adding a row.",stub:rP.trim(),eventPayloadExample:{record:{col_a:"0n",col_b:"0n"},record_index:2}},"wf-dataframe-update":{desc:"Capture a cell change.",stub:nP.trim(),eventPayloadExample:{record:{col_a:"1n",col_b:"2n"},record_index:0}},"wf-dataframe-action":{desc:"Remove or open a row.",stub:oP.trim(),eventPayloadExample:{action:"open",record_index:0}}},fields:{dataframe:{name:"Data",desc:"Must be a state reference to a Pandas dataframe or PyArrow table. Alternatively, a URL for an Arrow IPC file.",type:q.Text,default:qS},showIndex:{...Pt,name:"Show index",desc:"Shows the dataframe's index. If an Arrow table is used, shows the zero-based integer index.",default:"yes"},enableSearch:{...Pt,name:"Enable search",default:"no"},enableRecordAdd:{...Pt,name:"Enable adding a record",default:"no"},enableRecordUpdate:{...Pt,name:"Enable updating a record",default:"no"},enableDownload:{...Pt,name:"Enable download",desc:"Allows the user to download the data as CSV.",default:"no"},actions:{name:"Actions",desc:"Define rows actions",type:q.KeyValue,default:JSON.stringify({remove:"Remove",open:"Open"}),validator:Fo},useMarkdown:{...Pt,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},displayRowCount:{name:"Display row count",desc:"Specifies how many rows to show simultaneously.",type:q.Number,category:We.Style,default:"10",validator:Xn},wrapText:{...Pt,name:"Wrap text",category:We.Style,desc:"Not wrapping text allows for an uniform grid, but may be inconvenient if your data contains longer text fields.",default:"no"},primaryTextColor:Zt,secondaryTextColor:Zn,accentColor:mn,separatorColor:sn,dataframeBackgroundColor:{name:"Background",type:q.Color,category:We.Style,default:St.White,applyStyleVariable:!0},fontStyle:{name:"Font style",type:q.Text,category:We.Style,options:{normal:"normal",monospace:"monospace"},default:"normal"},cssClasses:at}}},sP=Ie({...aP,__name:"CoreDataframe",setup(e){const a=ee(re.evaluatedFields),s=st("rootEl"),i=st("toolsEl"),l=st("gridContainerEl");let c=null;const u=Pn(null),d=Pn([]),h=W(()=>a.showIndex.value=="yes"),v=W(()=>a.actions.value),y=Pn(null),g=Pe(0),w=Pe([]);let A=null;const C=ee(re.core),b=ee(re.instancePath),{handleUpdateCell:p,handleAddRow:_,handleActionRow:S,isBusy:R}=B2(C,b,s,u);async function Y(){await _(),l.value.scrollTo({behavior:"smooth",top:48*ye.value})}const X=W(()=>P.value||R.value),te=W(()=>{var V;return u.value?(V=u.value)==null?void 0:V.columnNames():[]}),$e=W(()=>te.value.filter(V=>d.value.includes(V))),pe=W(()=>te.value.filter(H=>{if(H===cr)return!1;const G=d.value.includes(H),he=ry.test(H);return!(G&&he)})),we=W(()=>(h.value?1:0)+pe.value.length),ye=W(()=>{var V;return((V=u.value)==null?void 0:V.numRows())??0}),qe=W(()=>ye.value>1e3),Te=W(()=>Math.min(a.displayRowCount.value,ye.value)),Ce=W(()=>Object.keys(a.actions.value||{}).length>0),be=W(()=>!!a.useMarkdown.value),fe=W(()=>!!a.enableRecordUpdate.value),de=W(()=>!!a.enableRecordAdd.value),L=W(()=>!!a.wrapText.value),le=W(()=>{let V;return L.value?V=ye.value-1:V=ye.value-Te.value,Math.min(Math.ceil(g.value*V),V)}),j=W(()=>{if(!u.value)return null;const V=qe.value?le.value:0,H=qe.value?Te.value:1e3,G=u.value.objects({offset:V,limit:H}),he=u.value.indices().slice(V,le.value+Te.value);return{data:G,indices:he}}),E=W(()=>{let V="16px ";return w.value.length==0?(h.value&&(V+="75px "),V+=`repeat(${pe.value.length}, minmax(min-content, 1fr)) `):V+=w.value.map(H=>`${Math.max(H,80)}px `).join(" "),Ce.value&&(V+="40px "),V}),O=W(()=>{const V=a.fontStyle.value,H=`${(1+a.displayRowCount.value)*48}px`;return{position:qe.value?"sticky":"unset","min-height":"48px","max-height":H,"font-family":V=="monospace"?"monospace":void 0,"grid-template-rows":`48px repeat(${Te.value}, min-content)`,"grid-template-columns":E.value}}),ue=W(()=>({top:`${48*ye.value}px`})),Be=Pe(!1);function U(){if(!(l.value.scrollWidth>l.value.clientWidth)){Be.value=!1;return}const H=l.value.scrollLeft+l.value.clientWidth>=l.value.scrollWidth;Be.value=!H}Ge(w,U);function Z(){const V=l.value.scrollTop;g.value=V/(l.value.scrollHeight-l.value.clientHeight),U()}function Q(){l.value.scrollTop=0}async function se(){var G;w.value=[],await Hn();const V=(G=l.value)==null?void 0:G.querySelectorAll("[data-writer-grid-col]"),H=[];V==null||V.forEach(he=>{const ge=he,xe=ge.dataset.writerGridCol,{width:Fe}=ge.getBoundingClientRect(),ot=Math.min(Fe,300);H[xe]=ot}),w.value=H}function Se(V,H){var xe,Fe;if(V.target.classList.contains("widthAdjuster"))return;if(((xe=y.value)==null?void 0:xe.columnName)!==H){y.value={columnName:H,descending:!1};return}if((Fe=y.value)==null?void 0:Fe.descending){y.value=null;return}y.value={columnName:H,descending:!y.value.descending}}function k(V){const H=V.schema.metadata.get("pandas");return H?JSON.parse(H).index_columns:[]}const P=Pe(!1);async function ie(){P.value=!0;const V=await tn(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([3,4]),import.meta.url),{tableFromIPC:H}=await tn(()=>import("./Arrow.dom-GBJpMYQS.js"),__vite__mapDeps([5,4]),import.meta.url),G=a.dataframe.value;try{const xe=await(await(await fetch(G)).blob()).arrayBuffer(),Fe=H(xe);d.value=k(Fe),c=V.fromArrow(Fe),u.value=c.derive({[cr]:()=>V.op.row_number()})}catch(he){Ln().error("Couldn't load dataframe from Arrow URL.",he)}finally{P.value=!1}}async function ve(){const V=await tn(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([3,4]),import.meta.url),H=u.value.select(V.not(cr)).toCSV(),G=document.createElement("a"),he=new Blob([H],{type:"text/csv"}),ge=URL.createObjectURL(he);G.href=ge,G.download="data.csv",G.click(),URL.revokeObjectURL(ge)}async function F(){const V=await tn(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([3,4]),import.meta.url);if(y.value===null){u.value=u.value.unorder();return}let H;y.value.descending?H=V.desc(y.value.columnName):H=y.value.columnName,u.value=u.value.orderby(H)}async function K(V){const H=V.target.value;if(!H)u.value=c;else{const G=new RegExp(H,"i"),ge="(d, $) => "+c.columnNames().map(Fe=>`aq.op.match(d.${Fe}, $.pattern) !== null`).join(" || "),xe=await tn(()=>import("./index-5u5REPT4.js"),__vite__mapDeps([3,4]),import.meta.url);u.value=c.params({pattern:G,filterS:ge}).filter(ge).derive({[cr]:()=>xe.op.row_number()})}await Hn(),Q()}async function oe(V){if(V.buttons!==1){A=null;return}const H=V.target;if(!s.value.contains(H))return;if(A===null&&H.classList.contains("widthAdjuster")){const Fe=H.closest(".CoreDataframe__table__th");A=parseInt(Fe.dataset.writerGridCol)}else if(A===null)return;const G=l.value.querySelector(`[data-writer-grid-col="${A}"]`),{left:he}=G.getBoundingClientRect(),xe=V.clientX-he;w.value[A]=xe}return Ge(a.dataframe,()=>{ie()}),Ge(y,async()=>{await F()}),Ge(we,()=>{se()}),Ge(L,()=>{se()}),bn(async()=>{await ie(),document.addEventListener("mousemove",oe),i.value&&new ResizeObserver(se).observe(i.value,{box:"border-box"})}),Pr(()=>{document.removeEventListener("mousemove",oe)}),(V,H)=>{var G;return I(),M("div",{ref_key:"rootEl",ref:s,class:"CoreDataframe","aria-busy":X.value},[D("div",{ref_key:"toolsEl",ref:i,class:"tools"},[x(a).enableSearch.value==="yes"?(I(),M("div",q2,[He(__,{class:"search",placeholder:"Search","left-icon":"search",onChange:K})])):_e("",!0),x(a).enableDownload.value?(I(),Ve(wr,{key:1,title:"Download",class:"download",onClick:ve},{default:et(()=>H[0]||(H[0]=[D("i",{class:"material-symbols-outlined"},"download",-1)])),_:1})):_e("",!0)],512),D("div",{ref_key:"gridContainerEl",ref:l,class:"CoreDataframe__tableWrapper",onScroll:Z},[D("div",{class:ct(["CoreDataframe__table",{scrolled:le.value>0,wrapText:L.value}]),style:$t(O.value)},[D("div",G2,[H[3]||(H[3]=D("div",{class:"CoreDataframe__table__th CoreDataframeRow__spacer"},null,-1)),h.value?(I(),M("div",J2,H[1]||(H[1]=[D("span",{class:"widthAdjuster material-symbols-outlined"}," drag_indicator ",-1)]))):_e("",!0),(I(!0),M(ze,null,xt(pe.value,(he,ge)=>{var xe,Fe;return I(),M("div",{key:he,"data-writer-grid-col":ge+(h.value?1:0),class:"CoreDataframe__table__th"},[D("button",{type:"button",class:"CoreDataframe__table__th__name",onClick:ot=>Se(ot,he)},Me(he),9,X2),((xe=y.value)==null?void 0:xe.columnName)==he?(I(),M("span",Q2,Me((Fe=y.value)!=null&&Fe.descending?"arrow_drop_up":"arrow_drop_down"),1)):_e("",!0),H[2]||(H[2]=D("span",{class:"widthAdjuster material-symbols-outlined"}," drag_indicator ",-1))],8,Y2)}),128)),Ce.value?(I(),M("div",Z2)):_e("",!0)]),(I(!0),M(ze,null,xt((G=j.value)==null?void 0:G.data,(he,ge)=>(I(),Ve(kI,{key:ge,class:"CoreDataframe__table__row",row:he,actions:v.value,"use-markdown":be.value,editable:fe.value&&!X.value,columns:pe.value,"show-index":h.value,"index-text":j.value.indices[ge]??$e.value.map(xe=>he[xe]).join(", "),"display-shadow-on-sticky":Be.value,"wrap-text":L.value,onAction:x(S),onChange:x(p)},null,8,["row","actions","use-markdown","editable","columns","show-index","index-text","display-shadow-on-sticky","wrap-text","onAction","onChange"]))),128))],6),qe.value?(I(),M("div",{key:0,class:"endpoint",style:$t(ue.value)},null,4)):_e("",!0)],544),de.value?(I(),M("div",eP,[He(Nn,{"aria-label":"Create a new row at the end",size:"small",variant:"tertiary",onClick:Y},{default:et(()=>H[4]||(H[4]=[D("i",{class:"material-symbols-outlined"},"add",-1),Bt(" Add a row ")])),_:1})])):_e("",!0)],8,W2)}}}),iP=Ne(sP,[["__scopeId","data-v-36eaff25"]]),lP={key:0},cP={key:1},uP={key:2},dP={key:3},fP="A text component used to display headings or titles in different sizes and styles.",pP={writer:{name:"Heading",description:fP,category:"Content",fields:{text:{name:"Text",default:"(No text)",init:"Heading Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:q.Text},headingType:{name:"Heading type",default:"h3",options:{h1:"h1 (Big)",h2:"h2 (Normal)",h3:"h3 (Small)",h4:"h4 (Smallest)"},type:q.Text,category:We.Style},alignment:{name:"Alignment",default:"left",type:q.Text,category:We.Style,options:{left:"Left",center:"Center",right:"Right"}},primaryTextColor:Zt,cssClasses:at},previewField:"text"}},hP=Ie({...pP,__name:"CoreHeading",setup(e){const t=ee(re.evaluatedFields);return(n,r)=>(I(),M("div",{class:"CoreHeading",style:$t({"text-align":x(t).alignment.value})},[x(t).headingType.value=="h1"?(I(),M("h1",lP,Me(x(t).text.value),1)):x(t).headingType.value=="h3"?(I(),M("h3",cP,Me(x(t).text.value),1)):x(t).headingType.value=="h4"?(I(),M("h4",uP,Me(x(t).text.value),1)):(I(),M("h2",dP,Me(x(t).text.value),1))],4))}}),mP=Ne(hP,[["__scopeId","data-v-a24181bd"]]),vP={class:"icon"},gP={writer:{name:"Icon",description:"A component to display an icon",category:"Content",fields:{icon:{name:"Icon",type:q.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:We.Style,default:"arrow_forward"},size:{name:"Icon size",type:q.Number,desc:"Icon size in px",category:We.Style,default:"14",validator:Xn},color:{name:"Icon color",type:q.Color,category:We.Style},cssClasses:at},previewField:"icon"}},A_=Ie({...gP,__name:"CoreIcon",setup(e){const t=ee(re.evaluatedFields);return(n,r)=>(I(),M("div",vP,[x(t).icon.value?(I(),M("span",{key:0,class:"material-symbols-outlined",style:$t({fontSize:`${x(t).size.value}px`,color:x(t).color.value})},Me(x(t).icon.value),5)):_e("",!0)]))}}),pm=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Icon.")};typeof pm=="function"&&pm(A_);const yP=Ne(A_,[["__scopeId","data-v-983dfef2"]]);function pi(e){const t={ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-click",{detail:{payload:t}})}function _P(e){const t={key:e.key,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey};return new CustomEvent("wf-keydown",{detail:{payload:t}})}const bP=["src","alt"],wP={key:0,class:"captionContainer"},AP="A component to display images.",CP=`
def click_handler(state):

	# Increment counter when the image is clicked

	state["counter"] += 1`,$P={writer:{name:"Image",description:AP,category:"Content",fields:{src:{name:"Source",default:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQoAAAEKCAYAAADqyxvJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAemSURBVHgB7d3baltHGIZhJd5DW3pS2vu/tkKgEFragiXLjuvVkpOS5PMa6Z8ZWc8DPXPBJNGrpX82evfrh4/PG4BveL8BCIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiIQCiC43HN3PP/24ubyoafCnT8+bD7/9vur/+f67u80PL/9V+fjHX5vtdv/qn794+bP55eXPaJbfh8wTRYGHh7p/pO/fv/v3hbZG5e+zuLm+WvXzT0+fNo8v/1XZ7582HJdQFKj+h3p7c73q5/ePTy9PInUvzOuVoVhUxWsJ0FNhhM6VUBS43z1sKl1fXaz6+eXjyv6xMBSXF5t3L086a+weHjcVqp+ezpVQFFje0Srfwdc+USz2jzUvzM+WWKyxK3pB74SihFAU2e7mmlNst7VPObe36+JVFdOqJ5VzJxRFqucUaweIy5yi0tXl+gW0Y8fUfKKOUBTZla80rHth/jenqIvFVcOc4tgx3e89TVQRiiLVKw03DSsNu+Jl29Fzim3xEPmcCUWhh8LPy8uMYu07+EPx5/frho9Dx4yp/RN1hKJQ9WDtbuXqx26yjVeLY8Wr+qPVuROKQtVLklcN+ykqd0RerfzosThWTC2L1hKKQsuLoHJOcdewn6Lyc/wyp1g7ZD3WC9yyaC2hKFa5I7JlTlH9Of5y5TLpseYUdmTWEopi1Rud1r6DV68MrP19FofG1HyinlAUq55TrB0gVs8pWgaah8ZUJOoJRbFzOrm5WOYUa4eah8b0fmv/RDWhKHZOJzc/672f4vHRILOaUHRwLic3P2vbXt4eCise9YSigxlPbs42p2iNl0j0IRQdzHhy861c12ejVR9C0cHyaF35zrc86s+2n6Llur4W9k/0IRSdzDanmPG6vpaY+ujRh1B0MtvJzerr+lrmFGtjKhL9CEUnb/nk5pcsM4r1c4p1v8/esmg3QtFJjxum1qp+R14br7Ux3dpo1Y1QdFR9w9Sok5tfU31d34Ot290IRUdv9eTm11Tup1gi8fwSFvoQio6qT27e3bZ838dcx+BfO6ewLNqXUHQ04w1T1Z/zq67rs9GqL6Ho7K2d3EyqruuzNNqXUHQ228nN6uv6Wo7Bp49o5hP9CUVns600LGY7Bp+Gvo++6Kc7oejsLZ3cfK1jL9ve+6Kf7oRigLdycvO1bhq2l38rpr7opz+hGGDGk5uVc4pjHoP3RcRjCMUAM57crJxTtByD/9rQ1/6JMYRigOqTm7c3LRuvTuO6PvsnxhCKQba7ueYUM17X96WY2j8xhlAMUj2nuGm4CbtSy5zi/zE1nxhHKAY59ZOba10dYT/F3v6JYYRikFM+udli+Th06Jxia//EMEIxUPUNU1UnN1sd+sVA9k+MIxQDVQ/mqk5utjrkuj5fRDyWUAx0qic3Wx1yXZ9l0bGEYqDqk5t3DfspKucAh1zXZ1l0LKEYbLYbpma9rs+OzLGEYrDZlkmrVxZajsEvcwrzibGEYrDZTm5WzylaBpp//n2/YSyhGKx6P8V100rDbNf1eZoYTSgGqz652XLD1GzX9TGeUEzgVE5uHsvaY/CMJxQTmPHkZuWcouUYPGMJxQRmPLk523V9jOVvawLLnKJyLtByw9Rs1/UxllBMYrY5xWzX9TGWUExitpOb1df13Vj5OClCMYmZT25WWGYU5hSnw9/UJHrcMLVW9X4KTxWnQygmUn3D1LG/setQLec+GEMoJjLryc0qnihOh1BMpPrk5t1ty/d9zHUMnjGEYiIz3jBVvWv0zn6KkyAUk5nv5OZc1/UxhlBMZraTm9XX9TlJehqEYjIzrjTMdgye/oRiMtUnN2f7YqCFZdL5CcWEZju5Odt1ffT37tcPH583AN/giQKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKIhAKI/gE7SXVdY25ypwAAAABJRU5ErkJggg==",desc:"A valid URL. Alternatively, you can provide a state reference to a Matplotlib figure or a packed file.",type:q.Text},caption:{name:"Caption",init:"Image Caption",desc:"Leave blank to hide.",type:q.Text},maxWidth:{name:"Max width (px)",type:q.Number,default:"-1",category:We.Style},maxHeight:{name:"Max height (px)",type:q.Number,default:"-1",category:We.Style},secondaryTextColor:Zn,cssClasses:at},events:{"wf-click":{desc:"Capture single clicks.",stub:CP.trim()}},previewField:"caption"}},C_=Ie({...$P,__name:"CoreImage",setup(e){const t=st("rootEl"),n=ee(re.core),r=ee(re.evaluatedFields),o=ee(re.componentId),a=W(()=>{var u;return{cursor:typeof((u=n.getComponentById(o).handlers)==null?void 0:u["wf-click"])<"u"?"pointer":"unset"}}),s=W(()=>{const l=r.maxWidth.value,c=r.maxHeight.value;return{"max-width":l!==-1?`${l}px`:void 0,"max-height":c!==-1?`${c}px`:void 0}});function i(l){const c=pi(l);t.value.dispatchEvent(c)}return(l,c)=>(I(),M("div",{ref_key:"rootEl",ref:t,class:"CoreImage",style:$t(a.value),onClick:i},[D("img",{src:x(r).src.value,alt:x(r).caption.value,draggable:"false",style:$t(s.value)},null,12,bP),x(r).caption.value||x(r).caption.value===0?(I(),M("div",wP,Me(x(r).caption.value),1)):_e("",!0)],4))}}),hm=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve images directly. For example, \`static/my_image.png\`.

Alternatively, pass a Matplotlib figure via state.

\`state["my_fig"] = fig\` and then setting the _Image_ source to \`@{fig}\`

You can also use packed files or bytes:

\`state["img_b"] = wf.pack_bytes(img_bytes, "image/png")\`

\`state["img_f"] = wf.pack_file(img_file, "image/png")\``)};typeof hm=="function"&&hm(C_);const SP=Ne(C_,[["__scopeId","data-v-88b01ba2"]]),IP={},EP={class:"LoadingSymbol"};function kP(e,t){return I(),M("div",EP,t[0]||(t[0]=[D("div",null,null,-1)]))}const $_=Ne(IP,[["render",kP],["__scopeId","data-v-5a38f374"]]),TP={class:"BaseEmptiness"},xP={class:"content"},PP={class:"title"},MP={key:0,class:"message"},OP=Ie({__name:"BaseEmptiness",props:{componentId:{type:String,required:!0},message:{type:String,required:!1,default:void 0}},setup(e){const t=e,n=ee(re.core),r=W(()=>n.getComponentById(t.componentId)),o=W(()=>n.getComponentDefinition(r.value.type));return(a,s)=>(I(),M("div",TP,[D("div",xP,[D("div",PP,[D("h3",null,"Empty "+Me(o.value.name),1)]),e.message?(I(),M("div",MP,Me(e.message),1)):_e("",!0)])]))}}),If=Ne(OP,[["__scopeId","data-v-8c972dbe"]]),NP={key:0,class:"message"},RP="A component that displays a message in various styles, including success, error, warning, and informational.",LP={writer:{name:"Message",description:RP,category:"Content",fields:{message:{name:"Message",type:q.Text,desc:"Prefix with '+' for a success message, with '-' for error, '!' for warning, '%' for loading. No prefix for info. Leave empty to hide."},successColor:{name:"Success",default:St.Green3,type:q.Color,category:We.Style},errorColor:{name:"Error",default:St.Orange2,type:q.Color,category:We.Style},warningColor:{name:"Warning",default:"#FFE999",type:q.Color,category:We.Style},infoColor:{name:"Info",default:St.Blue2,type:q.Color,category:We.Style},loadingColor:{name:"Loading",default:St.Blue2,type:q.Color,category:We.Style},primaryTextColor:Zt,cssClasses:at},previewField:"name"}},S_=Ie({...LP,__name:"CoreMessage",setup(e){const t=ee(re.componentId),n=ee(re.evaluatedFields),r=ee(re.isBeingEdited),o=W(()=>{const i=n.message.value;if(!i)return"neutral";const l=i.charAt(0);return l=="+"?"success":l=="-"?"error":l=="!"?"warning":l=="%"?"loading":"info"}),a=W(()=>{const i=n.message.value;if(!i)return;const l=i.charAt(0);return l=="+"||l=="-"||l=="!"||l=="%"?i.substring(1).trim():i}),s=W(()=>({"--messageActiveSeverityColor":{error:n.errorColor.value,success:n.successColor.value,warning:n.warningColor.value,info:n.infoColor.value,loading:n.loadingColor.value}[o.value]}));return(i,l)=>a.value||x(r)?(I(),M("div",{key:0,class:ct(["CoreMessage",o.value]),style:$t(s.value)},[a.value?(I(),M("p",NP,[o.value=="loading"?(I(),Ve($_,{key:0,class:"loadingSymbol"})):_e("",!0),D("span",null,Me(a.value),1)])):(I(),Ve(If,{key:1,"component-id":x(t)},null,8,["component-id"]))],6)):_e("",!0)}}),mm=e=>{e.writer&&(e.writer.docs=`When working with operations that can succeed or fail, _Message_ can be useful. You can reserve a state element to be used for the outcome of the operation; empty messages aren't shown, so you can initialise it empty.
Then, assign a message when the operation is completed.

\`\`\`python
state["msg"] = ""

if is_ok:
  state["msg"] = "+It worked!"
else:
  state["msg"] = "-It failed"
\`\`\``)};typeof mm=="function"&&mm(S_);const DP=Ne(S_,[["__scopeId","data-v-5eb22d34"]]),BP={key:0,class:"name"},FP={key:1,class:"description"},jP={class:"value"},VP={key:2,class:"note"},UP="A component that prominently displays a metric value and associated information.",HP={writer:{name:"Metric",description:UP,category:"Content",fields:{name:{name:"Name",init:"Metric",type:q.Text},metricValue:{name:"Value",default:"0",type:q.Text,desc:"The main value to be displayed. It's not limited to numbers."},description:{name:"Description",type:q.Text},note:{name:"Note",init:"+Pass",type:q.Text,desc:"Prefix with '+' for a positive message, with '-' for a negative message."},primaryTextColor:Zt,secondaryTextColor:Zn,positiveColor:{name:"Positive",default:St.Green3,type:q.Color,category:We.Style},neutralColor:{name:"Neutral",default:"var(--separatorColor)",type:q.Color,category:We.Style},negativeColor:{name:"Negative",default:St.Orange2,type:q.Color,category:We.Style},cssClasses:at},previewField:"name"}},zP=Ie({...HP,__name:"CoreMetric",setup(e){const t=ee(re.evaluatedFields),n=W(()=>{const a=t.note.value;if(!a)return"neutral";const s=a.charAt(0);return s=="+"?"positive":s=="-"?"negative":"neutral"}),r=W(()=>{const a=t.note.value;if(!a)return;const s=a.charAt(0);return s=="+"||s=="-"?a.substring(1):a}),o=W(()=>({"--messageActiveSentimentColor":{positive:t.positiveColor.value,neutral:t.neutralColor.value,negative:t.negativeColor.value}[n.value]}));return(a,s)=>(I(),M("div",{class:"CoreMetric",style:$t(o.value)},[x(t).name.value?(I(),M("div",BP,Me(x(t).name.value),1)):_e("",!0),x(t).description.value?(I(),M("div",FP,Me(x(t).description.value),1)):_e("",!0),D("h2",jP,Me(x(t).metricValue.value),1),r.value?(I(),M("div",VP,Me(r.value),1)):_e("",!0)],4))}}),KP=Ne(zP,[["__scopeId","data-v-bc5826e1"]]),WP="A component that displays Plotly graphs.",qP={data:[{x:["a","b","c"],y:[22,25,29],type:"bar"}]},GP={writer:{name:"Plotly Graph",description:WP,category:"Content",fields:{spec:{name:"Graph specification",default:JSON.stringify(qP,null,2),desc:"Plotly graph specification. Pass it using state, e.g. @{fig}, or paste a JSON specification.",type:q.Object},cssClasses:at},events:{"plotly-click":{desc:"Sends a list with the clicked points.",eventPayloadExample:{curveNumber:0,pointNumber:2,x:"c",y:29,label:"c",xaxis:{anchor:"y"},yaxis:{anchor:"x"}}},"plotly-selected":{desc:"Sends a list with the selected points."},"plotly-deselect":{desc:"Triggered when points are deselected."}}}},I_=Ie({...GP,__name:"CorePlotlyGraph",setup(e){const t=st("rootEl"),n=st("chartTargetEl"),r=ee(re.evaluatedFields),o=W(()=>r.spec.value),a={paper_bgcolor:St.White,plot_bgcolor:St.Gray1,colorway:[St.Blue4,St.Blue4,St.Orange4,St.Green5],font:{family:"Poppins, sans-serif",size:12,color:St.Black},hoverlabel:{color:St.White,bgcolor:St.Black}},s=async()=>{var v,y,g;if(!o.value||!n.value)return;const d=await tn(()=>import("./plotly.min-Cg3wH8_M.js").then(w=>w.p),[],import.meta.url);if(!t.value||t.value.clientHeight==0)return;const h={...o.value,layout:{...a,...(v=o.value)==null?void 0:v.layout}};d.newPlot(n.value,h),l(),(g=(y=o.value)==null?void 0:y.layout)!=null&&g.autosize&&i()};function i(){const d=t.value.parentElement;d!=null&&d.clientHeight&&(t.value.style.height="100%",n.value.style.height="100%")}function l(){n.value.on("plotly_click",u("plotly-click")),n.value.on("plotly_selected",u("plotly-selected")),n.value.on("plotly_deselect",u("plotly-deselect"))}function c(d){var h,v;return{curveNumber:d.curveNumber,pointNumber:d.pointNumber,pointNumbers:d.pointNumbers,x:d.x,y:d.y,z:d.z,label:d.label,lat:d.lat,lon:d.lon,xaxis:{anchor:(h=d.xaxis)==null?void 0:h.anchor},yaxis:{anchor:(v=d.yaxis)==null?void 0:v.anchor}}}function u(d){return h=>{var y;const v=new CustomEvent(d,{detail:{payload:(y=h==null?void 0:h.points)==null?void 0:y.map(g=>c(g))}});t.value.dispatchEvent(v)}}return Ge(o,d=>{d&&s()}),bn(async()=>{await s(),t.value&&new ResizeObserver(s).observe(t.value,{box:"border-box"})}),(d,h)=>(I(),M("div",{ref_key:"rootEl",ref:t,class:"CorePlotlyGraph"},[D("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512),h[0]||(h[0]=D("div",{class:"mask"},null,-1))],512))}}),vm=e=>{e.writer&&(e.writer.docs=`You can listen to events triggered by Plotly.js and add interactivity to your charts.
For example, implement cross-filtering.`)};typeof vm=="function"&&vm(I_);const JP=Ne(I_,[["__scopeId","data-v-3de9c6e5"]]),YP=`
def click_handler(state):

	# Increment counter when the text is clicked

	state["counter"] += 1`,XP="A component to display plain text or formatted text using Markdown syntax.",QP={writer:{name:"Text",description:XP,category:"Content",fields:{text:{name:"Text",init:"Text",desc:"Add text directly, or reference state elements with @{my_text}.",type:q.Text,control:Zl.Textarea},useMarkdown:{...Pt,name:"Use Markdown",desc:"The Markdown output will be sanitised; unsafe elements will be removed.",default:"no"},alignment:{name:"Alignment",default:"left",type:q.Text,options:{left:"Left",center:"Center",right:"Right"},category:We.Style},primaryTextColor:Zt,cssClasses:at},events:{"wf-click":{desc:"Capture single clicks.",stub:YP.trim()}},previewField:"text"}},ZP=Ie({...QP,__name:"CoreText",setup(e){const t=st("rootEl"),n=ee(re.evaluatedFields),r=ee(re.componentId),o=ee(re.core),a=ee(re.isBeingEdited),s=W(()=>!n.text.value),i=W(()=>!s.value||a.value),l=W(()=>{var v;return{cursor:typeof((v=o.getComponentById(r).handlers)==null?void 0:v["wf-click"])<"u"?"pointer":"unset"}}),c=W(()=>({"text-align":n.alignment.value}));function u(d){const h=pi(d);t.value.dispatchEvent(h)}return(d,h)=>i.value?(I(),M("div",{key:0,ref_key:"rootEl",ref:t,class:"CoreText",style:$t(l.value),onClick:u},[s.value?(I(),Ve(If,{key:0,"component-id":x(r)},null,8,["component-id"])):(I(),M(ze,{key:1},[x(n).useMarkdown.value?(I(),Ve(ty,{key:0,"raw-text":x(n).text.value,style:$t(c.value)},null,8,["raw-text","style"])):(I(),M("p",{key:1,class:"plainText",style:$t(c.value)},Me(x(n).text.value),5))],64))],4)):_e("",!0)}}),eM=Ne(ZP,[["__scopeId","data-v-d4e9274e"]]),E_="A component that displays Vega-Lite/Altair charts.",tM={$schema:"https://vega.github.io/schema/vega-lite/v5.json",description:E_,data:{values:[{a:"A",b:100},{a:"B",b:200},{a:"C",b:150},{a:"D",b:300}]},mark:"bar",encoding:{x:{field:"a",type:"nominal"},y:{field:"b",type:"quantitative"}}},nM={writer:{name:"Vega Lite Chart",description:E_,category:"Content",fields:{spec:{name:"Chart specification",default:JSON.stringify(tM,null,2),desc:"Vega-Lite chart specification. Pass a Vega Altair chart using state or paste a JSON specification.",type:q.Object},cssClasses:at}}},k_=Ie({...nM,__name:"CoreVegaLiteChart",setup(e){const t=st("rootEl"),n=st("chartTargetEl"),r=ee(re.evaluatedFields),o=async()=>{if(!r.spec.value||!n.value)return;const{default:a}=await tn(()=>import("./vega-embed.module-SNP5iNdJ.js"),[],import.meta.url);await a(n.value,r.spec.value)};return Ge(()=>r.spec.value,a=>{a&&o()}),bn(()=>{o(),new ResizeObserver(o).observe(t.value,{box:"border-box"})}),(a,s)=>(I(),M("div",{ref_key:"rootEl",ref:t,class:"CoreVegaLiteChart"},[D("div",{ref_key:"chartTargetEl",ref:n,class:"target"},null,512)],512))}}),gm=e=>{e.writer&&(e.writer.docs=`Generate a chart using Altair and pass it via state; it'll be converted to Vega-Lite specification.

\`state["my_chart"] = chart\`

Afterwards, you can reference the chart in the specification using the syntax \`@{my_chart}\`.

Alternatively, you can work with Vega-Lite directly.`)};typeof gm=="function"&&gm(k_);const rM=Ne(k_,[["__scopeId","data-v-c7c1318d"]]),oM={class:"CoreVideoPlayer"},aM=["src","controls","autoplay","loop","muted"],sM="A video player component that can play various video formats.",iM={writer:{name:"Video Player",description:sM,category:"Content",fields:{src:{name:"Source",desc:"The URL of the video file. Alternatively, you can pass a file via state.",default:"",type:q.Text,validator:v_},controls:{...Pt,name:"Controls",desc:"Display video player controls.",default:"yes"},autoplay:{...Pt,name:"Autoplay",desc:"Autoplay the video when the component is loaded.",default:"no"},loop:{...Pt,name:"Loop",desc:"Loop the video when it reaches the end.",default:"no"},muted:{...Pt,name:"Muted",desc:"Mute the video by default.",default:"no"},cssClasses:at}}},T_=Ie({...iM,__name:"CoreVideoPlayer",setup(e){const t=ee(re.evaluatedFields);return(n,r)=>(I(),M("div",oM,[D("video",{src:x(t).src.value,controls:x(t).controls.value,autoplay:x(t).autoplay.value,loop:x(t).loop.value,muted:x(t).muted.value},null,8,aM),r[0]||(r[0]=D("div",{class:"mask"},null,-1))]))}}),ym=e=>{e.writer&&(e.writer.docs=`Use your app's static folder to serve videos directly. For example, \`static/my_video.mp4\`.

Alternatively, you can pack bytes or files in state:

\`state["vid_b"] = wf.pack_bytes(vid_bytes, "video/mp4")\`

\`state["vid_f"] = wf.pack_file(vid_file, "video/mp4")\`

Afterwards, you can reference the video using the syntax \`@{vid_f}\`.`)};typeof ym=="function"&&ym(T_);const lM=Ne(T_,[["__scopeId","data-v-80b03e78"]]),cM={class:"CoreLink"},uM=["href","target","rel"],dM={writer:{name:"Link",description:"A component to create a hyperlink.",category:"Content",fields:{url:{name:"URL",type:q.Text,default:"https://writer.com",desc:"Specify a URL or choose a page. Keep in mind that you can only link to pages for which a key has been specified.",options:e=>Object.fromEntries(e.getComponents("root",{sortedByPosition:!0}).map(t=>t.content.key).filter(t=>!!t).map(t=>[`#${t}`,`Page with key: ${t}`]))},target:{name:"Target",type:q.Text,options:{_self:"Self",_blank:"Blank",_parent:"Parent",_top:"Top"},desc:"Specifies where to open the linked document.",default:"_self"},rel:{name:"Rel",type:q.Text,desc:"Specifies the relationship between the current document and the linked document."},text:{name:"Text",default:"",type:q.Text,desc:"The text to display in the link."},primaryTextColor:Zt,cssClasses:at}}},fM=Ie({...dM,__name:"CoreLink",setup(e){const t=ee(re.evaluatedFields),n=W(()=>t.text.value||t.url.value);return(r,o)=>(I(),M("div",cM,[D("a",{href:x(t).url.value,target:x(t).target.value,rel:x(t).rel.value},Me(n.value),9,uM)]))}}),pM=Ne(fM,[["__scopeId","data-v-f7f2507b"]]),hM={},mM={width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vM(e,t){return I(),M("svg",mM,t[0]||(t[0]=[D("path",{d:"M14.0712 4.50295C14.2882 4.72002 14.2882 5.07197 14.0712 5.28905L10.5337 8.8265C10.3166 9.04357 9.96468 9.04357 9.7476 8.8265C9.53052 8.60942 9.53052 8.25747 9.7476 8.0404L12.892 4.896L9.7476 1.7516C9.53052 1.53452 9.53052 1.18257 9.7476 0.965495C9.96467 0.74842 10.3166 0.74842 10.5337 0.965495L14.0712 4.50295ZM13.6781 5.45185L3.67268 5.45185L3.67268 4.34014L13.6781 4.34014L13.6781 5.45185ZM2.00511 7.11942L2.00511 8.23114L0.893394 8.23114L0.893394 7.11942L2.00511 7.11942ZM3.67268 9.89871L5.52553 9.89871L5.52553 11.0104L3.67268 11.0104L3.67268 9.89871ZM2.00511 8.23114C2.00511 9.15211 2.7517 9.89871 3.67268 9.89871L3.67268 11.0104C2.13772 11.0104 0.893394 9.76609 0.893394 8.23114L2.00511 8.23114ZM3.67268 5.45185C2.7517 5.45185 2.00511 6.19845 2.00511 7.11942L0.893394 7.11942C0.893394 5.58447 2.13772 4.34014 3.67268 4.34014L3.67268 5.45185Z",fill:"currentColor"},null,-1)]))}const gM=Ne(hM,[["render",vM]]),yM={class:"CoreChatbotAvatar"},_M=Ie({__name:"CoreChatbotAvatar",props:{initials:{type:String,required:!0}},setup(e){return(t,n)=>(I(),M("div",yM,Me(e.initials),1))}}),bM=Ne(_M,[["__scopeId","data-v-ce5bb453"]]),wM=["aria-busy"],AM={key:1,class:"CoreChatbotMessage__content__text"},CM={key:2,class:"CoreChatbotMessage__content__actions"},$M=["onClick"],SM={key:0,class:"subheading"},IM={class:"name"},EM={key:1,class:"desc"},kM=Ie({__name:"CoreChatbotMessage",props:{initials:{type:String,required:!0},useMarkdown:{type:Boolean,required:!1},message:{type:Object,required:!1,default:void 0},assistantRoleColor:{type:String,required:!1,default:""},isLoading:{type:Boolean,required:!1}},emits:{actionClick:e=>typeof e=="object"&&e!==null},setup(e){const t=za(()=>tn(()=>import("./BaseMarkdown-BrCnn8vt.js"),[],import.meta.url)),n=za(()=>tn(()=>import("./WdsLoaderDots-B3jiV24t.js"),[],import.meta.url)),r=e,o=W(()=>{var c;return((c=r.message)==null?void 0:c.actions)??[]}),a=W(()=>r.isLoading&&!i.value),s=W(()=>{var c;return r.isLoading?"assistant":((c=r.message)==null?void 0:c.role)??""}),i=W(()=>{var c;return((c=r.message)==null?void 0:c.content.trim())??""}),l=W(()=>{switch(s.value){case"user":return"var(--userRoleColor)";case"assistant":return r.assistantRoleColor||"linear-gradient(264deg, #f5ebff 0.71%, #eef1ff 100%)";default:return""}});return(c,u)=>(I(),M("div",{class:"CoreChatbotMessage","aria-busy":e.isLoading},[He(bM,{initials:e.initials},null,8,["initials"]),D("div",{class:"CoreChatbotMessage__content",style:$t({background:l.value})},[a.value?(I(),Ve(x(n),{key:0})):(I(),M("div",AM,[e.useMarkdown?(I(),Ve(x(t),{key:0,"raw-text":i.value},null,8,["raw-text"])):(I(),M(ze,{key:1},[Bt(Me(i.value),1)],64))])),o.value.length?(I(),M("div",CM,[(I(!0),M(ze,null,xt(o.value,(d,h)=>(I(),M("button",{key:h,class:"action",onClick:v=>c.$emit("actionClick",d)},[d.subheading?(I(),M("div",SM,Me(d.subheading),1)):_e("",!0),D("h3",IM,Me(d.name),1),d.desc?(I(),M("div",EM,Me(d.desc),1)):_e("",!0)],8,$M))),128))])):_e("",!0)],4)],8,wM))}}),_m=Ne(kM,[["__scopeId","data-v-502b71b2"]]),TM=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],xM=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],PM=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],MM=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bm=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function wm(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,...t};const n=t.bits?t.binary?MM:PM:t.binary?xM:TM,r=t.space?" ":"";if(t.signed&&e===0)return` 0${r}${n[0]}`;const o=e<0,a=o?"-":t.signed?"+":"";o&&(e=-e);let s;if(t.minimumFractionDigits!==void 0&&(s={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(s={maximumFractionDigits:t.maximumFractionDigits,...s}),e<1){const u=bm(e,t.locale,s);return a+u+r+n[0]}const i=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**i,s||(e=e.toPrecision(3));const l=bm(Number(e),t.locale,s),c=n[i];return a+l+r+c}const OM={class:"filesArea"},NM={key:1,class:"list"},RM=["title"],LM={class:"size"},DM={class:"filesButtons"},BM={key:1,class:"sizeExceededMessage"},FM={class:"inputArea"},jM={class:"inputButtons"},du=200*1024*1024,VM="A chatbot component to build human-to-AI interactions.",UM=`[
  {
  "role": "assistant",
  "content": "How can I help you?"
  },
  {
  "role": "user",
  "content": "I'm building a Chatbot"
  }
]`,HM=`
def handle_message_simple(payload, state):

	# payload contains a dict in the form { "role": "user", "message": "hello"}

	state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "Hello human" if payload == "Hello" else "I don't understand"
    }]

    # Handle streaming by appending to the last message

    import time
    for i in range(10):
        conv = state["conversation"]
        conv[-1]["content"] += f" {i}"
        state["conversation"] = conv
        time.sleep(0.5)
`.trim(),zM=`
def handle_action_simple(payload, state):

    # payload contains the "data" property of the action

    if payload == "change_title":
        state["app_background_color"] = "red"

# Make an action available when adding a message

def handle_message_with_action(payload, state):
    state["conversation"] += [payload]
    state["conversation"] += [{
        "role": "assistant",
        "content": "I don't know, but check this out.",
        "actions": [{
            "subheading": "Resource",
            "name": "Surprise",
            "desc": "Click to be surprised",
            "data": "change_title"
        }]
    }]
`.trim(),KM=`
def handle_file_upload(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
        name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)
`.trim(),WM={writer:{name:"Chatbot",description:VM,category:"Content",fields:{conversation:{name:"Conversation",init:UM,desc:"An array with messages or a writer.ai.Conversation object.",type:q.Object,validator:E2},assistantInitials:{name:"Assistant initials",default:"AI",type:q.Text},userInitials:{name:"User initials",default:"YOU",type:q.Text},useMarkdown:{...Pt,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},enableFileUpload:{name:"Enable file upload",default:"no",type:q.Text,options:{single:"Single file",multiple:"Multiple files",no:"No"}},placeholder:{name:"Placeholder",default:"What do you need?",type:q.Text},assistantRoleColor:{name:"Assistant role",type:q.Color,category:We.Style,applyStyleVariable:!0},userRoleColor:{name:"User role",default:St.Gray1,type:q.Color,category:We.Style,applyStyleVariable:!0},avatarBackgroundColor:{name:"Avatar",default:St.Gray6,type:q.Color,category:We.Style,applyStyleVariable:!0},avatarTextColor:{name:"Avatar text",default:St.White,type:q.Color,category:We.Style,applyStyleVariable:!0},accentColor:mn,containerBackgroundColor:fo,primaryTextColor:Zt,secondaryTextColor:Zn,separatorColor:sn,buttonColor:{...Hr,default:St.Black},buttonTextColor:{...zr,default:St.White},cssClasses:at},events:{"wf-chatbot-message":{desc:"Triggered when the user sends a message.",stub:HM,eventPayloadExample:{role:"user",content:"I'm building a Chatbot"}},"wf-chatbot-action-click":{desc:"Handle clicks on actions.",stub:zM},"wf-file-change":{desc:"Triggered when files are uploaded",stub:KM}}}},x_=Ie({...WM,__name:"CoreChatbot",setup(e){const t=st("rootEl"),n=st("messageAreaEl"),r=st("messagesEl"),o=Pe(void 0),a=ee(re.evaluatedFields),s=Pn([]),i=Pe(!1);let l;const c=W(()=>{var p;return((p=a.conversation)==null?void 0:p.value)??[]}),u=Pe(""),d=W(()=>{let p=0;return Array.from(s.value).forEach(_=>{p+=_.size}),p>=du}),h=W(()=>o.value===void 0?!1:o.value>=c.value.length);function v(){if(o.value)return;o.value=c.value.length+1;const p=new CustomEvent("wf-chatbot-message",{detail:{payload:{role:"user",content:u.value},callback:()=>{o.value=void 0}}});t.value.dispatchEvent(p),u.value=""}function y(p){const{data:_}=p,S=new CustomEvent("wf-chatbot-action-click",{detail:{payload:_}});t.value.dispatchEvent(S)}function g(){const p=document.createElement("input");p.type="file",a.enableFileUpload.value=="multiple"&&(p.multiple=!0),p.addEventListener("change",()=>{let _;a.enableFileUpload.value=="multiple"?_=[...s.value]:_=[],Array.from(p.files).forEach(S=>{_.push(S)}),s.value=_}),p.dispatchEvent(new MouseEvent("click"))}function w(p){const _=s.value.toSpliced(p,1);s.value=_}function A(){n.value.scrollTo({top:n.value.scrollHeight,left:0})}const C=async p=>{const _=new FileReader;return _.readAsDataURL(p),new Promise((S,R)=>{_.onload=()=>S(_.result),_.onerror=()=>R(_.error)})};async function b(){if(s.value.length==0||i.value)return;i.value=!0;const _=await(async()=>{let R=0;const Y=Promise.all(Array.from(s.value).map(async X=>(R+=X.size,{name:X.name,type:X.type,data:await C(X)})));if(R>du){alert("Size limit exceeded.");return}return Y})();if(!_){i.value=!1;return}const S=new CustomEvent("wf-file-change",{detail:{payload:_,callback:()=>{i.value=!1,s.value=[]}}});t.value.dispatchEvent(S)}return bn(()=>{l=new ResizeObserver(()=>{A()}),l.observe(r.value)}),lo(()=>{l.unobserve(r.value)}),(p,_)=>(I(),M("div",{ref_key:"rootEl",ref:t,class:"CoreChatbot"},[D("div",{ref_key:"messageAreaEl",ref:n,class:"messageArea"},[D("div",{ref_key:"messagesEl",ref:r,class:"messages"},[(I(!0),M(ze,null,xt(c.value,(S,R)=>(I(),Ve(_m,{key:R,message:S,"use-markdown":x(a).useMarkdown.value,"assistant-role-color":x(a).assistantRoleColor.value,initials:S.role==="assistant"?x(a).assistantInitials.value:x(a).userInitials.value,onActionClick:_[0]||(_[0]=Y=>y(Y))},null,8,["message","use-markdown","assistant-role-color","initials"]))),128)),h.value?(I(),Ve(_m,{key:0,"is-loading":"",initials:x(a).assistantInitials.value},null,8,["initials"])):_e("",!0)],512)],512),s.value.length>0?(I(),M(ze,{key:0},[D("div",OM,[i.value?(I(),M(ze,{key:0},[Bt(" Uploading... ")],64)):_e("",!0),i.value?_e("",!0):(I(),M("div",NM,[(I(!0),M(ze,null,xt(s.value,(S,R)=>(I(),M("div",{key:R,class:"file"},[D("div",null,[D("div",{class:"name",title:S.name},Me(S.name),9,RM),D("div",LM,Me(x(wm)(S.size)),1)]),He(wr,{onClick:Y=>w(R)},{default:et(()=>_[2]||(_[2]=[D("i",{class:"material-symbols-outlined"}," delete ",-1)])),_:2},1032,["onClick"])]))),128))]))]),D("div",DM,[!d.value&&!i.value?(I(),Ve(wr,{key:0,title:"Upload",onClick:b},{default:et(()=>_[3]||(_[3]=[D("i",{class:"material-symbols-outlined"},"upload",-1)])),_:1})):_e("",!0),d.value?(I(),M("div",BM,[_[4]||(_[4]=D("i",{class:"material-symbols-outlined"},"warning",-1)),Bt(" Size limit of "+Me(x(wm)(du))+" exceeded. ",1)])):_e("",!0)])],64)):_e("",!0),D("div",FM,[He(Sd,{modelValue:u.value,"onUpdate:modelValue":_[1]||(_[1]=S=>u.value=S),placeholder:x(a).placeholder.value,onKeydown:Do($r(v,["prevent"]),["enter"])},null,8,["modelValue","placeholder","onKeydown"])]),D("div",jM,[He(wr,{class:"send action",title:"Send message",onClick:v},{default:et(()=>[He(gM)]),_:1}),x(a).enableFileUpload.value!="no"?(I(),Ve(wr,{key:0,class:"action",title:"Attach files",onClick:g},{default:et(()=>_[5]||(_[5]=[D("i",{class:"material-symbols-outlined"},"attach_file",-1)])),_:1})):_e("",!0)])],512))}}),Am=e=>{e.writer&&(e.writer.docs="Connect it to an LLM by handling the `wf-chatbot-message` event, which is triggered every time the user sends a message.\n\nYou can add `actions` to messages, which are buttons that trigger the `wf-chatbot-action-click`.\n\nSee the stubs for more details.")};typeof Am=="function"&&Am(x_);const qM=Ne(x_,[["__scopeId","data-v-fcbc1aa1"]]);var P_={exports:{}};/**
 * chroma.js - JavaScript library for color conversions
 *
 * Copyright (c) 2011-2019, Gregor Aisch
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name Gregor Aisch may not be used to endorse or promote products
 * derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * -------------------------------------------------------
 *
 * chroma.js includes colors from colorbrewer2.org, which are released under
 * the following license:
 *
 * Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
 * and The Pennsylvania State University.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific
 * language governing permissions and limitations under the License.
 *
 * ------------------------------------------------------
 *
 * Named colors are taken from X11 Color Names.
 * http://www.w3.org/TR/css3-color/#svg-color
 *
 * @preserve
 */(function(e,t){(function(n,r){e.exports=r()})(TI,function(){for(var n=function(f,m,$){return m===void 0&&(m=0),$===void 0&&($=1),f<m?m:f>$?$:f},r=n,o=function(f){f._clipped=!1,f._unclipped=f.slice(0);for(var m=0;m<=3;m++)m<3?((f[m]<0||f[m]>255)&&(f._clipped=!0),f[m]=r(f[m],0,255)):m===3&&(f[m]=r(f[m],0,1));return f},a={},s=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];s<i.length;s+=1){var l=i[s];a["[object "+l+"]"]=l.toLowerCase()}var c=function(f){return a[Object.prototype.toString.call(f)]||"object"},u=c,d=function(f,m){return m===void 0&&(m=null),f.length>=3?Array.prototype.slice.call(f):u(f[0])=="object"&&m?m.split("").filter(function($){return f[0][$]!==void 0}).map(function($){return f[0][$]}):f[0]},h=c,v=function(f){if(f.length<2)return null;var m=f.length-1;return h(f[m])=="string"?f[m].toLowerCase():null},y=Math.PI,g={clip_rgb:o,limit:n,type:c,unpack:d,last:v,PI:y,TWOPI:y*2,PITHIRD:y/3,DEG2RAD:y/180,RAD2DEG:180/y},w={format:{},autodetect:[]},A=g.last,C=g.clip_rgb,b=g.type,p=w,_=function(){for(var m=[],$=arguments.length;$--;)m[$]=arguments[$];var T=this;if(b(m[0])==="object"&&m[0].constructor&&m[0].constructor===this.constructor)return m[0];var B=A(m),z=!1;if(!B){z=!0,p.sorted||(p.autodetect=p.autodetect.sort(function(ke,Ue){return Ue.p-ke.p}),p.sorted=!0);for(var N=0,ne=p.autodetect;N<ne.length;N+=1){var ae=ne[N];if(B=ae.test.apply(ae,m),B)break}}if(p.format[B]){var me=p.format[B].apply(null,z?m:m.slice(0,-1));T._rgb=C(me)}else throw new Error("unknown format: "+m);T._rgb.length===3&&T._rgb.push(1)};_.prototype.toString=function(){return b(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var S=_,R=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(R.Color,[null].concat(f)))};R.Color=S,R.version="2.4.2";var Y=R,X=g.unpack,te=Math.max,$e=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=X(f,"rgb"),T=$[0],B=$[1],z=$[2];T=T/255,B=B/255,z=z/255;var N=1-te(T,te(B,z)),ne=N<1?1/(1-N):0,ae=(1-T-N)*ne,me=(1-B-N)*ne,ke=(1-z-N)*ne;return[ae,me,ke,N]},pe=$e,we=g.unpack,ye=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];f=we(f,"cmyk");var $=f[0],T=f[1],B=f[2],z=f[3],N=f.length>4?f[4]:1;return z===1?[0,0,0,N]:[$>=1?0:255*(1-$)*(1-z),T>=1?0:255*(1-T)*(1-z),B>=1?0:255*(1-B)*(1-z),N]},qe=ye,Te=Y,Ce=S,be=w,fe=g.unpack,de=g.type,L=pe;Ce.prototype.cmyk=function(){return L(this._rgb)},Te.cmyk=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(Ce,[null].concat(f,["cmyk"])))},be.format.cmyk=qe,be.autodetect.push({p:2,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f=fe(f,"cmyk"),de(f)==="array"&&f.length===4)return"cmyk"}});var le=g.unpack,j=g.last,E=function(f){return Math.round(f*100)/100},O=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=le(f,"hsla"),T=j(f)||"lsa";return $[0]=E($[0]||0),$[1]=E($[1]*100)+"%",$[2]=E($[2]*100)+"%",T==="hsla"||$.length>3&&$[3]<1?($[3]=$.length>3?$[3]:1,T="hsla"):$.length=3,T+"("+$.join(",")+")"},ue=O,Be=g.unpack,U=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];f=Be(f,"rgba");var $=f[0],T=f[1],B=f[2];$/=255,T/=255,B/=255;var z=Math.min($,T,B),N=Math.max($,T,B),ne=(N+z)/2,ae,me;return N===z?(ae=0,me=Number.NaN):ae=ne<.5?(N-z)/(N+z):(N-z)/(2-N-z),$==N?me=(T-B)/(N-z):T==N?me=2+(B-$)/(N-z):B==N&&(me=4+($-T)/(N-z)),me*=60,me<0&&(me+=360),f.length>3&&f[3]!==void 0?[me,ae,ne,f[3]]:[me,ae,ne]},Z=U,Q=g.unpack,se=g.last,Se=ue,k=Z,P=Math.round,ie=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=Q(f,"rgba"),T=se(f)||"rgb";return T.substr(0,3)=="hsl"?Se(k($),T):($[0]=P($[0]),$[1]=P($[1]),$[2]=P($[2]),(T==="rgba"||$.length>3&&$[3]<1)&&($[3]=$.length>3?$[3]:1,T="rgba"),T+"("+$.slice(0,T==="rgb"?3:4).join(",")+")")},ve=ie,F=g.unpack,K=Math.round,oe=function(){for(var f,m=[],$=arguments.length;$--;)m[$]=arguments[$];m=F(m,"hsl");var T=m[0],B=m[1],z=m[2],N,ne,ae;if(B===0)N=ne=ae=z*255;else{var me=[0,0,0],ke=[0,0,0],Ue=z<.5?z*(1+B):z+B-z*B,Oe=2*z-Ue,Xe=T/360;me[0]=Xe+1/3,me[1]=Xe,me[2]=Xe-1/3;for(var Je=0;Je<3;Je++)me[Je]<0&&(me[Je]+=1),me[Je]>1&&(me[Je]-=1),6*me[Je]<1?ke[Je]=Oe+(Ue-Oe)*6*me[Je]:2*me[Je]<1?ke[Je]=Ue:3*me[Je]<2?ke[Je]=Oe+(Ue-Oe)*(2/3-me[Je])*6:ke[Je]=Oe;f=[K(ke[0]*255),K(ke[1]*255),K(ke[2]*255)],N=f[0],ne=f[1],ae=f[2]}return m.length>3?[N,ne,ae,m[3]]:[N,ne,ae,1]},V=oe,H=V,G=w,he=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ge=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,xe=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Fe=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ot=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,pt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,dt=Math.round,Xt=function(f){f=f.toLowerCase().trim();var m;if(G.format.named)try{return G.format.named(f)}catch{}if(m=f.match(he)){for(var $=m.slice(1,4),T=0;T<3;T++)$[T]=+$[T];return $[3]=1,$}if(m=f.match(ge)){for(var B=m.slice(1,5),z=0;z<4;z++)B[z]=+B[z];return B}if(m=f.match(xe)){for(var N=m.slice(1,4),ne=0;ne<3;ne++)N[ne]=dt(N[ne]*2.55);return N[3]=1,N}if(m=f.match(Fe)){for(var ae=m.slice(1,5),me=0;me<3;me++)ae[me]=dt(ae[me]*2.55);return ae[3]=+ae[3],ae}if(m=f.match(ot)){var ke=m.slice(1,4);ke[1]*=.01,ke[2]*=.01;var Ue=H(ke);return Ue[3]=1,Ue}if(m=f.match(pt)){var Oe=m.slice(1,4);Oe[1]*=.01,Oe[2]*=.01;var Xe=H(Oe);return Xe[3]=+m[4],Xe}};Xt.test=function(f){return he.test(f)||ge.test(f)||xe.test(f)||Fe.test(f)||ot.test(f)||pt.test(f)};var Nt=Xt,en=Y,ce=S,Ee=w,Le=g.type,Ae=ve,je=Nt;ce.prototype.css=function(f){return Ae(this._rgb,f)},en.css=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(ce,[null].concat(f,["css"])))},Ee.format.css=je,Ee.autodetect.push({p:5,test:function(f){for(var m=[],$=arguments.length-1;$-- >0;)m[$]=arguments[$+1];if(!m.length&&Le(f)==="string"&&je.test(f))return"css"}});var rt=S,Ye=Y,wt=w,ht=g.unpack;wt.format.gl=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=ht(f,"rgba");return $[0]*=255,$[1]*=255,$[2]*=255,$},Ye.gl=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(rt,[null].concat(f,["gl"])))},rt.prototype.gl=function(){var f=this._rgb;return[f[0]/255,f[1]/255,f[2]/255,f[3]]};var Ft=g.unpack,zt=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=Ft(f,"rgb"),T=$[0],B=$[1],z=$[2],N=Math.min(T,B,z),ne=Math.max(T,B,z),ae=ne-N,me=ae*100/255,ke=N/(255-ae)*100,Ue;return ae===0?Ue=Number.NaN:(T===ne&&(Ue=(B-z)/ae),B===ne&&(Ue=2+(z-T)/ae),z===ne&&(Ue=4+(T-B)/ae),Ue*=60,Ue<0&&(Ue+=360)),[Ue,me,ke]},Kt=zt,Wt=g.unpack,wn=Math.floor,po=function(){for(var f,m,$,T,B,z,N=[],ne=arguments.length;ne--;)N[ne]=arguments[ne];N=Wt(N,"hcg");var ae=N[0],me=N[1],ke=N[2],Ue,Oe,Xe;ke=ke*255;var Je=me*255;if(me===0)Ue=Oe=Xe=ke;else{ae===360&&(ae=0),ae>360&&(ae-=360),ae<0&&(ae+=360),ae/=60;var mt=wn(ae),At=ae-mt,kt=ke*(1-me),Mt=kt+Je*(1-At),An=kt+Je*At,yn=kt+Je;switch(mt){case 0:f=[yn,An,kt],Ue=f[0],Oe=f[1],Xe=f[2];break;case 1:m=[Mt,yn,kt],Ue=m[0],Oe=m[1],Xe=m[2];break;case 2:$=[kt,yn,An],Ue=$[0],Oe=$[1],Xe=$[2];break;case 3:T=[kt,Mt,yn],Ue=T[0],Oe=T[1],Xe=T[2];break;case 4:B=[An,kt,yn],Ue=B[0],Oe=B[1],Xe=B[2];break;case 5:z=[yn,kt,Mt],Ue=z[0],Oe=z[1],Xe=z[2];break}}return[Ue,Oe,Xe,N.length>3?N[3]:1]},fa=po,ds=g.unpack,sr=g.type,ho=Y,Kr=S,fs=w,pc=Kt;Kr.prototype.hcg=function(){return pc(this._rgb)},ho.hcg=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(Kr,[null].concat(f,["hcg"])))},fs.format.hcg=fa,fs.autodetect.push({p:1,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f=ds(f,"hcg"),sr(f)==="array"&&f.length===3)return"hcg"}});var mi=g.unpack,hr=g.last,Ho=Math.round,vi=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=mi(f,"rgba"),T=$[0],B=$[1],z=$[2],N=$[3],ne=hr(f)||"auto";N===void 0&&(N=1),ne==="auto"&&(ne=N<1?"rgba":"rgb"),T=Ho(T),B=Ho(B),z=Ho(z);var ae=T<<16|B<<8|z,me="000000"+ae.toString(16);me=me.substr(me.length-6);var ke="0"+Ho(N*255).toString(16);switch(ke=ke.substr(ke.length-2),ne.toLowerCase()){case"rgba":return"#"+me+ke;case"argb":return"#"+ke+me;default:return"#"+me}},ps=vi,gi=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,hc=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,tt=function(f){if(f.match(gi)){(f.length===4||f.length===7)&&(f=f.substr(1)),f.length===3&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]);var m=parseInt(f,16),$=m>>16,T=m>>8&255,B=m&255;return[$,T,B,1]}if(f.match(hc)){(f.length===5||f.length===9)&&(f=f.substr(1)),f.length===4&&(f=f.split(""),f=f[0]+f[0]+f[1]+f[1]+f[2]+f[2]+f[3]+f[3]);var z=parseInt(f,16),N=z>>24&255,ne=z>>16&255,ae=z>>8&255,me=Math.round((z&255)/255*100)/100;return[N,ne,ae,me]}throw new Error("unknown hex color: "+f)},J=tt,De=Y,Qe=S,jt=g.type,ln=w,vn=ps;Qe.prototype.hex=function(f){return vn(this._rgb,f)},De.hex=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(Qe,[null].concat(f,["hex"])))},ln.format.hex=J,ln.autodetect.push({p:4,test:function(f){for(var m=[],$=arguments.length-1;$-- >0;)m[$]=arguments[$+1];if(!m.length&&jt(f)==="string"&&[3,4,5,6,7,8,9].indexOf(f.length)>=0)return"hex"}});var kn=g.unpack,Mr=g.TWOPI,zo=Math.min,Tn=Math.sqrt,yi=Math.acos,_i=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=kn(f,"rgb"),T=$[0],B=$[1],z=$[2];T/=255,B/=255,z/=255;var N,ne=zo(T,B,z),ae=(T+B+z)/3,me=ae>0?1-ne/ae:0;return me===0?N=NaN:(N=(T-B+(T-z))/2,N/=Tn((T-B)*(T-B)+(T-z)*(B-z)),N=yi(N),z>B&&(N=Mr-N),N/=Mr),[N*360,me,ae]},eb=_i,tb=g.unpack,mc=g.limit,pa=g.TWOPI,vc=g.PITHIRD,ha=Math.cos,nb=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];f=tb(f,"hsi");var $=f[0],T=f[1],B=f[2],z,N,ne;return isNaN($)&&($=0),isNaN(T)&&(T=0),$>360&&($-=360),$<0&&($+=360),$/=360,$<1/3?(ne=(1-T)/3,z=(1+T*ha(pa*$)/ha(vc-pa*$))/3,N=1-(ne+z)):$<2/3?($-=1/3,z=(1-T)/3,N=(1+T*ha(pa*$)/ha(vc-pa*$))/3,ne=1-(z+N)):($-=2/3,N=(1-T)/3,ne=(1+T*ha(pa*$)/ha(vc-pa*$))/3,z=1-(N+ne)),z=mc(B*z*3),N=mc(B*N*3),ne=mc(B*ne*3),[z*255,N*255,ne*255,f.length>3?f[3]:1]},rb=nb,ob=g.unpack,ab=g.type,sb=Y,Rf=S,Lf=w,ib=eb;Rf.prototype.hsi=function(){return ib(this._rgb)},sb.hsi=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(Rf,[null].concat(f,["hsi"])))},Lf.format.hsi=rb,Lf.autodetect.push({p:2,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f=ob(f,"hsi"),ab(f)==="array"&&f.length===3)return"hsi"}});var lb=g.unpack,cb=g.type,ub=Y,Df=S,Bf=w,db=Z;Df.prototype.hsl=function(){return db(this._rgb)},ub.hsl=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(Df,[null].concat(f,["hsl"])))},Bf.format.hsl=V,Bf.autodetect.push({p:2,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f=lb(f,"hsl"),cb(f)==="array"&&f.length===3)return"hsl"}});var fb=g.unpack,pb=Math.min,hb=Math.max,mb=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];f=fb(f,"rgb");var $=f[0],T=f[1],B=f[2],z=pb($,T,B),N=hb($,T,B),ne=N-z,ae,me,ke;return ke=N/255,N===0?(ae=Number.NaN,me=0):(me=ne/N,$===N&&(ae=(T-B)/ne),T===N&&(ae=2+(B-$)/ne),B===N&&(ae=4+($-T)/ne),ae*=60,ae<0&&(ae+=360)),[ae,me,ke]},vb=mb,gb=g.unpack,yb=Math.floor,_b=function(){for(var f,m,$,T,B,z,N=[],ne=arguments.length;ne--;)N[ne]=arguments[ne];N=gb(N,"hsv");var ae=N[0],me=N[1],ke=N[2],Ue,Oe,Xe;if(ke*=255,me===0)Ue=Oe=Xe=ke;else{ae===360&&(ae=0),ae>360&&(ae-=360),ae<0&&(ae+=360),ae/=60;var Je=yb(ae),mt=ae-Je,At=ke*(1-me),kt=ke*(1-me*mt),Mt=ke*(1-me*(1-mt));switch(Je){case 0:f=[ke,Mt,At],Ue=f[0],Oe=f[1],Xe=f[2];break;case 1:m=[kt,ke,At],Ue=m[0],Oe=m[1],Xe=m[2];break;case 2:$=[At,ke,Mt],Ue=$[0],Oe=$[1],Xe=$[2];break;case 3:T=[At,kt,ke],Ue=T[0],Oe=T[1],Xe=T[2];break;case 4:B=[Mt,At,ke],Ue=B[0],Oe=B[1],Xe=B[2];break;case 5:z=[ke,At,kt],Ue=z[0],Oe=z[1],Xe=z[2];break}}return[Ue,Oe,Xe,N.length>3?N[3]:1]},bb=_b,wb=g.unpack,Ab=g.type,Cb=Y,Ff=S,jf=w,$b=vb;Ff.prototype.hsv=function(){return $b(this._rgb)},Cb.hsv=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(Ff,[null].concat(f,["hsv"])))},jf.format.hsv=bb,jf.autodetect.push({p:2,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f=wb(f,"hsv"),Ab(f)==="array"&&f.length===3)return"hsv"}});var bi={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},ma=bi,Sb=g.unpack,Vf=Math.pow,Ib=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=Sb(f,"rgb"),T=$[0],B=$[1],z=$[2],N=Eb(T,B,z),ne=N[0],ae=N[1],me=N[2],ke=116*ae-16;return[ke<0?0:ke,500*(ne-ae),200*(ae-me)]},gc=function(f){return(f/=255)<=.04045?f/12.92:Vf((f+.055)/1.055,2.4)},yc=function(f){return f>ma.t3?Vf(f,1/3):f/ma.t2+ma.t0},Eb=function(f,m,$){f=gc(f),m=gc(m),$=gc($);var T=yc((.4124564*f+.3575761*m+.1804375*$)/ma.Xn),B=yc((.2126729*f+.7151522*m+.072175*$)/ma.Yn),z=yc((.0193339*f+.119192*m+.9503041*$)/ma.Zn);return[T,B,z]},Uf=Ib,va=bi,kb=g.unpack,Tb=Math.pow,xb=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];f=kb(f,"lab");var $=f[0],T=f[1],B=f[2],z,N,ne,ae,me,ke;return N=($+16)/116,z=isNaN(T)?N:N+T/500,ne=isNaN(B)?N:N-B/200,N=va.Yn*bc(N),z=va.Xn*bc(z),ne=va.Zn*bc(ne),ae=_c(3.2404542*z-1.5371385*N-.4985314*ne),me=_c(-.969266*z+1.8760108*N+.041556*ne),ke=_c(.0556434*z-.2040259*N+1.0572252*ne),[ae,me,ke,f.length>3?f[3]:1]},_c=function(f){return 255*(f<=.00304?12.92*f:1.055*Tb(f,1/2.4)-.055)},bc=function(f){return f>va.t1?f*f*f:va.t2*(f-va.t0)},Hf=xb,Pb=g.unpack,Mb=g.type,Ob=Y,zf=S,Kf=w,Nb=Uf;zf.prototype.lab=function(){return Nb(this._rgb)},Ob.lab=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(zf,[null].concat(f,["lab"])))},Kf.format.lab=Hf,Kf.autodetect.push({p:2,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f=Pb(f,"lab"),Mb(f)==="array"&&f.length===3)return"lab"}});var Rb=g.unpack,Lb=g.RAD2DEG,Db=Math.sqrt,Bb=Math.atan2,Fb=Math.round,jb=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=Rb(f,"lab"),T=$[0],B=$[1],z=$[2],N=Db(B*B+z*z),ne=(Bb(z,B)*Lb+360)%360;return Fb(N*1e4)===0&&(ne=Number.NaN),[T,N,ne]},Wf=jb,Vb=g.unpack,Ub=Uf,Hb=Wf,zb=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=Vb(f,"rgb"),T=$[0],B=$[1],z=$[2],N=Ub(T,B,z),ne=N[0],ae=N[1],me=N[2];return Hb(ne,ae,me)},Kb=zb,Wb=g.unpack,qb=g.DEG2RAD,Gb=Math.sin,Jb=Math.cos,Yb=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=Wb(f,"lch"),T=$[0],B=$[1],z=$[2];return isNaN(z)&&(z=0),z=z*qb,[T,Jb(z)*B,Gb(z)*B]},qf=Yb,Xb=g.unpack,Qb=qf,Zb=Hf,e0=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];f=Xb(f,"lch");var $=f[0],T=f[1],B=f[2],z=Qb($,T,B),N=z[0],ne=z[1],ae=z[2],me=Zb(N,ne,ae),ke=me[0],Ue=me[1],Oe=me[2];return[ke,Ue,Oe,f.length>3?f[3]:1]},Gf=e0,t0=g.unpack,n0=Gf,r0=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=t0(f,"hcl").reverse();return n0.apply(void 0,$)},o0=r0,a0=g.unpack,s0=g.type,Jf=Y,wi=S,wc=w,Yf=Kb;wi.prototype.lch=function(){return Yf(this._rgb)},wi.prototype.hcl=function(){return Yf(this._rgb).reverse()},Jf.lch=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(wi,[null].concat(f,["lch"])))},Jf.hcl=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(wi,[null].concat(f,["hcl"])))},wc.format.lch=Gf,wc.format.hcl=o0,["lch","hcl"].forEach(function(f){return wc.autodetect.push({p:2,test:function(){for(var m=[],$=arguments.length;$--;)m[$]=arguments[$];if(m=a0(m,f),s0(m)==="array"&&m.length===3)return f}})});var i0={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Xf=i0,l0=S,Qf=w,c0=g.type,hs=Xf,u0=J,d0=ps;l0.prototype.name=function(){for(var f=d0(this._rgb,"rgb"),m=0,$=Object.keys(hs);m<$.length;m+=1){var T=$[m];if(hs[T]===f)return T.toLowerCase()}return f},Qf.format.named=function(f){if(f=f.toLowerCase(),hs[f])return u0(hs[f]);throw new Error("unknown color name: "+f)},Qf.autodetect.push({p:5,test:function(f){for(var m=[],$=arguments.length-1;$-- >0;)m[$]=arguments[$+1];if(!m.length&&c0(f)==="string"&&hs[f.toLowerCase()])return"named"}});var f0=g.unpack,p0=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=f0(f,"rgb"),T=$[0],B=$[1],z=$[2];return(T<<16)+(B<<8)+z},h0=p0,m0=g.type,v0=function(f){if(m0(f)=="number"&&f>=0&&f<=16777215){var m=f>>16,$=f>>8&255,T=f&255;return[m,$,T,1]}throw new Error("unknown num color: "+f)},g0=v0,y0=Y,Zf=S,ep=w,_0=g.type,b0=h0;Zf.prototype.num=function(){return b0(this._rgb)},y0.num=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(Zf,[null].concat(f,["num"])))},ep.format.num=g0,ep.autodetect.push({p:5,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f.length===1&&_0(f[0])==="number"&&f[0]>=0&&f[0]<=16777215)return"num"}});var w0=Y,Ac=S,tp=w,np=g.unpack,rp=g.type,op=Math.round;Ac.prototype.rgb=function(f){return f===void 0&&(f=!0),f===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(op)},Ac.prototype.rgba=function(f){return f===void 0&&(f=!0),this._rgb.slice(0,4).map(function(m,$){return $<3?f===!1?m:op(m):m})},w0.rgb=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(Ac,[null].concat(f,["rgb"])))},tp.format.rgb=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=np(f,"rgba");return $[3]===void 0&&($[3]=1),$},tp.autodetect.push({p:3,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f=np(f,"rgba"),rp(f)==="array"&&(f.length===3||f.length===4&&rp(f[3])=="number"&&f[3]>=0&&f[3]<=1))return"rgb"}});var Ai=Math.log,A0=function(f){var m=f/100,$,T,B;return m<66?($=255,T=m<6?0:-155.25485562709179-.44596950469579133*(T=m-2)+104.49216199393888*Ai(T),B=m<20?0:-254.76935184120902+.8274096064007395*(B=m-10)+115.67994401066147*Ai(B)):($=351.97690566805693+.114206453784165*($=m-55)-40.25366309332127*Ai($),T=325.4494125711974+.07943456536662342*(T=m-50)-28.0852963507957*Ai(T),B=255),[$,T,B,1]},ap=A0,C0=ap,$0=g.unpack,S0=Math.round,I0=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];for(var $=$0(f,"rgb"),T=$[0],B=$[2],z=1e3,N=4e4,ne=.4,ae;N-z>ne;){ae=(N+z)*.5;var me=C0(ae);me[2]/me[0]>=B/T?N=ae:z=ae}return S0(ae)},E0=I0,Cc=Y,Ci=S,$c=w,k0=E0;Ci.prototype.temp=Ci.prototype.kelvin=Ci.prototype.temperature=function(){return k0(this._rgb)},Cc.temp=Cc.kelvin=Cc.temperature=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(Ci,[null].concat(f,["temp"])))},$c.format.temp=$c.format.kelvin=$c.format.temperature=ap;var T0=g.unpack,Sc=Math.cbrt,x0=Math.pow,P0=Math.sign,M0=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=T0(f,"rgb"),T=$[0],B=$[1],z=$[2],N=[Ic(T/255),Ic(B/255),Ic(z/255)],ne=N[0],ae=N[1],me=N[2],ke=Sc(.4122214708*ne+.5363325363*ae+.0514459929*me),Ue=Sc(.2119034982*ne+.6806995451*ae+.1073969566*me),Oe=Sc(.0883024619*ne+.2817188376*ae+.6299787005*me);return[.2104542553*ke+.793617785*Ue-.0040720468*Oe,1.9779984951*ke-2.428592205*Ue+.4505937099*Oe,.0259040371*ke+.7827717662*Ue-.808675766*Oe]},sp=M0;function Ic(f){var m=Math.abs(f);return m<.04045?f/12.92:(P0(f)||1)*x0((m+.055)/1.055,2.4)}var O0=g.unpack,$i=Math.pow,N0=Math.sign,R0=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];f=O0(f,"lab");var $=f[0],T=f[1],B=f[2],z=$i($+.3963377774*T+.2158037573*B,3),N=$i($-.1055613458*T-.0638541728*B,3),ne=$i($-.0894841775*T-1.291485548*B,3);return[255*Ec(4.0767416621*z-3.3077115913*N+.2309699292*ne),255*Ec(-1.2684380046*z+2.6097574011*N-.3413193965*ne),255*Ec(-.0041960863*z-.7034186147*N+1.707614701*ne),f.length>3?f[3]:1]},ip=R0;function Ec(f){var m=Math.abs(f);return m>.0031308?(N0(f)||1)*(1.055*$i(m,1/2.4)-.055):f*12.92}var L0=g.unpack,D0=g.type,B0=Y,lp=S,cp=w,F0=sp;lp.prototype.oklab=function(){return F0(this._rgb)},B0.oklab=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(lp,[null].concat(f,["oklab"])))},cp.format.oklab=ip,cp.autodetect.push({p:3,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f=L0(f,"oklab"),D0(f)==="array"&&f.length===3)return"oklab"}});var j0=g.unpack,V0=sp,U0=Wf,H0=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];var $=j0(f,"rgb"),T=$[0],B=$[1],z=$[2],N=V0(T,B,z),ne=N[0],ae=N[1],me=N[2];return U0(ne,ae,me)},z0=H0,K0=g.unpack,W0=qf,q0=ip,G0=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];f=K0(f,"lch");var $=f[0],T=f[1],B=f[2],z=W0($,T,B),N=z[0],ne=z[1],ae=z[2],me=q0(N,ne,ae),ke=me[0],Ue=me[1],Oe=me[2];return[ke,Ue,Oe,f.length>3?f[3]:1]},J0=G0,Y0=g.unpack,X0=g.type,Q0=Y,up=S,dp=w,Z0=z0;up.prototype.oklch=function(){return Z0(this._rgb)},Q0.oklch=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];return new(Function.prototype.bind.apply(up,[null].concat(f,["oklch"])))},dp.format.oklch=J0,dp.autodetect.push({p:3,test:function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];if(f=Y0(f,"oklch"),X0(f)==="array"&&f.length===3)return"oklch"}});var fp=S,ew=g.type;fp.prototype.alpha=function(f,m){return m===void 0&&(m=!1),f!==void 0&&ew(f)==="number"?m?(this._rgb[3]=f,this):new fp([this._rgb[0],this._rgb[1],this._rgb[2],f],"rgb"):this._rgb[3]};var tw=S;tw.prototype.clipped=function(){return this._rgb._clipped||!1};var Ko=S,nw=bi;Ko.prototype.darken=function(f){f===void 0&&(f=1);var m=this,$=m.lab();return $[0]-=nw.Kn*f,new Ko($,"lab").alpha(m.alpha(),!0)},Ko.prototype.brighten=function(f){return f===void 0&&(f=1),this.darken(-f)},Ko.prototype.darker=Ko.prototype.darken,Ko.prototype.brighter=Ko.prototype.brighten;var rw=S;rw.prototype.get=function(f){var m=f.split("."),$=m[0],T=m[1],B=this[$]();if(T){var z=$.indexOf(T)-($.substr(0,2)==="ok"?2:0);if(z>-1)return B[z];throw new Error("unknown channel "+T+" in mode "+$)}else return B};var ga=S,ow=g.type,aw=Math.pow,sw=1e-7,iw=20;ga.prototype.luminance=function(f){if(f!==void 0&&ow(f)==="number"){if(f===0)return new ga([0,0,0,this._rgb[3]],"rgb");if(f===1)return new ga([255,255,255,this._rgb[3]],"rgb");var m=this.luminance(),$="rgb",T=iw,B=function(N,ne){var ae=N.interpolate(ne,.5,$),me=ae.luminance();return Math.abs(f-me)<sw||!T--?ae:me>f?B(N,ae):B(ae,ne)},z=(m>f?B(new ga([0,0,0]),this):B(this,new ga([255,255,255]))).rgb();return new ga(z.concat([this._rgb[3]]))}return lw.apply(void 0,this._rgb.slice(0,3))};var lw=function(f,m,$){return f=kc(f),m=kc(m),$=kc($),.2126*f+.7152*m+.0722*$},kc=function(f){return f/=255,f<=.03928?f/12.92:aw((f+.055)/1.055,2.4)},er={},pp=S,hp=g.type,Si=er,mp=function(f,m,$){$===void 0&&($=.5);for(var T=[],B=arguments.length-3;B-- >0;)T[B]=arguments[B+3];var z=T[0]||"lrgb";if(!Si[z]&&!T.length&&(z=Object.keys(Si)[0]),!Si[z])throw new Error("interpolation mode "+z+" is not defined");return hp(f)!=="object"&&(f=new pp(f)),hp(m)!=="object"&&(m=new pp(m)),Si[z](f,m,$).alpha(f.alpha()+$*(m.alpha()-f.alpha()))},vp=S,cw=mp;vp.prototype.mix=vp.prototype.interpolate=function(f,m){m===void 0&&(m=.5);for(var $=[],T=arguments.length-2;T-- >0;)$[T]=arguments[T+2];return cw.apply(void 0,[this,f,m].concat($))};var gp=S;gp.prototype.premultiply=function(f){f===void 0&&(f=!1);var m=this._rgb,$=m[3];return f?(this._rgb=[m[0]*$,m[1]*$,m[2]*$,$],this):new gp([m[0]*$,m[1]*$,m[2]*$,$],"rgb")};var Tc=S,uw=bi;Tc.prototype.saturate=function(f){f===void 0&&(f=1);var m=this,$=m.lch();return $[1]+=uw.Kn*f,$[1]<0&&($[1]=0),new Tc($,"lch").alpha(m.alpha(),!0)},Tc.prototype.desaturate=function(f){return f===void 0&&(f=1),this.saturate(-f)};var yp=S,_p=g.type;yp.prototype.set=function(f,m,$){$===void 0&&($=!1);var T=f.split("."),B=T[0],z=T[1],N=this[B]();if(z){var ne=B.indexOf(z)-(B.substr(0,2)==="ok"?2:0);if(ne>-1){if(_p(m)=="string")switch(m.charAt(0)){case"+":N[ne]+=+m;break;case"-":N[ne]+=+m;break;case"*":N[ne]*=+m.substr(1);break;case"/":N[ne]/=+m.substr(1);break;default:N[ne]=+m}else if(_p(m)==="number")N[ne]=m;else throw new Error("unsupported value for Color.set");var ae=new yp(N,B);return $?(this._rgb=ae._rgb,this):ae}throw new Error("unknown channel "+z+" in mode "+B)}else return N};var dw=S,fw=function(f,m,$){var T=f._rgb,B=m._rgb;return new dw(T[0]+$*(B[0]-T[0]),T[1]+$*(B[1]-T[1]),T[2]+$*(B[2]-T[2]),"rgb")};er.rgb=fw;var pw=S,xc=Math.sqrt,ya=Math.pow,hw=function(f,m,$){var T=f._rgb,B=T[0],z=T[1],N=T[2],ne=m._rgb,ae=ne[0],me=ne[1],ke=ne[2];return new pw(xc(ya(B,2)*(1-$)+ya(ae,2)*$),xc(ya(z,2)*(1-$)+ya(me,2)*$),xc(ya(N,2)*(1-$)+ya(ke,2)*$),"rgb")};er.lrgb=hw;var mw=S,vw=function(f,m,$){var T=f.lab(),B=m.lab();return new mw(T[0]+$*(B[0]-T[0]),T[1]+$*(B[1]-T[1]),T[2]+$*(B[2]-T[2]),"lab")};er.lab=vw;var bp=S,_a=function(f,m,$,T){var B,z,N,ne;T==="hsl"?(N=f.hsl(),ne=m.hsl()):T==="hsv"?(N=f.hsv(),ne=m.hsv()):T==="hcg"?(N=f.hcg(),ne=m.hcg()):T==="hsi"?(N=f.hsi(),ne=m.hsi()):T==="lch"||T==="hcl"?(T="hcl",N=f.hcl(),ne=m.hcl()):T==="oklch"&&(N=f.oklch().reverse(),ne=m.oklch().reverse());var ae,me,ke,Ue,Oe,Xe;(T.substr(0,1)==="h"||T==="oklch")&&(B=N,ae=B[0],ke=B[1],Oe=B[2],z=ne,me=z[0],Ue=z[1],Xe=z[2]);var Je,mt,At,kt;return!isNaN(ae)&&!isNaN(me)?(me>ae&&me-ae>180?kt=me-(ae+360):me<ae&&ae-me>180?kt=me+360-ae:kt=me-ae,mt=ae+$*kt):isNaN(ae)?isNaN(me)?mt=Number.NaN:(mt=me,(Oe==1||Oe==0)&&T!="hsv"&&(Je=Ue)):(mt=ae,(Xe==1||Xe==0)&&T!="hsv"&&(Je=ke)),Je===void 0&&(Je=ke+$*(Ue-ke)),At=Oe+$*(Xe-Oe),T==="oklch"?new bp([At,Je,mt],T):new bp([mt,Je,At],T)},gw=_a,wp=function(f,m,$){return gw(f,m,$,"lch")};er.lch=wp,er.hcl=wp;var yw=S,_w=function(f,m,$){var T=f.num(),B=m.num();return new yw(T+$*(B-T),"num")};er.num=_w;var bw=_a,ww=function(f,m,$){return bw(f,m,$,"hcg")};er.hcg=ww;var Aw=_a,Cw=function(f,m,$){return Aw(f,m,$,"hsi")};er.hsi=Cw;var $w=_a,Sw=function(f,m,$){return $w(f,m,$,"hsl")};er.hsl=Sw;var Iw=_a,Ew=function(f,m,$){return Iw(f,m,$,"hsv")};er.hsv=Ew;var kw=S,Tw=function(f,m,$){var T=f.oklab(),B=m.oklab();return new kw(T[0]+$*(B[0]-T[0]),T[1]+$*(B[1]-T[1]),T[2]+$*(B[2]-T[2]),"oklab")};er.oklab=Tw;var xw=_a,Pw=function(f,m,$){return xw(f,m,$,"oklch")};er.oklch=Pw;var Pc=S,Mw=g.clip_rgb,Mc=Math.pow,Oc=Math.sqrt,Nc=Math.PI,Ap=Math.cos,Cp=Math.sin,Ow=Math.atan2,Nw=function(f,m,$){m===void 0&&(m="lrgb"),$===void 0&&($=null);var T=f.length;$||($=Array.from(new Array(T)).map(function(){return 1}));var B=T/$.reduce(function(mt,At){return mt+At});if($.forEach(function(mt,At){$[At]*=B}),f=f.map(function(mt){return new Pc(mt)}),m==="lrgb")return Rw(f,$);for(var z=f.shift(),N=z.get(m),ne=[],ae=0,me=0,ke=0;ke<N.length;ke++)if(N[ke]=(N[ke]||0)*$[0],ne.push(isNaN(N[ke])?0:$[0]),m.charAt(ke)==="h"&&!isNaN(N[ke])){var Ue=N[ke]/180*Nc;ae+=Ap(Ue)*$[0],me+=Cp(Ue)*$[0]}var Oe=z.alpha()*$[0];f.forEach(function(mt,At){var kt=mt.get(m);Oe+=mt.alpha()*$[At+1];for(var Mt=0;Mt<N.length;Mt++)if(!isNaN(kt[Mt]))if(ne[Mt]+=$[At+1],m.charAt(Mt)==="h"){var An=kt[Mt]/180*Nc;ae+=Ap(An)*$[At+1],me+=Cp(An)*$[At+1]}else N[Mt]+=kt[Mt]*$[At+1]});for(var Xe=0;Xe<N.length;Xe++)if(m.charAt(Xe)==="h"){for(var Je=Ow(me/ne[Xe],ae/ne[Xe])/Nc*180;Je<0;)Je+=360;for(;Je>=360;)Je-=360;N[Xe]=Je}else N[Xe]=N[Xe]/ne[Xe];return Oe/=T,new Pc(N,m).alpha(Oe>.99999?1:Oe,!0)},Rw=function(f,m){for(var $=f.length,T=[0,0,0,0],B=0;B<f.length;B++){var z=f[B],N=m[B]/$,ne=z._rgb;T[0]+=Mc(ne[0],2)*N,T[1]+=Mc(ne[1],2)*N,T[2]+=Mc(ne[2],2)*N,T[3]+=ne[3]*N}return T[0]=Oc(T[0]),T[1]=Oc(T[1]),T[2]=Oc(T[2]),T[3]>.9999999&&(T[3]=1),new Pc(Mw(T))},mr=Y,ba=g.type,Lw=Math.pow,Rc=function(f){var m="rgb",$=mr("#ccc"),T=0,B=[0,1],z=[],N=[0,0],ne=!1,ae=[],me=!1,ke=0,Ue=1,Oe=!1,Xe={},Je=!0,mt=1,At=function(Re){if(Re=Re||["#fff","#000"],Re&&ba(Re)==="string"&&mr.brewer&&mr.brewer[Re.toLowerCase()]&&(Re=mr.brewer[Re.toLowerCase()]),ba(Re)==="array"){Re.length===1&&(Re=[Re[0],Re[0]]),Re=Re.slice(0);for(var it=0;it<Re.length;it++)Re[it]=mr(Re[it]);z.length=0;for(var yt=0;yt<Re.length;yt++)z.push(yt/(Re.length-1))}return Kn(),ae=Re},kt=function(Re){if(ne!=null){for(var it=ne.length-1,yt=0;yt<it&&Re>=ne[yt];)yt++;return yt-1}return 0},Mt=function(Re){return Re},An=function(Re){return Re},yn=function(Re,it){var yt,vt;if(it==null&&(it=!1),isNaN(Re)||Re===null)return $;if(it)vt=Re;else if(ne&&ne.length>2){var Cn=kt(Re);vt=Cn/(ne.length-2)}else Ue!==ke?vt=(Re-ke)/(Ue-ke):vt=1;vt=An(vt),it||(vt=Mt(vt)),mt!==1&&(vt=Lw(vt,mt)),vt=N[0]+vt*(1-N[0]-N[1]),vt=Math.min(1,Math.max(0,vt));var qt=Math.floor(vt*1e4);if(Je&&Xe[qt])yt=Xe[qt];else{if(ba(ae)==="array")for(var Tt=0;Tt<z.length;Tt++){var Rt=z[Tt];if(vt<=Rt){yt=ae[Tt];break}if(vt>=Rt&&Tt===z.length-1){yt=ae[Tt];break}if(vt>Rt&&vt<z[Tt+1]){vt=(vt-Rt)/(z[Tt+1]-Rt),yt=mr.interpolate(ae[Tt],ae[Tt+1],vt,m);break}}else ba(ae)==="function"&&(yt=ae(vt));Je&&(Xe[qt]=yt)}return yt},Kn=function(){return Xe={}};At(f);var It=function(Re){var it=mr(yn(Re));return me&&it[me]?it[me]():it};return It.classes=function(Re){if(Re!=null){if(ba(Re)==="array")ne=Re,B=[Re[0],Re[Re.length-1]];else{var it=mr.analyze(B);Re===0?ne=[it.min,it.max]:ne=mr.limits(it,"e",Re)}return It}return ne},It.domain=function(Re){if(!arguments.length)return B;ke=Re[0],Ue=Re[Re.length-1],z=[];var it=ae.length;if(Re.length===it&&ke!==Ue)for(var yt=0,vt=Array.from(Re);yt<vt.length;yt+=1){var Cn=vt[yt];z.push((Cn-ke)/(Ue-ke))}else{for(var qt=0;qt<it;qt++)z.push(qt/(it-1));if(Re.length>2){var Tt=Re.map(function(Lt,Dt){return Dt/(Re.length-1)}),Rt=Re.map(function(Lt){return(Lt-ke)/(Ue-ke)});Rt.every(function(Lt,Dt){return Tt[Dt]===Lt})||(An=function(Lt){if(Lt<=0||Lt>=1)return Lt;for(var Dt=0;Lt>=Rt[Dt+1];)Dt++;var gr=(Lt-Rt[Dt])/(Rt[Dt+1]-Rt[Dt]),go=Tt[Dt]+gr*(Tt[Dt+1]-Tt[Dt]);return go})}}return B=[ke,Ue],It},It.mode=function(Re){return arguments.length?(m=Re,Kn(),It):m},It.range=function(Re,it){return At(Re),It},It.out=function(Re){return me=Re,It},It.spread=function(Re){return arguments.length?(T=Re,It):T},It.correctLightness=function(Re){return Re==null&&(Re=!0),Oe=Re,Kn(),Oe?Mt=function(it){for(var yt=yn(0,!0).lab()[0],vt=yn(1,!0).lab()[0],Cn=yt>vt,qt=yn(it,!0).lab()[0],Tt=yt+(vt-yt)*it,Rt=qt-Tt,Lt=0,Dt=1,gr=20;Math.abs(Rt)>.01&&gr-- >0;)(function(){return Cn&&(Rt*=-1),Rt<0?(Lt=it,it+=(Dt-it)*.5):(Dt=it,it+=(Lt-it)*.5),qt=yn(it,!0).lab()[0],Rt=qt-Tt})();return it}:Mt=function(it){return it},It},It.padding=function(Re){return Re!=null?(ba(Re)==="number"&&(Re=[Re,Re]),N=Re,It):N},It.colors=function(Re,it){arguments.length<2&&(it="hex");var yt=[];if(arguments.length===0)yt=ae.slice(0);else if(Re===1)yt=[It(.5)];else if(Re>1){var vt=B[0],Cn=B[1]-vt;yt=Dw(0,Re,!1).map(function(Dt){return It(vt+Dt/(Re-1)*Cn)})}else{f=[];var qt=[];if(ne&&ne.length>2)for(var Tt=1,Rt=ne.length,Lt=1<=Rt;Lt?Tt<Rt:Tt>Rt;Lt?Tt++:Tt--)qt.push((ne[Tt-1]+ne[Tt])*.5);else qt=B;yt=qt.map(function(Dt){return It(Dt)})}return mr[it]&&(yt=yt.map(function(Dt){return Dt[it]()})),yt},It.cache=function(Re){return Re!=null?(Je=Re,It):Je},It.gamma=function(Re){return Re!=null?(mt=Re,It):mt},It.nodata=function(Re){return Re!=null?($=mr(Re),It):$},It};function Dw(f,m,$){for(var T=[],B=f<m,z=$?B?m+1:m-1:m,N=f;B?N<z:N>z;B?N++:N--)T.push(N);return T}var ms=S,Bw=Rc,Fw=function(f){for(var m=[1,1],$=1;$<f;$++){for(var T=[1],B=1;B<=m.length;B++)T[B]=(m[B]||0)+m[B-1];m=T}return m},jw=function(f){var m,$,T,B,z,N,ne;if(f=f.map(function(Oe){return new ms(Oe)}),f.length===2)m=f.map(function(Oe){return Oe.lab()}),z=m[0],N=m[1],B=function(Oe){var Xe=[0,1,2].map(function(Je){return z[Je]+Oe*(N[Je]-z[Je])});return new ms(Xe,"lab")};else if(f.length===3)$=f.map(function(Oe){return Oe.lab()}),z=$[0],N=$[1],ne=$[2],B=function(Oe){var Xe=[0,1,2].map(function(Je){return(1-Oe)*(1-Oe)*z[Je]+2*(1-Oe)*Oe*N[Je]+Oe*Oe*ne[Je]});return new ms(Xe,"lab")};else if(f.length===4){var ae;T=f.map(function(Oe){return Oe.lab()}),z=T[0],N=T[1],ne=T[2],ae=T[3],B=function(Oe){var Xe=[0,1,2].map(function(Je){return(1-Oe)*(1-Oe)*(1-Oe)*z[Je]+3*(1-Oe)*(1-Oe)*Oe*N[Je]+3*(1-Oe)*Oe*Oe*ne[Je]+Oe*Oe*Oe*ae[Je]});return new ms(Xe,"lab")}}else if(f.length>=5){var me,ke,Ue;me=f.map(function(Oe){return Oe.lab()}),Ue=f.length-1,ke=Fw(Ue),B=function(Oe){var Xe=1-Oe,Je=[0,1,2].map(function(mt){return me.reduce(function(At,kt,Mt){return At+ke[Mt]*Math.pow(Xe,Ue-Mt)*Math.pow(Oe,Mt)*kt[mt]},0)});return new ms(Je,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return B},Vw=function(f){var m=jw(f);return m.scale=function(){return Bw(m)},m},Lc=Y,vr=function(f,m,$){if(!vr[$])throw new Error("unknown blend mode "+$);return vr[$](f,m)},mo=function(f){return function(m,$){var T=Lc($).rgb(),B=Lc(m).rgb();return Lc.rgb(f(T,B))}},vo=function(f){return function(m,$){var T=[];return T[0]=f(m[0],$[0]),T[1]=f(m[1],$[1]),T[2]=f(m[2],$[2]),T}},Uw=function(f){return f},Hw=function(f,m){return f*m/255},zw=function(f,m){return f>m?m:f},Kw=function(f,m){return f>m?f:m},Ww=function(f,m){return 255*(1-(1-f/255)*(1-m/255))},qw=function(f,m){return m<128?2*f*m/255:255*(1-2*(1-f/255)*(1-m/255))},Gw=function(f,m){return 255*(1-(1-m/255)/(f/255))},Jw=function(f,m){return f===255?255:(f=255*(m/255)/(1-f/255),f>255?255:f)};vr.normal=mo(vo(Uw)),vr.multiply=mo(vo(Hw)),vr.screen=mo(vo(Ww)),vr.overlay=mo(vo(qw)),vr.darken=mo(vo(zw)),vr.lighten=mo(vo(Kw)),vr.dodge=mo(vo(Jw)),vr.burn=mo(vo(Gw));for(var Yw=vr,Dc=g.type,Xw=g.clip_rgb,Qw=g.TWOPI,Zw=Math.pow,e1=Math.sin,t1=Math.cos,$p=Y,n1=function(f,m,$,T,B){f===void 0&&(f=300),m===void 0&&(m=-1.5),$===void 0&&($=1),T===void 0&&(T=1),B===void 0&&(B=[0,1]);var z=0,N;Dc(B)==="array"?N=B[1]-B[0]:(N=0,B=[B,B]);var ne=function(ae){var me=Qw*((f+120)/360+m*ae),ke=Zw(B[0]+N*ae,T),Ue=z!==0?$[0]+ae*z:$,Oe=Ue*ke*(1-ke)/2,Xe=t1(me),Je=e1(me),mt=ke+Oe*(-.14861*Xe+1.78277*Je),At=ke+Oe*(-.29227*Xe-.90649*Je),kt=ke+Oe*(1.97294*Xe);return $p(Xw([mt*255,At*255,kt*255,1]))};return ne.start=function(ae){return ae==null?f:(f=ae,ne)},ne.rotations=function(ae){return ae==null?m:(m=ae,ne)},ne.gamma=function(ae){return ae==null?T:(T=ae,ne)},ne.hue=function(ae){return ae==null?$:($=ae,Dc($)==="array"?(z=$[1]-$[0],z===0&&($=$[1])):z=0,ne)},ne.lightness=function(ae){return ae==null?B:(Dc(ae)==="array"?(B=ae,N=ae[1]-ae[0]):(B=[ae,ae],N=0),ne)},ne.scale=function(){return $p.scale(ne)},ne.hue($),ne},r1=S,o1="0123456789abcdef",a1=Math.floor,s1=Math.random,i1=function(){for(var f="#",m=0;m<6;m++)f+=o1.charAt(a1(s1()*16));return new r1(f,"hex")},Bc=c,Sp=Math.log,l1=Math.pow,c1=Math.floor,u1=Math.abs,Ip=function(f,m){m===void 0&&(m=null);var $={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Bc(f)==="object"&&(f=Object.values(f)),f.forEach(function(T){m&&Bc(T)==="object"&&(T=T[m]),T!=null&&!isNaN(T)&&($.values.push(T),$.sum+=T,T<$.min&&($.min=T),T>$.max&&($.max=T),$.count+=1)}),$.domain=[$.min,$.max],$.limits=function(T,B){return Ep($,T,B)},$},Ep=function(f,m,$){m===void 0&&(m="equal"),$===void 0&&($=7),Bc(f)=="array"&&(f=Ip(f));var T=f.min,B=f.max,z=f.values.sort(function(jc,Vc){return jc-Vc});if($===1)return[T,B];var N=[];if(m.substr(0,1)==="c"&&(N.push(T),N.push(B)),m.substr(0,1)==="e"){N.push(T);for(var ne=1;ne<$;ne++)N.push(T+ne/$*(B-T));N.push(B)}else if(m.substr(0,1)==="l"){if(T<=0)throw new Error("Logarithmic scales are only possible for values > 0");var ae=Math.LOG10E*Sp(T),me=Math.LOG10E*Sp(B);N.push(T);for(var ke=1;ke<$;ke++)N.push(l1(10,ae+ke/$*(me-ae)));N.push(B)}else if(m.substr(0,1)==="q"){N.push(T);for(var Ue=1;Ue<$;Ue++){var Oe=(z.length-1)*Ue/$,Xe=c1(Oe);if(Xe===Oe)N.push(z[Xe]);else{var Je=Oe-Xe;N.push(z[Xe]*(1-Je)+z[Xe+1]*Je)}}N.push(B)}else if(m.substr(0,1)==="k"){var mt,At=z.length,kt=new Array(At),Mt=new Array($),An=!0,yn=0,Kn=null;Kn=[],Kn.push(T);for(var It=1;It<$;It++)Kn.push(T+It/$*(B-T));for(Kn.push(B);An;){for(var Re=0;Re<$;Re++)Mt[Re]=0;for(var it=0;it<At;it++)for(var yt=z[it],vt=Number.MAX_VALUE,Cn=void 0,qt=0;qt<$;qt++){var Tt=u1(Kn[qt]-yt);Tt<vt&&(vt=Tt,Cn=qt),Mt[Cn]++,kt[it]=Cn}for(var Rt=new Array($),Lt=0;Lt<$;Lt++)Rt[Lt]=null;for(var Dt=0;Dt<At;Dt++)mt=kt[Dt],Rt[mt]===null?Rt[mt]=z[Dt]:Rt[mt]+=z[Dt];for(var gr=0;gr<$;gr++)Rt[gr]*=1/Mt[gr];An=!1;for(var go=0;go<$;go++)if(Rt[go]!==Kn[go]){An=!0;break}Kn=Rt,yn++,yn>200&&(An=!1)}for(var yo={},wa=0;wa<$;wa++)yo[wa]=[];for(var Aa=0;Aa<At;Aa++)mt=kt[Aa],yo[mt].push(z[Aa]);for(var qr=[],Wo=0;Wo<$;Wo++)qr.push(yo[Wo][0]),qr.push(yo[Wo][yo[Wo].length-1]);qr=qr.sort(function(jc,Vc){return jc-Vc}),N.push(qr[0]);for(var vs=1;vs<qr.length;vs+=2){var qo=qr[vs];!isNaN(qo)&&N.indexOf(qo)===-1&&N.push(qo)}}return N},kp={analyze:Ip,limits:Ep},Tp=S,d1=function(f,m){f=new Tp(f),m=new Tp(m);var $=f.luminance(),T=m.luminance();return $>T?($+.05)/(T+.05):(T+.05)/($+.05)},xp=S,Wr=Math.sqrt,rn=Math.pow,f1=Math.min,p1=Math.max,Pp=Math.atan2,Mp=Math.abs,Ii=Math.cos,Op=Math.sin,h1=Math.exp,Np=Math.PI,m1=function(f,m,$,T,B){$===void 0&&($=1),T===void 0&&(T=1),B===void 0&&(B=1);var z=function(qo){return 360*qo/(2*Np)},N=function(qo){return 2*Np*qo/360};f=new xp(f),m=new xp(m);var ne=Array.from(f.lab()),ae=ne[0],me=ne[1],ke=ne[2],Ue=Array.from(m.lab()),Oe=Ue[0],Xe=Ue[1],Je=Ue[2],mt=(ae+Oe)/2,At=Wr(rn(me,2)+rn(ke,2)),kt=Wr(rn(Xe,2)+rn(Je,2)),Mt=(At+kt)/2,An=.5*(1-Wr(rn(Mt,7)/(rn(Mt,7)+rn(25,7)))),yn=me*(1+An),Kn=Xe*(1+An),It=Wr(rn(yn,2)+rn(ke,2)),Re=Wr(rn(Kn,2)+rn(Je,2)),it=(It+Re)/2,yt=z(Pp(ke,yn)),vt=z(Pp(Je,Kn)),Cn=yt>=0?yt:yt+360,qt=vt>=0?vt:vt+360,Tt=Mp(Cn-qt)>180?(Cn+qt+360)/2:(Cn+qt)/2,Rt=1-.17*Ii(N(Tt-30))+.24*Ii(N(2*Tt))+.32*Ii(N(3*Tt+6))-.2*Ii(N(4*Tt-63)),Lt=qt-Cn;Lt=Mp(Lt)<=180?Lt:qt<=Cn?Lt+360:Lt-360,Lt=2*Wr(It*Re)*Op(N(Lt)/2);var Dt=Oe-ae,gr=Re-It,go=1+.015*rn(mt-50,2)/Wr(20+rn(mt-50,2)),yo=1+.045*it,wa=1+.015*it*Rt,Aa=30*h1(-rn((Tt-275)/25,2)),qr=2*Wr(rn(it,7)/(rn(it,7)+rn(25,7))),Wo=-qr*Op(2*N(Aa)),vs=Wr(rn(Dt/($*go),2)+rn(gr/(T*yo),2)+rn(Lt/(B*wa),2)+Wo*(gr/(T*yo))*(Lt/(B*wa)));return p1(0,f1(100,vs))},Rp=S,v1=function(f,m,$){$===void 0&&($="lab"),f=new Rp(f),m=new Rp(m);var T=f.get($),B=m.get($),z=0;for(var N in T){var ne=(T[N]||0)-(B[N]||0);z+=ne*ne}return Math.sqrt(z)},g1=S,y1=function(){for(var f=[],m=arguments.length;m--;)f[m]=arguments[m];try{return new(Function.prototype.bind.apply(g1,[null].concat(f))),!0}catch{return!1}},Lp=Y,Dp=Rc,_1={cool:function(){return Dp([Lp.hsl(180,1,.9),Lp.hsl(250,.7,.4)])},hot:function(){return Dp(["#000","#f00","#ff0","#fff"]).mode("rgb")}},Ei={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Fc=0,Bp=Object.keys(Ei);Fc<Bp.length;Fc+=1){var Fp=Bp[Fc];Ei[Fp.toLowerCase()]=Ei[Fp]}var b1=Ei,gn=Y;gn.average=Nw,gn.bezier=Vw,gn.blend=Yw,gn.cubehelix=n1,gn.mix=gn.interpolate=mp,gn.random=i1,gn.scale=Rc,gn.analyze=kp.analyze,gn.contrast=d1,gn.deltaE=m1,gn.distance=v1,gn.limits=kp.limits,gn.valid=y1,gn.scales=_1,gn.colors=Xf,gn.brewer=b1;var w1=gn;return w1})})(P_);var GM=P_.exports;const M_=vy(GM),JM=["onClick"],YM=["data-writer-tooltip"],XM={key:1,class:"CoreTags__tag CoreTags__tag--empty"},QM=`
def handle_tag_click(state, payload):
	state["selected_tag_id"] = payload`,ZM="A component to display coloured tag pills.",eO={writer:{name:"Tags",description:ZM,category:"Content",fields:{tags:{name:"Tags",desc:"Key-value object with tags. Must be a JSON string or a state reference to a dictionary.",type:q.KeyValue,default:"{}"},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:q.Color,default:St.Blue5,category:We.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:q.Number,default:"1",category:We.Style},rotateHue:{...Pt,name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",default:"yes",category:We.Style},primaryTextColor:Zt,cssClasses:at},events:{"wf-tag-click":{desc:"Triggered when a tag is clicked.",stub:QM.trim(),eventPayloadExample:"tagKey"}},previewField:"text"}},tO=Ie({...eO,__name:"CoreTags",setup(e){ts(h=>({"3d4231f0":l.value?"pointer":"auto"}));const t=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}],n=st("rootEl"),r=ee(re.evaluatedFields),o=ee(re.componentId),a=ee(re.core),s=ee(re.isBeingEdited),{isLinked:i}=Sf(a,o,"wf-tag-click"),l=W(()=>{var v;return i.value?!0:typeof((v=a.getComponentById(o).handlers)==null?void 0:v["wf-tag-click"])<"u"});function c(h){if(!r.rotateHue.value)return r.referenceColor.value;const v=M_(r.referenceColor.value),y=t[u(h)];return v.set("hsl.h",`${Math.sign(y.h)==-1?"-":"+"}${Math.abs(y.h)}`).set("hsl.s",`${Math.sign(y.s)==-1?"-":"+"}${Math.abs(y.s/100)}`).set("hsl.l",`${Math.sign(y.l)==-1?"-":"+"}${Math.abs(y.l/100)}`).css()}function u(h){let v=r.seed.value*52673&4294967295;for(let g=0;g<h.length;g++)v=(g+1)*h.charCodeAt(g)^v&4294967295;return Math.abs(v)%t.length}function d(h){const v=new CustomEvent("wf-tag-click",{detail:{payload:h}});n.value.dispatchEvent(v)}return(h,v)=>x(s)||Object.entries(x(r).tags.value??[]).length>0?(I(),M("div",{key:0,ref_key:"rootEl",ref:n,class:"CoreTags"},[Object.entries(x(r).tags.value??[]).length>0?(I(!0),M(ze,{key:0},xt(x(r).tags.value,(y,g)=>(I(),M("p",{key:g,class:"CoreTags__tag",style:$t({background:c(g)}),onClick:w=>d(g)},[D("span",{"data-writer-tooltip":y,"data-writer-tooltip-strategy":"overflow"},Me(y),9,YM)],12,JM))),128)):(I(),M("p",XM,v[0]||(v[0]=[D("span",null,"Empty Tags",-1)])))],512)):_e("",!0)}}),nO=Ne(tO,[["__scopeId","data-v-b37299ed"]]),rO={key:0,class:"material-symbols-outlined"},oO={class:"info"},aO={key:1,class:"caption"},sO={class:"container","data-writer-container":""},iO=`
def handle_avatar_click():
	print("The avatar was clicked")`,lO="A component to display user avatars.",cO={writer:{name:"Avatar",description:lO,category:"Content",allowedChildrenTypes:["*"],fields:{name:{name:"Name",type:q.Text},imageSrc:{name:"Image source",desc:"A valid URL. Alternatively, you can provide a state reference to a packed file.",type:q.Text},caption:{name:"Caption",desc:"Add an optional caption under the name, such as the person's job title.",type:q.Text},size:{name:"Size",type:q.Text,options:{small:"Small",medium:"Medium",large:"Large"},default:"medium",category:We.Style},orientation:{name:"Orientation",type:q.Text,options:{horizontal:"Horizontal",vertical:"Vertical"},default:"horizontal",category:We.Style},primaryTextColor:Zt,secondaryTextColor:Zn,separatorColor:sn,cssClasses:at},events:{"wf-click":{desc:"Triggered when the avatar is clicked.",stub:iO.trim()}},previewField:"text"}},uO=Ie({...cO,__name:"CoreAvatar",setup(e){ts(l=>({84668864:a.value?"pointer":"auto"}));const t=st("rootEl"),n=ee(re.evaluatedFields),r=ee(re.componentId),o=ee(re.core),a=W(()=>{var c;return typeof((c=o.getComponentById(r).handlers)==null?void 0:c["wf-click"])<"u"}),s=W(()=>({backgroundImage:n.imageSrc.value?`url(${n.imageSrc.value})`:"none",cursor:a.value?"pointer":"auto"}));function i(l){const c=pi(l);t.value.dispatchEvent(c)}return(l,c)=>(I(),M("div",{ref_key:"rootEl",ref:t,class:ct(["CoreAvatar",[x(n).size.value,x(n).orientation.value]])},[D("div",{class:"image",style:$t(s.value),onClick:i},[x(n).imageSrc.value?_e("",!0):(I(),M("i",rO," account_circle "))],4),D("div",oO,[x(n).name.value?(I(),M("div",{key:0,class:"name",onClick:i},Me(x(n).name.value),1)):_e("",!0),x(n).caption.value?(I(),M("div",aO,Me(x(n).caption.value),1)):_e("",!0),D("div",sO,[Yt(l.$slots,"default",{},void 0,!0)])])],2))}}),dO=Ne(uO,[["__scopeId","data-v-f433e0c3"]]),fO={key:0,class:"material-symbols-outlined"},Cm=Ie({__name:"SharedButtonCopyClipboard",props:{label:{type:String,required:!0},content:{type:String,required:!0}},setup(e){const t=e;Ge(no(t,"content"),()=>r.value=!1);const n=Pe(!1),r=Pe(!1);let o;async function a(){o&&(clearTimeout(o),o=void 0),n.value=!0;try{await navigator.clipboard.writeText(t.content),r.value=!0,o=setTimeout(()=>{r.value=!1,o=void 0},3e3)}catch(s){Ln().error(s)}finally{n.value=!1}}return lo(()=>{o&&clearTimeout(o)}),(s,i)=>(I(),Ve(Nn,{size:"small",variant:"tertiary",loading:n.value,onClick:a},{default:et(()=>[r.value?(I(),M("span",fO," check_circle ")):_e("",!0),Bt(" "+Me(r.value?"Copied to clipboard":e.label),1)]),_:1},8,["loading"]))}}),pO={class:"SharedControlBar"},hO=Ie({__name:"SharedControlBar",props:{copyRawContent:{type:String,required:!1,default:void 0},copyStructuredContent:{type:String,required:!1,default:void 0}},setup(e){const t=e;return(n,r)=>(I(),M("div",pO,[t.copyStructuredContent?(I(),Ve(Cm,{key:0,label:"Copy JSON",content:t.copyStructuredContent},null,8,["content"])):_e("",!0),t.copyRawContent?(I(),Ve(Cm,{key:1,label:"Copy",content:t.copyRawContent},null,8,["content"])):_e("",!0)]))}}),O_=Ne(hO,[["__scopeId","data-v-1464e278"]]),mO={key:0,class:"CoreAnnotatedText"},vO={key:0,class:"CoreAnnotatedText__annotation__subject"},gO={writer:{name:"Annotated text",description:"Shows text with annotations",category:"Content",fields:{text:{name:"Annotated text",type:q.Object,desc:"Value array with text/annotations. Must be a JSON string or a state reference to an array.",init:`["This ",["is", "Verb"]," some ",["annotated", "Adjective"], ["text", "Noun"]," for those of ",["you", "Pronoun"]," who ",["like", "Verb"]," this sort of ",["thing", "Noun"],". ","And here's a ",["word", "", "#faf"]," with a fancy background but no label."]`,validator:$2},referenceColor:{name:"Reference",desc:"The colour to be used as reference for chroma and luminance, and as the starting point for hue rotation.",type:q.Color,default:St.Blue5,category:We.Style},seed:{name:"Seed value",desc:"Choose a different value to reshuffle colours.",type:q.Number,default:"1",category:We.Style},rotateHue:{...Pt,name:"Rotate hue",desc:"If active, rotates the hue depending on the content of the string. If turned off, the reference colour is always used.",default:"yes",category:We.Style},useMarkdown:{...Pt,name:"Use Markdown",desc:"If active, the output will be sanitized; unsafe elements will be removed.",default:"no"},copyButtons:{...Pt,name:"Copy buttons",desc:"If active, adds a control bar with both copy text and JSON buttons.",default:"no",category:We.Style},buttonColor:Hr,buttonTextColor:zr,primaryTextColor:Zt,cssClasses:at},previewField:"data"}},yO=Ie({...gO,__name:"CoreAnnotatedText",setup(e){const t=ee(re.evaluatedFields),n=W(()=>t.text.value??[]),r=ee(re.isBeingEdited),o=ee(re.componentId),a=W(()=>!t.text.value),s=W(()=>!a.value||r.value),i=W(()=>!!t.useMarkdown.value),l=[{h:-78,s:-34,l:16},{h:-61,s:-37,l:16},{h:-2,s:0,l:24},{h:-12,s:0,l:29},{h:28,s:-20,l:24},{h:-61,s:-95,l:25},{h:-173,s:0,l:16},{h:-228,s:0,l:22},{h:69,s:0,l:25},{h:70,s:0,l:29}];let c=[...l],u={},d=t.seed.value;function h(){const p=Pe("");Ge([i,n],async()=>{if(!i.value)return p.value="";p.value=await S()},{immediate:!0});function _(R){const[Y,X]=R,te=X?`<span class="CoreAnnotatedText__annotation__subject">${X}</span>`:"";return`<span class="CoreAnnotatedText__annotation" style="background: ${w(R)}">${Y}${te}</span>`}async function S(){const R=n.value.reduce((X,te)=>typeof te=="string"?`${X} ${te}`:Array.isArray(te)?`${X} ${_(te)}`:X,"");return await(await tn(()=>import("./marked.esm-273vDTCT.js"),[],import.meta.url)).parse(R)}return Sn(p)}const v=h();function y(p,_){return p.set("hsl.h",`${Math.sign(_.h)==-1?"-":"+"}${Math.abs(_.h)}`).set("hsl.s",`${Math.sign(_.s)==-1?"-":"+"}${Math.abs(_.s/100)}`).set("hsl.l",`${Math.sign(_.l)==-1?"-":"+"}${Math.abs(_.l/100)}`).css()}function g(p,_=l.length){let S=t.seed.value*52673&4294967295;for(let Y=0;Y<p.length;Y++)S=(Y+1)*p.charCodeAt(Y)^S&4294967295;return Math.abs(S)%_}function w(p){return p[2]||A(p[1])}function A(p){if(!t.rotateHue.value)return t.referenceColor.value;const _=M_(t.referenceColor.value);if(d!==t.seed.value&&(c=[...l],u={},d=t.seed.value),u[p])return y(_,u[p]);c.length===0&&(c=[...l]);const S=g(p,c.length),R=c[S];return u[p]=R,c.splice(S,1),y(_,R)}const C=W(()=>n.value.reduce((p,_)=>typeof _=="string"?p+_:p+_[0],"")),b=W(()=>{try{return JSON.stringify(n.value)}catch{return n.value.join("")}});return(p,_)=>s.value?(I(),M("div",mO,[i.value?(I(),Ve(ey,{key:0,"raw-markdown":x(v),class:"CoreAnnotatedText__markdown"},null,8,["raw-markdown"])):(I(),M(ze,{key:1},[a.value?(I(),Ve(If,{key:0,"component-id":x(o)},null,8,["component-id"])):_e("",!0),(I(!0),M(ze,null,xt(n.value,(S,R)=>(I(),M("span",{key:String(S)+R},[typeof S=="string"?(I(),M(ze,{key:0},[Bt(Me(S),1)],64)):_e("",!0),Array.isArray(S)?(I(),M("span",{key:1,class:"CoreAnnotatedText__annotation",style:$t({backgroundColor:w(S)})},[Bt(Me(S[0])+" ",1),S[1]?(I(),M("span",vO,Me(S[1]),1)):_e("",!0)],4)):_e("",!0)]))),128))],64)),x(t).copyButtons.value?(I(),Ve(O_,{key:2,"copy-raw-content":C.value,"copy-structured-content":b.value},null,8,["copy-raw-content","copy-structured-content"])):_e("",!0)])):_e("",!0)}}),_O=Ne(yO,[["__scopeId","data-v-a82b769f"]]);function dc(e){return!!(["string","number","boolean"].includes(typeof e)||e===null)}function Ef(e){return dc(e)?!1:Array.isArray(e)}function N_(e){return!Ef(e)&&typeof e=="object"&&e!==null}function R_(e){return dc(e)?1:Object.keys(e).length}function L_(e){return typeof e.open=="boolean"&&Array.isArray(e.path)}const bO=["open","disabled"],wO={class:"SharedCollapsible__summary"},AO={key:0,class:"SharedCollapsible__summary__icon material-symbols-outlined"},CO={class:"content"},$O=Ie({__name:"SharedCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},icons:{type:Object,required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e,{emit:t}){const n=e,r=t,o=Pe(n.open);Ge(no(n,"open"),i=>o.value=i);const a=W(()=>{if(n.icons!==void 0)return o.value?n.icons.open:n.icons.close});function s(i){const l=i.newState==="open";o.value=l,r("toggle",l)}return(i,l)=>(I(),M("details",{class:ct(["SharedCollapsible",{"SharedCollapsible--customMarker":e.icons}]),open:o.value,disabled:e.disabled,onToggle:s},[D("summary",wO,[e.icons?(I(),M("span",AO,Me(a.value),1)):_e("",!0),Yt(i.$slots,"title",{},void 0,!0)]),D("div",CO,[Yt(i.$slots,"content",{},void 0,!0)])],42,bO))}}),SO=Ne($O,[["__scopeId","data-v-ef5bb8f8"]]),IO=Ie({__name:"SharedJsonViewerChildrenCounter",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=a=>`Object{${a}}`,r=a=>`Array[${a}]`,o=W(()=>{const a=R_(t.data);return a===0?n(0):Ef(t.data)?r(a):N_(t.data)?n(a):n(0)});return(a,s)=>(I(),M("span",null,Me(o.value),1))}}),D_=Ne(IO,[["__scopeId","data-v-2641ae29"]]),EO={class:"SharedJsonViewerCollapsible__title"},kO={key:0},TO={class:"SharedJsonViewerCollapsible__content"},xO=Ie({__name:"SharedJsonViewerCollapsible",props:{open:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},title:{type:String,required:!1,default:void 0},data:{type:[String,Number,Boolean,Object,Array,null],required:!1,default:void 0}},emits:{toggle:e=>typeof e=="boolean"},setup(e){return(t,n)=>(I(),Ve(SO,{open:e.open,disabled:e.disabled,icons:{open:"keyboard_arrow_right",close:"keyboard_arrow_down"},onToggle:n[0]||(n[0]=r=>t.$emit("toggle",r))},{title:et(()=>[D("div",EO,[e.title?(I(),M("span",kO,Me(e.title),1)):_e("",!0),e.data?(I(),Ve(D_,{key:1,data:e.data},null,8,["data"])):_e("",!0)])]),content:et(()=>[D("div",TO,[Yt(t.$slots,"default",{},void 0,!0)])]),_:3},8,["open","disabled"]))}}),B_=Ne(xO,[["__scopeId","data-v-746fb4ae"]]),PO={class:"SharedJsonViewerValue"},MO=Ie({__name:"SharedJsonViewerValue",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0}},setup(e){const t=e,n=W(()=>JSON.stringify(t.data));return(r,o)=>(I(),M("span",PO,Me(n.value),1))}}),F_=Ne(MO,[["__scopeId","data-v-496a5553"]]),OO={class:"SharedJsonViewerObject"},NO={key:0,class:"SharedJsonViewerObject__value"},RO=Ie({__name:"SharedJsonViewerObject",props:{data:{type:[Object,Array],required:!0},path:{type:Array,default:()=>[]},initialDepth:{type:Number,default:0}},emits:{toggle:L_},setup(e,{emit:t}){const n=e,r=no(n,"initialDepth"),o=t,a=Pe([]),s=W(()=>n.path.length+1);Ge(r,()=>{if(r.value===0){a.value=[];return}if(!(r.value===-1||r.value>s.value))return;const u=new Set([...a.value,...Object.keys(n.data)]);a.value=Array.from(u)},{immediate:!0});function i(c,u){u?a.value=[...a.value,c]:a.value=a.value.filter(d=>d!==c),o("toggle",{open:u,path:[...n.path,c]})}function l(c){return a.value.includes(String(c))}return(c,u)=>(I(),M("div",OO,[(I(!0),M(ze,null,xt(Object.entries(e.data),([d,h],v)=>(I(),M(ze,{key:v},[x(dc)(h)||x(R_)(h)===0?(I(),M("div",NO,[D("span",null,Me(d),1),u[1]||(u[1]=Bt(": ")),He(F_,{data:h},null,8,["data"])])):(I(),Ve(B_,{key:1,open:l(d),title:d,data:h,onToggle:y=>i(d,y)},{default:et(()=>[l(d)?(I(),Ve(j_,{key:0,data:h,path:[...e.path,d],"initial-depth":r.value,onToggle:u[0]||(u[0]=y=>c.$emit("toggle",y))},null,8,["data","path","initial-depth"])):_e("",!0)]),_:2},1032,["open","title","data","onToggle"]))],64))),128))]))}}),$m=Ne(RO,[["__scopeId","data-v-eb3b38f1"]]),j_=Ie({__name:"SharedJsonViewer",props:{data:{type:[String,Number,Boolean,Object,Array,null],required:!0},path:{type:Array,default:()=>[]},hideRoot:{type:Boolean,required:!1},initialDepth:{type:Number,default:0},enableCopyToJson:{type:Boolean,required:!1}},emits:{toggle:L_},setup(e){const t=e,n=W(()=>t.path.length===0&&!t.hideRoot),r=W(()=>t.initialDepth===-1||t.initialDepth>0),o=W(()=>t.data===void 0?JSON.stringify(null):JSON.stringify(t.data));return(a,s)=>(I(),M(ze,null,[x(N_)(e.data)||x(Ef)(e.data)?(I(),M(ze,{key:0},[n.value?(I(),Ve(B_,{key:0,open:r.value,data:e.data,onToggle:s[1]||(s[1]=i=>a.$emit("toggle",{path:[],open:i}))},{default:et(()=>[He($m,{data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[0]||(s[0]=i=>a.$emit("toggle",i))},null,8,["data","path","initial-depth"])]),_:1},8,["open","data"])):(I(),Ve($m,{key:1,data:e.data,path:e.path,"initial-depth":e.initialDepth,onToggle:s[2]||(s[2]=i=>a.$emit("toggle",i))},null,8,["data","path","initial-depth"]))],64)):x(dc)(e.data)?(I(),Ve(F_,{key:1,data:e.data},null,8,["data"])):(I(),Ve(D_,{key:2,data:{}})),e.enableCopyToJson?(I(),Ve(O_,{key:3,"copy-structured-content":o.value},null,8,["copy-structured-content"])):_e("",!0)],64))}}),LO={class:"CoreJsonViewer"},DO="A component to explore JSON data as a hierarchy.",BO={name:"JSON Viewer",description:"A JSON tree viewer where you can expand the keys.",sample:{description:"This sample is opened by default",bool:!0,null:null,list:[1,"two",{key:3}]},sampleClosed:{description:"This sample is not opened by default"},createdAt:new Date},FO={name:"JSON Viewer",description:DO,category:"Content",fields:{data:{name:"Data",init:JSON.stringify(BO),type:q.Object},initialDepth:{name:"Initial depth",desc:"Sets the initial viewing depth of the JSON tree hierarchy. Use -1 to display the full hierarchy.",type:q.Number,init:"0",validator:Xn},hideRoot:{...Pt,name:"Hide root",desc:"Don't show the type of the root node when it's an Object or an Array.",default:"no",category:We.Style},copy:{...Pt,name:"Copy",desc:"If active, adds a control bar with copy JSON button.",default:"no",category:We.Style},jsonViewerIndentationSpacing:{name:"JSON indentation",type:q.Width,category:We.Style,applyStyleVariable:!0,validator:p_},secondaryTextColor:Zn,separatorColor:sn,cssClasses:at},previewField:"data"},jO={writer:FO},VO=Ie({...jO,__name:"CoreJsonViewer",setup(e){const t=ee(re.evaluatedFields),n=W(()=>t.data.value),r=W(()=>Number(t.initialDepth.value)||0);return(o,a)=>(I(),M("div",LO,[He(j_,{data:n.value??{},"initial-depth":r.value,"enable-copy-to-json":x(t).copy.value,"hide-root":x(t).hideRoot.value},null,8,["data","initial-depth","enable-copy-to-json","hide-root"])]))}});function UO(e,t={minimumFractionDigits:0,maximumFractionDigits:1}){const n=new Intl.NumberFormat(void 0,{style:"percent",...t});return W(()=>n.format(e.value))}const HO=["aria-valuetext","aria-valuemin","aria-valuemax","aria-valuenow","aria-busy","tabindex"],zO={key:0,class:"CoreProgressBar__title"},KO={key:0,class:"CoreProgressBar__title__label"},WO={key:1,class:"CoreProgressBar__title__progress"},qO={class:"CoreProgressBar__bar"},GO=`
def handle_progress_bar_click():
	print("The progress bar was clicked")`,JO="A component to display a progression.",YO={name:"Progress Bar",description:JO,category:"Content",allowedChildrenTypes:["*"],fields:{label:{name:"Label",type:q.Text,default:""},value:{name:"Value",type:q.Number},min:{name:"Minimum value",type:q.Number,default:"0"},max:{name:"Maximum value",type:q.Number,default:"1"},displayPercentage:{...Pt,name:"Display percentage",default:"no",category:We.Style},accentColor:mn,primaryTextColor:Zt,separatorColor:sn,cssClasses:at},events:{"wf-click":{desc:"Triggered when the progress bar is clicked.",stub:GO.trim()}}},XO={writer:YO},QO=Ie({...XO,__name:"CoreProgressBar",setup(e){const t=st("rootEl"),n=ee(re.evaluatedFields),r=ee(re.componentId),o=ee(re.core),a=W(()=>{var g;return String((g=n.label)==null?void 0:g.value)}),s=W(()=>Number(n.value.value)),i=W(()=>Number(n.min.value)),l=W(()=>Number(n.max.value)),c=W(()=>!!n.displayPercentage.value),u=W(()=>{if(!(s.value===void 0||Number.isNaN(s.value)))return(s.value-i.value)/(l.value-i.value)}),d=UO(u),h=W(()=>({width:u.value===void 0?void 0:`${u.value*100}%`})),v=W(()=>{var w;return typeof((w=o.getComponentById(r).handlers)==null?void 0:w["wf-click"])<"u"});function y(g){if(!v.value)return;const w=pi(g);t.value.dispatchEvent(w)}return(g,w)=>(I(),M("div",{ref_key:"rootEl",ref:t,class:ct(["CoreProgressBar",{"CoreProgressBar--clickable":v.value}]),role:"progressbar","aria-valuetext":u.value===void 0?null:x(d),"aria-valuemin":i.value,"aria-valuemax":l.value,"aria-valuenow":u.value===void 0?null:s.value,"aria-busy":u.value<1||u.value===void 0,tabindex:v.value?"0":null,onKeydown:Do(y,["enter"]),onClick:y},[a.value||c.value?(I(),M("div",zO,[a.value?(I(),M("label",KO,Me(a.value),1)):_e("",!0),c.value&&u.value!==void 0?(I(),M("span",WO,Me(x(d)),1)):_e("",!0)])):_e("",!0),D("div",qO,[D("div",{class:ct(["CoreProgressBar__bar__value",{"CoreProgressBar__bar__value--indeterminate":u.value===void 0}]),style:$t(h.value)},null,6)])],42,HO))}}),ZO=Ne(QO,[["__scopeId","data-v-873bd788"]]);function fc(e){const t=/[\\]?@{([^}]*)}/g;function n(c,u){var g;let d=[],h="",v=0,y=0;for(;y<c.length;){const w=c.charAt(y);w=="\\"?y+1<c.length&&(h+=c.charAt(y+1),y++):w=="."?v==0?(d.push(h),h=""):h+=w:w=="["?(v==0?(d.push(h),h=""):h+=w,v++):w=="]"?(v--,v==0?h=(g=r(h,u))==null?void 0:g.toString():h+=w):h+=w,y++}return h&&d.push(h),d}function r(c,u){let h=u?o(u):void 0,v=e.userState.value;const y=n(c,u);for(let g=0;g<y.length;g++)h=h==null?void 0:h[y[g]],v=v==null?void 0:v[y[g]];return h??v}function o(c){var d,h;const u={};for(let v=0;v<c.length-1;v++){const y=c[v],{componentId:g}=y,{type:w}=e.getComponentById(g);if(w!=="repeater"||v+1>=c.length)continue;const A=c.slice(0,v+1),C=c.slice(0,v+2),{instanceNumber:b}=C.at(-1),p=i(A,"repeaterObject");if(!p)continue;const _=Object.entries(p),S=i(A,"keyVariable"),R=i(A,"valueVariable");u[S]=(d=_[b])==null?void 0:d[0],u[R]=(h=_[b])==null?void 0:h[1]}return u}function a(c,u){return c==null?"":c.replace(t,(h,v)=>{if(h.charAt(0)=="\\")return h.substring(1);const y=v.trim();if(!y)return"";const g=r(y,u);return typeof g>"u"?"":typeof g=="object"?JSON.stringify(g):g.toString()})}function s(c){const{componentId:u}=c.at(-1),d=e.getComponentById(u);if(!d)return;const h={},{fields:v}=e.getComponentDefinition(d.type);if(v)return Object.keys(v).forEach(y=>{h[y]=W(()=>i(c,y))}),h}function i(c,u){var b;const{componentId:d}=c.at(-1),h=e.getComponentById(d);if(!h)return;const{fields:v}=e.getComponentDefinition(h.type),y=(b=h.content)==null?void 0:b[u],g=v[u].default,w=a(y,c),A=v[u].type,C=typeof w>"u"||w===null||w==="";if(A==q.Object||A==q.KeyValue||A==q.Tools){if(!w)return JSON.parse(g??null);if(typeof w!="string")return w;let p;try{p=JSON.parse(w)}catch{return JSON.parse(g??null)}return p}else if(A==q.Number){const p=g===null?null:parseFloat(g);if(C)return p??null;const _=parseFloat(w);return typeof _>"u"||Number.isNaN(_)?p??null:_}else if(A==q.Boolean){const p=C?g:w;return p==="yes"||p==="true"}else return A==q.IdKey?y:C?g??"":w}function l(c,u){const d=e.getComponentById(c);if(!d)return;if(typeof d.visible>"u"||d.visible.expression===!0)return!0;if(d.visible.expression===!1)return!1;const h=r(d.visible.binding,u);return d.visible.reversed===!0?!h:!!h}return{getEvaluatedFields:s,isComponentVisible:l,evaluateExpression:r}}function _n(e,t,n,r=""){const o=Pe(),a=Pe(!1),s=Pe(null),i=t.at(-1).componentId,l=W(()=>e.getComponentById(i)),{evaluateExpression:c}=fc(e);function u(){var v;const h=e.getComponentById(i);if((v=h==null?void 0:h.binding)!=null&&v.stateRef)return c(h.binding.stateRef,t)}function d(h,v,y){var p,_;o.value=h;const g=(p=l.value.handlers)==null?void 0:p[v],w=((_=l.value.binding)==null?void 0:_.eventType)==v,A=Sf(e,i,v).isLinked.value;if(!g&&!w&&!A)return;if(a.value){s.value={eventValue:h,emitEventType:v};return}a.value=!0;const C=()=>{a.value=!1,s.value&&(d(s.value.eventValue,s.value.emitEventType),s.value=null),y==null||y()},b=new CustomEvent(v,{detail:{payload:h,callback:C}});n.value instanceof HTMLElement?n.value.dispatchEvent(b):n.value.$el.dispatchEvent(b)}return Ge(()=>u(),h=>{a.value||(o.value=h)},{immediate:!0}),Ge(o,h=>{typeof h>"u"&&(o.value=r)},{immediate:!0}),{formValue:o,handleInput:d}}const eN={key:0},tN=Ie({__name:"BaseInputWrapper",props:{label:{type:String,required:!1,default:void 0},isHorizontal:{type:Boolean,required:!1}},setup(e){return(t,n)=>(I(),M("div",{ref:"rootEl",class:ct(["BaseInputWrapper",{horizontal:e.isHorizontal}])},[e.label?(I(),M("label",eN,Me(e.label),1)):_e("",!0),Yt(t.$slots,"default",{},void 0,!0)],2))}}),Dn=Ne(tN,[["__scopeId","data-v-1cbc4730"]]),nN=["checked","value"],rN=["for"],Sm={a:"Option A",b:"Option B"},oN="A user input component that allows users to choose multiple values from a list of options using checkboxes.",aN=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected options.
	# The payload will be a list, as multiple options are allowed.

	state["selected"] = payload`,sN={writer:{name:"Checkbox Input",description:oN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:q.KeyValue,default:JSON.stringify(Sm,null,2),validator:Fo},orientation:{name:"Orientation",type:q.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:We.Style,desc:"Specify how to lay out the options."},primaryTextColor:Zt,accentColor:mn,cssClasses:at},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:aN.trim(),bindable:!0,eventPayloadExample:Object.keys(Sm)}}}},iN=Ie({...sN,__name:"CoreCheckboxInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),a=ee(re.flattenedInstancePath),{formValue:s,handleInput:i}=_n(r,o,n);function l(){return n.value?Array.from(n.value.$el.querySelectorAll('input[type="checkbox"]')).map(d=>d.checked?d.value:void 0).filter(d=>typeof d<"u"):void 0}return(c,u)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreCheckboxInput"},{default:et(()=>[D("div",{class:ct(["options",{horizontal:x(t).orientation.value=="horizontal"}])},[(I(!0),M(ze,null,xt(x(t).options.value,(d,h)=>(I(),M("div",{key:h,class:"option"},[D("input",{type:"checkbox",checked:Array.isArray(x(s))?x(s).includes(h):!1,value:h,onInput:u[0]||(u[0]=v=>x(i)(l(),"wf-options-change"))},null,40,nN),D("label",{for:`${x(a)}-option-${h}`},Me(d),9,rN)]))),128))],2)]),_:1},8,["label"]))}}),lN=Ne(iN,[["__scopeId","data-v-c48ee644"]]),cN=["value","list"],uN=["id"],dN=Ie({__name:"BaseInputColor",props:{value:{type:String,required:!1,default:void 0},customColors:{type:Array,default:()=>[]}},emits:{"update:value":e=>typeof e=="string",change:e=>typeof e=="string"},setup(e,{emit:t}){const n=e,r=t,o=st("pickerEl"),a=ee(re.flattenedInstancePath),s=W(()=>{var c;return(c=n.customColors)!=null&&c.length?`${a}_datalist`:null});function i(c){r("update:value",c.target.value)}function l(c){r("change",c.target.value)}return(c,u)=>(I(),M(ze,null,[D("input",{ref_key:"pickerEl",ref:o,type:"color",class:"BaseInputColor",value:e.value,list:s.value,onInput:i,onChange:l},null,40,cN),s.value?(I(),M("datalist",{key:0,id:s.value},[(I(!0),M(ze,null,xt(e.customColors,d=>(I(),M("option",{key:d},Me(d),1))),128))],8,uN)):_e("",!0)],64))}}),fN=Ne(dN,[["__scopeId","data-v-ba449f16"]]),pN="A user input component that allows users to select a color using a color picker interface.",Im=`
def onchange_handler(state, payload):

	# Set the state variable "new_color" to the new value, provided as string.

	state["new_color"] = payload`,hN={name:"Color Input",description:pN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},colorList:{name:"Color List",desc:"List of predefined colors",type:q.Object,init:JSON.stringify([St.Blue5,St.Green5,St.Orange5,St.Gray6,St.Blue4]),validator:h_},cssClasses:at},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Im,bindable:!0,eventPayloadExample:St.Blue5},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Im,eventPayloadExample:St.Blue5}}},mN={writer:hN},vN=Ie({...mN,__name:"CoreColorInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),a=W(()=>Array.isArray(t.colorList.value)?t.colorList.value:void 0),{formValue:s,handleInput:i}=_n(r,o,n);return(l,c)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreColorInput"},{default:et(()=>[He(fN,{value:x(s),"custom-colors":a.value,"onUpdate:value":c[0]||(c[0]=u=>x(i)(u,"wf-change")),onChange:c[1]||(c[1]=u=>x(i)(u,"wf-change-finish"))},null,8,["value","custom-colors"])]),_:1},8,["label"]))}}),gN=Ne(vN,[["__scopeId","data-v-f4b5e938"]]),yN=["value"],_N="A user input component that allows users to select a date using a date picker interface.",bN=`
def onchange_handler(state, payload):

	# Set the state variable "new_date" to the new value, provided as a YYYY-MM-DD string.

	state["new_date"] = payload`,wN={writer:{name:"Date Input",description:_N,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},cssClasses:at},events:{"wf-date-change":{desc:"Capture changes to this control.",stub:bN,bindable:!0,eventPayloadExample:new Date().toISOString().split("T")[0]}}}},AN=Ie({...wN,__name:"CoreDateInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),{formValue:a,handleInput:s}=_n(r,o,n);return(i,l)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreDateInput"},{default:et(()=>[D("input",{type:"date",value:x(a),onChange:l[0]||(l[0]=c=>x(s)(c.target.value,"wf-date-change"))},null,40,yN)]),_:1},8,["label"]))}}),CN=Ne(AN,[["__scopeId","data-v-d6140e2d"]]),$N=Ie({__name:"WdsDropdownInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=co(e,"modelValue");return(n,r)=>hn((I(),M("select",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),class:"WdsDropdownInput colorTransformer"},[Yt(n.$slots,"default",{},void 0,!0)],512)),[[$d,t.value]])}}),V_=Ne($N,[["__scopeId","data-v-a262dc28"]]),SN=["value"],IN="A user input component that allows users to select a single value from a list of options using a dropdown menu.",Em={a:"Option A",b:"Option B"},EN=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,kN={writer:{name:"Dropdown Input",description:IN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:q.KeyValue,default:JSON.stringify(Em,null,2),validator:Fo},cssClasses:at},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:EN.trim(),bindable:!0,eventPayloadExample:Object.keys(Em)[0]}}}},TN=Ie({...kN,__name:"CoreDropdownInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),{formValue:a,handleInput:s}=_n(r,o,n);return(i,l)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreDropdownInput"},{default:et(()=>[He(V_,{modelValue:x(a),"onUpdate:modelValue":l[0]||(l[0]=c=>an(a)?a.value=c:null),onInput:l[1]||(l[1]=c=>x(s)(c.target.value,"wf-option-change"))},{default:et(()=>[(I(!0),M(ze,null,xt(x(t).options.value,(c,u)=>(I(),M("option",{key:u,value:u},Me(c),9,SN))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]))}}),xN=Ne(TN,[["__scopeId","data-v-8e1a01b0"]]),PN={class:"main"},MN={key:0,class:"file-input"},ON=["multiple","accept"],NN={key:0,class:"file-input__files"},RN=["onClick"],LN={key:1},DN={key:1,class:"status"},BN={key:1},FN={key:2},km=200*1024*1024,jN="A user input component that allows users to upload files.",VN=`
def onchange_handler(state, payload):

	# An array of dictionaries is provided in the payload
	# The dictionaries have the properties name, type and data
    # The data property is a file-like object

    uploaded_files = payload
    for i, uploaded_file in enumerate(uploaded_files):
		name = uploaded_file.get("name")
        file_data = uploaded_file.get("data")
        with open(f"{name}-{i}.jpeg", "wb") as file_handle:
            file_handle.write(file_data)`.trim(),UN={writer:{name:"File Input",description:jN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},allowFileTypes:{name:"Allowed file types",type:q.Text,init:[".pdf",".txt",".doc","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].join(", "),desc:"Provides hints for browsers to select the correct file types. You can specify extensions and MIME types separated by comma, or leave empty to accept any file."},allowMultipleFiles:{...Pt,name:"Allow multiple files",default:"no"},cssClasses:at},events:{"wf-file-change":{desc:"Capture changes to this control.",stub:VN,bindable:!0,eventPayloadExample:[{name:"hello.txt",type:"text/plain",data:"data:text/plain;base64,SGVsbG8gd29ybGQK"}]}}}},HN=Ie({...UN,__name:"CoreFileInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=st("fileEl"),o=Pe(null),a=ee(re.core),s=ee(re.instancePath),i=Pe(null),{formValue:l,handleInput:c}=_n(a,s,n),u=W(()=>Array.isArray(l.value)?l.value:[]),d=W(()=>{var b;return((b=t.allowFileTypes)==null?void 0:b.value)??""}),h=W(()=>t.allowMultipleFiles.value||void 0),v=async b=>{const p=new FileReader;return p.readAsDataURL(b),new Promise((_,S)=>{p.onload=()=>_(p.result),p.onerror=()=>S(p.error)})},y=async b=>{const p=b.target;if(!p.files||p.files.length==0)return;const _=async()=>{let R=0;o.value=null;const Y=Promise.all(Array.from(p.files).map(async X=>(R+=X.size,{name:X.name,type:X.type,data:await v(X)})));return R>km?(o.value=`Files are too big. Total size limit is ${Math.floor(km/Math.pow(1024,2))}mb.`,[]):Y};i.value=Array.from(p.files).map(R=>R.name),l.value=_();const S=()=>{i.value=null};c(_(),"wf-file-change",S)};Ge(l,b=>{typeof b>"u"&&r.value&&(r.value.value="")});function g(b){const p=document.createElement("a");p.href=String(b.data),p.download=b.name,p.click(),p.remove()}const w=W(()=>h.value?"files":"file"),A=W(()=>`Browse ${w.value}`),C=W(()=>`No ${w.value} selected`);return(b,p)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:i.value?"":x(t).label.value,class:"CoreFileInput"},{default:et(()=>[D("div",PN,[i.value?_e("",!0):(I(),M("div",MN,[hn(D("input",{ref_key:"fileEl",ref:r,type:"file",multiple:h.value,accept:d.value,onChange:p[0]||(p[0]=_=>y(_))},null,40,ON),[[or,!1]]),D("div",null,[He(Nn,{variant:"tertiary",size:"small",onClick:p[1]||(p[1]=_=>x(r).click())},{default:et(()=>[Bt(Me(A.value),1)]),_:1})]),u.value?(I(),M("ul",NN,[(I(!0),M(ze,null,xt(u.value,(_,S)=>(I(),M("li",{key:S},[D("a",{href:"#",onClick:R=>g(_)},Me(_.name),9,RN)]))),128))])):(I(),M("p",LN,Me(C.value),1))])),o.value||i.value?(I(),M("div",DN,[i.value?(I(),Ve($_,{key:0,class:"loadingSymbol"})):_e("",!0),i.value?(I(),M("span",BN,"Processing "+Me(i.value.join(", "))+"...",1)):_e("",!0),o.value?(I(),M("span",FN,Me(o.value),1)):_e("",!0)])):_e("",!0)])]),_:1},8,["label"]))}}),zN=Ne(HN,[["__scopeId","data-v-bed4324c"]]),KN=["id","data-mode","data-list-position","aria-activedescendant"],WN={class:"placeholder"},qN={key:0,class:"desc",role:"option"},GN={key:1,class:"desc",role:"option"},JN=["onClick"],YN=["id","data-list-offset","onMousemove","onClick"],XN={key:0,class:"empty"},Tm=200,QN=Ie({__name:"BaseSelect",props:{baseId:{type:String,required:!0},activeValue:{type:[Array,String],required:!0},options:{type:Object,required:!0},maximumCount:{type:Number,required:!0},mode:{type:String,required:!0},placeholder:{type:String,required:!1,default:void 0}},emits:["change"],setup(e,{emit:t}){ts(Ce=>({"288cacf2":`${Tm}px`}));const n=t,r=e,{baseId:o,options:a,maximumCount:s,mode:i,placeholder:l}=Kl(r),c=W(()=>typeof r.activeValue=="string"?[r.activeValue]:r.activeValue),u=st("rootEl"),d=st("inputEl"),h=st("selectedOptionsEl"),v=st("listEl"),y=Pe(""),g=Pe(null),w=Pe([]),A=Pe("hidden"),C=W(()=>{if(i.value=="multiple"&&b.value)return{};const Ce={};return Object.entries(a.value).forEach(([be,fe])=>{i.value=="multiple"&&w.value.includes(be)||String(fe).toLocaleLowerCase().includes(y.value.toLocaleLowerCase())&&(Ce[be]=fe)}),Ce}),b=W(()=>!(s.value<=0||w.value.length<s.value));Ge(c,()=>{w.value=c.value.filter(Ce=>a.value[Ce]!==void 0)},{immediate:!0}),Ge(C,()=>{p()});function p(){if(g.value<=0){g.value=0;return}const Ce=Object.keys(C.value).length-1;g.value>=Ce&&(g.value=Ce)}Ge(g,()=>{var be;if(g.value===null)return;const Ce=(be=u.value)==null?void 0:be.querySelector(`[data-list-offset="${g.value}"]`);Ce&&Ce.scrollIntoView({block:"nearest",inline:"nearest"})});function _(){const Ce=Object.keys(a.value),be=w.value.filter(fe=>Ce.includes(fe));n("change",be)}function S(Ce){const be=w.value.indexOf(Ce);be!==-1&&(w.value.splice(be,1),g.value=null),_()}function R(){w.value.pop(),_()}async function Y(Ce=!1){A.value="hidden",y.value="",Ce&&(await Hn(),u.value&&(u.value.tabIndex=0,u.value.focus()))}function X(Ce){const be=Ce.key;if(be=="Escape"){Ce.preventDefault(),Y(!0);return}if(be!=="Tab"&&be!=="Shift"&&A.value=="hidden"){qe();return}if(be=="Enter"){if(g.value===null)return;const fe=Object.keys(C.value);if(!fe||fe.length==0)return;$e(fe[g.value]);return}if(be=="ArrowUp"){if(Ce.preventDefault(),g.value===null){const fe=Object.keys(C.value).length-1;g.value=fe;return}g.value--,p();return}if(be=="ArrowDown"){if(Ce.preventDefault(),g.value===null){g.value=0;return}g.value++,p();return}}function te(Ce){i.value=="multiple"&&Ce.key=="Backspace"&&!y.value&&R()}async function $e(Ce){if(i.value=="single")w.value=[];else if(w.value.includes(Ce))return;w.value.push(Ce),_(),y.value="",w.value.length==s.value&&Y(!0),await Hn(),h.value.scrollTop=h.value.scrollHeight}function pe(Ce){const be=Ce.relatedTarget;u.value&&(u.value.contains(be)||Y(!1))}function we(Ce){const be=Ce.relatedTarget;u.value&&(u.value.contains(be)||Y(!0))}function ye(Ce){Ce.target.dataset.preventList||qe()}async function qe(){var fe;if(A.value!=="hidden")return;const{bottom:Ce}=u.value.getBoundingClientRect(),be=document.body.clientHeight;Tm+Ce>=be?A.value="top":A.value="bottom",await Hn(),u.value.tabIndex=-1,(fe=d.value)==null||fe.focus()}function Te(Ce){g.value=Ce}return(Ce,be)=>(I(),M("div",{id:x(o),ref_key:"rootEl",ref:u,class:"BaseSelect colorTransformer",tabindex:"0","data-mode":x(i),"data-list-position":A.value,role:"listbox","aria-activedescendant":g.value?`${x(o)}-option-${g.value}`:void 0,onKeydown:X,onClick:ye,onFocusout:pe},[D("div",{ref_key:"selectedOptionsEl",ref:h,class:"selectedOptions"},[hn(D("div",WN,[x(l)?(I(),M(ze,{key:0},[Bt(Me(x(l)),1)],64)):x(i)=="multiple"&&x(s)>0?(I(),M(ze,{key:1},[Bt("Select up to "+Me(x(s))+" option"+Me(x(s)>1?"s":"")+"...",1)],64)):x(i)=="multiple"?(I(),M(ze,{key:2},[Bt("Select options....")],64)):x(i)=="single"?(I(),M(ze,{key:3},[Bt("Select an option...")],64)):_e("",!0)],512),[[or,w.value.length==0]]),(I(!0),M(ze,null,xt(w.value,fe=>{var de,L;return I(),M("div",{key:fe,class:ct(["option",{notFound:!((de=x(a))!=null&&de[fe])}]),"aria-selected":"true"},[(L=x(a))!=null&&L[fe]?(I(),M("div",qN,Me(x(a)[fe]),1)):(I(),M("div",GN,Me(fe),1)),D("div",{class:"remove","data-prevent-list":"true","aria-label":"Remove",onClick:le=>S(fe)},be[1]||(be[1]=[D("i",{class:"material-symbols-outlined"}," close ",-1)]),8,JN)],2)}),128)),hn(D("input",{ref_key:"inputEl",ref:d,"onUpdate:modelValue":be[0]||(be[0]=fe=>y.value=fe),type:"text","aria-autocomplete":"none",tabindex:"-1",onKeydown:te,onBlur:we},null,544),[[ia,y.value]])],512),hn(D("div",{ref_key:"listEl",ref:v,class:"list"},[(I(!0),M(ze,null,xt(C.value,(fe,de,L)=>(I(),M("div",{id:`${x(o)}-option-${L}`,key:`${L}-${de}`,class:ct(["option",{highlighted:g.value==L}]),role:"option","data-list-offset":L,"data-prevent-list":"true",onMousemove:le=>Te(L),onClick:le=>$e(de)},Me(fe),43,YN))),128)),Object.keys(C.value).length==0?(I(),M("div",XN,[x(i)=="multiple"&&b.value?(I(),M(ze,{key:0},[Bt("Up to "+Me(x(s))+" option"+Me(x(s)>1?"s":"")+" allowed.",1)],64)):(I(),M(ze,{key:1},[Bt("No results")],64))])):_e("",!0)],512),[[or,A.value!=="hidden"]])],40,KN))}}),U_=Ne(QN,[["__scopeId","data-v-6871b972"]]),ZN="A user input component that allows users to select multiple values from a searchable list of options.",xm={a:"Option A",b:"Option B"},eR=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,tR={writer:{name:"Multiselect Input",description:ZN,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:q.KeyValue,default:JSON.stringify(xm,null,2),validator:Fo},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:q.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:q.Number,default:"0",validator:Xn},accentColor:{...mn,desc:"The colour of the chips created for each selected option."},chipTextColor:{name:"Chip text",type:q.Color,default:St.White,desc:"The colour of the text in the chips.",category:We.Style,applyStyleVariable:!0},primaryTextColor:Zt,secondaryTextColor:Zn,containerBackgroundColor:fo,separatorColor:sn,cssClasses:at},events:{"wf-options-change":{desc:"Sent when the selected options change.",stub:eR.trim(),bindable:!0,eventPayloadExample:Object.keys(xm)}}}},nR=Ie({...tR,__name:"CoreMultiselectInput",setup(e){const t=ee(re.evaluatedFields),n=W(()=>t.options.value),r=W(()=>t.maximumCount.value),o=Pe(null),a=ee(re.core),s=ee(re.instancePath),i=ee(re.flattenedInstancePath),{formValue:l,handleInput:c}=_n(a,s,o);function u(d){c(d,"wf-options-change")}return(d,h)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:o,label:x(t).label.value,class:"CoreMultiselectInput"},{default:et(()=>[He(U_,{"base-id":x(i),"active-value":x(l),options:n.value,"maximum-count":r.value,mode:"multiple",placeholder:x(t).placeholder.value,onChange:u},null,8,["base-id","active-value","options","maximum-count","placeholder"])]),_:1},8,["label"]))}}),rR=Ne(nR,[["__scopeId","data-v-85d6c368"]]),oR=["value","placeholder","min","max","step"],aR="A user input component that allows users to enter numeric values.",Pm=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,sR={writer:{name:"Number Input",description:aR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},placeholder:{name:"Placeholder",type:q.Text},minValue:{name:"Minimum value",type:q.Number,default:null},maxValue:{name:"Max value",type:q.Number,default:null},valueStep:{name:"Step",type:q.Number,default:"1"},cssClasses:at},events:{"wf-number-change":{desc:"Capture changes as they happen.",stub:Pm,bindable:!0,eventPayloadExample:42},"wf-number-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Pm,eventPayloadExample:42}}}},iR=Ie({...sR,__name:"CoreNumberInput",setup(e){const t=ee(re.evaluatedFields),n=st("rootInstance"),r=st("inputEl"),o=ee(re.core),a=ee(re.instancePath),{formValue:s,handleInput:i}=_n(o,a,n);function l(){if(r.value.value=="")return null;let d=parseFloat(r.value.value);return isNaN(d)||(t.minValue.value!==null&&d<t.minValue.value&&(d=t.minValue.value,r.value.value=d),t.maxValue.value!==null&&d>t.maxValue.value&&(d=t.maxValue.value,r.value.value=d)),d}function c(){const d=l();isNaN(d)||i(d,"wf-number-change")}function u(){const d=l();isNaN(d)||i(d,"wf-number-change-finish")}return(d,h)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreNumberInput"},{default:et(()=>[D("input",{ref_key:"inputEl",ref:r,type:"number",value:x(s),placeholder:x(t).placeholder.value,min:x(t).minValue.value!==null?x(t).minValue.value:void 0,max:x(t).maxValue.value!==null?x(t).maxValue.value:void 0,step:x(t).valueStep.value!==null?x(t).valueStep.value:void 0,onInput:c,onChange:u},null,40,oR)]),_:1},8,["label"]))}}),lR=Ne(iR,[["__scopeId","data-v-f4e3ddb8"]]),cR=["id","checked","value","name","onInput"],uR=["for"],dR="A user input component that allows users to choose a single value from a list of options using radio buttons.",Mm={a:"Option A",b:"Option B"},fR=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected radio option

	state["selected"] = payload`,pR={writer:{name:"Radio Input",description:dR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:q.KeyValue,default:JSON.stringify(Mm,null,2),validator:Fo},orientation:{name:"Orientation",type:q.Text,options:{vertical:"Vertical",horizontal:"Horizontal"},default:"vertical",category:We.Style,desc:"Specify how to lay out the options."},primaryTextColor:Zt,accentColor:mn,cssClasses:at},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:fR.trim(),bindable:!0,eventPayloadExample:Object.keys(Mm)[0]}}}},hR=Ie({...pR,__name:"CoreRadioInput",setup(e){const t=ee(re.evaluatedFields),n=ee(re.flattenedInstancePath),r=Pe(null),o=ee(re.core),a=ee(re.instancePath),{formValue:s,handleInput:i}=_n(o,a,r);return(l,c)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:r,label:x(t).label.value,class:"CoreRadioInput"},{default:et(()=>[D("div",{class:ct(["options",{horizontal:x(t).orientation.value=="horizontal"}])},[(I(!0),M(ze,null,xt(x(t).options.value,(u,d)=>(I(),M("div",{key:d,class:"option"},[D("input",{id:`${x(n)}-option-${d}`,type:"radio",checked:x(s)===d,value:d,name:`${x(n)}-options`,onInput:h=>x(i)(d,"wf-option-change")},null,40,cR),D("label",{for:`${x(n)}-option-${d}`},Me(u),9,uR)]))),128))],2)]),_:1},8,["label"]))}}),mR=Ne(hR,[["__scopeId","data-v-4a0eac98"]]),vR="A user input component that allows users to select a single value from a searchable list of options.",gR={a:"Option A",b:"Option B"},yR=`
def onchange_handler(state, payload):

	# Set the state variable "selected" to the selected option

	state["selected"] = payload`,_R={writer:{name:"Select Input",description:vR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},options:{name:"Options",desc:"Key-value object with options. Must be a JSON string or a state reference to a dictionary.",type:q.KeyValue,default:JSON.stringify(gR,null,2),validator:Fo},placeholder:{name:"Placeholder",desc:"Text to show when no options are selected.",type:q.Text},maximumCount:{name:"Maximum count",desc:"The maximum allowable number of selected options. Set to zero for unlimited.",type:q.Number,default:"0",validator:Xn},accentColor:mn,chipTextColor:{name:"Chip text",type:q.Color,default:St.White,desc:"The color of the text in the chips.",category:We.Style,applyStyleVariable:!0},primaryTextColor:Zt,secondaryTextColor:Zn,containerBackgroundColor:fo,separatorColor:sn,cssClasses:at},events:{"wf-option-change":{desc:"Sent when the selected option changes.",stub:yR.trim(),bindable:!0}}}},bR=Ie({..._R,__name:"CoreSelectInput",setup(e){const t=ee(re.evaluatedFields),n=W(()=>t.options.value),r=Pe(null),o=ee(re.core),a=ee(re.flattenedInstancePath),s=ee(re.instancePath),{formValue:i,handleInput:l}=_n(o,s,r);function c(u){const d=(u==null?void 0:u[0])??null;l(d,"wf-option-change")}return(u,d)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:r,label:x(t).label.value,class:"CoreSelectInput"},{default:et(()=>[He(U_,{"base-id":x(a),"active-value":x(i)?[x(i)]:[],options:n.value,"maximum-count":1,mode:"single",placeholder:x(t).placeholder.value,onChange:c},null,8,["base-id","active-value","options","placeholder"])]),_:1},8,["label"]))}}),wR=Ne(bR,[["__scopeId","data-v-f2ad3b94"]]);function Ml(e,t){const n=W(()=>{var r;return((r=String(t.value).split(".")[1])==null?void 0:r.length)??0});return W(()=>Number(e.value).toFixed(n.value))}const AR={class:"BaseInputRange__popover__content"},CR=Ie({__name:"BaseInputSliderThumb",props:oo({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},sliderBoundingRect:{type:Object,default:void 0},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e,{expose:t}){const n=e;t({handleMouseDown:v,getOffsetLeft:y});const r=co(e,"value"),o=st("thumb"),a=Ml(r,no(n,"step")),s=W(()=>typeof r.value!="number"?50:(r.value-n.min)/(n.max-n.min)*100),i=Pe(n.popoverDisplayMode==="always");let l=null;Ge(no(n.popoverDisplayMode),()=>{n.popoverDisplayMode==="always"&&(i.value=!0)});function c(){n.popoverDisplayMode!=="always"&&(i.value=!0,l&&(clearTimeout(l),l=null),l=setTimeout(()=>{i.value=!1,l=null},1e3))}const u=W(()=>`${s.value}%`),d=W(()=>`${s.value}%`);function h(g){if(c(),n.min!==void 0&&g<n.min||n.max!==void 0&&g>n.max)return;const w=g-n.min,A=Math.round(w/n.step),C=n.min+A*n.step;r.value!==C&&(r.value=C)}function v(g){document.addEventListener("mousemove",A),document.addEventListener("mouseup",C);const w=n.sliderBoundingRect;A(g);function A(b){const p=(b.x-w.left)/(w.right-w.left);if(p>1||p<0)return;const _=(n.max-n.min)*p+n.min;h(_)}function C(){document.removeEventListener("mouseup",C),document.removeEventListener("mousemove",A)}}function y(){return o.value.offsetLeft}return(g,w)=>(I(),M(ze,null,[He(xg,null,{default:et(()=>[hn(D("div",{class:"BaseInputRange__popover",style:$t({left:d.value})},[D("span",AR,Me(x(a)),1)],4),[[or,i.value]])]),_:1}),D("button",{ref_key:"thumb",ref:o,type:"button",class:"BaseInputRange__thumb",style:$t({left:u.value}),"aria-label":"Use the arrow keys to increase or decrease the value.",onKeydown:[w[0]||(w[0]=Do(A=>h(+r.value-e.step),["left"])),w[1]||(w[1]=Do(A=>h(+r.value+e.step),["right"]))],onMousedown:v},null,36)],64))}}),H_=Ne(CR,[["__scopeId","data-v-f2261a8d"]]),$R=["aria-valuemin","aria-valuemax"],SR=Ie({__name:"BaseInputSliderLayout",props:{min:{type:Number,default:0},max:{type:Number,default:100},popoverDisplayMode:{type:String,default:"onChange"}},setup(e){return(t,n)=>(I(),M("div",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,class:ct(["BaseInputRange",{"BaseInputRange--popover-always-visible":e.popoverDisplayMode==="always"}])},[Yt(t.$slots,"default",{},void 0,!0)],10,$R))}}),z_=Ne(SR,[["__scopeId","data-v-4583336d"]]);function K_(e,t=500){const n=Pe(),r=setInterval(()=>{var o;n.value=(o=e.value)==null?void 0:o.getBoundingClientRect()},t);return Pr(()=>{clearInterval(r)}),W(()=>n.value)}const IR=9,ER=Ie({__name:"BaseInputSlider",props:oo({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Number,default:50},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=co(e,"value"),r=st("slider"),o=st("thumb"),a=Ml(n,no(t,"step")),s=W(()=>typeof n.value!="number"?50:(n.value-t.min)/(t.max-t.min)*100),i=K_(r);return Ge(()=>t.min,()=>{typeof n.value=="number"&&n.value<t.min&&(n.value=t.min)},{immediate:!0}),Ge(()=>t.max,()=>{typeof n.value=="number"&&n.value>t.max&&(n.value=t.max)},{immediate:!0}),(l,c)=>(I(),Ve(z_,{min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuenow":e.value,"aria-valuetext":`${x(a)} (${Math.round(s.value)}%)`},{default:et(()=>[D("div",{ref_key:"slider",ref:r,class:"BaseInputRange__slider",onMousedown:c[0]||(c[0]=(...u)=>x(o).handleMouseDown&&x(o).handleMouseDown(...u))},[D("div",{class:"BaseInputRange__slider__progress",style:$t({width:`calc(${s.value}% + ${IR}px)`})},null,4)],544),He(H_,{ref_key:"thumb",ref:o,value:e.value,min:e.min,max:e.max,step:e.step,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":x(i),"onUpdate:value":c[1]||(c[1]=u=>n.value=u)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect"])]),_:1},8,["min","max","popover-display-mode","aria-valuenow","aria-valuetext"]))}}),kR="A user input component that allows users to select numeric values using a slider with optional constraints like min, max, and step.",TR=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,xR={writer:{name:"Slider Input",description:kR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},minValue:{name:"Minimum value",type:q.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:q.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:q.Number,default:"1",init:"1",validator:Xn},accentColor:mn,popoverColor:{name:"Popover color",type:q.Color,category:We.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:q.Color,category:We.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:at},events:{"wf-number-change":{desc:"Capture changes to this control.",stub:TR,bindable:!0}}}},PR=Ie({...xR,__name:"CoreSliderInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),{formValue:a,handleInput:s}=_n(r,o,n,50);return(i,l)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreSliderInput"},{default:et(()=>[He(ER,{"popover-display-mode":"always",value:x(a),min:x(t).minValue.value,max:x(t).maxValue.value,step:x(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=c=>x(s)(c,"wf-number-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),MR=Ne(PR,[["__scopeId","data-v-c2e33d68"]]),OR=9,NR=Ie({__name:"BaseInputSliderRange",props:oo({min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},popoverDisplayMode:{type:String,default:"onChange"}},{value:{type:Array,default:()=>[20,60]},valueModifiers:{}}),emits:["update:value"],setup(e){const t=e,n=co(e,"value");function r(w,A){const C=[...n.value];C[w]=A,n.value=C.sort((b,p)=>b-p)}const o=st("slider"),a=st("thumbs");function s(w){const A=a.value[0],C=a.value[1],b=Math.abs(w.x-A.getOffsetLeft()),p=Math.abs(w.x-C.getOffsetLeft());b>p?C.handleMouseDown(w):A.handleMouseDown(w)}const i=W(()=>Math.min(...n.value)),l=W(()=>Math.max(...n.value)),c=no(t,"step"),u=Ml(i,c),d=Ml(l,c),h=W(()=>`from ${u} to ${d}`),v=W(()=>typeof i.value!="number"?50:(i.value-t.min)/(t.max-t.min)*100),y=W(()=>typeof l.value!="number"?50:(l.value-t.min)/(t.max-t.min)*100-v.value),g=K_(o);return Ge(()=>t.min,()=>{n.value.some(w=>w<t.min)&&(n.value=n.value.map(w=>w<t.min?t.min:w))},{immediate:!0}),Ge(()=>t.max,()=>{n.value.some(w=>w>t.max)&&(n.value=n.value.map(w=>w>t.max?t.max:w))},{immediate:!0}),(w,A)=>(I(),Ve(z_,{class:"BaseInputRangeSlider",min:e.min,max:e.max,"popover-display-mode":e.popoverDisplayMode,"aria-valuetext":h.value},{default:et(()=>[D("div",{ref_key:"slider",ref:o,class:"BaseInputRange__slider",onMousedown:s},[D("div",{class:"BaseInputRange__slider__progress",style:$t({width:`calc(${y.value}% + ${OR}px)`,marginLeft:`${v.value}%`})},null,4)],544),(I(),M(ze,null,xt([0,1],C=>He(H_,{key:C,ref_for:!0,ref_key:"thumbs",ref:a,value:e.value[C],min:e.min,max:e.max,step:c.value,"popover-display-mode":e.popoverDisplayMode,"slider-bounding-rect":x(g),"onUpdate:value":b=>r(C?1:0,b)},null,8,["value","min","max","step","popover-display-mode","slider-bounding-rect","onUpdate:value"])),64))]),_:1},8,["min","max","popover-display-mode","aria-valuetext"]))}}),RR="A user input component that allows users to select numeric values range using a range slider with optional constraints like min, max, and step.",LR=`
def onchange_handler(state, payload):

	# Set the state variables "from" & "to" to the new range
	state["from"] = payload[0]
	state["to"] = payload[1]`,DR={writer:{name:"Slider Range Input",description:RR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},minValue:{name:"Minimum value",type:q.Number,default:"0",init:"0"},maxValue:{name:"Maximum value",type:q.Number,default:"100",init:"100"},stepSize:{name:"Step size",type:q.Number,default:"1",init:"1",validator:Xn},accentColor:mn,popoverColor:{name:"Popover color",type:q.Color,category:We.Style,applyStyleVariable:!0,default:"white"},popoverBackgroundColor:{name:"Popover background",type:q.Color,category:We.Style,applyStyleVariable:!0,default:"rgba(0, 0, 0, 1)"},cssClasses:at},events:{"wf-range-change":{desc:"Capture changes to this control.",stub:LR,bindable:!0}}}},BR=Ie({...DR,__name:"CoreSliderRangeInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),{formValue:a,handleInput:s}=_n(r,o,n,[20,50]);return(i,l)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreSliderInput"},{default:et(()=>[He(NR,{"popover-display-mode":"always",value:x(a),min:x(t).minValue.value,max:x(t).maxValue.value,step:x(t).stepSize.value,"onUpdate:value":l[0]||(l[0]=c=>x(s)(c,"wf-range-change"))},null,8,["value","min","max","step"])]),_:1},8,["label"]))}}),FR=Ne(BR,[["__scopeId","data-v-6297ca8b"]]),jR=["type","value","placeholder"],VR="A user input component that allows users to enter single-line text values.",Om=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,UR={writer:{name:"Text Input",description:VR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},placeholder:{name:"Placeholder",type:q.Text},passwordMode:{...Pt,name:"Password mode",default:"no",category:We.Style},accentColor:mn,cssClasses:at},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Om,bindable:!0,eventPayloadExample:"The content of the input"},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Om,eventPayloadExample:"The content of the input"}}}},HR=Ie({...UR,__name:"CoreTextInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),{formValue:a,handleInput:s}=_n(r,o,n);return(i,l)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreTextInput"},{default:et(()=>[D("input",{type:x(t).passwordMode.value?"password":"text",value:x(a),placeholder:x(t).placeholder.value,"aria-autocomplete":"none",onInput:l[0]||(l[0]=c=>x(s)(c.target.value,"wf-change")),onChange:l[1]||(l[1]=c=>x(s)(c.target.value,"wf-change-finish"))},null,40,jR)]),_:1},8,["label"]))}}),zR=Ne(HR,[["__scopeId","data-v-72b1ab62"]]),KR=["value","placeholder","rows"],WR="A user input component that allows users to enter multi-line text values.",Nm=`
def onchange_handler(state, payload):

	# Set the state variable "new_val" to the new value

	state["new_val"] = payload`,qR={writer:{name:"Textarea Input",description:WR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},placeholder:{name:"Placeholder",type:q.Text,control:Zl.Textarea},rows:{name:"Rows",type:q.Number,init:"5",default:"5",validator:Xn},cssClasses:at},events:{"wf-change":{desc:"Capture changes as they happen.",stub:Nm,bindable:!0,eventPayloadExample:"The content of the textarea"},"wf-change-finish":{desc:"Capture changes once this control has lost focus.",stub:Nm,eventPayloadExample:"The content of the textarea"}}}},GR=Ie({...qR,__name:"CoreTextareaInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),{formValue:a,handleInput:s}=_n(r,o,n);return(i,l)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreTextareaInput"},{default:et(()=>[D("textarea",{value:x(a),placeholder:x(t).placeholder.value,rows:x(t).rows.value,onInput:l[0]||(l[0]=c=>x(s)(c.target.value,"wf-change")),onChange:l[1]||(l[1]=c=>x(s)(c.target.value,"wf-change-finish"))},null,40,KR)]),_:1},8,["label"]))}}),JR=Ne(GR,[["__scopeId","data-v-712b09e1"]]),YR=["value"],XR="A user input component that allows users to select a time.",QR=`
def onchange_handler(state, payload):

	# Set the state variable "new_time" to the new value, provided as a hh:mm string (in 24-hour format that includes leading zeros).

	state["new_time"] = payload`,ZR={writer:{name:"Time Input",description:XR,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},cssClasses:at},events:{"wf-time-change":{desc:"Capture changes to this control.",stub:QR,bindable:!0,eventPayloadExample:"9:30"}}}},eL=Ie({...ZR,__name:"CoreTimeInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),{formValue:a,handleInput:s}=_n(r,o,n);return(i,l)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,class:"CoreTimeInput"},{default:et(()=>[D("input",{type:"time",value:x(a),onChange:l[0]||(l[0]=c=>x(s)(c.target.value,"wf-time-change"))},null,40,YR)]),_:1},8,["label"]))}}),tL=Ne(eL,[["__scopeId","data-v-a0be88c1"]]),nL={key:0,class:"filler light"},rL={key:1,class:"face"},oL={viewBox:"0 0 100 100"},aL=["d"],sL="A user input component that allows users to provide a rating.",iL=`
def onchange_handler(state, payload):

	# Set the state variable "rating" to the new value

	state["rating"] = payload`,lL={writer:{name:"Rating Input",description:sL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},feedback:{name:"Feedback",default:"stars",type:q.Text,options:{stars:"Stars",faces:"Faces",hearts:"Hearts"}},minValue:{name:"Minimum value",type:q.Number,default:"1",desc:"Valid values are 0 and 1.",validator:zs(0,1)},maxValue:{name:"Max value",type:q.Number,default:"5",desc:"Valid values are between 2 and 11.",validator:zs(2,11)},valueStep:{name:"Step",type:q.Number,default:"1",desc:"Valid values are between 0.25 and 1.",validator:zs(.25,1)},accentColor:mn,primaryTextColor:Zt,cssClasses:at},events:{"wf-number-change":{stub:iL,bindable:!0}}}},cL=Ie({...lL,__name:"CoreRatingInput",setup(e){const t=ee(re.evaluatedFields),n=st("rootInstance"),r=st("unitsEl"),o=ee(re.core),a=ee(re.instancePath),s=Pe(null),{formValue:i,handleInput:l}=_n(o,a,n);function c(p){const _=p.offsetX,S=r.value.querySelectorAll(".unit");let R=0;return S.forEach(Y=>{const X=Y;_>X.offsetLeft+X.offsetWidth?R++:_>X.offsetLeft&&(R+=(_-X.offsetLeft)/X.offsetWidth)}),R}function u(p){let _=Math.ceil(p/C.value)*C.value;return _=Math.max(Math.min(_,A.value),w.value),_}function d(p){const _=c(p);return u(_)}function h(p){const _=d(p);s.value=_}function v(){s.value=null}function y(p){const _=Math.max(Math.min(p,A.value),w.value),S=45,R=95,Y=(_-w.value)/(A.value-w.value),X=Y*-10,te=70+X,$e=S+Y*(R-S)+X;return`M30,${te} Q50,${$e} 70,${te}`}function g(p){const _=d(p);l(_,"wf-number-change")}const w=W(()=>Math.max(Math.min(t.minValue.value,1),0)),A=W(()=>Math.max(Math.min(t.maxValue.value,11),2)),C=W(()=>Math.max(Math.min(t.valueStep.value,1),.25)),b=W(()=>{if(s.value!==null)return s.value;const p=parseFloat(i.value);return isNaN(p)?null:p});return(p,_)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,class:"CoreRatingInput",label:x(t).label.value},{default:et(()=>[D("div",{ref_key:"unitsEl",ref:r,class:ct(["units",{valueSet:b.value!==null}]),onClick:g,onMousemove:h,onMouseout:v},[(I(!0),M(ze,null,xt([...Array(A.value).keys()],S=>(I(),M("div",{key:S,class:ct(["unit",x(t).feedback.value])},[D("div",{class:"filler",style:$t({width:`${b.value>S?Math.min(b.value-S,1)*100:0}%`})},null,4),b.value!==null?(I(),M("div",nL)):_e("",!0),x(t).feedback.value=="faces"?(I(),M("div",rL,[(I(),M("svg",oL,[_[0]||(_[0]=D("circle",{class:"eye left",cx:"35",cy:"38",r:"6"},null,-1)),_[1]||(_[1]=D("circle",{class:"eye right",cx:"65",cy:"38",r:"6"},null,-1)),D("path",{class:"mouth",d:y(b.value??S+1)},null,8,aL)]))])):_e("",!0)],2))),128))],34)]),_:1},8,["label"]))}}),uL=Ne(cL,[["__scopeId","data-v-640d42e2"]]),dL=["aria-checked","onKeydown"],fL="A user input component with a simple on/off status.",pL=`
def handle_toggle(state, payload):

	# The payload will be a bool 

	state["its_on"] = payload`,hL={writer:{name:"Switch Input",description:fL,category:"Input",fields:{label:{name:"Label",init:"Input Label",type:q.Text},accentColor:mn,primaryTextColor:Zt,separatorColor:sn,cssClasses:at},events:{"wf-toggle":{desc:"Sent when the switch is toggled.",stub:pL.trim(),bindable:!0}}}},mL=Ie({...hL,__name:"CoreSwitchInput",setup(e){const t=ee(re.evaluatedFields),n=Pe(null),r=ee(re.core),o=ee(re.instancePath),{formValue:a,handleInput:s}=_n(r,o,n);function i(){s(!a.value,"wf-toggle")}return(l,c)=>(I(),Ve(Dn,{ref_key:"rootInstance",ref:n,label:x(t).label.value,"is-horizontal":!0,class:"CoreSwitchInput"},{default:et(()=>[D("div",{class:ct(["switch",{on:!!x(a)}]),tabindex:"0",role:"switch","aria-checked":!!x(a),onClick:i,onKeydown:Do($r(i,["prevent"]),["enter","space"])},c[0]||(c[0]=[D("div",{class:"toggle"},null,-1)]),42,dL)]),_:1},8,["label"]))}}),vL=Ne(mL,[["__scopeId","data-v-ab3f108e"]]),gL=Ie({__name:"BaseContainer",props:{contentHAlign:{},contentVAlign:{},contentPadding:{},isHorizontal:{type:Boolean}},setup(e){const t=e,n=W(()=>{const r={padding:t.contentPadding};return t.isHorizontal?{...r,justifyContent:t.contentHAlign,alignItems:t.contentVAlign}:{...r,alignItems:t.contentHAlign,justifyContent:t.contentVAlign}});return(r,o)=>(I(),M("div",{class:ct(["BaseContainer",{horizontal:t.isHorizontal}]),style:$t(n.value),"data-writer-container":""},[Yt(r.$slots,"default",{},void 0,!0)],6))}}),hi=Ne(gL,[["__scopeId","data-v-4caa740e"]]),yL={class:"BaseCollapseIcon__icon material-symbols-outlined"},_L=Ie({__name:"BaseCollapseButton",props:oo({direction:{type:String,required:!0}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=co(e,"modelValue"),r=W(()=>{switch(t.direction){case"left-right":return"chevron_left";case"top-bottom":return"keyboard_arrow_up";case"right-left":return"chevron_right";case"bottom-top":return"keyboard_arrow_down";default:return"keyboard_arrow_up"}});return(o,a)=>(I(),Ve(Nn,{class:ct(["BaseCollapseIcon",{"BaseCollapseIcon--collapsed":n.value}]),variant:"tertiary",size:"icon",onClick:a[0]||(a[0]=s=>n.value=!n.value)},{default:et(()=>[D("i",yL,Me(r.value),1)]),_:1},8,["class"]))}}),kf=Ne(_L,[["__scopeId","data-v-e3ca49f7"]]),bL={key:0,class:"header"},wL={key:0,class:"titleContainer"},AL={key:0},CL={key:1,class:"collapsedTitle"},$L={class:"transformed"},SL={class:"content"},IL="A layout component that organizes its child components in columns. Must be inside a Column Container component.",EL={writer:{name:"Column",description:IL,allowedParentTypes:["columns","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{title:{name:"Title",type:q.Text},width:{name:"Width (factor)",default:"1",init:"1",type:q.Number,desc:"Relative size when compared to other columns in the same container. A column of width 2 will be double the width of one with width 1.",category:We.Style,validator:Xn},isSticky:{...Pt,name:"Sticky",default:"no",category:We.Style},isCollapsible:y_,startCollapsed:{...$f,desc:"Only applied when the column is collapsible."},separatorColor:sn,contentPadding:cs,contentHAlign:ls,contentVAlign:Cf,cssClasses:at}}},kL=Ie({...EL,__name:"CoreColumn",setup(e){const t=ee(re.instancePath),n=ee(re.instanceData),r=ee(re.core),o=ee(re.componentId),a=ee(re.evaluatedFields),s=W(()=>!!a.isCollapsible.value),i=Pe(a.isCollapsible.value&&a.startCollapsed.value),l=W(()=>{let v;return i.value?v="0 0 32px":v=`${a.width.value} 0 0`,{flex:v}}),c=W(()=>{var v,y;return h.value>=((y=(v=d.value)==null?void 0:v.value)==null?void 0:y.minimumNonCollapsiblePosition)}),u=W(()=>c.value?"right-left":"left-right"),d=W(()=>{var v;for(let y=-1;y>-1*t.length;y--){const g=t.at(y);if(((v=r.getComponentById(g.componentId))==null?void 0:v.type)!=="columns")continue;return n.at(y)}return null}),h=W(()=>{var v;return(v=r.getComponentById(o))==null?void 0:v.position});return Ge([()=>a.isCollapsible.value,h],()=>{const v=d.value;v&&(v.value={minimumNonCollapsiblePosition:void 0})}),Ge(d,v=>{!v||!v.value||s.value||typeof v.value.minimumNonCollapsiblePosition<"u"&&h.value>=v.value.minimumNonCollapsiblePosition||(v.value.minimumNonCollapsiblePosition=h.value)},{immediate:!0,deep:!0}),(v,y)=>(I(),M("div",{class:ct(["CoreColumn",{sticky:x(a).isSticky.value,collapsible:s.value,collapsibleToRight:c.value,collapsed:i.value}]),style:$t(l.value)},[x(a).title.value||s.value?(I(),M("div",bL,[i.value?_e("",!0):(I(),M("div",wL,[x(a).title.value?(I(),M("h3",AL,Me(x(a).title.value),1)):_e("",!0)])),s.value?(I(),Ve(kf,{key:1,modelValue:i.value,"onUpdate:modelValue":y[0]||(y[0]=g=>i.value=g),class:"collapser",direction:u.value},null,8,["modelValue","direction"])):_e("",!0)])):_e("",!0),i.value&&x(a).title.value?(I(),M("div",CL,[D("div",$L,[D("div",SL,Me(x(a).title.value),1)])])):_e("",!0),He(hi,{class:"container","aria-expanded":s.value?i.value:null,"content-h-align":x(a).contentHAlign.value,"content-v-align":x(a).contentVAlign.value,"content-padding":x(a).contentPadding.value},{default:et(()=>[Yt(v.$slots,"default",{},void 0,!0)]),_:3},8,["aria-expanded","content-h-align","content-v-align","content-padding"])],6))}}),TL=Ne(kL,[["__scopeId","data-v-9ec0335d"]]),xL={class:"CoreColumns horizontal","data-writer-container":""},PL={writer:{name:"Column Container",description:"Serves as container for Column components",allowedChildrenTypes:["column","repeater","separator"],category:"Layout",fields:{cssClasses:at}}},ML=Ie({...PL,__name:"CoreColumns",setup(e){const t=ee(re.instanceData);return t.at(-1).value={minimumNonCollapsiblePosition:void 0},(n,r)=>(I(),M("div",xL,[Yt(n.$slots,"default",{},void 0,!0)]))}}),OL=Ne(ML,[["__scopeId","data-v-616070ed"]]),NL={class:"CoreHeader"},RL={class:"container horizontal","data-writer-container":""},LL="A container component that typically contains the main navigation elements.",DL={writer:{name:"Header",description:LL,category:"Layout",allowedChildrenTypes:["*"],fields:{text:{name:"Text",init:"Header Text",default:"(No text)",type:q.Text},primaryTextColor:Zt,cssClasses:at},previewField:"text"}},BL=Ie({...DL,__name:"CoreHeader",setup(e){const t=ee(re.evaluatedFields);return(n,r)=>(I(),M("div",NL,[D("h1",null,Me(x(t).text.value),1),D("div",RL,[Yt(n.$slots,"default",{},void 0,!0)])]))}}),FL=Ne(BL,[["__scopeId","data-v-0dba4bfb"]]),jL="A layout component that stacks its child components horizontally, wrapping them to the next row if necessary.",VL={writer:{name:"Horizontal Stack",description:jL,allowedChildrenTypes:["*"],category:"Layout",fields:{contentPadding:{...cs,default:"0"},contentHAlign:ls,contentVAlign:Cf,cssClasses:at}}},UL=Ie({...VL,__name:"CoreHorizontalStack",setup(e){const t=ee(re.evaluatedFields);return(n,r)=>(I(),Ve(hi,{class:"CoreHorizontalStack","content-h-align":x(t).contentHAlign.value,"content-v-align":x(t).contentVAlign.value,"content-padding":x(t).contentPadding.value,"is-horizontal":!0},{default:et(()=>[Yt(n.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-v-align","content-padding"]))}}),HL=Ne(UL,[["__scopeId","data-v-a5e8d853"]]),zL="A container component that divides the layout into sections, with an optional title.",KL={writer:{name:"Section",description:zL,category:"Layout",allowedChildrenTypes:["*"],fields:{title:{name:"Title",init:"Section Title",desc:"Leave blank to hide.",type:q.Text},isCollapsible:y_,startCollapsed:$f,accentColor:mn,primaryTextColor:Zt,secondaryTextColor:Zn,containerBackgroundColor:fo,containerShadow:is,separatorColor:sn,buttonColor:Hr,buttonTextColor:zr,buttonShadow:Uo,contentPadding:{...cs,default:"16px"},contentHAlign:ls,cssClasses:at},previewField:"title"}},WL=Ie({...KL,__name:"CoreSection",setup(e){const t=ee(re.evaluatedFields),n=W(()=>t.isCollapsible.value),r=Pe(n.value&&t.startCollapsed.value);return(o,a)=>(I(),M("section",{class:ct(["CoreSection",{"CoreSection--collapsible":n.value}])},[x(t).title.value||n.value?(I(),M("div",{key:0,class:ct(["CoreSection__title",{"CoreSection__title--collapsed":n.value&&r.value}])},[D("h3",null,Me(x(t).title.value),1),n.value?(I(),Ve(kf,{key:0,modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=s=>r.value=s),direction:"top-bottom"},null,8,["modelValue"])):_e("",!0)],2)):_e("",!0),r.value?_e("",!0):(I(),Ve(hi,{key:1,"content-h-align":x(t).contentHAlign.value,"content-padding":x(t).contentPadding.value,"aria-expanded":n.value?r.value:null},{default:et(()=>[Yt(o.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding","aria-expanded"]))],2))}}),qL=Ne(WL,[["__scopeId","data-v-8bef68a0"]]),GL="A visual component to create a separation between adjacent elements.",W_={writer:{name:"Separator",description:GL,category:"Layout",fields:{separatorColor:sn,cssClasses:at}}},Rm=e=>{e.writer&&(e.writer.docs=`_Separator_ components are used to separate layout elements. They can be used in most containers, including _Column Container_ to separate columns.

If the container flows horizontally (like a _Horizontal Stack_ or a _Column Container_) the _Separator_ will be a vertical line. Otherwise, it'll be a horizontal line.`)},JL={class:"CoreSeparator separator"};function YL(e,t,n,r,o,a){return I(),M("div",JL,t[0]||(t[0]=[D("div",{class:"line"},null,-1)]))}typeof Rm=="function"&&Rm(W_);const XL=Ne(W_,[["render",YL],["__scopeId","data-v-5abd9423"]]),QL={class:"collapserContainer"},ZL={class:"container","data-writer-container":""},eD="A container component that organizes its children in a sidebar. Its parent must be a Page component.",tD={writer:{name:"Sidebar",description:eD,positionless:!0,slot:"sidebar",allowedParentTypes:["page"],allowedChildrenTypes:["*"],category:"Layout",fields:{startCollapsed:{...$f,desc:void 0},sidebarBackgroundColor:{name:"Background",type:q.Color,category:We.Style,applyStyleVariable:!0,default:"rgba(255, 255, 255, 0.3)"},accentColor:mn,primaryTextColor:Zt,secondaryTextColor:Zn,containerBackgroundColor:fo,containerShadow:is,separatorColor:sn,buttonColor:Hr,buttonTextColor:zr,buttonShadow:Uo,cssClasses:at}}},nD=Ie({...tD,__name:"CoreSidebar",setup(e){const t=ee(re.evaluatedFields),n=Pe(t.startCollapsed.value),r=ee(re.core),o=ee(re.builderManager),a=ee(re.componentId),s=W(()=>o==null?void 0:o.firstSelectedId.value),i=Pe(0),l=W(()=>({"max-height":`calc(100vh - ${i.value}px)`}));Ge(s,u=>{u&&c(u)&&(n.value=!1)});const c=u=>{const d=r.getComponentById(u);return!d||d.type=="root"?!1:d.parentId==a?!0:c(d.parentId)};return bn(()=>{const u=document.querySelector(".ComponentRenderer");i.value=document.body.clientHeight-(u==null?void 0:u.parentElement.clientHeight)}),(u,d)=>(I(),M("div",{class:ct(["CoreSidebar",{collapsed:n.value}]),style:$t(l.value)},[D("div",QL,[He(kf,{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=h=>n.value=h),direction:"left-right"},null,8,["modelValue"])]),D("div",ZL,[Yt(u.$slots,"default",{},void 0,!0)])],6))}}),rD=Ne(nD,[["__scopeId","data-v-99b92063"]]),oD={class:"CoreTab"},aD=0,Lm=1,sD="A container component that displays its child components as a tab inside a Tab Container.",iD={writer:{name:"Tab",description:sD,allowedParentTypes:["tabs","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Tab Name",type:q.Text},contentPadding:{...cs,default:"16px"},contentHAlign:ls,cssClasses:at},previewField:"name"}},lD=Ie({...iD,__name:"CoreTab",setup(e){const t=ee(re.evaluatedFields),n=ee(re.instancePath),r=ee(re.instanceData),o=ee(re.core),a=ee(re.builderManager),s=ee(re.componentId),{isComponentVisible:i}=fc(o),l=W(()=>a==null?void 0:a.firstSelectedId.value),c=()=>{for(let p=-2;p>-1*n.length;p--){const _=n.at(p),{type:S}=o.getComponentById(_.componentId);if(S==="tabs")return p+1}},u=W(()=>{const p=c();return n.at(p)}),d=W(()=>u==null?void 0:u.value.instanceNumber),h=W(()=>d.value===aD),v=W(()=>d.value===Lm),y=W(()=>i(s)?h.value||v.value&&b.value:!1),g=()=>{for(let p=-1;p>-1*n.length;p--){const _=n.at(p),{type:S}=o.getComponentById(_.componentId);if(S==="tabs")return r.at(p)}},w=()=>{const p=c(),_=n.slice(0,p),S=p+1<0?n.slice(p+1):[];return[..._,{componentId:n.at(p).componentId,instanceNumber:Lm},...S]},A=()=>{const p=g();p.value={activeTab:w()}},C=p=>{const _=o.getComponentById(p);return!_||_.type=="root"?!1:_.parentId==s?!0:C(_.parentId)};Ge(l,p=>{p&&C(p)&&A()});const b=W(()=>{var R;let p;h.value?p=w():p=n;const S=(R=g().value)==null?void 0:R.activeTab;return JSON.stringify(S)==JSON.stringify(p)});return Za(()=>{var S;if(h.value)return;const p=g();(S=p.value)!=null&&S.activeTab||i(s,n)&&(p.value={activeTab:n})}),(p,_)=>hn((I(),M("div",oD,[h.value?(I(),M("button",{key:0,class:ct(["bit",{active:b.value}]),tabindex:"0",onClick:A},Me(x(t).name.value),3)):_e("",!0),v.value?hn((I(),Ve(hi,{key:1,class:"container","content-h-align":x(t).contentHAlign.value,"content-padding":x(t).contentPadding.value},{default:et(()=>[Yt(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[or,b.value]]):_e("",!0)],512)),[[or,y.value]])}}),cD=Ne(lD,[["__scopeId","data-v-63c66105"]]),uD={class:"CoreTabs"},dD={class:"tabSelector horizontal","data-writer-cage":"","data-writer-container":""},fD={class:"container"},pD="A container component for organising and displaying Tab components in a tabbed interface.",hD={writer:{name:"Tab Container",description:pD,category:"Layout",allowedChildrenTypes:["tab","repeater"],fields:{accentColor:mn,primaryTextColor:Zt,secondaryTextColor:Zn,containerBackgroundColor:fo,containerShadow:is,separatorColor:sn,buttonColor:Hr,buttonTextColor:zr,buttonShadow:Uo,cssClasses:at}}},mD=Ie({...hD,__name:"CoreTabs",setup(e){const t=ee(re.instanceData);return t.at(-1).value={activeTab:void 0},(n,r)=>(I(),M("div",uD,[D("nav",dD,[Yt(n.$slots,"default",{instanceNumber:0},void 0,!0)]),D("div",fD,[Yt(n.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),vD=Ne(mD,[["__scopeId","data-v-46e04ad4"]]),gD={class:"CoreStep"},yD=["disabled"],_D={class:"indicator"},bD={key:0,class:"material-symbols-outlined"},wD={class:"label"},qi=0,fu=1,AD="A container component that displays its child components as a step inside a Step Container.",CD={writer:{name:"Step",description:AD,allowedParentTypes:["steps","repeater"],allowedChildrenTypes:["*"],category:"Layout",fields:{name:{name:"Name",default:"(No name)",init:"Step name",type:q.Text},contentPadding:{...cs,default:"16px"},isCompleted:{...Pt,name:"Completed",desc:"Use a state reference to dynamically mark this step as complete.",default:"no"},contentHAlign:ls,cssClasses:at},previewField:"name"}},$D=Ie({...CD,__name:"CoreStep",setup(e){const t=ee(re.evaluatedFields),n=ee(re.instancePath),r=ee(re.instanceData),o=ee(re.isBeingEdited),a=ee(re.core),s=ee(re.builderManager),i=ee(re.componentId),{isComponentVisible:l}=fc(a),c=W(()=>s==null?void 0:s.firstSelectedId.value),u=h();function d(){for(let p=-1;p>-1*n.length;p--){const _=n.at(p),S=a.getComponentById(_.componentId);if(!S)return;if(S.type==="steps")return p}}function h(){const p=d();if(!(typeof p>"u"))return r.at(p)}function v(){const p=d()+1,_=n.slice(0,p),S=p+1<0?n.slice(p+1):[];return[..._,{componentId:n.at(p).componentId,instanceNumber:fu},...S]}function y(){u.value={...u.value,activeStep:v()}}function g(){const p=u.value.steps.findIndex(R=>JSON.stringify(R.instancePath)==JSON.stringify(n));if(p==-1||p+1>u.value.steps.length)return;let S=u.value.steps.slice(p+1).find(R=>!R.isCompleted);S||(S=u.value.steps.at(-1)),u.value={...u.value,activeStep:S.instancePath}}function w(p){const _=a.getComponentById(p);return!_||_.type=="root"?!1:_.parentId==i?!0:w(_.parentId)}function A(){if(!t.isCompleted.value){y();return}g()}const C=W(()=>{const p=d()+1;return n.at(p)});Ge(c,p=>{p&&w(p)&&y()});const b=W(()=>{var S;let p;(C==null?void 0:C.value.instanceNumber)==qi?p=v():p=n;const _=(S=u.value)==null?void 0:S.activeStep;return JSON.stringify(_)==JSON.stringify(p)});return Ge([b,t.isCompleted],()=>{o.value||b.value&&t.isCompleted.value&&g()}),Ge(t.isCompleted,(p,_)=>{_&&(p||A())}),Za(()=>{var _;(C==null?void 0:C.value.instanceNumber)==qi||(typeof u.value.steps.find(S=>S.instancePath==n)>"u"&&u.value.steps.push({instancePath:n,isCompleted:t.isCompleted.value}),(_=u.value)==null?void 0:_.activeStep)||l(i,n)&&A()}),lo(()=>{const p=u.value.steps.findIndex(_=>JSON.stringify(_.instancePath)==JSON.stringify(n));u.value.steps.splice(p,1)}),(p,_)=>{var S,R,Y,X;return hn((I(),M("div",gD,[((S=C.value)==null?void 0:S.instanceNumber)==qi?(I(),M("button",{key:0,class:ct(["bit",{active:b.value,completed:x(t).isCompleted.value}]),disabled:!x(o),stepindex:"0",onClick:y},[D("div",_D,[_[0]||(_[0]=D("div",{class:"linker left"},null,-1)),D("div",{class:ct(["status",{completed:x(t).isCompleted.value}])},[x(t).isCompleted.value?(I(),M("i",bD," done ")):_e("",!0)],2),_[1]||(_[1]=D("div",{class:"linker right"},null,-1))]),D("div",wD,Me(x(t).name.value),1)],10,yD)):_e("",!0),((R=C.value)==null?void 0:R.instanceNumber)==fu?hn((I(),Ve(hi,{key:1,class:"container","content-h-align":x(t).contentHAlign.value,"content-padding":x(t).contentPadding.value},{default:et(()=>[Yt(p.$slots,"default",{},void 0,!0)]),_:3},8,["content-h-align","content-padding"])),[[or,b.value]]):_e("",!0)],512)),[[or,((Y=C.value)==null?void 0:Y.instanceNumber)==qi||((X=C.value)==null?void 0:X.instanceNumber)==fu&&b.value]])}}}),SD=Ne($D,[["__scopeId","data-v-ee7ef213"]]),ID={class:"CoreSteps"},ED={class:"stepSelector horizontal","data-writer-cage":"","data-writer-container":""},kD={class:"container"},TD="A container component for displaying Step components, allowing you to implement a stepped blueprint.",xD={writer:{name:"Step Container",description:TD,category:"Layout",allowedChildrenTypes:["step","repeater"],fields:{accentColor:mn,primaryTextColor:Zt,secondaryTextColor:Zn,containerBackgroundColor:fo,containerShadow:is,separatorColor:sn,buttonColor:Hr,buttonTextColor:zr,buttonShadow:Uo,cssClasses:at}}},PD=Ie({...xD,__name:"CoreSteps",setup(e){const t=ee(re.instanceData),n={activeStep:void 0,steps:[]};return t.at(-1).value=n,(r,o)=>(I(),M("div",ID,[D("nav",ED,[Yt(r.$slots,"default",{instanceNumber:0},void 0,!0)]),D("div",kD,[Yt(r.$slots,"default",{instanceNumber:1},void 0,!0)])]))}}),MD=Ne(PD,[["__scopeId","data-v-3eb221bc"]]),OD={key:0,class:"material-symbols-outlined"},ND={class:"CoreButton__text"},RD=`
def handle_button_click(state):

	# Increment counter when the button is clicked

	state["counter"] += 1`,LD="A standalone button component that can be linked to a click event handler.",DD={writer:{name:"Button",description:LD,category:"Other",events:{"wf-click":{desc:"Capture single clicks.",stub:RD.trim()}},fields:{text:{name:"Text",init:"Button Text",type:q.Text},isDisabled:{...Pt,name:"Disabled",default:"no",desc:"Disables all event handlers."},buttonColor:Hr,buttonTextColor:zr,icon:{name:"Icon",type:q.Text,desc:'A Material Symbols id, such as "arrow_forward".',category:We.Style},buttonShadow:Uo,separatorColor:sn,cssClasses:at},previewField:"text"}},q_=Ie({...DD,__name:"CoreButton",setup(e){const t=Pe(null),n=ee(re.evaluatedFields),r=ee(re.isDisabled),o=ee(re.isBeingEdited);Ge(n.isDisabled,s=>{r.value=s},{immediate:!0});function a(s){if(!t.value)return;const i=pi(s);t.value.$el.dispatchEvent(i)}return(s,i)=>(I(),Ve(Nn,{ref_key:"rootInstance",ref:t,class:"CoreButton","aria-disabled":x(r),disabled:!x(o)&&x(r),onClick:a},{default:et(()=>[x(n).icon.value?(I(),M("i",OD,Me(x(n).icon.value),1)):_e("",!0),D("span",ND,Me(x(n).text.value),1)]),_:1},8,["aria-disabled","disabled"]))}}),Dm=e=>{e.writer&&(e.writer.docs="Writer Framework uses Material Symbols to display icons. To include an icon, check https://fonts.google.com/icons, find the icon's id (such as `arrow_forward`) and it to your _Button_.")};typeof Dm=="function"&&Dm(q_);const BD=Ne(q_,[["__scopeId","data-v-57cc9b75"]]),FD={padding:"16px","min-height":"64px","min-width":"64px","border-radius":"8px",background:"linear-gradient(90deg, rgba(41,207,0,1) 0%, rgba(145,231,78,1) 100%)"},jD="A generic component that creates customisable HTML elements, which can serve as containers for other components.",G_={writer:{name:"HTML Element",description:jD,category:"Other",allowedChildrenTypes:["*"],fields:{element:{name:"Element",default:"div",type:q.Text,desc:"Set the type of HTML element to create, e.g., 'div', 'section', 'span', etc."},styles:{name:"Styles",default:"{}",init:JSON.stringify(FD,null,2),type:q.Object,desc:"Define the CSS styles to apply to the HTML element using a JSON object or a state reference to a dictionary.",validator:Fo},attrs:{name:"Attributes",default:"{}",type:q.Object,desc:"Set additional HTML attributes for the element using a JSON object or a dictionary via a state reference.",validator:Fo},htmlInside:{name:"HTML inside",default:null,type:q.Text,control:Zl.Textarea,desc:"Define custom HTML to be used inside the element. It will be wrapped in a div and rendered after children components."},cssClasses:at}},setup(e,{slots:t}){const n=ee(re.evaluatedFields),r=/^[a-zA-Z][a-zA-Z0-9-_:.]*$/,o=W(()=>{if(typeof n.attrs.value!="object"||n.attrs.value===null)return{};const a=Object.entries(n.attrs.value).filter(([s])=>r.test(s));return Object.fromEntries(a)});return()=>{let a;return n.htmlInside.value&&(a=Ro("div",{innerHTML:n.htmlInside.value})),Ro(n.element.value,{...o.value,class:"CoreHTML","data-writer-container":"",style:n.styles.value},[t.default({}),a])}}},Bm=e=>{e.writer&&(e.writer.docs=`You can configure the element type, styles, and attributes to fit your design requirements. You can link them to state for advanced use cases, such as custom animations.

All valid HTML tags are supported, including tags such as \`iframe\`, allowing you to embed external sites.

Take into account the potential risks of adding custom HTML to your app, including XSS. Be specially careful when injecting user-generated data.`)};typeof Bm=="function"&&Bm(G_);const VD={class:"pagination-left"},UD={class:"pagination-pagesize"},HD=["value","selected"],zD={class:"pagination-description"},KD={class:"bold"},WD={class:"bold"},qD={class:"bold"},GD={class:"pagination-right"},JD={class:"pagination-picker"},YD={key:0,class:"paginationpicker-block paginationpicker-neutral"},XD=["onClick"],QD={key:2,class:"paginationpicker-block paginationpicker-currentpage"},ZD={class:"pagination-jump"},e5=["value"],t5=`
def handle_page_change(state, payload):
    page = payload
    state["page"] = page

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,n5=`
def handle_page_size_change(state, payload):
    state['pageSize'] = payload

    records = _load_records_from_db(start = state["page"] * state["pageSize"], limit = state["pageSize"])
    # update a repeater
    state["highlighted_members"] = {r.id: r for r in records}
`,r5={writer:{name:"Pagination",category:"Other",description:"A component that can help you paginate records, for example from a Repeater or a DataFrame.",fields:{page:{name:"Page",init:"1",default:"1",type:q.Number,desc:"The current page number.",validator:Xn},pageSize:{name:"Page Size",default:"10",type:q.Number,desc:"The number of items per page.",validator:Xn},totalItems:{name:"Total Items",default:"10",type:q.Number,desc:"The total number of items",validator:Xn},pageSizeOptions:{name:"Page Size Options",init:"",default:"",type:q.Text,desc:"A comma-separated list of page size options. If it's empty, the user can't change the page size. Set your default page size as the first option."},pageSizeShowAll:{...Pt,name:"Show All Option",default:"no",desc:"Show an option to show all records."},jumpTo:{...Pt,name:"Jump To",default:"no",desc:"Show an option to jump to a specific page."}},events:{"wf-change-page":{desc:"Fires when the user pick a page",stub:t5.trim(),eventPayloadExample:2},"wf-change-page-size":{desc:"Fires when the user change the page size.",stub:n5.trim(),eventPayloadExample:10}}}},o5=Ie({...r5,__name:"CorePagination",setup(e){const t=ee(re.evaluatedFields),n=ee(re.core),r=st("rootEl"),o=ee(re.instancePath),{handleInput:a}=_n(n,o,r),{handleInput:s}=_n(n,o,r),i=W(()=>t.pageSizeOptions.value!==""||t.pageSizeShowAll.value),l=W(()=>t.jumpTo.value),c=W(()=>t.totalItems.value==0?0:(t.page.value-1)*t.pageSize.value+1),u=W(()=>Math.min(t.page.value*t.pageSize.value,t.totalItems.value)),d=W(()=>t.totalItems.value),h=W(()=>Math.ceil(parseInt(t.totalItems.value)/parseInt(t.pageSize.value))),v=W(()=>{let p=[];const _=t.pageSizeOptions.value.split(",");for(const S in _){const R=parseInt(_[S],10);p.push({value:R,label:`${R} items`})}return t.pageSizeShowAll.value&&p.push({value:d.value,label:"All items"}),p}),y=W(()=>{const p=[],_=parseInt(t.page.value);if(h.value<=7)for(let S=0;S<h.value;S++)p.push(S+1);else _==1||_==2?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(h.value-2),p.push(h.value-1),p.push(h.value)):_==3?(p.push(1),p.push(2),p.push(3),p.push(4),p.push("..."),p.push(h.value-1),p.push(h.value)):_==4?(p.push(1),p.push(2),p.push(3),p.push(4),p.push(5),p.push("..."),p.push(h.value)):_==h.value||_==h.value-1?(p.push(1),p.push(2),p.push(3),p.push("..."),p.push(h.value-2),p.push(h.value-1),p.push(h.value)):_==h.value-2?(p.push(1),p.push(2),p.push("..."),p.push(h.value-3),p.push(h.value-2),p.push(h.value-1),p.push(h.value)):(p.push(1),p.push("..."),p.push(_-1),p.push(_),p.push(_+1),p.push("..."),p.push(h.value));return p}),g=W(()=>parseInt(t.page.value)-1<1),w=W(()=>parseInt(t.page.value)+1>h.value),A=p=>{if(p.target.value==="")return;let _=parseInt(p.target.value);_>h.value&&(_=h.value),a(_,"wf-change-page")},C=p=>{a(p,"wf-change-page")},b=p=>{let _=parseInt(p.target.value);s(_,"wf-change-page-size")};return(p,_)=>(I(),M("div",{ref_key:"rootEl",ref:r,class:"CorePagination"},[D("div",VD,[hn(D("div",UD,[D("select",{class:"pagesize-select",onChange:b},[(I(!0),M(ze,null,xt(v.value,(S,R)=>(I(),M("option",{key:R,value:S.value,selected:S.value==x(t).pageSize.value},Me(S.label),9,HD))),128))],32)],512),[[or,i.value]]),D("div",zD,[_[2]||(_[2]=Bt(" Showing ")),D("span",KD,Me(c.value),1),_[3]||(_[3]=Bt(" to ")),D("span",WD,Me(u.value),1),_[4]||(_[4]=Bt(" of ")),D("span",qD,Me(d.value),1),_[5]||(_[5]=Bt(" results "))])]),D("div",GD,[D("div",JD,[D("div",{class:ct(["paginationpicker-block",{"paginationpicker-disabled":g.value}]),onClick:_[0]||(_[0]=S=>C(x(t).page.value-1))},_[6]||(_[6]=[D("i",{class:"material-symbols-outlined"}," navigate_before ",-1)]),2),(I(!0),M(ze,null,xt(y.value,(S,R)=>(I(),M(ze,{key:R},[S=="..."?(I(),M("div",YD,Me(S),1)):_e("",!0),S!="..."&&S!=x(t).page.value?(I(),M("div",{key:1,class:"paginationpicker-block",onClick:Y=>C(S)},Me(S),9,XD)):_e("",!0),S==x(t).page.value?(I(),M("div",QD,Me(S),1)):_e("",!0)],64))),128)),D("div",{class:ct(["paginationpicker-block",{"paginationpicker-disabled":w.value}]),onClick:_[1]||(_[1]=S=>C(x(t).page.value+1))},_[7]||(_[7]=[D("i",{class:"material-symbols-outlined"}," navigate_next ",-1)]),2)]),hn(D("div",ZD,[_[8]||(_[8]=D("label",null,"Jump to",-1)),D("input",{type:"text",value:x(t).page.value,onInput:A},null,40,e5)],512),[[or,l.value]])])],512))}}),a5=Ne(o5,[["__scopeId","data-v-2c0a56bd"]]),s5="A container component that repeats its child components based on a dictionary.",i5={a:{desc:"Option A"},b:{desc:"Option B"}},l5={writer:{name:"Repeater",description:s5,category:"Other",allowedChildrenTypes:["inherit"],fields:{repeaterObject:{name:"Repeater object",default:JSON.stringify(i5,null,2),type:q.Object,desc:"Include a state reference to the dictionary used for repeating the child components. Alternatively, specify a JSON object.",validator:S2},keyVariable:{name:"Key variable name",default:"itemId",init:"itemId",type:q.Text,desc:"Set the name of the variable that will store the key of the current repeater object entry."},valueVariable:{name:"Value variable name",default:"item",init:"item",type:q.Text,desc:"Set the name of the variable that will store the value of the current repeater object entry."}}},setup(e,{slots:t}){const n=ee(re.core),r=ee(re.componentId),o=ee(re.evaluatedFields),a=ee(re.isBeingEdited),s=ee(re.renderProxiedComponent),i=W(()=>n.getComponents(r,{sortedByPosition:!0})),l=()=>typeof o.repeaterObject.value!="object"?[]:Object.values(o.repeaterObject.value).map((u,d)=>i.value.map(h=>s(h.id,d)));return()=>{let c={};return i.value.length!=0&&o.repeaterObject.value!=null&&Object.keys(o.repeaterObject.value).length!=0?c=l():a.value===!0?c=t.default({}):c={},Ro("div",{class:"CoreRepeater","data-writer-container":""},c)}}},c5=Ne(l5,[["__scopeId","data-v-0b783e59"]]),u5="A component that emits an event repeatedly at specified time intervals, enabling time-based refresh.",d5=`
def handle_timer_tick(state):

	# Increment counter when the timer ticks

	state["counter"] += 1`.trim(),f5={writer:{name:"Timer",description:u5,category:"Other",fields:{intervalMs:{name:"Interval (ms)",desc:"How much time to wait between ticks. A tick is considered finished when its event is handled.",default:"200",type:q.Number,validator:Xn},isActive:{...Pt,name:"Active",default:"yes",desc:"Whether the timer should trigger tick events."},accentColor:mn,cssClasses:at},events:{"wf-tick":{desc:"Emitted when the timer ticks.",stub:d5.trim()}}}},p5=Ie({...f5,__name:"CoreTimer",setup(e){const r=ee(re.evaluatedFields),o=ee(re.core),a=st("rootEl"),s=W(()=>r.intervalMs.value),i=W(()=>r.isActive.value),l=Pe(!1),c=ee(re.componentId),u=W(()=>{var w,A;return!!((A=(w=o.getComponentById(c))==null?void 0:w.handlers)!=null&&A["wf-tick"])}),d=W(()=>({"animation-duration":`${Math.max(s.value,1e3)}ms`}));Ge([i,s],()=>{g()}),Ge(u,async w=>{w&&(await Hn(),g())});let h=0,v=null;function y(){clearTimeout(v)}function g(){if(y(),!i.value||s.value<0||!a.value)return;Date.now()-h>=500&&(a.value.classList.remove("tick"),a.value.offsetWidth,h=Date.now(),a.value.classList.add("tick"));const w=({ok:C})=>{l.value=!C,v=setTimeout(()=>{g()},s.value)},A=new CustomEvent("wf-tick",{detail:{callback:w}});a.value.dispatchEvent(A)}return bn(()=>{g()}),(w,A)=>(I(),M("div",{ref_key:"rootEl",ref:a,class:ct(["CoreTimer",{failing:l.value}]),style:$t(d.value)},null,6))}}),h5=Ne(p5,[["__scopeId","data-v-8e3b3227"]]),m5={class:"main"},v5={class:"actions"},g5=["value"],y5="A user input component that allows users to capture images using their webcam.",_5=`
def webcam_handler(payload):

	# This handler will save the captured images based on timestamp

	import time
	timestamp = time.time()

	# The payload is a file-like object which contains the captured image
	# in PNG format

	image_file = payload
	with open(f"capture-{timestamp}.png", "wb") as file_handle:
		file_handle.write(image_file)`.trim(),b5={writer:{name:"Webcam Capture",description:y5,category:"Other",fields:{refreshRate:{name:"Refresh rate (ms)",init:"200",default:"200",desc:"Set to 0 for manual capture.",type:q.Number,validator:Xn},buttonColor:Hr,buttonTextColor:zr,buttonShadow:Uo,separatorColor:sn,cssClasses:at},events:{"wf-webcam":{desc:"Sent when a frame is captured. Its payload contains the captured frame in PNG format.",stub:_5.trim(),eventPayloadExample:"data:image/png;base64,azerty"}}}},w5=Ie({...b5,__name:"CoreWebcamCapture",setup(e){const t=Pe(!1),n=st("rootEl"),r=document.createElement("canvas"),o=st("videoEl"),a=ee(re.evaluatedFields),s=Pe(null),i=Pe(null),l=Ln();bn(async()=>{var w,A;s.value=await c(),i.value=(A=(w=s.value)==null?void 0:w[0])==null?void 0:A.deviceId}),lo(()=>{g()});const c=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(C=>C.kind=="videoinput"),u=W(()=>a.refreshRate.value);Ge(u,(w,A)=>{w>0&&A<=0&&v()}),Ge(i,async()=>{t.value&&(g(),await y())});const d=async()=>{if(t.value=!t.value,!t.value){g();return}await y(),v()},h=()=>(r.getContext("2d").drawImage(o.value,0,0),r.toDataURL("image/png")),v=()=>{const w=new CustomEvent("wf-webcam",{detail:{payload:h(),callback:()=>{u.value<=0||!t.value||setTimeout(()=>{v()},u.value)}}});n.value.dispatchEvent(w)},y=async()=>(o.value.style.display="",new Promise((w,A)=>{navigator.mediaDevices.getUserMedia||(l.error("This browser doesn't support webcam connection."),A());const C={video:!0};s.value.length>1&&(C.video={deviceId:i.value}),navigator.mediaDevices.getUserMedia(C).then(b=>{o.value.srcObject=b;const p=b.getVideoTracks()[0].getSettings().width,_=b.getVideoTracks()[0].getSettings().height;r.setAttribute("width",p.toString()),r.setAttribute("height",_.toString()),w()}).catch(b=>{l.error("An error occurred when trying to use the webcam.",b),A()})})),g=()=>{const w=o.value.srcObject;w&&w.getTracks().map(C=>C.stop()),o.value.srcObject=null,o.value.style.display="none"};return(w,A)=>{var C;return I(),M("div",{ref_key:"rootEl",ref:n,class:"CoreWebcamCapture"},[hn(D("div",m5,[D("video",{ref_key:"videoEl",ref:o,autoplay:"true"},null,512)],512),[[or,t.value]]),D("div",v5,[u.value==0?(I(),Ve(Nn,{key:0,onClick:v},{default:et(()=>A[1]||(A[1]=[Bt(" Capture image ")])),_:1})):_e("",!0),He(Nn,{onClick:d},{default:et(()=>[Bt(Me(t.value?"Stop capture":"Start webcam capture"),1)]),_:1}),((C=s.value)==null?void 0:C.length)>1?(I(),Ve(V_,{key:1,modelValue:i.value,"onUpdate:modelValue":A[0]||(A[0]=b=>i.value=b)},{default:et(()=>[(I(!0),M(ze,null,xt(s.value,(b,p)=>(I(),M("option",{key:b.deviceId,value:b.deviceId},Me(b.label||`Webcam ${p+1}`),9,g5))),128))]),_:1},8,["modelValue"])):_e("",!0)])],512)}}}),A5=Ne(w5,[["__scopeId","data-v-bf784564"]]),C5={writer:{name:"Reuse Component",slot:"*",description:"Those components are used to reuse other components. Reused components share the same state and are updated together.",category:"Other",allowedChildrenTypes:[],fields:{proxyId:{name:"Component id",type:q.Text,desc:"The id of the component to reuse."}}}},$5=Ie({...C5,__name:"CoreReuse",props:{contextSlot:{}},setup(e){const t=e,n=ee(re.evaluatedFields),o=ee(re.instancePath).at(-2).componentId,a=ee(re.core),s=ee(re.renderProxiedComponent),i=ee(re.isBeingEdited),l=ee(re.componentId),c=Pe(Ro("div","")),u=Pe(!0),d=W(()=>{var g;return(g=a.getComponentById(n.proxyId.value))==null?void 0:g.type}),h=W(()=>d.value?a.getComponentDefinition(d.value):null);function v(g,w){u.value=t.contextSlot==="default",c.value=Ro("div",{class:["CoreReuse",w],style:{color:"var(--primaryTextColor)"}},i.value?g:"")}function y(){if(!n.proxyId.value)return v("No component selected to reuse","empty");if(l===n.proxyId.value||!h.value)return v("The id specified for reuse doesn't match any component.","invalid-value");if(!a.getContainableTypes(o).includes(d.value))return v("The component cannot be reused here.","invalid-context");u.value=t.contextSlot===(h.value.slot??"default");const g=s(n.proxyId.value,0,{class:["CoreReuse"]});c.value=g}return Ge([n.proxyId,h],y,{immediate:!0}),(g,w)=>u.value?(I(),Ve(es(c.value),{key:0})):_e("",!0)}}),S5={key:0,class:"controls"},I5={key:2},E5=["page"],k5="A component to embed PDF documents.",T5={writer:{name:"PDF",description:k5,category:"Embed",fields:{source:{name:"PDF source",type:q.Text,desc:"A valid URL. Alternatively, you can provide a state reference to a packed PDF file."},highlights:{name:"Highlights",default:JSON.stringify([]),desc:"A list of highlights to be applied to the PDF as a JSON array of strings.",type:q.Object,validator:h_},selectedMatch:{name:"Selected highlight match",default:null,desc:"The index of the selected highlight match.",type:q.Number},page:{name:"Page",type:q.Number,desc:"The page to be displayed."},controls:{...Pt,name:"Controls",desc:"Show controls to navigate the PDF.",default:"yes"},containerBackgroundColor:fo,separatorColor:sn,primaryTextColor:Zt,cssClasses:at}}},x5=Ie({...T5,__name:"CorePDF",setup(e){const t=ee(re.evaluatedFields);let n,r,o;const a=W(()=>t.highlights.value?t.highlights.value.map(we=>we.replaceAll("|","\\|")).join("|"):""),s=Pe({completeWords:!1,ignoreCase:!0}),i=Pe(1),l=Pe(1),c=Pe([]),u=Pe(0),d=st("rootEl"),h=st("viewerEl"),v=Pe(!1),y=Pe(0),g=Pe([]);bn(async()=>{const we=await tn(()=>import("./index-CHNpWJkS.js"),[],import.meta.url);o=we.VuePDF;const ye=we.usePDF;({pdf:n,pages:r}=ye(t.source)),w()});const w=()=>{v.value=!0,y.value=0,g.value=[],c.value=[]},A=we=>{g.value=[...g.value,we].sort((ye,qe)=>ye.page-qe.page)},C=we=>{y.value++},b=()=>{c.value=g.value.reduce((we,ye)=>[...we,...ye.matches.map((qe,Te)=>({page:ye.page,str:qe.str,index:Te}))],[]).sort((we,ye)=>we.page===ye.page?we.index-ye.index:we.page-ye.page)},p=()=>{b(),u.value&&R(u.value),t.selectedMatch.value&&(u.value=t.selectedMatch.value)},_=we=>{const ye=we.target.getBoundingClientRect(),qe=[...we.target.children].filter(Te=>Te.className.includes("page")).find(Te=>{const Ce=Te.getBoundingClientRect(),be=Ce.y-ye.y;return be<ye.height/2&&be+Ce.height>ye.height/2});qe&&(l.value=Number(qe.getAttribute("page")))},S=(we,ye)=>{let qe=0,Te=we;for(;Te&&Te!==ye;)qe+=Te.offsetTop,Te=Te.offsetParent;return qe},R=we=>{if(we<1||we>c.value.length)return;const ye=c.value[we-1];if(!ye)return;const Te=d.value.querySelectorAll(`div[page='${ye.page}'] span.highlight`)[ye.index];h.value.scrollTop=S(Te,h.value)},Y=we=>{if(we<1||we>r.value)return;const ye=d.value.querySelector("div[page='"+we+"']");h.value.scrollTop=S(ye,h.value)},X=()=>{u.value<c.value.length?u.value=u.value+1:u.value=1},te=()=>{u.value>1?u.value=u.value-1:u.value=c.value.length},$e=()=>{i.value=i.value<2?i.value+.1:i.value},pe=()=>{i.value=i.value>.25?i.value-.1:i.value};return Ge(y,()=>{y.value===r.value&&t.page.value&&Y(t.page.value)}),Ge([g,y],()=>{(!a.value||g.value.length===r.value)&&y.value===r.value&&(p(),v.value=!1)}),Ge(i,()=>{w()}),Ge(t.source,()=>{w()}),Ge(t.highlights,()=>{g.value=[],c.value=[]}),Ge(u,()=>{R(u.value)}),Ge(t.selectedMatch,()=>{u.value=t.selectedMatch.value}),Ge(t.page,()=>{Y(t.page.value)}),(we,ye)=>(I(),M("div",{ref_key:"rootEl",ref:d,class:"CorePDF"},[x(t).controls.value?(I(),M("div",S5,[He(wr,{onClick:ye[0]||(ye[0]=()=>Y(l.value-1))},{default:et(()=>ye[3]||(ye[3]=[D("i",{class:"material-symbols-outlined"},"arrow_upward",-1)])),_:1}),He(wr,{onClick:ye[1]||(ye[1]=()=>Y(l.value+1))},{default:et(()=>ye[4]||(ye[4]=[D("i",{class:"material-symbols-outlined"},"arrow_downward",-1)])),_:1}),(I(),M("span",{key:l.value},Me(l.value)+" / "+Me(x(r)),1)),He(wr,{disabled:v.value,onClick:$e},{default:et(()=>ye[5]||(ye[5]=[D("i",{class:"material-symbols-outlined"},"zoom_in",-1)])),_:1},8,["disabled"]),He(wr,{disabled:v.value,onClick:pe},{default:et(()=>ye[6]||(ye[6]=[D("i",{class:"material-symbols-outlined"},"zoom_out",-1)])),_:1},8,["disabled"]),D("span",null,Me(Math.round(i.value*100))+"%",1),ye[9]||(ye[9]=D("span",{class:"separator"},null,-1)),c.value.length?(I(),Ve(wr,{key:0,onClick:te},{default:et(()=>ye[7]||(ye[7]=[D("i",{class:"material-symbols-outlined"},"navigate_before",-1)])),_:1})):_e("",!0),c.value.length?(I(),Ve(wr,{key:1,onClick:X},{default:et(()=>ye[8]||(ye[8]=[D("i",{class:"material-symbols-outlined"},"navigate_next",-1)])),_:1})):_e("",!0),c.value.length?(I(),M("span",I5,"Matches "+Me(u.value)+" / "+Me(c.value.length),1)):_e("",!0)])):_e("",!0),D("div",{ref_key:"viewerEl",ref:h,class:"viewer",onScroll:_},[(I(!0),M(ze,null,xt(x(r),qe=>(I(),M("div",{key:qe,page:qe,class:"page"},[He(x(o),{scale:i.value,pdf:x(n),page:qe,"text-layer":"","highlight-text":a.value,"highlight-options":s.value,onHighlight:ye[2]||(ye[2]=Te=>A(Te)),onLoaded:C},null,8,["scale","pdf","page","highlight-text","highlight-options"])],8,E5))),128))],544),ye[10]||(ye[10]=D("div",{class:"mask"},null,-1))],512))}}),P5=Ne(x5,[["__scopeId","data-v-aeb4c8ed"]]),M5={key:0,class:"noURLProvided"},O5=["src"],N5="A component to embed an external resource in an iframe.",R5=`
def load_handler(state):

	# Sets status message when resource is loaded

	state["status"] = "Page loaded"`,L5={writer:{name:"IFrame",description:N5,category:"Embed",fields:{src:{name:"Source",default:"",desc:"A valid URL",type:q.Text,validator:v_},separatorColor:sn,cssClasses:at},events:{"wf-load":{desc:"Fires when the resource has successfully loaded.",stub:R5.trim()}}}},D5=Ie({...L5,__name:"CoreIFrame",setup(e){const t=st("rootEl"),n=ee(re.evaluatedFields);function r(){const o=new CustomEvent("wf-load");t.value.dispatchEvent(o)}return(o,a)=>(I(),M("div",{ref_key:"rootEl",ref:t,class:"CoreIFrame"},[x(n).src.value?(I(),M("iframe",{key:1,src:x(n).src.value,draggable:"false",onLoad:r},null,40,O5)):(I(),M("div",M5,a[0]||(a[0]=[D("h2",null,"No URL provided.",-1)]))),a[1]||(a[1]=D("div",{class:"mask"},null,-1))],512))}}),B5=Ne(D5,[["__scopeId","data-v-a3a63f75"]]),F5={key:0,class:"noAPIKeyProvided"},j5="A component to embed a Google Map. It can be used to display a map with markers.",V5=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],U5={writer:{name:"Google Maps",description:j5,category:"Embed",fields:{apiKey:{name:"API Key",default:"",desc:"API Key from Google Cloud Console.",type:q.Text},mapId:{name:"Map ID",default:"",desc:"ID of map from Google Cloud Console, needed for markers.",type:q.Text},mapType:{name:"Map type",type:q.Text,default:"roadmap",options:{roadmap:"Roadmap",satellite:"Satellite",hybrid:"Hybrid",terrain:"Terrain"},desc:"One of 'roadmap', 'satellite', 'hybrid' or 'terrain'."},zoom:{name:"Zoom",default:"8",type:q.Number},lat:{name:"Latitude",default:"37.79322359164316",type:q.Number,validator:wf},lng:{name:"Longitude",default:"-122.39999318828129",type:q.Number,validator:Af},markers:{name:"Markers",default:JSON.stringify(V5),desc:"Markers data",type:q.Object,validator:m_},cssClasses:at},events:{"gmap-marker-click":{desc:"Capture single clicks on markers.",eventPayloadExample:[{lat:1,lng:1,name:"Marker"}]},"gmap-click":{desc:"Capture single click on map.",eventPayloadExample:{lat:1,lng:1}}}}},H5=Ie({...U5,__name:"CoreGoogleMaps",setup(e){const t=st("rootEl"),n=st("mapEl"),r=ee(re.evaluatedFields);let o=null,a=[];const s=W(()=>({lat:r.lat.value,lng:r.lng.value})),i=W(()=>["roadmap","satellite","hybrid","terrain"].includes(r.mapType.value)?r.mapType.value:"roadmap"),l=async()=>{u();const{Loader:d}=await tn(()=>import("./index-BQr1pfrb.js"),[],import.meta.url);await new d({apiKey:r.apiKey.value,version:"weekly"}).load(),o=new google.maps.Map(n.value,{center:s.value,mapTypeId:i.value,zoom:8,mapId:r.mapId.value}),o.addListener("click",v=>{const y=new CustomEvent("gmap-click",{detail:{payload:v.latLng.toJSON()}});t.value.dispatchEvent(y)}),c()},c=async()=>{if(!r.mapId.value||!r.markers.value)return;const{AdvancedMarkerElement:d}=await google.maps.importLibrary("marker");u(),r.markers.value.forEach(v=>{const y=new d({position:{lat:v.lat,lng:v.lng},map:o,title:v.name});a.push(y),y.addListener("click",()=>{const g=new CustomEvent("gmap-marker-click",{detail:{payload:v}});t.value.dispatchEvent(g)})})},u=()=>{a.forEach(d=>d.setMap(null)),a=[]};return bn(async()=>{r.apiKey.value&&await l()}),Ge(s,async d=>{o&&o.setCenter(d)}),Ge(r.zoom,async d=>{o&&o.setZoom(d)}),Ge(i,async d=>{o&&o.setMapTypeId(d)}),Ge(r.markers,c),Ge(r.apiKey,l),Ge(r.mapId,l),(d,h)=>(I(),M("div",{ref_key:"rootEl",ref:t,class:"CoreGoogleMaps"},[x(r).apiKey.value?(I(),M("div",{key:1,ref_key:"mapEl",ref:n,class:"map"},null,512)):(I(),M("div",F5,h[0]||(h[0]=[D("h2",null,"Google Maps cannot be initialised.",-1),D("h3",null,"An API key hasn't been provided.",-1)]))),h[1]||(h[1]=D("div",{class:"mask"},null,-1))],512))}}),z5=Ne(H5,[["__scopeId","data-v-249b3ca8"]]),K5={class:"sidebarContainer"},W5=`
def handle_keydown(state, payload):
	# The payload is a dictionary containing the key code and modifier keys.
	# For example,
	# {
	#	"key": "ArrowDown",
	#	"ctrl_key": False,
	#	"shift_key": False,
	#	"meta_key": False
	# }

	key_activated = payload.get("key")
	delta = 0
	if key_activated == "ArrowLeft":
		delta += -10
	elif key_activated == "ArrowRight":
		delta += 10

	shift_key = payload.get("shift_key")
	if shift_key:
		delta *= 2 # Shift makes it go faster

	state["position"] += delta
`,q5=`
def handle_page_open(state, payload):
	page_key = payload
	state["message"] = f"The page {page_key} has been opened."
`,G5="A container component representing a single page within the application.",J5={writer:{name:"Page",category:"Root",events:{"wf-keydown":{desc:"Captures all key activity while this page is open.",stub:W5},"wf-page-open":{desc:"Emitted when the page is opened.",stub:q5}},description:G5,allowedChildrenTypes:["*"],allowedParentTypes:["root"],fields:{key:{name:"Page key",desc:"Unique identifier. It's needed to enable navigation to this Page.",type:q.IdKey},pageMode:{name:"Page mode",default:"compact",type:q.Text,options:{compact:"Compact",wide:"Wide"},category:We.Style},accentColor:mn,primaryTextColor:Zt,secondaryTextColor:Zn,emptinessColor:g_,containerBackgroundColor:fo,containerShadow:is,separatorColor:sn,buttonColor:Hr,buttonTextColor:zr,buttonShadow:Uo,cssClasses:at},previewField:"key"}},Y5=Ie({...J5,__name:"CorePage",setup(e){const t=st("rootEl"),n=ee(re.evaluatedFields);function r(a){const s=_P(a),i=a.target;t.value.contains(i)&&t.value.dispatchEvent(s)}function o(){const a=n.key.value,s=new CustomEvent("wf-page-open",{detail:{payload:a}});t.value.dispatchEvent(s)}return bn(async()=>{document.addEventListener("keydown",r),o()}),Pr(()=>{document.removeEventListener("keydown",r)}),(a,s)=>(I(),M("div",{ref_key:"rootEl",ref:t,class:"CorePage"},[D("div",K5,[Yt(a.$slots,"default",{slotName:"sidebar",positionlessSlot:!0},void 0,!0)]),D("div",{class:ct(["main",{compact:x(n).pageMode.value=="compact",wide:x(n).pageMode.value=="wide"}]),"data-writer-container":""},[Yt(a.$slots,"default",{},void 0,!0)],2)],512))}}),X5=Ne(Y5,[["__scopeId","data-v-52076071"]]),Q5=/^((?<pageKey>[^/]*))?(\/(?<routeVars>.*))?$/;function Tf(e=document.location.hash){var a;const n=(a=e.substring(1).match(Q5))==null?void 0:a.groups,r=n!=null&&n.pageKey?decodeURIComponent(n.pageKey):void 0;if(!n)return{pageKey:r,routeVars:new Map};const o=new URLSearchParams(n.routeVars);return{pageKey:r,routeVars:new Map(o.entries())}}function Z5(){const e=Tf(),t=Object.fromEntries(e.routeVars.entries());return{pageKey:e.pageKey,routeVars:t}}function e3(e){const{pageKey:t,routeVars:n}=e;let r="";if(t&&(r+=`${encodeURIComponent(t)}`),n.size>0){const o=new URLSearchParams([...n.entries()]);r+=`/${o.toString()}`}return r}function J_(e){document.location.hash=e3(e)}function t3(e){const t=Tf();t.pageKey=e,J_(t)}function S4(e){const t=Tf(),n=(t==null?void 0:t.routeVars)??{};t.routeVars=new Map(Object.entries({...n,...e})),J_(t)}const n3=`
def handle_hashchange(state, payload):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#main/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#	  "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")

	if not route_vars:
		return

	if route_vars.get("animal") == "duck":
		state["message"] = "You've navigated to the Duck zone."
	else:
		state["message"] = "You're not in the Duck zone.`.trim(),r3=`
def handle_app_open(state):
	# The payload is a dictionary with the page key and all the route variables in the URL hash.
	# For example, if the current URL is http://localhost:3000/#/animal=duck&colour=yellow
	# you will get the following dictionary
	# {
	#   "page_key": "main",
	#	  "route_vars": {
	#		  "animal": "duck",
	#		  "colour": "yellow"
	#	  }
	# }

	page_key = payload.get("page_key")
	route_vars = payload.get("route_vars")
`.trim(),o3="The root component of the application, which serves as the starting point of the component hierarchy.",a3={writer:{name:"Root",category:"Root",description:o3,allowedChildrenTypes:["page"],fields:{appName:{name:"App name",type:q.Text,desc:"The app name will be shown in the browser's title bar."},cssClasses:at,buttonColor:Hr,buttonShadow:Uo,accentColor:mn,contentPadding:cs,primaryTextColor:Zt,buttonTextColor:zr,emptinessColor:g_,containerShadow:is,secondaryTextColor:Zn,separatorColor:sn,contentVAlign:Cf,contentHAlign:ls,contentWidth:T2},events:{"wf-app-open":{desc:"Captures the first application load, including page key and route vars.",stub:r3},"wf-hashchange":{desc:"Capture changes to the URL hash, including page key and route vars.",stub:n3}}}},s3=Ie({...a3,__name:"CoreRoot",setup(e){const t=ee(re.core),n=ee(re.builderManager),r=ee(re.getChildrenVNodes),o=st("rootEl"),{isComponentVisible:a}=fc(t),s=W(()=>{const l=t.activePageId.value;if(!!t.getComponentById(l)&&t.isChildOf("root",l))return l;const u=t.getComponents("root",{includeBMC:!0,includeCMC:!0,sortedByPosition:!0});if(u.length==0)return null;const d=u.filter(h=>a(h.id));return d.length==0?null:d[0].id});function i(){var u;const l=Z5(),c=new CustomEvent("wf-hashchange",{detail:{payload:l}});(u=o.value)==null||u.dispatchEvent(c),l.pageKey&&t.setActivePageFromKey(l.pageKey)}return Ge(s,l=>{var d;const u=(d=t.getComponentById(l).content)==null?void 0:d.key;n&&!n.isComponentIdSelected(l)&&n.setSelection(null),Hn().then(()=>{var h,v;window.scrollTo(0,0),(v=(h=document.querySelector(".ComponentRenderer"))==null?void 0:h.parentElement)==null||v.scrollTo(0,0)}),t3(u)}),Za(()=>{window.addEventListener("hashchange",()=>{i()}),i()}),(l,c)=>(I(),M("div",{ref_key:"rootEl",ref:o,class:"CoreRoot","data-writer-container":""},[(I(!0),M(ze,null,xt(x(r)(),u=>(I(),M(ze,{key:u.key},[u.key===`${s.value}:0`?(I(),Ve(es(u),{key:0})):_e("",!0)],64))),128))],512))}}),i3=Ne(s3,[["__scopeId","data-v-89d3e95c"]]),l3={key:0,class:"noAccessTokenProvided"},c3=[{lat:37.79322359164316,lng:-122.39999318828129,name:"Marker"}],u3={writer:{name:"Mapbox",description:"A component to embed a Mapbox map. It can be used to display a map with markers.",docs:"For this component you need Mapbox access token: https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",category:"Embed",fields:{accessToken:{name:"Access Token",default:"",desc:"Access token from Mapbox",type:q.Text},mapStyle:{name:"Map style",default:"mapbox://styles/mapbox/standard",type:q.Text,desc:"Map style URL"},zoom:{name:"Zoom",default:"8",type:q.Number},lat:{name:"Latitude",default:"37.79322359164316",type:q.Number,validator:wf},lng:{name:"Longitude",default:"-122.39999318828129",type:q.Number,validator:Af},markers:{name:"Markers",init:JSON.stringify(c3,null,2),desc:"",type:q.Object,validator:m_},controls:{...Pt,name:"Controls visible",default:"yes",desc:"Show map controls"},cssClasses:at},events:{"mapbox-marker-click":{desc:"Capture single clicks on markers.",eventPayloadExample:[{lat:1,lng:1,name:"Marker"}]},"mapbox-click":{desc:"Capture single click on map.",eventPayloadExample:{lat:1,lng:1}}}}},d3=Ie({...u3,__name:"CoreMapbox",setup(e){const t=ee(re.evaluatedFields),n=st("rootEl"),r=st("mapEl"),o=W(()=>[t.lng.value,t.lat.value]),a=Pe(null);let s=[],i=null;const l=async()=>{if(!r.value||!t.accessToken.value)return;const u=await tn(()=>import("./mapbox-gl-Bp-oplZr.js").then(d=>d.m),[],import.meta.url);try{u.accessToken=t.accessToken.value,u.default&&(u.default.accessToken=t.accessToken.value),a.value=new u.Map({container:r.value,style:t.mapStyle.value,center:o.value,zoom:t.zoom.value}),a.value.on("click",d=>{const h=new CustomEvent("mapbox-click",{detail:{payload:{lat:d.lngLat.lat,lng:d.lngLat.lng}}});n.value.dispatchEvent(h)}),i=new u.NavigationControl,t.controls.value&&a.value.addControl(i),t.markers.value&&a.value.on("load",c)}catch(d){Ln().error(d)}},c=async()=>{var d,h;if(!a.value)return;const u=await tn(()=>import("./mapbox-gl-Bp-oplZr.js").then(v=>v.m),[],import.meta.url);s.forEach(v=>v.remove()),s=[],(h=(d=t.markers)==null?void 0:d.value)==null||h.forEach(v=>{const y=new u.Marker().setLngLat([v.lng,v.lat]).addTo(a.value).setPopup(new u.Popup().setText(v.name));s.push(y),y.getElement().addEventListener("click",g=>{const w=new CustomEvent("mapbox-marker-click",{detail:{payload:v}});n.value.dispatchEvent(w),g.stopPropagation()})})};return Ge(t.controls,()=>{a.value&&(t.controls?a.value.addControl(i):a.value.removeControl(i))}),Ge(t.markers,async()=>{a.value&&await c()}),Ge(t.mapStyle,()=>{a.value&&a.value.setStyle(t.mapStyle.value)}),Ge(o,()=>{var u,d;a.value&&((u=o.value)!=null&&u.lat)&&((d=o.value)!=null&&d.lng)&&a.value.setCenter(o.value)}),Ge(t.zoom,()=>{a.value&&t.zoom.value&&a.value.setZoom(t.zoom.value)}),Ge([r,t.accessToken],()=>{l()}),(u,d)=>(I(),M("div",{ref_key:"rootEl",ref:n,class:"CoreMapbox"},[x(t).accessToken.value?(I(),M("div",{key:1,ref_key:"mapEl",ref:r,class:"map"},null,512)):(I(),M("div",l3,d[0]||(d[0]=[D("h2",null,"MapBox cannot be initialised.",-1),D("h3",null,"An access token hasn't been provided.",-1)]))),d[1]||(d[1]=D("div",{class:"mask"},null,-1))],512))}}),f3=Ne(d3,[["__scopeId","data-v-946d8c56"]]);function p3(e,t){const{type:n}=e[t],a=Of().map(i=>({type:i,definition:ri(i)})).filter(i=>i.definition.allowedParentTypes&&!i.definition.allowedParentTypes.includes(n));return new Set(a.map(i=>i.type))}function h3(e,t){const{type:n,parentId:r}=e[t],o=Of().filter(l=>l!=="root"&&l!=="blueprints_root"),{allowedChildrenTypes:a,toolkit:s}=ri(n);if(!a)return new Set([]);let i=new Set(a);if(a.includes("*")&&(i=new Set([...i,...o])),i.delete("inherit")){if(!r)return i;const l=xf(e,r);i=new Set([...i,...l])}return s&&(i=new Set(Array.from(i).filter(l=>ri(l).toolkit==s))),i}function xf(e,t){const n=Array.from(h3(e,t)),r=Array.from(p3(e,t));return n.filter(a=>!r.includes(a))}function Pf(e,t){function n(){let Z="";const Q=new Uint16Array(16);return window.crypto.getRandomValues(Q),Q.forEach(se=>{Z+=(se%36).toString(36)}),Z}function r(U){const Z=e.getComponentById(U);if(!Z)return;const Q=Z.position;if(Q==0)return;const se=e.getComponentById(Z.parentId);if(!se)return;const Se=e.getComponents(se.id,{includeBMC:!0,includeCMC:!1}).filter(P=>P.position==Q-1)[0],k=`move-up-${U}`;t.openMutationTransaction(k,"Move up"),t.registerPreMutation(Se),Se.position++,t.registerPostMutation(Se),t.registerPreMutation(Z),Z.position--,t.registerPostMutation(Z),t.closeMutationTransaction(k),e.sendComponentUpdate()}function o(U){const Z=e.getComponentById(U);if(!Z)return;const Q=e.getComponentById(Z.parentId);if(!Q)return;const se=Z.position;if(se==-2)return;const Se=e.getComponents(Q.id,{includeBMC:!0,includeCMC:!1}).filter(ie=>ie.position!==-2);if(se>=Se.length-1)return;const k=Se.filter(ie=>ie.position==se+1)[0],P=`move-down-${U}`;t.openMutationTransaction(P,"Move down"),t.registerPreMutation(k),k.position--,t.registerPostMutation(k),t.registerPreMutation(Z),Z.position++,t.registerPostMutation(Z),t.closeMutationTransaction(P),e.sendComponentUpdate()}function a(U,Z,Q){const se=e.getComponentById(U);if(!se)return;const Se=e.getComponentById(se.parentId);if(!Se||U==Z||Se.id==Z&&Q===null)return;const k=`move-${U}`;t.openMutationTransaction(k,"Move"),t.registerPreMutation(se),l(U,-1),se.position=Q??ye(Z,se.type),se.parentId=Z,l(U,1),t.registerPostMutation(se),t.closeMutationTransaction(k),e.sendComponentUpdate()}function s(U,Z,Q,se){const Se=n(),k=e.getComponentDefinition(U),{fields:P}=k,ie={};return Object.entries(P??{}).map(([F,K])=>{var oe;ie[F]=((oe=se==null?void 0:se.content)==null?void 0:oe[F])??K.init}),{...se??{},id:Se,type:U,parentId:Z,content:ie,handlers:{},position:Q??ye(Z,U)}}function i(U,Z,Q,se,Se){const k=s(U,Z,Q,se);k.id=(se==null?void 0:se.id)??k.id;const P=`create-${k.id}`;return t.openMutationTransaction(P,"Create"),e.addComponent(k),l(k.id,1),Se==null||Se(k.id),t.registerPostMutation(k),t.closeMutationTransaction(P),e.sendComponentUpdate(),k.id}function l(U,Z){const Q=e.getComponentById(U);if(e.getComponentDefinition(Q.type).positionless)return;e.getComponents(Q.parentId,{includeBMC:!0,includeCMC:!1}).filter(P=>P.id!==U).filter(P=>P.position>=Q.position).map(P=>{t.registerPreMutation(P),P.position+=Z,t.registerPostMutation(P)})}function c(U){const Z=e.getComponentById(U),Q=[],se=Se=>{const k=e.getComponents(Se.id);Q.push(Se),k.map(P=>se(P))};return se(Z),Q}function u(U){return e.getComponents().filter(Z=>{var Q;return(Q=Z.outs)==null?void 0:Q.find(se=>se.toNodeId==U)})}function d(...U){const Z=U.map(se=>e.getComponentById(se)).filter(Boolean);if(Z.length===0)return;const Q=`delete-${Z.map(se=>se.id).join(",")}`;t.openMutationTransaction(Q,"Delete");for(const se of Z){e.getComponentById(se.id).parentId&&l(se.id,-1);const Se=u(se.id);for(const P of Se)t.registerPreMutation(P),P.outs=[...P.outs.filter(ie=>ie.toNodeId!==se.id)];const k=c(se.id);for(const P of k)t.registerPreMutation(P),e.deleteComponent(P.id),t.removeSelectedComponentId(P.id)}t.closeMutationTransaction(Q),e.sendComponentUpdate()}function h(U){return d(U)}function v(U){return U=="root"}function y(U){const Z=e.getComponentById(U);return!v(U)&&!(Z!=null&&Z.isCodeManaged)}function g(U){const Z=e.getComponentById(U);return!(Z!=null&&Z.isCodeManaged)&&e.getContainableTypes(U).length>0}function w(U){return!v(U)}function A(U){const Z=e.getComponentById(U);return!v(U)&&!(Z!=null&&Z.isCodeManaged)}function C(U){const Z=e.getComponentById(U);return!v(U)&&!(Z!=null&&Z.isCodeManaged)}function b(U){return!v(U)}function p(U,Z){const Q=e.getComponentById(U);if(!Q)return;const se=Q.parentId;if(!se)return;let Se;Z&&(Se=Z.split(",").slice(0,-1).join(",")),t.setSelection(se,Se)}function _(U){if(U.length==0)return!1;const Z={};return[...e.getComponents(),...U].forEach(se=>{Z[se.id]=se}),U.map(se=>xf(Z,se.parentId).includes(se.type)).every(se=>se)}function S(U){const Z=e.getComponentById(U);if(!Z||Z.isCodeManaged)return!1;const Q=t.getClipboard();if(Q===null)return!1;const{jsonSubtree:se}=Q,Se=JSON.parse(se);return Se.length==0?!1:(Se[0].parentId=U,_(Se))}function R(U){const Z=ie=>e.getComponents(ie,{includeBMC:!0,includeCMC:!1}).filter(K=>{var V;return!((V=e.getComponentDefinition(K.type))==null?void 0:V.positionless)}).length,Q=e.getComponentById(U);if(!Q||Q.isCodeManaged)return{up:!1,down:!1};if(e.getComponentDefinition(Q.type).positionless)return{up:!1,down:!1};const Se=Q.parentId?Z(Q.parentId):0,k=Se>0&&Q.position>0,P=Se>0&&Q.position<Se-1;return{up:k,down:P}}function Y(U){e.getComponentById(U)&&(t.setClipboard({operation:Ta.Cut,jsonSubtree:JSON.stringify(c(U))}),t.setSelection(null),h(U),e.sendComponentUpdate())}function X(U){const Z=JSON.parse(JSON.stringify(U));return Z.forEach(Q=>{delete Q.isCodeManaged;const se=n();Z.filter(Se=>Se.id!==Q.id).map(Se=>{var k;Se.parentId==Q.id&&(Se.parentId=se),(k=Se.outs)==null||k.forEach(P=>{P.toNodeId==Q.id&&(P.toNodeId=se)})}),Q.id=se,typeof Q.x<"u"&&typeof Q.y<"u"&&(Q.x+=36,Q.y+=36)}),Z}function te(U){if(!e.getComponentById(U))return;const Q=c(U),se=X(Q);t.setClipboard({operation:Ta.Copy,jsonSubtree:JSON.stringify(se)})}function $e(U){if(!e.getComponentById(U))return;const Q=t.getClipboard();if(Q===null)return;const{operation:se,jsonSubtree:Se}=Q,k=JSON.parse(Se),P=k[0];if(typeof P.outs<"u"&&P.parentId!==U&&(P.outs=[]),se==Ta.Cut)return pe(U,k);if(se==Ta.Copy)return we(U,k)}function pe(U,Z){t.setClipboard(null);const Q=Z[0];Q.parentId=U,Q.position=ye(U,Q.type);const se=`paste-cut-${U}`;t.openMutationTransaction(se,"Paste from cut"),Z.map(Se=>{e.addComponent(Se),t.registerPostMutation(Se)}),t.closeMutationTransaction(se),e.sendComponentUpdate()}function we(U,Z){t.setClipboard({operation:Ta.Copy,jsonSubtree:JSON.stringify(X(Z))});const Q=Z[0];Q.parentId=U,Q.position=ye(U,Q.type);const se=`paste-copy-${U}`;t.openMutationTransaction(se,"Paste from copy"),Z.map(Se=>{e.addComponent(Se),t.registerPostMutation(Se)}),t.closeMutationTransaction(se),e.sendComponentUpdate()}function ye(U,Z){if(e.getComponentDefinition(Z).positionless)return-2;const se=e.getComponents(U,{includeBMC:!0,includeCMC:!1}).filter(Se=>Se.position!==-2);return se.length>0?Math.max(Math.max(...se.map(k=>k.position))+1,0):0}function qe(){var Z,Q;const U=t.getMutationTransactionsSnapshot();return{isUndoAvailable:!!U.undo,isRedoAvailable:!!U.redo,undoDesc:(Z=U.undo)==null?void 0:Z.desc,redoDesc:(Q=U.redo)==null?void 0:Q.desc}}function Te(){const U=t.consumeUndoTransaction();U&&(Object.entries(U.mutations).forEach(([Z,Q])=>{if(Q.jsonPre&&Q.jsonPost){e.addComponent(JSON.parse(Q.jsonPre));return}if(!Q.jsonPre&&Q.jsonPost){e.deleteComponent(Z);return}if(Q.jsonPre&&!Q.jsonPost){e.addComponent(JSON.parse(Q.jsonPre));return}}),e.sendComponentUpdate())}function Ce(){const U=t.consumeRedoTransaction();U&&(Object.entries(U.mutations).forEach(([Z,Q])=>{if(Q.jsonPre&&Q.jsonPost){e.addComponent(JSON.parse(Q.jsonPost));return}if(!Q.jsonPre&&Q.jsonPost){e.addComponent(JSON.parse(Q.jsonPost));return}if(Q.jsonPre&&!Q.jsonPost){e.deleteComponent(Z);return}}),e.sendComponentUpdate())}function be(U,Z,Q){const se=e.getComponentById(U);if(!se)return;const Se=`edit-${U}-content-${Z}`;t.openMutationTransaction(Se,"Edit property",!0),t.registerPreMutation(se),se.content[Z]=Q,t.registerPostMutation(se),t.closeMutationTransaction(Se),e.sendComponentUpdate()}function fe(U,Z){const Q=e.getComponentById(U);if(!Q)return;const se=`add-${U}-out-${Z.outId}-${Z.toNodeId}`;t.openMutationTransaction(se,"Add out",!0),t.registerPreMutation(Q),Q.outs=[...Q.outs??[],Z],t.registerPostMutation(Q),t.closeMutationTransaction(se),e.sendComponentUpdate()}function de(U,Z){const Q=e.getComponentById(U);if(!Q)return;const se=`edit-${U}-out-${Z.outId}-${Z.toNodeId}`;t.openMutationTransaction(se,"Edit out",!0),t.registerPreMutation(Q),Q.outs=Q.outs.filter(Se=>!(Z.outId===Se.outId&&Z.toNodeId===Se.toNodeId)),t.registerPostMutation(Q),t.closeMutationTransaction(se),e.sendComponentUpdate()}function L(U,Z,Q){const se=e.getComponentById(U);if(!se)return;const Se=`change-${U}-coordinates`;t.openMutationTransaction(Se,"Change coordinates",!1),t.registerPreMutation(se),se.x=Math.floor(Z),se.y=Math.floor(Q),t.registerPostMutation(se),t.closeMutationTransaction(Se),e.sendComponentUpdate()}function le(U){const Z=Object.entries(U);if(Z.length==0)return;const Q=`change-multiple-coordinates-${Object.keys(U).join(",")}`;t.openMutationTransaction(Q,"Change coordinates",!1),Z.forEach(([se,{x:Se,y:k}])=>{const P=e.getComponentById(se);P&&(t.registerPreMutation(P),P.x=Math.floor(Se),P.y=Math.floor(k),t.registerPostMutation(P))}),t.closeMutationTransaction(Q),e.sendComponentUpdate()}function j(U,Z,Q="",se=!1){const Se=e.getComponentById(U);if(!Se)return;const k=`change-visibility-${U}`;t.openMutationTransaction(k,"Change visibility",!0),t.registerPreMutation(Se),Se.visible==null&&(Se.visible={expression:!0,binding:"",reversed:!1}),typeof Z=="boolean"?Se.visible.expression=Z:Z=="custom"&&(Se.visible={expression:"custom",binding:Q,reversed:se}),t.registerPostMutation(Se),t.closeMutationTransaction(k),e.sendComponentUpdate()}function E(U,Z,Q){const se=e.getComponentById(U);if(!se)return;let Se;if(Q)Se=Q;else{const P=e.getComponentDefinition(se.type),ve=Object.entries(P.events).filter(([F,K])=>K.bindable).map(([F,K])=>F);Se=ve==null?void 0:ve[0]}if(!Se)return;const k=`change-binding-${U}`;t.openMutationTransaction(k,"Change binding",!0),t.registerPreMutation(se),Z?se.binding={eventType:Se,stateRef:Z}:delete se.binding,t.registerPostMutation(se),t.closeMutationTransaction(k),e.sendComponentUpdate()}function O(U,Z,Q){const se=e.getComponentById(U);if(!se)return;const Se=`set-handler-${U}`;t.openMutationTransaction(Se,"Set event handler",!0),t.registerPreMutation(se),Q?(se.handlers||(se.handlers={}),se.handlers[Z]=Q):(delete se.handlers[Z],Object.keys(se.handlers).length==0&&delete se.handlers),t.registerPostMutation(se),t.closeMutationTransaction(Se),e.sendComponentUpdate()}function ue(U){const Z=e.getComponentById(U);return!Z||Z.type=="root"?null:Z.type=="page"||Z.type=="blueprints_blueprint"?U:ue(Z.parentId)}async function Be(U){var se;const Z=e.getComponentById(U);(se=e.getComponentDefinition(Z.type))!=null&&se.name&&e.setActivePageId(ue(U))}return{generateNewComponentId:n,moveComponent:a,moveComponentUp:r,moveComponentDown:o,cutComponent:Y,copyComponent:te,pasteComponent:$e,createAndInsertComponent:i,removeComponentSubtree:h,removeComponentsSubtree:d,isPasteAllowed:S,undo:Te,redo:Ce,setContentValue:be,addOut:fe,removeOut:de,changeCoordinates:L,changeCoordinatesMultiple:le,setVisibleValue:j,setBinding:E,getUndoRedoSnapshot:qe,setHandlerValue:O,isAddAllowed:g,isCopyAllowed:w,isCutAllowed:A,isDeleteAllowed:C,isGoToParentAllowed:b,isDraggingAllowed:y,getEnabledMoves:R,goToParent:p,goToComponentParentPage:Be}}const m3=30,v3=/^application\/json;writer=(?<componentType>\w+),(?<componentId>[\w\-]*)$/,Ss=Pe(null),Jr=Pe(null),Gi=Pe(!1);let pu=null,Ji=null;function g3(e){function t(w){var b;const A=w.dataTransfer.types[0],C=(b=A==null?void 0:A.match(v3))==null?void 0:b.groups;if(C)return{draggedType:C.componentType,draggedId:C.componentId}}function n(w){const b=(w.closest("[data-writer-cage]")??w).closest("[data-writer-id]");if(b)return b.dataset.writerId}function r(w){const A=t(w);if(!A)return;const{draggedType:C,draggedId:b}=A,p=n(w.target);if(!a(p,b,C))return;const S={draggedType:C,draggedId:b,parentId:Ss.value,position:Ji};return g(w),S}function o(w,A,C){const b=e.getComponentById(w);if(!b)return!1;const p=e.getContainableTypes(w);return!(b!=null&&b.isCodeManaged)&&!e.isChildOf(A,w)&&p.includes(C)}function a(w,A,C){const b=e.getComponentById(w);if(b)return o(w,A,C)?w:b.parentId?a(b.parentId,A,C):null}function s(w){if(Gi.value){l(w);return}i(w)}function i(w){const A=t(w);if(!A)return;const{draggedType:C,draggedId:b}=A,p=w.target,_=n(p),S=a(_,b,C);if(!S||S==b)return;const Y=p.closest(`[data-writer-id="${S}"]`).dataset.writerInstancePath;if(w.preventDefault(),Jr.value!==Y)pu=Date.now();else if(Date.now()-pu>=wS){Gi.value=!0,h(Jr.value);return}Ss.value=S,Jr.value=Y}function l(w){const A=t(w);if(!A)return;w.preventDefault();const C=document.querySelector(`[data-writer-instance-path="${Jr.value}"]`);if(d(w.clientX,w.clientY,C)>m3){g(w);return}const b=c(Jr.value);if(b.length==0)return;const p=u(w.clientX,w.clientY,b);if(!p)return;const{el:_}=p,{draggedId:S}=A,R=parseInt(_.dataset.writerPosition),Y=e.getComponentById(S);if(b.map(X=>{X.classList.contains("highlighted")&&X.classList.remove("highlighted")}),!_.classList.contains("highlighted")){if(_.classList.add("highlighted"),Y&&Y.parentId==Ss.value&&R>Y.position){Ji=R-1;return}Ji=R}}function c(w){const A=y(w);return Array.from(A.querySelectorAll("[data-writer-position]"))}function u(w,A,C){const b=C.map(p=>({el:p,distance:d(w,A,p)})).sort((p,_)=>p.distance>_.distance?1:-1);return b==null?void 0:b[0]}function d(w,A,C){const{top:b,left:p,right:_,bottom:S}=C.getBoundingClientRect(),R=Math.max(p-w,0,w-_),Y=Math.max(b-A,0,A-S);return Math.sqrt(R*R+Y*Y)}function h(w){y(w).classList.add("crackedContainer")}function v(w){y(w).classList.remove("crackedContainer")}function y(w){const A=document.querySelector(`[data-writer-instance-path="${w}"]`);if(A.hasAttribute("data-writer-container"))return A;const C=A.querySelectorAll("[data-writer-container]");for(let b=0;b<C.length;b++){const p=C[b];if(p.closest("[data-writer-instance-path]")==A)return p}}function g(w){w.preventDefault(),Jr.value&&(v(Jr.value),Jr.value=null),Ss.value=null,pu=null,Ji=null,Gi.value=!1}return{candidateId:Ss,candidateInstancePath:Jr,isParentSuitable:o,isCandidacyConfirmed:Gi,getComponentInfoFromDrag:t,dropComponent:r,assignInsertionCandidacy:s,removeInsertionCandidacy:g}}function hu(e,t){return Math.ceil(e/t)*t}function Fm(e,t){return Math.round(e/t)*t}function Y_(e,t){return Math.hypot(t.x-e.x,t.y-e.y)}function jm({x:e,y:t},n){return{x:Fm(e,n),y:Fm(t,n)}}function Xu({x:e,y:t},{x:n,y:r}){return{x:e+n,y:t+r}}function Vm(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function Yi(e,t,n){return e>=t&&e<=n}function Um(e,t,n,r){return Yi(e,n,r)||Yi(t,n,r)||Yi(n,e,t)||Yi(r,e,t)}function y3(e,t){const n=Um(e.x,e.x+e.width,t.x,t.x+t.width),r=Um(e.y,e.y+e.height,t.y,t.y+t.height);return n&&r}function Hm(e,t,n){const r=[{x:-n,y:-n},{x:-n,y:0},{x:-n,y:n},{x:0,y:-n},{x:0,y:n},{x:n,y:-n},{x:n,y:0},{x:n,y:n}],o=new Set,a=[],s=[];function i({x:v,y}){return{width:e.width,height:e.height,x:v,y}}function l(v){if(v.x<0||v.y<0)return!1;const y=i(v);return!t.some(g=>y3(y,g))}function c(v){const y=`${v.x},${v.y}`;o.has(y)||(a.push(v),o.add(y))}for(c({x:e.x,y:e.y});a.length;){const v=a.shift();if(v===void 0)return;if(l(v)&&s.push(v),s.length===0)for(const y of r)c(Xu(v,y))}const u=Vm(e),d=v=>Y_(u,Vm(i(v))),h=s.sort((v,y)=>d(v)-d(y)).shift();return h?i(h):void 0}const _3=["d"],b3=["d"],w3=["cx","cy"],A3=["x1","y1","x2","y2","stroke"],C3=["x1","y1","x2","y2","stroke"],Is=30,$3=Ie({__name:"BlueprintArrow",props:{arrow:{},isSelected:{type:Boolean},isEngaged:{type:Boolean}},emits:["delete"],setup(e,{emit:t}){const n=t,r=e,o=W(()=>{const i=r.arrow.x2-r.arrow.x1,l=r.arrow.y2-r.arrow.y1;return[{x:r.arrow.x1,y:r.arrow.y1},{x:r.arrow.x1+Is,y:r.arrow.y1},{x:r.arrow.x1+Is,y:r.arrow.y1+l*.25},{x:r.arrow.x1+i*.5,y:r.arrow.y1+l*.5},{x:r.arrow.x2-Is,y:r.arrow.y1+l*.75},{x:r.arrow.x2-Is,y:r.arrow.y2},{x:r.arrow.x2,y:r.arrow.y2}]}),a=W(()=>{const i=r.arrow.x2-r.arrow.x1,l=o.value;let c;return i>Is?(c=`M ${l[0].x} ${l[0].y}`,c+=`C ${l[3].x} ${l[0].y}, ${l[3].x} ${l[6].y}, ${l[6].x} ${l[6].y}`):(c=`M ${l[0].x} ${l[0].y}`,c+=`C ${l[1].x} ${l[1].y}, ${l[2].x} ${l[2].y}, ${l[3].x} ${l[3].y}`,c+=`C ${l[4].x} ${l[4].y}, ${l[5].x} ${l[5].y}, ${l[6].x} ${l[6].y}`),c});function s(){n("delete")}return(i,l)=>(I(),M("g",{class:ct(["BlueprintArrow",{engaged:i.isEngaged}]),tabindex:"0","data-writer-unselectable":"true"},[D("path",{d:a.value,style:$t({stroke:i.arrow.color})},null,12,_3),D("path",{d:a.value,style:$t({stroke:i.arrow.color,strokeWidth:12,opacity:i.isSelected?"0.2":"0"})},null,12,b3),i.isSelected?(I(),M("g",{key:0,class:"delete",tabindex:"0","aria-label":"Delete relation",onClick:s,onKeydown:Do(s,["enter"])},[D("circle",{cx:o.value[3].x,cy:o.value[3].y,r:"12"},null,8,w3),D("line",{class:"cross",x1:o.value[3].x-4,y1:o.value[3].y-4,x2:o.value[3].x+4,y2:o.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,A3),D("line",{class:"cross",x1:o.value[3].x+4,y1:o.value[3].y-4,x2:o.value[3].x-4,y2:o.value[3].y+4,stroke:i.arrow.color,"stroke-width":"2"},null,8,C3)],32)):_e("",!0)],2))}}),zm=Ne($3,[["__scopeId","data-v-343694d1"]]),S3=Ie({__name:"BlueprintMiniMap",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset"],setup(e,{emit:t}){ts(C=>({"5436111d":`${l.value.width}px`,"2f2ee374":`${l.value.height}px`,"791851f1":c.value.isDisplayed?"":"none"}));const n=ee(re.builderManager),r=st("rootEl"),o=t,a=new ResizeObserver(v),s=new MutationObserver(v),i=Pe(.2),l=Pe({width:166,height:100}),c=Pe({width:260,height:1,top:0,left:0,isDisplayed:!1}),u=Pe({width:1,height:1,top:0,left:0}),d=e,h=Pe([]);function v(){if(!d.nodeContainerEl)return;const C=Array.from(d.nodeContainerEl.querySelectorAll("[data-writer-id]")),b=d.nodeContainerEl.getBoundingClientRect();let p=0,_=0;h.value=C.map(S=>{const R=S.getBoundingClientRect();return p=Math.max(p,R.right+d.renderOffset.x*d.zoomLevel-b.left),_=Math.max(_,R.bottom+d.renderOffset.y*d.zoomLevel-b.top),{id:S.dataset.writerId,width:R.width,height:R.height,top:R.top+d.renderOffset.y*d.zoomLevel-b.top,left:R.left+d.renderOffset.x*d.zoomLevel-b.left}}),l.value={width:260,height:b.height/b.width*b.width/7},i.value=Math.min(l.value.width/(b.width+300),l.value.height/(b.height+300),l.value.width/(p+300),l.value.height/(_+300),l.value.width/(d.renderOffset.x*d.zoomLevel+b.width),l.value.height/(d.renderOffset.y*d.zoomLevel+b.height)),u.value={top:d.renderOffset.y*d.zoomLevel,left:d.renderOffset.x*d.zoomLevel,width:b.width,height:b.height},c.value={...u.value,isDisplayed:c.value.isDisplayed}}function y(C){const b=d.nodeContainerEl.getBoundingClientRect(),p=r.value.getBoundingClientRect();c.value={...c.value,top:Math.min(Math.max(0,(C.pageY-p.top)*(1/i.value)-b.height/2),p.height*(1/i.value)-b.height),left:Math.min(Math.max(0,(C.pageX-p.left)*(1/i.value)-b.width/2),p.width*(1/i.value)-b.width)}}function g(){c.value.isDisplayed=!0}function w(){c.value.isDisplayed=!1}function A(C){C.stopPropagation(),n.setSelection(null),o("changeRenderOffset",{x:c.value.left*(1/d.zoomLevel),y:c.value.top*(1/d.zoomLevel)})}return bn(async()=>{a.observe(d.nodeContainerEl),s.observe(d.nodeContainerEl,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["style"]}),await Hn(),v()}),Pr(()=>{a.disconnect(),s.disconnect()}),(C,b)=>(I(),M("div",{ref_key:"rootEl",ref:r,class:"BlueprintMiniMap",onMouseenter:g,onMouseleave:w,onMousemove:y,onClick:A},[D("div",{class:"selectedArea",style:$t({top:`${u.value.top*i.value}px`,left:`${u.value.left*i.value}px`,width:`${u.value.width*i.value}px`,height:`${u.value.height*i.value}px`})},null,4),D("div",{class:"selector",style:$t({top:`${c.value.top*i.value}px`,left:`${c.value.left*i.value}px`,width:`${c.value.width*i.value}px`,height:`${c.value.height*i.value}px`})},null,4),(I(!0),M(ze,null,xt(h.value,p=>(I(),M("div",{key:p.id,class:ct(["node",{selected:x(n).isComponentIdSelected(p.id)}]),style:$t({top:`${p.top*i.value}px`,left:`${p.left*i.value}px`,width:`${p.width*i.value}px`,height:`${p.height*i.value}px`})},null,6))),128))],544))}}),I3=Ne(S3,[["__scopeId","data-v-05861f5c"]]);function E3(){var t;return((t=navigator==null?void 0:navigator.userAgentData)==null?void 0:t.platform)||(navigator==null?void 0:navigator.platform)}function Km(){return X_()?"⌘ ":"Ctrl+"}function Qu(e){return X_()?e.metaKey:e.ctrlKey}function X_(){return E3().toLowerCase().indexOf("mac")!=-1}const k3={class:"bar"},T3={class:"autoArranger"},x3={class:"zoomer"},P3={class:"miniMapCollapser"},Wm=.01,Xi=.2,M3=Ie({__name:"BlueprintNavigator",props:{nodeContainerEl:{},renderOffset:{},zoomLevel:{}},emits:["changeRenderOffset","changeZoomLevel","resetZoom","autoArrange"],setup(e,{emit:t}){const n=e,{zoomLevel:r}=Kl(n),o=st("rootEl"),a=t,s=Pe(!0),i=Pe(l(r.value));function l(C){return`${Math.floor(C*100)}%`}function c(){s.value=!s.value}function u(){a("autoArrange")}function d(C){a("changeRenderOffset",C)}function h(){const C=r.value+Xi;a("changeZoomLevel",C)}function v(){const C=r.value-Xi;a("changeZoomLevel",C)}function y(C){const b=C.key;let p=r.value;if(b=="ArrowUp")p+=Wm;else if(b=="ArrowDown")p-=Wm;else return;a("changeZoomLevel",p)}function g(C){var _;const b=(_=C.target)==null?void 0:_.value;let p=parseInt(b)/100;isNaN(p)&&(p=1),i.value=l(p),a("changeZoomLevel",p)}function w(){a("resetZoom")}Ge(r,C=>{i.value=l(C)});function A(C){if(Qu(C)===!1)return;let b=r.value;if(C.key=="+"||C.key=="=")C.preventDefault(),b+=Xi;else if(C.key=="-")C.preventDefault(),b-=Xi;else return;a("changeZoomLevel",b)}return bn(()=>{document.addEventListener("keydown",A)}),Pr(()=>{document.removeEventListener("keydown",A)}),(C,b)=>(I(),M("div",{ref_key:"rootEl",ref:o,"data-writer-unselectable":"true",class:"BlueprintNavigator",onKeydown:A},[C.nodeContainerEl&&s.value?(I(),Ve(I3,{key:0,"node-container-el":C.nodeContainerEl,"render-offset":C.renderOffset,"zoom-level":x(r),class:"miniMap",onChangeRenderOffset:d},null,8,["node-container-el","render-offset","zoom-level"])):_e("",!0),D("div",k3,[D("div",T3,[He(Nn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Auto arrange blocks","data-writer-tooltip-placement":"left",onClick:u},{default:et(()=>b[1]||(b[1]=[D("i",{class:"material-symbols-outlined"},"apps",-1)])),_:1})]),D("div",x3,[He(Nn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":x(r)>x(ta).minLevel?`Zoom out (${x(Km)()}-)`:"Can't zoom further","data-writer-tooltip-placement":"left",onClick:v},{default:et(()=>b[2]||(b[2]=[D("i",{class:"material-symbols-outlined"},"remove",-1)])),_:1},8,["data-writer-tooltip"]),He(__,{modelValue:i.value,"onUpdate:modelValue":b[0]||(b[0]=p=>i.value=p),class:"zoomLevelInput",onKeydown:y,onChange:g},null,8,["modelValue"]),He(Nn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":x(r)<x(ta).maxLevel?`Zoom in (${x(Km)()}+)`:"Can't zoom further","data-writer-tooltip-placement":"right",onClick:h},{default:et(()=>b[3]||(b[3]=[D("i",{class:"material-symbols-outlined"},"add",-1)])),_:1},8,["data-writer-tooltip"]),He(Nn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":"Reset zoom","data-writer-tooltip-placement":"right",onClick:w},{default:et(()=>b[4]||(b[4]=[D("i",{class:"material-symbols-outlined"},"undo",-1)])),_:1})]),D("div",P3,[He(Nn,{variant:"neutral",size:"smallIcon","data-writer-tooltip":s.value?"Close minimap":"Open minimap","data-writer-tooltip-placement":"right",onClick:c},{default:et(()=>b[5]||(b[5]=[D("i",{class:"material-symbols-outlined"},"close_fullscreen",-1)])),_:1},8,["data-writer-tooltip"])])])],544))}}),O3=Ne(M3,[["__scopeId","data-v-ac568870"]]),N3={class:"WdsModal__main"},R3={key:1,class:"WdsModal__main__title"},L3={key:0},D3={class:"WdsModal__main__content"},B3={key:2,class:"WdsModal__main__footer"},F3={key:0,class:"WdsModal__main__footer__hint"},j3={key:1,class:"WdsModal__main__footer__actions"},V3=Ie({__name:"WdsModal",props:{title:{type:String,required:!1,default:null},size:{type:String,required:!1,default:"normal"},description:{type:String,required:!1,default:null},actions:{type:Array,required:!1,default:()=>[]},allowOverflow:{type:Boolean,required:!1},displayCloseButton:{type:Boolean,required:!1},hint:{type:String,required:!1,default:void 0}},emits:{close:()=>!0},setup(e){const t=e,{title:n,actions:r}=Kl(t);return(o,a)=>{var s,i;return I(),Ve(Tv,{to:"#modal"},[D("div",{class:ct(["WdsModal colorTransformer",{"WdsModal--overflow":e.allowOverflow,"WdsModal--wide":e.size=="wide"}]),tabindex:"-1"},[D("div",N3,[e.displayCloseButton?(I(),Ve(Nn,{key:0,variant:"neutral",size:"smallIcon",class:"WdsModal__main__closeBtn",onClick:a[0]||(a[0]=l=>o.$emit("close"))},{default:et(()=>a[1]||(a[1]=[D("i",{class:"material-symbols-outlined"},"close",-1)])),_:1})):_e("",!0),x(n)||e.description?(I(),M("div",R3,[D("h2",null,Me(x(n)),1),e.description?(I(),M("summary",L3,Me(e.description),1)):_e("",!0)])):_e("",!0),D("div",D3,[Yt(o.$slots,"default",{},void 0,!0)]),((s=x(r))==null?void 0:s.length)>0||e.hint?(I(),M("div",B3,[e.hint?(I(),M("p",F3,Me(e.hint),1)):_e("",!0),((i=x(r))==null?void 0:i.length)>0?(I(),M("div",j3,[(I(!0),M(ze,null,xt(x(r),(l,c)=>(I(),Ve(Nn,{key:c,variant:c==x(r).length-1?"primary":"tertiary",disabled:l.disabled,onClick:l.fn},{default:et(()=>[Bt(Me(l.desc),1)]),_:2},1032,["variant","disabled","onClick"]))),128))])):_e("",!0)])):_e("",!0)])],2)])}}}),U3=Ne(V3,[["__scopeId","data-v-7881b37d"]]),H3="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M34.0187%2028.9434L37.2255%2015.7128H32.7659L30.812%2015.7128L34.0187%2028.9434Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M25.4266%2015.7128H20.967L25.4266%2034.1126L27.4085%2034.1126H31.8681L27.4085%2015.7128H25.4266L25.4266%2015.7128Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.5635%2015.7129H13.1038L13.1039%2015.7132H11.1219L15.5816%2034.113H20.0413L20.0412%2034.1126H22.0231L17.5635%2015.7129Z'%20fill='white'/%3e%3c/svg%3e",z3=["width","height"],K3=["fill"],W3=["fill"],q3=["fill"],G3=Ie({__name:"WdsLoaderDots",props:{color:{type:String,required:!1,default:St.Blue5},size:{type:Number,required:!1,default:16}},setup(e){return(t,n)=>(I(),M("svg",{width:e.size,height:e.size,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[D("circle",{cx:"4",cy:"8",fill:e.color},n[0]||(n[0]=[D("animate",{attributeName:"r",values:"0.5;3;0",dur:"1.2s",repeatCount:"indefinite"},null,-1)]),8,K3),D("circle",{cx:"8",cy:"8",fill:e.color},n[1]||(n[1]=[D("animate",{attributeName:"r",values:"0.5;3;0",dur:"1.2s",begin:"0.4s",repeatCount:"indefinite"},null,-1)]),8,W3),D("circle",{cx:"12",cy:"8",fill:e.color},n[2]||(n[2]=[D("animate",{attributeName:"r",values:"0.5;3;0",dur:"1.2s",begin:"0.8s",repeatCount:"indefinite"},null,-1)]),8,q3)],8,z3))}}),J3={},Y3={width:"592",height:"592",viewBox:"0 0 592 592",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function X3(e,t){return I(),M("svg",Y3,t[0]||(t[0]=[D("g",null,[D("g",{"clip-path":"url(#paint0_angular_167_137448_clip_path)"},[D("g",{transform:"matrix(0.208791 0.208791 -0.208791 0.208791 296.078 296.082)"},[D("foreignObject",{x:"-1003.39",y:"-1003.39",width:"2006.77",height:"2006.77"},[D("div",{xmlns:"http://www.w3.org/1999/xhtml",style:{background:`conic-gradient(
									from 90deg,
									rgba(240, 207, 255, 1) 0deg,
									rgba(191, 203, 255, 1) 360deg
								)`,height:"100%",width:"100%",opacity:"1"}})])])]),D("ellipse",{cx:"296.078",cy:"296.082",rx:"295.275",ry:"295.275",transform:"rotate(-45 296.078 296.082)"})],-1),D("defs",null,[D("clipPath",{id:"paint0_angular_167_137448_clip_path"},[D("ellipse",{cx:"296.078",cy:"296.082",rx:"295.275",ry:"295.275",transform:"rotate(-45 296.078 296.082)"})])],-1)]))}const mu=Ne(J3,[["render",X3]]),Q3={class:"BlueprintsLifeLoading"},Z3={class:"logoContainer"},eB={class:"rotating-text"},tB={class:"background"},nB=4e3,rB=Ie({__name:"BlueprintsGenerationLoader",setup(e){const t=["Analyzing requirements","Shopping for blocks","Connecting the dots","Wiring the circuits","Flipping the switches"],n=Pe(0),r=setInterval(()=>{n.value=(n.value+1)%t.length},nB);return Pr(()=>clearInterval(r)),(o,a)=>(I(),M("div",Q3,[D("div",Z3,[a[0]||(a[0]=D("img",{src:H3,alt:"Writer Framework logo"},null,-1)),He(G3,{class:"dot-loader",color:"black"}),D("p",eB,[(I(),M(ze,null,xt(t,(s,i)=>D("span",{key:i,class:ct({active:n.value===i})},Me(s),3)),64))])]),D("div",tB,[He(mu,{class:"rotating-circle left"}),He(mu,{class:"rotating-circle center"}),He(mu,{class:"rotating-circle right"})])]))}}),oB=Ne(rB,[["__scopeId","data-v-6298b85a"]]),aB={class:"BlueprintsAutogen"},sB={class:"main"},iB={class:"buttons"},lB=Ie({__name:"BlueprintsAutogen",emits:["blockGeneration"],setup(e,{emit:t}){const n=ee(re.core),r=ee(re.builderManager),{generateNewComponentId:o}=Pf(n,r),a=Pe(!1),s=Pe(""),i=t;function l(){i("blockGeneration",null)}function c(d){const h={};return d.forEach(v=>{const y=o();h[v.id]=y,v.id=y}),d.forEach(v=>{var y;(y=v.outs)==null||y.forEach(g=>{g.toNodeId=h[g.toNodeId]})}),d.forEach(v=>{Object.entries(h).forEach(([y,g])=>{const w=new RegExp(`(@{\\s*results\\.)aig${y}\\b`,"g");Object.entries(v.content).forEach(([A,C])=>{const b=C.replace(w,(p,_)=>p.replace(_,g));v.content[A]=b})})}),d}async function u(){var g;const d=s.value;a.value=!0;const h=await fetch("/api/autogen",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:d})});if(a.value=!1,!h.ok)throw new Error(`Error: ${h.status} - ${h.statusText}`);const v=await h.json(),y=c((g=v.blueprint)==null?void 0:g.components);i("blockGeneration",{components:y})}return(d,h)=>(I(),M("div",aB,[a.value?(I(),Ve(oB,{key:1})):(I(),M(ze,{key:0},[D("div",sB,[He(Sd,{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=v=>s.value=v),rows:"8",placeholder:"Describe the blocks you'd like to generate..."},null,8,["modelValue"])]),D("div",iB,[He(Nn,{onClick:u},{default:et(()=>h[1]||(h[1]=[D("i",{class:"material-symbols-outlined"},"bolt",-1),Bt(" Generate ")])),_:1}),He(Nn,{variant:"tertiary",onClick:l},{default:et(()=>h[2]||(h[2]=[Bt(" Cancel ")])),_:1})])],64))]))}}),cB=Ne(lB,[["__scopeId","data-v-472c063d"]]),uB=["data-writer-unselectable"],dB=["x","y"],fB=["cx","cy","fill"],pB={key:0,width:"100%",height:"100%",fill:"url(#grid)",fil:""},{log:hB}=Ln(),cn=24,mB="A container component representing a single blueprint within the application.",vB={writer:{name:"Blueprint",toolkit:"blueprints",category:"Root",description:mB,allowedChildrenTypes:["*"],allowedParentTypes:["blueprints_root"],fields:{key:{name:"Blueprint key",desc:"Unique identifier. It's needed to enable navigation to this Blueprint.",type:q.IdKey}}}},ta={minLevel:.2,maxLevel:1,step:.25,initialLevel:1},gB=Ie({...vB,__name:"BlueprintsBlueprint",setup(e){ts(ce=>({"52be388f":h.value}));const t=za({loader:()=>tn(()=>import("./BlueprintToolbar-Dxc3x0ie.js"),__vite__mapDeps([6,7,8,9,1,10]),import.meta.url)}),n=ee(re.core),r=ee(re.builderManager),o=ee(re.renderProxiedComponent),a=ee(re.componentId),s=st("rootEl"),i=st("nodeContainerEl"),l=Pn([]),c=Pn({x:0,y:0}),u=Pn(null),d=Pe(!1),h=Pe(ta.initialLevel),v=new MutationObserver(pe),y=Pn({}),g=cn*4,w=cn*6,A=W(()=>n.getComponents(a,{sortedByPosition:!0})),{createAndInsertComponent:C,addOut:b,removeOut:p,changeCoordinatesMultiple:_}=Pf(n,r),{getComponentInfoFromDrag:S}=g3(n),R=Pn(null),Y=Pn(null),X=Pn(null),te=$e();function $e(){const ce="blueprint__hideGrid",Ee=Pe(localStorage.getItem(ce)===null);return Ge(Ee,Le=>Le?localStorage.removeItem(ce):localStorage.setItem(ce,"1")),Ee}function pe(){l.value=A.value.reduce((ce,Ee)=>{var Le;if(!((Le=Ee.outs)!=null&&Le.length))return ce;for(const Ae of Ee.outs){const je=U(Ee.id,Ae.outId,void 0,Ae.toNodeId);je&&ce.push(je)}return ce},[])}const we=W(()=>{var ce,Ee;return R.value===null&&!((ce=Y.value)!=null&&ce.isPerfected)&&!((Ee=X.value)!=null&&Ee.isPerfected)?null:!0});function ye(){u.value=null}function qe(){const ce=new Map;function Ee(Ae,je){var wt;if(ce.values().find(ht=>ht.has(Ae)))return;ce.has(je)||ce.set(je,new Set),ce.get(je).add(Ae),(wt=Ae.outs)==null||wt.forEach(ht=>{const Ft=n.getComponentById(ht.toNodeId);Ee(Ft,je+1)})}const Le=new Map;return A.value.forEach(Ae=>{var je;(je=Ae.outs)==null||je.forEach(rt=>{Le.has(rt.toNodeId)||Le.set(rt.toNodeId,new Set),Le.get(rt.toNodeId).add(Ae.id)})}),A.value.filter(Ae=>!Le.has(Ae.id)).forEach(Ae=>{Ee(Ae,0)}),ce}function Te(ce){const Ee=`[data-writer-id="${ce}"]`,Le=i.value.querySelector(Ee);if(Le)return Le.getBoundingClientRect()}function Ce(ce){var je;const Ee=Te(ce);if(!Ee)return;const Le=(je=s.value)==null?void 0:je.getBoundingClientRect();if(!Le)return;const Ae=rt=>{const Ye=hu(rt,cn);return Ye===rt?Ye+1:Ye-1};return{x:c.value.x+(Ee.x-Le.x)*j.value,y:c.value.y+(Ee.y-Le.y)*j.value,width:Ae(Ee.width*j.value),height:Ae(Ee.height*j.value)}}function be(ce){const Ee=new Map,Le=new Map;return ce.forEach((Ae,je)=>{let rt=0,Ye=0;Ae.forEach(wt=>{const ht=Te(wt.id);ht&&(Le.set(wt.id,{height:ht.height*j.value}),rt+=ht.height*j.value+g,Ye=Math.max(Ye,ht.width*j.value))}),Ee.set(je,{height:rt-g,width:Ye})}),{columnDimensions:Ee,nodeDimensions:Le}}function fe(){de("currentY")}function de(ce){const Ee={currentY:(ht,Ft)=>ht.y>Ft.y?1:-1,socketPosition:(ht,Ft)=>{const[zt,Kt]=[ht,Ft].map(ds=>A.value.map(sr=>{var ho;return(ho=sr.outs)==null?void 0:ho.filter(Kr=>Kr.toNodeId===ds.id).map(Kr=>({fromNodeId:sr.id,fromOutId:Kr.outId}))}).filter(Boolean).flat());if(!zt||zt.length===0||!Kt||Kt.length===0)return 0;const Wt=document.querySelector(`[data-writer-id="${zt[0].fromNodeId}"] [data-writer-socket-id="${zt[0].fromOutId}"]`),wn=document.querySelector(`[data-writer-id="${Kt[0].fromNodeId}"] [data-writer-socket-id="${Kt[0].fromOutId}"]`);if(!Wt||!wn)return 0;const po=Wt.getBoundingClientRect(),fa=wn.getBoundingClientRect();return po.y>fa.y?-1:1}},Le=qe(),{columnDimensions:Ae,nodeDimensions:je}=be(Le),rt=Math.max(...Array.from(Ae.values()).map(ht=>ht.height)),Ye={};let wt=w/2;for(let ht=0;ht<Le.size;ht++){const Ft=Array.from(Le.get(ht)).sort(Ee[ce]),{width:zt,height:Kt}=Ae.get(ht);let Wt=hu((rt-Kt)/2+g,cn);Ft.forEach(wn=>{const po=jm({x:wt,y:Wt},cn);Ye[wn.id]=po,Wt+=je.get(wn.id).height+g}),wt+=hu(zt+w,cn)}_(Ye)}function L(ce,Ee){se();const Ae=document.querySelector(`[data-writer-id="${Ee}"]`).getBoundingClientRect(),je=(ce.pageX-Ae.x)*j.value,rt=(ce.pageY-Ae.y)*j.value;Y.value={nodeId:Ee,offset:{x:je,y:rt},isPerfected:!1}}function le(ce,Ee){R.value={fromNodeId:ce,fromOutId:Ee}}const j=W(()=>1/h.value);function E(ce){const Ee=s.value.getBoundingClientRect(),Le=c.value.x+(ce.pageX-Ee.x)*(1/h.value),Ae=c.value.y+(ce.pageY-Ee.y)*(1/h.value);return{x:Le,y:Ae}}function O(ce){ce.preventDefault(),ce.stopPropagation();const Ee=S(ce);if(!Ee)return;const{draggedType:Le,draggedId:Ae}=Ee;if(Ae)return;const{x:je,y:rt}=E(ce);je<0||rt<0||oe(Le,{x:je,y:rt})}function ue(ce,Ee){if(u.value==Ee){u.value=null;return}ce.stopPropagation(),u.value=Ee,r.setSelection(null)}async function Be(ce){if(!ce.toNodeId)return;const Ee={outId:ce.fromOutId,toNodeId:ce.toNodeId};p(ce.fromNodeId,Ee)}function U(ce,Ee,Le,Ae){var Kt;let je,rt,Ye,wt;const ht=(Kt=s.value)==null?void 0:Kt.getBoundingClientRect();if(!ht)return;Ye=((Le==null?void 0:Le.x)-ht.x)*j.value,wt=((Le==null?void 0:Le.y)-ht.y)*j.value;const Ft=document.querySelector(`[data-writer-id="${ce}"] [data-writer-socket-id="${Ee}"]`);if(!Ft)return;const zt=Ft.getBoundingClientRect();if(je=(zt.x-ht.x+zt.width/2)*j.value,rt=(zt.y-ht.y+zt.height/2)*j.value,!!Ft){if(typeof Ae<"u"){const wn=document.querySelector(`[data-writer-id="${Ae}"]`).getBoundingClientRect();Ye=(wn.x-ht.x)*j.value,wt=(wn.y-ht.y+wn.height/2)*j.value}return{x1:je,y1:rt,x2:Ye,y2:wt,color:getComputedStyle(Ft).backgroundColor,fromNodeId:ce,fromOutId:Ee,toNodeId:Ae}}}function Z(ce){const Le=ce.target.closest(".BlueprintsBlueprint [data-writer-id]");return Le==null?void 0:Le.dataset.writerId}function Q(ce){let Ee,Le;Le=Z(ce),typeof Le>"u"&&(Ee={x:ce.pageX,y:ce.pageY});const{fromNodeId:Ae,fromOutId:je}=R.value;Le!=Ae&&(R.value={...R.value,liveArrow:U(Ae,je,Ee,Le)})}function se(){X.value=null,R.value=null,Y.value=null}function Se(ce){const Ee=Object.entries(ce).filter(([Le,Ae])=>{const je=n.getComponentById(Le);return(je==null?void 0:je.x)!==Ae.x||(je==null?void 0:je.y)!==Ae.y}).reduce((Le,[Ae,je])=>{const rt=jm(je,cn),Ye=Ce(Ae),wt={...Ye,...rt},ht=A.value.filter(Kt=>Kt.id!==Ae).map(Kt=>Ce(Kt.id)).filter(Boolean),{x:Ft,y:zt}=Hm(wt,ht,cn);return(Ye.x!==Ft||Ye.y!==zt)&&(Le[Ae]={x:Ft,y:zt}),Le},{});Object.keys(Ee).length!==0&&_(Ee)}function k(){Se(y.value),y.value={}}function P(ce){const{nodeId:Ee,offset:Le}=Y.value,{x:Ae,y:je}=E(ce),rt=Math.floor(Ae-Le.x),Ye=Math.floor(je-Le.y),wt=n.getComponentById(Ee);Y_({x:wt.x,y:wt.y},{x:rt,y:Ye})>10&&(Y.value={...Y.value,isPerfected:!0});const Ft={x:rt-wt.x,y:Ye-wt.y};if(!r.selection.value.some(Wt=>Wt.componentId===Ee)){y.value={...y.value,[Ee]:{x:rt,y:Ye}};return}const Kt=r.selection.value.map(Wt=>n.getComponentById(Wt.componentId)).filter(Wt=>Wt.id!==Ee&&Wt.x!==void 0&&Wt.y!==void 0).reduce((Wt,wn)=>(Wt[wn.id]=Xu({x:wn.x,y:wn.y},Ft),Wt),{});y.value={...y.value,...Kt,[Ee]:{x:rt,y:Ye}}}function ie(ce){const Ee=s.value.getBoundingClientRect(),Le=ce.pageX-Ee.x,Ae=ce.pageY-Ee.y,{x:je,y:rt}=X.value.offset;X.value={isPerfected:!0,offset:{x:Le,y:Ae}},xe(c.value.x+(je-Le)*1*j.value,c.value.y+(rt-Ae)*1*j.value)}function ve(ce){if(ce.buttons==1){if(R.value){Q(ce);return}if(Y.value){P(ce);return}if(X.value){ie(ce);return}}}function F(ce){if(se(),ce.buttons!=1)return;const Ee=s.value.getBoundingClientRect(),Le=ce.pageX-Ee.x,Ae=ce.pageY-Ee.y;X.value={offset:{x:Le,y:Ae},isPerfected:!1}}async function K(ce){if(Y.value&&k(),R.value===null)return;const Ee=Z(ce);if(!Ee){R.value=null;return}const{fromNodeId:Le,fromOutId:Ae}=R.value;if(Le==Ee){R.value=null;return}b(R.value.fromNodeId,{toNodeId:Ee,outId:Ae})}function oe(ce,Ee){const Le=A.value.map(rt=>Ce(rt.id)).filter(Boolean),{x:Ae,y:je}=Hm({...Ee,width:240,height:180},Le,cn);C(ce,a,void 0,{x:Ae,y:je})}function V(ce){var Ye;const Ee=Te(ce),Le=(Ye=s.value)==null?void 0:Ye.getBoundingClientRect();if(!Ee||!Le)return;const{width:Ae,height:je}=Ee,rt=n.getComponentById(ce);rt&&xe(rt.x-Le.width/2+Ae/2,rt.y-Le.height/2+je/2)}function H(ce){xe(ce.x,ce.y)}function G(ce){const Ee=A.value.map(je=>({id:je.id,type:je.type,content:je.content,outs:je.outs})),Le=JSON.stringify(Ee),Ae=`
	<example>
		<description>
			${ce}
		</description>
		<blueprint>
			${Le}
		</blueprint>
	</example>`.trim();hB(Ae)}function he(ce){h.value=Math.max(Math.min(ta.maxLevel,ce),ta.minLevel)}function ge(ce){he(ce)}function xe(ce,Ee){c.value={x:Math.max(0,ce),y:Math.max(0,Ee)}}function Fe(ce){xe(c.value.x+ce.deltaX*j.value,c.value.y+ce.deltaY*j.value)}function ot(ce){const Ee=.006666666666666667,Le=s.value.getBoundingClientRect(),Ae=h.value;h.value=Math.min(Math.max(h.value-ce.deltaY*Ee,ta.minLevel),ta.maxLevel);const je={w:Le.width*(1/Ae)*j.value*(h.value-Ae),h:Le.height*(1/Ae)*j.value*(h.value-Ae)},rt={x:(ce.pageX-Le.x)/Le.width,y:(ce.pageY-Le.y)/Le.height};xe(c.value.x+je.w*rt.x,c.value.y+je.h*rt.y)}async function pt(ce){if(ce.preventDefault(),!ce.ctrlKey&&!Qu(ce)){Fe(ce);return}ot(ce)}async function dt(){const{width:Ee,height:Le,x:Ae,y:je}=s.value.getBoundingClientRect(),rt=i.value.querySelectorAll("[data-writer-id]"),{maxX:Ye,maxY:wt}=Array.from(rt).reduce((Ft,zt)=>{const Kt=zt.getBoundingClientRect();return{maxY:Math.max(Ft.maxY,(Kt.bottom-je)*j.value+c.value.y),maxX:Math.max(Ft.maxX,(Kt.right-Ae)*j.value+c.value.x)}},{maxY:0,maxX:0}),ht=Math.min((Ee-48)/Ye,(Le-48)/wt);he(ht),xe(0,0)}async function Xt(ce){if(d.value=!1,!ce)return;const{components:Ee}=ce;Ee.forEach(Le=>{C(Le.type,a,void 0,Le)}),await Hn(),de("socketPosition")}Ge(r.firstSelectedItem,ce=>{ce&&(u.value=null,n.isChildOf(a,ce.componentId)&&ce.source!=="click"&&V(ce.componentId))});function Nt(ce){if(Qu(ce)&&(ce.code==="Backquote"||ce.code==="Backslash")){te.value=!te.value;return}if(!r.selection.value.length)return;const Le=ce.target;if(Le.tagName==="INPUT"||Le.tagName==="TEXTAREA")return;function Ae(){switch(ce.key){case"ArrowDown":return{x:0,y:cn};case"ArrowUp":return{x:0,y:-cn};case"ArrowLeft":return{x:-cn,y:0};case"ArrowRight":return{x:cn,y:0}}}const je=Ae();if(je===void 0)return;ce.preventDefault();const rt=r.selection.value.map(Ye=>n.getComponentById(Ye.componentId)).filter(Ye=>(Ye==null?void 0:Ye.x)!==void 0&&(Ye==null?void 0:Ye.y)!==void 0).reduce((Ye,wt)=>(Ye[wt.id]=Xu({x:wt.x,y:wt.y},je),Ye),{});Se(rt)}const en=new AbortController;return bn(async()=>{var ce;await dt(),await Hn(),pe(),(ce=s.value)==null||ce.addEventListener("wheel",pt,{signal:en.signal}),document.addEventListener("keydown",Nt,{signal:en.signal}),v.observe(i.value,{attributes:!0,attributeFilter:["style"],childList:!0,subtree:!0,characterData:!0}),window.createAutogenExample=G}),Pr(()=>{en.abort(),v.disconnect()}),(ce,Ee)=>{var Le;return I(),M("div",{ref_key:"rootEl",ref:s,class:"BlueprintsBlueprint","data-writer-unselectable":we.value,onClick:ye,onDragover:Ee[1]||(Ee[1]=$r(()=>{},["prevent","stop"])),onDrop:O,onMousemove:ve,onMousedown:F,onMouseup:K},[D("div",{ref_key:"nodeContainerEl",ref:i,class:"nodeContainer"},[(I(),M("svg",null,[D("defs",null,[D("pattern",{id:"grid",width:cn,height:cn,patternUnits:"userSpaceOnUse",x:-c.value.x-cn/2,y:-c.value.y-cn/2},[D("circle",{cx:cn/2,cy:cn/2,r:"1",fill:x(St).Gray3},null,8,fB)],8,dB)]),x(te)?(I(),M("rect",pB)):_e("",!0),(I(!0),M(ze,null,xt(l.value,(Ae,je)=>(I(),Ve(zm,{key:je,arrow:Ae,"is-selected":u.value==je,"is-engaged":u.value==je||x(r).isComponentIdSelected(Ae.fromNodeId)||x(r).isComponentIdSelected(Ae.toNodeId),onClick:rt=>ue(rt,je),onDelete:rt=>Be(Ae)},null,8,["arrow","is-selected","is-engaged","onClick","onDelete"]))),128)),(Le=R.value)!=null&&Le.liveArrow?(I(),Ve(zm,{key:"liveArrow",arrow:R.value.liveArrow,"is-selected":!1,"is-engaged":!0},null,8,["arrow"])):_e("",!0)])),(I(!0),M(ze,null,xt(A.value,Ae=>{var je,rt,Ye,wt,ht,Ft,zt,Kt;return I(),Ve(es(x(o)(Ae.id,0)),{key:Ae.id,style:$t({top:`${(((rt=(je=y.value)==null?void 0:je[Ae.id])==null?void 0:rt.y)??Ae.y)-c.value.y}px`,left:`${(((wt=(Ye=y.value)==null?void 0:Ye[Ae.id])==null?void 0:wt.x)??Ae.x)-c.value.x}px`,"border-color":((Ft=(ht=R.value)==null?void 0:ht.liveArrow)==null?void 0:Ft.toNodeId)==Ae.id?(Kt=(zt=R.value)==null?void 0:zt.liveArrow)==null?void 0:Kt.color:void 0}),onMousedown:$r(Wt=>L(Wt,Ae.id),["stop"]),onOutMousedown:Wt=>le(Ae.id,Wt)},null,40,["style","onMousedown","onOutMousedown"])}),128))],512),He(x(t),{class:"blueprintsToolbar",onAutogenClick:Ee[0]||(Ee[0]=Ae=>d.value=!0)}),d.value?(I(),Ve(U3,{key:0},{default:et(()=>[He(cB,{onBlockGeneration:Xt})]),_:1})):_e("",!0),x(i)?(I(),Ve(O3,{key:1,"node-container-el":x(i),"render-offset":c.value,"zoom-level":h.value,class:"navigator",onAutoArrange:fe,onChangeRenderOffset:H,onChangeZoomLevel:ge,onResetZoom:dt},null,8,["node-container-el","render-offset","zoom-level"])):_e("",!0)],40,uB)}}}),yB=Ne(gB,[["__scopeId","data-v-20f743ec"]]),_B={class:"alias"},bB=["contenteditable"],wB=Ie({__name:"BlueprintsNodeNamer",props:{componentId:{},blockName:{}},setup(e){const t=e,n=ee(re.core),r=ee(re.builderManager),{setContentValue:o}=Pf(n,r),a=W(()=>{var h;return(h=n.getComponentById(t.componentId))==null?void 0:h.content.alias}),s=W(()=>!!a.value),i=st("aliasEditorEl"),l=Pe(!1);async function c(){if(l.value)return;l.value=!0,await Hn();const h=i.value;h.focus();const v=document.createRange(),y=window.getSelection();v.setStart(h,h.childNodes.length),v.collapse(!0),y.removeAllRanges(),y.addRange(v)}function u(){const h=i.value.textContent;i.value.blur(),l.value=!1,o(t.componentId,"alias",h)}function d(h){l.value&&h.stopPropagation()}return(h,v)=>(I(),M("div",{class:ct(["BlueprintsNodeNamer",{beingEdited:l.value,hasEyebrow:s.value||l.value}]),"data-writer-unselectable":"true"},[D("div",{class:"blockName",onClick:c},Me(h.blockName),1),D("div",_B,[s.value||l.value?(I(),M("div",{key:0,ref_key:"aliasEditorEl",ref:i,class:"aliasEditor",contenteditable:l.value,"data-writer-unselectable":"true",onClick:c,onMousemove:d,onBlur:u,onKeydown:Do(u,["enter"])},Me(a.value),41,bB)):_e("",!0)])],2))}}),AB=Ne(wB,[["__scopeId","data-v-2b0e7f1e"]]),vu=new Map;function CB(){function e(n){const r=vu.get(n);if(r!==void 0)return r;const o=fetch(n,{method:"HEAD"}).then(a=>{if(a.ok)return a.headers.get("Content-Type")||void 0}).catch(()=>{});return vu.set(n,o),o}function t(){vu.clear()}return{fetchAssetContentType:e,clearCache:t}}const $B=["src"],SB=Ie({__name:"SharedImgWithFallback",props:{urls:{type:Array,required:!0}},setup(e){const t=e,n=Pe(""),{fetchAssetContentType:r}=CB();return Ge(no(t,"urls"),async o=>{n.value="";for(const a of o){const s=await r(a);if(!(!s||s==="text/html"))return n.value=a}},{immediate:!0}),(o,a)=>(I(),M("img",{src:n.value},null,8,$B))}});function qm(e,t=window.location.toString()){return new URL(`.${e}`,t).toString()}const IB={key:0,class:"side"},EB={class:"extraBorder"},kB={key:0,class:"runner"},TB={class:"main"},xB={class:"title"},PB={key:0,class:"deprecationNotice"},MB={key:0},OB=["data-writer-socket-id","onMousedownCapture"],NB={key:1},RB={class:"outputs"},LB=["data-writer-socket-id","onMousedownCapture"],DB={writer:{name:"Node",description:"A Blueprints node.",toolkit:"blueprints",category:"Other",fields:{alias:{name:"Alias",type:q.Text}},allowedParentTypes:["blueprints_blueprint"],previewField:"alias"}},BB=Ie({...DB,__name:"BlueprintsNode",emits:["outMousedown","engaged"],setup(e,{emit:t}){const n=t,r=ee(re.core),o=ee(re.builderManager),a=ee(re.componentId),s=ee(re.evaluatedFields),i=W(()=>r.getComponentById(a)),l=W(()=>{var _;return r==null?void 0:r.getComponentDefinition((_=i.value)==null?void 0:_.type)}),c=W(()=>{var _;return((_=l==null?void 0:l.value)==null?void 0:_.category)=="Triggers"}),u=W(()=>{var _;return((_=l==null?void 0:l.value)==null?void 0:_.category)=="Writer"}),d=W(()=>{var _;return(_=l==null?void 0:l.value)==null?void 0:_.deprecated}),h=W(()=>{var _;return v.value==null?null:v.value=="in_progress"?"running":((_={...g.value}[v.value])==null?void 0:_.style)??"success"}),v=W(()=>{const _=o.getLogEntries();for(let S=0;S<_.length;S++){const Y=_[S].blueprintExecution;if(Y)for(let X=0;X<Y.summary.length;X++){const te=Y.summary[X];if(te.componentId===i.value.id)return te.outcome}}return null}),y=W(()=>o.isComponentIdSelected(a)),g=W(()=>{const _={};return Object.entries(l.value.outs??{}).forEach(([S,R])=>{R.style!="dynamic"&&(_[S]=R)}),_}),w=W(()=>{var S;const _=new Set([...Object.keys(g.value),...Object.values(C.value).flatMap(Object.keys)]);return(((S=i.value)==null?void 0:S.outs)??[]).reduce((R,{outId:Y})=>{if(!_.has(Y))return R[Y]={name:Y,style:"dynamic",description:""},R},{})});function A(_){const R=l.value.fields[_].type==q.Tools,Y=Object.keys(s[_].value??{});return R?Y.filter(te=>{var $e;return(($e=s[_].value[te])==null?void 0:$e.type)=="function"}):Y}const C=W(()=>{const _={};return Object.entries(l.value.outs??{}).forEach(([S,R])=>{if(R.style!=="dynamic")return;if(!R.field){_.default??(_.default={}),_.default[S]={...R};return}_[R.field]={},A(R.field).forEach(X=>{_[R.field][`${S}_${X}`]={name:X,description:"Dynamically created",style:"dynamic"}})}),_});function b(_,S){_.stopPropagation(),n("outMousedown",S)}const p=W(()=>{if(["success","error"].includes(h.value)){const S=`/status/${h.value}.svg`;return[qm(S)]}const _=[`/components/${i.value.type}.svg`,`/components/blueprints_category_${l.value.category}.svg`];return r.featureFlags.value.includes("custom_block_icons")&&_.unshift(`/static/components/${i.value.id}.svg`),_.map(S=>qm(S))});return Ge(y,()=>{n("engaged")}),(_,S)=>(I(),M("div",{class:ct(["BlueprintsNode",{"BlueprintsNode--trigger":c.value,"BlueprintsNode--intelligent":u.value,"BlueprintsNode--deprecated":d.value,"BlueprintsNode--running":h.value=="running","BlueprintsNode--success":h.value=="success","BlueprintsNode--error":h.value=="error"}])},[u.value&&h.value===null?(I(),M("div",IB)):_e("",!0),D("div",EB,[h.value=="running"?(I(),M("div",kB)):_e("",!0)]),D("div",TB,[D("div",xB,[He(SB,{urls:p.value},null,8,["urls"]),He(AB,{"component-id":x(a),class:"nodeNamer","block-name":l.value.name},null,8,["component-id","block-name"]),d.value?(I(),M("div",PB," Deprecated ")):_e("",!0)]),(I(!0),M(ze,null,xt(C.value,(R,Y)=>{var X;return I(),M("div",{key:Y,class:"outputs"},[(X=l.value.fields)!=null&&X[Y]?(I(),M("h4",MB,Me(l.value.fields[Y].name),1)):_e("",!0),(I(!0),M(ze,null,xt(R,(te,$e)=>(I(),M("div",{key:$e,class:"output"},[Bt(Me(te.name)+" ",1),D("div",{class:ct(["ball",te.style]),"data-writer-socket-id":$e,"data-writer-unselectable":!0,onClickCapture:S[0]||(S[0]=$r(()=>{},["stop"])),onMousedownCapture:pe=>b(pe,$e)},null,42,OB)]))),128)),Object.keys(R).length==0?(I(),M("div",NB,"None configured.")):_e("",!0)])}),128)),D("div",RB,[(I(!0),M(ze,null,xt({...g.value,...w.value},(R,Y)=>(I(),M("div",{key:Y,class:"output"},[Y!=="trigger"?(I(),M(ze,{key:0},[Bt(Me(R.name),1)],64)):_e("",!0),D("div",{class:ct(["ball",R.style]),"data-writer-socket-id":Y,"data-writer-unselectable":!0,onClickCapture:S[1]||(S[1]=$r(()=>{},["stop"])),onMousedownCapture:X=>b(X,Y)},null,42,LB)]))),128))])])],2))}}),FB=Ne(BB,[["__scopeId","data-v-7b22d9e3"]]),jB="The root component of the application, which serves as the starting point of the component hierarchy.",VB={writer:{name:"Blueprints Root",toolkit:"blueprints",category:"Root",description:jB,allowedChildrenTypes:["blueprints_blueprint"],fields:{}}},UB=Ie({...VB,__name:"BlueprintsRoot",setup(e){const t=ee(re.core),n=ee(re.getChildrenVNodes),r=st("rootEl"),o=W(()=>{const a=t.activePageId.value;if(!!t.getComponentById(a)&&t.isChildOf("blueprints_root",a))return a;const i=t.getComponents("blueprints_root",{includeBMC:!0,includeCMC:!1,sortedByPosition:!0});return i.length==0?null:i[0].id});return(a,s)=>(I(),M("div",{ref_key:"rootEl",ref:r,class:"BlueprintsRoot","data-writer-container":""},[(I(!0),M(ze,null,xt(x(n)(),i=>(I(),M(ze,{key:i.key},[i.key===`${o.value}:0`?(I(),Ve(es(i),{key:0})):_e("",!0)],64))),128))],512))}}),HB=Ne(UB,[["__scopeId","data-v-01d7b606"]]),Mf={root:i3,page:X5,sidebar:rD,button:BD,text:eM,section:qL,header:FL,heading:mP,dataframe:iP,html:G_,pagination:a5,repeater:c5,column:TL,columns:OL,tab:cD,tabs:vD,link:pM,horizontalstack:HL,separator:XL,image:SP,pdf:P5,iframe:B5,googlemaps:z5,mapbox:f3,icon:yP,timer:h5,textinput:zR,textareainput:JR,numberinput:lR,sliderinput:MR,rangeinput:FR,colorinput:gN,dateinput:CN,timeinput:tL,radioinput:mR,checkboxinput:lN,dropdowninput:xN,selectinput:wR,multiselectinput:rR,fileinput:zN,webcamcapture:A5,vegalitechart:rM,plotlygraph:JP,metric:KP,message:DP,videoplayer:lM,chatbot:qM,step:SD,steps:MD,ratinginput:uL,tags:nO,switchinput:vL,reuse:$5,avatar:dO,annotatedtext:_O,jsonviewer:VO,blueprints_root:HB,blueprints_blueprint:yB,progressbar:ZO},Ks={};function zB(e){const t=`Component type "${e}" not supported. If it's a custom component, please ensure it's been loaded.`;return{writer:{name:"Fallback Component",allowedChildrenTypes:["*"],description:t,category:"Fallback"},setup(n,{slots:r}){return()=>Ro("div",{"data-writer-container":"",style:{color:"var(--primaryTextColor)"}},[t,r.default({})])}}}function KB(e){var o,a;const t={blueprints_node:FB},n=Ks[e];if(!n)return;const r=n.baseType;return{...t[r],writer:{...t[r].writer,...Ks[e].writer,fields:{...(o=t[r].writer)==null?void 0:o.fields,...(a=Ks[e].writer)==null?void 0:a.fields}}}}function WB(e){return KB(e)??Mf[e]??zB(e)}function ri(e){var t;return(t=WB(e))==null?void 0:t.writer}function Of(){return[...Object.keys(Mf),...Object.keys(Ks)]}function qB(e,t){Mf[e]=t}function GB(e,t){Ks[e]=t}function JB(e){let t=!1;return XB(e),Object.entries(e).forEach(([,n])=>{t=e4(n,e)||t,t=YB(n)||t}),t}function YB(e){const t=Ln(),n=ri(e.type);if(!n||n.category=="Fallback")return t.error(`Component ${e.id} (${e.type}). Invalid component type.`),!1;let r=!1;return r=r4(e),r=n4(e)||r,QB(e,n),ZB(e,n),r}function Zu(e,t,n={}){n[e]=!0,Object.entries(t).filter(([,r])=>r.parentId===e).forEach(([r])=>Zu(r,t,n))}function XB(e){const t=Ln(),n=Object.fromEntries(Object.entries(e).map(([r])=>[r,!1]));Zu("root",e,n),Zu("blueprints_root",e,n),Object.entries(n).forEach(([r,o])=>{o||t.warn(`Component ${r} (${e[r].type}). Orphan component.`)})}function QB(e,t){const n=Ln(),r=Object.keys(t.fields??{});e.content&&Object.keys(e.content).forEach(o=>{r.includes(o)||n.warn(`Component ${e.id} (${e.type}). Field key "${o}" is defined in the component but not in the template.`)})}function ZB(e,t){const n=Object.keys(t.events??{});if(!e.binding)return;const r=e.binding.eventType;if(n.includes(r)&&t.events[r].bindable)return;Ln().warn(`Component ${e.id} (${e.type}). The component is bound to event "${e.binding.eventType}" but the template doesn't define that event or it's not bindable.`)}function e4(e,t){const n=Ln();let r=!1;e.id=="root"&&e.position!==0&&n.error("Root must be at position 0."),e.position==-1&&n.error(`Component ${e.id} (${e.type}). Invalid position.`);const o=Object.values(t).filter(i=>i.parentId===e.id&&i.position!==-2&&!i.isCodeManaged);let a=0;return o.forEach(i=>{a+=i.position}),(o.length-1)*o.length/2!==a&&(n.error(`Component ${e.id} (${e.type}). Invalid children positions. Automated fix will be applied.`),t4(o),r=!0),r}function t4(e){e.sort((t,n)=>t.position>n.position?1:-1),e.map((t,n)=>{t.position=n})}function n4(e){var n,r,o;let t=!1;if(Object.keys(e.handlers??{}).forEach(a=>{if(!a.startsWith("ss-"))return;const s=`wf-${a.substring(3)}`;e.handlers[s]=e.handlers[a],t=!0,delete e.handlers[a]}),(r=(n=e.binding)==null?void 0:n.eventType)!=null&&r.startsWith("ss-")){const s=`wf-${((o=e.binding)==null?void 0:o.eventType).substring(3)}`;e.binding.eventType=s,t=!0}return t}function r4(e,t){let n=!1;if(e.type=="column"){if("horizontalAlignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.horizontalAlignment]||e.content.horizontalAlignment,delete e.content.horizontalAlignment,n=!0}if("verticalAlignment"in e.content){const r={normal:"unset",top:"start",center:"center",bottom:"end"};e.content.contentVAlign=r[e.content.verticalAlignment]||e.content.verticalAlignment,delete e.content.verticalAlignment,n=!0}}else if(e.type=="horizontalstack"){if("alignment"in e.content){const r={left:"start",center:"center",right:"end"};e.content.contentHAlign=r[e.content.alignment]||e.content.alignment,delete e.content.alignment,n=!0}}else e.type=="section"&&"snapMode"in e.content&&(delete e.content.snapMode,n=!0);return n}function o4(e){let t="";const n=[];let r=!1;for(let a=0;a<e.length;a++){const s=e[a];if(s==="."&&!r){n.push(t),t="";continue}t+=s,s==="\\"?r=!0:r=!1}return n.push(t),n.map(a=>a.replaceAll("\\.","."))}const a4="WriterCustomComponentTemplates";async function s4(e){await Promise.all(e.map(async t=>{const n=t.toLocaleLowerCase();n.endsWith(".js")?await i4(t):n.endsWith(".css")&&c4(t)}))}async function i4(e){var n;const t=Ln();t.log(`Importing custom component templates at "${e}"...`),await tn(()=>import(Q_()+e),[],import.meta.url),(n=Object.entries(window[a4]))==null||n.forEach(([r,o])=>{l4(r)?(qB(`custom_${r}`,o),t.log(`Registering template for "${r}".`)):t.warn(`custom component '${r}' is ignored. A custom component should be declared using only alphanumeric lowercase and _.`)})}function l4(e){return/^[a-z0-9_]+$/.test(e)}function c4(e){const t=document.createElement("link");t.rel="stylesheet",t.href=Q_()+e,document.head.appendChild(t)}function Q_(){let e=window.location.pathname;return e.endsWith("/")||(e+="/"),`${e}extensions/`}function u4(e){return typeof e!="object"||e===null?!1:e.type==="file"&&typeof e.content=="string"}function I4(e){return typeof e!="object"||e===null?!1:e.type==="binary"}function us(e){return typeof e!="object"||e===null?!1:e.type==="directory"&&typeof e.children=="object"}function*d4(e,t=[]){if(!us(e)){yield t;return}for(const[n,r]of Object.entries(e.children))yield*d4(r,[...t,n])}function*f4(e,t=[]){if(yield t,!!us(e))for(const[n,r]of Object.entries(e.children))yield*f4(r,[...t,n])}function Nf(e,t){if(e.length===0)return t;if(!us(t))return;const[n,...r]=e,o=t.children[n];return r.length===0?o:Nf(r,o)}function ed(e,t,n={type:"file",content:"",complete:!0}){var a;const r=structuredClone(t);let o=r;for(let s=0;s<e.length;s++){if(!us(o))return r;const i=e.at(s);if(s===e.length-1)return o.children[i]=n,r;(a=o.children)[i]??(a[i]={type:"directory",children:{}}),o=o.children[i]}return r}function p4(e,t,n){const r=Nf(e,n);if(us(r)||r===void 0)return n;const o=Z_(e,n);return ed(t,o,structuredClone(r))}function Z_(e,t){var o;const n=structuredClone(t);let r=n;for(let a=0;a<e.length;a++){if(!us(r))return n;const s=e.at(a);if(!(s in r.children))return n;if(a===e.length-1)return delete r.children[s],n;(o=r.children)[s]??(o[s]={type:"directory",children:{}}),r=r.children[s]}return n}const h4=1e3,m4=6e4;function v4(){let e=null;const t=Pe(null),n=Pe(null),r=Pe(),o=Pn([]),a=Pe(null),s=Pn({type:"directory",children:{}}),i=Pe({}),l=Pe([]),c=Pe({});let u;const d=Pe("idle");let h=0;const v=Pe(new Map);let y=[],g=[];const w=Pe(null);async function A(){await C(),p(),n.value=="edit"}async function C(){const F=await fetch("./api/init",{method:"post",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({proposedSessionId:e})}),K=await F.json();if(F.status>400)throw"Connection rejected.";K.extensionPaths&&await s4(K.extensionPaths),n.value=K.mode,i.value=K.components,c.value=K.userState,X(K.mail),e=K.sessionId,t.value=new Date().getTime(),o.value=K.featureFlags,r.value=K.writerApplication,b(K.abstractTemplates),l.value=K.userFunctions,a.value=K.runCode,s.value=K.sourceFiles,await Y(),!(n.value!="edit"||!JB(K.components))&&await U()}function b(F){Object.entries(F??{}).forEach(([K,oe])=>{GB(K,oe)})}function p(){setTimeout(()=>{O("keepAlive",{},p)},m4)}function _(F){F&&Object.entries(F).forEach(([K,oe])=>{const V=K.charAt(0),H=o4(K.substring(1)),G=H.length-1;let he=c.value;const ge=V==="-";for(let xe=0;xe<G;xe++){const Fe=he==null?void 0:he[H[xe]];typeof Fe=="object"&&Fe!==null?he=Fe:ge||(he[H[xe]]={},he=he[H[xe]])}ge?delete he[H.at(-1)]:he[H.at(-1)]=oe})}function S(F){F&&(i.value=F)}function R(){v.value.forEach(({callback:F})=>{F==null||F({ok:!1})}),v.value.clear()}async function Y(){if(u)return;const F=Ln(),K=new URL("./api/stream",window.location.href);return K.protocol=K.protocol.replace("https","wss"),K.protocol=K.protocol.replace("http","ws"),u=new WebSocket(K.href),u.onopen=()=>{R(),d.value="connected",F.log("WebSocket connected. Initialising stream..."),O("streamInit",{sessionId:e})},u.onmessage=oe=>{var G,he,ge,xe;const V=JSON.parse(oe.data);if(V.messageType=="announcement"&&V.payload.type=="codeUpdate"){u.close(),C();return}if(V.messageType=="announcement"&&V.payload.type=="componentUpdate"){const Fe={};Object.entries(i.value).forEach(([ot,pt])=>{pt.isCodeManaged&&(Fe[ot]=pt)}),i.value={...Fe,...V.payload.payload};return}if(V.messageType=="announcement"&&V.payload.type=="mail"){X(V.payload.payload);return}(V.messageType=="eventResponse"||V.messageType=="stateEnquiryResponse")&&(_((G=V.payload)==null?void 0:G.mutations),X((he=V.payload)==null?void 0:he.mail),S((ge=V.payload)==null?void 0:ge.components));const H=v.value.get(V.trackingId);(xe=H==null?void 0:H.callback)==null||xe.call(H,{ok:!0,payload:V.payload}),v.value.delete(V.trackingId)},u.onclose=async oe=>{if(u=null,d.value="offline",oe.code==1008){F.error("Invalid session. Reinitialising..."),await C();return}F.error("WebSocket closed. Attempting to reconnect..."),setTimeout(async()=>{try{await Y()}catch{F.error("Couldn't reconnect.")}},h4)},new Promise((oe,V)=>{u.addEventListener("open",()=>oe(),{once:!0}),u.addEventListener("close",()=>V(),{once:!0})})}function X(F=[]){y.push(...F),y=y.filter(K=>{const oe=g.filter(V=>V.mailType==K.type);if(oe.length==0)return K;oe.forEach(V=>V.fn(K.payload))})}function te(F,K){g.push({mailType:F,fn:K}),X()}function $e(F,K){g=g.filter(oe=>!(oe.mailType===F&&oe.fn===K))}function pe(F){var oe;let K=null;if(F instanceof CustomEvent)K=((oe=F.detail)==null?void 0:oe.payload)??null;else{const V={};for(const H in F){const G=F[H];typeof G!="function"&&(G instanceof Object||(V[H]=G))}K=V}return K}async function we(F,K,oe){var ge,xe;const V=oe?pe(F):null;let H,G;F instanceof CustomEvent&&(H=(ge=F.detail)==null?void 0:ge.callback,G=(xe=F.detail)==null?void 0:xe.handler),O("event",async()=>({type:F.type,instancePath:K,handler:G,payload:await V}),H,!0)}async function ye(F){return new Promise((K,oe)=>{O("hashRequest",{message:F},H=>{var G;if(!H.ok)return oe("Couldn't connect to the server.");K((G=H.payload)==null?void 0:G.message)})})}function qe(F,K){const oe=structuredClone(gt(s.value)),V=Nf(K,oe);u4(V)&&(V.content=F,V.complete=!0,s.value=oe)}async function Te(F){return new Promise((K,oe)=>{O("createSourceFile",{path:F},H=>{var G;if(!H.ok)return oe("Couldn't connect to the server.");if((G=H.payload)!=null&&G.error)return oe("Couldn't create the file.");s.value=ed(F,gt(s.value)),K()})})}async function Ce(F,K){return new Promise((oe,V)=>{O("uploadSourceFile",{path:F,content:K},G=>{var he,ge;if(!G.ok)return V("Couldn't connect to the server.");if((he=G.payload)!=null&&he.error)return V("Couldn't upload the file.");s.value=((ge=G.payload)==null?void 0:ge.sourceFiles)??ed(F,gt(s.value)),oe()})})}async function be(F,K){return new Promise((oe,V)=>{O("renameSourceFile",{from:F,to:K},G=>{var he;if(!G.ok)return V("Couldn't connect to the server.");if((he=G.payload)!=null&&he.error)return V("Couldn't rename the file.");s.value=p4(F,K,gt(s.value)),oe()})})}async function fe(F){return new Promise((K,oe)=>{O("deleteSourceFile",{path:F},H=>{var G;if(!H.ok)return oe("Couldn't connect to the server.");if((G=H.payload)!=null&&G.error)return oe("Couldn't delete the file.");s.value=Z_(F,gt(s.value)),K()})})}async function de(F,K=["main.py"]){return new Promise((oe,V)=>{O("codeSaveRequest",{code:F,path:K},G=>{if(!G.ok)return V("Couldn't connect to the server.");qe(F,K),oe()}),K.join("/")==="main.py"&&(d.value="suspended")})}function L(F){return new Promise((K,oe)=>{O("loadSourceFile",{path:F},H=>{if(!H.ok)return oe("Couldn't connect to the server.");qe(H.payload.content,F),K()})})}async function le(F){return new Promise((K,oe)=>{O("listResources",{resource_type:F},H=>{var G;if(!H.ok)return oe("Couldn't connect to the server.");K(((G=H.payload)==null?void 0:G.data)??[])})})}async function j(F){O("stateEnquiry",{},F,!0)}function E(F){const V=(H=0)=>{const G=v.value.get(F);G!==void 0&&(H==0&&G.type=="stateEnquiry"||j(()=>setTimeout(()=>V(H+1),150)))};setTimeout(()=>V(0),150)}async function O(F,K,oe,V=!1){if(d.value=="offline"||d.value=="suspended"){oe==null||oe({ok:!1});return}const H=Ln(),G=h++;try{(oe||V)&&v.value.set(G,{type:F,callback:oe}),V&&E(G);let he;typeof K=="function"?he=await K():he=K;const ge={type:F,trackingId:G,payload:he};if(u.readyState!==u.OPEN)throw"Connection lost.";u.send(JSON.stringify(ge,ny))}catch(he){H.error("sendFrontendMessage error",he),oe==null||oe({ok:!1})}}function ue(F){delete i.value[F]}function Be(F){i.value[F.id]=F}async function U(){const F={};Object.entries(i.value).forEach(([oe,V])=>{V.isCodeManaged||(F[oe]=V)});const K={components:F};return new Promise((oe,V)=>{O("componentUpdate",K,G=>{if(!G.ok)return V("Couldn't connect to the server.");oe()})})}function Z(F){return i.value[F]}function Q(F,K){let oe=i.value[K];do{if(oe.parentId==F)return!0;oe=i.value[oe.parentId]}while(oe);return!1}function se(F,{includeBMC:K=!0,includeCMC:oe=!0,sortedByPosition:V=!1}={}){let H=Object.values(i.value);return typeof F<"u"&&(H=H.filter(G=>G.parentId==F)),H=H.filter(G=>{const he=G.isCodeManaged;return K&&!he||oe&&he}),V&&(H=H.sort((G,he)=>G.isCodeManaged&&!he.isCodeManaged?1:!G.isCodeManaged&&he.isCodeManaged?-1:G.position>he.position?1:-1)),H}function*Se(F,K={}){for(const oe of se(F,K))yield oe,yield*Se(oe.id,K)}function k(F){const oe=se("root").filter(V=>V.content.key==F);oe.length!=0&&P(oe[0].id)}function P(F){w.value=F}function ie(F){return xf(i.value,F)}return{webSocket:u,syncHealth:d,frontendMessageMap:Sn(v),mode:Sn(n),userFunctions:Sn(l),addMailSubscription:te,removeMailSubscription:$e,init:A,forwardEvent:we,hashMessage:ye,runCode:Sn(a),sourceFiles:Sn(s),sendCodeSaveRequest:de,sendCreateSourceFileRequest:Te,sendRenameSourceFileRequest:be,sendDeleteSourceFileRequest:fe,sendFileUploadRequest:Ce,requestSourceFileLoading:L,sendListResourcesRequest:le,sendComponentUpdate:U,addComponent:Be,deleteComponent:ue,getComponentById:Z,getComponents:se,getComponentsNested:Se,setActivePageId:P,activePageId:Sn(w),setActivePageFromKey:k,getComponentDefinition:ri,getSupportedComponentTypes:Of,getContainableTypes:ie,sessionTimestamp:Sn(t),userState:Sn(c),isChildOf:Q,featureFlags:Sn(o),writerApplication:Sn(r)}}function g4(e){e.directive("capture-tabs",{mounted:t=>{t.addEventListener("keydown",n=>{n.key=="Tab"&&(n.preventDefault(),t.setRangeText("  ",t.selectionStart,t.selectionStart,"end"))})}})}const Ps=v4();globalThis.vue=Y$;globalThis.injectionKeys=re;globalThis.core=Ps;const Ol=Ln();async function y4(){await Ps.init();const e=Ps.mode.value,t=e=="edit"?IS():void 0;t&&(Ps.addMailSubscription("logEntry",t.handleLogEntry),globalThis.wfbm=t),Ol.log(`Mounting app in mode ${e}...`);const{default:n}=e==="run"&&await tn(()=>import("./ComponentRenderer-DhkaDGOy.js"),__vite__mapDeps([11,12,13]),import.meta.url),{default:r}=e==="edit"&&await tn(()=>import("./BuilderApp-CNfRViSf.js").then(a=>a.b),__vite__mapDeps([14,8,9,15,16]),import.meta.url),o=$l(n||r);o.use(_S),o.provide(re.core,Ps),o.provide(re.builderManager,t),g4(o),o.mount("#app")}Ol.log("Initialising core...");y4().then(async()=>{Ol.log("Core initialised.")}).catch(e=>{Ol.error("Core initialisation failed.",e),document.write(e)});export{Nf as $,ct as A,If as B,$4 as C,Za as D,Yt as E,We as F,$t as G,Hn as H,t3 as I,S4 as J,Z5 as K,tn as L,x as M,j_ as N,Pn as O,Sn as P,Pr as Q,Ln as R,H3 as S,U3 as T,_e as U,Pf as V,Nn as W,$_ as X,gt as Y,d4 as Z,Ne as _,re as a,I4 as a0,u4 as a1,us as a2,ed as a3,f4 as a4,Z_ as a5,Km as a6,Tv as a7,Qu as a8,$r as a9,Kl as aA,lo as aB,Zl as aC,V_ as aD,es as aE,q as aF,A4 as aG,C4 as aH,w2 as aI,k2 as aJ,Of as aK,ri as aL,SB as aM,qm as aN,wS as aO,RA as aP,ia as aQ,Sf as aR,Zm as aS,V1 as aT,cA as aU,ly as aV,rs as aW,b4 as aX,bS as aY,Do as aa,za as ab,St as ac,ZA as ad,__ as ae,an as af,Hv as ag,D$ as ah,ts as ai,g3 as aj,X_ as ak,SS as al,vy as am,w4 as an,Ba as ao,TI as ap,$I as aq,xg as ar,_4 as as,no as at,GS as au,G3 as av,ty as aw,Sd as ax,oo as ay,co as az,Ve as b,W as c,Ie as d,M as e,D as f,FB as g,WB as h,ee as i,Ro as j,st as k,Ul as l,bn as m,hn as n,I as o,qv as p,He as q,Pe as r,et as s,Me as t,fc as u,or as v,Ge as w,Bt as x,ze as y,xt as z};
