@budibase/server 2.1.33 → 2.1.35

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.
Files changed (148) hide show
  1. package/builder/assets/{index.d2995f56.js → index.6970d8ca.js} +2 -2
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +2 -2
  4. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  5. package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
  6. package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
  8. package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
  9. package/coverage/lcov-report/api/controllers/index.html +1 -1
  10. package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
  11. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  12. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  13. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  14. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  15. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  16. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  20. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  21. package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  25. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  26. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  29. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  34. package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  37. package/coverage/lcov-report/api/index.html +1 -1
  38. package/coverage/lcov-report/api/index.js.html +1 -1
  39. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  40. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  41. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  42. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  43. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  44. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  45. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/index.html +1 -1
  48. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  56. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  62. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  64. package/coverage/lcov-report/automations/actions.js.html +1 -1
  65. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  66. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  67. package/coverage/lcov-report/automations/index.html +1 -1
  68. package/coverage/lcov-report/automations/index.js.html +1 -1
  69. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  70. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  71. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  72. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  73. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  74. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  75. package/coverage/lcov-report/automations/steps/index.html +1 -1
  76. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  77. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  78. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  79. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  80. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  85. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  86. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  87. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  88. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  89. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  90. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  91. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  92. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  93. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  94. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  95. package/coverage/lcov-report/constants/index.html +1 -1
  96. package/coverage/lcov-report/constants/index.js.html +1 -1
  97. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  98. package/coverage/lcov-report/constants/screens.js.html +1 -1
  99. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  100. package/coverage/lcov-report/db/index.html +1 -1
  101. package/coverage/lcov-report/db/index.js.html +1 -1
  102. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  103. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  104. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  105. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
  106. package/coverage/lcov-report/db/newid.js.html +1 -1
  107. package/coverage/lcov-report/db/utils.js.html +1 -1
  108. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  109. package/coverage/lcov-report/events/index.html +1 -1
  110. package/coverage/lcov-report/events/index.js.html +1 -1
  111. package/coverage/lcov-report/events/utils.js.html +1 -1
  112. package/coverage/lcov-report/index.html +1 -1
  113. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  114. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  115. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  116. package/coverage/lcov-report/middleware/builder.js.html +1 -1
  117. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  118. package/coverage/lcov-report/middleware/index.html +1 -1
  119. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  120. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  121. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  122. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  123. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  124. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  125. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  126. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  127. package/coverage/lcov-report/utilities/global.js.html +1 -1
  128. package/coverage/lcov-report/utilities/index.html +1 -1
  129. package/coverage/lcov-report/utilities/index.js.html +1 -1
  130. package/coverage/lcov-report/utilities/plugins.js.html +1 -1
  131. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  132. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  133. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  134. package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
  135. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  136. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  137. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  138. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  139. package/coverage/lcov-report/utilities/security.js.html +1 -1
  140. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  141. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  142. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  143. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  144. package/coverage/lcov-report/utilities/users.js.html +1 -1
  145. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  146. package/dist/package.json +6 -6
  147. package/dist/tsconfig.build.tsbuildinfo +1 -1
  148. package/package.json +7 -7
@@ -422,7 +422,7 @@ Event: `+pd(e)),!0):this._isIgnoredError(e,t)?(Oo.warn("Event dropped due to bei
422
422
  Url: `+this._getEventFilterUrl(e)),!0):this._isAllowedUrl(e,t)?!1:(Oo.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+pd(e)+`.
423
423
  Url: `+this._getEventFilterUrl(e)),!0)},n.prototype._isSentryError=function(e,t){if(!t.ignoreInternal)return!1;try{return e&&e.exception&&e.exception.values&&e.exception.values[0]&&e.exception.values[0].type==="SentryError"||!1}catch{return!1}},n.prototype._isIgnoredError=function(e,t){return!t.ignoreErrors||!t.ignoreErrors.length?!1:this._getPossibleEventMessages(e).some(function(r){return t.ignoreErrors.some(function(i){return dy(r,i)})})},n.prototype._isDeniedUrl=function(e,t){if(!t.denyUrls||!t.denyUrls.length)return!1;var r=this._getEventFilterUrl(e);return r?t.denyUrls.some(function(i){return dy(r,i)}):!1},n.prototype._isAllowedUrl=function(e,t){if(!t.allowUrls||!t.allowUrls.length)return!0;var r=this._getEventFilterUrl(e);return r?t.allowUrls.some(function(i){return dy(r,i)}):!0},n.prototype._mergeOptions=function(e){return e===void 0&&(e={}),{allowUrls:hl(this._options.whitelistUrls||[],this._options.allowUrls||[],e.whitelistUrls||[],e.allowUrls||[]),denyUrls:hl(this._options.blacklistUrls||[],this._options.denyUrls||[],e.blacklistUrls||[],e.denyUrls||[]),ignoreErrors:hl(this._options.ignoreErrors||[],e.ignoreErrors||[],q3e),ignoreInternal:typeof this._options.ignoreInternal<"u"?this._options.ignoreInternal:!0}},n.prototype._getPossibleEventMessages=function(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},r=t.type,i=r===void 0?"":r,a=t.value,o=a===void 0?"":a;return[""+o,i+": "+o]}catch{return Oo.error("Cannot extract message for event "+pd(e)),[]}return[]},n.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace){var t=e.stacktrace.frames;return t&&t[t.length-1].filename||null}if(e.exception){var r=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return r&&r[r.length-1].filename||null}return null}catch{return Oo.error("Cannot extract url for event "+pd(e)),null}},n.id="InboundFilters",n}(),vg="?",G3e=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Y3e=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,K3e=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,X3e=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,J3e=/\((\S*)(?::(\d+))(?::(\d+))\)/;function i7(n){var e=null,t=n&&n.framesToPop;try{if(e=Q3e(n),e)return tT(e,t)}catch{}try{if(e=Z3e(n),e)return tT(e,t)}catch{}return{message:Xk(n),name:n&&n.name,stack:[],failed:!0}}function Z3e(n){if(!n||!n.stack)return null;for(var e=[],t=n.stack.split(`
424
424
  `),r,i,a,o,l=0;l<t.length;++l){if(a=G3e.exec(t[l])){var s=a[2]&&a[2].indexOf("native")===0;r=a[2]&&a[2].indexOf("eval")===0,r&&(i=J3e.exec(a[2]))&&(a[2]=i[1],a[3]=i[2],a[4]=i[3]),o={url:a[2]&&a[2].indexOf("address at ")===0?a[2].substr(11):a[2],func:a[1]||vg,args:s?[a[2]]:[],line:a[3]?+a[3]:null,column:a[4]?+a[4]:null}}else if(a=K3e.exec(t[l]))o={url:a[2],func:a[1]||vg,args:[],line:+a[3],column:a[4]?+a[4]:null};else if(a=Y3e.exec(t[l]))r=a[3]&&a[3].indexOf(" > eval")>-1,r&&(i=X3e.exec(a[3]))?(a[1]=a[1]||"eval",a[3]=i[1],a[4]=i[2],a[5]=""):l===0&&!a[5]&&n.columnNumber!==void 0&&(e[0].column=n.columnNumber+1),o={url:a[3],func:a[1]||vg,args:a[2]?a[2].split(","):[],line:a[4]?+a[4]:null,column:a[5]?+a[5]:null};else continue;!o.func&&o.line&&(o.func=vg),e.push(o)}return e.length?{message:Xk(n),name:n.name,stack:e}:null}function Q3e(n){if(!n||!n.stacktrace)return null;for(var e=n.stacktrace,t=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,r=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,i=e.split(`
425
- `),a=[],o,l=0;l<i.length;l+=2){var s=null;(o=t.exec(i[l]))?s={url:o[2],func:o[3],args:[],line:+o[1],column:null}:(o=r.exec(i[l]))&&(s={url:o[6],func:o[3]||o[4],args:o[5]?o[5].split(","):[],line:+o[1],column:+o[2]}),s&&(!s.func&&s.line&&(s.func=vg),a.push(s))}return a.length?{message:Xk(n),name:n.name,stack:a}:null}function tT(n,e){try{return Wi({},n,{stack:n.stack.slice(e)})}catch{return n}}function Xk(n){var e=n&&n.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}var e4e=50;function CY(n){var e=Jk(n.stack),t={type:n.name,value:n.message};return e&&e.length&&(t.stacktrace={frames:e}),t.type===void 0&&t.value===""&&(t.value="Unrecoverable error caught"),t}function t4e(n,e,t){var r={exception:{values:[{type:jk(n)?n.constructor.name:t?"UnhandledRejection":"Error",value:"Non-Error "+(t?"promise rejection":"exception")+" captured with keys: "+m3e(n)}]},extra:{__serialized__:_Y(n)}};if(e){var i=i7(e),a=Jk(i.stack);r.stacktrace={frames:a}}return r}function nT(n){var e=CY(n);return{exception:{values:[e]}}}function Jk(n){if(!n||!n.length)return[];var e=n,t=e[0].func||"",r=e[e.length-1].func||"";return(t.indexOf("captureMessage")!==-1||t.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,e4e).map(function(i){return{colno:i.column===null?void 0:i.column,filename:i.url||e[0].url,function:i.func||"?",in_app:!0,lineno:i.line===null?void 0:i.line}}).reverse()}function Z$(n,e,t){t===void 0&&(t={});var r;if(mY(n)&&n.error){var i=n;return n=i.error,r=nT(i7(n)),r}if(jE(n)||n3e(n)){var a=n,o=a.name||(jE(a)?"DOMError":"DOMException"),l=a.message?o+": "+a.message:o;return r=Q$(l,e,t),X$(r,l),r}if(hY(n))return r=nT(i7(n)),r;if(Fk(n)||jk(n)){var s=n;return r=t4e(s,e,t.rejection),s6(r,{synthetic:!0}),r}return r=Q$(n,e,t),X$(r,""+n,void 0),s6(r,{synthetic:!0}),r}function Q$(n,e,t){t===void 0&&(t={});var r={message:n};if(t.attachStacktrace&&e){var i=i7(e),a=Jk(i.stack);r.stacktrace={frames:a}}return r}var SY=function(){function n(e){this.options=e,this._buffer=new g3e(30),this._api=new AY(this.options.dsn),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return n.prototype.sendEvent=function(e){throw new r5("Transport Class has to implement `sendEvent` method")},n.prototype.close=function(e){return this._buffer.drain(e)},n}(),n4e=Fu(),r4e=function(n){B7(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t._disabledUntil=new Date(Date.now()),t}return e.prototype.sendEvent=function(t){var r=this;if(new Date(Date.now())<this._disabledUntil)return Promise.reject({event:t,reason:"Transport locked till "+this._disabledUntil+" due to too many requests.",status:429});var i=MY(t,this._api),a={body:i.body,method:"POST",referrerPolicy:_3e()?"origin":""};return this.options.fetchParameters!==void 0&&Object.assign(a,this.options.fetchParameters),this.options.headers!==void 0&&(a.headers=this.options.headers),this._buffer.add(new s2(function(o,l){n4e.fetch(i.url,a).then(function(s){var u=B3.fromHttpCode(s.status);if(u===B3.Success){o({status:u});return}if(u===B3.RateLimit){var c=Date.now();r._disabledUntil=new Date(c+gY(c,s.headers.get("Retry-After"))),Oo.warn("Too many requests, backing off till: "+r._disabledUntil)}l(s)}).catch(l)}))},e}(SY),i4e=function(n){B7(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t._disabledUntil=new Date(Date.now()),t}return e.prototype.sendEvent=function(t){var r=this;if(new Date(Date.now())<this._disabledUntil)return Promise.reject({event:t,reason:"Transport locked till "+this._disabledUntil+" due to too many requests.",status:429});var i=MY(t,this._api);return this._buffer.add(new s2(function(a,o){var l=new XMLHttpRequest;l.onreadystatechange=function(){if(l.readyState===4){var u=B3.fromHttpCode(l.status);if(u===B3.Success){a({status:u});return}if(u===B3.RateLimit){var c=Date.now();r._disabledUntil=new Date(c+gY(c,l.getResponseHeader("Retry-After"))),Oo.warn("Too many requests, backing off till: "+r._disabledUntil)}o(l)}},l.open("POST",i.url);for(var s in r.options.headers)r.options.headers.hasOwnProperty(s)&&l.setRequestHeader(s,r.options.headers[s]);l.send(i.body)}))},e}(SY),a4e=function(n){B7(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype._setupTransport=function(){if(!this._options.dsn)return n.prototype._setupTransport.call(this);var t=Wi({},this._options.transportOptions,{dsn:this._options.dsn});return this._options.transport?new this._options.transport(t):qk()?new r4e(t):new i4e(t)},e.prototype.eventFromException=function(t,r){var i=r&&r.syntheticException||void 0,a=Z$(t,i,{attachStacktrace:this._options.attachStacktrace});return s6(a,{handled:!0,type:"generic"}),a.level=d5.Error,r&&r.event_id&&(a.event_id=r.event_id),s2.resolve(a)},e.prototype.eventFromMessage=function(t,r,i){r===void 0&&(r=d5.Info);var a=i&&i.syntheticException||void 0,o=Q$(t,a,{attachStacktrace:this._options.attachStacktrace});return o.level=r,i&&i.event_id&&(o.event_id=i.event_id),s2.resolve(o)},e}(j3e),ew=0;function rT(){return ew>0}function o4e(){ew+=1,setTimeout(function(){ew-=1})}function Sh(n,e,t){if(e===void 0&&(e={}),typeof n!="function")return n;try{if(n.__sentry__)return n;if(n.__sentry_wrapped__)return n.__sentry_wrapped__}catch{return n}var r=function(){var o=Array.prototype.slice.call(arguments);try{t&&typeof t=="function"&&t.apply(this,arguments);var l=o.map(function(s){return Sh(s,e)});return n.handleEvent?n.handleEvent.apply(this,l):n.apply(this,l)}catch(s){throw o4e(),I3e(function(u){u.addEventProcessor(function(c){var f=Wi({},c);return e.mechanism&&(X$(f,void 0,void 0),s6(f,e.mechanism)),f.extra=Wi({},f.extra,{arguments:o}),f}),zY(s)}),s}};try{for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}catch{}n.prototype=n.prototype||{},r.prototype=n.prototype,Object.defineProperty(n,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:n}});try{var a=Object.getOwnPropertyDescriptor(r,"name");a.configurable&&Object.defineProperty(r,"name",{get:function(){return n.name}})}catch{}return r}var l4e=function(){function n(e){this.name=n.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=Wi({onerror:!0,onunhandledrejection:!0},e)}return n.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(Oo.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(Oo.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},n.prototype._installGlobalOnErrorHandler=function(){var e=this;this._onErrorHandlerInstalled||(gd({callback:function(t){var r=t.error,i=l2(),a=i.getIntegration(n),o=r&&r.__sentry_own_request__===!0;if(!(!a||rT()||o)){var l=i.getClient(),s=r7(r)?e._eventFromIncompleteOnError(t.msg,t.url,t.line,t.column):e._enhanceEventWithInitialFrame(Z$(r,void 0,{attachStacktrace:l&&l.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);s6(s,{handled:!1,type:"onerror"}),i.captureEvent(s,{originalException:r})}},type:"error"}),this._onErrorHandlerInstalled=!0)},n.prototype._installGlobalOnUnhandledRejectionHandler=function(){var e=this;this._onUnhandledRejectionHandlerInstalled||(gd({callback:function(t){var r=t;try{"reason"in t?r=t.reason:"detail"in t&&"reason"in t.detail&&(r=t.detail.reason)}catch{}var i=l2(),a=i.getIntegration(n),o=r&&r.__sentry_own_request__===!0;if(!a||rT()||o)return!0;var l=i.getClient(),s=r7(r)?e._eventFromIncompleteRejection(r):Z$(r,void 0,{attachStacktrace:l&&l.getOptions().attachStacktrace,rejection:!0});s.level=d5.Error,s6(s,{handled:!1,type:"onunhandledrejection"}),i.captureEvent(s,{originalException:r})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},n.prototype._eventFromIncompleteOnError=function(e,t,r,i){var a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=mY(e)?e.message:e,l;if(l6(o)){var s=o.match(a);s&&(l=s[1],o=s[2])}var u={exception:{values:[{type:l||"Error",value:o}]}};return this._enhanceEventWithInitialFrame(u,t,r,i)},n.prototype._eventFromIncompleteRejection=function(e){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+e}]}}},n.prototype._enhanceEventWithInitialFrame=function(e,t,r,i){e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].stacktrace=e.exception.values[0].stacktrace||{},e.exception.values[0].stacktrace.frames=e.exception.values[0].stacktrace.frames||[];var a=isNaN(parseInt(i,10))?void 0:i,o=isNaN(parseInt(r,10))?void 0:r,l=l6(t)&&t.length>0?t:l3e();return e.exception.values[0].stacktrace.frames.length===0&&e.exception.values[0].stacktrace.frames.push({colno:a,filename:l,function:"?",in_app:!0,lineno:o}),e},n.id="GlobalHandlers",n}(),s4e=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],u4e=function(){function n(e){this.name=n.id,this._options=Wi({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}return n.prototype._wrapTimeFunction=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[0];return t[0]=Sh(i,{mechanism:{data:{function:K5(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}},n.prototype._wrapRAF=function(e){return function(t){return e.call(this,Sh(t,{mechanism:{data:{function:"requestAnimationFrame",handler:K5(e)},handled:!0,type:"instrument"}}))}},n.prototype._wrapEventTarget=function(e){var t=Fu(),r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(nu(r,"addEventListener",function(i){return function(a,o,l){try{typeof o.handleEvent=="function"&&(o.handleEvent=Sh(o.handleEvent.bind(o),{mechanism:{data:{function:"handleEvent",handler:K5(o),target:e},handled:!0,type:"instrument"}}))}catch{}return i.call(this,a,Sh(o,{mechanism:{data:{function:"addEventListener",handler:K5(o),target:e},handled:!0,type:"instrument"}}),l)}}),nu(r,"removeEventListener",function(i){return function(a,o,l){var s=o;try{s&&s.__sentry__&&i.call(this,a,s.__sentry_original__,l)}catch{}return i.call(this,a,s,l)}}))},n.prototype._wrapXHR=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this,a=["onload","onerror","onprogress","onreadystatechange"];return a.forEach(function(o){o in i&&typeof i[o]=="function"&&nu(i,o,function(l){var s={mechanism:{data:{function:o,handler:K5(l)},handled:!0,type:"instrument"}};return l.__sentry_original__&&(s.mechanism.data.handler=K5(l.__sentry_original__)),Sh(l,s)})}),e.apply(this,t)}},n.prototype.setupOnce=function(){var e=Fu();if(this._options.setTimeout&&nu(e,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&nu(e,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&nu(e,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&nu(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget){var t=Array.isArray(this._options.eventTarget)?this._options.eventTarget:s4e;t.forEach(this._wrapEventTarget.bind(this))}},n.id="TryCatch",n}(),LY=function(){function n(e){this.name=n.id,this._options=Wi({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}return n.prototype.addSentryBreadcrumb=function(e){!this._options.sentry||l2().addBreadcrumb({category:"sentry."+(e.type==="transaction"?"transaction":"event"),event_id:e.event_id,level:e.level,message:pd(e)},{event:e})},n.prototype._consoleBreadcrumb=function(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:d5.fromString(e.level),message:UE(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message="Assertion failed: "+(UE(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1);else return;l2().addBreadcrumb(t,{input:e.args,level:e.level})},n.prototype._domBreadcrumb=function(e){var t;try{t=e.event.target?Hv(e.event.target):Hv(e.event)}catch{t="<unknown>"}t.length!==0&&l2().addBreadcrumb({category:"ui."+e.name,message:t},{event:e.event,name:e.name})},n.prototype._xhrBreadcrumb=function(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;l2().addBreadcrumb({category:"xhr",data:e.xhr.__sentry_xhr__,type:"http"},{xhr:e.xhr});return}},n.prototype._fetchBreadcrumb=function(e){!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?l2().addBreadcrumb({category:"fetch",data:e.fetchData,level:d5.Error,type:"http"},{data:e.error,input:e.args}):l2().addBreadcrumb({category:"fetch",data:Wi({},e.fetchData,{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response}))},n.prototype._historyBreadcrumb=function(e){var t=Fu(),r=e.from,i=e.to,a=hy(t.location.href),o=hy(r),l=hy(i);o.path||(o=a),a.protocol===l.protocol&&a.host===l.host&&(i=l.relative),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),l2().addBreadcrumb({category:"navigation",data:{from:r,to:i}})},n.prototype.setupOnce=function(){var e=this;this._options.console&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._consoleBreadcrumb.apply(e,hl(t))},type:"console"}),this._options.dom&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._domBreadcrumb.apply(e,hl(t))},type:"dom"}),this._options.xhr&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._xhrBreadcrumb.apply(e,hl(t))},type:"xhr"}),this._options.fetch&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._fetchBreadcrumb.apply(e,hl(t))},type:"fetch"}),this._options.history&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._historyBreadcrumb.apply(e,hl(t))},type:"history"})},n.id="Breadcrumbs",n}(),c4e="cause",f4e=5,p4e=function(){function n(e){e===void 0&&(e={}),this.name=n.id,this._key=e.key||c4e,this._limit=e.limit||f4e}return n.prototype.setupOnce=function(){x_(function(e,t){var r=l2().getIntegration(n);return r?r._handler(e,t):e})},n.prototype._handler=function(e,t){if(!e.exception||!e.exception.values||!t||!cp(t.originalException,Error))return e;var r=this._walkErrorTree(t.originalException,this._key);return e.exception.values=hl(r,e.exception.values),e},n.prototype._walkErrorTree=function(e,t,r){if(r===void 0&&(r=[]),!cp(e[t],Error)||r.length+1>=this._limit)return r;var i=i7(e[t]),a=CY(i);return this._walkErrorTree(e[t],t,hl([a],r))},n.id="LinkedErrors",n}(),y9=Fu(),d4e=function(){function n(){this.name=n.id}return n.prototype.setupOnce=function(){x_(function(e){if(l2().getIntegration(n)){if(!y9.navigator||!y9.location)return e;var t=e.request||{};return t.url=t.url||y9.location.href,t.headers=t.headers||{},t.headers["User-Agent"]=y9.navigator.userAgent,Wi({},e,{request:t})}return e})},n.id="UserAgent",n}(),h4e="sentry.javascript.browser",iT="5.19.1",m4e=function(n){B7(e,n);function e(t){return t===void 0&&(t={}),n.call(this,a4e,t)||this}return e.prototype._prepareEvent=function(t,r,i){return t.platform=t.platform||"javascript",t.sdk=Wi({},t.sdk,{name:h4e,packages:hl(t.sdk&&t.sdk.packages||[],[{name:"npm:@sentry/browser",version:iT}]),version:iT}),n.prototype._prepareEvent.call(this,t,r,i)},e.prototype._sendEvent=function(t){var r=this.getIntegration(LY);r&&r.addSentryBreadcrumb(t),n.prototype._sendEvent.call(this,t)},e.prototype.showReportDialog=function(t){t===void 0&&(t={});var r=Fu().document;if(!!r){if(!this._isEnabled()){Oo.error("Trying to call showReportDialog with Sentry Client is disabled");return}var i=t.dsn||this.getDsn();if(!t.eventId){Oo.error("Missing `eventId` option in showReportDialog call");return}if(!i){Oo.error("Missing `Dsn` option in showReportDialog call");return}var a=r.createElement("script");a.async=!0,a.src=new AY(i).getReportDialogEndpoint(t),t.onLoad&&(a.onload=t.onLoad),(r.head||r.body).appendChild(a)}},e}(N3e),g4e=[new W3e,new U3e,new u4e,new LY,new l4e,new p4e,new d4e];function v4e(n){if(n===void 0&&(n={}),n.defaultIntegrations===void 0&&(n.defaultIntegrations=g4e),n.release===void 0){var e=Fu();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(n.release=e.SENTRY_RELEASE.id)}x3e(m4e,n)}class _4e{constructor(e){this.dsn=e}init(){this.dsn&&(v4e({dsn:this.dsn}),this.initalised=!0)}captureException(e){!this.initalised||zY(e)}identify(e){!this.initalised||O3e(t=>{t.setUser({id:e})})}}const $9=new Xfe("phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU"),wy=new _4e(""),w9=new Jfe("qz2sxfuv");class b4e{constructor(){this.clients=[$9,wy,w9]}async activate(){(await Zt.getAnalyticsStatus()).enabled&&this.clients.forEach(t=>t.init())}identify(e){$9.identify(e),wy.identify(e)}captureException(e){wy.captureException(e)}captureEvent(e,t={}){$9.captureEvent(e,t),w9.captureEvent(e,t)}showChat(e){w9.show(e)}async logout(){$9.logout(),w9.logout()}}const np=new b4e,ru=(n,e)=>EY(n,t=>t._id===e),vc=(n,e,t)=>{if(!n||!e)return null;if(n._id===e)return t;if(!n._children)return null;for(const r of n._children){const i=vc(r,e,n);if(i)return i}return null},T4=(n,e,t=[])=>{if(!n||!e)return[];if(n._id===e)return[...t,n];if(!n._children)return[];for(const r of n._children){const i=[...t,n],a=T4(r,e,i);if(a!=null&&a.length)return a}return[]},h5=(n,e)=>{if(!n||!e)return[];let t=[];return n._children&&n._children.forEach(r=>{t=[...t,...h5(r,e)]}),e(n)&&t.push(n),t.reverse()},q_=(n,e,t)=>{if(!t)return null;const r=T4(n,e).reverse();for(let i of r)if(t(i))return i;return null},EY=(n,e)=>{if(!n||!e)return null;if(e(n))return n;if(!n._children)return null;for(const t of n._children){const r=EY(t,e);if(r)return r}return null};let ky={};const D6=n=>{var r,i,a;if(!n)return[];if(!n.startsWith("plugin/")&&!n.startsWith("@budibase")&&(n=`@budibase/standard-components/${n}`),ky[n])return ky[n];const e=Xt.actions.components.getDefinition(n);let t=[];return e&&(t=(i=(r=e.settings)==null?void 0:r.filter(o=>!o.section))!=null?i:[],(a=e.settings)==null||a.filter(o=>o.section).forEach(o=>{t=t.concat(o.settings||[])})),ky[n]=t,t},Iv=n=>{var a;if(!n)return;const e=n._id,t=C4();let r=JSON.stringify(n);return r=r.replace(new RegExp(e,"g"),t),_G(r).forEach(o=>{let l=o.replace(/\\"/g,'"'),s=t6(l);if(s!=null){s=s.replace(new RegExp(e,"g"),t);let u=Dh(s);u=u.replace(/"/g,'\\"'),r=r.replace(o,u)}}),n=JSON.parse(r),{...n,_children:(a=n._children)==null?void 0:a.map(Iv)}},zy={apps:[],name:"",url:"",description:"",layouts:[],screens:[],components:[],clientFeatures:{spectrumThemes:!1,intelligentLoading:!1,deviceAwareness:!1,state:!1,rowSelection:!1,customThemes:!1,devicePreview:!1,messagePassing:!1,continueIfAction:!1,showNotificationAction:!1},errors:[],hasAppPackage:!1,libraries:null,appId:"",routes:{},clientLibPath:"",theme:"",customTheme:{},previewDevice:"desktop",highlightedSettingKey:null,selectedScreenId:null,selectedComponentId:null,selectedLayoutId:null},y4e=()=>{const n=gi({...zy}),e=xG(async(t,r)=>{const a=pn(n).screens.find(s=>s._id===r);if(!a)return;let o=$1.cloneDeep(a);if(t(o)!==!1)return await n.actions.screens.save(o)});return n.actions={reset:()=>{n.set({...zy})},initialise:async t=>{const{layouts:r,screens:i,application:a,clientLibPath:o}=t;await n.actions.components.refreshDefinitions(a.appId),n.update(l=>({...l,libraries:a.componentLibraries,name:a.name,description:a.description,appId:a.appId,url:a.url,layouts:r||[],screens:i||[],theme:a.theme||"spectrum--light",customTheme:a.customTheme,hasAppPackage:!0,appInstance:a.instance,clientLibPath:o,previousTopNavPath:{},version:a.version,revertableVersion:a.revertableVersion,navigation:a.navigation||{},usedPlugins:a.usedPlugins||[]})),Wd.set(a.instance),await Bi.init(),await z5.init(),await ya.init(),await Hr.init()},theme:{save:async t=>{const r=pn(n).appId,i=await Zt.saveAppMetadata({appId:r,metadata:{theme:t}});n.update(a=>(a.theme=i.theme,a))}},customTheme:{save:async t=>{const r=pn(n).appId,i=await Zt.saveAppMetadata({appId:r,metadata:{customTheme:t}});n.update(a=>(a.customTheme=i.customTheme,a))}},navigation:{save:async t=>{const r=pn(n).appId,i=await Zt.saveAppMetadata({appId:r,metadata:{navigation:t}});n.update(a=>(a.navigation=i.navigation,a))}},screens:{select:t=>{var a;const r=pn(n),i=r.screens.find(o=>o._id===t);!i||r.selectedScreenId===i._id&&r.selectedComponentId===((a=i.props)==null?void 0:a._id)||n.update(o=>{var l;return o.selectedScreenId=i._id,o.selectedComponentId=(l=i.props)==null?void 0:l._id,o})},validate:t=>{const r=(a,o=[],l=[])=>{var c,f,h;const s=a._component;if(o.includes(s)||l.length&&!l.includes(s))return s;if(!((c=a==null?void 0:a._children)!=null&&c.length))return;const u=n.actions.components.getDefinition(a._component);if(l=[],(f=u==null?void 0:u.legalDirectChildren)!=null&&f.length&&(l=u.legalDirectChildren.map(m=>`@budibase/standard-components/${m}`)),(h=u==null?void 0:u.illegalChildren)!=null&&h.length){const m=u.illegalChildren.map(_=>`@budibase/standard-components/${_}`);o=[...new Set([...o,...m])]}for(let m of a._children){const _=r(m,o,l);if(_)return _}},i=r(t.props);if(i)throw`You can't place a ${n.actions.components.getDefinition(i).name} here`},save:async t=>{const r=pn(n),i=t._id===void 0,a=await Zt.saveScreen(t),o=await Zt.fetchAppRoutes();let l=r.usedPlugins;if(a.pluginAdded){const{application:s}=await Zt.fetchAppPackage(r.appId);l=s.usedPlugins||[]}return n.update(s=>{const u=s.screens.findIndex(c=>c._id===a._id);return u!==-1?s.screens.splice(u,1,a):s.screens.push(a),i&&(s.selectedScreenId=a._id,s.selectedComponentId=a.props._id),s.routes=o.routes,s.usedPlugins=l,s}),a},patch:async(t,r)=>{if(r||(r=pn(n).selectedScreenId),!(!r||!t))return await e(t,r)},delete:async t=>{const r=Array.isArray(t)?t:[t],i=[];let a=[];r.forEach(s=>{i.push(Zt.deleteScreen({screenId:s._id,screenRev:s._rev})),a.push(s.routing.route)}),i.push(n.actions.links.delete(a)),await Promise.all(i);const o=r.map(s=>s._id),l=await Zt.fetchAppRoutes();n.update(s=>(s.screens=s.screens.filter(u=>!o.includes(u._id)),o.includes(s.selectedScreenId)&&(s.selectedScreenId=null,s.selectedComponentId=null),s.routes=l.routes,s))},updateSetting:async(t,r,i)=>{if(!t||!r)return;const a=u=>{if(!u||Xh(u,r)===i)return!1;ite(u,r,i)};await n.actions.screens.patch(a,t._id);const o=pn(n),l=o.screens.find(u=>u._id===t._id);if(!l)return;const s=o.screens.filter(u=>u.routing.roleId===l.routing.roleId&&u.routing.homeScreen&&u._id!==t._id);if(s.length){const u=c=>{c.routing.homeScreen=!1};for(let c of s)await n.actions.screens.patch(u,c._id)}},removeCustomLayout:async t=>{const r=pn(n).layouts.find(a=>a._id===t.layoutId),i=a=>{a.layoutId=null,a.showNavigation=(r==null?void 0:r.props.navigation)!=="None",a.width=(r==null?void 0:r.props.width)||"Large"};await n.actions.screens.patch(i,t._id)}},preview:{setDevice:t=>{n.update(r=>(r.previewDevice=t,r))},sendEvent:(t,r)=>{const{previewEventHandler:i}=pn(n);i==null||i(t,r)},registerEventHandler:t=>{n.update(r=>(r.previewEventHandler=t,r))}},layouts:{select:t=>{var a;const r=pn(n),i=r.layouts.find(o=>o._id===t);!i||r.selectedLayoutId===i._id&&r.selectedComponentId===((a=i.props)==null?void 0:a._id)||n.update(o=>{var l;return o.selectedLayoutId=i._id,o.selectedComponentId=(l=i.props)==null?void 0:l._id,o})},delete:async t=>{!(t!=null&&t._id)||(await Zt.deleteLayout({layoutId:t._id,layoutRev:t._rev}),n.update(r=>(r.layouts=r.layouts.filter(i=>i._id!==t._id),r)))}},components:{refreshDefinitions:async t=>{t||(t=pn(n).appId);const r=await Zt.fetchComponentLibDefinitions(t),i=Object.keys(r).filter(a=>a.startsWith("plugin/"));n.update(a=>({...a,components:r,customComponents:i,clientFeatures:{...zy.clientFeatures,...r.features}}))},getDefinition:t=>t?pn(n).components[t]:null,createInstance:(t,r)=>{const i=n.actions.components.getDefinition(t);if(!i)return null;const a=D6(t);let o={...r};a.forEach(s=>{s.defaultValue!==void 0&&(o[s.key]=s.defaultValue)});let l={};if(i.hasChildren&&(l._children=[]),t.endsWith("/formstep")){const s=q_(pn(ja).props,pn(I3)._id,c=>c._component.endsWith("/form")),u=h5(s,c=>c._component.endsWith("/formstep"));l.step=u.length+1,l._instanceName=`Step ${u.length+1}`}return{_id:C4(),_component:i.component,_styles:{normal:{},hover:{},active:{}},_instanceName:`New ${i.friendlyName||i.name}`,...$1.cloneDeep(o),...l}},create:async(t,r,i,a)=>{const o=pn(n),l=n.actions.components.createInstance(t,r);if(!!l)return i&&a!=null?await n.actions.screens.patch(s=>{var c;let u=ru(s.props,i);(c=u._children)!=null&&c.length?u._children.splice(a,0,l):u._children=[l]}):await n.actions.screens.patch(s=>{const u=ru(s.props,o.selectedComponentId);if(!u)return!1;let c;if(u){const f=n.actions.components.getDefinition(u._component);f!=null&&f.hasChildren?c=u:c=vc(s.props,u._id)}else c=s.props;if(!c)return!1;c._children||(c._children=[]),c._children.push(l)}),n.update(s=>(s.selectedComponentId=l._id,s)),np.captureEvent(o6.COMPONENT_CREATED,{name:l._component}),l},patch:async(t,r,i)=>{if(!r||!i){const o=pn(n);r=r||o.selectedComponentId,i=i||o.selectedScreenId}if(!r||!i||!t)return;const a=o=>{let l=ru(o.props,r);return l?t(l,o):!1};await n.actions.screens.patch(a,i)},delete:async t=>{if(!t)return;const r=pn(n);let i;r.selectedComponentId===t._id&&(i=n.actions.components.getNext(),i||(i=n.actions.components.getPrevious())),await n.actions.screens.patch(a=>{if(t=ru(a.props,t._id),!t)return!1;const o=vc(a.props,t._id);if(!o)return!1;o._children=o._children.filter(l=>l._id!==t._id)}),i&&n.update(a=>(a.selectedComponentId=i,a))},copy:(t,r=!1,i=!0)=>{if(n.update(a=>(a.componentToPaste=$1.cloneDeep(t),a.componentToPaste.isCut=r,a)),r&&i){const a=pn(ja),o=vc(a==null?void 0:a.props,t._id);o&&n.update(l=>(l.selectedComponentId=o._id,l))}},paste:async(t,r,i)=>{const a=pn(n);if(!a.componentToPaste)return;let o,l=$1.cloneDeep(a.componentToPaste);l.isCut&&n.update(c=>(delete c.componentToPaste,c));const s=c=>{if(t=ru(c.props,t._id),!t)return!1;const f=l.isCut,h=l._id;if(delete l.isCut,f||(l=Iv(l)),o=l._id,f){const m=vc(c.props,h);m!=null&&m._children&&(m._children=m._children.filter(_=>_._id!==h))}if(r==="inside"&&(n.actions.components.getDefinition(t._component).hasChildren||(r="below")),r==="inside")t._children||(t._children=[]),t._children.push(l);else{const m=vc(c.props,t._id);if(!(m!=null&&m._children))return!1;const _=m._children.findIndex(w=>w._id===t._id),y=r==="above"?_:_+1;m._children.splice(y,0,l)}},u=(i==null?void 0:i._id)||a.selectedScreenId;await n.actions.screens.patch(s,u),n.update(c=>(c.selectedScreenId=u,c.selectedComponentId=o,c))},getPrevious:()=>{var l,s;const r=pn(n).selectedComponentId,i=pn(ja),a=vc(i.props,r),o=a==null?void 0:a._children.findIndex(u=>u._id===r);if(!a||r===i.props._id)return null;if(o>0){const u=a._children[o-1];if((l=u._children)!=null&&l.length){let c=u;for(;(s=c._children)!=null&&s.length;)c=c._children[c._children.length-1];return c._id}return u._id}return a._id},getNext:()=>{var c,f;const t=pn(I3),r=t==null?void 0:t._id,i=pn(ja),a=vc(i.props,r),o=a==null?void 0:a._children.findIndex(h=>h._id===r);if((c=t._children)!=null&&c.length)return t._children[0]._id;if(!a)return null;if(o<a._children.length-1)return a._children[o+1]._id;let l=a,s=vc(i.props,l._id),u=s==null?void 0:s._children.findIndex(h=>h._id===l._id);for(;s!=null&&u===((f=s._children)==null?void 0:f.length)-1;)l=s,s=vc(i.props,l._id),u=s==null?void 0:s._children.findIndex(h=>h._id===l._id);return s?s._children[u+1]._id:null},selectPrevious:()=>{const t=n.actions.components.getPrevious();t&&n.update(r=>(r.selectedComponentId=t,r))},selectNext:()=>{const t=n.actions.components.getNext();t&&n.update(r=>(r.selectedComponentId=t,r))},moveUp:async t=>{await n.actions.screens.patch(r=>{const i=t==null?void 0:t._id,a=vc(r.props,i),o=a==null?void 0:a._children.findIndex(s=>s._id===i);if(!a||o===0&&a._id===r.props._id)return;const l=$1.cloneDeep(a._children[o]);if(a._children=a._children.filter(s=>s._id!==i),o>0){const s=a._children[o-1];n.actions.components.getDefinition(s._component).hasChildren?s._children.push(l):a._children.splice(o-1,0,l)}else if(a._id!==r.props._id){const s=vc(r.props,a._id),u=s._children.findIndex(c=>c._id===a._id);s._children.splice(u,0,l)}})},moveDown:async t=>{await n.actions.screens.patch(r=>{var s;const i=t==null?void 0:t._id,a=vc(r.props,i);if(!((s=a==null?void 0:a._children)!=null&&s.length))return!1;const o=a._children.findIndex(u=>u._id===i);if(o===a._children.length-1&&a._id===r.props._id)return;const l=$1.cloneDeep(a._children[o]);if(a._children=a._children.filter(u=>u._id!==i),o<a._children.length){const u=a._children[o];n.actions.components.getDefinition(u._component).hasChildren?u._children.splice(0,0,l):a._children.splice(o+1,0,l)}else{const u=vc(r.props,a._id),c=u._children.findIndex(f=>f._id===a._id);u._children.splice(c+1,0,l)}})},updateStyle:async(t,r)=>{await n.actions.components.patch(i=>{r==null||r===""?delete i._styles.normal[t]:i._styles.normal[t]=r})},updateStyles:async(t,r)=>{const i=a=>{a._styles.normal={...a._styles.normal,...t}};await n.actions.components.patch(i,r)},updateCustomStyle:async t=>{await n.actions.components.patch(r=>{r._styles.custom=t})},updateConditions:async t=>{await n.actions.components.patch(r=>{r._conditions=t})},updateSetting:async(t,r)=>{await n.actions.components.patch(i=>{if(!t||!i||i[t]===r)return!1;i[t]=r})},requestEjectBlock:t=>{n.actions.preview.sendEvent("eject-block",t)},handleEjectBlock:async(t,r)=>{let i;await n.actions.screens.patch(a=>{var c;const o=ru(a.props,t),l=vc(a.props,t);if(!o||!((c=l==null?void 0:l._children)!=null&&c.length))return!1;const s=h5(r,f=>f._containsSlot)[0];s&&(delete s._containsSlot,s._children=[...s._children||[],...o._children||[]]),r=Iv(r);const u=l._children.findIndex(f=>f._id===t);l._children[u]=r,i=r._id}),i&&n.update(a=>(a.selectedComponentId=i,a))}},links:{save:async(t,r)=>{const i=pn(n).navigation;let a=[...i==null?void 0:i.links];a.find(o=>o.url===t&&o.text===r)||(a.push({text:r,url:t}),await n.actions.navigation.save({...i,links:[...a]}))},delete:async t=>{const r=pn(n).navigation;let i=r==null?void 0:r.links;!(i!=null&&i.length)||(t=Array.isArray(t)?t:[t],i=i.filter(a=>!t.includes(a.url)),await n.actions.navigation.save({...r,links:i}))}},settings:{highlight:t=>{n.update(r=>({...r,highlightedSettingKey:t}))}},dnd:{start:t=>{n.actions.preview.sendEvent("dragging-new-component",{dragging:!0,component:t})},stop:()=>{n.actions.preview.sendEvent("dragging-new-component",{dragging:!1})}}},n};var c2={exports:{}},TY={exports:{}},Y9=1;function $4e(){return Y9=(Y9*9301+49297)%233280,Y9/233280}function w4e(n){Y9=n}var k4e={nextValue:$4e,seed:w4e},tw=k4e,vd="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-",Z5,aT,_g;function nw(){_g=!1}function DY(n){if(!n){Z5!==vd&&(Z5=vd,nw());return}if(n!==Z5){if(n.length!==vd.length)throw new Error("Custom alphabet for shortid must be "+vd.length+" unique characters. You submitted "+n.length+" characters: "+n);var e=n.split("").filter(function(t,r,i){return r!==i.lastIndexOf(t)});if(e.length)throw new Error("Custom alphabet for shortid must be "+vd.length+" unique characters. These characters were not unique: "+e.join(", "));Z5=n,nw()}}function z4e(n){return DY(n),Z5}function A4e(n){tw.seed(n),aT!==n&&(nw(),aT=n)}function M4e(){Z5||DY(vd);for(var n=Z5.split(""),e=[],t=tw.nextValue(),r;n.length>0;)t=tw.nextValue(),r=Math.floor(t*n.length),e.push(n.splice(r,1)[0]);return e.join("")}function BY(){return _g||(_g=M4e(),_g)}function C4e(n){var e=BY();return e[n]}function S4e(){return Z5||vd}var Zk={get:S4e,characters:z4e,seed:A4e,lookup:C4e,shuffled:BY},Ay=typeof window=="object"&&(window.crypto||window.msCrypto),rw;!Ay||!Ay.getRandomValues?rw=function(n){for(var e=[],t=0;t<n;t++)e.push(Math.floor(Math.random()*256));return e}:rw=function(n){return Ay.getRandomValues(new Uint8Array(n))};var L4e=rw,E4e=function(n,e,t){for(var r=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*r*t/e.length),a="";;)for(var o=n(i),l=i;l--;)if(a+=e[o[l]&r]||"",a.length===+t)return a},T4e=Zk,D4e=L4e,B4e=E4e;function H4e(n){for(var e=0,t,r="";!t;)r=r+B4e(D4e,T4e.get(),1),t=n<Math.pow(16,e+1),e++;return r}var O4e=H4e,k9=O4e,I4e=1567752802062,P4e=7,z9,oT;function V4e(n){var e="",t=Math.floor((Date.now()-I4e)*.001);return t===oT?z9++:(z9=0,oT=t),e=e+k9(P4e),e=e+k9(n),z9>0&&(e=e+k9(z9)),e=e+k9(t),e}var R4e=V4e,N4e=Zk;function F4e(n){if(!n||typeof n!="string"||n.length<6)return!1;var e=new RegExp("[^"+N4e.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]");return!e.test(n)}var j4e=F4e;(function(n){var e=Zk,t=R4e,r=j4e,i=0;function a(u){return e.seed(u),n.exports}function o(u){return i=u,n.exports}function l(u){return u!==void 0&&e.characters(u),e.shuffled()}function s(){return t(i)}n.exports=s,n.exports.generate=s,n.exports.seed=a,n.exports.worker=o,n.exports.characters=l,n.exports.isValid=r})(TY);(function(n){n.exports=TY.exports})(c2);class lT{constructor(e){this.automation=e}hasTrigger(){return this.automation.definition.trigger}addTestData(e){this.automation.testData={...this.automation.testData,...e}}addBlock(e,t){if(!this.hasTrigger()&&e.type==="TRIGGER"){const i={id:c2.exports.generate(),...e};return this.automation.definition.trigger=i,i}const r={id:c2.exports.generate(),...e};return this.automation.definition.steps.splice(t,0,r),r}updateBlock(e,t){const{steps:r,trigger:i}=this.automation.definition;if(i&&i.id===t){this.automation.definition.trigger=e;return}const a=r.findIndex(o=>o.id===t);if(a<0)throw new Error("Block not found.");r.splice(a,1,e),this.automation.definition.steps=r}deleteBlock(e){const{steps:t,trigger:r}=this.automation.definition;if(r&&r.id===e){this.automation.definition.trigger=null;return}const i=t.findIndex(a=>a.id===e);if(i<0)throw new Error("Block not found.");t.splice(i,1),this.automation.definition.steps=t}constructBlock(e,t,r){return{...r,inputs:r.inputs||{},stepId:t,type:e}}}const x4e={automations:[],showTestPanel:!1,blockDefinitions:{TRIGGER:[],ACTION:[]},selectedAutomation:null},U4e=()=>{const n=gi(x4e);return n.actions=q4e(n),n},q4e=n=>({definitions:async()=>{const e=await Zt.getAutomationDefinitions();return n.update(t=>(t.blockDefinitions={TRIGGER:e.trigger,ACTION:e.action},t)),e},fetch:async()=>{const e=await Promise.all([Zt.getAutomations(),Zt.getAutomationDefinitions()]);n.update(t=>{var i;let r=(i=t.selectedAutomation)==null?void 0:i.automation;return t.automations=e[0],t.blockDefinitions={TRIGGER:e[1].trigger,ACTION:e[1].action},r&&(r=e[0].filter(a=>a._id===r._id),t.selectedAutomation=new lT(r[0])),t})},create:async({name:e})=>{const t={name:e,type:"automation",definition:{steps:[]}},r=await Zt.createAutomation(t);n.update(i=>(i.automations=[...i.automations,r.automation],n.actions.select(r.automation),i))},duplicate:async e=>{const t=await Zt.createAutomation({...e,name:`${e.name} - copy`,_id:void 0,_ref:void 0});n.update(r=>(r.automations=[...r.automations,t.automation],n.actions.select(t.automation),r))},save:async e=>{const t=await Zt.updateAutomation(e);n.update(r=>{const i=t.automation,a=r.automations.findIndex(o=>o._id===e._id);if(a!==-1)return r.automations.splice(a,1,i),r.automations=[...r.automations],n.actions.select(i),r})},delete:async e=>{await Zt.deleteAutomation({automationId:e==null?void 0:e._id,automationRev:e==null?void 0:e._rev}),n.update(t=>{const r=t.automations.findIndex(i=>i._id===(e==null?void 0:e._id));return t.automations.splice(r,1),t.automations=[...t.automations],t.selectedAutomation=null,t.selectedBlock=null,t})},test:async(e,t)=>{n.update(i=>(i.selectedAutomation.testResults=null,i));const r=await Zt.testAutomation({automationId:e==null?void 0:e._id,testData:t});n.update(i=>(i.selectedAutomation.testResults=r,i))},select:e=>{n.update(t=>(t.selectedAutomation=new lT($1.cloneDeep(e)),t.selectedBlock=null,t))},getLogs:async({automationId:e,startDate:t,status:r,page:i}={})=>await Zt.getAutomationLogs({automationId:e,startDate:t,status:r,page:i}),clearLogErrors:async({automationId:e,appId:t}={})=>await Zt.clearAutomationLogErrors({automationId:e,appId:t}),addTestDataToAutomation:e=>{n.update(t=>(t.selectedAutomation.addTestData(e),t))},addBlockToAutomation:(e,t)=>{n.update(r=>(r.selectedBlock=r.selectedAutomation.addBlock($1.cloneDeep(e),t),r))},toggleFieldControl:e=>{n.update(t=>(t.selectedBlock.rowControl=e,t))},deleteAutomationBlock:e=>{n.update(t=>{const r=t.selectedAutomation.automation.definition.steps.findIndex(o=>o.id===e.id);t.selectedAutomation.deleteBlock(e.id);const i=t.selectedAutomation.automation.definition.steps;let a;return i[r]!=null?a=i[r]:i[r-1]!=null?a=i[r-1]:a=t.selectedAutomation.automation.definition.trigger||null,t.selectedBlock=a,t})}}),W4e=()=>{const t=jG("bb-temporal",{}),r=(a,o,l)=>{const s={...o,expiry:Date.now()+l*1e3};t.update(u=>({...u,[a]:s}))},i=a=>{const o=pn(t)[a];return o?o.expiry<Date.now()?(t.update(s=>(delete s[a],s)),null):o:void 0};return{subscribe:t.subscribe,actions:{setExpiring:r,getExpiring:i}}},G4e=()=>{const n=document.documentElement,e={theme:"darkest"},t=jG("bb-theme",e);return t.subscribe(r=>{if(r.darkMode!==void 0){t.set(e);return}n6.forEach(a=>{n.classList.toggle(`spectrum--${a.class}`,a.class===r.theme)});const i=n6.find(a=>a.class===r.theme);i!=null&&i.base&&n.classList.add(`spectrum--${i.base}`)}),t},Xt=y4e(),Or=U4e(),Pv=G4e(),Vv=W4e(),ja=Il(Xt,n=>n.screens.find(e=>e._id===n.selectedScreenId)),HY=Il(Xt,n=>{var e;return(e=n.layouts)==null?void 0:e.find(t=>t._id===n.selectedLayoutId)}),I3=Il([Xt,ja],([n,e])=>!e||!n.selectedComponentId?null:ru(e==null?void 0:e.props,n.selectedComponentId)),j0=ja,OY=Il(Xt,n=>n.screens.slice().sort((e,t)=>{const r=Sv(e.routing.roleId),i=Sv(t.routing.roleId);if(r!==i)return r>i?-1:1;const a=!!e.routing.homeScreen,o=!!t.routing.homeScreen;if(a!==o)return a?-1:1;const l=e.routing.route.split("/"),s=t.routing.route.split("/");let u=Math.min(l.length,s.length);for(let c=0;c<u;c++)if(l[c]!==s[c])return l[c]<s[c]?-1:1;return l.length<s.length?-1:1})),Y4e=Il([Xt,ja],([n,e])=>T4(e==null?void 0:e.props,n.selectedComponentId).map(t=>t._id)),sT={platformUrl:"",logoUrl:void 0,docsUrl:void 0,company:"Budibase",oidc:void 0,google:void 0,oidcCallbackUrl:"",googleCallbackUrl:""};function K4e(){const n=gi(sT),{subscribe:e,set:t}=n;async function r(){const a=pn(ur).tenantId,o=await Zt.getTenantConfig(a);t({...sT,...o.config,_rev:o._rev})}async function i(a){const o=pn(n);delete o.oidc,delete o.google,delete o.oidcCallbackUrl,delete o.googleCallbackUrl,await Zt.saveConfig({type:"settings",config:{...pn(n),...a},_rev:pn(n)._rev}),await r()}return{subscribe:e,set:t,save:i,init:r}}const Hs=K4e();var Dd={exports:{}};/**
425
+ `),a=[],o,l=0;l<i.length;l+=2){var s=null;(o=t.exec(i[l]))?s={url:o[2],func:o[3],args:[],line:+o[1],column:null}:(o=r.exec(i[l]))&&(s={url:o[6],func:o[3]||o[4],args:o[5]?o[5].split(","):[],line:+o[1],column:+o[2]}),s&&(!s.func&&s.line&&(s.func=vg),a.push(s))}return a.length?{message:Xk(n),name:n.name,stack:a}:null}function tT(n,e){try{return Wi({},n,{stack:n.stack.slice(e)})}catch{return n}}function Xk(n){var e=n&&n.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}var e4e=50;function CY(n){var e=Jk(n.stack),t={type:n.name,value:n.message};return e&&e.length&&(t.stacktrace={frames:e}),t.type===void 0&&t.value===""&&(t.value="Unrecoverable error caught"),t}function t4e(n,e,t){var r={exception:{values:[{type:jk(n)?n.constructor.name:t?"UnhandledRejection":"Error",value:"Non-Error "+(t?"promise rejection":"exception")+" captured with keys: "+m3e(n)}]},extra:{__serialized__:_Y(n)}};if(e){var i=i7(e),a=Jk(i.stack);r.stacktrace={frames:a}}return r}function nT(n){var e=CY(n);return{exception:{values:[e]}}}function Jk(n){if(!n||!n.length)return[];var e=n,t=e[0].func||"",r=e[e.length-1].func||"";return(t.indexOf("captureMessage")!==-1||t.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,e4e).map(function(i){return{colno:i.column===null?void 0:i.column,filename:i.url||e[0].url,function:i.func||"?",in_app:!0,lineno:i.line===null?void 0:i.line}}).reverse()}function Z$(n,e,t){t===void 0&&(t={});var r;if(mY(n)&&n.error){var i=n;return n=i.error,r=nT(i7(n)),r}if(jE(n)||n3e(n)){var a=n,o=a.name||(jE(a)?"DOMError":"DOMException"),l=a.message?o+": "+a.message:o;return r=Q$(l,e,t),X$(r,l),r}if(hY(n))return r=nT(i7(n)),r;if(Fk(n)||jk(n)){var s=n;return r=t4e(s,e,t.rejection),s6(r,{synthetic:!0}),r}return r=Q$(n,e,t),X$(r,""+n,void 0),s6(r,{synthetic:!0}),r}function Q$(n,e,t){t===void 0&&(t={});var r={message:n};if(t.attachStacktrace&&e){var i=i7(e),a=Jk(i.stack);r.stacktrace={frames:a}}return r}var SY=function(){function n(e){this.options=e,this._buffer=new g3e(30),this._api=new AY(this.options.dsn),this.url=this._api.getStoreEndpointWithUrlEncodedAuth()}return n.prototype.sendEvent=function(e){throw new r5("Transport Class has to implement `sendEvent` method")},n.prototype.close=function(e){return this._buffer.drain(e)},n}(),n4e=Fu(),r4e=function(n){B7(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t._disabledUntil=new Date(Date.now()),t}return e.prototype.sendEvent=function(t){var r=this;if(new Date(Date.now())<this._disabledUntil)return Promise.reject({event:t,reason:"Transport locked till "+this._disabledUntil+" due to too many requests.",status:429});var i=MY(t,this._api),a={body:i.body,method:"POST",referrerPolicy:_3e()?"origin":""};return this.options.fetchParameters!==void 0&&Object.assign(a,this.options.fetchParameters),this.options.headers!==void 0&&(a.headers=this.options.headers),this._buffer.add(new s2(function(o,l){n4e.fetch(i.url,a).then(function(s){var u=B3.fromHttpCode(s.status);if(u===B3.Success){o({status:u});return}if(u===B3.RateLimit){var c=Date.now();r._disabledUntil=new Date(c+gY(c,s.headers.get("Retry-After"))),Oo.warn("Too many requests, backing off till: "+r._disabledUntil)}l(s)}).catch(l)}))},e}(SY),i4e=function(n){B7(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t._disabledUntil=new Date(Date.now()),t}return e.prototype.sendEvent=function(t){var r=this;if(new Date(Date.now())<this._disabledUntil)return Promise.reject({event:t,reason:"Transport locked till "+this._disabledUntil+" due to too many requests.",status:429});var i=MY(t,this._api);return this._buffer.add(new s2(function(a,o){var l=new XMLHttpRequest;l.onreadystatechange=function(){if(l.readyState===4){var u=B3.fromHttpCode(l.status);if(u===B3.Success){a({status:u});return}if(u===B3.RateLimit){var c=Date.now();r._disabledUntil=new Date(c+gY(c,l.getResponseHeader("Retry-After"))),Oo.warn("Too many requests, backing off till: "+r._disabledUntil)}o(l)}},l.open("POST",i.url);for(var s in r.options.headers)r.options.headers.hasOwnProperty(s)&&l.setRequestHeader(s,r.options.headers[s]);l.send(i.body)}))},e}(SY),a4e=function(n){B7(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype._setupTransport=function(){if(!this._options.dsn)return n.prototype._setupTransport.call(this);var t=Wi({},this._options.transportOptions,{dsn:this._options.dsn});return this._options.transport?new this._options.transport(t):qk()?new r4e(t):new i4e(t)},e.prototype.eventFromException=function(t,r){var i=r&&r.syntheticException||void 0,a=Z$(t,i,{attachStacktrace:this._options.attachStacktrace});return s6(a,{handled:!0,type:"generic"}),a.level=d5.Error,r&&r.event_id&&(a.event_id=r.event_id),s2.resolve(a)},e.prototype.eventFromMessage=function(t,r,i){r===void 0&&(r=d5.Info);var a=i&&i.syntheticException||void 0,o=Q$(t,a,{attachStacktrace:this._options.attachStacktrace});return o.level=r,i&&i.event_id&&(o.event_id=i.event_id),s2.resolve(o)},e}(j3e),ew=0;function rT(){return ew>0}function o4e(){ew+=1,setTimeout(function(){ew-=1})}function Sh(n,e,t){if(e===void 0&&(e={}),typeof n!="function")return n;try{if(n.__sentry__)return n;if(n.__sentry_wrapped__)return n.__sentry_wrapped__}catch{return n}var r=function(){var o=Array.prototype.slice.call(arguments);try{t&&typeof t=="function"&&t.apply(this,arguments);var l=o.map(function(s){return Sh(s,e)});return n.handleEvent?n.handleEvent.apply(this,l):n.apply(this,l)}catch(s){throw o4e(),I3e(function(u){u.addEventProcessor(function(c){var f=Wi({},c);return e.mechanism&&(X$(f,void 0,void 0),s6(f,e.mechanism)),f.extra=Wi({},f.extra,{arguments:o}),f}),zY(s)}),s}};try{for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}catch{}n.prototype=n.prototype||{},r.prototype=n.prototype,Object.defineProperty(n,"__sentry_wrapped__",{enumerable:!1,value:r}),Object.defineProperties(r,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:n}});try{var a=Object.getOwnPropertyDescriptor(r,"name");a.configurable&&Object.defineProperty(r,"name",{get:function(){return n.name}})}catch{}return r}var l4e=function(){function n(e){this.name=n.id,this._onErrorHandlerInstalled=!1,this._onUnhandledRejectionHandlerInstalled=!1,this._options=Wi({onerror:!0,onunhandledrejection:!0},e)}return n.prototype.setupOnce=function(){Error.stackTraceLimit=50,this._options.onerror&&(Oo.log("Global Handler attached: onerror"),this._installGlobalOnErrorHandler()),this._options.onunhandledrejection&&(Oo.log("Global Handler attached: onunhandledrejection"),this._installGlobalOnUnhandledRejectionHandler())},n.prototype._installGlobalOnErrorHandler=function(){var e=this;this._onErrorHandlerInstalled||(gd({callback:function(t){var r=t.error,i=l2(),a=i.getIntegration(n),o=r&&r.__sentry_own_request__===!0;if(!(!a||rT()||o)){var l=i.getClient(),s=r7(r)?e._eventFromIncompleteOnError(t.msg,t.url,t.line,t.column):e._enhanceEventWithInitialFrame(Z$(r,void 0,{attachStacktrace:l&&l.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);s6(s,{handled:!1,type:"onerror"}),i.captureEvent(s,{originalException:r})}},type:"error"}),this._onErrorHandlerInstalled=!0)},n.prototype._installGlobalOnUnhandledRejectionHandler=function(){var e=this;this._onUnhandledRejectionHandlerInstalled||(gd({callback:function(t){var r=t;try{"reason"in t?r=t.reason:"detail"in t&&"reason"in t.detail&&(r=t.detail.reason)}catch{}var i=l2(),a=i.getIntegration(n),o=r&&r.__sentry_own_request__===!0;if(!a||rT()||o)return!0;var l=i.getClient(),s=r7(r)?e._eventFromIncompleteRejection(r):Z$(r,void 0,{attachStacktrace:l&&l.getOptions().attachStacktrace,rejection:!0});s.level=d5.Error,s6(s,{handled:!1,type:"onunhandledrejection"}),i.captureEvent(s,{originalException:r})},type:"unhandledrejection"}),this._onUnhandledRejectionHandlerInstalled=!0)},n.prototype._eventFromIncompleteOnError=function(e,t,r,i){var a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=mY(e)?e.message:e,l;if(l6(o)){var s=o.match(a);s&&(l=s[1],o=s[2])}var u={exception:{values:[{type:l||"Error",value:o}]}};return this._enhanceEventWithInitialFrame(u,t,r,i)},n.prototype._eventFromIncompleteRejection=function(e){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+e}]}}},n.prototype._enhanceEventWithInitialFrame=function(e,t,r,i){e.exception=e.exception||{},e.exception.values=e.exception.values||[],e.exception.values[0]=e.exception.values[0]||{},e.exception.values[0].stacktrace=e.exception.values[0].stacktrace||{},e.exception.values[0].stacktrace.frames=e.exception.values[0].stacktrace.frames||[];var a=isNaN(parseInt(i,10))?void 0:i,o=isNaN(parseInt(r,10))?void 0:r,l=l6(t)&&t.length>0?t:l3e();return e.exception.values[0].stacktrace.frames.length===0&&e.exception.values[0].stacktrace.frames.push({colno:a,filename:l,function:"?",in_app:!0,lineno:o}),e},n.id="GlobalHandlers",n}(),s4e=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],u4e=function(){function n(e){this.name=n.id,this._options=Wi({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},e)}return n.prototype._wrapTimeFunction=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[0];return t[0]=Sh(i,{mechanism:{data:{function:K5(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}},n.prototype._wrapRAF=function(e){return function(t){return e.call(this,Sh(t,{mechanism:{data:{function:"requestAnimationFrame",handler:K5(e)},handled:!0,type:"instrument"}}))}},n.prototype._wrapEventTarget=function(e){var t=Fu(),r=t[e]&&t[e].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(nu(r,"addEventListener",function(i){return function(a,o,l){try{typeof o.handleEvent=="function"&&(o.handleEvent=Sh(o.handleEvent.bind(o),{mechanism:{data:{function:"handleEvent",handler:K5(o),target:e},handled:!0,type:"instrument"}}))}catch{}return i.call(this,a,Sh(o,{mechanism:{data:{function:"addEventListener",handler:K5(o),target:e},handled:!0,type:"instrument"}}),l)}}),nu(r,"removeEventListener",function(i){return function(a,o,l){var s=o;try{s&&s.__sentry__&&i.call(this,a,s.__sentry_original__,l)}catch{}return i.call(this,a,s,l)}}))},n.prototype._wrapXHR=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this,a=["onload","onerror","onprogress","onreadystatechange"];return a.forEach(function(o){o in i&&typeof i[o]=="function"&&nu(i,o,function(l){var s={mechanism:{data:{function:o,handler:K5(l)},handled:!0,type:"instrument"}};return l.__sentry_original__&&(s.mechanism.data.handler=K5(l.__sentry_original__)),Sh(l,s)})}),e.apply(this,t)}},n.prototype.setupOnce=function(){var e=Fu();if(this._options.setTimeout&&nu(e,"setTimeout",this._wrapTimeFunction.bind(this)),this._options.setInterval&&nu(e,"setInterval",this._wrapTimeFunction.bind(this)),this._options.requestAnimationFrame&&nu(e,"requestAnimationFrame",this._wrapRAF.bind(this)),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&nu(XMLHttpRequest.prototype,"send",this._wrapXHR.bind(this)),this._options.eventTarget){var t=Array.isArray(this._options.eventTarget)?this._options.eventTarget:s4e;t.forEach(this._wrapEventTarget.bind(this))}},n.id="TryCatch",n}(),LY=function(){function n(e){this.name=n.id,this._options=Wi({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},e)}return n.prototype.addSentryBreadcrumb=function(e){!this._options.sentry||l2().addBreadcrumb({category:"sentry."+(e.type==="transaction"?"transaction":"event"),event_id:e.event_id,level:e.level,message:pd(e)},{event:e})},n.prototype._consoleBreadcrumb=function(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:d5.fromString(e.level),message:UE(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message="Assertion failed: "+(UE(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1);else return;l2().addBreadcrumb(t,{input:e.args,level:e.level})},n.prototype._domBreadcrumb=function(e){var t;try{t=e.event.target?Hv(e.event.target):Hv(e.event)}catch{t="<unknown>"}t.length!==0&&l2().addBreadcrumb({category:"ui."+e.name,message:t},{event:e.event,name:e.name})},n.prototype._xhrBreadcrumb=function(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;l2().addBreadcrumb({category:"xhr",data:e.xhr.__sentry_xhr__,type:"http"},{xhr:e.xhr});return}},n.prototype._fetchBreadcrumb=function(e){!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?l2().addBreadcrumb({category:"fetch",data:e.fetchData,level:d5.Error,type:"http"},{data:e.error,input:e.args}):l2().addBreadcrumb({category:"fetch",data:Wi({},e.fetchData,{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response}))},n.prototype._historyBreadcrumb=function(e){var t=Fu(),r=e.from,i=e.to,a=hy(t.location.href),o=hy(r),l=hy(i);o.path||(o=a),a.protocol===l.protocol&&a.host===l.host&&(i=l.relative),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),l2().addBreadcrumb({category:"navigation",data:{from:r,to:i}})},n.prototype.setupOnce=function(){var e=this;this._options.console&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._consoleBreadcrumb.apply(e,hl(t))},type:"console"}),this._options.dom&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._domBreadcrumb.apply(e,hl(t))},type:"dom"}),this._options.xhr&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._xhrBreadcrumb.apply(e,hl(t))},type:"xhr"}),this._options.fetch&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._fetchBreadcrumb.apply(e,hl(t))},type:"fetch"}),this._options.history&&gd({callback:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];e._historyBreadcrumb.apply(e,hl(t))},type:"history"})},n.id="Breadcrumbs",n}(),c4e="cause",f4e=5,p4e=function(){function n(e){e===void 0&&(e={}),this.name=n.id,this._key=e.key||c4e,this._limit=e.limit||f4e}return n.prototype.setupOnce=function(){x_(function(e,t){var r=l2().getIntegration(n);return r?r._handler(e,t):e})},n.prototype._handler=function(e,t){if(!e.exception||!e.exception.values||!t||!cp(t.originalException,Error))return e;var r=this._walkErrorTree(t.originalException,this._key);return e.exception.values=hl(r,e.exception.values),e},n.prototype._walkErrorTree=function(e,t,r){if(r===void 0&&(r=[]),!cp(e[t],Error)||r.length+1>=this._limit)return r;var i=i7(e[t]),a=CY(i);return this._walkErrorTree(e[t],t,hl([a],r))},n.id="LinkedErrors",n}(),y9=Fu(),d4e=function(){function n(){this.name=n.id}return n.prototype.setupOnce=function(){x_(function(e){if(l2().getIntegration(n)){if(!y9.navigator||!y9.location)return e;var t=e.request||{};return t.url=t.url||y9.location.href,t.headers=t.headers||{},t.headers["User-Agent"]=y9.navigator.userAgent,Wi({},e,{request:t})}return e})},n.id="UserAgent",n}(),h4e="sentry.javascript.browser",iT="5.19.1",m4e=function(n){B7(e,n);function e(t){return t===void 0&&(t={}),n.call(this,a4e,t)||this}return e.prototype._prepareEvent=function(t,r,i){return t.platform=t.platform||"javascript",t.sdk=Wi({},t.sdk,{name:h4e,packages:hl(t.sdk&&t.sdk.packages||[],[{name:"npm:@sentry/browser",version:iT}]),version:iT}),n.prototype._prepareEvent.call(this,t,r,i)},e.prototype._sendEvent=function(t){var r=this.getIntegration(LY);r&&r.addSentryBreadcrumb(t),n.prototype._sendEvent.call(this,t)},e.prototype.showReportDialog=function(t){t===void 0&&(t={});var r=Fu().document;if(!!r){if(!this._isEnabled()){Oo.error("Trying to call showReportDialog with Sentry Client is disabled");return}var i=t.dsn||this.getDsn();if(!t.eventId){Oo.error("Missing `eventId` option in showReportDialog call");return}if(!i){Oo.error("Missing `Dsn` option in showReportDialog call");return}var a=r.createElement("script");a.async=!0,a.src=new AY(i).getReportDialogEndpoint(t),t.onLoad&&(a.onload=t.onLoad),(r.head||r.body).appendChild(a)}},e}(N3e),g4e=[new W3e,new U3e,new u4e,new LY,new l4e,new p4e,new d4e];function v4e(n){if(n===void 0&&(n={}),n.defaultIntegrations===void 0&&(n.defaultIntegrations=g4e),n.release===void 0){var e=Fu();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(n.release=e.SENTRY_RELEASE.id)}x3e(m4e,n)}class _4e{constructor(e){this.dsn=e}init(){this.dsn&&(v4e({dsn:this.dsn}),this.initalised=!0)}captureException(e){!this.initalised||zY(e)}identify(e){!this.initalised||O3e(t=>{t.setUser({id:e})})}}const $9=new Xfe("phc_bIjZL7oh2GEUd2vqvTBH8WvrX0fWTFQMs6H5KQxiUxU"),wy=new _4e(""),w9=new Jfe("qz2sxfuv");class b4e{constructor(){this.clients=[$9,wy,w9]}async activate(){(await Zt.getAnalyticsStatus()).enabled&&this.clients.forEach(t=>t.init())}identify(e){$9.identify(e),wy.identify(e)}captureException(e){wy.captureException(e)}captureEvent(e,t={}){$9.captureEvent(e,t),w9.captureEvent(e,t)}showChat(e){w9.show(e)}async logout(){$9.logout(),w9.logout()}}const np=new b4e,ru=(n,e)=>EY(n,t=>t._id===e),vc=(n,e,t)=>{if(!n||!e)return null;if(n._id===e)return t;if(!n._children)return null;for(const r of n._children){const i=vc(r,e,n);if(i)return i}return null},T4=(n,e,t=[])=>{if(!n||!e)return[];if(n._id===e)return[...t,n];if(!n._children)return[];for(const r of n._children){const i=[...t,n],a=T4(r,e,i);if(a!=null&&a.length)return a}return[]},h5=(n,e)=>{if(!n||!e)return[];let t=[];return n._children&&n._children.forEach(r=>{t=[...t,...h5(r,e)]}),e(n)&&t.push(n),t.reverse()},q_=(n,e,t)=>{if(!t)return null;const r=T4(n,e).reverse();for(let i of r)if(t(i))return i;return null},EY=(n,e)=>{if(!n||!e)return null;if(e(n))return n;if(!n._children)return null;for(const t of n._children){const r=EY(t,e);if(r)return r}return null};let ky={};const D6=n=>{var r,i,a;if(!n)return[];if(!n.startsWith("plugin/")&&!n.startsWith("@budibase")&&(n=`@budibase/standard-components/${n}`),ky[n])return ky[n];const e=Xt.actions.components.getDefinition(n);let t=[];return e&&(t=(i=(r=e.settings)==null?void 0:r.filter(o=>!o.section))!=null?i:[],(a=e.settings)==null||a.filter(o=>o.section).forEach(o=>{t=t.concat(o.settings||[])})),ky[n]=t,t},Iv=n=>{var a;if(!n)return;const e=n._id,t=C4();let r=JSON.stringify(n);return r=r.replace(new RegExp(e,"g"),t),_G(r).forEach(o=>{let l=o.replace(/\\"/g,'"'),s=t6(l);if(s!=null){s=s.replace(new RegExp(e,"g"),t);let u=Dh(s);u=u.replace(/"/g,'\\"'),r=r.replace(o,u)}}),n=JSON.parse(r),{...n,_children:(a=n._children)==null?void 0:a.map(Iv)}},zy={apps:[],name:"",url:"",description:"",layouts:[],screens:[],components:[],clientFeatures:{spectrumThemes:!1,intelligentLoading:!1,deviceAwareness:!1,state:!1,rowSelection:!1,customThemes:!1,devicePreview:!1,messagePassing:!1,continueIfAction:!1,showNotificationAction:!1},errors:[],hasAppPackage:!1,libraries:null,appId:"",routes:{},clientLibPath:"",theme:"",customTheme:{},previewDevice:"desktop",highlightedSettingKey:null,selectedScreenId:null,selectedComponentId:null,selectedLayoutId:null},y4e=()=>{const n=gi({...zy}),e=xG(async(t,r)=>{const a=pn(n).screens.find(s=>s._id===r);if(!a)return;let o=$1.cloneDeep(a);if(t(o)!==!1)return await n.actions.screens.save(o)});return n.actions={reset:()=>{n.set({...zy})},initialise:async t=>{const{layouts:r,screens:i,application:a,clientLibPath:o}=t;await n.actions.components.refreshDefinitions(a.appId),n.update(l=>({...l,libraries:a.componentLibraries,name:a.name,description:a.description,appId:a.appId,url:a.url,layouts:r||[],screens:i||[],theme:a.theme||"spectrum--light",customTheme:a.customTheme,hasAppPackage:!0,appInstance:a.instance,clientLibPath:o,previousTopNavPath:{},version:a.version,revertableVersion:a.revertableVersion,navigation:a.navigation||{},usedPlugins:a.usedPlugins||[]})),Wd.set(a.instance),await Bi.init(),await z5.init(),await ya.init(),await Hr.init()},theme:{save:async t=>{const r=pn(n).appId,i=await Zt.saveAppMetadata({appId:r,metadata:{theme:t}});n.update(a=>(a.theme=i.theme,a))}},customTheme:{save:async t=>{const r=pn(n).appId,i=await Zt.saveAppMetadata({appId:r,metadata:{customTheme:t}});n.update(a=>(a.customTheme=i.customTheme,a))}},navigation:{save:async t=>{const r=pn(n).appId,i=await Zt.saveAppMetadata({appId:r,metadata:{navigation:t}});n.update(a=>(a.navigation=i.navigation,a))}},screens:{select:t=>{var a;const r=pn(n),i=r.screens.find(o=>o._id===t);!i||r.selectedScreenId===i._id&&r.selectedComponentId===((a=i.props)==null?void 0:a._id)||n.update(o=>{var l;return o.selectedScreenId=i._id,o.selectedComponentId=(l=i.props)==null?void 0:l._id,o})},validate:t=>{const r=(a,o=[],l=[])=>{var c,f,h;const s=a._component;if(o.includes(s)||l.length&&!l.includes(s))return s;if(!((c=a==null?void 0:a._children)!=null&&c.length))return;const u=n.actions.components.getDefinition(a._component);if(l=[],(f=u==null?void 0:u.legalDirectChildren)!=null&&f.length&&(l=u.legalDirectChildren.map(m=>`@budibase/standard-components/${m}`)),(h=u==null?void 0:u.illegalChildren)!=null&&h.length){const m=u.illegalChildren.map(_=>`@budibase/standard-components/${_}`);o=[...new Set([...o,...m])]}for(let m of a._children){const _=r(m,o,l);if(_)return _}},i=r(t.props);if(i)throw`You can't place a ${n.actions.components.getDefinition(i).name} here`},save:async t=>{const r=pn(n),i=t._id===void 0,a=await Zt.saveScreen(t),o=await Zt.fetchAppRoutes();let l=r.usedPlugins;if(a.pluginAdded){const{application:s}=await Zt.fetchAppPackage(r.appId);l=s.usedPlugins||[]}return n.update(s=>{const u=s.screens.findIndex(c=>c._id===a._id);return u!==-1?s.screens.splice(u,1,a):s.screens.push(a),i&&(s.selectedScreenId=a._id,s.selectedComponentId=a.props._id),s.routes=o.routes,s.usedPlugins=l,s}),a},patch:async(t,r)=>{if(r||(r=pn(n).selectedScreenId),!(!r||!t))return await e(t,r)},delete:async t=>{const r=Array.isArray(t)?t:[t],i=[];let a=[];r.forEach(s=>{i.push(Zt.deleteScreen({screenId:s._id,screenRev:s._rev})),a.push(s.routing.route)}),i.push(n.actions.links.delete(a)),await Promise.all(i);const o=r.map(s=>s._id),l=await Zt.fetchAppRoutes();n.update(s=>(s.screens=s.screens.filter(u=>!o.includes(u._id)),o.includes(s.selectedScreenId)&&(s.selectedScreenId=null,s.selectedComponentId=null),s.routes=l.routes,s))},updateSetting:async(t,r,i)=>{if(!t||!r)return;const a=u=>{if(!u||Xh(u,r)===i)return!1;ite(u,r,i)};await n.actions.screens.patch(a,t._id);const o=pn(n),l=o.screens.find(u=>u._id===t._id);if(!l)return;const s=o.screens.filter(u=>u.routing.roleId===l.routing.roleId&&u.routing.homeScreen&&u._id!==t._id);if(s.length&&l.routing.homeScreen){const u=c=>{c.routing.homeScreen=!1};for(let c of s)await n.actions.screens.patch(u,c._id)}},removeCustomLayout:async t=>{const r=pn(n).layouts.find(a=>a._id===t.layoutId),i=a=>{a.layoutId=null,a.showNavigation=(r==null?void 0:r.props.navigation)!=="None",a.width=(r==null?void 0:r.props.width)||"Large"};await n.actions.screens.patch(i,t._id)}},preview:{setDevice:t=>{n.update(r=>(r.previewDevice=t,r))},sendEvent:(t,r)=>{const{previewEventHandler:i}=pn(n);i==null||i(t,r)},registerEventHandler:t=>{n.update(r=>(r.previewEventHandler=t,r))}},layouts:{select:t=>{var a;const r=pn(n),i=r.layouts.find(o=>o._id===t);!i||r.selectedLayoutId===i._id&&r.selectedComponentId===((a=i.props)==null?void 0:a._id)||n.update(o=>{var l;return o.selectedLayoutId=i._id,o.selectedComponentId=(l=i.props)==null?void 0:l._id,o})},delete:async t=>{!(t!=null&&t._id)||(await Zt.deleteLayout({layoutId:t._id,layoutRev:t._rev}),n.update(r=>(r.layouts=r.layouts.filter(i=>i._id!==t._id),r)))}},components:{refreshDefinitions:async t=>{t||(t=pn(n).appId);const r=await Zt.fetchComponentLibDefinitions(t),i=Object.keys(r).filter(a=>a.startsWith("plugin/"));n.update(a=>({...a,components:r,customComponents:i,clientFeatures:{...zy.clientFeatures,...r.features}}))},getDefinition:t=>t?pn(n).components[t]:null,createInstance:(t,r)=>{const i=n.actions.components.getDefinition(t);if(!i)return null;const a=D6(t);let o={...r};a.forEach(s=>{s.defaultValue!==void 0&&(o[s.key]=s.defaultValue)});let l={};if(i.hasChildren&&(l._children=[]),t.endsWith("/formstep")){const s=q_(pn(ja).props,pn(I3)._id,c=>c._component.endsWith("/form")),u=h5(s,c=>c._component.endsWith("/formstep"));l.step=u.length+1,l._instanceName=`Step ${u.length+1}`}return{_id:C4(),_component:i.component,_styles:{normal:{},hover:{},active:{}},_instanceName:`New ${i.friendlyName||i.name}`,...$1.cloneDeep(o),...l}},create:async(t,r,i,a)=>{const o=pn(n),l=n.actions.components.createInstance(t,r);if(!!l)return i&&a!=null?await n.actions.screens.patch(s=>{var c;let u=ru(s.props,i);(c=u._children)!=null&&c.length?u._children.splice(a,0,l):u._children=[l]}):await n.actions.screens.patch(s=>{const u=ru(s.props,o.selectedComponentId);if(!u)return!1;let c;if(u){const f=n.actions.components.getDefinition(u._component);f!=null&&f.hasChildren?c=u:c=vc(s.props,u._id)}else c=s.props;if(!c)return!1;c._children||(c._children=[]),c._children.push(l)}),n.update(s=>(s.selectedComponentId=l._id,s)),np.captureEvent(o6.COMPONENT_CREATED,{name:l._component}),l},patch:async(t,r,i)=>{if(!r||!i){const o=pn(n);r=r||o.selectedComponentId,i=i||o.selectedScreenId}if(!r||!i||!t)return;const a=o=>{let l=ru(o.props,r);return l?t(l,o):!1};await n.actions.screens.patch(a,i)},delete:async t=>{if(!t)return;const r=pn(n);let i;r.selectedComponentId===t._id&&(i=n.actions.components.getNext(),i||(i=n.actions.components.getPrevious())),await n.actions.screens.patch(a=>{if(t=ru(a.props,t._id),!t)return!1;const o=vc(a.props,t._id);if(!o)return!1;o._children=o._children.filter(l=>l._id!==t._id)}),i&&n.update(a=>(a.selectedComponentId=i,a))},copy:(t,r=!1,i=!0)=>{if(n.update(a=>(a.componentToPaste=$1.cloneDeep(t),a.componentToPaste.isCut=r,a)),r&&i){const a=pn(ja),o=vc(a==null?void 0:a.props,t._id);o&&n.update(l=>(l.selectedComponentId=o._id,l))}},paste:async(t,r,i)=>{const a=pn(n);if(!a.componentToPaste)return;let o,l=$1.cloneDeep(a.componentToPaste);l.isCut&&n.update(c=>(delete c.componentToPaste,c));const s=c=>{if(t=ru(c.props,t._id),!t)return!1;const f=l.isCut,h=l._id;if(delete l.isCut,f||(l=Iv(l)),o=l._id,f){const m=vc(c.props,h);m!=null&&m._children&&(m._children=m._children.filter(_=>_._id!==h))}if(r==="inside"&&(n.actions.components.getDefinition(t._component).hasChildren||(r="below")),r==="inside")t._children||(t._children=[]),t._children.push(l);else{const m=vc(c.props,t._id);if(!(m!=null&&m._children))return!1;const _=m._children.findIndex(w=>w._id===t._id),y=r==="above"?_:_+1;m._children.splice(y,0,l)}},u=(i==null?void 0:i._id)||a.selectedScreenId;await n.actions.screens.patch(s,u),n.update(c=>(c.selectedScreenId=u,c.selectedComponentId=o,c))},getPrevious:()=>{var l,s;const r=pn(n).selectedComponentId,i=pn(ja),a=vc(i.props,r),o=a==null?void 0:a._children.findIndex(u=>u._id===r);if(!a||r===i.props._id)return null;if(o>0){const u=a._children[o-1];if((l=u._children)!=null&&l.length){let c=u;for(;(s=c._children)!=null&&s.length;)c=c._children[c._children.length-1];return c._id}return u._id}return a._id},getNext:()=>{var c,f;const t=pn(I3),r=t==null?void 0:t._id,i=pn(ja),a=vc(i.props,r),o=a==null?void 0:a._children.findIndex(h=>h._id===r);if((c=t._children)!=null&&c.length)return t._children[0]._id;if(!a)return null;if(o<a._children.length-1)return a._children[o+1]._id;let l=a,s=vc(i.props,l._id),u=s==null?void 0:s._children.findIndex(h=>h._id===l._id);for(;s!=null&&u===((f=s._children)==null?void 0:f.length)-1;)l=s,s=vc(i.props,l._id),u=s==null?void 0:s._children.findIndex(h=>h._id===l._id);return s?s._children[u+1]._id:null},selectPrevious:()=>{const t=n.actions.components.getPrevious();t&&n.update(r=>(r.selectedComponentId=t,r))},selectNext:()=>{const t=n.actions.components.getNext();t&&n.update(r=>(r.selectedComponentId=t,r))},moveUp:async t=>{await n.actions.screens.patch(r=>{const i=t==null?void 0:t._id,a=vc(r.props,i),o=a==null?void 0:a._children.findIndex(s=>s._id===i);if(!a||o===0&&a._id===r.props._id)return;const l=$1.cloneDeep(a._children[o]);if(a._children=a._children.filter(s=>s._id!==i),o>0){const s=a._children[o-1];n.actions.components.getDefinition(s._component).hasChildren?s._children.push(l):a._children.splice(o-1,0,l)}else if(a._id!==r.props._id){const s=vc(r.props,a._id),u=s._children.findIndex(c=>c._id===a._id);s._children.splice(u,0,l)}})},moveDown:async t=>{await n.actions.screens.patch(r=>{var s;const i=t==null?void 0:t._id,a=vc(r.props,i);if(!((s=a==null?void 0:a._children)!=null&&s.length))return!1;const o=a._children.findIndex(u=>u._id===i);if(o===a._children.length-1&&a._id===r.props._id)return;const l=$1.cloneDeep(a._children[o]);if(a._children=a._children.filter(u=>u._id!==i),o<a._children.length){const u=a._children[o];n.actions.components.getDefinition(u._component).hasChildren?u._children.splice(0,0,l):a._children.splice(o+1,0,l)}else{const u=vc(r.props,a._id),c=u._children.findIndex(f=>f._id===a._id);u._children.splice(c+1,0,l)}})},updateStyle:async(t,r)=>{await n.actions.components.patch(i=>{r==null||r===""?delete i._styles.normal[t]:i._styles.normal[t]=r})},updateStyles:async(t,r)=>{const i=a=>{a._styles.normal={...a._styles.normal,...t}};await n.actions.components.patch(i,r)},updateCustomStyle:async t=>{await n.actions.components.patch(r=>{r._styles.custom=t})},updateConditions:async t=>{await n.actions.components.patch(r=>{r._conditions=t})},updateSetting:async(t,r)=>{await n.actions.components.patch(i=>{if(!t||!i||i[t]===r)return!1;i[t]=r})},requestEjectBlock:t=>{n.actions.preview.sendEvent("eject-block",t)},handleEjectBlock:async(t,r)=>{let i;await n.actions.screens.patch(a=>{var c;const o=ru(a.props,t),l=vc(a.props,t);if(!o||!((c=l==null?void 0:l._children)!=null&&c.length))return!1;const s=h5(r,f=>f._containsSlot)[0];s&&(delete s._containsSlot,s._children=[...s._children||[],...o._children||[]]),r=Iv(r);const u=l._children.findIndex(f=>f._id===t);l._children[u]=r,i=r._id}),i&&n.update(a=>(a.selectedComponentId=i,a))}},links:{save:async(t,r)=>{const i=pn(n).navigation;let a=[...i==null?void 0:i.links];a.find(o=>o.url===t&&o.text===r)||(a.push({text:r,url:t}),await n.actions.navigation.save({...i,links:[...a]}))},delete:async t=>{const r=pn(n).navigation;let i=r==null?void 0:r.links;!(i!=null&&i.length)||(t=Array.isArray(t)?t:[t],i=i.filter(a=>!t.includes(a.url)),await n.actions.navigation.save({...r,links:i}))}},settings:{highlight:t=>{n.update(r=>({...r,highlightedSettingKey:t}))}},dnd:{start:t=>{n.actions.preview.sendEvent("dragging-new-component",{dragging:!0,component:t})},stop:()=>{n.actions.preview.sendEvent("dragging-new-component",{dragging:!1})}}},n};var c2={exports:{}},TY={exports:{}},Y9=1;function $4e(){return Y9=(Y9*9301+49297)%233280,Y9/233280}function w4e(n){Y9=n}var k4e={nextValue:$4e,seed:w4e},tw=k4e,vd="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-",Z5,aT,_g;function nw(){_g=!1}function DY(n){if(!n){Z5!==vd&&(Z5=vd,nw());return}if(n!==Z5){if(n.length!==vd.length)throw new Error("Custom alphabet for shortid must be "+vd.length+" unique characters. You submitted "+n.length+" characters: "+n);var e=n.split("").filter(function(t,r,i){return r!==i.lastIndexOf(t)});if(e.length)throw new Error("Custom alphabet for shortid must be "+vd.length+" unique characters. These characters were not unique: "+e.join(", "));Z5=n,nw()}}function z4e(n){return DY(n),Z5}function A4e(n){tw.seed(n),aT!==n&&(nw(),aT=n)}function M4e(){Z5||DY(vd);for(var n=Z5.split(""),e=[],t=tw.nextValue(),r;n.length>0;)t=tw.nextValue(),r=Math.floor(t*n.length),e.push(n.splice(r,1)[0]);return e.join("")}function BY(){return _g||(_g=M4e(),_g)}function C4e(n){var e=BY();return e[n]}function S4e(){return Z5||vd}var Zk={get:S4e,characters:z4e,seed:A4e,lookup:C4e,shuffled:BY},Ay=typeof window=="object"&&(window.crypto||window.msCrypto),rw;!Ay||!Ay.getRandomValues?rw=function(n){for(var e=[],t=0;t<n;t++)e.push(Math.floor(Math.random()*256));return e}:rw=function(n){return Ay.getRandomValues(new Uint8Array(n))};var L4e=rw,E4e=function(n,e,t){for(var r=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*r*t/e.length),a="";;)for(var o=n(i),l=i;l--;)if(a+=e[o[l]&r]||"",a.length===+t)return a},T4e=Zk,D4e=L4e,B4e=E4e;function H4e(n){for(var e=0,t,r="";!t;)r=r+B4e(D4e,T4e.get(),1),t=n<Math.pow(16,e+1),e++;return r}var O4e=H4e,k9=O4e,I4e=1567752802062,P4e=7,z9,oT;function V4e(n){var e="",t=Math.floor((Date.now()-I4e)*.001);return t===oT?z9++:(z9=0,oT=t),e=e+k9(P4e),e=e+k9(n),z9>0&&(e=e+k9(z9)),e=e+k9(t),e}var R4e=V4e,N4e=Zk;function F4e(n){if(!n||typeof n!="string"||n.length<6)return!1;var e=new RegExp("[^"+N4e.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]");return!e.test(n)}var j4e=F4e;(function(n){var e=Zk,t=R4e,r=j4e,i=0;function a(u){return e.seed(u),n.exports}function o(u){return i=u,n.exports}function l(u){return u!==void 0&&e.characters(u),e.shuffled()}function s(){return t(i)}n.exports=s,n.exports.generate=s,n.exports.seed=a,n.exports.worker=o,n.exports.characters=l,n.exports.isValid=r})(TY);(function(n){n.exports=TY.exports})(c2);class lT{constructor(e){this.automation=e}hasTrigger(){return this.automation.definition.trigger}addTestData(e){this.automation.testData={...this.automation.testData,...e}}addBlock(e,t){if(!this.hasTrigger()&&e.type==="TRIGGER"){const i={id:c2.exports.generate(),...e};return this.automation.definition.trigger=i,i}const r={id:c2.exports.generate(),...e};return this.automation.definition.steps.splice(t,0,r),r}updateBlock(e,t){const{steps:r,trigger:i}=this.automation.definition;if(i&&i.id===t){this.automation.definition.trigger=e;return}const a=r.findIndex(o=>o.id===t);if(a<0)throw new Error("Block not found.");r.splice(a,1,e),this.automation.definition.steps=r}deleteBlock(e){const{steps:t,trigger:r}=this.automation.definition;if(r&&r.id===e){this.automation.definition.trigger=null;return}const i=t.findIndex(a=>a.id===e);if(i<0)throw new Error("Block not found.");t.splice(i,1),this.automation.definition.steps=t}constructBlock(e,t,r){return{...r,inputs:r.inputs||{},stepId:t,type:e}}}const x4e={automations:[],showTestPanel:!1,blockDefinitions:{TRIGGER:[],ACTION:[]},selectedAutomation:null},U4e=()=>{const n=gi(x4e);return n.actions=q4e(n),n},q4e=n=>({definitions:async()=>{const e=await Zt.getAutomationDefinitions();return n.update(t=>(t.blockDefinitions={TRIGGER:e.trigger,ACTION:e.action},t)),e},fetch:async()=>{const e=await Promise.all([Zt.getAutomations(),Zt.getAutomationDefinitions()]);n.update(t=>{var i;let r=(i=t.selectedAutomation)==null?void 0:i.automation;return t.automations=e[0],t.blockDefinitions={TRIGGER:e[1].trigger,ACTION:e[1].action},r&&(r=e[0].filter(a=>a._id===r._id),t.selectedAutomation=new lT(r[0])),t})},create:async({name:e})=>{const t={name:e,type:"automation",definition:{steps:[]}},r=await Zt.createAutomation(t);n.update(i=>(i.automations=[...i.automations,r.automation],n.actions.select(r.automation),i))},duplicate:async e=>{const t=await Zt.createAutomation({...e,name:`${e.name} - copy`,_id:void 0,_ref:void 0});n.update(r=>(r.automations=[...r.automations,t.automation],n.actions.select(t.automation),r))},save:async e=>{const t=await Zt.updateAutomation(e);n.update(r=>{const i=t.automation,a=r.automations.findIndex(o=>o._id===e._id);if(a!==-1)return r.automations.splice(a,1,i),r.automations=[...r.automations],n.actions.select(i),r})},delete:async e=>{await Zt.deleteAutomation({automationId:e==null?void 0:e._id,automationRev:e==null?void 0:e._rev}),n.update(t=>{const r=t.automations.findIndex(i=>i._id===(e==null?void 0:e._id));return t.automations.splice(r,1),t.automations=[...t.automations],t.selectedAutomation=null,t.selectedBlock=null,t})},test:async(e,t)=>{n.update(i=>(i.selectedAutomation.testResults=null,i));const r=await Zt.testAutomation({automationId:e==null?void 0:e._id,testData:t});n.update(i=>(i.selectedAutomation.testResults=r,i))},select:e=>{n.update(t=>(t.selectedAutomation=new lT($1.cloneDeep(e)),t.selectedBlock=null,t))},getLogs:async({automationId:e,startDate:t,status:r,page:i}={})=>await Zt.getAutomationLogs({automationId:e,startDate:t,status:r,page:i}),clearLogErrors:async({automationId:e,appId:t}={})=>await Zt.clearAutomationLogErrors({automationId:e,appId:t}),addTestDataToAutomation:e=>{n.update(t=>(t.selectedAutomation.addTestData(e),t))},addBlockToAutomation:(e,t)=>{n.update(r=>(r.selectedBlock=r.selectedAutomation.addBlock($1.cloneDeep(e),t),r))},toggleFieldControl:e=>{n.update(t=>(t.selectedBlock.rowControl=e,t))},deleteAutomationBlock:e=>{n.update(t=>{const r=t.selectedAutomation.automation.definition.steps.findIndex(o=>o.id===e.id);t.selectedAutomation.deleteBlock(e.id);const i=t.selectedAutomation.automation.definition.steps;let a;return i[r]!=null?a=i[r]:i[r-1]!=null?a=i[r-1]:a=t.selectedAutomation.automation.definition.trigger||null,t.selectedBlock=a,t})}}),W4e=()=>{const t=jG("bb-temporal",{}),r=(a,o,l)=>{const s={...o,expiry:Date.now()+l*1e3};t.update(u=>({...u,[a]:s}))},i=a=>{const o=pn(t)[a];return o?o.expiry<Date.now()?(t.update(s=>(delete s[a],s)),null):o:void 0};return{subscribe:t.subscribe,actions:{setExpiring:r,getExpiring:i}}},G4e=()=>{const n=document.documentElement,e={theme:"darkest"},t=jG("bb-theme",e);return t.subscribe(r=>{if(r.darkMode!==void 0){t.set(e);return}n6.forEach(a=>{n.classList.toggle(`spectrum--${a.class}`,a.class===r.theme)});const i=n6.find(a=>a.class===r.theme);i!=null&&i.base&&n.classList.add(`spectrum--${i.base}`)}),t},Xt=y4e(),Or=U4e(),Pv=G4e(),Vv=W4e(),ja=Il(Xt,n=>n.screens.find(e=>e._id===n.selectedScreenId)),HY=Il(Xt,n=>{var e;return(e=n.layouts)==null?void 0:e.find(t=>t._id===n.selectedLayoutId)}),I3=Il([Xt,ja],([n,e])=>!e||!n.selectedComponentId?null:ru(e==null?void 0:e.props,n.selectedComponentId)),j0=ja,OY=Il(Xt,n=>n.screens.slice().sort((e,t)=>{const r=Sv(e.routing.roleId),i=Sv(t.routing.roleId);if(r!==i)return r>i?-1:1;const a=!!e.routing.homeScreen,o=!!t.routing.homeScreen;if(a!==o)return a?-1:1;const l=e.routing.route.split("/"),s=t.routing.route.split("/");let u=Math.min(l.length,s.length);for(let c=0;c<u;c++)if(l[c]!==s[c])return l[c]<s[c]?-1:1;return l.length<s.length?-1:1})),Y4e=Il([Xt,ja],([n,e])=>T4(e==null?void 0:e.props,n.selectedComponentId).map(t=>t._id)),sT={platformUrl:"",logoUrl:void 0,docsUrl:void 0,company:"Budibase",oidc:void 0,google:void 0,oidcCallbackUrl:"",googleCallbackUrl:""};function K4e(){const n=gi(sT),{subscribe:e,set:t}=n;async function r(){const a=pn(ur).tenantId,o=await Zt.getTenantConfig(a);t({...sT,...o.config,_rev:o._rev})}async function i(a){const o=pn(n);delete o.oidc,delete o.google,delete o.oidcCallbackUrl,delete o.googleCallbackUrl,await Zt.saveConfig({type:"settings",config:{...pn(n),...a},_rev:pn(n)._rev}),await r()}return{subscribe:e,set:t,save:i,init:r}}const Hs=K4e();var Dd={exports:{}};/**
426
426
  * @license
427
427
  * Lodash <https://lodash.com/>
428
428
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
@@ -941,7 +941,7 @@ Use Save As... to download, then click back to return to this page.`)&&(location
941
941
  `),t=X("i"),i=oe(r),a=oe("?"),o=oe(`
942
942
  This action cannot be undone.`)},m(l,s){C(l,e,s),C(l,t,s),x(t,i),x(t,a),C(l,o,s)},p(l,s){s&1&&r!==(r=l[0].name+"")&&gt(i,r)},d(l){l&&M(e),l&&M(t),l&&M(o)}}}function Cst(n){let e,t,r,i,a,o;e=new ou({props:{$$slots:{control:[Ast],default:[zst]},$$scope:{ctx:n}}});let l={okText:"Delete Automation",onOk:n[3],title:"Confirm Deletion",$$slots:{default:[Mst]},$$scope:{ctx:n}};r=new gl({props:l}),n[5](r);let s={automation:n[0]};return a=new yst({props:s}),n[6](a),{c(){O(e.$$.fragment),t=q(),O(r.$$.fragment),i=q(),O(a.$$.fragment)},m(u,c){B(e,u,c),C(u,t,c),B(r,u,c),C(u,i,c),B(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){H(e,u),u&&M(t),n[5](null),H(r,u),u&&M(i),n[6](null),H(a,u)}}}function Sst(n,e,t){let r,i;Fe(n,Or,h=>t(7,r=h)),Fe(n,ci,h=>t(8,i=h));let{automation:a}=e,o,l;async function s(){try{await Or.actions.delete(a),$t.success("Automation deleted successfully"),i("../automate")}catch{$t.error("Error deleting automation")}}async function u(){try{await Or.actions.duplicate(a),$t.success("Automation has been duplicated successfully"),i(`./${r.selectedAutomation.automation._id}`)}catch{$t.error("Error duplicating automation")}}function c(h){De[h?"unshift":"push"](()=>{o=h,t(1,o)})}function f(h){De[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 Lst extends Ve{constructor(e){super(),Pe(this,e,Sst,Cst,Ie,{automation:0})}}function lF(n,e,t){const r=n.slice();return r[5]=e[t],r[7]=t,r}function Est(n){let e,t,r;return e=new Lst({props:{automation:n[5]}}),{c(){O(e.$$.fragment),t=q()},m(i,a){B(e,i,a),C(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){H(e,i),i&&M(t)}}}function sF(n){let e,t;function r(){return n[3](n[5])}return e=new L5({props:{border:n[7]>0,icon:"ShareAndroid",text:n[5].name,selected:n[5]._id===n[1],$$slots:{default:[Est]},$$scope:{ctx:n}}}),e.$on("click",r),{c(){O(e.$$.fragment)},m(i,a){B(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){H(e,i)}}}function Tst(n){let e,t,r=n[0].automations.sort(uF),i=[];for(let o=0;o<r.length;o+=1)i[o]=sF(lF(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){C(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(uF);let s;for(s=0;s<r.length;s+=1){const u=lF(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=sF(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},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&&M(e),Bn(i,o)}}}const uF=n=>n.name;function Dst(n,e,t){let r,i,a;Fe(n,ci,s=>t(4,i=s)),Fe(n,Or,s=>t(0,a=s)),ar(async()=>{try{await Or.actions.fetch()}catch{$t.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 Bst extends Ve{constructor(e){super(),Pe(this,e,Dst,Tst,Ie,{})}}function cF(n,e,t){const r=n.slice();return r[17]=e[t][0],r[18]=e[t][1],r}function Hst(n){let e;return{c(){e=oe(`Please name your automation, then select a trigger. Every automation must
943
943
  start with a trigger.`)},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Ost(n){let e;return{c(){e=oe("Triggers")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Ist(n){let e=n[18].name+"",t;return{c(){t=oe(e)},m(r,i){C(r,t,i)},p(r,i){i&8&&e!==(e=r[18].name+"")&&gt(t,e)},d(r){r&&M(t)}}}function fF(n){let e,t,r,i,a,o,l,s,u,c;r=new un({props:{name:n[18].icon}}),o=new jt({props:{size:"S",$$slots:{default:[Ist]},$$scope:{ctx:n}}});function f(){return n[13](n[18])}return{c(){e=X("div"),t=X("div"),O(r.$$.fragment),i=q(),a=X("span"),O(o.$$.fragment),l=q(),D(a,"class","icon-spacing svelte-d3iboa"),D(t,"class","item-body svelte-d3iboa"),D(e,"class","item svelte-d3iboa"),Te(e,"selected",n[2]===n[18].name)},m(h,m){C(h,e,m),x(e,t),B(r,t,null),x(t,i),x(t,a),B(o,a,null),x(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&&Te(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&&M(e),H(r),H(o),u=!1,c()}}}function Pst(n){let e,t,r,i;e=new jt({props:{size:"S",$$slots:{default:[Ost]},$$scope:{ctx:n}}});let a=n[3],o=[];for(let s=0;s<a.length;s+=1)o[s]=fF(cF(n,a,s));const l=s=>$(o[s],1,1,()=>{o[s]=null});return{c(){O(e.$$.fragment),t=q(),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){B(e,s,u),C(s,t,u),C(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=cF(s,a,f);o[f]?(o[f].p(h,u),b(o[f],1)):(o[f]=fF(h),o[f].c(),b(o[f],1),o[f].m(r,null))}for(we(),f=a.length;f<o.length;f+=1)l(f);ke()}},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){H(e,s),s&&M(t),s&&M(r),Bn(o,s)}}}function Vst(n){let e,t,r,i,a,o,l,s,u,c;e=new b_({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 jt({props:{size:"XS",$$slots:{default:[Hst]},$$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 Mn({props:m}),De.push(()=>nt(a,"value",f)),De.push(()=>nt(a,"error",h)),a.$on("change",n[12]),u=new Pt({props:{noPadding:!0,$$slots:{default:[Pst]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=q(),O(r.$$.fragment),i=q(),O(a.$$.fragment),s=q(),O(u.$$.fragment)},m(_,y){B(e,_,y),C(_,t,y),B(r,_,y),C(_,i,y),B(a,_,y),C(_,s,y),B(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 S={};y&2097164&&(S.$$scope={dirty:y,ctx:_}),u.$set(S)},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(_){H(e,_),_&&M(t),H(r,_),_&&M(i),H(a,_),_&&M(s),H(u,_)}}}function Rst(n){let e,t;return e=new gr({props:{title:"Create Automation",confirmText:"Save",size:"M",onConfirm:n[5],disabled:!n[2]||!n[0],$$slots:{default:[Vst]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function Nst(n,e,t){let r,i,a,o,l,s;Fe(n,Or,I=>t(8,o=I)),Fe(n,ci,I=>t(16,l=I)),Fe(n,Wd,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===_6.WEBHOOK&&m.show,await Or.actions.save((I=o.selectedAutomation)==null?void 0:I.automation),$t.success(`Automation ${u} created`),l(`./${o.selectedAutomation.automation._id}`)}catch{$t.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 S=()=>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,S,T]}class cZ extends Ve{constructor(e){super(),Pe(this,e,Nst,Rst,Ie,{webhookModal:7})}}function Fst(n){let e,t;return e=new cZ({props:{webhookModal:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function jst(n){let e,t,r,i;e=new Bst({});let a={$$slots:{default:[Fst]},$$scope:{ctx:n}};return r=new rr({props:a}),n[2](r),{c(){O(e.$$.fragment),t=q(),O(r.$$.fragment)},m(o,l){B(e,o,l),C(o,t,l),B(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){H(e,o),o&&M(t),n[2](null),H(r,o)}}}function xst(n){let e,t;return e=new B1({props:{title:"Automations",$$slots:{default:[jst]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function Ust(n){let e,t,r,i,a,o;return t=new J2({props:{selected:"Automations",$$slots:{default:[xst]},$$scope:{ctx:n}}}),a=new un({props:{hoverable:!0,name:"AddCircle"}}),a.$on("click",function(){kn(n[0].show)&&n[0].show.apply(this,arguments)}),{c(){e=X("div"),O(t.$$.fragment),r=q(),i=X("div"),O(a.$$.fragment),D(i,"class","add-button svelte-1dlf15l"),D(e,"class","nav svelte-1dlf15l")},m(l,s){C(l,e,s),B(t,e,null),x(e,r),x(e,i),B(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&&M(e),H(t),H(a)}}}function qst(n,e,t){let{modal:r}=e,{webhookModal:i}=e;function a(o){De[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 Wst extends Ve{constructor(e){super(),Pe(this,e,qst,Ust,Ie,{modal:0,webhookModal:1})}}function pF(n,e,t){const r=n.slice();return r[8]=e[t],r[10]=t,r}function dF(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 uZ({props:l}),De.push(()=>nt(e,"showParameters",o));let s=n[3]&&n[3][n[8].id]&&hF(n);return{c(){O(e.$$.fragment),r=q(),s&&s.c(),i=yt()},m(c,f){B(e,c,f),C(c,r,f),s&&s.m(c,f),C(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=hF(c),s.c(),b(s,1),s.m(i.parentNode,i)):s&&(we(),$(s,1,1,()=>{s=null}),ke())},i(c){a||(b(e.$$.fragment,c),b(s),a=!0)},o(c){$(e.$$.fragment,c),$(s),a=!1},d(c){H(e,c),c&&M(r),s&&s.d(c),c&&M(i)}}}function hF(n){var s,u;let e,t,r,i,a,o;e=new ui({props:{noMargin:!0}});let l=((u=(s=n[2])==null?void 0:s[n[10]])==null?void 0:u.outputs.iterations)&&mF(n);return a=new J2({props:{noHorizPadding:!0,selected:"Input",$$slots:{default:[Xst]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=q(),l&&l.c(),r=q(),i=X("div"),O(a.$$.fragment),D(i,"class","tabs svelte-1iblsnb")},m(c,f){B(e,c,f),C(c,t,f),l&&l.m(c,f),C(c,r,f),C(c,i,f),B(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=mF(c),l.c(),b(l,1),l.m(r.parentNode,r)):l&&(we(),$(l,1,1,()=>{l=null}),ke());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){H(e,c),c&&M(t),l&&l.d(c),c&&M(r),c&&M(i),H(a)}}}function mF(n){let e,t,r,i,a,o;return t=new un({props:{name:"Reuse"}}),a=new sn({props:{$$slots:{default:[Gst]},$$scope:{ctx:n}}}),{c(){e=X("div"),O(t.$$.fragment),r=q(),i=X("div"),O(a.$$.fragment),$n(i,"margin-left","10px"),$n(e,"display","flex"),$n(e,"padding","10px 10px 0px 12px")},m(l,s){C(l,e,s),B(t,e,null),x(e,r),x(e,i),B(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&&M(e),H(t),H(a)}}}function Gst(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){C(l,e,s),C(l,r,s),C(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)+"")&&gt(r,t)},d(l){l&&M(e),l&&M(r),l&&M(i)}}}function Yst(n){var r,i;let e,t;return e=new F3({props:{minHeight:"80px",disabled:!0,value:o_((i=(r=n[2])==null?void 0:r[n[10]])==null?void 0:i.inputs,"No input")}}),{c(){O(e.$$.fragment)},m(a,o){B(e,a,o),t=!0},p(a,o){var s,u;const l={};o&4&&(l.value=o_((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){H(e,a)}}}function Kst(n){var r,i;let e,t;return e=new F3({props:{minHeight:"100px",disabled:!0,value:o_((i=(r=n[2])==null?void 0:r[n[10]])==null?void 0:i.outputs,"No output")}}),{c(){O(e.$$.fragment)},m(a,o){B(e,a,o),t=!0},p(a,o){var s,u;const l={};o&4&&(l.value=o_((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){H(e,a)}}}function Xst(n){let e,t,r,i;return e=new B1({props:{title:"Input",$$slots:{default:[Yst]},$$scope:{ctx:n}}}),r=new B1({props:{title:"Output",$$slots:{default:[Kst]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment),t=q(),O(r.$$.fragment)},m(a,o){B(e,a,o),C(a,t,o),B(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){H(e,a),a&&M(t),H(r,a)}}}function gF(n){let e;return{c(){e=X("div"),D(e,"class","separator svelte-1iblsnb")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function vF(n){let e,t,r,i,a,o=n[8].stepId!==N3.LOOP&&dF(n),l=n[1].length-1!==n[10]&&gF();return{c(){e=X("div"),o&&o.c(),r=q(),l&&l.c(),i=yt(),D(e,"class","block svelte-1iblsnb"),D(e,"style",t=n[0]?`width: ${n[0]}`:"")},m(s,u){C(s,e,u),o&&o.m(e,null),C(s,r,u),l&&l.m(s,u),C(s,i,u),a=!0},p(s,u){s[8].stepId!==N3.LOOP?o?(o.p(s,u),u&2&&b(o,1)):(o=dF(s),o.c(),b(o,1),o.m(e,null)):o&&(we(),$(o,1,1,()=>{o=null}),ke()),(!a||u&1&&t!==(t=s[0]?`width: ${s[0]}`:""))&&D(e,"style",t),s[1].length-1!==s[10]?l||(l=gF(),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&&M(e),o&&o.d(),s&&M(r),l&&l.d(s),s&&M(i)}}}function Jst(n){let e,t,r=n[1],i=[];for(let o=0;o<r.length;o+=1)i[o]=vF(pF(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){C(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=pF(o,r,s);i[s]?(i[s].p(u,l),b(i[s],1)):(i[s]=vF(u),i[s].c(),b(i[s],1),i[s].m(e,null))}for(we(),s=r.length;s<i.length;s+=1)a(s);ke()}},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&&M(e),Bn(i,o)}}}function o_(n,e){return n?JSON.stringify(n,null,2):e}function Zst(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!==N3.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!==N3.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 fZ extends Ve{constructor(e){super(),Pe(this,e,Zst,Jst,Ie,{automation:4,testResults:5,width:0})}}function Qst(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;return r=new un({props:{name:"MultipleCheck"}}),s=new un({props:{hoverable:!0,name:"Close"}}),s.$on("click",n[4]),c=new ui({}),h=new fZ({props:{automation:n[0],testResults:n[2]}}),{c(){e=X("div"),t=X("div"),O(r.$$.fragment),i=q(),a=X("div"),a.textContent="Test Details",o=q(),l=X("div"),O(s.$$.fragment),u=q(),O(c.$$.fragment),f=q(),O(h.$$.fragment),$n(a,"padding-left","var(--spacing-l)"),D(t,"class","title-text svelte-nwwj95"),$n(l,"padding-right","var(--spacing-xl)"),D(e,"class","title svelte-nwwj95")},m(_,y){C(_,e,y),x(e,t),B(r,t,null),x(t,i),x(t,a),x(e,o),x(e,l),B(s,l,null),C(_,u,y),B(c,_,y),C(_,f,y),B(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(_){_&&M(e),H(r),H(s),_&&M(u),H(c,_),_&&M(f),H(h,_)}}}function eut(n,e,t){let r;Fe(n,Or,s=>t(1,r=s));let{automation:i}=e,a,o;const l=async()=>{G1(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!==N3.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 tut extends Ve{constructor(e){super(),Pe(this,e,eut,Qst,Ie,{automation:0})}}function nut(n){let e,t,r,i;return r=new Pt({props:{gap:"S",justifyItems:"center",$$slots:{default:[lut]},$$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){C(a,e,o),x(e,t),B(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&&M(e),H(r)}}}function rut(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 iut(n){let e;return{c(){e=oe("You have no automations")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function aut(n){let e;return{c(){e=oe("Let's fix that. Call the bots!")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function out(n){let e;return{c(){e=oe("Create automation")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function lut(n){let e,t,r,i,a,o,l,s,u;return i=new In({props:{size:"M",$$slots:{default:[iut]},$$scope:{ctx:n}}}),o=new jt({props:{size:"M",$$slots:{default:[aut]},$$scope:{ctx:n}}}),s=new _n({props:{size:"M",cta:!0,$$slots:{default:[out]},$$scope:{ctx:n}}}),s.$on("click",n[5]),{c(){e=ut("svg"),t=ut("use"),r=q(),O(i.$$.fragment),a=q(),O(o.$$.fragment),l=q(),O(s.$$.fragment),Gr(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){C(c,e,f),x(e,t),C(c,r,f),B(i,c,f),C(c,a,f),B(o,c,f),C(c,l,f),B(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&&M(e),c&&M(r),H(i,c),c&&M(a),H(o,c),c&&M(l),H(s,c)}}}function _F(n){let e,t,r;return t=new tut({props:{automation:n[3]}}),{c(){e=X("div"),O(t.$$.fragment),D(e,"class","setup svelte-374m3f")},m(i,a){C(i,e,a),B(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&&M(e),H(t)}}}function sut(n){let e,t;return e=new cZ({props:{webhookModal:n[2]}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function uut(n){let e,t;return e=new gA({}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},i(r){t||(b(e.$$.fragment,r),t=!0)},o(r){$(e.$$.fragment,r),t=!1},d(r){H(e,r)}}}function cut(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;r=new Wst({props:{modal:n[1],webhookModal:n[2]}});const _=[rut,nut],y=[];function w(I,P){return I[3]?0:1}o=w(n),l=y[o]=_[o](n);let A=n[0].showTestPanel&&_F(n),S={$$slots:{default:[sut]},$$scope:{ctx:n}};c=new rr({props:S}),n[6](c);let T={width:"30%",$$slots:{default:[uut]},$$scope:{ctx:n}};return h=new rr({props:T}),n[7](h),{c(){e=X("div"),t=X("div"),O(r.$$.fragment),i=q(),a=X("div"),l.c(),s=q(),A&&A.c(),u=q(),O(c.$$.fragment),f=q(),O(h.$$.fragment),D(t,"class","nav svelte-374m3f"),D(a,"class","content svelte-374m3f"),D(e,"class","root svelte-374m3f")},m(I,P){C(I,e,P),x(e,t),B(r,t,null),x(e,i),x(e,a),y[o].m(a,null),x(e,s),A&&A.m(e,null),x(e,u),B(c,e,null),x(e,f),B(h,e,null),m=!0},p(I,[P]){const V={};P&2&&(V.modal=I[1]),P&4&&(V.webhookModal=I[2]),r.$set(V);let j=o;o=w(I),o===j?y[o].p(I,P):(we(),$(y[j],1,1,()=>{y[j]=null}),ke(),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=_F(I),A.c(),b(A,1),A.m(e,u)):A&&(we(),$(A,1,1,()=>{A=null}),ke());const U={};P&260&&(U.$$scope={dirty:P,ctx:I}),c.$set(U);const W={};P&256&&(W.$$scope={dirty:P,ctx:I}),h.$set(W)},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&&M(e),H(r),y[o].d(),A&&A.d(),n[6](null),H(c),n[7](null),H(h)}}}function fut(n,e,t){let r,i;Fe(n,Or,h=>t(0,i=h));let{$$slots:a={},$$scope:o}=e,l,s;ar(()=>{G1(Or,i.showTestPanel=!1,i)});const u=()=>l.show();function c(h){De[h?"unshift":"push"](()=>{l=h,t(1,l)})}function f(h){De[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 put extends Ve{constructor(e){super(),Pe(this,e,fut,cut,Ie,{})}}function dut(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 Mn({props:u}),De.push(()=>nt(a,"value",s)),{c(){e=X("span"),e.textContent=`The changes you have made will be deleted and the application reverted
944
- back to its production state.`,t=q(),r=X("span"),r.textContent="Please enter your app name to continue.",i=q(),O(a.$$.fragment)},m(c,f){C(c,e,f),C(c,t,f),C(c,r,f),C(c,i,f),B(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&&M(e),c&&M(t),c&&M(r),c&&M(i),H(a,c)}}}function hut(n){let e,t;return e=new gr({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:n[3],disabled:n[2]!==n[0].name,$$slots:{default:[dut]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function mut(n){let e,t,r,i;e=new un({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){kn(n[1].show)&&n[1].show.apply(this,arguments)});let a={$$slots:{default:[hut]},$$scope:{ctx:n}};return r=new rr({props:a}),n[5](r),{c(){O(e.$$.fragment),t=q(),O(r.$$.fragment)},m(o,l){B(e,o,l),C(o,t,l),B(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){H(e,o),o&&M(t),n[5](null),H(r,o)}}}function gut(n,e,t){let r,i;Fe(n,Xt,c=>t(0,i=c));let a,o;const l=async()=>{try{await Zt.revertAppChanges(r);const c=await Zt.fetchAppPackage(r);await Xt.actions.initialise(c),$t.info("Changes reverted successfully")}catch(c){$t.error(`Error reverting changes: ${c}`)}};function s(c){o=c,t(2,o)}function u(c){De[c?"unshift":"push"](()=>{a=c,t(1,a)})}return n.$$.update=()=>{n.$$.dirty&1&&(r=i.appId)},[i,a,o,l,s,u]}class vut extends Ve{constructor(e){super(),Pe(this,e,gut,mut,Ie,{})}}const _ut="@budibase/client",but="2.1.32",yut="MPL-2.0",$ut="dist/budibase-client.js",wut="dist/budibase-client.js",kut="module",zut="src/index.js",Aut={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},Mut={build:"rollup -c","dev:builder":"rollup -cw"},Cut={"@budibase/bbui":"^2.1.32","@budibase/frontend-core":"^2.1.32","@budibase/string-templates":"^2.1.32","@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","html5-qrcode":"^2.2.1",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"},Sut={"@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"},Lut={"loader-utils":"1.4.1"},Eut="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",Pd={name:_ut,version:but,license:yut,module:$ut,main:wut,type:kut,svelte:zut,exports:Aut,scripts:Mut,dependencies:Cut,devDependencies:Sut,resolutions:Lut,gitHead:Eut};function bF(n){let e,t;return e=new j3({props:{hoverable:!0,notice:!0,$$slots:{default:[Tut]},$$scope:{ctx:n}}}),e.$on("click",function(){kn(n[2].show)&&n[2].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function Tut(n){let e;return{c(){e=oe("Update available")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Dut(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Hut]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function But(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Out]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function Hut(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
944
+ back to its production state.`,t=q(),r=X("span"),r.textContent="Please enter your app name to continue.",i=q(),O(a.$$.fragment)},m(c,f){C(c,e,f),C(c,t,f),C(c,r,f),C(c,i,f),B(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&&M(e),c&&M(t),c&&M(r),c&&M(i),H(a,c)}}}function hut(n){let e,t;return e=new gr({props:{title:"Revert Changes",confirmText:"Revert",onConfirm:n[3],disabled:n[2]!==n[0].name,$$slots:{default:[dut]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function mut(n){let e,t,r,i;e=new un({props:{name:"Revert",hoverable:!0,tooltip:"Revert changes",dataCy:"revert-application-topnav"}}),e.$on("click",function(){kn(n[1].show)&&n[1].show.apply(this,arguments)});let a={$$slots:{default:[hut]},$$scope:{ctx:n}};return r=new rr({props:a}),n[5](r),{c(){O(e.$$.fragment),t=q(),O(r.$$.fragment)},m(o,l){B(e,o,l),C(o,t,l),B(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){H(e,o),o&&M(t),n[5](null),H(r,o)}}}function gut(n,e,t){let r,i;Fe(n,Xt,c=>t(0,i=c));let a,o;const l=async()=>{try{await Zt.revertAppChanges(r);const c=await Zt.fetchAppPackage(r);await Xt.actions.initialise(c),$t.info("Changes reverted successfully")}catch(c){$t.error(`Error reverting changes: ${c}`)}};function s(c){o=c,t(2,o)}function u(c){De[c?"unshift":"push"](()=>{a=c,t(1,a)})}return n.$$.update=()=>{n.$$.dirty&1&&(r=i.appId)},[i,a,o,l,s,u]}class vut extends Ve{constructor(e){super(),Pe(this,e,gut,mut,Ie,{})}}const _ut="@budibase/client",but="2.1.34",yut="MPL-2.0",$ut="dist/budibase-client.js",wut="dist/budibase-client.js",kut="module",zut="src/index.js",Aut={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},Mut={build:"rollup -c","dev:builder":"rollup -cw"},Cut={"@budibase/bbui":"^2.1.34","@budibase/frontend-core":"^2.1.34","@budibase/string-templates":"^2.1.34","@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","html5-qrcode":"^2.2.1",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"},Sut={"@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"},Lut={"loader-utils":"1.4.1"},Eut="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",Pd={name:_ut,version:but,license:yut,module:$ut,main:wut,type:kut,svelte:zut,exports:Aut,scripts:Mut,dependencies:Cut,devDependencies:Sut,resolutions:Lut,gitHead:Eut};function bF(n){let e,t;return e=new j3({props:{hoverable:!0,notice:!0,$$slots:{default:[Tut]},$$scope:{ctx:n}}}),e.$on("click",function(){kn(n[2].show)&&n[2].show.apply(this,arguments)}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function Tut(n){let e;return{c(){e=oe("Update available")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Dut(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Hut]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function But(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Out]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function Hut(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
945
945
  latest version available.`)},m(o,l){C(o,e,l),C(o,t,l),x(t,i),C(o,a,l)},p(o,l){l&2&&r!==(r=o[1].version+"")&&gt(i,r)},d(o){o&&M(e),o&&M(t),o&&M(a)}}}function Out(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
946
946
  `),o=X("b"),o.textContent=`${Pd.version}`,l=oe(` is available. Updates can contain new features,
947
947
  performance improvements and bug fixes.`)},m(s,u){C(s,e,u),C(s,t,u),x(t,i),C(s,a,u),C(s,o,u),C(s,l,u)},p(s,u){u&2&&r!==(r=s[1].version+"")&&gt(i,r)},d(s){s&&M(e),s&&M(t),s&&M(a),s&&M(o),s&&M(l)}}}function yF(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Iut]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(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){H(e,r)}}}function Iut(n){let e,t,r=n[1].revertableVersion+"",i,a;return{c(){e=oe(`You can revert this app to version
@@ -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.d2995f56.js"></script>
13
+ <script type="module" crossorigin src="/builder/assets/index.6970d8ca.js"></script>
14
14
  <link rel="stylesheet" href="/builder/assets/index.534f6c29.css">
15
15
  </head>
16
16
  <body id="app">
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1669298097681" clover="3.2.0">
3
- <project timestamp="1669298097681" name="All files">
2
+ <coverage generated="1669380900525" clover="3.2.0">
3
+ <project timestamp="1669380900525" name="All files">
4
4
  <metrics statements="4023" coveredstatements="2904" conditionals="1754" coveredconditionals="965" methods="600" coveredmethods="412" elements="6377" coveredelements="4281" complexity="0" loc="4023" ncloc="4023" packages="22" files="119" classes="119"/>
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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
235
+ at Fri Nov 25 2022 12:55:00 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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
928
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
929
929
  </div>
930
930
  <script src="../../prettify.js"></script>
931
931
  <script>
@@ -412,7 +412,7 @@ exports.importApps = <span class="fstat-no" title="function not covered" >as</sp
412
412
  <div class='footer quiet pad2 space-top1 center small'>
413
413
  Code coverage generated by
414
414
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
415
- at Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
415
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
416
416
  </div>
417
417
  <script src="../../prettify.js"></script>
418
418
  <script>
@@ -919,7 +919,7 @@ const buildSchemaHelper = <span class="fstat-no" title="function not covered" >a
919
919
  <div class='footer quiet pad2 space-top1 center small'>
920
920
  Code coverage generated by
921
921
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
922
- at Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
922
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
923
923
  </div>
924
924
  <script src="../../prettify.js"></script>
925
925
  <script>
@@ -475,7 +475,7 @@ exports.getBudibaseVersion = async ctx =&gt; {
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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
478
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
479
479
  </div>
480
480
  <script src="../../prettify.js"></script>
481
481
  <script>
@@ -311,7 +311,7 @@
311
311
  <div class='footer quiet pad2 space-top1 center small'>
312
312
  Code coverage generated by
313
313
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
314
- at Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
314
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
315
315
  </div>
316
316
  <script src="../../prettify.js"></script>
317
317
  <script>
@@ -112,7 +112,7 @@ exports.find = async function (ctx) {
112
112
  <div class='footer quiet pad2 space-top1 center small'>
113
113
  Code coverage generated by
114
114
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
115
- at Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
115
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
116
116
  </div>
117
117
  <script src="../../prettify.js"></script>
118
118
  <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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
214
+ at Fri Nov 25 2022 12:55:00 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 =&gt; {
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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
196
+ at Fri Nov 25 2022 12:55:00 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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
112
+ at Fri Nov 25 2022 12:55:00 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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
598
+ at Fri Nov 25 2022 12:55:00 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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
104
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
105
105
  </div>
106
106
  <script src="../../../prettify.js"></script>
107
107
  <script>
@@ -220,7 +220,7 @@ exports.generateQueryPreviewValidation = () =&gt; {
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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
223
+ at Fri Nov 25 2022 12:55:00 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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
397
+ at Fri Nov 25 2022 12:55:00 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 =&gt; {
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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
349
+ at Fri Nov 25 2022 12:55:00 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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
832
+ at Fri Nov 25 2022 12:55:00 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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
164
+ at Fri Nov 25 2022 12:55:00 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 =&gt; {
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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
1480
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
1481
1481
  </div>
1482
1482
  <script src="../../../prettify.js"></script>
1483
1483
  <script>
@@ -1591,7 +1591,7 @@ exports.fullSearch = async (query, params) =&gt; {
1591
1591
  <div class='footer quiet pad2 space-top1 center small'>
1592
1592
  Code coverage generated by
1593
1593
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1594
- at Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
1594
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
1595
1595
  </div>
1596
1596
  <script src="../../../prettify.js"></script>
1597
1597
  <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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
541
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
542
542
  </div>
543
543
  <script src="../../../prettify.js"></script>
544
544
  <script>
@@ -394,7 +394,7 @@ exports.validate = async ({ tableId, row, table }) =&gt; {
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 Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
397
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
398
398
  </div>
399
399
  <script src="../../../prettify.js"></script>
400
400
  <script>
@@ -103,7 +103,7 @@ exports.save = <span class="fstat-no" title="function not covered" >as</span>ync
103
103
  <div class='footer quiet pad2 space-top1 center small'>
104
104
  Code coverage generated by
105
105
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
106
- at Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
106
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
107
107
  </div>
108
108
  <script src="../../prettify.js"></script>
109
109
  <script>
@@ -592,7 +592,7 @@ exports.runStaticFormulaChecks = async (table, { oldTable, deletion }) =&gt; {
592
592
  <div class='footer quiet pad2 space-top1 center small'>
593
593
  Code coverage generated by
594
594
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
595
- at Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
595
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
596
596
  </div>
597
597
  <script src="../../../prettify.js"></script>
598
598
  <script>
@@ -1039,7 +1039,7 @@ exports.bulkImport = <span class="fstat-no" title="function not covered" >as</sp
1039
1039
  <div class='footer quiet pad2 space-top1 center small'>
1040
1040
  Code coverage generated by
1041
1041
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1042
- at Thu Nov 24 2022 13:54:57 GMT+0000 (Coordinated Universal Time)
1042
+ at Fri Nov 25 2022 12:55:00 GMT+0000 (Coordinated Universal Time)
1043
1043
  </div>
1044
1044
  <script src="../../../prettify.js"></script>
1045
1045
  <script>