@sfxcode/formkit-primevue 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +0,0 @@
1
- (function(j,s){typeof exports=="object"&&typeof module!="undefined"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(j=typeof globalThis!="undefined"?globalThis:j||self,s(j["formkit-primevue"]={},j.Vue))})(this,function(j,s){"use strict";function xe(){return Math.random().toString(36).substring(2,15)}function Vt(e,n){const t=e instanceof Set?e:new Set(e);return n&&n.forEach(r=>t.add(r)),[...t]}function L(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function ue(e,n,t=!0,r=["__key"]){if(e===n)return!0;if(typeof n=="object"&&typeof e=="object"){if(e instanceof Map||e instanceof Set||e instanceof Date||e===null||n===null||Object.keys(e).length!==Object.keys(n).length)return!1;for(const i of r)if((i in e||i in n)&&e[i]!==n[i])return!1;for(const i in e)if(!(i in n)||e[i]!==n[i]&&!t||t&&!ue(e[i],n[i],t,r))return!1;return!0}return!1}function ce(e){return Object.prototype.toString.call(e)==="[object Object]"}function pe(e){return ce(e)||Array.isArray(e)}function Y(e){if(ce(e)===!1||e.__FKNode__||e.__POJO__===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(ce(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)}function de(e,n,t=!1,r=!1){if(n===null)return null;const i={};if(typeof n=="string")return n;for(const o in e)if(L(n,o)&&(n[o]!==void 0||!r)){if(t&&Array.isArray(e[o])&&Array.isArray(n[o])){i[o]=e[o].concat(n[o]);continue}if(n[o]===void 0)continue;Y(e[o])&&Y(n[o])?i[o]=de(e[o],n[o],t,r):i[o]=n[o]}else i[o]=e[o];for(const o in n)!L(i,o)&&n[o]!==void 0&&(i[o]=n[o]);return i}function Pt(e){if(e[0]!=='"'&&e[0]!=="'"||e[0]!==e[e.length-1])return!1;const n=e[0];for(let t=1;t<e.length;t++)if(e[t]===n&&(t===1||e[t-1]!=="\\")&&t!==e.length-1)return!1;return!0}function Et(e){if(!e.length)return"";let n="",t="";for(let r=0;r<e.length;r++){const i=e.charAt(r);(i!=="\\"||t==="\\")&&(n+=i),t=i}return n}function q(...e){return e.reduce((n,t)=>{const{value:r,name:i,modelValue:o,config:a,plugins:u,...g}=t;return Object.assign(n,g)},{})}function At(e){const n=[];let t="",r=0,i="",o="";for(let a=0;a<e.length;a++){const u=e.charAt(a);u===i&&o!=="\\"?i="":(u==="'"||u==='"')&&!i&&o!=="\\"?i=u:u==="("&&!i?r++:u===")"&&!i&&r--,u===","&&!i&&r===0?(n.push(t),t=""):(u!==" "||i)&&(t+=u),o=u}return t&&n.push(t),n}function Le(e,n){const t={},r=n.filter(o=>o instanceof RegExp),i=new Set(n);for(const o in e)!i.has(o)&&!r.some(a=>a.test(o))&&(t[o]=e[o]);return t}function Te(e,n){const t={},r=n.filter(i=>i instanceof RegExp);return n.forEach(i=>{i instanceof RegExp||(t[i]=e[i])}),Object.keys(e).forEach(i=>{r.some(o=>o.test(i))&&(t[i]=e[i])}),t}function G(e){return e.replace(/-([a-z0-9])/gi,(n,t)=>t.toUpperCase())}function Re(e){return e.replace(/([a-z0-9])([A-Z])/g,(n,t,r)=>t+"-"+r.toLowerCase()).replace(" ","-").toLowerCase()}function X(e,n=["__key","__init"]){if(e===null||e instanceof RegExp||e instanceof Date||e instanceof Map||e instanceof Set||typeof File=="function"&&e instanceof File)return e;let t;Array.isArray(e)?t=e.map(r=>typeof r=="object"?X(r,n):r):t=Object.keys(e).reduce((r,i)=>(r[i]=typeof e[i]=="object"?X(e[i],n):e[i],r),{});for(const r of n)r in e&&Object.defineProperty(t,r,{enumerable:!1,value:e[r]});return t}function U(e){return typeof e=="object"?X(e):e}function jt(e,n){if(!e||typeof e!="object")return null;const t=n.split(".");let r=e;for(const i in t){const o=t[i];if(L(r,o)&&(r=r[o]),+i===t.length-1)return r;if(!r||typeof r!="object")return null}return null}function De(e){return e!==void 0&&e!=="false"&&e!==!1?!0:void 0}function N(e){return Object.isFrozen(e)?e:Object.defineProperty(e,"__init",{enumerable:!1,value:!0})}function Me(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function me(){const e=[];let n=0;const t=i=>e.push(i),r=i=>{const o=e[n];return typeof o=="function"?o(i,a=>(n++,r(a===void 0?i:a))):(n=0,i)};return t.dispatch=r,t.unshift=i=>e.unshift(i),t.remove=i=>{const o=e.indexOf(i);o>-1&&e.splice(o,1)},t}function Fe(){const e=new Map,n=new Map;let t;const r=(i,o)=>{if(t){t.set(o.name,[i,o]);return}e.has(o.name)&&e.get(o.name).forEach(a=>{(o.origin===i||a.modifiers.includes("deep"))&&a.listener(o)}),o.bubble&&i.bubble(o)};return r.on=(i,o)=>{const[a,...u]=i.split("."),g=o.receipt||xe(),w={modifiers:u,event:a,listener:o,receipt:g};return e.has(a)?e.get(a).push(w):e.set(a,[w]),n.has(g)?n.get(g).push(a):n.set(g,[a]),g},r.off=i=>{var o;n.has(i)&&((o=n.get(i))===null||o===void 0||o.forEach(a=>{const u=e.get(a);Array.isArray(u)&&e.set(a,u.filter(g=>g.receipt!==i))}),n.delete(i))},r.pause=i=>{t||(t=new Map),i&&i.walk(o=>o._e.pause())},r.play=i=>{if(!t)return;const o=t;t=void 0,o.forEach(([a,u])=>r(a,u)),i&&i.walk(a=>a._e.play())},r}function xt(e,n,t,r,i=!0){return n._e(e,{payload:r,name:t,bubble:i,origin:e}),e}function Lt(e,n,t){return re(e.parent)&&e.parent._e(e.parent,t),e}function Tt(e,n,t,r){return n._e.on(t,r)}function Rt(e,n,t){return n._e.off(t),e}const ye=me();ye((e,n)=>(e.message||(e.message=String(`E${e.code}`)),n(e)));const he=me();he((e,n)=>{e.message||(e.message=String(`W${e.code}`));const t=n(e);return console&&typeof console.warn=="function"&&console.warn(t.message),t});function ee(e,n={}){he.dispatch({code:e,data:n})}function M(e,n={}){throw Error(ye.dispatch({code:e,data:n}).message)}function te(e,n){const t={blocking:!1,key:xe(),meta:{},type:"state",visible:!0,...e};return n&&t.value&&t.meta.localize!==!1&&(t.value=n.t(t),t.meta.locale=n.config.locale),t}const Be={apply:Wt,set:Mt,remove:ze,filter:Bt,reduce:zt,release:qt,touch:Ft};function Dt(e=!1){const n={};let t,r=e,i=[];const o=new Map;let a;const u=new Proxy(n,{get(...g){const[w,v]=g;return v==="buffer"?r:v==="_b"?i:v==="_m"?o:v==="_r"?a:L(Be,v)?Be[v].bind(null,n,u,t):Reflect.get(...g)},set(g,w,v){return w==="_n"?(t=v,a==="__n"&&We(t,u),!0):w==="_b"?(i=v,!0):w==="buffer"?(r=v,!0):w==="_r"?(a=v,!0):(M(101,t),!1)}});return u}function Mt(e,n,t,r){if(n.buffer)return n._b.push([[r]]),n;if(e[r.key]!==r){if(typeof r.value=="string"&&r.meta.localize!==!1){const o=r.value;r.value=t.t(r),r.value!==o&&(r.meta.locale=t.props.locale)}const i=`message-${L(e,r.key)?"updated":"added"}`;e[r.key]=Object.freeze(t.hook.message.dispatch(r)),t.emit(i,r)}return n}function Ft(e,n){for(const t in e){const r={...e[t]};n.set(r)}}function ze(e,n,t,r){if(L(e,r)){const i=e[r];delete e[r],t.emit("message-removed",i)}return n.buffer===!0&&(n._b=n._b.filter(i=>(i[0]=i[0].filter(o=>o.key!==r),i[1]||i[0].length))),n}function Bt(e,n,t,r,i){for(const o in e){const a=e[o];(!i||a.type===i)&&!r(a)&&ze(e,n,t,o)}}function zt(e,n,t,r,i){for(const o in e){const a=e[o];i=r(i,a)}return i}function Wt(e,n,t,r,i){if(Array.isArray(r)){if(n.buffer){n._b.push([r,i]);return}const o=new Set(r.map(a=>(n.set(a),a.key)));typeof i=="string"?n.filter(a=>a.type!==i||o.has(a.key)):typeof i=="function"&&n.filter(a=>!i(a)||o.has(a.key))}else for(const o in r){const a=t.at(o);a?a.store.apply(r[o],i):Kt(t,n,o,r[o],i)}}function Ut(e,...n){const t=`${e.name}-set`,r=i=>te({key:Me(i),type:"error",value:i,meta:{source:t,autoClear:!0}});return n.filter(i=>!!i).map(i=>{if(typeof i=="string"&&(i=[i]),Array.isArray(i))return i.map(o=>r(o));{const o={};for(const a in i)Array.isArray(i[a])?o[a]=i[a].map(u=>r(u)):o[a]=[r(i[a])];return o}})}function Kt(e,n,t,r,i){var o;const a=n._m;a.has(t)||a.set(t,[]),n._r||(n._r=We(e,n)),(o=a.get(t))===null||o===void 0||o.push([r,i])}function We(e,n){return e.on("child.deep",({payload:t})=>{n._m.forEach((r,i)=>{e.at(i)===t&&(r.forEach(([o,a])=>{t.store.apply(o,a)}),n._m.delete(i))}),n._m.size===0&&n._r&&(e.off(n._r),n._r=void 0)})}function qt(e,n){n.buffer=!1,n._b.forEach(([t,r])=>n.apply(t,r)),n._b=[]}function Nt(){const e={};let n;return{count:(...t)=>Ht(n,e,...t),init(t){n=t,t.on("message-added.deep",Ke(e,1)),t.on("message-removed.deep",Ke(e,-1))},merge:t=>qe(n,e,t),settled(t){return L(e,t)?e[t].promise:Promise.resolve()},unmerge:t=>qe(n,e,t,!0),value(t){return L(e,t)?e[t].count:0}}}function Ht(e,n,t,r,i=0){if(r=Zt(r||t),!L(n,t)){const o={condition:r,count:0,name:t,node:e,promise:Promise.resolve(),resolve:()=>{}};n[t]=o,i=e.store.reduce((a,u)=>a+o.condition(u)*1,i),e.each(a=>{a.ledger.count(o.name,o.condition),i+=a.ledger.value(o.name)})}return Ue(n[t],i).promise}function Zt(e){return typeof e=="function"?e:n=>n.type===e}function Ue(e,n){const t=e.count,r=e.count+n;return e.count=r,t===0&&r!==0?(e.node.emit(`unsettled:${e.name}`,e.count,!1),e.promise=new Promise(i=>e.resolve=i)):t!==0&&r===0&&(e.node.emit(`settled:${e.name}`,e.count,!1),e.resolve()),e.node.emit(`count:${e.name}`,e.count,!1),e}function Ke(e,n){return t=>{for(const r in e){const i=e[r];i.condition(t.payload)&&Ue(i,n)}}}function qe(e,n,t,r=!1){for(const i in n){const o=n[i].condition;r||t.ledger.count(i,o);const a=t.ledger.value(i)*(r?-1:1);if(!!e)do e.ledger.count(i,o,a),e=e.parent;while(e)}}const ge=new Map,ne=new Map,_e=Fe(),Jt=[];function Qt(e){e.props.id&&(ge.set(e.props.id,e),ne.set(e,e.props.id),_e(e,{payload:e,name:e.props.id,bubble:!1,origin:e}))}function Yt(e){if(ne.has(e)){const n=ne.get(e);ne.delete(e),ge.delete(n),_e(e,{payload:null,name:n,bubble:!1,origin:e})}}function Ne(e){return ge.get(e)}function Gt(e,n){Jt.push(_e.on(e,n))}function He(e,n,t){let r=!0;return n in e.config._t?r=!1:e.emit(`config:${n}`,t,!1),n in e.props||(e.emit("prop",{prop:n,value:t}),e.emit(`prop:${n}`,t)),r}function Xt(e){const n=document.getElementById(e);if(n instanceof HTMLFormElement){const t=new Event("submit",{cancelable:!0,bubbles:!0});n.dispatchEvent(t);return}ee(151,e)}function en(e){const n=t=>{for(const r in t.store){const i=t.store[r];i.type==="error"||i.type==="ui"&&r==="incomplete"?t.store.remove(r):i.type==="state"&&t.store.set({...i,value:!1})}};n(e),e.walk(n)}function tn(e,n){const t=typeof e=="string"?Ne(e):e;if(t){const r=o=>U(o.props.initial)||(o.type==="group"?{}:o.type==="list"?[]:void 0);t._e.pause(t),t.input(U(n)||r(t),!1),t.walk(o=>o.input(r(o),!1));const i=r(t);return t.input(typeof i=="object"?U(n)||N(i):i,!1),t._e.play(t),en(t),t.emit("reset",t),t}ee(152,e)}const nn={delimiter:".",delay:0,locale:"en",rootClasses:e=>({[`formkit-${Re(e)}`]:!0})},Ze=Symbol("index"),be=Symbol("removed"),we=Symbol("moved"),Je=Symbol("inserted");function rn(e){return e.type==="list"&&Array.isArray(e._value)}function re(e){return e&&typeof e=="object"&&e.__FKNode__===!0}const ie=(e,n,t)=>{M(102,[e,t])},on={_c:V(On,ie,!1),add:V(_n),addProps:V(gn),address:V(Vn,ie,!1),at:V(Pn),bubble:V(Lt),clearErrors:V(Dn),calm:V(mn),config:V(!1),define:V(hn),disturb:V(dn),destroy:V(yn),hydrate:V(pn),index:V(Sn,Cn,!1),input:V(Ye),each:V(vn),emit:V(xt),find:V(An),on:V(Tt),off:V(Rt),parent:V(!1,bn),plugins:V(!1),remove:V(wn),root:V(xn,ie,!1),reset:V(Rn),resetConfig:V($n),setErrors:V(et),submit:V(Tn),t:V(Ln),use:V(ve),name:V(In,!1,!1),walk:V(kn)};function sn(){return new Map(Object.entries(on))}function V(e,n,t=!0){return{get:e?(r,i)=>t?(...o)=>e(r,i,...o):e(r,i):!1,set:n!==void 0?n:ie.bind(null)}}function ln(){const e=new Map;return new Proxy(e,{get(n,t){return e.has(t)||e.set(t,me()),e.get(t)}})}let an=0,fn=0;function un(e){var n,t;return((n=e.parent)===null||n===void 0?void 0:n.type)==="list"?Ze:e.name||`${((t=e.props)===null||t===void 0?void 0:t.type)||"input"}_${++an}`}function Qe(e){return e.type==="group"?N(e.value&&typeof e.value=="object"&&!Array.isArray(e.value)?e.value:{}):e.type==="list"?N(Array.isArray(e.value)?e.value:[]):e.value===null?"":e.value}function Ye(e,n,t,r=!0){return n._value=cn(e,e.hook.input.dispatch(t)),e.emit("input",n._value),n.isSettled&&e.disturb(),r?(n._tmo&&clearTimeout(n._tmo),n._tmo=setTimeout(oe,e.props.delay,e,n)):oe(e,n),n.settled}function cn(e,n){switch(e.type){case"input":break;case"group":(!n||typeof n!="object")&&M(107,[e,n]);break;case"list":Array.isArray(n)||M(108,[e,n]);break}return n}function oe(e,n,t=!0,r=!0){n._value=n.value=e.hook.commit.dispatch(n._value),e.type!=="input"&&r&&e.hydrate(),e.emit("commit",n.value),t&&e.calm()}function Ge(e,{name:n,value:t,from:r}){if(!Object.isFrozen(e._value)){if(rn(e)){const i=t===be?[]:t===we&&typeof r=="number"?e._value.splice(r,1):[t];e._value.splice(n,t===we||r===Je?0:1,...i);return}t!==be?e._value[n]=t:delete e._value[n]}}function pn(e,n){const t=n._value;return n.children.forEach(r=>{if(typeof t=="object")if(r.name in t){const i=r.type!=="input"||t[r.name]&&typeof t[r.name]=="object"?N(t[r.name]):t[r.name];r.input(i,!1)}else(e.type!=="list"||typeof r.name=="number")&&Ge(n,{name:r.name,value:r.value}),t.__init||(r.type==="group"?r.input({},!1):r.type==="list"?r.input([],!1):r.input(void 0,!1))}),e}function dn(e,n){var t;return n._d<=0&&(n.isSettled=!1,e.emit("settled",!1,!1),n.settled=new Promise(r=>{n._resolve=r}),e.parent&&((t=e.parent)===null||t===void 0||t.disturb())),n._d++,e}function mn(e,n,t){var r;if(t!==void 0&&e.type!=="input")return Ge(n,t),oe(e,n,!0,!1);n._d>0&&n._d--,n._d===0&&(n.isSettled=!0,e.emit("settled",!0,!1),e.parent&&((r=e.parent)===null||r===void 0||r.calm({name:e.name,value:n.value})),n._resolve&&n._resolve(n.value))}function yn(e,n){e.emit("destroying",e),e.store.filter(()=>!1),e.parent&&e.parent.remove(e),Yt(e),n._value=n.value=void 0,e.emit("destroyed",e)}function hn(e,n,t){n.type=t.type,n.props.definition=X(t),n.value=n._value=Qe({type:e.type,value:n.value}),t.forceTypeProp&&(e.props.type&&(e.props.originalType=e.props.type),n.props.type=t.forceTypeProp),t.family&&(n.props.family=t.family),t.features&&t.features.forEach(r=>r(e)),t.props&&e.addProps(t.props),e.emit("defined",t)}function gn(e,n,t){var r;if(e.props.attrs){const i={...e.props.attrs};e.props._emit=!1;for(const a in i){const u=G(a);t.includes(u)&&(e.props[u]=i[a],delete i[a])}const o=U(n._value);e.props.initial=e.type!=="input"?N(o):o,e.props._emit=!0,e.props.attrs=i,e.props.definition&&(e.props.definition.props=[...((r=e.props.definition)===null||r===void 0?void 0:r.props)||[],...t])}return e.emit("added-props",t),e}function _n(e,n,t,r){if(e.type==="input"&&M(100,e),t.parent&&t.parent!==e&&t.parent.remove(t),n.children.includes(t)||(r!==void 0&&e.type==="list"?(n.children.splice(r,0,t),Array.isArray(e.value)&&e.value.length<n.children.length&&e.disturb().calm({name:r,value:t.value,from:Je})):n.children.push(t),t.isSettled||e.disturb()),t.parent!==e){if(t.parent=e,t.parent!==e)return e.remove(t),t.parent.add(t),e}else t.use(e.plugins);return oe(e,n,!1),e.ledger.merge(t),e.emit("child",t),e}function bn(e,n,t,r){return re(r)?(e.parent&&e.parent!==r&&e.parent.remove(e),n.parent=r,e.resetConfig(),r.children.includes(e)?e.use(r.plugins):r.add(e),!0):r===null?(n.parent=null,!0):!1}function wn(e,n,t){const r=n.children.indexOf(t);if(r!==-1){t.isSettled&&e.disturb(),n.children.splice(r,1);let i=De(t.props.preserve),o=t.parent;for(;i===void 0&&o;)i=De(o.props.preserve),o=o.parent;i?e.calm():e.calm({name:e.type==="list"?r:t.name,value:be}),t.parent=null,t.config._rmn=t}return e.ledger.unmerge(t),e}function vn(e,n,t){n.children.forEach(r=>t(r))}function kn(e,n,t,r=!1){n.children.forEach(i=>{(t(i)!==!1||!r)&&i.walk(t)})}function $n(e,n){const t=e.parent||void 0;n.config=Xe(e.config._t,t),e.walk(r=>r.resetConfig())}function ve(e,n,t,r=!0,i=!0){return Array.isArray(t)||t instanceof Set?(t.forEach(o=>ve(e,n,o)),e):(n.plugins.has(t)||(i&&typeof t.library=="function"&&t.library(e),r&&t(e)!==!1&&(n.plugins.add(t),e.children.forEach(o=>o.use(t)))),e)}function Cn(e,n,t,r){if(re(e.parent)){const i=e.parent.children,o=r>=i.length?i.length-1:r<0?0:r,a=i.indexOf(e);return a===-1?!1:(i.splice(a,1),i.splice(o,0,e),e.parent.children=i,e.parent.type==="list"&&e.parent.disturb().calm({name:o,value:we,from:a}),!0)}return!1}function Sn(e){if(e.parent){const n=[...e.parent.children].indexOf(e);return n===-1?e.parent.children.length:n}return-1}function On(e,n){return n}function In(e,n){var t;return((t=e.parent)===null||t===void 0?void 0:t.type)==="list"?e.index:n.name!==Ze?n.name:e.index}function Vn(e,n){return n.parent?n.parent.address.concat([e.name]):[e.name]}function Pn(e,n,t){const r=typeof t=="string"?t.split(e.config.delimiter):t;if(!r.length)return;const i=r[0];let o=e.parent;for(o||(String(r[0])===String(e.name)&&r.shift(),o=e),i==="$parent"&&r.shift();o&&r.length;){const a=r.shift();switch(a){case"$root":o=e.root;break;case"$parent":o=o.parent;break;case"$self":o=e;break;default:o=o.children.find(u=>String(u.name)===String(a))||En(o,a)}}return o||void 0}function En(e,n){const t=String(n).match(/^(find)\((.*)\)$/);if(t){const[,r,i]=t,o=i.split(",").map(a=>a.trim());switch(r){case"find":return e.find(o[0],o[1]);default:return}}}function An(e,n,t,r){return jn(e,t,r)}function jn(e,n,t="name"){const r=typeof t=="string"?o=>o[t]==n:t,i=[e];for(;i.length;){const o=i.shift();if(r(o,n))return o;i.push(...o.children)}}function xn(e){let n=e;for(;n.parent;)n=n.parent;return n}function Xe(e={},n){let t;return new Proxy(e,{get(...r){const i=r[1];if(i==="_t")return e;const o=Reflect.get(...r);if(o!==void 0)return o;if(n){const a=n.config[i];if(a!==void 0)return a}if(e.rootConfig&&typeof i=="string"){const a=e.rootConfig[i];if(a!==void 0)return a}return i==="delay"&&(t==null?void 0:t.type)==="input"?20:nn[i]},set(...r){const i=r[1],o=r[2];if(i==="_n")return t=o,e.rootConfig&&e.rootConfig._add(t),!0;if(i==="_rmn")return e.rootConfig&&e.rootConfig._rm(t),t=void 0,!0;if(!ue(e[i],o,!1)){const a=Reflect.set(...r);return t&&(t.emit(`config:${i}`,o,!1),He(t,i,o),t.walk(u=>He(u,i,o),!0)),a}return!0}})}function Ln(e,n,t,r="ui"){const i=typeof t=="string"?{key:t,value:t,type:r}:t,o=e.hook.text.dispatch(i);return e.emit("text",o,!1),o.value}function Tn(e){const n=e.name;do{if(e.props.isForm===!0)break;e.parent||M(106,n),e=e.parent}while(e);e.props.id&&Xt(e.props.id)}function Rn(e,n,t){return tn(e,t)}function et(e,n,t,r){const i=`${e.name}-set`,o=e.hook.setErrors.dispatch({localErrors:t,childErrors:r});return Ut(e,o.localErrors,o.childErrors).forEach(a=>{e.store.apply(a,u=>u.meta.source===i)}),e}function Dn(e,n,t=!0,r){return et(e,n,[]),t&&(r=r||`${e.name}-set`,e.walk(i=>{i.store.filter(o=>!(o.type==="error"&&o.meta&&o.meta.source===r))})),e}function Mn(e){return L(e.props,"id")||(e.props.id=`input_${fn++}`),e}function Fn(e){const n={initial:typeof e=="object"?U(e):e};let t,r=!0;return new Proxy(n,{get(...i){const[o,a]=i;if(L(n,a))return Reflect.get(...i);if(t&&typeof a=="string"&&t.config[a]!==void 0)return t.config[a]},set(i,o,a,u){if(o==="_n")return t=a,!0;if(o==="_emit")return r=a,!0;const{prop:g,value:w}=t.hook.prop.dispatch({prop:o,value:a});if(!ue(n[g],w,!1)||typeof w=="object"){const v=Reflect.set(i,g,w,u);return r&&(t.emit("prop",{prop:g,value:w}),typeof g=="string"&&t.emit(`prop:${g}`,w)),v}return!0}})}function Bn(e,n){if(e.props.definition)return e.define(e.props.definition);for(const t of n){if(e.props.definition)return;typeof t.library=="function"&&t.library(e)}}function zn(e){const n=Qe(e),t=Xe(e.config||{},e.parent);return{_d:0,_e:Fe(),_resolve:!1,_tmo:!1,_value:n,children:Vt(e.children||[]),config:t,hook:ln(),isCreated:!1,isSettled:!0,ledger:Nt(),name:un(e),parent:e.parent||null,plugins:new Set,props:Fn(n),settled:Promise.resolve(n),store:Dt(!0),traps:sn(),type:e.type||"input",value:n}}function Wn(e,n){var t;if(e.ledger.init(e.store._n=e.props._n=e.config._n=e),e.props._emit=!1,n.props&&Object.assign(e.props,n.props),e.props._emit=!0,Bn(e,new Set([...n.plugins||[],...e.parent?e.parent.plugins:[]])),n.plugins)for(const r of n.plugins)ve(e,e._c,r,!0,!1);return Mn(e),e.each(r=>e.add(r)),e.parent&&e.parent.add(e,n.index),e.type==="input"&&e.children.length&&M(100,e),Ye(e,e._c,e._value,!1),e.store.release(),!((t=n.props)===null||t===void 0)&&t.id&&Qt(e),e.emit("created",e),e.isCreated=!0,e}function Un(e){const n=e||{},t=zn(n),r=new Proxy(t,{get(...i){const[,o]=i;if(o==="__FKNode__")return!0;const a=t.traps.get(o);return a&&a.get?a.get(r,t):Reflect.get(...i)},set(...i){const[,o,a]=i,u=t.traps.get(o);return u&&u.set?u.set(r,t,o,a):Reflect.set(...i)}});return Wn(r,n)}function ke(e){return typeof e!="string"&&L(e,"$el")}function $e(e){return typeof e!="string"&&L(e,"$cmp")}function H(e){return!e||typeof e=="string"?!1:L(e,"if")&&L(e,"then")}function Kn(e){return typeof e!="string"&&"$formkit"in e}function qn(e){if(typeof e=="string")return{$el:"text",children:e};if(Kn(e)){const{$formkit:n,for:t,if:r,children:i,bind:o,...a}=e;return Object.assign({$cmp:"FormKit",props:{...a,type:n}},r?{if:r}:{},t?{for:t}:{},i?{children:i}:{},o?{bind:o}:{})}return e}function B(e){let n;const t=new Set,r=function(d,p){return typeof d=="function"?d(p):d},i=[{"&&":(m,d,p)=>r(m,p)&&r(d,p),"||":(m,d,p)=>r(m,p)||r(d,p)},{"===":(m,d,p)=>r(m,p)===r(d,p),"!==":(m,d,p)=>r(m,p)!==r(d,p),"==":(m,d,p)=>r(m,p)==r(d,p),"!=":(m,d,p)=>r(m,p)!=r(d,p),">=":(m,d,p)=>r(m,p)>=r(d,p),"<=":(m,d,p)=>r(m,p)<=r(d,p),">":(m,d,p)=>r(m,p)>r(d,p),"<":(m,d,p)=>r(m,p)<r(d,p)},{"+":(m,d,p)=>r(m,p)+r(d,p),"-":(m,d,p)=>r(m,p)-r(d,p)},{"*":(m,d,p)=>r(m,p)*r(d,p),"/":(m,d,p)=>r(m,p)/r(d,p),"%":(m,d,p)=>r(m,p)%r(d,p)}],o=i.reduce((m,d)=>m.concat(Object.keys(d)),[]),a=new Set(o.map(m=>m.charAt(0)));function u(m,d,p,k){const O=m.filter(f=>f.startsWith(d));return O.length?O.find(f=>k.length>=p+f.length&&k.substring(p,p+f.length)===f?f:!1):!1}function g(m,d,p=1){let k=p?d.substring(m+1).trim():d.substring(0,m).trim();if(!k.length)return-1;if(!p){const f=k.split("").reverse(),l=f.findIndex(c=>a.has(c));k=f.slice(l).join("")}const O=k[0];return i.findIndex(f=>{const l=Object.keys(f);return!!u(l,O,0,k)})}function w(m,d){let p="";const k=d.length;let O=0;for(let f=m;f<k;f++){const l=d.charAt(f);if(l==="(")O++;else if(l===")")O--;else if(O===0&&l===" ")continue;if(O===0&&u(o,l,f,d))return[p,f-1];p+=l}return[p,d.length-1]}function v(m,d=0){const p=i[d],k=m.length,O=Object.keys(p);let f=0,l=!1,c=null,h="",$=null,b,P="",I="",A="",x="",F=0;const D=(E,W)=>{E?A+=W:h+=W};for(let E=0;E<k;E++)if(P=I,I=m.charAt(E),(I==="'"||I==='"')&&P!=="\\"&&(f===0&&!l||f&&!x)){f?x=I:l=I,D(f,I);continue}else if(l&&(I!==l||P==="\\")||x&&(I!==x||P==="\\")){D(f,I);continue}else if(l===I){l=!1,D(f,I);continue}else if(x===I){x=!1,D(f,I);continue}else{if(I===" ")continue;if(I==="(")f===0?F=E:A+=I,f++;else if(I===")")if(f--,f===0){const W=typeof h=="string"&&h.startsWith("$")?h:void 0,It=W&&m.charAt(E+1)===".";let J="";It&&([J,E]=w(E+2,m));const fe=c?d:g(F,m,0),Q=g(E,m);fe===-1&&Q===-1?h=y(A,-1,W,J):c&&(fe>=Q||Q===-1)&&d===fe?($=c.bind(null,y(A,-1,W,J)),c=null,h=""):Q>fe&&d===Q?h=y(A,-1,W,J):h+=`(${A})${It?`.${J}`:""}`,A=""}else A+=I;else if(f===0&&(b=u(O,I,E,m))){E===0&&M(103,[b,m]),E+=b.length-1,E===m.length-1&&M(104,[b,m]),c?h&&($=c.bind(null,y(h,d)),c=p[b].bind(null,$),h=""):$?(c=p[b].bind(null,y($,d)),$=null):(c=p[b].bind(null,y(h,d)),h="");continue}else D(f,I)}return h&&c&&(c=c.bind(null,y(h,d))),c=!c&&$?$:c,!c&&h&&(c=(E,W)=>typeof E=="function"?E(W):E,c=c.bind(null,y(h,d))),!c&&!h&&M(105,m),c}function y(m,d,p,k){if(p){const O=y(p,i.length);let f,l=k?B(`$${k}`):!1;if(typeof O=="function"){const c=At(String(m)).map(h=>y(h,-1));return h=>{const $=O(h);return typeof $!="function"?(ee(150,p),$):(f=$(...c.map(b=>typeof b=="function"?b(h):b)),l&&(l=l.provide(b=>{const P=n(b);return b.reduce((A,x)=>{if(x===k||(k==null?void 0:k.startsWith(`${x}(`))){const D=jt(f,x);A[x]=()=>D}else A[x]=P[x];return A},{})})),l?l():f)}}}else if(typeof m=="string"){if(m==="true")return!0;if(m==="false")return!1;if(m==="undefined")return;if(Pt(m))return Et(m.substring(1,m.length-1));if(!isNaN(+m))return Number(m);if(d<i.length-1)return v(m,d+1);if(m.startsWith("$")){const O=m.substring(1);return t.add(O),function(l){return O in l?l[O]():void 0}}return m}return m}const _=v(e.startsWith("$:")?e.substring(2):e),C=Array.from(t);function S(m){return n=m,Object.assign(_.bind(null,m(C)),{provide:S})}return Object.assign(_,{provide:S})}const tt="1.0.0-beta.10",Nn=z("outer",()=>({$el:"div",attrs:{key:"$id","data-family":"$family || undefined","data-type":"$type","data-multiple":'$attrs.multiple || ($type != "select" && $options != undefined) || undefined',"data-disabled":"$disabled || undefined","data-complete":"$state.complete || undefined","data-invalid":"$state.valid === false && $state.validationVisible || undefined","data-errors":"$state.errors || undefined","data-submitted":"$state.submitted || undefined","data-prefix-icon":"$_rawPrefixIcon !== undefined || undefined","data-suffix-icon":"$_rawSuffixIcon !== undefined || undefined","data-prefix-icon-click":"$onPrefixIconClick !== undefined || undefined","data-suffix-icon-click":"$onSuffixIconClick !== undefined || undefined"}}),!0),Hn=z("inner","div"),Zn=z("wrapper","div"),Jn=z("label",()=>({$el:"label",if:"$label",attrs:{for:"$id"}})),Qn=z("messages",()=>({$el:"ul",if:"$fns.length($messages)"})),Yn=z("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",id:"$id + '-' + $message.key","data-message-type":"$message.type"}})),Gn=z("prefix",null),Xn=z("suffix",null),er=z("help",()=>({$el:"div",if:"$help",attrs:{id:'$: "help-" + $id'}}));function nt(e){return typeof e=="object"&&("$el"in e||"$cmp"in e||"$formkit"in e)}function tr(e,n={}){return typeof e=="string"?nt(n)||typeof n=="string"?n:e:Array.isArray(e)?nt(n)?n:e:de(e,n)}function nr(e){return Nn(Zn(Jn("$label"),Hn(Gn(),e(),Xn())),er("$help"),Qn(Yn("$message.value")))}function z(e,n,t=!1){return(...r)=>{const i=o=>{const a=!n||typeof n=="string"?{$el:n}:n();return(ke(a)||$e(a))&&(a.meta||(a.meta={section:e}),r.length&&!a.children&&(a.children=[...r.map(u=>typeof u=="string"?u:u(o))]),ke(a)&&(a.attrs={class:`$classes.${e}`,...a.attrs||{}})),{if:`$slots.${e}`,then:`$slots.${e}`,else:e in o?tr(a,o[e]):a}};return t?rr(i):i}}function rr(e){return n=>[e(n)]}te({type:"state",blocking:!0,visible:!1,value:!0,key:"validating"});let se;const ir=new Promise(e=>{}),le=typeof window!="undefined"&&typeof fetch!="undefined";se=le?getComputedStyle(document.documentElement):void 0;const Z={},Ce={};function Se(e,n){return t=>{if(typeof t=="boolean")return;if(t.startsWith("<svg"))return t;if(typeof t!="string")return;const r=Z[t],i=t.startsWith("default:");t=i?t.split(":")[1]:t;let o;if(r||t in Z)return r;if(!Ce[t]){if(o=or(t),o=le&&typeof o=="undefined"?Promise.resolve(o):o,o instanceof Promise)Ce[t]=o.then(a=>!a&&typeof t=="string"&&!i?o=typeof e=="function"?e(t):lr(t,n):a).then(a=>(typeof t=="string"&&(Z[i?`default:${t}`:t]=a),a));else if(typeof o=="string")return Z[i?`default:${t}`:t]=o,o}return Ce[t]}}function or(e){if(!!le)return ir.then(()=>sr(e))}function sr(e){const n=se==null?void 0:se.getPropertyValue(`--fk-icon-${e}`);if(n){const t=atob(n);if(t.startsWith("<svg"))return Z[e]=t,t}}function lr(e,n){const t=tt.startsWith("__")?"latest":tt,r=typeof n=="function"?n(e):`https://cdn.jsdelivr.net/npm/@formkit/icons@${t}/dist/icons/${e}.svg`;if(!!le)return fetch(`${r}`).then(async i=>{const o=await i.text();if(o.startsWith("<svg"))return o}).catch(i=>{console.error(i)})}let Oe=!1;const rt={100:({data:e})=>`Only groups, lists, and forms can have children (${e.name}).`,101:({data:e})=>`You cannot directly modify the store (${e.name}). See: https://formkit.com/advanced/core#message-store`,102:({data:[e,n]})=>`You cannot directly assign node.${n} (${e.name})`,103:({data:[e]})=>`Schema expressions cannot start with an operator (${e})`,104:({data:[e,n]})=>`Schema expressions cannot end with an operator (${e} in "${n}")`,105:({data:e})=>`Invalid schema expression: ${e}`,106:({data:e})=>`Cannot submit because (${e}) is not in a form.`,107:({data:[e,n]})=>`Cannot set ${e.name} to non object value: ${n}`,108:({data:[e,n]})=>`Cannot set ${e.name} to non array value: ${n}`,600:({data:e})=>`Unknown input type${typeof e.props.type=="string"?' "'+e.props.type+'"':""} ("${e.name}")`,601:({data:e})=>`Input definition${typeof e.props.type=="string"?' "'+e.props.type+'"':""} is missing a schema or component property (${e.name}).`},it={150:({data:e})=>`Schema function "${e}()" is not a valid function.`,151:({data:e})=>`No form element with id: ${e}`,152:({data:e})=>`No input element with id: ${e}`,350:({data:e})=>`Invalid options prop for radio input (${e.name}). See https://formkit.com/inputs/radio`,650:'Schema "$get()" must use the id of an input to access.',651:({data:e})=>`Cannot setErrors() on "${e}" because no such id exists.`,652:({data:e})=>`Cannot clearErrors() on "${e}" because no such id exists.`,800:({data:e})=>`${e} is deprecated.`};Oe||ye((e,n)=>{if(e.code in rt){const t=rt[e.code];e.message=typeof t=="function"?t(e):t}return n(e)}),Oe||he((e,n)=>{if(e.code in it){const t=it[e.code];e.message=typeof t=="function"?t(e):t}return n(e)}),Oe=!0;const Ie={};let T;const K=new Map,ar="__raw__",fr=/[a-zA-Z0-9\-][cC]lass$/;function ur(e,n){const t=s.ref(null);if(e==="get"){const i={};return t.value=cr.bind(null,i),t}const r=e.split(".");return s.watchEffect(()=>t.value=Ve(n,r)),t}function Ve(e,n){if(Array.isArray(e)){for(const r of e){const i=r!==!1&&Ve(r,n);if(i!==void 0)return i}return}let t;return n.reduce((r,i,o,a)=>{if(typeof r!="object")return t=void 0,a.splice(1);const u=r[i];return o===n.length-1&&u!==void 0&&(t=u),r[i]},e),t}function cr(e,n){if(typeof n!="string")return ee(650);if(n in e||(e[n]=s.ref(void 0)),e[n].value===void 0){e[n].value=null;const t=Ne(n);t&&(e[n].value=t.context),Gt(n,({payload:r})=>{e[n].value=re(r)?r.context:r})}return e[n].value}function ot(e,n){function t(y,_){const C=v(B(_.if),{if:!0}),S=g(y,_.then),m=_.else?g(y,_.else):null;return[C,S,m]}function r(y,_){var C,S;const m=v(B(y.if));let d=()=>_,p=()=>_;return typeof y.then=="object"?p=i(y.then,void 0):typeof y.then=="string"&&((C=y.then)===null||C===void 0?void 0:C.startsWith("$"))?p=v(B(y.then)):p=()=>y.then,L(y,"else")&&(typeof y.else=="object"?d=i(y.else):typeof y.else=="string"&&((S=y.else)===null||S===void 0?void 0:S.startsWith("$"))?d=v(B(y.else)):d=()=>y.else),()=>m()?p():d()}function i(y,_,C={}){const S=new Set(Object.keys(y||{})),m=_?v(B(_)):()=>({}),d=[p=>{const k=m();for(const O in k)S.has(O)||(p[O]=k[O])}];if(y){if(H(y))return r(y,C);for(let p in y){const k=y[p];let O;const f=typeof k=="string";p.startsWith(ar)?(p=p.substring(7),O=()=>k):f&&k.startsWith("$")&&k.length>1&&!(k.startsWith("$reset")&&fr.test(p))?O=v(B(k)):typeof k=="object"&&H(k)?O=r(k,void 0):typeof k=="object"&&Y(k)?O=i(k):O=()=>k,d.push(l=>{l[p]=O()})}}return()=>{const p=Array.isArray(y)?[]:{};return d.forEach(k=>k(p)),p}}function o(y,_){let C=null,S=()=>null,m=!1,d=null,p=null,k=null,O=!1;const f=qn(_);if(ke(f)?(C=f.$el,S=f.$el!=="text"?i(f.attrs,f.bind):()=>null):$e(f)?(typeof f.$cmp=="string"?L(y,f.$cmp)?C=y[f.$cmp]:(C=f.$cmp,O=!0):C=f.$cmp,S=i(f.props,f.bind)):H(f)&&([m,d,p]=t(y,f)),!H(f)&&"if"in f?m=v(B(f.if)):!H(f)&&C===null&&(m=()=>!0),"children"in f&&f.children)if(typeof f.children=="string")if(f.children.startsWith("$slots."))C=C==="text"?"slot":C,d=v(B(f.children));else if(f.children.startsWith("$")&&f.children.length>1){const l=v(B(f.children));d=()=>String(l())}else d=()=>String(f.children);else if(Array.isArray(f.children))d=g(y,f.children);else{const[l,c,h]=t(y,f.children);d=$=>l&&l()?c&&c($):h&&h($)}if($e(f))if(d){const l=d;d=c=>({default(h,$){var b,P,I,A;const x=T;$&&(T=$),h&&((b=K.get(T))===null||b===void 0||b.unshift(h)),c&&((P=K.get(T))===null||P===void 0||P.unshift(c));const F=l(c);return h&&((I=K.get(T))===null||I===void 0||I.shift()),c&&((A=K.get(T))===null||A===void 0||A.shift()),T=x,F}}),d.slot=!0}else d=()=>({});if("for"in f&&f.for){const l=f.for.length===3?f.for[2]:f.for[1];k=[typeof l=="string"&&l.startsWith("$")?v(B(l)):()=>l,f.for[0],f.for.length===3?String(f.for[1]):null]}return[m,C,S,d,p,k,O]}function a(y,_){const C=y(_),S=T;return Object.keys(C).reduce((m,d)=>{const p=C&&C[d];return m[d]=k=>p&&p(k,S)||null,m},{})}function u(y,_){const[C,S,m,d,p,k,O]=o(y,_);let f=l=>{if(C&&S===null&&d)return C()?d(l):p&&p(l);if(S&&(!C||C())){if(S==="text"&&d)return s.createTextVNode(String(d()));if(S==="slot"&&d)return d(l);const c=O?s.resolveComponent(S):S,h=d!=null&&d.slot?a(d,l):null;return s.h(c,m(),h||(d?d(l):[]))}return typeof p=="function"?p(l):p};if(k){const l=f,[c,h,$]=k;f=()=>{const b=c(),P=isNaN(b)?b:Array(Number(b)).fill(0).map((x,F)=>F),I=[];if(typeof P!="object")return null;const A=K.get(T)||[];for(const x in P){if(Array.isArray(P)&&x==="length")continue;const F=Object.defineProperty({...A.reduce((D,E)=>D.__idata?{...D,...E}:E,{}),[h]:P[x],...$!==null?{[$]:x}:{}},"__idata",{enumerable:!1,value:!0});A.unshift(F),I.push(l.bind(null,F)()),A.shift()}return I}}return f}function g(y,_){if(Array.isArray(_)){const S=_.map(u.bind(null,y));return m=>S.map(d=>d(m))}const C=u(y,_);return S=>C(S)}const w=[];function v(y,_={}){const C={};return w.push((S,m)=>{C[m]=y.provide(d=>S(d,_))}),()=>C[T]()}return function(_,C){const S=JSON.stringify(n),[m,d]=L(Ie,S)?Ie[S]:[g(e,n),w];return Ie[S]=[m,d],d.forEach(p=>{p(_,C)}),()=>(T=C,m())}}function st(e,n){const t=K.get(T)||[];let r;return t.length&&(r=Ve(t,e.split("."))),r===void 0?n:r}function pr(e,n){return new Proxy(e,{get(...t){let r;const i=t[1];if(typeof i=="string"){const o=T;T=n,r=st(i,void 0),T=o}return r!==void 0?r:Reflect.get(...t)}})}function lt(e,n,t){return e((r,i={})=>r.reduce((o,a)=>{if(a.startsWith("slots.")){const g=a.substring(6),w=n.slots&&L(n.slots,g);if(i.if)o[a]=()=>w;else if(n.slots&&w){const v=pr(n,t);return o[a]=()=>n.slots[g](v),o}}const u=ur(a,n);return o[a]=()=>st(a,u.value),o},{}),t)}let at=0;const dr=s.defineComponent({name:"FormKitSchema",props:{schema:{type:[Array,Object],required:!0},data:{type:Object,default:()=>({})},library:{type:Object,default:()=>({})}},setup(e,n){const t=s.getCurrentInstance();let r=Symbol(String(at++));K.set(r,[]);let i=ot(e.library,e.schema),o,a;return s.watch(()=>e.schema,(u,g)=>{var w;r=Symbol(String(at++)),i=ot(e.library,e.schema),o=lt(i,a,r),u===g&&((w=t==null?void 0:t.proxy)===null||w===void 0?void 0:w.$forceUpdate)()},{deep:!0}),s.watchEffect(()=>{a=Object.assign(s.reactive(e.data),{slots:n.slots}),o=lt(i,a,r)}),()=>o()}}),mr={config:{type:Object,default:{}},classes:{type:Object,required:!1},delay:{type:Number,required:!1},errors:{type:Array,default:[]},inputErrors:{type:Object,default:()=>({})},index:{type:Number,required:!1},id:{type:String,required:!1},modelValue:{required:!1},name:{type:String,required:!1},parent:{type:Object,required:!1},plugins:{type:Array,default:[]},sectionsSchema:{type:Object,default:{}},type:{type:[String,Object],default:"text"},validation:{type:[String,Array],required:!1},validationMessages:{type:Object,required:!1},validationRules:{type:Object,required:!1},validationLabel:{type:[String,Function],required:!1}},Pe=Symbol("FormKitParent");s.defineComponent({props:mr,emits:{input:(e,n)=>!0,inputRaw:(e,n)=>!0,"update:modelValue":e=>!0,node:e=>!!e,submit:(e,n)=>!0,submitRaw:(e,n)=>!0,submitInvalid:e=>!0},inheritAttrs:!1,setup(e,n){const t=br(e,n);if(t.props.definition||M(600,t),t.props.definition.component)return()=>{var a;return s.h((a=t.props.definition)===null||a===void 0?void 0:a.component,{context:t.context},{...n.slots})};const r=s.ref([]),i=()=>{var a,u;const g=(u=(a=t.props)===null||a===void 0?void 0:a.definition)===null||u===void 0?void 0:u.schema;g||M(601,t),r.value=typeof g=="function"?g({...e.sectionsSchema}):g};i(),t.on("schema",i),n.emit("node",t);const o=t.props.definition.library;return n.expose({node:t}),()=>s.h(dr,{schema:r.value,data:t.context,library:o},{...n.slots})}});const ft=Symbol.for("FormKitOptions"),Ee=Symbol();function yr(e,n){const t={},r=a=>{for(const u of a)u.__str in t&&t[u.__str](),t[u.__str]=s.watch(gr.bind(null,e,u),o.bind(null,u),{deep:!1})},o=hr(e,n,r,a=>{if(!!a.length)for(const u in t)`${u}`.startsWith(`${a.__str}.`)&&(t[u](),delete t[u])});r(Ae(e))}function hr(e,n,t,r){return i=>{const o=ut(e,i);o!==Ee&&(i.__deep&&r(i),typeof o=="object"&&t(Ae(o,[i],...i)),n(i,o,e))}}function gr(e,n){const t=ut(e,n);return t&&typeof t=="object"?Object.keys(t):t}function ut(e,n){if(s.isRef(e)){if(n.length===0)return e.value;e=e.value}return n.reduce((t,r)=>t===Ee?t:t===null||typeof t!="object"?Ee:t[r],e)}function Ae(e,n=[],...t){if(e===null)return n;if(!t.length){const r=Object.defineProperty([],"__str",{value:""});if(e=s.isRef(e)?e.value:e,e&&typeof e=="object")Object.defineProperty(r,"__deep",{value:!0}),n.push(r);else return[r]}if(e===null||typeof e!="object")return n;for(const r in e){const i=t.concat(r);Object.defineProperty(i,"__str",{value:i.join(".")});const o=e[r];Y(o)||Array.isArray(o)?(n.push(Object.defineProperty(i,"__deep",{value:!0})),n=n.concat(Ae(o,[],...i))):n.push(i)}return n}function ae(e){return e===null||typeof e!="object"||(s.isReactive(e)?e=s.toRaw(e):s.isRef(e)&&(e=s.isReactive(e.value)?ae(e.value):e.value)),e}const je=["help","label","ignore","disabled","preserve",/^preserve(-e|E)rrors/,/^[a-z]+(?:-visibility|Visibility)$/,/^[a-zA-Z-]+(?:-class|Class)$/,"prefixIcon","suffixIcon",/^[a-zA-Z-]+(?:-icon|Icon)$/];function ct(e,n){n.classes&&Object.keys(n.classes).forEach(t=>{typeof t=="string"&&(e.props[`_${t}Class`]=n.classes[t],pe(n.classes[t])&&t==="inner"&&Object.values(n.classes[t]))})}function _r(e){return e?["Submit","SubmitRaw","SubmitInvalid"].reduce((t,r)=>{const i=`on${r}`;return i in e&&typeof e[i]=="function"&&(t[i]=e[i]),t},{}):{}}function br(e,n,t={}){const r=Object.assign({},s.inject(ft)||{},t),i=s.getCurrentInstance(),o=_r(i==null?void 0:i.vnode.props),a=e.modelValue!==void 0,u=e.modelValue!==void 0?e.modelValue:U(n.attrs.value);function g(){const f={...q(e),...o},l=Le(q(n.attrs),je);f.attrs=l;const c=Te(q(n.attrs),je);for(const $ in c)f[G($)]=c[$];const h={props:{}};return ct(h,e),Object.assign(f,h.props),typeof f.type!="string"&&(f.definition=f.type,delete f.type),f}const w=g(),v=w.ignore?null:e.parent||s.inject(Pe,null),y=Un(de(r||{},{name:e.name||void 0,value:u,parent:v,plugins:(r.plugins||[]).concat(e.plugins),config:e.config,props:w,index:e.index},!1,!0));y.props.definition||M(600,y);const _=s.ref(new Set(y.props.definition.props||[]));y.on("added-props",({payload:f})=>{Array.isArray(f)&&f.forEach(l=>_.value.add(l))});const C=s.computed(()=>je.concat([..._.value]).reduce((f,l)=>(typeof l=="string"?(f.push(G(l)),f.push(Re(l))):f.push(l),f),[]));s.watchEffect(()=>ct(y,e));const S=q(e);for(const f in S)s.watch(()=>e[f],()=>{e[f]!==void 0&&(y.props[f]=e[f])});const m=new Set,d=q(n.attrs);s.watchEffect(()=>{p(Te(d,C.value))});function p(f){m.forEach(l=>{l(),m.delete(l)});for(const l in f){const c=G(l);m.add(s.watch(()=>n.attrs[l],()=>{y.props[c]=n.attrs[l]}))}}if(s.watchEffect(()=>{const f=Le(q(n.attrs),C.value);y.props.attrs=Object.assign({},y.props.attrs||{},f)}),s.watchEffect(()=>{const f=e.errors.map(l=>te({key:Me(l),type:"error",value:l,meta:{source:"prop"}}));y.store.apply(f,l=>l.type==="error"&&l.meta.source==="prop")}),y.type!=="input"){const f=`${y.name}-prop`;s.watchEffect(()=>{const l=Object.keys(e.inputErrors);l.length||y.clearErrors(!0,f);const c=l.reduce((h,$)=>{let b=e.inputErrors[$];return typeof b=="string"&&(b=[b]),Array.isArray(b)&&(h[$]=b.map(P=>te({key:P,type:"error",value:P,meta:{source:f}}))),h},{});y.store.apply(c,h=>h.type==="error"&&h.meta.source===f)})}s.watchEffect(()=>Object.assign(y.config,e.config)),y.type!=="input"&&s.provide(Pe,y);let k;const O=new WeakSet;return y.on("modelUpdated",()=>{var f,l;if(n.emit("inputRaw",(f=y.context)===null||f===void 0?void 0:f.value,y),clearTimeout(k),k=setTimeout(n.emit,20,"input",(l=y.context)===null||l===void 0?void 0:l.value,y),a&&y.context){const c=ae(y.context.value);pe(c)&&ae(e.modelValue)!==c&&O.add(c),n.emit("update:modelValue",c)}}),a&&yr(s.toRef(e,"modelValue"),(f,l)=>{var c;const h=ae(l);if(pe(h)&&O.has(h))return O.delete(h);f.length?(c=y.at(f))===null||c===void 0||c.input(l,!1):y.input(l,!1)}),s.onUnmounted(()=>y.destroy()),y}let wr=1;function vr(e){return typeof e=="function"&&e.length===2||typeof e=="object"&&!Array.isArray(e)&&!("$el"in e)&&!("$cmp"in e)&&!("if"in e)}function R(e,n={}){const t={type:"input",...n};let r;if(vr(e)){const i=`SchemaComponent${wr++}`;r=z("input",()=>({$cmp:i,props:{context:"$node.context"}})),t.library={[i]:s.markRaw(e)}}else typeof e=="function"?r=e:r=z("input",()=>U(e));return t.schema=nr(r||"Schema undefined"),t}s.defineComponent({name:"FormKitIcon",props:{icon:{type:String,default:""},iconLoader:{type:Function,default:null},iconLoaderUrl:{type:Function,default:null}},setup(e){var n,t;const r=s.ref(void 0),i=s.inject(ft,{}),o=s.inject(Pe,null);let a;if(e.iconLoader&&typeof e.iconLoader=="function")a=Se(e.iconLoader);else if(o&&((n=o.props)===null||n===void 0?void 0:n.iconLoader))a=Se(o.props.iconLoader);else if(e.iconLoaderUrl&&typeof e.iconLoaderUrl=="function")a=Se(a,e.iconLoaderUrl);else{const u=(t=i==null?void 0:i.plugins)===null||t===void 0?void 0:t.find(g=>typeof g.iconHandler=="function");u&&(a=u.iconHandler)}if(a&&typeof a=="function"){const u=a(e.icon);u instanceof Promise?u.then(g=>{r.value=g}):r.value=u}return()=>r.value?s.h("span",{class:"formkit-icon",innerHTML:r.value}):null}});const kr=s.defineComponent({__name:"PrimeInputText",props:{context:Object},setup(e){const t=e.context,r=()=>(t==null?void 0:t.iconLeft)&&(t==null?void 0:t.iconLeft.length)>0,i=()=>(t==null?void 0:t.iconRight)&&(t==null?void 0:t.iconRight.length)>0,o=()=>{let u="";return r()&&(u=`${u}p-input-icon-left `),i()&&(u=`${u}p-input-icon-right `),u};function a(u){t==null||t.node.input(u.target.value)}return(u,g)=>{const w=s.resolveComponent("InputText");return s.openBlock(),s.createElementBlock("span",{class:s.normalizeClass(o())},[r()?(s.openBlock(),s.createElementBlock("i",{key:0,class:s.normalizeClass(s.unref(t).iconLeft)},null,2)):s.createCommentVNode("",!0),s.createVNode(w,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":g[0]||(g[0]=v=>s.unref(t)._value=v),class:s.normalizeClass(s.unref(t).attrs.class),placeholder:s.unref(t).attrs.placeholder,onInput:a},null,8,["id","modelValue","class","placeholder"]),i?(s.openBlock(),s.createElementBlock("i",{key:1,class:s.normalizeClass(s.unref(t).iconRight)},null,2)):s.createCommentVNode("",!0)],2)}}});var $r=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},pt={exports:{}};(function(e,n){(function(t,r){e.exports=r()})($r,function(){function t(f,l){if(!(f instanceof l))throw new TypeError("Cannot call a class as a function")}function r(f,l){for(var c=0;c<l.length;c++){var h=l[c];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(f,h.key,h)}}function i(f,l,c){return l&&r(f.prototype,l),c&&r(f,c),f}function o(f,l,c){return l in f?Object.defineProperty(f,l,{value:c,enumerable:!0,configurable:!0,writable:!0}):f[l]=c,f}function a(f,l){var c=Object.keys(f);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(f);l&&(h=h.filter(function($){return Object.getOwnPropertyDescriptor(f,$).enumerable})),c.push.apply(c,h)}return c}function u(f){for(var l=1;l<arguments.length;l++){var c=arguments[l]!=null?arguments[l]:{};l%2?a(Object(c),!0).forEach(function(h){o(f,h,c[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(c)):a(Object(c)).forEach(function(h){Object.defineProperty(f,h,Object.getOwnPropertyDescriptor(c,h))})}return f}function g(f){return function(l){if(Array.isArray(l))return v(l)}(f)||function(l){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(l))return Array.from(l)}(f)||w(f)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function w(f,l){if(f){if(typeof f=="string")return v(f,l);var c=Object.prototype.toString.call(f).slice(8,-1);return c==="Object"&&f.constructor&&(c=f.constructor.name),c==="Map"||c==="Set"?Array.from(f):c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?v(f,l):void 0}}function v(f,l){(l==null||l>f.length)&&(l=f.length);for(var c=0,h=new Array(l);c<l;c++)h[c]=f[c];return h}function y(f){if(typeof Symbol=="undefined"||f[Symbol.iterator]==null){if(Array.isArray(f)||(f=w(f))){var l=0,c=function(){};return{s:c,n:function(){return l>=f.length?{done:!0}:{done:!1,value:f[l++]}},e:function(I){throw I},f:c}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var h,$,b=!0,P=!1;return{s:function(){h=f[Symbol.iterator]()},n:function(){var I=h.next();return b=I.done,I},e:function(I){P=!0,$=I},f:function(){try{b||h.return==null||h.return()}finally{if(P)throw $}}}}var _={};_[_.Fatal=0]="Fatal",_[_.Error=0]="Error",_[_.Warn=1]="Warn",_[_.Log=2]="Log",_[_.Info=3]="Info",_[_.Success=3]="Success",_[_.Debug=4]="Debug",_[_.Trace=5]="Trace",_[_.Silent=-1/0]="Silent",_[_.Verbose=1/0]="Verbose";var C={silent:{level:-1},fatal:{level:_.Fatal},error:{level:_.Error},warn:{level:_.Warn},log:{level:_.Log},info:{level:_.Info},success:{level:_.Success},debug:{level:_.Debug},trace:{level:_.Trace},verbose:{level:_.Trace},ready:{level:_.Info},start:{level:_.Info}};function S(f){return l=f,Object.prototype.toString.call(l)==="[object Object]"&&!(!f.message&&!f.args)&&!f.stack;var l}var m=!1,d=[],p=function(){function f(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(var c in t(this,f),this._reporters=l.reporters||[],this._types=l.types||C,this.level=l.level!==void 0?l.level:3,this._defaults=l.defaults||{},this._async=l.async!==void 0?l.async:void 0,this._stdout=l.stdout,this._stderr=l.stderr,this._mockFn=l.mockFn,this._throttle=l.throttle||1e3,this._throttleMin=l.throttleMin||5,this._types){var h=u(u({type:c},this._types[c]),this._defaults);this[c]=this._wrapLogFn(h),this[c].raw=this._wrapLogFn(h,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return i(f,[{key:"create",value:function(l){return new f(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},l))}},{key:"withDefaults",value:function(l){return this.create({defaults:Object.assign({},this._defaults,l)})}},{key:"withTag",value:function(l){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+l:l})}},{key:"addReporter",value:function(l){return this._reporters.push(l),this}},{key:"removeReporter",value:function(l){if(l){var c=this._reporters.indexOf(l);if(c>=0)return this._reporters.splice(c,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(l){return this._reporters=Array.isArray(l)?l:[l],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var l in this._types)console["__"+l]||(console["__"+l]=console[l]),console[l]=this[l].raw}},{key:"restoreConsole",value:function(){for(var l in this._types)console["__"+l]&&(console[l]=console["__"+l],delete console["__"+l])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(l,c){var h=this;l&&(l.__write||(l.__write=l.write),l.write=function($){h[c].raw(String($).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(l){l&&l.__write&&(l.write=l.__write,delete l.__write)}},{key:"pauseLogs",value:function(){m=!0}},{key:"resumeLogs",value:function(){m=!1;var l,c=y(d.splice(0));try{for(c.s();!(l=c.n()).done;){var h=l.value;h[0]._logFn(h[1],h[2])}}catch($){c.e($)}finally{c.f()}}},{key:"mockTypes",value:function(l){if(this._mockFn=l||this._mockFn,typeof this._mockFn=="function")for(var c in this._types)this[c]=this._mockFn(c,this._types[c])||this[c],this[c].raw=this[c]}},{key:"_wrapLogFn",value:function(l,c){var h=this;return function(){for(var $=arguments.length,b=new Array($),P=0;P<$;P++)b[P]=arguments[P];if(!m)return h._logFn(l,b,c);d.push([h,l,b,c])}}},{key:"_logFn",value:function(l,c,h){var $=this;if(l.level>this.level)return!!this._async&&Promise.resolve(!1);var b=Object.assign({date:new Date,args:[]},l);!h&&c.length===1&&S(c[0])?Object.assign(b,c[0]):b.args=Array.from(c),b.message&&(b.args.unshift(b.message),delete b.message),b.additional&&(Array.isArray(b.additional)||(b.additional=b.additional.split(`
4
- `)),b.args.push(`
5
- `+b.additional.join(`
6
- `)),delete b.additional),b.type=typeof b.type=="string"?b.type.toLowerCase():"",b.tag=typeof b.tag=="string"?b.tag.toLowerCase():"";var P=function(){var F=arguments.length>0&&arguments[0]!==void 0&&arguments[0],D=$._lastLogCount-$._throttleMin;if($._lastLog&&D>0){var E=g($._lastLog.args);D>1&&E.push("(repeated ".concat(D," times)")),$._log(u(u({},$._lastLog),{},{args:E})),$._lastLogCount=1}if(F){if($._lastLog=b,$._async)return $._logAsync(b);$._log(b)}};clearTimeout(this._throttleTimeout);var I=this._lastLogTime?b.date-this._lastLogTime:0;if(this._lastLogTime=b.date,I<this._throttle)try{var A=JSON.stringify([b.type,b.tag,b.args]),x=this._lastLogSerialized===A;if(this._lastLogSerialized=A,x&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(P,this._throttle))}catch{}P(!0)}},{key:"_log",value:function(l){var c,h=y(this._reporters);try{for(h.s();!(c=h.n()).done;)c.value.log(l,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch($){h.e($)}finally{h.f()}}},{key:"_logAsync",value:function(l){var c=this;return Promise.all(this._reporters.map(function(h){return h.log(l,{async:!0,stdout:c.stdout,stderr:c.stderr})}))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),f}();p.prototype.add=p.prototype.addReporter,p.prototype.remove=p.prototype.removeReporter,p.prototype.clear=p.prototype.removeReporter,p.prototype.withScope=p.prototype.withTag,p.prototype.mock=p.prototype.mockTypes,p.prototype.pause=p.prototype.pauseLogs,p.prototype.resume=p.prototype.resumeLogs;var k,O=function(){function f(l){t(this,f),this.options=Object.assign({},l),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return i(f,[{key:"log",value:function(l){var c=l.level<1?console.__error||console.error:l.level===1&&console.warn?console.__warn||console.warn:console.__log||console.log,h=l.type!=="log"?l.type:"",$=l.tag?l.tag:"",b=this.typeColorMap[l.type]||this.levelColorMap[l.level]||this.defaultColor,P=`
7
- background: `.concat(b,`;
8
- border-radius: 0.5em;
9
- color: white;
10
- font-weight: bold;
11
- padding: 2px 0.5em;
12
- `),I="%c".concat([$,h].filter(Boolean).join(":"));typeof l.args[0]=="string"?c.apply(void 0,["".concat(I,"%c ").concat(l.args[0]),P,""].concat(g(l.args.slice(1)))):c.apply(void 0,[I,P].concat(g(l.args)))}}]),f}();return typeof window!="undefined"&&window.consola||((k=new p({reporters:[new O]})).Consola=p,k.LogLevel=_,k.BrowserReporter=O,k)})})(pt);var Cr=pt.exports;const Sr=s.defineComponent({__name:"PrimeInputNumber",props:{context:Object},setup(e){const t=e.context;function r(i){Cr.error(i),t==null||t.node.input(i.value)}return(i,o)=>{var u,g,w,v,y,_,C,S,m,d,p;const a=s.resolveComponent("InputNumber");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=k=>s.unref(t)._value=k),placeholder:s.unref(t).attrs.placeholder,class:s.normalizeClass(s.unref(t).attrs.class),"use-grouping":(u=s.unref(t).attrs.useGrouping)!=null?u:!0,"min-fraction-digits":(g=s.unref(t).attrs.minFractionDigits)!=null?g:void 0,"max-fraction-digits":(w=s.unref(t).attrs.maxFractionDigits)!=null?w:void 0,locale:(v=s.unref(t).attrs.locale)!=null?v:void 0,mode:(y=s.unref(t).attrs.mode)!=null?y:void 0,currency:(_=s.unref(t).attrs.currency)!=null?_:void 0,prefix:(C=s.unref(t).attrs.prefix)!=null?C:void 0,suffix:(S=s.unref(t).attrs.suffix)!=null?S:void 0,"show-buttons":(m=s.unref(t).attrs.showButtons)!=null?m:void 0,"button-layout":(d=s.unref(t).attrs.buttonLayout)!=null?d:"stacked",step:(p=s.unref(t).attrs.step)!=null?p:void 0,onInput:r},null,8,["id","modelValue","placeholder","class","use-grouping","min-fraction-digits","max-fraction-digits","locale","mode","currency","prefix","suffix","show-buttons","button-layout","step"])}}}),Or=s.defineComponent({__name:"PrimeInputMask",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var o;t==null||t.node.input((o=n.context)==null?void 0:o._value)}return(i,o)=>{var u,g,w,v;const a=s.resolveComponent("InputMask");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=y=>s.unref(t)._value=y),class:s.normalizeClass(s.unref(t).attrs.class),placeholder:s.unref(t).attrs.placeholder,mask:(u=s.unref(t).attrs.mask)!=null?u:void 0,"slot-char":(g=s.unref(t).attrs.slotChar)!=null?g:"_","auto-clear":(w=s.unref(t).attrs.autoClear)!=null?w:!0,unmask:(v=s.unref(t).attrs.unmask)!=null?v:!1,onBlur:r},null,8,["id","modelValue","class","placeholder","mask","slot-char","auto-clear","unmask"])}}}),Ir=s.defineComponent({__name:"PrimePassword",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i.target.value)}return(i,o)=>{var u,g,w,v;const a=s.resolveComponent("Password");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=y=>s.unref(t)._value=y),class:s.normalizeClass(s.unref(t).attrs.class),placeholder:s.unref(t).attrs.placeholder,feedback:(g=(u=s.unref(t))==null?void 0:u.feedback)!=null?g:!0,"toggle-mask":(v=(w=s.unref(t))==null?void 0:w.toggleMask)!=null?v:!1,onInput:r},null,8,["id","modelValue","class","placeholder","feedback","toggle-mask"])}}}),Vr=s.defineComponent({__name:"PrimeInputTextArea",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i.target.value)}return(i,o)=>{var u;const a=s.resolveComponent("Textarea");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=g=>s.unref(t)._value=g),class:s.normalizeClass(s.unref(t).attrs.class),placeholder:s.unref(t).attrs.placeholder,rows:(u=s.unref(t).rows)!=null?u:3,onInput:r},null,8,["id","modelValue","class","placeholder","rows"])}}}),Pr={key:0,class:"formkit-prime-left"},Er={key:1,class:"formkit-prime-right"},Ar=s.defineComponent({__name:"PrimeCheckBox",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i)}return(i,o)=>{const a=s.resolveComponent("Checkbox");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(t).attrs.labelLeft?(s.openBlock(),s.createElementBlock("span",Pr,s.toDisplayString(s.unref(t).attrs.labelLeft),1)):s.createCommentVNode("",!0),s.createVNode(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=u=>s.unref(t)._value=u),class:s.normalizeClass(s.unref(t).attrs.class),placeholder:s.unref(t).attrs.placeholder,binary:!0,onInput:r},null,8,["id","modelValue","class","placeholder"]),s.unref(t).attrs.labelRight?(s.openBlock(),s.createElementBlock("span",Er,s.toDisplayString(s.unref(t).attrs.labelRight),1)):s.createCommentVNode("",!0)],64)}}}),jr={key:0,class:"formkit-prime-left"},xr={key:1,class:"formkit-prime-right"},Lr=s.defineComponent({__name:"PrimeInputSwitch",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var o;t==null||t.node.input((o=n.context)==null?void 0:o._value)}return(i,o)=>{var u,g;const a=s.resolveComponent("InputSwitch");return s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(t).attrs.labelLeft?(s.openBlock(),s.createElementBlock("span",jr,s.toDisplayString(s.unref(t).attrs.labelLeft),1)):s.createCommentVNode("",!0),s.createVNode(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=w=>s.unref(t)._value=w),class:s.normalizeClass(s.unref(t).attrs.class),"true-value":(u=s.unref(t).attrs.trueValue)!=null?u:void 0,"false-value":(g=s.unref(t).attrs.falseValue)!=null?g:void 0,onInput:r},null,8,["id","modelValue","class","true-value","false-value"]),s.unref(t).attrs.labelRight?(s.openBlock(),s.createElementBlock("span",xr,s.toDisplayString(s.unref(t).attrs.labelRight),1)):s.createCommentVNode("",!0)],64)}}}),Tr=s.defineComponent({__name:"PrimeEditor",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i.htmlValue)}return(i,o)=>{const a=s.resolveComponent("Editor");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=u=>s.unref(t)._value=u),placeholder:s.unref(t).attrs.placeholder,onTextChange:r},null,8,["id","modelValue","placeholder"])}}}),Rr=s.defineComponent({__name:"PrimeDropdown",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i.value)}return(i,o)=>{var u,g,w,v;const a=s.resolveComponent("Dropdown");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=y=>s.unref(t)._value=y),class:s.normalizeClass(s.unref(t).attrs.class),options:(g=(u=s.unref(t))==null?void 0:u.attrs)==null?void 0:g.options,"option-label":"label","option-value":"value",placeholder:s.unref(t).attrs.placeholder,filter:(w=s.unref(t).attrs.filter)!=null?w:!1,"show-clear":(v=s.unref(t).attrs.showClear)!=null?v:!1,onChange:r},null,8,["id","modelValue","class","options","placeholder","filter","show-clear"])}}}),Dr=s.defineComponent({__name:"PrimeMultiSelect",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var o;t==null||t.node.input((o=n.context)==null?void 0:o._value)}return(i,o)=>{var u,g,w;const a=s.resolveComponent("MultiSelect");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=v=>s.unref(t)._value=v),class:s.normalizeClass(s.unref(t).attrs.class),options:(g=(u=s.unref(t))==null?void 0:u.attrs)==null?void 0:g.options,"option-label":"label","option-value":"value",placeholder:s.unref(t).attrs.placeholder,filter:(w=s.unref(t).attrs.filter)!=null?w:!1,onChange:r},null,8,["id","modelValue","class","options","placeholder","filter"])}}}),Mr=s.defineComponent({__name:"PrimeCalendar",props:{context:Object},setup(e){const n=e,t=n.context;function r(o){t==null||t.node.input(t==null?void 0:t._value)}function i(o){t==null||t.node.input(o)}return(o,a)=>{const u=s.resolveComponent("Calendar");return s.openBlock(),s.createBlock(u,{id:n.context.id,modelValue:s.unref(t)._value,"onUpdate:modelValue":a[0]||(a[0]=g=>s.unref(t)._value=g),class:s.normalizeClass(s.unref(t).attrs.class),"date-format":s.unref(t).attrs.dateFormat,"show-icon":s.unref(t).attrs.showIcon,icon:s.unref(t).attrs.icon,onDateSelect:i,onInput:r},null,8,["id","modelValue","class","date-format","show-icon","icon"])}}}),Fr=s.defineComponent({__name:"PrimeSlider",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var o;t==null||t.node.input((o=n.context)==null?void 0:o._value)}return(i,o)=>{var u,g,w,v;const a=s.resolveComponent("Slider");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=y=>s.unref(t)._value=y),min:(u=s.unref(t).attrs.min)!=null?u:0,max:(g=s.unref(t).attrs.max)!=null?g:100,step:(w=s.unref(t).attrs.step)!=null?w:void 0,range:(v=s.unref(t).attrs.range)!=null?v:!1,onChange:r},null,8,["id","modelValue","min","max","step","range"])}}}),Br=s.defineComponent({__name:"PrimeRating",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var o;t==null||t.node.input((o=n.context)==null?void 0:o._value)}return(i,o)=>{var u,g,w,v;const a=s.resolveComponent("Rating");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=y=>s.unref(t)._value=y),disabled:(u=s.unref(t).attrs.disabled)!=null?u:!1,readonly:(g=s.unref(t).attrs.readonly)!=null?g:!1,stars:(w=s.unref(t).attrs.stars)!=null?w:5,cancel:(v=s.unref(t).attrs.cancel)!=null?v:!1,onChange:r},null,8,["id","modelValue","disabled","readonly","stars","cancel"])}}}),zr=s.defineComponent({__name:"PrimeChips",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var o;t==null||t.node.input((o=n.context)==null?void 0:o._value)}return(i,o)=>{var u,g,w;const a=s.resolveComponent("Chips");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=v=>s.unref(t)._value=v),class:s.normalizeClass(s.unref(t).attrs.class),"allow-duplicate":(u=s.unref(t).attrs.allowDuplicate)!=null?u:!0,"add-on-blur":(g=s.unref(t).attrs.addOnBlur)!=null?g:!1,max:(w=s.unref(t).attrs.max)!=null?w:void 0,onAdd:r,onRemove:r},null,8,["id","modelValue","class","allow-duplicate","add-on-blur","max"])}}}),Wr=s.defineComponent({__name:"PrimeKnob",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var o;t==null||t.node.input((o=n.context)==null?void 0:o._value)}return(i,o)=>{var u,g,w,v,y,_,C,S,m,d;const a=s.resolveComponent("Knob");return s.openBlock(),s.createBlock(a,{id:s.unref(t).id,modelValue:s.unref(t)._value,"onUpdate:modelValue":o[0]||(o[0]=p=>s.unref(t)._value=p),min:(u=s.unref(t).attrs.min)!=null?u:0,max:(g=s.unref(t).attrs.max)!=null?g:100,step:(w=s.unref(t).attrs.step)!=null?w:void 0,size:(v=s.unref(t).attrs.max)!=null?v:100,"stroke-width":(y=s.unref(t).attrs.strokeWidth)!=null?y:14,"show-value":(_=s.unref(t).attrs.showValue)!=null?_:!0,"value-color":(C=s.unref(t).attrs.valueColor)!=null?C:void 0,"range-color":(S=s.unref(t).attrs.rangeColor)!=null?S:void 0,"text-color":(m=s.unref(t).attrs.textColor)!=null?m:void 0,"value-template":(d=s.unref(t).attrs.valueTemplate)!=null?d:void 0,onChange:r},null,8,["id","modelValue","min","max","step","size","stroke-width","show-value","value-color","range-color","text-color","value-template"])}}}),dt=R(kr,{props:["iconRight","iconLeft"]}),mt=R(Sr,{props:["iconRight","iconLeft"]}),yt=R(Or,{props:[]}),ht=R(Ir,{props:["feedback","toggleMask"]}),gt=R(Vr,{props:["rows"]}),_t=R(Ar,{props:[]}),bt=R(Lr,{props:[]}),wt=R(Tr,{props:[]}),vt=R(Rr,{props:[]}),kt=R(Dr,{props:[]}),$t=R(Mr,{props:[]}),Ct=R(Fr,{props:[]}),Ur=R(Br,{props:[]}),St=R(zr,{props:[]}),Ot=R(Wr,{props:[]}),Kr={primeInputText:dt,primeInputNumber:mt,primeInputMask:yt,primePassword:ht,primeCheckBox:_t,primeInputSwitch:bt,primeInputTextArea:gt,primeEditor:wt,primeDropdown:vt,primeMultiSelect:kt,primeCalendar:$t,primeSlider:Ct,primeChips:St,primeKnob:Ot};j.primeCalendarDefinition=$t,j.primeCheckBoxDefinition=_t,j.primeChipsDefinition=St,j.primeDropdownDefinition=vt,j.primeEditorDefinition=wt,j.primeInputMaskDefinition=yt,j.primeInputNumberDefinition=mt,j.primeInputSwitchDefinition=bt,j.primeInputTextAreaDefinition=gt,j.primeInputTextDefinition=dt,j.primeInputs=Kr,j.primeKnobDefinition=Ot,j.primeMultiSelectDefinition=kt,j.primePasswordDefinition=ht,j.primeRatingDefinition=Ur,j.primeSliderDefinition=Ct,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/dist/index.d.ts DELETED
@@ -1,32 +0,0 @@
1
- import type { FormKitTypeDefinition } from '@formkit/core';
2
- export declare const primeInputTextDefinition: FormKitTypeDefinition;
3
- export declare const primeInputNumberDefinition: FormKitTypeDefinition;
4
- export declare const primeInputMaskDefinition: FormKitTypeDefinition;
5
- export declare const primePasswordDefinition: FormKitTypeDefinition;
6
- export declare const primeInputTextAreaDefinition: FormKitTypeDefinition;
7
- export declare const primeCheckBoxDefinition: FormKitTypeDefinition;
8
- export declare const primeInputSwitchDefinition: FormKitTypeDefinition;
9
- export declare const primeEditorDefinition: FormKitTypeDefinition;
10
- export declare const primeDropdownDefinition: FormKitTypeDefinition;
11
- export declare const primeMultiSelectDefinition: FormKitTypeDefinition;
12
- export declare const primeCalendarDefinition: FormKitTypeDefinition;
13
- export declare const primeSliderDefinition: FormKitTypeDefinition;
14
- export declare const primeRatingDefinition: FormKitTypeDefinition;
15
- export declare const primeChipsDefinition: FormKitTypeDefinition;
16
- export declare const primeKnobDefinition: FormKitTypeDefinition;
17
- export declare const primeInputs: {
18
- primeInputText: FormKitTypeDefinition;
19
- primeInputNumber: FormKitTypeDefinition;
20
- primeInputMask: FormKitTypeDefinition;
21
- primePassword: FormKitTypeDefinition;
22
- primeCheckBox: FormKitTypeDefinition;
23
- primeInputSwitch: FormKitTypeDefinition;
24
- primeInputTextArea: FormKitTypeDefinition;
25
- primeEditor: FormKitTypeDefinition;
26
- primeDropdown: FormKitTypeDefinition;
27
- primeMultiSelect: FormKitTypeDefinition;
28
- primeCalendar: FormKitTypeDefinition;
29
- primeSlider: FormKitTypeDefinition;
30
- primeChips: FormKitTypeDefinition;
31
- primeKnob: FormKitTypeDefinition;
32
- };
@@ -1,156 +0,0 @@
1
- [
2
- {
3
- "$el": "h1",
4
- "children": [
5
- "Register New ",
6
- "$myGroup.email"
7
- ]
8
- },
9
- {
10
- "$el": "h3",
11
- "children": [
12
- "Header Text H3"
13
- ]
14
- },
15
- {
16
- "$formkit": "group",
17
- "name": "myGroup",
18
- "children": [
19
- {
20
- "$formkit": "primeInputText",
21
- "name": "email",
22
- "label": "Email",
23
- "help": "This will be used for your account.",
24
- "validation": "required|email",
25
- "class": "test"
26
- },
27
- {
28
- "$formkit": "primeInputTextArea",
29
- "name": "myText",
30
- "label": "Text",
31
- "validation": "",
32
- "rows": "5",
33
- "class": "test"
34
- }
35
- ]
36
- },
37
- {
38
- "$formkit": "primeEditor",
39
- "name": "myEditor",
40
- "label": "Editor",
41
- "validation": "",
42
- "class": "test"
43
- },
44
- {
45
- "$formkit": "primeCalendar",
46
- "name": "myCalendar",
47
- "label": "Calendar",
48
- "validation": "",
49
- "class": "test",
50
- "dateFormat": "dd.mm.yy",
51
- "showIcon": true
52
- },
53
- {
54
- "$el": "div",
55
- "attrs": {
56
- "class": "double"
57
- },
58
- "children": [
59
- {
60
- "$formkit": "primeInputText",
61
- "name": "password",
62
- "label": "Password",
63
- "help": "Enter your new password.",
64
- "validation": "required|length:5,16",
65
- "validationVisibility": "live",
66
- "class": "test"
67
- },
68
- {
69
- "$formkit": "primePassword",
70
- "name": "password_confirm",
71
- "label": "Confirm password",
72
- "toggleMask": true,
73
- "feedback": false,
74
- "help": "Enter your new password again to confirm it.",
75
- "validation": "required|confirm",
76
- "validationLabel": "password confirmation",
77
- "class": "test"
78
- }
79
- ]
80
- },
81
- {
82
- "$formkit": "primeCheckBox",
83
- "name": "eu_citizen",
84
- "id": "eu",
85
- "label": "Are you a european citizen?",
86
- "class": "test",
87
- "labelLeft": "Left Label: ",
88
- "labelRight": "Right Label"
89
- },
90
- {
91
- "$formkit": "primeInputSwitch",
92
- "name": "primeInputSwitch",
93
- "id": "primeInputSwitch",
94
- "labelLeft": "Left Label: ",
95
- "labelRight": "Right Label"
96
- },
97
- {
98
- "$formkit": "primeSlider",
99
- "name": "slider",
100
- "label": "Use Slider",
101
- "min": 5,
102
- "step": 5,
103
- "value": 10
104
- },
105
- {
106
- "$formkit": "primeDropdown",
107
- "if": "$eu_citizen",
108
- "name": "cookie_notice",
109
- "label": "Cookie notice frequency",
110
- "value": "hourly",
111
- "options":[
112
- {
113
- "label": "Every page load",
114
- "value": "refresh"
115
- },
116
- {
117
- "label": "Ever hour",
118
- "value": "hourly"
119
- },
120
- {
121
- "label": "Every day",
122
- "value": "daily"
123
- }
124
- ],
125
- "showClear": false,
126
- "filter": false,
127
- "help": "How often should we display a cookie notice?",
128
- "class": "test"
129
- },
130
- {
131
- "$formkit": "primeMultiSelect",
132
- "name": "cookie_notice2",
133
- "label": "Cookie notice frequency",
134
- "value": [
135
- "hourly"
136
- ],
137
- "options": [
138
- {
139
- "label": "Every page load",
140
- "value": "refresh"
141
- },
142
- {
143
- "label": "Ever hour",
144
- "value": "hourly"
145
- },
146
- {
147
- "label": "Every Single day",
148
- "value": "daily"
149
- }
150
- ],
151
- "showClear": true,
152
- "filter": true,
153
- "help": "How often should we display a cookie notice?",
154
- "class": "test"
155
- }
156
- ]
@@ -1,7 +0,0 @@
1
- {
2
- "src/formkit/index.ts": {
3
- "file": "formkit-primevue.umd.js",
4
- "src": "src/formkit/index.ts",
5
- "isEntry": true
6
- }
7
- }
@@ -1,55 +0,0 @@
1
- .formkit-inner {
2
- .p-inputtext {
3
- width: 300px;
4
- }
5
-
6
- .p-slider {
7
- width: 300px;
8
- margin-top: 10px;
9
-
10
- }
11
-
12
- .p-calendar {
13
- .p-inputtext {
14
- width: 150px;
15
- }
16
- }
17
-
18
- .p-dropdown {
19
- .p-inputtext {
20
- width: 250px;
21
- }
22
- }
23
-
24
- .p-multiselect {
25
- .p-multiselect-label {
26
- width: 250px;
27
- }
28
- }
29
-
30
- .p-editor-container {
31
- width: 300px;
32
- height: 250px;
33
- margin-bottom: 90px;
34
- }
35
- }
36
-
37
- .formkit-outer[data-type="primeInputSwitch"], .formkit-outer[data-type="primeCheckBox"] {
38
- .formkit-inner {
39
- width: 300px;
40
-
41
- .formkit-prime-right {
42
- margin-left: 10px;
43
- font-weight: bold;
44
- font-size: 0.75rem;
45
- }
46
-
47
- .formkit-prime-left {
48
- margin-right: 10px;
49
- font-weight: bold;
50
- font-size: 0.75rem;
51
- }
52
- }
53
- }
54
-
55
-
@@ -1,87 +0,0 @@
1
- .formkit-form > .formkit-messages {
2
- margin: 4px;
3
- .formkit-message {
4
- font-size: 0.8rem;
5
- }
6
- }
7
-
8
- .formkit-outer {
9
- margin: 4px;
10
- padding-bottom: 10px;
11
- width: 400px;
12
- }
13
-
14
- .formkit-wrapper,
15
- .formkit-fieldset {
16
- max-width: 0;
17
-
18
- }
19
-
20
- .formkit-label {
21
- display: block;
22
- margin: 0;
23
- padding-bottom: 4px;
24
- width: 300px;
25
- font-weight: bold;
26
- font-size: 0.75rem;
27
- }
28
-
29
- .formkit-fieldset {
30
- margin: 0;
31
- padding: 0;
32
- border-radius: 0;
33
- border: 0;
34
-
35
- &:focus-within {
36
- border: 0;
37
- }
38
-
39
- & > .formkit-help {
40
- margin-top: 0;
41
- margin-bottom: 0;
42
- }
43
- }
44
-
45
- .formkit-legend {
46
- display: block;
47
- margin: 0;
48
- padding: 0;
49
- }
50
-
51
- .formkit-inner {
52
- position: relative;
53
- border-radius: 0;
54
- display: flex;
55
- align-items: center;
56
-
57
- width: fit-content;
58
-
59
- &:focus-within {
60
-
61
- }
62
-
63
- }
64
-
65
- .formkit-help {
66
- margin: 0;
67
- font-size: 0.80rem;
68
- color: var(--text-color-secondary);
69
- }
70
-
71
- .formkit-messages {
72
- padding: 0;
73
- margin: 0;
74
- }
75
-
76
- .formkit-help + .formkit-messages {
77
- padding-top: 0;
78
- }
79
-
80
- .formkit-message {
81
- padding: 0;
82
- margin: 0;
83
- color: #ef9a9a;
84
- list-style: none;
85
- font-size: 0.75rem;
86
-
87
- }