@sfxcode/formkit-primevue 0.5.2 → 0.5.3

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.
@@ -0,0 +1,12 @@
1
+ (function(A,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(A=typeof globalThis!="undefined"?globalThis:A||self,o(A["formkit-primevue"]={},A.Vue))})(this,function(A,o){"use strict";var Dr=Object.defineProperty,Fr=Object.defineProperties;var Br=Object.getOwnPropertyDescriptors;var ce=Object.getOwnPropertySymbols;var Ct=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable;var kt=(A,o,M)=>o in A?Dr(A,o,{enumerable:!0,configurable:!0,writable:!0,value:M}):A[o]=M,R=(A,o)=>{for(var M in o||(o={}))Ct.call(o,M)&&kt(A,M,o[M]);if(ce)for(var M of ce(o))St.call(o,M)&&kt(A,M,o[M]);return A},pe=(A,o)=>Fr(A,Br(o));var Pe=(A,o)=>{var M={};for(var z in A)Ct.call(A,z)&&o.indexOf(z)<0&&(M[z]=A[z]);if(A!=null&&ce)for(var z of ce(A))o.indexOf(z)<0&&St.call(A,z)&&(M[z]=A[z]);return M};function M(){return Math.random().toString(36).substring(2,15)}function z(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 de(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&&!de(e[i],n[i],t,r))return!1;return!0}return!1}function me(e){return Object.prototype.toString.call(e)==="[object Object]"}function ye(e){return me(e)||Array.isArray(e)}function ee(e){if(me(e)===!1||e.__FKNode__||e.__POJO__===!1)return!1;const n=e.constructor;if(n===void 0)return!0;const t=n.prototype;return!(me(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)}function te(e,n,t=!1,r=!1){if(n===null)return null;const i={};if(typeof n=="string")return n;for(const s in e)if(L(n,s)&&(n[s]!==void 0||!r)){if(t&&Array.isArray(e[s])&&Array.isArray(n[s])){i[s]=e[s].concat(n[s]);continue}if(n[s]===void 0)continue;ee(e[s])&&ee(n[s])?i[s]=te(e[s],n[s],t,r):i[s]=n[s]}else i[s]=e[s];for(const s in n)!L(i,s)&&n[s]!==void 0&&(i[s]=n[s]);return i}function Ot(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 Vt(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 H(...e){return e.reduce((n,t)=>{const w=t,{value:r,name:i,modelValue:s,config:f,plugins:p}=w,g=Pe(w,["value","name","modelValue","config","plugins"]);return Object.assign(n,g)},{})}function At(e){const n=[];let t="",r=0,i="",s="";for(let f=0;f<e.length;f++){const p=e.charAt(f);p===i&&s!=="\\"?i="":(p==="'"||p==='"')&&!i&&s!=="\\"?i=p:p==="("&&!i?r++:p===")"&&!i&&r--,p===","&&!i&&r===0?(n.push(t),t=""):(p!==" "||i)&&(t+=p),s=p}return t&&n.push(t),n}function je(e,n){const t={},r=n.filter(s=>s instanceof RegExp),i=new Set(n);for(const s in e)!i.has(s)&&!r.some(f=>f.test(s))&&(t[s]=e[s]);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(s=>s.test(i))&&(t[i]=e[i])}),t}function ne(e){return e.replace(/-([a-z0-9])/gi,(n,t)=>t.toUpperCase())}function Le(e){return e.replace(/([a-z0-9])([A-Z])/g,(n,t,r)=>t+"-"+r.toLowerCase()).replace(" ","-").toLowerCase()}function Z(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"?Z(r,n):r):t=Object.keys(e).reduce((r,i)=>(r[i]=typeof e[i]=="object"?Z(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 J(e){return typeof e=="object"?Z(e):e}function It(e,n){if(!e||typeof e!="object")return null;const t=n.split(".");let r=e;for(const i in t){const s=t[i];if(L(r,s)&&(r=r[s]),+i===t.length-1)return r;if(!r||typeof r!="object")return null}return null}function Me(e){return e!==void 0&&e!=="false"&&e!==!1?!0:void 0}function Q(e){return Object.isFrozen(e)?e:Object.defineProperty(e,"__init",{enumerable:!1,value:!0})}function Re(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]/g," ").trim().replace(/\s+/g,"-")}function he(){const e=[];let n=0;const t=i=>e.push(i),r=i=>{const s=e[n];return typeof s=="function"?s(i,f=>(n++,r(f===void 0?i:f))):(n=0,i)};return t.dispatch=r,t.unshift=i=>e.unshift(i),t.remove=i=>{const s=e.indexOf(i);s>-1&&e.splice(s,1)},t}function De(){const e=new Map,n=new Map;let t;const r=(i,s)=>{if(t){t.set(s.name,[i,s]);return}e.has(s.name)&&e.get(s.name).forEach(f=>{(s.origin===i||f.modifiers.includes("deep"))&&f.listener(s)}),s.bubble&&i.bubble(s)};return r.on=(i,s)=>{const[f,...p]=i.split("."),g=s.receipt||M(),w={modifiers:p,event:f,listener:s,receipt:g};return e.has(f)?e.get(f).push(w):e.set(f,[w]),n.has(g)?n.get(g).push(f):n.set(g,[f]),g},r.off=i=>{var s;n.has(i)&&((s=n.get(i))===null||s===void 0||s.forEach(f=>{const p=e.get(f);Array.isArray(p)&&e.set(f,p.filter(g=>g.receipt!==i))}),n.delete(i))},r.pause=i=>{t||(t=new Map),i&&i.walk(s=>s._e.pause())},r.play=i=>{if(!t)return;const s=t;t=void 0,s.forEach(([f,p])=>r(f,p)),i&&i.walk(f=>f._e.play())},r}function Et(e,n,t,r,i=!0){return n._e(e,{payload:r,name:t,bubble:i,origin:e}),e}function Pt(e,n,t){return oe(e.parent)&&e.parent._e(e.parent,t),e}function jt(e,n,t,r){return n._e.on(t,r)}function Tt(e,n,t){return n._e.off(t),e}const ge=he();ge((e,n)=>(e.message||(e.message=String(`E${e.code}`)),n(e)));const _e=he();_e((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 re(e,n={}){_e.dispatch({code:e,data:n})}function B(e,n={}){throw Error(ge.dispatch({code:e,data:n}).message)}function ie(e,n){const t=R({blocking:!1,key:M(),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 Fe={apply:Bt,set:Mt,remove:Be,filter:Dt,reduce:Ft,release:zt,touch:Rt};function Lt(e=!1){const n={};let t,r=e,i=[];const s=new Map;let f;const p=new Proxy(n,{get(...g){const[w,v]=g;return v==="buffer"?r:v==="_b"?i:v==="_m"?s:v==="_r"?f:L(Fe,v)?Fe[v].bind(null,n,p,t):Reflect.get(...g)},set(g,w,v){return w==="_n"?(t=v,f==="__n"&&Ne(t,p),!0):w==="_b"?(i=v,!0):w==="buffer"?(r=v,!0):w==="_r"?(f=v,!0):(B(101,t),!1)}});return p}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 s=r.value;r.value=t.t(r),r.value!==s&&(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 Rt(e,n){for(const t in e){const r=R({},e[t]);n.set(r)}}function Be(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(s=>s.key!==r),i[1]||i[0].length))),n}function Dt(e,n,t,r,i){for(const s in e){const f=e[s];(!i||f.type===i)&&!r(f)&&Be(e,n,t,s)}}function Ft(e,n,t,r,i){for(const s in e){const f=e[s];i=r(i,f)}return i}function Bt(e,n,t,r,i){if(Array.isArray(r)){if(n.buffer){n._b.push([r,i]);return}const s=new Set(r.map(f=>(n.set(f),f.key)));typeof i=="string"?n.filter(f=>f.type!==i||s.has(f.key)):typeof i=="function"&&n.filter(f=>!i(f)||s.has(f.key))}else for(const s in r){const f=t.at(s);f?f.store.apply(r[s],i):xt(t,n,s,r[s],i)}}function Nt(e,...n){const t=`${e.name}-set`,r=i=>ie({key:Re(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(s=>r(s));{const s={};for(const f in i)Array.isArray(i[f])?s[f]=i[f].map(p=>r(p)):s[f]=[r(i[f])];return s}})}function xt(e,n,t,r,i){var s;const f=n._m;f.has(t)||f.set(t,[]),n._r||(n._r=Ne(e,n)),(s=f.get(t))===null||s===void 0||s.push([r,i])}function Ne(e,n){return e.on("child.deep",({payload:t})=>{n._m.forEach((r,i)=>{e.at(i)===t&&(r.forEach(([s,f])=>{t.store.apply(s,f)}),n._m.delete(i))}),n._m.size===0&&n._r&&(e.off(n._r),n._r=void 0)})}function zt(e,n){n.buffer=!1,n._b.forEach(([t,r])=>n.apply(t,r)),n._b=[]}function Wt(){const e={};let n;return{count:(...t)=>qt(n,e,...t),init(t){n=t,t.on("message-added.deep",ze(e,1)),t.on("message-removed.deep",ze(e,-1))},merge:t=>We(n,e,t),settled(t){return L(e,t)?e[t].promise:Promise.resolve()},unmerge:t=>We(n,e,t,!0),value(t){return L(e,t)?e[t].count:0}}}function qt(e,n,t,r,i=0){if(r=Ut(r||t),!L(n,t)){const s={condition:r,count:0,name:t,node:e,promise:Promise.resolve(),resolve:()=>{}};n[t]=s,i=e.store.reduce((f,p)=>f+s.condition(p)*1,i),e.each(f=>{f.ledger.count(s.name,s.condition),i+=f.ledger.value(s.name)})}return xe(n[t],i).promise}function Ut(e){return typeof e=="function"?e:n=>n.type===e}function xe(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 ze(e,n){return t=>{for(const r in e){const i=e[r];i.condition(t.payload)&&xe(i,n)}}}function We(e,n,t,r=!1){for(const i in n){const s=n[i].condition;r||t.ledger.count(i,s);const f=t.ledger.value(i)*(r?-1:1);if(!!e)do e.ledger.count(i,s,f),e=e.parent;while(e)}}const be=new Map,se=new Map,we=De(),Kt=[];function Ht(e){e.props.id&&(be.set(e.props.id,e),se.set(e,e.props.id),we(e,{payload:e,name:e.props.id,bubble:!1,origin:e}))}function Jt(e){if(se.has(e)){const n=se.get(e);se.delete(e),be.delete(n),we(e,{payload:null,name:n,bubble:!1,origin:e})}}function qe(e){return be.get(e)}function Zt(e,n){Kt.push(we.on(e,n))}function Ue(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 Qt(e){const n=document.getElementById(e);if(n instanceof HTMLFormElement){const t=new Event("submit",{cancelable:!0,bubbles:!0});n.dispatchEvent(t);return}re(151,e)}function Yt(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(pe(R({},i),{value:!1}))}};n(e),e.walk(n)}function Gt(e,n){const t=typeof e=="string"?qe(e):e;if(t){const r=s=>J(s.props.initial)||(s.type==="group"?{}:s.type==="list"?[]:void 0);t._e.pause(t),t.input(J(n)||r(t),!1),t.walk(s=>s.input(r(s),!1));const i=r(t);return t.input(typeof i=="object"?J(n)||Q(i):i,!1),t._e.play(t),Yt(t),t.emit("reset",t),t}re(152,e)}const Xt={delimiter:".",delay:0,locale:"en",rootClasses:e=>({[`formkit-${Le(e)}`]:!0})},Ke=Symbol("index"),ve=Symbol("removed"),$e=Symbol("moved"),He=Symbol("inserted");function en(e){return e.type==="list"&&Array.isArray(e._value)}function oe(e){return e&&typeof e=="object"&&e.__FKNode__===!0}const ae=(e,n,t)=>{B(102,[e,t])},tn={_c:I(kn,ae,!1),add:I(yn),addProps:I(mn),address:I(Sn,ae,!1),at:I(On),bubble:I(Pt),clearErrors:I(Ln),calm:I(cn),config:I(!1),define:I(dn),disturb:I(un),destroy:I(pn),hydrate:I(fn),index:I($n,vn,!1),input:I(Ze),each:I(_n),emit:I(Et),find:I(An),on:I(jt),off:I(Tt),parent:I(!1,hn),plugins:I(!1),remove:I(gn),root:I(En,ae,!1),reset:I(Tn),resetConfig:I(wn),setErrors:I(Ge),submit:I(jn),t:I(Pn),use:I(ke),name:I(Cn,!1,!1),walk:I(bn)};function nn(){return new Map(Object.entries(tn))}function I(e,n,t=!0){return{get:e?(r,i)=>t?(...s)=>e(r,i,...s):e(r,i):!1,set:n!==void 0?n:ae.bind(null)}}function rn(){const e=new Map;return new Proxy(e,{get(n,t){return e.has(t)||e.set(t,he()),e.get(t)}})}let sn=0,on=0;function an(e){var n,t;return((n=e.parent)===null||n===void 0?void 0:n.type)==="list"?Ke:e.name||`${((t=e.props)===null||t===void 0?void 0:t.type)||"input"}_${++sn}`}function Je(e){return e.type==="group"?Q(e.value&&typeof e.value=="object"&&!Array.isArray(e.value)?e.value:{}):e.type==="list"?Q(Array.isArray(e.value)?e.value:[]):e.value===null?"":e.value}function Ze(e,n,t,r=!0){return n._value=ln(e,e.hook.input.dispatch(t)),e.emit("input",n._value),n.isSettled&&e.disturb(),r?(n._tmo&&clearTimeout(n._tmo),n._tmo=setTimeout(le,e.props.delay,e,n)):le(e,n),n.settled}function ln(e,n){switch(e.type){case"input":break;case"group":(!n||typeof n!="object")&&B(107,[e,n]);break;case"list":Array.isArray(n)||B(108,[e,n]);break}return n}function le(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 Qe(e,{name:n,value:t,from:r}){if(!Object.isFrozen(e._value)){if(en(e)){const i=t===ve?[]:t===$e&&typeof r=="number"?e._value.splice(r,1):[t];e._value.splice(n,t===$e||r===He?0:1,...i);return}t!==ve?e._value[n]=t:delete e._value[n]}}function fn(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"?Q(t[r.name]):t[r.name];r.input(i,!1)}else(e.type!=="list"||typeof r.name=="number")&&Qe(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 un(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 cn(e,n,t){var r;if(t!==void 0&&e.type!=="input")return Qe(n,t),le(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 pn(e,n){e.emit("destroying",e),e.store.filter(()=>!1),e.parent&&e.parent.remove(e),Jt(e),n._value=n.value=void 0,e.emit("destroyed",e)}function dn(e,n,t){n.type=t.type,n.props.definition=Z(t),n.value=n._value=Je({type:e.type,value:n.value}),t.features&&t.features.forEach(r=>r(e)),t.props&&e.addProps(t.props),e.emit("defined",t)}function mn(e,n,t){var r;if(e.props.attrs){const i=R({},e.props.attrs);e.props._emit=!1;for(const f in i){const p=ne(f);t.includes(p)&&(e.props[p]=i[f],delete i[f])}const s=J(n._value);e.props.initial=e.type!=="input"?Q(s):s,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 yn(e,n,t,r){if(e.type==="input"&&B(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:He})):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 le(e,n,!1),e.ledger.merge(t),e.emit("child",t),e}function hn(e,n,t,r){return oe(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 gn(e,n,t){const r=n.children.indexOf(t);if(r!==-1){t.isSettled&&e.disturb(),n.children.splice(r,1);let i=Me(t.props.preserve),s=t.parent;for(;i===void 0&&s;)i=Me(s.props.preserve),s=s.parent;i?e.calm():e.calm({name:e.type==="list"?r:t.name,value:ve}),t.parent=null,t.config._rmn=t}return e.ledger.unmerge(t),e}function _n(e,n,t){n.children.forEach(r=>t(r))}function bn(e,n,t,r=!1){n.children.forEach(i=>{(t(i)!==!1||!r)&&i.walk(t)})}function wn(e,n){const t=e.parent||void 0;n.config=Ye(e.config._t,t),e.walk(r=>r.resetConfig())}function ke(e,n,t,r=!0,i=!0){return Array.isArray(t)||t instanceof Set?(t.forEach(s=>ke(e,n,s)),e):(n.plugins.has(t)||(i&&typeof t.library=="function"&&t.library(e),r&&t(e)!==!1&&(n.plugins.add(t),e.children.forEach(s=>s.use(t)))),e)}function vn(e,n,t,r){if(oe(e.parent)){const i=e.parent.children,s=r>=i.length?i.length-1:r<0?0:r,f=i.indexOf(e);return f===-1?!1:(i.splice(f,1),i.splice(s,0,e),e.parent.children=i,e.parent.type==="list"&&e.parent.disturb().calm({name:s,value:$e,from:f}),!0)}return!1}function $n(e){if(e.parent){const n=[...e.parent.children].indexOf(e);return n===-1?e.parent.children.length:n}return-1}function kn(e,n){return n}function Cn(e,n){var t;return((t=e.parent)===null||t===void 0?void 0:t.type)==="list"?e.index:n.name!==Ke?n.name:e.index}function Sn(e,n){return n.parent?n.parent.address.concat([e.name]):[e.name]}function On(e,n,t){const r=typeof t=="string"?t.split(e.config.delimiter):t;if(!r.length)return;const i=r[0];let s=e.parent;for(s||(String(r[0])===String(e.name)&&r.shift(),s=e),i==="$parent"&&r.shift();s&&r.length;){const f=r.shift();switch(f){case"$root":s=e.root;break;case"$parent":s=s.parent;break;case"$self":s=e;break;default:s=s.children.find(p=>String(p.name)===String(f))||Vn(s,f)}}return s||void 0}function Vn(e,n){const t=String(n).match(/^(find)\((.*)\)$/);if(t){const[,r,i]=t,s=i.split(",").map(f=>f.trim());switch(r){case"find":return e.find(s[0],s[1]);default:return}}}function An(e,n,t,r){return In(e,t,r)}function In(e,n,t="name"){const r=typeof t=="string"?s=>s[t]==n:t,i=[e];for(;i.length;){const s=i.shift();if(r(s,n))return s;i.push(...s.children)}}function En(e){let n=e;for(;n.parent;)n=n.parent;return n}function Ye(e={},n){let t;return new Proxy(e,{get(...r){const i=r[1];if(i==="_t")return e;const s=Reflect.get(...r);if(s!==void 0)return s;if(n){const f=n.config[i];if(f!==void 0)return f}if(e.rootConfig&&typeof i=="string"){const f=e.rootConfig[i];if(f!==void 0)return f}return i==="delay"&&(t==null?void 0:t.type)==="input"?20:Xt[i]},set(...r){const i=r[1],s=r[2];if(i==="_n")return t=s,e.rootConfig&&e.rootConfig._add(t),!0;if(i==="_rmn")return e.rootConfig&&e.rootConfig._rm(t),t=void 0,!0;if(!de(e[i],s,!1)){const f=Reflect.set(...r);return t&&(t.emit(`config:${i}`,s,!1),Ue(t,i,s),t.walk(p=>Ue(p,i,s),!0)),f}return!0}})}function Pn(e,n,t,r="ui"){const i=typeof t=="string"?{key:t,value:t,type:r}:t,s=e.hook.text.dispatch(i);return e.emit("text",s,!1),s.value}function jn(e){const n=e.name;do{if(e.props.isForm===!0)break;e.parent||B(106,n),e=e.parent}while(e);e.props.id&&Qt(e.props.id)}function Tn(e,n,t){return Gt(e,t)}function Ge(e,n,t,r){const i=`${e.name}-set`;return Nt(e,t,r).forEach(s=>{e.store.apply(s,f=>f.meta.source===i)}),e}function Ln(e,n,t=!0){if(Ge(e,n,[]),t){const r=`${e.name}-set`;e.walk(i=>{i.store.filter(s=>!(s.type==="error"&&s.meta&&s.meta.source===r))})}return e}function Mn(e){return L(e.props,"id")||(e.props.id=`input_${on++}`),e}function Rn(e){const n={initial:typeof e=="object"?J(e):e};let t,r=!0;return new Proxy(n,{get(...i){const[s,f]=i;if(L(n,f))return Reflect.get(...i);if(t&&typeof f=="string"&&t.config[f]!==void 0)return t.config[f]},set(i,s,f,p){if(s==="_n")return t=f,!0;if(s==="_emit")return r=f,!0;const{prop:g,value:w}=t.hook.prop.dispatch({prop:s,value:f});if(!de(n[g],w,!1)||typeof w=="object"){const v=Reflect.set(i,g,w,p);return r&&(t.emit("prop",{prop:g,value:w}),typeof g=="string"&&t.emit(`prop:${g}`,w)),v}return!0}})}function Dn(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 Fn(e){const n=Je(e),t=Ye(e.config||{},e.parent);return{_d:0,_e:De(),_resolve:!1,_tmo:!1,_value:n,children:z(e.children||[]),config:t,hook:rn(),isCreated:!1,isSettled:!0,ledger:Wt(),name:an(e),parent:e.parent||null,plugins:new Set,props:Rn(n),settled:Promise.resolve(n),store:Lt(!0),traps:nn(),type:e.type||"input",value:n}}function Bn(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,Dn(e,new Set([...n.plugins||[],...e.parent?e.parent.plugins:[]])),n.plugins)for(const r of n.plugins)ke(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&&B(100,e),Ze(e,e._c,e._value,!1),e.store.release(),!((t=n.props)===null||t===void 0)&&t.id&&Ht(e),e.emit("created",e),e.isCreated=!0,e}function Nn(e){const n=e||{},t=Fn(n),r=new Proxy(t,{get(...i){const[,s]=i;if(s==="__FKNode__")return!0;const f=t.traps.get(s);return f&&f.get?f.get(r,t):Reflect.get(...i)},set(...i){const[,s,f]=i,p=t.traps.get(s);return p&&p.set?p.set(r,t,s,f):Reflect.set(...i)}});return Bn(r,n)}function xn(e){return typeof e!="string"&&L(e,"$el")}function Xe(e){return typeof e!="string"&&L(e,"$cmp")}function Y(e){return!e||typeof e=="string"?!1:L(e,"if")&&L(e,"then")}function zn(e){return typeof e!="string"&&"$formkit"in e}function Wn(e){if(typeof e=="string")return{$el:"text",children:e};if(zn(e)){const n=e,{$formkit:t,for:r,if:i,children:s,key:f,bind:p}=n,g=Pe(n,["$formkit","for","if","children","key","bind"]);return Object.assign({$cmp:"FormKit",props:pe(R({},g),{type:t})},i?{if:i}:{},r?{for:r}:{},s?{children:s}:{},f?{key:f}:{},p?{bind:p}:{})}return e}function W(e){let n;const t=new Set,r=function(d,c){return typeof d=="function"?d(c):d},i=[{"&&":(m,d,c)=>r(m,c)&&r(d,c),"||":(m,d,c)=>r(m,c)||r(d,c)},{"===":(m,d,c)=>r(m,c)===r(d,c),"!==":(m,d,c)=>r(m,c)!==r(d,c),"==":(m,d,c)=>r(m,c)==r(d,c),"!=":(m,d,c)=>r(m,c)!=r(d,c),">=":(m,d,c)=>r(m,c)>=r(d,c),"<=":(m,d,c)=>r(m,c)<=r(d,c),">":(m,d,c)=>r(m,c)>r(d,c),"<":(m,d,c)=>r(m,c)<r(d,c)},{"+":(m,d,c)=>r(m,c)+r(d,c),"-":(m,d,c)=>r(m,c)-r(d,c)},{"*":(m,d,c)=>r(m,c)*r(d,c),"/":(m,d,c)=>r(m,c)/r(d,c),"%":(m,d,c)=>r(m,c)%r(d,c)}],s=i.reduce((m,d)=>m.concat(Object.keys(d)),[]),f=new Set(s.map(m=>m.charAt(0)));function p(m,d,c,$){const S=m.filter(l=>l.startsWith(d));return S.length?S.find(l=>$.length>=c+l.length&&$.substring(c,c+l.length)===l?l:!1):!1}function g(m,d,c=1){let $=c?d.substring(m+1).trim():d.substring(0,m).trim();if(!$.length)return-1;if(!c){const l=$.split("").reverse(),a=l.findIndex(u=>f.has(u));$=l.slice(a).join("")}const S=$[0];return i.findIndex(l=>{const a=Object.keys(l);return!!p(a,S,0,$)})}function w(m,d){let c="";const $=d.length;let S=0;for(let l=m;l<$;l++){const a=d.charAt(l);if(a==="(")S++;else if(a===")")S--;else if(S===0&&a===" ")continue;if(S===0&&p(s,a,l,d))return[c,l-1];c+=a}return[c,d.length-1]}function v(m,d=0){const c=i[d],$=m.length,S=Object.keys(c);let l=0,a=!1,u=null,y="",k=null,b,E="",O="",j="",T="",x=0;const F=(P,U)=>{P?j+=U:y+=U};for(let P=0;P<$;P++)if(E=O,O=m.charAt(P),(O==="'"||O==='"')&&E!=="\\"&&(l===0&&!a||l&&!T)){l?T=O:a=O,F(l,O);continue}else if(a&&(O!==a||E==="\\")||T&&(O!==T||E==="\\")){F(l,O);continue}else if(a===O){a=!1,F(l,O);continue}else if(T===O){T=!1,F(l,O);continue}else{if(O===" ")continue;if(O==="(")l===0?x=P:j+=O,l++;else if(O===")")if(l--,l===0){const U=typeof y=="string"&&y.startsWith("$")?y:void 0,$t=U&&m.charAt(P+1)===".";let G="";$t&&([G,P]=w(P+2,m));const ue=u?d:g(x,m,0),X=g(P,m);ue===-1&&X===-1?y=h(j,-1,U,G):u&&(ue>=X||X===-1)&&d===ue?(k=u.bind(null,h(j,-1,U,G)),u=null,y=""):X>ue&&d===X?y=h(j,-1,U,G):y+=`(${j})${$t?`.${G}`:""}`,j=""}else j+=O;else if(l===0&&(b=p(S,O,P,m))){P===0&&B(103,[b,m]),P+=b.length-1,P===m.length-1&&B(104,[b,m]),u?y&&(k=u.bind(null,h(y,d)),u=c[b].bind(null,k),y=""):k?(u=c[b].bind(null,h(k,d)),k=null):(u=c[b].bind(null,h(y,d)),y="");continue}else F(l,O)}return y&&u&&(u=u.bind(null,h(y,d))),u=!u&&k?k:u,!u&&y&&(u=(P,U)=>typeof P=="function"?P(U):P,u=u.bind(null,h(y,d))),!u&&!y&&B(105,m),u}function h(m,d,c,$){if(c){const S=h(c,i.length);let l,a=$?W(`$${$}`):!1;if(typeof S=="function"){const u=At(String(m)).map(y=>h(y,-1));return y=>{const k=S(y);return typeof k!="function"?(re(150,c),k):(l=k(...u.map(b=>typeof b=="function"?b(y):b)),a&&(a=a.provide(b=>{const E=n(b);return b.reduce((j,T)=>{if(T===$||($==null?void 0:$.startsWith(`${T}(`))){const F=It(l,T);j[T]=()=>F}else j[T]=E[T];return j},{})})),a?a():l)}}}else if(typeof m=="string"){if(m==="true")return!0;if(m==="false")return!1;if(m==="undefined")return;if(Ot(m))return Vt(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 S=m.substring(1);return t.add(S),function(a){return S in a?a[S]():void 0}}return m}return m}const _=v(e.startsWith("$:")?e.substring(2):e),C=Array.from(t);function V(m){return n=m,Object.assign(_.bind(null,m(C)),{provide:V})}return Object.assign(_,{provide:V})}const qn=q("outer",()=>({$el:"div",attrs:{class:"$classes.outer","data-type":"$type","data-multiple":"$attrs.multiple","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"}})),Un=q("wrapper",()=>({$el:"div",attrs:{class:"$classes.wrapper"}})),Kn=q("inner",()=>({$el:"div",attrs:{class:"$classes.inner"}})),Hn=(e={},n=[],t="help",r="$help")=>({if:`$slots.${t}`,then:`$slots.${t}`,else:te({$el:"div",attrs:{id:`$: "help-" + ${t=="optionHelp"?"$option.attrs.id":"$id"}`,class:`$classes.${t}`},if:r,children:n},e)}),Jn=q("messages",()=>({$el:"ul",if:"$fns.length($messages)",attrs:{class:"$classes.messages","aria-live":'$type === "form" && "assertive" || "polite"'}})),Zn=q("message",()=>({$el:"li",for:["message","$messages"],attrs:{key:"$message.key",class:"$classes.message",id:"$id + '-' + $message.key","data-message-type":"$message.type"}})),Qn=q("prefix",()=>({$el:null})),Yn=q("suffix",()=>({$el:null}));function Ce(e){return typeof e=="object"&&("$el"in e||"$cmp"in e||"$formkit"in e)}function Gn(e,n={}){return typeof e=="string"?Ce(n)||typeof n=="string"?n:e:Array.isArray(e)?Ce(n)?n:e:te(e,n)}function q(e,n){return(t={},r=void 0)=>{const i=typeof n=="function"?n(r):typeof n=="object"?Z(n):n;Ce(i)&&!("children"in i)&&r&&(Array.isArray(r)?r.length&&(i.children=r):i.children=[r]);const f=Gn(i,t);return{if:`$slots.${e}`,then:`$slots.${e}`,else:Array.isArray(f)?f:[f]}}}function Xn(e){return(n={})=>{const t=q("input",e)(n.input);return[qn(n.outer,[Un(n.wrapper,[er(n.label,"$label"),Kn(n.inner,[Qn(n.prefix),...Array.isArray(t)?t:[t],Yn(n.suffix)])]),Hn(n.help,"$help"),Jn(n.messages,[Zn(n.message,"$message.value")])])]}}const er=q("label",()=>({$el:"label",if:"$label",attrs:{for:"$id",class:"$classes.label"}}));ie({type:"state",blocking:!0,visible:!1,value:!0,key:"validating"});let Se=!1;const et={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}).`},tt={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.`};Se||ge((e,n)=>{if(e.code in et){const t=et[e.code];e.message=typeof t=="function"?t(e):t}return n(e)}),Se||_e((e,n)=>{if(e.code in tt){const t=tt[e.code];e.message=typeof t=="function"?t(e):t}return n(e)}),Se=!0;const Oe={};let D;const K=new Map,tr="__raw__",nr=/[a-zA-Z0-9\-][cC]lass$/;function rr(e,n){const t=o.ref(null);if(e==="get"){const i={};return t.value=ir.bind(null,i),t}const r=e.split(".");return o.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,s,f)=>{if(typeof r!="object")return t=void 0,f.splice(1);const p=r[i];return s===n.length-1&&p!==void 0&&(t=p),r[i]},e),t}function ir(e,n){if(typeof n!="string")return re(650);if(n in e||(e[n]=o.ref(void 0)),e[n].value===void 0){e[n].value=null;const t=qe(n);t&&(e[n].value=t.context),Zt(n,({payload:r})=>{e[n].value=oe(r)?r.context:r})}return e[n].value}function nt(e,n){function t(h,_){const C=v(W(_.if),{if:!0}),V=g(h,_.then),m=_.else?g(h,_.else):null;return[C,V,m]}function r(h,_){var C,V;const m=v(W(h.if));let d=()=>_,c=()=>_;return typeof h.then=="object"?c=i(h.then,void 0):typeof h.then=="string"&&((C=h.then)===null||C===void 0?void 0:C.startsWith("$"))?c=v(W(h.then)):c=()=>h.then,L(h,"else")&&(typeof h.else=="object"?d=i(h.else):typeof h.else=="string"&&((V=h.else)===null||V===void 0?void 0:V.startsWith("$"))?d=v(W(h.else)):d=()=>h.else),()=>m()?c():d()}function i(h,_,C={}){const V=new Set(Object.keys(h||{})),m=_?v(W(_)):()=>({}),d=[c=>{const $=m();for(const S in $)V.has(S)||(c[S]=$[S])}];if(h){if(Y(h))return r(h,C);for(let c in h){const $=h[c];let S;const l=typeof $=="string";c.startsWith(tr)?(c=c.substring(7),S=()=>$):l&&$.startsWith("$")&&$.length>1&&!($.startsWith("$reset")&&nr.test(c))?S=v(W($)):typeof $=="object"&&Y($)?S=r($,void 0):typeof $=="object"&&ee($)?S=i($):S=()=>$,d.push(a=>{a[c]=S()})}}return()=>{const c={};return d.forEach($=>$(c)),c}}function s(h,_){let C=null,V=()=>null,m=!1,d=null,c=null,$=null,S=!1;const l=Wn(_);if(xn(l)?(C=l.$el,V=l.$el!=="text"?i(l.attrs,l.bind):()=>null):Xe(l)?(typeof l.$cmp=="string"?L(h,l.$cmp)?C=h[l.$cmp]:(C=l.$cmp,S=!0):C=l.$cmp,V=i(l.props,l.bind)):Y(l)&&([m,d,c]=t(h,l)),!Y(l)&&"if"in l?m=v(W(l.if)):!Y(l)&&C===null&&(m=()=>!0),"children"in l&&l.children)if(typeof l.children=="string")if(l.children.startsWith("$slots."))C=C==="text"?"slot":C,d=v(W(l.children));else if(l.children.startsWith("$")&&l.children.length>1){const a=v(W(l.children));d=()=>String(a())}else d=()=>String(l.children);else if(Array.isArray(l.children))d=g(h,l.children);else{const[a,u,y]=t(h,l.children);d=k=>a&&a()?u&&u(k):y&&y(k)}if(Xe(l))if(d){const a=d;d=u=>({default(y,k){var b,E,O,j;const T=D;k&&(D=k),y&&((b=K.get(D))===null||b===void 0||b.unshift(y)),u&&((E=K.get(D))===null||E===void 0||E.unshift(u));const x=a(u);return y&&((O=K.get(D))===null||O===void 0||O.shift()),u&&((j=K.get(D))===null||j===void 0||j.shift()),D=T,x}}),d.slot=!0}else d=()=>({});if("for"in l&&l.for){const a=l.for.length===3?l.for[2]:l.for[1];$=[typeof a=="string"&&a.startsWith("$")?v(W(a)):()=>a,l.for[0],l.for.length===3?String(l.for[1]):null]}return[m,C,V,d,c,$,S]}function f(h,_){const C=h(_),V=D;return Object.keys(C).reduce((m,d)=>{const c=C&&C[d];return m[d]=$=>c&&c($,V)||null,m},{})}function p(h,_){const[C,V,m,d,c,$,S]=s(h,_);let l=a=>{if(C&&V===null&&d)return C()?d(a):c&&c(a);if(V&&(!C||C())){if(V==="text"&&d)return o.createTextVNode(String(d()));if(V==="slot"&&d)return d(a);const u=S?o.resolveComponent(V):V,y=d!=null&&d.slot?f(d,a):null;return o.h(u,m(),y||(d?d(a):[]))}return typeof c=="function"?c(a):c};if($){const a=l,[u,y,k]=$;l=()=>{const b=u(),E=isNaN(b)?b:Array(Number(b)).fill(0).map((T,x)=>x),O=[];if(typeof E!="object")return null;const j=K.get(D)||[];for(const T in E){const x=Object.defineProperty(R(pe(R({},j.reduce((F,P)=>F.__idata?R(R({},F),P):P,{})),{[y]:E[T]}),k!==null?{[k]:T}:{}),"__idata",{enumerable:!1,value:!0});j.unshift(x),O.push(a.bind(null,x)()),j.shift()}return O}}return l}function g(h,_){if(Array.isArray(_)){const V=_.map(p.bind(null,h));return m=>V.map(d=>d(m))}const C=p(h,_);return V=>C(V)}const w=[];function v(h,_={}){const C={};return w.push((V,m)=>{C[m]=h.provide(d=>V(d,_))}),()=>C[D]()}return function(_,C){const V=JSON.stringify(n),[m,d]=L(Oe,V)?Oe[V]:[g(e,n),w];return Oe[V]=[m,d],d.forEach(c=>{c(_,C)}),()=>(D=C,m())}}function rt(e,n){const t=K.get(D)||[];let r;return t.length&&(r=Ve(t,e.split("."))),r===void 0?n:r}function sr(e,n){return new Proxy(e,{get(...t){let r;const i=t[1];if(typeof i=="string"){const s=D;D=n,r=rt(i,void 0),D=s}return r!==void 0?r:Reflect.get(...t)}})}function it(e,n,t){return e((r,i={})=>r.reduce((s,f)=>{if(f.startsWith("slots.")){const g=f.substring(6),w=n.slots&&L(n.slots,g);if(i.if)s[f]=()=>w;else if(n.slots&&w){const v=sr(n,t);return s[f]=()=>n.slots[g](v),s}}const p=rr(f,n);return s[f]=()=>rt(f,p.value),s},{}),t)}let st=0;const or=o.defineComponent({name:"FormKitSchema",props:{schema:{type:[Array,Object],required:!0},data:{type:Object,default:()=>({})},library:{type:Object,default:()=>({})}},setup(e,n){const t=o.getCurrentInstance();let r=Symbol(String(st++));K.set(r,[]);let i=nt(e.library,e.schema),s,f;return o.watch(()=>e.schema,(p,g)=>{var w;r=Symbol(String(st++)),i=nt(e.library,e.schema),s=it(i,f,r),p===g&&((w=t==null?void 0:t.proxy)===null||w===void 0?void 0:w.$forceUpdate)()},{deep:!0}),o.watchEffect(()=>{f=Object.assign(o.reactive(e.data),{slots:n.slots}),s=it(i,f,r)}),()=>s()}}),ar={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}},ot=Symbol("FormKitParent");o.defineComponent({props:ar,emits:{input:(e,n)=>!0,inputRaw:(e,n)=>!0,"update:modelValue":e=>!0,node:e=>!!e,submit:(e,n)=>!0,submitRaw:(e,n)=>!0},inheritAttrs:!1,setup(e,n){const t=dr(e,n);if(t.props.definition||B(600,t),t.props.definition.component)return()=>{var f;return o.h((f=t.props.definition)===null||f===void 0?void 0:f.component,{context:t.context},R({},n.slots))};const r=o.ref([]),i=()=>{var f,p;const g=(p=(f=t.props)===null||f===void 0?void 0:f.definition)===null||p===void 0?void 0:p.schema;g||B(601,t),r.value=typeof g=="function"?g(R({},e.sectionsSchema)):g};i(),t.on("schema",i),n.emit("node",t);const s=t.props.definition.library;return n.expose({node:t}),()=>o.h(or,{schema:r.value,data:t.context,library:s},R({},n.slots))}});const lr=Symbol.for("FormKitOptions"),Ae=Symbol();function fr(e,n){const t={},r=f=>{for(const p of f)p.__str in t&&t[p.__str](),t[p.__str]=o.watch(cr.bind(null,e,p),s.bind(null,p),{deep:!1})},s=ur(e,n,r,f=>{if(!!f.length)for(const p in t)`${p}`.startsWith(`${f.__str}.`)&&(t[p](),delete t[p])});r(Ie(e))}function ur(e,n,t,r){return i=>{const s=at(e,i);s!==Ae&&(i.__deep&&r(i),typeof s=="object"&&t(Ie(s,[i],...i)),n(i,s,e))}}function cr(e,n){const t=at(e,n);return t&&typeof t=="object"?Object.keys(t):t}function at(e,n){if(o.isRef(e)){if(n.length===0)return e.value;e=e.value}return n.reduce((t,r)=>t===Ae?t:t===null||typeof t!="object"?Ae:t[r],e)}function Ie(e,n=[],...t){if(e===null)return n;if(!t.length){const r=Object.defineProperty([],"__str",{value:""});if(e=o.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 s=e[r];ee(s)||Array.isArray(s)?(n.push(Object.defineProperty(i,"__deep",{value:!0})),n=n.concat(Ie(s,[],...i))):n.push(i)}return n}function fe(e){return e===null||typeof e!="object"||(o.isReactive(e)?e=o.toRaw(e):o.isRef(e)&&(e=o.isReactive(e.value)?fe(e.value):e.value)),e}const Ee=["help","label","ignore","disabled","preserve",/^preserve(-e|E)rrors/,/^[a-z]+(?:-visibility|Visibility)$/,/^[a-zA-Z-]+(?:-class|Class)$/];function lt(e,n){n.classes&&Object.keys(n.classes).forEach(t=>{typeof t=="string"&&(e.props[`_${t}Class`]=n.classes[t],ye(n.classes[t])&&t==="inner"&&Object.values(n.classes[t]))})}function pr(e){return e?["Submit","SubmitRaw"].reduce((t,r)=>{const i=`on${r}`;return i in e&&typeof e[i]=="function"&&(t[i]=e[i]),t},{}):{}}function dr(e,n,t={}){const r=Object.assign({},o.inject(lr)||{},t),i=o.getCurrentInstance(),s=pr(i==null?void 0:i.vnode.props),f=e.modelValue!==void 0,p=e.modelValue!==void 0?e.modelValue:J(n.attrs.value);function g(){const l=R(R({},H(e)),s),a=je(H(n.attrs),Ee);l.attrs=a;const u=Te(H(n.attrs),Ee);for(const k in u)l[ne(k)]=u[k];const y={props:{}};return lt(y,e),Object.assign(l,y.props),typeof l.type!="string"&&(l.definition=l.type,delete l.type),l}const w=g(),v=w.ignore?null:e.parent||o.inject(ot,null),h=Nn(te(r||{},{name:e.name||void 0,value:p,parent:v,plugins:(r.plugins||[]).concat(e.plugins),config:e.config,props:w,index:e.index},!1,!0));h.props.definition||B(600,h);const _=o.ref(new Set(h.props.definition.props||[]));h.on("added-props",({payload:l})=>{Array.isArray(l)&&l.forEach(a=>_.value.add(a))});const C=o.computed(()=>Ee.concat([..._.value]).reduce((l,a)=>(typeof a=="string"?(l.push(ne(a)),l.push(Le(a))):l.push(a),l),[]));o.watchEffect(()=>lt(h,e));const V=H(e);for(const l in V)o.watch(()=>e[l],()=>{e[l]!==void 0&&(h.props[l]=e[l])});const m=new Set,d=H(n.attrs);o.watchEffect(()=>{c(Te(d,C.value))});function c(l){m.forEach(a=>{a(),m.delete(a)});for(const a in l){const u=ne(a);m.add(o.watch(()=>n.attrs[a],()=>{h.props[u]=n.attrs[a]}))}}if(o.watchEffect(()=>{const l=je(H(n.attrs),C.value);h.props.attrs=Object.assign({},h.props.attrs||{},l)}),o.watchEffect(()=>{const l=e.errors.map(a=>ie({key:Re(a),type:"error",value:a,meta:{source:"prop"}}));h.store.apply(l,a=>a.type==="error"&&a.meta.source==="prop")}),h.type!=="input"){const l=`${h.name}-prop`;o.watchEffect(()=>{const u=Object.keys(e.inputErrors).reduce((y,k)=>{let b=e.inputErrors[k];return typeof b=="string"&&(b=[b]),Array.isArray(b)&&(y[k]=b.map(E=>ie({key:E,type:"error",value:E,meta:{source:l}}))),y},{});h.store.apply(u,y=>y.type==="error"&&y.meta.source===l)})}o.watchEffect(()=>Object.assign(h.config,e.config)),h.type!=="input"&&o.provide(ot,h);let $;const S=new WeakSet;return h.on("modelUpdated",()=>{var l,a;if(n.emit("inputRaw",(l=h.context)===null||l===void 0?void 0:l.value,h),clearTimeout($),$=setTimeout(n.emit,20,"input",(a=h.context)===null||a===void 0?void 0:a.value,h),f&&h.context){const u=fe(h.context.value);ye(u)&&fe(e.modelValue)!==u&&S.add(u),n.emit("update:modelValue",u)}}),f&&fr(o.toRef(e,"modelValue"),(l,a)=>{var u;const y=fe(a);if(ye(y)&&S.has(y))return S.delete(y);l.length?(u=h.at(l))===null||u===void 0||u.input(a,!1):h.input(a,!1)}),o.onUnmounted(()=>h.destroy()),h}let mr=1;function yr(e){return typeof e=="function"&&e.length===2||typeof e=="object"&&!Array.isArray(e)&&!("$el"in e)&&!("$cmp"in e)&&!("if"in e)}function N(e,n={}){const t=R({type:"input"},n);let r;if(yr(e)){const i=`SchemaComponent${mr++}`;r=()=>({$cmp:i,props:{context:"$node.context"}}),t.library={[i]:o.markRaw(e)}}else r=e;return t.schema=Xn(r||"Schema undefined"),t}const hr=o.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,s=()=>{let p="";return r()&&(p=`${p}p-input-icon-left `),i()&&(p=`${p}p-input-icon-right `),p};function f(p){t==null||t.node.input(p.target.value)}return(p,g)=>{const w=o.resolveComponent("InputText");return o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(s())},[r()?(o.openBlock(),o.createElementBlock("i",{key:0,class:o.normalizeClass(o.unref(t).iconLeft)},null,2)):o.createCommentVNode("",!0),o.createVNode(w,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":g[0]||(g[0]=v=>o.unref(t)._value=v),class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,onInput:f},null,8,["id","modelValue","class","placeholder"]),i?(o.openBlock(),o.createElementBlock("i",{key:1,class:o.normalizeClass(o.unref(t).iconRight)},null,2)):o.createCommentVNode("",!0)],2)}}});var gr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ft={exports:{}};(function(e,n){(function(t,r){e.exports=r()})(gr,function(){function t(l,a){if(!(l instanceof a))throw new TypeError("Cannot call a class as a function")}function r(l,a){for(var u=0;u<a.length;u++){var y=a[u];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(l,y.key,y)}}function i(l,a,u){return a&&r(l.prototype,a),u&&r(l,u),l}function s(l,a,u){return a in l?Object.defineProperty(l,a,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[a]=u,l}function f(l,a){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(l);a&&(y=y.filter(function(k){return Object.getOwnPropertyDescriptor(l,k).enumerable})),u.push.apply(u,y)}return u}function p(l){for(var a=1;a<arguments.length;a++){var u=arguments[a]!=null?arguments[a]:{};a%2?f(Object(u),!0).forEach(function(y){s(l,y,u[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(u)):f(Object(u)).forEach(function(y){Object.defineProperty(l,y,Object.getOwnPropertyDescriptor(u,y))})}return l}function g(l){return function(a){if(Array.isArray(a))return v(a)}(l)||function(a){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(a))return Array.from(a)}(l)||w(l)||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(l,a){if(l){if(typeof l=="string")return v(l,a);var u=Object.prototype.toString.call(l).slice(8,-1);return u==="Object"&&l.constructor&&(u=l.constructor.name),u==="Map"||u==="Set"?Array.from(l):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?v(l,a):void 0}}function v(l,a){(a==null||a>l.length)&&(a=l.length);for(var u=0,y=new Array(a);u<a;u++)y[u]=l[u];return y}function h(l){if(typeof Symbol=="undefined"||l[Symbol.iterator]==null){if(Array.isArray(l)||(l=w(l))){var a=0,u=function(){};return{s:u,n:function(){return a>=l.length?{done:!0}:{done:!1,value:l[a++]}},e:function(O){throw O},f:u}}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 y,k,b=!0,E=!1;return{s:function(){y=l[Symbol.iterator]()},n:function(){var O=y.next();return b=O.done,O},e:function(O){E=!0,k=O},f:function(){try{b||y.return==null||y.return()}finally{if(E)throw k}}}}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 V(l){return a=l,Object.prototype.toString.call(a)==="[object Object]"&&!(!l.message&&!l.args)&&!l.stack;var a}var m=!1,d=[],c=function(){function l(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(var u in t(this,l),this._reporters=a.reporters||[],this._types=a.types||C,this.level=a.level!==void 0?a.level:3,this._defaults=a.defaults||{},this._async=a.async!==void 0?a.async:void 0,this._stdout=a.stdout,this._stderr=a.stderr,this._mockFn=a.mockFn,this._throttle=a.throttle||1e3,this._throttleMin=a.throttleMin||5,this._types){var y=p(p({type:u},this._types[u]),this._defaults);this[u]=this._wrapLogFn(y),this[u].raw=this._wrapLogFn(y,!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(l,[{key:"create",value:function(a){return new l(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},a))}},{key:"withDefaults",value:function(a){return this.create({defaults:Object.assign({},this._defaults,a)})}},{key:"withTag",value:function(a){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+a:a})}},{key:"addReporter",value:function(a){return this._reporters.push(a),this}},{key:"removeReporter",value:function(a){if(a){var u=this._reporters.indexOf(a);if(u>=0)return this._reporters.splice(u,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(a){return this._reporters=Array.isArray(a)?a:[a],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var a in this._types)console["__"+a]||(console["__"+a]=console[a]),console[a]=this[a].raw}},{key:"restoreConsole",value:function(){for(var a in this._types)console["__"+a]&&(console[a]=console["__"+a],delete console["__"+a])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(a,u){var y=this;a&&(a.__write||(a.__write=a.write),a.write=function(k){y[u].raw(String(k).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(a){a&&a.__write&&(a.write=a.__write,delete a.__write)}},{key:"pauseLogs",value:function(){m=!0}},{key:"resumeLogs",value:function(){m=!1;var a,u=h(d.splice(0));try{for(u.s();!(a=u.n()).done;){var y=a.value;y[0]._logFn(y[1],y[2])}}catch(k){u.e(k)}finally{u.f()}}},{key:"mockTypes",value:function(a){if(this._mockFn=a||this._mockFn,typeof this._mockFn=="function")for(var u in this._types)this[u]=this._mockFn(u,this._types[u])||this[u],this[u].raw=this[u]}},{key:"_wrapLogFn",value:function(a,u){var y=this;return function(){for(var k=arguments.length,b=new Array(k),E=0;E<k;E++)b[E]=arguments[E];if(!m)return y._logFn(a,b,u);d.push([y,a,b,u])}}},{key:"_logFn",value:function(a,u,y){var k=this;if(a.level>this.level)return!!this._async&&Promise.resolve(!1);var b=Object.assign({date:new Date,args:[]},a);!y&&u.length===1&&V(u[0])?Object.assign(b,u[0]):b.args=Array.from(u),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 E=function(){var x=arguments.length>0&&arguments[0]!==void 0&&arguments[0],F=k._lastLogCount-k._throttleMin;if(k._lastLog&&F>0){var P=g(k._lastLog.args);F>1&&P.push("(repeated ".concat(F," times)")),k._log(p(p({},k._lastLog),{},{args:P})),k._lastLogCount=1}if(x){if(k._lastLog=b,k._async)return k._logAsync(b);k._log(b)}};clearTimeout(this._throttleTimeout);var O=this._lastLogTime?b.date-this._lastLogTime:0;if(this._lastLogTime=b.date,O<this._throttle)try{var j=JSON.stringify([b.type,b.tag,b.args]),T=this._lastLogSerialized===j;if(this._lastLogSerialized=j,T&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(E,this._throttle))}catch{}E(!0)}},{key:"_log",value:function(a){var u,y=h(this._reporters);try{for(y.s();!(u=y.n()).done;)u.value.log(a,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(k){y.e(k)}finally{y.f()}}},{key:"_logAsync",value:function(a){var u=this;return Promise.all(this._reporters.map(function(y){return y.log(a,{async:!0,stdout:u.stdout,stderr:u.stderr})}))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),l}();c.prototype.add=c.prototype.addReporter,c.prototype.remove=c.prototype.removeReporter,c.prototype.clear=c.prototype.removeReporter,c.prototype.withScope=c.prototype.withTag,c.prototype.mock=c.prototype.mockTypes,c.prototype.pause=c.prototype.pauseLogs,c.prototype.resume=c.prototype.resumeLogs;var $,S=function(){function l(a){t(this,l),this.options=Object.assign({},a),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return i(l,[{key:"log",value:function(a){var u=a.level<1?console.__error||console.error:a.level===1&&console.warn?console.__warn||console.warn:console.__log||console.log,y=a.type!=="log"?a.type:"",k=a.tag?a.tag:"",b=this.typeColorMap[a.type]||this.levelColorMap[a.level]||this.defaultColor,E=`
7
+ background: `.concat(b,`;
8
+ border-radius: 0.5em;
9
+ color: white;
10
+ font-weight: bold;
11
+ padding: 2px 0.5em;
12
+ `),O="%c".concat([k,y].filter(Boolean).join(":"));typeof a.args[0]=="string"?u.apply(void 0,["".concat(O,"%c ").concat(a.args[0]),E,""].concat(g(a.args.slice(1)))):u.apply(void 0,[O,E].concat(g(a.args)))}}]),l}();return typeof window!="undefined"&&window.consola||(($=new c({reporters:[new S]})).Consola=c,$.LogLevel=_,$.BrowserReporter=S,$)})})(ft);var _r=ft.exports;const br=o.defineComponent({name:"PrimeInputNumber",props:{context:Object},setup(e){const t=e.context;function r(i){_r.error(i),t==null||t.node.input(i.value)}return(i,s)=>{var p,g,w,v,h,_,C,V,m,d,c;const f=o.resolveComponent("InputNumber");return o.openBlock(),o.createBlock(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=$=>o.unref(t)._value=$),placeholder:o.unref(t).attrs.placeholder,class:o.normalizeClass(o.unref(t).attrs.class),"use-grouping":(p=o.unref(t).attrs.useGrouping)!=null?p:!0,"min-fraction-digits":(g=o.unref(t).attrs.minFractionDigits)!=null?g:void 0,"max-fraction-digits":(w=o.unref(t).attrs.maxFractionDigits)!=null?w:void 0,locale:(v=o.unref(t).attrs.locale)!=null?v:void 0,mode:(h=o.unref(t).attrs.mode)!=null?h:void 0,currency:(_=o.unref(t).attrs.currency)!=null?_:void 0,prefix:(C=o.unref(t).attrs.prefix)!=null?C:void 0,suffix:(V=o.unref(t).attrs.suffix)!=null?V:void 0,"show-buttons":(m=o.unref(t).attrs.showButtons)!=null?m:void 0,"button-layout":(d=o.unref(t).attrs.buttonLayout)!=null?d:"stacked",step:(c=o.unref(t).attrs.step)!=null?c: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"])}}}),wr=o.defineComponent({name:"PrimeInputMask",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s;t==null||t.node.input((s=n.context)==null?void 0:s._value)}return(i,s)=>{var p,g,w,v;const f=o.resolveComponent("InputMask");return o.openBlock(),o.createBlock(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=h=>o.unref(t)._value=h),class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,mask:(p=o.unref(t).attrs.mask)!=null?p:void 0,"slot-char":(g=o.unref(t).attrs.slotChar)!=null?g:"_","auto-clear":(w=o.unref(t).attrs.autoClear)!=null?w:!0,unmask:(v=o.unref(t).attrs.unmask)!=null?v:!1,onBlur:r},null,8,["id","modelValue","class","placeholder","mask","slot-char","auto-clear","unmask"])}}}),vr=o.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,s)=>{var p,g,w,v;const f=o.resolveComponent("Password");return o.openBlock(),o.createBlock(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=h=>o.unref(t)._value=h),class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,feedback:(g=(p=o.unref(t))==null?void 0:p.feedback)!=null?g:!0,"toggle-mask":(v=(w=o.unref(t))==null?void 0:w.toggleMask)!=null?v:!1,onInput:r},null,8,["id","modelValue","class","placeholder","feedback","toggle-mask"])}}}),$r=o.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,s)=>{var p;const f=o.resolveComponent("Textarea");return o.openBlock(),o.createBlock(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=g=>o.unref(t)._value=g),class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,rows:(p=o.unref(t).rows)!=null?p:3,onInput:r},null,8,["id","modelValue","class","placeholder","rows"])}}}),kr={key:0,class:"formkit-prime-left"},Cr={key:1,class:"formkit-prime-right"},Sr=o.defineComponent({name:"PrimeCheckBox",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i)}return(i,s)=>{const f=o.resolveComponent("Checkbox");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(t).attrs.labelLeft?(o.openBlock(),o.createElementBlock("span",kr,o.toDisplayString(o.unref(t).attrs.labelLeft),1)):o.createCommentVNode("",!0),o.createVNode(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=p=>o.unref(t)._value=p),class:o.normalizeClass(o.unref(t).attrs.class),placeholder:o.unref(t).attrs.placeholder,binary:!0,onInput:r},null,8,["id","modelValue","class","placeholder"]),o.unref(t).attrs.labelRight?(o.openBlock(),o.createElementBlock("span",Cr,o.toDisplayString(o.unref(t).attrs.labelRight),1)):o.createCommentVNode("",!0)],64)}}}),Or={key:0,class:"formkit-prime-left"},Vr={key:1,class:"formkit-prime-right"},Ar=o.defineComponent({name:"PrimeInputSwitch",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s;t==null||t.node.input((s=n.context)==null?void 0:s._value)}return(i,s)=>{var p,g;const f=o.resolveComponent("InputSwitch");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(t).attrs.labelLeft?(o.openBlock(),o.createElementBlock("span",Or,o.toDisplayString(o.unref(t).attrs.labelLeft),1)):o.createCommentVNode("",!0),o.createVNode(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=w=>o.unref(t)._value=w),class:o.normalizeClass(o.unref(t).attrs.class),"true-value":(p=o.unref(t).attrs.trueValue)!=null?p:void 0,"false-value":(g=o.unref(t).attrs.falseValue)!=null?g:void 0,onInput:r},null,8,["id","modelValue","class","true-value","false-value"]),o.unref(t).attrs.labelRight?(o.openBlock(),o.createElementBlock("span",Vr,o.toDisplayString(o.unref(t).attrs.labelRight),1)):o.createCommentVNode("",!0)],64)}}}),Ir=o.defineComponent({name:"PrimeEditor",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i.htmlValue)}return(i,s)=>{const f=o.resolveComponent("Editor");return o.openBlock(),o.createBlock(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=p=>o.unref(t)._value=p),placeholder:o.unref(t).attrs.placeholder,onTextChange:r},null,8,["id","modelValue","placeholder"])}}}),Er=o.defineComponent({name:"PrimeDropdown",props:{context:Object},setup(e){const t=e.context;function r(i){t==null||t.node.input(i.value)}return(i,s)=>{var p,g,w,v;const f=o.resolveComponent("Dropdown");return o.openBlock(),o.createBlock(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=h=>o.unref(t)._value=h),class:o.normalizeClass(o.unref(t).attrs.class),options:(g=(p=o.unref(t))==null?void 0:p.attrs)==null?void 0:g.options,"option-label":"label","option-value":"value",placeholder:o.unref(t).attrs.placeholder,filter:(w=o.unref(t).attrs.filter)!=null?w:!1,"show-clear":(v=o.unref(t).attrs.showClear)!=null?v:!1,onChange:r},null,8,["id","modelValue","class","options","placeholder","filter","show-clear"])}}}),Pr=o.defineComponent({name:"PrimeMultiSelect",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s;t==null||t.node.input((s=n.context)==null?void 0:s._value)}return(i,s)=>{var p,g,w;const f=o.resolveComponent("MultiSelect");return o.openBlock(),o.createBlock(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=v=>o.unref(t)._value=v),class:o.normalizeClass(o.unref(t).attrs.class),options:(g=(p=o.unref(t))==null?void 0:p.attrs)==null?void 0:g.options,"option-label":"label","option-value":"value",placeholder:o.unref(t).attrs.placeholder,filter:(w=o.unref(t).attrs.filter)!=null?w:!1,onChange:r},null,8,["id","modelValue","class","options","placeholder","filter"])}}}),jr=o.defineComponent({name:"PrimeCalendar",props:{context:Object},setup(e){const n=e,t=n.context;function r(s){t==null||t.node.input(t==null?void 0:t._value)}function i(s){t==null||t.node.input(s)}return(s,f)=>{const p=o.resolveComponent("Calendar");return o.openBlock(),o.createBlock(p,{id:n.context.id,modelValue:o.unref(t)._value,"onUpdate:modelValue":f[0]||(f[0]=g=>o.unref(t)._value=g),class:o.normalizeClass(o.unref(t).attrs.class),"date-format":o.unref(t).attrs.dateFormat,"show-icon":o.unref(t).attrs.showIcon,icon:o.unref(t).attrs.icon,onDateSelect:i,onInput:r},null,8,["id","modelValue","class","date-format","show-icon","icon"])}}}),Tr=o.defineComponent({name:"PrimeSlider",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s;t==null||t.node.input((s=n.context)==null?void 0:s._value)}return(i,s)=>{var p,g,w,v;const f=o.resolveComponent("Slider");return o.openBlock(),o.createBlock(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=h=>o.unref(t)._value=h),min:(p=o.unref(t).attrs.min)!=null?p:0,max:(g=o.unref(t).attrs.max)!=null?g:100,step:(w=o.unref(t).attrs.step)!=null?w:void 0,range:(v=o.unref(t).attrs.range)!=null?v:!1,onChange:r},null,8,["id","modelValue","min","max","step","range"])}}}),Lr=o.defineComponent({name:"PrimeRating",props:{context:Object},setup(e){const n=e,t=n.context;function r(i){var s;t==null||t.node.input((s=n.context)==null?void 0:s._value)}return(i,s)=>{var p,g,w,v;const f=o.resolveComponent("Rating");return o.openBlock(),o.createBlock(f,{id:o.unref(t).id,modelValue:o.unref(t)._value,"onUpdate:modelValue":s[0]||(s[0]=h=>o.unref(t)._value=h),disabled:(p=o.unref(t).attrs.disabled)!=null?p:!1,readonly:(g=o.unref(t).attrs.readonly)!=null?g:!1,stars:(w=o.unref(t).attrs.stars)!=null?w:5,cancel:(v=o.unref(t).attrs.cancel)!=null?v:!1,onChange:r},null,8,["id","modelValue","disabled","readonly","stars","cancel"])}}}),ut=N(hr,{props:["iconRight","iconLeft"]}),ct=N(br,{props:["iconRight","iconLeft"]}),pt=N(wr,{props:[]}),dt=N(vr,{props:["feedback","toggleMask"]}),mt=N($r,{props:["rows"]}),yt=N(Sr,{props:[]}),ht=N(Ar,{props:[]}),gt=N(Ir,{props:[]}),_t=N(Er,{props:[]}),bt=N(Pr,{props:[]}),wt=N(jr,{props:[]}),vt=N(Tr,{props:[]}),Mr=N(Lr,{props:[]}),Rr={primeInputText:ut,primeInputNumber:ct,primeInputMask:pt,primePassword:dt,primeCheckBox:yt,primeInputSwitch:ht,primeInputTextArea:mt,primeEditor:gt,primeDropdown:_t,primeMultiSelect:bt,primeCalendar:wt,primeSlider:vt};A.primeCalendarDefinition=wt,A.primeCheckBoxDefinition=yt,A.primeDropdownDefinition=_t,A.primeEditorDefinition=gt,A.primeInputMaskDefinition=pt,A.primeInputNumberDefinition=ct,A.primeInputSwitchDefinition=ht,A.primeInputTextAreaDefinition=mt,A.primeInputTextDefinition=ut,A.primeInputs=Rr,A.primeMultiSelectDefinition=bt,A.primePasswordDefinition=dt,A.primeRatingDefinition=Mr,A.primeSliderDefinition=vt,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,28 @@
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 primeInputs: {
16
+ primeInputText: FormKitTypeDefinition;
17
+ primeInputNumber: FormKitTypeDefinition;
18
+ primeInputMask: FormKitTypeDefinition;
19
+ primePassword: FormKitTypeDefinition;
20
+ primeCheckBox: FormKitTypeDefinition;
21
+ primeInputSwitch: FormKitTypeDefinition;
22
+ primeInputTextArea: FormKitTypeDefinition;
23
+ primeEditor: FormKitTypeDefinition;
24
+ primeDropdown: FormKitTypeDefinition;
25
+ primeMultiSelect: FormKitTypeDefinition;
26
+ primeCalendar: FormKitTypeDefinition;
27
+ primeSlider: FormKitTypeDefinition;
28
+ };
@@ -0,0 +1,156 @@
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
+ ]
@@ -0,0 +1,7 @@
1
+ {
2
+ "src/formkit/index.ts": {
3
+ "file": "formkit-primevue.umd.js",
4
+ "src": "src/formkit/index.ts",
5
+ "isEntry": true
6
+ }
7
+ }
@@ -0,0 +1,55 @@
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
+
@@ -0,0 +1,87 @@
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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/formkit-primevue",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/sfxcode/formkit-primevue",