@wikicasa-dev/components 0.0.4 → 0.1.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,3 +1 @@
1
- (function(T,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],p):(T=typeof globalThis<"u"?globalThis:T||self,p(T.components={},T.Vue))})(this,function(T,p){"use strict";const _n="",Mt={class:"tw-flex tw-flex-col tw-items-start"},zt={class:"tw-text-primary tw-p-2 tw-border-solid tw-border-primary-light tw-rounded-xl"},Ht=p.defineComponent({__name:"Pera",props:{initial:{type:Number,default:0}},setup(t){const e=t,n=p.ref(e.initial);return(r,o)=>(p.openBlock(),p.createElementBlock("div",Mt,[p.createElementVNode("div",zt," Pera 🍐 "+p.toDisplayString(n.value),1),p.createElementVNode("button",{onClick:o[0]||(o[0]=i=>n.value++),class:"tw-text-white tw-bg-primary"},"Clicca")]))}});function ut(t,e){return function(){return t.apply(e,arguments)}}const{toString:Jt}=Object.prototype,{getPrototypeOf:K}=Object,D=(t=>e=>{const n=Jt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),O=t=>(t=t.toLowerCase(),e=>D(e)===t),B=t=>e=>typeof e===t,{isArray:C}=Array,j=B("undefined");function Wt(t){return t!==null&&!j(t)&&t.constructor!==null&&!j(t.constructor)&&E(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const lt=O("ArrayBuffer");function $t(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&lt(t.buffer),e}const Kt=B("string"),E=B("function"),ft=B("number"),F=t=>t!==null&&typeof t=="object",Gt=t=>t===!0||t===!1,k=t=>{if(D(t)!=="object")return!1;const e=K(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Xt=O("Date"),Qt=O("File"),Zt=O("Blob"),Yt=O("FileList"),te=t=>F(t)&&E(t.pipe),ee=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||E(t.append)&&((e=D(t))==="formdata"||e==="object"&&E(t.toString)&&t.toString()==="[object FormData]"))},ne=O("URLSearchParams"),re=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function P(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),C(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length;let u;for(r=0;r<s;r++)u=i[r],e.call(null,t[u],u,t)}}function dt(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const pt=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),ht=t=>!j(t)&&t!==pt;function G(){const{caseless:t}=ht(this)&&this||{},e={},n=(r,o)=>{const i=t&&dt(e,o)||o;k(e[i])&&k(r)?e[i]=G(e[i],r):k(r)?e[i]=G({},r):C(r)?e[i]=r.slice():e[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&P(arguments[r],n);return e}const oe=(t,e,n,{allOwnKeys:r}={})=>(P(e,(o,i)=>{n&&E(o)?t[i]=ut(o,n):t[i]=o},{allOwnKeys:r}),t),ie=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),se=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ae=(t,e,n,r)=>{let o,i,s;const u={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!r||r(s,t,e))&&!u[s]&&(e[s]=t[s],u[s]=!0);t=n!==!1&&K(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},ce=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},ue=t=>{if(!t)return null;if(C(t))return t;let e=t.length;if(!ft(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},le=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&K(Uint8Array)),fe=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const o=r.value;e.call(t,o[0],o[1])}},de=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},pe=O("HTMLFormElement"),he=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),mt=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),me=O("RegExp"),gt=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};P(n,(o,i)=>{e(o,i,t)!==!1&&(r[i]=o)}),Object.defineProperties(t,r)},ge=t=>{gt(t,(e,n)=>{if(E(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(E(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ye=(t,e)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return C(t)?r(t):r(String(t).split(e)),n},be=()=>{},we=(t,e)=>(t=+t,Number.isFinite(t)?t:e),X="abcdefghijklmnopqrstuvwxyz",yt="0123456789",bt={DIGIT:yt,ALPHA:X,ALPHA_DIGIT:X+X.toUpperCase()+yt},Ee=(t=16,e=bt.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Oe(t){return!!(t&&E(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Se=t=>{const e=new Array(10),n=(r,o)=>{if(F(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const i=C(r)?[]:{};return P(r,(s,u)=>{const c=n(s,o+1);!j(c)&&(i[u]=c)}),e[o]=void 0,i}}return r};return n(t,0)},Re=O("AsyncFunction"),_e=t=>t&&(F(t)||E(t))&&E(t.then)&&E(t.catch),a={isArray:C,isArrayBuffer:lt,isBuffer:Wt,isFormData:ee,isArrayBufferView:$t,isString:Kt,isNumber:ft,isBoolean:Gt,isObject:F,isPlainObject:k,isUndefined:j,isDate:Xt,isFile:Qt,isBlob:Zt,isRegExp:me,isFunction:E,isStream:te,isURLSearchParams:ne,isTypedArray:le,isFileList:Yt,forEach:P,merge:G,extend:oe,trim:re,stripBOM:ie,inherits:se,toFlatObject:ae,kindOf:D,kindOfTest:O,endsWith:ce,toArray:ue,forEachEntry:fe,matchAll:de,isHTMLForm:pe,hasOwnProperty:mt,hasOwnProp:mt,reduceDescriptors:gt,freezeMethods:ge,toObjectSet:ye,toCamelCase:he,noop:be,toFiniteNumber:we,findKey:dt,global:pt,isContextDefined:ht,ALPHABET:bt,generateString:Ee,isSpecCompliantForm:Oe,toJSONObject:Se,isAsyncFn:Re,isThenable:_e};function g(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}a.inherits(g,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const wt=g.prototype,Et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Et[t]={value:t}}),Object.defineProperties(g,Et),Object.defineProperty(wt,"isAxiosError",{value:!0}),g.from=(t,e,n,r,o,i)=>{const s=Object.create(wt);return a.toFlatObject(t,s,function(u){return u!==Error.prototype},u=>u!=="isAxiosError"),g.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const Ae=null;function Q(t){return a.isPlainObject(t)||a.isArray(t)}function Ot(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function St(t,e,n){return t?t.concat(e).map(function(r,o){return r=Ot(r),!n&&o?"["+r+"]":r}).join(n?".":""):e}function Te(t){return a.isArray(t)&&!t.some(Q)}const xe=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function L(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,d){return!a.isUndefined(d[h])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,s=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(o))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(!u&&a.isBlob(h))throw new g("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?u&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function f(h,d,A){let R=h;if(h&&!A&&typeof h=="object"){if(a.endsWith(d,"{}"))d=r?d:d.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&Te(h)||(a.isFileList(h)||a.endsWith(d,"[]"))&&(R=a.toArray(h)))return d=Ot(d),R.forEach(function(ct,Rn){!(a.isUndefined(ct)||ct===null)&&e.append(s===!0?St([d],Rn,i):s===null?d:d+"[]",c(ct))}),!1}return Q(h)?!0:(e.append(St(A,d,i),c(h)),!1)}const l=[],m=Object.assign(xe,{defaultVisitor:f,convertValue:c,isVisitable:Q});function y(h,d){if(!a.isUndefined(h)){if(l.indexOf(h)!==-1)throw Error("Circular reference detected in "+d.join("."));l.push(h),a.forEach(h,function(A,R){(!(a.isUndefined(A)||A===null)&&o.call(e,A,a.isString(R)?R.trim():R,d,m))===!0&&y(A,d?d.concat(R):[R])}),l.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return y(t),e}function Rt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Z(t,e){this._pairs=[],t&&L(t,this,e)}const _t=Z.prototype;_t.append=function(t,e){this._pairs.push([t,e])},_t.toString=function(t){const e=t?function(n){return t.call(this,n,Rt)}:Rt;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function Ce(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function At(t,e,n){if(!e)return t;const r=n&&n.encode||Ce,o=n&&n.serialize;let i;if(o?i=o(e,n):i=a.isURLSearchParams(e)?e.toString():new Z(e,n).toString(r),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Ne{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(n){n!==null&&e(n)})}}const Tt=Ne,xt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},je=typeof URLSearchParams<"u"?URLSearchParams:Z,Pe=typeof FormData<"u"?FormData:null,Ue=typeof Blob<"u"?Blob:null,ve=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),De=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),S={isBrowser:!0,classes:{URLSearchParams:je,FormData:Pe,Blob:Ue},isStandardBrowserEnv:ve,isStandardBrowserWebWorkerEnv:De,protocols:["http","https","file","blob","url","data"]};function Be(t,e){return L(t,new S.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return S.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Fe(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ke(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function Ct(t){function e(n,r,o,i){let s=n[i++];const u=Number.isFinite(+s),c=i>=n.length;return s=!s&&a.isArray(o)?o.length:s,c?(a.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!a.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&a.isArray(o[s])&&(o[s]=ke(o[s])),!u)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(r,o)=>{e(Fe(r),o,n,0)}),n}return null}const Le={"Content-Type":void 0};function Ie(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const I={transitional:xt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return r&&r?JSON.stringify(Ct(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Be(t,this.formSerializer).toString();if((i=a.isFileList(t))||n.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return L(i?{"files[]":t}:t,s&&new s,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),Ie(t)):t}],transformResponse:[function(t){const e=this.transitional||I.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(t&&a.isString(t)&&(n&&!this.responseType||r)){const o=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(i){if(o)throw i.name==="SyntaxError"?g.from(i,g.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};a.forEach(["delete","get","head"],function(t){I.headers[t]={}}),a.forEach(["post","put","patch"],function(t){I.headers[t]=a.merge(Le)});const Y=I,Ve=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qe=t=>{const e={};let n,r,o;return t&&t.split(`
2
- `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||e[n]&&Ve[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Nt=Symbol("internals");function U(t){return t&&String(t).trim().toLowerCase()}function V(t){return t===!1||t==null?t:a.isArray(t)?t.map(V):String(t)}function Me(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const ze=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function tt(t,e,n,r,o){if(a.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!a.isString(e)){if(a.isString(r))return e.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(e)}}function He(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Je(t,e){const n=a.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,i,s){return this[r].call(this,e,o,i,s)},configurable:!0})})}class q{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function i(u,c,f){const l=U(c);if(!l)throw new Error("header name must be a non-empty string");const m=a.findKey(o,l);(!m||o[m]===void 0||f===!0||f===void 0&&o[m]!==!1)&&(o[m||c]=V(u))}const s=(u,c)=>a.forEach(u,(f,l)=>i(f,l,c));return a.isPlainObject(e)||e instanceof this.constructor?s(e,n):a.isString(e)&&(e=e.trim())&&!ze(e)?s(qe(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=U(e),e){const r=a.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return Me(o);if(a.isFunction(n))return n.call(this,o,r);if(a.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=U(e),e){const r=a.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||tt(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function i(s){if(s=U(s),s){const u=a.findKey(r,s);u&&(!n||tt(r,r[u],u,n))&&(delete r[u],o=!0)}}return a.isArray(e)?e.forEach(i):i(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!e||tt(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const n=this,r={};return a.forEach(this,(o,i)=>{const s=a.findKey(r,i);if(s){n[s]=V(o),delete n[i];return}const u=e?He(i):String(i).trim();u!==i&&delete n[i],n[u]=V(o),r[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return a.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
3
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const n=(this[Nt]=this[Nt]={accessors:{}}).accessors,r=this.prototype;function o(i){const s=U(i);n[s]||(Je(r,i),n[s]=!0)}return a.isArray(e)?e.forEach(o):o(e),this}}q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.freezeMethods(q.prototype),a.freezeMethods(q);const _=q;function et(t,e){const n=this||Y,r=e||n,o=_.from(r.headers);let i=r.data;return a.forEach(t,function(s){i=s.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function jt(t){return!!(t&&t.__CANCEL__)}function v(t,e,n){g.call(this,t??"canceled",g.ERR_CANCELED,e,n),this.name="CanceledError"}a.inherits(v,g,{__CANCEL__:!0});function We(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new g("Request failed with status code "+n.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const $e=S.isStandardBrowserEnv?function(){return{write:function(t,e,n,r,o,i){const s=[];s.push(t+"="+encodeURIComponent(e)),a.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),a.isString(r)&&s.push("path="+r),a.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Ke(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ge(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function Pt(t,e){return t&&!Ke(e)?Ge(t,e):e}const Xe=S.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(o){let i=o;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(o){const i=a.isString(o)?r(o):o;return i.protocol===n.protocol&&i.host===n.host}}():function(){return function(){return!0}}();function Qe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ze(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),f=r[i];s||(s=c),n[o]=u,r[o]=c;let l=i,m=0;for(;l!==o;)m+=n[l++],l=l%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),c-s<e)return;const y=f&&c-f;return y?Math.round(m*1e3/y):void 0}}function Ut(t,e){let n=0;const r=Ze(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,u=i-n,c=r(u),f=i<=s;n=i;const l={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&f?(s-i)/c:void 0,event:o};l[e?"download":"upload"]=!0,t(l)}}const Ye=typeof XMLHttpRequest<"u",tn=Ye&&function(t){return new Promise(function(e,n){let r=t.data;const o=_.from(t.headers).normalize(),i=t.responseType;let s;function u(){t.cancelToken&&t.cancelToken.unsubscribe(s),t.signal&&t.signal.removeEventListener("abort",s)}a.isFormData(r)&&(S.isStandardBrowserEnv||S.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(t.auth){const y=t.auth.username||"",h=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(y+":"+h))}const f=Pt(t.baseURL,t.url);c.open(t.method.toUpperCase(),At(f,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function l(){if(!c)return;const y=_.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),h={data:!i||i==="text"||i==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:y,config:t,request:c};We(function(d){e(d),u()},function(d){n(d),u()},h),c=null}if("onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(l)},c.onabort=function(){c&&(n(new g("Request aborted",g.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new g("Network Error",g.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let y=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const h=t.transitional||xt;t.timeoutErrorMessage&&(y=t.timeoutErrorMessage),n(new g(y,h.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,t,c)),c=null},S.isStandardBrowserEnv){const y=(t.withCredentials||Xe(f))&&t.xsrfCookieName&&$e.read(t.xsrfCookieName);y&&o.set(t.xsrfHeaderName,y)}r===void 0&&o.setContentType(null),"setRequestHeader"in c&&a.forEach(o.toJSON(),function(y,h){c.setRequestHeader(h,y)}),a.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),i&&i!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",Ut(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Ut(t.onUploadProgress)),(t.cancelToken||t.signal)&&(s=y=>{c&&(n(!y||y.type?new v(null,t,c):y),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(s),t.signal&&(t.signal.aborted?s():t.signal.addEventListener("abort",s)));const m=Qe(f);if(m&&S.protocols.indexOf(m)===-1){n(new g("Unsupported protocol "+m+":",g.ERR_BAD_REQUEST,t));return}c.send(r||null)})},M={http:Ae,xhr:tn};a.forEach(M,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const en={getAdapter:t=>{t=a.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;o<e&&(n=t[o],!(r=a.isString(n)?M[n.toLowerCase()]:n));o++);if(!r)throw r===!1?new g(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(a.hasOwnProp(M,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!a.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:M};function nt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new v(null,t)}function vt(t){return nt(t),t.headers=_.from(t.headers),t.data=et.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),en.getAdapter(t.adapter||Y.adapter)(t).then(function(e){return nt(t),e.data=et.call(t,t.transformResponse,e),e.headers=_.from(e.headers),e},function(e){return jt(e)||(nt(t),e&&e.response&&(e.response.data=et.call(t,t.transformResponse,e.response),e.response.headers=_.from(e.response.headers))),Promise.reject(e)})}const Dt=t=>t instanceof _?t.toJSON():t;function N(t,e){e=e||{};const n={};function r(f,l,m){return a.isPlainObject(f)&&a.isPlainObject(l)?a.merge.call({caseless:m},f,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function o(f,l,m){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f,m)}else return r(f,l,m)}function i(f,l){if(!a.isUndefined(l))return r(void 0,l)}function s(f,l){if(a.isUndefined(l)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,l)}function u(f,l,m){if(m in e)return r(f,l);if(m in t)return r(void 0,f)}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(f,l)=>o(Dt(f),Dt(l),!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(f){const l=c[f]||o,m=l(t[f],e[f],f);a.isUndefined(m)&&l!==u||(n[f]=m)}),n}const Bt="1.4.0",rt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{rt[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const Ft={};rt.transitional=function(t,e,n){function r(o,i){return"[Axios v"+Bt+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,s)=>{if(t===!1)throw new g(r(i," has been removed"+(e?" in "+e:"")),g.ERR_DEPRECATED);return e&&!Ft[i]&&(Ft[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(o,i,s):!0}};function nn(t,e,n){if(typeof t!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const u=t[i],c=u===void 0||s(u,i,t);if(c!==!0)throw new g("option "+i+" must be "+c,g.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new g("Unknown option "+i,g.ERR_BAD_OPTION)}}const ot={assertOptions:nn,validators:rt},x=ot.validators;class z{constructor(e){this.defaults=e,this.interceptors={request:new Tt,response:new Tt}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=N(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&ot.assertOptions(r,{silentJSONParsing:x.transitional(x.boolean),forcedJSONParsing:x.transitional(x.boolean),clarifyTimeoutError:x.transitional(x.boolean)},!1),o!=null&&(a.isFunction(o)?n.paramsSerializer={serialize:o}:ot.assertOptions(o,{encode:x.function,serialize:x.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=i&&a.merge(i.common,i[n.method]),s&&a.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),n.headers=_.concat(s,i);const u=[];let c=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(n)===!1||(c=c&&d.synchronous,u.unshift(d.fulfilled,d.rejected))});const f=[];this.interceptors.response.forEach(function(d){f.push(d.fulfilled,d.rejected)});let l,m=0,y;if(!c){const d=[vt.bind(this),void 0];for(d.unshift.apply(d,u),d.push.apply(d,f),y=d.length,l=Promise.resolve(n);m<y;)l=l.then(d[m++],d[m++]);return l}y=u.length;let h=n;for(m=0;m<y;){const d=u[m++],A=u[m++];try{h=d(h)}catch(R){A.call(this,R);break}}try{l=vt.call(this,h)}catch(d){return Promise.reject(d)}for(m=0,y=f.length;m<y;)l=l.then(f[m++],f[m++]);return l}getUri(e){e=N(this.defaults,e);const n=Pt(e.baseURL,e.url);return At(n,e.params,e.paramsSerializer)}}a.forEach(["delete","get","head","options"],function(t){z.prototype[t]=function(e,n){return this.request(N(n||{},{method:t,url:e,data:(n||{}).data}))}}),a.forEach(["post","put","patch"],function(t){function e(n){return function(r,o,i){return this.request(N(i||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:o}))}}z.prototype[t]=e(),z.prototype[t+"Form"]=e(!0)});const H=z;class it{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(u=>{r.subscribe(u),i=u}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(o,i,s){r.reason||(r.reason=new v(o,i,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new it(function(n){e=n}),cancel:e}}}const rn=it;function on(t){return function(e){return t.apply(null,e)}}function sn(t){return a.isObject(t)&&t.isAxiosError===!0}const st={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(st).forEach(([t,e])=>{st[e]=t});const an=st;function kt(t){const e=new H(t),n=ut(H.prototype.request,e);return a.extend(n,H.prototype,e,{allOwnKeys:!0}),a.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return kt(N(t,r))},n}const b=kt(Y);b.Axios=H,b.CanceledError=v,b.CancelToken=rn,b.isCancel=jt,b.VERSION=Bt,b.toFormData=L,b.AxiosError=g,b.Cancel=b.CanceledError,b.all=function(t){return Promise.all(t)},b.spread=on,b.isAxiosError=sn,b.mergeConfig=N,b.AxiosHeaders=_,b.formToJSON=t=>Ct(a.isHTMLForm(t)?new FormData(t):t),b.HttpStatusCode=an,b.default=b;let J;const cn=new Uint8Array(16);function un(){if(!J&&(J=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!J))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J(cn)}const w=[];for(let t=0;t<256;++t)w.push((t+256).toString(16).slice(1));function ln(t,e=0){return(w[t[e+0]]+w[t[e+1]]+w[t[e+2]]+w[t[e+3]]+"-"+w[t[e+4]]+w[t[e+5]]+"-"+w[t[e+6]]+w[t[e+7]]+"-"+w[t[e+8]]+w[t[e+9]]+"-"+w[t[e+10]]+w[t[e+11]]+w[t[e+12]]+w[t[e+13]]+w[t[e+14]]+w[t[e+15]]).toLowerCase()}const fn=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Lt={randomUUID:fn};function dn(t,e,n){if(Lt.randomUUID&&!e&&!t)return Lt.randomUUID();t=t||{};const r=t.random||(t.rng||un)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let o=0;o<16;++o)e[n+o]=r[o];return e}return ln(r)}dn();/*! js-cookie v3.0.5 | MIT */function W(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var pn={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function at(t,e){function n(o,i,s){if(!(typeof document>"u")){s=W({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in s)s[c]&&(u+="; "+c,s[c]!==!0&&(u+="="+s[c].split(";")[0]));return document.cookie=o+"="+t.write(i,o)+u}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var i=document.cookie?document.cookie.split("; "):[],s={},u=0;u<i.length;u++){var c=i[u].split("="),f=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(s[l]=t.read(f,l),o===l)break}catch{}}return o?s[o]:s}}return Object.create({set:n,get:r,remove:function(o,i){n(o,"",W({},i,{expires:-1}))},withAttributes:function(o){return at(this.converter,W({},this.attributes,o))},withConverter:function(o){return at(W({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}at(pn,{path:"/"});function hn(t,e=!1){return t==null?"":mn(e?Math.round(t):Math.floor(t),0)}function mn(t,e){return!t&&t!==0?"":t.toLocaleString("it-IT",{minimumFractionDigits:e,maximumFractionDigits:e})}const $=t=>(p.pushScopeId("data-v-e7217893"),t=t(),p.popScopeId(),t),gn={class:"card"},yn=$(()=>p.createElementVNode("p",null,[p.createTextVNode(" Edit "),p.createElementVNode("code",null,"components/HelloWorld.vue"),p.createTextVNode(" to test HMR ")],-1)),bn=$(()=>p.createElementVNode("p",null,[p.createTextVNode(" Check out "),p.createElementVNode("a",{href:"https://vuejs.org/guide/quick-start.html#local",target:"_blank"},"create-vue"),p.createTextVNode(", the official Vue + Vite starter ")],-1)),wn=$(()=>p.createElementVNode("p",null,[p.createTextVNode(" Install "),p.createElementVNode("a",{href:"https://github.com/vuejs/language-tools",target:"_blank"},"Volar"),p.createTextVNode(" in your IDE for a better DX ")],-1)),En=$(()=>p.createElementVNode("p",{class:"read-the-docs"},"Click on the Vite and Vue logos to learn more",-1)),On=p.defineComponent({__name:"HelloWorld",props:{msg:{}},setup(t){console.log(hn(1234));const e=p.ref(0);return(n,r)=>(p.openBlock(),p.createElementBlock(p.Fragment,null,[p.createElementVNode("h1",null,p.toDisplayString(n.msg),1),p.createElementVNode("div",gn,[p.createElementVNode("button",{type:"button",onClick:r[0]||(r[0]=o=>e.value++)},"count is "+p.toDisplayString(e.value),1),yn]),bn,wn,En,p.createVNode(Ht)],64))}}),An="",It=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Vt=It(On,[["__scopeId","data-v-e7217893"]]),Sn=p.defineComponent({__name:"App",setup(t){return(e,n)=>(p.openBlock(),p.createBlock(Vt,{msg:"Vite + Vue"}))}}),Tn="",qt=It(Sn,[["__scopeId","data-v-1c00ffbc"]]);p.createApp(qt).mount("#app"),T.App=qt,T.HelloWorldVue=Vt,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
1
+ (function(d,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(d=typeof globalThis<"u"?globalThis:d||self,t(d.components={},d.Vue))})(this,function(d,t){"use strict";const q="",h=t.defineComponent({name:"BaseFloatingLabel",props:{labelState:{type:String,default:()=>"inline-label"},isValid:{type:Boolean,default:()=>null},labelText:{type:String,required:!0},disabled:{type:[String,Boolean],default:!1}},emits:["click"]}),P="",u=(e,l)=>{const n=e.__vccOpts||e;for(const[i,s]of l)n[i]=s;return n},c=["for"],$=["innerHTML"];function y(e,l,n,i,s,o){return t.openBlock(),t.createElementBlock("label",{for:e.$attrs.for,class:t.normalizeClass([e.labelState,{"label-invalid":e.isValid===!1},{"label-valid":e.isValid},{"tw-text-w-secondary":e.disabled}]),onClick:l[0]||(l[0]=t.withModifiers(r=>e.$emit("click"),["stop"]))},[t.createElementVNode("span",{class:t.normalizeClass(["tw-font-medium tw-text tw-text-w-black",{"!tw-text-w-secondary":e.disabled}]),innerHTML:e.labelText},null,10,$),e.$attrs.required?(t.openBlock(),t.createElementBlock("sup",{key:0,class:t.normalizeClass(["tw-text",{"tw-text-w-secondary":e.disabled}])}," *",2)):t.createCommentVNode("",!0)],10,c)}const b=u(h,[["render",y],["__scopeId","data-v-60743a0f"]]);function f(e){const l=t.ref("inline-label");function n(a){a!=null&&`${a}`.length>0&&(l.value="floating-label")}const i=(a=!0)=>{l.value!=="floating-label"&&a&&(l.value="floating-label"),e("focusin")};function s(a,p=!1,j=!0){if(a!=null&&`${a}`.trim().length>0||!p&&!j){r(),e("focusout");return}o()}const o=()=>{l.value="inline-label"},r=()=>{l.value="floating-label"};return{labelState:l,setInitialLabelState:n,handleFocusIn:i,handleFocusOut:s,setInlineLabel:o,setFloatingLabel:r}}const k=t.defineComponent({name:"BaseInput",components:{BaseFloatingLabel:b},inheritAttrs:!1,props:{inputClass:{type:[String,Array],required:!1,default:""},inputType:{type:String,default:"text-input"},labelText:{type:String,default:""},border:{type:Boolean,default:!0},modelValue:{type:[String,Number]},feedback:{type:Object},isValid:{type:Boolean,default:null},auto:{type:Boolean,default:!0},keepFloatingLabel:{type:Boolean,default:!1},formatter:{type:Object,default:null}},emits:["update:modelValue","click","keydown-enter-pressed","focusin","focusout"],setup(e,l){const{labelState:n,setInitialLabelState:i,handleFocusIn:s,handleFocusOut:o,setInlineLabel:r,setFloatingLabel:a}=f(l.emit);return{labelState:n,setInitialLabelState:i,handleFocusIn:s,handleFocusOut:o,setInlineLabel:r,setFloatingLabel:a}},data(){return{type:"",feedbackObj:{},pointerDownListener:e=>{e.preventDefault()}}},computed:{passwordIcon(){return document.querySelector("[data-type='password-icon']")},inputEl(){return this.$refs.baseInput}},watch:{feedback(){this.normalizeFeedbackProp()},modelValue(e){if(e){const l=this.$refs.baseInput;!l.value&&this.formatter&&(e=l.value);const n=this.updateInputValue(l,e);this.$emit("update:modelValue",n)}else this.$refs.baseInput.value="";e!=null&&`${e}`.length>0&&this.auto&&this.labelState!=="floating-label"?this.labelState="floating-label":(e==null||e==null)&&(this.labelState="inline-label")},keepFloatingLabel(e){e?this.setFloatingLabel():this.handleFocusOut(this.modelValue,!0,this.auto)}},created(){this.type=this.$attrs.type,this.normalizeFeedbackProp(),this.setInitialLabelState(this.modelValue)},mounted(){if((this.modelValue!=null||this.modelValue!=null)&&(this.$refs.baseInput.value=`${this.modelValue}`),this.formatter){const e=this.updateInputValue(this.$refs.baseInput,`${this.modelValue}`);this.$emit("update:modelValue",e)}this.setPointerOutListener()},unmounted(){var e;(e=this.passwordIcon)==null||e.removeEventListener("pointerdown",this.pointerDownListener)},methods:{setPointerOutListener(){if(this.$attrs.type!=="password")return;const e=this.passwordIcon;e&&e.addEventListener("pointerdown",this.pointerDownListener)},handleFloatingLabelClick(){this.$refs.baseInput.focus()},normalizeFeedbackProp(){this.feedback&&(this.feedbackObj=this.feedback,this.feedback.valid&&typeof this.feedback.valid=="string"&&(this.feedbackObj.valid=[this.feedback.valid]),this.feedback.invalid&&typeof this.feedback.invalid=="string"&&(this.feedbackObj.invalid=[this.feedback.invalid]))},updateInputValue(e,l){if(!l)return e.value="","";let n="";return this.formatter&&this.formatter.unFormatFn?n=`${this.formatter.unFormatFn(l)}`:n=l,this.formatter?e.value=this.formatter.formatFn(n):e.value=n,n},handleInputChange({target:e}){if(this.inputType==="select")return;const l=e,n=this.updateInputValue(l,l.value);this.$emit("update:modelValue",n)},handleClick(e){this.$emit("click",e)},handleClean(){this.$emit("update:modelValue",""),this.setInlineLabel()},handleShowPasswd(e){this.type==="password"?this.type="text":this.type==="text"&&(this.type="password")}}}),D="",g=["id","data-cy","name","autocomplete","disabled","aria-labelledby","readonly","type","pattern","min","max","maxlength","inputmode","placeholder"],V={key:0,class:"tw-float-none tw-w-auto tw-overflow-hidden tw-block tw-p-0 tw-text tw-ml-2 tw-mb-2 tw-h-3 tw-invisible tw-max-w-full tw-transition-[max-width] tw-duration-[50ms] tw-ease-out tw-whitespace-nowrap"},C=["innerHTML"],I=["innerHTML"],B=["innerHTML"],L={class:"position-absolute f-12 under-label"};function F(e,l,n,i,s,o){const r=t.resolveComponent("base-floating-label");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["tw-inline-block tw-w-full tw-relative input-wrapper",[e.$attrs.class,{"tw-mt-10px":e.labelText},{"floating-label":e.labelText},e.labelState==="floating-label"?"floating-state":"inline-state",{"has-right-icon":e.$slots.rightIcon},{"has-left-icon":e.$slots.leftIcon},{"is-invalid":e.isValid===!1,"is-valid":e.isValid}]])},[t.renderSlot(e.$slots,"leftIcon",{},void 0,!0),t.renderSlot(e.$slots,"rightIcon",{handleClean:e.handleClean,handleShowPasswd:e.handleShowPasswd,curType:e.type},void 0,!0),t.createElementVNode("input",{id:e.$attrs.id,ref:"baseInput","data-cy":e.$attrs["data-cy"],name:e.$attrs.name,class:t.normalizeClass(["tw-peer focus:tw-shadow-none !tw-border-none tw-truncate tw-h-[41px] tw-bg-no-repeat",[{"input-element tw-block tw-w-full tw-appearance-none tw-outline-0 tw-h-12 tw-py-2 tw-px-4":e.inputType==="text-input"},{"text-light-steel":e.$attrs.disabled},{"is-invalid invalid-bg !tw-pr-9":e.isValid===!1,"is-valid valid-bg !tw-pr-9":e.isValid},{"tw-pr-[42px]":e.$slots.rightIcon},{"tw-pl-[42px]":e.$slots.leftIcon},e.inputClass]]),autocomplete:e.$attrs.autocomplete==="on"?"on":"off",disabled:e.$attrs.disabled,"aria-labelledby":e.$attrs.id,readonly:e.$attrs.readonly,type:e.type,pattern:e.$attrs.pattern,min:e.$attrs.min,max:e.$attrs.max,maxlength:e.$attrs.maxlength,inputmode:e.$attrs.inputmode,placeholder:e.$attrs.placeholder,onClick:l[0]||(l[0]=t.withModifiers((...a)=>e.handleClick&&e.handleClick(...a),["stop"])),onFocusin:l[1]||(l[1]=t.withModifiers((...a)=>e.handleFocusIn&&e.handleFocusIn(...a),["stop"])),onFocusout:l[2]||(l[2]=t.withModifiers(a=>e.handleFocusOut(e.modelValue,!1,e.auto),["stop"])),onInput:l[3]||(l[3]=t.withModifiers((...a)=>e.handleInputChange&&e.handleInputChange(...a),["stop"])),onKeydown:l[4]||(l[4]=t.withKeys(a=>e.$emit("keydown-enter-pressed"),["enter"]))},null,42,g),t.createElementVNode("fieldset",{class:t.normalizeClass(["tw-absolute tw-text-left tw-m-0 tw-pointer-events-none tw-overflow-hidden peer-focus:tw-border-2 tw-transition-[border] tw-duration-100 tw-ease-out tw-h-12 -tw-top-[5px] tw-right-0 tw-bottom-0 tw-left-0 tw-px-2 tw-py-0 tw-border tw-border-solid tw-rounded-xs",[e.border?"with-border":"tw-border-none",{"is-invalid tw-border-w-danger":e.isValid===!1,"is-valid tw-border-w-primary":e.isValid,"tw-border-w-secondary":e.isValid===null},{"no-floating-label tw-top-0":!e.labelText},e.$attrs["fieldset-classes"]]])},[e.labelText?(t.openBlock(),t.createElementBlock("legend",V,[t.createElementVNode("span",{class:t.normalizeClass(["visible-label tw-opacity-0",[{"tw-mx-5px":e.labelText},{"tw-visible tw-inline-block":e.labelState==="floating-label"},{"tw-invisible tw-hidden":e.labelState==="inline-label"}]]),innerHTML:e.labelText},null,10,C)])):t.createCommentVNode("",!0)],2),e.labelText?(t.openBlock(),t.createBlock(r,{key:0,for:e.$attrs.id,"label-text":e.labelText,"label-state":e.labelState,"is-valid":e.isValid,required:e.$attrs.required,disabled:e.$attrs.disabled,onClick:e.handleFloatingLabelClick},null,8,["for","label-text","label-state","is-valid","required","disabled","onClick"])):t.createCommentVNode("",!0),e.isValid===!1?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.feedbackObj.invalid,(a,p)=>(t.openBlock(),t.createElementBlock("div",{key:`${e.$attrs.id}_invalid_${p}`,class:"tw-text-w-danger tw-mt-1",innerHTML:a},null,8,I))),128)):e.isValid===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.feedbackObj.valid,(a,p)=>(t.openBlock(),t.createElementBlock("div",{key:`${e.$attrs.id}_valid_${p}`,class:"tw-text-w-primary tw-mt-1",innerHTML:a},null,8,B))),128)):t.createCommentVNode("",!0),t.createElementVNode("div",L,[t.renderSlot(e.$slots,"under-label",{},void 0,!0)])],2)}const S=u(k,[["render",F],["__scopeId","data-v-8d567faa"]]),T=t.defineComponent({name:"BaseTextarea",components:{BaseFloatingLabel:b},inheritAttrs:!1,props:{labelText:{type:String,default:""},modelValue:{type:[String,Number]},feedback:{type:Object},isValid:{type:Boolean,default:null},textAreaStyle:{type:String,default:""},isDisabled:{type:Boolean,default:!1},resize:{type:Boolean,default:!1}},emits:["update:modelValue","focusin","focusout"],setup(e,l){const{labelState:n,setInitialLabelState:i,handleFocusIn:s,handleFocusOut:o}=f(l.emit);return{labelState:n,setInitialLabelState:i,handleFocusIn:s,handleFocusOut:o}},data(){return{value:""}},computed:{textareaElem(){return this.$refs.textarea}},watch:{modelValue(e){`${e}`.length>0&&this.labelState!=="floating-label"&&(this.labelState="floating-label")}},created(){this.setInitialLabelState(this.modelValue)},methods:{handleOnChange({target:e}){this.value=e.value,this.$emit("update:modelValue",e.value)},handleFloatingLabelClick(){this.$refs.textarea.focus()},disableTextarea(){this.textareaElem.setAttribute("readonly","readonly"),this.textareaElem.classList.add("disabled")},clearTextareaElem(){this.textareaElem.value=""},disableAndFocusTextarea(){this.textareaElem.removeAttribute("readonly"),this.textareaElem.classList.remove("disabled"),this.$nextTick(()=>{this.textareaElem.focus()})}}}),K="",E=["id","rows","disabled","aria-labelledby","innerHTML"],v={key:0,class:"tw-float-none tw-w-auto tw-overflow-hidden tw-block tw-p-0 tw-text tw-ml-2 tw-h-3 tw-visible tw-max-w-full tw-ease-out tw-duration-[50s] tw-whitespace-nowrap"},M=["innerHTML"],O=["innerHTML"];function N(e,l,n,i,s,o){const r=t.resolveComponent("base-floating-label");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["input-wrapper tw-relative tw-mt-15px tw-px-0 tw-bg-white tw-rounded-xs",[e.labelState==="floating-label"?"floating-state":"inline-state"]])},[t.createElementVNode("textarea",{id:e.$attrs.id,ref:"textarea",class:t.normalizeClass(["textarea-scrollbar tw-pt-15px tw-px-15px tw-w-full tw-peer/fieldset tw-bg-no-repeat tw-whitespace-pre-wrap tw-overflow-y-auto tw-border-0 tw-rounded-xs tw-outline-none",[{"bg-w-cultured":e.$attrs.disabled||e.isDisabled},{"is-invalid invalid-bg !tw-pr-10":e.isValid===!1},{"is-valid valid-bg !tw-pr-10":e.isValid},{"tw-resize-none":!e.resize}]]),rows:e.$attrs.rows,disabled:e.$attrs.disabled,"aria-labelledby":e.$attrs.id,onFocusin:l[0]||(l[0]=t.withModifiers((...a)=>e.handleFocusIn&&e.handleFocusIn(...a),["stop"])),onFocusout:l[1]||(l[1]=t.withModifiers(a=>e.handleFocusOut(`${e.modelValue}`.trim()||e.value),["stop"])),onInput:l[2]||(l[2]=t.withModifiers((...a)=>e.handleOnChange&&e.handleOnChange(...a),["stop"])),innerHTML:e.modelValue},null,42,E),t.createElementVNode("fieldset",{class:t.normalizeClass(["tw-absolute tw-text-start tw-m-0 tw-pointer-events-none tw-overflow-hidden tw-transition-[border] tw-duration-100 tw-ease-out tw-right-0 tw-bottom-0 tw-left-0 -tw-top-5px tw-px-2 tw-min-w-0 tw-border-solid tw-border tw-rounded-xs peer-focus/fieldset:tw-border-2",[{"is-invalid":e.isValid===!1,"is-valid":e.isValid},{"tw-border-w-danger":e.isValid===!1},{"tw-border-w-primary":e.isValid},{"tw-border-w-secondary":e.isValid===null}]])},[e.labelText?(t.openBlock(),t.createElementBlock("legend",v,[t.createElementVNode("span",{class:t.normalizeClass(["tw-px-5px tw-opacity-0",[{"tw-visible tw-inline-block":e.labelState==="floating-label"},{"tw-invisible tw-hidden":e.labelState==="inline-label"}]]),innerHTML:e.labelText},null,10,M)])):t.createCommentVNode("",!0)],2),t.createVNode(r,{for:e.$attrs.id,"label-text":e.labelText,"label-state":e.labelState,required:e.$attrs.required,"is-valid":e.isValid,onClick:e.handleFloatingLabelClick},null,8,["for","label-text","label-state","required","is-valid","onClick"])],2),(e.isValid||e.isValid===!1)&&e.feedback?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.isValid===!1?"tw-text-w-danger tw-mt-1":"tw-text-w-primary tw-mt-1"),innerHTML:e.isValid===!1?e.feedback.invalid:e.feedback.valid},null,10,O)):t.createCommentVNode("",!0)])}const z=u(T,[["render",N],["__scopeId","data-v-0164c52e"]]),H={class:"tw-p-10"},w=t.defineComponent({__name:"HelloWorld",setup(e){const l=t.ref("");return(n,i)=>(t.openBlock(),t.createElementBlock("div",H,[t.createVNode(S,{"label-text":"ziopera",modelValue:l.value,"onUpdate:modelValue":i[0]||(i[0]=s=>l.value=s)},null,8,["modelValue"]),t.createVNode(z,{modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=s=>l.value=s)},null,8,["modelValue"])]))}}),A=t.defineComponent({__name:"App",setup(e){return(l,n)=>(t.openBlock(),t.createBlock(w,{msg:"Vite + Vue"}))}}),U="",m=u(A,[["__scopeId","data-v-1c00ffbc"]]);t.createApp(m).mount("#app"),d.App=m,d.HelloWorldVue=w,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,12 @@
1
+ import type { Ref } from "vue";
2
+ import { LabelState } from "@customTypes/BaseInputTypes";
3
+ interface UsableFloatingLabel {
4
+ labelState: Ref<LabelState>;
5
+ setInitialLabelState: <T>(value: T) => void;
6
+ handleFocusIn: (autoFloating?: boolean) => void;
7
+ handleFocusOut: <T>(value: T, manual?: boolean, auto?: boolean) => void;
8
+ setInlineLabel: () => void;
9
+ setFloatingLabel: () => void;
10
+ }
11
+ export declare function useFloatingLabel(emit: any): UsableFloatingLabel;
12
+ export {};
@@ -6,13 +6,13 @@ declare const meta: {
6
6
  type: import("vue").PropType<string>;
7
7
  required: true;
8
8
  };
9
+ size: {
10
+ type: import("vue").PropType<"small" | "medium" | "large">;
11
+ };
9
12
  primary: {
10
13
  type: import("vue").PropType<boolean>;
11
14
  default: boolean;
12
15
  };
13
- size: {
14
- type: import("vue").PropType<"small" | "medium" | "large">;
15
- };
16
16
  backgroundColor: {
17
17
  type: import("vue").PropType<string>;
18
18
  };
@@ -23,13 +23,13 @@ declare const meta: {
23
23
  type: import("vue").PropType<string>;
24
24
  required: true;
25
25
  };
26
+ size: {
27
+ type: import("vue").PropType<"small" | "medium" | "large">;
28
+ };
26
29
  primary: {
27
30
  type: import("vue").PropType<boolean>;
28
31
  default: boolean;
29
32
  };
30
- size: {
31
- type: import("vue").PropType<"small" | "medium" | "large">;
32
- };
33
33
  backgroundColor: {
34
34
  type: import("vue").PropType<string>;
35
35
  };