@ozdao/prometheus-framework 0.1.89 → 0.1.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
  2. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +22 -22
  3. package/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/index.cjs +1 -0
  4. package/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/index.js +7 -0
  5. package/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/web.cjs +1 -0
  6. package/dist/prometheus-framework/node_modules/@capacitor/preferences/dist/esm/web.js +54 -0
  7. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Button/Button.vue.js +224 -2
  9. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -224
  11. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
  13. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
  15. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +1 -1
  17. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
  19. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
  21. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  23. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  25. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  27. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  29. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/auth/store/auth.js +52 -58
  35. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  45. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  51. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  55. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  57. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +3 -3
  63. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  79. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  85. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  89. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  93. package/dist/style.css +1 -1
  94. package/package.json +2 -1
  95. package/src/modules/auth/store/auth.js +32 -38
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*! Capacitor: https://capacitorjs.com/ - MIT License */const Z=t=>{const e=new Map;e.set("web",{name:"web"});const r=t.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:e},i=(o,a)=>{r.platforms.set(o,a)},n=o=>{r.platforms.has(o)&&(r.currentPlatform=r.platforms.get(o))};return r.addPlatform=i,r.setPlatform=n,r},N=t=>t.CapacitorPlatforms=Z(t),S=N(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});S.addPlatform;S.setPlatform;exports.ExceptionCode=void 0;(function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"})(exports.ExceptionCode||(exports.ExceptionCode={}));class O extends Error{constructor(e,r,i){super(e),this.message=e,this.code=r,this.data=i}}const ee=t=>{var e,r;return t!=null&&t.androidBridge?"android":!((r=(e=t==null?void 0:t.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||r===void 0)&&r.bridge?"ios":"web"},te=t=>{var e,r,i,n,o;const a=t.CapacitorCustomPlatform||null,s=t.Capacitor||{},f=s.Plugins=s.Plugins||{},l=t.CapacitorPlatforms,E=()=>a!==null?a.name:ee(t),v=((e=l==null?void 0:l.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||E,$=()=>v()!=="web",D=((r=l==null?void 0:l.currentPlatform)===null||r===void 0?void 0:r.isNativePlatform)||$,B=c=>{const d=j.get(c);return!!(d!=null&&d.platforms.has(v())||H(c))},G=((i=l==null?void 0:l.currentPlatform)===null||i===void 0?void 0:i.isPluginAvailable)||B,F=c=>{var d;return(d=s.PluginHeaders)===null||d===void 0?void 0:d.find(y=>y.name===c)},H=((n=l==null?void 0:l.currentPlatform)===null||n===void 0?void 0:n.getPluginHeader)||F,K=c=>t.console.error(c),z=(c,d,y)=>Promise.reject(`${y} does not have an implementation of "${d}".`),j=new Map,V=(c,d={})=>{const y=j.get(c);if(y)return console.warn(`Capacitor plugin "${c}" already registered. Cannot register plugins twice.`),y.proxy;const P=v(),C=H(c);let h;const Q=async()=>(!h&&P in d?h=typeof d[P]=="function"?h=await d[P]():h=d[P]:a!==null&&!h&&"web"in d&&(h=typeof d.web=="function"?h=await d.web():h=d.web),h),X=(u,g)=>{var p,w;if(C){const b=C==null?void 0:C.methods.find(m=>g===m.name);if(b)return b.rtype==="promise"?m=>s.nativePromise(c,g.toString(),m):(m,k)=>s.nativeCallback(c,g.toString(),m,k);if(u)return(p=u[g])===null||p===void 0?void 0:p.bind(u)}else{if(u)return(w=u[g])===null||w===void 0?void 0:w.bind(u);throw new O(`"${c}" plugin is not implemented on ${P}`,exports.ExceptionCode.Unimplemented)}},U=u=>{let g;const p=(...w)=>{const b=Q().then(m=>{const k=X(m,u);if(k){const x=k(...w);return g=x==null?void 0:x.remove,x}else throw new O(`"${c}.${u}()" is not implemented on ${P}`,exports.ExceptionCode.Unimplemented)});return u==="addListener"&&(b.remove=async()=>g()),b};return p.toString=()=>`${u.toString()}() { [capacitor code] }`,Object.defineProperty(p,"name",{value:u,writable:!1,configurable:!1}),p},M=U("addListener"),W=U("removeListener"),Y=(u,g)=>{const p=M({eventName:u},g),w=async()=>{const m=await p;W({eventName:u,callbackId:m},g)},b=new Promise(m=>p.then(()=>m({remove:w})));return b.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await w()},b},A=new Proxy({},{get(u,g){switch(g){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return C?Y:M;case"removeListener":return W;default:return U(g)}}});return f[c]=A,j.set(c,{name:c,proxy:A,platforms:new Set([...Object.keys(d),...C?[P]:[]])}),A},J=((o=l==null?void 0:l.currentPlatform)===null||o===void 0?void 0:o.registerPlugin)||V;return s.convertFileSrc||(s.convertFileSrc=c=>c),s.getPlatform=v,s.handleError=K,s.isNativePlatform=D,s.isPluginAvailable=G,s.pluginMethodNoop=z,s.registerPlugin=J,s.Exception=O,s.DEBUG=!!s.DEBUG,s.isLoggingEnabled=!!s.isLoggingEnabled,s.platform=s.getPlatform(),s.isNative=s.isNativePlatform(),s},re=t=>t.Capacitor=te(t),L=re(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),T=L.registerPlugin;L.Plugins;class _{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,r){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(r);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const o=async()=>this.removeListener(e,r),a=Promise.resolve({remove:o});return Object.defineProperty(a,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await o()}}),a}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,r){const i=this.listeners[e];i&&i.forEach(n=>n(r))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,r){this.windowListeners[r]={registered:!1,windowEventName:e,pluginEventName:r,handler:i=>{this.notifyListeners(r,i)}}}unimplemented(e="not implemented"){return new L.Exception(e,exports.ExceptionCode.Unimplemented)}unavailable(e="not available"){return new L.Exception(e,exports.ExceptionCode.Unavailable)}async removeListener(e,r){const i=this.listeners[e];if(!i)return;const n=i.indexOf(r);this.listeners[e].splice(n,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const R=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),I=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ne extends _{async getCookies(){const e=document.cookie,r={};return e.split(";").forEach(i=>{if(i.length<=0)return;let[n,o]=i.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=I(n).trim(),o=I(o).trim(),r[n]=o}),r}async setCookie(e){try{const r=R(e.key),i=R(e.value),n=`; expires=${(e.expires||"").replace("expires=","")}`,o=(e.path||"/").replace("path=",""),a=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${r}=${i||""}${n}; path=${o}; ${a};`}catch(r){return Promise.reject(r)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(r){return Promise.reject(r)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const r of e)document.cookie=r.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}const oe=T("CapacitorCookies",{web:()=>new ne}),se=async t=>new Promise((e,r)=>{const i=new FileReader;i.onload=()=>{const n=i.result;e(n.indexOf(",")>=0?n.split(",")[1]:n)},i.onerror=n=>r(n),i.readAsDataURL(t)}),ie=(t={})=>{const e=Object.keys(t);return Object.keys(t).map(n=>n.toLocaleLowerCase()).reduce((n,o,a)=>(n[o]=t[e[a]],n),{})},ae=(t,e=!0)=>t?Object.entries(t).reduce((i,n)=>{const[o,a]=n;let s,f;return Array.isArray(a)?(f="",a.forEach(l=>{s=e?encodeURIComponent(l):l,f+=`${o}=${s}&`}),f.slice(0,-1)):(s=e?encodeURIComponent(a):a,f=`${o}=${s}`),`${i}&${f}`},"").substr(1):null,q=(t,e={})=>{const r=Object.assign({method:t.method||"GET",headers:t.headers},e),n=ie(t.headers)["content-type"]||"";if(typeof t.data=="string")r.body=t.data;else if(n.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[a,s]of Object.entries(t.data||{}))o.set(a,s);r.body=o.toString()}else if(n.includes("multipart/form-data")){const o=new FormData;if(t.data instanceof FormData)t.data.forEach((s,f)=>{o.append(f,s)});else for(const s of Object.keys(t.data))o.append(s,t.data[s]);r.body=o;const a=new Headers(r.headers);a.delete("content-type"),r.headers=a}else(n.includes("application/json")||typeof t.data=="object")&&(r.body=JSON.stringify(t.data));return r};class le extends _{async request(e){const r=q(e,e.webFetchExtra),i=ae(e.params,e.shouldEncodeUrlParams),n=i?`${e.url}?${i}`:e.url,o=await fetch(n,r),a=o.headers.get("content-type")||"";let{responseType:s="text"}=o.ok?e:{};a.includes("application/json")&&(s="json");let f,l;switch(s){case"arraybuffer":case"blob":l=await o.blob(),f=await se(l);break;case"json":f=await o.json();break;case"document":case"text":default:f=await o.text()}const E={};return o.headers.forEach((v,$)=>{E[$]=v}),{data:f,headers:E,status:o.status,url:o.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}T("CapacitorHttp",{web:()=>new le});exports.Capacitor=L;exports.CapacitorCookies=oe;exports.CapacitorException=O;exports.CapacitorPlatforms=S;exports.WebPlugin=_;exports.buildRequestInit=q;exports.registerPlugin=T;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*! Capacitor: https://capacitorjs.com/ - MIT License */const Z=t=>{const e=new Map;e.set("web",{name:"web"});const r=t.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:e},i=(o,a)=>{r.platforms.set(o,a)},n=o=>{r.platforms.has(o)&&(r.currentPlatform=r.platforms.get(o))};return r.addPlatform=i,r.setPlatform=n,r},N=t=>t.CapacitorPlatforms=Z(t),S=N(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});S.addPlatform;S.setPlatform;exports.ExceptionCode=void 0;(function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"})(exports.ExceptionCode||(exports.ExceptionCode={}));class O extends Error{constructor(e,r,i){super(e),this.message=e,this.code=r,this.data=i}}const ee=t=>{var e,r;return t!=null&&t.androidBridge?"android":!((r=(e=t==null?void 0:t.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||r===void 0)&&r.bridge?"ios":"web"},te=t=>{var e,r,i,n,o;const a=t.CapacitorCustomPlatform||null,s=t.Capacitor||{},f=s.Plugins=s.Plugins||{},l=t.CapacitorPlatforms,E=()=>a!==null?a.name:ee(t),v=((e=l==null?void 0:l.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||E,$=()=>v()!=="web",D=((r=l==null?void 0:l.currentPlatform)===null||r===void 0?void 0:r.isNativePlatform)||$,B=c=>{const d=j.get(c);return!!(d!=null&&d.platforms.has(v())||H(c))},G=((i=l==null?void 0:l.currentPlatform)===null||i===void 0?void 0:i.isPluginAvailable)||B,F=c=>{var d;return(d=s.PluginHeaders)===null||d===void 0?void 0:d.find(y=>y.name===c)},H=((n=l==null?void 0:l.currentPlatform)===null||n===void 0?void 0:n.getPluginHeader)||F,K=c=>t.console.error(c),z=(c,d,y)=>Promise.reject(`${y} does not have an implementation of "${d}".`),j=new Map,V=(c,d={})=>{const y=j.get(c);if(y)return console.warn(`Capacitor plugin "${c}" already registered. Cannot register plugins twice.`),y.proxy;const P=v(),C=H(c);let h;const Q=async()=>(!h&&P in d?h=typeof d[P]=="function"?h=await d[P]():h=d[P]:a!==null&&!h&&"web"in d&&(h=typeof d.web=="function"?h=await d.web():h=d.web),h),X=(u,g)=>{var p,w;if(C){const b=C==null?void 0:C.methods.find(m=>g===m.name);if(b)return b.rtype==="promise"?m=>s.nativePromise(c,g.toString(),m):(m,k)=>s.nativeCallback(c,g.toString(),m,k);if(u)return(p=u[g])===null||p===void 0?void 0:p.bind(u)}else{if(u)return(w=u[g])===null||w===void 0?void 0:w.bind(u);throw new O(`"${c}" plugin is not implemented on ${P}`,exports.ExceptionCode.Unimplemented)}},U=u=>{let g;const p=(...w)=>{const b=Q().then(m=>{const k=X(m,u);if(k){const x=k(...w);return g=x==null?void 0:x.remove,x}else throw new O(`"${c}.${u}()" is not implemented on ${P}`,exports.ExceptionCode.Unimplemented)});return u==="addListener"&&(b.remove=async()=>g()),b};return p.toString=()=>`${u.toString()}() { [capacitor code] }`,Object.defineProperty(p,"name",{value:u,writable:!1,configurable:!1}),p},M=U("addListener"),W=U("removeListener"),Y=(u,g)=>{const p=M({eventName:u},g),w=async()=>{const m=await p;W({eventName:u,callbackId:m},g)},b=new Promise(m=>p.then(()=>m({remove:w})));return b.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await w()},b},A=new Proxy({},{get(u,g){switch(g){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return C?Y:M;case"removeListener":return W;default:return U(g)}}});return f[c]=A,j.set(c,{name:c,proxy:A,platforms:new Set([...Object.keys(d),...C?[P]:[]])}),A},J=((o=l==null?void 0:l.currentPlatform)===null||o===void 0?void 0:o.registerPlugin)||V;return s.convertFileSrc||(s.convertFileSrc=c=>c),s.getPlatform=v,s.handleError=K,s.isNativePlatform=D,s.isPluginAvailable=G,s.pluginMethodNoop=z,s.registerPlugin=J,s.Exception=O,s.DEBUG=!!s.DEBUG,s.isLoggingEnabled=!!s.isLoggingEnabled,s.platform=s.getPlatform(),s.isNative=s.isNativePlatform(),s},re=t=>t.Capacitor=te(t),L=re(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),T=L.registerPlugin;L.Plugins;class _{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,r){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(r);const n=this.windowListeners[e];n&&!n.registered&&this.addWindowListener(n);const o=async()=>this.removeListener(e,r),a=Promise.resolve({remove:o});return Object.defineProperty(a,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await o()}}),a}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,r){const i=this.listeners[e];i&&i.forEach(n=>n(r))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,r){this.windowListeners[r]={registered:!1,windowEventName:e,pluginEventName:r,handler:i=>{this.notifyListeners(r,i)}}}unimplemented(e="not implemented"){return new L.Exception(e,exports.ExceptionCode.Unimplemented)}unavailable(e="not available"){return new L.Exception(e,exports.ExceptionCode.Unavailable)}async removeListener(e,r){const i=this.listeners[e];if(!i)return;const n=i.indexOf(r);this.listeners[e].splice(n,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const R=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),I=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ne extends _{async getCookies(){const e=document.cookie,r={};return e.split(";").forEach(i=>{if(i.length<=0)return;let[n,o]=i.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");n=I(n).trim(),o=I(o).trim(),r[n]=o}),r}async setCookie(e){try{const r=R(e.key),i=R(e.value),n=`; expires=${(e.expires||"").replace("expires=","")}`,o=(e.path||"/").replace("path=",""),a=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${r}=${i||""}${n}; path=${o}; ${a};`}catch(r){return Promise.reject(r)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(r){return Promise.reject(r)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const r of e)document.cookie=r.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}T("CapacitorCookies",{web:()=>new ne});const oe=async t=>new Promise((e,r)=>{const i=new FileReader;i.onload=()=>{const n=i.result;e(n.indexOf(",")>=0?n.split(",")[1]:n)},i.onerror=n=>r(n),i.readAsDataURL(t)}),se=(t={})=>{const e=Object.keys(t);return Object.keys(t).map(n=>n.toLocaleLowerCase()).reduce((n,o,a)=>(n[o]=t[e[a]],n),{})},ie=(t,e=!0)=>t?Object.entries(t).reduce((i,n)=>{const[o,a]=n;let s,f;return Array.isArray(a)?(f="",a.forEach(l=>{s=e?encodeURIComponent(l):l,f+=`${o}=${s}&`}),f.slice(0,-1)):(s=e?encodeURIComponent(a):a,f=`${o}=${s}`),`${i}&${f}`},"").substr(1):null,q=(t,e={})=>{const r=Object.assign({method:t.method||"GET",headers:t.headers},e),n=se(t.headers)["content-type"]||"";if(typeof t.data=="string")r.body=t.data;else if(n.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[a,s]of Object.entries(t.data||{}))o.set(a,s);r.body=o.toString()}else if(n.includes("multipart/form-data")){const o=new FormData;if(t.data instanceof FormData)t.data.forEach((s,f)=>{o.append(f,s)});else for(const s of Object.keys(t.data))o.append(s,t.data[s]);r.body=o;const a=new Headers(r.headers);a.delete("content-type"),r.headers=a}else(n.includes("application/json")||typeof t.data=="object")&&(r.body=JSON.stringify(t.data));return r};class ae extends _{async request(e){const r=q(e,e.webFetchExtra),i=ie(e.params,e.shouldEncodeUrlParams),n=i?`${e.url}?${i}`:e.url,o=await fetch(n,r),a=o.headers.get("content-type")||"";let{responseType:s="text"}=o.ok?e:{};a.includes("application/json")&&(s="json");let f,l;switch(s){case"arraybuffer":case"blob":l=await o.blob(),f=await oe(l);break;case"json":f=await o.json();break;case"document":case"text":default:f=await o.text()}const E={};return o.headers.forEach((v,$)=>{E[$]=v}),{data:f,headers:E,status:o.status,url:o.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}T("CapacitorHttp",{web:()=>new ae});exports.Capacitor=L;exports.CapacitorException=O;exports.CapacitorPlatforms=S;exports.WebPlugin=_;exports.buildRequestInit=q;exports.registerPlugin=T;
@@ -38,33 +38,33 @@ const ee = (t) => {
38
38
  const y = j.get(c);
39
39
  if (y)
40
40
  return console.warn(`Capacitor plugin "${c}" already registered. Cannot register plugins twice.`), y.proxy;
41
- const b = P(), C = T(c);
41
+ const p = P(), C = T(c);
42
42
  let w;
43
- const Q = async () => (!w && b in d ? w = typeof d[b] == "function" ? w = await d[b]() : w = d[b] : a !== null && !w && "web" in d && (w = typeof d.web == "function" ? w = await d.web() : w = d.web), w), X = (u, m) => {
44
- var h, p;
43
+ const Q = async () => (!w && p in d ? w = typeof d[p] == "function" ? w = await d[p]() : w = d[p] : a !== null && !w && "web" in d && (w = typeof d.web == "function" ? w = await d.web() : w = d.web), w), X = (u, m) => {
44
+ var h, v;
45
45
  if (C) {
46
- const v = C == null ? void 0 : C.methods.find((g) => m === g.name);
47
- if (v)
48
- return v.rtype === "promise" ? (g) => o.nativePromise(c, m.toString(), g) : (g, E) => o.nativeCallback(c, m.toString(), g, E);
46
+ const b = C == null ? void 0 : C.methods.find((g) => m === g.name);
47
+ if (b)
48
+ return b.rtype === "promise" ? (g) => o.nativePromise(c, m.toString(), g) : (g, E) => o.nativeCallback(c, m.toString(), g, E);
49
49
  if (u)
50
50
  return (h = u[m]) === null || h === void 0 ? void 0 : h.bind(u);
51
51
  } else {
52
52
  if (u)
53
- return (p = u[m]) === null || p === void 0 ? void 0 : p.bind(u);
54
- throw new S(`"${c}" plugin is not implemented on ${b}`, L.Unimplemented);
53
+ return (v = u[m]) === null || v === void 0 ? void 0 : v.bind(u);
54
+ throw new S(`"${c}" plugin is not implemented on ${p}`, L.Unimplemented);
55
55
  }
56
56
  }, U = (u) => {
57
57
  let m;
58
- const h = (...p) => {
59
- const v = Q().then((g) => {
58
+ const h = (...v) => {
59
+ const b = Q().then((g) => {
60
60
  const E = X(g, u);
61
61
  if (E) {
62
- const $ = E(...p);
62
+ const $ = E(...v);
63
63
  return m = $ == null ? void 0 : $.remove, $;
64
64
  } else
65
- throw new S(`"${c}.${u}()" is not implemented on ${b}`, L.Unimplemented);
65
+ throw new S(`"${c}.${u}()" is not implemented on ${p}`, L.Unimplemented);
66
66
  });
67
- return u === "addListener" && (v.remove = async () => m()), v;
67
+ return u === "addListener" && (b.remove = async () => m()), b;
68
68
  };
69
69
  return h.toString = () => `${u.toString()}() { [capacitor code] }`, Object.defineProperty(h, "name", {
70
70
  value: u,
@@ -72,16 +72,16 @@ const ee = (t) => {
72
72
  configurable: !1
73
73
  }), h;
74
74
  }, _ = U("addListener"), H = U("removeListener"), Y = (u, m) => {
75
- const h = _({ eventName: u }, m), p = async () => {
75
+ const h = _({ eventName: u }, m), v = async () => {
76
76
  const g = await h;
77
77
  H({
78
78
  eventName: u,
79
79
  callbackId: g
80
80
  }, m);
81
- }, v = new Promise((g) => h.then(() => g({ remove: p })));
82
- return v.remove = async () => {
83
- console.warn("Using addListener() without 'await' is deprecated."), await p();
84
- }, v;
81
+ }, b = new Promise((g) => h.then(() => g({ remove: v })));
82
+ return b.remove = async () => {
83
+ console.warn("Using addListener() without 'await' is deprecated."), await v();
84
+ }, b;
85
85
  }, A = new Proxy({}, {
86
86
  get(u, m) {
87
87
  switch (m) {
@@ -103,7 +103,7 @@ const ee = (t) => {
103
103
  proxy: A,
104
104
  platforms: /* @__PURE__ */ new Set([
105
105
  ...Object.keys(d),
106
- ...C ? [b] : []
106
+ ...C ? [p] : []
107
107
  ])
108
108
  }), A;
109
109
  }, J = ((s = l == null ? void 0 : l.currentPlatform) === null || s === void 0 ? void 0 : s.registerPlugin) || V;
@@ -211,9 +211,10 @@ class ne extends q {
211
211
  }
212
212
  }
213
213
  }
214
- const ce = I("CapacitorCookies", {
214
+ I("CapacitorCookies", {
215
215
  web: () => new ne()
216
- }), se = async (t) => new Promise((e, r) => {
216
+ });
217
+ const se = async (t) => new Promise((e, r) => {
217
218
  const i = new FileReader();
218
219
  i.onload = () => {
219
220
  const n = i.result;
@@ -327,7 +328,6 @@ I("CapacitorHttp", {
327
328
  });
328
329
  export {
329
330
  O as Capacitor,
330
- ce as CapacitorCookies,
331
331
  S as CapacitorException,
332
332
  R as CapacitorPlatforms,
333
333
  L as ExceptionCode,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../core/dist/index.cjs"),n=r.registerPlugin("Preferences",{web:()=>Promise.resolve().then(()=>require("./web.cjs")).then(e=>new e.PreferencesWeb)});exports.Preferences=n;
@@ -0,0 +1,7 @@
1
+ import { registerPlugin as r } from "../../../core/dist/index.js";
2
+ const t = r("Preferences", {
3
+ web: () => import("./web.js").then((e) => new e.PreferencesWeb())
4
+ });
5
+ export {
6
+ t as Preferences
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../../core/dist/index.cjs");class p extends c.WebPlugin{constructor(){super(...arguments),this.group="CapacitorStorage"}async configure({group:e}){typeof e=="string"&&(this.group=e)}async get(e){return{value:this.impl.getItem(this.applyPrefix(e.key))}}async set(e){this.impl.setItem(this.applyPrefix(e.key),e.value)}async remove(e){this.impl.removeItem(this.applyPrefix(e.key))}async keys(){return{keys:this.rawKeys().map(t=>t.substring(this.prefix.length))}}async clear(){for(const e of this.rawKeys())this.impl.removeItem(e)}async migrate(){var e;const t=[],s=[],n="_cap_",o=Object.keys(this.impl).filter(i=>i.indexOf(n)===0);for(const i of o){const r=i.substring(n.length),a=(e=this.impl.getItem(i))!==null&&e!==void 0?e:"",{value:l}=await this.get({key:r});typeof l=="string"?s.push(r):(await this.set({key:r,value:a}),t.push(r))}return{migrated:t,existing:s}}async removeOld(){const e="_cap_",t=Object.keys(this.impl).filter(s=>s.indexOf(e)===0);for(const s of t)this.impl.removeItem(s)}get impl(){return window.localStorage}get prefix(){return this.group==="NativeStorage"?"":`${this.group}.`}rawKeys(){return Object.keys(this.impl).filter(e=>e.indexOf(this.prefix)===0)}applyPrefix(e){return this.prefix+e}}exports.PreferencesWeb=p;
@@ -0,0 +1,54 @@
1
+ import { WebPlugin as p } from "../../../core/dist/index.js";
2
+ class f extends p {
3
+ constructor() {
4
+ super(...arguments), this.group = "CapacitorStorage";
5
+ }
6
+ async configure({ group: e }) {
7
+ typeof e == "string" && (this.group = e);
8
+ }
9
+ async get(e) {
10
+ return { value: this.impl.getItem(this.applyPrefix(e.key)) };
11
+ }
12
+ async set(e) {
13
+ this.impl.setItem(this.applyPrefix(e.key), e.value);
14
+ }
15
+ async remove(e) {
16
+ this.impl.removeItem(this.applyPrefix(e.key));
17
+ }
18
+ async keys() {
19
+ return { keys: this.rawKeys().map((t) => t.substring(this.prefix.length)) };
20
+ }
21
+ async clear() {
22
+ for (const e of this.rawKeys())
23
+ this.impl.removeItem(e);
24
+ }
25
+ async migrate() {
26
+ var e;
27
+ const t = [], s = [], n = "_cap_", o = Object.keys(this.impl).filter((i) => i.indexOf(n) === 0);
28
+ for (const i of o) {
29
+ const r = i.substring(n.length), a = (e = this.impl.getItem(i)) !== null && e !== void 0 ? e : "", { value: l } = await this.get({ key: r });
30
+ typeof l == "string" ? s.push(r) : (await this.set({ key: r, value: a }), t.push(r));
31
+ }
32
+ return { migrated: t, existing: s };
33
+ }
34
+ async removeOld() {
35
+ const e = "_cap_", t = Object.keys(this.impl).filter((s) => s.indexOf(e) === 0);
36
+ for (const s of t)
37
+ this.impl.removeItem(s);
38
+ }
39
+ get impl() {
40
+ return window.localStorage;
41
+ }
42
+ get prefix() {
43
+ return this.group === "NativeStorage" ? "" : `${this.group}.`;
44
+ }
45
+ rawKeys() {
46
+ return Object.keys(this.impl).filter((e) => e.indexOf(this.prefix) === 0);
47
+ }
48
+ applyPrefix(e) {
49
+ return this.prefix + e;
50
+ }
51
+ }
52
+ export {
53
+ f as PreferencesWeb
54
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Button.vue2.cjs");const u=["onClick","disabled"],d={key:0},m={key:0,class:"loading"},h=e.createElementVNode("svg",{class:"i-regular",width:"135",height:"140",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:"#fff"},[e.createElementVNode("rect",{y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"60",width:"15",height:"140",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])],-1),b=[h],f={key:0,class:"loading t-white"},g={key:0,class:"error"},v={__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},callback:{type:Function,default:async()=>{console.log("Button callback.")}},callbackDelay:{type:Number,default:750},showSucces:{type:Boolean,default:!0},validation:{type:Boolean,default:!1}},setup(r){const n=r,t=e.ref(null),a=e.ref(null),l=e.ref(!1),o=e.ref(!1);async function s(){t.value.style["pointer-events"]="none",a.value=null,l.value=!0;const i=()=>{t.value&&(t.value.classList.replace("bg-light-main","bg-main"),t.value.style.pointerEvents="auto",l.value=!1,o.value=!1,a.value=null)};try{await n.submit(),t.value.classList.replace("bg-main","bg-light-main"),l.value=!1,n.showSucces?(o.value=!0,setTimeout(i,500)):i(),n.callback&&setTimeout(()=>n.callback(),n.callbackDelay)}catch{t.value.classList.replace("bg-main","bg-fourth-nano"),a.value="❌",setTimeout(()=>{i(),t.value.classList.replace("bg-fourth-nano","bg-main")},1330)}}return(i,c)=>(e.openBlock(),e.createElementBlock("button",{onClick:e.withModifiers(s,["stop"]),disabled:r.validation,ref_key:"button",ref:t,class:"w-100 bg-main button"},[e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[!l.value&&!a.value&&!o.value?(e.openBlock(),e.createElementBlock("span",d,[e.renderSlot(i.$slots,"default")])):e.createCommentVNode("",!0)]),_:3}),e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[l.value&&!a.value?(e.openBlock(),e.createElementBlock("span",m,b)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[o.value&&r.showSucces?(e.openBlock(),e.createElementBlock("span",f,"✔")):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)]),_:1})],8,u))}};exports.default=v;
@@ -1,4 +1,226 @@
1
- const e = "";
1
+ import { ref as c, openBlock as s, createElementBlock as u, withModifiers as p, createVNode as d, Transition as m, withCtx as h, renderSlot as y, createCommentVNode as b, toDisplayString as _, createElementVNode as e, createTextVNode as o } from "vue";
2
+ import "./Button.vue2.js";
3
+ const w = ["onClick", "disabled"], k = { key: 0 }, N = {
4
+ key: 0,
5
+ class: "loading"
6
+ }, x = /* @__PURE__ */ e("svg", {
7
+ class: "i-regular",
8
+ width: "135",
9
+ height: "140",
10
+ viewBox: "0 0 135 140",
11
+ xmlns: "http://www.w3.org/2000/svg",
12
+ fill: "#fff"
13
+ }, [
14
+ /* @__PURE__ */ e("rect", {
15
+ y: "10",
16
+ width: "15",
17
+ height: "120",
18
+ rx: "6"
19
+ }, [
20
+ /* @__PURE__ */ e("animate", {
21
+ attributeName: "height",
22
+ begin: "0.5s",
23
+ dur: "1s",
24
+ values: "120;110;100;90;80;70;60;50;40;140;120",
25
+ calcMode: "linear",
26
+ repeatCount: "indefinite"
27
+ }),
28
+ /* @__PURE__ */ o(),
29
+ /* @__PURE__ */ e("animate", {
30
+ attributeName: "y",
31
+ begin: "0.5s",
32
+ dur: "1s",
33
+ values: "10;15;20;25;30;35;40;45;50;0;10",
34
+ calcMode: "linear",
35
+ repeatCount: "indefinite"
36
+ })
37
+ ]),
38
+ /* @__PURE__ */ e("rect", {
39
+ x: "30",
40
+ y: "10",
41
+ width: "15",
42
+ height: "120",
43
+ rx: "6"
44
+ }, [
45
+ /* @__PURE__ */ e("animate", {
46
+ attributeName: "height",
47
+ begin: "0.25s",
48
+ dur: "1s",
49
+ values: "120;110;100;90;80;70;60;50;40;140;120",
50
+ calcMode: "linear",
51
+ repeatCount: "indefinite"
52
+ }),
53
+ /* @__PURE__ */ o(),
54
+ /* @__PURE__ */ e("animate", {
55
+ attributeName: "y",
56
+ begin: "0.25s",
57
+ dur: "1s",
58
+ values: "10;15;20;25;30;35;40;45;50;0;10",
59
+ calcMode: "linear",
60
+ repeatCount: "indefinite"
61
+ })
62
+ ]),
63
+ /* @__PURE__ */ e("rect", {
64
+ x: "60",
65
+ width: "15",
66
+ height: "140",
67
+ rx: "6"
68
+ }, [
69
+ /* @__PURE__ */ e("animate", {
70
+ attributeName: "height",
71
+ begin: "0s",
72
+ dur: "1s",
73
+ values: "120;110;100;90;80;70;60;50;40;140;120",
74
+ calcMode: "linear",
75
+ repeatCount: "indefinite"
76
+ }),
77
+ /* @__PURE__ */ o(),
78
+ /* @__PURE__ */ e("animate", {
79
+ attributeName: "y",
80
+ begin: "0s",
81
+ dur: "1s",
82
+ values: "10;15;20;25;30;35;40;45;50;0;10",
83
+ calcMode: "linear",
84
+ repeatCount: "indefinite"
85
+ })
86
+ ]),
87
+ /* @__PURE__ */ e("rect", {
88
+ x: "90",
89
+ y: "10",
90
+ width: "15",
91
+ height: "120",
92
+ rx: "6"
93
+ }, [
94
+ /* @__PURE__ */ e("animate", {
95
+ attributeName: "height",
96
+ begin: "0.25s",
97
+ dur: "1s",
98
+ values: "120;110;100;90;80;70;60;50;40;140;120",
99
+ calcMode: "linear",
100
+ repeatCount: "indefinite"
101
+ }),
102
+ /* @__PURE__ */ o(),
103
+ /* @__PURE__ */ e("animate", {
104
+ attributeName: "y",
105
+ begin: "0.25s",
106
+ dur: "1s",
107
+ values: "10;15;20;25;30;35;40;45;50;0;10",
108
+ calcMode: "linear",
109
+ repeatCount: "indefinite"
110
+ })
111
+ ]),
112
+ /* @__PURE__ */ e("rect", {
113
+ x: "120",
114
+ y: "10",
115
+ width: "15",
116
+ height: "120",
117
+ rx: "6"
118
+ }, [
119
+ /* @__PURE__ */ e("animate", {
120
+ attributeName: "height",
121
+ begin: "0.5s",
122
+ dur: "1s",
123
+ values: "120;110;100;90;80;70;60;50;40;140;120",
124
+ calcMode: "linear",
125
+ repeatCount: "indefinite"
126
+ }),
127
+ /* @__PURE__ */ o(),
128
+ /* @__PURE__ */ e("animate", {
129
+ attributeName: "y",
130
+ begin: "0.5s",
131
+ dur: "1s",
132
+ values: "10;15;20;25;30;35;40;45;50;0;10",
133
+ calcMode: "linear",
134
+ repeatCount: "indefinite"
135
+ })
136
+ ])
137
+ ], -1), C = [
138
+ x
139
+ ], T = {
140
+ key: 0,
141
+ class: "loading t-white"
142
+ }, M = {
143
+ key: 0,
144
+ class: "error"
145
+ }, L = {
146
+ __name: "Button",
147
+ props: {
148
+ submit: {
149
+ type: Function,
150
+ default: async () => {
151
+ console.log("Button click.");
152
+ }
153
+ },
154
+ callback: {
155
+ type: Function,
156
+ default: async () => {
157
+ console.log("Button callback.");
158
+ }
159
+ },
160
+ callbackDelay: {
161
+ type: Number,
162
+ default: 750
163
+ },
164
+ showSucces: {
165
+ type: Boolean,
166
+ default: !0
167
+ },
168
+ validation: {
169
+ type: Boolean,
170
+ default: !1
171
+ }
172
+ },
173
+ setup(f) {
174
+ const i = f, t = c(null), a = c(null), n = c(!1), r = c(!1);
175
+ async function g() {
176
+ t.value.style["pointer-events"] = "none", a.value = null, n.value = !0;
177
+ const l = () => {
178
+ t.value && (t.value.classList.replace("bg-light-main", "bg-main"), t.value.style.pointerEvents = "auto", n.value = !1, r.value = !1, a.value = null);
179
+ };
180
+ try {
181
+ await i.submit(), t.value.classList.replace("bg-main", "bg-light-main"), n.value = !1, i.showSucces ? (r.value = !0, setTimeout(l, 500)) : l(), i.callback && setTimeout(() => i.callback(), i.callbackDelay);
182
+ } catch {
183
+ t.value.classList.replace("bg-main", "bg-fourth-nano"), a.value = "❌", setTimeout(() => {
184
+ l(), t.value.classList.replace("bg-fourth-nano", "bg-main");
185
+ }, 1330);
186
+ }
187
+ }
188
+ return (l, v) => (s(), u("button", {
189
+ onClick: p(g, ["stop"]),
190
+ disabled: f.validation,
191
+ ref_key: "button",
192
+ ref: t,
193
+ class: "w-100 bg-main button"
194
+ }, [
195
+ d(m, { name: "TransitionTranslateY-small" }, {
196
+ default: h(() => [
197
+ !n.value && !a.value && !r.value ? (s(), u("span", k, [
198
+ y(l.$slots, "default")
199
+ ])) : b("", !0)
200
+ ]),
201
+ _: 3
202
+ }),
203
+ d(m, { name: "TransitionTranslateY-small" }, {
204
+ default: h(() => [
205
+ n.value && !a.value ? (s(), u("span", N, C)) : b("", !0)
206
+ ]),
207
+ _: 1
208
+ }),
209
+ d(m, { name: "TransitionTranslateY-small" }, {
210
+ default: h(() => [
211
+ r.value && f.showSucces ? (s(), u("span", T, "✔")) : b("", !0)
212
+ ]),
213
+ _: 1
214
+ }),
215
+ d(m, { name: "TransitionTranslateY-small" }, {
216
+ default: h(() => [
217
+ a.value ? (s(), u("span", M, _(a.value), 1)) : b("", !0)
218
+ ]),
219
+ _: 1
220
+ })
221
+ ], 8, w));
222
+ }
223
+ };
2
224
  export {
3
- e as default
225
+ L as default
4
226
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Button.vue.cjs");const u=["onClick","disabled"],d={key:0},m={key:0,class:"loading"},h=e.createElementVNode("svg",{class:"i-regular",width:"135",height:"140",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:"#fff"},[e.createElementVNode("rect",{y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"60",width:"15",height:"140",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])],-1),b=[h],f={key:0,class:"loading t-white"},g={key:0,class:"error"},v={__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},callback:{type:Function,default:async()=>{console.log("Button callback.")}},callbackDelay:{type:Number,default:750},showSucces:{type:Boolean,default:!0},validation:{type:Boolean,default:!1}},setup(r){const n=r,t=e.ref(null),a=e.ref(null),l=e.ref(!1),o=e.ref(!1);async function s(){t.value.style["pointer-events"]="none",a.value=null,l.value=!0;const i=()=>{t.value&&(t.value.classList.replace("bg-light-main","bg-main"),t.value.style.pointerEvents="auto",l.value=!1,o.value=!1,a.value=null)};try{await n.submit(),t.value.classList.replace("bg-main","bg-light-main"),l.value=!1,n.showSucces?(o.value=!0,setTimeout(i,500)):i(),n.callback&&setTimeout(()=>n.callback(),n.callbackDelay)}catch{t.value.classList.replace("bg-main","bg-fourth-nano"),a.value="❌",setTimeout(()=>{i(),t.value.classList.replace("bg-fourth-nano","bg-main")},1330)}}return(i,c)=>(e.openBlock(),e.createElementBlock("button",{onClick:e.withModifiers(s,["stop"]),disabled:r.validation,ref_key:"button",ref:t,class:"w-100 bg-main button"},[e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[!l.value&&!a.value&&!o.value?(e.openBlock(),e.createElementBlock("span",d,[e.renderSlot(i.$slots,"default")])):e.createCommentVNode("",!0)]),_:3}),e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[l.value&&!a.value?(e.openBlock(),e.createElementBlock("span",m,b)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[o.value&&r.showSucces?(e.openBlock(),e.createElementBlock("span",f,"✔")):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"TransitionTranslateY-small"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)]),_:1})],8,u))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;