mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
2 lines
105 KiB
JavaScript
Vendored
2 lines
105 KiB
JavaScript
Vendored
/*! For license information please see billing.js.LICENSE.txt */
|
||
(self.webpackChunk=self.webpackChunk||[]).push([[6754],{7520:(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},4507:(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-26872047]{background:#f4f5f6;border-radius:10px;margin-bottom:32px;padding:20px;text-align:left}.info-box.error[data-v-26872047]{background:rgba(253,57,122,.1)}.info-box.error a[data-v-26872047],.info-box.error p[data-v-26872047]{color:#fd397a}.info-box.error a[data-v-26872047]{text-decoration:underline}.info-box p[data-v-26872047]{font-weight:600;line-height:1.6;word-break:break-word}.info-box p[data-v-26872047],.info-box p[data-v-26872047] a{font-size:15px}.info-box p[data-v-26872047] b{font-size:15px;font-weight:700}.info-box a[data-v-26872047],.info-box b[data-v-26872047]{font-weight:700}.info-box a[data-v-26872047]{font-size:.9375em;line-height:1.6}.info-box ul[data-v-26872047]{margin-top:15px}.info-box ul[data-v-26872047],.info-box ul li[data-v-26872047],.info-box ul li a[data-v-26872047]{display:block}@media only screen and (max-width:690px){.info-box[data-v-26872047]{padding:15px}}.dark .info-box[data-v-26872047]{background:#1e2024}.dark .info-box.error[data-v-26872047]{background:rgba(253,57,122,.1)}.dark .info-box.error a[data-v-26872047],.dark .info-box.error p[data-v-26872047]{color:#fd397a}.dark .info-box.error a[data-v-26872047]{text-decoration:underline}.dark .info-box p[data-v-26872047],.dark .info-box ul li[data-v-26872047]{color:#bec6cf}",""]);const i=a},5022:(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},8003:(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},2424:(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},s={en:/^[A-Z\s]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ\s]*$/i,da:/^[A-ZÆØÅ\s]*$/i,de:/^[A-ZÄÖÜß\s]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ\s]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\s]*$/i,it:/^[A-Z\xC0-\xFF\s]*$/i,lt:/^[A-ZĄČĘĖĮŠŲŪŽ\s]*$/i,nl:/^[A-ZÉËÏÓÖÜ\s]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ\s]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ\s]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ\s]*$/i,ro:/^[A-ZĂÂÎŞŢ\s]*$/i,ru:/^[А-ЯЁ\s]*$/i,sk:/^[A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ\s]*$/i,sr:/^[A-ZČĆŽŠĐ\s]*$/i,sv:/^[A-ZÅÄÖ\s]*$/i,tr:/^[A-ZÇĞİıÖŞÜ\s]*$/i,uk:/^[А-ЩЬЮЯЄІЇҐ\s]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\s]*$/,az:/^[A-ZÇƏĞİıÖŞÜ\s]*$/i,el:/^[Α-ώ\s]*$/i,ja:/^[A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\s]*$/i,he:/^[A-Z\u05D0-\u05EA'\s]*$/i},o={en:/^[0-9A-Z]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[0-9A-ZÆØÅ]$/i,de:/^[0-9A-ZÄÖÜß]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,it:/^[0-9A-Z\xC0-\xFF]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ro:/^[0-9A-ZĂÂÎŞŢ]*$/i,ru:/^[0-9А-ЯЁ]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ]*$/i,sr:/^[0-9A-ZČĆŽŠĐ]*$/i,sv:/^[0-9A-ZÅÄÖ]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ]*$/i,uk:/^[0-9А-ЩЬЮЯЄІЇҐ]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ]*$/i,el:/^[0-9Α-ώ]*$/i,ja:/^[0-9A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF]*$/i,he:/^[0-9A-Z\u05D0-\u05EA']*$/i},l={en:/^[0-9A-Z_-]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ_-]*$/i,da:/^[0-9A-ZÆØÅ_-]*$/i,de:/^[0-9A-ZÄÖÜß_-]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,fa:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰپژگچکی]*$/,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,it:/^[0-9A-Z\xC0-\xFF_-]*$/i,lt:/^[0-9A-ZĄČĘĖĮŠŲŪŽ_-]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ_-]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ_-]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ_-]*$/i,ro:/^[0-9A-ZĂÂÎŞŢ_-]*$/i,ru:/^[0-9А-ЯЁ_-]*$/i,sk:/^[0-9A-ZÁÄČĎÉÍĹĽŇÓŔŠŤÚÝŽ_-]*$/i,sr:/^[0-9A-ZČĆŽŠĐ_-]*$/i,sv:/^[0-9A-ZÅÄÖ_-]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,uk:/^[0-9А-ЩЬЮЯЄІЇҐ_-]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/,az:/^[0-9A-ZÇƏĞİıÖŞÜ_-]*$/i,el:/^[0-9Α-ώ_-]*$/i,ja:/^[0-9A-Z\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF_-]*$/i,he:/^[0-9A-Z\u05D0-\u05EA'_-]*$/i},c=function(t,e){var r=(void 0===e?{}:e).locale,n=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return c(t,{locale:n})})):n?(i[n]||i.en).test(t):Object.keys(i).some((function(e){return i[e].test(t)}))},u={validate:c,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?(o[n]||o.en).test(t):Object.keys(o).some((function(e){return o[e].test(t)}))},v={validate:p,params:[{name:"locale"}]},m=function(t,e){var r=(void 0===e?{}:e).locale,n=void 0===r?"":r;return Array.isArray(t)?t.every((function(t){return m(t,{locale:n})})):n?(s[n]||s.en).test(t):Object.keys(s).some((function(e){return s[e].test(t)}))},h={validate:m,params:[{name:"locale"}]},b=function(t,e){var r=void 0===e?{}:e,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"}]},_={validate:function(t,e){var r=e.target;return String(t)===String(r)},params:[{name:"target",isTarget:!0}]},y=function(t,e){var r=e.length;if(Array.isArray(t))return t.every((function(t){return y(t,{length:r})}));var n=String(t);return/^[0-9]*$/.test(n)&&n.length===r},x={validate:y,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)}))},$=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}))}))},k={validate:$,params:[{name:"width",cast:function(t){return Number(t)}},{name:"height",cast:function(t){return Number(t)}}]},C={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 O(t){return null==t}function S(t){return Array.isArray(t)&&0===t.length}var j=function(t){return null!==t&&t&&"object"==typeof t&&!Array.isArray(t)};function Z(t,e){return!(!A(t)||!A(e))||t===e}function P(t){return""!==t&&!O(t)}function F(t){return"function"==typeof t}function I(t){return F(t)&&!!t.__locatorRef}function E(t,e){var r=Array.isArray(t)?t:D(t);if(F(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:D(t),n=E(r,e);return-1===n?void 0:r[n]}function B(t,e){return-1!==t.indexOf(e)}function D(t){return F(Array.from)?Array.from(t):z(t)}function z(t){for(var e=[],r=t.length,n=0;n<r;n++)e.push(t[n]);return e}function R(t){return F(Object.values)?Object.values(t):Object.keys(t).map((function(e){return t[e]}))}function U(t,e){return Object.keys(e).forEach((function(r){if(j(e[r]))return t[r]||(t[r]={}),void U(t[r],e[r]);t[r]=e[r]})),t}function L(){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 M(t){return t}function q(t,e,r){return void 0===e&&(e=0),void 0===r&&(r={cancelled:!1}),0===e?t:function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];var s=function(){n=void 0,r.cancelled||t.apply(void 0,a)};clearTimeout(n),n=setTimeout(s,e)};var n}function V(t){console.warn("[vee-validate] "+t)}function N(t,e){return t.replace(/{([^}]+)}/g,(function(t,r){return r in e?e[r]:"{"+r+"}"}))}var W=function(t,e){return Array.isArray(t)?t.every((function(t){return W(t,e)})):D(e).some((function(e){return e==t}))},H={validate:W},G={validate:function(t,e){return!W(t,e)}},K=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)},J={validate:K},X=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)},Y={validate:X},Q={validate:function(t){return Array.isArray(t)?t.every((function(t){return/^-?[0-9]+$/.test(String(t))})):/^-?[0-9]+$/.test(String(t))}},tt={validate:function(t,e){return t===e.other},params:[{name:"other"}]},et={validate:function(t,e){return t!==e.other},params:[{name:"other"}]},rt=function(t,e){var r=e.length;return!O(t)&&("string"==typeof t&&(t=D(t)),"number"==typeof t&&(t=String(t)),t.length||(t=D(t)),t.length===r)},nt={validate:rt,params:[{name:"length",cast:function(t){return Number(t)}}]},at=function(t,e){var r=e.length;return O(t)?r>=0:Array.isArray(t)?t.every((function(t){return at(t,{length:r})})):String(t).length<=r},it={validate:at,params:[{name:"length",cast:function(t){return Number(t)}}]},st=function(t,e){var r=e.max;return!O(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return st(t,{max:r})})):Number(t)<=r)},ot={validate:st,params:[{name:"max",cast:function(t){return Number(t)}}]},lt=function(t,e){var r=new RegExp(e.join("|").replace("*",".+")+"$","i");return Array.isArray(t)?t.every((function(t){return r.test(t.type)})):r.test(t.type)},ct={validate:lt},ut=function(t,e){var r=e.length;return!O(t)&&(Array.isArray(t)?t.every((function(t){return ut(t,{length:r})})):String(t).length>=r)},dt={validate:ut,params:[{name:"length",cast:function(t){return Number(t)}}]},ft=function(t,e){var r=e.min;return!O(t)&&""!==t&&(Array.isArray(t)?t.length>0&&t.every((function(t){return ft(t,{min:r})})):Number(t)>=r)},pt={validate:ft,params:[{name:"min",cast:function(t){return Number(t)}}]},vt=/^[٠١٢٣٤٥٦٧٨٩]+$/,mt=/^[0-9]+$/,ht={validate:function(t){var e=function(t){var e=String(t);return mt.test(e)||vt.test(e)};return Array.isArray(t)?t.every(e):e(t)}},bt=function(t,e){var r=e.regex;return Array.isArray(t)?t.every((function(t){return bt(t,{regex:r})})):r.test(String(t))},gt={validate:bt,params:[{name:"regex",cast:function(t){return"string"==typeof t?new RegExp(t):t}}]},_t={validate:function(t,e){var r=(void 0===e?{allowFalse:!0}:e).allowFalse,n={valid:!1,required:!0};return O(t)||S(t)?n:!1!==t||r?(n.valid=!!String(t).trim().length,n):n},params:[{name:"allowFalse",default:!0}],computesRequired:!0},yt=function(t){return S(t)||B([!1,null,void 0],t)||!String(t).trim().length},xt=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=!yt(n),r?{valid:!yt(t),required:r}:{valid:!0,required:r}},wt={validate:xt,params:[{name:"target",isTarget:!0},{name:"values"}],computesRequired:!0},$t=function(t,e){var r=e.size;if(isNaN(r))return!1;var 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},kt={validate:$t,params:[{name:"size",cast:function(t){return Number(t)}}]},Ct=function(t,e){var r=e||{},n=r.decimals,a=void 0===n?0:n,i=r.separator,s=new RegExp("^-?\\d+"+("comma"===(void 0===i?"dot":i)?",?":"\\.?")+(0===a?"\\d*":"(\\d{"+a+"})?")+"$");return Array.isArray(t)?t.every((function(t){return s.test(String(t))})):s.test(String(t))},At={validate:Ct,params:[{name:"decimals",default:0},{name:"separator",default:"dot"}]},Ot=Object.freeze({__proto__:null,alpha_dash:f,alpha_num:v,alpha_spaces:h,alpha:u,between:g,confirmed:_,digits:x,dimensions:k,email:C,ext:J,image:Y,oneOf:H,integer:Q,length:nt,is_not:et,is:tt,max:it,max_value:ot,mimes:ct,min:dt,min_value:pt,excluded:G,numeric:ht,regex:gt,required:_t,required_if:wt,size:kt,double:At}),St=function(){return St=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},St.apply(this,arguments)};function jt(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 s(t){try{l(n.next(t))}catch(t){i(t)}}function o(t){try{l(n.throw(t))}catch(t){i(t)}}function l(t){t.done?r(t.value):a(t.value).then(s,o)}l((n=n.apply(t,e||[])).next())}))}function Zt(t,e){var r,n,a,i,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function o(t){return function(e){return l([t,e])}}function l(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,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 s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((a=(a=s.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){s.label=i[1];break}if(6===i[0]&&s.label<a[1]){s.label=a[1],a=i;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(i);break}a[2]&&s.ops.pop(),s.trys.pop();continue}i=e.call(t,s)}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 Pt(){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],s=0,o=i.length;s<o;s++,a++)n[a]=i[s];return n}var Ft=St({},{defaultMessage:"{_field_} is not valid.",skipOptional:!0,classes:{touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"},bails:!0,mode:"aggressive",useConstraintAttrs:!0}),It=function(){return Ft},Et=function(t){Ft=St(St({},Ft),t)},Tt=function(t){Et(t)},Bt=new n.default;function Dt(){Bt.$emit("change:locale")}var zt,Rt=function(){function t(t,e){this.container={},this.locale=t,this.merge(e)}return t.prototype.resolve=function(t,e,r){return this.format(this.locale,t,e,r)},t.prototype.format=function(t,e,r,n){var a,i,s,o,l,c,u,d,f,p=null===(s=null===(i=null===(a=this.container[t])||void 0===a?void 0:a.fields)||void 0===i?void 0:i[e])||void 0===s?void 0:s[r],v=null===(l=null===(o=this.container[t])||void 0===o?void 0:o.messages)||void 0===l?void 0:l[r];return(f=p||v||"")||(f="{_field_} is not valid"),e=null!==(d=null===(u=null===(c=this.container[t])||void 0===c?void 0:c.names)||void 0===u?void 0:u[e])&&void 0!==d?d:e,F(f)?f(e,n):N(f,St(St({},n),{_field_:e}))},t.prototype.merge=function(t){U(this.container,t)},t.prototype.hasRule=function(t){var e,r;return!!(null===(r=null===(e=this.container[this.locale])||void 0===e?void 0:e.messages)||void 0===r?void 0:r[t])},t}();function Ut(t,e){var r;if(zt||(zt=new Rt("en",{}),Et({defaultMessage:function(t,e){return zt.resolve(t,null==e?void 0:e._rule_,e||{})}})),"string"==typeof t)return zt.locale=t,e&&zt.merge(((r={})[t]=e,r)),void Dt();zt.merge(t)}var Lt={};function Mt(t){var e;return(null===(e=t.params)||void 0===e?void 0:e.length)&&(t.params=t.params.map((function(t){return"string"==typeof t?{name:t}:t}))),t}var qt=function(){function t(){}return t.extend=function(t,e){var r=Mt(e);Lt[t]?Lt[t]=U(Lt[t],e):Lt[t]=St({lazy:!1,computesRequired:!1},r)},t.isLazy=function(t){var e;return!!(null===(e=Lt[t])||void 0===e?void 0:e.lazy)},t.isRequireRule=function(t){var e;return!!(null===(e=Lt[t])||void 0===e?void 0:e.computesRequired)},t.getRuleDefinition=function(t){return Lt[t]},t}();function Vt(t,e){Nt(t,e),"object"!=typeof e?qt.extend(t,{validate:e}):qt.extend(t,e)}function Nt(t,e){if(!F(e)&&!F(e.validate)&&!qt.getRuleDefinition(t))throw new Error("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.")}var Wt={aggressive:function(){return{on:["input","blur"]}},eager:function(t){return t.errors.length?{on:["input","change"]}:{on:["change","blur"]}},passive:function(){return{on:[]}},lazy:function(){return{on:["change","blur"]}}},Ht=function(t,e){if(Et({mode:t}),e){if(!F(e))throw new Error("A mode implementation must be a function");Wt[t]=e}};function Gt(t){var e={};return Object.defineProperty(e,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),t?j(t)&&t._$$isNormalized?t:j(t)?Object.keys(t).reduce((function(e,r){var n=[];return n=!0===t[r]?[]:Array.isArray(t[r])||j(t[r])?t[r]:[t[r]],!1!==t[r]&&(e[r]=Kt(r,n)),e}),e):"string"!=typeof t?(V("rules must be either a string or an object."),e):t.split("|").reduce((function(t,e){var r=Jt(e);return r.name?(t[r.name]=Kt(r.name,r.params),t):t}),e):e}function Kt(t,e){var r=qt.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 s=0;s<n.length;s++){var o=n[s],l=o.default;Array.isArray(e)?s in e&&(l=e[s]):o.name in e?l=e[o.name]:1===n.length&&(l=e),o.isTarget&&(l=Xt(l,o.cast)),"string"==typeof l&&"@"===l[0]&&(l=Xt(l.slice(1),o.cast)),!I(l)&&o.cast&&(l=o.cast(l)),i[o.name]?(i[o.name]=Array.isArray(i[o.name])?i[o.name]:[i[o.name]],i[o.name].push(l)):i[o.name]=l}return i}var Jt=function(t){var e=[],r=t.split(":")[0];return B(t,":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:r,params:e}};function Xt(t,e){var r=function(r){var n=r[t];return e?e(n):n};return r.__locatorRef=t,r}function Yt(t){return Array.isArray(t)?t.filter((function(t){return I(t)||"string"==typeof t&&"@"===t[0]})):Object.keys(t).filter((function(e){return I(t[e])})).map((function(e){return t[e]}))}function Qt(t,e,r){return void 0===r&&(r={}),jt(this,void 0,void 0,(function(){var n,a,i,s,o,l;return Zt(this,(function(c){switch(c.label){case 0:return n=null==r?void 0:r.bails,a=null==r?void 0:r.skipIfEmpty,[4,te({name:(null==r?void 0:r.name)||"{field}",rules:Gt(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=c.sent(),s=[],o={},l={},i.errors.forEach((function(t){var e=t.msg();s.push(e),o[t.rule]=e,l[t.rule]=t.msg})),[2,{valid:i.valid,required:i.required,errors:s,failedRules:o,regenerateMap:l}]}}))}))}function te(t,e,r){var n=(void 0===r?{}:r).isInitial,a=void 0!==n&&n;return jt(this,void 0,void 0,(function(){var r,n,i,s,o,l,c,u,d;return Zt(this,(function(f){switch(f.label){case 0:return[4,ee(t,e)];case 1:if(r=f.sent(),n=r.shouldSkip,i=r.required,s=r.errors,n)return[2,{valid:!s.length,required:i,errors:s}];o=Object.keys(t.rules).filter((function(t){return!qt.isRequireRule(t)})),l=o.length,c=0,f.label=2;case 2:return c<l?a&&qt.isLazy(o[c])?[3,4]:(u=o[c],[4,re(t,e,{name:u,params:t.rules[u]})]):[3,5];case 3:if(!(d=f.sent()).valid&&d.error&&(s.push(d.error),t.bails))return[2,{valid:!1,required:i,errors:s}];f.label=4;case 4:return c++,[3,2];case 5:return[2,{valid:!s.length,required:i,errors:s}]}}))}))}function ee(t,e){return jt(this,void 0,void 0,(function(){var r,n,a,i,s,o,l,c,u;return Zt(this,(function(d){switch(d.label){case 0:r=Object.keys(t.rules).filter(qt.isRequireRule),n=r.length,a=[],i=O(e)||""===e||S(e),s=i&&t.skipIfEmpty,l=0,d.label=1;case 1:return l<n?(c=r[l],[4,re(t,e,{name:c,params:t.rules[c]})]):[3,4];case 2:if(u=d.sent(),!j(u))throw new Error("Require rules has to return an object (see docs)");if(void 0!==u.required&&(o=u.required),!u.valid&&u.error&&(a.push(u.error),t.bails))return[2,{shouldSkip:!0,required:u.required,errors:a}];d.label=3;case 3:return l++,[3,1];case 4:return i&&!o&&!t.skipIfEmpty||!t.bails&&!s?[2,{shouldSkip:!1,required:o,errors:a}]:[2,{shouldSkip:!o&&i,required:o,errors:a}]}}))}))}function re(t,e,r){return jt(this,void 0,void 0,(function(){var n,a,i,s,o;return Zt(this,(function(l){switch(l.label){case 0:if(!(n=qt.getRuleDefinition(r.name))||!n.validate)throw new Error("No such validator '"+r.name+"' exists.");return a=n.castValue?n.castValue(e):e,i=oe(r.params,t.crossTable),[4,n.validate(a,i)];case 1:return"string"==typeof(s=l.sent())?(o=St(St({},i||{}),{_field_:t.name,_value_:e,_rule_:r.name}),[2,{valid:!1,error:{rule:r.name,msg:function(){return N(s,o)}}}]):(j(s)||(s={valid:s}),[2,{valid:s.valid,required:s.required,error:s.valid?void 0:ne(t,e,n,r.name,i)}])}}))}))}function ne(t,e,r,n,a){var i,s=null!==(i=t.customMessages[n])&&void 0!==i?i:r.message,o=ae(t,r,n),l=ie(t,r,n,s),c=l.userTargets,u=l.userMessage,d=St(St(St(St({},a||{}),{_field_:t.name,_value_:e,_rule_:n}),o),c);return{msg:function(){return se(u||It().defaultMessage,t.name,d)},rule:n}}function ae(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={},s=t.rules[r];!Array.isArray(s)&&j(s)&&(s=n.map((function(t){return s[t.name]})));for(var o=0;o<n.length;o++){var l=n[o],c=s[o];if(I(c)){c=c.__locatorRef;var u=t.names[c]||c;i[l.name]=u,i["_"+l.name+"_"]=t.crossTable[c]}}return i}function ie(t,e,r,n){var a={},i=t.rules[r],s=e.params||[];return i?(Object.keys(i).forEach((function(e,r){var n=i[e];if(!I(n))return{};var o=s[r];if(!o)return{};var l=n.__locatorRef;a[o.name]=t.names[l]||l,a["_"+o.name+"_"]=t.crossTable[l]})),{userTargets:a,userMessage:n}):{}}function se(t,e,r){return"function"==typeof t?t(e,r):N(t,St(St({},r),{_field_:e}))}function oe(t,e){if(Array.isArray(t))return t.map((function(t){var r="string"==typeof t&&"@"===t[0]?t.slice(1):t;return r in e?e[r]:t}));var r={},n=function(t){return I(t)?t(e):t};return Object.keys(t).forEach((function(e){r[e]=n(t[e])})),r}var le=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var 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 s=i[a];if(!t(e[s],r[s]))return!1}return!0}return e!=e&&r!=r},ce=function(t){return!!(t&&("undefined"!=typeof Event&&F(Event)&&t instanceof Event||t&&t.srcElement))};function ue(t){var e,r;if(!ce(t))return t;var n=t.target;if("file"===n.type&&n.files)return D(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 de=function(t){var e,r=(null===(e=t.data)||void 0===e?void 0:e.attrs)||t.elm;return!("input"!==t.tag||r&&r.type)||"textarea"===t.tag||B(["text","password","search","email","tel","url","number"],null==r?void 0:r.type)};function fe(t){if(t.data){var e=t.data;if("model"in e)return e.model;if(t.data.directives)return T(t.data.directives,(function(t){return"model"===t.name}))}}function pe(t){var e,r,n=fe(t);if(n)return{value:n.value};var a=he(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 ve(t){return Array.isArray(t)?t:Array.isArray(t.children)?t.children:t.componentOptions&&Array.isArray(t.componentOptions.children)?t.componentOptions.children:[]}function me(t){return Array.isArray(t)||void 0===pe(t)?ve(t).reduce((function(t,e){var r=me(e);return r.length&&t.push.apply(t,r),t}),[]):[t]}function he(t){return t.componentOptions?t.componentOptions.Ctor.options.model:null}function be(t,e,r){if(O(t[e]))t[e]=[r];else{if(F(t[e])&&t[e].fns){var n=t[e];return n.fns=Array.isArray(n.fns)?n.fns:[n.fns],void(B(n.fns,r)||n.fns.push(r))}if(F(t[e])){var a=t[e];t[e]=[a]}Array.isArray(t[e])&&!B(t[e],r)&&t[e].push(r)}}function ge(t,e,r){t.data||(t.data={}),O(t.data.on)&&(t.data.on={}),be(t.data.on,e,r)}function _e(t,e,r){t.componentOptions&&(t.componentOptions.listeners||(t.componentOptions.listeners={}),be(t.componentOptions.listeners,e,r))}function ye(t,e,r){t.componentOptions?_e(t,e,r):ge(t,e,r)}function xe(t,e){var r;return t.componentOptions?(he(t)||{event:"input"}).event:(null===(r=null==e?void 0:e.modifiers)||void 0===r?void 0:r.lazy)?"change":de(t)?"input":"change"}function we(t){return B(["input","select","textarea"],t.tag)}function $e(t,e){var r=[];return Object.keys(t).reduce((function(r,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 ke(t){var e,r=null===(e=t.data)||void 0===e?void 0:e.attrs,n={};return r?("email"===r.type&&qt.getRuleDefinition("email")&&(n.email=["multiple"in r]),r.pattern&&qt.getRuleDefinition("regex")&&(n.regex=r.pattern),r.maxlength>=0&&qt.getRuleDefinition("max")&&(n.max=r.maxlength),r.minlength>=0&&qt.getRuleDefinition("min")&&(n.min=r.minlength),"number"===r.type&&(P(r.min)&&qt.getRuleDefinition("min_value")&&(n.min_value=Number(r.min)),P(r.max)&&qt.getRuleDefinition("max_value")&&(n.max_value=Number(r.max))),n):n}function Ce(t){var e,r=["input","select","textarea"],n=null===(e=t.data)||void 0===e?void 0:e.attrs;if(!B(r,t.tag)||!n)return{};var a={};return"required"in n&&!1!==n.required&&qt.getRuleDefinition("required")&&(a.required="checkbox"!==n.type||[!0]),de(t)?Gt(St(St({},a),ke(t))):Gt(a)}function Ae(t,e){return t.$scopedSlots.default?t.$scopedSlots.default(e)||[]:t.$slots.default||[]}function Oe(t,e){return!(t._ignoreImmediate||!t.immediate)||!(Z(t.value,e)||!t.normalizedEvents.length)||!!t._needsValidation||!t.initialized&&void 0===e}function Se(t){return St(St({},t.flags),{errors:t.errors,classes:t.classes,failedRules:t.failedRules,reset:function(){return t.reset()},validate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.validate.apply(t,e)},ariaInput:{"aria-invalid":t.flags.invalid?"true":"false","aria-required":t.isRequired?"true":"false","aria-errormessage":"vee_"+t.id},ariaMsg:{id:"vee_"+t.id,"aria-live":t.errors.length?"assertive":"off"}})}function je(t,e){t.initialized||(t.initialValue=e);var r=Oe(t,e);if(t._needsValidation=!1,t.value=e,t._ignoreImmediate=!0,r){var n=function(){if(t.immediate||t.flags.validated)return Pe(t);t.validateSilent()};t.initialized?n():t.$once("hook:mounted",(function(){return n()}))}}function Ze(t){return(F(t.mode)?t.mode:Wt[t.mode])(t)}function Pe(t){var e=t.validateSilent();return t._pendingValidation=e,e.then((function(r){return e===t._pendingValidation&&(t.applyResult(r),t._pendingValidation=void 0),r}))}function Fe(t){t.$veeOnInput||(t.$veeOnInput=function(e){t.syncValue(e),t.setFlags({dirty:!0,pristine:!1})});var e=t.$veeOnInput;t.$veeOnBlur||(t.$veeOnBlur=function(){t.setFlags({touched:!0,untouched:!1})});var r=t.$veeOnBlur,n=t.$veeHandler,a=Ze(t);return n&&t.$veeDebounce===t.debounce||(n=q((function(){t.$nextTick((function(){t._pendingReset||Pe(t),t._pendingReset=!1}))}),a.debounce||t.debounce),t.$veeHandler=n,t.$veeDebounce=t.debounce),{onInput:e,onBlur:r,onValidate:n}}function Ie(t,e){var r=pe(e);t._inputEventName=t._inputEventName||xe(e,fe(e)),je(t,null==r?void 0:r.value);var n=Fe(t),a=n.onInput,i=n.onBlur,s=n.onValidate;ye(e,t._inputEventName,a),ye(e,"blur",i),t.normalizedEvents.forEach((function(t){ye(e,t,s)})),t.initialized=!0}var Ee=0;function Te(){var t="";return{errors:[],value:void 0,initialized:!1,initialValue:void 0,flags:L(),failedRules:{},isActive:!0,fieldName:t,id:""}}var Be=n.default.extend({name:"ValidationProvider",inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver||(this.$vnode.context.$_veeObserver=Le()),this.$vnode.context.$_veeObserver}}},props:{vid:{type:String,default:""},name:{type:String,default:null},mode:{type:[String,Function],default:function(){return It().mode}},rules:{type:[Object,String],default:null},immediate:{type:Boolean,default:!1},bails:{type:Boolean,default:function(){return It().bails}},skipIfEmpty:{type:Boolean,default:function(){return It().skipOptional}},debounce:{type:Number,default:0},tag:{type:String,default:"span"},slim:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},customMessages:{type:Object,default:function(){return{}}},detectInput:{type:Boolean,default:!0}},watch:{rules:{deep:!0,handler:function(t,e){this._needsValidation=!le(t,e)}}},data:Te,computed:{fieldDeps:function(){var t=this;return Object.keys(this.normalizedRules).reduce((function(e,r){var n=Yt(t.normalizedRules[r]).map((function(t){return I(t)?t.__locatorRef:t.slice(1)}));return e.push.apply(e,n),n.forEach((function(e){Me(t,e)})),e}),[])},normalizedEvents:function(){var t=this;return(Ze(this).on||[]).map((function(e){return"input"===e?t._inputEventName:e}))},isRequired:function(){var t=St(St({},this._resolvedRules),this.normalizedRules),e=Object.keys(t).some(qt.isRequireRule);return this.flags.required=!!e,e},classes:function(){return De(It().classes,this.flags)},normalizedRules:function(){return Gt(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()}};Bt.$on("change:locale",e),this.$on("hook:beforeDestroy",(function(){Bt.$off("change:locale",e)}))},render:function(t){var e=this;this.registerField();var r=Ae(this,Se(this));if(this.detectInput){var n=me(r);n.length&&n.forEach((function(t,r){var n,a,i,s,o,l;if(B(["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 c=It().useConstraintAttrs?Ce(t):{};le(e._resolvedRules,c)||(e._needsValidation=!0),we(t)&&(e.fieldName=(null===(s=null===(i=t.data)||void 0===i?void 0:i.attrs)||void 0===s?void 0:s.name)||(null===(l=null===(o=t.data)||void 0===o?void 0:o.attrs)||void 0===l?void 0:l.id)),e._resolvedRules=c,Ie(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=ue(t);this.value=e,this.flags.changed=!le(this.initialValue,e)},reset:function(){var t=this;this.errors=[],this.initialValue=this.value;var e=L();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 jt(this,void 0,void 0,(function(){return Zt(this,(function(e){return t.length>0&&this.syncValue(t[0]),[2,Pe(this)]}))}))},validateSilent:function(){return jt(this,void 0,void 0,(function(){var t,e;return Zt(this,(function(r){switch(r.label){case 0:return this.setFlags({pending:!0}),t=St(St({},this._resolvedRules),this.normalizedRules),Object.defineProperty(t,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),[4,Qt(this.value,t,St(St({name:this.name||this.fieldName},ze(this)),{bails:this.bails,skipIfEmpty:this.skipIfEmpty,isInitial:!this.initialized,customMessages:this.customMessages}))];case 1:return e=r.sent(),this.setFlags({pending:!1,valid:e.valid,invalid:!e.valid}),void 0!==e.required&&this.setFlags({required:e.required}),[2,e]}}))}))},setErrors:function(t){this.applyResult({errors:t,failedRules:{}})},applyResult:function(t){var e=t.errors,r=t.failedRules,n=t.regenerateMap;this.errors=e,this._regenerateMap=n,this.failedRules=St({},r||{}),this.setFlags({valid:!e.length,passed:!e.length,invalid:!!e.length,failed:!!e.length,validated:!0,changed:!le(this.value,this.initialValue)})},registerField:function(){Ue(this)},checkComputesRequiredState:function(){var t=St(St({},this._resolvedRules),this.normalizedRules);return Object.keys(t).some(qt.isRequireRule)}}});function De(t,e){for(var r={},n=Object.keys(e),a=n.length,i=function(a){var i=n[a],s=t&&t[i]||i,o=e[i];return O(o)?"continue":"valid"!==i&&"invalid"!==i||e.validated?void("string"==typeof s?r[s]=o:Array.isArray(s)&&s.forEach((function(t){r[t]=o}))):"continue"},s=0;s<a;s++)i(s);return r}function ze(t){var e=t.$_veeObserver.refs,r={names:{},values:{}};return t.fieldDeps.reduce((function(t,r){return e[r]?(t.values[r]=e[r].value,t.names[r]=e[r].name,t):t}),r)}function Re(t){return t.vid?t.vid:t.name?t.name:t.id?t.id:t.fieldName?t.fieldName:"_vee_"+ ++Ee}function Ue(t){var e=Re(t),r=t.id;!t.isActive||r===e&&t.$_veeObserver.refs[r]||(r!==e&&t.$_veeObserver.refs[r]===t&&t.$_veeObserver.unobserve(r),t.id=e,t.$_veeObserver.observe(t))}function Le(){return{refs:{},observe:function(t){this.refs[t.id]=t},unobserve:function(t){delete this.refs[t]}}}function Me(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(){Me(t,e,!1)}));!F(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 qe=[["pristine","every"],["dirty","some"],["touched","some"],["untouched","every"],["valid","every"],["invalid","some"],["pending","some"],["validated","every"],["changed","some"],["passed","every"],["failed","some"]],Ve=0;function Ne(){return{id:"",refs:{},observers:[],errors:{},flags:Xe(),fields:{}}}function We(){return{$_veeObserver:this}}var He=n.default.extend({name:"ValidationObserver",provide:We,inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver?this.$vnode.context.$_veeObserver:null}}},props:{tag:{type:String,default:"span"},vid:{type:String,default:function(){return"obs_"+Ve++}},slim:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:Ne,created:function(){var t=this;this.id=this.vid,Ke(this);var e=q((function(e){var r=e.errors,n=e.flags,a=e.fields;t.errors=r,t.flags=n,t.fields=a}),16);this.$watch(Ye,e)},activated:function(){Ke(this)},deactivated:function(){Ge(this)},beforeDestroy:function(){Ge(this)},render:function(t){var e=Ae(this,Je(this));return this.slim&&e.length<=1?e[0]:t(this.tag,{on:this.$listeners},e)},methods:{observe:function(t,e){var r;void 0===e&&(e="provider"),"observer"!==e?this.refs=St(St({},this.refs),((r={})[t.id]=t,r)):this.observers.push(t)},unobserve:function(t,e){if(void 0===e&&(e="provider"),"provider"!==e){var r=E(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 jt(this,void 0,void 0,(function(){var t,e,n,a,i,s;return Zt(this,(function(o){switch(o.label){case 0:return[4,Promise.all(Pt(R(this.refs).filter((function(t){return!t.disabled})).map((function(t){return t[r?"validateSilent":"validate"]().then((function(t){return t.valid}))})),this.observers.filter((function(t){return!t.disabled})).map((function(t){return t.validate({silent:r})}))))];case 1:return t=o.sent(),e=t.every((function(t){return t})),n=Ye.call(this),a=n.errors,i=n.flags,s=n.fields,this.errors=a,this.flags=i,this.fields=s,[2,{errors:a,flags:i,fields:s,isValid:e}]}}))}))},validate:function(t){var e=(void 0===t?{}:t).silent,r=void 0!==e&&e;return jt(this,void 0,void 0,(function(){return Zt(this,(function(t){switch(t.label){case 0:return[4,this.validateWithInfo({silent:r})];case 1:return[2,t.sent().isValid]}}))}))},handleSubmit:function(t){return jt(this,void 0,void 0,(function(){return Zt(this,(function(e){switch(e.label){case 0:return[4,this.validate()];case 1:return e.sent()&&t?[2,t()]:[2]}}))}))},reset:function(){return Pt(R(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 Ge(t){t.$_veeObserver&&t.$_veeObserver.unobserve(t.id,"observer")}function Ke(t){t.$_veeObserver&&t.$_veeObserver.observe(t,"observer")}function Je(t){return St(St({},t.flags),{errors:t.errors,fields:t.fields,validate:t.validate,validateWithInfo:t.validateWithInfo,passes:t.handleSubmit,handleSubmit:t.handleSubmit,reset:t.reset})}function Xe(){return St(St({},L()),{valid:!0,invalid:!1})}function Ye(){for(var t=Pt(R(this.refs),this.observers.filter((function(t){return!t.disabled}))),e={},r=Xe(),n={},a=t.length,i=0;i<a;i++){var s=t[i];Array.isArray(s.errors)?(e[s.id]=s.errors,n[s.id]=St({id:s.id,name:s.name,failedRules:s.failedRules},s.flags)):(e=St(St({},e),s.errors),n=St(St({},n),s.fields))}return qe.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 Qe(t,e){var r;void 0===e&&(e=M);var n="options"in t?t.options:t,a=Be.options,i={name:(n.name||"AnonymousHoc")+"WithValidation",props:St({},a.props),data:a.data,computed:St({},a.computed),methods:St({},a.methods),beforeDestroy:a.beforeDestroy,inject:a.inject},s=(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=Se(this),i=St({},this.$listeners),o=fe(this.$vnode);this._inputEventName=this._inputEventName||xe(this.$vnode,o);var l=pe(this.$vnode);je(this,null==l?void 0:l.value);var c=Fe(this),u=c.onInput,d=c.onBlur,f=c.onValidate;be(i,s,u),be(i,"blur",d),this.normalizedEvents.forEach((function(t){be(i,t,f)}));var p=(he(this.$vnode)||{prop:"value"}).prop,v=St(St(St({},this.$attrs),((r={})[p]=null==o?void 0:o.value,r)),e(a));return t(n,{attrs:this.$attrs,props:v,on:i,scopedSlots:this.$scopedSlots},$e(this.$slots,this.$vnode.context))},i}var tr="3.4.14";Object.keys(Ot).map((function(t){return{schema:Ot[t],name:t}})).forEach((function(t){Vt(t.name,t.schema)})),Ut("en",a),t.Rules=Ot,t.ValidationObserver=He,t.ValidationProvider=Be,t.configure=Tt,t.extend=Vt,t.localeChanged=Dt,t.localize=Ut,t.normalizeRules=Gt,t.setInteractionMode=Ht,t.validate=Qt,t.version=tr,t.withValidation=Qe,Object.defineProperty(t,"__esModule",{value:!0})}(e,r(538))},2236:(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.$createElement,r=t._self._c||e;return r("div",{staticClass:"w-full justify-between space-y-4 sm:flex sm:space-x-8 sm:space-x-2 sm:space-y-0",class:{"mb-6 sm:mb-7":!t.isLast}},[r("div",{staticClass:"leading-5"},[r("label",{staticClass:"mb-1.5 block text-sm font-bold text-gray-700 dark:text-gray-200"},[t._v(" "+t._s(t.title)+": ")]),t._v(" "),t.description?r("span",{staticClass:"block text-xs leading-4 dark:text-gray-500 text-gray-500",domProps:{innerHTML:t._s(t.description)}}):t._e(),t._v(" "),t.error?r("span",{staticClass:"text-left text-xs text-red-600"},[t._v("\n "+t._s(t.error)+"\n ")]):t._e()]),t._v(" "),r("div",[t._t("default")],2)])}),[],!1,null,null,null).exports},4455:(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.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex w-full items-center justify-between space-x-2 sm:space-x-8",class:{"mb-6 sm:mb-7":!t.isLast}},[r("div",{staticClass:"leading-5"},[r("label",{staticClass:"mb-1.5 block text-sm font-bold text-gray-700 dark:text-gray-200"},[t._v(" "+t._s(t.title)+": ")]),t._v(" "),t.description?r("span",{staticClass:"block text-xs leading-4 dark:text-gray-500 text-gray-500",domProps:{innerHTML:t._s(t.description)}}):t._e(),t._v(" "),t.error?r("span",{staticClass:"pt-2 text-xs dark:text-rose-600 text-rose-600"},[t._v("\n "+t._s(t.error)+"\n ")]):t._e()]),t._v(" "),r("div",[t._t("default")],2)])}),[],!1,null,null,null).exports},9738:(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.$createElement,r=t._self._c||e;return r("div",{class:{"mb-6 sm:mb-7":!t.isLast}},[t.title?r("label",{staticClass:"mb-1.5 block text-sm font-bold text-gray-700 dark:text-gray-200"},[t._v("\n "+t._s(t.title)+":\n ")]):t._e(),t._v(" "),t._t("default"),t._v(" "),t.error?r("span",{staticClass:"pt-2 text-xs dark:text-rose-600 text-rose-600"},[t._v("\n "+t._s(t.error)+"\n ")]):t._e(),t._v(" "),t.description?r("small",{staticClass:"block pt-2 text-xs leading-4 dark:text-gray-500 text-gray-500",domProps:{innerHTML:t._s(t.description)}}):t._e()],2)}),[],!1,null,null,null).exports},6303:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});const n={name:"PageTab",props:["isLoading"],components:{Spinner:r(8524).Z}};const a=(0,r(1900).Z)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"page-tab"},[r("div",{directives:[{name:"show",rawName:"v-show",value:t.isLoading,expression:"isLoading"}],attrs:{id:"loader"}},[r("Spinner")],1),t._v(" "),t._t("default")],2)}),[],!1,null,null,null).exports},6854:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=r(845),a=r(2547),i=r(3346),s=r(9101);const o={name:"FixedTransactionRow",components:{MeteredTransactionDetailRow:a.Z,MemberAvatar:n.Z,FileTextIcon:s.zPP,ColorLabel:i.Z,EyeIcon:s.tEF},props:{row:{},user:{type:Boolean,default:!1}},data:function(){return{showedTransactionDetailById:void 0}},methods:{showTransactionDetail:function(t){this.showedTransactionDetailById===t?this.showedTransactionDetailById=void 0:this.showedTransactionDetailById=t}}};const l=(0,r(1900).Z)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("tr",{staticClass:"whitespace-nowrap border-b border-dashed border-light dark:border-opacity-5"},[r("td",{staticClass:"py-5 pr-3 md:pr-1"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.note)+"\n ")])]),t._v(" "),t.user?r("td",{staticClass:"whitespace-nowrap px-3 md:px-1"},[t.row.data.relationships.user?r("div",{staticClass:"flex items-center"},[r("MemberAvatar",{attrs:{"is-border":!1,size:36,member:t.row.data.relationships.user}}),t._v(" "),r("div",{staticClass:"ml-3 pr-10"},[r("b",{staticClass:"max-w-1 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold",staticStyle:{"max-width":"155px"}},[t._v("\n "+t._s(t.row.data.relationships.user.data.attributes.name)+"\n ")]),t._v(" "),r("span",{staticClass:"block text-xs text-gray-600 dark:text-gray-500"},[t._v("\n "+t._s(t.row.data.relationships.user.data.attributes.email)+"\n ")])])],1):t._e(),t._v(" "),t.row.data.relationships.user?t._e():r("span",{staticClass:"text-xs font-bold text-gray-500"},[t._v("\n "+t._s(t.$t("user_was_deleted"))+"\n ")])]):t._e(),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("ColorLabel",{staticClass:"capitalize",attrs:{color:t.$getTransactionStatusColor(t.row.data.attributes.status)}},[t._v("\n "+t._s(t.$t(t.row.data.attributes.status))+"\n ")])],1),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold",class:t.$getTransactionTypeTextColor(t.row.data.attributes.type)},[t._v("\n "+t._s(t.$getTransactionMark(t.row.data.attributes.type)+t.row.data.attributes.price)+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.created_at)+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("div",{staticClass:"w-28"},[r("img",{staticClass:"inline-block max-h-5",attrs:{src:t.$getPaymentLogo(t.row.data.attributes.driver),alt:t.row.data.attributes.driver}})])]),t._v(" "),r("td",{staticClass:"pl-3 text-right md:pl-1"},[r("div",{staticClass:"inline-block"},[r("a",{staticClass:"inline-block flex h-8 w-8 cursor-pointer items-center justify-center rounded-md bg-light-background transition-colors hover:bg-purple-100 dark:bg-2x-dark-foreground",attrs:{href:t.$getInvoiceLink(t.row.data.id),target:"_blank"}},[r("FileTextIcon",{staticClass:"opacity-75",attrs:{size:"15"}})],1)])])])}),[],!1,null,null,null).exports},2547:(t,e,r)=>{"use strict";r.d(e,{Z:()=>a});const n={name:"MeteredTransactionDetailRow",props:["row"]};const a=(0,r(1900).Z)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("tr",[r("td",{staticClass:"overflow-hidden rounded-lg py-2",attrs:{colspan:"10"}},t._l(t.row.data.attributes.metadata,(function(e,n){return r("div",{key:n,staticClass:"flex items-center justify-between border-b border-dashed border-light py-2 dark:border-opacity-5"},[r("div",{staticClass:"w-2/4 leading-none"},[r("b",{staticClass:"text-sm font-bold leading-none"},[t._v("\n "+t._s(t.$t(e.feature))+"\n ")]),t._v(" "),r("small",{staticClass:"hidden pt-2 text-xs leading-none text-gray-500 sm:block"},[t._v("\n "+t._s(t.$t("feature_usage_desc_"+e.feature))+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-left"},[r("span",{staticClass:"text-gray-560 text-sm font-bold"},[t._v("\n "+t._s(e.usage)+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-right"},[r("span",{staticClass:"text-theme text-sm font-bold"},[t._v("\n "+t._s(e.cost)+"\n ")])])])})),0)])}),[],!1,null,null,null).exports},4104:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});var n=r(845),a=r(2547),i=r(3346),s=r(9101);const o={name:"MeteredTransactionRow",components:{MeteredTransactionDetailRow:a.Z,MemberAvatar:n.Z,FileTextIcon:s.zPP,ColorLabel:i.Z,EyeIcon:s.tEF},props:{row:{},user:{type:Boolean,default:!1}},data:function(){return{showedTransactionDetailById:void 0}},methods:{showTransactionDetail:function(t){this.showedTransactionDetailById===t?this.showedTransactionDetailById=void 0:this.showedTransactionDetailById=t}}};const l=(0,r(1900).Z)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("tr",{staticClass:"whitespace-nowrap border-b border-dashed border-light dark:border-opacity-5"},[r("td",{staticClass:"py-5 pr-3 md:pr-1"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.note)+"\n ")])]),t._v(" "),t.user?r("td",{staticClass:"whitespace-nowrap px-3 md:px-1"},[t.row.data.relationships.user?r("div",{staticClass:"flex items-center"},[r("MemberAvatar",{attrs:{"is-border":!1,size:36,member:t.row.data.relationships.user}}),t._v(" "),r("div",{staticClass:"ml-3 pr-10"},[r("b",{staticClass:"max-w-1 block overflow-hidden text-ellipsis whitespace-nowrap text-sm font-bold",staticStyle:{"max-width":"155px"}},[t._v("\n "+t._s(t.row.data.relationships.user.data.attributes.name)+"\n ")]),t._v(" "),r("span",{staticClass:"block text-xs text-gray-600 dark:text-gray-500"},[t._v("\n "+t._s(t.row.data.relationships.user.data.attributes.email)+"\n ")])])],1):t._e(),t._v(" "),t.row.data.relationships.user?t._e():r("span",{staticClass:"text-xs font-bold text-gray-500"},[t._v("\n "+t._s(t.$t("user_was_deleted"))+"\n ")])]):t._e(),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("ColorLabel",{staticClass:"capitalize",attrs:{color:t.$getTransactionStatusColor(t.row.data.attributes.status)}},[t._v("\n "+t._s(t.$t(t.row.data.attributes.status))+"\n ")])],1),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold capitalize"},[t._v("\n "+t._s(t.$t(t.row.data.attributes.type))+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold",class:t.$getTransactionTypeTextColor(t.row.data.attributes.type)},[t._v("\n "+t._s(t.$getTransactionMark(t.row.data.attributes.type)+t.row.data.attributes.price)+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(t.row.data.attributes.created_at)+"\n ")])]),t._v(" "),r("td",{staticClass:"px-3 md:px-1"},[r("div",{staticClass:"w-28"},[r("img",{staticClass:"inline-block max-h-5",attrs:{src:t.$getPaymentLogo(t.row.data.attributes.driver),alt:t.row.data.attributes.driver}})])]),t._v(" "),r("td",{staticClass:"pl-3 text-right md:pl-1"},[t.row.data.attributes.metadata?r("div",{staticClass:"flex w-full justify-end space-x-2"},[r("div",{staticClass:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-md bg-light-background transition-colors hover:bg-green-100 dark:bg-2x-dark-foreground",on:{click:function(e){return t.$emit("showDetail",t.row.data.id)}}},[r("EyeIcon",{staticClass:"opacity-75",attrs:{size:"15"}})],1),t._v(" "),r("a",{staticClass:"flex h-8 w-8 cursor-pointer items-center justify-center rounded-md bg-light-background transition-colors hover:bg-purple-100 dark:bg-2x-dark-foreground",attrs:{href:t.$getInvoiceLink(t.row.data.id),target:"_blank"}},[r("FileTextIcon",{staticClass:"opacity-75",attrs:{size:"15"}})],1)]):r("div",[t._v("-")])])])}),[],!1,null,null,null).exports},3346:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});const n={name:"ColorLabel",props:["color"]};var a=r(3379),i=r.n(a),s=r(7520),o={insert:"head",singleton:!1};i()(s.Z,o);s.Z.locals;const l=(0,r(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("b",{staticClass:"color-label inline-block rounded-lg py-1 px-2 text-xs font-bold capitalize",class:t.color},[t._t("default")],2)}),[],!1,null,"3ff27c4c",null).exports},2611:(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.$createElement,r=t._self._c||e;return r("div",{staticClass:"mb-8 flex items-center"},[t.icon?t._e():r("edit-2-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}),t._v(" "),"frown"===t.icon?r("frown-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"list"===t.icon?r("list-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"info"===t.icon?r("info-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"database"===t.icon?r("database-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"file-text"===t.icon?r("file-text-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"dollar"===t.icon?r("dollar-sign-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"credit-card"===t.icon?r("credit-card-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"bar-chart"===t.icon?r("bar-chart-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"settings"===t.icon?r("settings-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"hard-drive"===t.icon?r("hard-drive-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"mail"===t.icon?r("mail-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"smartphone"===t.icon?r("smartphone-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"shield"===t.icon?r("shield-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"bell"===t.icon?r("bell-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"key"===t.icon?r("key-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"users"===t.icon?r("users-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"wifi"===t.icon?r("wifi-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),"trending-up"===t.icon?r("trending-up-icon",{staticClass:"vue-feather text-theme dark-text-theme mr-3",attrs:{size:"22"}}):t._e(),t._v(" "),r("b",{staticClass:"text-md font-bold dark:text-gray-200 sm:text-lg"},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},7059:(t,e,r)=>{"use strict";r.d(e,{Z:()=>l});const n={name:"InfoBox",props:["type"]};var a=r(3379),i=r.n(a),s=r(4507),o={insert:"head",singleton:!1};i()(s.Z,o);s.Z.locals;const l=(0,r(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"info-box",class:t.type},[t._t("default")],2)}),[],!1,null,"26872047",null).exports},6064:(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),s=r(5022),o={insert:"head",singleton:!1};i()(s.Z,o);s.Z.locals;var l=r(1900);const c={name:"ProgressLine",props:["data"],components:{DotLabel:(0,l.Z)(n,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"label"},[r("span",{class:["label-dot",t.color]}),t._v(" "),r("b",{staticClass:"label-title"},[t._v("\n "+t._s(t.title)+"\n ")])])}),[],!1,null,"03d13328",null).exports}};var u=r(8003),d={insert:"head",singleton:!1};i()(u.Z,d);u.Z.locals;const f=(0,l.Z)(c,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"mb-4 flex h-2.5 items-center rounded bg-light-300 dark:bg-2x-dark-foreground"},t._l(t.data,(function(e,n){return r("div",{key:n,staticClass:"chart-wrapper",style:{width:(e.progress>1?e.progress:0)+"%"}},[1===t.data.length?r("span",{staticClass:"chart-progress block h-2.5 w-full",class:[{"rounded-tl-lg rounded-bl-lg border-r-2 border-white dark:border-gray-800":e.progress<100,"rounded-lg border-none":e.progress>=100},e.color]}):t._e(),t._v(" "),t.data.length>1&&e.progress>0?r("span",{staticClass:"chart-progress block h-2.5 w-full",class:[{"rounded-tl-lg rounded-bl-lg border-r-2 border-white dark:border-gray-800":0===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},e.color]}):t._e()])})),0),t._v(" "),r("footer",{staticClass:"flex w-full items-center overflow-x-auto"},t._l(t.data,(function(t,e){return r("DotLabel",{key:e,staticClass:"mr-5",attrs:{color:t.color,title:t.title}})})),1)])}),[],!1,null,"596eaf42",null).exports},3233:(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),s=r.n(i),o=r(2424),l={insert:"head",singleton:!1};s()(o.Z,l);o.Z.locals;var c=r(1900);const u=(0,c.Z)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("tr",{staticClass:"table-row"},t._l(t.normalizedColumns,(function(e,n){return r("td",{key:n,staticClass:"table-cell"},[r("span",[t._v(t._s(e))])])})),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:u,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,c.Z)(p,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"w-full"},[t.hasData?r("table",{staticClass:"w-full"},[r("thead",[r("tr",{staticClass:"whitespace-nowrap"},t._l(t.columns,(function(e,n){return e.hidden?t._e():r("th",{key:n,staticClass:"text-left",class:{"sortable cursor-pointer":e.sortable,"text-right":Object.values(t.columns).length-1===n},on:{click:function(r){return t.sort(e.field,e.sortable)}}},[r("span",{staticClass:"text-xs text-gray-400 dark:text-gray-500"},[t._v("\n "+t._s(t.$t(e.label))+"\n ")]),t._v(" "),e.sortable?r("chevron-up-icon",{staticClass:"vue-feather inline-block text-gray-300 dark:text-gray-500",class:{"arrow-down":"ASC"===t.filter.sort},attrs:{size:"12"}}):t._e()],1)})),0)]),t._v(" "),r("tbody",{staticClass:"table-body"},[t._l(t.data.data,(function(e){return t._t("default",(function(){return[r("DatatableCell",{key:e.id,attrs:{data:e}})]}),{row:e})}))],2)]):t._e(),t._v(" "),t.isLoading||t.hasData?t._e():t._t("empty-page"),t._v(" "),t.paginator&&t.hasData?r("div",{staticClass:"mt-6 sm:flex sm:items-center sm:justify-between"},[t.data.meta.total>15&&t.data.meta.last_page<=6?r("ul",{staticClass:"pagination flex justify-center items-center"},[r("li",{staticClass:"previous inline-block p-1"},[r("a",{staticClass:"page-link",class:{"cursor-default opacity-20":1===t.pageIndex},on:{click:function(e){return t.goToPage(t.pageIndex-1)}}},[r("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t._l(t.data.meta.last_page,(function(e,n){return r("li",{key:n,staticClass:"inline-block p-1",on:{click:function(r){return t.goToPage(e)}}},[r("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===e}},[t._v("\n "+t._s(e)+"\n ")])])})),t._v(" "),r("li",{staticClass:"next inline-block p-1"},[r("a",{staticClass:"page-link",class:{"cursor-default opacity-20":t.pageIndex===t.data.meta.last_page},on:{click:function(e){return t.goToPage(t.pageIndex+1)}}},[r("chevron-right-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)])],2):t._e(),t._v(" "),t.data.meta.total>15&&t.data.meta.last_page>6?r("ul",{staticClass:"pagination flex justify-center items-center"},[r("li",{staticClass:"previous inline-block p-1"},[r("a",{staticClass:"page-link",class:{"cursor-default opacity-20":1===t.pageIndex},on:{click:function(e){return t.goToPage(t.pageIndex-1)}}},[r("chevron-left-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)]),t._v(" "),t.pageIndex>=5?r("li",{staticClass:"inline-block p-1",on:{click:function(e){return t.goToPage(1)}}},[r("a",{staticClass:"page-link"},[t._v(" 1 ")])]):t._e(),t._v(" "),t._l(5,(function(e,n){return t.pageIndex<5?r("li",{key:n,staticClass:"inline-block p-1",on:{click:function(r){return t.goToPage(e)}}},[r("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===e}},[t._v("\n "+t._s(e)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex>=5?r("li",{staticClass:"inline-block p-1"},[r("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(t.floatPages,(function(e,n){return t.pageIndex>=5&&t.pageIndex<t.data.meta.last_page-3?r("li",{key:n,staticClass:"inline-block p-1",on:{click:function(r){return t.goToPage(e)}}},[r("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===e}},[t._v("\n "+t._s(e)+"\n ")])]):t._e()})),t._v(" "),t.pageIndex<t.data.meta.last_page-3?r("li",{staticClass:"inline-block p-1"},[r("a",{staticClass:"page-link"},[t._v("...")])]):t._e(),t._v(" "),t._l(5,(function(e,n){return t.pageIndex>t.data.meta.last_page-4?r("li",{key:n,staticClass:"inline-block p-1",on:{click:function(e){t.goToPage(t.data.meta.last_page-(4-n))}}},[r("a",{staticClass:"page-link",class:{"bg-light-background dark:bg-4x-dark-foreground dark:text-gray-300":t.pageIndex===t.data.meta.last_page-(4-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?r("li",{staticClass:"inline-block p-1",on:{click:function(e){return t.goToPage(t.data.meta.last_page)}}},[r("a",{staticClass:"page-link"},[t._v("\n "+t._s(t.data.meta.last_page)+"\n ")])]):t._e(),t._v(" "),r("li",{staticClass:"next inline-block p-1"},[r("a",{staticClass:"page-link",class:{"cursor-default opacity-20":t.pageIndex===t.data.meta.last_page},on:{click:function(e){return t.goToPage(t.pageIndex+1)}}},[r("chevron-right-icon",{staticClass:"inline-block",attrs:{size:"14"}})],1)])],2):t._e(),t._v(" "),r("span",{staticClass:"text-xs text-gray-600 dark:text-gray-500 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},9569:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>Ft});var n=r(4455),a=r(1612),i=r(2611),s=r(9669),o=r.n(s),l=r(826),c=r(2236);const u={name:"UserUpdatePaymentMethodsExternally",components:{AppInputButton:c.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,o().post("/api/subscriptions/edit/".concat(this.subscription.id)).then((function(t){window.location=t.data.url})).catch((function(){l.U.$emit("toaster",{type:"danger",message:t.$t("popup_error.title")}),t.isGeneratedUpdateLink=!1}))}}};var d=r(1900);const f=(0,d.Z)(u,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.canShowForSubscription?r("div",{staticClass:"card shadow-card"},[r("FormLabel",[t._v("\n "+t._s(t.$t("update_payments"))+"\n ")]),t._v(" "),r("AppInputButton",{attrs:{title:t.$t("update_payment_method"),description:t.$t("payment_method_update_redirect_description"),"is-last":!0}},[r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{loading:t.isGeneratedUpdateLink,"button-style":"theme"},nativeOn:{click:function(e){return t.updatePaymentMethod.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("update_payments"))+"\n ")])],1)],1):t._e()}),[],!1,null,null,null).exports;var p=r(9101),v=r(3346),m=r(3233),h=r(7059),b=r(629),g=r(2547),_=r(4104);function y(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?y(Object(r),!0).forEach((function(e){w(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function w(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const $={name:"UserTransactionsForMeteredBilling",components:{MeteredTransactionDetailRow:g.Z,MeteredTransactionRow:_.Z,DatatableWrapper:m.Z,ColorLabel:v.Z,FormLabel:i.Z,InfoBox:h.Z,FileTextIcon:p.zPP,EyeIcon:p.tEF},computed:x(x({},(0,b.Se)(["user"])),{},{columns:function(){return this.$store.getters.transactionColumns.filter((function(t){return"user_id"!==t.field}))}}),data:function(){return{showedTransactionDetailById:void 0}},methods:{showTransactionDetail:function(t){this.showedTransactionDetailById===t?this.showedTransactionDetailById=void 0:this.showedTransactionDetailById=t}}};const k=(0,d.Z)($,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"file-text"}},[t._v("\n "+t._s(t.$t("transactions"))+"\n ")]),t._v(" "),r("DatatableWrapper",{staticClass:"overflow-x-auto",attrs:{api:"/api/user/transactions",paginator:!0,columns:t.columns},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[r("MeteredTransactionRow",{attrs:{row:n},on:{showDetail:t.showTransactionDetail}}),t._v(" "),n.data.attributes.metadata&&t.showedTransactionDetailById===n.data.id?r("MeteredTransactionDetailRow",{attrs:{row:n}}):t._e()]}},{key:"empty-page",fn:function(){return[r("InfoBox",{staticStyle:{"margin-bottom":"0"}},[r("p",[t._v(t._s(t.$t("user_invoices.empty")))])])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports;const C={name:"UserTransactionsForFixedBilling",components:{FixedTransactionRow:r(6854).Z,DatatableWrapper:m.Z,ColorLabel:v.Z,FormLabel:i.Z,InfoBox:h.Z},computed:{columns:function(){return this.$store.getters.transactionColumns.filter((function(t){return!["type","user_id"].includes(t.field)}))}}};const A=(0,d.Z)(C,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"file-text"}},[t._v("\n "+t._s(t.$t("transactions"))+"\n ")]),t._v(" "),r("DatatableWrapper",{staticClass:"overflow-x-auto",attrs:{api:"/api/subscriptions/transactions",paginator:!0,columns:t.columns},scopedSlots:t._u([{key:"default",fn:function(t){var e=t.row;return[r("FixedTransactionRow",{attrs:{row:e}})]}},{key:"empty-page",fn:function(){return[r("InfoBox",{staticStyle:{"margin-bottom":"0"}},[r("p",[t._v(t._s(t.$t("user_invoices.empty")))])])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports;function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,a,i=[],s=!0,o=!1;try{for(r=r.call(t);!(s=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);s=!0);}catch(t){o=!0,a=t}finally{try{s||null==r.return||r.return()}finally{if(o)throw a}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return S(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}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 Z(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){P(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 P(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const F={name:"UserFixedSubscriptionDetail",components:{ProgressLine:r(6064).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=O(r,2),a=n[0],i=n[1],s={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:s.message[a],isVisibleBar:-1!==i.total&&0!==i.total,distribution:[{progress:i.percentage,color:s.color[a],title:s.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)(F,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.hasSubscription?r("div",{staticClass:"card shadow-card"},[r("FormLabel",[t._v("\n "+t._s(t.$t("subscription"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.status)+"\n ")]),t._v(" "),r("b",{staticClass:"mb-3 mb-8 block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(t.subscription.data.relationships.plan.data.attributes.name)+" /\n "+t._s(t.price)+"\n ")]),t._v(" "),t._l(t.limitations,(function(e,n){return r("div",{key:n,class:{"mb-6":Object.keys(t.limitations).length-1!==n}},[r("b",{staticClass:"mb-3 block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(e.message)+"\n ")]),t._v(" "),e.isVisibleBar?r("ProgressLine",{attrs:{data:e.distribution}}):t._e()],1)}))],2):t._e()}),[],!1,null,null,null).exports;var E=r(7757),T=r.n(E);const B={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&&o().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 D=(0,d.Z)(B,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"flex items-center justify-between rounded-lg bg-light-background py-3 px-2 dark:bg-2x-dark-foreground md:px-4"},[r("div",{staticClass:"flex items-center"},[r("img",{staticClass:"mr-3 h-5 rounded",attrs:{src:"/assets/gateways/"+t.card.data.attributes.brand+".svg",alt:""}}),t._v(" "),r("b",{staticClass:"whitespace-nowrap text-sm font-bold capitalize leading-none"},[t._v("\n "+t._s(t.card.data.attributes.brand)+" ••••\n "+t._s(t.card.data.attributes.last4)+"\n ")])]),t._v(" "),r("b",{staticClass:"text-sm font-bold leading-none"},[t._v(" "+t._s(t.$t("expires"))+" "+t._s(t.card.data.attributes.expiration)+" ")]),t._v(" "),r("Trash2Icon",{staticClass:"cursor-pointer",attrs:{size:"15"},on:{click:function(e){return t.deleteCreditCard(t.card.data.id)}}})],1)}),[],!1,null,null,null).exports;var z=r(8524),R="https://js.stripe.com/v3",U=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,L="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",M=null,q=function(t){return null!==M||(M=new Promise((function(e,r){if("undefined"!=typeof window)if(window.Stripe&&t&&console.warn(L),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(U.test(r.src))return r}return null}();n&&t?console.warn(L):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)}))),M},V=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.31.0",startTime:e})}(n,r),n},N=Promise.resolve().then((function(){return q(null)})),W=!1;N.catch((function(t){W||console.warn(t)}));var H=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];W=!0;var n=Date.now();return N.then((function(t){return V(t,e,n)}))};function G(t,e,r,n,a,i,s){try{var o=t[i](s),l=o.value}catch(t){return void r(t)}o.done?e(l):Promise.resolve(l).then(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 s(t){G(i,n,a,s,o,"next",t)}function o(t){G(i,n,a,s,o,"throw",t)}s(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){Y(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 Y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Q,tt=void 0;const et={name:"UserStoredPaymentMethods",components:{InfoBox:h.Z,ButtonBase:a.Z,FormLabel:i.Z,PaymentCard:D,Spinner:z.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(T().mark((function e(){var r,n;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.config.isDemo||"ho**@hi5ve.digital"!==t.user.data.attributes.email){e.next=3;break}return l.U.$emit("toaster",{type:"success",message:t.$t("credit_card_stored")}),e.abrupt("return");case 3:return t.stripe.storingStripePaymentMethod=!0,e.next=6,Q.confirmSetup({elements:tt,redirect:"if_required",confirmParams:{return_url:window.location.href}});case 6:r=e.sent,(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(T().mark((function e(){return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,H(t.config.stripe_public_key);case 2:return Q=e.sent,e.next=5,o().get("/api/stripe/setup-intent").then((function(e){(tt=Q.elements({clientSecret:e.data.data.client_secret,appearance:{theme:"stripe",variables:{colorPrimary:t.config.app_color,fontFamily:"Nunito",borderRadius:"8px",colorText:t.isDarkMode?"#bec6cf":"#1B2539",colorBackground:t.isDarkMode?"#191b1e":"#fff",fontWeightNormal:"700",fontSizeSm:"0.875rem",colorSuccessText:"#0ABB87",colorSuccess:"#0ABB87",colorWarning:"#fd397a",colorWarningText:"#fd397a",colorDangerText:"#fd397a",colorTextSecondary:"#6b7280",spacingGridRow:"20px"}}})).create("payment").mount("#payment-element")})).catch((function(){l.U.$emit("toaster",{type:"danger",message:t.$t("popup_error.title")})}));case 5:t.stripe.isInitialization=!1;case 6:case"end":return e.stop()}}),e)})))()},showStoreCreditCardForm:function(){this.isCreditCardForm=!this.isCreditCardForm,this.stripeInit()}}};const rt=(0,d.Z)(et,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.canShowForMeteredBilling||t.canShowForFixedBilling?r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"credit-card"}},[t._v("\n "+t._s(t.$t("payment_method"))+"\n ")]),t._v(" "),t.hasPaymentMethod?r("div",["metered"===t.config.subscriptionType&&t.user.data.relationships.balance.data.attributes.balance>0?r("b",{staticClass:"mb-3 mb-5 block text-sm"},[t._v("\n "+t._s(t.$t("credit_to_auto_withdraw",{credit:t.user.data.relationships.balance.data.attributes.formatted}))+"\n ")]):t._e(),t._v(" "),t._l(t.user.data.relationships.creditCards.data,(function(t){return r("PaymentCard",{key:t.data.id,attrs:{card:t}})})),t._v(" "),r("small",{staticClass:"hidden pt-3 text-xs leading-none dark:text-gray-500 text-gray-500 sm:block"},[t._v("\n "+t._s(t.$t("auto_settled_credit_card"))+"\n ")])],2):t._e(),t._v(" "),t.hasPaymentMethod?t._e():r("div",[t.isCreditCardForm?t._e():r("ButtonBase",{staticClass:"mt-4 w-full",attrs:{loading:t.stripe.storingStripePaymentMethod,type:"submit","button-style":"theme"},nativeOn:{click:function(e){return t.showStoreCreditCardForm.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("add_payment_method"))+"\n ")]),t._v(" "),t.isCreditCardForm?r("form",{staticClass:"mt-6",attrs:{id:"payment-form"},on:{submit:function(e){return e.preventDefault(),t.storeStripePaymentMethod.apply(null,arguments)}}},[t.stripe.isInitialization?r("div",{staticClass:"relative mb-6 h-10"},[r("Spinner")],1):t._e(),t._v(" "),t.config.isDemo&&!t.stripe.isInitialization?r("InfoBox",[r("p",[t._v("For adding test credit card please use "),r("b",{staticClass:"text-theme"},[t._v("4242 4242 4242 4242")]),t._v(" as a card number, "),r("b",{staticClass:"text-theme"},[t._v("11/22")]),t._v("\n\t\t\t\t\t\tas the expiration date and "),r("b",{staticClass:"text-theme"},[t._v("123")]),t._v(" as CVC number and ZIP "),r("b",{staticClass:"text-theme"},[t._v("12345")]),t._v(" if required.")])]):t._e(),t._v(" "),r("div",{attrs:{id:"payment-element"}}),t._v(" "),r("ButtonBase",{staticClass:"mt-4 w-full",attrs:{loading:t.stripe.storingStripePaymentMethod,type:"submit","button-style":"theme"}},[t._v("\n "+t._s(t.$t("store_my_credit_card"))+"\n ")]),t._v(" "),r("div",{staticClass:"pt-2 text-xs text-rose-600",attrs:{id:"error-message"}})],1):t._e()],1)],1):t._e()}),[],!1,null,null,null).exports;const nt={name:"UserEmptySubscription",components:{ButtonBase:a.Z,FormLabel:i.Z,InfoBox:h.Z},computed:{hasSubscription:function(){return this.$store.getters.user.data.relationships.subscription}}};const at=(0,d.Z)(nt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.hasSubscription?t._e():r("div",{staticClass:"card shadow-card"},[r("FormLabel",[t._v("\n "+t._s(t.$t("subscription"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-2xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.$t("free_plan"))+"\n ")]),t._v(" "),t.$store.getters.config.allowed_payments?r("b",{staticClass:"mb-3 mb-8 block text-sm text-gray-400"},[t._v("\n "+t._s(t.$t("upgrade_to_get_more"))+"\n ")]):t._e(),t._v(" "),t.$store.getters.config.allowed_payments?r("ButtonBase",{staticClass:"mt-4 w-full",attrs:{type:"submit","button-style":"theme"},nativeOn:{click:function(e){return t.$openSubscribeOptions.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("upgrade_your_account"))+"\n ")]):t._e()],1)}),[],!1,null,null,null).exports;var it=r(9738);const st={name:"UserEditSubscription",components:{AppInputButton:c.Z,AppInputSwitch:n.Z,AppInputText:it.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,o().post("/api/subscriptions/cancel").then((function(){t.$store.dispatch("getAppData"),l.U.$emit("toaster",{type:"success",message:t.$t("popup_subscription_cancel.title")})})).catch((function(){l.U.$emit("toaster",{type:"danger",message:t.$t("popup_error.title")})})).finally((function(){t.isCancelling=!1})))}))},destroyed:function(){l.U.$off("action:confirmed")}};const ot=(0,d.Z)(st,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.hasSubscription?r("div",{staticClass:"card shadow-card"},[r("FormLabel",[t._v("\n "+t._s(t.$t("edit_your_subscription"))+"\n ")]),t._v(" "),"cancelled"!==t.subscription.attributes.status?r("AppInputButton",{attrs:{title:t.$t("cancel_subscription"),description:t.$t("cancel_subscription_description")}},[r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{loading:t.isCancelling,"button-style":"secondary"},nativeOn:{click:function(e){return t.cancelSubscriptionConfirmation.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("cancel_now"))+"\n ")])],1):t._e(),t._v(" "),r("AppInputButton",{attrs:{title:t.$t("upgrade_downgrade_plan"),description:t.$t("upgrade_downgrade_plan_description"),"is-last":!0}},[r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{"button-style":"secondary"},nativeOn:{click:function(e){return t.$changeSubscriptionOptions.apply(null,arguments)}}},[t._v("\n "+t._s(t.$t("change_plan"))+"\n ")])],1)],1):t._e()}),[],!1,null,null,null).exports;function lt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ct(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const ut={name:"UserFailedPayments",components:{FormLabel:i.Z,InfoBox:h.Z},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?lt(Object(r),!0).forEach((function(e){ct(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["user"]))};const dt=(0,d.Z)(ut,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.user.data.relationships.failedPayments&&t.user.data.relationships.failedPayments.data.length>0?r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"frown"}},[t._v("\n "+t._s(t.$t("failed_payments"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-2xl font-extrabold sm:text-3xl"},[t._v("\n -"+t._s(t.user.data.meta.totalDebt.formatted)+"\n ")]),t._v(" "),r("b",{staticClass:"mb-3 mb-5 block text-sm text-gray-400"},[t._v("\n "+t._s(t.$t("unable_to_charge"))+"\n ")]),t._v(" "),t._l(t.user.data.relationships.failedPayments.data,(function(e){return r("div",{key:e.data.id,staticClass:"flex items-center justify-between border-b border-dashed border-light py-2 dark:border-opacity-5"},[r("div",{staticClass:"w-2/4 leading-none"},[r("b",{staticClass:"text-sm font-bold leading-none"},[t._v("\n "+t._s(e.data.attributes.note)+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-left"},[r("span",{staticClass:"text-gray-560 text-sm font-bold capitalize"},[t._v("\n "+t._s(t.$t(e.data.attributes.source))+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-right"},[r("span",{staticClass:"text-sm font-bold"},[t._v("\n "+t._s(e.data.attributes.created_at)+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-right"},[r("span",{staticClass:"text-red text-sm font-bold"},[t._v("\n "+t._s(e.data.attributes.amount)+"\n ")])])])}))],2):t._e()}),[],!1,null,null,null).exports;function ft(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function pt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const vt={name:"UserUsageEstimates",components:{FormLabel:i.Z},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ft(Object(r),!0).forEach((function(e){pt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ft(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["user"]))};const mt=(0,d.Z)(vt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"bar-chart"}},[t._v("\n "+t._s(t.$t("usage_estimates"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-2xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.user.data.meta.usages.costEstimate)+"\n ")]),t._v(" "),r("b",{staticClass:"mb-3 mb-5 block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(t.user.data.relationships.subscription.data.attributes.updated_at)+"\n "+t._s(t.$t("till_now"))+"\n ")]),t._v(" "),t._l(t.user.data.meta.usages.featureEstimates,(function(e,n){return r("div",{key:n,staticClass:"flex items-center justify-between border-b border-dashed border-light py-2 dark:border-opacity-5"},[r("div",{staticClass:"w-2/4 leading-none"},[r("b",{staticClass:"text-sm font-bold leading-none"},[t._v("\n "+t._s(t.$t(e.feature))+"\n ")]),t._v(" "),r("small",{staticClass:"hidden pt-2 text-xs leading-none dark:text-gray-500 text-gray-500 sm:block"},[t._v("\n "+t._s(t.$t("feature_usage_desc_"+e.feature))+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-left"},[r("span",{staticClass:"text-gray-560 text-sm font-bold"},[t._v("\n "+t._s(e.usage)+"\n ")])]),t._v(" "),r("div",{staticClass:"w-1/4 text-right"},[r("span",{staticClass:"text-theme text-sm font-bold"},[t._v("\n "+t._s(e.cost)+"\n ")])])])})),t._v(" "),r("small",{staticClass:"mt-6 block font-bold"},[t._v("\n "+t._s(t.$t("records_updated_daily_bases"))+"\n ")])],2)}),[],!1,null,null,null).exports;var ht=r(9495);function bt(t,e,r,n,a,i,s){try{var o=t[i](s),l=o.value}catch(t){return void r(t)}o.done?e(l):Promise.resolve(l).then(n,a)}function gt(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function s(t){bt(i,n,a,s,o,"next",t)}function o(t){bt(i,n,a,s,o,"throw",t)}s(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 yt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const xt={name:"UserBillingAlerts",components:{ValidationObserver:ht.ValidationObserver,ValidationProvider:ht.ValidationProvider,AppInputText:it.Z,ButtonBase: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){yt(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 gt(T().mark((function e(){return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$refs.updatebillingAlertForm.validate();case 2:if(e.sent){e.next=5;break}return e.abrupt("return");case 5:t.isSendingBillingAlert=!0,o().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 gt(T().mark((function e(){return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$refs.billingAlertForm.validate();case 2:if(e.sent){e.next=5;break}return e.abrupt("return");case 5:t.isSendingBillingAlert=!0,o().post("/api/subscriptions/billing-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&&o().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 wt=(0,d.Z)(xt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"bell"}},[t._v("\n "+t._s(t.$t("billing_alert"))+"\n ")]),t._v(" "),t.user.data.relationships.alert?r("div",[r("b",{staticClass:"-mt-3 mb-0.5 block flex items-center text-2xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.user.data.relationships.alert.data.attributes.formatted)+"\n "),t.showUpdateBillingAlertForm?t._e():r("edit2-icon",{staticClass:"vue-feather ml-2 -translate-y-0.5 transform cursor-pointer",attrs:{size:"12"},on:{click:function(e){t.showUpdateBillingAlertForm=!t.showUpdateBillingAlertForm}}}),t._v(" "),t.showUpdateBillingAlertForm?r("trash2-icon",{staticClass:"vue-feather ml-2 -translate-y-0.5 transform cursor-pointer",attrs:{size:"12"},on:{click:t.deleteBillingAlert}}):t._e()],1),t._v(" "),r("b",{staticClass:"block text-sm dark:text-gray-500 text-gray-400"},[t._v("\n "+t._s(t.$t("billing_alert_description"))+"\n ")])]):t._e(),t._v(" "),t.showUpdateBillingAlertForm?r("ValidationObserver",{ref:"updatebillingAlertForm",staticClass:"mt-6",attrs:{tag:"form"},on:{submit:function(e){return e.preventDefault(),t.updateBillingAlert.apply(null,arguments)}},scopedSlots:t._u([{key:"default",fn:function(e){e.invalid;return[r("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Billing Alert",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("AppInputText",{attrs:{description:t.$t("billing_alert_notes"),error:n[0],"is-last":!0}},[r("div",{staticClass:"space-y-4 sm:flex sm:space-x-4 sm:space-y-0"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.billingAlertAmount,expression:"billingAlertAmount"}],staticClass:"focus-border-theme input-dark",class:{"!border-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(" "),r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{loadint:t.isSendingBillingAlert,disabled:t.isSendingBillingAlert,type:"submit","button-style":"theme"}},[t._v("\n "+t._s(t.$t("update_alert"))+"\n ")])],1)])]}}],null,!0)})]}}],null,!1,2212619140)}):t._e(),t._v(" "),t.user.data.relationships.alert?t._e():r("ValidationObserver",{ref:"billingAlertForm",staticClass:"mt-6",attrs:{tag:"form"},on:{submit:function(e){return e.preventDefault(),t.setBillingAlert.apply(null,arguments)}},scopedSlots:t._u([{key:"default",fn:function(e){e.invalid;return[r("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Billing Alert",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("AppInputText",{attrs:{description:t.$t("billing_alert_notes"),error:n[0],"is-last":!0}},[r("div",{staticClass:"space-y-4 sm:flex sm:space-x-4 sm:space-y-0"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.billingAlertAmount,expression:"billingAlertAmount"}],staticClass:"focus-border-theme input-dark",class:{"!border-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(" "),r("ButtonBase",{staticClass:"w-full sm:w-auto",attrs:{loadint:t.isSendingBillingAlert,disabled:t.isSendingBillingAlert,type:"submit","button-style":"theme"}},[t._v("\n "+t._s(t.$t("set_alert"))+"\n ")])],1)])]}}],null,!0)})]}}],null,!1,423944407)})],1)}),[],!1,null,null,null).exports;var $t=r(6303);function kt(t,e,r,n,a,i,s){try{var o=t[i](s),l=o.value}catch(t){return void r(t)}o.done?e(l):Promise.resolve(l).then(n,a)}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 At(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){Ot(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}function Ot(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const St={name:"UserBalance",components:{ValidationObserver:ht.ValidationObserver,ValidationProvider:ht.ValidationProvider,AppInputText:it.Z,ButtonBase:a.Z,FormLabel:i.Z},computed:At(At({},(0,b.Se)(["user"])),{},{hasPaymentMethod:function(){return this.user.data.relationships.creditCards&&this.user.data.relationships.creditCards.data.length>0}}),data:function(){return{chargeAmount:void 0}},methods:{makePayment:function(){var t,e=this;return(t=T().mark((function t(){return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$refs.fundAccount.validate();case 2:if(t.sent){t.next=5;break}return t.abrupt("return");case 5:e.$store.dispatch("callSingleChargeProcess",e.chargeAmount);case 6:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function s(t){kt(i,n,a,s,o,"next",t)}function o(t){kt(i,n,a,s,o,"throw",t)}s(void 0)}))})()}}};function jt(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 Zt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Pt={name:"Billing",components:{UserUpdatePaymentMethodsExternally:f,UserTransactionsForMeteredBilling:k,UserTransactionsForFixedBilling:A,UserFixedSubscriptionDetail:I,UserStoredPaymentMethods:rt,UserEmptySubscription:at,UserEditSubscription:ot,UserFailedPayments:dt,UserUsageEstimates:mt,UserBillingAlerts:wt,UserBalance:(0,d.Z)(St,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.hasPaymentMethod?t._e():r("div",{staticClass:"card shadow-card"},[r("FormLabel",{attrs:{icon:"dollar"}},[t._v("\n "+t._s(t.$t("balance"))+"\n ")]),t._v(" "),r("b",{staticClass:"-mt-3 mb-0.5 block text-2xl font-extrabold sm:text-3xl"},[t._v("\n "+t._s(t.user.data.relationships.balance.data.attributes.formatted)+"\n ")]),t._v(" "),r("ValidationObserver",{ref:"fundAccount",staticClass:"mt-6",attrs:{tag:"form"},on:{submit:function(e){return e.preventDefault(),t.makePayment.apply(null,arguments)}},scopedSlots:t._u([{key:"default",fn:function(e){e.invalid;return[r("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Amount",rules:"required|min_value:"+t.user.data.meta.totalDebt.amount},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.errors;return[r("AppInputText",{attrs:{description:t.$t("amount_increase_description"),error:n[0],"is-last":!0}},[r("div",{staticClass:"space-y-4 sm:flex sm:space-x-4 sm:space-y-0"},[r("input",{directives:[{name:"model",rawName:"v-model",value:t.chargeAmount,expression:"chargeAmount"}],staticClass:"focus-border-theme input-dark",class:{"!border-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(" "),r("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:$t.Z},computed:function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?jt(Object(r),!0).forEach((function(e){Zt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},(0,b.Se)(["config"]))};const Ft=(0,d.Z)(Pt,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("PageTab",["metered"===t.config.subscriptionType?r("div",[r("UserFailedPayments"),t._v(" "),r("UserBalance"),t._v(" "),r("UserUsageEstimates"),t._v(" "),r("UserBillingAlerts"),t._v(" "),r("UserStoredPaymentMethods"),t._v(" "),r("UserTransactionsForMeteredBilling")],1):t._e(),t._v(" "),"fixed"===t.config.subscriptionType?r("div",[r("UserEmptySubscription"),t._v(" "),r("UserFixedSubscriptionDetail"),t._v(" "),r("UserStoredPaymentMethods"),t._v(" "),r("UserUpdatePaymentMethodsExternally"),t._v(" "),r("UserEditSubscription"),t._v(" "),r("UserTransactionsForFixedBilling")],1):t._e()])}),[],!1,null,null,null).exports}}]); |