Files
vuefilemanager/public/chunks/billing.js
2022-03-08 11:50:15 +01:00

2 lines
107 KiB
JavaScript
Vendored
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*! For license information please see billing.js.LICENSE.txt */
(self.webpackChunk=self.webpackChunk||[]).push([[6754],{2316:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var a=r(3645),n=r.n(a)()((function(t){return t[1]}));n.push([t.id,".label[data-v-2e087afb]{align-items:center;display:flex}.label .label-dot[data-v-2e087afb]{border-radius:8px;display:block;flex:none;height:8px;margin-right:10px;width:8px}.label .label-dot.success[data-v-2e087afb]{background:#0abb87}.label .label-dot.danger[data-v-2e087afb]{background:#fd397a}.label .label-dot.warning[data-v-2e087afb]{background:#ffb822}.label .label-dot.info[data-v-2e087afb]{background:#5578eb}.label .label-dot.primary[data-v-2e087afb]{background:red}.label .label-dot.purple[data-v-2e087afb]{background:#9d66fe}.label .label-dot.secondary[data-v-2e087afb]{background:#e1e1ef}.label .label-title[data-v-2e087afb]{font-size:16px;font-weight:700}",""]);const i=n},9935:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var a=r(3645),n=r.n(a)()((function(t){return t[1]}));n.push([t.id,".chart-progress.success[data-v-561dbfda]{background:#0abb87;box-shadow:0 3px 10px rgba(10,187,135,.5)}.chart-progress.danger[data-v-561dbfda]{background:#fd397a;box-shadow:0 3px 10px rgba(253,57,122,.5)}.chart-progress.warning[data-v-561dbfda]{background:#ffb822;box-shadow:0 3px 10px rgba(255,184,34,.5)}.chart-progress.info[data-v-561dbfda]{background:#5578eb;box-shadow:0 3px 10px rgba(85,120,235,.5)}.chart-progress.purple[data-v-561dbfda]{background:#9d66fe;box-shadow:0 3px 10px rgba(157,102,254,.5)}.chart-progress.secondary[data-v-561dbfda]{background:#e1e1ef;box-shadow:0 3px 10px rgba(225,225,239,.5)}.dark .chart-progress.secondary[data-v-561dbfda]{background:#282a2f!important;box-shadow:0 3px 10px rgba(40,42,47,.5)!important}",""]);const i=n},6798:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var a=r(3645),n=r.n(a)()((function(t){return t[1]}));n.push([t.id,".color-label.purple[data-v-d470f17c]{background:rgba(157,102,254,.1);color:#9d66fe}.color-label.yellow[data-v-d470f17c]{background:rgba(255,189,45,.1);color:#ffbd2d}.color-label.green[data-v-d470f17c]{background:rgba(0,188,126,.1);color:#00bc7e}.color-label.red[data-v-d470f17c]{background:rgba(253,57,122,.1);color:#fd397a}",""]);const i=n},9397:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var a=r(3645),n=r.n(a)()((function(t){return t[1]}));n.push([t.id,".info-box[data-v-4d9e9780]{background:#f4f5f6;border-radius:10px;margin-bottom:32px;padding:20px;text-align:left}.info-box.error[data-v-4d9e9780]{background:rgba(253,57,122,.1)}.info-box.error a[data-v-4d9e9780],.info-box.error p[data-v-4d9e9780]{color:#fd397a}.info-box.error a[data-v-4d9e9780]{text-decoration:underline}.info-box p[data-v-4d9e9780]{font-weight:600;line-height:1.6;word-break:break-word}.info-box p[data-v-4d9e9780],.info-box p[data-v-4d9e9780] a{font-size:15px}.info-box p[data-v-4d9e9780] b{font-size:15px;font-weight:700}.info-box a[data-v-4d9e9780],.info-box b[data-v-4d9e9780]{font-weight:700}.info-box a[data-v-4d9e9780]{font-size:.9375em;line-height:1.6}.info-box ul[data-v-4d9e9780]{margin-top:15px}.info-box ul[data-v-4d9e9780],.info-box ul li[data-v-4d9e9780],.info-box ul li a[data-v-4d9e9780]{display:block}@media only screen and (max-width:690px){.info-box[data-v-4d9e9780]{padding:15px}}.dark .info-box[data-v-4d9e9780]{background:#1e2024}.dark .info-box.error[data-v-4d9e9780]{background:rgba(253,57,122,.1)}.dark .info-box.error a[data-v-4d9e9780],.dark .info-box.error p[data-v-4d9e9780]{color:#fd397a}.dark .info-box.error a[data-v-4d9e9780]{text-decoration:underline}.dark .info-box p[data-v-4d9e9780],.dark .info-box ul li[data-v-4d9e9780]{color:#bec6cf}",""]);const i=n},1213:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var a=r(3645),n=r.n(a)()((function(t){return t[1]}));n.push([t.id,"",""]);const i=n},9611:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var a=r(3645),n=r.n(a)()((function(t){return t[1]}));n.push([t.id,".table-row[data-v-4f806708]{border-radius:8px}.table-row[data-v-4f806708]:hover{background:#f4f5f6}.table-row .table-cell[data-v-4f806708]{padding-bottom:15px;padding-top:15px}.table-row .table-cell[data-v-4f806708]:first-child{padding-left:15px}.table-row .table-cell[data-v-4f806708]:last-child{padding-right:15px;text-align:right}.table-row .table-cell span[data-v-4f806708]{font-size:1em;font-weight:700}",""]);const i=n},9495:function(t,e,r){!function(t,e){"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=r(e),n={code:"en",messages:{alpha:"The {_field_} field may only contain alphabetic characters",alpha_num:"The {_field_} field may only contain alpha-numeric characters",alpha_dash:"The {_field_} field may contain alpha-numeric characters as well as dashes and underscores",alpha_spaces:"The {_field_} field may only contain alphabetic characters as well as spaces",between:"The {_field_} field must be between {min} and {max}",confirmed:"The {_field_} field confirmation does not match",digits:"The {_field_} field must be numeric and exactly contain {length} digits",dimensions:"The {_field_} field must be {width} pixels by {height} pixels",email:"The {_field_} field must be a valid email",excluded:"The {_field_} field is not a valid value",ext:"The {_field_} field is not a valid file",image:"The {_field_} field must be an image",integer:"The {_field_} field must be an integer",length:"The {_field_} field must be {length} long",max_value:"The {_field_} field must be {max} or less",max:"The {_field_} field may not be greater than {length} characters",mimes:"The {_field_} field must have a valid file type",min_value:"The {_field_} field must be {min} or more",min:"The {_field_} field must be at least {length} characters",numeric:"The {_field_} field may only contain numeric characters",oneOf:"The {_field_} field is not a valid value",regex:"The {_field_} field format is invalid",required_if:"The {_field_} field is required",required:"The {_field_} field is required",size:"The {_field_} field size must be less than {size}KB",double:"The {_field_} field must be a valid decimal"}},i={en:/^[A-Z]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[A-ZÆØÅ]*$/i,de:/^[A-ZÄÖÜß]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,it:/^[A-Z\xC0-\xFF]*$/i,lt:/^[A-ZĄČĘĖĮŠŲŪŽ]*$/i,nl:/^[A-ZÉËÏÓÖÜ]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ro:/^[A-ZĂÂÎŞŢ]*$/i,ru:/^[А-ЯЁ]*$/i,sk:/^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,sr:/^[A-ZČĆŽŠĐ]*$/i,sv:/^[A-ZÅÄÖ]*$/i,tr:/^[A-ZÇĞİıÖŞÜ]*$/i,uk:/^[А-ЩЬЮЯЄІЇҐ]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,az:/^[A-ZÇƏĞİıÖŞÜ]*$/i,el:/^[Α-ώ]*$/i,ja:/^[A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF]*$/i,he:/^[A-Z\u05D0-\u05EA']*$/i},s={en:/^[A-Z\s]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ\s]*$/i,da:/^[A-ZÆØÅ\s]*$/i,de:/^[A-ZÄÖÜß\s]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ\s]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\s]*$/i,it:/^[A-Z\xC0-\xFF\s]*$/i,lt:/^[A-ZĄČĘĖĮŠŲŪŽ\s]*$/i,nl:/^[A-ZÉËÏÓÖÜ\s]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ\s]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ\s]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ\s]*$/i,ro:/^[A-ZĂÂÎŞŢ\s]*$/i,ru:/^[А-ЯЁ\s]*$/i,sk:/^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ\s]*$/i,sr:/^[A-ZČĆŽŠĐ\s]*$/i,sv:/^[A-ZÅÄÖ\s]*$/i,tr:/^[A-ZÇĞİıÖŞÜ\s]*$/i,uk:/^[А-ЩЬЮЯЄІЇҐ\s]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\s]*$/,az:/^[A-ZÇƏĞİıÖŞÜ\s]*$/i,el:/^[Α-ώ\s]*$/i,ja:/^[A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\s]*$/i,he:/^[A-Z\u05D0-\u05EA'\s]*$/i},o={en:/^[0-9A-Z]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[0-9A-ZÆØÅ]$/i,de:/^[0-9A-ZÄÖÜß]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,it:/^[0-9A-Z\xC0-\xFF]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ro:/^[0-9A-ZĂÂÎŞŢ]*$/i,ru:/^[0-9А-ЯЁ]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,sr:/^[0-9A-ZČĆŽŠĐ]*$/i,sv:/^[0-9A-ZÅÄÖ]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ]*$/i,uk:/^[0-9А-ЩЬЮЯЄІЇҐ]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ]*$/i,el:/^[0-9Α-ώ]*$/i,ja:/^[0-9A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF]*$/i,he:/^[0-9A-Z\u05D0-\u05EA']*$/i},l={en:/^[0-9A-Z_-]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ_-]*$/i,da:/^[0-9A-ZÆØÅ_-]*$/i,de:/^[0-9A-ZÄÖÜß_-]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,it:/^[0-9A-Z\xC0-\xFF_-]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ_-]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ_-]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ_-]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ_-]*$/i,ro:/^[0-9A-ZĂÂÎŞŢ_-]*$/i,ru:/^[0-9А-ЯЁ_-]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ_-]*$/i,sr:/^[0-9A-ZČĆŽŠĐ_-]*$/i,sv:/^[0-9A-ZÅÄÖ_-]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,uk:/^[0-9АЬЮЯЄІЇҐ_-]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ_-]*$/i,el:/^[0-9Α-ώ_-]*$/i,ja:/^[0-9A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF_-]*$/i,he:/^[0-9A-Z\u05D0-\u05EA'_-]*$/i},u=function(t,e){var r=(void 0===e?{}:e).locale,a=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return u(t,{locale:a})})):a?(i[a]||i.en).test(t):Object.keys(i).some((function(e){return i[e].test(t)}))},c={validate:u,params:[{name:"locale"}]},d=function(t,e){var r=(void 0===e?{}:e).locale,a=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return d(t,{locale:a})})):a?(l[a]||l.en).test(t):Object.keys(l).some((function(e){return l[e].test(t)}))},f={validate:d,params:[{name:"locale"}]},p=function(t,e){var r=(void 0===e?{}:e).locale,a=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return p(t,{locale:a})})):a?(o[a]||o.en).test(t):Object.keys(o).some((function(e){return o[e].test(t)}))},v={validate:p,params:[{name:"locale"}]},m=function(t,e){var r=(void 0===e?{}:e).locale,a=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return m(t,{locale:a})})):a?(s[a]||s.en).test(t):Object.keys(s).some((function(e){return s[e].test(t)}))},h={validate:m,params:[{name:"locale"}]},b=function(t,e){var r=void 0===e?{}:e,a=r.min,n=r.max;return Array.isArray(t)?t.every((function(t){return!!b(t,{min:a,max:n})})):Number(a)<=t&&Number(n)>=t},g={validate:b,params:[{name:"min"},{name:"max"}]},y={validate:function(t,e){var r=e.target;return String(t)===String(r)},params:[{name:"target",isTarget:!0}]},_=function(t,e){var r=e.length;if(Array.isArray(t))return t.every((function(t){return _(t,{length:r})}));var a=String(t);return/^[0-9]*$/.test(a)&&a.length===r},x={validate:_,params:[{name:"length",cast:function(t){return Number(t)}}]},w=function(t,e,r){var a=window.URL||window.webkitURL;return new Promise((function(n){var i=new Image;i.onerror=function(){return n(!1)},i.onload=function(){return n(i.width===e&&i.height===r)},i.src=a.createObjectURL(t)}))},$=function(t,e){var r=e.width,a=e.height,n=[];t=Array.isArray(t)?t:[t];for(var i=0;i<t.length;i++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(t[i].name))return Promise.resolve(!1);n.push(t[i])}return Promise.all(n.map((function(t){return w(t,r,a)}))).then((function(t){return t.every((function(t){return t}))}))},k={validate:$,params:[{name:"width",cast:function(t){return Number(t)}},{name:"height",cast:function(t){return Number(t)}}]},A={validate:function(t,e){var r=(void 0===e?{}:e).multiple,a=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return r&&!Array.isArray(t)&&(t=String(t).split(",").map((function(t){return t.trim()}))),Array.isArray(t)?t.every((function(t){return a.test(String(t))})):a.test(String(t))},params:[{name:"multiple",default:!1}]};function C(t){return t!=t}function O(t){return null==t}function S(t){return Array.isArray(t)&&0===t.length}var P=function(t){return null!==t&&t&&"object"==typeof t&&!Array.isArray(t)};function Z(t,e){return!(!C(t)||!C(e))||t===e}function j(t){return""!==t&&!O(t)}function F(t){return"function"==typeof t}function E(t){return F(t)&&!!t.__locatorRef}function I(t,e){var r=Array.isArray(t)?t:D(t);if(F(r.findIndex))return r.findIndex(e);for(var a=0;a<r.length;a++)if(e(r[a],a))return a;return-1}function T(t,e){var r=Array.isArray(t)?t:D(t),a=I(r,e);return-1===a?void 0:r[a]}function B(t,e){return-1!==t.indexOf(e)}function D(t){return F(Array.from)?Array.from(t):z(t)}function z(t){for(var e=[],r=t.length,a=0;a<r;a++)e.push(t[a]);return e}function R(t){return F(Object.values)?Object.values(t):Object.keys(t).map((function(e){return t[e]}))}function U(t,e){return Object.keys(e).forEach((function(r){if(P(e[r]))return t[r]||(t[r]={}),void U(t[r],e[r]);t[r]=e[r]})),t}function M(){return{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:!1,invalid:!1,validated:!1,pending:!1,required:!1,changed:!1,passed:!1,failed:!1}}function L(t){return t}function q(t,e,r){return void 0===e&&(e=0),void 0===r&&(r={cancelled:!1}),0===e?t:function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=function(){a=void 0,r.cancelled||t.apply(void 0,n)};clearTimeout(a),a=setTimeout(s,e)};var a}function V(t){console.warn("[vee-validate] "+t)}function N(t,e){return t.replace(/{([^}]+)}/g,(function(t,r){return r in e?e[r]:"{"+r+"}"}))}var W=function(t,e){return Array.isArray(t)?t.every((function(t){return W(t,e)})):D(e).some((function(e){return e==t}))},Y={validate:W},H={validate:function(t,e){return!W(t,e)}},G=function(t,e){var r=new RegExp(".("+e.join("|")+")$","i");return Array.isArray(t)?t.every((function(t){return r.test(t.name)})):r.test(t.name)},K={validate:G},J=function(t){var e=/\.(jpg|svg|jpeg|png|bmp|gif|webp)$/i;return Array.isArray(t)?t.every((function(t){return e.test(t.name)})):e.test(t.name)},X={validate:J},Q={validate:function(t){return Array.isArray(t)?t.every((function(t){return/^-?[0-9]+$/.test(String(t))})):/^-?[0-9]+$/.test(String(t))}},tt={validate:function(t,e){return t===e.other},params:[{name:"other"}]},et={validate:function(t,e){return t!==e.other},params:[{name:"other"}]},rt=function(t,e){var r=e.length;return!O(t)&&("string"==typeof t&&(t=D(t)),"number"==typeof t&&(t=String(t)),t.length||(t=D(t)),t.length===r)},at={validate:rt,params:[{name:"length",cast:function(t){return Number(t)}}]},nt=function(t,e){var r=e.length;return O(t)?r>=0:Array.isArray(t)?t.every((function(t){return nt(t,{length:r})})):String(t).length<=r},it={validate:nt,params:[{name:"length",cast:function(t){return Number(t)}}]},st=function(t,e){var r=e.max;return!O(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return st(t,{max:r})})):Number(t)<=r)},ot={validate:st,params:[{name:"max",cast:function(t){return Number(t)}}]},lt=function(t,e){var r=new RegExp(e.join("|").replace("*",".+")+"$","i");return Array.isArray(t)?t.every((function(t){return r.test(t.type)})):r.test(t.type)},ut={validate:lt},ct=function(t,e){var r=e.length;return!O(t)&&(Array.isArray(t)?t.every((function(t){return ct(t,{length:r})})):String(t).length>=r)},dt={validate:ct,params:[{name:"length",cast:function(t){return Number(t)}}]},ft=function(t,e){var r=e.min;return!O(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return ft(t,{min:r})})):Number(t)>=r)},pt={validate:ft,params:[{name:"min",cast:function(t){return Number(t)}}]},vt=/^[٠١٢٣٤٥٦٧٨٩]+$/,mt=/^[0-9]+$/,ht={validate:function(t){var e=function(t){var e=String(t);return mt.test(e)||vt.test(e)};return Array.isArray(t)?t.every(e):e(t)}},bt=function(t,e){var r=e.regex;return Array.isArray(t)?t.every((function(t){return bt(t,{regex:r})})):r.test(String(t))},gt={validate:bt,params:[{name:"regex",cast:function(t){return"string"==typeof t?new RegExp(t):t}}]},yt={validate:function(t,e){var r=(void 0===e?{allowFalse:!0}:e).allowFalse,a={valid:!1,required:!0};return O(t)||S(t)?a:!1!==t||r?(a.valid=!!String(t).trim().length,a):a},params:[{name:"allowFalse",default:!0}],computesRequired:!0},_t=function(t){return S(t)||B([!1,null,void 0],t)||!String(t).trim().length},xt=function(t,e){var r,a=e.target,n=e.values;return n&&n.length?(Array.isArray(n)||"string"!=typeof n||(n=[n]),r=n.some((function(t){return t==String(a).trim()}))):r=!_t(a),r?{valid:!_t(t),required:r}:{valid:!0,required:r}},wt={validate:xt,params:[{name:"target",isTarget:!0},{name:"values"}],computesRequired:!0},$t=function(t,e){var r=e.size;if(isNaN(r))return!1;var a=1024*r;if(!Array.isArray(t))return t.size<=a;for(var n=0;n<t.length;n++)if(t[n].size>a)return!1;return!0},kt={validate:$t,params:[{name:"size",cast:function(t){return Number(t)}}]},At=function(t,e){var r=e||{},a=r.decimals,n=void 0===a?0:a,i=r.separator,s=new RegExp("^-?\\d+"+("comma"===(void 0===i?"dot":i)?",?":"\\.?")+(0===n?"\\d*":"(\\d{"+n+"})?")+"$");return Array.isArray(t)?t.every((function(t){return s.test(String(t))})):s.test(String(t))},Ct={validate:At,params:[{name:"decimals",default:0},{name:"separator",default:"dot"}]},Ot=Object.freeze({__proto__:null,alpha_dash:f,alpha_num:v,alpha_spaces:h,alpha:c,between:g,confirmed:y,digits:x,dimensions:k,email:A,ext:K,image:X,oneOf:Y,integer:Q,length:at,is_not:et,is:tt,max:it,max_value:ot,mimes:ut,min:dt,min_value:pt,excluded:H,numeric:ht,regex:gt,required:yt,required_if:wt,size:kt,double:Ct}),St=function(){return St=Object.assign||function(t){for(var e,r=1,a=arguments.length;r<a;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},St.apply(this,arguments)};function Pt(t,e,r,a){function n(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function s(t){try{l(a.next(t))}catch(t){i(t)}}function o(t){try{l(a.throw(t))}catch(t){i(t)}}function l(t){t.done?r(t.value):n(t.value).then(s,o)}l((a=a.apply(t,e||[])).next())}))}function Zt(t,e){var r,a,n,i,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(t){return function(e){return l([t,e])}}function l(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,a&&(n=2&i[0]?a.return:i[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;switch(a=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,a=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){s.label=i[1];break}if(6===i[0]&&s.label<n[1]){s.label=n[1],n=i;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(i);break}n[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}catch(t){i=[6,t],a=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}function jt(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var a=Array(t),n=0;for(e=0;e<r;e++)for(var i=arguments[e],s=0,o=i.length;s<o;s++,n++)a[n]=i[s];return a}var Ft=St({},{defaultMessage:"{_field_} is not valid.",skipOptional:!0,classes:{touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"},bails:!0,mode:"aggressive",useConstraintAttrs:!0}),Et=function(){return Ft},It=function(t){Ft=St(St({},Ft),t)},Tt=function(t){It(t)},Bt=new a.default;function Dt(){Bt.$emit("change:locale")}var zt,Rt=function(){function t(t,e){this.container={},this.locale=t,this.merge(e)}return t.prototype.resolve=function(t,e,r){return this.format(this.locale,t,e,r)},t.prototype.format=function(t,e,r,a){var n,i,s,o,l,u,c,d,f,p=null===(s=null===(i=null===(n=this.container[t])||void 0===n?void 0:n.fields)||void 0===i?void 0:i[e])||void 0===s?void 0:s[r],v=null===(l=null===(o=this.container[t])||void 0===o?void 0:o.messages)||void 0===l?void 0:l[r];return(f=p||v||"")||(f="{_field_} is not valid"),e=null!==(d=null===(c=null===(u=this.container[t])||void 0===u?void 0:u.names)||void 0===c?void 0:c[e])&&void 0!==d?d:e,F(f)?f(e,a):N(f,St(St({},a),{_field_:e}))},t.prototype.merge=function(t){U(this.container,t)},t.prototype.hasRule=function(t){var e,r;return!!(null===(r=null===(e=this.container[this.locale])||void 0===e?void 0:e.messages)||void 0===r?void 0:r[t])},t}();function Ut(t,e){var r;if(zt||(zt=new Rt("en",{}),It({defaultMessage:function(t,e){return zt.resolve(t,null==e?void 0:e._rule_,e||{})}})),"string"==typeof t)return zt.locale=t,e&&zt.merge(((r={})[t]=e,r)),void Dt();zt.merge(t)}var Mt={};function Lt(t){var e;return(null===(e=t.params)||void 0===e?void 0:e.length)&&(t.params=t.params.map((function(t){return"string"==typeof t?{name:t}:t}))),t}var qt=function(){function t(){}return t.extend=function(t,e){var r=Lt(e);Mt[t]?Mt[t]=U(Mt[t],e):Mt[t]=St({lazy:!1,computesRequired:!1},r)},t.isLazy=function(t){var e;return!!(null===(e=Mt[t])||void 0===e?void 0:e.lazy)},t.isRequireRule=function(t){var e;return!!(null===(e=Mt[t])||void 0===e?void 0:e.computesRequired)},t.getRuleDefinition=function(t){return Mt[t]},t}();function Vt(t,e){Nt(t,e),"object"!=typeof e?qt.extend(t,{validate:e}):qt.extend(t,e)}function Nt(t,e){if(!F(e)&&!F(e.validate)&&!qt.getRuleDefinition(t))throw new Error("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.")}var Wt={aggressive:function(){return{on:["input","blur"]}},eager:function(t){return t.errors.length?{on:["input","change"]}:{on:["change","blur"]}},passive:function(){return{on:[]}},lazy:function(){return{on:["change","blur"]}}},Yt=function(t,e){if(It({mode:t}),e){if(!F(e))throw new Error("A mode implementation must be a function");Wt[t]=e}};function Ht(t){var e={};return Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t?P(t)&&t._$$isNormalized?t:P(t)?Object.keys(t).reduce((function(e,r){var a=[];return a=!0===t[r]?[]:Array.isArray(t[r])||P(t[r])?t[r]:[t[r]],!1!==t[r]&&(e[r]=Gt(r,a)),e}),e):"string"!=typeof t?(V("rules must be either a string or an object."),e):t.split("|").reduce((function(t,e){var r=Kt(e);return r.name?(t[r.name]=Gt(r.name,r.params),t):t}),e):e}function Gt(t,e){var r=qt.getRuleDefinition(t);if(!r)return e;var a,n,i={};if(!r.params&&!Array.isArray(e))throw new Error("You provided an object params to a rule that has no defined schema.");if(Array.isArray(e)&&!r.params)return e;a=!r.params||r.params.length<e.length&&Array.isArray(e)?e.map((function(t,e){var a,i=null===(a=r.params)||void 0===a?void 0:a[e];return n=i||n,i||(i=n),i})):r.params;for(var s=0;s<a.length;s++){var o=a[s],l=o.default;Array.isArray(e)?s in e&&(l=e[s]):o.name in e?l=e[o.name]:1===a.length&&(l=e),o.isTarget&&(l=Jt(l,o.cast)),"string"==typeof l&&"@"===l[0]&&(l=Jt(l.slice(1),o.cast)),!E(l)&&o.cast&&(l=o.cast(l)),i[o.name]?(i[o.name]=Array.isArray(i[o.name])?i[o.name]:[i[o.name]],i[o.name].push(l)):i[o.name]=l}return i}var Kt=function(t){var e=[],r=t.split(":")[0];return B(t,":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:r,params:e}};function Jt(t,e){var r=function(r){var a=r[t];return e?e(a):a};return r.__locatorRef=t,r}function Xt(t){return Array.isArray(t)?t.filter((function(t){return E(t)||"string"==typeof t&&"@"===t[0]})):Object.keys(t).filter((function(e){return E(t[e])})).map((function(e){return t[e]}))}function Qt(t,e,r){return void 0===r&&(r={}),Pt(this,void 0,void 0,(function(){var a,n,i,s,o,l;return Zt(this,(function(u){switch(u.label){case 0:return a=null==r?void 0:r.bails,n=null==r?void 0:r.skipIfEmpty,[4,te({name:(null==r?void 0:r.name)||"{field}",rules:Ht(e),bails:null==a||a,skipIfEmpty:null==n||n,forceRequired:!1,crossTable:(null==r?void 0:r.values)||{},names:(null==r?void 0:r.names)||{},customMessages:(null==r?void 0:r.customMessages)||{}},t,r)];case 1:return i=u.sent(),s=[],o={},l={},i.errors.forEach((function(t){var e=t.msg();s.push(e),o[t.rule]=e,l[t.rule]=t.msg})),[2,{valid:i.valid,required:i.required,errors:s,failedRules:o,regenerateMap:l}]}}))}))}function te(t,e,r){var a=(void 0===r?{}:r).isInitial,n=void 0!==a&&a;return Pt(this,void 0,void 0,(function(){var r,a,i,s,o,l,u,c,d;return Zt(this,(function(f){switch(f.label){case 0:return[4,ee(t,e)];case 1:if(r=f.sent(),a=r.shouldSkip,i=r.required,s=r.errors,a)return[2,{valid:!s.length,required:i,errors:s}];o=Object.keys(t.rules).filter((function(t){return!qt.isRequireRule(t)})),l=o.length,u=0,f.label=2;case 2:return u<l?n&&qt.isLazy(o[u])?[3,4]:(c=o[u],[4,re(t,e,{name:c,params:t.rules[c]})]):[3,5];case 3:if(!(d=f.sent()).valid&&d.error&&(s.push(d.error),t.bails))return[2,{valid:!1,required:i,errors:s}];f.label=4;case 4:return u++,[3,2];case 5:return[2,{valid:!s.length,required:i,errors:s}]}}))}))}function ee(t,e){return Pt(this,void 0,void 0,(function(){var r,a,n,i,s,o,l,u,c;return Zt(this,(function(d){switch(d.label){case 0:r=Object.keys(t.rules).filter(qt.isRequireRule),a=r.length,n=[],i=O(e)||""===e||S(e),s=i&&t.skipIfEmpty,l=0,d.label=1;case 1:return l<a?(u=r[l],[4,re(t,e,{name:u,params:t.rules[u]})]):[3,4];case 2:if(c=d.sent(),!P(c))throw new Error("Require rules has to return an object (see docs)");if(void 0!==c.required&&(o=c.required),!c.valid&&c.error&&(n.push(c.error),t.bails))return[2,{shouldSkip:!0,required:c.required,errors:n}];d.label=3;case 3:return l++,[3,1];case 4:return i&&!o&&!t.skipIfEmpty||!t.bails&&!s?[2,{shouldSkip:!1,required:o,errors:n}]:[2,{shouldSkip:!o&&i,required:o,errors:n}]}}))}))}function re(t,e,r){return Pt(this,void 0,void 0,(function(){var a,n,i,s,o;return Zt(this,(function(l){switch(l.label){case 0:if(!(a=qt.getRuleDefinition(r.name))||!a.validate)throw new Error("No such validator '"+r.name+"' exists.");return n=a.castValue?a.castValue(e):e,i=oe(r.params,t.crossTable),[4,a.validate(n,i)];case 1:return"string"==typeof(s=l.sent())?(o=St(St({},i||{}),{_field_:t.name,_value_:e,_rule_:r.name}),[2,{valid:!1,error:{rule:r.name,msg:function(){return N(s,o)}}}]):(P(s)||(s={valid:s}),[2,{valid:s.valid,required:s.required,error:s.valid?void 0:ae(t,e,a,r.name,i)}])}}))}))}function ae(t,e,r,a,n){var i,s=null!==(i=t.customMessages[a])&&void 0!==i?i:r.message,o=ne(t,r,a),l=ie(t,r,a,s),u=l.userTargets,c=l.userMessage,d=St(St(St(St({},n||{}),{_field_:t.name,_value_:e,_rule_:a}),o),u);return{msg:function(){return se(c||Et().defaultMessage,t.name,d)},rule:a}}function ne(t,e,r){var a=e.params;if(!a)return{};var n=a.filter((function(t){return t.isTarget})).length;if(n<=0)return{};var i={},s=t.rules[r];!Array.isArray(s)&&P(s)&&(s=a.map((function(t){return s[t.name]})));for(var o=0;o<a.length;o++){var l=a[o],u=s[o];if(E(u)){u=u.__locatorRef;var c=t.names[u]||u;i[l.name]=c,i["_"+l.name+"_"]=t.crossTable[u]}}return i}function ie(t,e,r,a){var n={},i=t.rules[r],s=e.params||[];return i?(Object.keys(i).forEach((function(e,r){var a=i[e];if(!E(a))return{};var o=s[r];if(!o)return{};var l=a.__locatorRef;n[o.name]=t.names[l]||l,n["_"+o.name+"_"]=t.crossTable[l]})),{userTargets:n,userMessage:a}):{}}function se(t,e,r){return"function"==typeof t?t(e,r):N(t,St(St({},r),{_field_:e}))}function oe(t,e){if(Array.isArray(t))return t.map((function(t){var r="string"==typeof t&&"@"===t[0]?t.slice(1):t;return r in e?e[r]:t}));var r={},a=function(t){return E(t)?t(e):t};return Object.keys(t).forEach((function(e){r[e]=a(t[e])})),r}var le=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var a,n,i;if(Array.isArray(e)){if((a=e.length)!=r.length)return!1;for(n=a;0!=n--;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((a=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(n=a;0!=n--;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=a;0!=n--;){var s=i[n];if(!t(e[s],r[s]))return!1}return!0}return e!=e&&r!=r},ue=function(t){return!!(t&&("undefined"!=typeof Event&&F(Event)&&t instanceof Event||t&&t.srcElement))};function ce(t){var e,r;if(!ue(t))return t;var a=t.target;if("file"===a.type&&a.files)return D(a.files);if(null===(e=a._vModifiers)||void 0===e?void 0:e.number){var n=parseFloat(a.value);return C(n)?a.value:n}return(null===(r=a._vModifiers)||void 0===r?void 0:r.trim)&&"string"==typeof a.value?a.value.trim():a.value}var de=function(t){var e,r=(null===(e=t.data)||void 0===e?void 0:e.attrs)||t.elm;return!("input"!==t.tag||r&&r.type)||"textarea"===t.tag||B(["text","password","search","email","tel","url","number"],null==r?void 0:r.type)};function fe(t){if(t.data){var e=t.data;if("model"in e)return e.model;if(t.data.directives)return T(t.data.directives,(function(t){return"model"===t.name}))}}function pe(t){var e,r,a=fe(t);if(a)return{value:a.value};var n=he(t),i=(null==n?void 0:n.prop)||"value";return(null===(e=t.componentOptions)||void 0===e?void 0:e.propsData)&&i in t.componentOptions.propsData?{value:t.componentOptions.propsData[i]}:(null===(r=t.data)||void 0===r?void 0:r.domProps)&&"value"in t.data.domProps?{value:t.data.domProps.value}:void 0}function ve(t){return Array.isArray(t)?t:Array.isArray(t.children)?t.children:t.componentOptions&&Array.isArray(t.componentOptions.children)?t.componentOptions.children:[]}function me(t){return Array.isArray(t)||void 0===pe(t)?ve(t).reduce((function(t,e){var r=me(e);return r.length&&t.push.apply(t,r),t}),[]):[t]}function he(t){return t.componentOptions?t.componentOptions.Ctor.options.model:null}function be(t,e,r){if(O(t[e]))t[e]=[r];else{if(F(t[e])&&t[e].fns){var a=t[e];return a.fns=Array.isArray(a.fns)?a.fns:[a.fns],void(B(a.fns,r)||a.fns.push(r))}if(F(t[e])){var n=t[e];t[e]=[n]}Array.isArray(t[e])&&!B(t[e],r)&&t[e].push(r)}}function ge(t,e,r){t.data||(t.data={}),O(t.data.on)&&(t.data.on={}),be(t.data.on,e,r)}function ye(t,e,r){t.componentOptions&&(t.componentOptions.listeners||(t.componentOptions.listeners={}),be(t.componentOptions.listeners,e,r))}function _e(t,e,r){t.componentOptions?ye(t,e,r):ge(t,e,r)}function xe(t,e){var r;return t.componentOptions?(he(t)||{event:"input"}).event:(null===(r=null==e?void 0:e.modifiers)||void 0===r?void 0:r.lazy)?"change":de(t)?"input":"change"}function we(t){return B(["input","select","textarea"],t.tag)}function $e(t,e){var r=[];return Object.keys(t).reduce((function(r,a){return t[a].forEach((function(r){r.context||(t[a].context=e,r.data||(r.data={}),r.data.slot=a)})),r.concat(t[a])}),r)}function ke(t){var e,r=null===(e=t.data)||void 0===e?void 0:e.attrs,a={};return r?("email"===r.type&&qt.getRuleDefinition("email")&&(a.email=["multiple"in r]),r.pattern&&qt.getRuleDefinition("regex")&&(a.regex=r.pattern),r.maxlength>=0&&qt.getRuleDefinition("max")&&(a.max=r.maxlength),r.minlength>=0&&qt.getRuleDefinition("min")&&(a.min=r.minlength),"number"===r.type&&(j(r.min)&&qt.getRuleDefinition("min_value")&&(a.min_value=Number(r.min)),j(r.max)&&qt.getRuleDefinition("max_value")&&(a.max_value=Number(r.max))),a):a}function Ae(t){var e,r=["input","select","textarea"],a=null===(e=t.data)||void 0===e?void 0:e.attrs;if(!B(r,t.tag)||!a)return{};var n={};return"required"in a&&!1!==a.required&&qt.getRuleDefinition("required")&&(n.required="checkbox"!==a.type||[!0]),de(t)?Ht(St(St({},n),ke(t))):Ht(n)}function Ce(t,e){return t.$scopedSlots.default?t.$scopedSlots.default(e)||[]:t.$slots.default||[]}function Oe(t,e){return!(t._ignoreImmediate||!t.immediate)||!(Z(t.value,e)||!t.normalizedEvents.length)||!!t._needsValidation||!t.initialized&&void 0===e}function Se(t){return St(St({},t.flags),{errors:t.errors,classes:t.classes,failedRules:t.failedRules,reset:function(){return t.reset()},validate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.validate.apply(t,e)},ariaInput:{"aria-invalid":t.flags.invalid?"true":"false","aria-required":t.isRequired?"true":"false","aria-errormessage":"vee_"+t.id},ariaMsg:{id:"vee_"+t.id,"aria-live":t.errors.length?"assertive":"off"}})}function Pe(t,e){t.initialized||(t.initialValue=e);var r=Oe(t,e);if(t._needsValidation=!1,t.value=e,t._ignoreImmediate=!0,r){var a=function(){if(t.immediate||t.flags.validated)return je(t);t.validateSilent()};t.initialized?a():t.$once("hook:mounted",(function(){return a()}))}}function Ze(t){return(F(t.mode)?t.mode:Wt[t.mode])(t)}function je(t){var e=t.validateSilent();return t._pendingValidation=e,e.then((function(r){return e===t._pendingValidation&&(t.applyResult(r),t._pendingValidation=void 0),r}))}function Fe(t){t.$veeOnInput||(t.$veeOnInput=function(e){t.syncValue(e),t.setFlags({dirty:!0,pristine:!1})});var e=t.$veeOnInput;t.$veeOnBlur||(t.$veeOnBlur=function(){t.setFlags({touched:!0,untouched:!1})});var r=t.$veeOnBlur,a=t.$veeHandler,n=Ze(t);return a&&t.$veeDebounce===t.debounce||(a=q((function(){t.$nextTick((function(){t._pendingReset||je(t),t._pendingReset=!1}))}),n.debounce||t.debounce),t.$veeHandler=a,t.$veeDebounce=t.debounce),{onInput:e,onBlur:r,onValidate:a}}function Ee(t,e){var r=pe(e);t._inputEventName=t._inputEventName||xe(e,fe(e)),Pe(t,null==r?void 0:r.value);var a=Fe(t),n=a.onInput,i=a.onBlur,s=a.onValidate;_e(e,t._inputEventName,n),_e(e,"blur",i),t.normalizedEvents.forEach((function(t){_e(e,t,s)})),t.initialized=!0}var Ie=0;function Te(){var t="";return{errors:[],value:void 0,initialized:!1,initialValue:void 0,flags:M(),failedRules:{},isActive:!0,fieldName:t,id:""}}var Be=a.default.extend({name:"ValidationProvider",inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver||(this.$vnode.context.$_veeObserver=Me()),this.$vnode.context.$_veeObserver}}},props:{vid:{type:String,default:""},name:{type:String,default:null},mode:{type:[String,Function],default:function(){return Et().mode}},rules:{type:[Object,String],default:null},immediate:{type:Boolean,default:!1},bails:{type:Boolean,default:function(){return Et().bails}},skipIfEmpty:{type:Boolean,default:function(){return Et().skipOptional}},debounce:{type:Number,default:0},tag:{type:String,default:"span"},slim:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},customMessages:{type:Object,default:function(){return{}}},detectInput:{type:Boolean,default:!0}},watch:{rules:{deep:!0,handler:function(t,e){this._needsValidation=!le(t,e)}}},data:Te,computed:{fieldDeps:function(){var t=this;return Object.keys(this.normalizedRules).reduce((function(e,r){var a=Xt(t.normalizedRules[r]).map((function(t){return E(t)?t.__locatorRef:t.slice(1)}));return e.push.apply(e,a),a.forEach((function(e){Le(t,e)})),e}),[])},normalizedEvents:function(){var t=this;return(Ze(this).on||[]).map((function(e){return"input"===e?t._inputEventName:e}))},isRequired:function(){var t=St(St({},this._resolvedRules),this.normalizedRules),e=Object.keys(t).some(qt.isRequireRule);return this.flags.required=!!e,e},classes:function(){return De(Et().classes,this.flags)},normalizedRules:function(){return Ht(this.rules)}},mounted:function(){var t=this,e=function(){if(t.flags.validated){var e=t._regenerateMap;if(e){var r=[],a={};return Object.keys(e).forEach((function(t){var n=e[t]();r.push(n),a[t]=n})),void t.applyResult({errors:r,failedRules:a,regenerateMap:e})}t.validate()}};Bt.$on("change:locale",e),this.$on("hook:beforeDestroy",(function(){Bt.$off("change:locale",e)}))},render:function(t){var e=this;this.registerField();var r=Ce(this,Se(this));if(this.detectInput){var a=me(r);a.length&&a.forEach((function(t,r){var a,n,i,s,o,l;if(B(["checkbox","radio"],null===(n=null===(a=t.data)||void 0===a?void 0:a.attrs)||void 0===n?void 0:n.type)||!(r>0)){var u=Et().useConstraintAttrs?Ae(t):{};le(e._resolvedRules,u)||(e._needsValidation=!0),we(t)&&(e.fieldName=(null===(s=null===(i=t.data)||void 0===i?void 0:i.attrs)||void 0===s?void 0:s.name)||(null===(l=null===(o=t.data)||void 0===o?void 0:o.attrs)||void 0===l?void 0:l.id)),e._resolvedRules=u,Ee(e,t)}}))}return this.slim&&r.length<=1?r[0]:t(this.tag,r)},beforeDestroy:function(){this.$_veeObserver.unobserve(this.id)},activated:function(){this.isActive=!0},deactivated:function(){this.isActive=!1},methods:{setFlags:function(t){var e=this;Object.keys(t).forEach((function(r){e.flags[r]=t[r]}))},syncValue:function(t){var e=ce(t);this.value=e,this.flags.changed=!le(this.initialValue,e)},reset:function(){var t=this;this.errors=[],this.initialValue=this.value;var e=M();e.required=this.isRequired,this.setFlags(e),this.failedRules={},this.validateSilent(),this._pendingValidation=void 0,this._pendingReset=!0,setTimeout((function(){t._pendingReset=!1}),this.debounce)},validate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Pt(this,void 0,void 0,(function(){return Zt(this,(function(e){return t.length>0&&this.syncValue(t[0]),[2,je(this)]}))}))},validateSilent:function(){return Pt(this,void 0,void 0,(function(){var t,e;return Zt(this,(function(r){switch(r.label){case 0:return this.setFlags({pending:!0}),t=St(St({},this._resolvedRules),this.normalizedRules),Object.defineProperty(t,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),[4,Qt(this.value,t,St(St({name:this.name||this.fieldName},ze(this)),{bails:this.bails,skipIfEmpty:this.skipIfEmpty,isInitial:!this.initialized,customMessages:this.customMessages}))];case 1:return e=r.sent(),this.setFlags({pending:!1,valid:e.valid,invalid:!e.valid}),void 0!==e.required&&this.setFlags({required:e.required}),[2,e]}}))}))},setErrors:function(t){this.applyResult({errors:t,failedRules:{}})},applyResult:function(t){var e=t.errors,r=t.failedRules,a=t.regenerateMap;this.errors=e,this._regenerateMap=a,this.failedRules=St({},r||{}),this.setFlags({valid:!e.length,passed:!e.length,invalid:!!e.length,failed:!!e.length,validated:!0,changed:!le(this.value,this.initialValue)})},registerField:function(){Ue(this)},checkComputesRequiredState:function(){var t=St(St({},this._resolvedRules),this.normalizedRules);return Object.keys(t).some(qt.isRequireRule)}}});function De(t,e){for(var r={},a=Object.keys(e),n=a.length,i=function(n){var i=a[n],s=t&&t[i]||i,o=e[i];return O(o)?"continue":"valid"!==i&&"invalid"!==i||e.validated?void("string"==typeof s?r[s]=o:Array.isArray(s)&&s.forEach((function(t){r[t]=o}))):"continue"},s=0;s<n;s++)i(s);return r}function ze(t){var e=t.$_veeObserver.refs,r={names:{},values:{}};return t.fieldDeps.reduce((function(t,r){return e[r]?(t.values[r]=e[r].value,t.names[r]=e[r].name,t):t}),r)}function Re(t){return t.vid?t.vid:t.name?t.name:t.id?t.id:t.fieldName?t.fieldName:"_vee_"+ ++Ie}function Ue(t){var e=Re(t),r=t.id;!t.isActive||r===e&&t.$_veeObserver.refs[r]||(r!==e&&t.$_veeObserver.refs[r]===t&&t.$_veeObserver.unobserve(r),t.id=e,t.$_veeObserver.observe(t))}function Me(){return{refs:{},observe:function(t){this.refs[t.id]=t},unobserve:function(t){delete this.refs[t]}}}function Le(t,e,r){void 0===r&&(r=!0);var a=t.$_veeObserver.refs;if(t._veeWatchers||(t._veeWatchers={}),!a[e]&&r)return t.$once("hook:mounted",(function(){Le(t,e,!1)}));!F(t._veeWatchers[e])&&a[e]&&(t._veeWatchers[e]=a[e].$watch("value",(function(){var e=t.checkComputesRequiredState();t.flags.validated&&(t._needsValidation=!0,t.validate()),e&&!t.flags.validated&&t.validateSilent()})))}var qe=[["pristine","every"],["dirty","some"],["touched","some"],["untouched","every"],["valid","every"],["invalid","some"],["pending","some"],["validated","every"],["changed","some"],["passed","every"],["failed","some"]],Ve=0;function Ne(){return{id:"",refs:{},observers:[],errors:{},flags:Je(),fields:{}}}function We(){return{$_veeObserver:this}}var Ye=a.default.extend({name:"ValidationObserver",provide:We,inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver?this.$vnode.context.$_veeObserver:null}}},props:{tag:{type:String,default:"span"},vid:{type:String,default:function(){return"obs_"+Ve++}},slim:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:Ne,created:function(){var t=this;this.id=this.vid,Ge(this);var e=q((function(e){var r=e.errors,a=e.flags,n=e.fields;t.errors=r,t.flags=a,t.fields=n}),16);this.$watch(Xe,e)},activated:function(){Ge(this)},deactivated:function(){He(this)},beforeDestroy:function(){He(this)},render:function(t){var e=Ce(this,Ke(this));return this.slim&&e.length<=1?e[0]:t(this.tag,{on:this.$listeners},e)},methods:{observe:function(t,e){var r;void 0===e&&(e="provider"),"observer"!==e?this.refs=St(St({},this.refs),((r={})[t.id]=t,r)):this.observers.push(t)},unobserve:function(t,e){if(void 0===e&&(e="provider"),"provider"!==e){var r=I(this.observers,(function(e){return e.id===t}));-1!==r&&this.observers.splice(r,1)}else{if(!this.refs[t])return;this.$delete(this.refs,t)}},validateWithInfo:function(t){var e=(void 0===t?{}:t).silent,r=void 0!==e&&e;return Pt(this,void 0,void 0,(function(){var t,e,a,n,i,s;return Zt(this,(function(o){switch(o.label){case 0:return[4,Promise.all(jt(R(this.refs).filter((function(t){return!t.disabled})).map((function(t){return t[r?"validateSilent":"validate"]().then((function(t){return t.valid}))})),this.observers.filter((function(t){return!t.disabled})).map((function(t){return t.validate({silent:r})}))))];case 1:return t=o.sent(),e=t.every((function(t){return t})),a=Xe.call(this),n=a.errors,i=a.flags,s=a.fields,this.errors=n,this.flags=i,this.fields=s,[2,{errors:n,flags:i,fields:s,isValid:e}]}}))}))},validate:function(t){var e=(void 0===t?{}:t).silent,r=void 0!==e&&e;return Pt(this,void 0,void 0,(function(){return Zt(this,(function(t){switch(t.label){case 0:return[4,this.validateWithInfo({silent:r})];case 1:return[2,t.sent().isValid]}}))}))},handleSubmit:function(t){return Pt(this,void 0,void 0,(function(){return Zt(this,(function(e){switch(e.label){case 0:return[4,this.validate()];case 1:return e.sent()&&t?[2,t()]:[2]}}))}))},reset:function(){return jt(R(this.refs),this.observers).forEach((function(t){return t.reset()}))},setErrors:function(t){var e=this;Object.keys(t).forEach((function(r){var a=e.refs[r];if(a){var n=t[r]||[];n="string"==typeof n?[n]:n,a.setErrors(n)}})),this.observers.forEach((function(e){e.setErrors(t)}))}}});function He(t){t.$_veeObserver&&t.$_veeObserver.unobserve(t.id,"observer")}function Ge(t){t.$_veeObserver&&t.$_veeObserver.observe(t,"observer")}function Ke(t){return St(St({},t.flags),{errors:t.errors,fields:t.fields,validate:t.validate,validateWithInfo:t.validateWithInfo,passes:t.handleSubmit,handleSubmit:t.handleSubmit,reset:t.reset})}function Je(){return St(St({},M()),{valid:!0,invalid:!1})}function Xe(){for(var t=jt(R(this.refs),this.observers.filter((function(t){return!t.disabled}))),e={},r=Je(),a={},n=t.length,i=0;i<n;i++){var s=t[i];Array.isArray(s.errors)?(e[s.id]=s.errors,a[s.id]=St({id:s.id,name:s.name,failedRules:s.failedRules},s.flags)):(e=St(St({},e),s.errors),a=St(St({},a),s.fields))}return qe.forEach((function(e){var a=e[0],n=e[1];r[a]=t[n]((function(t){return t.flags[a]}))})),{errors:e,flags:r,fields:a}}function Qe(t,e){var r;void 0===e&&(e=L);var a="options"in t?t.options:t,n=Be.options,i={name:(a.name||"AnonymousHoc")+"WithValidation",props:St({},n.props),data:n.data,computed:St({},n.computed),methods:St({},n.methods),beforeDestroy:n.beforeDestroy,inject:n.inject},s=(null===(r=null==a?void 0:a.model)||void 0===r?void 0:r.event)||"input";return i.render=function(t){var r;this.registerField();var n=Se(this),i=St({},this.$listeners),o=fe(this.$vnode);this._inputEventName=this._inputEventName||xe(this.$vnode,o);var l=pe(this.$vnode);Pe(this,null==l?void 0:l.value);var u=Fe(this),c=u.onInput,d=u.onBlur,f=u.onValidate;be(i,s,c),be(i,"blur",d),this.normalizedEvents.forEach((function(t){be(i,t,f)}));var p=(he(this.$vnode)||{prop:"value"}).prop,v=St(St(St({},this.$attrs),((r={})[p]=null==o?void 0:o.value,r)),e(n));return t(a,{attrs:this.$attrs,props:v,on:i,scopedSlots:this.$scopedSlots},$e(this.$slots,this.$vnode.context))},i}var tr="3.4.14";Object.keys(Ot).map((function(t){return{schema:Ot[t],name:t}})).forEach((function(t){Vt(t.name,t.schema)})),Ut("en",n),t.Rules=Ot,t.ValidationObserver=Ye,t.ValidationProvider=Be,t.configure=Tt,t.extend=Vt,t.localeChanged=Dt,t.localize=Ut,t.normalizeRules=Ht,t.setInteractionMode=Yt,t.validate=Qt,t.version=tr,t.withValidation=Qe,Object.defineProperty(t,"__esModule",{value:!0})}(e,r(538))},5218:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const a={name:"AppInputButton",props:["description","isLast","title","error"]};const n=(0,r(1900).Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"w-full justify-between space-y-4 sm:flex sm:space-x-8 sm:space-x-2 sm:space-y-0",class:{"mb-6 sm:mb-7":!t.isLast}},[r("div",{staticClass:"leading-5"},[r("label",{staticClass:"mb-1.5 block text-sm font-bold text-gray-700 dark:text-gray-200"},[t._v(" "+t._s(t.title)+": ")]),t._v(" "),t.description?r("span",{staticClass:"block text-xs leading-4 dark:text-gray-500 text-gray-500",domProps:{innerHTML:t._s(t.description)}}):t._e(),t._v(" "),t.error?r("span",{staticClass:"error-message"},[t._v("\n "+t._s(t.error)+"\n ")]):t._e()]),t._v(" "),r("div",[t._t("default")],2)])}),[],!1,null,null,null).exports},9183:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const a={name:"AppInputSwitch",props:["description","isLast","title","error"]};const n=(0,r(1900).Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex w-full items-center justify-between space-x-2 sm:space-x-8",class:{"mb-6 sm:mb-7":!t.isLast}},[r("div",{staticClass:"leading-5"},[r("label",{staticClass:"mb-1.5 block text-sm font-bold text-gray-700 dark:text-gray-200"},[t._v(" "+t._s(t.title)+": ")]),t._v(" "),t.description?r("span",{staticClass:"block text-xs leading-4 dark:text-gray-500 text-gray-500",domProps:{innerHTML:t._s(t.description)}}):t._e(),t._v(" "),t.error?r("span",{staticClass:"error-message"},[t._v("\n "+t._s(t.error)+"\n ")]):t._e()]),t._v(" "),r("div",[t._t("default")],2)])}),[],!1,null,null,null).exports},4198:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const a={name:"AppInputText",props:["description","isLast","title","error"]};const n=(0,r(1900).Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{class:{"mb-6 sm:mb-7":!t.isLast}},[t.title?r("label",{staticClass:"mb-1.5 block text-sm font-bold text-gray-700 dark:text-gray-200"},[t._v("\n "+t._s(t.title)+":\n ")]):t._e(),t._v(" "),t._t("default"),t._v(" "),t.error?r("span",{staticClass:"pt-2 text-xs text-rose-600"},[t._v("\n "+t._s(t.error)+"\n ")]):t._e(),t._v(" "),t.description?r("small",{staticClass:"block pt-2 text-xs leading-4 dark:text-gray-500 text-gray-500",domProps:{innerHTML:t._s(t.description)}}):t._e()],2)}),[],!1,null,null,null).exports},9275:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});const a={name:"DotLabel",props:["color","title"]};var n=r(3379),i=r.n(n),s=r(2316),o={insert:"head",singleton:!1};i()(s.Z,o);s.Z.locals;var l=r(1900);const u={name:"ProgressLine",props:["data"],components:{DotLabel:(0,l.Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"label"},[r("span",{class:["label-dot",t.color]}),t._v(" "),r("b",{staticClass:"label-title"},[t._v("\n "+t._s(t.title)+"\n ")])])}),[],!1,null,"2e087afb",null).exports}};var c=r(9935),d={insert:"head",singleton:!1};i()(c.Z,d);c.Z.locals;const f=(0,l.Z)(u,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"mb-4 flex h-2.5 items-center rounded bg-light-300 dark:bg-2x-dark-foreground"},t._l(t.data,(function(e,a){return r("div",{key:a,staticClass:"chart-wrapper",style:{width:(e.progress>1?e.progress:0)+"%"}},[1===t.data.length?r("span",{staticClass:"chart-progress block h-2.5 w-full",class:[{"rounded-tl-lg rounded-bl-lg border-r-2 border-white dark:border-gray-800":e.progress<100,"rounded-lg border-none":e.progress>=100},e.color]}):t._e(),t._v(" "),t.data.length>1&&e.progress>0?r("span",{staticClass:"chart-progress block h-2.5 w-full",class:[{"rounded-tl-lg rounded-bl-lg border-r-2 border-white dark:border-gray-800":0===a,"border-r-2 border-white dark:border-gray-800":a<t.data.length-1,"rounded-tr-lg rounded-br-lg":a===t.data.length-1},e.color]}):t._e()])})),0),t._v(" "),r("footer",{staticClass:"flex w-full items-center overflow-x-auto"},t._l(t.data,(function(t,e){return r("DotLabel",{key:e,staticClass:"mr-5",attrs:{color:t.color,title:t.title}})})),1)])}),[],!1,null,"561dbfda",null).exports},167:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const a={name:"MemberAvatar",props:["isBorder","member","size"],computed:{letter:function(){return(this.member.data.attributes.name?this.member.data.attributes.name:this.member.data.attributes.email).substr(0,1)},borderRadius:function(){return this.size>32?"rounded-xl":"rounded-lg"},fontSize:function(){return this.size>42?"text-lg":this.size>32?"text-base":"text-sm"},avatar:function(){return this.size>=52?this.member.data.attributes.avatar.md:this.size>32?this.member.data.attributes.avatar.sm:this.member.data.attributes.avatar.xs}}};const n=(0,r(1900).Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"shrink-0 grow-0"},[t.member.data.attributes.avatar?r("img",{staticClass:"object-cover mx-auto",class:[t.borderRadius,{"border-3 border-white dark:border-dark-background":t.isBorder}],style:{width:t.size+"px",height:t.size+"px"},attrs:{src:t.avatar}}):r("div",{staticClass:"flex items-center justify-center mx-auto",class:[t.borderRadius,{"border-3 border-white dark:border-dark-background":t.isBorder,"dark:bg-4x-dark-foreground bg-light-background":!t.member.data.attributes.color}],style:{width:t.size+"px",height:t.size+"px",background:t.member.data.attributes.color?t.member.data.attributes.color:""}},[r("span",{staticClass:"font-extrabold uppercase dark:text-gray-400 text-gray-900",class:t.fontSize},[t._v("\n "+t._s(t.letter)+"\n ")])])])}),[],!1,null,null,null).exports},3426:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});const a={name:"ColorLabel",props:["color"]};var n=r(3379),i=r.n(n),s=r(6798),o={insert:"head",singleton:!1};i()(s.Z,o);s.Z.locals;const l=(0,r(1900).Z)(a,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("b",{staticClass:"color-label inline-block rounded-lg py-1 px-2 text-xs font-bold capitalize",class:t.color},[t._t("default")],2)}),[],!1,null,"d470f17c",null).exports},808:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var a=r(9101);const n={name:"FormLabel",props:["icon"],components:{ListIcon:a.DE2,MailIcon:a.bV6,InfoIcon:a.szr,DatabaseIcon:a.VHe,UsersIcon:a.oyc,CreditCardIcon:a.ciH,DollarSignIcon:a.bkH,SmartphoneIcon:a.BEV,HardDriveIcon:a.zvn,BarChartIcon:a.eJP,SettingsIcon:a.ewm,FileTextIcon:a.zPP,ShieldIcon:a.b7C,FrownIcon:a.eFi,Edit2Icon:a.me4,BellIcon:a.Dkj,KeyIcon:a._m8}};const i=(0,r(1900).Z)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mb-8 flex items-center"},[t.icon?t._e():r("edit-2-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}),t._v(" "),"frown"===t.icon?r("frown-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"list"===t.icon?r("list-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"info"===t.icon?r("info-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"database"===t.icon?r("database-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"file-text"===t.icon?r("file-text-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"dollar"===t.icon?r("dollar-sign-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"credit-card"===t.icon?r("credit-card-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"bar-chart"===t.icon?r("bar-chart-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"settings"===t.icon?r("settings-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"hard-drive"===t.icon?r("hard-drive-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"mail"===t.icon?r("mail-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"smartphone"===t.icon?r("smartphone-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"shield"===t.icon?r("shield-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"bell"===t.icon?r("bell-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"key"===t.icon?r("key-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"users"===t.icon?r("users-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),r("b",{staticClass:"text-md font-bold dark:text-gray-200 sm:text-lg"},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},6291:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});const a={name:"InfoBox",props:["type"]};var n=r(3379),i=r.n(n),s=r(9397),o={insert:"head",singleton:!1};i()(s.Z,o);s.Z.locals;const l=(0,r(1900).Z)(a,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"info-box",class:t.type},[t._t("default")],2)}),[],!1,null,"4d9e9780",null).exports},2792:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});const a={name:"PageTab",props:["isLoading"],components:{Spinner:r(7318).Z}};var n=r(3379),i=r.n(n),s=r(1213),o={insert:"head",singleton:!1};i()(s.Z,o);s.Z.locals;const l=(0,r(1900).Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"page-tab"},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isLoading,expression:"isLoading"}],attrs:{id:"loader"}},[r("Spinner")],1),t._v(" "),t._t("default")],2)}),[],!1,null,"6c76a2be",null).exports},8720:(t,e,r)=>{"use strict";r.d(e,{Z:()=>v});var a=r(9101);const n={props:["data"],computed:{normalizedColumns:function(){return this.data.id&&delete this.data.id,Object.values(this.data)}}};var i=r(3379),s=r.n(i),o=r(9611),l={insert:"head",singleton:!1};s()(o.Z,l);o.Z.locals;var u=r(1900);const c=(0,u.Z)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("tr",{staticClass:"table-row"},t._l(t.normalizedColumns,(function(e,a){return r("td",{key:a,staticClass:"table-cell"},[r("span",[t._v(t._s(e))])])})),0)}),[],!1,null,"4f806708",null).exports;var d=r(9669),f=r.n(d);const p={name:"DatatableWrapper",props:["paginator","tableData","columns","scope","api"],components:{ChevronRightIcon:a.XCv,ChevronLeftIcon:a.wyc,DatatableCell:c,ChevronUpIcon:a.g8U},computed:{hasData:function(){return this.data&&this.data.data&&this.data.data.length>0},floatPages:function(){return[this.pageIndex-1,this.pageIndex,this.pageIndex+1]}},data:function(){return{data:void 0,isLoading:!0,pageIndex:1,filter:{sort:"DESC",field:void 0}}},methods:{goToPage:function(t){t>this.data.meta.last_page||0===t||(this.pageIndex=t,this.getPage(t))},sort:function(t,e){e&&(this.filter.field=t,"DESC"===this.filter.sort?this.filter.sort="ASC":"ASC"===this.filter.sort&&(this.filter.sort="DESC"),this.getPage(this.pageIndex))},getPage:function(t){var e=this;this.URI=this.api,this.paginator&&(this.URI=this.URI+"?page="+t),this.filter.field&&(this.URI=this.URI+(this.paginator?"&":"?")+"sort="+this.filter.field+"&direction="+this.filter.sort),this.isLoading=!0,f().get(this.URI).then((function(t){e.data=t.data,e.$emit("data",t.data)})).catch((function(){return e.$isSomethingWrong()})).finally((function(){e.$emit("init",!0),e.isLoading=!1}))}},created:function(){this.api&&this.getPage(this.pageIndex),this.tableData&&(this.data=this.tableData,this.isLoading=!1)}};const v=(0,u.Z)(p,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"w-full"},[t.hasData?r("table",{staticClass:"w-full"},[r("thead",[r("tr",{staticClass:"whitespace-nowrap"},t._l(t.columns,(function(e,a){return e.hidden?t._e():r("th",{key:a,staticClass:"text-left",class:{"sortable cursor-pointer":e.sortable,"text-right":Object.values(t.columns).length-1===a},on:{click:function(r){return t.sort(e.field,e.sortable)}}},[r("span",{staticClass:"text-xs text-gray-400 dark:text-gray-500"},[t._v("\n "+t._s(e.label)+"\n ")]),t._v(" "),e.sortable?r("chevron-up-icon",{staticClass:"vue-feather inline-block text-gray-300 dark:text-gray-500",class:{"arrow-down":"ASC"===t.filter.sort},attrs:{size:"12"}}):t._e()],1)})),0)]),t._v(" "),r("tbody",{staticClass:"table-body"},[t._l(t.data.data,(function(e){return t._t("default",(function(){return[r("DatatableCell",{key:e.id,attrs:{data:e}})]}),{row:e})}))],2)]):t._e(),t._v(" "),t.isLoading||t.hasData?t._e():t._t("empty-page"),t._v(" "),t.paginator&&t.hasData?r("div",{staticClass:"mt-6 flex items-center justify-between"},[t.data.meta.total>15&&t.data.meta.last_page<=6?r("ul",{staticClass:"pagination flex items-center"},[r("li",{staticClass:"previous inline-block p-1"},[r("a",{staticClass:"page-link",class:{"cursor-default opacity-20":1===t.pageIndex},on:{click:function(e){return t.goToPage(t.pageIndex-1)}}},[r("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t._l(t.data.meta.last_page,(function(e,a){return r("li",{key:a,staticClass:"inline-block p-1",on:{click:function(r){return t.goToPage(e)}}},[r("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===e}},[t._v("\n "+t._s(e)+"\n ")])])})),t._v(" "),r("li",{staticClass:"next inline-block p-1"},[r("a",{staticClass:"page-link",class:{"cursor-default opacity-20":t.pageIndex===t.data.meta.last_page},on:{click:function(e){return t.goToPage(t.pageIndex+1)}}},[r("chevron-right-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)])],2):t._e(),t._v(" "),t.data.meta.total>15&&t.data.meta.last_page>6?r("ul",{staticClass:"pagination flex items-center"},[r("li",{staticClass:"previous inline-block p-1"},[r("a",{staticClass:"page-link",class:{"cursor-default opacity-20":1===t.pageIndex},on:{click:function(e){return t.goToPage(t.pageIndex-1)}}},[r("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t.pageIndex>=5?r("li",{staticClass:"inline-block p-1",on:{click:function(e){return t.goToPage(1)}}},[r("a",{staticClass:"page-link"},[t._v(" 1 ")])]):t._e(),t._v(" "),t._l(5,(function(e,a){return t.pageIndex<5?r("li",{key:a,staticClass:"inline-block p-1",on:{click:function(r){return t.goToPage(e)}}},[r("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===e}},[t._v("\n "+t._s(e)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex>=5?r("li",{staticClass:"inline-block p-1"},[r("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(t.floatPages,(function(e,a){return t.pageIndex>=5&&t.pageIndex<t.data.meta.last_page-3?r("li",{key:a,staticClass:"inline-block p-1",on:{click:function(r){return t.goToPage(e)}}},[r("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===e}},[t._v("\n "+t._s(e)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex<t.data.meta.last_page-3?r("li",{staticClass:"inline-block p-1"},[r("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(5,(function(e,a){return t.pageIndex>t.data.meta.last_page-4?r("li",{key:a,staticClass:"inline-block p-1",on:{click:function(e){t.goToPage(t.data.meta.last_page-(4-a))}}},[r("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===t.data.meta.last_page-(4-a)}},[t._v("\n "+t._s(t.data.meta.last_page-(4-a))+"\n ")])]):t._e()})),t._v(" "),t.pageIndex<t.data.meta.last_page-3?r("li",{staticClass:"inline-block p-1",on:{click:function(e){return t.goToPage(t.data.meta.last_page)}}},[r("a",{staticClass:"page-link"},[t._v("\n "+t._s(t.data.meta.last_page)+"\n ")])]):t._e(),t._v(" "),r("li",{staticClass:"next inline-block p-1"},[r("a",{staticClass:"page-link",class:{"cursor-default opacity-20":t.pageIndex===t.data.meta.last_page},on:{click:function(e){return t.goToPage(t.pageIndex+1)}}},[r("chevron-right-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)])],2):t._e(),t._v(" "),r("span",{staticClass:"text-xs text-gray-600 dark:text-gray-500"},[t._v("\n Showing "+t._s(t.data.meta.from)+" - "+t._s(t.data.meta.to)+" from "+t._s(t.data.meta.total)+" records\n ")])]):t._e()],2)}),[],!1,null,null,null).exports},4716:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var a=r(167),n=r(2547),i=r(3426),s=r(9101);const o={name:"FixedTransactionRow",components:{MeteredTransactionDetailRow:n.Z,MemberAvatar:a.Z,FileTextIcon:s.zPP,ColorLabel:i.Z,EyeIcon:s.tEF},props:{row:{},user:{type:Boolean,default:!1}},data:function(){return{showedTransactionDetailById:void 0}},methods:{showTransactionDetail:function(t){this.showedTransactionDetailById===t?this.showedTransactionDetailById=void 0:this.showedTransactionDetailById=t}}};const l=(0,r(1900).Z)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("tr",{staticClass:"whitespace-nowrap border-b border-dashed border-light dark:border-opacity-5"},[r("td",{staticClass:"py-5 pr-3 md:pr-1"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.note)+"\n ")])]),t._v(" "),t.user?r("td",{staticClass:"whitespace-nowrap px-3 md:px-1"},[t.row.data.relationships.user?r("div",{staticClass:"flex items-center"},[r("MemberAvatar",{attrs:{"is-border":!1,size:36,member:t.row.data.relationships.user}}),t._v(" "),r("div",{staticClass:"ml-3 pr-10"},[r("b",{staticClass:"max-w-1 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold",staticStyle:{"max-width":"155px"}},[t._v("\n "+t._s(t.row.data.relationships.user.data.attributes.name)+"\n ")]),t._v(" "),r("span",{staticClass:"block text-xs text-gray-600 dark:text-gray-500"},[t._v("\n "+t._s(t.row.data.relationships.user.data.attributes.email)+"\n ")])])],1):t._e(),t._v(" "),t.row.data.relationships.user?t._e():r("span",{staticClass:"text-xs font-bold text-gray-500"},[t._v("\n "+t._s(t.$t("User was deleted"))+"\n ")])]):t._e(),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("ColorLabel",{staticClass:"capitalize",attrs:{color:t.$getTransactionStatusColor(t.row.data.attributes.status)}},[t._v("\n "+t._s(t.row.data.attributes.status)+"\n ")])],1),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold",class:t.$getTransactionTypeTextColor(t.row.data.attributes.type)},[t._v("\n "+t._s(t.$getTransactionMark(t.row.data.attributes.type)+t.row.data.attributes.price)+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.created_at)+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("div",{staticClass:"w-28"},[r("img",{staticClass:"inline-block max-h-5",attrs:{src:t.$getPaymentLogo(t.row.data.attributes.driver),alt:t.row.data.attributes.driver}})])]),t._v(" "),r("td",{staticClass:"pl-3 text-right md:pl-1"},[r("div",{staticClass:"inline-block"},[r("a",{staticClass:"inline-block flex h-8 w-8 cursor-pointer items-center justify-center rounded-md bg-light-background transition-colors hover:bg-purple-100 dark:bg-2x-dark-foreground",attrs:{href:t.$getInvoiceLink(t.row.data.id),target:"_blank"}},[r("FileTextIcon",{staticClass:"opacity-75",attrs:{size:"15"}})],1)])])])}),[],!1,null,null,null).exports},2547:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const a={name:"MeteredTransactionDetailRow",props:["row"]};const n=(0,r(1900).Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("tr",[r("td",{staticClass:"overflow-hidden rounded-lg py-2",attrs:{colspan:"10"}},t._l(t.row.data.attributes.metadata,(function(e,a){return r("div",{key:a,staticClass:"flex items-center justify-between border-b border-dashed border-light py-2 dark:border-opacity-5"},[r("div",{staticClass:"w-2/4 leading-none"},[r("b",{staticClass:"text-sm font-bold leading-none"},[t._v("\n "+t._s(t.$t(e.feature))+"\n ")]),t._v(" "),r("small",{staticClass:"hidden pt-2 text-xs leading-none text-gray-500 sm:block"},[t._v("\n "+t._s(t.$t("feature_usage_desc_"+e.feature))+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-left"},[r("span",{staticClass:"text-gray-560 text-sm font-bold"},[t._v("\n "+t._s(e.usage)+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-right"},[r("span",{staticClass:"text-theme text-sm font-bold"},[t._v("\n "+t._s(e.cost)+"\n ")])])])})),0)])}),[],!1,null,null,null).exports},5047:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var a=r(167),n=r(2547),i=r(3426),s=r(9101);const o={name:"MeteredTransactionRow",components:{MeteredTransactionDetailRow:n.Z,MemberAvatar:a.Z,FileTextIcon:s.zPP,ColorLabel:i.Z,EyeIcon:s.tEF},props:{row:{},user:{type:Boolean,default:!1}},data:function(){return{showedTransactionDetailById:void 0}},methods:{showTransactionDetail:function(t){this.showedTransactionDetailById===t?this.showedTransactionDetailById=void 0:this.showedTransactionDetailById=t}}};const l=(0,r(1900).Z)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("tr",{staticClass:"whitespace-nowrap border-b border-dashed border-light dark:border-opacity-5"},[r("td",{staticClass:"py-5 pr-3 md:pr-1"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.note)+"\n ")])]),t._v(" "),t.user?r("td",{staticClass:"whitespace-nowrap px-3 md:px-1"},[t.row.data.relationships.user?r("div",{staticClass:"flex items-center"},[r("MemberAvatar",{attrs:{"is-border":!1,size:36,member:t.row.data.relationships.user}}),t._v(" "),r("div",{staticClass:"ml-3 pr-10"},[r("b",{staticClass:"max-w-1 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold",staticStyle:{"max-width":"155px"}},[t._v("\n "+t._s(t.row.data.relationships.user.data.attributes.name)+"\n ")]),t._v(" "),r("span",{staticClass:"block text-xs text-gray-600 dark:text-gray-500"},[t._v("\n "+t._s(t.row.data.relationships.user.data.attributes.email)+"\n ")])])],1):t._e(),t._v(" "),t.row.data.relationships.user?t._e():r("span",{staticClass:"text-xs font-bold text-gray-500"},[t._v("\n "+t._s(t.$t("User was deleted"))+"\n ")])]):t._e(),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("ColorLabel",{staticClass:"capitalize",attrs:{color:t.$getTransactionStatusColor(t.row.data.attributes.status)}},[t._v("\n "+t._s(t.row.data.attributes.status)+"\n ")])],1),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold capitalize"},[t._v("\n "+t._s(t.$t(t.row.data.attributes.type))+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold",class:t.$getTransactionTypeTextColor(t.row.data.attributes.type)},[t._v("\n "+t._s(t.$getTransactionMark(t.row.data.attributes.type)+t.row.data.attributes.price)+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.created_at)+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("div",{staticClass:"w-28"},[r("img",{staticClass:"inline-block max-h-5",attrs:{src:t.$getPaymentLogo(t.row.data.attributes.driver),alt:t.row.data.attributes.driver}})])]),t._v(" "),r("td",{staticClass:"pl-3 text-right md:pl-1"},[t.row.data.attributes.metadata?r("div",{staticClass:"flex w-full justify-end space-x-2"},[r("div",{staticClass:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-md bg-light-background transition-colors hover:bg-green-100 dark:bg-2x-dark-foreground",on:{click:function(e){return t.$emit("showDetail",t.row.data.id)}}},[r("EyeIcon",{staticClass:"opacity-75",attrs:{size:"15"}})],1),t._v(" "),r("a",{staticClass:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-md bg-light-background transition-colors hover:bg-purple-100 dark:bg-2x-dark-foreground",attrs:{href:t.$getInvoiceLink(t.row.data.id),target:"_blank"}},[r("FileTextIcon",{staticClass:"opacity-75",attrs:{size:"15"}})],1)]):r("div",[t._v("-")])])])}),[],!1,null,null,null).exports},7632:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>Ft});var a=r(9183),n=r(6746),i=r(808),s=r(9669),o=r.n(s),l=r(826),u=r(5218);const c={name:"UserUpdatePaymentMethodsExternally",components:{AppInputButton:u.Z,AppInputSwitch:a.Z,ButtonBase:n.Z,FormLabel:i.Z},computed:{canShowForSubscription:function(){return this.hasSubscription&&!this.subscription.attributes.is_cancelled&&["paystack","paypal"].includes(this.subscription.attributes.driver)},subscription:function(){return this.$store.getters.user.data.relationships.subscription.data},hasSubscription:function(){return this.$store.getters.user.data.relationships.subscription}},data:function(){return{isGeneratedUpdateLink:!1}},methods:{updatePaymentMethod:function(){var t=this;this.isGeneratedUpdateLink=!0,o().post("/api/subscriptions/edit/".concat(this.subscription.id)).then((function(t){window.location=t.data.url})).catch((function(){l.U.$emit("toaster",{type:"danger",message:t.$t("popup_error.title")}),t.isGeneratedUpdateLink=!1}))}}};var d=r(1900);const f=(0,d.Z)(c,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.canShowForSubscription?r("div",{staticClass:"card shadow-card"},[r("FormLabel",[t._v("\n "+t._s(t.$t("Update Payments"))+"\n ")]),t._v(" "),r("AppInputButton",{attrs:{title:t.$t("Update your Payment Method"),description:t.$t("You will be redirected to your payment provider to edit your payment method."),"is-last":!0}},[r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{loading:t.isGeneratedUpdateLink,"button-style":"theme"},nativeOn:{click:function(e){return t.updatePaymentMethod.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("Update Payments"))+"\n ")])],1)],1):t._e()}),[],!1,null,null,null).exports;var p=r(9101),v=r(3426),m=r(8720),h=r(6291),b=r(629),g=r(2547),y=r(5047);function _(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_(Object(r),!0).forEach((function(e){w(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function w(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const $={name:"UserTransactionsForMeteredBilling",components:{MeteredTransactionDetailRow:g.Z,MeteredTransactionRow:y.Z,DatatableWrapper:m.Z,ColorLabel:v.Z,FormLabel:i.Z,InfoBox:h.Z,FileTextIcon:p.zPP,EyeIcon:p.tEF},computed:x(x({},(0,b.Se)(["user"])),{},{columns:function(){return this.$store.getters.transactionColumns.filter((function(t){return"user_id"!==t.field}))}}),data:function(){return{showedTransactionDetailById:void 0}},methods:{showTransactionDetail:function(t){this.showedTransactionDetailById===t?this.showedTransactionDetailById=void 0:this.showedTransactionDetailById=t}}};const k=(0,d.Z)($,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"file-text"}},[t._v("\n "+t._s(t.$t("Transactions"))+"\n ")]),t._v(" "),r("DatatableWrapper",{staticClass:"overflow-x-auto",attrs:{api:"/api/user/transactions",paginator:!0,columns:t.columns},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[r("MeteredTransactionRow",{attrs:{row:a},on:{showDetail:t.showTransactionDetail}}),t._v(" "),a.data.attributes.metadata&&t.showedTransactionDetailById===a.data.id?r("MeteredTransactionDetailRow",{attrs:{row:a}}):t._e()]}},{key:"empty-page",fn:function(){return[r("InfoBox",{staticStyle:{"margin-bottom":"0"}},[r("p",[t._v(t._s(t.$t("user_invoices.empty")))])])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports;const A={name:"UserTransactionsForFixedBilling",components:{FixedTransactionRow:r(4716).Z,DatatableWrapper:m.Z,ColorLabel:v.Z,FormLabel:i.Z,InfoBox:h.Z},computed:{columns:function(){return this.$store.getters.transactionColumns.filter((function(t){return!["type","user_id"].includes(t.field)}))}}};const C=(0,d.Z)(A,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"file-text"}},[t._v("\n "+t._s(t.$t("Transactions"))+"\n ")]),t._v(" "),r("DatatableWrapper",{staticClass:"overflow-x-auto",attrs:{api:"/api/subscriptions/transactions",paginator:!0,columns:t.columns},scopedSlots:t._u([{key:"default",fn:function(t){var e=t.row;return[r("FixedTransactionRow",{attrs:{row:e}})]}},{key:"empty-page",fn:function(){return[r("InfoBox",{staticStyle:{"margin-bottom":"0"}},[r("p",[t._v(t._s(t.$t("user_invoices.empty")))])])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports;function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var a,n,i=[],s=!0,o=!1;try{for(r=r.call(t);!(s=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);s=!0);}catch(t){o=!0,n=t}finally{try{s||null==r.return||r.return()}finally{if(o)throw n}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return S(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function Z(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?P(Object(r),!0).forEach((function(e){j(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function j(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const F={name:"UserFixedSubscriptionDetail",components:{ProgressLine:r(9275).Z,FormLabel:i.Z},computed:Z(Z({},(0,b.Se)(["user"])),{},{subscription:function(){return this.$store.getters.user.data.relationships.subscription},hasSubscription:function(){return this.$store.getters.user.data.relationships.subscription},limitations:function(){var t=[];return Object.entries(this.user.data.meta.limitations).map((function(e){var r=O(e,2),a=r[0],n=r[1],i={color:{max_storage_amount:"warning",max_team_members:"purple"},message:{max_storage_amount:"Total ".concat(n.use," of ").concat(n.total," Used"),max_team_members:"Total ".concat(n.use," of ").concat(n.total," Members")},title:{max_storage_amount:"Storage",max_team_members:"Team Members"}};t.push({message:i.message[a],distribution:[{progress:n.percentage,color:i.color[a],title:i.title[a]}]})})),t},status:function(){return{active:"Active until ".concat(this.subscription.data.attributes.renews_at),cancelled:"Ends at ".concat(this.subscription.data.attributes.ends_at)}[this.subscription.data.attributes.status]},price:function(){return{month:"".concat(this.subscription.data.relationships.plan.data.attributes.price," Per Month"),year:"".concat(this.subscription.data.relationships.plan.data.attributes.price," Per Year")}[this.subscription.data.relationships.plan.data.attributes.interval]}})};const E=(0,d.Z)(F,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.hasSubscription?r("div",{staticClass:"card shadow-card"},[r("FormLabel",[t._v("\n "+t._s(t.$t("Subscription"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.status)+"\n ")]),t._v(" "),r("b",{staticClass:"mb-3 mb-8 block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(t.subscription.data.relationships.plan.data.attributes.name)+" /\n "+t._s(t.price)+"\n ")]),t._v(" "),t._l(t.limitations,(function(e,a){return r("div",{key:a,class:{"mb-6":Object.keys(t.limitations).length-1!==a}},[r("b",{staticClass:"mb-3 block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(e.message)+"\n ")]),t._v(" "),r("ProgressLine",{attrs:{data:e.distribution}})],1)}))],2):t._e()}),[],!1,null,null,null).exports;var I=r(7757),T=r.n(I);const B={name:"PaymentCard",components:{Trash2Icon:p.Bf1},props:["card"],methods:{deleteCreditCard:function(t){l.U.$emit("confirm:open",{title:this.$t("Are you sure you want to delete your credit card?"),message:this.$t("We will no longer settle your payments automatically and you will have to fund your account for the next payments."),action:{id:t,operation:"delete-credit-card"}})}},created:function(){var t=this;l.U.$on("action:confirmed",(function(e){"delete-credit-card"===e.operation&&o().delete("/api/stripe/credit-cards/".concat(e.id)).then((function(){t.$store.dispatch("getAppData"),l.U.$emit("toaster",{type:"success",message:t.$t("Your credit card was deleted.")})})).catch((function(){return t.$isSomethingWrong()}))}))},destroyed:function(){l.U.$off("action:confirmed")}};const D=(0,d.Z)(B,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex items-center justify-between rounded-lg bg-light-background py-3 px-2 dark:bg-2x-dark-foreground md:px-4"},[r("div",{staticClass:"flex items-center"},[r("img",{staticClass:"mr-3 h-5 rounded",attrs:{src:"/assets/gateways/"+t.card.data.attributes.brand+".svg",alt:""}}),t._v(" "),r("b",{staticClass:"whitespace-nowrap text-sm font-bold capitalize leading-none"},[t._v("\n "+t._s(t.card.data.attributes.brand)+" ••••\n "+t._s(t.card.data.attributes.last4)+"\n ")])]),t._v(" "),r("b",{staticClass:"text-sm font-bold leading-none"},[t._v(" "+t._s(t.$t("Expires"))+" "+t._s(t.card.data.attributes.expiration)+" ")]),t._v(" "),r("Trash2Icon",{staticClass:"cursor-pointer",attrs:{size:"15"},on:{click:function(e){return t.deleteCreditCard(t.card.data.id)}}})],1)}),[],!1,null,null,null).exports;var z=r(7318),R="https://js.stripe.com/v3",U=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,M="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",L=null,q=function(t){return null!==L||(L=new Promise((function(e,r){if("undefined"!=typeof window)if(window.Stripe&&t&&console.warn(M),window.Stripe)e(window.Stripe);else try{var a=function(){for(var t=document.querySelectorAll('script[src^="'.concat(R,'"]')),e=0;e<t.length;e++){var r=t[e];if(U.test(r.src))return r}return null}();a&&t?console.warn(M):a||(a=function(t){var e=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(R).concat(e);var a=document.head||document.body;if(!a)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return a.appendChild(r),r}(t)),a.addEventListener("load",(function(){window.Stripe?e(window.Stripe):r(new Error("Stripe.js not available"))})),a.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(t){return void r(t)}else e(null)}))),L},V=function(t,e,r){if(null===t)return null;var a=t.apply(void 0,e);return function(t,e){t&&t._registerWrapper&&t._registerWrapper({name:"stripe-js",version:"1.24.0",startTime:e})}(a,r),a},N=Promise.resolve().then((function(){return q(null)})),W=!1;N.catch((function(t){W||console.warn(t)}));var Y=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];W=!0;var a=Date.now();return N.then((function(t){return V(t,e,a)}))};function H(t,e,r,a,n,i,s){try{var o=t[i](s),l=o.value}catch(t){return void r(t)}o.done?e(l):Promise.resolve(l).then(a,n)}function G(t){return function(){var e=this,r=arguments;return new Promise((function(a,n){var i=t.apply(e,r);function s(t){H(i,a,n,s,o,"next",t)}function o(t){H(i,a,n,s,o,"throw",t)}s(void 0)}))}}function K(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function J(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?K(Object(r),!0).forEach((function(e){X(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function X(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Q,tt=void 0;const et={name:"UserStoredPaymentMethods",components:{InfoBox:h.Z,ButtonBase:n.Z,FormLabel:i.Z,PaymentCard:D,Spinner:z.Z},computed:J(J({},(0,b.Se)(["isDarkMode","config","user"])),{},{canShowForMeteredBilling:function(){return this.config.isStripe&&"metered"===this.config.subscriptionType},canShowForFixedBilling:function(){return this.config.isStripe&&"fixed"===this.config.subscriptionType&&this.$store.getters.user.data.relationships.subscription&&"stripe"===this.$store.getters.user.data.relationships.subscription.data.attributes.driver},hasPaymentMethod:function(){return this.user.data.relationships.creditCards&&this.user.data.relationships.creditCards.data.length>0}}),data:function(){return{isLoading:!1,isCreditCardForm:!1,stripe:{isInitialization:!0,storingStripePaymentMethod:!1}}},methods:{storeStripePaymentMethod:function(){var t=this;return G(T().mark((function e(){var r,a;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.config.isDemo||"ho**@hi5ve.digital"!==t.user.data.attributes.email){e.next=3;break}return l.U.$emit("toaster",{type:"success",message:t.$t("Your credit card was stored successfully")}),e.abrupt("return");case 3:return t.stripe.storingStripePaymentMethod=!0,e.next=6,Q.confirmSetup({elements:tt,redirect:"if_required",confirmParams:{return_url:window.location.href}});case 6:r=e.sent,(a=r.error)?document.querySelector("#error-message").textContent=a.message:(l.U.$emit("toaster",{type:"success",message:t.$t("Your credit card was stored successfully")}),setTimeout((function(){return document.location.reload()}),500)),t.stripe.storingStripePaymentMethod=!1;case 10:case"end":return e.stop()}}),e)})))()},stripeInit:function(){var t=this;return G(T().mark((function e(){return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Y(t.config.stripe_public_key);case 2:return Q=e.sent,e.next=5,o().get("/api/stripe/setup-intent").then((function(e){(tt=Q.elements({clientSecret:e.data.client_secret,appearance:{theme:"stripe",variables:{colorPrimary:t.config.app_color,fontFamily:"Nunito",borderRadius:"8px",colorText:t.isDarkMode?"#bec6cf":"#1B2539",colorBackground:t.isDarkMode?"#191b1e":"#fff",fontWeightNormal:"700",fontSizeSm:"0.875rem",colorSuccessText:"#0ABB87",colorSuccess:"#0ABB87",colorWarning:"#fd397a",colorWarningText:"#fd397a",colorDangerText:"#fd397a",colorTextSecondary:"#6b7280",spacingGridRow:"20px"}}})).create("payment").mount("#payment-element")})).catch((function(){l.U.$emit("toaster",{type:"danger",message:t.$t("popup_error.title")})}));case 5:t.stripe.isInitialization=!1;case 6:case"end":return e.stop()}}),e)})))()},showStoreCreditCardForm:function(){this.isCreditCardForm=!this.isCreditCardForm,this.stripeInit()}}};const rt=(0,d.Z)(et,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.canShowForMeteredBilling||t.canShowForFixedBilling?r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"credit-card"}},[t._v("\n "+t._s(t.$t("Payment Method"))+"\n ")]),t._v(" "),t.hasPaymentMethod?r("div",["metered"===t.config.subscriptionType&&t.user.data.relationships.balance.data.attributes.balance>0?r("b",{staticClass:"mb-3 mb-5 block text-sm"},[t._v("\n "+t._s(t.$t("credit_to_auto_withdraw",{credit:t.user.data.relationships.balance.data.attributes.formatted}))+"\n ")]):t._e(),t._v(" "),t._l(t.user.data.relationships.creditCards.data,(function(t){return r("PaymentCard",{key:t.data.id,attrs:{card:t}})})),t._v(" "),r("small",{staticClass:"hidden pt-3 text-xs leading-none dark:text-gray-500 text-gray-500 sm:block"},[t._v("\n "+t._s(t.$t("We are settling your payment automatically via your saved credit card."))+"\n ")])],2):t._e(),t._v(" "),t.hasPaymentMethod?t._e():r("div",[t.isCreditCardForm?t._e():r("ButtonBase",{staticClass:"mt-4 w-full",attrs:{loading:t.stripe.storingStripePaymentMethod,type:"submit","button-style":"theme"},nativeOn:{click:function(e){return t.showStoreCreditCardForm.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("Add Payment Method"))+"\n ")]),t._v(" "),t.isCreditCardForm?r("form",{staticClass:"mt-6",attrs:{id:"payment-form"},on:{submit:function(e){return e.preventDefault(),t.storeStripePaymentMethod.apply(null,arguments)}}},[t.stripe.isInitialization?r("div",{staticClass:"relative mb-6 h-10"},[r("Spinner")],1):t._e(),t._v(" "),t.config.isDemo&&!t.stripe.isInitialization?r("InfoBox",[r("p",[t._v("For adding test credit card please use "),r("b",{staticClass:"text-theme"},[t._v("4242 4242 4242 4242")]),t._v(" as a card number, "),r("b",{staticClass:"text-theme"},[t._v("11/22")]),t._v("\n\t\t\t\t\t\tas the expiration date and "),r("b",{staticClass:"text-theme"},[t._v("123")]),t._v(" as CVC number and ZIP "),r("b",{staticClass:"text-theme"},[t._v("12345")]),t._v(" if required.")])]):t._e(),t._v(" "),r("div",{attrs:{id:"payment-element"}}),t._v(" "),r("ButtonBase",{staticClass:"mt-4 w-full",attrs:{loading:t.stripe.storingStripePaymentMethod,type:"submit","button-style":"theme"}},[t._v("\n "+t._s(t.$t("Store My Credit Card"))+"\n ")]),t._v(" "),r("div",{staticClass:"pt-2 text-xs text-rose-600",attrs:{id:"error-message"}})],1):t._e()],1)],1):t._e()}),[],!1,null,null,null).exports;const at={name:"UserEmptySubscription",components:{ButtonBase:n.Z,FormLabel:i.Z,InfoBox:h.Z},computed:{hasSubscription:function(){return this.$store.getters.user.data.relationships.subscription}}};const nt=(0,d.Z)(at,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.hasSubscription?t._e():r("div",{staticClass:"card shadow-card"},[r("FormLabel",[t._v("\n "+t._s(t.$t("Subscription"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-2xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.$t("Free Plan"))+"\n ")]),t._v(" "),t.$store.getters.config.allowed_payments?r("b",{staticClass:"mb-3 mb-8 block text-sm text-gray-400"},[t._v("\n "+t._s(t.$t("Upgrade your account to get more."))+"\n ")]):t._e(),t._v(" "),t.$store.getters.config.allowed_payments?r("ButtonBase",{staticClass:"mt-4 w-full",attrs:{type:"submit","button-style":"theme"},nativeOn:{click:function(e){return t.$openSubscribeOptions.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("Upgrade Your Account"))+"\n ")]):t._e()],1)}),[],!1,null,null,null).exports;var it=r(4198);const st={name:"UserEditSubscription",components:{AppInputButton:u.Z,AppInputSwitch:a.Z,AppInputText:it.Z,ButtonBase:n.Z,FormLabel:i.Z},computed:{subscription:function(){return this.$store.getters.user.data.relationships.subscription.data},hasSubscription:function(){return this.$store.getters.user.data.relationships.subscription}},data:function(){return{isCancelling:!1}},methods:{cancelSubscriptionConfirmation:function(){l.U.$emit("confirm:open",{title:this.$t("Are you sure you want to cancel subscription?"),message:this.$t("You'll continue to have access to the features you've paid for until the end of your billing cycle."),action:{operation:"cancel-subscription"}})}},created:function(){var t=this;l.U.$on("action:confirmed",(function(e){"cancel-subscription"===e.operation&&(t.isCancelling=!0,o().post("/api/subscriptions/cancel").then((function(){t.$store.dispatch("getAppData"),l.U.$emit("toaster",{type:"success",message:t.$t("popup_subscription_cancel.title")})})).catch((function(){l.U.$emit("toaster",{type:"danger",message:t.$t("popup_error.title")})})).finally((function(){t.isCancelling=!1})))}))},destroyed:function(){l.U.$off("action:confirmed")}};const ot=(0,d.Z)(st,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.hasSubscription?r("div",{staticClass:"card shadow-card"},[r("FormLabel",[t._v("\n "+t._s(t.$t("Edit your Subscription"))+"\n ")]),t._v(" "),"cancelled"!==t.subscription.attributes.status?r("AppInputButton",{attrs:{title:t.$t("Cancel Subscription"),description:t.$t("You can cancel your subscription now. You'll continue to have access to the features you've paid for until the end of your billing cycle.")}},[r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{loading:t.isCancelling,"button-style":"secondary"},nativeOn:{click:function(e){return t.cancelSubscriptionConfirmation.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("Cancel Now"))+"\n ")])],1):t._e(),t._v(" "),r("AppInputButton",{attrs:{title:t.$t("Upgrade or Downgrade Plan"),description:t.$t("You can upgrade your plan at any time you want."),"is-last":!0}},[r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{"button-style":"secondary"},nativeOn:{click:function(e){return t.$changeSubscriptionOptions.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("Change Plan"))+"\n ")])],1)],1):t._e()}),[],!1,null,null,null).exports;function lt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function ut(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const ct={name:"UserFailedPayments",components:{FormLabel:i.Z,InfoBox:h.Z},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?lt(Object(r),!0).forEach((function(e){ut(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["user"]))};const dt=(0,d.Z)(ct,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.user.data.relationships.failedPayments&&t.user.data.relationships.failedPayments.data.length>0?r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"frown"}},[t._v("\n "+t._s(t.$t("Failed Payments"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-2xl font-extrabold sm:text-3xl"},[t._v("\n -"+t._s(t.user.data.meta.totalDebt.formatted)+"\n ")]),t._v(" "),r("b",{staticClass:"mb-3 mb-5 block text-sm text-gray-400"},[t._v("\n "+t._s(t.$t("We are unable to charge your usage. Please register new credit card or fund your account with sufficient amount and we'll give it another try!"))+"\n ")]),t._v(" "),t._l(t.user.data.relationships.failedPayments.data,(function(e){return r("div",{key:e.data.id,staticClass:"flex items-center justify-between border-b border-dashed border-light py-2 dark:border-opacity-5"},[r("div",{staticClass:"w-2/4 leading-none"},[r("b",{staticClass:"text-sm font-bold leading-none"},[t._v("\n "+t._s(e.data.attributes.note)+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-left"},[r("span",{staticClass:"text-gray-560 text-sm font-bold capitalize"},[t._v("\n "+t._s(t.$t(e.data.attributes.source))+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-right"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(e.data.attributes.created_at)+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-right"},[r("span",{staticClass:"text-red text-sm font-bold"},[t._v("\n "+t._s(e.data.attributes.amount)+"\n ")])])])}))],2):t._e()}),[],!1,null,null,null).exports;function ft(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function pt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const vt={name:"UserUsageEstimates",components:{FormLabel:i.Z},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ft(Object(r),!0).forEach((function(e){pt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ft(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["user"]))};const mt=(0,d.Z)(vt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"bar-chart"}},[t._v("\n "+t._s(t.$t("Usage Estimates"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-2xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.user.data.meta.usages.costEstimate)+"\n ")]),t._v(" "),r("b",{staticClass:"mb-3 mb-5 block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(t.user.data.relationships.subscription.data.attributes.updated_at)+"\n "+t._s(t.$t("till now"))+"\n ")]),t._v(" "),t._l(t.user.data.meta.usages.featureEstimates,(function(e,a){return r("div",{key:a,staticClass:"flex items-center justify-between border-b border-dashed border-light py-2 dark:border-opacity-5"},[r("div",{staticClass:"w-2/4 leading-none"},[r("b",{staticClass:"text-sm font-bold leading-none"},[t._v("\n "+t._s(t.$t(e.feature))+"\n ")]),t._v(" "),r("small",{staticClass:"hidden pt-2 text-xs leading-none dark:text-gray-500 text-gray-500 sm:block"},[t._v("\n "+t._s(t.$t("feature_usage_desc_"+e.feature))+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-left"},[r("span",{staticClass:"text-gray-560 text-sm font-bold"},[t._v("\n "+t._s(e.usage)+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-right"},[r("span",{staticClass:"text-theme text-sm font-bold"},[t._v("\n "+t._s(e.cost)+"\n ")])])])})),t._v(" "),r("small",{staticClass:"mt-6 block font-bold"},[t._v("\n "+t._s(t.$t("Records are updated on daily bases."))+"\n ")])],2)}),[],!1,null,null,null).exports;var ht=r(9495);function bt(t,e,r,a,n,i,s){try{var o=t[i](s),l=o.value}catch(t){return void r(t)}o.done?e(l):Promise.resolve(l).then(a,n)}function gt(t){return function(){var e=this,r=arguments;return new Promise((function(a,n){var i=t.apply(e,r);function s(t){bt(i,a,n,s,o,"next",t)}function o(t){bt(i,a,n,s,o,"throw",t)}s(void 0)}))}}function yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function _t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const xt={name:"UserBillingAlerts",components:{ValidationObserver:ht.ValidationObserver,ValidationProvider:ht.ValidationProvider,AppInputText:it.Z,ButtonBase:n.Z,Trash2Icon:p.Bf1,Edit2Icon:p.me4,FormLabel:i.Z},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach((function(e){_t(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["user"])),data:function(){return{billingAlertAmount:void 0,isSendingBillingAlert:!1,showUpdateBillingAlertForm:!1}},methods:{updateBillingAlert:function(){var t=this;return gt(T().mark((function e(){return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$refs.updatebillingAlertForm.validate();case 2:if(e.sent){e.next=5;break}return e.abrupt("return");case 5:t.isSendingBillingAlert=!0,o().patch("/api/subscriptions/billing-alerts/".concat(t.user.data.relationships.alert.data.id),{amount:t.billingAlertAmount}).then((function(){t.$store.dispatch("getAppData"),t.showUpdateBillingAlertForm=!1,l.U.$emit("toaster",{type:"success",message:t.$t("Your billing alert was updated successfully")})})).catch((function(){l.U.$emit("toaster",{type:"danger",message:t.$t("popup_error.title")})})).finally((function(){t.isSendingBillingAlert=!1}));case 7:case"end":return e.stop()}}),e)})))()},setBillingAlert:function(){var t=this;return gt(T().mark((function e(){return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$refs.billingAlertForm.validate();case 2:if(e.sent){e.next=5;break}return e.abrupt("return");case 5:t.isSendingBillingAlert=!0,o().post("/api/subscriptions/billing-alerts",{amount:t.billingAlertAmount}).then((function(){t.$store.dispatch("getAppData"),l.U.$emit("toaster",{type:"success",message:t.$t("Your billing alert was set successfully")})})).catch((function(){l.U.$emit("toaster",{type:"danger",message:t.$t("popup_error.title")})})).finally((function(){t.isSendingBillingAlert=!1}));case 7:case"end":return e.stop()}}),e)})))()},deleteBillingAlert:function(){l.U.$emit("confirm:open",{title:this.$t("Are you sure you want to delete your alert?"),message:this.$t("You will no longer receive any notifications that your billing limit has been exceeded."),action:{id:this.user.data.relationships.alert.data.id,operation:"delete-billing-alert"}})}},created:function(){var t=this;l.U.$on("action:confirmed",(function(e){"delete-billing-alert"===e.operation&&o().delete("/api/subscriptions/billing-alerts/".concat(t.user.data.relationships.alert.data.id)).then((function(){t.$store.dispatch("getAppData"),t.showUpdateBillingAlertForm=!1,t.billingAlertAmount=void 0,l.U.$emit("toaster",{type:"success",message:t.$t("Your billing alert was deleted.")})})).catch((function(){return t.$isSomethingWrong()}))}))},destroyed:function(){l.U.$off("action:confirmed")}};const wt=(0,d.Z)(xt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"bell"}},[t._v("\n "+t._s(t.$t("Billing Alert"))+"\n ")]),t._v(" "),t.user.data.relationships.alert?r("div",[r("b",{staticClass:"-mt-3 mb-0.5 block flex items-center text-3xl font-extrabold"},[t._v("\n "+t._s(t.user.data.relationships.alert.data.attributes.formatted)+"\n "),t.showUpdateBillingAlertForm?t._e():r("edit2-icon",{staticClass:"vue-feather ml-2 -translate-y-0.5 transform cursor-pointer",attrs:{size:"12"},on:{click:function(e){t.showUpdateBillingAlertForm=!t.showUpdateBillingAlertForm}}}),t._v(" "),t.showUpdateBillingAlertForm?r("trash2-icon",{staticClass:"vue-feather ml-2 -translate-y-0.5 transform cursor-pointer",attrs:{size:"12"},on:{click:t.deleteBillingAlert}}):t._e()],1),t._v(" "),r("b",{staticClass:"block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(t.$t("Alert will be triggered after you reach the value above."))+"\n ")])]):t._e(),t._v(" "),t.showUpdateBillingAlertForm?r("ValidationObserver",{ref:"updatebillingAlertForm",staticClass:"mt-6",attrs:{tag:"form"},on:{submit:function(e){return e.preventDefault(),t.updateBillingAlert.apply(null,arguments)}},scopedSlots:t._u([{key:"default",fn:function(e){e.invalid;return[r("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Billing Alert",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.errors;return[r("AppInputText",{attrs:{description:t.$t("You will receive an email whenever your monthly balance reaches the specified amount above."),error:a[0],"is-last":!0}},[r("div",{staticClass:"space-y-4 sm:flex sm:space-x-4 sm:space-y-0"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.billingAlertAmount,expression:"billingAlertAmount"}],staticClass:"focus-border-theme input-dark",class:{"border-red":a[0]},attrs:{placeholder:t.$t("Alert Amount..."),type:"number",min:"1",max:"999999999"},domProps:{value:t.billingAlertAmount},on:{input:function(e){e.target.composing||(t.billingAlertAmount=e.target.value)}}}),t._v(" "),r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{loadint:t.isSendingBillingAlert,disabled:t.isSendingBillingAlert,type:"submit","button-style":"theme"}},[t._v("\n "+t._s(t.$t("Update Alert"))+"\n ")])],1)])]}}],null,!0)})]}}],null,!1,1646645579)}):t._e(),t._v(" "),t.user.data.relationships.alert?t._e():r("ValidationObserver",{ref:"billingAlertForm",staticClass:"mt-6",attrs:{tag:"form"},on:{submit:function(e){return e.preventDefault(),t.setBillingAlert.apply(null,arguments)}},scopedSlots:t._u([{key:"default",fn:function(e){e.invalid;return[r("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Billing Alert",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.errors;return[r("AppInputText",{attrs:{description:t.$t("You will receive an email whenever your monthly balance reaches the specified amount above."),error:a[0],"is-last":!0}},[r("div",{staticClass:"space-y-4 sm:flex sm:space-x-4 sm:space-y-0"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.billingAlertAmount,expression:"billingAlertAmount"}],staticClass:"focus-border-theme input-dark",class:{"border-red":a[0]},attrs:{placeholder:t.$t("Alert Amount..."),type:"number",min:"1",max:"999999999"},domProps:{value:t.billingAlertAmount},on:{input:function(e){e.target.composing||(t.billingAlertAmount=e.target.value)}}}),t._v(" "),r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{loadint:t.isSendingBillingAlert,disabled:t.isSendingBillingAlert,type:"submit","button-style":"theme"}},[t._v("\n "+t._s(t.$t("Set Alert"))+"\n ")])],1)])]}}],null,!0)})]}}],null,!1,3234505656)})],1)}),[],!1,null,null,null).exports;var $t=r(2792);function kt(t,e,r,a,n,i,s){try{var o=t[i](s),l=o.value}catch(t){return void r(t)}o.done?e(l):Promise.resolve(l).then(a,n)}function At(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function Ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?At(Object(r),!0).forEach((function(e){Ot(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ot(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const St={name:"UserBalance",components:{ValidationObserver:ht.ValidationObserver,ValidationProvider:ht.ValidationProvider,AppInputText:it.Z,ButtonBase:n.Z,FormLabel:i.Z},computed:Ct(Ct({},(0,b.Se)(["user"])),{},{hasPaymentMethod:function(){return this.user.data.relationships.creditCards&&this.user.data.relationships.creditCards.data.length>0}}),data:function(){return{chargeAmount:void 0}},methods:{makePayment:function(){var t,e=this;return(t=T().mark((function t(){return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$refs.fundAccount.validate();case 2:if(t.sent){t.next=5;break}return t.abrupt("return");case 5:e.$store.dispatch("callSingleChargeProcess",e.chargeAmount);case 6:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(a,n){var i=t.apply(e,r);function s(t){kt(i,a,n,s,o,"next",t)}function o(t){kt(i,a,n,s,o,"throw",t)}s(void 0)}))})()}}};function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,a)}return r}function Zt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const jt={name:"Billing",components:{UserUpdatePaymentMethodsExternally:f,UserTransactionsForMeteredBilling:k,UserTransactionsForFixedBilling:C,UserFixedSubscriptionDetail:E,UserStoredPaymentMethods:rt,UserEmptySubscription:nt,UserEditSubscription:ot,UserFailedPayments:dt,UserUsageEstimates:mt,UserBillingAlerts:wt,UserBalance:(0,d.Z)(St,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.hasPaymentMethod?t._e():r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"dollar"}},[t._v("\n "+t._s(t.$t("Balance"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-2xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.user.data.relationships.balance.data.attributes.formatted)+"\n ")]),t._v(" "),r("ValidationObserver",{ref:"fundAccount",staticClass:"mt-6",attrs:{tag:"form"},on:{submit:function(e){return e.preventDefault(),t.makePayment.apply(null,arguments)}},scopedSlots:t._u([{key:"default",fn:function(e){e.invalid;return[r("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Amount",rules:"required|min_value:"+t.user.data.meta.totalDebt.amount},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.errors;return[r("AppInputText",{attrs:{description:t.$t("The amount will be increased as soon as we register your charge from payment gateway."),error:a[0],"is-last":!0}},[r("div",{staticClass:"space-y-4 sm:flex sm:space-x-4 sm:space-y-0"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.chargeAmount,expression:"chargeAmount"}],staticClass:"focus-border-theme input-dark",class:{"border-red":a[0]},attrs:{placeholder:t.$t("Fund Your Account Balance..."),type:"number",min:"1",max:"999999999"},domProps:{value:t.chargeAmount},on:{input:function(e){e.target.composing||(t.chargeAmount=e.target.value)}}}),t._v(" "),r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{type:"submit","button-style":"theme"}},[t._v("\n "+t._s(t.$t("Make a Payment"))+"\n ")])],1)])]}}],null,!0)})]}}],null,!1,4159557874)})],1)}),[],!1,null,null,null).exports,PageTab:$t.Z},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(r),!0).forEach((function(e){Zt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["config"]))};const Ft=(0,d.Z)(jt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("PageTab",["metered"===t.config.subscriptionType?r("div",[r("UserFailedPayments"),t._v(" "),r("UserBalance"),t._v(" "),r("UserUsageEstimates"),t._v(" "),r("UserBillingAlerts"),t._v(" "),r("UserStoredPaymentMethods"),t._v(" "),r("UserTransactionsForMeteredBilling")],1):t._e(),t._v(" "),"fixed"===t.config.subscriptionType?r("div",[r("UserEmptySubscription"),t._v(" "),r("UserFixedSubscriptionDetail"),t._v(" "),r("UserStoredPaymentMethods"),t._v(" "),r("UserUpdatePaymentMethodsExternally"),t._v(" "),r("UserEditSubscription"),t._v(" "),r("UserTransactionsForFixedBilling")],1):t._e()])}),[],!1,null,null,null).exports}}]);