mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
2 lines
128 KiB
JavaScript
Vendored
2 lines
128 KiB
JavaScript
Vendored
/*! For license information please see billing.js.LICENSE.txt */
|
||
(self.webpackChunk=self.webpackChunk||[]).push([[6754],{8520:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),a=r.n(n)()((function(t){return t[1]}));a.push([t.id,".color-label.purple[data-v-3ff27c4c]{background:rgba(157,102,254,.1);color:#9d66fe}.color-label.yellow[data-v-3ff27c4c]{background:rgba(255,189,45,.1);color:#ffbd2d}.color-label.green[data-v-3ff27c4c]{background:rgba(0,188,126,.1);color:#00bc7e}.color-label.red[data-v-3ff27c4c]{background:rgba(253,57,122,.1);color:#fd397a}",""]);const i=a},6355:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),a=r.n(n)()((function(t){return t[1]}));a.push([t.id,".info-box[data-v-783003cd]{background:#f4f5f6;border-radius:10px;margin-bottom:32px;padding:20px;text-align:left}.info-box.error[data-v-783003cd]{background:rgba(253,57,122,.1)}.info-box.error a[data-v-783003cd],.info-box.error p[data-v-783003cd]{color:#fd397a}.info-box.error a[data-v-783003cd]{text-decoration:underline}.info-box p[data-v-783003cd]{font-weight:600;line-height:1.6;word-break:break-word}.info-box p[data-v-783003cd],.info-box p>a[data-v-783003cd],.info-box p>b[data-v-783003cd]{font-size:15px}.info-box a[data-v-783003cd],.info-box b[data-v-783003cd],.info-box p>b[data-v-783003cd]{font-weight:700}.info-box a[data-v-783003cd]{font-size:.9375em;line-height:1.6}.info-box ul[data-v-783003cd]{margin-top:15px}.info-box ul[data-v-783003cd],.info-box ul li[data-v-783003cd],.info-box ul li a[data-v-783003cd]{display:block}@media only screen and (max-width:690px){.info-box[data-v-783003cd]{padding:15px}}.dark .info-box[data-v-783003cd]{background:#1e2024}.dark .info-box.error[data-v-783003cd]{background:rgba(253,57,122,.1)}.dark .info-box.error a[data-v-783003cd],.dark .info-box.error p[data-v-783003cd]{color:#fd397a}.dark .info-box.error a[data-v-783003cd]{text-decoration:underline}.dark .info-box p[data-v-783003cd],.dark .info-box ul li[data-v-783003cd]{color:#bec6cf}",""]);const i=a},4863:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),a=r.n(n)()((function(t){return t[1]}));a.push([t.id,".label[data-v-03d13328]{align-items:center;display:flex}.label .label-dot[data-v-03d13328]{border-radius:8px;display:block;flex:none;height:8px;margin-right:10px;width:8px}.label .label-dot.success[data-v-03d13328]{background:#0abb87}.label .label-dot.danger[data-v-03d13328]{background:#fd397a}.label .label-dot.warning[data-v-03d13328]{background:#ffb822}.label .label-dot.info[data-v-03d13328]{background:#5578eb}.label .label-dot.primary[data-v-03d13328]{background:red}.label .label-dot.purple[data-v-03d13328]{background:#9d66fe}.label .label-dot.secondary[data-v-03d13328]{background:#e1e1ef}.label .label-title[data-v-03d13328]{font-size:16px;font-weight:700}",""]);const i=a},7227:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),a=r.n(n)()((function(t){return t[1]}));a.push([t.id,".chart-progress.success[data-v-596eaf42]{background:#0abb87;box-shadow:0 3px 10px rgba(10,187,135,.5)}.chart-progress.danger[data-v-596eaf42]{background:#fd397a;box-shadow:0 3px 10px rgba(253,57,122,.5)}.chart-progress.warning[data-v-596eaf42]{background:#ffb822;box-shadow:0 3px 10px rgba(255,184,34,.5)}.chart-progress.info[data-v-596eaf42]{background:#5578eb;box-shadow:0 3px 10px rgba(85,120,235,.5)}.chart-progress.purple[data-v-596eaf42]{background:#9d66fe;box-shadow:0 3px 10px rgba(157,102,254,.5)}.chart-progress.secondary[data-v-596eaf42]{background:#e1e1ef;box-shadow:0 3px 10px rgba(225,225,239,.5)}.dark .chart-progress.secondary[data-v-596eaf42]{background:#282a2f!important;box-shadow:0 3px 10px rgba(40,42,47,.5)!important}",""]);const i=a},3428:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),a=r.n(n)()((function(t){return t[1]}));a.push([t.id,".table-row[data-v-61827e38]{border-radius:8px}.table-row[data-v-61827e38]:hover{background:#f4f5f6}.table-row .table-cell[data-v-61827e38]{padding-bottom:15px;padding-top:15px}.table-row .table-cell[data-v-61827e38]:first-child{padding-left:15px}.table-row .table-cell[data-v-61827e38]:last-child{padding-right:15px;text-align:right}.table-row .table-cell span[data-v-61827e38]{font-size:1em;font-weight:700}",""]);const i=a},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 n=r(e),a={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},o={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},s={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,n=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return u(t,{locale:n})})):n?(i[n]||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,n=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return d(t,{locale:n})})):n?(l[n]||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,n=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return p(t,{locale:n})})):n?(s[n]||s.en).test(t):Object.keys(s).some((function(e){return s[e].test(t)}))},v={validate:p,params:[{name:"locale"}]},h=function(t,e){var r=(void 0===e?{}:e).locale,n=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return h(t,{locale:n})})):n?(o[n]||o.en).test(t):Object.keys(o).some((function(e){return o[e].test(t)}))},m={validate:h,params:[{name:"locale"}]},b=function(t,e){var r=void 0===e?{}:e,n=r.min,a=r.max;return Array.isArray(t)?t.every((function(t){return!!b(t,{min:n,max:a})})):Number(n)<=t&&Number(a)>=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 n=String(t);return/^[0-9]*$/.test(n)&&n.length===r},x={validate:_,params:[{name:"length",cast:function(t){return Number(t)}}]},w=function(t,e,r){var n=window.URL||window.webkitURL;return new Promise((function(a){var i=new Image;i.onerror=function(){return a(!1)},i.onload=function(){return a(i.width===e&&i.height===r)},i.src=n.createObjectURL(t)}))},k={validate:function(t,e){var r=e.width,n=e.height,a=[];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);a.push(t[i])}return Promise.all(a.map((function(t){return w(t,r,n)}))).then((function(t){return t.every((function(t){return t}))}))},params:[{name:"width",cast:function(t){return Number(t)}},{name:"height",cast:function(t){return Number(t)}}]},$={validate:function(t,e){var r=(void 0===e?{}:e).multiple,n=/^(([^<>()\[\]\\.,;:\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 n.test(String(t))})):n.test(String(t))},params:[{name:"multiple",default:!1}]};function A(t){return t!=t}function C(t){return null==t}function O(t){return Array.isArray(t)&&0===t.length}var S=function(t){return null!==t&&t&&"object"==typeof t&&!Array.isArray(t)};function j(t,e){return!(!A(t)||!A(e))||t===e}function P(t){return""!==t&&!C(t)}function E(t){return"function"==typeof t}function Z(t){return E(t)&&!!t.__locatorRef}function F(t,e){var r=Array.isArray(t)?t:L(t);if(E(r.findIndex))return r.findIndex(e);for(var n=0;n<r.length;n++)if(e(r[n],n))return n;return-1}function T(t,e){var r=Array.isArray(t)?t:L(t),n=F(r,e);return-1===n?void 0:r[n]}function I(t,e){return-1!==t.indexOf(e)}function L(t){return E(Array.from)?Array.from(t):B(t)}function B(t){for(var e=[],r=t.length,n=0;n<r;n++)e.push(t[n]);return e}function D(t){return E(Object.values)?Object.values(t):Object.keys(t).map((function(e){return t[e]}))}function R(t,e){return Object.keys(e).forEach((function(r){if(S(e[r]))return t[r]||(t[r]={}),void R(t[r],e[r]);t[r]=e[r]})),t}function z(){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 U(t){return t}function N(t,e,r){return void 0===e&&(e=0),void 0===r&&(r={cancelled:!1}),0===e?t:function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];var o=function(){n=void 0,r.cancelled||t.apply(void 0,a)};clearTimeout(n),n=setTimeout(o,e)};var n}function M(t){console.warn("[vee-validate] "+t)}function q(t,e){return t.replace(/{([^}]+)}/g,(function(t,r){return r in e?e[r]:"{"+r+"}"}))}var V=function(t,e){return Array.isArray(t)?t.every((function(t){return V(t,e)})):L(e).some((function(e){return e==t}))},G={validate:V},W={validate:function(t,e){return!V(t,e)}},H={validate: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)}},Y={validate: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)}},K={validate:function(t){return Array.isArray(t)?t.every((function(t){return/^-?[0-9]+$/.test(String(t))})):/^-?[0-9]+$/.test(String(t))}},J={validate:function(t,e){return t===e.other},params:[{name:"other"}]},X={validate:function(t,e){return t!==e.other},params:[{name:"other"}]},Q={validate:function(t,e){var r=e.length;return!C(t)&&("string"==typeof t&&(t=L(t)),"number"==typeof t&&(t=String(t)),t.length||(t=L(t)),t.length===r)},params:[{name:"length",cast:function(t){return Number(t)}}]},tt=function(t,e){var r=e.length;return C(t)?r>=0:Array.isArray(t)?t.every((function(t){return tt(t,{length:r})})):String(t).length<=r},et={validate:tt,params:[{name:"length",cast:function(t){return Number(t)}}]},rt=function(t,e){var r=e.max;return!C(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return rt(t,{max:r})})):Number(t)<=r)},nt={validate:rt,params:[{name:"max",cast:function(t){return Number(t)}}]},at={validate: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)}},it=function(t,e){var r=e.length;return!C(t)&&(Array.isArray(t)?t.every((function(t){return it(t,{length:r})})):String(t).length>=r)},ot={validate:it,params:[{name:"length",cast:function(t){return Number(t)}}]},st=function(t,e){var r=e.min;return!C(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return st(t,{min:r})})):Number(t)>=r)},lt={validate:st,params:[{name:"min",cast:function(t){return Number(t)}}]},ut=/^[٠١٢٣٤٥٦٧٨٩]+$/,ct=/^[0-9]+$/,dt={validate:function(t){var e=function(t){var e=String(t);return ct.test(e)||ut.test(e)};return Array.isArray(t)?t.every(e):e(t)}},ft=function(t,e){var r=e.regex;return Array.isArray(t)?t.every((function(t){return ft(t,{regex:r})})):r.test(String(t))},pt={validate:ft,params:[{name:"regex",cast:function(t){return"string"==typeof t?new RegExp(t):t}}]},vt={validate:function(t,e){var r=(void 0===e?{allowFalse:!0}:e).allowFalse,n={valid:!1,required:!0};return C(t)||O(t)?n:!1!==t||r?(n.valid=!!String(t).trim().length,n):n},params:[{name:"allowFalse",default:!0}],computesRequired:!0},ht=function(t){return O(t)||I([!1,null,void 0],t)||!String(t).trim().length},mt={validate:function(t,e){var r,n=e.target,a=e.values;return a&&a.length?(Array.isArray(a)||"string"!=typeof a||(a=[a]),r=a.some((function(t){return t==String(n).trim()}))):r=!ht(n),r?{valid:!ht(t),required:r}:{valid:!0,required:r}},params:[{name:"target",isTarget:!0},{name:"values"}],computesRequired:!0},bt={validate:function(t,e){var r=e.size;if(isNaN(r))return!1;var n=1024*r;if(!Array.isArray(t))return t.size<=n;for(var a=0;a<t.length;a++)if(t[a].size>n)return!1;return!0},params:[{name:"size",cast:function(t){return Number(t)}}]},gt={validate:function(t,e){var r=e||{},n=r.decimals,a=void 0===n?0:n,i=r.separator,o=new RegExp("^-?\\d+"+("comma"===(void 0===i?"dot":i)?",?":"\\.?")+(0===a?"\\d*":"(\\d{"+a+"})?")+"$");return Array.isArray(t)?t.every((function(t){return o.test(String(t))})):o.test(String(t))},params:[{name:"decimals",default:0},{name:"separator",default:"dot"}]},yt=Object.freeze({__proto__:null,alpha_dash:f,alpha_num:v,alpha_spaces:m,alpha:c,between:g,confirmed:y,digits:x,dimensions:k,email:$,ext:H,image:Y,oneOf:G,integer:K,length:Q,is_not:X,is:J,max:et,max_value:nt,mimes:at,min:ot,min_value:lt,excluded:W,numeric:dt,regex:pt,required:vt,required_if:mt,size:bt,double:gt}),_t=function(){return _t=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var a in e=arguments[r])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},_t.apply(this,arguments)};function xt(t,e,r,n){function a(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function o(t){try{l(n.next(t))}catch(t){i(t)}}function s(t){try{l(n.throw(t))}catch(t){i(t)}}function l(t){t.done?r(t.value):a(t.value).then(o,s)}l((n=n.apply(t,e||[])).next())}))}function wt(t,e){var r,n,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(t){return function(e){return l([t,e])}}function l(i){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(a=2&i[0]?n.return:i[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;switch(n=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=e.call(t,o)}catch(t){i=[6,t],n=0}finally{r=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}}function kt(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),a=0;for(e=0;e<r;e++)for(var i=arguments[e],o=0,s=i.length;o<s;o++,a++)n[a]=i[o];return n}var $t=_t({},{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}),At=function(){return $t},Ct=function(t){$t=_t(_t({},$t),t)},Ot=function(t){Ct(t)},St=new n.default;function jt(){St.$emit("change:locale")}var Pt,Et=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,n){var a,i,o,s,l,u,c,d,f,p=null===(o=null===(i=null===(a=this.container[t])||void 0===a?void 0:a.fields)||void 0===i?void 0:i[e])||void 0===o?void 0:o[r],v=null===(l=null===(s=this.container[t])||void 0===s?void 0:s.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,E(f)?f(e,n):q(f,_t(_t({},n),{_field_:e}))},t.prototype.merge=function(t){R(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 Zt(t,e){var r;if(Pt||(Pt=new Et("en",{}),Ct({defaultMessage:function(t,e){return Pt.resolve(t,null==e?void 0:e._rule_,e||{})}})),"string"==typeof t)return Pt.locale=t,e&&Pt.merge(((r={})[t]=e,r)),void jt();Pt.merge(t)}var Ft={};function Tt(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 It=function(){function t(){}return t.extend=function(t,e){var r=Tt(e);Ft[t]?Ft[t]=R(Ft[t],e):Ft[t]=_t({lazy:!1,computesRequired:!1},r)},t.isLazy=function(t){var e;return!!(null===(e=Ft[t])||void 0===e?void 0:e.lazy)},t.isRequireRule=function(t){var e;return!!(null===(e=Ft[t])||void 0===e?void 0:e.computesRequired)},t.getRuleDefinition=function(t){return Ft[t]},t}();function Lt(t,e){Bt(t,e),"object"!=typeof e?It.extend(t,{validate:e}):It.extend(t,e)}function Bt(t,e){if(!E(e)&&!E(e.validate)&&!It.getRuleDefinition(t))throw new Error("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.")}var Dt={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"]}}},Rt=function(t,e){if(Ct({mode:t}),e){if(!E(e))throw new Error("A mode implementation must be a function");Dt[t]=e}};function zt(t){var e={};return Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t?S(t)&&t._$$isNormalized?t:S(t)?Object.keys(t).reduce((function(e,r){var n=[];return n=!0===t[r]?[]:Array.isArray(t[r])||S(t[r])?t[r]:[t[r]],!1!==t[r]&&(e[r]=Ut(r,n)),e}),e):"string"!=typeof t?(M("rules must be either a string or an object."),e):t.split("|").reduce((function(t,e){var r=Nt(e);return r.name?(t[r.name]=Ut(r.name,r.params),t):t}),e):e}function Ut(t,e){var r=It.getRuleDefinition(t);if(!r)return e;var n,a,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;n=!r.params||r.params.length<e.length&&Array.isArray(e)?e.map((function(t,e){var n,i=null===(n=r.params)||void 0===n?void 0:n[e];return a=i||a,i||(i=a),i})):r.params;for(var o=0;o<n.length;o++){var s=n[o],l=s.default;Array.isArray(e)?o in e&&(l=e[o]):s.name in e?l=e[s.name]:1===n.length&&(l=e),s.isTarget&&(l=Mt(l,s.cast)),"string"==typeof l&&"@"===l[0]&&(l=Mt(l.slice(1),s.cast)),!Z(l)&&s.cast&&(l=s.cast(l)),i[s.name]?(i[s.name]=Array.isArray(i[s.name])?i[s.name]:[i[s.name]],i[s.name].push(l)):i[s.name]=l}return i}var Nt=function(t){var e=[],r=t.split(":")[0];return I(t,":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:r,params:e}};function Mt(t,e){var r=function(r){var n=r[t];return e?e(n):n};return r.__locatorRef=t,r}function qt(t){return Array.isArray(t)?t.filter((function(t){return Z(t)||"string"==typeof t&&"@"===t[0]})):Object.keys(t).filter((function(e){return Z(t[e])})).map((function(e){return t[e]}))}function Vt(t,e,r){return void 0===r&&(r={}),xt(this,void 0,void 0,(function(){var n,a,i,o,s,l;return wt(this,(function(u){switch(u.label){case 0:return n=null==r?void 0:r.bails,a=null==r?void 0:r.skipIfEmpty,[4,Gt({name:(null==r?void 0:r.name)||"{field}",rules:zt(e),bails:null==n||n,skipIfEmpty:null==a||a,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(),o=[],s={},l={},i.errors.forEach((function(t){var e=t.msg();o.push(e),s[t.rule]=e,l[t.rule]=t.msg})),[2,{valid:i.valid,required:i.required,errors:o,failedRules:s,regenerateMap:l}]}}))}))}function Gt(t,e,r){var n=(void 0===r?{}:r).isInitial,a=void 0!==n&&n;return xt(this,void 0,void 0,(function(){var r,n,i,o,s,l,u,c,d;return wt(this,(function(f){switch(f.label){case 0:return[4,Wt(t,e)];case 1:if(r=f.sent(),n=r.shouldSkip,i=r.required,o=r.errors,n)return[2,{valid:!o.length,required:i,errors:o}];s=Object.keys(t.rules).filter((function(t){return!It.isRequireRule(t)})),l=s.length,u=0,f.label=2;case 2:return u<l?a&&It.isLazy(s[u])?[3,4]:(c=s[u],[4,Ht(t,e,{name:c,params:t.rules[c]})]):[3,5];case 3:if(!(d=f.sent()).valid&&d.error&&(o.push(d.error),t.bails))return[2,{valid:!1,required:i,errors:o}];f.label=4;case 4:return u++,[3,2];case 5:return[2,{valid:!o.length,required:i,errors:o}]}}))}))}function Wt(t,e){return xt(this,void 0,void 0,(function(){var r,n,a,i,o,s,l,u,c;return wt(this,(function(d){switch(d.label){case 0:r=Object.keys(t.rules).filter(It.isRequireRule),n=r.length,a=[],i=C(e)||""===e||O(e),o=i&&t.skipIfEmpty,l=0,d.label=1;case 1:return l<n?(u=r[l],[4,Ht(t,e,{name:u,params:t.rules[u]})]):[3,4];case 2:if(c=d.sent(),!S(c))throw new Error("Require rules has to return an object (see docs)");if(void 0!==c.required&&(s=c.required),!c.valid&&c.error&&(a.push(c.error),t.bails))return[2,{shouldSkip:!0,required:c.required,errors:a}];d.label=3;case 3:return l++,[3,1];case 4:return i&&!s&&!t.skipIfEmpty||!t.bails&&!o?[2,{shouldSkip:!1,required:s,errors:a}]:[2,{shouldSkip:!s&&i,required:s,errors:a}]}}))}))}function Ht(t,e,r){return xt(this,void 0,void 0,(function(){var n,a,i,o,s;return wt(this,(function(l){switch(l.label){case 0:if(!(n=It.getRuleDefinition(r.name))||!n.validate)throw new Error("No such validator '"+r.name+"' exists.");return a=n.castValue?n.castValue(e):e,i=Qt(r.params,t.crossTable),[4,n.validate(a,i)];case 1:return"string"==typeof(o=l.sent())?(s=_t(_t({},i||{}),{_field_:t.name,_value_:e,_rule_:r.name}),[2,{valid:!1,error:{rule:r.name,msg:function(){return q(o,s)}}}]):(S(o)||(o={valid:o}),[2,{valid:o.valid,required:o.required,error:o.valid?void 0:Yt(t,e,n,r.name,i)}])}}))}))}function Yt(t,e,r,n,a){var i,o=null!==(i=t.customMessages[n])&&void 0!==i?i:r.message,s=Kt(t,r,n),l=Jt(t,r,n,o),u=l.userTargets,c=l.userMessage,d=_t(_t(_t(_t({},a||{}),{_field_:t.name,_value_:e,_rule_:n}),s),u);return{msg:function(){return Xt(c||At().defaultMessage,t.name,d)},rule:n}}function Kt(t,e,r){var n=e.params;if(!n)return{};var a=n.filter((function(t){return t.isTarget})).length;if(a<=0)return{};var i={},o=t.rules[r];!Array.isArray(o)&&S(o)&&(o=n.map((function(t){return o[t.name]})));for(var s=0;s<n.length;s++){var l=n[s],u=o[s];if(Z(u)){u=u.__locatorRef;var c=t.names[u]||u;i[l.name]=c,i["_"+l.name+"_"]=t.crossTable[u]}}return i}function Jt(t,e,r,n){var a={},i=t.rules[r],o=e.params||[];return i?(Object.keys(i).forEach((function(e,r){var n=i[e];if(!Z(n))return{};var s=o[r];if(!s)return{};var l=n.__locatorRef;a[s.name]=t.names[l]||l,a["_"+s.name+"_"]=t.crossTable[l]})),{userTargets:a,userMessage:n}):{}}function Xt(t,e,r){return"function"==typeof t?t(e,r):q(t,_t(_t({},r),{_field_:e}))}function Qt(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={},n=function(t){return Z(t)?t(e):t};return Object.keys(t).forEach((function(e){r[e]=n(t[e])})),r}var te=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 n,a,i;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(a=n;0!=a--;)if(!t(e[a],r[a]))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((n=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(r,i[a]))return!1;for(a=n;0!=a--;){var o=i[a];if(!t(e[o],r[o]))return!1}return!0}return e!=e&&r!=r},ee=function(t){return!!(t&&("undefined"!=typeof Event&&E(Event)&&t instanceof Event||t&&t.srcElement))};function re(t){var e,r;if(!ee(t))return t;var n=t.target;if("file"===n.type&&n.files)return L(n.files);if(null===(e=n._vModifiers)||void 0===e?void 0:e.number){var a=parseFloat(n.value);return A(a)?n.value:a}return(null===(r=n._vModifiers)||void 0===r?void 0:r.trim)&&"string"==typeof n.value?n.value.trim():n.value}var ne=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||I(["text","password","search","email","tel","url","number"],null==r?void 0:r.type)};function ae(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 ie(t){var e,r,n=ae(t);if(n)return{value:n.value};var a=le(t),i=(null==a?void 0:a.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 oe(t){return Array.isArray(t)?t:Array.isArray(t.children)?t.children:t.componentOptions&&Array.isArray(t.componentOptions.children)?t.componentOptions.children:[]}function se(t){return Array.isArray(t)||void 0===ie(t)?oe(t).reduce((function(t,e){var r=se(e);return r.length&&t.push.apply(t,r),t}),[]):[t]}function le(t){return t.componentOptions?t.componentOptions.Ctor.options.model:null}function ue(t,e,r){if(C(t[e]))t[e]=[r];else{if(E(t[e])&&t[e].fns){var n=t[e];return n.fns=Array.isArray(n.fns)?n.fns:[n.fns],void(I(n.fns,r)||n.fns.push(r))}if(E(t[e])){var a=t[e];t[e]=[a]}Array.isArray(t[e])&&!I(t[e],r)&&t[e].push(r)}}function ce(t,e,r){t.data||(t.data={}),C(t.data.on)&&(t.data.on={}),ue(t.data.on,e,r)}function de(t,e,r){t.componentOptions&&(t.componentOptions.listeners||(t.componentOptions.listeners={}),ue(t.componentOptions.listeners,e,r))}function fe(t,e,r){t.componentOptions?de(t,e,r):ce(t,e,r)}function pe(t,e){var r;return t.componentOptions?(le(t)||{event:"input"}).event||"input":(null===(r=null==e?void 0:e.modifiers)||void 0===r?void 0:r.lazy)?"change":ne(t)?"input":"change"}function ve(t){return I(["input","select","textarea"],t.tag)}function he(t,e){var r=[];return Object.keys(t).reduce((function(r,n){return t[n].forEach((function(r){r.context||(t[n].context=e,r.data||(r.data={}),r.data.slot=n)})),r.concat(t[n])}),r)}function me(t){var e,r=null===(e=t.data)||void 0===e?void 0:e.attrs,n={};return r?("email"===r.type&&It.getRuleDefinition("email")&&(n.email=["multiple"in r]),r.pattern&&It.getRuleDefinition("regex")&&(n.regex=r.pattern),r.maxlength>=0&&It.getRuleDefinition("max")&&(n.max=r.maxlength),r.minlength>=0&&It.getRuleDefinition("min")&&(n.min=r.minlength),"number"===r.type&&(P(r.min)&&It.getRuleDefinition("min_value")&&(n.min_value=Number(r.min)),P(r.max)&&It.getRuleDefinition("max_value")&&(n.max_value=Number(r.max))),n):n}function be(t){var e,r=["input","select","textarea"],n=null===(e=t.data)||void 0===e?void 0:e.attrs;if(!I(r,t.tag)||!n)return{};var a={};return"required"in n&&!1!==n.required&&It.getRuleDefinition("required")&&(a.required="checkbox"!==n.type||[!0]),ne(t)?zt(_t(_t({},a),me(t))):zt(a)}function ge(t,e){return t.$scopedSlots.default?t.$scopedSlots.default(e)||[]:t.$slots.default||[]}function ye(t,e){return!(t._ignoreImmediate||!t.immediate)||!(j(t.value,e)||!t.normalizedEvents.length)||!!t._needsValidation||!t.initialized&&void 0===e}function _e(t){return _t(_t({},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 xe(t,e){t.initialized||(t.initialValue=e);var r=ye(t,e);if(t._needsValidation=!1,t.value=e,t._ignoreImmediate=!0,r){var n=function(){if(t.immediate||t.flags.validated)return ke(t);t.validateSilent()};t.initialized?n():t.$once("hook:mounted",(function(){return n()}))}}function we(t){return(E(t.mode)?t.mode:Dt[t.mode])(t)}function ke(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 $e(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,n=t.$veeHandler,a=we(t);return n&&t.$veeDebounce===t.debounce||(n=N((function(){t.$nextTick((function(){t._pendingReset||ke(t),t._pendingReset=!1}))}),a.debounce||t.debounce),t.$veeHandler=n,t.$veeDebounce=t.debounce),{onInput:e,onBlur:r,onValidate:n}}function Ae(t,e){var r=ie(e);t._inputEventName=t._inputEventName||pe(e,ae(e)),xe(t,null==r?void 0:r.value);var n=$e(t),a=n.onInput,i=n.onBlur,o=n.onValidate;fe(e,t._inputEventName,a),fe(e,"blur",i),t.normalizedEvents.forEach((function(t){fe(e,t,o)})),t.initialized=!0}var Ce=0;function Oe(){var t="";return{errors:[],value:void 0,initialized:!1,initialValue:void 0,flags:z(),failedRules:{},isActive:!0,fieldName:t,id:""}}var Se=n.default.extend({name:"ValidationProvider",inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver||(this.$vnode.context.$_veeObserver=Fe()),this.$vnode.context.$_veeObserver}}},props:{vid:{type:String,default:""},name:{type:String,default:null},mode:{type:[String,Function],default:function(){return At().mode}},rules:{type:[Object,String],default:null},immediate:{type:Boolean,default:!1},bails:{type:Boolean,default:function(){return At().bails}},skipIfEmpty:{type:Boolean,default:function(){return At().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=!te(t,e)}}},data:Oe,computed:{fieldDeps:function(){var t=this;return Object.keys(this.normalizedRules).reduce((function(e,r){var n=qt(t.normalizedRules[r]).map((function(t){return Z(t)?t.__locatorRef:t.slice(1)}));return e.push.apply(e,n),n.forEach((function(e){Te(t,e)})),e}),[])},normalizedEvents:function(){var t=this;return(we(this).on||[]).map((function(e){return"input"===e?t._inputEventName:e}))},isRequired:function(){var t=_t(_t({},this._resolvedRules),this.normalizedRules),e=Object.keys(t).some(It.isRequireRule);return this.flags.required=!!e,e},classes:function(){return je(At().classes,this.flags)},normalizedRules:function(){return zt(this.rules)}},mounted:function(){var t=this,e=function(){if(t.flags.validated){var e=t._regenerateMap;if(e){var r=[],n={};return Object.keys(e).forEach((function(t){var a=e[t]();r.push(a),n[t]=a})),void t.applyResult({errors:r,failedRules:n,regenerateMap:e})}t.validate()}};St.$on("change:locale",e),this.$on("hook:beforeDestroy",(function(){St.$off("change:locale",e)}))},render:function(t){var e=this;this.registerField();var r=ge(this,_e(this));if(this.detectInput){var n=se(r);n.length&&n.forEach((function(t,r){var n,a,i,o,s,l;if(I(["checkbox","radio"],null===(a=null===(n=t.data)||void 0===n?void 0:n.attrs)||void 0===a?void 0:a.type)||!(r>0)){var u=At().useConstraintAttrs?be(t):{};te(e._resolvedRules,u)||(e._needsValidation=!0),ve(t)&&(e.fieldName=(null===(o=null===(i=t.data)||void 0===i?void 0:i.attrs)||void 0===o?void 0:o.name)||(null===(l=null===(s=t.data)||void 0===s?void 0:s.attrs)||void 0===l?void 0:l.id)),e._resolvedRules=u,Ae(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=re(t);this.value=e,this.flags.changed=!te(this.initialValue,e)},reset:function(){var t=this;this.errors=[],this.initialValue=this.value;var e=z();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 xt(this,void 0,void 0,(function(){return wt(this,(function(e){return t.length>0&&this.syncValue(t[0]),[2,ke(this)]}))}))},validateSilent:function(){return xt(this,void 0,void 0,(function(){var t,e;return wt(this,(function(r){switch(r.label){case 0:return this.setFlags({pending:!0}),t=_t(_t({},this._resolvedRules),this.normalizedRules),Object.defineProperty(t,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),[4,Vt(this.value,t,_t(_t({name:this.name||this.fieldName},Pe(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,n=t.regenerateMap;this.errors=e,this._regenerateMap=n,this.failedRules=_t({},r||{}),this.setFlags({valid:!e.length,passed:!e.length,invalid:!!e.length,failed:!!e.length,validated:!0,changed:!te(this.value,this.initialValue)})},registerField:function(){Ze(this)},checkComputesRequiredState:function(){var t=_t(_t({},this._resolvedRules),this.normalizedRules);return Object.keys(t).some(It.isRequireRule)}}});function je(t,e){for(var r={},n=Object.keys(e),a=n.length,i=function(a){var i=n[a],o=t&&t[i]||i,s=e[i];return C(s)?"continue":"valid"!==i&&"invalid"!==i||e.validated?void("string"==typeof o?r[o]=s:Array.isArray(o)&&o.forEach((function(t){r[t]=s}))):"continue"},o=0;o<a;o++)i(o);return r}function Pe(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 Ee(t){return t.vid?t.vid:t.name?t.name:t.id?t.id:t.fieldName?t.fieldName:"_vee_"+ ++Ce}function Ze(t){var e=Ee(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 Fe(){return{refs:{},observe:function(t){this.refs[t.id]=t},unobserve:function(t){delete this.refs[t]}}}function Te(t,e,r){void 0===r&&(r=!0);var n=t.$_veeObserver.refs;if(t._veeWatchers||(t._veeWatchers={}),!n[e]&&r)return t.$once("hook:mounted",(function(){Te(t,e,!1)}));!E(t._veeWatchers[e])&&n[e]&&(t._veeWatchers[e]=n[e].$watch("value",(function(){var e=t.checkComputesRequiredState();t.flags.validated&&(t._needsValidation=!0,t.validate()),e&&!t.flags.validated&&t.validateSilent()})))}var Ie=[["pristine","every"],["dirty","some"],["touched","some"],["untouched","every"],["valid","every"],["invalid","some"],["pending","some"],["validated","every"],["changed","some"],["passed","every"],["failed","some"]],Le=0;function Be(){return{id:"",refs:{},observers:[],errors:{},flags:Me(),fields:{}}}function De(){return{$_veeObserver:this}}var Re=n.default.extend({name:"ValidationObserver",provide:De,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_"+Le++}},slim:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:Be,created:function(){var t=this;this.id=this.vid,Ue(this);var e=N((function(e){var r=e.errors,n=e.flags,a=e.fields;t.errors=r,t.flags=n,t.fields=a}),16);this.$watch(qe,e)},activated:function(){Ue(this)},deactivated:function(){ze(this)},beforeDestroy:function(){ze(this)},render:function(t){var e=ge(this,Ne(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=_t(_t({},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=F(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 xt(this,void 0,void 0,(function(){var t,e,n,a,i,o;return wt(this,(function(s){switch(s.label){case 0:return[4,Promise.all(kt(D(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=s.sent(),e=t.every((function(t){return t})),n=qe.call(this),a=n.errors,i=n.flags,o=n.fields,this.errors=a,this.flags=i,this.fields=o,[2,{errors:a,flags:i,fields:o,isValid:e}]}}))}))},validate:function(t){var e=(void 0===t?{}:t).silent,r=void 0!==e&&e;return xt(this,void 0,void 0,(function(){return wt(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 xt(this,void 0,void 0,(function(){return wt(this,(function(e){switch(e.label){case 0:return[4,this.validate()];case 1:return e.sent()&&t?[2,t()]:[2]}}))}))},reset:function(){return kt(D(this.refs),this.observers).forEach((function(t){return t.reset()}))},setErrors:function(t){var e=this;Object.keys(t).forEach((function(r){var n=e.refs[r];if(n){var a=t[r]||[];a="string"==typeof a?[a]:a,n.setErrors(a)}})),this.observers.forEach((function(e){e.setErrors(t)}))}}});function ze(t){t.$_veeObserver&&t.$_veeObserver.unobserve(t.id,"observer")}function Ue(t){t.$_veeObserver&&t.$_veeObserver.observe(t,"observer")}function Ne(t){return _t(_t({},t.flags),{errors:t.errors,fields:t.fields,validate:t.validate,validateWithInfo:t.validateWithInfo,passes:t.handleSubmit,handleSubmit:t.handleSubmit,reset:t.reset})}function Me(){return _t(_t({},z()),{valid:!0,invalid:!1})}function qe(){for(var t=kt(D(this.refs),this.observers.filter((function(t){return!t.disabled}))),e={},r=Me(),n={},a=t.length,i=0;i<a;i++){var o=t[i];Array.isArray(o.errors)?(e[o.id]=o.errors,n[o.id]=_t({id:o.id,name:o.name,failedRules:o.failedRules},o.flags)):(e=_t(_t({},e),o.errors),n=_t(_t({},n),o.fields))}return Ie.forEach((function(e){var n=e[0],a=e[1];r[n]=t[a]((function(t){return t.flags[n]}))})),{errors:e,flags:r,fields:n}}function Ve(t,e){var r;void 0===e&&(e=U);var n="options"in t?t.options:t,a=Se.options,i={name:(n.name||"AnonymousHoc")+"WithValidation",props:_t({},a.props),data:a.data,computed:_t({},a.computed),methods:_t({},a.methods),beforeDestroy:a.beforeDestroy,inject:a.inject},o=(null===(r=null==n?void 0:n.model)||void 0===r?void 0:r.event)||"input";return i.render=function(t){var r;this.registerField();var a=_e(this),i=_t({},this.$listeners),s=ae(this.$vnode);this._inputEventName=this._inputEventName||pe(this.$vnode,s);var l=ie(this.$vnode);xe(this,null==l?void 0:l.value);var u=$e(this),c=u.onInput,d=u.onBlur,f=u.onValidate;ue(i,o,c),ue(i,"blur",d),this.normalizedEvents.forEach((function(t){ue(i,t,f)}));var p=(le(this.$vnode)||{prop:"value"}).prop,v=_t(_t(_t({},this.$attrs),((r={})[p]=null==s?void 0:s.value,r)),e(a));return t(n,{attrs:this.$attrs,props:v,on:i,scopedSlots:this.$scopedSlots},he(this.$slots,this.$vnode.context))},i}var Ge="3.4.15";Object.keys(yt).map((function(t){return{schema:yt[t],name:t}})).forEach((function(t){Lt(t.name,t.schema)})),Zt("en",a),t.Rules=yt,t.ValidationObserver=Re,t.ValidationProvider=Se,t.configure=Ot,t.extend=Lt,t.localeChanged=jt,t.localize=Zt,t.normalizeRules=zt,t.setInteractionMode=Rt,t.validate=Vt,t.version=Ge,t.withValidation=Ve,Object.defineProperty(t,"__esModule",{value:!0})}(e,r(538))},2465:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});const n={name:"AppInputButton",props:["description","isLast","title","error"]};const a=(0,r(1900).Z)(n,(function(){var t=this,e=t._self._c;return e("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}},[e("div",{staticClass:"leading-5"},[e("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?e("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?e("span",{staticClass:"text-left text-xs text-red-600"},[t._v("\n "+t._s(t.error)+"\n ")]):t._e()]),t._v(" "),e("div",[t._t("default")],2)])}),[],!1,null,null,null).exports},944:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});const n={name:"AppInputSwitch",props:["description","isLast","title","error"]};const a=(0,r(1900).Z)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex w-full items-center justify-between space-x-2 sm:space-x-8",class:{"mb-6 sm:mb-7":!t.isLast}},[e("div",{staticClass:"leading-5"},[e("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?e("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?e("span",{staticClass:"pt-2 text-xs dark:text-rose-600 text-rose-600"},[t._v("\n "+t._s(t.error)+"\n ")]):t._e()]),t._v(" "),e("div",[t._t("default")],2)])}),[],!1,null,null,null).exports},1157:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});const n={name:"AppInputText",props:["description","isLast","title","error"]};const a=(0,r(1900).Z)(n,(function(){var t=this,e=t._self._c;return e("div",{class:{"mb-6 sm:mb-7":!t.isLast}},[t.title?e("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?e("span",{staticClass:"pt-2 text-xs dark:text-rose-600 text-rose-600"},[t._v("\n "+t._s(t.error)+"\n ")]):t._e(),t._v(" "),t.description?e("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},6345:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});const n={name:"PageTab",props:["isLoading"],components:{Spinner:r(3592).Z}};const a=(0,r(1900).Z)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-tab"},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.isLoading,expression:"isLoading"}],attrs:{id:"loader"}},[e("Spinner")],1),t._v(" "),t._t("default")],2)}),[],!1,null,null,null).exports},8682:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=r(4509),a=r(8787),i=r(7009),o=r(9101);const s={name:"FixedTransactionRow",components:{MeteredTransactionDetailRow:a.Z,MemberAvatar:n.Z,FileTextIcon:o.zPP,ColorLabel:i.Z,EyeIcon:o.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)(s,(function(){var t=this,e=t._self._c;return e("tr",{staticClass:"whitespace-nowrap border-b border-dashed border-light dark:border-opacity-5"},[e("td",{staticClass:"py-5 pr-3 md:pr-1"},[e("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.note)+"\n ")])]),t._v(" "),t.user?e("td",{staticClass:"whitespace-nowrap px-3 md:px-1"},[t.row.data.relationships.user?e("div",{staticClass:"flex items-center"},[e("MemberAvatar",{attrs:{"is-border":!1,size:36,member:t.row.data.relationships.user}}),t._v(" "),e("div",{staticClass:"ml-3 pr-10"},[e("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(" "),e("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():e("span",{staticClass:"text-xs font-bold text-gray-500"},[t._v("\n "+t._s(t.$t("user_was_deleted"))+"\n ")])]):t._e(),t._v(" "),e("td",{staticClass:"px-3 md:px-1"},[e("ColorLabel",{staticClass:"capitalize",attrs:{color:t.$getTransactionStatusColor(t.row.data.attributes.status)}},[t._v("\n "+t._s(t.$t(t.row.data.attributes.status))+"\n ")])],1),t._v(" "),e("td",{staticClass:"px-3 md:px-1"},[e("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(" "),e("td",{staticClass:"px-3 md:px-1"},[e("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.created_at)+"\n ")])]),t._v(" "),e("td",{staticClass:"px-3 md:px-1"},[e("div",{staticClass:"w-28"},[e("img",{staticClass:"inline-block max-h-5",attrs:{src:t.$getPaymentLogo(t.row.data.attributes.driver),alt:t.row.data.attributes.driver}})])]),t._v(" "),e("td",{staticClass:"pl-3 text-right md:pl-1"},[e("div",{staticClass:"inline-block"},[e("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"}},[e("FileTextIcon",{staticClass:"opacity-75",attrs:{size:"15"}})],1)])])])}),[],!1,null,null,null).exports},8787:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});const n={name:"MeteredTransactionDetailRow",props:["row"]};const a=(0,r(1900).Z)(n,(function(){var t=this,e=t._self._c;return e("tr",[e("td",{staticClass:"overflow-hidden rounded-lg py-2",attrs:{colspan:"10"}},t._l(t.row.data.attributes.metadata,(function(r,n){return e("div",{key:n,staticClass:"flex items-center justify-between border-b border-dashed border-light py-2 dark:border-opacity-5"},[e("div",{staticClass:"w-2/4 leading-none"},[e("b",{staticClass:"text-sm font-bold leading-none"},[t._v("\n "+t._s(t.$t(r.feature))+"\n ")]),t._v(" "),e("small",{staticClass:"hidden pt-2 text-xs leading-none text-gray-500 sm:block"},[t._v("\n "+t._s(t.$t("feature_usage_desc_".concat(r.feature)))+"\n ")])]),t._v(" "),e("div",{staticClass:"w-1/4 text-left"},[e("span",{staticClass:"text-gray-560 text-sm font-bold"},[t._v("\n "+t._s(r.usage)+"\n ")])]),t._v(" "),e("div",{staticClass:"w-1/4 text-right"},[e("span",{staticClass:"text-theme text-sm font-bold"},[t._v("\n "+t._s(r.cost)+"\n ")])])])})),0)])}),[],!1,null,null,null).exports},4566:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=r(4509),a=r(8787),i=r(7009),o=r(9101);const s={name:"MeteredTransactionRow",components:{MeteredTransactionDetailRow:a.Z,MemberAvatar:n.Z,FileTextIcon:o.zPP,ColorLabel:i.Z,EyeIcon:o.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)(s,(function(){var t=this,e=t._self._c;return e("tr",{staticClass:"whitespace-nowrap border-b border-dashed border-light dark:border-opacity-5"},[e("td",{staticClass:"py-5 pr-3 md:pr-1"},[e("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.note)+"\n ")])]),t._v(" "),t.user?e("td",{staticClass:"whitespace-nowrap px-3 md:px-1"},[t.row.data.relationships.user?e("div",{staticClass:"flex items-center"},[e("MemberAvatar",{attrs:{"is-border":!1,size:36,member:t.row.data.relationships.user}}),t._v(" "),e("div",{staticClass:"ml-3 pr-10"},[e("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(" "),e("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():e("span",{staticClass:"text-xs font-bold text-gray-500"},[t._v("\n "+t._s(t.$t("user_was_deleted"))+"\n ")])]):t._e(),t._v(" "),e("td",{staticClass:"px-3 md:px-1"},[e("ColorLabel",{staticClass:"capitalize",attrs:{color:t.$getTransactionStatusColor(t.row.data.attributes.status)}},[t._v("\n "+t._s(t.$t(t.row.data.attributes.status))+"\n ")])],1),t._v(" "),e("td",{staticClass:"px-3 md:px-1"},[e("span",{staticClass:"text-sm font-bold capitalize"},[t._v("\n "+t._s(t.$t(t.row.data.attributes.type))+"\n ")])]),t._v(" "),e("td",{staticClass:"px-3 md:px-1"},[e("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(" "),e("td",{staticClass:"px-3 md:px-1"},[e("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.created_at)+"\n ")])]),t._v(" "),e("td",{staticClass:"px-3 md:px-1"},[e("div",{staticClass:"w-28"},[e("img",{staticClass:"inline-block max-h-5",attrs:{src:t.$getPaymentLogo(t.row.data.attributes.driver),alt:t.row.data.attributes.driver}})])]),t._v(" "),e("td",{staticClass:"pl-3 text-right md:pl-1"},[t.row.data.attributes.metadata?e("div",{staticClass:"flex w-full justify-end space-x-2"},[e("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)}}},[e("EyeIcon",{staticClass:"opacity-75",attrs:{size:"15"}})],1),t._v(" "),e("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"}},[e("FileTextIcon",{staticClass:"opacity-75",attrs:{size:"15"}})],1)]):e("div",[t._v("-")])])])}),[],!1,null,null,null).exports},7009:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});const n={name:"ColorLabel",props:["color"]};var a=r(3379),i=r.n(a),o=r(8520),s={insert:"head",singleton:!1};i()(o.Z,s);o.Z.locals;const l=(0,r(1900).Z)(n,(function(){var t=this;return(0,t._self._c)("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,"3ff27c4c",null).exports},9244:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(9101);const a={name:"FormLabel",props:["icon"],components:{TrendingUpIcon:n.Zab,WifiIcon:n.kVp,ListIcon:n.DE2,MailIcon:n.bV6,InfoIcon:n.szr,DatabaseIcon:n.VHe,UsersIcon:n.oyc,CreditCardIcon:n.ciH,DollarSignIcon:n.bkH,SmartphoneIcon:n.BEV,HardDriveIcon:n.zvn,BarChartIcon:n.eJP,SettingsIcon:n.ewm,FileTextIcon:n.zPP,ShieldIcon:n.b7C,FrownIcon:n.eFi,Edit2Icon:n.me4,BellIcon:n.Dkj,KeyIcon:n._m8}};const i=(0,r(1900).Z)(a,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"mb-8 flex items-center"},[t.icon?t._e():e("edit-2-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}),t._v(" "),"frown"===t.icon?e("frown-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"list"===t.icon?e("list-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"info"===t.icon?e("info-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"database"===t.icon?e("database-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"file-text"===t.icon?e("file-text-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"dollar"===t.icon?e("dollar-sign-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"credit-card"===t.icon?e("credit-card-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"bar-chart"===t.icon?e("bar-chart-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"settings"===t.icon?e("settings-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"hard-drive"===t.icon?e("hard-drive-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"mail"===t.icon?e("mail-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"smartphone"===t.icon?e("smartphone-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"shield"===t.icon?e("shield-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"bell"===t.icon?e("bell-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"key"===t.icon?e("key-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"users"===t.icon?e("users-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"wifi"===t.icon?e("wifi-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"trending-up"===t.icon?e("trending-up-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),e("b",{staticClass:"text-md font-bold dark:text-gray-200 sm:text-lg"},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},3666:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});const n={name:"InfoBox",props:["type"]};var a=r(3379),i=r.n(a),o=r(6355),s={insert:"head",singleton:!1};i()(o.Z,s);o.Z.locals;const l=(0,r(1900).Z)(n,(function(){var t=this;return(0,t._self._c)("div",{staticClass:"info-box",class:t.type},[t._t("default")],2)}),[],!1,null,"783003cd",null).exports},614:(t,e,r)=>{"use strict";r.d(e,{Z:()=>f});const n={name:"DotLabel",props:["color","title"]};var a=r(3379),i=r.n(a),o=r(4863),s={insert:"head",singleton:!1};i()(o.Z,s);o.Z.locals;var l=r(1900);const u={name:"ProgressLine",props:["data"],components:{DotLabel:(0,l.Z)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"label"},[e("span",{class:["label-dot",t.color]}),t._v(" "),e("b",{staticClass:"label-title"},[t._v("\n "+t._s(t.title)+"\n ")])])}),[],!1,null,"03d13328",null).exports}};var c=r(7227),d={insert:"head",singleton:!1};i()(c.Z,d);c.Z.locals;const f=(0,l.Z)(u,(function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"mb-4 flex h-2.5 items-center rounded bg-light-300 dark:bg-2x-dark-foreground"},t._l(t.data,(function(r,n){return e("div",{key:n,staticClass:"chart-wrapper",style:{width:(r.progress>1?r.progress:0)+"%"}},[1===t.data.length?e("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":r.progress<100,"rounded-lg border-none":r.progress>=100},r.color]}):t._e(),t._v(" "),t.data.length>1&&r.progress>0?e("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===n,"border-r-2 border-white dark:border-gray-800":n<t.data.length-1,"rounded-tr-lg rounded-br-lg":n===t.data.length-1},r.color]}):t._e()])})),0),t._v(" "),e("footer",{staticClass:"flex w-full items-center overflow-x-auto"},t._l(t.data,(function(t,r){return e("DotLabel",{key:r,staticClass:"mr-5",attrs:{color:t.color,title:t.title}})})),1)])}),[],!1,null,"596eaf42",null).exports},5508:(t,e,r)=>{"use strict";r.d(e,{Z:()=>v});var n=r(9101);const a={props:["data"],computed:{normalizedColumns:function(){return this.data.id&&delete this.data.id,Object.values(this.data)}}};var i=r(3379),o=r.n(i),s=r(3428),l={insert:"head",singleton:!1};o()(s.Z,l);s.Z.locals;var u=r(1900);const c=(0,u.Z)(a,(function(){var t=this,e=t._self._c;return e("tr",{staticClass:"table-row"},t._l(t.normalizedColumns,(function(r,n){return e("td",{key:n,staticClass:"table-cell"},[e("span",[t._v(t._s(r))])])})),0)}),[],!1,null,"61827e38",null).exports;var d=r(9669),f=r.n(d);const p={name:"DatatableWrapper",props:["paginator","tableData","columns","scope","api"],components:{ChevronRightIcon:n.XCv,ChevronLeftIcon:n.wyc,DatatableCell:c,ChevronUpIcon:n.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._self._c;return e("div",{staticClass:"w-full"},[t.hasData?e("table",{staticClass:"w-full"},[e("thead",[e("tr",{staticClass:"whitespace-nowrap"},t._l(t.columns,(function(r,n){return r.hidden?t._e():e("th",{key:n,staticClass:"text-left",class:{"sortable cursor-pointer":r.sortable,"text-right":Object.values(t.columns).length-1===n},on:{click:function(e){return t.sort(r.field,r.sortable)}}},[e("span",{staticClass:"text-xs text-gray-400 dark:text-gray-500"},[t._v("\n "+t._s(t.$t(r.label))+"\n ")]),t._v(" "),r.sortable?e("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(" "),e("tbody",{staticClass:"table-body"},[t._l(t.data.data,(function(r){return t._t("default",(function(){return[e("DatatableCell",{key:r.id,attrs:{data:r}})]}),{row:r})}))],2)]):t._e(),t._v(" "),t.isLoading||t.hasData?t._e():t._t("empty-page"),t._v(" "),t.paginator&&t.hasData?e("div",{staticClass:"mt-6 sm:flex sm:items-center sm:justify-between"},[t.data.meta.total>15&&t.data.meta.last_page<=6?e("ul",{staticClass:"pagination flex justify-center items-center"},[e("li",{staticClass:"previous inline-block p-1"},[e("a",{staticClass:"page-link",class:{"cursor-default opacity-20":1===t.pageIndex},on:{click:function(e){return t.goToPage(t.pageIndex-1)}}},[e("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t._l(t.data.meta.last_page,(function(r,n){return e("li",{key:n,staticClass:"inline-block p-1",on:{click:function(e){return t.goToPage(r)}}},[e("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===r}},[t._v("\n "+t._s(r)+"\n ")])])})),t._v(" "),e("li",{staticClass:"next inline-block p-1"},[e("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)}}},[e("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?e("ul",{staticClass:"pagination flex justify-center items-center"},[e("li",{staticClass:"previous inline-block p-1"},[e("a",{staticClass:"page-link",class:{"cursor-default opacity-20":1===t.pageIndex},on:{click:function(e){return t.goToPage(t.pageIndex-1)}}},[e("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t.pageIndex>=5?e("li",{staticClass:"inline-block p-1",on:{click:function(e){return t.goToPage(1)}}},[e("a",{staticClass:"page-link"},[t._v(" 1 ")])]):t._e(),t._v(" "),t._l(5,(function(r,n){return t.pageIndex<5?e("li",{key:n,staticClass:"inline-block p-1",on:{click:function(e){return t.goToPage(r)}}},[e("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===r}},[t._v("\n "+t._s(r)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex>=5?e("li",{staticClass:"inline-block p-1"},[e("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(t.floatPages,(function(r,n){return t.pageIndex>=5&&t.pageIndex<t.data.meta.last_page-3?e("li",{key:n,staticClass:"inline-block p-1",on:{click:function(e){return t.goToPage(r)}}},[e("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===r}},[t._v("\n "+t._s(r)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex<t.data.meta.last_page-3?e("li",{staticClass:"inline-block p-1"},[e("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(5,(function(r,n){return t.pageIndex>t.data.meta.last_page-4?e("li",{key:n,staticClass:"inline-block p-1",on:{click:function(e){t.goToPage(t.data.meta.last_page-(4-n))}}},[e("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-n)}},[t._v("\n "+t._s(t.data.meta.last_page-(4-n))+"\n ")])]):t._e()})),t._v(" "),t.pageIndex<t.data.meta.last_page-3?e("li",{staticClass:"inline-block p-1",on:{click:function(e){return t.goToPage(t.data.meta.last_page)}}},[e("a",{staticClass:"page-link"},[t._v("\n "+t._s(t.data.meta.last_page)+"\n ")])]):t._e(),t._v(" "),e("li",{staticClass:"next inline-block p-1"},[e("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)}}},[e("chevron-right-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)])],2):t._e(),t._v(" "),e("span",{staticClass:"text-xs text-gray-600 dark:text-gray-500 block text-center sm:mt-0 mt-4"},[t._v("\n\t\t\t\t"+t._s(t.$t("paginator",{from:t.data.meta.from,to:t.data.meta.to,total:t.data.meta.total}))+"\n ")])]):t._e()],2)}),[],!1,null,null,null).exports},4068:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>zt});var n=r(944),a=r(4789),i=r(9244),o=r(9669),s=r.n(o),l=r(5399),u=r(2465);const c={name:"UserUpdatePaymentMethodsExternally",components:{AppInputButton:u.Z,AppInputSwitch:n.Z,ButtonBase:a.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,s().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._self._c;return t.canShowForSubscription?e("div",{staticClass:"card shadow-card"},[e("FormLabel",[t._v("\n "+t._s(t.$t("update_payments"))+"\n ")]),t._v(" "),e("AppInputButton",{attrs:{title:t.$t("update_payment_method"),description:t.$t("payment_method_update_redirect_description"),"is-last":!0}},[e("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(7009),h=r(5508),m=r(3666),b=r(629),g=r(8787),y=r(4566);function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?x(Object(r),!0).forEach((function(e){k(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function k(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==_(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===_(e)?e:String(e)}(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:h.Z,ColorLabel:v.Z,FormLabel:i.Z,InfoBox:m.Z,FileTextIcon:p.zPP,EyeIcon:p.tEF},computed:w(w({},(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 A=(0,d.Z)($,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"card shadow-card"},[e("FormLabel",{attrs:{icon:"file-text"}},[t._v("\n "+t._s(t.$t("transactions"))+"\n ")]),t._v(" "),e("DatatableWrapper",{staticClass:"overflow-x-auto",attrs:{api:"/api/user/transactions",paginator:!0,columns:t.columns},scopedSlots:t._u([{key:"default",fn:function(r){var n=r.row;return[e("MeteredTransactionRow",{attrs:{row:n},on:{showDetail:t.showTransactionDetail}}),t._v(" "),n.data.attributes.metadata&&t.showedTransactionDetailById===n.data.id?e("MeteredTransactionDetailRow",{attrs:{row:n}}):t._e()]}},{key:"empty-page",fn:function(){return[e("InfoBox",{staticStyle:{"margin-bottom":"0"}},[e("p",[t._v(t._s(t.$t("user_invoices.empty")))])])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports;const C={name:"UserTransactionsForFixedBilling",components:{FixedTransactionRow:r(8682).Z,DatatableWrapper:h.Z,ColorLabel:v.Z,FormLabel:i.Z,InfoBox:m.Z},computed:{columns:function(){return this.$store.getters.transactionColumns.filter((function(t){return!["type","user_id"].includes(t.field)}))}}};const O=(0,d.Z)(C,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"card shadow-card"},[e("FormLabel",{attrs:{icon:"file-text"}},[t._v("\n "+t._s(t.$t("transactions"))+"\n ")]),t._v(" "),e("DatatableWrapper",{staticClass:"overflow-x-auto",attrs:{api:"/api/subscriptions/transactions",paginator:!0,columns:t.columns},scopedSlots:t._u([{key:"default",fn:function(t){var r=t.row;return[e("FixedTransactionRow",{attrs:{row:r}})]}},{key:"empty-page",fn:function(){return[e("InfoBox",{staticStyle:{"margin-bottom":"0"}},[e("p",[t._v(t._s(t.$t("user_invoices.empty")))])])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports;function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function j(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){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){u=!0,a=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return P(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 P(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 P(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Z(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){F(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function F(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==S(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===S(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const T={name:"UserFixedSubscriptionDetail",components:{ProgressLine:r(614).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=this,e=[];return Object.entries(this.user.data.meta.limitations).map((function(r){var n=j(r,2),a=n[0],i=n[1],o={color:{max_storage_amount:"warning",max_team_members:"purple"},message:{max_storage_amount:t.$t("total_x_of_x_used",{use:i.use,total:i.total}),max_team_members:-1===i.total?t.$t("max_team_members.unlimited"):t.$t("total_x_of_x_members",{use:i.use,total:i.total})},title:{max_storage_amount:t.$t("storage"),max_team_members:t.$t("team_members")}};e.push({message:o.message[a],isVisibleBar:-1!==i.total&&0!==i.total,distribution:[{progress:i.percentage,color:o.color[a],title:o.title[a]}]})})),e},status:function(){return{active:this.$t("active_until",{date:this.subscription.data.attributes.renews_at}),cancelled:this.$t("ends_at_date",{date:this.subscription.data.attributes.ends_at})}[this.subscription.data.attributes.status]},price:function(){return{month:this.$t("price_per_month",{price:this.subscription.data.relationships.plan.data.attributes.price}),year:this.$t("price_per_year",{price:this.subscription.data.relationships.plan.data.attributes.price})}[this.subscription.data.relationships.plan.data.attributes.interval]}})};const I=(0,d.Z)(T,(function(){var t=this,e=t._self._c;return t.hasSubscription?e("div",{staticClass:"card shadow-card"},[e("FormLabel",[t._v("\n "+t._s(t.$t("subscription"))+"\n ")]),t._v(" "),e("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(" "),e("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(r,n){return e("div",{key:n,class:{"mb-6":Object.keys(t.limitations).length-1!==n}},[e("b",{staticClass:"mb-3 block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(r.message)+"\n ")]),t._v(" "),r.isVisibleBar?e("ProgressLine",{attrs:{data:r.distribution}}):t._e()],1)}))],2):t._e()}),[],!1,null,null,null).exports;const L={name:"PaymentCard",components:{Trash2Icon:p.Bf1},props:["card"],methods:{deleteCreditCard:function(t){l.U.$emit("confirm:open",{title:this.$t("want_to_delete_card_title"),message:this.$t("want_to_delete_card_description"),action:{id:t,operation:"delete-credit-card"}})}},created:function(){var t=this;l.U.$on("action:confirmed",(function(e){"delete-credit-card"===e.operation&&s().delete("/api/stripe/credit-cards/".concat(e.id)).then((function(){t.$store.dispatch("getAppData"),l.U.$emit("toaster",{type:"success",message:t.$t("credit_card_deleted")})})).catch((function(){return t.$isSomethingWrong()}))}))},destroyed:function(){l.U.$off("action:confirmed")}};const B=(0,d.Z)(L,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex items-center justify-between rounded-lg bg-light-background py-3 px-2 dark:bg-2x-dark-foreground md:px-4"},[e("div",{staticClass:"flex items-center"},[e("img",{staticClass:"mr-3 h-5 rounded",attrs:{src:"/assets/gateways/".concat(t.card.data.attributes.brand,".svg"),alt:""}}),t._v(" "),e("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(" "),e("b",{staticClass:"text-sm font-bold leading-none"},[t._v(" "+t._s(t.$t("expires"))+" "+t._s(t.card.data.attributes.expiration)+" ")]),t._v(" "),e("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 D=r(3592),R="https://js.stripe.com/v3",z=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,U="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",N=null,M=function(t){return null!==N||(N=new Promise((function(e,r){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&t&&console.warn(U),window.Stripe)e(window.Stripe);else try{var n=function(){for(var t=document.querySelectorAll('script[src^="'.concat(R,'"]')),e=0;e<t.length;e++){var r=t[e];if(z.test(r.src))return r}return null}();n&&t?console.warn(U):n||(n=function(t){var e=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(R).concat(e);var n=document.head||document.body;if(!n)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(r),r}(t)),n.addEventListener("load",(function(){window.Stripe?e(window.Stripe):r(new Error("Stripe.js not available"))})),n.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(t){return void r(t)}else e(null)}))),N},q=Promise.resolve().then((function(){return M(null)})),V=!1;q.catch((function(t){V||console.warn(t)}));var G=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];V=!0;var n=Date.now();return q.then((function(t){return function(t,e,r){if(null===t)return null;var n=t.apply(void 0,e);return function(t,e){t&&t._registerWrapper&&t._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:e})}(n,r),n}(t,e,n)}))};function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}function H(){H=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),s=new P(n||[]);return a(o,"_invoke",{value:C(t,r,s)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var f="suspendedStart",p="suspendedYield",v="executing",h="completed",m={};function b(){}function g(){}function y(){}var _={};u(_,o,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(E([])));w&&w!==r&&n.call(w,o)&&(_=w);var k=y.prototype=b.prototype=Object.create(_);function $(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(a,i,o,s){var l=d(t[a],t,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==W(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(c).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return i=i?i.then(a,a):a()}})}function C(e,r,n){var a=f;return function(i,o){if(a===v)throw new Error("Generator is already running");if(a===h){if("throw"===i)throw o;return{value:t,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var l=O(s,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var u=d(e,r,n);if("normal"===u.type){if(a=n.done?h:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=h,n.method="throw",n.arg=u.arg)}}}function O(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=d(a,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function E(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(W(e)+" is not iterable")}return g.prototype=y,a(k,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:g,configurable:!0}),g.displayName=u(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},$(A.prototype),u(A.prototype,s,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new A(c(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},$(k),u(k,l,"Generator"),u(k,o,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=E,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Y(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,a)}function K(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){Y(i,n,a,o,s,"next",t)}function s(t){Y(i,n,a,o,s,"throw",t)}o(void 0)}))}}function J(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function X(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?J(Object(r),!0).forEach((function(e){Q(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):J(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Q(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==W(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===W(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tt,et=void 0;const rt={name:"UserStoredPaymentMethods",components:{InfoBox:m.Z,ButtonBase:a.Z,FormLabel:i.Z,PaymentCard:B,Spinner:D.Z},computed:X(X({},(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 K(H().mark((function e(){var r,n;return H().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("credit_card_stored")}),e.abrupt("return");case 3:return t.stripe.storingStripePaymentMethod=!0,e.next=6,tt.confirmSetup({elements:et,redirect:"if_required",confirmParams:{return_url:window.location.href}});case 6:r=e.sent,(n=r.error)?document.querySelector("#error-message").textContent=n.message:(l.U.$emit("toaster",{type:"success",message:t.$t("credit_card_stored")}),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 K(H().mark((function e(){return H().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,G(t.config.stripe_public_key);case 2:return tt=e.sent,e.next=5,s().get("/api/stripe/setup-intent").then((function(e){(et=tt.elements({clientSecret:e.data.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 nt=(0,d.Z)(rt,(function(){var t=this,e=t._self._c;return t.canShowForMeteredBilling||t.canShowForFixedBilling?e("div",{staticClass:"card shadow-card"},[e("FormLabel",{attrs:{icon:"credit-card"}},[t._v("\n "+t._s(t.$t("payment_method"))+"\n ")]),t._v(" "),t.hasPaymentMethod?e("div",["metered"===t.config.subscriptionType&&t.user.data.relationships.balance.data.attributes.balance>0?e("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 e("PaymentCard",{key:t.data.id,attrs:{card:t}})})),t._v(" "),e("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("auto_settled_credit_card"))+"\n ")])],2):t._e(),t._v(" "),t.hasPaymentMethod?t._e():e("div",[t.isCreditCardForm?t._e():e("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?e("form",{staticClass:"mt-6",attrs:{id:"payment-form"},on:{submit:function(e){return e.preventDefault(),t.storeStripePaymentMethod.apply(null,arguments)}}},[t.stripe.isInitialization?e("div",{staticClass:"relative mb-6 h-10"},[e("Spinner")],1):t._e(),t._v(" "),t.config.isDemo&&!t.stripe.isInitialization?e("InfoBox",[e("p",[t._v("For adding test credit card please use "),e("b",{staticClass:"text-theme"},[t._v("4242 4242 4242 4242")]),t._v(" as a card number, "),e("b",{staticClass:"text-theme"},[t._v("11/22")]),t._v("\n\t\t\t\t\t\tas the expiration date and "),e("b",{staticClass:"text-theme"},[t._v("123")]),t._v(" as CVC number and ZIP "),e("b",{staticClass:"text-theme"},[t._v("12345")]),t._v(" if required.")])]):t._e(),t._v(" "),e("div",{attrs:{id:"payment-element"}}),t._v(" "),e("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(" "),e("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:a.Z,FormLabel:i.Z,InfoBox:m.Z},computed:{hasSubscription:function(){return this.$store.getters.user.data.relationships.subscription}}};const it=(0,d.Z)(at,(function(){var t=this,e=t._self._c;return t.hasSubscription?t._e():e("div",{staticClass:"card shadow-card"},[e("FormLabel",[t._v("\n "+t._s(t.$t("subscription"))+"\n ")]),t._v(" "),e("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?e("b",{staticClass:"mb-3 mb-8 block text-sm text-gray-400"},[t._v("\n "+t._s(t.$t("upgrade_to_get_more"))+"\n ")]):t._e(),t._v(" "),t.$store.getters.config.allowed_payments?e("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 ot=r(1157);const st={name:"UserEditSubscription",components:{AppInputButton:u.Z,AppInputSwitch:n.Z,AppInputText:ot.Z,ButtonBase:a.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("want_cancel_subscription"),message:this.$t("popup_subscription_cancel.message"),action:{operation:"cancel-subscription"}})}},created:function(){var t=this;l.U.$on("action:confirmed",(function(e){"cancel-subscription"===e.operation&&(t.isCancelling=!0,s().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 lt=(0,d.Z)(st,(function(){var t=this,e=t._self._c;return t.hasSubscription?e("div",{staticClass:"card shadow-card"},[e("FormLabel",[t._v("\n "+t._s(t.$t("edit_your_subscription"))+"\n ")]),t._v(" "),"cancelled"!==t.subscription.attributes.status?e("AppInputButton",{attrs:{title:t.$t("cancel_subscription"),description:t.$t("cancel_subscription_description")}},[e("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(" "),e("AppInputButton",{attrs:{title:t.$t("upgrade_downgrade_plan"),description:t.$t("upgrade_downgrade_plan_description"),"is-last":!0}},[e("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 ut(t){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ut(t)}function ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==ut(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==ut(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===ut(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const ft={name:"UserFailedPayments",components:{FormLabel:i.Z,InfoBox:m.Z},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ct(Object(r),!0).forEach((function(e){dt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ct(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["user"]))};const pt=(0,d.Z)(ft,(function(){var t=this,e=t._self._c;return t.user.data.relationships.failedPayments&&t.user.data.relationships.failedPayments.data.length>0?e("div",{staticClass:"card shadow-card"},[e("FormLabel",{attrs:{icon:"frown"}},[t._v("\n "+t._s(t.$t("failed_payments"))+"\n ")]),t._v(" "),e("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(" "),e("b",{staticClass:"mb-3 mb-5 block text-sm text-gray-400"},[t._v("\n "+t._s(t.$t("unable_to_charge"))+"\n ")]),t._v(" "),t._l(t.user.data.relationships.failedPayments.data,(function(r){return e("div",{key:r.data.id,staticClass:"flex items-center justify-between border-b border-dashed border-light py-2 dark:border-opacity-5"},[e("div",{staticClass:"w-2/4 leading-none"},[e("b",{staticClass:"text-sm font-bold leading-none"},[t._v("\n "+t._s(r.data.attributes.note)+"\n ")])]),t._v(" "),e("div",{staticClass:"w-1/4 text-left"},[e("span",{staticClass:"text-gray-560 text-sm font-bold capitalize"},[t._v("\n "+t._s(t.$t(r.data.attributes.source))+"\n ")])]),t._v(" "),e("div",{staticClass:"w-1/4 text-right"},[e("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(r.data.attributes.created_at)+"\n ")])]),t._v(" "),e("div",{staticClass:"w-1/4 text-right"},[e("span",{staticClass:"text-red text-sm font-bold"},[t._v("\n "+t._s(r.data.attributes.amount)+"\n ")])])])}))],2):t._e()}),[],!1,null,null,null).exports;function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function ht(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function mt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==vt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==vt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===vt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const bt={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?ht(Object(r),!0).forEach((function(e){mt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ht(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["user"]))};const gt=(0,d.Z)(bt,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"card shadow-card"},[e("FormLabel",{attrs:{icon:"bar-chart"}},[t._v("\n "+t._s(t.$t("usage_estimates"))+"\n ")]),t._v(" "),e("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(" "),e("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(r,n){return e("div",{key:n,staticClass:"flex items-center justify-between border-b border-dashed border-light py-2 dark:border-opacity-5"},[e("div",{staticClass:"w-2/4 leading-none"},[e("b",{staticClass:"text-sm font-bold leading-none"},[t._v("\n "+t._s(t.$t(r.feature))+"\n ")]),t._v(" "),e("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_".concat(r.feature)))+"\n ")])]),t._v(" "),e("div",{staticClass:"w-1/4 text-left"},[e("span",{staticClass:"text-gray-560 text-sm font-bold"},[t._v("\n "+t._s(r.usage)+"\n ")])]),t._v(" "),e("div",{staticClass:"w-1/4 text-right"},[e("span",{staticClass:"text-theme text-sm font-bold"},[t._v("\n "+t._s(r.cost)+"\n ")])])])})),t._v(" "),e("small",{staticClass:"mt-6 block font-bold"},[t._v("\n "+t._s(t.$t("records_updated_daily_bases"))+"\n ")])],2)}),[],!1,null,null,null).exports;var yt=r(9495);function _t(t){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(t)}function xt(){xt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),s=new P(n||[]);return a(o,"_invoke",{value:C(t,r,s)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var f="suspendedStart",p="suspendedYield",v="executing",h="completed",m={};function b(){}function g(){}function y(){}var _={};u(_,o,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(E([])));w&&w!==r&&n.call(w,o)&&(_=w);var k=y.prototype=b.prototype=Object.create(_);function $(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(a,i,o,s){var l=d(t[a],t,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==_t(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(c).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return i=i?i.then(a,a):a()}})}function C(e,r,n){var a=f;return function(i,o){if(a===v)throw new Error("Generator is already running");if(a===h){if("throw"===i)throw o;return{value:t,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var l=O(s,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var u=d(e,r,n);if("normal"===u.type){if(a=n.done?h:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=h,n.method="throw",n.arg=u.arg)}}}function O(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=d(a,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function E(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(_t(e)+" is not iterable")}return g.prototype=y,a(k,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:g,configurable:!0}),g.displayName=u(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},$(A.prototype),u(A.prototype,s,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new A(c(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},$(k),u(k,l,"Generator"),u(k,o,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=E,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function wt(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,a)}function kt(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){wt(i,n,a,o,s,"next",t)}function s(t){wt(i,n,a,o,s,"throw",t)}o(void 0)}))}}function $t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function At(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==_t(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==_t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===_t(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ct={name:"UserBillingAlerts",components:{ValidationObserver:yt.ValidationObserver,ValidationProvider:yt.ValidationProvider,AppInputText:ot.Z,ButtonBase:a.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?$t(Object(r),!0).forEach((function(e){At(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$t(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 kt(xt().mark((function e(){return xt().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,s().put("/api/subscriptions/billing-alert",{amount:t.billingAlertAmount}).then((function(){t.$store.dispatch("getAppData"),t.showUpdateBillingAlertForm=!1,l.U.$emit("toaster",{type:"success",message:t.$t("alert_updated")})})).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 kt(xt().mark((function e(){return xt().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,s().post("/api/subscriptions/billing-alert",{amount:t.billingAlertAmount}).then((function(){t.$store.dispatch("getAppData"),l.U.$emit("toaster",{type:"success",message:t.$t("alert_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("want_to_delete_alert"),message:this.$t("want_to_delete_alert_description"),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&&s().delete("/api/subscriptions/billing-alert").then((function(){t.$store.dispatch("getAppData"),t.showUpdateBillingAlertForm=!1,t.billingAlertAmount=void 0,l.U.$emit("toaster",{type:"success",message:t.$t("deleted_alert")})})).catch((function(){return t.$isSomethingWrong()}))}))},destroyed:function(){l.U.$off("action:confirmed")}};const Ot=(0,d.Z)(Ct,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"card shadow-card"},[e("FormLabel",{attrs:{icon:"bell"}},[t._v("\n "+t._s(t.$t("billing_alert"))+"\n ")]),t._v(" "),t.user.data.relationships.alert?e("div",[e("b",{staticClass:"-mt-3 mb-0.5 block flex items-center text-2xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.user.data.relationships.alert.data.attributes.formatted)+"\n "),t.showUpdateBillingAlertForm?t._e():e("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?e("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(" "),e("b",{staticClass:"block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(t.$t("billing_alert_description"))+"\n ")])]):t._e(),t._v(" "),t.showUpdateBillingAlertForm?e("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(r){r.invalid;return[e("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Billing Alert",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(r){var n=r.errors;return[e("AppInputText",{attrs:{description:t.$t("billing_alert_notes"),error:n[0],"is-last":!0}},[e("div",{staticClass:"space-y-4 sm:flex sm:space-x-4 sm:space-y-0"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.billingAlertAmount,expression:"billingAlertAmount"}],staticClass:"focus-border-theme input-dark",class:{"!border-rose-600":n[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(" "),e("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,2212619140)}):t._e(),t._v(" "),t.user.data.relationships.alert?t._e():e("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(r){r.invalid;return[e("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Billing Alert",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(r){var n=r.errors;return[e("AppInputText",{attrs:{description:t.$t("billing_alert_notes"),error:n[0],"is-last":!0}},[e("div",{staticClass:"space-y-4 sm:flex sm:space-x-4 sm:space-y-0"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.billingAlertAmount,expression:"billingAlertAmount"}],staticClass:"focus-border-theme input-dark",class:{"!border-rose-600":n[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(" "),e("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,423944407)})],1)}),[],!1,null,null,null).exports;var St=r(6345);function jt(t){return jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jt(t)}function Pt(){Pt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),s=new P(n||[]);return a(o,"_invoke",{value:C(t,r,s)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var f="suspendedStart",p="suspendedYield",v="executing",h="completed",m={};function b(){}function g(){}function y(){}var _={};u(_,o,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(E([])));w&&w!==r&&n.call(w,o)&&(_=w);var k=y.prototype=b.prototype=Object.create(_);function $(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(a,i,o,s){var l=d(t[a],t,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==jt(c)&&n.call(c,"__await")?e.resolve(c.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(c).then((function(t){u.value=t,o(u)}),(function(t){return r("throw",t,o,s)}))}s(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return i=i?i.then(a,a):a()}})}function C(e,r,n){var a=f;return function(i,o){if(a===v)throw new Error("Generator is already running");if(a===h){if("throw"===i)throw o;return{value:t,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var l=O(s,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=v;var u=d(e,r,n);if("normal"===u.type){if(a=n.done?h:p,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=h,n.method="throw",n.arg=u.arg)}}}function O(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=d(a,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function E(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(jt(e)+" is not iterable")}return g.prototype=y,a(k,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:g,configurable:!0}),g.displayName=u(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},$(A.prototype),u(A.prototype,s,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new A(c(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},$(k),u(k,l,"Generator"),u(k,o,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=E,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;j(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:E(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Et(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,a)}function Zt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ft(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(r),!0).forEach((function(e){Tt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Tt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==jt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===jt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const It={name:"UserBalance",components:{ValidationObserver:yt.ValidationObserver,ValidationProvider:yt.ValidationProvider,AppInputText:ot.Z,ButtonBase:a.Z,FormLabel:i.Z},computed:Ft(Ft({},(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=Pt().mark((function t(){return Pt().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(n,a){var i=t.apply(e,r);function o(t){Et(i,n,a,o,s,"next",t)}function s(t){Et(i,n,a,o,s,"throw",t)}o(void 0)}))})()}}};function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function Bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Dt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==Lt(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==Lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===Lt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Rt={name:"Billing",components:{UserUpdatePaymentMethodsExternally:f,UserTransactionsForMeteredBilling:A,UserTransactionsForFixedBilling:O,UserFixedSubscriptionDetail:I,UserStoredPaymentMethods:nt,UserEmptySubscription:it,UserEditSubscription:lt,UserFailedPayments:pt,UserUsageEstimates:gt,UserBillingAlerts:Ot,UserBalance:(0,d.Z)(It,(function(){var t=this,e=t._self._c;return t.hasPaymentMethod?t._e():e("div",{staticClass:"card shadow-card"},[e("FormLabel",{attrs:{icon:"dollar"}},[t._v("\n "+t._s(t.$t("balance"))+"\n ")]),t._v(" "),e("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(" "),e("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(r){r.invalid;return[e("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Amount",rules:"required|min_value:".concat(t.user.data.meta.totalDebt.amount)},scopedSlots:t._u([{key:"default",fn:function(r){var n=r.errors;return[e("AppInputText",{attrs:{description:t.$t("amount_increase_description"),error:n[0],"is-last":!0}},[e("div",{staticClass:"space-y-4 sm:flex sm:space-x-4 sm:space-y-0"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.chargeAmount,expression:"chargeAmount"}],staticClass:"focus-border-theme input-dark",class:{"!border-rose-600":n[0]},attrs:{placeholder:t.$t("fund_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(" "),e("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{type:"submit","button-style":"theme"}},[t._v("\n "+t._s(t.$t("make_payment"))+"\n ")])],1)])]}}],null,!0)})]}}],null,!1,1144290692)})],1)}),[],!1,null,null,null).exports,PageTab:St.Z},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Bt(Object(r),!0).forEach((function(e){Dt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["config"]))};const zt=(0,d.Z)(Rt,(function(){var t=this,e=t._self._c;return e("PageTab",["metered"===t.config.subscriptionType?e("div",[e("UserFailedPayments"),t._v(" "),e("UserBalance"),t._v(" "),e("UserUsageEstimates"),t._v(" "),e("UserBillingAlerts"),t._v(" "),e("UserStoredPaymentMethods"),t._v(" "),e("UserTransactionsForMeteredBilling")],1):t._e(),t._v(" "),"fixed"===t.config.subscriptionType?e("div",[e("UserEmptySubscription"),t._v(" "),e("UserFixedSubscriptionDetail"),t._v(" "),e("UserStoredPaymentMethods"),t._v(" "),e("UserUpdatePaymentMethodsExternally"),t._v(" "),e("UserEditSubscription"),t._v(" "),e("UserTransactionsForFixedBilling")],1):t._e()])}),[],!1,null,null,null).exports}}]); |