@budibase/server 1.4.8-alpha.11 → 1.4.8-alpha.12
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/builder/assets/{index.c595668e.js → index.20b2d716.js} +3 -3
- package/builder/index.html +1 -1
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/dist/api/routes/public/applications.js +5 -0
- package/dist/api/routes/public/queries.js +2 -0
- package/dist/api/routes/public/rows.js +5 -0
- package/dist/api/routes/public/tables.js +5 -0
- package/dist/api/routes/public/users.js +5 -0
- package/dist/package.json +6 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/specs/openapi.json +22 -0
- package/specs/openapi.yaml +22 -0
- package/src/api/routes/public/applications.ts +5 -0
- package/src/api/routes/public/queries.ts +2 -0
- package/src/api/routes/public/rows.ts +5 -0
- package/src/api/routes/public/tables.ts +5 -0
- package/src/api/routes/public/users.ts +5 -0
- package/src/definitions/openapi.ts +134 -447
|
@@ -448,7 +448,7 @@ __p += '`),Ln&&(mt+=`' +
|
|
|
448
448
|
function print() { __p += __j.call(arguments, '') }
|
|
449
449
|
`:`;
|
|
450
450
|
`)+mt+`return __p
|
|
451
|
-
}`;var vn=H5(function(){return Dt(ue,Ft+"return "+mt).apply(t,he)});if(vn.source=mt,Lp(vn))throw vn;return vn}function N4(d){return w1(d).toLowerCase()}function xp(d){return w1(d).toUpperCase()}function rm(d,v,M){if(d=w1(d),d&&(M||v===t))return W0(d);if(!d||!(v=ga(v)))return d;var F=No(d),Z=No(v),ue=s1(F,Z),he=Ro(F,Z)+1;return Xl(F,ue,he).join("")}function im(d,v,M){if(d=w1(d),d&&(M||v===t))return d.slice(0,xl(d)+1);if(!d||!(v=ga(v)))return d;var F=No(d),Z=Ro(F,No(v))+1;return Xl(F,0,Z).join("")}function am(d,v,M){if(d=w1(d),d&&(M||v===t))return d.replace(Gi,"");if(!d||!(v=ga(v)))return d;var F=No(d),Z=s1(F,No(v));return Xl(F,Z).join("")}function Du(d,v){var M=ee,F=te;if(Mo(v)){var Z="separator"in v?v.separator:Z;M="length"in v?hr(v.length):M,F="omission"in v?ga(v.omission):F}d=w1(d);var ue=d.length;if(no(d)){var he=No(d);ue=he.length}if(M>=ue)return d;var ye=M-Y0(F);if(ye<1)return F;var He=he?Xl(he,0,ye).join(""):d.slice(0,ye);if(Z===t)return He+F;if(he&&(ye+=He.length-ye),Cs(Z)){if(d.slice(ye).search(Z)){var st,et=He;for(Z.global||(Z=bo(Z.source,w1(Oa.exec(Z))+"g")),Z.lastIndex=0;st=Z.exec(et);)var mt=st.index;He=He.slice(0,mt===t?ye:mt)}}else if(d.indexOf(ga(Z),ye)!=ye){var Ct=He.lastIndexOf(Z);Ct>-1&&(He=He.slice(0,Ct))}return He+F}function tr(d){return d=w1(d),d&>.test(d)?d.replace(Hr,xs):d}var om=Zs(function(d,v,M){return d+(M?" ":"")+v.toUpperCase()}),Ll=Uc("toUpperCase");function uh(d,v,M){return d=w1(d),v=M?t:v,v===t?Pr(d)?J1(d):Gu(d):d.match(v)||[]}var H5=Fr(function(d,v){try{return Vo(d,t,v)}catch(M){return Lp(M)?M:new Yt(M)}}),F4=ws(function(d,v){return qa(v,function(M){M=xr(M),I1(d,M,sa(d[M],d))}),d});function jp(d){var v=d==null?0:d.length,M=kr();return d=v?Cn(d,function(F){if(typeof F[1]!="function")throw new C1(o);return[M(F[0]),F[1]]}):[],Fr(function(F){for(var Z=-1;++Z<v;){var ue=d[Z];if(Vo(ue[0],this,F))return Vo(ue[1],this,F)}})}function n2(d){return rc(p1(d,f))}function Up(d){return function(){return d}}function lm(d,v){return d==null||d!==d?v:d}var sm=O2(),qp=O2(!0);function v0(d){return d}function Wp(d){return d1(typeof d=="function"?d:p1(d,f))}function um(d){return S2(p1(d,f))}function cm(d,v){return B0(d,p1(v,f))}var fm=Fr(function(d,v){return function(M){return ha(M,d,v)}}),pm=Fr(function(d,v){return function(M){return ha(d,M,v)}});function Gp(d,v,M){var F=fl(v),Z=Yl(v,F);M==null&&!(Mo(v)&&(Z.length||!F.length))&&(M=v,v=d,d=this,Z=Yl(v,fl(v)));var ue=!(Mo(M)&&"chain"in M)||!!M.chain,he=Ms(d);return qa(Z,function(ye){var He=v[ye];d[ye]=He,he&&(d.prototype[ye]=function(){var st=this.__chain__;if(ue||st){var et=d(this.__wrapped__),mt=et.__actions__=ta(this.__actions__);return mt.push({func:He,args:arguments,thisArg:d}),et.__chain__=st,et}return He.apply(d,ui([this.value()],arguments))})}),d}function dm(){return gi._===this&&(gi._=Va),this}function Yp(){}function Kp(d){return d=hr(d),Fr(function(v){return Ji(v,d)})}var hm=ys(Cn),mm=ys(mn),Xp=ys(vo);function B5(d){return ce(d)?y2(xr(d)):c3(d)}function gm(d){return function(v){return d==null?t:Ml(d,v)}}var vm=I2(),_m=I2(!0);function Jp(){return[]}function Zp(){return!1}function bm(){return{}}function ym(){return""}function x4(){return!0}function Qp(d,v){if(d=hr(d),d<1||d>me)return[];var M=be,F=Ai(d,be);v=kr(v),d-=be;for(var Z=q0(F,v);++M<d;)v(M);return Z}function $m(d){return Jr(d)?Cn(d,xr):Tu(d)?[d]:ta(zi(w1(d)))}function wm(d){var v=++pa;return w1(d)+v}var km=Ta(function(d,v){return d+v},0),zm=Cu("ceil"),Am=Ta(function(d,v){return d/v},1),Mm=Cu("floor");function Cm(d){return d&&d.length?Ki(d,v0,Xi):t}function Sm(d,v){return d&&d.length?Ki(d,kr(v,2),Xi):t}function Lm(d){return b2(d,v0)}function Em(d,v){return b2(d,kr(v,2))}function Tm(d){return d&&d.length?Ki(d,v0,R1):t}function Dm(d,v){return d&&d.length?Ki(d,kr(v,2),R1):t}var Hm=Ta(function(d,v){return d*v},1),Bm=Cu("round"),Om=Ta(function(d,v){return d-v},0);function Im(d){return d&&d.length?t0(d,v0):0}function Pm(d,v){return d&&d.length?t0(d,kr(v,2)):0}return xe.after=o8,xe.ary=Z3,xe.assign=_f,xe.assignIn=n4,xe.assignInWith=eu,xe.assignWith=bf,xe.at=yf,xe.before=Jd,xe.bind=sa,xe.bindAll=F4,xe.bindKey=Q3,xe.castArray=m8,xe.chain=Y3,xe.chunk=sl,xe.compact=To,xe.concat=xi,xe.cond=jp,xe.conforms=n2,xe.constant=Up,xe.countBy=N6,xe.create=$3,xe.curry=Zd,xe.curryRight=Qd,xe.debounce=e4,xe.defaults=e2,xe.defaultsDeep=A8,xe.defer=l8,xe.delay=T4,xe.difference=Ka,xe.differenceBy=Ci,xe.differenceWith=Yc,xe.drop=zo,xe.dropRight=V0,xe.dropRightWhile=R0,xe.dropWhile=ji,xe.fill=ul,xe.filter=x6,xe.flatMap=Mp,xe.flatMapDeep=U6,xe.flatMapDepth=q6,xe.flatten=na,xe.flattenDeep=Si,xe.flattenDepth=bp,xe.flip=s8,xe.flow=sm,xe.flowRight=qp,xe.fromPairs=yp,xe.functions=Op,xe.functionsIn=t2,xe.groupBy=W6,xe.initial=wp,xe.intersection=p3,xe.intersectionBy=kp,xe.intersectionWith=N0,xe.invert=Pp,xe.invertBy=Vp,xe.invokeMap=Y6,xe.iteratee=Wp,xe.keyBy=K6,xe.keys=fl,xe.keysIn=es,xe.map=A5,xe.mapKeys=T8,xe.mapValues=I4,xe.matches=um,xe.matchesProperty=cm,xe.memoize=t4,xe.merge=P4,xe.mergeWith=D5,xe.method=fm,xe.methodOf=pm,xe.mixin=Gp,xe.negate=C5,xe.nthArg=Kp,xe.omit=G1,xe.omitBy=D8,xe.once=D4,xe.orderBy=X6,xe.over=hm,xe.overArgs=H4,xe.overEvery=mm,xe.overSome=Xp,xe.partial=Sp,xe.partialRight=eh,xe.partition=J6,xe.pick=Rp,xe.pickBy=x2,xe.property=B5,xe.propertyOf=gm,xe.pull=zp,xe.pullAll=N,xe.pullAllBy=K,xe.pullAllWith=fe,xe.pullAt=Le,xe.range=vm,xe.rangeRight=_m,xe.rearg=u8,xe.reject=e8,xe.remove=Ue,xe.rest=c8,xe.reverse=ft,xe.sampleSize=n8,xe.set=Np,xe.setWith=H8,xe.shuffle=r8,xe.slice=zt,xe.sortBy=Cp,xe.sortedUniq=ur,xe.sortedUniqBy=or,xe.split=Fp,xe.spread=f8,xe.tail=Vt,xe.take=er,xe.takeRight=vr,xe.takeRightWhile=Mr,xe.takeWhile=Ur,xe.tap=K3,xe.throttle=p8,xe.thru=Jc,xe.toArray=rh,xe.toPairs=ah,xe.toPairsIn=oh,xe.toPath=$m,xe.toPlainObject=T5,xe.transform=B8,xe.unary=d8,xe.union=Rn,xe.unionBy=Xa,xe.unionWith=ri,xe.uniq=di,xe.uniqBy=mf,xe.uniqWith=dc,xe.unset=O8,xe.unzip=N2,xe.unzipWith=g0,xe.update=I8,xe.updateWith=P8,xe.values=r4,xe.valuesIn=V8,xe.without=Kc,xe.words=uh,xe.wrap=h8,xe.xor=F2,xe.xorBy=Xc,xe.xorWith=gf,xe.zip=As,xe.zipObject=e1,xe.zipObjectDeep=ra,xe.zipWith=G3,xe.entries=ah,xe.entriesIn=oh,xe.extend=n4,xe.extendWith=eu,Gp(xe,xe),xe.add=km,xe.attempt=H5,xe.camelCase=x8,xe.capitalize=lh,xe.ceil=zm,xe.clamp=R8,xe.clone=g8,xe.cloneDeep=_8,xe.cloneDeepWith=b8,xe.cloneWith=v8,xe.conformsTo=y8,xe.deburr=sh,xe.defaultTo=lm,xe.divide=Am,xe.endsWith=j8,xe.eq=fi,xe.escape=U8,xe.escapeRegExp=q8,xe.every=F6,xe.find=j6,xe.findIndex=pc,xe.findKey=M8,xe.findLast=Ap,xe.findLastIndex=fo,xe.findLastKey=C8,xe.floor=Mm,xe.forEach=Kd,xe.forEachRight=Xd,xe.forIn=S8,xe.forInRight=L8,xe.forOwn=w3,xe.forOwnRight=$f,xe.get=Sl,xe.gt=d3,xe.gte=B4,xe.has=Ip,xe.hasIn=k3,xe.head=k5,xe.identity=v0,xe.includes=G6,xe.indexOf=$p,xe.inRange=N8,xe.invoke=E8,xe.isArguments=vf,xe.isArray=Jr,xe.isArrayBuffer=li,xe.isArrayLike=cl,xe.isArrayLikeObject=Yo,xe.isBoolean=Ao,xe.isBuffer=Qs,xe.isDate=$8,xe.isElement=Qc,xe.isEmpty=h3,xe.isEqual=m3,xe.isEqualWith=Nr,xe.isError=Lp,xe.isFinite=Ep,xe.isFunction=Ms,xe.isInteger=th,xe.isLength=S5,xe.isMap=Ql,xe.isMatch=g3,xe.isMatchWith=Tp,xe.isNaN=v3,xe.isNative=Dp,xe.isNil=_3,xe.isNull=Hp,xe.isNumber=L5,xe.isObject=Mo,xe.isObjectLike=va,xe.isPlainObject=Eu,xe.isRegExp=Cs,xe.isSafeInteger=b3,xe.isSet=nh,xe.isString=E5,xe.isSymbol=Tu,xe.isTypedArray=hc,xe.isUndefined=y3,xe.isWeakMap=O4,xe.isWeakSet=w8,xe.join=E4,xe.kebabCase=W8,xe.last=m0,xe.lastIndexOf=ci,xe.lowerCase=G8,xe.lowerFirst=Y8,xe.lt=Bp,xe.lte=k8,xe.max=Cm,xe.maxBy=Sm,xe.mean=Lm,xe.meanBy=Em,xe.min=Tm,xe.minBy=Dm,xe.stubArray=Jp,xe.stubFalse=Zp,xe.stubObject=bm,xe.stubString=ym,xe.stubTrue=x4,xe.multiply=Hm,xe.nth=_i,xe.noConflict=dm,xe.noop=Yp,xe.now=M5,xe.pad=K8,xe.padEnd=X8,xe.padStart=J8,xe.parseInt=Z8,xe.random=F8,xe.reduce=Z6,xe.reduceRight=Q6,xe.repeat=Q8,xe.replace=z3,xe.result=V4,xe.round=Bm,xe.runInContext=Se,xe.sample=t8,xe.size=i8,xe.snakeCase=R4,xe.some=a8,xe.sortedIndex=Ot,xe.sortedIndexBy=jt,xe.sortedIndexOf=en,xe.sortedLastIndex=bn,xe.sortedLastIndexBy=In,xe.sortedLastIndexOf=gr,xe.startCase=em,xe.startsWith=tm,xe.subtract=Om,xe.sum=Im,xe.sumBy=Pm,xe.template=nm,xe.times=Qp,xe.toFinite=bi,xe.toInteger=hr,xe.toLength=ih,xe.toLower=N4,xe.toNumber=mc,xe.toSafeInteger=z8,xe.toString=w1,xe.toUpper=xp,xe.trim=rm,xe.trimEnd=im,xe.trimStart=am,xe.truncate=Du,xe.unescape=tr,xe.uniqueId=wm,xe.upperCase=om,xe.upperFirst=Ll,xe.each=Kd,xe.eachRight=Xd,xe.first=k5,Gp(xe,function(){var d={};return wo(xe,function(v,M){lr.call(xe.prototype,M)||(d[M]=v)}),d}(),{chain:!1}),xe.VERSION=r,qa(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){xe[d].placeholder=xe}),qa(["drop","take"],function(d,v){ti.prototype[d]=function(M){M=M===t?1:y1(hr(M),0);var F=this.__filtered__&&!v?new ti(this):this.clone();return F.__filtered__?F.__takeCount__=Ai(M,F.__takeCount__):F.__views__.push({size:Ai(M,be),type:d+(F.__dir__<0?"Right":"")}),F},ti.prototype[d+"Right"]=function(M){return this.reverse()[d](M).reverse()}}),qa(["filter","map","takeWhile"],function(d,v){var M=v+1,F=M==J||M==ie;ti.prototype[d]=function(Z){var ue=this.clone();return ue.__iteratees__.push({iteratee:kr(Z,3),type:M}),ue.__filtered__=ue.__filtered__||F,ue}}),qa(["head","last"],function(d,v){var M="take"+(v?"Right":"");ti.prototype[d]=function(){return this[M](1).value()[0]}}),qa(["initial","tail"],function(d,v){var M="drop"+(v?"":"Right");ti.prototype[d]=function(){return this.__filtered__?new ti(this):this[M](1)}}),ti.prototype.compact=function(){return this.filter(v0)},ti.prototype.find=function(d){return this.filter(d).head()},ti.prototype.findLast=function(d){return this.reverse().find(d)},ti.prototype.invokeMap=Fr(function(d,v){return typeof d=="function"?new ti(this):this.map(function(M){return ha(M,d,v)})}),ti.prototype.reject=function(d){return this.filter(C5(kr(d)))},ti.prototype.slice=function(d,v){d=hr(d);var M=this;return M.__filtered__&&(d>0||v<0)?new ti(M):(d<0?M=M.takeRight(-d):d&&(M=M.drop(d)),v!==t&&(v=hr(v),M=v<0?M.dropRight(-v):M.take(v-d)),M)},ti.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},ti.prototype.toArray=function(){return this.take(be)},wo(ti.prototype,function(d,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),F=/^(?:head|last)$/.test(v),Z=xe[F?"take"+(v=="last"?"Right":""):v],ue=F||/^find/.test(v);!Z||(xe.prototype[v]=function(){var he=this.__wrapped__,ye=F?[1]:arguments,He=he instanceof ti,st=ye[0],et=He||Jr(he),mt=function(Mn){var Ln=Z.apply(xe,ui([Mn],ye));return F&&Ct?Ln[0]:Ln};et&&M&&typeof st=="function"&&st.length!=1&&(He=et=!1);var Ct=this.__chain__,Ft=!!this.__actions__.length,Gt=ue&&!Ct,vn=He&&!Ft;if(!ue&&et){he=vn?he:new ti(this);var Kt=d.apply(he,ye);return Kt.__actions__.push({func:Jc,args:[mt],thisArg:t}),new Q1(Kt,Ct)}return Gt&&vn?d.apply(this,ye):(Kt=this.thru(mt),Gt?F?Kt.value()[0]:Kt.value():Kt)})}),qa(["pop","push","shift","sort","splice","unshift"],function(d){var v=Us[d],M=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",F=/^(?:pop|shift)$/.test(d);xe.prototype[d]=function(){var Z=arguments;if(F&&!this.__chain__){var ue=this.value();return v.apply(Jr(ue)?ue:[],Z)}return this[M](function(he){return v.apply(Jr(he)?he:[],Z)})}}),wo(ti.prototype,function(d,v){var M=xe[v];if(M){var F=M.name+"";lr.call(vi,F)||(vi[F]=[]),vi[F].push({name:v,func:M})}}),vi[Zl(t,A).name]=[{name:"wrapper",func:t}],ti.prototype.clone=A2,ti.prototype.reverse=u3,ti.prototype.value=L0,xe.prototype.at=z5,xe.prototype.chain=X3,xe.prototype.commit=J3,xe.prototype.next=I6,xe.prototype.plant=V6,xe.prototype.reverse=R6,xe.prototype.toJSON=xe.prototype.valueOf=xe.prototype.value=Zc,xe.prototype.first=xe.prototype.head,J0&&(xe.prototype[J0]=P6),xe},Aa=k2();q1?((q1.exports=Aa)._=Aa,Rs._=Aa):gi._=Aa}).call(b0)})(n6,n6.exports);function E4e(){const{subscribe:n,set:e}=yi({});async function t(m={}){const _=await tn.searchUsers(m);return e({..._,...m}),_}async function r(m){try{return await tn.getUser(m)}catch{return null}}const i=async()=>await tn.getUsers();async function a(m){return tn.inviteUsers(m)}async function o(m,_){return tn.acceptInvite({inviteCode:m,password:_})}async function l(m){let _=m.users.map(w=>{const A={email:w.email,password:w.password,roles:{}};switch(w.forceResetPassword&&(A.forceResetPassword=w.forceResetPassword),w.role){case"appUser":A.builder={global:!1},A.admin={global:!1};break;case"developer":A.builder={global:!0};break;case"admin":A.admin={global:!0},A.builder={global:!0};break}return A});const y=await tn.createUsers({users:_,groups:m.groups});return await t(),y}async function s(m){await tn.deleteUser(m),n6.exports.update(_=>_.filter(y=>y._id!==m))}async function u({appId:m}){return await tn.getUserCountByApp({appId:m})}async function c(m){return tn.deleteUsers(m)}async function f(m){return await tn.saveUser(m)}return{subscribe:n,search:t,get:r,getUserRole:({admin:m,builder:_})=>m!=null&&m.global?"admin":_!=null&&_.global?"developer":"appUser",fetch:i,invite:a,acceptInvite:o,create:l,save:f,bulkDelete:c,getUserCountByApp:u,delete:s}}const Hs=E4e();function T4e(){const e=yi({loaded:!1,multiTenancy:!1,cloud:!1,isDev:!1,disableAccountPortal:!1,accountPortalUrl:"",importComplete:!1,onboardingProgress:0,checklist:{apps:{checked:!1},smtp:{checked:!1},adminUser:{checked:!1},sso:{checked:!1}}});async function t(){await l(),await i(),dn(e).cloud&&(await o(),a()),e.update(u=>(u.loaded=!0,u))}async function r(){const u=await tn.checkImportComplete();e.update(c=>(c.importComplete=u?u.imported:!1,c))}async function i(){const u=await tn.getEnvironment();e.update(c=>(c.multiTenancy=u.multiTenancy,c.cloud=u.cloud,c.disableAccountPortal=u.disableAccountPortal,c.accountPortalUrl=u.accountPortalUrl,c.isDev=u.isDev,c))}const a=async()=>{var c,f;const u=(f=(c=dn(e))==null?void 0:c.status)==null?void 0:f.health;u!=null&&u.passing||await bk.showStatus()};async function o(){const u=await tn.getSystemStatus();e.update(c=>(c.status=u,c))}async function l(){const u=dn(mr).tenantId,c=await tn.getChecklist(u),f=Object.keys(c).length,h=Object.values(c).filter(m=>m==null?void 0:m.checked).length;e.update(m=>(m.checklist=c,m.onboardingProgress=h/f*100,m))}function s(){e.update(u=>(u.loaded=!1,u))}return{subscribe:e.subscribe,init:t,checkImportComplete:r,unload:s,getChecklist:l}}const Wi=T4e(),k4={USERS:"ta_users"},op={ALL:"all",DEV:"development",DEPLOYED:"published"},D4e={POSTGRES:"PostgreSQL",MONGODB:"MongoDB",COUCHDB:"CouchDB",S3:"S3",MYSQL:"MySQL",REST:"REST",DYNAMODB:"DynamoDB",ELASTICSEARCH:"ElasticSearch",SQL_SERVER:"SQL Server",AIRTABLE:"Airtable",ARANGODB:"ArangoDB",ORACLE:"Oracle",GOOGLE_SHEETS:"Google Sheets"},uY=["email","password","roleId","status","firstName","lastName"],H4e=["formula","attachment","array","link"],X$="bb_internal",B4e=/^[\w\s]+$/,O4e=/^\S*$/,lp={primaryColor:"var(--spectrum-global-color-blue-600)",primaryColorHover:"var(--spectrum-global-color-blue-500)",buttonBorderRadius:"16px",navBackground:"var(--spectrum-global-color-gray-50)",navTextColor:"var(--spectrum-global-color-gray-800)"},rT={FREE:"free",PRO:"pro",BUSINESS:"business",ENTERPRISE:"enterprise"},vc={URL:"URL",NPM:"NPM",GITHUB:"Github",FILE:"File Upload"},$9=n=>{const e=(n==null?void 0:n.split("_"))||[];return e.length?e[e.length-1]:null},I4e=n=>{if(!n)return n;let e,t="";if(n.startsWith("app_dev")){const r=n.split("app_dev");r.shift(),e=r.join("app_dev")}else n.startsWith("app")||(e=n,t="_");return`app${t}${e}`};function P4e(){const n=yi([]);async function e(){const r=await tn.getApps();if(Array.isArray(r)){let i={},a=r.filter(s=>s.status===op.DEV),o=r.filter(s=>s.status===op.DEPLOYED);a.forEach(s=>{const u=$9(s.appId);i[u]={...s,devId:s.appId,devRev:s._rev}}),o.forEach(s=>{const u=$9(s.appId);!i[u]||(i[u]={...i[u],...s,prodId:s.appId,prodRev:s._rev})});const l=Object.values(i);l.forEach(s=>{s.appId=$9(s.devId),delete s._id,delete s._rev}),n.set(l)}else n.set([])}async function t(r,i){await tn.saveAppMetadata({appId:r,metadata:i}),n.update(a=>{const o=a.findIndex(l=>l.instance._id===r);if(o!==-1){let l=a[o];l={...l,...i},a.apps=a.splice(o,1,l)}return a})}return{subscribe:n.subscribe,load:e,update:t,extractAppId:$9,getProdAppID:I4e}}const z1=P4e();function V4e(){const n=yi({});return{subscribe:n.subscribe,templates:{fetch:async()=>{const e=await tn.getEmailTemplateDefinitions(),t=await tn.getEmailTemplates();n.set({definitions:e,templates:t})},save:async e=>{const t=await tn.saveEmailTemplate(e);e._rev=t._rev,e._id=t._id,n.update(r=>{const i=r.templates.findIndex(a=>a.purpose===t.purpose);return r.templates.splice(i,1,e),r})}}}}const Bv=V4e();function R4e(){const n=yi({user:null,accountPortalAccess:!1,tenantId:"default",tenantSet:!1,loaded:!1,postLogout:!1}),e=Ol(n,s=>{var h,m;let u=null,c=!1,f=!1;if(s.user){const _=s.user;_.firstName?(u=_.firstName[0],_.lastName&&(u+=_.lastName[0])):_.email?u=_.email[0]:u="Unknown",c=!!((h=_.admin)!=null&&h.global),f=!!((m=_.builder)!=null&&m.global)}return{user:s.user,accountPortalAccess:s.accountPortalAccess,tenantId:s.tenantId,tenantSet:s.tenantSet,loaded:s.loaded,postLogout:s.postLogout,initials:u,isAdmin:c,isBuilder:f}});function t(s){n.update(u=>(u.loaded=!0,u.user=s,u.accountPortalAccess=s==null?void 0:s.accountPortalAccess,s&&(u.tenantId=s.tenantId||"default",u.tenantSet=!0),u)),s&&K5.activate().then(()=>{var u,c,f,h,m;K5.identify(s._id),K5.showChat({email:s.email,created_at:(s.createdAt||Date.now())/1e3,name:(u=s.account)==null?void 0:u.name,user_id:s._id,tenant:s.tenantId,admin:(c=s==null?void 0:s.admin)==null?void 0:c.global,builder:(f=s==null?void 0:s.builder)==null?void 0:f.global,"Company size":(h=s.account)==null?void 0:h.size,"Job role":(m=s.account)==null?void 0:m.profession},!!(s!=null&&s.account))}).catch(()=>{})}async function r(s){const u=dn(e).tenantId;n.update(c=>(c.tenantId=s,c.tenantSet=!!s,c)),u!==s&&await Wi.init()}async function i(s){return await tn.setInitInfo(s),n.update(u=>(u.initInfo=s,u)),s}function a(){n.update(s=>(s.postLogout=!0,s))}async function o(){const s=await tn.getInitInfo();return n.update(u=>(u.initInfo=s,u)),s}const l={checkQueryString:async()=>{const s=new URLSearchParams(window.location.search);if(s.has("tenantId")){const u=s.get("tenantId");await r(u)}},setOrg:async s=>{await r(s)},getSelf:async()=>{try{const s=await tn.fetchBuilderSelf();t(s)}catch{t(null)}},login:async s=>{const u=dn(e).tenantId;await tn.logIn({username:s.username,password:s.password,tenantId:u}),await l.getSelf()},logout:async()=>{t(null),a(),await tn.logOut(),await i({})},updateSelf:async s=>{const u={...dn(n).user,...s};await tn.updateSelf(u),t(u)},forgotPassword:async s=>{const u=dn(e).tenantId;await tn.requestForgotPassword({tenantId:u,email:s})},resetPassword:async(s,u)=>{const c=dn(e).tenantId;await tn.resetPassword({tenantId:c,password:s,resetCode:u})},generateAPIKey:async()=>tn.generateAPIKey(),fetchAPIKey:async()=>{const s=await tn.fetchDeveloperInfo();return s==null?void 0:s.apiKey}};return{subscribe:e.subscribe,setOrganisation:r,getInitInfo:o,setInitInfo:i,...l}}const mr=R4e(),iT={logo:void 0,name:void 0,uuid:void 0};function N4e(){const n=yi(iT),{set:e,subscribe:t}=n;return{subscribe:t,set:e,init:async()=>{const r=dn(mr).tenantId,i=await tn.getOIDCConfig(r);Object.keys(i||{}).length?e(...i):e(iT)}}}const J$=N4e();function F4e(){const{subscribe:n,set:e}=yi([]);return{subscribe:n,load:async()=>{const t=await tn.getAppTemplates();e(t)}}}const r6=F4e(),d4={LICENSING_DAYPASS_WARNING_MODAL:"licensing_daypass_warning_90_modal",LICENSING_DAYPASS_WARNING_BANNER:"licensing_daypass_warning_90_banner",LICENSING_PAYMENT_FAILED:"licensing_payment_failed",LICENSING_ACCOUNT_DOWNGRADED_MODAL:"licensing_account_downgraded_modal",LICENSING_APP_LIMIT_MODAL:"licensing_app_limit_modal",LICENSING_ROWS_WARNING_BANNER:"licensing_rows_warning_banner",LICENSING_AUTOMATIONS_WARNING_BANNER:"licensing_automations_warning_banner",LICENSING_QUERIES_WARNING_BANNER:"licensing_queries_warning_banner"},x4e={PAST_DUE:"past_due",ACTIVE:"active"},Ov={LICENSING:"LICENSING",USER_GROUPS:"USER_GROUPS"},Iv=n=>{var t;const e=dn(mr).user;return!!((t=e==null?void 0:e.featureFlags)!=null&&t.includes(n))},j4e=()=>{const n={goToUpgradePage:()=>{},license:void 0,isFreePlan:!0,groupsEnabled:!1,quotaUsage:void 0,usageMetrics:void 0,quotaResetDaysRemaining:void 0,quotaResetDate:void 0,accountPastDue:void 0,pastDueEndDate:void 0,pastDueDaysRemaining:void 0,accountDowngraded:void 0},e=864e5,t=yi(n),r={init:async()=>{r.setNavigation(),r.setLicense(),await r.setQuotaUsage(),r.setUsageMetrics()},setNavigation:()=>{const i=`${dn(Wi).accountPortalUrl}/portal/upgrade`,a=()=>{window.location.href=i};t.update(o=>({...o,goToUpgradePage:a}))},setLicense:()=>{const i=dn(mr).user.license,a=(i==null?void 0:i.plan.type)===yE.FREE,o=i.features.includes(Vce.USER_GROUPS);t.update(l=>({...l,license:i,isFreePlan:a,groupsEnabled:o}))},setQuotaUsage:async()=>{const i=await tn.getQuotaUsage();t.update(a=>({...a,quotaUsage:i}))},setUsageMetrics:()=>{var i,a,o,l,s,u,c,f,h,m;if(Iv(Ov.LICENSING)){const _=dn(t).quotaUsage,y=dn(mr).user.license,w=new Date,A=(se,ne,J)=>!ne||!J||!se?{}:se.reduce((q,ie)=>{const le=ne[ie].value,me=J[ie]/le*100;return q[ie]=le>-1?Math.round(me):-1,q},{}),E=A(["dayPasses","queries","automations"],y.quotas.usage.monthly,_.monthly.current),T=A(["apps","rows"],y.quotas.usage.static,_.usageQuota),I=(se,ne)=>ne>se?Math.round((ne.getTime()-se.getTime())/e):0,P=new Date(_.quotaReset),R=I(w,P),x=((a=(i=y==null?void 0:y.billing)==null?void 0:i.subscription)==null?void 0:a.downgradeAt)&&((l=(o=y==null?void 0:y.billing)==null?void 0:o.subscription)==null?void 0:l.downgradeAt)<=w.getTime()&&((u=(s=y==null?void 0:y.billing)==null?void 0:s.subscription)==null?void 0:u.status)===x4e.PAST_DUE&&(y==null?void 0:y.plan.type)===yE.FREE,W=(f=(c=y==null?void 0:y.billing)==null?void 0:c.subscription)==null?void 0:f.pastDueAt,Y=(m=(h=y==null?void 0:y.billing)==null?void 0:h.subscription)==null?void 0:m.downgradeAt;let ee,te;W&&Y&&(te=new Date(Y),ee=I(new Date(W),te)),t.update(se=>({...se,usageMetrics:{...E,...T},quotaResetDaysRemaining:R,quotaResetDate:P,accountDowngraded:x,accountPastDue:W!=null,pastDueEndDate:te,pastDueDaysRemaining:ee}))}}};return{subscribe:t.subscribe,...r}},Ba=j4e();function U4e(){const n=yi([]),e=i=>{n.update(a=>{const o=a.findIndex(l=>l._id===i._id);return o>=0?a.splice(o,1,i):a.push(i),a})},t=async i=>{const a=await tn.getGroup(i);e(a)},r={init:async()=>{if(dn(Ba).groupsEnabled){const i=await tn.getGroups();n.set(i)}},get:t,save:async i=>{const a=await tn.saveGroup(i);return i._id=a._id,i._rev=a._rev,e(i),i},delete:async i=>{await tn.deleteGroup({id:i._id,rev:i._rev}),n.update(a=>(a=a.filter(o=>o._id!==i._id),a))},addUser:async(i,a)=>{await tn.addUsersToGroup(i,a),await t(i)},removeUser:async(i,a)=>{await tn.removeUsersFromGroup(i,a),await t(i)},addApp:async(i,a,o)=>{await tn.addAppsToGroup(i,[{appId:a,roleId:o}]),await t(i)},removeApp:async(i,a)=>{await tn.removeAppsFromGroup(i,[{appId:a}]),await t(i)},getGroupAppIds:i=>Object.keys((i==null?void 0:i.roles)||{})};return{subscribe:n.subscribe,actions:r}}const D1=U4e();function q4e(){const{subscribe:n,set:e,update:t}=yi([]);async function r(){const l=await tn.getPlugins();e(l)}async function i(l){await tn.deletePlugin(l),t(s=>(s=s.filter(u=>u._id!==l),s))}async function a(l,s,u=null){let c={source:l,url:s};switch(l){case vc.URL:c.headers=u;break;case vc.GITHUB:c.githubToken=u;break}let h=(await tn.createPlugin(c)).plugin;t(m=>{const _=m.findIndex(y=>y._id===h._id);return _>=0?m.splice(_,1,h):m.push(h),m})}async function o(l){if(!l)return;let s=new FormData;s.append("file",l);let c=(await tn.uploadPlugin(s)).plugins[0];t(f=>{const h=f.findIndex(m=>m._id===c._id);return h>=0?f.splice(h,1,c):f.push(c),f})}return{subscribe:n,load:r,createPlugin:a,deletePlugin:i,uploadPlugin:o}}const ng=q4e(),tn=p2e({attachHeaders:n=>{n["x-budibase-app-id"]=dn(rn).appId;const e=dn(mr).user;e!=null&&e.csrfToken&&(n["x-csrf-token"]=e.csrfToken)},onError:n=>{const{url:e,message:t,status:r,method:i,handled:a}=n||{};if(!a){console.error("Unhandled error from API client",n);return}console.warn(`[Builder] HTTP ${r} on ${i}:${e}
|
|
451
|
+
}`;var vn=H5(function(){return Dt(ue,Ft+"return "+mt).apply(t,he)});if(vn.source=mt,Lp(vn))throw vn;return vn}function N4(d){return w1(d).toLowerCase()}function xp(d){return w1(d).toUpperCase()}function rm(d,v,M){if(d=w1(d),d&&(M||v===t))return W0(d);if(!d||!(v=ga(v)))return d;var F=No(d),Z=No(v),ue=s1(F,Z),he=Ro(F,Z)+1;return Xl(F,ue,he).join("")}function im(d,v,M){if(d=w1(d),d&&(M||v===t))return d.slice(0,xl(d)+1);if(!d||!(v=ga(v)))return d;var F=No(d),Z=Ro(F,No(v))+1;return Xl(F,0,Z).join("")}function am(d,v,M){if(d=w1(d),d&&(M||v===t))return d.replace(Gi,"");if(!d||!(v=ga(v)))return d;var F=No(d),Z=s1(F,No(v));return Xl(F,Z).join("")}function Du(d,v){var M=ee,F=te;if(Mo(v)){var Z="separator"in v?v.separator:Z;M="length"in v?hr(v.length):M,F="omission"in v?ga(v.omission):F}d=w1(d);var ue=d.length;if(no(d)){var he=No(d);ue=he.length}if(M>=ue)return d;var ye=M-Y0(F);if(ye<1)return F;var He=he?Xl(he,0,ye).join(""):d.slice(0,ye);if(Z===t)return He+F;if(he&&(ye+=He.length-ye),Cs(Z)){if(d.slice(ye).search(Z)){var st,et=He;for(Z.global||(Z=bo(Z.source,w1(Oa.exec(Z))+"g")),Z.lastIndex=0;st=Z.exec(et);)var mt=st.index;He=He.slice(0,mt===t?ye:mt)}}else if(d.indexOf(ga(Z),ye)!=ye){var Ct=He.lastIndexOf(Z);Ct>-1&&(He=He.slice(0,Ct))}return He+F}function tr(d){return d=w1(d),d&>.test(d)?d.replace(Hr,xs):d}var om=Zs(function(d,v,M){return d+(M?" ":"")+v.toUpperCase()}),Ll=Uc("toUpperCase");function uh(d,v,M){return d=w1(d),v=M?t:v,v===t?Pr(d)?J1(d):Gu(d):d.match(v)||[]}var H5=Fr(function(d,v){try{return Vo(d,t,v)}catch(M){return Lp(M)?M:new Yt(M)}}),F4=ws(function(d,v){return qa(v,function(M){M=xr(M),I1(d,M,sa(d[M],d))}),d});function jp(d){var v=d==null?0:d.length,M=kr();return d=v?Cn(d,function(F){if(typeof F[1]!="function")throw new C1(o);return[M(F[0]),F[1]]}):[],Fr(function(F){for(var Z=-1;++Z<v;){var ue=d[Z];if(Vo(ue[0],this,F))return Vo(ue[1],this,F)}})}function n2(d){return rc(p1(d,f))}function Up(d){return function(){return d}}function lm(d,v){return d==null||d!==d?v:d}var sm=O2(),qp=O2(!0);function v0(d){return d}function Wp(d){return d1(typeof d=="function"?d:p1(d,f))}function um(d){return S2(p1(d,f))}function cm(d,v){return B0(d,p1(v,f))}var fm=Fr(function(d,v){return function(M){return ha(M,d,v)}}),pm=Fr(function(d,v){return function(M){return ha(d,M,v)}});function Gp(d,v,M){var F=fl(v),Z=Yl(v,F);M==null&&!(Mo(v)&&(Z.length||!F.length))&&(M=v,v=d,d=this,Z=Yl(v,fl(v)));var ue=!(Mo(M)&&"chain"in M)||!!M.chain,he=Ms(d);return qa(Z,function(ye){var He=v[ye];d[ye]=He,he&&(d.prototype[ye]=function(){var st=this.__chain__;if(ue||st){var et=d(this.__wrapped__),mt=et.__actions__=ta(this.__actions__);return mt.push({func:He,args:arguments,thisArg:d}),et.__chain__=st,et}return He.apply(d,ui([this.value()],arguments))})}),d}function dm(){return gi._===this&&(gi._=Va),this}function Yp(){}function Kp(d){return d=hr(d),Fr(function(v){return Ji(v,d)})}var hm=ys(Cn),mm=ys(mn),Xp=ys(vo);function B5(d){return ce(d)?y2(xr(d)):c3(d)}function gm(d){return function(v){return d==null?t:Ml(d,v)}}var vm=I2(),_m=I2(!0);function Jp(){return[]}function Zp(){return!1}function bm(){return{}}function ym(){return""}function x4(){return!0}function Qp(d,v){if(d=hr(d),d<1||d>me)return[];var M=be,F=Ai(d,be);v=kr(v),d-=be;for(var Z=q0(F,v);++M<d;)v(M);return Z}function $m(d){return Jr(d)?Cn(d,xr):Tu(d)?[d]:ta(zi(w1(d)))}function wm(d){var v=++pa;return w1(d)+v}var km=Ta(function(d,v){return d+v},0),zm=Cu("ceil"),Am=Ta(function(d,v){return d/v},1),Mm=Cu("floor");function Cm(d){return d&&d.length?Ki(d,v0,Xi):t}function Sm(d,v){return d&&d.length?Ki(d,kr(v,2),Xi):t}function Lm(d){return b2(d,v0)}function Em(d,v){return b2(d,kr(v,2))}function Tm(d){return d&&d.length?Ki(d,v0,R1):t}function Dm(d,v){return d&&d.length?Ki(d,kr(v,2),R1):t}var Hm=Ta(function(d,v){return d*v},1),Bm=Cu("round"),Om=Ta(function(d,v){return d-v},0);function Im(d){return d&&d.length?t0(d,v0):0}function Pm(d,v){return d&&d.length?t0(d,kr(v,2)):0}return xe.after=o8,xe.ary=Z3,xe.assign=_f,xe.assignIn=n4,xe.assignInWith=eu,xe.assignWith=bf,xe.at=yf,xe.before=Jd,xe.bind=sa,xe.bindAll=F4,xe.bindKey=Q3,xe.castArray=m8,xe.chain=Y3,xe.chunk=sl,xe.compact=To,xe.concat=xi,xe.cond=jp,xe.conforms=n2,xe.constant=Up,xe.countBy=N6,xe.create=$3,xe.curry=Zd,xe.curryRight=Qd,xe.debounce=e4,xe.defaults=e2,xe.defaultsDeep=A8,xe.defer=l8,xe.delay=T4,xe.difference=Ka,xe.differenceBy=Ci,xe.differenceWith=Yc,xe.drop=zo,xe.dropRight=V0,xe.dropRightWhile=R0,xe.dropWhile=ji,xe.fill=ul,xe.filter=x6,xe.flatMap=Mp,xe.flatMapDeep=U6,xe.flatMapDepth=q6,xe.flatten=na,xe.flattenDeep=Si,xe.flattenDepth=bp,xe.flip=s8,xe.flow=sm,xe.flowRight=qp,xe.fromPairs=yp,xe.functions=Op,xe.functionsIn=t2,xe.groupBy=W6,xe.initial=wp,xe.intersection=p3,xe.intersectionBy=kp,xe.intersectionWith=N0,xe.invert=Pp,xe.invertBy=Vp,xe.invokeMap=Y6,xe.iteratee=Wp,xe.keyBy=K6,xe.keys=fl,xe.keysIn=es,xe.map=A5,xe.mapKeys=T8,xe.mapValues=I4,xe.matches=um,xe.matchesProperty=cm,xe.memoize=t4,xe.merge=P4,xe.mergeWith=D5,xe.method=fm,xe.methodOf=pm,xe.mixin=Gp,xe.negate=C5,xe.nthArg=Kp,xe.omit=G1,xe.omitBy=D8,xe.once=D4,xe.orderBy=X6,xe.over=hm,xe.overArgs=H4,xe.overEvery=mm,xe.overSome=Xp,xe.partial=Sp,xe.partialRight=eh,xe.partition=J6,xe.pick=Rp,xe.pickBy=x2,xe.property=B5,xe.propertyOf=gm,xe.pull=zp,xe.pullAll=N,xe.pullAllBy=K,xe.pullAllWith=fe,xe.pullAt=Le,xe.range=vm,xe.rangeRight=_m,xe.rearg=u8,xe.reject=e8,xe.remove=Ue,xe.rest=c8,xe.reverse=ft,xe.sampleSize=n8,xe.set=Np,xe.setWith=H8,xe.shuffle=r8,xe.slice=zt,xe.sortBy=Cp,xe.sortedUniq=ur,xe.sortedUniqBy=or,xe.split=Fp,xe.spread=f8,xe.tail=Vt,xe.take=er,xe.takeRight=vr,xe.takeRightWhile=Mr,xe.takeWhile=Ur,xe.tap=K3,xe.throttle=p8,xe.thru=Jc,xe.toArray=rh,xe.toPairs=ah,xe.toPairsIn=oh,xe.toPath=$m,xe.toPlainObject=T5,xe.transform=B8,xe.unary=d8,xe.union=Rn,xe.unionBy=Xa,xe.unionWith=ri,xe.uniq=di,xe.uniqBy=mf,xe.uniqWith=dc,xe.unset=O8,xe.unzip=N2,xe.unzipWith=g0,xe.update=I8,xe.updateWith=P8,xe.values=r4,xe.valuesIn=V8,xe.without=Kc,xe.words=uh,xe.wrap=h8,xe.xor=F2,xe.xorBy=Xc,xe.xorWith=gf,xe.zip=As,xe.zipObject=e1,xe.zipObjectDeep=ra,xe.zipWith=G3,xe.entries=ah,xe.entriesIn=oh,xe.extend=n4,xe.extendWith=eu,Gp(xe,xe),xe.add=km,xe.attempt=H5,xe.camelCase=x8,xe.capitalize=lh,xe.ceil=zm,xe.clamp=R8,xe.clone=g8,xe.cloneDeep=_8,xe.cloneDeepWith=b8,xe.cloneWith=v8,xe.conformsTo=y8,xe.deburr=sh,xe.defaultTo=lm,xe.divide=Am,xe.endsWith=j8,xe.eq=fi,xe.escape=U8,xe.escapeRegExp=q8,xe.every=F6,xe.find=j6,xe.findIndex=pc,xe.findKey=M8,xe.findLast=Ap,xe.findLastIndex=fo,xe.findLastKey=C8,xe.floor=Mm,xe.forEach=Kd,xe.forEachRight=Xd,xe.forIn=S8,xe.forInRight=L8,xe.forOwn=w3,xe.forOwnRight=$f,xe.get=Sl,xe.gt=d3,xe.gte=B4,xe.has=Ip,xe.hasIn=k3,xe.head=k5,xe.identity=v0,xe.includes=G6,xe.indexOf=$p,xe.inRange=N8,xe.invoke=E8,xe.isArguments=vf,xe.isArray=Jr,xe.isArrayBuffer=li,xe.isArrayLike=cl,xe.isArrayLikeObject=Yo,xe.isBoolean=Ao,xe.isBuffer=Qs,xe.isDate=$8,xe.isElement=Qc,xe.isEmpty=h3,xe.isEqual=m3,xe.isEqualWith=Nr,xe.isError=Lp,xe.isFinite=Ep,xe.isFunction=Ms,xe.isInteger=th,xe.isLength=S5,xe.isMap=Ql,xe.isMatch=g3,xe.isMatchWith=Tp,xe.isNaN=v3,xe.isNative=Dp,xe.isNil=_3,xe.isNull=Hp,xe.isNumber=L5,xe.isObject=Mo,xe.isObjectLike=va,xe.isPlainObject=Eu,xe.isRegExp=Cs,xe.isSafeInteger=b3,xe.isSet=nh,xe.isString=E5,xe.isSymbol=Tu,xe.isTypedArray=hc,xe.isUndefined=y3,xe.isWeakMap=O4,xe.isWeakSet=w8,xe.join=E4,xe.kebabCase=W8,xe.last=m0,xe.lastIndexOf=ci,xe.lowerCase=G8,xe.lowerFirst=Y8,xe.lt=Bp,xe.lte=k8,xe.max=Cm,xe.maxBy=Sm,xe.mean=Lm,xe.meanBy=Em,xe.min=Tm,xe.minBy=Dm,xe.stubArray=Jp,xe.stubFalse=Zp,xe.stubObject=bm,xe.stubString=ym,xe.stubTrue=x4,xe.multiply=Hm,xe.nth=_i,xe.noConflict=dm,xe.noop=Yp,xe.now=M5,xe.pad=K8,xe.padEnd=X8,xe.padStart=J8,xe.parseInt=Z8,xe.random=F8,xe.reduce=Z6,xe.reduceRight=Q6,xe.repeat=Q8,xe.replace=z3,xe.result=V4,xe.round=Bm,xe.runInContext=Se,xe.sample=t8,xe.size=i8,xe.snakeCase=R4,xe.some=a8,xe.sortedIndex=Ot,xe.sortedIndexBy=jt,xe.sortedIndexOf=en,xe.sortedLastIndex=bn,xe.sortedLastIndexBy=In,xe.sortedLastIndexOf=gr,xe.startCase=em,xe.startsWith=tm,xe.subtract=Om,xe.sum=Im,xe.sumBy=Pm,xe.template=nm,xe.times=Qp,xe.toFinite=bi,xe.toInteger=hr,xe.toLength=ih,xe.toLower=N4,xe.toNumber=mc,xe.toSafeInteger=z8,xe.toString=w1,xe.toUpper=xp,xe.trim=rm,xe.trimEnd=im,xe.trimStart=am,xe.truncate=Du,xe.unescape=tr,xe.uniqueId=wm,xe.upperCase=om,xe.upperFirst=Ll,xe.each=Kd,xe.eachRight=Xd,xe.first=k5,Gp(xe,function(){var d={};return wo(xe,function(v,M){lr.call(xe.prototype,M)||(d[M]=v)}),d}(),{chain:!1}),xe.VERSION=r,qa(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){xe[d].placeholder=xe}),qa(["drop","take"],function(d,v){ti.prototype[d]=function(M){M=M===t?1:y1(hr(M),0);var F=this.__filtered__&&!v?new ti(this):this.clone();return F.__filtered__?F.__takeCount__=Ai(M,F.__takeCount__):F.__views__.push({size:Ai(M,be),type:d+(F.__dir__<0?"Right":"")}),F},ti.prototype[d+"Right"]=function(M){return this.reverse()[d](M).reverse()}}),qa(["filter","map","takeWhile"],function(d,v){var M=v+1,F=M==J||M==ie;ti.prototype[d]=function(Z){var ue=this.clone();return ue.__iteratees__.push({iteratee:kr(Z,3),type:M}),ue.__filtered__=ue.__filtered__||F,ue}}),qa(["head","last"],function(d,v){var M="take"+(v?"Right":"");ti.prototype[d]=function(){return this[M](1).value()[0]}}),qa(["initial","tail"],function(d,v){var M="drop"+(v?"":"Right");ti.prototype[d]=function(){return this.__filtered__?new ti(this):this[M](1)}}),ti.prototype.compact=function(){return this.filter(v0)},ti.prototype.find=function(d){return this.filter(d).head()},ti.prototype.findLast=function(d){return this.reverse().find(d)},ti.prototype.invokeMap=Fr(function(d,v){return typeof d=="function"?new ti(this):this.map(function(M){return ha(M,d,v)})}),ti.prototype.reject=function(d){return this.filter(C5(kr(d)))},ti.prototype.slice=function(d,v){d=hr(d);var M=this;return M.__filtered__&&(d>0||v<0)?new ti(M):(d<0?M=M.takeRight(-d):d&&(M=M.drop(d)),v!==t&&(v=hr(v),M=v<0?M.dropRight(-v):M.take(v-d)),M)},ti.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},ti.prototype.toArray=function(){return this.take(be)},wo(ti.prototype,function(d,v){var M=/^(?:filter|find|map|reject)|While$/.test(v),F=/^(?:head|last)$/.test(v),Z=xe[F?"take"+(v=="last"?"Right":""):v],ue=F||/^find/.test(v);!Z||(xe.prototype[v]=function(){var he=this.__wrapped__,ye=F?[1]:arguments,He=he instanceof ti,st=ye[0],et=He||Jr(he),mt=function(Mn){var Ln=Z.apply(xe,ui([Mn],ye));return F&&Ct?Ln[0]:Ln};et&&M&&typeof st=="function"&&st.length!=1&&(He=et=!1);var Ct=this.__chain__,Ft=!!this.__actions__.length,Gt=ue&&!Ct,vn=He&&!Ft;if(!ue&&et){he=vn?he:new ti(this);var Kt=d.apply(he,ye);return Kt.__actions__.push({func:Jc,args:[mt],thisArg:t}),new Q1(Kt,Ct)}return Gt&&vn?d.apply(this,ye):(Kt=this.thru(mt),Gt?F?Kt.value()[0]:Kt.value():Kt)})}),qa(["pop","push","shift","sort","splice","unshift"],function(d){var v=Us[d],M=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",F=/^(?:pop|shift)$/.test(d);xe.prototype[d]=function(){var Z=arguments;if(F&&!this.__chain__){var ue=this.value();return v.apply(Jr(ue)?ue:[],Z)}return this[M](function(he){return v.apply(Jr(he)?he:[],Z)})}}),wo(ti.prototype,function(d,v){var M=xe[v];if(M){var F=M.name+"";lr.call(vi,F)||(vi[F]=[]),vi[F].push({name:v,func:M})}}),vi[Zl(t,A).name]=[{name:"wrapper",func:t}],ti.prototype.clone=A2,ti.prototype.reverse=u3,ti.prototype.value=L0,xe.prototype.at=z5,xe.prototype.chain=X3,xe.prototype.commit=J3,xe.prototype.next=I6,xe.prototype.plant=V6,xe.prototype.reverse=R6,xe.prototype.toJSON=xe.prototype.valueOf=xe.prototype.value=Zc,xe.prototype.first=xe.prototype.head,J0&&(xe.prototype[J0]=P6),xe},Aa=k2();q1?((q1.exports=Aa)._=Aa,Rs._=Aa):gi._=Aa}).call(b0)})(n6,n6.exports);function E4e(){const{subscribe:n,set:e}=yi({});async function t(m={}){const _=await tn.searchUsers(m);return e({..._,...m}),_}async function r(m){try{return await tn.getUser(m)}catch{return null}}const i=async()=>await tn.getUsers();async function a(m){return tn.inviteUsers(m)}async function o(m,_){return tn.acceptInvite({inviteCode:m,password:_})}async function l(m){let _=m.users.map(w=>{const A={email:w.email,password:w.password,roles:{}};switch(w.forceResetPassword&&(A.forceResetPassword=w.forceResetPassword),w.role){case"appUser":A.builder={global:!1},A.admin={global:!1};break;case"developer":A.builder={global:!0};break;case"admin":A.admin={global:!0},A.builder={global:!0};break}return A});const y=await tn.createUsers({users:_,groups:m.groups});return await t(),y}async function s(m){await tn.deleteUser(m),n6.exports.update(_=>_.filter(y=>y._id!==m))}async function u({appId:m}){return await tn.getUserCountByApp({appId:m})}async function c(m){return tn.deleteUsers(m)}async function f(m){return await tn.saveUser(m)}return{subscribe:n,search:t,get:r,getUserRole:({admin:m,builder:_})=>m!=null&&m.global?"admin":_!=null&&_.global?"developer":"appUser",fetch:i,invite:a,acceptInvite:o,create:l,save:f,bulkDelete:c,getUserCountByApp:u,delete:s}}const Hs=E4e();function T4e(){const e=yi({loaded:!1,multiTenancy:!1,cloud:!1,isDev:!1,disableAccountPortal:!1,accountPortalUrl:"",importComplete:!1,onboardingProgress:0,checklist:{apps:{checked:!1},smtp:{checked:!1},adminUser:{checked:!1},sso:{checked:!1}}});async function t(){await l(),await i(),dn(e).cloud&&(await o(),a()),e.update(u=>(u.loaded=!0,u))}async function r(){const u=await tn.checkImportComplete();e.update(c=>(c.importComplete=u?u.imported:!1,c))}async function i(){const u=await tn.getEnvironment();e.update(c=>(c.multiTenancy=u.multiTenancy,c.cloud=u.cloud,c.disableAccountPortal=u.disableAccountPortal,c.accountPortalUrl=u.accountPortalUrl,c.isDev=u.isDev,c))}const a=async()=>{var c,f;const u=(f=(c=dn(e))==null?void 0:c.status)==null?void 0:f.health;u!=null&&u.passing||await bk.showStatus()};async function o(){const u=await tn.getSystemStatus();e.update(c=>(c.status=u,c))}async function l(){const u=dn(mr).tenantId,c=await tn.getChecklist(u),f=Object.keys(c).length,h=Object.values(c).filter(m=>m==null?void 0:m.checked).length;e.update(m=>(m.checklist=c,m.onboardingProgress=h/f*100,m))}function s(){e.update(u=>(u.loaded=!1,u))}return{subscribe:e.subscribe,init:t,checkImportComplete:r,unload:s,getChecklist:l}}const Wi=T4e(),k4={USERS:"ta_users"},op={ALL:"all",DEV:"development",DEPLOYED:"published"},D4e={POSTGRES:"PostgreSQL",MONGODB:"MongoDB",COUCHDB:"CouchDB",S3:"S3",MYSQL:"MySQL",REST:"REST",DYNAMODB:"DynamoDB",ELASTICSEARCH:"ElasticSearch",SQL_SERVER:"SQL Server",AIRTABLE:"Airtable",ARANGODB:"ArangoDB",ORACLE:"Oracle",GOOGLE_SHEETS:"Google Sheets"},uY=["email","password","roleId","status","firstName","lastName"],H4e=["formula","attachment","array","link"],X$="bb_internal",B4e=/^[\w\s]+$/,O4e=/^\S*$/,lp={primaryColor:"var(--spectrum-global-color-blue-600)",primaryColorHover:"var(--spectrum-global-color-blue-500)",buttonBorderRadius:"16px",navBackground:"var(--spectrum-global-color-gray-50)",navTextColor:"var(--spectrum-global-color-gray-800)"},rT={FREE:"free",PRO:"pro",BUSINESS:"business",ENTERPRISE:"enterprise"},vc={URL:"URL",NPM:"NPM",GITHUB:"Github",FILE:"File Upload"},$9=n=>{const e=(n==null?void 0:n.split("_"))||[];return e.length?e[e.length-1]:null},I4e=n=>{if(!n)return n;let e,t="";if(n.startsWith("app_dev")){const r=n.split("app_dev");r.shift(),e=r.join("app_dev")}else n.startsWith("app")||(e=n,t="_");return`app${t}${e}`};function P4e(){const n=yi([]);async function e(){const r=await tn.getApps();if(Array.isArray(r)){let i={},a=r.filter(s=>s.status===op.DEV),o=r.filter(s=>s.status===op.DEPLOYED);a.forEach(s=>{const u=$9(s.appId);i[u]={...s,devId:s.appId,devRev:s._rev}}),o.forEach(s=>{const u=$9(s.appId);!i[u]||(i[u]={...i[u],...s,prodId:s.appId,prodRev:s._rev})});const l=Object.values(i);l.forEach(s=>{s.appId=$9(s.devId),delete s._id,delete s._rev}),n.set(l)}else n.set([])}async function t(r,i){await tn.saveAppMetadata({appId:r,metadata:i}),n.update(a=>{const o=a.findIndex(l=>l.instance._id===r);if(o!==-1){let l=a[o];l={...l,...i},a.apps=a.splice(o,1,l)}return a})}return{subscribe:n.subscribe,load:e,update:t,extractAppId:$9,getProdAppID:I4e}}const z1=P4e();function V4e(){const n=yi({});return{subscribe:n.subscribe,templates:{fetch:async()=>{const e=await tn.getEmailTemplateDefinitions(),t=await tn.getEmailTemplates();n.set({definitions:e,templates:t})},save:async e=>{const t=await tn.saveEmailTemplate(e);e._rev=t._rev,e._id=t._id,n.update(r=>{const i=r.templates.findIndex(a=>a.purpose===t.purpose);return r.templates.splice(i,1,e),r})}}}}const Bv=V4e();function R4e(){const n=yi({user:null,accountPortalAccess:!1,tenantId:"default",tenantSet:!1,loaded:!1,postLogout:!1}),e=Ol(n,s=>{var h,m;let u=null,c=!1,f=!1;if(s.user){const _=s.user;_.firstName?(u=_.firstName[0],_.lastName&&(u+=_.lastName[0])):_.email?u=_.email[0]:u="Unknown",c=!!((h=_.admin)!=null&&h.global),f=!!((m=_.builder)!=null&&m.global)}return{user:s.user,accountPortalAccess:s.accountPortalAccess,tenantId:s.tenantId,tenantSet:s.tenantSet,loaded:s.loaded,postLogout:s.postLogout,initials:u,isAdmin:c,isBuilder:f}});function t(s){n.update(u=>(u.loaded=!0,u.user=s,u.accountPortalAccess=s==null?void 0:s.accountPortalAccess,s&&(u.tenantId=s.tenantId||"default",u.tenantSet=!0),u)),s&&K5.activate().then(()=>{var u,c,f,h,m;K5.identify(s._id),K5.showChat({email:s.email,created_at:(s.createdAt||Date.now())/1e3,name:(u=s.account)==null?void 0:u.name,user_id:s._id,tenant:s.tenantId,admin:(c=s==null?void 0:s.admin)==null?void 0:c.global,builder:(f=s==null?void 0:s.builder)==null?void 0:f.global,"Company size":(h=s.account)==null?void 0:h.size,"Job role":(m=s.account)==null?void 0:m.profession},!!(s!=null&&s.account))}).catch(()=>{})}async function r(s){const u=dn(e).tenantId;n.update(c=>(c.tenantId=s,c.tenantSet=!!s,c)),u!==s&&await Wi.init()}async function i(s){return await tn.setInitInfo(s),n.update(u=>(u.initInfo=s,u)),s}function a(){n.update(s=>(s.postLogout=!0,s))}async function o(){const s=await tn.getInitInfo();return n.update(u=>(u.initInfo=s,u)),s}const l={checkQueryString:async()=>{const s=new URLSearchParams(window.location.search);if(s.has("tenantId")){const u=s.get("tenantId");await r(u)}},setOrg:async s=>{await r(s)},getSelf:async()=>{try{const s=await tn.fetchBuilderSelf();t(s)}catch{t(null)}},login:async s=>{const u=dn(e).tenantId;await tn.logIn({username:s.username,password:s.password,tenantId:u}),await l.getSelf()},logout:async()=>{t(null),a(),await tn.logOut(),await i({})},updateSelf:async s=>{const u={...dn(n).user,...s};await tn.updateSelf(u),t(u)},forgotPassword:async s=>{const u=dn(e).tenantId;await tn.requestForgotPassword({tenantId:u,email:s})},resetPassword:async(s,u)=>{const c=dn(e).tenantId;await tn.resetPassword({tenantId:c,password:s,resetCode:u})},generateAPIKey:async()=>tn.generateAPIKey(),fetchAPIKey:async()=>{const s=await tn.fetchDeveloperInfo();return s==null?void 0:s.apiKey}};return{subscribe:e.subscribe,setOrganisation:r,getInitInfo:o,setInitInfo:i,...l}}const mr=R4e(),iT={logo:void 0,name:void 0,uuid:void 0};function N4e(){const n=yi(iT),{set:e,subscribe:t}=n;return{subscribe:t,set:e,init:async()=>{const r=dn(mr).tenantId,i=await tn.getOIDCConfig(r);Object.keys(i||{}).length?e(...i):e(iT)}}}const J$=N4e();function F4e(){const{subscribe:n,set:e}=yi([]);return{subscribe:n,load:async()=>{const t=await tn.getAppTemplates();e(t)}}}const r6=F4e(),d4={LICENSING_DAYPASS_WARNING_MODAL:"licensing_daypass_warning_90_modal",LICENSING_DAYPASS_WARNING_BANNER:"licensing_daypass_warning_90_banner",LICENSING_PAYMENT_FAILED:"licensing_payment_failed",LICENSING_ACCOUNT_DOWNGRADED_MODAL:"licensing_account_downgraded_modal",LICENSING_APP_LIMIT_MODAL:"licensing_app_limit_modal",LICENSING_ROWS_WARNING_BANNER:"licensing_rows_warning_banner",LICENSING_AUTOMATIONS_WARNING_BANNER:"licensing_automations_warning_banner",LICENSING_QUERIES_WARNING_BANNER:"licensing_queries_warning_banner"},x4e={PAST_DUE:"past_due",ACTIVE:"active"},Ov={LICENSING:"LICENSING",USER_GROUPS:"USER_GROUPS"},Iv=n=>{var t;const e=dn(mr).user;return!!((t=e==null?void 0:e.featureFlags)!=null&&t.includes(n))},j4e=()=>{const n={goToUpgradePage:()=>{},license:void 0,isFreePlan:!0,groupsEnabled:!1,quotaUsage:void 0,usageMetrics:void 0,quotaResetDaysRemaining:void 0,quotaResetDate:void 0,accountPastDue:void 0,pastDueEndDate:void 0,pastDueDaysRemaining:void 0,accountDowngraded:void 0},e=864e5,t=yi(n),r={init:async()=>{r.setNavigation(),r.setLicense(),await r.setQuotaUsage(),r.setUsageMetrics()},setNavigation:()=>{const i=`${dn(Wi).accountPortalUrl}/portal/upgrade`,a=()=>{window.location.href=i};t.update(o=>({...o,goToUpgradePage:a}))},setLicense:()=>{const i=dn(mr).user.license,a=(i==null?void 0:i.plan.type)===yE.FREE,o=i.features.includes(Vce.USER_GROUPS);t.update(l=>({...l,license:i,isFreePlan:a,groupsEnabled:o}))},setQuotaUsage:async()=>{const i=await tn.getQuotaUsage();t.update(a=>({...a,quotaUsage:i}))},setUsageMetrics:()=>{var i,a,o,l,s,u,c,f,h,m;if(Iv(Ov.LICENSING)){const _=dn(t).quotaUsage,y=dn(mr).user.license,w=new Date,A=(se,ne,J)=>!ne||!J||!se?{}:se.reduce((q,ie)=>{const le=ne[ie].value,me=J[ie]/le*100;return q[ie]=le>-1?Math.floor(me):-1,q},{}),E=A(["dayPasses","queries","automations"],y.quotas.usage.monthly,_.monthly.current),T=A(["apps","rows"],y.quotas.usage.static,_.usageQuota),I=(se,ne)=>ne>se?Math.round((ne.getTime()-se.getTime())/e):0,P=new Date(_.quotaReset),R=I(w,P),x=((a=(i=y==null?void 0:y.billing)==null?void 0:i.subscription)==null?void 0:a.downgradeAt)&&((l=(o=y==null?void 0:y.billing)==null?void 0:o.subscription)==null?void 0:l.downgradeAt)<=w.getTime()&&((u=(s=y==null?void 0:y.billing)==null?void 0:s.subscription)==null?void 0:u.status)===x4e.PAST_DUE&&(y==null?void 0:y.plan.type)===yE.FREE,W=(f=(c=y==null?void 0:y.billing)==null?void 0:c.subscription)==null?void 0:f.pastDueAt,Y=(m=(h=y==null?void 0:y.billing)==null?void 0:h.subscription)==null?void 0:m.downgradeAt;let ee,te;W&&Y&&(te=new Date(Y),ee=I(new Date(W),te)),t.update(se=>({...se,usageMetrics:{...E,...T},quotaResetDaysRemaining:R,quotaResetDate:P,accountDowngraded:x,accountPastDue:W!=null,pastDueEndDate:te,pastDueDaysRemaining:ee}))}}};return{subscribe:t.subscribe,...r}},Ba=j4e();function U4e(){const n=yi([]),e=i=>{n.update(a=>{const o=a.findIndex(l=>l._id===i._id);return o>=0?a.splice(o,1,i):a.push(i),a})},t=async i=>{const a=await tn.getGroup(i);e(a)},r={init:async()=>{if(dn(Ba).groupsEnabled){const i=await tn.getGroups();n.set(i)}},get:t,save:async i=>{const a=await tn.saveGroup(i);return i._id=a._id,i._rev=a._rev,e(i),i},delete:async i=>{await tn.deleteGroup({id:i._id,rev:i._rev}),n.update(a=>(a=a.filter(o=>o._id!==i._id),a))},addUser:async(i,a)=>{await tn.addUsersToGroup(i,a),await t(i)},removeUser:async(i,a)=>{await tn.removeUsersFromGroup(i,a),await t(i)},addApp:async(i,a,o)=>{await tn.addAppsToGroup(i,[{appId:a,roleId:o}]),await t(i)},removeApp:async(i,a)=>{await tn.removeAppsFromGroup(i,[{appId:a}]),await t(i)},getGroupAppIds:i=>Object.keys((i==null?void 0:i.roles)||{})};return{subscribe:n.subscribe,actions:r}}const D1=U4e();function q4e(){const{subscribe:n,set:e,update:t}=yi([]);async function r(){const l=await tn.getPlugins();e(l)}async function i(l){await tn.deletePlugin(l),t(s=>(s=s.filter(u=>u._id!==l),s))}async function a(l,s,u=null){let c={source:l,url:s};switch(l){case vc.URL:c.headers=u;break;case vc.GITHUB:c.githubToken=u;break}let h=(await tn.createPlugin(c)).plugin;t(m=>{const _=m.findIndex(y=>y._id===h._id);return _>=0?m.splice(_,1,h):m.push(h),m})}async function o(l){if(!l)return;let s=new FormData;s.append("file",l);let c=(await tn.uploadPlugin(s)).plugins[0];t(f=>{const h=f.findIndex(m=>m._id===c._id);return h>=0?f.splice(h,1,c):f.push(c),f})}return{subscribe:n,load:r,createPlugin:a,deletePlugin:i,uploadPlugin:o}}const ng=q4e(),tn=p2e({attachHeaders:n=>{n["x-budibase-app-id"]=dn(rn).appId;const e=dn(mr).user;e!=null&&e.csrfToken&&(n["x-csrf-token"]=e.csrfToken)},onError:n=>{const{url:e,message:t,status:r,method:i,handled:a}=n||{};if(!a){console.error("Unhandled error from API client",n);return}console.warn(`[Builder] HTTP ${r} on ${i}:${e}
|
|
452
452
|
${t}`),r===403&&(Ak(s7.Auth),!e.includes("self")&&!e.includes("login")&&location.reload())}});function cY(n){return n&&!!n.match(/^(([^<>()[\]\\.,;:\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,}))$/)||"Please enter a valid email"}function aT(n){return n!=null&&n!==""||"This field is required"}function oT(n,...e){let t=!1;const r=yi(n||""),i=Ol(r,o=>W4e(o,e)),a=Ol(r,()=>t||(t=!0,!1));return[r,i,a]}function W4e(n,e){const t=e.find(r=>r(n)!==!0);return t&&t(n)}function G4e(n){let e,t,r,i,a,o;function l(f){n[12](f)}let s={label:"Password",type:"password",error:n[3]&&n[4]};n[1]!==void 0&&(s.value=n[1]),e=new En({props:s}),Be.push(()=>nt(e,"value",l));function u(f){n[13](f)}let c={label:"Repeat Password",type:"password",error:n[2]&&n[1]!==n[0]&&"Passwords must match"};return n[0]!==void 0&&(c.value=n[0]),i=new En({props:c}),Be.push(()=>nt(i,"value",u)),{c(){O(e.$$.fragment),r=U(),O(i.$$.fragment)},m(f,h){H(e,f,h),S(f,r,h),H(i,f,h),o=!0},p(f,h){const m={};h&24&&(m.error=f[3]&&f[4]),!t&&h&2&&(t=!0,m.value=f[1],rt(()=>t=!1)),e.$set(m);const _={};h&7&&(_.error=f[2]&&f[1]!==f[0]&&"Passwords must match"),!a&&h&1&&(a=!0,_.value=f[0],rt(()=>a=!1)),i.$set(_)},i(f){o||(b(e.$$.fragment,f),b(i.$$.fragment,f),o=!0)},o(f){$(e.$$.fragment,f),$(i.$$.fragment,f),o=!1},d(f){B(e,f),f&&C(r),B(i,f)}}}function Y4e(n){let e,t;return e=new Rt({props:{gap:"XS",noPadding:!0,$$slots:{default:[G4e]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&32799&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function K4e(n,e,t){let r,i,a,o,l,{password:s}=e,{error:u}=e;const[c,f,h]=oT("",aT);Fe(n,c,E=>t(1,i=E)),Fe(n,f,E=>t(4,l=E)),Fe(n,h,E=>t(3,o=E));const[m,_,y]=oT("",aT);Fe(n,m,E=>t(0,r=E)),Fe(n,y,E=>t(2,a=E));function w(E){i=E,c.set(i)}function A(E){r=E,m.set(r)}return n.$$set=E=>{"password"in E&&t(10,s=E.password),"error"in E&&t(11,u=E.error)},n.$$.update=()=>{n.$$.dirty&2&&t(10,s=i),n.$$.dirty&15&&t(11,u=!i||!o||!a||i!==r)},[r,i,a,o,l,c,f,h,m,y,s,u,w,A]}class x_ extends Re{constructor(e){super(),Ve(this,e,K4e,Y4e,Oe,{password:10,error:11})}}function X4e(n){let e;return{c(){e=oe(`Please upload the file that was exported from your Cloud environment to get
|
|
453
453
|
started`)},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function J4e(n){let e,t,r,i;return e=new xt({props:{$$slots:{default:[X4e]},$$scope:{ctx:n}}}),r=new b6({props:{gallery:!1,label:"File to import",value:[n[0].file]}}),r.$on("change",n[2]),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&16&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&1&&(s.value=[a[0].file]),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function Z4e(n){let e,t;return e=new br({props:{title:"Import apps",confirmText:"Import apps",onConfirm:n[1],disabled:!n[0].file,$$slots:{default:[J4e]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&1&&(a.disabled=!r[0].file),i&17&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Q4e(n,e,t){let r;async function i(){try{let o=new FormData;o.append("importFile",r.file),await tn.importApps(o),await Wi.checkImportComplete(),yt.success("Import complete, please finish registration!")}catch{yt.error("Failed to import apps")}}const a=o=>{var l;t(0,r.file=(l=o.detail)==null?void 0:l[0],r)};return t(0,r={file:null}),[r,i,a]}class e5e extends Re{constructor(e){super(),Ve(this,e,Q4e,Z4e,Oe,{})}}const zc="/builder/assets/bb-emblem.4e4717da.svg";function t5e(n){let e,t;return e=new e5e({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function n5e(n){let e;return{c(){e=oe("Create an admin user")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function r5e(n){let e;return{c(){e=oe("The admin user has access to everything in Budibase.")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function i5e(n){let e,t,r,i;return e=new Vn({props:{size:"M",$$slots:{default:[n5e]},$$scope:{ctx:n}}}),r=new xt({props:{size:"M",textAlign:"center",$$slots:{default:[r5e]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&131072&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&131072&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function a5e(n){let e,t,r,i,a,o,l;function s(m){n[11](m)}let u={label:"Email"};n[0].email!==void 0&&(u.value=n[0].email),e=new En({props:u}),Be.push(()=>nt(e,"value",s));function c(m){n[12](m)}function f(m){n[13](m)}let h={};return n[0].password!==void 0&&(h.password=n[0].password),n[1]!==void 0&&(h.error=n[1]),i=new x_({props:h}),Be.push(()=>nt(i,"password",c)),Be.push(()=>nt(i,"error",f)),{c(){O(e.$$.fragment),r=U(),O(i.$$.fragment)},m(m,_){H(e,m,_),S(m,r,_),H(i,m,_),l=!0},p(m,_){const y={};!t&&_&1&&(t=!0,y.value=m[0].email,rt(()=>t=!1)),e.$set(y);const w={};!a&&_&1&&(a=!0,w.password=m[0].password,rt(()=>a=!1)),!o&&_&2&&(o=!0,w.error=m[1],rt(()=>o=!1)),i.$set(w)},i(m){l||(b(e.$$.fragment,m),b(i.$$.fragment,m),l=!0)},o(m){$(e.$$.fragment,m),$(i.$$.fragment,m),l=!1},d(m){B(e,m),m&&C(r),B(i,m)}}}function o5e(n){let e;return{c(){e=oe("Create super admin user")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function l5e(n){let e,t;return e=new Br({props:{quiet:!0,$$slots:{default:[u5e]},$$scope:{ctx:n}}}),e.$on("click",n[15]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&131072&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function s5e(n){let e,t;return e=new Br({props:{quiet:!0,$$slots:{default:[c5e]},$$scope:{ctx:n}}}),e.$on("click",n[14]),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&131072&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function u5e(n){let e;return{c(){e=oe("Import from cloud")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function c5e(n){let e;return{c(){e=oe("Change organisation")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function f5e(n){let e,t,r,i,a,o;e=new $n({props:{cta:!0,disabled:n[1],$$slots:{default:[o5e]},$$scope:{ctx:n}}}),e.$on("click",n[7]);const l=[s5e,l5e],s=[];function u(c,f){return c[5]?0:!c[3]&&!c[4]?1:-1}return~(r=u(n))&&(i=s[r]=l[r](n)),{c(){O(e.$$.fragment),t=U(),i&&i.c(),a=$t()},m(c,f){H(e,c,f),S(c,t,f),~r&&s[r].m(c,f),S(c,a,f),o=!0},p(c,f){const h={};f&2&&(h.disabled=c[1]),f&131072&&(h.$$scope={dirty:f,ctx:c}),e.$set(h);let m=r;r=u(c),r===m?~r&&s[r].p(c,f):(i&&(Ae(),$(s[m],1,1,()=>{s[m]=null}),Me()),~r?(i=s[r],i?i.p(c,f):(i=s[r]=l[r](c),i.c()),b(i,1),i.m(a.parentNode,a)):i=null)},i(c){o||(b(e.$$.fragment,c),b(i),o=!0)},o(c){$(e.$$.fragment,c),$(i),o=!1},d(c){B(e,c),c&&C(t),~r&&s[r].d(c),c&&C(a)}}}function p5e(n){let e,t,r,i,a,o,l,s,u;return i=new Rt({props:{gap:"XS",justifyItems:"center",noPadding:!0,$$slots:{default:[i5e]},$$scope:{ctx:n}}}),o=new Rt({props:{gap:"XS",noPadding:!0,$$slots:{default:[a5e]},$$scope:{ctx:n}}}),s=new Rt({props:{gap:"XS",noPadding:!0,$$slots:{default:[f5e]},$$scope:{ctx:n}}}),{c(){e=X("img"),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment),D(e,"alt","logo"),b1(e.src,t=zc)||D(e,"src",t),D(e,"class","svelte-135kmhj")},m(c,f){S(c,e,f),S(c,r,f),H(i,c,f),S(c,a,f),H(o,c,f),S(c,l,f),H(s,c,f),u=!0},p(c,f){const h={};f&131072&&(h.$$scope={dirty:f,ctx:c}),i.$set(h);const m={};f&131075&&(m.$$scope={dirty:f,ctx:c}),o.$set(m);const _={};f&131198&&(_.$$scope={dirty:f,ctx:c}),s.$set(_)},i(c){u||(b(i.$$.fragment,c),b(o.$$.fragment,c),b(s.$$.fragment,c),u=!0)},o(c){$(i.$$.fragment,c),$(o.$$.fragment,c),$(s.$$.fragment,c),u=!1},d(c){c&&C(e),c&&C(r),B(i,c),c&&C(a),B(o,c),c&&C(l),B(s,c)}}}function d5e(n){let e,t,r,i,a,o,l={padding:!1,width:"600px",$$slots:{default:[t5e]},$$scope:{ctx:n}};return e=new ir({props:l}),n[10](e),a=new Rt({props:{$$slots:{default:[p5e]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),r=X("section"),i=X("div"),O(a.$$.fragment),D(i,"class","container svelte-135kmhj"),D(r,"class","svelte-135kmhj")},m(s,u){H(e,s,u),S(s,t,u),S(s,r,u),j(r,i),H(a,i,null),o=!0},p(s,[u]){const c={};u&131072&&(c.$$scope={dirty:u,ctx:s}),e.$set(c);const f={};u&131199&&(f.$$scope={dirty:u,ctx:s}),a.$set(f)},i(s){o||(b(e.$$.fragment,s),b(a.$$.fragment,s),o=!0)},o(s){$(e.$$.fragment,s),$(a.$$.fragment,s),o=!1},d(s){n[10](null),B(e,s),s&&C(t),s&&C(r),B(a)}}}function h5e(n,e,t){let r,i,a,o,l,s,u;Fe(n,si,I=>t(6,l=I)),Fe(n,Wi,I=>t(8,s=I)),Fe(n,mr,I=>t(9,u=I));let c={},f,h;async function m(){try{t(0,c.tenantId=r,c),await tn.createAdminUser(c),yt.success("Admin user created"),await Wi.init(),l("../portal")}catch{yt.error("Failed to create admin user")}}ar(async()=>{if(!a)try{await Wi.checkImportComplete()}catch{yt.error("Error checking import status")}});function _(I){Be[I?"unshift":"push"](()=>{h=I,t(2,h)})}function y(I){n.$$.not_equal(c.email,I)&&(c.email=I,t(0,c))}function w(I){n.$$.not_equal(c.password,I)&&(c.password=I,t(0,c))}function A(I){f=I,t(1,f)}const E=()=>{Wi.unload(),l("../auth/org")},T=()=>{h.show()};return n.$$.update=()=>{n.$$.dirty&512&&(r=u.tenantId),n.$$.dirty&256&&t(5,i=s.multiTenancy),n.$$.dirty&256&&t(3,a=s.cloud),n.$$.dirty&256&&t(4,o=s.importComplete)},[c,f,h,a,o,i,l,m,s,u,_,y,w,A,E,T]}class m5e extends Re{constructor(e){super(),Ve(this,e,h5e,d5e,Oe,{})}}function lT(n){let e;const t=n[4].default,r=Xn(t,n,n[3],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&8)&&Zn(r,t,i,i[3],e?Jn(t,i[3],a,null):Qn(i[3]),null)},i(i){e||(b(r,i),e=!0)},o(i){$(r,i),e=!1},d(i){r&&r.d(i)}}}function g5e(n){let e,t,r=n[0]&&lT(n);return{c(){r&&r.c(),e=$t()},m(i,a){r&&r.m(i,a),S(i,e,a),t=!0},p(i,[a]){i[0]?r?(r.p(i,a),a&1&&b(r,1)):(r=lT(i),r.c(),b(r,1),r.m(e.parentNode,e)):r&&(Ae(),$(r,1,1,()=>{r=null}),Me())},i(i){t||(b(r),t=!0)},o(i){$(r),t=!1},d(i){r&&r.d(i),i&&C(e)}}}function v5e(n,e,t){let r,i,a,o;Fe(n,ca,c=>t(6,a=c)),Fe(n,Wi,c=>t(2,o=c));let{$$slots:l={},$$scope:s}=e,u=!1;return ar(()=>{var c;((c=o==null?void 0:o.checklist)==null?void 0:c.adminUser.checked)||i?a("../"):t(0,u=!0)}),n.$$set=c=>{"$$scope"in c&&t(3,s=c.$$scope)},n.$$.update=()=>{n.$$.dirty&4&&t(1,r=o.cloud),n.$$.dirty&6&&(i=r&&!o.disableAccountPortal)},[u,r,o,s,l]}class _5e extends Re{constructor(e){super(),Ve(this,e,v5e,g5e,Oe,{})}}function b5e(n,e,t){let r;return Fe(n,ca,i=>t(0,r=i)),r("../design"),[]}class y5e extends Re{constructor(e){super(),Ve(this,e,b5e,null,Oe,{})}}function $5e(n,e,t){let r;return Fe(n,ca,i=>t(0,r=i)),r("./data"),[]}class w5e extends Re{constructor(e){super(),Ve(this,e,$5e,null,Oe,{})}}function sT(n,e,t){const r=n.slice();return r[9]=e[t].key,r[10]=e[t].displayName,r[11]=e[t].type,r[12]=e,r[13]=t,r}function k5e(n){let e=n[10]+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&16&&e!==(e=r[10]+"")&&vt(t,e)},d(r){r&&C(t)}}}function uT(n){let e,t,r;function i(o){n[5](o,n[9])}let a={};return n[3][n[9]]!==void 0&&(a.value=n[3][n[9]]),e=new En({props:a}),Be.push(()=>nt(e,"value",i)),e.$on("change",n[6]),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};!t&&l&24&&(t=!0,s.value=n[3][n[9]],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function cT(n){let e,t,r;function i(o){n[7](o,n[9])}let a={options:n[1][n[9]].data[n[2].queryVerb],getOptionLabel:A5e};return n[3][n[9]]!==void 0&&(a.value=n[3][n[9]]),e=new gn({props:a}),Be.push(()=>nt(e,"value",i)),e.$on("change",n[8]),{c(){O(e.$$.fragment)},m(o,l){H(e,o,l),r=!0},p(o,l){n=o;const s={};l&22&&(s.options=n[1][n[9]].data[n[2].queryVerb]),!t&&l&24&&(t=!0,s.value=n[3][n[9]],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){B(e,o)}}}function fT(n){let e,t,r,i,a,o;t=new un({props:{$$slots:{default:[k5e]},$$scope:{ctx:n}}});let l=n[11]==="string"&&uT(n),s=n[11]==="list"&&cT(n);return{c(){e=X("div"),O(t.$$.fragment),r=U(),l&&l.c(),i=U(),s&&s.c(),a=U(),D(e,"class","config-field svelte-grhqzt")},m(u,c){S(u,e,c),H(t,e,null),j(e,r),l&&l.m(e,null),j(e,i),s&&s.m(e,null),j(e,a),o=!0},p(u,c){const f={};c&16400&&(f.$$scope={dirty:c,ctx:u}),t.$set(f),u[11]==="string"?l?(l.p(u,c),c&16&&b(l,1)):(l=uT(u),l.c(),b(l,1),l.m(e,i)):l&&(Ae(),$(l,1,1,()=>{l=null}),Me()),u[11]==="list"?s?(s.p(u,c),c&16&&b(s,1)):(s=cT(u),s.c(),b(s,1),s.m(e,a)):s&&(Ae(),$(s,1,1,()=>{s=null}),Me())},i(u){o||(b(t.$$.fragment,u),b(l),b(s),o=!0)},o(u){$(t.$$.fragment,u),$(l),$(s),o=!1},d(u){u&&C(e),B(t),l&&l.d(),s&&s.d()}}}function z5e(n){let e,t,r=n[4],i=[];for(let o=0;o<r.length;o+=1)i[o]=fT(sT(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=$t()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);S(o,e,l),t=!0},p(o,[l]){if(l&31){r=o[4];let s;for(s=0;s<r.length;s+=1){const u=sT(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=fT(u),i[s].c(),b(i[s],1),i[s].m(e.parentNode,e))}for(Ae(),s=r.length;s<i.length;s+=1)a(s);Me()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){Dn(i,o),o&&C(e)}}}const A5e=n=>n;function M5e(n,e,t){let r,i,{populateExtraQuery:a}=e,{config:o}=e,{query:l}=e;function s(h,m){n.$$.not_equal(i[m],h)&&(i[m]=h,t(3,i),t(2,l))}const u=()=>a(i);function c(h,m){n.$$.not_equal(i[m],h)&&(i[m]=h,t(3,i),t(2,l))}const f=()=>a(i);return n.$$set=h=>{"populateExtraQuery"in h&&t(0,a=h.populateExtraQuery),"config"in h&&t(1,o=h.config),"query"in h&&t(2,l=h.query)},n.$$.update=()=>{n.$$.dirty&2&&t(4,r=Object.keys(o).map(h=>({...o[h],key:h}))),n.$$.dirty&4&&t(3,i=l.fields.extra||{})},[a,o,l,i,r,s,u,c,f]}class C5e extends Re{constructor(e){super(),Ve(this,e,M5e,z5e,Oe,{populateExtraQuery:0,config:1,query:2})}}var If={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(b0,function(){var t=navigator.userAgent,r=navigator.platform,i=/gecko\/\d/i.test(t),a=/MSIE \d/.test(t),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),l=/Edge\/(\d+)/.exec(t),s=a||o||l,u=s&&(a?document.documentMode||6:+(l||o)[1]),c=!l&&/WebKit\//.test(t),f=c&&/Qt\/\d+\.\d+/.test(t),h=!l&&/Chrome\//.test(t),m=/Opera\//.test(t),_=/Apple Computer/.test(navigator.vendor),y=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),w=/PhantomJS/.test(t),A=_&&(/Mobile\/\w+/.test(t)||navigator.maxTouchPoints>2),E=/Android/.test(t),T=A||E||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),I=A||/Mac/.test(r),P=/\bCrOS\b/.test(t),R=/win/i.test(r),x=m&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(m=!1,c=!0);var W=I&&(f||m&&(x==null||x<12.11)),Y=i||s&&u>=9;function ee(p){return new RegExp("(^|\\s)"+p+"(?:$|\\s)\\s*")}var te=function(p,g){var z=p.className,k=ee(g).exec(z);if(k){var L=z.slice(k.index+k[0].length);p.className=z.slice(0,k.index)+(L?k[1]+L:"")}};function se(p){for(var g=p.childNodes.length;g>0;--g)p.removeChild(p.firstChild);return p}function ne(p,g){return se(p).appendChild(g)}function J(p,g,z,k){var L=document.createElement(p);if(z&&(L.className=z),k&&(L.style.cssText=k),typeof g=="string")L.appendChild(document.createTextNode(g));else if(g)for(var V=0;V<g.length;++V)L.appendChild(g[V]);return L}function q(p,g,z,k){var L=J(p,g,z,k);return L.setAttribute("role","presentation"),L}var ie;document.createRange?ie=function(p,g,z,k){var L=document.createRange();return L.setEnd(k||p,z),L.setStart(p,g),L}:ie=function(p,g,z){var k=document.body.createTextRange();try{k.moveToElementText(p.parentNode)}catch{return k}return k.collapse(!0),k.moveEnd("character",z),k.moveStart("character",g),k};function le(p,g){if(g.nodeType==3&&(g=g.parentNode),p.contains)return p.contains(g);do if(g.nodeType==11&&(g=g.host),g==p)return!0;while(g=g.parentNode)}function me(){var p;try{p=document.activeElement}catch{p=document.body||null}for(;p&&p.shadowRoot&&p.shadowRoot.activeElement;)p=p.shadowRoot.activeElement;return p}function ke(p,g){var z=p.className;ee(g).test(z)||(p.className+=(z?" ":"")+g)}function de(p,g){for(var z=p.split(" "),k=0;k<z.length;k++)z[k]&&!ee(z[k]).test(g)&&(g+=" "+z[k]);return g}var be=function(p){p.select()};A?be=function(p){p.selectionStart=0,p.selectionEnd=p.value.length}:s&&(be=function(p){try{p.select()}catch{}});function ge(p){var g=Array.prototype.slice.call(arguments,1);return function(){return p.apply(null,g)}}function _e(p,g,z){g||(g={});for(var k in p)p.hasOwnProperty(k)&&(z!==!1||!g.hasOwnProperty(k))&&(g[k]=p[k]);return g}function ut(p,g,z,k,L){g==null&&(g=p.search(/[^\s\u00a0]/),g==-1&&(g=p.length));for(var V=k||0,G=L||0;;){var Q=p.indexOf(" ",V);if(Q<0||Q>=g)return G+(g-V);G+=Q-V,G+=z-G%z,V=Q+1}}var Ee=function(){this.id=null,this.f=null,this.time=0,this.handler=ge(this.onTimeout,this)};Ee.prototype.onTimeout=function(p){p.id=0,p.time<=+new Date?p.f():setTimeout(p.handler,p.time-+new Date)},Ee.prototype.set=function(p,g){this.f=g;var z=+new Date+p;(!this.id||z<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,p),this.time=z)};function ve(p,g){for(var z=0;z<p.length;++z)if(p[z]==g)return z;return-1}var je=50,it={toString:function(){return"CodeMirror.Pass"}},$e={scroll:!1},pt={origin:"*mouse"},Ke={origin:"+move"};function at(p,g,z){for(var k=0,L=0;;){var V=p.indexOf(" ",k);V==-1&&(V=p.length);var G=V-k;if(V==p.length||L+G>=g)return k+Math.min(G,g-L);if(L+=V-k,L+=z-L%z,k=V+1,L>=g)return k}}var Ze=[""];function qe(p){for(;Ze.length<=p;)Ze.push(tt(Ze)+" ");return Ze[p]}function tt(p){return p[p.length-1]}function Bt(p,g){for(var z=[],k=0;k<p.length;k++)z[k]=g(p[k],k);return z}function nn(p,g,z){for(var k=0,L=z(g);k<p.length&&z(p[k])<=L;)k++;p.splice(k,0,g)}function Et(){}function pe(p,g){var z;return Object.create?z=Object.create(p):(Et.prototype=p,z=new Et),g&&_e(g,z),z}var Xe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ot(p){return/\w/.test(p)||p>"\x80"&&(p.toUpperCase()!=p.toLowerCase()||Xe.test(p))}function Ce(p,g){return g?g.source.indexOf("\\w")>-1&&ot(p)?!0:g.test(p):ot(p)}function Ie(p){for(var g in p)if(p.hasOwnProperty(g)&&p[g])return!1;return!0}var we=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ye(p){return p.charCodeAt(0)>=768&&we.test(p)}function kt(p,g,z){for(;(z<0?g>0:g<p.length)&&Ye(p.charAt(g));)g+=z;return g}function Tt(p,g,z){for(var k=g>z?-1:1;;){if(g==z)return g;var L=(g+z)/2,V=k<0?Math.ceil(L):Math.floor(L);if(V==g)return p(V)?g:z;p(V)?z=V:g=V+k}}function on(p,g,z,k){if(!p)return k(g,z,"ltr",0);for(var L=!1,V=0;V<p.length;++V){var G=p[V];(G.from<z&&G.to>g||g==z&&G.to==g)&&(k(Math.max(G.from,g),Math.min(G.to,z),G.level==1?"rtl":"ltr",V),L=!0)}L||k(g,z,"ltr")}var sn=null;function cn(p,g,z){var k;sn=null;for(var L=0;L<p.length;++L){var V=p[L];if(V.from<g&&V.to>g)return L;V.to==g&&(V.from!=V.to&&z=="before"?k=L:sn=L),V.from==g&&(V.from!=V.to&&z!="before"?k=L:sn=L)}return k!=null?k:sn}var Bn=function(){var p="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",g="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function z(ce){return ce<=247?p.charAt(ce):1424<=ce&&ce<=1524?"R":1536<=ce&&ce<=1785?g.charAt(ce-1536):1774<=ce&&ce<=2220?"r":8192<=ce&&ce<=8203?"w":ce==8204?"b":"L"}var k=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,L=/[stwN]/,V=/[LRr]/,G=/[Lb1n]/,Q=/[1n]/;function ae(ce,ze,Te){this.level=ce,this.from=ze,this.to=Te}return function(ce,ze){var Te=ze=="ltr"?"L":"R";if(ce.length==0||ze=="ltr"&&!k.test(ce))return!1;for(var We=ce.length,Ge=[],ht=0;ht<We;++ht)Ge.push(z(ce.charCodeAt(ht)));for(var wt=0,Ht=Te;wt<We;++wt){var Pt=Ge[wt];Pt=="m"?Ge[wt]=Ht:Ht=Pt}for(var qt=0,Nt=Te;qt<We;++qt){var Jt=Ge[qt];Jt=="1"&&Nt=="r"?Ge[qt]="n":V.test(Jt)&&(Nt=Jt,Jt=="r"&&(Ge[qt]="R"))}for(var _n=1,hn=Ge[0];_n<We-1;++_n){var Un=Ge[_n];Un=="+"&&hn=="1"&&Ge[_n+1]=="1"?Ge[_n]="1":Un==","&&hn==Ge[_n+1]&&(hn=="1"||hn=="n")&&(Ge[_n]=hn),hn=Un}for(var Ar=0;Ar<We;++Ar){var ki=Ge[Ar];if(ki==",")Ge[Ar]="N";else if(ki=="%"){var Vr=void 0;for(Vr=Ar+1;Vr<We&&Ge[Vr]=="%";++Vr);for(var v1=Ar&&Ge[Ar-1]=="!"||Vr<We&&Ge[Vr]=="1"?"1":"N",Qi=Ar;Qi<Vr;++Qi)Ge[Qi]=v1;Ar=Vr-1}}for(var ii=0,Ni=Te;ii<We;++ii){var zi=Ge[ii];Ni=="L"&&zi=="1"?Ge[ii]="L":V.test(zi)&&(Ni=zi)}for(var xr=0;xr<We;++xr)if(L.test(Ge[xr])){var Yr=void 0;for(Yr=xr+1;Yr<We&&L.test(Ge[Yr]);++Yr);for(var Rr=(xr?Ge[xr-1]:Te)=="L",Oi=(Yr<We?Ge[Yr]:Te)=="L",sl=Rr==Oi?Rr?"L":"R":Te,To=xr;To<Yr;++To)Ge[To]=sl;xr=Yr-1}for(var xi=[],Ka,Ci=0;Ci<We;)if(G.test(Ge[Ci])){var Yc=Ci;for(++Ci;Ci<We&&G.test(Ge[Ci]);++Ci);xi.push(new ae(0,Yc,Ci))}else{var zo=Ci,V0=xi.length,R0=ze=="rtl"?1:0;for(++Ci;Ci<We&&Ge[Ci]!="L";++Ci);for(var ji=zo;ji<Ci;)if(Q.test(Ge[ji])){zo<ji&&(xi.splice(V0,0,new ae(1,zo,ji)),V0+=R0);var ul=ji;for(++ji;ji<Ci&&Q.test(Ge[ji]);++ji);xi.splice(V0,0,new ae(2,ul,ji)),V0+=R0,zo=ji}else++ji;zo<Ci&&xi.splice(V0,0,new ae(1,zo,Ci))}return ze=="ltr"&&(xi[0].level==1&&(Ka=ce.match(/^\s+/))&&(xi[0].from=Ka[0].length,xi.unshift(new ae(0,0,Ka[0].length))),tt(xi).level==1&&(Ka=ce.match(/\s+$/))&&(tt(xi).to-=Ka[0].length,xi.push(new ae(0,We-Ka[0].length,We)))),ze=="rtl"?xi.reverse():xi}}();function jn(p,g){var z=p.order;return z==null&&(z=p.order=Bn(p.text,g)),z}var An=[],St=function(p,g,z){if(p.addEventListener)p.addEventListener(g,z,!1);else if(p.attachEvent)p.attachEvent("on"+g,z);else{var k=p._handlers||(p._handlers={});k[g]=(k[g]||An).concat(z)}};function Dr(p,g){return p._handlers&&p._handlers[g]||An}function xn(p,g,z){if(p.removeEventListener)p.removeEventListener(g,z,!1);else if(p.detachEvent)p.detachEvent("on"+g,z);else{var k=p._handlers,L=k&&k[g];if(L){var V=ve(L,z);V>-1&&(k[g]=L.slice(0,V).concat(L.slice(V+1)))}}}function wn(p,g){var z=Dr(p,g);if(!!z.length)for(var k=Array.prototype.slice.call(arguments,2),L=0;L<z.length;++L)z[L].apply(null,k)}function Hn(p,g,z){return typeof g=="string"&&(g={type:g,preventDefault:function(){this.defaultPrevented=!0}}),wn(p,z||g.type,p,g),lt(g)||g.codemirrorIgnore}function Ut(p){var g=p._handlers&&p._handlers.cursorActivity;if(!!g)for(var z=p.curOp.cursorActivityHandlers||(p.curOp.cursorActivityHandlers=[]),k=0;k<g.length;++k)ve(z,g[k])==-1&&z.push(g[k])}function Kn(p,g){return Dr(p,g).length>0}function Hr(p){p.prototype.on=function(g,z){St(this,g,z)},p.prototype.off=function(g,z){xn(this,g,z)}}function Qe(p){p.preventDefault?p.preventDefault():p.returnValue=!1}function gt(p){p.stopPropagation?p.stopPropagation():p.cancelBubble=!0}function lt(p){return p.defaultPrevented!=null?p.defaultPrevented:p.returnValue==!1}function It(p){Qe(p),gt(p)}function fn(p){return p.target||p.srcElement}function an(p){var g=p.which;return g==null&&(p.button&1?g=1:p.button&2?g=3:p.button&4&&(g=2)),I&&p.ctrlKey&&g==1&&(g=3),g}var Nn=function(){if(s&&u<9)return!1;var p=J("div");return"draggable"in p||"dragDrop"in p}(),Fn;function _r(p){if(Fn==null){var g=J("span","\u200B");ne(p,J("span",[g,document.createTextNode("x")])),p.firstChild.offsetHeight!=0&&(Fn=g.offsetWidth<=1&&g.offsetHeight>2&&!(s&&u<8))}var z=Fn?J("span","\u200B"):J("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return z.setAttribute("cm-text",""),z}var fr;function mi(p){if(fr!=null)return fr;var g=ne(p,document.createTextNode("A\u062EA")),z=ie(g,0,1).getBoundingClientRect(),k=ie(g,1,2).getBoundingClientRect();return se(p),!z||z.left==z.right?!1:fr=k.right-z.right<3}var Gi=`
|
|
454
454
|
|
|
@@ -932,7 +932,7 @@ Use Save As... to download, then click back to return to this page.`)&&(location
|
|
|
932
932
|
`),t=X("i"),i=oe(r),a=oe("?"),o=oe(`
|
|
933
933
|
This action cannot be undone.`)},m(l,s){S(l,e,s),S(l,t,s),j(t,i),j(t,a),S(l,o,s)},p(l,s){s&1&&r!==(r=l[0].name+"")&&vt(i,r)},d(l){l&&C(e),l&&C(t),l&&C(o)}}}function ent(n){let e,t,r,i,a,o;e=new Lc({props:{$$slots:{control:[Ztt],default:[Jtt]},$$scope:{ctx:n}}});let l={okText:"Delete Automation",onOk:n[3],title:"Confirm Deletion",$$slots:{default:[Qtt]},$$scope:{ctx:n}};r=new au({props:l}),n[5](r);let s={automation:n[0]};return a=new Gtt({props:s}),n[6](a),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment)},m(u,c){H(e,u,c),S(u,t,c),H(r,u,c),S(u,i,c),H(a,u,c),o=!0},p(u,[c]){const f={};c&518&&(f.$$scope={dirty:c,ctx:u}),e.$set(f);const h={};c&513&&(h.$$scope={dirty:c,ctx:u}),r.$set(h);const m={};c&1&&(m.automation=u[0]),a.$set(m)},i(u){o||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),o=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),o=!1},d(u){B(e,u),u&&C(t),n[5](null),B(r,u),u&&C(i),n[6](null),B(a,u)}}}function tnt(n,e,t){let r,i;Fe(n,Or,h=>t(7,r=h)),Fe(n,si,h=>t(8,i=h));let{automation:a}=e,o,l;async function s(){try{await Or.actions.delete(a),yt.success("Automation deleted successfully"),i("../automate")}catch{yt.error("Error deleting automation")}}async function u(){try{await Or.actions.duplicate(a),yt.success("Automation has been duplicated successfully"),i(`./${r.selectedAutomation.automation._id}`)}catch{yt.error("Error duplicating automation")}}function c(h){Be[h?"unshift":"push"](()=>{o=h,t(1,o)})}function f(h){Be[h?"unshift":"push"](()=>{l=h,t(2,l)})}return n.$$set=h=>{"automation"in h&&t(0,a=h.automation)},[a,o,l,s,u,c,f]}class nnt extends Re{constructor(e){super(),Ve(this,e,tnt,ent,Oe,{automation:0})}}function YR(n,e,t){const r=n.slice();return r[5]=e[t],r[7]=t,r}function rnt(n){let e,t,r;return e=new nnt({props:{automation:n[5]}}),{c(){O(e.$$.fragment),t=U()},m(i,a){H(e,i,a),S(i,t,a),r=!0},p(i,a){const o={};a&1&&(o.automation=i[5]),e.$set(o)},i(i){r||(b(e.$$.fragment,i),r=!0)},o(i){$(e.$$.fragment,i),r=!1},d(i){B(e,i),i&&C(t)}}}function KR(n){let e,t;function r(){return n[3](n[5])}return e=new y5({props:{border:n[7]>0,icon:"ShareAndroid",text:n[5].name,selected:n[5]._id===n[1],$$slots:{default:[rnt]},$$scope:{ctx:n}}}),e.$on("click",r),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,a){n=i;const o={};a&1&&(o.text=n[5].name),a&3&&(o.selected=n[5]._id===n[1]),a&257&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){B(e,i)}}}function int(n){let e,t,r=n[0].automations.sort(XR),i=[];for(let o=0;o<r.length;o+=1)i[o]=KR(YR(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=X("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","automations-list svelte-g64vb")},m(o,l){S(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,[l]){if(l&7){r=o[0].automations.sort(XR);let s;for(s=0;s<r.length;s+=1){const u=YR(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=KR(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(Ae(),s=r.length;s<i.length;s+=1)a(s);Me()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&C(e),Dn(i,o)}}}const XR=n=>n.name;function ant(n,e,t){let r,i,a;Fe(n,si,s=>t(4,i=s)),Fe(n,Or,s=>t(0,a=s)),ar(async()=>{try{await Or.actions.fetch()}catch{yt.error("Error getting automations list")}});function o(s){Or.actions.select(s),i(`./${s._id}`)}const l=s=>o(s);return n.$$.update=()=>{var s,u;n.$$.dirty&1&&t(1,r=(u=(s=a.selectedAutomation)==null?void 0:s.automation)==null?void 0:u._id)},[a,r,o,l]}class ont extends Re{constructor(e){super(),Ve(this,e,ant,int,Oe,{})}}function JR(n,e,t){const r=n.slice();return r[17]=e[t][0],r[18]=e[t][1],r}function lnt(n){let e;return{c(){e=oe(`Please name your automation, then select a trigger. Every automation must
|
|
934
934
|
start with a trigger.`)},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function snt(n){let e;return{c(){e=oe("Triggers")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function unt(n){let e=n[18].name+"",t;return{c(){t=oe(e)},m(r,i){S(r,t,i)},p(r,i){i&8&&e!==(e=r[18].name+"")&&vt(t,e)},d(r){r&&C(t)}}}function ZR(n){let e,t,r,i,a,o,l,s,u,c;r=new pn({props:{name:n[18].icon}}),o=new xt({props:{size:"S",$$slots:{default:[unt]},$$scope:{ctx:n}}});function f(){return n[13](n[18])}return{c(){e=X("div"),t=X("div"),O(r.$$.fragment),i=U(),a=X("span"),O(o.$$.fragment),l=U(),D(a,"class","icon-spacing svelte-d3iboa"),D(t,"class","item-body svelte-d3iboa"),D(e,"class","item svelte-d3iboa"),De(e,"selected",n[2]===n[18].name)},m(h,m){S(h,e,m),j(e,t),H(r,t,null),j(t,i),j(t,a),H(o,a,null),j(e,l),s=!0,u||(c=At(e,"click",f),u=!0)},p(h,m){n=h;const _={};m&8&&(_.name=n[18].icon),r.$set(_);const y={};m&2097160&&(y.$$scope={dirty:m,ctx:n}),o.$set(y),m&12&&De(e,"selected",n[2]===n[18].name)},i(h){s||(b(r.$$.fragment,h),b(o.$$.fragment,h),s=!0)},o(h){$(r.$$.fragment,h),$(o.$$.fragment,h),s=!1},d(h){h&&C(e),B(r),B(o),u=!1,c()}}}function cnt(n){let e,t,r,i;e=new xt({props:{size:"S",$$slots:{default:[snt]},$$scope:{ctx:n}}});let a=n[3],o=[];for(let s=0;s<a.length;s+=1)o[s]=ZR(JR(n,a,s));const l=s=>$(o[s],1,1,()=>{o[s]=null});return{c(){O(e.$$.fragment),t=U(),r=X("div");for(let s=0;s<o.length;s+=1)o[s].c();D(r,"class","item-list svelte-d3iboa")},m(s,u){H(e,s,u),S(s,t,u),S(s,r,u);for(let c=0;c<o.length;c+=1)o[c].m(r,null);i=!0},p(s,u){const c={};if(u&2097152&&(c.$$scope={dirty:u,ctx:s}),e.$set(c),u&76){a=s[3];let f;for(f=0;f<a.length;f+=1){const h=JR(s,a,f);o[f]?(o[f].p(h,u),b(o[f],1)):(o[f]=ZR(h),o[f].c(),b(o[f],1),o[f].m(r,null))}for(Ae(),f=a.length;f<o.length;f+=1)l(f);Me()}},i(s){if(!i){b(e.$$.fragment,s);for(let u=0;u<a.length;u+=1)b(o[u]);i=!0}},o(s){$(e.$$.fragment,s),o=o.filter(Boolean);for(let u=0;u<o.length;u+=1)$(o[u]);i=!1},d(s){B(e,s),s&&C(t),s&&C(r),Dn(o,s)}}}function fnt(n){let e,t,r,i,a,o,l,s,u,c;e=new g_({props:{header:"You must publish your app to activate your automations.",message:"To test your automation before publishing, you can use the 'Run Test' functionality on the next screen."}}),r=new xt({props:{size:"XS",$$slots:{default:[lnt]},$$scope:{ctx:n}}});function f(_){n[10](_)}function h(_){n[11](_)}let m={label:"Name"};return n[0]!==void 0&&(m.value=n[0]),n[4]!==void 0&&(m.error=n[4]),a=new En({props:m}),Be.push(()=>nt(a,"value",f)),Be.push(()=>nt(a,"error",h)),a.$on("change",n[12]),u=new Rt({props:{noPadding:!0,$$slots:{default:[cnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment),s=U(),O(u.$$.fragment)},m(_,y){H(e,_,y),S(_,t,y),H(r,_,y),S(_,i,y),H(a,_,y),S(_,s,y),H(u,_,y),c=!0},p(_,y){const w={};y&2097152&&(w.$$scope={dirty:y,ctx:_}),r.$set(w);const A={};!o&&y&1&&(o=!0,A.value=_[0],rt(()=>o=!1)),!l&&y&16&&(l=!0,A.error=_[4],rt(()=>l=!1)),a.$set(A);const E={};y&2097164&&(E.$$scope={dirty:y,ctx:_}),u.$set(E)},i(_){c||(b(e.$$.fragment,_),b(r.$$.fragment,_),b(a.$$.fragment,_),b(u.$$.fragment,_),c=!0)},o(_){$(e.$$.fragment,_),$(r.$$.fragment,_),$(a.$$.fragment,_),$(u.$$.fragment,_),c=!1},d(_){B(e,_),_&&C(t),B(r,_),_&&C(i),B(a,_),_&&C(s),B(u,_)}}}function pnt(n){let e,t;return e=new br({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:n[5],disabled:!n[2]||!n[0],$$slots:{default:[fnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,[i]){const a={};i&5&&(a.disabled=!r[2]||!r[0]),i&2097183&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function dnt(n,e,t){let r,i,a,o,l,s;Fe(n,Or,I=>t(8,o=I)),Fe(n,si,I=>t(16,l=I)),Fe(n,Fd,I=>t(9,s=I));let u,c,f=!1,h,{webhookModal:m}=e;async function _(){var I;try{await Or.actions.create({name:u,instanceId:r});const P=o.selectedAutomation.constructBlock("TRIGGER",h.stepId,h);Or.actions.addBlockToAutomation(P),h.stepId===s6.WEBHOOK&&m.show,await Or.actions.save((I=o.selectedAutomation)==null?void 0:I.automation),yt.success(`Automation ${u} created`),l(`./${o.selectedAutomation.automation._id}`)}catch{yt.error("Error creating automation")}}const y=I=>{h=I,t(2,c=I.name)};function w(I){u=I,t(0,u)}function A(I){i=I,t(4,i),t(1,f),t(0,u)}const E=()=>t(1,f=!0),T=I=>y(I);return n.$$set=I=>{"webhookModal"in I&&t(7,m=I.webhookModal)},n.$$.update=()=>{n.$$.dirty&512&&(r=s._id),n.$$.dirty&3&&t(4,i=f&&!u?"Please specify a name for the automation.":null),n.$$.dirty&256&&t(3,a=Object.entries(o.blockDefinitions.TRIGGER))},[u,f,c,a,i,_,y,m,o,s,w,A,E,T]}class kX extends Re{constructor(e){super(),Ve(this,e,dnt,pnt,Oe,{webhookModal:7})}}function hnt(n){let e,t;return e=new kX({props:{webhookModal:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&2&&(a.webhookModal=r[1]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function mnt(n){let e,t,r,i;e=new ont({});let a={$$slots:{default:[hnt]},$$scope:{ctx:n}};return r=new ir({props:a}),n[2](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),S(o,t,l),H(r,o,l),i=!0},p(o,l){const s={};l&10&&(s.$$scope={dirty:l,ctx:o}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&C(t),n[2](null),B(r,o)}}}function gnt(n){let e,t;return e=new x1({props:{title:"Automations",$$slots:{default:[mnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&11&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function vnt(n){let e,t,r,i,a,o;return t=new K2({props:{selected:"Automations",$$slots:{default:[gnt]},$$scope:{ctx:n}}}),a=new pn({props:{hoverable:!0,name:"AddCircle"}}),a.$on("click",function(){zn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){e=X("div"),O(t.$$.fragment),r=U(),i=X("div"),O(a.$$.fragment),D(i,"class","add-button svelte-mcmub4"),D(e,"class","title svelte-mcmub4")},m(l,s){S(l,e,s),H(t,e,null),j(e,r),j(e,i),H(a,i,null),o=!0},p(l,[s]){n=l;const u={};s&11&&(u.$$scope={dirty:s,ctx:n}),t.$set(u)},i(l){o||(b(t.$$.fragment,l),b(a.$$.fragment,l),o=!0)},o(l){$(t.$$.fragment,l),$(a.$$.fragment,l),o=!1},d(l){l&&C(e),B(t),B(a)}}}function _nt(n,e,t){let{modal:r}=e,{webhookModal:i}=e;function a(o){Be[o?"unshift":"push"](()=>{r=o,t(0,r)})}return n.$$set=o=>{"modal"in o&&t(0,r=o.modal),"webhookModal"in o&&t(1,i=o.webhookModal)},[r,i,a]}class bnt extends Re{constructor(e){super(),Ve(this,e,_nt,vnt,Oe,{modal:0,webhookModal:1})}}function QR(n,e,t){const r=n.slice();return r[8]=e[t],r[10]=t,r}function eN(n){var u;let e,t,r,i,a;function o(c){n[6](c)}let l={showTestStatus:!0,block:n[8],isTrigger:n[10]===0,testResult:(u=n[2])==null?void 0:u[n[10]]};n[3]!==void 0&&(l.showParameters=n[3]),e=new wX({props:l}),Be.push(()=>nt(e,"showParameters",o));let s=n[3]&&n[3][n[8].id]&&tN(n);return{c(){O(e.$$.fragment),r=U(),s&&s.c(),i=$t()},m(c,f){H(e,c,f),S(c,r,f),s&&s.m(c,f),S(c,i,f),a=!0},p(c,f){var m;const h={};f&2&&(h.block=c[8]),f&4&&(h.testResult=(m=c[2])==null?void 0:m[c[10]]),!t&&f&8&&(t=!0,h.showParameters=c[3],rt(()=>t=!1)),e.$set(h),c[3]&&c[3][c[8].id]?s?(s.p(c,f),f&10&&b(s,1)):(s=tN(c),s.c(),b(s,1),s.m(i.parentNode,i)):s&&(Ae(),$(s,1,1,()=>{s=null}),Me())},i(c){a||(b(e.$$.fragment,c),b(s),a=!0)},o(c){$(e.$$.fragment,c),$(s),a=!1},d(c){B(e,c),c&&C(r),s&&s.d(c),c&&C(i)}}}function tN(n){var s,u;let e,t,r,i,a,o;e=new hi({props:{noMargin:!0}});let l=((u=(s=n[2])==null?void 0:s[n[10]])==null?void 0:u.outputs.iterations)&&nN(n);return a=new K2({props:{noHorizPadding:!0,selected:"Input",$$slots:{default:[knt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),l&&l.c(),r=U(),i=X("div"),O(a.$$.fragment),D(i,"class","tabs svelte-1iblsnb")},m(c,f){H(e,c,f),S(c,t,f),l&&l.m(c,f),S(c,r,f),S(c,i,f),H(a,i,null),o=!0},p(c,f){var m,_;(_=(m=c[2])==null?void 0:m[c[10]])!=null&&_.outputs.iterations?l?(l.p(c,f),f&4&&b(l,1)):(l=nN(c),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(Ae(),$(l,1,1,()=>{l=null}),Me());const h={};f&2052&&(h.$$scope={dirty:f,ctx:c}),a.$set(h)},i(c){o||(b(e.$$.fragment,c),b(l),b(a.$$.fragment,c),o=!0)},o(c){$(e.$$.fragment,c),$(l),$(a.$$.fragment,c),o=!1},d(c){B(e,c),c&&C(t),l&&l.d(c),c&&C(r),c&&C(i),B(a)}}}function nN(n){let e,t,r,i,a,o;return t=new pn({props:{name:"Reuse"}}),a=new un({props:{$$slots:{default:[ynt]},$$scope:{ctx:n}}}),{c(){e=X("div"),O(t.$$.fragment),r=U(),i=X("div"),O(a.$$.fragment),yn(i,"margin-left","10px"),yn(e,"display","flex"),yn(e,"padding","10px 10px 0px 12px")},m(l,s){S(l,e,s),H(t,e,null),j(e,r),j(e,i),H(a,i,null),o=!0},p(l,s){const u={};s&2052&&(u.$$scope={dirty:s,ctx:l}),a.$set(u)},i(l){o||(b(t.$$.fragment,l),b(a.$$.fragment,l),o=!0)},o(l){$(t.$$.fragment,l),$(a.$$.fragment,l),o=!1},d(l){l&&C(e),B(t),B(a)}}}function ynt(n){var a,o;let e,t=((o=(a=n[2])==null?void 0:a[n[10]])==null?void 0:o.outputs.iterations)+"",r,i;return{c(){e=oe("This loop ran "),r=oe(t),i=oe(" times.")},m(l,s){S(l,e,s),S(l,r,s),S(l,i,s)},p(l,s){var u,c;s&4&&t!==(t=((c=(u=l[2])==null?void 0:u[l[10]])==null?void 0:c.outputs.iterations)+"")&&vt(r,t)},d(l){l&&C(e),l&&C(r),l&&C(i)}}}function $nt(n){var r,i;let e,t;return e=new F3({props:{minHeight:"80px",disabled:!0,value:Jv((i=(r=n[2])==null?void 0:r[n[10]])==null?void 0:i.inputs,"No input")}}),{c(){O(e.$$.fragment)},m(a,o){H(e,a,o),t=!0},p(a,o){var s,u;const l={};o&4&&(l.value=Jv((u=(s=a[2])==null?void 0:s[a[10]])==null?void 0:u.inputs,"No input")),e.$set(l)},i(a){t||(b(e.$$.fragment,a),t=!0)},o(a){$(e.$$.fragment,a),t=!1},d(a){B(e,a)}}}function wnt(n){var r,i;let e,t;return e=new F3({props:{minHeight:"100px",disabled:!0,value:Jv((i=(r=n[2])==null?void 0:r[n[10]])==null?void 0:i.outputs,"No output")}}),{c(){O(e.$$.fragment)},m(a,o){H(e,a,o),t=!0},p(a,o){var s,u;const l={};o&4&&(l.value=Jv((u=(s=a[2])==null?void 0:s[a[10]])==null?void 0:u.outputs,"No output")),e.$set(l)},i(a){t||(b(e.$$.fragment,a),t=!0)},o(a){$(e.$$.fragment,a),t=!1},d(a){B(e,a)}}}function knt(n){let e,t,r,i;return e=new x1({props:{title:"Input",$$slots:{default:[$nt]},$$scope:{ctx:n}}}),r=new x1({props:{title:"Output",$$slots:{default:[wnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&2052&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&2052&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function rN(n){let e;return{c(){e=X("div"),D(e,"class","separator svelte-1iblsnb")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function iN(n){let e,t,r,i,a,o=n[8].stepId!==V3.LOOP&&eN(n),l=n[1].length-1!==n[10]&&rN();return{c(){e=X("div"),o&&o.c(),r=U(),l&&l.c(),i=$t(),D(e,"class","block svelte-1iblsnb"),D(e,"style",t=n[0]?`width: ${n[0]}`:"")},m(s,u){S(s,e,u),o&&o.m(e,null),S(s,r,u),l&&l.m(s,u),S(s,i,u),a=!0},p(s,u){s[8].stepId!==V3.LOOP?o?(o.p(s,u),u&2&&b(o,1)):(o=eN(s),o.c(),b(o,1),o.m(e,null)):o&&(Ae(),$(o,1,1,()=>{o=null}),Me()),(!a||u&1&&t!==(t=s[0]?`width: ${s[0]}`:""))&&D(e,"style",t),s[1].length-1!==s[10]?l||(l=rN(),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null)},i(s){a||(b(o),a=!0)},o(s){$(o),a=!1},d(s){s&&C(e),o&&o.d(),s&&C(r),l&&l.d(s),s&&C(i)}}}function znt(n){let e,t,r=n[1],i=[];for(let o=0;o<r.length;o+=1)i[o]=iN(QR(n,r,o));const a=o=>$(i[o],1,1,()=>{i[o]=null});return{c(){e=X("div");for(let o=0;o<i.length;o+=1)i[o].c();D(e,"class","container svelte-1iblsnb")},m(o,l){S(o,e,l);for(let s=0;s<i.length;s+=1)i[s].m(e,null);t=!0},p(o,[l]){if(l&15){r=o[1];let s;for(s=0;s<r.length;s+=1){const u=QR(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=iN(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(Ae(),s=r.length;s<i.length;s+=1)a(s);Me()}},i(o){if(!t){for(let l=0;l<r.length;l+=1)b(i[l]);t=!0}},o(o){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)$(i[l]);t=!1},d(o){o&&C(e),Dn(i,o)}}}function Jv(n,e){return n?JSON.stringify(n,null,2):e}function Ant(n,e,t){let r,{automation:i}=e,{testResults:a}=e,{width:o="400px"}=e,l,s;function u(f){return f==null?void 0:f.steps.filter(h=>h.stepId!==V3.LOOP||[])}function c(f){l=f,t(3,l)}return n.$$set=f=>{"automation"in f&&t(4,i=f.automation),"testResults"in f&&t(5,a=f.testResults),"width"in f&&t(0,o=f.width)},n.$$.update=()=>{if(n.$$.dirty&32&&t(2,r=u(a)),n.$$.dirty&22){if(t(1,s=[]),i)i.definition.trigger&&s.push(i.definition.trigger),t(1,s=s.concat(i.definition.steps||[]).filter(f=>f.stepId!==V3.LOOP));else if(r){t(1,s=r||[]);let f=0;for(let h of s)h.id=f++}}},[o,s,r,l,i,a,c]}class zX extends Re{constructor(e){super(),Ve(this,e,Ant,znt,Oe,{automation:4,testResults:5,width:0})}}function Mnt(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;return r=new pn({props:{name:"MultipleCheck"}}),s=new pn({props:{hoverable:!0,name:"Close"}}),s.$on("click",n[4]),c=new hi({}),h=new zX({props:{automation:n[0],testResults:n[2]}}),{c(){e=X("div"),t=X("div"),O(r.$$.fragment),i=U(),a=X("div"),a.textContent="Test Details",o=U(),l=X("div"),O(s.$$.fragment),u=U(),O(c.$$.fragment),f=U(),O(h.$$.fragment),yn(a,"padding-left","var(--spacing-l)"),D(t,"class","title-text svelte-nwwj95"),yn(l,"padding-right","var(--spacing-xl)"),D(e,"class","title svelte-nwwj95")},m(_,y){S(_,e,y),j(e,t),H(r,t,null),j(t,i),j(t,a),j(e,o),j(e,l),H(s,l,null),S(_,u,y),H(c,_,y),S(_,f,y),H(h,_,y),m=!0},p(_,[y]){const w={};y&1&&(w.automation=_[0]),y&4&&(w.testResults=_[2]),h.$set(w)},i(_){m||(b(r.$$.fragment,_),b(s.$$.fragment,_),b(c.$$.fragment,_),b(h.$$.fragment,_),m=!0)},o(_){$(r.$$.fragment,_),$(s.$$.fragment,_),$(c.$$.fragment,_),$(h.$$.fragment,_),m=!1},d(_){_&&C(e),B(r),B(s),_&&C(u),B(c,_),_&&C(f),B(h,_)}}}function Cnt(n,e,t){let r;Fe(n,Or,s=>t(1,r=s));let{automation:i}=e,a,o;const l=async()=>{Y1(Or,r.showTestPanel=!1,r)};return n.$$set=s=>{"automation"in s&&t(0,i=s.automation)},n.$$.update=()=>{var s;n.$$.dirty&11&&(t(3,a=[]),i?(i.definition.trigger&&a.push(i.definition.trigger),t(3,a=a.concat(i.definition.steps||[]).filter(u=>u.stepId!==V3.LOOP))):r.selectedAutomation&&t(0,i=r.selectedAutomation)),n.$$.dirty&2&&t(2,o=(s=r.selectedAutomation)==null?void 0:s.testResults)},[i,r,o,a,l]}class Snt extends Re{constructor(e){super(),Ve(this,e,Cnt,Mnt,Oe,{automation:0})}}function Lnt(n){let e,t,r,i;return r=new Rt({props:{gap:"S",justifyItems:"center",$$slots:{default:[Bnt]},$$scope:{ctx:n}}}),{c(){e=X("div"),t=X("div"),O(r.$$.fragment),D(t,"class","main svelte-374m3f"),D(e,"class","centered svelte-374m3f")},m(a,o){S(a,e,o),j(e,t),H(r,t,null),i=!0},p(a,o){const l={};o&258&&(l.$$scope={dirty:o,ctx:a}),r.$set(l)},i(a){i||(b(r.$$.fragment,a),i=!0)},o(a){$(r.$$.fragment,a),i=!1},d(a){a&&C(e),B(r)}}}function Ent(n){let e;const t=n[4].default,r=Xn(t,n,n[8],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&256)&&Zn(r,t,i,i[8],e?Jn(t,i[8],a,null):Qn(i[8]),null)},i(i){e||(b(r,i),e=!0)},o(i){$(r,i),e=!1},d(i){r&&r.d(i)}}}function Tnt(n){let e;return{c(){e=oe("You have no automations")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Dnt(n){let e;return{c(){e=oe("Let's fix that. Call the bots!")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Hnt(n){let e;return{c(){e=oe("Create automation")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Bnt(n){let e,t,r,i,a,o,l,s,u;return i=new Vn({props:{size:"M",$$slots:{default:[Tnt]},$$scope:{ctx:n}}}),o=new xt({props:{size:"M",$$slots:{default:[Dnt]},$$scope:{ctx:n}}}),s=new $n({props:{size:"M",cta:!0,$$slots:{default:[Hnt]},$$scope:{ctx:n}}}),s.$on("click",n[5]),{c(){e=ct("svg"),t=ct("use"),r=U(),O(i.$$.fragment),a=U(),O(o.$$.fragment),l=U(),O(s.$$.fragment),Wr(t,"xlink:href","#spectrum-icon-18-WorkflowAdd"),D(e,"width","60px"),D(e,"height","60px"),D(e,"class","spectrum-Icon"),D(e,"focusable","false")},m(c,f){S(c,e,f),j(e,t),S(c,r,f),H(i,c,f),S(c,a,f),H(o,c,f),S(c,l,f),H(s,c,f),u=!0},p(c,f){const h={};f&256&&(h.$$scope={dirty:f,ctx:c}),i.$set(h);const m={};f&256&&(m.$$scope={dirty:f,ctx:c}),o.$set(m);const _={};f&256&&(_.$$scope={dirty:f,ctx:c}),s.$set(_)},i(c){u||(b(i.$$.fragment,c),b(o.$$.fragment,c),b(s.$$.fragment,c),u=!0)},o(c){$(i.$$.fragment,c),$(o.$$.fragment,c),$(s.$$.fragment,c),u=!1},d(c){c&&C(e),c&&C(r),B(i,c),c&&C(a),B(o,c),c&&C(l),B(s,c)}}}function aN(n){let e,t,r;return t=new Snt({props:{automation:n[3]}}),{c(){e=X("div"),O(t.$$.fragment),D(e,"class","setup svelte-374m3f")},m(i,a){S(i,e,a),H(t,e,null),r=!0},p(i,a){const o={};a&8&&(o.automation=i[3]),t.$set(o)},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&C(e),B(t)}}}function Ont(n){let e,t;return e=new kX({props:{webhookModal:n[2]}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4&&(a.webhookModal=r[2]),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Int(n){let e,t;return e=new Gz({}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Pnt(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;r=new bnt({props:{modal:n[1],webhookModal:n[2]}});const _=[Ent,Lnt],y=[];function w(I,P){return I[3]?0:1}o=w(n),l=y[o]=_[o](n);let A=n[0].showTestPanel&&aN(n),E={$$slots:{default:[Ont]},$$scope:{ctx:n}};c=new ir({props:E}),n[6](c);let T={width:"30%",$$slots:{default:[Int]},$$scope:{ctx:n}};return h=new ir({props:T}),n[7](h),{c(){e=X("div"),t=X("div"),O(r.$$.fragment),i=U(),a=X("div"),l.c(),s=U(),A&&A.c(),u=U(),O(c.$$.fragment),f=U(),O(h.$$.fragment),D(t,"class","nav svelte-374m3f"),D(a,"class","content svelte-374m3f"),D(e,"class","root svelte-374m3f")},m(I,P){S(I,e,P),j(e,t),H(r,t,null),j(e,i),j(e,a),y[o].m(a,null),j(e,s),A&&A.m(e,null),j(e,u),H(c,e,null),j(e,f),H(h,e,null),m=!0},p(I,[P]){const R={};P&2&&(R.modal=I[1]),P&4&&(R.webhookModal=I[2]),r.$set(R);let x=o;o=w(I),o===x?y[o].p(I,P):(Ae(),$(y[x],1,1,()=>{y[x]=null}),Me(),l=y[o],l?l.p(I,P):(l=y[o]=_[o](I),l.c()),b(l,1),l.m(a,null)),I[0].showTestPanel?A?(A.p(I,P),P&1&&b(A,1)):(A=aN(I),A.c(),b(A,1),A.m(e,u)):A&&(Ae(),$(A,1,1,()=>{A=null}),Me());const W={};P&260&&(W.$$scope={dirty:P,ctx:I}),c.$set(W);const Y={};P&256&&(Y.$$scope={dirty:P,ctx:I}),h.$set(Y)},i(I){m||(b(r.$$.fragment,I),b(l),b(A),b(c.$$.fragment,I),b(h.$$.fragment,I),m=!0)},o(I){$(r.$$.fragment,I),$(l),$(A),$(c.$$.fragment,I),$(h.$$.fragment,I),m=!1},d(I){I&&C(e),B(r),y[o].d(),A&&A.d(),n[6](null),B(c),n[7](null),B(h)}}}function Vnt(n,e,t){let r,i;Fe(n,Or,h=>t(0,i=h));let{$$slots:a={},$$scope:o}=e,l,s;ar(()=>{Y1(Or,i.showTestPanel=!1,i)});const u=()=>l.show();function c(h){Be[h?"unshift":"push"](()=>{l=h,t(1,l)})}function f(h){Be[h?"unshift":"push"](()=>{s=h,t(2,s)})}return n.$$set=h=>{"$$scope"in h&&t(8,o=h.$$scope)},n.$$.update=()=>{var h;n.$$.dirty&1&&t(3,r=((h=i.selectedAutomation)==null?void 0:h.automation)||i.automations[0])},[i,l,s,r,a,u,c,f,o]}class Rnt extends Re{constructor(e){super(),Ve(this,e,Vnt,Pnt,Oe,{})}}function Nnt(n){let e,t,r,i,a,o,l;function s(c){n[4](c)}let u={};return n[2]!==void 0&&(u.value=n[2]),a=new En({props:u}),Be.push(()=>nt(a,"value",s)),{c(){e=X("span"),e.textContent=`The changes you have made will be deleted and the application reverted
|
|
935
|
-
back to its production state.`,t=U(),r=X("span"),r.textContent="Please enter your app name to continue.",i=U(),O(a.$$.fragment)},m(c,f){S(c,e,f),S(c,t,f),S(c,r,f),S(c,i,f),H(a,c,f),l=!0},p(c,f){const h={};!o&&f&4&&(o=!0,h.value=c[2],rt(()=>o=!1)),a.$set(h)},i(c){l||(b(a.$$.fragment,c),l=!0)},o(c){$(a.$$.fragment,c),l=!1},d(c){c&&C(e),c&&C(t),c&&C(r),c&&C(i),B(a,c)}}}function Fnt(n){let e,t;return e=new br({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:n[3],disabled:n[2]!==n[0].name,$$slots:{default:[Nnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&5&&(a.disabled=r[2]!==r[0].name),i&132&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function xnt(n){let e,t,r,i;e=new pn({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){zn(n[1].show)&&n[1].show.apply(this,arguments)});let a={$$slots:{default:[Fnt]},$$scope:{ctx:n}};return r=new ir({props:a}),n[5](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),S(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&133&&(s.$$scope={dirty:l,ctx:n}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&C(t),n[5](null),B(r,o)}}}function jnt(n,e,t){let r,i;Fe(n,rn,c=>t(0,i=c));let a,o;const l=async()=>{try{await tn.revertAppChanges(r);const c=await tn.fetchAppPackage(r);await rn.actions.initialise(c),yt.info("Changes reverted successfully")}catch(c){yt.error(`Error reverting changes: ${c}`)}};function s(c){o=c,t(2,o)}function u(c){Be[c?"unshift":"push"](()=>{a=c,t(1,a)})}return n.$$.update=()=>{n.$$.dirty&1&&(r=i.appId)},[i,a,o,l,s,u]}class Unt extends Re{constructor(e){super(),Ve(this,e,jnt,xnt,Oe,{})}}const qnt="@budibase/client",Wnt="1.4.8-alpha.
|
|
935
|
+
back to its production state.`,t=U(),r=X("span"),r.textContent="Please enter your app name to continue.",i=U(),O(a.$$.fragment)},m(c,f){S(c,e,f),S(c,t,f),S(c,r,f),S(c,i,f),H(a,c,f),l=!0},p(c,f){const h={};!o&&f&4&&(o=!0,h.value=c[2],rt(()=>o=!1)),a.$set(h)},i(c){l||(b(a.$$.fragment,c),l=!0)},o(c){$(a.$$.fragment,c),l=!1},d(c){c&&C(e),c&&C(t),c&&C(r),c&&C(i),B(a,c)}}}function Fnt(n){let e,t;return e=new br({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:n[3],disabled:n[2]!==n[0].name,$$slots:{default:[Nnt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&5&&(a.disabled=r[2]!==r[0].name),i&132&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function xnt(n){let e,t,r,i;e=new pn({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){zn(n[1].show)&&n[1].show.apply(this,arguments)});let a={$$slots:{default:[Fnt]},$$scope:{ctx:n}};return r=new ir({props:a}),n[5](r),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(o,l){H(e,o,l),S(o,t,l),H(r,o,l),i=!0},p(o,[l]){n=o;const s={};l&133&&(s.$$scope={dirty:l,ctx:n}),r.$set(s)},i(o){i||(b(e.$$.fragment,o),b(r.$$.fragment,o),i=!0)},o(o){$(e.$$.fragment,o),$(r.$$.fragment,o),i=!1},d(o){B(e,o),o&&C(t),n[5](null),B(r,o)}}}function jnt(n,e,t){let r,i;Fe(n,rn,c=>t(0,i=c));let a,o;const l=async()=>{try{await tn.revertAppChanges(r);const c=await tn.fetchAppPackage(r);await rn.actions.initialise(c),yt.info("Changes reverted successfully")}catch(c){yt.error(`Error reverting changes: ${c}`)}};function s(c){o=c,t(2,o)}function u(c){Be[c?"unshift":"push"](()=>{a=c,t(1,a)})}return n.$$.update=()=>{n.$$.dirty&1&&(r=i.appId)},[i,a,o,l,s,u]}class Unt extends Re{constructor(e){super(),Ve(this,e,jnt,xnt,Oe,{})}}const qnt="@budibase/client",Wnt="1.4.8-alpha.11",Gnt="MPL-2.0",Ynt="dist/budibase-client.js",Knt="dist/budibase-client.js",Xnt="module",Jnt="src/index.js",Znt={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},Qnt={build:"rollup -c","dev:builder":"rollup -cw"},ert={"@budibase/bbui":"1.4.8-alpha.11","@budibase/frontend-core":"1.4.8-alpha.11","@budibase/string-templates":"1.4.8-alpha.11","@spectrum-css/button":"^3.0.3","@spectrum-css/card":"^3.0.3","@spectrum-css/divider":"^1.0.3","@spectrum-css/link":"^3.1.3","@spectrum-css/page":"^3.0.1","@spectrum-css/tag":"^3.1.4","@spectrum-css/typography":"^3.0.2","@spectrum-css/vars":"^3.0.1",apexcharts:"^3.22.1",dayjs:"^1.10.5",downloadjs:"1.4.7",leaflet:"^1.7.1",regexparam:"^1.3.0","sanitize-html":"^2.7.0",screenfull:"^6.0.1",shortid:"^2.2.15","socket.io-client":"^4.5.1",svelte:"^3.49.0","svelte-apexcharts":"^1.0.2","svelte-flatpickr":"^3.1.0","svelte-spa-router":"^3.0.5"},trt={"@rollup/plugin-alias":"^3.1.5","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-node-resolve":"^11.2.1",postcss:"^8.2.10",rollup:"^2.44.0","rollup-plugin-json":"^4.0.0","rollup-plugin-polyfill-node":"^0.8.0","rollup-plugin-postcss":"^4.0.0","rollup-plugin-svelte":"^7.1.0","rollup-plugin-svg":"^2.0.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-visualizer":"^5.5.4"},nrt="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",Ed={name:qnt,version:Wnt,license:Gnt,module:Ynt,main:Knt,type:Xnt,svelte:Jnt,exports:Znt,scripts:Qnt,dependencies:ert,devDependencies:trt,gitHead:nrt};function oN(n){let e,t;return e=new x3({props:{hoverable:!0,notice:!0,$$slots:{default:[rrt]},$$scope:{ctx:n}}}),e.$on("click",function(){zn(n[2].show)&&n[2].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){n=r;const a={};i&4096&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function rrt(n){let e;return{c(){e=oe("Update available")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function irt(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[ort]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function art(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[lrt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function ort(n){let e,t,r=n[1].version+"",i,a;return{c(){e=oe("This app is currently using version "),t=X("b"),i=oe(r),a=oe(` which is the
|
|
936
936
|
latest version available.`)},m(o,l){S(o,e,l),S(o,t,l),j(t,i),S(o,a,l)},p(o,l){l&2&&r!==(r=o[1].version+"")&&vt(i,r)},d(o){o&&C(e),o&&C(t),o&&C(a)}}}function lrt(n){let e,t,r=n[1].version+"",i,a,o,l;return{c(){e=oe("This app is currently using version "),t=X("b"),i=oe(r),a=oe(`, but version
|
|
937
937
|
`),o=X("b"),o.textContent=`${Ed.version}`,l=oe(` is available. Updates can contain new features,
|
|
938
938
|
performance improvements and bug fixes.`)},m(s,u){S(s,e,u),S(s,t,u),j(t,i),S(s,a,u),S(s,o,u),S(s,l,u)},p(s,u){u&2&&r!==(r=s[1].version+"")&&vt(i,r)},d(s){s&&C(e),s&&C(t),s&&C(a),s&&C(o),s&&C(l)}}}function lN(n){let e,t;return e=new xt({props:{size:"S",$$slots:{default:[srt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&4098&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function srt(n){let e,t,r=n[1].revertableVersion+"",i,a;return{c(){e=oe(`You can revert this app to version
|
|
@@ -1005,7 +1005,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1005
1005
|
your plans Day Passes with `),o=oe(n[7]),l=oe(" day"),u=oe(s),c=oe(` remaining.
|
|
1006
1006
|
`),f=X("span"),O(h.$$.fragment),D(t,"class","daypass_percent"),D(f,"class","tooltip svelte-1gu2uit")},m(_,y){S(_,e,y),S(_,t,y),j(t,r),j(t,i),S(_,a,y),S(_,o,y),S(_,l,y),S(_,u,y),S(_,c,y),S(_,f,y),H(h,f,null),m=!0},p(_,y){(!m||y&4)&&vt(r,_[2]),(!m||y&128)&&vt(o,_[7]),(!m||y&128)&&s!==(s=_[7]==1?"":"s")&&vt(u,s);const w={};y&64&&(w.tooltip=_[6]),h.$set(w)},i(_){m||(b(h.$$.fragment,_),m=!0)},o(_){$(h.$$.fragment,_),m=!1},d(_){_&&C(e),_&&C(t),_&&C(a),_&&C(o),_&&C(l),_&&C(u),_&&C(c),_&&C(f),B(h)}}}function Q9t(n){let e;return{c(){e=oe("Please contact your account holder to upgrade.")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function evt(n){let e,t,r,i;return e=new xt({props:{$$slots:{default:[Z9t]},$$scope:{ctx:n}}}),r=new xt({props:{$$slots:{default:[Q9t]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&131268&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&131072&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function tvt(n){let e,t,r,i,a,o,l,s=n[7]==1?"":"s",u,c,f,h,m;return h=new u5({props:{tooltip:n[6],size:"S"}}),{c(){e=oe("You have used "),t=X("span"),r=oe(n[2]),i=oe("%"),a=oe(` of
|
|
1007
1007
|
your plans Day Passes with `),o=oe(n[7]),l=oe(" day"),u=oe(s),c=oe(` remaining.
|
|
1008
|
-
`),f=X("span"),O(h.$$.fragment),D(t,"class","daypass_percent"),D(f,"class","tooltip svelte-1gu2uit")},m(_,y){S(_,e,y),S(_,t,y),j(t,r),j(t,i),S(_,a,y),S(_,o,y),S(_,l,y),S(_,u,y),S(_,c,y),S(_,f,y),H(h,f,null),m=!0},p(_,y){(!m||y&4)&&vt(r,_[2]),(!m||y&128)&&vt(o,_[7]),(!m||y&128)&&s!==(s=_[7]==1?"":"s")&&vt(u,s);const w={};y&64&&(w.tooltip=_[6]),h.$set(w)},i(_){m||(b(h.$$.fragment,_),m=!0)},o(_){$(h.$$.fragment,_),m=!1},d(_){_&&C(e),_&&C(t),_&&C(a),_&&C(o),_&&C(l),_&&C(u),_&&C(c),_&&C(f),B(h)}}}function nvt(n){let e;return{c(){e=oe(n[4])},m(t,r){S(t,e,r)},p(t,r){r&16&&vt(e,t[4])},d(t){t&&C(e)}}}function rvt(n){let e,t,r,i;return e=new xt({props:{$$slots:{default:[tvt]},$$scope:{ctx:n}}}),r=new xt({props:{$$slots:{default:[nvt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&131268&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&131088&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function ivt(n){let e,t,r,i;const a=[J9t,X9t],o=[];function l(s,u){return s[9].user.accountPortalAccess?0:1}return e=l(n),t=o[e]=a[e](n),{c(){t.c(),r=$t()},m(s,u){o[e].m(s,u),S(s,r,u),i=!0},p(s,u){let c=e;e=l(s),e===c?o[e].p(s,u):(Ae(),$(o[c],1,1,()=>{o[c]=null}),Me(),t=o[e],t?t.p(s,u):(t=o[e]=a[e](s),t.c()),b(t,1),t.m(r.parentNode,r))},i(s){i||(b(t),i=!0)},o(s){$(t),i=!1},d(s){o[e].d(s),s&&C(r)}}}function avt(n){let e,t,r={$$slots:{default:[ivt]},$$scope:{ctx:n}};return e=new ir({props:r}),n[16](e),e.$on("show",function(){zn(n[1])&&n[1].apply(this,arguments)}),e.$on("hide",function(){zn(n[0])&&n[0].apply(this,arguments)}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,[a]){n=i;const o={};a&132084&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){n[16](null),B(e,i)}}}function ovt(n,e,t){let r,i,a,o,l,s,u,c,f,h;Fe(n,Ba,I=>t(13,c=I)),Fe(n,Wi,I=>t(14,f=I)),Fe(n,mr,I=>t(9,h=I));let{onDismiss:m=()=>{}}=e,{onShow:_=()=>{}}=e,y;function w(){y.show()}function A(){y.hide()}const E=()=>{window.location.href=i};function T(I){Be[I?"unshift":"push"](()=>{y=I,t(3,y)})}return n.$$set=I=>{"onDismiss"in I&&t(0,m=I.onDismiss),"onShow"in I&&t(1,_=I.onShow)},n.$$.update=()=>{var I;n.$$.dirty&16384&&t(12,r=f.accountPortalUrl),n.$$.dirty&4096&&t(8,i=`${r}/portal/upgrade`),n.$$.dirty&8192&&t(7,a=c.quotaResetDaysRemaining),n.$$.dirty&8192&&t(6,o=c.quotaResetDate),n.$$.dirty&8192&&t(2,l=(I=c.usageMetrics)==null?void 0:I.dayPasses),n.$$.dirty&4&&t(5,s=l>=100?"You have run out of Day Passes":"You are almost out of Day Passes"),n.$$.dirty&4&&t(4,u=l>=100?"Upgrade your account to bring your apps back online.":"Upgrade your account to prevent your apps from going offline.")},[m,_,l,y,u,s,o,a,i,h,w,A,r,c,f,E,T]}class lvt extends Re{constructor(e){super(),Ve(this,e,ovt,avt,Oe,{onDismiss:0,onShow:1,show:10,hide:11})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[11]}}function svt(n){let e,t;return e=new br({props:{title:dZ,size:"M",showCancelButton:!1,$$slots:{default:[hvt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8264&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function uvt(n){let e,t;return e=new br({props:{title:dZ,size:"M",confirmText:"Upgrade",onConfirm:n[11],$$slots:{default:[_vt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&16&&(a.onConfirm=r[11]),i&8264&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function cvt(n){let e;return{c(){e=oe("The payment for your subscription has failed")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function fvt(n){let e;return{c(){e=oe(`Please upgrade your billing details before your account gets downgraded
|
|
1008
|
+
`),f=X("span"),O(h.$$.fragment),D(t,"class","daypass_percent"),D(f,"class","tooltip svelte-1gu2uit")},m(_,y){S(_,e,y),S(_,t,y),j(t,r),j(t,i),S(_,a,y),S(_,o,y),S(_,l,y),S(_,u,y),S(_,c,y),S(_,f,y),H(h,f,null),m=!0},p(_,y){(!m||y&4)&&vt(r,_[2]),(!m||y&128)&&vt(o,_[7]),(!m||y&128)&&s!==(s=_[7]==1?"":"s")&&vt(u,s);const w={};y&64&&(w.tooltip=_[6]),h.$set(w)},i(_){m||(b(h.$$.fragment,_),m=!0)},o(_){$(h.$$.fragment,_),m=!1},d(_){_&&C(e),_&&C(t),_&&C(a),_&&C(o),_&&C(l),_&&C(u),_&&C(c),_&&C(f),B(h)}}}function nvt(n){let e;return{c(){e=oe(n[4])},m(t,r){S(t,e,r)},p(t,r){r&16&&vt(e,t[4])},d(t){t&&C(e)}}}function rvt(n){let e,t,r,i;return e=new xt({props:{$$slots:{default:[tvt]},$$scope:{ctx:n}}}),r=new xt({props:{$$slots:{default:[nvt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment)},m(a,o){H(e,a,o),S(a,t,o),H(r,a,o),i=!0},p(a,o){const l={};o&131268&&(l.$$scope={dirty:o,ctx:a}),e.$set(l);const s={};o&131088&&(s.$$scope={dirty:o,ctx:a}),r.$set(s)},i(a){i||(b(e.$$.fragment,a),b(r.$$.fragment,a),i=!0)},o(a){$(e.$$.fragment,a),$(r.$$.fragment,a),i=!1},d(a){B(e,a),a&&C(t),B(r,a)}}}function ivt(n){let e,t,r,i;const a=[J9t,X9t],o=[];function l(s,u){return s[9].user.accountPortalAccess?0:1}return e=l(n),t=o[e]=a[e](n),{c(){t.c(),r=$t()},m(s,u){o[e].m(s,u),S(s,r,u),i=!0},p(s,u){let c=e;e=l(s),e===c?o[e].p(s,u):(Ae(),$(o[c],1,1,()=>{o[c]=null}),Me(),t=o[e],t?t.p(s,u):(t=o[e]=a[e](s),t.c()),b(t,1),t.m(r.parentNode,r))},i(s){i||(b(t),i=!0)},o(s){$(t),i=!1},d(s){o[e].d(s),s&&C(r)}}}function avt(n){let e,t,r={$$slots:{default:[ivt]},$$scope:{ctx:n}};return e=new ir({props:r}),n[16](e),e.$on("show",function(){zn(n[1])&&n[1].apply(this,arguments)}),e.$on("hide",function(){zn(n[0])&&n[0].apply(this,arguments)}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,[a]){n=i;const o={};a&132084&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){n[16](null),B(e,i)}}}function ovt(n,e,t){let r,i,a,o,l,s,u,c,f,h;Fe(n,Ba,I=>t(13,c=I)),Fe(n,Wi,I=>t(14,f=I)),Fe(n,mr,I=>t(9,h=I));let{onDismiss:m=()=>{}}=e,{onShow:_=()=>{}}=e,y;function w(){y.show()}function A(){y.hide()}const E=()=>{window.location.href=i};function T(I){Be[I?"unshift":"push"](()=>{y=I,t(3,y)})}return n.$$set=I=>{"onDismiss"in I&&t(0,m=I.onDismiss),"onShow"in I&&t(1,_=I.onShow)},n.$$.update=()=>{var I,P;n.$$.dirty&16384&&t(12,r=f.accountPortalUrl),n.$$.dirty&4096&&t(8,i=`${r}/portal/upgrade`),n.$$.dirty&8192&&t(7,a=c.quotaResetDaysRemaining),n.$$.dirty&8192&&t(6,o=c.quotaResetDate),n.$$.dirty&8192&&t(2,l=((I=c.usageMetrics)==null?void 0:I.dayPasses)>100?100:(P=c.usageMetrics)==null?void 0:P.dayPasses),n.$$.dirty&4&&t(5,s=l>=100?"You have run out of Day Passes":"You are almost out of Day Passes"),n.$$.dirty&4&&t(4,u=l>=100?"Upgrade your account to bring your apps back online.":"Upgrade your account to prevent your apps from going offline.")},[m,_,l,y,u,s,o,a,i,h,w,A,r,c,f,E,T]}class lvt extends Re{constructor(e){super(),Ve(this,e,ovt,avt,Oe,{onDismiss:0,onShow:1,show:10,hide:11})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[11]}}function svt(n){let e,t;return e=new br({props:{title:dZ,size:"M",showCancelButton:!1,$$slots:{default:[hvt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&8264&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function uvt(n){let e,t;return e=new br({props:{title:dZ,size:"M",confirmText:"Upgrade",onConfirm:n[11],$$slots:{default:[_vt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&16&&(a.onConfirm=r[11]),i&8264&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function cvt(n){let e;return{c(){e=oe("The payment for your subscription has failed")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function fvt(n){let e;return{c(){e=oe(`Please upgrade your billing details before your account gets downgraded
|
|
1009
1009
|
to the free plan`)},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function pvt(n){let e;return{c(){e=oe("Please contact your account holder.")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function dvt(n){let e,t=`${n[6].pastDueDaysRemaining} day${n[6].pastDueDaysRemaining==1?"":"s"} remaining`,r,i,a,o,l;return o=new u5({props:{tooltip:n[3],size:"S"}}),{c(){e=X("div"),r=oe(t),i=U(),a=X("span"),O(o.$$.fragment),D(a,"class","tooltip"),D(e,"class","tooltip-root svelte-15oazzb")},m(s,u){S(s,e,u),j(e,r),j(e,i),j(e,a),H(o,a,null),l=!0},p(s,u){(!l||u&64)&&t!==(t=`${s[6].pastDueDaysRemaining} day${s[6].pastDueDaysRemaining==1?"":"s"} remaining`)&&vt(r,t);const c={};u&8&&(c.tooltip=s[3]),o.$set(c)},i(s){l||(b(o.$$.fragment,s),l=!0)},o(s){$(o.$$.fragment,s),l=!1},d(s){s&&C(e),B(o)}}}function hvt(n){let e,t,r,i,a,o,l,s;return e=new xt({props:{$$slots:{default:[cvt]},$$scope:{ctx:n}}}),r=new xt({props:{$$slots:{default:[fvt]},$$scope:{ctx:n}}}),a=new xt({props:{$$slots:{default:[pvt]},$$scope:{ctx:n}}}),l=new xt({props:{weight:800,$$slots:{default:[dvt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment),o=U(),O(l.$$.fragment)},m(u,c){H(e,u,c),S(u,t,c),H(r,u,c),S(u,i,c),H(a,u,c),S(u,o,c),H(l,u,c),s=!0},p(u,c){const f={};c&8192&&(f.$$scope={dirty:c,ctx:u}),e.$set(f);const h={};c&8192&&(h.$$scope={dirty:c,ctx:u}),r.$set(h);const m={};c&8192&&(m.$$scope={dirty:c,ctx:u}),a.$set(m);const _={};c&8264&&(_.$$scope={dirty:c,ctx:u}),l.$set(_)},i(u){s||(b(e.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),b(l.$$.fragment,u),s=!0)},o(u){$(e.$$.fragment,u),$(r.$$.fragment,u),$(a.$$.fragment,u),$(l.$$.fragment,u),s=!1},d(u){B(e,u),u&&C(t),B(r,u),u&&C(i),B(a,u),u&&C(o),B(l,u)}}}function mvt(n){let e;return{c(){e=oe("The payment for your subscription has failed")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function gvt(n){let e;return{c(){e=oe(`Please upgrade your billing details before your account gets downgraded
|
|
1010
1010
|
to the free plan`)},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function vvt(n){let e,t=`${n[6].pastDueDaysRemaining} day${n[6].pastDueDaysRemaining==1?"":"s"} remaining`,r,i,a,o,l;return o=new u5({props:{tooltip:n[3],size:"S"}}),{c(){e=X("div"),r=oe(t),i=U(),a=X("span"),O(o.$$.fragment),D(a,"class","tooltip"),D(e,"class","tooltip-root svelte-15oazzb")},m(s,u){S(s,e,u),j(e,r),j(e,i),j(e,a),H(o,a,null),l=!0},p(s,u){(!l||u&64)&&t!==(t=`${s[6].pastDueDaysRemaining} day${s[6].pastDueDaysRemaining==1?"":"s"} remaining`)&&vt(r,t);const c={};u&8&&(c.tooltip=s[3]),o.$set(c)},i(s){l||(b(o.$$.fragment,s),l=!0)},o(s){$(o.$$.fragment,s),l=!1},d(s){s&&C(e),B(o)}}}function _vt(n){let e,t,r,i,a,o;return e=new xt({props:{$$slots:{default:[mvt]},$$scope:{ctx:n}}}),r=new xt({props:{$$slots:{default:[gvt]},$$scope:{ctx:n}}}),a=new xt({props:{weight:800,$$slots:{default:[vvt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),O(a.$$.fragment)},m(l,s){H(e,l,s),S(l,t,s),H(r,l,s),S(l,i,s),H(a,l,s),o=!0},p(l,s){const u={};s&8192&&(u.$$scope={dirty:s,ctx:l}),e.$set(u);const c={};s&8192&&(c.$$scope={dirty:s,ctx:l}),r.$set(c);const f={};s&8264&&(f.$$scope={dirty:s,ctx:l}),a.$set(f)},i(l){o||(b(e.$$.fragment,l),b(r.$$.fragment,l),b(a.$$.fragment,l),o=!0)},o(l){$(e.$$.fragment,l),$(r.$$.fragment,l),$(a.$$.fragment,l),o=!1},d(l){B(e,l),l&&C(t),B(r,l),l&&C(i),B(a,l)}}}function bvt(n){let e,t,r,i;const a=[uvt,svt],o=[];function l(s,u){return s[5].user.accountPortalAccess?0:1}return e=l(n),t=o[e]=a[e](n),{c(){t.c(),r=$t()},m(s,u){o[e].m(s,u),S(s,r,u),i=!0},p(s,u){let c=e;e=l(s),e===c?o[e].p(s,u):(Ae(),$(o[c],1,1,()=>{o[c]=null}),Me(),t=o[e],t?t.p(s,u):(t=o[e]=a[e](s),t.c()),b(t,1),t.m(r.parentNode,r))},i(s){i||(b(t),i=!0)},o(s){$(t),i=!1},d(s){o[e].d(s),s&&C(r)}}}function yvt(n){let e,t,r={$$slots:{default:[bvt]},$$scope:{ctx:n}};return e=new ir({props:r}),n[12](e),e.$on("show",function(){zn(n[1])&&n[1].apply(this,arguments)}),e.$on("hide",function(){zn(n[0])&&n[0].apply(this,arguments)}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,[a]){n=i;const o={};a&8312&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){n[12](null),B(e,i)}}}const dZ="Payment failed";function $vt(n,e,t){let r,i,a,o,l;Fe(n,Wi,w=>t(10,a=w)),Fe(n,mr,w=>t(5,o=w)),Fe(n,Ba,w=>t(6,l=w));let{onDismiss:s=()=>{}}=e,{onShow:u=()=>{}}=e,c,f;function h(){c.show()}function m(){c.hide()}ar(()=>{Ba.subscribe(w=>{t(3,f=w.pastDueEndDate)})});const _=()=>{window.location.href=i};function y(w){Be[w?"unshift":"push"](()=>{c=w,t(2,c)})}return n.$$set=w=>{"onDismiss"in w&&t(0,s=w.onDismiss),"onShow"in w&&t(1,u=w.onShow)},n.$$.update=()=>{n.$$.dirty&1024&&t(9,r=a.accountPortalUrl),n.$$.dirty&512&&t(4,i=`${r}/portal/upgrade`)},[s,u,c,f,i,o,l,h,m,r,a,_,y]}class wvt extends Re{constructor(e){super(),Ve(this,e,$vt,yvt,Oe,{onDismiss:0,onShow:1,show:7,hide:8})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[8]}}function kvt(n){let e,t,r;return{c(){e=oe(`The payment for your subscription has failed and we have downgraded your
|
|
1011
1011
|
account to the `),t=X("span"),t.textContent="Free plan",r=oe("."),D(t,"class","free-plan svelte-ggsg04")},m(i,a){S(i,e,a),S(i,t,a),S(i,r,a)},p:bt,d(i){i&&C(e),i&&C(t),i&&C(r)}}}function zvt(n){let e;return{c(){e=oe("Upgrade to restore full functionality.")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function fU(n){let e,t;return e=new xt({props:{$$slots:{default:[Avt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Avt(n){let e;return{c(){e=oe("Please contact the account holder to upgrade.")},m(t,r){S(t,e,r)},d(t){t&&C(e)}}}function Mvt(n){let e,t,r,i,a,o;e=new xt({props:{$$slots:{default:[kvt]},$$scope:{ctx:n}}}),r=new xt({props:{$$slots:{default:[zvt]},$$scope:{ctx:n}}});let l=!n[4].user.accountPortalAccess&&fU(n);return{c(){O(e.$$.fragment),t=U(),O(r.$$.fragment),i=U(),l&&l.c(),a=$t()},m(s,u){H(e,s,u),S(s,t,u),H(r,s,u),S(s,i,u),l&&l.m(s,u),S(s,a,u),o=!0},p(s,u){const c={};u&2048&&(c.$$scope={dirty:u,ctx:s}),e.$set(c);const f={};u&2048&&(f.$$scope={dirty:u,ctx:s}),r.$set(f),s[4].user.accountPortalAccess?l&&(Ae(),$(l,1,1,()=>{l=null}),Me()):l?u&16&&b(l,1):(l=fU(s),l.c(),b(l,1),l.m(a.parentNode,a))},i(s){o||(b(e.$$.fragment,s),b(r.$$.fragment,s),b(l),o=!0)},o(s){$(e.$$.fragment,s),$(r.$$.fragment,s),$(l),o=!1},d(s){B(e,s),s&&C(t),B(r,s),s&&C(i),l&&l.d(s),s&&C(a)}}}function Cvt(n){let e,t;return e=new br({props:{title:"Your account is now on the Free plan",size:"M",showCancelButton:n[4].user.accountPortalAccess,confirmText:n[4].user.accountPortalAccess?"Upgrade":"Confirm",onConfirm:n[4].user.accountPortalAccess?n[9]:null,$$slots:{default:[Mvt]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){H(e,r,i),t=!0},p(r,i){const a={};i&16&&(a.showCancelButton=r[4].user.accountPortalAccess),i&16&&(a.confirmText=r[4].user.accountPortalAccess?"Upgrade":"Confirm"),i&24&&(a.onConfirm=r[4].user.accountPortalAccess?r[9]:null),i&2064&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){B(e,r)}}}function Svt(n){let e,t,r={$$slots:{default:[Cvt]},$$scope:{ctx:n}};return e=new ir({props:r}),n[10](e),e.$on("show",function(){zn(n[1])&&n[1].apply(this,arguments)}),e.$on("hide",function(){zn(n[0])&&n[0].apply(this,arguments)}),{c(){O(e.$$.fragment)},m(i,a){H(e,i,a),t=!0},p(i,[a]){n=i;const o={};a&2072&&(o.$$scope={dirty:a,ctx:n}),e.$set(o)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){$(e.$$.fragment,i),t=!1},d(i){n[10](null),B(e,i)}}}function Lvt(n,e,t){let r,i,a,o;Fe(n,Wi,_=>t(8,a=_)),Fe(n,mr,_=>t(4,o=_));let{onDismiss:l=()=>{}}=e,{onShow:s=()=>{}}=e,u;function c(){u.show()}function f(){u.hide()}const h=()=>{window.location.href=i};function m(_){Be[_?"unshift":"push"](()=>{u=_,t(2,u)})}return n.$$set=_=>{"onDismiss"in _&&t(0,l=_.onDismiss),"onShow"in _&&t(1,s=_.onShow)},n.$$.update=()=>{n.$$.dirty&256&&t(7,r=a.accountPortalUrl),n.$$.dirty&128&&t(3,i=`${r}/portal/upgrade`)},[l,s,u,i,o,c,f,r,a,h,m]}class Evt extends Re{constructor(e){super(),Ve(this,e,Lvt,Svt,Oe,{onDismiss:0,onShow:1,show:5,hide:6})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[6]}}const Tvt=86400,hZ=n=>{Hv.actions.setExpiring(n,{},Tvt)},mA=n=>dn(mr).user.accountPortalAccess?{extraButtonText:"Upgrade Plan",extraButtonAction:()=>{hZ(n),window.location.href=`${dn(Wi).accountPortalUrl}/portal/upgrade`}}:{},K9=(n,e,t,r,i)=>{const a=dn(mr),o=dn(Ba),l=(o==null?void 0:o.usageMetrics[n])>100?100:o==null?void 0:o.usageMetrics[n];let s={key:t,type:Nh.INFO,onChange:()=>{hZ(t)},message:i||`You have used ${l}% of your monthly usage of ${e} with ${o.quotaResetDaysRemaining} day${o.quotaResetDaysRemaining==1?"":"s"} remaining. ${a.user.accountPortalAccess?"":"Please contact your account holder to upgrade"}`,criteria:()=>(o==null?void 0:o.usageMetrics[n])>=r,tooltip:o==null?void 0:o.quotaResetDate};return dn(mr).user.accountPortalAccess?{...s,...mA(t)}:s},Dvt=()=>{var t;const n=dn(mr),e=dn(Ba);return((t=dn(Ba))==null?void 0:t.usageMetrics.dayPasses)>=100?{key:"max_dayPasses",type:Nh.NEGATIVE,criteria:()=>!0,message:`Your apps are currently offline. You have exceeded your plans limit for Day Passes. ${n.user.accountPortalAccess?"":"Please contact your account holder to upgrade."}`,...mA(),showCloseButton:!1}:K9("dayPasses","Day Passes",d4.LICENSING_DAYPASS_WARNING_BANNER,90,`You have used ${e==null?void 0:e.usageMetrics.dayPasses}% of your monthly usage of Day Passes with ${e==null?void 0:e.quotaResetDaysRemaining} day${dn(Ba).quotaResetDaysRemaining==1?"":"s"} remaining. All apps will be taken offline if this limit is reached. ${n.user.accountPortalAccess?"":"Please contact your account holder to upgrade."}`)},Hvt=()=>{var n,e;return{key:"payment_Failed",type:Nh.NEGATIVE,criteria:()=>{var t;return((t=dn(Ba))==null?void 0:t.accountPastDue)&&!dn(Ba).isFreePlan},message:`Payment Failed - Please update your billing details or your account will be downgrades in
|
package/builder/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap"
|
|
11
11
|
rel="stylesheet"
|
|
12
12
|
/>
|
|
13
|
-
<script type="module" crossorigin src="/builder/assets/index.
|
|
13
|
+
<script type="module" crossorigin src="/builder/assets/index.20b2d716.js"></script>
|
|
14
14
|
<link rel="stylesheet" href="/builder/assets/index.fd3654ad.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body id="app">
|
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1664204216345" clover="3.2.0">
|
|
3
|
+
<project timestamp="1664204216345" name="All files">
|
|
4
4
|
<metrics statements="4106" coveredstatements="2991" conditionals="1761" coveredconditionals="964" methods="611" coveredmethods="429" elements="6478" coveredelements="4384" complexity="0" loc="4106" ncloc="4106" packages="22" files="122" classes="122"/>
|
|
5
5
|
<package name="api">
|
|
6
6
|
<metrics statements="35" coveredstatements="34" conditionals="5" coveredconditionals="2" methods="4" coveredmethods="4"/>
|
|
@@ -232,7 +232,7 @@ exports.update = async function (ctx) {
|
|
|
232
232
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
233
233
|
Code coverage generated by
|
|
234
234
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
235
|
-
at Mon Sep 26 2022 14:
|
|
235
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
236
236
|
</div>
|
|
237
237
|
<script src="../../prettify.js"></script>
|
|
238
238
|
<script>
|
|
@@ -925,7 +925,7 @@ exports.test = async function (ctx) {
|
|
|
925
925
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
926
926
|
Code coverage generated by
|
|
927
927
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
928
|
-
at Mon Sep 26 2022 14:
|
|
928
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
929
929
|
</div>
|
|
930
930
|
<script src="../../prettify.js"></script>
|
|
931
931
|
<script>
|
|
@@ -127,7 +127,7 @@ exports.exportAppDump = async function (ctx) {
|
|
|
127
127
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
128
128
|
Code coverage generated by
|
|
129
129
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
130
|
-
at Mon Sep 26 2022 14:
|
|
130
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
131
131
|
</div>
|
|
132
132
|
<script src="../../prettify.js"></script>
|
|
133
133
|
<script>
|
|
@@ -400,7 +400,7 @@ exports.importApps = <span class="fstat-no" title="function not covered" >as</sp
|
|
|
400
400
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
401
401
|
Code coverage generated by
|
|
402
402
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
403
|
-
at Mon Sep 26 2022 14:
|
|
403
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
404
404
|
</div>
|
|
405
405
|
<script src="../../prettify.js"></script>
|
|
406
406
|
<script>
|
|
@@ -898,7 +898,7 @@ const buildSchemaHelper = <span class="fstat-no" title="function not covered" >a
|
|
|
898
898
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
899
899
|
Code coverage generated by
|
|
900
900
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
901
|
-
at Mon Sep 26 2022 14:
|
|
901
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
902
902
|
</div>
|
|
903
903
|
<script src="../../prettify.js"></script>
|
|
904
904
|
<script>
|
|
@@ -475,7 +475,7 @@ exports.getBudibaseVersion = async ctx => {
|
|
|
475
475
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
476
476
|
Code coverage generated by
|
|
477
477
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
478
|
-
at Mon Sep 26 2022 14:
|
|
478
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
479
479
|
</div>
|
|
480
480
|
<script src="../../prettify.js"></script>
|
|
481
481
|
<script>
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
342
342
|
Code coverage generated by
|
|
343
343
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
344
|
-
at Mon Sep 26 2022 14:
|
|
344
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
345
345
|
</div>
|
|
346
346
|
<script src="../../prettify.js"></script>
|
|
347
347
|
<script>
|
|
@@ -136,7 +136,7 @@ exports.find = async function (ctx) {
|
|
|
136
136
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
137
137
|
Code coverage generated by
|
|
138
138
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
139
|
-
at Mon Sep 26 2022 14:
|
|
139
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
140
140
|
</div>
|
|
141
141
|
<script src="../../prettify.js"></script>
|
|
142
142
|
<script>
|
|
@@ -211,7 +211,7 @@ exports.destroy = async function (ctx) {
|
|
|
211
211
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
212
212
|
Code coverage generated by
|
|
213
213
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
214
|
-
at Mon Sep 26 2022 14:
|
|
214
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
215
215
|
</div>
|
|
216
216
|
<script src="../../prettify.js"></script>
|
|
217
217
|
<script>
|
|
@@ -193,7 +193,7 @@ exports.getMetadata = async ctx => {
|
|
|
193
193
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
194
194
|
Code coverage generated by
|
|
195
195
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
196
|
-
at Mon Sep 26 2022 14:
|
|
196
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
197
197
|
</div>
|
|
198
198
|
<script src="../../prettify.js"></script>
|
|
199
199
|
<script>
|
|
@@ -109,7 +109,7 @@ exports.fetchDefinitions = <span class="fstat-no" title="function not covered" >
|
|
|
109
109
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
110
110
|
Code coverage generated by
|
|
111
111
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
112
|
-
at Mon Sep 26 2022 14:
|
|
112
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
113
113
|
</div>
|
|
114
114
|
<script src="../../prettify.js"></script>
|
|
115
115
|
<script>
|
|
@@ -595,7 +595,7 @@ exports.removePermission = async function (ctx) {
|
|
|
595
595
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
596
596
|
Code coverage generated by
|
|
597
597
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
598
|
-
at Mon Sep 26 2022 14:
|
|
598
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
599
599
|
</div>
|
|
600
600
|
<script src="../../prettify.js"></script>
|
|
601
601
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at Mon Sep 26 2022 14:
|
|
104
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -220,7 +220,7 @@ exports.generateQueryPreviewValidation = () => {
|
|
|
220
220
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
221
221
|
Code coverage generated by
|
|
222
222
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
223
|
-
at Mon Sep 26 2022 14:
|
|
223
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
224
224
|
</div>
|
|
225
225
|
<script src="../../../prettify.js"></script>
|
|
226
226
|
<script>
|
|
@@ -394,7 +394,7 @@ exports.destroy = async function (ctx) {
|
|
|
394
394
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
395
395
|
Code coverage generated by
|
|
396
396
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
397
|
-
at Mon Sep 26 2022 14:
|
|
397
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
398
398
|
</div>
|
|
399
399
|
<script src="../../prettify.js"></script>
|
|
400
400
|
<script>
|
|
@@ -346,7 +346,7 @@ exports.clientFetch = async ctx => {
|
|
|
346
346
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
347
347
|
Code coverage generated by
|
|
348
348
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
349
|
-
at Mon Sep 26 2022 14:
|
|
349
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
350
350
|
</div>
|
|
351
351
|
<script src="../../prettify.js"></script>
|
|
352
352
|
<script>
|
|
@@ -829,7 +829,7 @@ exports.fetchEnrichedRow = <span class="fstat-no" title="function not covered" >
|
|
|
829
829
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
830
830
|
Code coverage generated by
|
|
831
831
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
832
|
-
at Mon Sep 26 2022 14:
|
|
832
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
833
833
|
</div>
|
|
834
834
|
<script src="../../../prettify.js"></script>
|
|
835
835
|
<script>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
162
162
|
Code coverage generated by
|
|
163
163
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
164
|
-
at Mon Sep 26 2022 14:
|
|
164
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
165
165
|
</div>
|
|
166
166
|
<script src="../../../prettify.js"></script>
|
|
167
167
|
<script>
|
|
@@ -1477,7 +1477,7 @@ exports.fetchEnrichedRow = async ctx => {
|
|
|
1477
1477
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1478
1478
|
Code coverage generated by
|
|
1479
1479
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1480
|
-
at Mon Sep 26 2022 14:
|
|
1480
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
1481
1481
|
</div>
|
|
1482
1482
|
<script src="../../../prettify.js"></script>
|
|
1483
1483
|
<script>
|
|
@@ -1576,7 +1576,7 @@ exports.fullSearch = async (query, params) => {
|
|
|
1576
1576
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1577
1577
|
Code coverage generated by
|
|
1578
1578
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1579
|
-
at Mon Sep 26 2022 14:
|
|
1579
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
1580
1580
|
</div>
|
|
1581
1581
|
<script src="../../../prettify.js"></script>
|
|
1582
1582
|
<script>
|
|
@@ -538,7 +538,7 @@ exports.finaliseRow = async (
|
|
|
538
538
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
539
539
|
Code coverage generated by
|
|
540
540
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
541
|
-
at Mon Sep 26 2022 14:
|
|
541
|
+
at Mon Sep 26 2022 14:56:56 GMT+0000 (Coordinated Universal Time)
|
|
542
542
|
</div>
|
|
543
543
|
<script src="../../../prettify.js"></script>
|
|
544
544
|
<script>
|