@kong-ui-public/forms 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forms.es.js +6 -6
- package/dist/forms.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/forms.es.js
CHANGED
|
@@ -6329,7 +6329,7 @@ function hy(n, a, s, h, f, d) {
|
|
|
6329
6329
|
}, [
|
|
6330
6330
|
I("div", cy, [
|
|
6331
6331
|
I("label", {
|
|
6332
|
-
class: de(["k-
|
|
6332
|
+
class: de(["k-label", _.name])
|
|
6333
6333
|
}, [
|
|
6334
6334
|
I("input", {
|
|
6335
6335
|
id: n.schema.name + "-" + p,
|
|
@@ -6346,7 +6346,7 @@ function hy(n, a, s, h, f, d) {
|
|
|
6346
6346
|
]))), 128))
|
|
6347
6347
|
]);
|
|
6348
6348
|
}
|
|
6349
|
-
const Vl = /* @__PURE__ */ K(uy, [["render", hy], ["__scopeId", "data-v-
|
|
6349
|
+
const Vl = /* @__PURE__ */ K(uy, [["render", hy], ["__scopeId", "data-v-7e49acd6"]]), my = {
|
|
6350
6350
|
name: "FieldArray",
|
|
6351
6351
|
components: { FieldArrayItem: Nl, FieldArrayMultiItem: xl, FieldSelect: Fl, FieldMetric: Dl, FieldObject: kl, FieldObjectAdvanced: Ul, FieldAutoSuggest: Bl, FieldRadio: Vl, FieldArrayCardContainer: Pl, FieldTextArea: Ol },
|
|
6352
6352
|
mixins: [j],
|
|
@@ -6580,7 +6580,7 @@ function Ry(n, a, s, h, f, d) {
|
|
|
6580
6580
|
}, [
|
|
6581
6581
|
I("div", Oy, [
|
|
6582
6582
|
I("label", {
|
|
6583
|
-
class: de(["k-
|
|
6583
|
+
class: de(["k-label", `${p.label}-check`])
|
|
6584
6584
|
}, [
|
|
6585
6585
|
Z(I("input", {
|
|
6586
6586
|
"onUpdate:modelValue": a[0] || (a[0] = (k) => f.checkedGroup = k),
|
|
@@ -6609,7 +6609,7 @@ function Ry(n, a, s, h, f, d) {
|
|
|
6609
6609
|
]))), 128))
|
|
6610
6610
|
]);
|
|
6611
6611
|
}
|
|
6612
|
-
const Ny = /* @__PURE__ */ K(Ey, [["render", Ry], ["__scopeId", "data-v-
|
|
6612
|
+
const Ny = /* @__PURE__ */ K(Ey, [["render", Ry], ["__scopeId", "data-v-25fe24da"]]), xy = {
|
|
6613
6613
|
mixins: [j],
|
|
6614
6614
|
emits: ["model-updated"],
|
|
6615
6615
|
methods: {
|
|
@@ -7320,7 +7320,7 @@ const f1 = {
|
|
|
7320
7320
|
this.formModel["config-auth_methods"] = this.getAuthMethodsValue(a, n), this.onModelUpdated();
|
|
7321
7321
|
}
|
|
7322
7322
|
}
|
|
7323
|
-
}, An = (n) => (an("data-v-
|
|
7323
|
+
}, An = (n) => (an("data-v-84760120"), n = n(), on(), n), h1 = { class: "general-settings" }, m1 = { class: "link-wrapper" }, p1 = /* @__PURE__ */ An(() => /* @__PURE__ */ I("span", { class: "section-header" }, "Common Configuration Settings", -1)), g1 = /* @__PURE__ */ An(() => /* @__PURE__ */ I("div", { class: "description" }, " Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ", -1)), v1 = { class: "auth-method-container" }, _1 = { class: "general-settings" }, y1 = { class: "link-wrapper" }, b1 = /* @__PURE__ */ An(() => /* @__PURE__ */ I("span", { class: "section-header" }, "Authorization Configuration Settings", -1)), w1 = /* @__PURE__ */ An(() => /* @__PURE__ */ I("div", { class: "description" }, " Parameters for setting up claims-based authorization. ", -1)), S1 = { class: "general-settings" }, C1 = { class: "link-wrapper" }, T1 = /* @__PURE__ */ An(() => /* @__PURE__ */ I("span", { class: "section-header" }, "Advanced Configuration Settings", -1)), A1 = /* @__PURE__ */ An(() => /* @__PURE__ */ I("div", { class: "description" }, " Advanced parameters for manually configuring the OpenID Connect plugin. ", -1));
|
|
7324
7324
|
function M1(n, a, s, h, f, d) {
|
|
7325
7325
|
const _ = te("VueFormGenerator"), p = te("KExternalLink"), E = te("KLabel"), k = te("KCheckbox"), D = te("KInputSwitch"), le = te("KTabs");
|
|
7326
7326
|
return b(), A("div", null, [
|
|
@@ -7426,7 +7426,7 @@ function M1(n, a, s, h, f, d) {
|
|
|
7426
7426
|
}, 8, ["tabs"])
|
|
7427
7427
|
]);
|
|
7428
7428
|
}
|
|
7429
|
-
const I1 = /* @__PURE__ */ K(f1, [["render", M1], ["__scopeId", "data-v-
|
|
7429
|
+
const I1 = /* @__PURE__ */ K(f1, [["render", M1], ["__scopeId", "data-v-84760120"]]), E1 = {
|
|
7430
7430
|
packageName: "forms"
|
|
7431
7431
|
}, Hl = {
|
|
7432
7432
|
general: E1,
|
package/dist/forms.umd.js
CHANGED
|
@@ -24,4 +24,4 @@ __p += '`),W&&(S+=`' +
|
|
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
|
25
25
|
`:`;
|
|
26
26
|
`)+S+`return __p
|
|
27
|
-
}`;var U=ma(function(){return G(c,I+"return "+S).apply(s,f)});if(U.source=S,Hi(U))throw U;return U}function t1(e){return Z(e).toLowerCase()}function n1(e){return Z(e).toUpperCase()}function r1(e,t,r){if(e=Z(e),e&&(r||t===s))return ks(e);if(!e||!(t=$e(t)))return e;var o=Je(e),a=Je(t),c=Es(o,a),f=Ss(o,a)+1;return At(o,c,f).join("")}function i1(e,t,r){if(e=Z(e),e&&(r||t===s))return e.slice(0,Bs(e)+1);if(!e||!(t=$e(t)))return e;var o=Je(e),a=Ss(o,Je(t))+1;return At(o,0,a).join("")}function o1(e,t,r){if(e=Z(e),e&&(r||t===s))return e.replace(Hr,"");if(!e||!(t=$e(t)))return e;var o=Je(e),a=Es(o,Je(t));return At(o,a).join("")}function s1(e,t){var r=jf,o=eh;if(ie(t)){var a="separator"in t?t.separator:a;r="length"in t?L(t.length):r,o="omission"in t?$e(t.omission):o}e=Z(e);var c=e.length;if(Zt(e)){var f=Je(e);c=f.length}if(r>=c)return e;var p=r-Jt(o);if(p<1)return o;var y=f?At(f,0,p).join(""):e.slice(0,p);if(a===s)return y+o;if(f&&(p+=y.length-p),Wi(a)){if(e.slice(p).search(a)){var k,E=y;for(a.global||(a=li(a.source,Z(Wo.exec(a))+"g")),a.lastIndex=0;k=a.exec(E);)var S=k.index;y=y.slice(0,S===s?p:S)}}else if(e.indexOf($e(a),p)!=p){var B=y.lastIndexOf(a);B>-1&&(y=y.slice(0,B))}return y+o}function l1(e){return e=Z(e),e&&yh.test(e)?e.replace(qo,Dm):e}var a1=rn(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Gi=pl("toUpperCase");function ha(e,t,r){return e=Z(e),t=r?s:t,t===s?Nm(e)?Um(e):vm(e):e.match(t)||[]}var ma=R(function(e,t){try{return Ne(e,s,t)}catch(r){return Hi(r)?r:new D(r)}}),d1=ft(function(e,t){return Re(t,function(r){r=ot(r),ct(e,r,qi(e[r],e))}),e});function c1(e){var t=e==null?0:e.length,r=N();return e=t?ne(e,function(o){if(typeof o[1]!="function")throw new Pe(b);return[r(o[0]),o[1]]}):[],R(function(o){for(var a=-1;++a<t;){var c=e[a];if(Ne(c[0],this,o))return Ne(c[1],this,o)}})}function u1(e){return Dp(ze(e,j))}function Zi(e){return function(){return e}}function f1(e,t){return e==null||e!==e?t:e}var h1=_l(),m1=_l(!0);function Ie(e){return e}function Ji(e){return Ys(typeof e=="function"?e:ze(e,j))}function p1(e){return Zs(ze(e,j))}function g1(e,t){return Js(e,ze(t,j))}var _1=R(function(e,t){return function(r){return Tn(r,e,t)}}),y1=R(function(e,t){return function(r){return Tn(e,r,t)}});function Xi(e,t,r){var o=ue(t),a=cr(t,o);r==null&&!(ie(t)&&(a.length||!o.length))&&(r=t,t=e,e=this,a=cr(t,ue(t)));var c=!(ie(r)&&"chain"in r)||!!r.chain,f=mt(e);return Re(a,function(p){var y=t[p];e[p]=y,f&&(e.prototype[p]=function(){var k=this.__chain__;if(c||k){var E=e(this.__wrapped__),S=E.__actions__=Be(this.__actions__);return S.push({func:y,args:arguments,thisArg:e}),E.__chain__=k,E}return y.apply(e,kt([this.value()],arguments))})}),e}function b1(){return me._===this&&(me._=Wm),this}function Qi(){}function w1(e){return e=L(e),R(function(t){return Xs(t,e)})}var C1=Ai(ne),v1=Ai(ys),k1=Ai(ei);function pa(e){return Di(e)?ti(ot(e)):jp(e)}function E1(e){return function(t){return e==null?s:Rt(e,t)}}var S1=bl(),T1=bl(!0);function ji(){return[]}function eo(){return!1}function B1(){return{}}function M1(){return""}function A1(){return!0}function I1(e,t){if(e=L(e),e<1||e>Ct)return[];var r=nt,o=_e(e,nt);t=N(t),e-=nt;for(var a=ii(o,t);++r<e;)t(r);return a}function N1(e){return x(e)?ne(e,ot):Oe(e)?[e]:Be(Vl(Z(e)))}function F1(e){var t=++zm;return Z(e)+t}var $1=gr(function(e,t){return e+t},0),O1=Ii("ceil"),V1=gr(function(e,t){return e/t},1),D1=Ii("floor");function x1(e){return e&&e.length?dr(e,Ie,pi):s}function L1(e,t){return e&&e.length?dr(e,N(t,2),pi):s}function U1(e){return Cs(e,Ie)}function R1(e,t){return Cs(e,N(t,2))}function P1(e){return e&&e.length?dr(e,Ie,bi):s}function q1(e,t){return e&&e.length?dr(e,N(t,2),bi):s}var z1=gr(function(e,t){return e*t},1),H1=Ii("round"),W1=gr(function(e,t){return e-t},0);function K1(e){return e&&e.length?ri(e,Ie):0}function Y1(e,t){return e&&e.length?ri(e,N(t,2)):0}return d.after=p0,d.ary=Kl,d.assign=ny,d.assignIn=sa,d.assignInWith=Ar,d.assignWith=ry,d.at=iy,d.before=Yl,d.bind=qi,d.bindAll=d1,d.bindKey=Gl,d.castArray=B0,d.chain=zl,d.chunk=Dg,d.compact=xg,d.concat=Lg,d.cond=c1,d.conforms=u1,d.constant=Zi,d.countBy=K_,d.create=oy,d.curry=Zl,d.curryRight=Jl,d.debounce=Xl,d.defaults=sy,d.defaultsDeep=ly,d.defer=g0,d.delay=_0,d.difference=Ug,d.differenceBy=Rg,d.differenceWith=Pg,d.drop=qg,d.dropRight=zg,d.dropRightWhile=Hg,d.dropWhile=Wg,d.fill=Kg,d.filter=G_,d.flatMap=X_,d.flatMapDeep=Q_,d.flatMapDepth=j_,d.flatten=Ul,d.flattenDeep=Yg,d.flattenDepth=Gg,d.flip=y0,d.flow=h1,d.flowRight=m1,d.fromPairs=Zg,d.functions=my,d.functionsIn=py,d.groupBy=e0,d.initial=Xg,d.intersection=Qg,d.intersectionBy=jg,d.intersectionWith=e_,d.invert=_y,d.invertBy=yy,d.invokeMap=n0,d.iteratee=Ji,d.keyBy=r0,d.keys=ue,d.keysIn=Ae,d.map=kr,d.mapKeys=wy,d.mapValues=Cy,d.matches=p1,d.matchesProperty=g1,d.memoize=Sr,d.merge=vy,d.mergeWith=la,d.method=_1,d.methodOf=y1,d.mixin=Xi,d.negate=Tr,d.nthArg=w1,d.omit=ky,d.omitBy=Ey,d.once=b0,d.orderBy=i0,d.over=C1,d.overArgs=w0,d.overEvery=v1,d.overSome=k1,d.partial=zi,d.partialRight=Ql,d.partition=o0,d.pick=Sy,d.pickBy=aa,d.property=pa,d.propertyOf=E1,d.pull=i_,d.pullAll=Pl,d.pullAllBy=o_,d.pullAllWith=s_,d.pullAt=l_,d.range=S1,d.rangeRight=T1,d.rearg=C0,d.reject=a0,d.remove=a_,d.rest=v0,d.reverse=Ri,d.sampleSize=c0,d.set=By,d.setWith=My,d.shuffle=u0,d.slice=d_,d.sortBy=m0,d.sortedUniq=g_,d.sortedUniqBy=__,d.split=Xy,d.spread=k0,d.tail=y_,d.take=b_,d.takeRight=w_,d.takeRightWhile=C_,d.takeWhile=v_,d.tap=x_,d.throttle=E0,d.thru=vr,d.toArray=ra,d.toPairs=da,d.toPairsIn=ca,d.toPath=N1,d.toPlainObject=oa,d.transform=Ay,d.unary=S0,d.union=k_,d.unionBy=E_,d.unionWith=S_,d.uniq=T_,d.uniqBy=B_,d.uniqWith=M_,d.unset=Iy,d.unzip=Pi,d.unzipWith=ql,d.update=Ny,d.updateWith=Fy,d.values=ln,d.valuesIn=$y,d.without=A_,d.words=ha,d.wrap=T0,d.xor=I_,d.xorBy=N_,d.xorWith=F_,d.zip=$_,d.zipObject=O_,d.zipObjectDeep=V_,d.zipWith=D_,d.entries=da,d.entriesIn=ca,d.extend=sa,d.extendWith=Ar,Xi(d,d),d.add=$1,d.attempt=ma,d.camelCase=xy,d.capitalize=ua,d.ceil=O1,d.clamp=Oy,d.clone=M0,d.cloneDeep=I0,d.cloneDeepWith=N0,d.cloneWith=A0,d.conformsTo=F0,d.deburr=fa,d.defaultTo=f1,d.divide=V1,d.endsWith=Ly,d.eq=Qe,d.escape=Uy,d.escapeRegExp=Ry,d.every=Y_,d.find=Z_,d.findIndex=xl,d.findKey=ay,d.findLast=J_,d.findLastIndex=Ll,d.findLastKey=dy,d.floor=D1,d.forEach=Hl,d.forEachRight=Wl,d.forIn=cy,d.forInRight=uy,d.forOwn=fy,d.forOwnRight=hy,d.get=Ki,d.gt=$0,d.gte=O0,d.has=gy,d.hasIn=Yi,d.head=Rl,d.identity=Ie,d.includes=t0,d.indexOf=Jg,d.inRange=Vy,d.invoke=by,d.isArguments=zt,d.isArray=x,d.isArrayBuffer=V0,d.isArrayLike=Me,d.isArrayLikeObject=se,d.isBoolean=D0,d.isBuffer=It,d.isDate=x0,d.isElement=L0,d.isEmpty=U0,d.isEqual=R0,d.isEqualWith=P0,d.isError=Hi,d.isFinite=q0,d.isFunction=mt,d.isInteger=jl,d.isLength=Br,d.isMap=ea,d.isMatch=z0,d.isMatchWith=H0,d.isNaN=W0,d.isNative=K0,d.isNil=G0,d.isNull=Y0,d.isNumber=ta,d.isObject=ie,d.isObjectLike=oe,d.isPlainObject=Fn,d.isRegExp=Wi,d.isSafeInteger=Z0,d.isSet=na,d.isString=Mr,d.isSymbol=Oe,d.isTypedArray=sn,d.isUndefined=J0,d.isWeakMap=X0,d.isWeakSet=Q0,d.join=t_,d.kebabCase=Py,d.last=We,d.lastIndexOf=n_,d.lowerCase=qy,d.lowerFirst=zy,d.lt=j0,d.lte=ey,d.max=x1,d.maxBy=L1,d.mean=U1,d.meanBy=R1,d.min=P1,d.minBy=q1,d.stubArray=ji,d.stubFalse=eo,d.stubObject=B1,d.stubString=M1,d.stubTrue=A1,d.multiply=z1,d.nth=r_,d.noConflict=b1,d.noop=Qi,d.now=Er,d.pad=Hy,d.padEnd=Wy,d.padStart=Ky,d.parseInt=Yy,d.random=Dy,d.reduce=s0,d.reduceRight=l0,d.repeat=Gy,d.replace=Zy,d.result=Ty,d.round=H1,d.runInContext=_,d.sample=d0,d.size=f0,d.snakeCase=Jy,d.some=h0,d.sortedIndex=c_,d.sortedIndexBy=u_,d.sortedIndexOf=f_,d.sortedLastIndex=h_,d.sortedLastIndexBy=m_,d.sortedLastIndexOf=p_,d.startCase=Qy,d.startsWith=jy,d.subtract=W1,d.sum=K1,d.sumBy=Y1,d.template=e1,d.times=I1,d.toFinite=pt,d.toInteger=L,d.toLength=ia,d.toLower=t1,d.toNumber=Ke,d.toSafeInteger=ty,d.toString=Z,d.toUpper=n1,d.trim=r1,d.trimEnd=i1,d.trimStart=o1,d.truncate=s1,d.unescape=l1,d.uniqueId=F1,d.upperCase=a1,d.upperFirst=Gi,d.each=Hl,d.eachRight=Wl,d.first=Rl,Xi(d,function(){var e={};return rt(d,function(t,r){X.call(d.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),d.VERSION=m,Re(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Re(["drop","take"],function(e,t){z.prototype[e]=function(r){r=r===s?1:de(L(r),0);var o=this.__filtered__&&!t?new z(this):this.clone();return o.__filtered__?o.__takeCount__=_e(r,o.__takeCount__):o.__views__.push({size:_e(r,nt),type:e+(o.__dir__<0?"Right":"")}),o},z.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),Re(["filter","map","takeWhile"],function(e,t){var r=t+1,o=r==Uo||r==ih;z.prototype[e]=function(a){var c=this.clone();return c.__iteratees__.push({iteratee:N(a,3),type:r}),c.__filtered__=c.__filtered__||o,c}}),Re(["head","last"],function(e,t){var r="take"+(t?"Right":"");z.prototype[e]=function(){return this[r](1).value()[0]}}),Re(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");z.prototype[e]=function(){return this.__filtered__?new z(this):this[r](1)}}),z.prototype.compact=function(){return this.filter(Ie)},z.prototype.find=function(e){return this.filter(e).head()},z.prototype.findLast=function(e){return this.reverse().find(e)},z.prototype.invokeMap=R(function(e,t){return typeof e=="function"?new z(this):this.map(function(r){return Tn(r,e,t)})}),z.prototype.reject=function(e){return this.filter(Tr(N(e)))},z.prototype.slice=function(e,t){e=L(e);var r=this;return r.__filtered__&&(e>0||t<0)?new z(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==s&&(t=L(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},z.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},z.prototype.toArray=function(){return this.take(nt)},rt(z.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=d[o?"take"+(t=="last"?"Right":""):t],c=o||/^find/.test(t);a&&(d.prototype[t]=function(){var f=this.__wrapped__,p=o?[1]:arguments,y=f instanceof z,k=p[0],E=y||x(f),S=function(q){var W=a.apply(d,kt([q],p));return o&&B?W[0]:W};E&&r&&typeof k=="function"&&k.length!=1&&(y=E=!1);var B=this.__chain__,I=!!this.__actions__.length,F=c&&!B,U=y&&!I;if(!c&&E){f=U?f:new z(this);var O=e.apply(f,p);return O.__actions__.push({func:vr,args:[S],thisArg:s}),new qe(O,B)}return F&&U?e.apply(this,p):(O=this.thru(S),F?o?O.value()[0]:O.value():O)})}),Re(["pop","push","shift","sort","splice","unshift"],function(e){var t=Gn[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var a=arguments;if(o&&!this.__chain__){var c=this.value();return t.apply(x(c)?c:[],a)}return this[r](function(f){return t.apply(x(f)?f:[],a)})}}),rt(z.prototype,function(e,t){var r=d[t];if(r){var o=r.name+"";X.call(en,o)||(en[o]=[]),en[o].push({name:t,func:r})}}),en[pr(s,H).name]=[{name:"wrapper",func:s}],z.prototype.clone=lp,z.prototype.reverse=ap,z.prototype.value=dp,d.prototype.at=L_,d.prototype.chain=U_,d.prototype.commit=R_,d.prototype.next=P_,d.prototype.plant=z_,d.prototype.reverse=H_,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=W_,d.prototype.first=d.prototype.head,bn&&(d.prototype[bn]=q_),d},Xt=Rm();Vt?((Vt.exports=Xt)._=Xt,Jr._=Xt):me._=Xt}).call(an)}($n,$n.exports);var C=$n.exports;const no={methods:{getFieldRowClasses(n){const l=this.fieldErrors(n).length>0,s={[C.get(this.options,"validationErrorClass","error")]:l,[C.get(this.options,"validationSuccessClass","valid")]:!l,disabled:this.fieldDisabled(n),readonly:this.fieldReadonly(n),featured:this.fieldFeatured(n),required:this.fieldRequired(n)};return C.isArray(n.styleClasses)?C.forEach(n.styleClasses,m=>s[m]=!0):C.isString(n.styleClasses)&&(s[n.styleClasses]=!0),C.isNil(n.type)||(s["field-"+n.type]=!0),s},fieldErrors(n){return this.errors.filter(s=>s.field.fieldName===n.fieldName).map(s=>s.error)},fieldDisabled(n){return C.isFunction(n.disabled)?n.disabled.call(this,this.model,n,this):C.isNil(n.disabled)?!1:n.disabled},fieldReadonly(n){return C.isFunction(n.readonly)?n.readonly.call(this,this.model,n,this):C.isNil(n.readonly)?!1:n.readonly},fieldFeatured(n){return C.isFunction(n.featured)?n.featured.call(this,this.model,n,this):C.isNil(n.featured)?!1:n.featured},fieldRequired(n){return C.isFunction(n.required)?n.required.call(this,this.model,n,this):C.isNil(n.required)?!1:n.required}}},ro=(n,l="")=>typeof n.id<"u"?l+n.id:l+(n.inputName||n.label||n.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),io=(n="")=>n.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var oo=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,_t="\\d\\d?",yt="\\d\\d",_a="\\d{3}",ya="\\d{4}",dn="[^\\s]+",so=/\[([^]*?)\]/gm;function lo(n,l){for(var s=[],m=0,h=n.length;m<h;m++)s.push(n[m].substr(0,l));return s}var ao=function(n){return function(l,s){var m=s[n].map(function(u){return u.toLowerCase()}),h=m.indexOf(l.toLowerCase());return h>-1?h:null}};function Nt(n){for(var l=[],s=1;s<arguments.length;s++)l[s-1]=arguments[s];for(var m=0,h=l;m<h.length;m++){var u=h[m];for(var b in u)n[b]=u[b]}return n}var co=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],uo=["January","February","March","April","May","June","July","August","September","October","November","December"],ba=lo(uo,3),wa=lo(co,3),fo={dayNamesShort:wa,dayNames:co,monthNamesShort:ba,monthNames:uo,amPm:["am","pm"],DoFn:function(n){return n+["th","st","nd","rd"][n%10>3?0:(n-n%10!==10?1:0)*n%10]}},On=Nt({},fo),Ca=function(n){return On=Nt(On,n)},ho=function(n){return n.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Se=function(n,l){for(l===void 0&&(l=2),n=String(n);n.length<l;)n="0"+n;return n},va={D:function(n){return String(n.getDate())},DD:function(n){return Se(n.getDate())},Do:function(n,l){return l.DoFn(n.getDate())},d:function(n){return String(n.getDay())},dd:function(n){return Se(n.getDay())},ddd:function(n,l){return l.dayNamesShort[n.getDay()]},dddd:function(n,l){return l.dayNames[n.getDay()]},M:function(n){return String(n.getMonth()+1)},MM:function(n){return Se(n.getMonth()+1)},MMM:function(n,l){return l.monthNamesShort[n.getMonth()]},MMMM:function(n,l){return l.monthNames[n.getMonth()]},YY:function(n){return Se(String(n.getFullYear()),4).substr(2)},YYYY:function(n){return Se(n.getFullYear(),4)},h:function(n){return String(n.getHours()%12||12)},hh:function(n){return Se(n.getHours()%12||12)},H:function(n){return String(n.getHours())},HH:function(n){return Se(n.getHours())},m:function(n){return String(n.getMinutes())},mm:function(n){return Se(n.getMinutes())},s:function(n){return String(n.getSeconds())},ss:function(n){return Se(n.getSeconds())},S:function(n){return String(Math.round(n.getMilliseconds()/100))},SS:function(n){return Se(Math.round(n.getMilliseconds()/10),2)},SSS:function(n){return Se(n.getMilliseconds(),3)},a:function(n,l){return n.getHours()<12?l.amPm[0]:l.amPm[1]},A:function(n,l){return n.getHours()<12?l.amPm[0].toUpperCase():l.amPm[1].toUpperCase()},ZZ:function(n){var l=n.getTimezoneOffset();return(l>0?"-":"+")+Se(Math.floor(Math.abs(l)/60)*100+Math.abs(l)%60,4)},Z:function(n){var l=n.getTimezoneOffset();return(l>0?"-":"+")+Se(Math.floor(Math.abs(l)/60),2)+":"+Se(Math.abs(l)%60,2)}},mo=function(n){return+n-1},po=[null,_t],go=[null,dn],_o=["isPm",dn,function(n,l){var s=n.toLowerCase();return s===l.amPm[0]?0:s===l.amPm[1]?1:null}],yo=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(n){var l=(n+"").match(/([+-]|\d\d)/gi);if(l){var s=+l[1]*60+parseInt(l[2],10);return l[0]==="+"?s:-s}return 0}],ka={D:["day",_t],DD:["day",yt],Do:["day",_t+dn,function(n){return parseInt(n,10)}],M:["month",_t,mo],MM:["month",yt,mo],YY:["year",yt,function(n){var l=new Date,s=+(""+l.getFullYear()).substr(0,2);return+(""+(+n>68?s-1:s)+n)}],h:["hour",_t,void 0,"isPm"],hh:["hour",yt,void 0,"isPm"],H:["hour",_t],HH:["hour",yt],m:["minute",_t],mm:["minute",yt],s:["second",_t],ss:["second",yt],YYYY:["year",ya],S:["millisecond","\\d",function(n){return+n*100}],SS:["millisecond",yt,function(n){return+n*10}],SSS:["millisecond",_a],d:po,dd:po,ddd:go,dddd:go,MMM:["month",dn,ao("monthNamesShort")],MMMM:["month",dn,ao("monthNames")],a:_o,A:_o,ZZ:yo,Z:yo},Vn={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Ea=function(n){return Nt(Vn,n)},Sa=function(n,l,s){if(l===void 0&&(l=Vn.default),s===void 0&&(s={}),typeof n=="number"&&(n=new Date(n)),Object.prototype.toString.call(n)!=="[object Date]"||isNaN(n.getTime()))throw new Error("Invalid Date pass to format");l=Vn[l]||l;var m=[];l=l.replace(so,function(u,b){return m.push(b),"@@@"});var h=Nt(Nt({},On),s);return l=l.replace(oo,function(u){return va[u](n,h)}),l.replace(/@@@/g,function(){return m.shift()})};function Ta(n,l,s){if(s===void 0&&(s={}),typeof l!="string")throw new Error("Invalid format in fecha parse");if(l=Vn[l]||l,n.length>1e3)return null;var m=new Date,h={year:m.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},u=[],b=[],g=l.replace(so,function(Te,he){return b.push(ho(he)),"@@@"}),T={},A={};g=ho(g).replace(oo,function(Te){var he=ka[Te],tt=he[0],Ye=he[1],wt=he[3];if(T[tt])throw new Error("Invalid format. "+tt+" specified twice in format");return T[tt]=!0,wt&&(A[wt]=!0),u.push(he),"("+Ye+")"}),Object.keys(A).forEach(function(Te){if(!T[Te])throw new Error("Invalid format. "+Te+" is required in specified format")}),g=g.replace(/@@@/g,function(){return b.shift()});var V=n.match(new RegExp(g,"i"));if(!V)return null;for(var j=Nt(Nt({},On),s),J=1;J<V.length;J++){var we=u[J-1],et=we[0],st=we[2],fe=st?st(V[J],j):+V[J];if(fe==null)return null;h[et]=fe}h.isPm===1&&h.hour!=null&&+h.hour!=12?h.hour=+h.hour+12:h.isPm===0&&+h.hour==12&&(h.hour=0);var H;if(h.timezoneOffset==null){H=new Date(h.year,h.month,h.day,h.hour,h.minute,h.second,h.millisecond);for(var Y=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],J=0,ce=Y.length;J<ce;J++)if(T[Y[J][0]]&&h[Y[J][0]]!==H[Y[J][1]]())return null}else if(H=new Date(Date.UTC(h.year,h.month,h.day,h.hour,h.minute-h.timezoneOffset,h.second,h.millisecond)),h.month>11||h.month<0||h.day>31||h.day<1||h.hour>23||h.hour<0||h.minute>59||h.minute<0||h.second>59||h.second<0)return null;return H}var xe={format:Sa,parse:Ta,defaultI18n:fo,setGlobalDateI18n:Ca,setGlobalDateMasks:Ea};const ge={fieldIsRequired:"This field is required!",invalidFormat:"Invalid format!",numberTooSmall:"The number is too small! Minimum: {0}",numberTooBig:"The number is too big! Maximum: {0}",invalidNumber:"Invalid number",invalidInteger:"The value is not an integer",textTooSmall:"The length of text is too small! Current: {0}, Minimum: {1}",textTooBig:"The length of text is too big! Current: {0}, Maximum: {1}",thisNotText:"This is not a text!",thisNotArray:"This is not an array!",selectMinItems:"Select minimum {0} items!",selectMaxItems:"Select maximum {0} items!",invalidDate:"Invalid date!",dateIsEarly:"The date is too early! Current: {0}, Minimum: {1}",dateIsLate:"The date is too late! Current: {0}, Maximum: {1}",invalidEmail:"Invalid e-mail address!",invalidURL:"Invalid URL!",invalidCard:"Invalid card format!",invalidCardNumber:"Invalid card number!",invalidTextContainNumber:"Invalid text! Cannot contains numbers or special characters",invalidTextContainSpec:"Invalid text! Cannot contains special characters"};function Le(n,l,s=ge){return C.isNil(n)||n===""?l?[re(s.fieldIsRequired)]:[]:null}function re(n,...l){if(n!=null&&l.length>0)for(let s=0;s<l.length;s++)n=n.replace("{"+(s-1)+"}",l[s]);return n}const cn={resources:ge,required(n,l,s,m=ge){return Le(n,l.required,m)},number(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=[];return C.isFinite(n)?(!C.isNil(l.min)&&n<l.min&&u.push(re(m.numberTooSmall,l.min)),!C.isNil(l.max)&&n>l.max&&u.push(re(m.numberTooBig,l.max))):u.push(re(m.invalidNumber)),u},integer(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=cn.number(n,l,s,m);return C.isInteger(n)||u.push(re(m.invalidInteger)),u},double(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!C.isNumber(n)||isNaN(n))return[re(m.invalidNumber)]},string(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=[];return C.isString(n)?(!C.isNil(l.min)&&n.length<l.min&&u.push(re(m.textTooSmall,n.length,l.min)),!C.isNil(l.max)&&n.length>l.max&&u.push(re(m.textTooBig,n.length,l.max))):u.push(re(m.thisNotText)),u},array(n,l,s,m=ge){if(l.required){if(!C.isArray(n))return[re(m.thisNotArray)];if(n.length===0)return[re(m.fieldIsRequired)]}if(!C.isNil(n)){if(!C.isNil(l.min)&&n.length<l.min)return[re(m.selectMinItems,l.min)];if(!C.isNil(l.max)&&n.length>l.max)return[re(m.selectMaxItems,l.max)]}},date(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=new Date(n);if(isNaN(u.getDate()))return[re(m.invalidDate)];const b=[];if(!C.isNil(l.min)){const g=new Date(l.min);u.valueOf()<g.valueOf()&&b.push(re(m.dateIsEarly,xe.format(u),xe.format(g)))}if(!C.isNil(l.max)){const g=new Date(l.max);u.valueOf()>g.valueOf()&&b.push(re(m.dateIsLate,xe.format(u),xe.format(g)))}return b},regexp(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!C.isNil(l.pattern)&&!new RegExp(l.pattern).test(n))return[re(m.invalidFormat)]},email(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!/^(([^<>()\[\]\\.,;:\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,}))$/.test(n))return[re(m.invalidEmail)]},url(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(n))return[re(m.invalidURL)]},creditCard(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,b=n.replace(/[^0-9]+/g,"");if(!u.test(b))return[re(m.invalidCard)];let g=0,T,A,V;for(let j=b.length-1;j>=0;j--)T=b.substring(j,j+1),A=parseInt(T,10),V?(A*=2,A>=10?g+=A%10+1:g+=A):g+=A,V=!V;if(!(g%10===0&&b))return[re(m.invalidCardNumber)]},alpha(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!/^[a-zA-Z]*$/.test(n))return[re(m.invalidTextContainNumber)]},alphaNumeric(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!/^[a-zA-Z0-9]*$/.test(n))return[re(m.invalidTextContainSpec)]}};Object.keys(cn).forEach(n=>{const l=cn[n];C.isFunction(l)&&(l.locale=s=>(m,h,u)=>l(m,h,u,C.defaults(s,ge)))});function bo(n){return C.isString(n)?cn[n]!=null?cn[n]:(console.warn(`'${n}' is not a validator function!`),null):n}function Ir(n,l,s){let m=C.get(s.context,"schema.attributes",{});const h=l.value||"input";C.isString(h)&&(m=C.get(m,h)||m),C.forEach(m,(u,b)=>{n.setAttribute(b,u)})}const K={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:Ir,updated:Ir,componentUpdated:Ir}},computed:{value:{cache:!1,get(){let n;return C.isFunction(C.get(this.schema,"get"))?n=this.schema.get(this.model):n=C.get(this.model,this.schema.model),this.formatValueToField(n)},set(n){const l=this.value;n=this.formatValueToModel(n),C.isFunction(n)?n(n,l):this.updateModelValue(n,l)}}},methods:{validate(n){this.clearValidationErrors();const l=C.get(this.formOptions,"validateAsync",!1);let s=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const h=[];C.isArray(this.schema.validator)?C.forEach(this.schema.validator,u=>{h.push(bo(u).bind(this))}):h.push(bo(this.schema.validator).bind(this)),C.forEach(h,u=>{if(l)s.push(u(this.value,this.schema,this.model));else{const b=u(this.value,this.schema,this.model);b&&C.isFunction(b.then)?b.then(g=>{g&&(this.errors=this.errors.concat(g));const T=this.errors.length===0;this.$emit("validated",T,this.errors,this)}):b&&(s=s.concat(b))}})}const m=h=>{let u=[];C.forEach(C.uniq(h),g=>{C.isArray(g)&&g.length>0?u=u.concat(g):C.isString(g)&&u.push(g)}),C.isFunction(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,u,this.schema);const b=u.length===0;return n||this.$emit("validated",b,u,this),this.errors=u,u};return l?Promise.all(s).then(m):m(s)},debouncedValidate(){C.isFunction(this.debouncedValidateFunc)||(this.debouncedValidateFunc=C.debounce(this.validate.bind(this),C.get(this.schema,"validateDebounceTime",C.get(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(n,l){let s=!1;C.isFunction(this.schema.set)?(this.schema.set(this.model,n),s=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,n),s=!0),s&&(this.$emit("modelUpdated",n,this.schema.model),C.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,n,l,this.schema),C.get(this.formOptions,"validateAfterChanged",!1)===!0&&(C.get(this.schema,"validateDebounceTime",C.get(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(n,l){let s=n.replace(/\[(\w+)\]/g,".$1");s=s.replace(/^\./,"");let m=this.model;const h=s.split(".");let u=0;const b=h.length;for(;u<b;){const g=h[u];if(u<b-1)m[g]!==void 0||(m[g]={}),m=m[g];else{m[g]=l;return}++u}},getFieldID(n,l=!1){const s=C.get(this.formOptions,"fieldIdPrefix","");return ro(n,s)+(l?"-"+C.uniqueId():"")},getFieldClasses(){return C.get(this.schema,"fieldClasses",[])},formatValueToField(n){return n},formatValueToModel(n){return n}}},Ba=Object.freeze(Object.defineProperty({__proto__:null,default:K},Symbol.toStringTag,{value:"Module"})),Ma={mixins:[K]},Aa=["id","autocomplete","disabled","name","required"];function Ia(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("input",{id:n.getFieldID(n.schema),type:"checkbox","onUpdate:modelValue":l[0]||(l[0]=g=>n.value=g),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,name:n.schema.inputName,class:i.normalizeClass(n.schema.fieldClasses),required:n.schema.required},null,10,Aa)),[[i.vModelCheckbox,n.value],[b,"input"]])}const G1="",P=(n,l)=>{const s=n.__vccOpts||n;for(const[m,h]of l)s[m]=h;return s},Na=P(Ma,[["render",Ia]]),Fa={class:"wrapper"},$a=["disabled"],Oa=["id","checked","disabled","onChange","name"],Va=["disabled"],Da={class:"info"},xa=i.createElementVNode("div",{class:"arrow"},null,-1),La={class:"dropList"},Ua=["id","checked","disabled","onChange","name"];function Ra(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",Fa,[n.schema.listBox?(i.openBlock(),i.createElementBlock("div",{key:0,class:"listbox form-control",disabled:n.disabled||null},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.items,g=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["list-row",{"is-checked":u.isItemChecked(g)}])},[i.createElementVNode("label",null,[i.withDirectives(i.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"checkbox",checked:u.isItemChecked(g)||null,disabled:n.disabled||null,onChange:T=>u.onChanged(T,g),name:u.getInputName(g)},null,40,Oa),[[b,"input"]]),i.createTextVNode(i.toDisplayString(u.getItemName(g)),1)])],2))),256))],8,$a)):i.createCommentVNode("",!0),n.schema.listBox?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:1,class:"combobox form-control",disabled:n.disabled||null},[i.createElementVNode("div",{class:i.normalizeClass(["mainRow",{expanded:h.comboExpanded}]),onClick:l[0]||(l[0]=(...g)=>u.onExpandCombo&&u.onExpandCombo(...g))},[i.createElementVNode("div",Da,i.toDisplayString(u.selectedCount)+" selected",1),xa],2),i.createElementVNode("div",La,[h.comboExpanded?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(u.items,g=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["list-row",{"is-checked":u.isItemChecked(g)}])},[i.createElementVNode("label",null,[i.withDirectives(i.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"checkbox",checked:u.isItemChecked(g)||null,disabled:n.disabled||null,onChange:T=>u.onChanged(T,g),name:u.getInputName(g)},null,40,Ua),[[b,"input"]]),i.createTextVNode(i.toDisplayString(u.getItemName(g)),1)])],2))),256)):i.createCommentVNode("",!0)])],8,Va))])),[[b,"wrapper"]])}const Z1="",Pa=P({mixins:[K],data(){return{comboExpanded:!1}},computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(n){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?io(this.schema.inputName+"_"+this.getItemValue(n)):io(this.getItemValue(n))},getItemValue(n){if(C.isObject(n)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return n[this.schema.checklistOptions.value];if(typeof n.value<"u")return n.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return n},getItemName(n){if(C.isObject(n)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return n[this.schema.checklistOptions.name];if(typeof n.name<"u")return n.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return n},isItemChecked(n){return this.value&&this.value.indexOf(this.getItemValue(n))!==-1},onChanged(n,l){if((C.isNil(this.value)||!Array.isArray(this.value))&&(this.value=[]),n.target.checked){const s=C.clone(this.value);s.push(this.getItemValue(l)),this.value=s}else{const s=C.clone(this.value);s.splice(this.value.indexOf(this.getItemValue(l)),1),this.value=s}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",Ra]]),qa={class:"wrapper"},za=["id","type","value","disabled","accept","alt","autocomplete","checked","dirname","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","width","files"],Ha={key:0,class:"helper"};function Wa(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",qa,[i.withDirectives(i.createElementVNode("input",{class:i.normalizeClass(["form-control",n.schema.fieldClasses]),id:n.getFieldID(n.schema),type:u.inputType,value:n.value,onInput:l[0]||(l[0]=(...g)=>u.onInput&&u.onInput(...g)),onBlur:l[1]||(l[1]=(...g)=>u.onBlur&&u.onBlur(...g)),onChange:l[2]||(l[2]=(...g)=>n.schema.onChange&&n.schema.onChange(...g)),disabled:n.disabled||null,accept:n.schema.accept,alt:n.schema.alt,autocomplete:n.schema.autocomplete,checked:n.schema.checked||null,dirname:n.schema.dirname,formaction:n.schema.formaction,formenctype:n.schema.formenctype,formmethod:n.schema.formmethod,formnovalidate:n.schema.formnovalidate,formtarget:n.schema.formtarget,height:n.schema.height,list:n.schema.list,max:n.schema.max,maxlength:n.schema.maxlength,min:n.schema.min,minlength:n.schema.minlength,multiple:n.schema.multiple,name:n.schema.inputName,pattern:n.schema.pattern,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,size:n.schema&&n.schema.size>0?n.schema.size:1,src:n.schema.src,step:n.schema.step,width:n.schema.width,files:n.schema.files},null,42,za),[[b,"input"]]),n.schema.inputType.toLowerCase()==="color"||n.schema.inputType.toLowerCase()==="range"?(i.openBlock(),i.createElementBlock("span",Ha,i.toDisplayString(n.value),1)):i.createCommentVNode("",!0)])),[[b,"wrapper"]])}const X1="",wo={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},Ka=P({mixins:[K],computed:{inputType(){return this.schema&&this.schema.inputType==="datetime"?"datetime-local":this.schema.inputType}},mounted(){switch(this.schema.inputType.toLowerCase()){case"number":case"range":this.debouncedFormatFunc=C.debounce((n,l)=>{this.formatNumberToModel(n,l)},parseInt(C.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":this.debouncedFormatFunc=C.debounce((n,l)=>{this.formatDatetimeToModel(n,l)},parseInt(C.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}},created(){this.schema.inputType.toLowerCase()==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")},methods:{formatValueToModel(n){if(n!=null)switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":case"number":case"range":return(l,s)=>{this.debouncedFormatFunc(n,s)}}return n},formatValueToField(n){switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":return this.formatDatetimeValueToField(n)}return n},formatDatetimeToModel(n,l){const s=wo[this.schema.inputType.toLowerCase()],m=xe.parse(n,s);m!==!1&&(this.schema.format?n=xe.format(m,this.schema.format):n=m.valueOf()),this.updateModelValue(n,l)},formatDatetimeValueToField(n){if(n==null)return null;const l=wo[this.schema.inputType.toLowerCase()];let s=n;return C.isNumber(n)||(s=xe.parse(n,l)),s!==!1?xe.format(s,l):n},formatNumberToModel(n,l){C.isNumber(n)||(n=NaN),this.updateModelValue(n,l)},onInput(n){let l=n.target.value;switch(this.schema.inputType.toLowerCase()){case"number":case"range":C.isNumber(parseFloat(n.target.value))&&(l=parseFloat(n.target.value));break}this.value=l},onBlur(){C.isFunction(this.debouncedFormatFunc)&&this.debouncedFormatFunc.flush()}}},[["render",Wa]]),Ya=["id"];function Ga(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("span",{id:n.getFieldID(n.schema),class:i.normalizeClass(n.schema.fieldClasses)},[i.createTextVNode(i.toDisplayString(n.value),1)],10,Ya)),[[b,"label"]])}const j1="",Za=P({mixins:[K]},[["render",Ga]]),Ja=["disabled"],Xa=["id","disabled","name","onClick","value","checked","required"];function Qa(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:"radio-list",disabled:n.disabled||null},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.items,g=>i.withDirectives((i.openBlock(),i.createElementBlock("label",{class:i.normalizeClass(u.getItemCssClasses(g))},[i.withDirectives(i.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"radio",disabled:u.isItemDisabled(g)||null,name:u.id,onClick:T=>u.onSelection(g),value:u.getItemValue(g),checked:u.isItemChecked(g)||null,class:i.normalizeClass(n.schema.fieldClasses),required:n.schema.required},null,10,Xa),[[b,"input"]]),i.createTextVNode(i.toDisplayString(u.getItemName(g)),1)],2)),[[b,"label"]])),256))],8,Ja)),[[b,"wrapper"]])}const tb="",ja=P({mixins:[K],computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n},id(){return this.schema.model}},methods:{getItemValue(n){if(C.isObject(n)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.value<"u")return n[this.schema.radiosOptions.value];if(typeof n.value<"u")return n.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return n},getItemName(n){if(C.isObject(n)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.name<"u")return n[this.schema.radiosOptions.name];if(typeof n.name<"u")return n.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return n},getItemCssClasses(n){return{"is-checked":this.isItemChecked(n),"is-disabled":this.isItemDisabled(n)}},onSelection(n){this.value=this.getItemValue(n)},isItemChecked(n){return this.getItemValue(n)===this.value},isItemDisabled(n){if(this.disabled)return!0;const l=C.get(n,"disabled",!1);return C.isFunction(l)?l(this.model):l}}},[["render",Qa]]),ed=["disabled","name","id"],td=["disabled"],nd=["label"],rd=["value"],id=["value"];function od(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("select",{class:i.normalizeClass(["form-control",n.schema.fieldClasses]),"onUpdate:modelValue":l[0]||(l[0]=g=>n.value=g),disabled:n.disabled||null,name:n.schema.inputName,id:n.getFieldID(n.schema)},[u.selectOptions.hideNoneSelectedText?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("option",{key:0,disabled:n.schema.required||null,value:null},i.toDisplayString(u.selectOptions.noneSelectedText||"<Nothing selected>"),9,td)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.items,g=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[g.group?(i.openBlock(),i.createElementBlock("optgroup",{key:0,label:u.getGroupName(g)},[g.ops?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(g.ops,T=>(i.openBlock(),i.createElementBlock("option",{value:u.getItemValue(T)},i.toDisplayString(u.getItemName(T)),9,rd))),256)):i.createCommentVNode("",!0)],8,nd)):i.createCommentVNode("",!0),g.group?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("option",{key:1,value:u.getItemValue(g)},i.toDisplayString(u.getItemName(g)),9,id))],64))),256))],10,ed)),[[i.vModelSelect,n.value],[b,"input"]])}const Co=P({mixins:[K],computed:{selectOptions(){return this.schema.selectOptions||{}},items(){const n=this.schema.values;return typeof n=="function"?this.groupValues(n.apply(this,[this.model,this.schema])):this.groupValues(n)}},methods:{formatValueToField(n){return C.isNil(n)?null:n},groupValues(n){const l=[];let s={};return n.forEach(m=>{s=null,m.group&&C.isObject(m)?(s=C.find(l,h=>h.group===m.group),s?s.ops.push({id:m.id,name:m.name}):(s={group:"",ops:[]},s.group=m.group,s.ops.push({id:m.id,name:m.name}),l.push(s))):l.push(m)}),l},getGroupName(n){if(n&&n.group)return n.group;throw new Error("Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")},getItemValue(n){if(C.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return n[this.schema.selectOptions.value];if(typeof n.id<"u")return n.id;throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return n},getItemName(n){if(C.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return n[this.schema.selectOptions.name];if(typeof n.name<"u")return n.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return n}}},[["render",od]]),sd=["id","value","name","disabled"];function ld(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("input",{id:n.getFieldID(n.schema),type:"submit",value:n.schema.buttonText,onClick:l[0]||(l[0]=(...b)=>u.onClick&&u.onClick(...b)),name:n.schema.inputName,disabled:n.disabled||null,class:i.normalizeClass(n.schema.fieldClasses)},null,10,sd)}const ib="",ad=P({mixins:[K],methods:{onClick(n){if(this.schema.validateBeforeSubmit===!0){n.preventDefault();const l=C.get(this.formOptions,"validateAsync",!1),s=this.vfg.validate(),m=h=>{l&&!C.isEmpty(h)||!l&&!h?C.isFunction(this.schema.onValidationError)&&this.schema.onValidationError(this.model,this.schema,h,n):C.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,n)};s&&C.isFunction(s.then)?s.then(m):m(s)}else C.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,n)}}},[["render",ld]]),dd=["id","disabled","maxlength","minlength","placeholder","readonly","required","rows","name"];function cd(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("textarea",{class:i.normalizeClass(["form-control",n.schema.fieldClasses]),"onUpdate:modelValue":l[0]||(l[0]=g=>n.value=g),id:n.getFieldID(n.schema),disabled:n.disabled||null,maxlength:n.schema.max,minlength:n.schema.min,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,rows:n.schema.rows||2,name:n.schema.inputName},null,10,dd)),[[i.vModelText,n.value],[b,"input"]])}const vo=P({mixins:[K]},[["render",cd]]),ud={class:"wrapper"},fd=["id","name","accept","multiple","placeholder","readonly","required","disabled"];function hd(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",ud,[i.withDirectives(i.createElementVNode("input",{class:"form-control",id:n.getFieldID(n.schema),type:"file",name:n.schema.inputName,onChange:l[0]||(l[0]=(...g)=>u.onChange&&u.onChange(...g)),accept:n.schema.accept,multiple:n.schema.multiple,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,disabled:n.disabled||null},null,40,fd),[[b,"input"]])])),[[b,"wrapper"]])}const lb="",md=P({mixins:[K],methods:{onChange(n){C.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,this.schema,n,this)}}},[["render",hd]]),pd=["value","autocomplete","disabled","placeholder","readonly","name","id"];function gd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("input",{class:"form-control",type:"text",value:n.value,autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,pd)}const _d=P({mixins:[K],data(){return{cleave:null}},mounted(){this.$nextTick(function(){window.Cleave?(this.cleave=new window.Cleave(this.$el,C.defaults(this.schema.cleaveOptions||{},{creditCard:!1,phone:!1,phoneRegionCode:"AU",date:!1,datePattern:["d","m","Y"],numeral:!1,numeralThousandsGroupStyle:"thousand",numeralDecimalScale:2,numeralDecimalMark:".",blocks:[],delimiter:" ",prefix:null,numericOnly:!1,uppercase:!1,lowercase:!1,maxLength:0})),this.cleave.properties&&this.cleave.properties.hasOwnProperty.call("result")?this.$watch("cleave.properties.result",()=>{this.value=this.cleave.properties.result}):this.$el.addEventListener("input",this.inputChange)):console.warn("Cleave is missing. Please download from https://github.com/nosir/cleave.js/ and load the script in the HTML head section!")})},beforeUnmount(){this.cleave&&(this.cleave.destroy(),this.$el.removeEventListener("input",this.inputChange))},methods:{inputChange(){this.value=this.$el.value}}},[["render",gd]]),ko={formatValueToField(n){if(n!=null){const l=this.schema.format?xe.parse(n,this.schema.format):new Date(n);return xe.format(l,this.getDateFormat())}return n},formatValueToModel(n){if(n!=null){const l=xe.parse(n,this.getDateFormat());this.schema.format?n=xe.format(l,this.schema.format):n=l.valueOf()}return n}},yd={class:"input-group date"},bd=["autocomplete","disabled","placeholder","readonly","name","id"],wd=i.createElementVNode("span",{class:"input-group-addon"},[i.createElementVNode("span",{class:"glyphicon glyphicon-calendar"})],-1);function Cd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("div",yd,[i.withDirectives(i.createElementVNode("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,bd),[[i.vModelText,n.value]]),wd])}const Eo="YYYY-MM-DD HH:mm:ss",vd={mixins:[K],mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.datetimepicker){const n=this.$el.querySelector(".form-control");$(this.$el).datetimepicker(C.defaults(this.schema.dateTimePickerOptions||{},{format:Eo})).on("dp.change",()=>{this.value=n.value})}else console.warn("Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.datetimepicker&&$(this.$el).data("DateTimePicker").destroy()},methods:{getDateFormat(){return this.schema.dateTimePickerOptions&&this.schema.dateTimePickerOptions.format?this.schema.dateTimePickerOptions.format:Eo},...ko}},kd=P(vd,[["render",Cd]]),Ed=["autocomplete","disabled","placeholder","readonly","name","id"];function Sd(n,l,s,m,h,u){return i.withDirectives((i.openBlock(),i.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,debounce:"500",onFocus:l[1]||(l[1]=b=>u.geolocate()),id:n.getFieldID(n.schema)},null,40,Ed)),[[i.vModelText,n.value]])}const Td=P({mixins:[K],data(){return{autocomplete:"",inputs:{street_number:"long_name",route:"long_name",country:"long_name",administrative_area_level_1:"long_name",administrative_area_level_2:"long_name",locality:"long_name",postal_code:"short_name"}}},mounted(){this.$nextTick(()=>{window.google&&window.google.maps&&window.google.maps.places&&window.google.maps.places.Autocomplete?(this.autocomplete=new google.maps.places.Autocomplete(this.$el,{types:["geocode"]}),this.autocomplete.addListener("place_changed",this.pipeAddress)):console.warn("Google Maps API is missing. Please add https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&libraries=places script in the HTML head section!")})},methods:{pipeAddress(){const n=this.autocomplete.getPlace();if(n){this.value=n.formatted_address;const l={};if(n.address_components!==void 0)for(let s=0;s<n.address_components.length;s++){const m=n.address_components[s].types[0];this.inputs[m]&&(l[m]=n.address_components[s][this.inputs[m]])}C.isFunction(this.schema.onPlaceChanged)&&this.schema.onPlaceChanged(this.value,l,n,this.model,this.schema)}},geolocate(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(n=>{const l={lat:n.coords.latitude,lng:n.coords.longitude},s=new window.google.maps.Circle({center:l,radius:n.coords.accuracy});this.autocomplete.setBounds(s.getBounds())})}}},[["render",Sd]]),Bd={class:"wrapper"},Md=["autocomplete","disabled","placeholder","readonly"],Ad=["disabled","name"];function Id(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("div",Bd,[i.withDirectives(i.createElementVNode("input",{class:"form-control link",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>u.wrappedValue=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly},null,8,Md),[[i.vShow,n.schema.hideInput!==!0],[i.vModelText,u.wrappedValue]]),n.schema.browse!==!1?(i.openBlock(),i.createElementBlock("input",{key:0,class:"form-control file",type:"file",disabled:n.disabled||null,onChange:l[1]||(l[1]=(...b)=>u.fileChanged&&u.fileChanged(...b)),name:n.schema.inputName},null,40,Ad)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"preview",style:i.normalizeStyle(u.previewStyle)},[i.createElementVNode("div",{class:"remove",title:"Remove image",onClick:l[2]||(l[2]=(...b)=>u.remove&&u.remove(...b))})],4)])}const ub="",Nd=P({mixins:[K],computed:{previewStyle(){return this.schema.preview!==!1?{display:"block","background-image":this.value!=null?"url("+this.value+")":"none"}:{display:"none"}},wrappedValue:{get(){return this.value&&this.value.indexOf("data")===0?"<inline base64 image>":this.value},set(n){n&&n.indexOf("http")===0&&(this.value=n)}}},watch:{model:{deep:!0,handler(){const n=this.$el.querySelector("input.file");n&&(n.value="")}}},methods:{remove(){this.value=""},fileChanged(n){const l=new FileReader;l.onload=s=>{this.value=s.target.result},n.target.files&&n.target.files.length>0&&l.readAsDataURL(n.target.files[0])}}},[["render",Id]]),Fd=["autocomplete","disabled","placeholder","readonly","name","id"];function $d(n,l,s,m,h,u){return i.withDirectives((i.openBlock(),i.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,Fd)),[[i.vModelText,n.value]])}const Od=P({mixins:[K],mounted(){this.$nextTick(function(){window.$&&window.$.fn.mask?$(this.$el).unmask().mask(this.schema.mask,this.schema.maskOptions):console.warn("JQuery MaskedInput library is missing. Please download from https://github.com/digitalBush/jquery.maskedinput and load the script in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.mask&&$(this.$el).unmask()}},[["render",$d]]),mb="",Vd={mixins:[K],data(){return{slider:null}},computed:{containPips(){return this.schema.noUiSliderOptions&&typeof this.schema.noUiSliderOptions.pips<"u"},containTooltip(){return this.schema.noUiSliderOptions&&this.schema.noUiSliderOptions.tooltips}},watch:{model:{handler(){window.noUiSlider&&this.slider&&this.slider.noUiSlider&&this.slider.noUiSlider.set(this.value)},deep:!0}},mounted(){this.$nextTick(()=>{window.noUiSlider?(this.slider=this.$el,window.noUiSlider.create(this.slider,C.defaults(this.schema.noUiSliderOptions||{},{start:this.getStartValue(),range:{min:this.schema.min,max:this.schema.max}})),this.slider.noUiSlider.on("change",this.onChange.bind(this))):console.warn("noUiSlider is missing. Please download from https://github.com/leongersen/noUiSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.noUiSlider.off("change")},methods:{onChange(n){C.isArray(n)?this.value=[parseFloat(n[0]),parseFloat(n[1])]:this.value=parseFloat(n)},formatValueToField(n){this.slider!==null&&typeof this.slider.noUiSlider<"u"&&this.slider.noUiSlider.set(n)},formatValueToModel(n){if(typeof this.slider.noUiSlider<"u")return n instanceof Array?[Number(n[0]),Number(n[1])]:Number(n)},getStartValue(){return this.value!=null?this.value:typeof this.schema.noUiSliderOptions<"u"&&this.schema.noUiSliderOptions.double?[this.schema.min,this.schema.min]:this.schema.min}}},Dd=["disabled"];function xd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["slider",{"contain-pips":u.containPips,"contain-tooltip":u.containTooltip}]),disabled:n.disabled||null},null,10,Dd)}const Ld=P(Vd,[["render",xd]]),Ud=["autocomplete","disabled","placeholder","readonly","name"];function Rd(n,l,s,m,h,u){return i.withDirectives((i.openBlock(),i.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName},null,8,Ud)),[[i.vModelText,n.value]])}const Pd="YYYY-MM-DD",qd={mixins:[K],data(){return{picker:null,options:null}},mounted(){this.initialize(C.get(this.schema,"pikadayOptions",{}))},beforeUnmount(){this.picker&&this.picker.destroy()},methods:{getDateFormat(){return C.get(this.schema,"pikadayOptions.format",Pd)},...ko,initialize(n){this.picker&&this.picker.destroy&&this.picker.destroy(),this.$nextTick(()=>{window.Pikaday?(this.options=C.defaults({},n,{field:this.$el,onSelect:()=>{this.value=this.picker.toString()}}),this.picker=new window.Pikaday(this.options)):console.warn("Pikaday is missing. Please download from https://github.com/dbushell/Pikaday/ and load the script and CSS in the HTML head section!")})}}},zd=P(qd,[["render",Rd]]),Hd=["autocomplete","data-disable","data-max","data-min","data-step","placeholder","readonly","name"];function Wd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("input",{type:"text",autocomplete:n.schema.autocomplete,"data-disable":n.disabled,"data-max":n.schema.max,"data-min":n.schema.min,"data-step":n.schema.step,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName},null,8,Hd)}const pb="",Kd=P({mixins:[K],data(){return{slider:null}},watch:{model:{deep:!0,handler(){if(window.$&&window.$.fn.ionRangeSlider){let n,l;C.isArray(this.value)?[n,l]=this.value:n=this.value,this.slider&&this.slider.update({from:n,to:l})}}}},mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.ionRangeSlider){let n,l;C.isArray(this.value)?[n,l]=this.value:n=this.value;const s=this;$(this.$el).ionRangeSlider(C.defaults(this.schema.rangeSliderOptions||{},{type:"single",grid:!0,hide_min_max:!0,from:n,to:l,onChange(m){s.slider.options.type==="double"?s.value=[m.from,m.to]:s.value=m.from}})),this.slider=$(this.$el).data("ionRangeSlider")}else console.warn("ion.rangeSlider library is missing. Please download from https://github.com/IonDen/ion.rangeSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.destroy()}},[["render",Wd]]),Yd=["disabled","multiple","title","name"],Gd=["disabled","selected"],Zd=["value"];function Jd(n,l,s,m,h,u){return i.withDirectives((i.openBlock(),i.createElementBlock("select",{class:"selectpicker","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),disabled:n.disabled||null,multiple:n.schema.multiSelect,title:n.schema.placeholder,"data-width":"100%",name:n.schema.inputName},[n.schema.multiSelect!==!0?(i.openBlock(),i.createElementBlock("option",{key:0,disabled:n.schema.required||null,value:null,selected:n.value==null},null,8,Gd)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.items,b=>(i.openBlock(),i.createElementBlock("option",{value:u.getItemValue(b)},i.toDisplayString(u.getItemName(b)),9,Zd))),256))],8,Yd)),[[i.vModelSelect,n.value]])}const _b="",Xd=P({mixins:[K],computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n}},watch:{model:{deep:!0,handler(){$.fn.selectpicker&&$(this.$el).selectpicker("refresh")}}},mounted(){this.$nextTick(function(){$.fn.selectpicker?$(this.$el).selectpicker("destroy").selectpicker(this.schema.selectOptions):console.warn("Bootstrap-select library is missing. Please download from https://silviomoreto.github.io/bootstrap-select/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){$.fn.selectpicker&&$(this.$el).selectpicker("destroy")},methods:{getItemValue(n){if(C.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return n[this.schema.selectOptions.value];if(typeof n.id<"u")return n.id;throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return n},getItemName(n){if(C.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return n[this.schema.selectOptions.name];if(typeof n.name<"u")return n.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return n}}},[["render",Jd]]),Qd=["autocomplete","disabled","placeholder","readonly","name","id"];function jd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("input",{type:"text",autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,Qd)}const ec=P({mixins:[K],data(){return{picker:null}},watch:{model:{deep:!0,handler(){window.$&&window.$.fn.spectrum&&this.picker.spectrum("set",this.value)}},disabled(n){n?this.picker.spectrum("disable"):this.picker.spectrum("enable")}},mounted(){this.$nextTick(function(){window.$&&window.$.fn.spectrum?(this.picker=$(this.$el).spectrum("destroy").spectrum(C.defaults(this.schema.colorOptions||{},{showInput:!0,showAlpha:!0,disabled:this.schema.disabled,allowEmpty:!this.schema.required,preferredFormat:"hex",change:n=>{this.value=n?n.toString():null}})),this.picker.spectrum("set",this.value)):console.warn("Spectrum color library is missing. Please download from http://bgrins.github.io/spectrum/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.picker&&this.picker.spectrum("destroy")}},[["render",jd]]),tc=["src"];function nc(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("img",{src:u.mapLink},null,8,tc)}const wb="",rc=P({mixins:[K],computed:{mapLink(){let n,l,s;if(this.value){const m=C.defaults(this.schema.staticMapOptions||{},{lat:"lat",lng:"lng",zoom:8,sizeX:640,sizeY:640});n=this.value[m.lat],l=this.value[m.lng],s=`http://maps.googleapis.com/maps/api/staticmap?center=${n},${l}&zoom=${m.zoom}&size=${m.sizeX}x${m.sizeY}`;const h=["scale","format","maptype","language","region","markers","path","visible","style","key","signature"];for(const u of h)typeof m[u]<"u"&&(s+=`&${u}=${m[u]}`)}return s}}},[["render",nc]]),ic=["autocomplete","disabled","name","id"],oc=["data-on","data-off","for"],sc=i.createElementVNode("span",{class:"handle"},null,-1);function lc(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("label",null,[i.withDirectives(i.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,ic),[[i.vModelCheckbox,n.value]]),i.createElementVNode("span",{class:"label","data-on":n.schema.textOn||"On","data-off":n.schema.textOff||"Off",for:n.getFieldID(n.schema)},null,8,oc),sc])}const vb="",ac=P({mixins:[K],methods:{formatValueToField(n){return n!=null&&this.schema.valueOn?n===this.schema.valueOn:n},formatValueToModel(n){return n!=null&&this.schema.valueOn?n?this.schema.valueOn:this.schema.valueOff:n}}},[["render",lc]]),dc={mixins:[K],data(){return{attributes:this.schema?this.schema.attributes:void 0,newKeyType:"string",newKeyName:"",keyTypes:{}}},created(){this.value||(this.value={})},mounted(){if(!this.value)return;const n=Object.keys(this.value),l={};for(let s=0;s<n.length;s++){const m=n[s];l[m]=typeof this.value[m]}this.keyTypes=l},methods:{removeElement(n){const l=this.value;delete l[n],this.value=JSON.parse(JSON.stringify(l));const s=this.keyTypes;delete s[n],this.keyTypes=JSON.parse(JSON.stringify(s))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""}}},cc={key:0},uc={key:1},fc=["id"],hc={key:0},mc=["onUpdate:modelValue"],pc={key:1},gc=["onUpdate:modelValue"],_c={key:2},yc=["onUpdate:modelValue"],bc=["onClick"],wc=[i.createElementVNode("option",{value:"string"}," String ",-1),i.createElementVNode("option",{value:"number"}," Number ",-1),i.createElementVNode("option",{value:"boolean"}," Boolean ",-1)];function Cc(n,l,s,m,h,u){const b=i.resolveComponent("vue-form-generator"),g=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",null,[n.schema.schema?(i.openBlock(),i.createElementBlock("div",cc,[i.createVNode(b,{model:n.value,options:n.formOptions,schema:n.schema.schema},null,8,["model","options","schema"])])):(i.openBlock(),i.createElementBlock("div",uc,[i.createElementVNode("table",{id:n.getFieldID(n.schema),class:i.normalizeClass(n.schema.fieldClasses)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(T,A)=>(i.openBlock(),i.createElementBlock("tr",{key:A},[i.createElementVNode("td",null,i.toDisplayString(A),1),h.keyTypes[A]==="string"?(i.openBlock(),i.createElementBlock("td",hc,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"text"},null,8,mc),[[i.vModelText,n.value[A]]])])):i.createCommentVNode("",!0),h.keyTypes[A]==="boolean"?(i.openBlock(),i.createElementBlock("td",pc,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"checkbox"},null,8,gc),[[i.vModelCheckbox,n.value[A]]])])):i.createCommentVNode("",!0),h.keyTypes[A]==="number"?(i.openBlock(),i.createElementBlock("td",_c,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"number"},null,8,yc),[[i.vModelText,n.value[A]]])])):i.createCommentVNode("",!0),i.createElementVNode("td",null,[i.createElementVNode("input",{type:"button",value:"x",onClick:V=>u.removeElement(A)},null,8,bc)])]))),128))],10,fc),i.withDirectives(i.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=T=>h.newKeyType=T)},wc,512),[[i.vModelSelect,h.newKeyType]]),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":l[1]||(l[1]=T=>h.newKeyName=T),type:"text"},null,512),[[i.vModelText,h.newKeyName]]),i.createElementVNode("input",{type:"button",value:"Add key",onClick:l[2]||(l[2]=(...T)=>u.addKey&&u.addKey(...T))})]))])),[[g,h.attributes]])}const So=P(dc,[["render",Cc]]),Bb="",vc={mixins:[K],emits:["model-updated"],data(){return{newKeyName:""}},computed:{subSchema(){return this.schema.schema&&this.schema.schema.fields[0].schema},subFields(){return!this.subSchema&&this.schema.fields},hasObjectKeys(){return this.value&&Object.keys(this.value).length>0},transformedModel(){return this.subSchema&&this.subSchema.fields.length>=1&&this.subSchema.fields[0].type==="array"?new Proxy(this.model[this.schema.model],{get:(n,l)=>({[this.schema.model]:n[l]}),set:(n,l,s)=>n[l]=s[this.schema.model]}):this.model[this.schema.model]}},mounted(){this.value||(this.value={});let n=[];this.subSchema?n=this.subSchema.fields:this.subFields&&(n=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,n,this.schema.model)},methods:{removeElement(n){const l=this.value;delete l[n],this.value={...l}},transformMapModelValuesToObject(n,l,s){const m={};return Object.keys(n).map(h=>{const u=h.indexOf(s+"-");if(u>-1&&Array.isArray(l))if(l.length>0){const g=h.split("-").filter(A=>l.find(V=>V.model===A)),T=h.split(`-${g}`)[0].split(`${s}-`)[1];g.length?m[T]={...m[T],[g]:n[h]}:m[h.substring(u+`${s}-`.length)]=n[h]}else m[h.substring(`${s}-`.length)]=n[h];else{const g=h.split("-").filter(A=>A===this.schema.model),T=h.split(`-${g}`)[0].split(`${s}-`)[1];T&&(m[T]=n[h])}return h}),m},addKey(){const n=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",l=this.subSchema?n?[""]:{}:"";this.value[this.newKeyName]=l,this.newKeyName=""},updateModel(n,l){this.$emit("model-updated",this.model[this.schema.model],l)}}},To=n=>(i.pushScopeId("data-v-22600a29"),n=n(),i.popScopeId(),n),kc=["id"],Ec=["data-testid"],Sc={class:"item-wrapper"},Tc={class:"index-wrapper"},Bc=To(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),Mc={key:0},Ac={key:1},Ic=["onUpdate:modelValue","placeholder","onInput"],Nc={key:0,class:"hint"},Fc=To(()=>i.createElementVNode("hr",{class:"wide-divider"},null,-1)),$c={class:"input-item"},Oc=["placeholder"],Vc={key:0,class:"hint"};function Dc(n,l,s,m,h,u){const b=i.resolveComponent("KIcon"),g=i.resolveComponent("KButton"),T=i.resolveComponent("vue-form-generator");return i.openBlock(),i.createElementBlock("div",{id:n.getFieldID(n.schema),class:i.normalizeClass(["object-advanced-wrapper",n.schema.fieldClasses])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(A,V)=>(i.openBlock(),i.createElementBlock("div",{key:V,"data-testid":`field-object-key-${V}`},[i.createElementVNode("div",null,[i.createElementVNode("div",Sc,[i.createElementVNode("div",Tc,[i.createElementVNode("strong",null,i.toDisplayString(V),1),i.createElementVNode("div",null,[i.createVNode(g,{appearance:"tertiary",class:"delete",type:"button",onClick:j=>u.removeElement(V)},{default:i.withCtx(()=>[i.createVNode(b,{icon:"trash",size:"18"})]),_:2},1032,["onClick"])])]),Bc,u.subSchema?(i.openBlock(),i.createElementBlock("div",Mc,[i.createVNode(T,{model:u.transformedModel[V],options:{helpAsHtml:!0},schema:u.subSchema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])):(i.openBlock(),i.createElementBlock("div",Ac,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":j=>n.value[V]=j,class:"form-control",placeholder:n.schema.fields&&n.schema.fields[0].schema.placeholder,type:"text",onInput:j=>u.updateModel(n.value[V],n.model[n.schema.model])},null,40,Ic),[[i.vModelText,n.value[V]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(i.openBlock(),i.createElementBlock("p",Nc,i.toDisplayString(n.schema.fields[0].schema.hint),1)):i.createCommentVNode("",!0)])),Fc])])],8,Ec))),128)),i.createElementVNode("div",{class:i.normalizeClass(["input-wrapper",{indent:u.hasObjectKeys}])},[i.createElementVNode("div",$c,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=A=>h.newKeyName=A),class:"form-control","data-testid":"keyname-input",placeholder:n.schema.placeholder,type:"text"},null,8,Oc),[[i.vModelText,h.newKeyName]]),i.createVNode(g,{appearance:"tertiary","data-testid":"add-key",disabled:!h.newKeyName,onClick:u.addKey},{default:i.withCtx(()=>[i.createTextVNode(" + Add "+i.toDisplayString(n.schema.buttonLabel||n.schema.label),1)]),_:1},8,["disabled","onClick"])]),n.schema.hintText?(i.openBlock(),i.createElementBlock("p",Vc,i.toDisplayString(n.schema.hintText),1)):i.createCommentVNode("",!0)],2)],10,kc)}const Bo=P(vc,[["render",Dc],["__scopeId","data-v-22600a29"]]),Dn="24px",Mo=(n,l)=>{const s=n.__vccOpts||n;for(const[m,h]of l)s[m]=h;return s},xc=n=>(i.pushScopeId("data-v-a4f291af"),n=n(),i.popScopeId(),n),Lc=["aria-hidden"],Uc={key:0,"data-testid":"kui-icon-svg-title"},Rc=xc(()=>i.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),Pc=Mo(i.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Dn,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const l=String(n).replace(/px/gi,""),s=Number(l);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const l=n,s=i.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const h=String(l.size).replace(/px/gi,""),u=Number(h);if(u&&!isNaN(u)&&Number.isInteger(u)&&u>0)return`${u}px`}return Dn}),m=i.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:s.value,lineHeight:"0",width:s.value}));return(h,u)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:i.normalizeStyle(m.value)},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(i.openBlock(),i.createElementBlock("title",Uc,i.toDisplayString(n.title),1)):i.createCommentVNode("",!0),Rc],8,Lc))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-a4f291af"]]),qc=n=>(i.pushScopeId("data-v-d3b433b6"),n=n(),i.popScopeId(),n),zc=["aria-hidden"],Hc={key:0,"data-testid":"kui-icon-svg-title"},Wc=qc(()=>i.createElementVNode("path",{d:"M7 21C6.45 21 5.97917 20.8042 5.5875 20.4125C5.19583 20.0208 5 19.55 5 19V6H4V4H9V3H15V4H20V6H19V19C19 19.55 18.8042 20.0208 18.4125 20.4125C18.0208 20.8042 17.55 21 17 21H7ZM17 6H7V19H17V6ZM9 17H11V8H9V17ZM13 17H15V8H13V17Z",fill:"currentColor"},null,-1)),Nr=Mo(i.defineComponent({__name:"TrashIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Dn,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const l=String(n).replace(/px/gi,""),s=Number(l);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const l=n,s=i.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const h=String(l.size).replace(/px/gi,""),u=Number(h);if(u&&!isNaN(u)&&Number.isInteger(u)&&u>0)return`${u}px`}return Dn}),m=i.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:s.value,lineHeight:"0",width:s.value}));return(h,u)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon trash-icon","data-testid":"kui-icon-wrapper-trash-icon",style:i.normalizeStyle(m.value)},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-trash-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(i.openBlock(),i.createElementBlock("title",Hc,i.toDisplayString(n.title),1)):i.createCommentVNode("",!0),Wc],8,zc))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-d3b433b6"]]),Ib="",Nb="",Kc={name:"FieldArrayItem",components:{TrashIcon:Nr},props:{model:{type:String,default:null}},emits:["remove-item"],data(){return{contentVisible:!1}}},Yc={class:"array-item"};function Gc(n,l,s,m,h,u){const b=i.resolveComponent("TrashIcon"),g=i.resolveComponent("KButton");return i.openBlock(),i.createElementBlock("div",Yc,[i.renderSlot(n.$slots,"default",{},void 0,!0),i.createVNode(g,{appearance:"tertiary",class:"delete",type:"button",onClick:l[0]||(l[0]=T=>n.$emit("remove-item"))},{default:i.withCtx(()=>[i.createVNode(b)]),_:1})])}const Ao=P(Kc,[["render",Gc],["__scopeId","data-v-d42daeb2"]]),Fb="",Zc={name:"FieldArrayMultiItem",emits:["remove-item"],data(){return{contentVisible:!1}}},Jc=n=>(i.pushScopeId("data-v-47ff1f9a"),n=n(),i.popScopeId(),n),Xc={class:"multi-item-wrapper"},Qc=Jc(()=>i.createElementVNode("hr",null,null,-1));function jc(n,l,s,m,h,u){const b=i.resolveComponent("KButton");return i.openBlock(),i.createElementBlock("div",Xc,[i.renderSlot(n.$slots,"default",{},void 0,!0),i.createVNode(b,{appearance:"danger",class:"delete",type:"input",onClick:l[0]||(l[0]=g=>n.$emit("remove-item"))},{default:i.withCtx(()=>[i.createTextVNode(" - Remove Field ")]),_:1}),Qc])}const Io=P(Zc,[["render",jc],["__scopeId","data-v-47ff1f9a"]]),$b="",eu={name:"FieldMetric",components:{AddIcon:Pc,TrashIcon:Nr},mixins:[K],emits:["remove-item"],data(){return{contentVisible:!1}}},tu={key:0,class:"content"};function nu(n,l,s,m,h,u){const b=i.resolveComponent("AddIcon"),g=i.resolveComponent("TrashIcon"),T=i.resolveComponent("KButton");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["field-dropdown",{active:h.contentVisible}])},[i.createElementVNode("div",{class:"title",onClick:l[0]||(l[0]=A=>h.contentVisible=!h.contentVisible)},[i.createTextVNode(i.toDisplayString(n.model.name?n.model.name:"New Item")+" ",1),i.createVNode(b,{class:"metric-add-icon"})]),i.createVNode(i.Transition,{name:"slide-fade"},{default:i.withCtx(()=>[h.contentVisible?(i.openBlock(),i.createElementBlock("div",tu,[i.renderSlot(n.$slots,"default"),i.createVNode(T,{appearance:"tertiary",class:"metric-remove-button",onClick:l[1]||(l[1]=A=>n.$emit("remove-item"))},{default:i.withCtx(()=>[i.createVNode(g)]),_:1})])):i.createCommentVNode("",!0)]),_:3})],2)}const No=P(eu,[["render",nu]]),bt="kong-ui-forms-api",ru="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";function iu(n){return n?n.length===36&&new RegExp(`^${ru}$`).test(n):!1}const Ob="",Vb="",Fr=50,Ft={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"};function ou(n,l,s){return s?Ft.SET_REFERRAL_VALUE:n&&!l||!n&&l?Ft.UPDATE_ENTITY:n&&l?Ft.CREATE_FROM_ENTITY:Ft.CREATE_NOT_FROM_ENTITY}const su={mixins:[K],inject:[bt],emits:["model-updated"],data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return ou(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search}},async created(){await this.$nextTick();let n,l;switch(this.fieldState){case Ft.UPDATE_ENTITY:if(!this[bt]){console.warn("[@kong-ui-public/forms] No API service provided");break}l=(await this[bt].getOne(this.entity,this.model[this.schema.model])).data,n=this.getItem(this.schema.entityDataKey?l[this.schema.entityDataKey]:l),this.idValue=n.id;break;case Ft.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Ft.SET_REFERRAL_VALUE:this.idValue=this.value}try{n&&(this.initialItems=[{...n,label:this.getSuggestionLabel(n),value:n.id}]),this.items=this.initialItems}catch(s){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",s)}},methods:{onQueryChange(n){n.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=C.debounce(this.search,500)),this.performSearch(n)},async search(n){if(n.trim().length===0)return;this.loading=!0;const l=[],s=[],m=this.getInputFields(),h=new Set;iu(n)&&m.includes("id")?s.push((async()=>{const u=await this.fetchExact(n);l.push({...u,label:this.getSuggestionLabel(u),value:u.id})})()):s.push(...m.filter(u=>u!=="id").map(async u=>{(await this.fetchSuggestions(n,u)).forEach(g=>{h.has(g.id)||(h.add(g.id),l.push({...g,label:this.getSuggestionLabel(g),value:g.id}))})})),await Promise.all(s),this.items=l,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(n){return n.data?n.data.length>0?n.data[0]:[]:n},async fetchUntilLimit(n){const l=[];let s=null;if(!this[bt])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;l.length<Fr;){const m=await this[bt].getAll(this.entity,{size:Fr,offset:s,...n});if(l.push(...m.data.data),s=m.data.offset,!s)break}return l.slice(0,Fr)},async fetchSuggestions(n,l){return this.fetchUntilLimit({[l]:n})},async fetchExact(n){return this[bt]?(await this[bt].getOne(this.entity,n)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var n,l;return((l=(n=this.schema)==null?void 0:n.inputValues)==null?void 0:l.fields)||[]},getSuggestionLabel(n){const l=this.getInputFields();return l.length&&n?l.map(s=>n[s]).filter(Boolean).join(" - "):""},updateModel(n){this.$emit("model-updated",n&&n.length?n:null,this.schema.model)},onSelected(n){this.idValue=n&&n.id,this.updateModel(this.getReturnValue(n||{}))},getReturnValue(n){var s;const l=(s=this.schema)==null?void 0:s.returnKey;return l?n[l]:n.id}}},lu={class:"field-wrap autosuggest"},au=["data-testid","data-testlabel"],du=["data-testid"],cu={class:"autosuggest__results_message"};function uu(n,l,s,m,h,u){const b=i.resolveComponent("KSelect");return i.openBlock(),i.createElementBlock("div",lu,[i.createVNode(b,{id:n.schema.model,ref:"suggestion",modelValue:h.idValue,"onUpdate:modelValue":l[0]||(l[0]=g=>h.idValue=g),appearance:"select",autosuggest:"",clearable:"","enable-filtering":"",items:h.items,loading:h.loading,placeholder:n.schema.placeholder,width:"100%",onChange:u.onSelected,onQueryChange:u.onQueryChange},{"item-template":i.withCtx(({item:g})=>[i.createElementVNode("span",{class:"first-part","data-testid":g.id&&`${g.id}-0`,"data-testlabel":g.label},i.toDisplayString(u.getSuggestionLabel(g).split(" - ")[0]),9,au),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.getSuggestionLabel(g).split(" - ").slice(1),(T,A)=>(i.openBlock(),i.createElementBlock("span",{key:A,class:"field-span","data-testid":g.id&&`${g.id}-${A+1}`||A+1},i.toDisplayString(T),9,du))),128))]),empty:i.withCtx(()=>[i.createElementVNode("div",cu,[i.createElementVNode("span",null,i.toDisplayString(h.message),1)])]),_:1},8,["id","modelValue","items","loading","placeholder","onChange","onQueryChange"])])}const Fo=P(su,[["render",uu],["__scopeId","data-v-27d6a440"]]),Db="",xb="",fu={name:"FieldArrayCardContainer",components:{TrashIcon:Nr},props:{model:{type:Object,default:null},schema:{type:Object,default:null}},emits:["remove-item"]},hu={class:"array-card-container"};function mu(n,l,s,m,h,u){const b=i.resolveComponent("KCard"),g=i.resolveComponent("TrashIcon"),T=i.resolveComponent("KButton");return i.openBlock(),i.createElementBlock("div",hu,[i.createVNode(b,{class:"card"},{body:i.withCtx(()=>[i.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),i.createVNode(T,{appearance:"tertiary",class:"array-card-remove-button",onClick:l[0]||(l[0]=A=>n.$emit("remove-item"))},{default:i.withCtx(()=>[i.createVNode(g)]),_:1})])}const $o=P(fu,[["render",mu],["__scopeId","data-v-d409fd75"]]),Lb="",pu={mixins:[K],emits:["model-updated"],methods:{updateModel(n){this.$emit("model-updated",n,this.schema.model)},checkOption(n){return this.model[this.schema.model]?n.value.toString()===this.model[this.schema.model].toString():n.checked},onChange(n){let l=n.target.value.split(",");this.schema.array||(l=l.toString()),this.updateModel(l)}}},gu={class:"selection-group"},_u={class:"form-group"},yu=["id","checked","name","value"];function bu(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("div",gu,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.schema.values,(b,g)=>(i.openBlock(),i.createElementBlock("div",{key:g,class:"option-group"},[i.createElementVNode("div",_u,[i.createElementVNode("label",{class:i.normalizeClass(["k-input-label",b.name])},[i.createElementVNode("input",{id:n.schema.name+"-"+g,checked:u.checkOption(b),class:"k-input",name:n.schema.name,type:"radio",value:b.value,onChange:l[0]||(l[0]=(...T)=>u.onChange&&u.onChange(...T))},null,40,yu),i.createTextVNode(" "+i.toDisplayString(b.name),1)],2)])]))),128))])}const Oo=P(pu,[["render",bu],["__scopeId","data-v-705e327d"]]),wu={name:"FieldArray",components:{FieldArrayItem:Ao,FieldArrayMultiItem:Io,FieldSelect:Co,FieldMetric:No,FieldObject:So,FieldObjectAdvanced:Bo,FieldAutoSuggest:Fo,FieldRadio:Oo,FieldArrayCardContainer:$o,FieldTextArea:vo},mixins:[K],props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},methods:{generateSchema(n,l,s){let m;return l&&(m=JSON.parse(JSON.stringify(l)),m.schema.fields.map(h=>(h.id=`${h.id||h.model}-${s}`,h))),{...m,set(h,u){n[s]=u},get(){return n[s]}}},newElement(){let n=this.value,l;(!n||!n.push)&&(n=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?l=this.schema.items.default():l=this.schema.items.default),n.push(l),this.value=[...n]},removeElement(n){this.value.splice(n,1)},getFieldType(n){return"field-"+n.type},modelUpdated(){}}},Cu=["id"],vu={key:1},ku=["onUpdate:modelValue","type"],Eu=["value","onClick"],Su=["onUpdate:modelValue"],Tu=["value","onClick"];function Bu(n,l,s,m,h,u){const b=i.resolveComponent("FieldTextArea"),g=i.resolveComponent("KButton");return n.schema?(i.openBlock(),i.createElementBlock("div",{key:0,id:n.getFieldID(n.schema),class:i.normalizeClass(n.schema.fieldClasses)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(T,A)=>(i.openBlock(),i.createElementBlock("div",{key:A,class:i.normalizeClass(n.schema.fieldItemsClasses)},[n.schema.items&&n.schema.itemContainerComponent?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.schema.itemContainerComponent),{key:0,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onRemoveItem:V=>u.removeElement(A)},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.getFieldType(n.schema.items)),{"form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["model","schema","onRemoveItem"])):n.schema.items?(i.openBlock(),i.createElementBlock("span",vu,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.getFieldType(n.schema.items)),{"form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):n.schema.itemContainerComponent?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.schema.itemContainerComponent),{key:2,"data-testid":`${n.getFieldID(n.schema)}-item-${A}`,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onRemoveItem:V=>u.removeElement(A)},{default:i.withCtx(()=>{var V,j;return[((V=n.schema.inputAttributes)==null?void 0:V.type)==="textarea"?(i.openBlock(),i.createBlock(b,{key:0,class:"k-input","form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,8,["form-options","model","schema","onModelUpdated"])):i.withDirectives((i.openBlock(),i.createElementBlock("input",i.mergeProps({key:1,"onUpdate:modelValue":J=>n.value[A]=J},n.schema.inputAttributes,{type:((j=n.schema.inputAttributes)==null?void 0:j.type)||"text"}),null,16,ku)),[[i.vModelDynamic,n.value[A]]]),n.schema.showRemoveButton?(i.openBlock(),i.createElementBlock("input",i.mergeProps({key:2},n.schema.removeElementButtonAttributes,{type:"button",value:n.schema.removeElementButtonLabel||s.removeElementButtonLabel,onClick:J=>u.removeElement(A)}),null,16,Eu)):i.createCommentVNode("",!0)]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):i.withDirectives((i.openBlock(),i.createElementBlock("input",i.mergeProps({key:3},n.schema.inputAttributes,{"onUpdate:modelValue":V=>n.value[A]=V,type:"text"}),null,16,Su)),[[i.vModelText,n.value[A]]]),n.schema.showRemoveButton?(i.openBlock(),i.createElementBlock("input",i.mergeProps({key:4},n.schema.removeElementButtonAttributes,{type:"button",value:n.schema.removeElementButtonLabel||s.removeElementButtonLabel,onClick:V=>u.removeElement(A)}),null,16,Tu)):i.createCommentVNode("",!0)],2))),128)),i.createVNode(g,{appearance:"tertiary",class:i.normalizeClass(n.schema.newElementButtonLabelClasses),"data-testid":`add-${n.getFieldID(n.schema)}`,type:"button",onClick:u.newElement},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(n.schema.newElementButtonLabel||s.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,Cu)):i.createCommentVNode("",!0)}const Mu=P(wu,[["render",Bu]]),Ub="",Au={mixins:[K],emits:["model-updated"],data(){return{isOpen:!1}},computed:{openClass(){return this.isOpen?"open":"closed"},fieldCount(){return this.schema.fields.length},titleText(){return`${this.isOpen?"Hide":"View"} ${this.fieldCount} Advanced Fields`}},methods:{handleOpen(){this.isOpen=!this.isOpen},updateModel(n,l){this.$emit("model-updated",n,l)}}},Iu={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},Nu={class:"material-icons"};function Fu(n,l,s,m,h,u){const b=i.resolveComponent("vue-form-generator");return i.openBlock(),i.createElementBlock("div",Iu,[i.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:l[0]||(l[0]=(...g)=>u.handleOpen&&u.handleOpen(...g))},[i.createElementVNode("i",Nu,i.toDisplayString(h.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),i.createElementVNode("span",null,i.toDisplayString(u.titleText),1)]),i.createElementVNode("div",{class:i.normalizeClass(["advanced-field-dropdown",u.openClass])},[i.createVNode(b,{model:n.model,options:{helpAsHtml:!0},schema:n.schema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])],2)])}const $u=P(Au,[["render",Fu],["__scopeId","data-v-2d8e71e1"]]),Rb="",Pb="",Ou={mixins:[K],emits:["model-updated"],data(){return{checkedGroup:null,fieldModel:{...this.model},fieldSchema:[]}},watch:{checkedGroup:{handler(n,l){if(l===null){this.fieldModel={...this.model};return}const s=this.schema.fields[n].fields,m=this.schema.fields[l].fields;m&&m.forEach(h=>this.updateModel("",h.model)),s&&s.forEach(h=>this.updateModel(this.fieldModel[h.model],h.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((n,l)=>{n.fields&&n.fields.forEach(s=>{this.model[s.model]&&(this.checkedGroup=l,this.fieldSchema.push(s.model))})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(n,l){this.$emit("model-updated",n,l)}}},Vu={class:"selection-group"},Du={class:"form-group"},xu=["value"],Lu={class:"control-help"},Uu={class:"option-field"},Ru={class:"option-field-container"};function Pu(n,l,s,m,h,u){const b=i.resolveComponent("vue-form-generator");return i.openBlock(),i.createElementBlock("div",Vu,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.schema.fields,(g,T)=>(i.openBlock(),i.createElementBlock("div",{key:T,class:"option-group"},[i.createElementVNode("div",Du,[i.createElementVNode("label",{class:i.normalizeClass(["k-input-label",`${g.label}-check`])},[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=A=>h.checkedGroup=A),class:"k-input",type:"radio",value:T},null,8,xu),[[i.vModelRadio,h.checkedGroup]]),i.createTextVNode(" "+i.toDisplayString(g.label)+" ",1),i.createElementVNode("div",Lu,i.toDisplayString(g.description),1)],2)]),i.withDirectives(i.createElementVNode("div",Uu,[i.createElementVNode("div",Ru,[i.createVNode(b,{model:n.model,options:{helpAsHtml:!0},schema:{fields:g.fields},onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[i.vShow,g.fields&&h.checkedGroup===T]])]))),128))])}const qu=P(Ou,[["render",Pu],["__scopeId","data-v-cd14c14b"]]),zu={mixins:[K],emits:["model-updated"],methods:{onUpdate(n){this.$emit("model-updated",n,this.schema.model)}}};function Hu(n,l,s,m,h,u){const b=i.resolveComponent("KMultiselect");return i.openBlock(),i.createBlock(b,{"collapsed-context":"","data-testid":"field-multiselect",items:n.schema.values,"label-attributes":{info:n.schema.help},"model-value":n.value,placeholder:n.schema.placeholder,required:n.schema.required||void 0,width:"100%","onUpdate:modelValue":u.onUpdate},null,8,["items","label-attributes","model-value","placeholder","required","onUpdate:modelValue"])}const Wu=Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:$u,FieldArray:Mu,FieldArrayCardContainer:$o,FieldArrayItem:Ao,FieldArrayMultiItem:Io,FieldAutoSuggest:Fo,FieldCheckbox:Na,FieldChecklist:Pa,FieldCleave:_d,FieldDateTimePicker:kd,FieldGoogleAddress:Td,FieldImage:Nd,FieldInput:Ka,FieldLabel:Za,FieldMasked:Od,FieldMetric:No,FieldMultiselect:P(zu,[["render",Hu]]),FieldNoUiSlider:Ld,FieldObject:So,FieldObjectAdvanced:Bo,FieldPikaday:zd,FieldRadio:Oo,FieldRadios:ja,FieldRangeSlider:Kd,FieldSelect:Co,FieldSelectEx:Xd,FieldSelectionGroup:qu,FieldSpectrum:ec,FieldStaticMap:rc,FieldSubmit:ad,FieldTextArea:vo,FieldUpload:md,fieldSwitch:ac},Symbol.toStringTag,{value:"Module"})),zb="",Hb="",Ku={name:"FormGroup",components:Wu,mixins:[no],props:{vfg:{type:Object,required:!0},model:{type:Object,default:()=>{}},options:{type:Object,default:()=>{}},field:{type:Object,required:!0},errors:{type:Array,default(){return[]}}},emits:["validated","modelUpdated"],data(){return{child:i.ref()}},methods:{fieldTypeHasLabel(n){if(C.isNil(n.label))return!1;let l="";switch(n.type==="input"?l=n.inputType:l=n.type,l){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(n){const l=C.get(this.options,"fieldIdPrefix","");return ro(n,l)},getFieldType(n){return"field-"+n.type},getButtonType(n){return C.get(n,"type","button")},onFieldValidated(n,l,s){this.$emit("validated",n,l,s)},buttonVisibility(n){return n.buttons&&n.buttons.length>0},buttonClickHandler(n,l,s){return n.onclick.call(this,this.model,l,s,this)},fieldHint(n){return C.isFunction(n.hint)?n.hint.call(this,this.model,n,this):n.hint},fieldErrors(n){return this.errors.filter(l=>l.field.fieldName===n.fieldName).map(l=>l.error)},onModelUpdated(n,l){this.$emit("modelUpdated",n,l)},validate(n){return this.$refs.child.validate(n)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()},formattedLabel(n){return n?n.replace(/^[cC]onfig\./,""):""}}},Vo=n=>(i.pushScopeId("data-v-e016d4ec"),n=n(),i.popScopeId(),n),Yu=["for"],Gu={class:"icon-wrapper"},Zu=["innerHTML"],Ju=Vo(()=>i.createElementVNode("div",{class:"help",role:"button",tabindex:"0"},[i.createElementVNode("i",{class:"icon"})],-1)),Xu=["innerHTML"],Qu={key:0,class:"link-wrapper"},ju=Vo(()=>i.createElementVNode("span",{class:"section-header"},"More info",-1)),ef={class:"field-wrap"},tf={key:0,class:"buttons"},nf=["type","onClick","textContent"],rf=["innerHTML"],of={key:2,class:"errors help-block"},sf=["innerHTML"];function lf(n,l,s,m,h,u){const b=i.resolveComponent("KTooltip"),g=i.resolveComponent("KExternalLink");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["form-group",n.getFieldRowClasses(s.field)])},[u.fieldTypeHasLabel(s.field)?(i.openBlock(),i.createElementBlock("label",{key:0,class:i.normalizeClass(["form-group-label",s.field.labelClasses]),for:u.getFieldID(s.field)},[i.createElementVNode("div",Gu,[i.createElementVNode("span",{innerHTML:u.formattedLabel(s.field.label)},null,8,Zu),s.field.help?(i.openBlock(),i.createBlock(b,{key:0,"max-width":"300",placement:"top","position-fixed":!0},{content:i.withCtx(()=>[s.options.helpAsHtml?(i.openBlock(),i.createElementBlock("div",{key:0,innerHTML:s.field.help},null,8,Xu)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(s.field.help),1)],64))]),default:i.withCtx(()=>[Ju]),_:1})):i.createCommentVNode("",!0)]),s.field.link?(i.openBlock(),i.createElementBlock("div",Qu,[i.createVNode(g,{href:s.field.link},{default:i.withCtx(()=>[ju]),_:1},8,["href"])])):i.createCommentVNode("",!0)],10,Yu)):i.createCommentVNode("",!0),i.createElementVNode("div",ef,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.getFieldType(s.field)),i.mergeProps(n.$attrs,{ref:"child",disabled:n.fieldDisabled(s.field)||null,"form-options":s.options,model:s.model,schema:s.field,vfg:s.vfg,onModelUpdated:u.onModelUpdated,onValidated:u.onFieldValidated}),null,16,["disabled","form-options","model","schema","vfg","onModelUpdated","onValidated"])),u.buttonVisibility(s.field)?(i.openBlock(),i.createElementBlock("div",tf,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.field.buttons,(T,A)=>(i.openBlock(),i.createElementBlock("button",{key:A,class:i.normalizeClass(T.classes),type:u.getButtonType(T),onClick:V=>u.buttonClickHandler(T,s.field,V),textContent:i.toDisplayString(T.label)},null,10,nf))),128))])):i.createCommentVNode("",!0)]),s.field.hint?(i.openBlock(),i.createElementBlock("div",{key:1,class:"hint",innerHTML:u.fieldHint(s.field)},null,8,rf)):i.createCommentVNode("",!0),u.fieldErrors(s.field).length>0?(i.openBlock(),i.createElementBlock("div",of,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.fieldErrors(s.field),(T,A)=>(i.openBlock(),i.createElementBlock("span",{key:A,innerHTML:T},null,8,sf))),128))])):i.createCommentVNode("",!0)],2)}const af=P(Ku,[["render",lf],["__scopeId","data-v-e016d4ec"]]),df={key:0,class:"vue-form-generator"},cf=["is"],uf=["is"],ff={key:0};function hf(n,l,s,m,h,u){const b=i.resolveComponent("form-group");return s.schema!=null?(i.openBlock(),i.createElementBlock("div",df,[s.schema.fields?(i.openBlock(),i.createElementBlock("fieldset",{key:0,is:s.tag},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.fields,g=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[u.fieldVisible(g)?(i.openBlock(),i.createBlock(b,{key:0,ref_for:!0,ref:"children",vfg:h.vfg,field:g,errors:h.errors,model:s.model,options:s.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):i.createCommentVNode("",!0)],64))),256))],8,cf)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.groups,g=>(i.openBlock(),i.createElementBlock("fieldset",{is:s.tag,class:i.normalizeClass(n.getFieldRowClasses(g))},[g.legend?(i.openBlock(),i.createElementBlock("legend",ff,i.toDisplayString(g.legend),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.fields,T=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[u.fieldVisible(T)?(i.openBlock(),i.createBlock(b,{key:0,ref_for:!0,ref:"children",vfg:h.vfg,field:T,errors:h.errors,model:s.model,options:s.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):i.createCommentVNode("",!0)],64))),256))],10,uf))),256))])):i.createCommentVNode("",!0)}const Wb="",be=P({name:"FormGenerator",components:{formGroup:af},mixins:[no],props:{schema:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:i.ref([]),fieldIdPrefix:"",validateAsync:!1,validationErrorClass:"error",validationSuccessClass:"",helpAsHtml:!1}}},multiple:{type:Boolean,default:!1},isNewModel:{type:Boolean,default:!1},tag:{type:String,default:"fieldset",validator:function(n){return n.length>0}}},emits:["validated","modelUpdated"],data(){return{vfg:this,errors:[],children:i.ref([])}},computed:{fields(){const n=[];return this.schema&&this.schema.fields&&C.forEach(this.schema.fields,l=>{(!this.multiple||l.multi===!0)&&n.push(l)}),n},groups(){const n=[];return this.schema&&this.schema.groups&&C.forEach(this.schema.groups.slice(0),l=>{n.push(l)}),n}},watch:{model:{deep:!0,handler(n,l){l!==n&&n!=null&&this.$nextTick(()=>{this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors()})}}},mounted(){this.$nextTick(()=>{this.model&&(this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors())})},methods:{fieldVisible(n){return C.isFunction(n.visible)?n.visible.call(this,this.model,n,this):C.isNil(n.visible)?!0:n.visible},onFieldValidated(n,l,s){this.errors=this.errors.filter(h=>h.field.fieldName!==s.schema.fieldName),!n&&l&&l.length>0&&C.forEach(l,h=>{this.errors.push({field:s.schema,error:h})});const m=this.errors.length===0;this.$emit("validated",m,this.errors,this)},onModelUpdated(n,l){this.$emit("modelUpdated",n,l)},validate(n=null){n===null&&(n=C.get(this.options,"validateAsync",!1)),this.clearValidationErrors();const l=[],s=[];C.forEach(this.$refs.children,h=>{C.isFunction(h.validate)&&(l.push(h.$refs.child),s.push(h.$refs.child.validate(!0)))});const m=h=>{const u=[];C.forEach(h,(g,T)=>{C.isArray(g)&&g.length>0&&C.forEach(g,A=>{u.push({field:l[T].schema,error:A})})}),this.errors=u;const b=u.length===0;return this.$emit("validated",b,u,this),n?u:b};return n?Promise.all(s).then(m):m(s)},clearValidationErrors(){this.errors.splice(0),C.forEach(this.$refs.children,n=>{n.clearValidationErrors()})}}},[["render",hf]]),mf={fields:[{help:"The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.",inputType:"password",label:"Config.Client Id",model:"config-client_id",type:"input"},{help:"The client secret.",inputType:"password",label:"Config.Client Secret",model:"config-client_secret",type:"input"},{help:"The discovery endpoint (or just the issuer identifier).",inputType:"text",label:"Config.Issuer",model:"config-issuer",required:!0,type:"input"},{help:"Types of credentials/grants to enable.",inputType:"text",label:"Config.Auth Methods",model:"config-auth_methods",type:"input"}]},pf={fields:[{help:"The claim that contains the scopes.",inputType:"text",label:"Config.Scopes Claim",model:"config-scopes_claim",type:"input"},{help:"The scopes required to be in the access token.",inputType:"text",label:"Config.Scopes Required",model:"config-scopes_required",type:"input"},{help:"The claim that contains the audience.",inputType:"text",label:"Config.Audience Claim",model:"config-audience_claim",type:"input"},{help:"The audience required to be in the access token.",inputType:"text",label:"Config.Audience Required",model:"config-audience_required",type:"input"},{help:"The claim that contains the roles.",inputType:"text",label:"Config.Roles Claim",model:"config-roles_claim",type:"input"},{help:"The roles required to be in the access token.",inputType:"text",label:"Config.Roles Required",model:"config-roles_required",type:"input"},{help:"The claim that contains the groups.",inputType:"text",label:"Config.Groups Claim",model:"config-groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The groups required to be in the access token.",inputType:"text",label:"Config.Groups Required",model:"config-groups_required",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The claim that contains authenticated groups.",inputType:"text",label:"Config.Authenticated Groups Claim",model:"config-authenticated_groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"}]},gf={fields:[{help:"The input must be in JSON format.",type:"input",valueArrayType:"record",inputType:"text",default:void 0,valueType:"array",model:"config-client_jwk",label:"Config.Client Jwk",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#jwk-record"},{help:"The input must be in JSON format.",type:"input",valueArrayType:"record",inputType:"text",default:void 0,valueType:"array",model:"config-session_redis_cluster_nodes",label:"Config.Session Redis Cluster Nodes",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#host-record"}]},Yb="",Gb="",_f={name:"OIDCForm",components:{VueFormGenerator:be},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){this.init||(this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(n=>!n.model.startsWith("config")&&n.model!=="tags")},this.commonFieldsSchema={...mf},this.authFieldsSchema={...pf},this.advancedFieldsSchema.fields=this.formSchema.fields.filter(n=>n.model.startsWith("config")&&!this.commonFieldsSchema.fields.filter(l=>l.model===n.model).length&&!this.authFieldsSchema.fields.filter(l=>l.model===n.model).length||n.model==="tags"),this.advancedFieldsSchema.fields=this.advancedFieldsSchema.fields.map(n=>{const l=gf.fields.find(s=>s.model===n.model);return l||n}),this.commonFieldsSchema.fields=this.commonFieldsSchema.fields.filter(n=>n.model!=="config-auth_methods"),this.sessionManagement=this.isEditing?this.formModel["config-auth_methods"].includes("session"):!1,this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.isEditing?this.formModel["config-auth_methods"].includes("authorization_code"):!1},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("bearer"):!1},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("client_credentials"):!1},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("password"):!1},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.isEditing?this.formModel["config-auth_methods"].includes("introspection"):!1},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.isEditing?this.formModel["config-auth_methods"].includes("userinfo"):!1},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("kong_oauth2"):!1},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("refresh_token"):!1}])},getAuthMethodsValue(n,l){const s=[];for(let m=0;m<this.authMethods.length;m++)this.authMethods[m].prop&&this.authMethods[m].value!==n&&s.push(this.authMethods[m].value);return this.sessionManagement&&n&&s.push("session"),l&&(n?s.push(n):s.push("session")),s},handleUpdate(n,l){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(l,n),this.onModelUpdated()}}},Ht=n=>(i.pushScopeId("data-v-5ac1c38b"),n=n(),i.popScopeId(),n),yf={class:"general-settings"},bf={class:"link-wrapper"},wf=Ht(()=>i.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)),Cf=Ht(()=>i.createElementVNode("div",{class:"description"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),vf={class:"auth-method-container"},kf={class:"general-settings"},Ef={class:"link-wrapper"},Sf=Ht(()=>i.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)),Tf=Ht(()=>i.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),Bf={class:"general-settings"},Mf={class:"link-wrapper"},Af=Ht(()=>i.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)),If=Ht(()=>i.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1));function Nf(n,l,s,m,h,u){const b=i.resolveComponent("VueFormGenerator"),g=i.resolveComponent("KExternalLink"),T=i.resolveComponent("KLabel"),A=i.resolveComponent("KCheckbox"),V=i.resolveComponent("KInputSwitch"),j=i.resolveComponent("KTabs");return i.openBlock(),i.createElementBlock("div",null,[s.formModel.id&&s.isEditing||!s.isEditing?(i.openBlock(),i.createBlock(b,{key:0,class:"global-fields",model:s.formModel,options:s.formOptions,schema:h.globalFields,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),i.createVNode(j,{tabs:h.tabs},{common:i.withCtx(()=>[i.createElementVNode("div",yf,[i.createElementVNode("div",bf,[i.createVNode(g,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters"},{default:i.withCtx(()=>[wf]),_:1})]),Cf,u.displayForm?(i.openBlock(),i.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.commonFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),i.createVNode(T,null,{default:i.withCtx(()=>[i.createTextVNode("Auth Methods")]),_:1}),i.createElementVNode("div",vf,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.authMethods,J=>(i.openBlock(),i.createElementBlock("div",{key:J.value,class:"auth-method"},[i.createVNode(A,{modelValue:J.prop,"onUpdate:modelValue":we=>J.prop=we,onChange:we=>u.handleUpdate(we,J.value)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(J.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),i.createVNode(V,{modelValue:h.sessionManagement,"onUpdate:modelValue":l[0]||(l[0]=J=>h.sessionManagement=J),label:"Enable Session Management",onChange:u.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:i.withCtx(()=>[i.createElementVNode("div",kf,[i.createElementVNode("div",Ef,[i.createVNode(g,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization"},{default:i.withCtx(()=>[Sf]),_:1})]),Tf,u.displayForm?(i.openBlock(),i.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.authFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])]),advanced:i.withCtx(()=>[i.createElementVNode("div",Bf,[i.createElementVNode("div",Mf,[i.createVNode(g,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/"},{default:i.withCtx(()=>[Af]),_:1})]),If,u.displayForm?(i.openBlock(),i.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.advancedFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])]),_:1},8,["tabs"])])}const Ff=P(_f,[["render",Nf],["__scopeId","data-v-5ac1c38b"]]),Do={general:{packageName:"forms"},"post-function":{tags:{hint:"e.g. tag1, tag2, tag3",newElementButtonLabel:"+ Add"},enabled:{newElementButtonLabel:"+ Add"},selectionGroup:{newElementButtonLabel:"+ Add"},instance_name:{newElementButtonLabel:"+ Add"},name:{newElementButtonLabel:"+ Add"},"config-certificate":{help:"Array of stringified Lua code to be cached and run in sequence during the certificate phase.",newElementButtonLabel:"+ Add"},"config-access":{help:"Array of stringified Lua code to be cached and run in sequence during the access phase.",newElementButtonLabel:"+ Add"},"config-body_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the body_filter phase.",newElementButtonLabel:"+ Add"},"config-header_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the header_filter phase.",newElementButtonLabel:"+ Add"},"config-functions":{newElementButtonLabel:"+ Add"},"config-log":{newElementButtonLabel:"+ Add"},"config-rewrite":{newElementButtonLabel:"+ Add"},"config-ws_client_frame":{newElementButtonLabel:"+ Add"},"config-ws_close":{newElementButtonLabel:"+ Add"},"config-ws_handshake":{newElementButtonLabel:"+ Add"},"config-ws_upstream_frame":{newElementButtonLabel:"+ Add"}},"exit-transformer":{"config-functions":{newElementButtonLabel:"+ Add"}}},$f=i.defineComponent({__name:"PostFunction",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(n){const l=n,{t:s,te:m}=to.createI18n("en-us",Do),h=i.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),u=i.computed(()=>{const b=l.formSchema;return b.fields.map(g=>{const T=`post-function.${g.model}`;return g.hint=m(`${T}.hint`)&&s(`${T}.hint`)||g.hint,g.help=m(`${T}.help`)&&s(`${T}.help`)||g.help,g.newElementButtonLabel=m(`${T}.newElementButtonLabel`)&&s(`${T}.newElementButtonLabel`)||g.newElementButtonLabel,g.model!=="tags"&&(g.valueType==="array"||g.type==="array")&&(g.type="array",g.valueArrayType="array",g.itemContainerComponent="FieldArrayItem",g.fieldClasses="w-100",g.fieldItemsClasses="w-100 mt-2 mb-2",g.inputAttributes={...g.inputAttributes,type:"textarea"}),g}),b});return(b,g)=>h.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)}}),Of=i.defineComponent({__name:"ExitTransformer",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(n){const l=n,{t:s,te:m}=to.createI18n("en-us",Do),h=i.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),u=i.computed(()=>{const b=l.formSchema;return b.fields.map(g=>{const T=`exit-transformer.${g.model}`;return g.hint=m(`${T}.hint`)&&s(`${T}.hint`)||g.hint,g.help=m(`${T}.help`)&&s(`${T}.help`)||g.help,g.newElementButtonLabel=m(`${T}.newElementButtonLabel`)&&s(`${T}.newElementButtonLabel`)||g.newElementButtonLabel,g.model!=="tags"&&(g.valueType==="array"||g.type==="array")&&(g.type="array",g.valueArrayType="array",g.itemContainerComponent="FieldArrayItem",g.fieldClasses="w-100",g.fieldItemsClasses="w-100 mt-2 mb-2",g.inputAttributes={...g.inputAttributes,type:"textarea"}),g}),b});return(b,g)=>h.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)}}),Vf={fields:[{inputType:"text",label:"Config.Account Email",model:"config-account_email",required:!0,type:"input"},{inputType:"text",label:"Config.Account Key.Key Id",model:"config-account_key-key_id",required:!0,type:"input"},{type:"input",inputType:"text",valueType:"string",label:"Config.Account Key.Key Set",model:"config-account_key-key_set",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",label:"Config.Allow Any Domain",model:"config-allow_any_domain",order:0,disabled:!1}]},xo={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",model:"config-tos_accepted",label:"Config.Tos Accepted",order:0,disabled:!1}]},Lo={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_hmac_key",label:"Config.Eab Hmac Key",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_kid",label:"Config.Eab Kid",order:0,disabled:!1}]},$t=n=>(i.pushScopeId("data-v-bc6f1e04"),n=n(),i.popScopeId(),n),Df={class:"general-settings"},xf=$t(()=>i.createElementVNode("div",{class:"header-wrapper"},[i.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),Lf=$t(()=>i.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),Uf=$t(()=>i.createElementVNode("hr",null,null,-1)),Rf={class:"sub-form"},Pf={class:"general-settings"},qf=$t(()=>i.createElementVNode("div",{class:"header-wrapper"},[i.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),zf=$t(()=>i.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),Hf={class:"sub-form"},Wf={class:"general-settings"},Kf=$t(()=>i.createElementVNode("div",{class:"header-wrapper"},[i.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),Yf=$t(()=>i.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),Gf=i.defineComponent({__name:"ACMEForm",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(n){const l=n,s=i.ref("zeroSsl"),m=i.ref("shm"),h=i.computed(()=>({fields:l.formSchema.fields.filter(H=>!H.model.startsWith("config")&&H.model!=="tags")})),u=i.computed(()=>({fields:Vf.fields.filter(Y=>!xo.fields.some(ce=>ce.model===Y.model)&&!Lo.fields.some(ce=>ce.model===Y.model))})),b=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage")&&!Y.model.startsWith("config-storage_config-consul")&&!Y.model.startsWith("config-storage_config-redis")&&!Y.model.startsWith("config-storage_config-shm")&&!Y.model.startsWith("config-storage_config-vault"))})),g=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-consul"))})),T=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-redis"))})),A=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-shm"))})),V=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-vault"))})),j=i.computed(()=>({fields:l.formSchema.fields.filter(H=>H.model.startsWith("config")&&!u.value.fields.filter(Y=>Y.model===H.model).length&&!b.value.fields.filter(Y=>Y.model===H.model).length||H.model==="tags")})),J=i.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),we=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],et=[{label:"Lets Encrypt",value:"letsEncrypt"},{label:"Zero SSL",value:"zeroSsl",selected:!0},{label:"Other",value:"other"}];i.onMounted(()=>{s.value==="zeroSsl"&&(l.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90")});const st=H=>{s.value=H.value,(H.value==="zeroSsl"||H.value==="other")&&(H.value==="zeroSsl"?l.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90":l.formModel["config-api_uri"]="https://acme.example.com/",l.formModel["config-tos_accepted"]=!1),H.value==="letsEncrypt"&&(l.formModel["config-api_uri"]="https://acme-v02.api.letsencrypt.org/directory",l.formModel["config-eab_hmac_key"]="",l.formModel["config-eab_kid"]=""),l.onModelUpdated()},fe=(H,Y)=>{Y==="config-storage"&&(m.value=H),l.onModelUpdated()};return(H,Y)=>{const ce=i.resolveComponent("KSelect"),Te=i.resolveComponent("KTabs");return i.openBlock(),i.createElementBlock("div",null,[n.formModel.id&&n.isEditing||!n.isEditing?(i.openBlock(),i.createBlock(be,{key:0,class:"global-fields",model:n.formModel,options:n.formOptions,schema:h.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),i.createVNode(Te,{tabs:we},{general:i.withCtx(()=>[i.createElementVNode("div",Df,[xf,Lf,J.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),Uf,i.createVNode(ce,{appearance:"select",class:"issuer-select",items:et,label:"Issuer",onChange:st}),i.createElementVNode("div",Rf,[s.value==="letsEncrypt"?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:i.unref(xo),onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),s.value==="zeroSsl"||s.value==="other"?(i.openBlock(),i.createBlock(be,{key:1,model:n.formModel,options:n.formOptions,schema:i.unref(Lo),onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])])]),storage:i.withCtx(()=>[i.createElementVNode("div",Pf,[qf,zf,J.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:b.value,onModelUpdated:fe},null,8,["model","options","schema"])):i.createCommentVNode("",!0),i.createElementVNode("div",Hf,[m.value==="consul"?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:g.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),m.value==="redis"?(i.openBlock(),i.createBlock(be,{key:1,model:n.formModel,options:n.formOptions,schema:T.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),m.value==="shm"?(i.openBlock(),i.createBlock(be,{key:2,model:n.formModel,options:n.formOptions,schema:A.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),m.value==="vault"?(i.openBlock(),i.createBlock(be,{key:3,model:n.formModel,options:n.formOptions,schema:V.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])])]),advanced:i.withCtx(()=>[i.createElementVNode("div",Wf,[Kf,Yf,J.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:j.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])]),_:1})])}}}),Jb="",Zf=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:P(Gf,[["__scopeId","data-v-bc6f1e04"]]),ExitTransformer:Of,OIDCForm:Ff,PostFunction:$f},Symbol.toStringTag,{value:"Module"})),Jf=["array","metric","advanced","selectionGroup","object-advanced"],Xf={install:n=>{n.component("VueFormGenerator",be)}},Qf=(n,l=!1)=>({...l&&{acme:"ACMEForm"},"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer"})[n];Ee.FORMS_API_KEY=bt,Ee.VueFormGenerator=be,Ee.abstractField=Ba,Ee.customFields=Jf,Ee.default=Xf,Ee.getSharedFormName=Qf,Ee.sharedForms=Zf,Object.defineProperties(Ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
27
|
+
}`;var U=ma(function(){return G(c,I+"return "+S).apply(s,f)});if(U.source=S,Hi(U))throw U;return U}function t1(e){return Z(e).toLowerCase()}function n1(e){return Z(e).toUpperCase()}function r1(e,t,r){if(e=Z(e),e&&(r||t===s))return ks(e);if(!e||!(t=$e(t)))return e;var o=Je(e),a=Je(t),c=Es(o,a),f=Ss(o,a)+1;return At(o,c,f).join("")}function i1(e,t,r){if(e=Z(e),e&&(r||t===s))return e.slice(0,Bs(e)+1);if(!e||!(t=$e(t)))return e;var o=Je(e),a=Ss(o,Je(t))+1;return At(o,0,a).join("")}function o1(e,t,r){if(e=Z(e),e&&(r||t===s))return e.replace(Hr,"");if(!e||!(t=$e(t)))return e;var o=Je(e),a=Es(o,Je(t));return At(o,a).join("")}function s1(e,t){var r=jf,o=eh;if(ie(t)){var a="separator"in t?t.separator:a;r="length"in t?L(t.length):r,o="omission"in t?$e(t.omission):o}e=Z(e);var c=e.length;if(Zt(e)){var f=Je(e);c=f.length}if(r>=c)return e;var p=r-Jt(o);if(p<1)return o;var y=f?At(f,0,p).join(""):e.slice(0,p);if(a===s)return y+o;if(f&&(p+=y.length-p),Wi(a)){if(e.slice(p).search(a)){var k,E=y;for(a.global||(a=li(a.source,Z(Wo.exec(a))+"g")),a.lastIndex=0;k=a.exec(E);)var S=k.index;y=y.slice(0,S===s?p:S)}}else if(e.indexOf($e(a),p)!=p){var B=y.lastIndexOf(a);B>-1&&(y=y.slice(0,B))}return y+o}function l1(e){return e=Z(e),e&&yh.test(e)?e.replace(qo,Dm):e}var a1=rn(function(e,t,r){return e+(r?" ":"")+t.toUpperCase()}),Gi=pl("toUpperCase");function ha(e,t,r){return e=Z(e),t=r?s:t,t===s?Nm(e)?Um(e):vm(e):e.match(t)||[]}var ma=R(function(e,t){try{return Ne(e,s,t)}catch(r){return Hi(r)?r:new D(r)}}),d1=ft(function(e,t){return Re(t,function(r){r=ot(r),ct(e,r,qi(e[r],e))}),e});function c1(e){var t=e==null?0:e.length,r=N();return e=t?ne(e,function(o){if(typeof o[1]!="function")throw new Pe(b);return[r(o[0]),o[1]]}):[],R(function(o){for(var a=-1;++a<t;){var c=e[a];if(Ne(c[0],this,o))return Ne(c[1],this,o)}})}function u1(e){return Dp(ze(e,j))}function Zi(e){return function(){return e}}function f1(e,t){return e==null||e!==e?t:e}var h1=_l(),m1=_l(!0);function Ie(e){return e}function Ji(e){return Ys(typeof e=="function"?e:ze(e,j))}function p1(e){return Zs(ze(e,j))}function g1(e,t){return Js(e,ze(t,j))}var _1=R(function(e,t){return function(r){return Tn(r,e,t)}}),y1=R(function(e,t){return function(r){return Tn(e,r,t)}});function Xi(e,t,r){var o=ue(t),a=cr(t,o);r==null&&!(ie(t)&&(a.length||!o.length))&&(r=t,t=e,e=this,a=cr(t,ue(t)));var c=!(ie(r)&&"chain"in r)||!!r.chain,f=mt(e);return Re(a,function(p){var y=t[p];e[p]=y,f&&(e.prototype[p]=function(){var k=this.__chain__;if(c||k){var E=e(this.__wrapped__),S=E.__actions__=Be(this.__actions__);return S.push({func:y,args:arguments,thisArg:e}),E.__chain__=k,E}return y.apply(e,kt([this.value()],arguments))})}),e}function b1(){return me._===this&&(me._=Wm),this}function Qi(){}function w1(e){return e=L(e),R(function(t){return Xs(t,e)})}var C1=Ai(ne),v1=Ai(ys),k1=Ai(ei);function pa(e){return Di(e)?ti(ot(e)):jp(e)}function E1(e){return function(t){return e==null?s:Rt(e,t)}}var S1=bl(),T1=bl(!0);function ji(){return[]}function eo(){return!1}function B1(){return{}}function M1(){return""}function A1(){return!0}function I1(e,t){if(e=L(e),e<1||e>Ct)return[];var r=nt,o=_e(e,nt);t=N(t),e-=nt;for(var a=ii(o,t);++r<e;)t(r);return a}function N1(e){return x(e)?ne(e,ot):Oe(e)?[e]:Be(Vl(Z(e)))}function F1(e){var t=++zm;return Z(e)+t}var $1=gr(function(e,t){return e+t},0),O1=Ii("ceil"),V1=gr(function(e,t){return e/t},1),D1=Ii("floor");function x1(e){return e&&e.length?dr(e,Ie,pi):s}function L1(e,t){return e&&e.length?dr(e,N(t,2),pi):s}function U1(e){return Cs(e,Ie)}function R1(e,t){return Cs(e,N(t,2))}function P1(e){return e&&e.length?dr(e,Ie,bi):s}function q1(e,t){return e&&e.length?dr(e,N(t,2),bi):s}var z1=gr(function(e,t){return e*t},1),H1=Ii("round"),W1=gr(function(e,t){return e-t},0);function K1(e){return e&&e.length?ri(e,Ie):0}function Y1(e,t){return e&&e.length?ri(e,N(t,2)):0}return d.after=p0,d.ary=Kl,d.assign=ny,d.assignIn=sa,d.assignInWith=Ar,d.assignWith=ry,d.at=iy,d.before=Yl,d.bind=qi,d.bindAll=d1,d.bindKey=Gl,d.castArray=B0,d.chain=zl,d.chunk=Dg,d.compact=xg,d.concat=Lg,d.cond=c1,d.conforms=u1,d.constant=Zi,d.countBy=K_,d.create=oy,d.curry=Zl,d.curryRight=Jl,d.debounce=Xl,d.defaults=sy,d.defaultsDeep=ly,d.defer=g0,d.delay=_0,d.difference=Ug,d.differenceBy=Rg,d.differenceWith=Pg,d.drop=qg,d.dropRight=zg,d.dropRightWhile=Hg,d.dropWhile=Wg,d.fill=Kg,d.filter=G_,d.flatMap=X_,d.flatMapDeep=Q_,d.flatMapDepth=j_,d.flatten=Ul,d.flattenDeep=Yg,d.flattenDepth=Gg,d.flip=y0,d.flow=h1,d.flowRight=m1,d.fromPairs=Zg,d.functions=my,d.functionsIn=py,d.groupBy=e0,d.initial=Xg,d.intersection=Qg,d.intersectionBy=jg,d.intersectionWith=e_,d.invert=_y,d.invertBy=yy,d.invokeMap=n0,d.iteratee=Ji,d.keyBy=r0,d.keys=ue,d.keysIn=Ae,d.map=kr,d.mapKeys=wy,d.mapValues=Cy,d.matches=p1,d.matchesProperty=g1,d.memoize=Sr,d.merge=vy,d.mergeWith=la,d.method=_1,d.methodOf=y1,d.mixin=Xi,d.negate=Tr,d.nthArg=w1,d.omit=ky,d.omitBy=Ey,d.once=b0,d.orderBy=i0,d.over=C1,d.overArgs=w0,d.overEvery=v1,d.overSome=k1,d.partial=zi,d.partialRight=Ql,d.partition=o0,d.pick=Sy,d.pickBy=aa,d.property=pa,d.propertyOf=E1,d.pull=i_,d.pullAll=Pl,d.pullAllBy=o_,d.pullAllWith=s_,d.pullAt=l_,d.range=S1,d.rangeRight=T1,d.rearg=C0,d.reject=a0,d.remove=a_,d.rest=v0,d.reverse=Ri,d.sampleSize=c0,d.set=By,d.setWith=My,d.shuffle=u0,d.slice=d_,d.sortBy=m0,d.sortedUniq=g_,d.sortedUniqBy=__,d.split=Xy,d.spread=k0,d.tail=y_,d.take=b_,d.takeRight=w_,d.takeRightWhile=C_,d.takeWhile=v_,d.tap=x_,d.throttle=E0,d.thru=vr,d.toArray=ra,d.toPairs=da,d.toPairsIn=ca,d.toPath=N1,d.toPlainObject=oa,d.transform=Ay,d.unary=S0,d.union=k_,d.unionBy=E_,d.unionWith=S_,d.uniq=T_,d.uniqBy=B_,d.uniqWith=M_,d.unset=Iy,d.unzip=Pi,d.unzipWith=ql,d.update=Ny,d.updateWith=Fy,d.values=ln,d.valuesIn=$y,d.without=A_,d.words=ha,d.wrap=T0,d.xor=I_,d.xorBy=N_,d.xorWith=F_,d.zip=$_,d.zipObject=O_,d.zipObjectDeep=V_,d.zipWith=D_,d.entries=da,d.entriesIn=ca,d.extend=sa,d.extendWith=Ar,Xi(d,d),d.add=$1,d.attempt=ma,d.camelCase=xy,d.capitalize=ua,d.ceil=O1,d.clamp=Oy,d.clone=M0,d.cloneDeep=I0,d.cloneDeepWith=N0,d.cloneWith=A0,d.conformsTo=F0,d.deburr=fa,d.defaultTo=f1,d.divide=V1,d.endsWith=Ly,d.eq=Qe,d.escape=Uy,d.escapeRegExp=Ry,d.every=Y_,d.find=Z_,d.findIndex=xl,d.findKey=ay,d.findLast=J_,d.findLastIndex=Ll,d.findLastKey=dy,d.floor=D1,d.forEach=Hl,d.forEachRight=Wl,d.forIn=cy,d.forInRight=uy,d.forOwn=fy,d.forOwnRight=hy,d.get=Ki,d.gt=$0,d.gte=O0,d.has=gy,d.hasIn=Yi,d.head=Rl,d.identity=Ie,d.includes=t0,d.indexOf=Jg,d.inRange=Vy,d.invoke=by,d.isArguments=zt,d.isArray=x,d.isArrayBuffer=V0,d.isArrayLike=Me,d.isArrayLikeObject=se,d.isBoolean=D0,d.isBuffer=It,d.isDate=x0,d.isElement=L0,d.isEmpty=U0,d.isEqual=R0,d.isEqualWith=P0,d.isError=Hi,d.isFinite=q0,d.isFunction=mt,d.isInteger=jl,d.isLength=Br,d.isMap=ea,d.isMatch=z0,d.isMatchWith=H0,d.isNaN=W0,d.isNative=K0,d.isNil=G0,d.isNull=Y0,d.isNumber=ta,d.isObject=ie,d.isObjectLike=oe,d.isPlainObject=Fn,d.isRegExp=Wi,d.isSafeInteger=Z0,d.isSet=na,d.isString=Mr,d.isSymbol=Oe,d.isTypedArray=sn,d.isUndefined=J0,d.isWeakMap=X0,d.isWeakSet=Q0,d.join=t_,d.kebabCase=Py,d.last=We,d.lastIndexOf=n_,d.lowerCase=qy,d.lowerFirst=zy,d.lt=j0,d.lte=ey,d.max=x1,d.maxBy=L1,d.mean=U1,d.meanBy=R1,d.min=P1,d.minBy=q1,d.stubArray=ji,d.stubFalse=eo,d.stubObject=B1,d.stubString=M1,d.stubTrue=A1,d.multiply=z1,d.nth=r_,d.noConflict=b1,d.noop=Qi,d.now=Er,d.pad=Hy,d.padEnd=Wy,d.padStart=Ky,d.parseInt=Yy,d.random=Dy,d.reduce=s0,d.reduceRight=l0,d.repeat=Gy,d.replace=Zy,d.result=Ty,d.round=H1,d.runInContext=_,d.sample=d0,d.size=f0,d.snakeCase=Jy,d.some=h0,d.sortedIndex=c_,d.sortedIndexBy=u_,d.sortedIndexOf=f_,d.sortedLastIndex=h_,d.sortedLastIndexBy=m_,d.sortedLastIndexOf=p_,d.startCase=Qy,d.startsWith=jy,d.subtract=W1,d.sum=K1,d.sumBy=Y1,d.template=e1,d.times=I1,d.toFinite=pt,d.toInteger=L,d.toLength=ia,d.toLower=t1,d.toNumber=Ke,d.toSafeInteger=ty,d.toString=Z,d.toUpper=n1,d.trim=r1,d.trimEnd=i1,d.trimStart=o1,d.truncate=s1,d.unescape=l1,d.uniqueId=F1,d.upperCase=a1,d.upperFirst=Gi,d.each=Hl,d.eachRight=Wl,d.first=Rl,Xi(d,function(){var e={};return rt(d,function(t,r){X.call(d.prototype,r)||(e[r]=t)}),e}(),{chain:!1}),d.VERSION=m,Re(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){d[e].placeholder=d}),Re(["drop","take"],function(e,t){z.prototype[e]=function(r){r=r===s?1:de(L(r),0);var o=this.__filtered__&&!t?new z(this):this.clone();return o.__filtered__?o.__takeCount__=_e(r,o.__takeCount__):o.__views__.push({size:_e(r,nt),type:e+(o.__dir__<0?"Right":"")}),o},z.prototype[e+"Right"]=function(r){return this.reverse()[e](r).reverse()}}),Re(["filter","map","takeWhile"],function(e,t){var r=t+1,o=r==Uo||r==ih;z.prototype[e]=function(a){var c=this.clone();return c.__iteratees__.push({iteratee:N(a,3),type:r}),c.__filtered__=c.__filtered__||o,c}}),Re(["head","last"],function(e,t){var r="take"+(t?"Right":"");z.prototype[e]=function(){return this[r](1).value()[0]}}),Re(["initial","tail"],function(e,t){var r="drop"+(t?"":"Right");z.prototype[e]=function(){return this.__filtered__?new z(this):this[r](1)}}),z.prototype.compact=function(){return this.filter(Ie)},z.prototype.find=function(e){return this.filter(e).head()},z.prototype.findLast=function(e){return this.reverse().find(e)},z.prototype.invokeMap=R(function(e,t){return typeof e=="function"?new z(this):this.map(function(r){return Tn(r,e,t)})}),z.prototype.reject=function(e){return this.filter(Tr(N(e)))},z.prototype.slice=function(e,t){e=L(e);var r=this;return r.__filtered__&&(e>0||t<0)?new z(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==s&&(t=L(t),r=t<0?r.dropRight(-t):r.take(t-e)),r)},z.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},z.prototype.toArray=function(){return this.take(nt)},rt(z.prototype,function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),a=d[o?"take"+(t=="last"?"Right":""):t],c=o||/^find/.test(t);a&&(d.prototype[t]=function(){var f=this.__wrapped__,p=o?[1]:arguments,y=f instanceof z,k=p[0],E=y||x(f),S=function(q){var W=a.apply(d,kt([q],p));return o&&B?W[0]:W};E&&r&&typeof k=="function"&&k.length!=1&&(y=E=!1);var B=this.__chain__,I=!!this.__actions__.length,F=c&&!B,U=y&&!I;if(!c&&E){f=U?f:new z(this);var O=e.apply(f,p);return O.__actions__.push({func:vr,args:[S],thisArg:s}),new qe(O,B)}return F&&U?e.apply(this,p):(O=this.thru(S),F?o?O.value()[0]:O.value():O)})}),Re(["pop","push","shift","sort","splice","unshift"],function(e){var t=Gn[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);d.prototype[e]=function(){var a=arguments;if(o&&!this.__chain__){var c=this.value();return t.apply(x(c)?c:[],a)}return this[r](function(f){return t.apply(x(f)?f:[],a)})}}),rt(z.prototype,function(e,t){var r=d[t];if(r){var o=r.name+"";X.call(en,o)||(en[o]=[]),en[o].push({name:t,func:r})}}),en[pr(s,H).name]=[{name:"wrapper",func:s}],z.prototype.clone=lp,z.prototype.reverse=ap,z.prototype.value=dp,d.prototype.at=L_,d.prototype.chain=U_,d.prototype.commit=R_,d.prototype.next=P_,d.prototype.plant=z_,d.prototype.reverse=H_,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=W_,d.prototype.first=d.prototype.head,bn&&(d.prototype[bn]=q_),d},Xt=Rm();Vt?((Vt.exports=Xt)._=Xt,Jr._=Xt):me._=Xt}).call(an)}($n,$n.exports);var C=$n.exports;const no={methods:{getFieldRowClasses(n){const l=this.fieldErrors(n).length>0,s={[C.get(this.options,"validationErrorClass","error")]:l,[C.get(this.options,"validationSuccessClass","valid")]:!l,disabled:this.fieldDisabled(n),readonly:this.fieldReadonly(n),featured:this.fieldFeatured(n),required:this.fieldRequired(n)};return C.isArray(n.styleClasses)?C.forEach(n.styleClasses,m=>s[m]=!0):C.isString(n.styleClasses)&&(s[n.styleClasses]=!0),C.isNil(n.type)||(s["field-"+n.type]=!0),s},fieldErrors(n){return this.errors.filter(s=>s.field.fieldName===n.fieldName).map(s=>s.error)},fieldDisabled(n){return C.isFunction(n.disabled)?n.disabled.call(this,this.model,n,this):C.isNil(n.disabled)?!1:n.disabled},fieldReadonly(n){return C.isFunction(n.readonly)?n.readonly.call(this,this.model,n,this):C.isNil(n.readonly)?!1:n.readonly},fieldFeatured(n){return C.isFunction(n.featured)?n.featured.call(this,this.model,n,this):C.isNil(n.featured)?!1:n.featured},fieldRequired(n){return C.isFunction(n.required)?n.required.call(this,this.model,n,this):C.isNil(n.required)?!1:n.required}}},ro=(n,l="")=>typeof n.id<"u"?l+n.id:l+(n.inputName||n.label||n.model||"").toString().trim().toLowerCase().replace(/ |_/g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-]+)/g,""),io=(n="")=>n.toString().trim().replace(/ /g,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/([^a-zA-Z0-9-_/./:]+)/g,"");var oo=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,_t="\\d\\d?",yt="\\d\\d",_a="\\d{3}",ya="\\d{4}",dn="[^\\s]+",so=/\[([^]*?)\]/gm;function lo(n,l){for(var s=[],m=0,h=n.length;m<h;m++)s.push(n[m].substr(0,l));return s}var ao=function(n){return function(l,s){var m=s[n].map(function(u){return u.toLowerCase()}),h=m.indexOf(l.toLowerCase());return h>-1?h:null}};function Nt(n){for(var l=[],s=1;s<arguments.length;s++)l[s-1]=arguments[s];for(var m=0,h=l;m<h.length;m++){var u=h[m];for(var b in u)n[b]=u[b]}return n}var co=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],uo=["January","February","March","April","May","June","July","August","September","October","November","December"],ba=lo(uo,3),wa=lo(co,3),fo={dayNamesShort:wa,dayNames:co,monthNamesShort:ba,monthNames:uo,amPm:["am","pm"],DoFn:function(n){return n+["th","st","nd","rd"][n%10>3?0:(n-n%10!==10?1:0)*n%10]}},On=Nt({},fo),Ca=function(n){return On=Nt(On,n)},ho=function(n){return n.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Se=function(n,l){for(l===void 0&&(l=2),n=String(n);n.length<l;)n="0"+n;return n},va={D:function(n){return String(n.getDate())},DD:function(n){return Se(n.getDate())},Do:function(n,l){return l.DoFn(n.getDate())},d:function(n){return String(n.getDay())},dd:function(n){return Se(n.getDay())},ddd:function(n,l){return l.dayNamesShort[n.getDay()]},dddd:function(n,l){return l.dayNames[n.getDay()]},M:function(n){return String(n.getMonth()+1)},MM:function(n){return Se(n.getMonth()+1)},MMM:function(n,l){return l.monthNamesShort[n.getMonth()]},MMMM:function(n,l){return l.monthNames[n.getMonth()]},YY:function(n){return Se(String(n.getFullYear()),4).substr(2)},YYYY:function(n){return Se(n.getFullYear(),4)},h:function(n){return String(n.getHours()%12||12)},hh:function(n){return Se(n.getHours()%12||12)},H:function(n){return String(n.getHours())},HH:function(n){return Se(n.getHours())},m:function(n){return String(n.getMinutes())},mm:function(n){return Se(n.getMinutes())},s:function(n){return String(n.getSeconds())},ss:function(n){return Se(n.getSeconds())},S:function(n){return String(Math.round(n.getMilliseconds()/100))},SS:function(n){return Se(Math.round(n.getMilliseconds()/10),2)},SSS:function(n){return Se(n.getMilliseconds(),3)},a:function(n,l){return n.getHours()<12?l.amPm[0]:l.amPm[1]},A:function(n,l){return n.getHours()<12?l.amPm[0].toUpperCase():l.amPm[1].toUpperCase()},ZZ:function(n){var l=n.getTimezoneOffset();return(l>0?"-":"+")+Se(Math.floor(Math.abs(l)/60)*100+Math.abs(l)%60,4)},Z:function(n){var l=n.getTimezoneOffset();return(l>0?"-":"+")+Se(Math.floor(Math.abs(l)/60),2)+":"+Se(Math.abs(l)%60,2)}},mo=function(n){return+n-1},po=[null,_t],go=[null,dn],_o=["isPm",dn,function(n,l){var s=n.toLowerCase();return s===l.amPm[0]?0:s===l.amPm[1]?1:null}],yo=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(n){var l=(n+"").match(/([+-]|\d\d)/gi);if(l){var s=+l[1]*60+parseInt(l[2],10);return l[0]==="+"?s:-s}return 0}],ka={D:["day",_t],DD:["day",yt],Do:["day",_t+dn,function(n){return parseInt(n,10)}],M:["month",_t,mo],MM:["month",yt,mo],YY:["year",yt,function(n){var l=new Date,s=+(""+l.getFullYear()).substr(0,2);return+(""+(+n>68?s-1:s)+n)}],h:["hour",_t,void 0,"isPm"],hh:["hour",yt,void 0,"isPm"],H:["hour",_t],HH:["hour",yt],m:["minute",_t],mm:["minute",yt],s:["second",_t],ss:["second",yt],YYYY:["year",ya],S:["millisecond","\\d",function(n){return+n*100}],SS:["millisecond",yt,function(n){return+n*10}],SSS:["millisecond",_a],d:po,dd:po,ddd:go,dddd:go,MMM:["month",dn,ao("monthNamesShort")],MMMM:["month",dn,ao("monthNames")],a:_o,A:_o,ZZ:yo,Z:yo},Vn={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Ea=function(n){return Nt(Vn,n)},Sa=function(n,l,s){if(l===void 0&&(l=Vn.default),s===void 0&&(s={}),typeof n=="number"&&(n=new Date(n)),Object.prototype.toString.call(n)!=="[object Date]"||isNaN(n.getTime()))throw new Error("Invalid Date pass to format");l=Vn[l]||l;var m=[];l=l.replace(so,function(u,b){return m.push(b),"@@@"});var h=Nt(Nt({},On),s);return l=l.replace(oo,function(u){return va[u](n,h)}),l.replace(/@@@/g,function(){return m.shift()})};function Ta(n,l,s){if(s===void 0&&(s={}),typeof l!="string")throw new Error("Invalid format in fecha parse");if(l=Vn[l]||l,n.length>1e3)return null;var m=new Date,h={year:m.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},u=[],b=[],g=l.replace(so,function(Te,he){return b.push(ho(he)),"@@@"}),T={},A={};g=ho(g).replace(oo,function(Te){var he=ka[Te],tt=he[0],Ye=he[1],wt=he[3];if(T[tt])throw new Error("Invalid format. "+tt+" specified twice in format");return T[tt]=!0,wt&&(A[wt]=!0),u.push(he),"("+Ye+")"}),Object.keys(A).forEach(function(Te){if(!T[Te])throw new Error("Invalid format. "+Te+" is required in specified format")}),g=g.replace(/@@@/g,function(){return b.shift()});var V=n.match(new RegExp(g,"i"));if(!V)return null;for(var j=Nt(Nt({},On),s),J=1;J<V.length;J++){var we=u[J-1],et=we[0],st=we[2],fe=st?st(V[J],j):+V[J];if(fe==null)return null;h[et]=fe}h.isPm===1&&h.hour!=null&&+h.hour!=12?h.hour=+h.hour+12:h.isPm===0&&+h.hour==12&&(h.hour=0);var H;if(h.timezoneOffset==null){H=new Date(h.year,h.month,h.day,h.hour,h.minute,h.second,h.millisecond);for(var Y=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],J=0,ce=Y.length;J<ce;J++)if(T[Y[J][0]]&&h[Y[J][0]]!==H[Y[J][1]]())return null}else if(H=new Date(Date.UTC(h.year,h.month,h.day,h.hour,h.minute-h.timezoneOffset,h.second,h.millisecond)),h.month>11||h.month<0||h.day>31||h.day<1||h.hour>23||h.hour<0||h.minute>59||h.minute<0||h.second>59||h.second<0)return null;return H}var xe={format:Sa,parse:Ta,defaultI18n:fo,setGlobalDateI18n:Ca,setGlobalDateMasks:Ea};const ge={fieldIsRequired:"This field is required!",invalidFormat:"Invalid format!",numberTooSmall:"The number is too small! Minimum: {0}",numberTooBig:"The number is too big! Maximum: {0}",invalidNumber:"Invalid number",invalidInteger:"The value is not an integer",textTooSmall:"The length of text is too small! Current: {0}, Minimum: {1}",textTooBig:"The length of text is too big! Current: {0}, Maximum: {1}",thisNotText:"This is not a text!",thisNotArray:"This is not an array!",selectMinItems:"Select minimum {0} items!",selectMaxItems:"Select maximum {0} items!",invalidDate:"Invalid date!",dateIsEarly:"The date is too early! Current: {0}, Minimum: {1}",dateIsLate:"The date is too late! Current: {0}, Maximum: {1}",invalidEmail:"Invalid e-mail address!",invalidURL:"Invalid URL!",invalidCard:"Invalid card format!",invalidCardNumber:"Invalid card number!",invalidTextContainNumber:"Invalid text! Cannot contains numbers or special characters",invalidTextContainSpec:"Invalid text! Cannot contains special characters"};function Le(n,l,s=ge){return C.isNil(n)||n===""?l?[re(s.fieldIsRequired)]:[]:null}function re(n,...l){if(n!=null&&l.length>0)for(let s=0;s<l.length;s++)n=n.replace("{"+(s-1)+"}",l[s]);return n}const cn={resources:ge,required(n,l,s,m=ge){return Le(n,l.required,m)},number(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=[];return C.isFinite(n)?(!C.isNil(l.min)&&n<l.min&&u.push(re(m.numberTooSmall,l.min)),!C.isNil(l.max)&&n>l.max&&u.push(re(m.numberTooBig,l.max))):u.push(re(m.invalidNumber)),u},integer(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=cn.number(n,l,s,m);return C.isInteger(n)||u.push(re(m.invalidInteger)),u},double(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!C.isNumber(n)||isNaN(n))return[re(m.invalidNumber)]},string(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=[];return C.isString(n)?(!C.isNil(l.min)&&n.length<l.min&&u.push(re(m.textTooSmall,n.length,l.min)),!C.isNil(l.max)&&n.length>l.max&&u.push(re(m.textTooBig,n.length,l.max))):u.push(re(m.thisNotText)),u},array(n,l,s,m=ge){if(l.required){if(!C.isArray(n))return[re(m.thisNotArray)];if(n.length===0)return[re(m.fieldIsRequired)]}if(!C.isNil(n)){if(!C.isNil(l.min)&&n.length<l.min)return[re(m.selectMinItems,l.min)];if(!C.isNil(l.max)&&n.length>l.max)return[re(m.selectMaxItems,l.max)]}},date(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=new Date(n);if(isNaN(u.getDate()))return[re(m.invalidDate)];const b=[];if(!C.isNil(l.min)){const g=new Date(l.min);u.valueOf()<g.valueOf()&&b.push(re(m.dateIsEarly,xe.format(u),xe.format(g)))}if(!C.isNil(l.max)){const g=new Date(l.max);u.valueOf()>g.valueOf()&&b.push(re(m.dateIsLate,xe.format(u),xe.format(g)))}return b},regexp(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!C.isNil(l.pattern)&&!new RegExp(l.pattern).test(n))return[re(m.invalidFormat)]},email(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!/^(([^<>()\[\]\\.,;:\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,}))$/.test(n))return[re(m.invalidEmail)]},url(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g.test(n))return[re(m.invalidURL)]},creditCard(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;const u=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,b=n.replace(/[^0-9]+/g,"");if(!u.test(b))return[re(m.invalidCard)];let g=0,T,A,V;for(let j=b.length-1;j>=0;j--)T=b.substring(j,j+1),A=parseInt(T,10),V?(A*=2,A>=10?g+=A%10+1:g+=A):g+=A,V=!V;if(!(g%10===0&&b))return[re(m.invalidCardNumber)]},alpha(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!/^[a-zA-Z]*$/.test(n))return[re(m.invalidTextContainNumber)]},alphaNumeric(n,l,s,m=ge){const h=Le(n,l.required,m);if(h!=null)return h;if(!/^[a-zA-Z0-9]*$/.test(n))return[re(m.invalidTextContainSpec)]}};Object.keys(cn).forEach(n=>{const l=cn[n];C.isFunction(l)&&(l.locale=s=>(m,h,u)=>l(m,h,u,C.defaults(s,ge)))});function bo(n){return C.isString(n)?cn[n]!=null?cn[n]:(console.warn(`'${n}' is not a validator function!`),null):n}function Ir(n,l,s){let m=C.get(s.context,"schema.attributes",{});const h=l.value||"input";C.isString(h)&&(m=C.get(m,h)||m),C.forEach(m,(u,b)=>{n.setAttribute(b,u)})}const K={name:"abstractField",props:["vfg","model","schema","formOptions","disabled"],emits:["validated","modelUpdated"],data(){return{errors:[],debouncedValidateFunc:null,debouncedFormatFunc:null}},directives:{attributes:{beforeMount:Ir,updated:Ir,componentUpdated:Ir}},computed:{value:{cache:!1,get(){let n;return C.isFunction(C.get(this.schema,"get"))?n=this.schema.get(this.model):n=C.get(this.model,this.schema.model),this.formatValueToField(n)},set(n){const l=this.value;n=this.formatValueToModel(n),C.isFunction(n)?n(n,l):this.updateModelValue(n,l)}}},methods:{validate(n){this.clearValidationErrors();const l=C.get(this.formOptions,"validateAsync",!1);let s=[];if(this.schema.validator&&this.schema.readonly!==!0&&this.disabled!==!0){const h=[];C.isArray(this.schema.validator)?C.forEach(this.schema.validator,u=>{h.push(bo(u).bind(this))}):h.push(bo(this.schema.validator).bind(this)),C.forEach(h,u=>{if(l)s.push(u(this.value,this.schema,this.model));else{const b=u(this.value,this.schema,this.model);b&&C.isFunction(b.then)?b.then(g=>{g&&(this.errors=this.errors.concat(g));const T=this.errors.length===0;this.$emit("validated",T,this.errors,this)}):b&&(s=s.concat(b))}})}const m=h=>{let u=[];C.forEach(C.uniq(h),g=>{C.isArray(g)&&g.length>0?u=u.concat(g):C.isString(g)&&u.push(g)}),C.isFunction(this.schema.onValidated)&&this.schema.onValidated.call(this,this.model,u,this.schema);const b=u.length===0;return n||this.$emit("validated",b,u,this),this.errors=u,u};return l?Promise.all(s).then(m):m(s)},debouncedValidate(){C.isFunction(this.debouncedValidateFunc)||(this.debouncedValidateFunc=C.debounce(this.validate.bind(this),C.get(this.schema,"validateDebounceTime",C.get(this.formOptions,"validateDebounceTime",500)))),this.debouncedValidateFunc()},updateModelValue(n,l){let s=!1;C.isFunction(this.schema.set)?(this.schema.set(this.model,n),s=!0):this.schema.model&&(this.setModelValueByPath(this.schema.model,n),s=!0),s&&(this.$emit("modelUpdated",n,this.schema.model),C.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,n,l,this.schema),C.get(this.formOptions,"validateAfterChanged",!1)===!0&&(C.get(this.schema,"validateDebounceTime",C.get(this.formOptions,"validateDebounceTime",0))>0?this.debouncedValidate():this.validate()))},clearValidationErrors(){this.errors.splice(0)},setModelValueByPath(n,l){let s=n.replace(/\[(\w+)\]/g,".$1");s=s.replace(/^\./,"");let m=this.model;const h=s.split(".");let u=0;const b=h.length;for(;u<b;){const g=h[u];if(u<b-1)m[g]!==void 0||(m[g]={}),m=m[g];else{m[g]=l;return}++u}},getFieldID(n,l=!1){const s=C.get(this.formOptions,"fieldIdPrefix","");return ro(n,s)+(l?"-"+C.uniqueId():"")},getFieldClasses(){return C.get(this.schema,"fieldClasses",[])},formatValueToField(n){return n},formatValueToModel(n){return n}}},Ba=Object.freeze(Object.defineProperty({__proto__:null,default:K},Symbol.toStringTag,{value:"Module"})),Ma={mixins:[K]},Aa=["id","autocomplete","disabled","name","required"];function Ia(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("input",{id:n.getFieldID(n.schema),type:"checkbox","onUpdate:modelValue":l[0]||(l[0]=g=>n.value=g),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,name:n.schema.inputName,class:i.normalizeClass(n.schema.fieldClasses),required:n.schema.required},null,10,Aa)),[[i.vModelCheckbox,n.value],[b,"input"]])}const G1="",P=(n,l)=>{const s=n.__vccOpts||n;for(const[m,h]of l)s[m]=h;return s},Na=P(Ma,[["render",Ia]]),Fa={class:"wrapper"},$a=["disabled"],Oa=["id","checked","disabled","onChange","name"],Va=["disabled"],Da={class:"info"},xa=i.createElementVNode("div",{class:"arrow"},null,-1),La={class:"dropList"},Ua=["id","checked","disabled","onChange","name"];function Ra(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",Fa,[n.schema.listBox?(i.openBlock(),i.createElementBlock("div",{key:0,class:"listbox form-control",disabled:n.disabled||null},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.items,g=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["list-row",{"is-checked":u.isItemChecked(g)}])},[i.createElementVNode("label",null,[i.withDirectives(i.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"checkbox",checked:u.isItemChecked(g)||null,disabled:n.disabled||null,onChange:T=>u.onChanged(T,g),name:u.getInputName(g)},null,40,Oa),[[b,"input"]]),i.createTextVNode(i.toDisplayString(u.getItemName(g)),1)])],2))),256))],8,$a)):i.createCommentVNode("",!0),n.schema.listBox?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:1,class:"combobox form-control",disabled:n.disabled||null},[i.createElementVNode("div",{class:i.normalizeClass(["mainRow",{expanded:h.comboExpanded}]),onClick:l[0]||(l[0]=(...g)=>u.onExpandCombo&&u.onExpandCombo(...g))},[i.createElementVNode("div",Da,i.toDisplayString(u.selectedCount)+" selected",1),xa],2),i.createElementVNode("div",La,[h.comboExpanded?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(u.items,g=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["list-row",{"is-checked":u.isItemChecked(g)}])},[i.createElementVNode("label",null,[i.withDirectives(i.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"checkbox",checked:u.isItemChecked(g)||null,disabled:n.disabled||null,onChange:T=>u.onChanged(T,g),name:u.getInputName(g)},null,40,Ua),[[b,"input"]]),i.createTextVNode(i.toDisplayString(u.getItemName(g)),1)])],2))),256)):i.createCommentVNode("",!0)])],8,Va))])),[[b,"wrapper"]])}const Z1="",Pa=P({mixins:[K],data(){return{comboExpanded:!1}},computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n},selectedCount(){return this.value?this.value.length:0}},methods:{getInputName(n){return this.schema&&this.schema.inputName&&this.schema.inputName.length>0?io(this.schema.inputName+"_"+this.getItemValue(n)):io(this.getItemValue(n))},getItemValue(n){if(C.isObject(n)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.value<"u")return n[this.schema.checklistOptions.value];if(typeof n.value<"u")return n.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return n},getItemName(n){if(C.isObject(n)){if(typeof this.schema.checklistOptions<"u"&&typeof this.schema.checklistOptions.name<"u")return n[this.schema.checklistOptions.name];if(typeof n.name<"u")return n.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `checklistOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/checklist.html#checklist-field-with-object-values")}else return n},isItemChecked(n){return this.value&&this.value.indexOf(this.getItemValue(n))!==-1},onChanged(n,l){if((C.isNil(this.value)||!Array.isArray(this.value))&&(this.value=[]),n.target.checked){const s=C.clone(this.value);s.push(this.getItemValue(l)),this.value=s}else{const s=C.clone(this.value);s.splice(this.value.indexOf(this.getItemValue(l)),1),this.value=s}},onExpandCombo(){this.comboExpanded=!this.comboExpanded}}},[["render",Ra]]),qa={class:"wrapper"},za=["id","type","value","disabled","accept","alt","autocomplete","checked","dirname","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","width","files"],Ha={key:0,class:"helper"};function Wa(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",qa,[i.withDirectives(i.createElementVNode("input",{class:i.normalizeClass(["form-control",n.schema.fieldClasses]),id:n.getFieldID(n.schema),type:u.inputType,value:n.value,onInput:l[0]||(l[0]=(...g)=>u.onInput&&u.onInput(...g)),onBlur:l[1]||(l[1]=(...g)=>u.onBlur&&u.onBlur(...g)),onChange:l[2]||(l[2]=(...g)=>n.schema.onChange&&n.schema.onChange(...g)),disabled:n.disabled||null,accept:n.schema.accept,alt:n.schema.alt,autocomplete:n.schema.autocomplete,checked:n.schema.checked||null,dirname:n.schema.dirname,formaction:n.schema.formaction,formenctype:n.schema.formenctype,formmethod:n.schema.formmethod,formnovalidate:n.schema.formnovalidate,formtarget:n.schema.formtarget,height:n.schema.height,list:n.schema.list,max:n.schema.max,maxlength:n.schema.maxlength,min:n.schema.min,minlength:n.schema.minlength,multiple:n.schema.multiple,name:n.schema.inputName,pattern:n.schema.pattern,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,size:n.schema&&n.schema.size>0?n.schema.size:1,src:n.schema.src,step:n.schema.step,width:n.schema.width,files:n.schema.files},null,42,za),[[b,"input"]]),n.schema.inputType.toLowerCase()==="color"||n.schema.inputType.toLowerCase()==="range"?(i.openBlock(),i.createElementBlock("span",Ha,i.toDisplayString(n.value),1)):i.createCommentVNode("",!0)])),[[b,"wrapper"]])}const X1="",wo={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss","datetime-local":"YYYY-MM-DDTHH:mm:ss"},Ka=P({mixins:[K],computed:{inputType(){return this.schema&&this.schema.inputType==="datetime"?"datetime-local":this.schema.inputType}},mounted(){switch(this.schema.inputType.toLowerCase()){case"number":case"range":this.debouncedFormatFunc=C.debounce((n,l)=>{this.formatNumberToModel(n,l)},parseInt(C.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break;case"date":case"datetime":case"datetime-local":this.debouncedFormatFunc=C.debounce((n,l)=>{this.formatDatetimeToModel(n,l)},parseInt(C.get(this.schema,"debounceFormatTimeout",1e3)),{trailing:!0,leading:!1});break}},created(){this.schema.inputType.toLowerCase()==="file"&&console.warn("The 'file' type in input field is deprecated. Use 'file' field instead.")},methods:{formatValueToModel(n){if(n!=null)switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":case"number":case"range":return(l,s)=>{this.debouncedFormatFunc(n,s)}}return n},formatValueToField(n){switch(this.schema.inputType.toLowerCase()){case"date":case"datetime":case"datetime-local":return this.formatDatetimeValueToField(n)}return n},formatDatetimeToModel(n,l){const s=wo[this.schema.inputType.toLowerCase()],m=xe.parse(n,s);m!==!1&&(this.schema.format?n=xe.format(m,this.schema.format):n=m.valueOf()),this.updateModelValue(n,l)},formatDatetimeValueToField(n){if(n==null)return null;const l=wo[this.schema.inputType.toLowerCase()];let s=n;return C.isNumber(n)||(s=xe.parse(n,l)),s!==!1?xe.format(s,l):n},formatNumberToModel(n,l){C.isNumber(n)||(n=NaN),this.updateModelValue(n,l)},onInput(n){let l=n.target.value;switch(this.schema.inputType.toLowerCase()){case"number":case"range":C.isNumber(parseFloat(n.target.value))&&(l=parseFloat(n.target.value));break}this.value=l},onBlur(){C.isFunction(this.debouncedFormatFunc)&&this.debouncedFormatFunc.flush()}}},[["render",Wa]]),Ya=["id"];function Ga(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("span",{id:n.getFieldID(n.schema),class:i.normalizeClass(n.schema.fieldClasses)},[i.createTextVNode(i.toDisplayString(n.value),1)],10,Ya)),[[b,"label"]])}const j1="",Za=P({mixins:[K]},[["render",Ga]]),Ja=["disabled"],Xa=["id","disabled","name","onClick","value","checked","required"];function Qa(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:"radio-list",disabled:n.disabled||null},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.items,g=>i.withDirectives((i.openBlock(),i.createElementBlock("label",{class:i.normalizeClass(u.getItemCssClasses(g))},[i.withDirectives(i.createElementVNode("input",{id:n.getFieldID(n.schema,!0),type:"radio",disabled:u.isItemDisabled(g)||null,name:u.id,onClick:T=>u.onSelection(g),value:u.getItemValue(g),checked:u.isItemChecked(g)||null,class:i.normalizeClass(n.schema.fieldClasses),required:n.schema.required},null,10,Xa),[[b,"input"]]),i.createTextVNode(i.toDisplayString(u.getItemName(g)),1)],2)),[[b,"label"]])),256))],8,Ja)),[[b,"wrapper"]])}const tb="",ja=P({mixins:[K],computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n},id(){return this.schema.model}},methods:{getItemValue(n){if(C.isObject(n)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.value<"u")return n[this.schema.radiosOptions.value];if(typeof n.value<"u")return n.value;throw new Error("`value` is not defined. If you want to use another key name, add a `value` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return n},getItemName(n){if(C.isObject(n)){if(typeof this.schema.radiosOptions<"u"&&typeof this.schema.radiosOptions.name<"u")return n[this.schema.radiosOptions.name];if(typeof n.name<"u")return n.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `radiosOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/radios.html#radios-field-with-object-values")}else return n},getItemCssClasses(n){return{"is-checked":this.isItemChecked(n),"is-disabled":this.isItemDisabled(n)}},onSelection(n){this.value=this.getItemValue(n)},isItemChecked(n){return this.getItemValue(n)===this.value},isItemDisabled(n){if(this.disabled)return!0;const l=C.get(n,"disabled",!1);return C.isFunction(l)?l(this.model):l}}},[["render",Qa]]),ed=["disabled","name","id"],td=["disabled"],nd=["label"],rd=["value"],id=["value"];function od(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("select",{class:i.normalizeClass(["form-control",n.schema.fieldClasses]),"onUpdate:modelValue":l[0]||(l[0]=g=>n.value=g),disabled:n.disabled||null,name:n.schema.inputName,id:n.getFieldID(n.schema)},[u.selectOptions.hideNoneSelectedText?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("option",{key:0,disabled:n.schema.required||null,value:null},i.toDisplayString(u.selectOptions.noneSelectedText||"<Nothing selected>"),9,td)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.items,g=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[g.group?(i.openBlock(),i.createElementBlock("optgroup",{key:0,label:u.getGroupName(g)},[g.ops?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(g.ops,T=>(i.openBlock(),i.createElementBlock("option",{value:u.getItemValue(T)},i.toDisplayString(u.getItemName(T)),9,rd))),256)):i.createCommentVNode("",!0)],8,nd)):i.createCommentVNode("",!0),g.group?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("option",{key:1,value:u.getItemValue(g)},i.toDisplayString(u.getItemName(g)),9,id))],64))),256))],10,ed)),[[i.vModelSelect,n.value],[b,"input"]])}const Co=P({mixins:[K],computed:{selectOptions(){return this.schema.selectOptions||{}},items(){const n=this.schema.values;return typeof n=="function"?this.groupValues(n.apply(this,[this.model,this.schema])):this.groupValues(n)}},methods:{formatValueToField(n){return C.isNil(n)?null:n},groupValues(n){const l=[];let s={};return n.forEach(m=>{s=null,m.group&&C.isObject(m)?(s=C.find(l,h=>h.group===m.group),s?s.ops.push({id:m.id,name:m.name}):(s={group:"",ops:[]},s.group=m.group,s.ops.push({id:m.id,name:m.name}),l.push(s))):l.push(m)}),l},getGroupName(n){if(n&&n.group)return n.group;throw new Error("Group name is missing! https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")},getItemValue(n){if(C.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return n[this.schema.selectOptions.value];if(typeof n.id<"u")return n.id;throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return n},getItemName(n){if(C.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return n[this.schema.selectOptions.name];if(typeof n.name<"u")return n.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return n}}},[["render",od]]),sd=["id","value","name","disabled"];function ld(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("input",{id:n.getFieldID(n.schema),type:"submit",value:n.schema.buttonText,onClick:l[0]||(l[0]=(...b)=>u.onClick&&u.onClick(...b)),name:n.schema.inputName,disabled:n.disabled||null,class:i.normalizeClass(n.schema.fieldClasses)},null,10,sd)}const ib="",ad=P({mixins:[K],methods:{onClick(n){if(this.schema.validateBeforeSubmit===!0){n.preventDefault();const l=C.get(this.formOptions,"validateAsync",!1),s=this.vfg.validate(),m=h=>{l&&!C.isEmpty(h)||!l&&!h?C.isFunction(this.schema.onValidationError)&&this.schema.onValidationError(this.model,this.schema,h,n):C.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,n)};s&&C.isFunction(s.then)?s.then(m):m(s)}else C.isFunction(this.schema.onSubmit)&&this.schema.onSubmit(this.model,this.schema,n)}}},[["render",ld]]),dd=["id","disabled","maxlength","minlength","placeholder","readonly","required","rows","name"];function cd(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("textarea",{class:i.normalizeClass(["form-control",n.schema.fieldClasses]),"onUpdate:modelValue":l[0]||(l[0]=g=>n.value=g),id:n.getFieldID(n.schema),disabled:n.disabled||null,maxlength:n.schema.max,minlength:n.schema.min,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,rows:n.schema.rows||2,name:n.schema.inputName},null,10,dd)),[[i.vModelText,n.value],[b,"input"]])}const vo=P({mixins:[K]},[["render",cd]]),ud={class:"wrapper"},fd=["id","name","accept","multiple","placeholder","readonly","required","disabled"];function hd(n,l,s,m,h,u){const b=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",ud,[i.withDirectives(i.createElementVNode("input",{class:"form-control",id:n.getFieldID(n.schema),type:"file",name:n.schema.inputName,onChange:l[0]||(l[0]=(...g)=>u.onChange&&u.onChange(...g)),accept:n.schema.accept,multiple:n.schema.multiple,placeholder:n.schema.placeholder,readonly:n.schema.readonly,required:n.schema.required,disabled:n.disabled||null},null,40,fd),[[b,"input"]])])),[[b,"wrapper"]])}const lb="",md=P({mixins:[K],methods:{onChange(n){C.isFunction(this.schema.onChanged)&&this.schema.onChanged.call(this,this.model,this.schema,n,this)}}},[["render",hd]]),pd=["value","autocomplete","disabled","placeholder","readonly","name","id"];function gd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("input",{class:"form-control",type:"text",value:n.value,autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,pd)}const _d=P({mixins:[K],data(){return{cleave:null}},mounted(){this.$nextTick(function(){window.Cleave?(this.cleave=new window.Cleave(this.$el,C.defaults(this.schema.cleaveOptions||{},{creditCard:!1,phone:!1,phoneRegionCode:"AU",date:!1,datePattern:["d","m","Y"],numeral:!1,numeralThousandsGroupStyle:"thousand",numeralDecimalScale:2,numeralDecimalMark:".",blocks:[],delimiter:" ",prefix:null,numericOnly:!1,uppercase:!1,lowercase:!1,maxLength:0})),this.cleave.properties&&this.cleave.properties.hasOwnProperty.call("result")?this.$watch("cleave.properties.result",()=>{this.value=this.cleave.properties.result}):this.$el.addEventListener("input",this.inputChange)):console.warn("Cleave is missing. Please download from https://github.com/nosir/cleave.js/ and load the script in the HTML head section!")})},beforeUnmount(){this.cleave&&(this.cleave.destroy(),this.$el.removeEventListener("input",this.inputChange))},methods:{inputChange(){this.value=this.$el.value}}},[["render",gd]]),ko={formatValueToField(n){if(n!=null){const l=this.schema.format?xe.parse(n,this.schema.format):new Date(n);return xe.format(l,this.getDateFormat())}return n},formatValueToModel(n){if(n!=null){const l=xe.parse(n,this.getDateFormat());this.schema.format?n=xe.format(l,this.schema.format):n=l.valueOf()}return n}},yd={class:"input-group date"},bd=["autocomplete","disabled","placeholder","readonly","name","id"],wd=i.createElementVNode("span",{class:"input-group-addon"},[i.createElementVNode("span",{class:"glyphicon glyphicon-calendar"})],-1);function Cd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("div",yd,[i.withDirectives(i.createElementVNode("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,bd),[[i.vModelText,n.value]]),wd])}const Eo="YYYY-MM-DD HH:mm:ss",vd={mixins:[K],mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.datetimepicker){const n=this.$el.querySelector(".form-control");$(this.$el).datetimepicker(C.defaults(this.schema.dateTimePickerOptions||{},{format:Eo})).on("dp.change",()=>{this.value=n.value})}else console.warn("Bootstrap datetimepicker library is missing. Please download from https://eonasdan.github.io/bootstrap-datetimepicker/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.datetimepicker&&$(this.$el).data("DateTimePicker").destroy()},methods:{getDateFormat(){return this.schema.dateTimePickerOptions&&this.schema.dateTimePickerOptions.format?this.schema.dateTimePickerOptions.format:Eo},...ko}},kd=P(vd,[["render",Cd]]),Ed=["autocomplete","disabled","placeholder","readonly","name","id"];function Sd(n,l,s,m,h,u){return i.withDirectives((i.openBlock(),i.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,debounce:"500",onFocus:l[1]||(l[1]=b=>u.geolocate()),id:n.getFieldID(n.schema)},null,40,Ed)),[[i.vModelText,n.value]])}const Td=P({mixins:[K],data(){return{autocomplete:"",inputs:{street_number:"long_name",route:"long_name",country:"long_name",administrative_area_level_1:"long_name",administrative_area_level_2:"long_name",locality:"long_name",postal_code:"short_name"}}},mounted(){this.$nextTick(()=>{window.google&&window.google.maps&&window.google.maps.places&&window.google.maps.places.Autocomplete?(this.autocomplete=new google.maps.places.Autocomplete(this.$el,{types:["geocode"]}),this.autocomplete.addListener("place_changed",this.pipeAddress)):console.warn("Google Maps API is missing. Please add https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&libraries=places script in the HTML head section!")})},methods:{pipeAddress(){const n=this.autocomplete.getPlace();if(n){this.value=n.formatted_address;const l={};if(n.address_components!==void 0)for(let s=0;s<n.address_components.length;s++){const m=n.address_components[s].types[0];this.inputs[m]&&(l[m]=n.address_components[s][this.inputs[m]])}C.isFunction(this.schema.onPlaceChanged)&&this.schema.onPlaceChanged(this.value,l,n,this.model,this.schema)}},geolocate(){navigator.geolocation&&navigator.geolocation.getCurrentPosition(n=>{const l={lat:n.coords.latitude,lng:n.coords.longitude},s=new window.google.maps.Circle({center:l,radius:n.coords.accuracy});this.autocomplete.setBounds(s.getBounds())})}}},[["render",Sd]]),Bd={class:"wrapper"},Md=["autocomplete","disabled","placeholder","readonly"],Ad=["disabled","name"];function Id(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("div",Bd,[i.withDirectives(i.createElementVNode("input",{class:"form-control link",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>u.wrappedValue=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly},null,8,Md),[[i.vShow,n.schema.hideInput!==!0],[i.vModelText,u.wrappedValue]]),n.schema.browse!==!1?(i.openBlock(),i.createElementBlock("input",{key:0,class:"form-control file",type:"file",disabled:n.disabled||null,onChange:l[1]||(l[1]=(...b)=>u.fileChanged&&u.fileChanged(...b)),name:n.schema.inputName},null,40,Ad)):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"preview",style:i.normalizeStyle(u.previewStyle)},[i.createElementVNode("div",{class:"remove",title:"Remove image",onClick:l[2]||(l[2]=(...b)=>u.remove&&u.remove(...b))})],4)])}const ub="",Nd=P({mixins:[K],computed:{previewStyle(){return this.schema.preview!==!1?{display:"block","background-image":this.value!=null?"url("+this.value+")":"none"}:{display:"none"}},wrappedValue:{get(){return this.value&&this.value.indexOf("data")===0?"<inline base64 image>":this.value},set(n){n&&n.indexOf("http")===0&&(this.value=n)}}},watch:{model:{deep:!0,handler(){const n=this.$el.querySelector("input.file");n&&(n.value="")}}},methods:{remove(){this.value=""},fileChanged(n){const l=new FileReader;l.onload=s=>{this.value=s.target.result},n.target.files&&n.target.files.length>0&&l.readAsDataURL(n.target.files[0])}}},[["render",Id]]),Fd=["autocomplete","disabled","placeholder","readonly","name","id"];function $d(n,l,s,m,h,u){return i.withDirectives((i.openBlock(),i.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,Fd)),[[i.vModelText,n.value]])}const Od=P({mixins:[K],mounted(){this.$nextTick(function(){window.$&&window.$.fn.mask?$(this.$el).unmask().mask(this.schema.mask,this.schema.maskOptions):console.warn("JQuery MaskedInput library is missing. Please download from https://github.com/digitalBush/jquery.maskedinput and load the script in the HTML head section!")})},beforeUnmount(){window.$&&window.$.fn.mask&&$(this.$el).unmask()}},[["render",$d]]),mb="",Vd={mixins:[K],data(){return{slider:null}},computed:{containPips(){return this.schema.noUiSliderOptions&&typeof this.schema.noUiSliderOptions.pips<"u"},containTooltip(){return this.schema.noUiSliderOptions&&this.schema.noUiSliderOptions.tooltips}},watch:{model:{handler(){window.noUiSlider&&this.slider&&this.slider.noUiSlider&&this.slider.noUiSlider.set(this.value)},deep:!0}},mounted(){this.$nextTick(()=>{window.noUiSlider?(this.slider=this.$el,window.noUiSlider.create(this.slider,C.defaults(this.schema.noUiSliderOptions||{},{start:this.getStartValue(),range:{min:this.schema.min,max:this.schema.max}})),this.slider.noUiSlider.on("change",this.onChange.bind(this))):console.warn("noUiSlider is missing. Please download from https://github.com/leongersen/noUiSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.noUiSlider.off("change")},methods:{onChange(n){C.isArray(n)?this.value=[parseFloat(n[0]),parseFloat(n[1])]:this.value=parseFloat(n)},formatValueToField(n){this.slider!==null&&typeof this.slider.noUiSlider<"u"&&this.slider.noUiSlider.set(n)},formatValueToModel(n){if(typeof this.slider.noUiSlider<"u")return n instanceof Array?[Number(n[0]),Number(n[1])]:Number(n)},getStartValue(){return this.value!=null?this.value:typeof this.schema.noUiSliderOptions<"u"&&this.schema.noUiSliderOptions.double?[this.schema.min,this.schema.min]:this.schema.min}}},Dd=["disabled"];function xd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["slider",{"contain-pips":u.containPips,"contain-tooltip":u.containTooltip}]),disabled:n.disabled||null},null,10,Dd)}const Ld=P(Vd,[["render",xd]]),Ud=["autocomplete","disabled","placeholder","readonly","name"];function Rd(n,l,s,m,h,u){return i.withDirectives((i.openBlock(),i.createElementBlock("input",{class:"form-control",type:"text","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName},null,8,Ud)),[[i.vModelText,n.value]])}const Pd="YYYY-MM-DD",qd={mixins:[K],data(){return{picker:null,options:null}},mounted(){this.initialize(C.get(this.schema,"pikadayOptions",{}))},beforeUnmount(){this.picker&&this.picker.destroy()},methods:{getDateFormat(){return C.get(this.schema,"pikadayOptions.format",Pd)},...ko,initialize(n){this.picker&&this.picker.destroy&&this.picker.destroy(),this.$nextTick(()=>{window.Pikaday?(this.options=C.defaults({},n,{field:this.$el,onSelect:()=>{this.value=this.picker.toString()}}),this.picker=new window.Pikaday(this.options)):console.warn("Pikaday is missing. Please download from https://github.com/dbushell/Pikaday/ and load the script and CSS in the HTML head section!")})}}},zd=P(qd,[["render",Rd]]),Hd=["autocomplete","data-disable","data-max","data-min","data-step","placeholder","readonly","name"];function Wd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("input",{type:"text",autocomplete:n.schema.autocomplete,"data-disable":n.disabled,"data-max":n.schema.max,"data-min":n.schema.min,"data-step":n.schema.step,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName},null,8,Hd)}const pb="",Kd=P({mixins:[K],data(){return{slider:null}},watch:{model:{deep:!0,handler(){if(window.$&&window.$.fn.ionRangeSlider){let n,l;C.isArray(this.value)?[n,l]=this.value:n=this.value,this.slider&&this.slider.update({from:n,to:l})}}}},mounted(){this.$nextTick(function(){if(window.$&&window.$.fn.ionRangeSlider){let n,l;C.isArray(this.value)?[n,l]=this.value:n=this.value;const s=this;$(this.$el).ionRangeSlider(C.defaults(this.schema.rangeSliderOptions||{},{type:"single",grid:!0,hide_min_max:!0,from:n,to:l,onChange(m){s.slider.options.type==="double"?s.value=[m.from,m.to]:s.value=m.from}})),this.slider=$(this.$el).data("ionRangeSlider")}else console.warn("ion.rangeSlider library is missing. Please download from https://github.com/IonDen/ion.rangeSlider and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.slider&&this.slider.destroy()}},[["render",Wd]]),Yd=["disabled","multiple","title","name"],Gd=["disabled","selected"],Zd=["value"];function Jd(n,l,s,m,h,u){return i.withDirectives((i.openBlock(),i.createElementBlock("select",{class:"selectpicker","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),disabled:n.disabled||null,multiple:n.schema.multiSelect,title:n.schema.placeholder,"data-width":"100%",name:n.schema.inputName},[n.schema.multiSelect!==!0?(i.openBlock(),i.createElementBlock("option",{key:0,disabled:n.schema.required||null,value:null,selected:n.value==null},null,8,Gd)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.items,b=>(i.openBlock(),i.createElementBlock("option",{value:u.getItemValue(b)},i.toDisplayString(u.getItemName(b)),9,Zd))),256))],8,Yd)),[[i.vModelSelect,n.value]])}const _b="",Xd=P({mixins:[K],computed:{items(){const n=this.schema.values;return typeof n=="function"?n.apply(this,[this.model,this.schema]):n}},watch:{model:{deep:!0,handler(){$.fn.selectpicker&&$(this.$el).selectpicker("refresh")}}},mounted(){this.$nextTick(function(){$.fn.selectpicker?$(this.$el).selectpicker("destroy").selectpicker(this.schema.selectOptions):console.warn("Bootstrap-select library is missing. Please download from https://silviomoreto.github.io/bootstrap-select/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){$.fn.selectpicker&&$(this.$el).selectpicker("destroy")},methods:{getItemValue(n){if(C.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.value<"u")return n[this.schema.selectOptions.value];if(typeof n.id<"u")return n.id;throw new Error("`id` is not defined. If you want to use another key name, add a `value` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return n},getItemName(n){if(C.isObject(n)){if(typeof this.schema.selectOptions<"u"&&typeof this.schema.selectOptions.name<"u")return n[this.schema.selectOptions.name];if(typeof n.name<"u")return n.name;throw new Error("`name` is not defined. If you want to use another key name, add a `name` property under `selectOptions` in the schema. https://icebob.gitbooks.io/vueformgenerator/content/fields/select.html#select-field-with-object-items")}else return n}}},[["render",Jd]]),Qd=["autocomplete","disabled","placeholder","readonly","name","id"];function jd(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("input",{type:"text",autocomplete:n.schema.autocomplete,disabled:n.disabled||null,placeholder:n.schema.placeholder,readonly:n.schema.readonly,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,Qd)}const ec=P({mixins:[K],data(){return{picker:null}},watch:{model:{deep:!0,handler(){window.$&&window.$.fn.spectrum&&this.picker.spectrum("set",this.value)}},disabled(n){n?this.picker.spectrum("disable"):this.picker.spectrum("enable")}},mounted(){this.$nextTick(function(){window.$&&window.$.fn.spectrum?(this.picker=$(this.$el).spectrum("destroy").spectrum(C.defaults(this.schema.colorOptions||{},{showInput:!0,showAlpha:!0,disabled:this.schema.disabled,allowEmpty:!this.schema.required,preferredFormat:"hex",change:n=>{this.value=n?n.toString():null}})),this.picker.spectrum("set",this.value)):console.warn("Spectrum color library is missing. Please download from http://bgrins.github.io/spectrum/ and load the script and CSS in the HTML head section!")})},beforeUnmount(){this.picker&&this.picker.spectrum("destroy")}},[["render",jd]]),tc=["src"];function nc(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("img",{src:u.mapLink},null,8,tc)}const wb="",rc=P({mixins:[K],computed:{mapLink(){let n,l,s;if(this.value){const m=C.defaults(this.schema.staticMapOptions||{},{lat:"lat",lng:"lng",zoom:8,sizeX:640,sizeY:640});n=this.value[m.lat],l=this.value[m.lng],s=`http://maps.googleapis.com/maps/api/staticmap?center=${n},${l}&zoom=${m.zoom}&size=${m.sizeX}x${m.sizeY}`;const h=["scale","format","maptype","language","region","markers","path","visible","style","key","signature"];for(const u of h)typeof m[u]<"u"&&(s+=`&${u}=${m[u]}`)}return s}}},[["render",nc]]),ic=["autocomplete","disabled","name","id"],oc=["data-on","data-off","for"],sc=i.createElementVNode("span",{class:"handle"},null,-1);function lc(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("label",null,[i.withDirectives(i.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":l[0]||(l[0]=b=>n.value=b),autocomplete:n.schema.autocomplete,disabled:n.disabled||null,name:n.schema.inputName,id:n.getFieldID(n.schema)},null,8,ic),[[i.vModelCheckbox,n.value]]),i.createElementVNode("span",{class:"label","data-on":n.schema.textOn||"On","data-off":n.schema.textOff||"Off",for:n.getFieldID(n.schema)},null,8,oc),sc])}const vb="",ac=P({mixins:[K],methods:{formatValueToField(n){return n!=null&&this.schema.valueOn?n===this.schema.valueOn:n},formatValueToModel(n){return n!=null&&this.schema.valueOn?n?this.schema.valueOn:this.schema.valueOff:n}}},[["render",lc]]),dc={mixins:[K],data(){return{attributes:this.schema?this.schema.attributes:void 0,newKeyType:"string",newKeyName:"",keyTypes:{}}},created(){this.value||(this.value={})},mounted(){if(!this.value)return;const n=Object.keys(this.value),l={};for(let s=0;s<n.length;s++){const m=n[s];l[m]=typeof this.value[m]}this.keyTypes=l},methods:{removeElement(n){const l=this.value;delete l[n],this.value=JSON.parse(JSON.stringify(l));const s=this.keyTypes;delete s[n],this.keyTypes=JSON.parse(JSON.stringify(s))},addKey(){this.value[this.newKeyName]=void 0,this.value={...this.value},this.keyTypes[this.newKeyName]=this.newKeyType,this.keyTypes={...this.keyTypes},this.newKeyName=""}}},cc={key:0},uc={key:1},fc=["id"],hc={key:0},mc=["onUpdate:modelValue"],pc={key:1},gc=["onUpdate:modelValue"],_c={key:2},yc=["onUpdate:modelValue"],bc=["onClick"],wc=[i.createElementVNode("option",{value:"string"}," String ",-1),i.createElementVNode("option",{value:"number"}," Number ",-1),i.createElementVNode("option",{value:"boolean"}," Boolean ",-1)];function Cc(n,l,s,m,h,u){const b=i.resolveComponent("vue-form-generator"),g=i.resolveDirective("attributes");return i.withDirectives((i.openBlock(),i.createElementBlock("div",null,[n.schema.schema?(i.openBlock(),i.createElementBlock("div",cc,[i.createVNode(b,{model:n.value,options:n.formOptions,schema:n.schema.schema},null,8,["model","options","schema"])])):(i.openBlock(),i.createElementBlock("div",uc,[i.createElementVNode("table",{id:n.getFieldID(n.schema),class:i.normalizeClass(n.schema.fieldClasses)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(T,A)=>(i.openBlock(),i.createElementBlock("tr",{key:A},[i.createElementVNode("td",null,i.toDisplayString(A),1),h.keyTypes[A]==="string"?(i.openBlock(),i.createElementBlock("td",hc,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"text"},null,8,mc),[[i.vModelText,n.value[A]]])])):i.createCommentVNode("",!0),h.keyTypes[A]==="boolean"?(i.openBlock(),i.createElementBlock("td",pc,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"checkbox"},null,8,gc),[[i.vModelCheckbox,n.value[A]]])])):i.createCommentVNode("",!0),h.keyTypes[A]==="number"?(i.openBlock(),i.createElementBlock("td",_c,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":V=>n.value[A]=V,type:"number"},null,8,yc),[[i.vModelText,n.value[A]]])])):i.createCommentVNode("",!0),i.createElementVNode("td",null,[i.createElementVNode("input",{type:"button",value:"x",onClick:V=>u.removeElement(A)},null,8,bc)])]))),128))],10,fc),i.withDirectives(i.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=T=>h.newKeyType=T)},wc,512),[[i.vModelSelect,h.newKeyType]]),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":l[1]||(l[1]=T=>h.newKeyName=T),type:"text"},null,512),[[i.vModelText,h.newKeyName]]),i.createElementVNode("input",{type:"button",value:"Add key",onClick:l[2]||(l[2]=(...T)=>u.addKey&&u.addKey(...T))})]))])),[[g,h.attributes]])}const So=P(dc,[["render",Cc]]),Bb="",vc={mixins:[K],emits:["model-updated"],data(){return{newKeyName:""}},computed:{subSchema(){return this.schema.schema&&this.schema.schema.fields[0].schema},subFields(){return!this.subSchema&&this.schema.fields},hasObjectKeys(){return this.value&&Object.keys(this.value).length>0},transformedModel(){return this.subSchema&&this.subSchema.fields.length>=1&&this.subSchema.fields[0].type==="array"?new Proxy(this.model[this.schema.model],{get:(n,l)=>({[this.schema.model]:n[l]}),set:(n,l,s)=>n[l]=s[this.schema.model]}):this.model[this.schema.model]}},mounted(){this.value||(this.value={});let n=[];this.subSchema?n=this.subSchema.fields:this.subFields&&(n=this.schema.fields[0].schema),this.value=this.transformMapModelValuesToObject(this.model,n,this.schema.model)},methods:{removeElement(n){const l=this.value;delete l[n],this.value={...l}},transformMapModelValuesToObject(n,l,s){const m={};return Object.keys(n).map(h=>{const u=h.indexOf(s+"-");if(u>-1&&Array.isArray(l))if(l.length>0){const g=h.split("-").filter(A=>l.find(V=>V.model===A)),T=h.split(`-${g}`)[0].split(`${s}-`)[1];g.length?m[T]={...m[T],[g]:n[h]}:m[h.substring(u+`${s}-`.length)]=n[h]}else m[h.substring(`${s}-`.length)]=n[h];else{const g=h.split("-").filter(A=>A===this.schema.model),T=h.split(`-${g}`)[0].split(`${s}-`)[1];T&&(m[T]=n[h])}return h}),m},addKey(){const n=this.subSchema&&Array.isArray(this.subSchema.fields)&&this.subSchema.fields.length===1&&this.subSchema.fields[0].type==="array",l=this.subSchema?n?[""]:{}:"";this.value[this.newKeyName]=l,this.newKeyName=""},updateModel(n,l){this.$emit("model-updated",this.model[this.schema.model],l)}}},To=n=>(i.pushScopeId("data-v-22600a29"),n=n(),i.popScopeId(),n),kc=["id"],Ec=["data-testid"],Sc={class:"item-wrapper"},Tc={class:"index-wrapper"},Bc=To(()=>i.createElementVNode("hr",{class:"divider"},null,-1)),Mc={key:0},Ac={key:1},Ic=["onUpdate:modelValue","placeholder","onInput"],Nc={key:0,class:"hint"},Fc=To(()=>i.createElementVNode("hr",{class:"wide-divider"},null,-1)),$c={class:"input-item"},Oc=["placeholder"],Vc={key:0,class:"hint"};function Dc(n,l,s,m,h,u){const b=i.resolveComponent("KIcon"),g=i.resolveComponent("KButton"),T=i.resolveComponent("vue-form-generator");return i.openBlock(),i.createElementBlock("div",{id:n.getFieldID(n.schema),class:i.normalizeClass(["object-advanced-wrapper",n.schema.fieldClasses])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(A,V)=>(i.openBlock(),i.createElementBlock("div",{key:V,"data-testid":`field-object-key-${V}`},[i.createElementVNode("div",null,[i.createElementVNode("div",Sc,[i.createElementVNode("div",Tc,[i.createElementVNode("strong",null,i.toDisplayString(V),1),i.createElementVNode("div",null,[i.createVNode(g,{appearance:"tertiary",class:"delete",type:"button",onClick:j=>u.removeElement(V)},{default:i.withCtx(()=>[i.createVNode(b,{icon:"trash",size:"18"})]),_:2},1032,["onClick"])])]),Bc,u.subSchema?(i.openBlock(),i.createElementBlock("div",Mc,[i.createVNode(T,{model:u.transformedModel[V],options:{helpAsHtml:!0},schema:u.subSchema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])):(i.openBlock(),i.createElementBlock("div",Ac,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":j=>n.value[V]=j,class:"form-control",placeholder:n.schema.fields&&n.schema.fields[0].schema.placeholder,type:"text",onInput:j=>u.updateModel(n.value[V],n.model[n.schema.model])},null,40,Ic),[[i.vModelText,n.value[V]]]),n.schema.fields&&n.schema.fields[0].schema.hint?(i.openBlock(),i.createElementBlock("p",Nc,i.toDisplayString(n.schema.fields[0].schema.hint),1)):i.createCommentVNode("",!0)])),Fc])])],8,Ec))),128)),i.createElementVNode("div",{class:i.normalizeClass(["input-wrapper",{indent:u.hasObjectKeys}])},[i.createElementVNode("div",$c,[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=A=>h.newKeyName=A),class:"form-control","data-testid":"keyname-input",placeholder:n.schema.placeholder,type:"text"},null,8,Oc),[[i.vModelText,h.newKeyName]]),i.createVNode(g,{appearance:"tertiary","data-testid":"add-key",disabled:!h.newKeyName,onClick:u.addKey},{default:i.withCtx(()=>[i.createTextVNode(" + Add "+i.toDisplayString(n.schema.buttonLabel||n.schema.label),1)]),_:1},8,["disabled","onClick"])]),n.schema.hintText?(i.openBlock(),i.createElementBlock("p",Vc,i.toDisplayString(n.schema.hintText),1)):i.createCommentVNode("",!0)],2)],10,kc)}const Bo=P(vc,[["render",Dc],["__scopeId","data-v-22600a29"]]),Dn="24px",Mo=(n,l)=>{const s=n.__vccOpts||n;for(const[m,h]of l)s[m]=h;return s},xc=n=>(i.pushScopeId("data-v-a4f291af"),n=n(),i.popScopeId(),n),Lc=["aria-hidden"],Uc={key:0,"data-testid":"kui-icon-svg-title"},Rc=xc(()=>i.createElementVNode("path",{d:"M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",fill:"currentColor"},null,-1)),Pc=Mo(i.defineComponent({__name:"AddIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Dn,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const l=String(n).replace(/px/gi,""),s=Number(l);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const l=n,s=i.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const h=String(l.size).replace(/px/gi,""),u=Number(h);if(u&&!isNaN(u)&&Number.isInteger(u)&&u>0)return`${u}px`}return Dn}),m=i.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:s.value,lineHeight:"0",width:s.value}));return(h,u)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon add-icon","data-testid":"kui-icon-wrapper-add-icon",style:i.normalizeStyle(m.value)},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-add-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(i.openBlock(),i.createElementBlock("title",Uc,i.toDisplayString(n.title),1)):i.createCommentVNode("",!0),Rc],8,Lc))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-a4f291af"]]),qc=n=>(i.pushScopeId("data-v-d3b433b6"),n=n(),i.popScopeId(),n),zc=["aria-hidden"],Hc={key:0,"data-testid":"kui-icon-svg-title"},Wc=qc(()=>i.createElementVNode("path",{d:"M7 21C6.45 21 5.97917 20.8042 5.5875 20.4125C5.19583 20.0208 5 19.55 5 19V6H4V4H9V3H15V4H20V6H19V19C19 19.55 18.8042 20.0208 18.4125 20.4125C18.0208 20.8042 17.55 21 17 21H7ZM17 6H7V19H17V6ZM9 17H11V8H9V17ZM13 17H15V8H13V17Z",fill:"currentColor"},null,-1)),Nr=Mo(i.defineComponent({__name:"TrashIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:Dn,validator:n=>{if(typeof n=="number"&&n>0)return!0;if(typeof n=="string"){const l=String(n).replace(/px/gi,""),s=Number(l);if(s&&!isNaN(s)&&Number.isInteger(s)&&s>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(n){const l=n,s=i.computed(()=>{if(typeof l.size=="number"&&l.size>0)return`${l.size}px`;if(typeof l.size=="string"){const h=String(l.size).replace(/px/gi,""),u=Number(h);if(u&&!isNaN(u)&&Number.isInteger(u)&&u>0)return`${u}px`}return Dn}),m=i.computed(()=>({boxSizing:"border-box",color:l.color,display:l.display,height:s.value,lineHeight:"0",width:s.value}));return(h,u)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.as),{"aria-hidden":n.decorative?"true":void 0,class:"kui-icon trash-icon","data-testid":"kui-icon-wrapper-trash-icon",style:i.normalizeStyle(m.value)},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("svg",{"aria-hidden":n.decorative?"true":void 0,"data-testid":"kui-icon-svg-trash-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[n.title?(i.openBlock(),i.createElementBlock("title",Hc,i.toDisplayString(n.title),1)):i.createCommentVNode("",!0),Wc],8,zc))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-d3b433b6"]]),Ib="",Nb="",Kc={name:"FieldArrayItem",components:{TrashIcon:Nr},props:{model:{type:String,default:null}},emits:["remove-item"],data(){return{contentVisible:!1}}},Yc={class:"array-item"};function Gc(n,l,s,m,h,u){const b=i.resolveComponent("TrashIcon"),g=i.resolveComponent("KButton");return i.openBlock(),i.createElementBlock("div",Yc,[i.renderSlot(n.$slots,"default",{},void 0,!0),i.createVNode(g,{appearance:"tertiary",class:"delete",type:"button",onClick:l[0]||(l[0]=T=>n.$emit("remove-item"))},{default:i.withCtx(()=>[i.createVNode(b)]),_:1})])}const Ao=P(Kc,[["render",Gc],["__scopeId","data-v-d42daeb2"]]),Fb="",Zc={name:"FieldArrayMultiItem",emits:["remove-item"],data(){return{contentVisible:!1}}},Jc=n=>(i.pushScopeId("data-v-47ff1f9a"),n=n(),i.popScopeId(),n),Xc={class:"multi-item-wrapper"},Qc=Jc(()=>i.createElementVNode("hr",null,null,-1));function jc(n,l,s,m,h,u){const b=i.resolveComponent("KButton");return i.openBlock(),i.createElementBlock("div",Xc,[i.renderSlot(n.$slots,"default",{},void 0,!0),i.createVNode(b,{appearance:"danger",class:"delete",type:"input",onClick:l[0]||(l[0]=g=>n.$emit("remove-item"))},{default:i.withCtx(()=>[i.createTextVNode(" - Remove Field ")]),_:1}),Qc])}const Io=P(Zc,[["render",jc],["__scopeId","data-v-47ff1f9a"]]),$b="",eu={name:"FieldMetric",components:{AddIcon:Pc,TrashIcon:Nr},mixins:[K],emits:["remove-item"],data(){return{contentVisible:!1}}},tu={key:0,class:"content"};function nu(n,l,s,m,h,u){const b=i.resolveComponent("AddIcon"),g=i.resolveComponent("TrashIcon"),T=i.resolveComponent("KButton");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["field-dropdown",{active:h.contentVisible}])},[i.createElementVNode("div",{class:"title",onClick:l[0]||(l[0]=A=>h.contentVisible=!h.contentVisible)},[i.createTextVNode(i.toDisplayString(n.model.name?n.model.name:"New Item")+" ",1),i.createVNode(b,{class:"metric-add-icon"})]),i.createVNode(i.Transition,{name:"slide-fade"},{default:i.withCtx(()=>[h.contentVisible?(i.openBlock(),i.createElementBlock("div",tu,[i.renderSlot(n.$slots,"default"),i.createVNode(T,{appearance:"tertiary",class:"metric-remove-button",onClick:l[1]||(l[1]=A=>n.$emit("remove-item"))},{default:i.withCtx(()=>[i.createVNode(g)]),_:1})])):i.createCommentVNode("",!0)]),_:3})],2)}const No=P(eu,[["render",nu]]),bt="kong-ui-forms-api",ru="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";function iu(n){return n?n.length===36&&new RegExp(`^${ru}$`).test(n):!1}const Ob="",Vb="",Fr=50,Ft={CREATE_NOT_FROM_ENTITY:"CREATE_NOT_FROM_ENTITY",CREATE_FROM_ENTITY:"CREATE_FROM_ENTITY",UPDATE_ENTITY:"UPDATE_ENTITY",SET_REFERRAL_VALUE:"SET_REFERRAL_VALUE"};function ou(n,l,s){return s?Ft.SET_REFERRAL_VALUE:n&&!l||!n&&l?Ft.UPDATE_ENTITY:n&&l?Ft.CREATE_FROM_ENTITY:Ft.CREATE_NOT_FROM_ENTITY}const su={mixins:[K],inject:[bt],emits:["model-updated"],data(){return{suggestions:[],idValue:"",message:"Type something to search",items:[],initialItems:[],loading:!1}},computed:{fieldState(){return ou(this.model[this.schema.model],this.associatedEntity||this.entityId,this.bypassSearch)},associatedEntity(){return this.$route&&this.$route.params[this.entity]},entity(){return this.schema.entity},bypassSearch(){return this.$route&&this.$route.query&&this.$route.query.no_search}},async created(){await this.$nextTick();let n,l;switch(this.fieldState){case Ft.UPDATE_ENTITY:if(!this[bt]){console.warn("[@kong-ui-public/forms] No API service provided");break}l=(await this[bt].getOne(this.entity,this.model[this.schema.model])).data,n=this.getItem(this.schema.entityDataKey?l[this.schema.entityDataKey]:l),this.idValue=n.id;break;case Ft.CREATE_FROM_ENTITY:this.idValue=this.associatedEntity.id;break;case Ft.SET_REFERRAL_VALUE:this.idValue=this.value}try{n&&(this.initialItems=[{...n,label:this.getSuggestionLabel(n),value:n.id}]),this.items=this.initialItems}catch(s){this.message=`There was an error loading ${this.schema.entity}`,console.error("err!",s)}},methods:{onQueryChange(n){n.trim().length===0&&(this.items=[],this.message="Type something to search"),typeof this.performSearch!="function"&&(this.performSearch=C.debounce(this.search,500)),this.performSearch(n)},async search(n){if(n.trim().length===0)return;this.loading=!0;const l=[],s=[],m=this.getInputFields(),h=new Set;iu(n)&&m.includes("id")?s.push((async()=>{const u=await this.fetchExact(n);l.push({...u,label:this.getSuggestionLabel(u),value:u.id})})()):s.push(...m.filter(u=>u!=="id").map(async u=>{(await this.fetchSuggestions(n,u)).forEach(g=>{h.has(g.id)||(h.add(g.id),l.push({...g,label:this.getSuggestionLabel(g),value:g.id}))})})),await Promise.all(s),this.items=l,this.items.length===0&&(this.message="No results"),this.loading=!1},getItem(n){return n.data?n.data.length>0?n.data[0]:[]:n},async fetchUntilLimit(n){const l=[];let s=null;if(!this[bt])return console.warn("[@kong-ui-public/forms] No API service provided"),[];for(;l.length<Fr;){const m=await this[bt].getAll(this.entity,{size:Fr,offset:s,...n});if(l.push(...m.data.data),s=m.data.offset,!s)break}return l.slice(0,Fr)},async fetchSuggestions(n,l){return this.fetchUntilLimit({[l]:n})},async fetchExact(n){return this[bt]?(await this[bt].getOne(this.entity,n)).data:(console.warn("[@kong-ui-public/forms] No API service provided"),{})},getInputFields(){var n,l;return((l=(n=this.schema)==null?void 0:n.inputValues)==null?void 0:l.fields)||[]},getSuggestionLabel(n){const l=this.getInputFields();return l.length&&n?l.map(s=>n[s]).filter(Boolean).join(" - "):""},updateModel(n){this.$emit("model-updated",n&&n.length?n:null,this.schema.model)},onSelected(n){this.idValue=n&&n.id,this.updateModel(this.getReturnValue(n||{}))},getReturnValue(n){var s;const l=(s=this.schema)==null?void 0:s.returnKey;return l?n[l]:n.id}}},lu={class:"field-wrap autosuggest"},au=["data-testid","data-testlabel"],du=["data-testid"],cu={class:"autosuggest__results_message"};function uu(n,l,s,m,h,u){const b=i.resolveComponent("KSelect");return i.openBlock(),i.createElementBlock("div",lu,[i.createVNode(b,{id:n.schema.model,ref:"suggestion",modelValue:h.idValue,"onUpdate:modelValue":l[0]||(l[0]=g=>h.idValue=g),appearance:"select",autosuggest:"",clearable:"","enable-filtering":"",items:h.items,loading:h.loading,placeholder:n.schema.placeholder,width:"100%",onChange:u.onSelected,onQueryChange:u.onQueryChange},{"item-template":i.withCtx(({item:g})=>[i.createElementVNode("span",{class:"first-part","data-testid":g.id&&`${g.id}-0`,"data-testlabel":g.label},i.toDisplayString(u.getSuggestionLabel(g).split(" - ")[0]),9,au),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.getSuggestionLabel(g).split(" - ").slice(1),(T,A)=>(i.openBlock(),i.createElementBlock("span",{key:A,class:"field-span","data-testid":g.id&&`${g.id}-${A+1}`||A+1},i.toDisplayString(T),9,du))),128))]),empty:i.withCtx(()=>[i.createElementVNode("div",cu,[i.createElementVNode("span",null,i.toDisplayString(h.message),1)])]),_:1},8,["id","modelValue","items","loading","placeholder","onChange","onQueryChange"])])}const Fo=P(su,[["render",uu],["__scopeId","data-v-27d6a440"]]),Db="",xb="",fu={name:"FieldArrayCardContainer",components:{TrashIcon:Nr},props:{model:{type:Object,default:null},schema:{type:Object,default:null}},emits:["remove-item"]},hu={class:"array-card-container"};function mu(n,l,s,m,h,u){const b=i.resolveComponent("KCard"),g=i.resolveComponent("TrashIcon"),T=i.resolveComponent("KButton");return i.openBlock(),i.createElementBlock("div",hu,[i.createVNode(b,{class:"card"},{body:i.withCtx(()=>[i.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),i.createVNode(T,{appearance:"tertiary",class:"array-card-remove-button",onClick:l[0]||(l[0]=A=>n.$emit("remove-item"))},{default:i.withCtx(()=>[i.createVNode(g)]),_:1})])}const $o=P(fu,[["render",mu],["__scopeId","data-v-d409fd75"]]),Lb="",pu={mixins:[K],emits:["model-updated"],methods:{updateModel(n){this.$emit("model-updated",n,this.schema.model)},checkOption(n){return this.model[this.schema.model]?n.value.toString()===this.model[this.schema.model].toString():n.checked},onChange(n){let l=n.target.value.split(",");this.schema.array||(l=l.toString()),this.updateModel(l)}}},gu={class:"selection-group"},_u={class:"form-group"},yu=["id","checked","name","value"];function bu(n,l,s,m,h,u){return i.openBlock(),i.createElementBlock("div",gu,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.schema.values,(b,g)=>(i.openBlock(),i.createElementBlock("div",{key:g,class:"option-group"},[i.createElementVNode("div",_u,[i.createElementVNode("label",{class:i.normalizeClass(["k-label",b.name])},[i.createElementVNode("input",{id:n.schema.name+"-"+g,checked:u.checkOption(b),class:"k-input",name:n.schema.name,type:"radio",value:b.value,onChange:l[0]||(l[0]=(...T)=>u.onChange&&u.onChange(...T))},null,40,yu),i.createTextVNode(" "+i.toDisplayString(b.name),1)],2)])]))),128))])}const Oo=P(pu,[["render",bu],["__scopeId","data-v-7e49acd6"]]),wu={name:"FieldArray",components:{FieldArrayItem:Ao,FieldArrayMultiItem:Io,FieldSelect:Co,FieldMetric:No,FieldObject:So,FieldObjectAdvanced:Bo,FieldAutoSuggest:Fo,FieldRadio:Oo,FieldArrayCardContainer:$o,FieldTextArea:vo},mixins:[K],props:{newElementButtonLabel:{type:String,default:"New Item"},removeElementButtonLabel:{type:String,default:"x"}},methods:{generateSchema(n,l,s){let m;return l&&(m=JSON.parse(JSON.stringify(l)),m.schema.fields.map(h=>(h.id=`${h.id||h.model}-${s}`,h))),{...m,set(h,u){n[s]=u},get(){return n[s]}}},newElement(){let n=this.value,l;(!n||!n.push)&&(n=[]),this.schema.items&&this.schema.items.default&&(typeof this.schema.items.default=="function"?l=this.schema.items.default():l=this.schema.items.default),n.push(l),this.value=[...n]},removeElement(n){this.value.splice(n,1)},getFieldType(n){return"field-"+n.type},modelUpdated(){}}},Cu=["id"],vu={key:1},ku=["onUpdate:modelValue","type"],Eu=["value","onClick"],Su=["onUpdate:modelValue"],Tu=["value","onClick"];function Bu(n,l,s,m,h,u){const b=i.resolveComponent("FieldTextArea"),g=i.resolveComponent("KButton");return n.schema?(i.openBlock(),i.createElementBlock("div",{key:0,id:n.getFieldID(n.schema),class:i.normalizeClass(n.schema.fieldClasses)},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(T,A)=>(i.openBlock(),i.createElementBlock("div",{key:A,class:i.normalizeClass(n.schema.fieldItemsClasses)},[n.schema.items&&n.schema.itemContainerComponent?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.schema.itemContainerComponent),{key:0,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onRemoveItem:V=>u.removeElement(A)},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.getFieldType(n.schema.items)),{"form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))]),_:2},1064,["model","schema","onRemoveItem"])):n.schema.items?(i.openBlock(),i.createElementBlock("span",vu,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.getFieldType(n.schema.items)),{"form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,40,["form-options","model","schema","onModelUpdated"]))])):n.schema.itemContainerComponent?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(n.schema.itemContainerComponent),{key:2,"data-testid":`${n.getFieldID(n.schema)}-item-${A}`,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onRemoveItem:V=>u.removeElement(A)},{default:i.withCtx(()=>{var V,j;return[((V=n.schema.inputAttributes)==null?void 0:V.type)==="textarea"?(i.openBlock(),i.createBlock(b,{key:0,class:"k-input","form-options":n.formOptions,model:T,schema:u.generateSchema(n.value,n.schema.items,A),onModelUpdated:u.modelUpdated},null,8,["form-options","model","schema","onModelUpdated"])):i.withDirectives((i.openBlock(),i.createElementBlock("input",i.mergeProps({key:1,"onUpdate:modelValue":J=>n.value[A]=J},n.schema.inputAttributes,{type:((j=n.schema.inputAttributes)==null?void 0:j.type)||"text"}),null,16,ku)),[[i.vModelDynamic,n.value[A]]]),n.schema.showRemoveButton?(i.openBlock(),i.createElementBlock("input",i.mergeProps({key:2},n.schema.removeElementButtonAttributes,{type:"button",value:n.schema.removeElementButtonLabel||s.removeElementButtonLabel,onClick:J=>u.removeElement(A)}),null,16,Eu)):i.createCommentVNode("",!0)]}),_:2},1064,["data-testid","model","schema","onRemoveItem"])):i.withDirectives((i.openBlock(),i.createElementBlock("input",i.mergeProps({key:3},n.schema.inputAttributes,{"onUpdate:modelValue":V=>n.value[A]=V,type:"text"}),null,16,Su)),[[i.vModelText,n.value[A]]]),n.schema.showRemoveButton?(i.openBlock(),i.createElementBlock("input",i.mergeProps({key:4},n.schema.removeElementButtonAttributes,{type:"button",value:n.schema.removeElementButtonLabel||s.removeElementButtonLabel,onClick:V=>u.removeElement(A)}),null,16,Tu)):i.createCommentVNode("",!0)],2))),128)),i.createVNode(g,{appearance:"tertiary",class:i.normalizeClass(n.schema.newElementButtonLabelClasses),"data-testid":`add-${n.getFieldID(n.schema)}`,type:"button",onClick:u.newElement},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(n.schema.newElementButtonLabel||s.newElementButtonLabel),1)]),_:1},8,["class","data-testid","onClick"])],10,Cu)):i.createCommentVNode("",!0)}const Mu=P(wu,[["render",Bu]]),Ub="",Au={mixins:[K],emits:["model-updated"],data(){return{isOpen:!1}},computed:{openClass(){return this.isOpen?"open":"closed"},fieldCount(){return this.schema.fields.length},titleText(){return`${this.isOpen?"Hide":"View"} ${this.fieldCount} Advanced Fields`}},methods:{handleOpen(){this.isOpen=!this.isOpen},updateModel(n,l){this.$emit("model-updated",n,l)}}},Iu={class:"advanced-field-dropdown-wrapper","data-testid":"advanced-field-dropdown-wrapper"},Nu={class:"material-icons"};function Fu(n,l,s,m,h,u){const b=i.resolveComponent("vue-form-generator");return i.openBlock(),i.createElementBlock("div",Iu,[i.createElementVNode("button",{class:"advanced-field-title",type:"button",onClick:l[0]||(l[0]=(...g)=>u.handleOpen&&u.handleOpen(...g))},[i.createElementVNode("i",Nu,i.toDisplayString(h.isOpen?"keyboard_arrow_up":"keyboard_arrow_right"),1),i.createElementVNode("span",null,i.toDisplayString(u.titleText),1)]),i.createElementVNode("div",{class:i.normalizeClass(["advanced-field-dropdown",u.openClass])},[i.createVNode(b,{model:n.model,options:{helpAsHtml:!0},schema:n.schema,onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])],2)])}const $u=P(Au,[["render",Fu],["__scopeId","data-v-2d8e71e1"]]),Rb="",Pb="",Ou={mixins:[K],emits:["model-updated"],data(){return{checkedGroup:null,fieldModel:{...this.model},fieldSchema:[]}},watch:{checkedGroup:{handler(n,l){if(l===null){this.fieldModel={...this.model};return}const s=this.schema.fields[n].fields,m=this.schema.fields[l].fields;m&&m.forEach(h=>this.updateModel("",h.model)),s&&s.forEach(h=>this.updateModel(this.fieldModel[h.model],h.model))}}},async created(){await this.$nextTick(),this.schema.fields.forEach((n,l)=>{n.fields&&n.fields.forEach(s=>{this.model[s.model]&&(this.checkedGroup=l,this.fieldSchema.push(s.model))})}),this.checkedGroup===null&&(this.checkedGroup=0)},methods:{updateModel(n,l){this.$emit("model-updated",n,l)}}},Vu={class:"selection-group"},Du={class:"form-group"},xu=["value"],Lu={class:"control-help"},Uu={class:"option-field"},Ru={class:"option-field-container"};function Pu(n,l,s,m,h,u){const b=i.resolveComponent("vue-form-generator");return i.openBlock(),i.createElementBlock("div",Vu,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.schema.fields,(g,T)=>(i.openBlock(),i.createElementBlock("div",{key:T,class:"option-group"},[i.createElementVNode("div",Du,[i.createElementVNode("label",{class:i.normalizeClass(["k-label",`${g.label}-check`])},[i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=A=>h.checkedGroup=A),class:"k-input",type:"radio",value:T},null,8,xu),[[i.vModelRadio,h.checkedGroup]]),i.createTextVNode(" "+i.toDisplayString(g.label)+" ",1),i.createElementVNode("div",Lu,i.toDisplayString(g.description),1)],2)]),i.withDirectives(i.createElementVNode("div",Uu,[i.createElementVNode("div",Ru,[i.createVNode(b,{model:n.model,options:{helpAsHtml:!0},schema:{fields:g.fields},onModelUpdated:u.updateModel},null,8,["model","schema","onModelUpdated"])])],512),[[i.vShow,g.fields&&h.checkedGroup===T]])]))),128))])}const qu=P(Ou,[["render",Pu],["__scopeId","data-v-25fe24da"]]),zu={mixins:[K],emits:["model-updated"],methods:{onUpdate(n){this.$emit("model-updated",n,this.schema.model)}}};function Hu(n,l,s,m,h,u){const b=i.resolveComponent("KMultiselect");return i.openBlock(),i.createBlock(b,{"collapsed-context":"","data-testid":"field-multiselect",items:n.schema.values,"label-attributes":{info:n.schema.help},"model-value":n.value,placeholder:n.schema.placeholder,required:n.schema.required||void 0,width:"100%","onUpdate:modelValue":u.onUpdate},null,8,["items","label-attributes","model-value","placeholder","required","onUpdate:modelValue"])}const Wu=Object.freeze(Object.defineProperty({__proto__:null,FieldAdvanced:$u,FieldArray:Mu,FieldArrayCardContainer:$o,FieldArrayItem:Ao,FieldArrayMultiItem:Io,FieldAutoSuggest:Fo,FieldCheckbox:Na,FieldChecklist:Pa,FieldCleave:_d,FieldDateTimePicker:kd,FieldGoogleAddress:Td,FieldImage:Nd,FieldInput:Ka,FieldLabel:Za,FieldMasked:Od,FieldMetric:No,FieldMultiselect:P(zu,[["render",Hu]]),FieldNoUiSlider:Ld,FieldObject:So,FieldObjectAdvanced:Bo,FieldPikaday:zd,FieldRadio:Oo,FieldRadios:ja,FieldRangeSlider:Kd,FieldSelect:Co,FieldSelectEx:Xd,FieldSelectionGroup:qu,FieldSpectrum:ec,FieldStaticMap:rc,FieldSubmit:ad,FieldTextArea:vo,FieldUpload:md,fieldSwitch:ac},Symbol.toStringTag,{value:"Module"})),zb="",Hb="",Ku={name:"FormGroup",components:Wu,mixins:[no],props:{vfg:{type:Object,required:!0},model:{type:Object,default:()=>{}},options:{type:Object,default:()=>{}},field:{type:Object,required:!0},errors:{type:Array,default(){return[]}}},emits:["validated","modelUpdated"],data(){return{child:i.ref()}},methods:{fieldTypeHasLabel(n){if(C.isNil(n.label))return!1;let l="";switch(n.type==="input"?l=n.inputType:l=n.type,l){case"button":case"submit":case"reset":return!1;default:return!0}},getFieldID(n){const l=C.get(this.options,"fieldIdPrefix","");return ro(n,l)},getFieldType(n){return"field-"+n.type},getButtonType(n){return C.get(n,"type","button")},onFieldValidated(n,l,s){this.$emit("validated",n,l,s)},buttonVisibility(n){return n.buttons&&n.buttons.length>0},buttonClickHandler(n,l,s){return n.onclick.call(this,this.model,l,s,this)},fieldHint(n){return C.isFunction(n.hint)?n.hint.call(this,this.model,n,this):n.hint},fieldErrors(n){return this.errors.filter(l=>l.field.fieldName===n.fieldName).map(l=>l.error)},onModelUpdated(n,l){this.$emit("modelUpdated",n,l)},validate(n){return this.$refs.child.validate(n)},clearValidationErrors(){if(this.$refs.child)return this.$refs.child.clearValidationErrors()},formattedLabel(n){return n?n.replace(/^[cC]onfig\./,""):""}}},Vo=n=>(i.pushScopeId("data-v-e016d4ec"),n=n(),i.popScopeId(),n),Yu=["for"],Gu={class:"icon-wrapper"},Zu=["innerHTML"],Ju=Vo(()=>i.createElementVNode("div",{class:"help",role:"button",tabindex:"0"},[i.createElementVNode("i",{class:"icon"})],-1)),Xu=["innerHTML"],Qu={key:0,class:"link-wrapper"},ju=Vo(()=>i.createElementVNode("span",{class:"section-header"},"More info",-1)),ef={class:"field-wrap"},tf={key:0,class:"buttons"},nf=["type","onClick","textContent"],rf=["innerHTML"],of={key:2,class:"errors help-block"},sf=["innerHTML"];function lf(n,l,s,m,h,u){const b=i.resolveComponent("KTooltip"),g=i.resolveComponent("KExternalLink");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["form-group",n.getFieldRowClasses(s.field)])},[u.fieldTypeHasLabel(s.field)?(i.openBlock(),i.createElementBlock("label",{key:0,class:i.normalizeClass(["form-group-label",s.field.labelClasses]),for:u.getFieldID(s.field)},[i.createElementVNode("div",Gu,[i.createElementVNode("span",{innerHTML:u.formattedLabel(s.field.label)},null,8,Zu),s.field.help?(i.openBlock(),i.createBlock(b,{key:0,"max-width":"300",placement:"top","position-fixed":!0},{content:i.withCtx(()=>[s.options.helpAsHtml?(i.openBlock(),i.createElementBlock("div",{key:0,innerHTML:s.field.help},null,8,Xu)):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createTextVNode(i.toDisplayString(s.field.help),1)],64))]),default:i.withCtx(()=>[Ju]),_:1})):i.createCommentVNode("",!0)]),s.field.link?(i.openBlock(),i.createElementBlock("div",Qu,[i.createVNode(g,{href:s.field.link},{default:i.withCtx(()=>[ju]),_:1},8,["href"])])):i.createCommentVNode("",!0)],10,Yu)):i.createCommentVNode("",!0),i.createElementVNode("div",ef,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(u.getFieldType(s.field)),i.mergeProps(n.$attrs,{ref:"child",disabled:n.fieldDisabled(s.field)||null,"form-options":s.options,model:s.model,schema:s.field,vfg:s.vfg,onModelUpdated:u.onModelUpdated,onValidated:u.onFieldValidated}),null,16,["disabled","form-options","model","schema","vfg","onModelUpdated","onValidated"])),u.buttonVisibility(s.field)?(i.openBlock(),i.createElementBlock("div",tf,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.field.buttons,(T,A)=>(i.openBlock(),i.createElementBlock("button",{key:A,class:i.normalizeClass(T.classes),type:u.getButtonType(T),onClick:V=>u.buttonClickHandler(T,s.field,V),textContent:i.toDisplayString(T.label)},null,10,nf))),128))])):i.createCommentVNode("",!0)]),s.field.hint?(i.openBlock(),i.createElementBlock("div",{key:1,class:"hint",innerHTML:u.fieldHint(s.field)},null,8,rf)):i.createCommentVNode("",!0),u.fieldErrors(s.field).length>0?(i.openBlock(),i.createElementBlock("div",of,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.fieldErrors(s.field),(T,A)=>(i.openBlock(),i.createElementBlock("span",{key:A,innerHTML:T},null,8,sf))),128))])):i.createCommentVNode("",!0)],2)}const af=P(Ku,[["render",lf],["__scopeId","data-v-e016d4ec"]]),df={key:0,class:"vue-form-generator"},cf=["is"],uf=["is"],ff={key:0};function hf(n,l,s,m,h,u){const b=i.resolveComponent("form-group");return s.schema!=null?(i.openBlock(),i.createElementBlock("div",df,[s.schema.fields?(i.openBlock(),i.createElementBlock("fieldset",{key:0,is:s.tag},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.fields,g=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[u.fieldVisible(g)?(i.openBlock(),i.createBlock(b,{key:0,ref_for:!0,ref:"children",vfg:h.vfg,field:g,errors:h.errors,model:s.model,options:s.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):i.createCommentVNode("",!0)],64))),256))],8,cf)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(u.groups,g=>(i.openBlock(),i.createElementBlock("fieldset",{is:s.tag,class:i.normalizeClass(n.getFieldRowClasses(g))},[g.legend?(i.openBlock(),i.createElementBlock("legend",ff,i.toDisplayString(g.legend),1)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(g.fields,T=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[u.fieldVisible(T)?(i.openBlock(),i.createBlock(b,{key:0,ref_for:!0,ref:"children",vfg:h.vfg,field:T,errors:h.errors,model:s.model,options:s.options,onValidated:u.onFieldValidated,onModelUpdated:u.onModelUpdated},null,8,["vfg","field","errors","model","options","onValidated","onModelUpdated"])):i.createCommentVNode("",!0)],64))),256))],10,uf))),256))])):i.createCommentVNode("",!0)}const Wb="",be=P({name:"FormGenerator",components:{formGroup:af},mixins:[no],props:{schema:{type:Object,default:()=>{}},model:{type:Object,default:()=>{}},options:{type:Object,default(){return{validateAfterLoad:!1,validateAfterChanged:!1,child:i.ref([]),fieldIdPrefix:"",validateAsync:!1,validationErrorClass:"error",validationSuccessClass:"",helpAsHtml:!1}}},multiple:{type:Boolean,default:!1},isNewModel:{type:Boolean,default:!1},tag:{type:String,default:"fieldset",validator:function(n){return n.length>0}}},emits:["validated","modelUpdated"],data(){return{vfg:this,errors:[],children:i.ref([])}},computed:{fields(){const n=[];return this.schema&&this.schema.fields&&C.forEach(this.schema.fields,l=>{(!this.multiple||l.multi===!0)&&n.push(l)}),n},groups(){const n=[];return this.schema&&this.schema.groups&&C.forEach(this.schema.groups.slice(0),l=>{n.push(l)}),n}},watch:{model:{deep:!0,handler(n,l){l!==n&&n!=null&&this.$nextTick(()=>{this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors()})}}},mounted(){this.$nextTick(()=>{this.model&&(this.options.validateAfterLoad===!0&&this.isNewModel!==!0?this.validate():this.clearValidationErrors())})},methods:{fieldVisible(n){return C.isFunction(n.visible)?n.visible.call(this,this.model,n,this):C.isNil(n.visible)?!0:n.visible},onFieldValidated(n,l,s){this.errors=this.errors.filter(h=>h.field.fieldName!==s.schema.fieldName),!n&&l&&l.length>0&&C.forEach(l,h=>{this.errors.push({field:s.schema,error:h})});const m=this.errors.length===0;this.$emit("validated",m,this.errors,this)},onModelUpdated(n,l){this.$emit("modelUpdated",n,l)},validate(n=null){n===null&&(n=C.get(this.options,"validateAsync",!1)),this.clearValidationErrors();const l=[],s=[];C.forEach(this.$refs.children,h=>{C.isFunction(h.validate)&&(l.push(h.$refs.child),s.push(h.$refs.child.validate(!0)))});const m=h=>{const u=[];C.forEach(h,(g,T)=>{C.isArray(g)&&g.length>0&&C.forEach(g,A=>{u.push({field:l[T].schema,error:A})})}),this.errors=u;const b=u.length===0;return this.$emit("validated",b,u,this),n?u:b};return n?Promise.all(s).then(m):m(s)},clearValidationErrors(){this.errors.splice(0),C.forEach(this.$refs.children,n=>{n.clearValidationErrors()})}}},[["render",hf]]),mf={fields:[{help:"The client id(s) that the plugin uses when it calls authenticated endpoints on the identity provider.",inputType:"password",label:"Config.Client Id",model:"config-client_id",type:"input"},{help:"The client secret.",inputType:"password",label:"Config.Client Secret",model:"config-client_secret",type:"input"},{help:"The discovery endpoint (or just the issuer identifier).",inputType:"text",label:"Config.Issuer",model:"config-issuer",required:!0,type:"input"},{help:"Types of credentials/grants to enable.",inputType:"text",label:"Config.Auth Methods",model:"config-auth_methods",type:"input"}]},pf={fields:[{help:"The claim that contains the scopes.",inputType:"text",label:"Config.Scopes Claim",model:"config-scopes_claim",type:"input"},{help:"The scopes required to be in the access token.",inputType:"text",label:"Config.Scopes Required",model:"config-scopes_required",type:"input"},{help:"The claim that contains the audience.",inputType:"text",label:"Config.Audience Claim",model:"config-audience_claim",type:"input"},{help:"The audience required to be in the access token.",inputType:"text",label:"Config.Audience Required",model:"config-audience_required",type:"input"},{help:"The claim that contains the roles.",inputType:"text",label:"Config.Roles Claim",model:"config-roles_claim",type:"input"},{help:"The roles required to be in the access token.",inputType:"text",label:"Config.Roles Required",model:"config-roles_required",type:"input"},{help:"The claim that contains the groups.",inputType:"text",label:"Config.Groups Claim",model:"config-groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The groups required to be in the access token.",inputType:"text",label:"Config.Groups Required",model:"config-groups_required",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"},{help:"The claim that contains authenticated groups.",inputType:"text",label:"Config.Authenticated Groups Claim",model:"config-authenticated_groups_claim",type:"array",valueType:"string",valueArrayType:"array",itemContainerComponent:"FieldArrayItem",fieldClasses:"w-100",fieldItemsClasses:"d-flex mt-2 w-90",inputAttributes:{class:"form-control",style:{minWidth:"200px"}},validator:"array",styleClasses:"w-100",newElementButtonLabel:"+ Add"}]},gf={fields:[{help:"The input must be in JSON format.",type:"input",valueArrayType:"record",inputType:"text",default:void 0,valueType:"array",model:"config-client_jwk",label:"Config.Client Jwk",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#jwk-record"},{help:"The input must be in JSON format.",type:"input",valueArrayType:"record",inputType:"text",default:void 0,valueType:"array",model:"config-session_redis_cluster_nodes",label:"Config.Session Redis Cluster Nodes",order:0,disabled:!1,link:"https://docs.konghq.com/hub/kong-inc/openid-connect/#host-record"}]},Yb="",Gb="",_f={name:"OIDCForm",components:{VueFormGenerator:be},props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},data(){return{init:!1,authMethods:[],sessionManagement:!1,globalFields:null,commonFieldsSchema:null,authFieldsSchema:null,advancedFieldsSchema:{fields:[]},advancedFields:null,tabs:[{hash:"#common",title:"Common"},{hash:"#authorization",title:"Authorization"},{hash:"#advanced",title:"Advanced"}]}},computed:{displayForm(){return this.formModel.id&&this.isEditing||!this.isEditing}},watch:{formModel:{handler:function(){this.oidcSetup()}}},mounted(){this.oidcSetup()},methods:{oidcSetup(){this.init||(this.init=!0,this.globalFields={fields:this.formSchema.fields.filter(n=>!n.model.startsWith("config")&&n.model!=="tags")},this.commonFieldsSchema={...mf},this.authFieldsSchema={...pf},this.advancedFieldsSchema.fields=this.formSchema.fields.filter(n=>n.model.startsWith("config")&&!this.commonFieldsSchema.fields.filter(l=>l.model===n.model).length&&!this.authFieldsSchema.fields.filter(l=>l.model===n.model).length||n.model==="tags"),this.advancedFieldsSchema.fields=this.advancedFieldsSchema.fields.map(n=>{const l=gf.fields.find(s=>s.model===n.model);return l||n}),this.commonFieldsSchema.fields=this.commonFieldsSchema.fields.filter(n=>n.model!=="config-auth_methods"),this.sessionManagement=this.isEditing?this.formModel["config-auth_methods"].includes("session"):!1,this.authMethods=[{label:"Authorization Code Flow",value:"authorization_code",hint:"authorization code flow",prop:this.isEditing?this.formModel["config-auth_methods"].includes("authorization_code"):!1},{label:"Bearer Access Token",value:"bearer",hint:"JWT access token verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("bearer"):!1},{label:"Client Credentials Grant",value:"client_credentials",hint:"OAuth client credentials grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("client_credentials"):!1},{label:"Passwords Grant",value:"password",hint:"OAuth legacy password grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("password"):!1},{label:"Introspection",value:"introspection",hint:"OAuth introspection",prop:this.isEditing?this.formModel["config-auth_methods"].includes("introspection"):!1},{label:"UserInfo",value:"userinfo",hint:"OpenID Connect user info endpoint authentication",prop:this.isEditing?this.formModel["config-auth_methods"].includes("userinfo"):!1},{label:"Kong OAuth",value:"kong_oauth2",hint:"Kong OAuth plugin issued tokens verification",prop:this.isEditing?this.formModel["config-auth_methods"].includes("kong_oauth2"):!1},{label:"Refresh Token",value:"refresh_token",hint:"OAuth refresh token grant",prop:this.isEditing?this.formModel["config-auth_methods"].includes("refresh_token"):!1}])},getAuthMethodsValue(n,l){const s=[];for(let m=0;m<this.authMethods.length;m++)this.authMethods[m].prop&&this.authMethods[m].value!==n&&s.push(this.authMethods[m].value);return this.sessionManagement&&n&&s.push("session"),l&&(n?s.push(n):s.push("session")),s},handleUpdate(n,l){this.formModel["config-auth_methods"]=this.getAuthMethodsValue(l,n),this.onModelUpdated()}}},Ht=n=>(i.pushScopeId("data-v-84760120"),n=n(),i.popScopeId(),n),yf={class:"general-settings"},bf={class:"link-wrapper"},wf=Ht(()=>i.createElementVNode("span",{class:"section-header"},"Common Configuration Settings",-1)),Cf=Ht(()=>i.createElementVNode("div",{class:"description"}," Parameters for enabling the OpenID Connect plugin. Set these parameters before adding authorization, authentication, or other advanced configuration details. ",-1)),vf={class:"auth-method-container"},kf={class:"general-settings"},Ef={class:"link-wrapper"},Sf=Ht(()=>i.createElementVNode("span",{class:"section-header"},"Authorization Configuration Settings",-1)),Tf=Ht(()=>i.createElementVNode("div",{class:"description"}," Parameters for setting up claims-based authorization. ",-1)),Bf={class:"general-settings"},Mf={class:"link-wrapper"},Af=Ht(()=>i.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings",-1)),If=Ht(()=>i.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the OpenID Connect plugin. ",-1));function Nf(n,l,s,m,h,u){const b=i.resolveComponent("VueFormGenerator"),g=i.resolveComponent("KExternalLink"),T=i.resolveComponent("KLabel"),A=i.resolveComponent("KCheckbox"),V=i.resolveComponent("KInputSwitch"),j=i.resolveComponent("KTabs");return i.openBlock(),i.createElementBlock("div",null,[s.formModel.id&&s.isEditing||!s.isEditing?(i.openBlock(),i.createBlock(b,{key:0,class:"global-fields",model:s.formModel,options:s.formOptions,schema:h.globalFields,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),i.createVNode(j,{tabs:h.tabs},{common:i.withCtx(()=>[i.createElementVNode("div",yf,[i.createElementVNode("div",bf,[i.createVNode(g,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#important-configuration-parameters"},{default:i.withCtx(()=>[wf]),_:1})]),Cf,u.displayForm?(i.openBlock(),i.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.commonFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),i.createVNode(T,null,{default:i.withCtx(()=>[i.createTextVNode("Auth Methods")]),_:1}),i.createElementVNode("div",vf,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.authMethods,J=>(i.openBlock(),i.createElementBlock("div",{key:J.value,class:"auth-method"},[i.createVNode(A,{modelValue:J.prop,"onUpdate:modelValue":we=>J.prop=we,onChange:we=>u.handleUpdate(we,J.value)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(J.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),i.createVNode(V,{modelValue:h.sessionManagement,"onUpdate:modelValue":l[0]||(l[0]=J=>h.sessionManagement=J),label:"Enable Session Management",onChange:u.handleUpdate},null,8,["modelValue","onChange"])])]),authorization:i.withCtx(()=>[i.createElementVNode("div",kf,[i.createElementVNode("div",Ef,[i.createVNode(g,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/#authorization"},{default:i.withCtx(()=>[Sf]),_:1})]),Tf,u.displayForm?(i.openBlock(),i.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.authFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])]),advanced:i.withCtx(()=>[i.createElementVNode("div",Bf,[i.createElementVNode("div",Mf,[i.createVNode(g,{href:"https://docs.konghq.com/hub/kong-inc/openid-connect/"},{default:i.withCtx(()=>[Af]),_:1})]),If,u.displayForm?(i.openBlock(),i.createBlock(b,{key:0,model:s.formModel,options:s.formOptions,schema:h.advancedFieldsSchema,onModelUpdated:s.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])]),_:1},8,["tabs"])])}const Ff=P(_f,[["render",Nf],["__scopeId","data-v-84760120"]]),Do={general:{packageName:"forms"},"post-function":{tags:{hint:"e.g. tag1, tag2, tag3",newElementButtonLabel:"+ Add"},enabled:{newElementButtonLabel:"+ Add"},selectionGroup:{newElementButtonLabel:"+ Add"},instance_name:{newElementButtonLabel:"+ Add"},name:{newElementButtonLabel:"+ Add"},"config-certificate":{help:"Array of stringified Lua code to be cached and run in sequence during the certificate phase.",newElementButtonLabel:"+ Add"},"config-access":{help:"Array of stringified Lua code to be cached and run in sequence during the access phase.",newElementButtonLabel:"+ Add"},"config-body_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the body_filter phase.",newElementButtonLabel:"+ Add"},"config-header_filter":{help:"Array of stringified Lua code to be cached and run in sequence during the header_filter phase.",newElementButtonLabel:"+ Add"},"config-functions":{newElementButtonLabel:"+ Add"},"config-log":{newElementButtonLabel:"+ Add"},"config-rewrite":{newElementButtonLabel:"+ Add"},"config-ws_client_frame":{newElementButtonLabel:"+ Add"},"config-ws_close":{newElementButtonLabel:"+ Add"},"config-ws_handshake":{newElementButtonLabel:"+ Add"},"config-ws_upstream_frame":{newElementButtonLabel:"+ Add"}},"exit-transformer":{"config-functions":{newElementButtonLabel:"+ Add"}}},$f=i.defineComponent({__name:"PostFunction",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(n){const l=n,{t:s,te:m}=to.createI18n("en-us",Do),h=i.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),u=i.computed(()=>{const b=l.formSchema;return b.fields.map(g=>{const T=`post-function.${g.model}`;return g.hint=m(`${T}.hint`)&&s(`${T}.hint`)||g.hint,g.help=m(`${T}.help`)&&s(`${T}.help`)||g.help,g.newElementButtonLabel=m(`${T}.newElementButtonLabel`)&&s(`${T}.newElementButtonLabel`)||g.newElementButtonLabel,g.model!=="tags"&&(g.valueType==="array"||g.type==="array")&&(g.type="array",g.valueArrayType="array",g.itemContainerComponent="FieldArrayItem",g.fieldClasses="w-100",g.fieldItemsClasses="w-100 mt-2 mb-2",g.inputAttributes={...g.inputAttributes,type:"textarea"}),g}),b});return(b,g)=>h.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)}}),Of=i.defineComponent({__name:"ExitTransformer",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(n){const l=n,{t:s,te:m}=to.createI18n("en-us",Do),h=i.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),u=i.computed(()=>{const b=l.formSchema;return b.fields.map(g=>{const T=`exit-transformer.${g.model}`;return g.hint=m(`${T}.hint`)&&s(`${T}.hint`)||g.hint,g.help=m(`${T}.help`)&&s(`${T}.help`)||g.help,g.newElementButtonLabel=m(`${T}.newElementButtonLabel`)&&s(`${T}.newElementButtonLabel`)||g.newElementButtonLabel,g.model!=="tags"&&(g.valueType==="array"||g.type==="array")&&(g.type="array",g.valueArrayType="array",g.itemContainerComponent="FieldArrayItem",g.fieldClasses="w-100",g.fieldItemsClasses="w-100 mt-2 mb-2",g.inputAttributes={...g.inputAttributes,type:"textarea"}),g}),b});return(b,g)=>h.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)}}),Vf={fields:[{inputType:"text",label:"Config.Account Email",model:"config-account_email",required:!0,type:"input"},{inputType:"text",label:"Config.Account Key.Key Id",model:"config-account_key-key_id",required:!0,type:"input"},{type:"input",inputType:"text",valueType:"string",label:"Config.Account Key.Key Set",model:"config-account_key-key_set",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",label:"Config.Allow Any Domain",model:"config-allow_any_domain",order:0,disabled:!1}]},xo={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"checkbox",default:!1,valueType:"boolean",model:"config-tos_accepted",label:"Config.Tos Accepted",order:0,disabled:!1}]},Lo={fields:[{type:"input",default:"",inputType:"text",valueType:"string",model:"config-api_uri",label:"Config.Api Uri",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_hmac_key",label:"Config.Eab Hmac Key",order:0,disabled:!1},{type:"input",inputType:"text",valueType:"string",model:"config-eab_kid",label:"Config.Eab Kid",order:0,disabled:!1}]},$t=n=>(i.pushScopeId("data-v-bc6f1e04"),n=n(),i.popScopeId(),n),Df={class:"general-settings"},xf=$t(()=>i.createElementVNode("div",{class:"header-wrapper"},[i.createElementVNode("span",{class:"section-header"},"General Configuration Settings")],-1)),Lf=$t(()=>i.createElementVNode("div",{class:"description"}," Parameters for enabling the ACME plugin. ",-1)),Uf=$t(()=>i.createElementVNode("hr",null,null,-1)),Rf={class:"sub-form"},Pf={class:"general-settings"},qf=$t(()=>i.createElementVNode("div",{class:"header-wrapper"},[i.createElementVNode("span",{class:"section-header"},"Storage Configuration Settings")],-1)),zf=$t(()=>i.createElementVNode("div",{class:"description"}," Parameters for setting up storage. ",-1)),Hf={class:"sub-form"},Wf={class:"general-settings"},Kf=$t(()=>i.createElementVNode("div",{class:"header-wrapper"},[i.createElementVNode("span",{class:"section-header"},"Advanced Configuration Settings")],-1)),Yf=$t(()=>i.createElementVNode("div",{class:"description"}," Advanced parameters for manually configuring the ACME plugin. ",-1)),Gf=i.defineComponent({__name:"ACMEForm",props:{formModel:{type:Object,required:!0},formSchema:{type:Object,required:!0},formOptions:{type:Object,default:()=>{}},onModelUpdated:{type:Function,required:!0},isEditing:{type:Boolean,required:!0}},setup(n){const l=n,s=i.ref("zeroSsl"),m=i.ref("shm"),h=i.computed(()=>({fields:l.formSchema.fields.filter(H=>!H.model.startsWith("config")&&H.model!=="tags")})),u=i.computed(()=>({fields:Vf.fields.filter(Y=>!xo.fields.some(ce=>ce.model===Y.model)&&!Lo.fields.some(ce=>ce.model===Y.model))})),b=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage")&&!Y.model.startsWith("config-storage_config-consul")&&!Y.model.startsWith("config-storage_config-redis")&&!Y.model.startsWith("config-storage_config-shm")&&!Y.model.startsWith("config-storage_config-vault"))})),g=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-consul"))})),T=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-redis"))})),A=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-shm"))})),V=i.computed(()=>({fields:l.formSchema.fields.filter(Y=>Y.model.startsWith("config-storage_config-vault"))})),j=i.computed(()=>({fields:l.formSchema.fields.filter(H=>H.model.startsWith("config")&&!u.value.fields.filter(Y=>Y.model===H.model).length&&!b.value.fields.filter(Y=>Y.model===H.model).length||H.model==="tags")})),J=i.computed(()=>l.formModel.id&&l.isEditing||!l.isEditing),we=[{hash:"#general",title:"General"},{hash:"#storage",title:"Storage"},{hash:"#advanced",title:"Advanced"}],et=[{label:"Lets Encrypt",value:"letsEncrypt"},{label:"Zero SSL",value:"zeroSsl",selected:!0},{label:"Other",value:"other"}];i.onMounted(()=>{s.value==="zeroSsl"&&(l.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90")});const st=H=>{s.value=H.value,(H.value==="zeroSsl"||H.value==="other")&&(H.value==="zeroSsl"?l.formModel["config-api_uri"]="https://acme.zerossl.com/v2/DV90":l.formModel["config-api_uri"]="https://acme.example.com/",l.formModel["config-tos_accepted"]=!1),H.value==="letsEncrypt"&&(l.formModel["config-api_uri"]="https://acme-v02.api.letsencrypt.org/directory",l.formModel["config-eab_hmac_key"]="",l.formModel["config-eab_kid"]=""),l.onModelUpdated()},fe=(H,Y)=>{Y==="config-storage"&&(m.value=H),l.onModelUpdated()};return(H,Y)=>{const ce=i.resolveComponent("KSelect"),Te=i.resolveComponent("KTabs");return i.openBlock(),i.createElementBlock("div",null,[n.formModel.id&&n.isEditing||!n.isEditing?(i.openBlock(),i.createBlock(be,{key:0,class:"global-fields",model:n.formModel,options:n.formOptions,schema:h.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),i.createVNode(Te,{tabs:we},{general:i.withCtx(()=>[i.createElementVNode("div",Df,[xf,Lf,J.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:u.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),Uf,i.createVNode(ce,{appearance:"select",class:"issuer-select",items:et,label:"Issuer",onChange:st}),i.createElementVNode("div",Rf,[s.value==="letsEncrypt"?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:i.unref(xo),onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),s.value==="zeroSsl"||s.value==="other"?(i.openBlock(),i.createBlock(be,{key:1,model:n.formModel,options:n.formOptions,schema:i.unref(Lo),onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])])]),storage:i.withCtx(()=>[i.createElementVNode("div",Pf,[qf,zf,J.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:b.value,onModelUpdated:fe},null,8,["model","options","schema"])):i.createCommentVNode("",!0),i.createElementVNode("div",Hf,[m.value==="consul"?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:g.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),m.value==="redis"?(i.openBlock(),i.createBlock(be,{key:1,model:n.formModel,options:n.formOptions,schema:T.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),m.value==="shm"?(i.openBlock(),i.createBlock(be,{key:2,model:n.formModel,options:n.formOptions,schema:A.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0),m.value==="vault"?(i.openBlock(),i.createBlock(be,{key:3,model:n.formModel,options:n.formOptions,schema:V.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])])]),advanced:i.withCtx(()=>[i.createElementVNode("div",Wf,[Kf,Yf,J.value?(i.openBlock(),i.createBlock(be,{key:0,model:n.formModel,options:n.formOptions,schema:j.value,onModelUpdated:n.onModelUpdated},null,8,["model","options","schema","onModelUpdated"])):i.createCommentVNode("",!0)])]),_:1})])}}}),Jb="",Zf=Object.freeze(Object.defineProperty({__proto__:null,ACMEForm:P(Gf,[["__scopeId","data-v-bc6f1e04"]]),ExitTransformer:Of,OIDCForm:Ff,PostFunction:$f},Symbol.toStringTag,{value:"Module"})),Jf=["array","metric","advanced","selectionGroup","object-advanced"],Xf={install:n=>{n.component("VueFormGenerator",be)}},Qf=(n,l=!1)=>({...l&&{acme:"ACMEForm"},"openid-connect":"OIDCForm","post-function":"PostFunction","pre-function":"PostFunction","exit-transformer":"ExitTransformer"})[n];Ee.FORMS_API_KEY=bt,Ee.VueFormGenerator=be,Ee.abstractField=Ba,Ee.customFields=Jf,Ee.default=Xf,Ee.getSharedFormName=Qf,Ee.sharedForms=Zf,Object.defineProperties(Ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vue-form-generator .field-checkbox input{margin-left:12px}.vue-form-generator .field-checklist .listbox,.vue-form-generator .field-checklist .dropList{height:auto;max-height:150px;overflow:auto}.vue-form-generator .field-checklist .listbox .list-row label,.vue-form-generator .field-checklist .dropList .list-row label{font-weight:initial}.vue-form-generator .field-checklist .listbox .list-row input,.vue-form-generator .field-checklist .dropList .list-row input{margin-right:4px}.vue-form-generator .field-checklist .combobox{height:initial;overflow:hidden}.vue-form-generator .field-checklist .combobox .mainRow{cursor:pointer;padding-right:10px;position:relative}.vue-form-generator .field-checklist .combobox .mainRow .arrow{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAGdJREFUOI3tzjsOwjAURNGDUqSgTxU5K2AVrJtswjUsgHSR0qdxAZZFPrS+3ZvRzBsqf9MUtBtazJk+oMe0VTriiZCFX8nbpENMgfARjsn74vKj5IFruhfc8d6zIF9S/Hyk5HS4spMVeFcOjszaOwMAAAAASUVORK5CYII=);background-repeat:no-repeat;height:16px;position:absolute;right:-9px;top:3px;transform:rotate(0);transition:transform .5s;width:16px}.vue-form-generator .field-checklist .combobox .mainRow.expanded .arrow{transform:rotate(-180deg)}.vue-form-generator .field-checklist .combobox .dropList{transition:height .5s}.vue-form-generator .field-input .wrapper,.vue-form-generator .field-input input[type=radio]{width:100%}.vue-form-generator .field-input input[type=color]{width:60px}.vue-form-generator .field-input input[type=range]{padding:0}.vue-form-generator .field-label span{display:block;margin-left:12px;width:100%}.vue-form-generator .field-radios .radio-list label{display:block}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:5px}.vue-form-generator .field-submit input{background-color:#337ab7!important;border-color:#2e6da4!important;color:#fff!important}.vue-form-generator .field-input .wrapper{width:100%}.vue-form-generator .field-input .helper{margin:auto 7px}.vue-form-generator .field-image .wrapper{width:100%}.vue-form-generator .field-image .preview{background-position:center center;background-repeat:no-repeat;background-size:contain;border:1px solid #ccc;border-radius:3px;box-shadow:inset 0 1px 1px #00000013;height:100px;margin-top:5px;position:relative}.vue-form-generator .field-image .preview .remove{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAXUlEQVR42u2SwQoAIAhD88vVLy8KBlaS0i1oJwP3piGVg0Skmpq8HjqZrWl9uwCbGAmwKYGZs/6iqgMyAdJuM8W2QmYKpLt/0AG9ASCv/oAnANd3AEjmAlFT1BypAV+PnRH5YehvAAAAAElFTkSuQmCC);bottom:3px;font-size:16px;height:16px;opacity:.7;position:absolute;right:3px;width:16px}.vue-form-generator .field-image .preview .remove:hover{cursor:pointer;opacity:1}.vue-form-generator .field-noUiSlider .field-wrap{display:block}.vue-form-generator .field-noUiSlider .contain-pips{margin-bottom:30px}.vue-form-generator .field-noUiSlider .contain-tooltip{margin-top:30px}.vue-form-generator .field-noUiSlider .noUi-vertical{height:200px;margin:10px 0}.vue-form-generator .field-rangeSlider .irs{width:100%}.vue-form-generator .field-selectEx .bootstrap-select .dropdown-menu li.selected .text{font-weight:700}.vue-form-generator .field-staticMap img{display:block;max-width:100%;width:auto}.vue-form-generator .field-switch .field-wrap label{border-radius:15px;box-shadow:inset 0 -1px #fff,inset 0 1px 1px #0000000d;cursor:pointer;display:block;height:30px;margin:0 10px 10px 0;padding:0;position:relative;width:120px}.vue-form-generator .field-switch input{left:0;opacity:0;position:absolute;top:0}.vue-form-generator .field-switch .label{background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px #0000001f,inset 0 0 2px #00000026;display:block;font-size:10px;height:inherit;position:relative;text-transform:uppercase}.vue-form-generator .field-switch .label:before,.vue-form-generator .field-switch .label:after{line-height:1;margin-top:-7px;position:absolute;top:50%;-webkit-transition:inherit;-moz-transition:inherit;-o-transition:inherit;transition:inherit}.vue-form-generator .field-switch .label:before{color:#aaa;content:attr(data-off);right:11px;text-shadow:0 1px rgba(255,255,255,.5)}.vue-form-generator .field-switch .label:after{color:#fff;content:attr(data-on);left:11px;opacity:0;text-shadow:0 1px rgba(0,0,0,.2)}.vue-form-generator .field-switch input:checked~.label{background:#e1b42b;box-shadow:inset 0 1px 2px #00000026,inset 0 0 3px #0003}.vue-form-generator .field-switch input:checked~.label:before{opacity:0}.vue-form-generator .field-switch input:checked~.label:after{opacity:1}.vue-form-generator .field-switch .handle{background:linear-gradient(to bottom,#ffffff 40%,#f0f0f0);background-image:-webkit-linear-gradient(top,#ffffff 40%,#f0f0f0);border-radius:100%;box-shadow:1px 1px 5px #0003;height:28px;left:1px;position:absolute;top:1px;width:28px}.vue-form-generator .field-switch .handle:before{background:linear-gradient(to bottom,#eeeeee,#ffffff);background-image:-webkit-linear-gradient(top,#eeeeee,#ffffff);border-radius:6px;box-shadow:inset 0 1px #00000005;content:"";height:12px;left:50%;margin:-6px 0 0 -6px;position:absolute;top:50%;width:12px}.vue-form-generator .field-switch input:checked~.handle{box-shadow:-1px 1px 5px #0003;left:91px;left:calc(100% - 29px)}.vue-form-generator .field-switch .label,.vue-form-generator .field-switch .handle{transition:all .3s ease}.object-advanced-wrapper[data-v-22600a29]{width:100%}.item-wrapper[data-v-22600a29]{margin-left:28px}.index-wrapper[data-v-22600a29]{align-items:center;display:flex;justify-content:space-between;margin-top:4px}.divider[data-v-22600a29]{margin-bottom:8px;margin-top:8px}.wide-divider[data-v-22600a29]{margin-bottom:16px;margin-top:16px}.input-wrapper[data-v-22600a29]{margin-right:16px;margin-top:16px}.input-wrapper .indent[data-v-22600a29]{margin-left:28px}.input-item[data-v-22600a29],.input-item .form-control[data-v-22600a29]{display:flex}.input-item .k-button[data-v-22600a29]{display:flex;margin-left:20px;margin-right:20px}.vue-form-generator .field-wrap button.delete,.vue-form-generator .field-wrap button.delete:hover{background:none;border:none}.array-item[data-v-d42daeb2]{display:flex;width:100%}.array-item .delete[data-v-d42daeb2]{height:100%;margin-left:20px}.vue-form-generator .field-wrap button.delete[data-v-47ff1f9a],.vue-form-generator .field-wrap button.delete[data-v-47ff1f9a]:hover{background:#d60027;border:none}.multi-item-wrapper[data-v-47ff1f9a]{width:100%}.label-hint[data-v-47ff1f9a]{font-weight:300;padding:8px;text-align:center}.slide-fade-enter-active,.slide-fade-leave-active{padding:0;transition:all .5s}.slide-fade-enter-from,.slide-fade-leave-to{max-height:0!important}.metrics-wrapper{width:100%}.metrics-wrapper .btn,.metrics-wrapper .metrics-wrapper i{cursor:pointer}.field-dropdown .title{align-items:center;background-color:#f9fafb;border-bottom:1px solid #eee;cursor:pointer;display:flex;height:45px;padding:0 16px 0 5px;position:relative;transition:transform .2s cubic-bezier(.41,.35,1,.28) 0s,background-color .2s ease-in;width:100%}.field-dropdown .title:hover{background-color:#f5f5f5}.field-dropdown .metric-add-icon{margin-left:auto;transition:all .7s;-webkit-user-select:none;user-select:none}.field-dropdown .content{border:1px solid #eee;border-top:0;height:auto;overflow:hidden;transition:all .5s}.field-dropdown .content .metric-remove-button{float:right;margin-bottom:16px;margin-right:16px}.field-dropdown .content .vue-form-generator{padding:16px}.field-dropdown.active .title .metric-add-icon{transform:rotate(45deg)}.autosuggest[data-v-27d6a440]{width:100%}.k-select[data-v-27d6a440]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-27d6a440]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-27d6a440]:last-child{opacity:.7}.field-span[data-v-27d6a440]{display:flex;justify-content:space-between}.autosuggest .k-select .k-select-list .k-select-item button:active{box-shadow:none}.autosuggest .k-select .k-select-list .k-select-item button:active:not(.selected){background-color:#f9fafb}.array-card-container-wrapper{width:100%}.array-card-container-wrapper .kong-card{width:50%}.array-card-container[data-v-d409fd75]{align-items:center;display:flex}.array-card-container .card[data-v-d409fd75]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-d409fd75]{margin-left:12px}.selection-group[data-v-705e327d]{margin-bottom:8px;width:100%}.selection-group .form-group[data-v-705e327d]{margin-bottom:0}.field-advanced[data-v-2d8e71e1]{margin-bottom:32px!important;margin-top:-16px}.advanced-field-dropdown-wrapper[data-v-2d8e71e1]{display:flex;flex-direction:column;width:100%}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]{align-items:center;color:#07c;cursor:pointer;display:flex;font-size:inherit;margin-top:16px;order:2;padding:0}.advanced-field-dropdown-wrapper .advanced-field-title i[data-v-2d8e71e1]{color:#07c;font-size:16px}.advanced-field-dropdown-wrapper .advanced-field-title:hover span[data-v-2d8e71e1]{color:#07c;text-decoration:underline}.advanced-field-dropdown-wrapper .advanced-field-dropdown[data-v-2d8e71e1]{display:block;height:auto;max-height:100%;position:relative;width:100%}.advanced-field-dropdown-wrapper .advanced-field-dropdown.closed[data-v-2d8e71e1]{max-height:0;overflow:hidden}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1],.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]:focus,.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]:hover{background-color:transparent!important;border:none!important;cursor:pointer!important;font-weight:400!important}.field-selectionGroup>label{display:none}.field-selectionGroup .control-help{color:#00000073;font-weight:400;margin-left:32px;width:100%}.field-selectionGroup .form-check-input{margin-bottom:8px;margin-right:8px}.field-selectionGroup .option-field{margin-top:16px}.field-selectionGroup .option-field .form-group{margin-bottom:16px}.field-selectionGroup .k-input-label{display:block}.selection-group[data-v-cd14c14b]{width:100%}.selection-group .form-group[data-v-cd14c14b],.selection-group .option-field-container[data-v-cd14c14b]{margin-bottom:0}.form-group:not([class*=" col-"]){width:100%}.form-group{display:inline-block;margin-bottom:16px;vertical-align:top}.form-group label{font-weight:400}.form-group label>:first-child{display:inline-block}.form-group label>div[role=button]{display:inline-block}.form-group.featured>label{font-weight:700}.form-group.required>label:after{color:red;content:"*";font-size:14px;font-weight:400;padding-left:3px}.form-group.disabled>label{color:#666;font-style:italic}.form-group.error input:not([type=checkbox]),.form-group.error textarea,.form-group.error select{background-color:#ff000026;border:1px solid #f00}.form-group.error .errors{color:red;font-size:12px}.form-group.error .errors span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiklEQVR4Xt2TMQoCQQxF3xdhu72MpZU3GU/meBFLOztPYrVWsQmEWSaMsIXgK8P8RyYkMjO2sAN+K9gTIAmDAlzoUzE7p4IFytvDCQWJKSStYB2efcAvqZFM0BcstMx5naSDYFzfLhh/4SmRM+6Agw/xIX0tKEDFufeDNRUc4XqLRz3qabVIf3BMHwl6Ktexn3nmAAAAAElFTkSuQmCC);background-repeat:no-repeat;display:block;font-weight:600;margin-top:3px;padding-left:17px;padding-top:0}.form-group-label[data-v-e016d4ec]{display:flex;justify-content:space-between}.icon-wrapper[data-v-e016d4ec]{display:flex!important}.link-wrapper[data-v-e016d4ec]{margin-left:4px}.vue-form-generator *{box-sizing:border-box}.vue-form-generator .form-group{margin-bottom:24px}.vue-form-generator .form-group:last-child{margin-bottom:32px}.vue-form-generator .form-group.hide-label>label{display:none}.vue-form-generator .form-group label{font-weight:500}.vue-form-generator .field-advanced{margin-bottom:8px;margin-top:-8px}.vue-form-generator .field-advanced .form-group:last-child{margin-bottom:16px}.vue-form-generator .k-input[type=text]{width:100%}.vue-form-generator .form-control{background-color:#fff;background-image:none;border:none;border-radius:3px;box-shadow:inset 0 0 0 1px #e7e7ec;box-sizing:border-box;color:#52596e;display:block;font-size:16px;line-height:24px;padding:8px 16px;transition:color .1s ease,box-shadow .1s ease,border-color ease-in-out .15s;width:100%}.vue-form-generator .form-control:hover{box-shadow:inset 0 0 0 1px #bdd3f9}.vue-form-generator .form-control:focus{box-shadow:inset 0 0 0 1px #3972d5;outline:none}.vue-form-generator .form-control:not([class*=" col-"]){width:100%}.vue-form-generator div.help{margin-left:4px;position:relative}.vue-form-generator div.help .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA+UlEQVQ4ja3TS0oDQRAG4C8+lq7ceICICoLGK7iXuNBbeAMJuPVOIm7cqmDiIncIggg+cMZFaqCnZyYKWtB0df31V1VXdfNH6S2wD9CP8xT3KH8T9BiTcE7XBMOfyBcogvCFO9ziLWwFRosyV+QxthNsA9dJkEYlvazsQdi3sBv6Ol6TBLX+HWT3fcQZ3vGM5fBLk+ynAU41m1biCXvhs4OPBDuBpa6GxF0P8YAj3GA1d1qJfdoS4DOIcIm1DK9x8iaWeDF/SP3QU6zRROpjLDFLsFlibx1jJaMkSIGrWKntvItcyTBKzCcybsvc9ZmYz3kz9Ooz/b98A8yvW13B3ch6AAAAAElFTkSuQmCC);background-position:center center;background-repeat:no-repeat;display:inline-block;height:14px;width:16px}.vue-form-generator .field-wrap{display:flex}.vue-form-generator .field-wrap .buttons{margin-left:4px;white-space:nowrap}.vue-form-generator .field-wrap button,.vue-form-generator .field-wrap input[type=submit]{background-color:#fff;border:1px solid #ccc;border-radius:4px;color:#333;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;line-height:1.42857143;margin:0;padding:6px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.vue-form-generator .field-wrap button:not(:last-child),.vue-form-generator .field-wrap input[type=submit]:not(:last-child){margin-right:4px}.vue-form-generator .field-wrap button:hover,.vue-form-generator .field-wrap input[type=submit]:hover{background-color:#e6e6e6;color:#333}.vue-form-generator .field-wrap button:active,.vue-form-generator .field-wrap input[type=submit]:active{background-color:#d4d4d4;border-color:#8c8c8c;box-shadow:inset 0 3px 5px #00000020;color:#333;outline:0}.vue-form-generator .field-wrap button:disabled,.vue-form-generator .field-wrap input[type=submit]:disabled{cursor:not-allowed;opacity:.6}.vue-form-generator .hint{font-size:12px;font-style:italic}.vue-form-generator .field-switch .field-wrap input[type=checkbox]{position:absolute}.vue-form-generator .field-switch .field-wrap input[type=checkbox]:checked~.label{background-color:#0044f4;box-shadow:none}.vue-form-generator .field-switch .field-wrap input[type=checkbox]:checked~.handle{left:calc(100% - 22px)}.vue-form-generator .field-switch .field-wrap label{box-shadow:none;height:24px;margin:0;width:44px}.vue-form-generator .field-switch .label{background-color:#f9fafb;box-shadow:none}.vue-form-generator .field-switch .label:before,.vue-form-generator .field-switch .label:after{color:#000000b3;font-size:14px;font-weight:400;left:18px;margin-left:42px;text-shadow:none;text-transform:none;width:max-content}.vue-form-generator .field-switch .handle{background:#fff;box-shadow:none;height:20px;left:2px;top:2px;width:20px}.vue-form-generator .field-switch .handle:before{background:none;box-shadow:none}.vue-form-generator div.help .icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+ICA8cGF0aCBmaWxsPSIjMDA4NkU2IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDExYy0yLjc2MSAwLTUtMi4yMzktNS01czIuMjM5LTUgNS01IDUgMi4yMzkgNSA1LTIuMjM5IDUtNSA1TTYgMEMyLjY4NiAwIDAgMi42ODYgMCA2czIuNjg2IDYgNiA2IDYtMi42ODYgNi02LTIuNjg2LTYtNi02bTAgM2MtMS4xMDUgMC0yIC44OTUtMiAyaDFjMC0uNTUyLjQ0OC0xIDEtMXMxIC40NDggMSAxLS40NDggMS0xIDEtMSAuNDQ4LTEgMWgxYzEuMTA1IDAgMi0uODk1IDItMnMtLjg5NS0yLTItMnpNNSA5aDJWOEg1djF6Ii8+PC9zdmc+);height:12px;width:12px}.vue-form-generator .field-wrap button.danger:hover,.vue-form-generator .field-wrap input[type=submit].danger:hover,.vue-form-generator .field-wrap button.danger:active,.vue-form-generator .field-wrap input[type=submit].danger:active{background-color:#fff;box-shadow:none;color:#fff}.vue-form-generator .field-wrap button.tertiary:hover,.vue-form-generator .field-wrap input[type=submit].tertiary:hover,.vue-form-generator .field-wrap button.tertiary:active,.vue-form-generator .field-wrap input[type=submit].tertiary:active{background-color:#fff;box-shadow:none;color:#0044f4}.vue-form-generator .field-checkbox{align-items:center;display:flex}.vue-form-generator .field-checkbox label{margin:0;order:1}.vue-form-generator .field-checkbox input{margin-left:0;margin-right:12px}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:10px}.vue-form-generator label{font-weight:500}.vue-form-generator .form-group input[type=radio]{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid currentColor;border-radius:100%;color:#0044f4;display:inline-flex;height:20px;justify-content:center;width:20px}.vue-form-generator .form-group input[type=radio]:after{border-radius:100%;content:"";height:10px;width:10px}.vue-form-generator .form-group input[type=radio]:checked:after{background-color:currentColor}.global-fields.VueFormGenerator .form-group:last-child{margin-bottom:24px}.general-settings .VueFormGenerator .form-group:last-child{margin-bottom:0}.general-settings .k-input-label{margin-bottom:8px;margin-top:24px}.general-settings .auth-method-container{display:flex;flex-wrap:wrap}.general-settings .auth-method-container .auth-method{margin-bottom:8px;width:50%}.general-settings .k-switch{margin:24px 0}.advanced-field-dropdown.closed{margin-bottom:32px}.advanced-field-dropdown.open{margin-top:8px}.section-header[data-v-5ac1c38b]{color:#000000d9;font-size:16px;font-weight:500;line-height:20px}.description[data-v-5ac1c38b]{color:#00000073;margin-bottom:12px}.description a[data-v-5ac1c38b]{display:inline}.link-wrapper[data-v-5ac1c38b]{margin-bottom:8px}.issuer-select[data-v-bc6f1e04]{margin-bottom:16px;width:100%}.header-wrapper[data-v-bc6f1e04]{margin-bottom:8px}.sub-form[data-v-bc6f1e04]{margin-left:24px}.description[data-v-bc6f1e04]{margin-bottom:12px}
|
|
1
|
+
.vue-form-generator .field-checkbox input{margin-left:12px}.vue-form-generator .field-checklist .listbox,.vue-form-generator .field-checklist .dropList{height:auto;max-height:150px;overflow:auto}.vue-form-generator .field-checklist .listbox .list-row label,.vue-form-generator .field-checklist .dropList .list-row label{font-weight:initial}.vue-form-generator .field-checklist .listbox .list-row input,.vue-form-generator .field-checklist .dropList .list-row input{margin-right:4px}.vue-form-generator .field-checklist .combobox{height:initial;overflow:hidden}.vue-form-generator .field-checklist .combobox .mainRow{cursor:pointer;padding-right:10px;position:relative}.vue-form-generator .field-checklist .combobox .mainRow .arrow{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAGdJREFUOI3tzjsOwjAURNGDUqSgTxU5K2AVrJtswjUsgHSR0qdxAZZFPrS+3ZvRzBsqf9MUtBtazJk+oMe0VTriiZCFX8nbpENMgfARjsn74vKj5IFruhfc8d6zIF9S/Hyk5HS4spMVeFcOjszaOwMAAAAASUVORK5CYII=);background-repeat:no-repeat;height:16px;position:absolute;right:-9px;top:3px;transform:rotate(0);transition:transform .5s;width:16px}.vue-form-generator .field-checklist .combobox .mainRow.expanded .arrow{transform:rotate(-180deg)}.vue-form-generator .field-checklist .combobox .dropList{transition:height .5s}.vue-form-generator .field-input .wrapper,.vue-form-generator .field-input input[type=radio]{width:100%}.vue-form-generator .field-input input[type=color]{width:60px}.vue-form-generator .field-input input[type=range]{padding:0}.vue-form-generator .field-label span{display:block;margin-left:12px;width:100%}.vue-form-generator .field-radios .radio-list label{display:block}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:5px}.vue-form-generator .field-submit input{background-color:#337ab7!important;border-color:#2e6da4!important;color:#fff!important}.vue-form-generator .field-input .wrapper{width:100%}.vue-form-generator .field-input .helper{margin:auto 7px}.vue-form-generator .field-image .wrapper{width:100%}.vue-form-generator .field-image .preview{background-position:center center;background-repeat:no-repeat;background-size:contain;border:1px solid #ccc;border-radius:3px;box-shadow:inset 0 1px 1px #00000013;height:100px;margin-top:5px;position:relative}.vue-form-generator .field-image .preview .remove{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAXUlEQVR42u2SwQoAIAhD88vVLy8KBlaS0i1oJwP3piGVg0Skmpq8HjqZrWl9uwCbGAmwKYGZs/6iqgMyAdJuM8W2QmYKpLt/0AG9ASCv/oAnANd3AEjmAlFT1BypAV+PnRH5YehvAAAAAElFTkSuQmCC);bottom:3px;font-size:16px;height:16px;opacity:.7;position:absolute;right:3px;width:16px}.vue-form-generator .field-image .preview .remove:hover{cursor:pointer;opacity:1}.vue-form-generator .field-noUiSlider .field-wrap{display:block}.vue-form-generator .field-noUiSlider .contain-pips{margin-bottom:30px}.vue-form-generator .field-noUiSlider .contain-tooltip{margin-top:30px}.vue-form-generator .field-noUiSlider .noUi-vertical{height:200px;margin:10px 0}.vue-form-generator .field-rangeSlider .irs{width:100%}.vue-form-generator .field-selectEx .bootstrap-select .dropdown-menu li.selected .text{font-weight:700}.vue-form-generator .field-staticMap img{display:block;max-width:100%;width:auto}.vue-form-generator .field-switch .field-wrap label{border-radius:15px;box-shadow:inset 0 -1px #fff,inset 0 1px 1px #0000000d;cursor:pointer;display:block;height:30px;margin:0 10px 10px 0;padding:0;position:relative;width:120px}.vue-form-generator .field-switch input{left:0;opacity:0;position:absolute;top:0}.vue-form-generator .field-switch .label{background:#eceeef;border-radius:inherit;box-shadow:inset 0 1px 2px #0000001f,inset 0 0 2px #00000026;display:block;font-size:10px;height:inherit;position:relative;text-transform:uppercase}.vue-form-generator .field-switch .label:before,.vue-form-generator .field-switch .label:after{line-height:1;margin-top:-7px;position:absolute;top:50%;-webkit-transition:inherit;-moz-transition:inherit;-o-transition:inherit;transition:inherit}.vue-form-generator .field-switch .label:before{color:#aaa;content:attr(data-off);right:11px;text-shadow:0 1px rgba(255,255,255,.5)}.vue-form-generator .field-switch .label:after{color:#fff;content:attr(data-on);left:11px;opacity:0;text-shadow:0 1px rgba(0,0,0,.2)}.vue-form-generator .field-switch input:checked~.label{background:#e1b42b;box-shadow:inset 0 1px 2px #00000026,inset 0 0 3px #0003}.vue-form-generator .field-switch input:checked~.label:before{opacity:0}.vue-form-generator .field-switch input:checked~.label:after{opacity:1}.vue-form-generator .field-switch .handle{background:linear-gradient(to bottom,#ffffff 40%,#f0f0f0);background-image:-webkit-linear-gradient(top,#ffffff 40%,#f0f0f0);border-radius:100%;box-shadow:1px 1px 5px #0003;height:28px;left:1px;position:absolute;top:1px;width:28px}.vue-form-generator .field-switch .handle:before{background:linear-gradient(to bottom,#eeeeee,#ffffff);background-image:-webkit-linear-gradient(top,#eeeeee,#ffffff);border-radius:6px;box-shadow:inset 0 1px #00000005;content:"";height:12px;left:50%;margin:-6px 0 0 -6px;position:absolute;top:50%;width:12px}.vue-form-generator .field-switch input:checked~.handle{box-shadow:-1px 1px 5px #0003;left:91px;left:calc(100% - 29px)}.vue-form-generator .field-switch .label,.vue-form-generator .field-switch .handle{transition:all .3s ease}.object-advanced-wrapper[data-v-22600a29]{width:100%}.item-wrapper[data-v-22600a29]{margin-left:28px}.index-wrapper[data-v-22600a29]{align-items:center;display:flex;justify-content:space-between;margin-top:4px}.divider[data-v-22600a29]{margin-bottom:8px;margin-top:8px}.wide-divider[data-v-22600a29]{margin-bottom:16px;margin-top:16px}.input-wrapper[data-v-22600a29]{margin-right:16px;margin-top:16px}.input-wrapper .indent[data-v-22600a29]{margin-left:28px}.input-item[data-v-22600a29],.input-item .form-control[data-v-22600a29]{display:flex}.input-item .k-button[data-v-22600a29]{display:flex;margin-left:20px;margin-right:20px}.vue-form-generator .field-wrap button.delete,.vue-form-generator .field-wrap button.delete:hover{background:none;border:none}.array-item[data-v-d42daeb2]{display:flex;width:100%}.array-item .delete[data-v-d42daeb2]{height:100%;margin-left:20px}.vue-form-generator .field-wrap button.delete[data-v-47ff1f9a],.vue-form-generator .field-wrap button.delete[data-v-47ff1f9a]:hover{background:#d60027;border:none}.multi-item-wrapper[data-v-47ff1f9a]{width:100%}.label-hint[data-v-47ff1f9a]{font-weight:300;padding:8px;text-align:center}.slide-fade-enter-active,.slide-fade-leave-active{padding:0;transition:all .5s}.slide-fade-enter-from,.slide-fade-leave-to{max-height:0!important}.metrics-wrapper{width:100%}.metrics-wrapper .btn,.metrics-wrapper .metrics-wrapper i{cursor:pointer}.field-dropdown .title{align-items:center;background-color:#f9fafb;border-bottom:1px solid #eee;cursor:pointer;display:flex;height:45px;padding:0 16px 0 5px;position:relative;transition:transform .2s cubic-bezier(.41,.35,1,.28) 0s,background-color .2s ease-in;width:100%}.field-dropdown .title:hover{background-color:#f5f5f5}.field-dropdown .metric-add-icon{margin-left:auto;transition:all .7s;-webkit-user-select:none;user-select:none}.field-dropdown .content{border:1px solid #eee;border-top:0;height:auto;overflow:hidden;transition:all .5s}.field-dropdown .content .metric-remove-button{float:right;margin-bottom:16px;margin-right:16px}.field-dropdown .content .vue-form-generator{padding:16px}.field-dropdown.active .title .metric-add-icon{transform:rotate(45deg)}.autosuggest[data-v-27d6a440]{width:100%}.k-select[data-v-27d6a440]{border:none!important;padding:0!important}.k-select .autosuggest__results_message[data-v-27d6a440]{color:#000000b3;font-size:14px;padding:8px 0;text-align:center}.k-select .k-select-item-label span[data-v-27d6a440]:last-child{opacity:.7}.field-span[data-v-27d6a440]{display:flex;justify-content:space-between}.autosuggest .k-select .k-select-list .k-select-item button:active{box-shadow:none}.autosuggest .k-select .k-select-list .k-select-item button:active:not(.selected){background-color:#f9fafb}.array-card-container-wrapper{width:100%}.array-card-container-wrapper .kong-card{width:50%}.array-card-container[data-v-d409fd75]{align-items:center;display:flex}.array-card-container .card[data-v-d409fd75]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-d409fd75]{margin-left:12px}.selection-group[data-v-7e49acd6]{margin-bottom:8px;width:100%}.selection-group .form-group[data-v-7e49acd6]{margin-bottom:0}.field-advanced[data-v-2d8e71e1]{margin-bottom:32px!important;margin-top:-16px}.advanced-field-dropdown-wrapper[data-v-2d8e71e1]{display:flex;flex-direction:column;width:100%}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]{align-items:center;color:#07c;cursor:pointer;display:flex;font-size:inherit;margin-top:16px;order:2;padding:0}.advanced-field-dropdown-wrapper .advanced-field-title i[data-v-2d8e71e1]{color:#07c;font-size:16px}.advanced-field-dropdown-wrapper .advanced-field-title:hover span[data-v-2d8e71e1]{color:#07c;text-decoration:underline}.advanced-field-dropdown-wrapper .advanced-field-dropdown[data-v-2d8e71e1]{display:block;height:auto;max-height:100%;position:relative;width:100%}.advanced-field-dropdown-wrapper .advanced-field-dropdown.closed[data-v-2d8e71e1]{max-height:0;overflow:hidden}.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1],.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]:focus,.advanced-field-dropdown-wrapper .advanced-field-title[data-v-2d8e71e1]:hover{background-color:transparent!important;border:none!important;cursor:pointer!important;font-weight:400!important}.field-selectionGroup>label{display:none}.field-selectionGroup .control-help{color:#00000073;font-weight:400;margin-left:32px;width:100%}.field-selectionGroup .form-check-input{margin-bottom:8px;margin-right:8px}.field-selectionGroup .option-field{margin-top:16px}.field-selectionGroup .option-field .form-group{margin-bottom:16px}.field-selectionGroup .k-label{display:block}.selection-group[data-v-25fe24da]{width:100%}.selection-group .form-group[data-v-25fe24da],.selection-group .option-field-container[data-v-25fe24da]{margin-bottom:0}.form-group:not([class*=" col-"]){width:100%}.form-group{display:inline-block;margin-bottom:16px;vertical-align:top}.form-group label{font-weight:400}.form-group label>:first-child{display:inline-block}.form-group label>div[role=button]{display:inline-block}.form-group.featured>label{font-weight:700}.form-group.required>label:after{color:red;content:"*";font-size:14px;font-weight:400;padding-left:3px}.form-group.disabled>label{color:#666;font-style:italic}.form-group.error input:not([type=checkbox]),.form-group.error textarea,.form-group.error select{background-color:#ff000026;border:1px solid #f00}.form-group.error .errors{color:red;font-size:12px}.form-group.error .errors span{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiklEQVR4Xt2TMQoCQQxF3xdhu72MpZU3GU/meBFLOztPYrVWsQmEWSaMsIXgK8P8RyYkMjO2sAN+K9gTIAmDAlzoUzE7p4IFytvDCQWJKSStYB2efcAvqZFM0BcstMx5naSDYFzfLhh/4SmRM+6Agw/xIX0tKEDFufeDNRUc4XqLRz3qabVIf3BMHwl6Ktexn3nmAAAAAElFTkSuQmCC);background-repeat:no-repeat;display:block;font-weight:600;margin-top:3px;padding-left:17px;padding-top:0}.form-group-label[data-v-e016d4ec]{display:flex;justify-content:space-between}.icon-wrapper[data-v-e016d4ec]{display:flex!important}.link-wrapper[data-v-e016d4ec]{margin-left:4px}.vue-form-generator *{box-sizing:border-box}.vue-form-generator .form-group{margin-bottom:24px}.vue-form-generator .form-group:last-child{margin-bottom:32px}.vue-form-generator .form-group.hide-label>label{display:none}.vue-form-generator .form-group label{font-weight:500}.vue-form-generator .field-advanced{margin-bottom:8px;margin-top:-8px}.vue-form-generator .field-advanced .form-group:last-child{margin-bottom:16px}.vue-form-generator .k-input[type=text]{width:100%}.vue-form-generator .form-control{background-color:#fff;background-image:none;border:none;border-radius:3px;box-shadow:inset 0 0 0 1px #e7e7ec;box-sizing:border-box;color:#52596e;display:block;font-size:16px;line-height:24px;padding:8px 16px;transition:color .1s ease,box-shadow .1s ease,border-color ease-in-out .15s;width:100%}.vue-form-generator .form-control:hover{box-shadow:inset 0 0 0 1px #bdd3f9}.vue-form-generator .form-control:focus{box-shadow:inset 0 0 0 1px #3972d5;outline:none}.vue-form-generator .form-control:not([class*=" col-"]){width:100%}.vue-form-generator div.help{margin-left:4px;position:relative}.vue-form-generator div.help .icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA+UlEQVQ4ja3TS0oDQRAG4C8+lq7ceICICoLGK7iXuNBbeAMJuPVOIm7cqmDiIncIggg+cMZFaqCnZyYKWtB0df31V1VXdfNH6S2wD9CP8xT3KH8T9BiTcE7XBMOfyBcogvCFO9ziLWwFRosyV+QxthNsA9dJkEYlvazsQdi3sBv6Ol6TBLX+HWT3fcQZ3vGM5fBLk+ynAU41m1biCXvhs4OPBDuBpa6GxF0P8YAj3GA1d1qJfdoS4DOIcIm1DK9x8iaWeDF/SP3QU6zRROpjLDFLsFlibx1jJaMkSIGrWKntvItcyTBKzCcybsvc9ZmYz3kz9Ooz/b98A8yvW13B3ch6AAAAAElFTkSuQmCC);background-position:center center;background-repeat:no-repeat;display:inline-block;height:14px;width:16px}.vue-form-generator .field-wrap{display:flex}.vue-form-generator .field-wrap .buttons{margin-left:4px;white-space:nowrap}.vue-form-generator .field-wrap button,.vue-form-generator .field-wrap input[type=submit]{background-color:#fff;border:1px solid #ccc;border-radius:4px;color:#333;cursor:pointer;display:inline-block;font-size:14px;font-weight:400;line-height:1.42857143;margin:0;padding:6px 12px;text-align:center;touch-action:manipulation;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.vue-form-generator .field-wrap button:not(:last-child),.vue-form-generator .field-wrap input[type=submit]:not(:last-child){margin-right:4px}.vue-form-generator .field-wrap button:hover,.vue-form-generator .field-wrap input[type=submit]:hover{background-color:#e6e6e6;color:#333}.vue-form-generator .field-wrap button:active,.vue-form-generator .field-wrap input[type=submit]:active{background-color:#d4d4d4;border-color:#8c8c8c;box-shadow:inset 0 3px 5px #00000020;color:#333;outline:0}.vue-form-generator .field-wrap button:disabled,.vue-form-generator .field-wrap input[type=submit]:disabled{cursor:not-allowed;opacity:.6}.vue-form-generator .hint{font-size:12px;font-style:italic}.vue-form-generator .field-switch .field-wrap input[type=checkbox]{position:absolute}.vue-form-generator .field-switch .field-wrap input[type=checkbox]:checked~.label{background-color:#0044f4;box-shadow:none}.vue-form-generator .field-switch .field-wrap input[type=checkbox]:checked~.handle{left:calc(100% - 22px)}.vue-form-generator .field-switch .field-wrap label{box-shadow:none;height:24px;margin:0;width:44px}.vue-form-generator .field-switch .label{background-color:#f9fafb;box-shadow:none}.vue-form-generator .field-switch .label:before,.vue-form-generator .field-switch .label:after{color:#000000b3;font-size:14px;font-weight:400;left:18px;margin-left:42px;text-shadow:none;text-transform:none;width:max-content}.vue-form-generator .field-switch .handle{background:#fff;box-shadow:none;height:20px;left:2px;top:2px;width:20px}.vue-form-generator .field-switch .handle:before{background:none;box-shadow:none}.vue-form-generator div.help .icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiI+ICA8cGF0aCBmaWxsPSIjMDA4NkU2IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02IDExYy0yLjc2MSAwLTUtMi4yMzktNS01czIuMjM5LTUgNS01IDUgMi4yMzkgNSA1LTIuMjM5IDUtNSA1TTYgMEMyLjY4NiAwIDAgMi42ODYgMCA2czIuNjg2IDYgNiA2IDYtMi42ODYgNi02LTIuNjg2LTYtNi02bTAgM2MtMS4xMDUgMC0yIC44OTUtMiAyaDFjMC0uNTUyLjQ0OC0xIDEtMXMxIC40NDggMSAxLS40NDggMS0xIDEtMSAuNDQ4LTEgMWgxYzEuMTA1IDAgMi0uODk1IDItMnMtLjg5NS0yLTItMnpNNSA5aDJWOEg1djF6Ii8+PC9zdmc+);height:12px;width:12px}.vue-form-generator .field-wrap button.danger:hover,.vue-form-generator .field-wrap input[type=submit].danger:hover,.vue-form-generator .field-wrap button.danger:active,.vue-form-generator .field-wrap input[type=submit].danger:active{background-color:#fff;box-shadow:none;color:#fff}.vue-form-generator .field-wrap button.tertiary:hover,.vue-form-generator .field-wrap input[type=submit].tertiary:hover,.vue-form-generator .field-wrap button.tertiary:active,.vue-form-generator .field-wrap input[type=submit].tertiary:active{background-color:#fff;box-shadow:none;color:#0044f4}.vue-form-generator .field-checkbox{align-items:center;display:flex}.vue-form-generator .field-checkbox label{margin:0;order:1}.vue-form-generator .field-checkbox input{margin-left:0;margin-right:12px}.vue-form-generator .field-radios .radio-list label input[type=radio]{margin-right:10px}.vue-form-generator label{font-weight:500}.vue-form-generator .form-group input[type=radio]{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid currentColor;border-radius:100%;color:#0044f4;display:inline-flex;height:20px;justify-content:center;width:20px}.vue-form-generator .form-group input[type=radio]:after{border-radius:100%;content:"";height:10px;width:10px}.vue-form-generator .form-group input[type=radio]:checked:after{background-color:currentColor}.global-fields.VueFormGenerator .form-group:last-child{margin-bottom:24px}.general-settings .VueFormGenerator .form-group:last-child{margin-bottom:0}.general-settings .k-label{margin-bottom:8px;margin-top:24px}.general-settings .auth-method-container{display:flex;flex-wrap:wrap}.general-settings .auth-method-container .auth-method{margin-bottom:8px;width:50%}.general-settings .k-switch{margin:24px 0}.advanced-field-dropdown.closed{margin-bottom:32px}.advanced-field-dropdown.open{margin-top:8px}.section-header[data-v-84760120]{color:#000000d9;font-size:16px;font-weight:500;line-height:20px}.description[data-v-84760120]{color:#00000073;margin-bottom:12px}.description a[data-v-84760120]{display:inline}.link-wrapper[data-v-84760120]{margin-bottom:8px}.issuer-select[data-v-bc6f1e04]{margin-bottom:16px;width:100%}.header-wrapper[data-v-bc6f1e04]{margin-bottom:8px}.sub-form[data-v-bc6f1e04]{margin-left:24px}.description[data-v-bc6f1e04]{margin-bottom:12px}
|