@budibase/server 2.1.11 → 2.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/builder/assets/{index.afe04944.js → index.4ffe4819.js} +3 -3
- package/builder/index.html +1 -1
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +1 -1
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +1 -1
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +1 -1
- package/coverage/lcov-report/utilities/plugins.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/dist/package.json +6 -6
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
|
@@ -29,7 +29,7 @@ var RZ=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var yyt=RZ((Df,G2
|
|
|
29
29
|
<span class='flatpickr-weekday'>
|
|
30
30
|
${_t.join("</span><span class='flatpickr-weekday'>")}
|
|
31
31
|
</span>
|
|
32
|
-
`}function be(){t.calendarContainer.classList.add("hasWeeks");const Qe=Ba("div","flatpickr-weekwrapper");Qe.appendChild(Ba("span","flatpickr-weekday",t.l10n.weekAbbreviation));const _t=Ba("div","flatpickr-weeks");return Qe.appendChild(_t),{weekWrapper:Qe,weekNumbers:_t}}function pe(Qe,_t=!0){const ot=_t?Qe:Qe-t.currentMonth;ot<0&&t._hidePrevMonthArrow===!0||ot>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ot,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,wn("onYearChange"),le()),Q(),wn("onMonthChange"),zn())}function _e(Qe=!0,_t=!0){if(t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,_t===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){const{hours:ot,minutes:It,seconds:fn}=zb(t.config);h(ot,It,fn)}t.redraw(),Qe&&wn("onChange")}function Ae(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),wn("onClose")}function me(){t.config!==void 0&&wn("onDestroy");for(let Qe=t._handlers.length;Qe--;)t._handlers[Qe].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){const Qe=t.calendarContainer.parentNode;if(Qe.lastChild&&Qe.removeChild(Qe.lastChild),Qe.parentNode){for(;Qe.firstChild;)Qe.parentNode.insertBefore(Qe.firstChild,Qe);Qe.parentNode.removeChild(Qe)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(Qe=>{try{delete t[Qe]}catch{}})}function it(Qe){return t.config.appendTo&&t.config.appendTo.contains(Qe)?!0:t.calendarContainer.contains(Qe)}function $e(Qe){if(t.isOpen&&!t.config.inline){const _t=kf(Qe),ot=it(_t),It=_t===t.input||_t===t.altInput||t.element.contains(_t)||Qe.path&&Qe.path.indexOf&&(~Qe.path.indexOf(t.input)||~Qe.path.indexOf(t.altInput)),fn=Qe.type==="blur"?It&&Qe.relatedTarget&&!it(Qe.relatedTarget):!It&&!ot&&!it(Qe.relatedTarget),an=!t.config.ignoredFocusElements.some(jn=>jn.contains(_t));fn&&an&&(t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&l(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&(t.clear(!1),t.redraw()))}}function Me(Qe){if(!Qe||t.config.minDate&&Qe<t.config.minDate.getFullYear()||t.config.maxDate&&Qe>t.config.maxDate.getFullYear())return;const _t=Qe,ot=t.currentYear!==_t;t.currentYear=_t||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ot&&(t.redraw(),wn("onYearChange"),le())}function Be(Qe,_t=!0){var ot;const It=t.parseDate(Qe,void 0,_t);if(t.config.minDate&&It&&zf(It,t.config.minDate,_t!==void 0?_t:!t.minDateHasTime)<0||t.config.maxDate&&It&&zf(It,t.config.maxDate,_t!==void 0?_t:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(It===void 0)return!1;const fn=!!t.config.enable,an=(ot=t.config.enable)!==null&&ot!==void 0?ot:t.config.disable;for(let jn=0,xn;jn<an.length;jn++){if(xn=an[jn],typeof xn=="function"&&xn(It))return fn;if(xn instanceof Date&&It!==void 0&&xn.getTime()===It.getTime())return fn;if(typeof xn=="string"){const yr=t.parseDate(xn,void 0,!0);return yr&&yr.getTime()===It.getTime()?fn:!fn}else if(typeof xn=="object"&&It!==void 0&&xn.from&&xn.to&&It.getTime()>=xn.from.getTime()&&It.getTime()<=xn.to.getTime())return fn}return!fn}function xe(Qe){return t.daysContainer!==void 0?Qe.className.indexOf("hidden")===-1&&Qe.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(Qe):!1}function ve(Qe){Qe.target===t._input&&(t.selectedDates.length>0||t._input.value.length>0)&&!(Qe.relatedTarget&&it(Qe.relatedTarget))&&t.setDate(t._input.value,!0,Qe.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function st(Qe){const _t=kf(Qe),ot=t.config.wrap?n.contains(_t):_t===t._input,It=t.config.allowInput,fn=t.isOpen&&(!It||!ot),an=t.config.inline&&ot&&!It;if(Qe.keyCode===13&&ot){if(It)return t.setDate(t._input.value,!0,_t===t.altInput?t.config.altFormat:t.config.dateFormat),_t.blur();t.open()}else if(it(_t)||fn||an){const jn=!!t.timeContainer&&t.timeContainer.contains(_t);switch(Qe.keyCode){case 13:jn?(Qe.preventDefault(),l(),Se()):Re(Qe);break;case 27:Qe.preventDefault(),Se();break;case 8:case 46:ot&&!t.config.allowInput&&(Qe.preventDefault(),t.clear());break;case 37:case 39:if(!jn&&!ot){if(Qe.preventDefault(),t.daysContainer!==void 0&&(It===!1||document.activeElement&&xe(document.activeElement))){const yr=Qe.keyCode===39?1:-1;Qe.ctrlKey?(Qe.stopPropagation(),pe(yr),W(j(1),0)):W(void 0,yr)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:Qe.preventDefault();const xn=Qe.keyCode===40?1:-1;t.daysContainer&&_t.$i!==void 0||_t===t.input||_t===t.altInput?Qe.ctrlKey?(Qe.stopPropagation(),Me(t.currentYear-xn),W(j(1),0)):jn||W(void 0,xn*7):_t===t.currentYearElement?Me(t.currentYear-xn):t.config.enableTime&&(!jn&&t.hourElement&&t.hourElement.focus(),l(Qe),t._debouncedChange());break;case 9:if(jn){const yr=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(vi=>vi),pr=yr.indexOf(_t);if(pr!==-1){const vi=yr[pr+(Qe.shiftKey?-1:1)];Qe.preventDefault(),(vi||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(_t)&&Qe.shiftKey&&(Qe.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&_t===t.amPM)switch(Qe.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),Ut();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),Ut();break}(ot||it(_t))&&wn("onKeyDown",Qe)}function dt(Qe){if(t.selectedDates.length!==1||Qe&&(!Qe.classList.contains("flatpickr-day")||Qe.classList.contains("flatpickr-disabled")))return;const _t=Qe?Qe.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),ot=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),It=Math.min(_t,t.selectedDates[0].getTime()),fn=Math.max(_t,t.selectedDates[0].getTime());let an=!1,jn=0,xn=0;for(let yr=It;yr<fn;yr+=mie.DAY)Be(new Date(yr),!0)||(an=an||yr>It&&yr<fn,yr<ot&&(!jn||yr>jn)?jn=yr:yr>ot&&(!xn||yr<xn)&&(xn=yr));for(let yr=0;yr<t.config.showMonths;yr++){const pr=t.daysContainer.children[yr];for(let vi=0,Gi=pr.children.length;vi<Gi;vi++){const hi=pr.children[vi],Qa=hi.dateObj.getTime(),Qo=jn>0&&Qa<jn||xn>0&&Qa>xn;if(Qo){hi.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(s1=>{hi.classList.remove(s1)});continue}else if(an&&!Qo)continue;["startRange","inRange","endRange","notAllowed"].forEach(s1=>{hi.classList.remove(s1)}),Qe!==void 0&&(Qe.classList.add(_t<=t.selectedDates[0].getTime()?"startRange":"endRange"),ot<_t&&Qa===ot?hi.classList.add("startRange"):ot>_t&&Qa===ot&&hi.classList.add("endRange"),Qa>=jn&&(xn===0||Qa<=xn)&&hie(Qa,ot,_t)&&hi.classList.add("inRange"))}}}function vt(){t.isOpen&&!t.config.static&&!t.config.inline&&Tt()}function Ze(Qe,_t=t._positionElement){if(t.isMobile===!0){if(Qe){Qe.preventDefault();const It=kf(Qe);It&&It.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),wn("onOpen");return}else if(t._input.disabled||t.config.inline)return;const ot=t.isOpen;t.isOpen=!0,ot||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),wn("onOpen"),Tt(_t)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(Qe===void 0||!t.timeContainer.contains(Qe.relatedTarget))&&setTimeout(()=>t.hourElement.select(),50)}function We(Qe){return _t=>{const ot=t.config[`_${Qe}Date`]=t.parseDate(_t,t.config.dateFormat),It=t.config[`_${Qe==="min"?"max":"min"}Date`];ot!==void 0&&(t[Qe==="min"?"minDateHasTime":"maxDateHasTime"]=ot.getHours()>0||ot.getMinutes()>0||ot.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(fn=>Be(fn)),!t.selectedDates.length&&Qe==="min"&&f(ot),Ut()),t.daysContainer&&(at(),ot!==void 0?t.currentYearElement[Qe]=ot.getFullYear().toString():t.currentYearElement.removeAttribute(Qe),t.currentYearElement.disabled=!!It&&ot!==void 0&&It.getFullYear()===ot.getFullYear())}}function nt(){const Qe=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],_t=Object.assign(Object.assign({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ot={};t.config.parseDate=_t.parseDate,t.config.formatDate=_t.formatDate,Object.defineProperty(t.config,"enable",{get:()=>t.config._enable,set:an=>{t.config._enable=Jt(an)}}),Object.defineProperty(t.config,"disable",{get:()=>t.config._disable,set:an=>{t.config._disable=Jt(an)}});const It=_t.mode==="time";if(!_t.dateFormat&&(_t.enableTime||It)){const an=is.defaultConfig.dateFormat||Fh.dateFormat;ot.dateFormat=_t.noCalendar||It?"H:i"+(_t.enableSeconds?":S":""):an+" H:i"+(_t.enableSeconds?":S":"")}if(_t.altInput&&(_t.enableTime||It)&&!_t.altFormat){const an=is.defaultConfig.altFormat||Fh.altFormat;ot.altFormat=_t.noCalendar||It?"h:i"+(_t.enableSeconds?":S K":" K"):an+` h:i${_t.enableSeconds?":S":""} K`}Object.defineProperty(t.config,"minDate",{get:()=>t.config._minDate,set:We("min")}),Object.defineProperty(t.config,"maxDate",{get:()=>t.config._maxDate,set:We("max")});const fn=an=>jn=>{t.config[an==="min"?"_minTime":"_maxTime"]=t.parseDate(jn,"H:i:S")};Object.defineProperty(t.config,"minTime",{get:()=>t.config._minTime,set:fn("min")}),Object.defineProperty(t.config,"maxTime",{get:()=>t.config._maxTime,set:fn("max")}),_t.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ot,_t);for(let an=0;an<Qe.length;an++)t.config[Qe[an]]=t.config[Qe[an]]===!0||t.config[Qe[an]]==="true";$b.filter(an=>t.config[an]!==void 0).forEach(an=>{t.config[an]=wb(t.config[an]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let an=0;an<t.config.plugins.length;an++){const jn=t.config.plugins[an](t)||{};for(const xn in jn)$b.indexOf(xn)>-1?t.config[xn]=wb(jn[xn]).map(a).concat(t.config[xn]):typeof _t[xn]>"u"&&(t.config[xn]=jn[xn])}_t.altInputClass||(t.config.altInputClass=Ht().className+" "+t.config.altInputClass),wn("onParseConfig")}function Ht(){return t.config.wrap?n.querySelector("[data-input]"):n}function on(){typeof t.config.locale!="object"&&typeof is.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error(`flatpickr: invalid locale ${t.config.locale}`)),t.l10n=Object.assign(Object.assign({},is.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?is.l10ns[t.config.locale]:void 0),l$.K=`(${t.l10n.amPM[0]}|${t.l10n.amPM[1]}|${t.l10n.amPM[0].toLowerCase()}|${t.l10n.amPM[1].toLowerCase()})`,Object.assign(Object.assign({},e),JSON.parse(JSON.stringify(n.dataset||{}))).time_24hr===void 0&&is.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=bq(t),t.parseDate=s$({config:t.config,l10n:t.l10n})}function Tt(Qe){if(typeof t.config.position=="function")return void t.config.position(t,Qe);if(t.calendarContainer===void 0)return;wn("onPreCalendarPosition");const _t=Qe||t._positionElement,ot=Array.prototype.reduce.call(t.calendarContainer.children,(n1,Is)=>n1+Is.offsetHeight,0),It=t.calendarContainer.offsetWidth,fn=t.config.position.split(" "),an=fn[0],jn=fn.length>1?fn[1]:null,xn=_t.getBoundingClientRect(),yr=window.innerHeight-xn.bottom,pr=an==="above"||an!=="below"&&yr<ot&&xn.top>ot,vi=window.pageYOffset+xn.top+(pr?-ot-2:_t.offsetHeight+2);if(n2(t.calendarContainer,"arrowTop",!pr),n2(t.calendarContainer,"arrowBottom",pr),t.config.inline)return;let Gi=window.pageXOffset+xn.left,hi=!1,ls=!1;jn==="center"?(Gi-=(It-xn.width)/2,hi=!0):jn==="right"&&(Gi-=It-xn.width,ls=!0),n2(t.calendarContainer,"arrowLeft",!hi&&!ls),n2(t.calendarContainer,"arrowCenter",hi),n2(t.calendarContainer,"arrowRight",ls);const Qa=window.document.body.offsetWidth-(window.pageXOffset+xn.right),Qo=Gi+It>window.document.body.offsetWidth,s1=Qa+It>window.document.body.offsetWidth;if(n2(t.calendarContainer,"rightMost",Qo),!t.config.static)if(t.calendarContainer.style.top=`${vi}px`,!Qo)t.calendarContainer.style.left=`${Gi}px`,t.calendarContainer.style.right="auto";else if(!s1)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=`${Qa}px`;else{const n1=he();if(n1===void 0)return;const Is=window.document.body.offsetWidth,xa=Math.max(0,Is/2-It/2),Ha=".flatpickr-calendar.centerMost:before",x0=".flatpickr-calendar.centerMost:after",Y1=n1.cssRules.length,$a=`{left:${xn.left}px;right:auto;}`;n2(t.calendarContainer,"rightMost",!1),n2(t.calendarContainer,"centerMost",!0),n1.insertRule(`${Ha},${x0}${$a}`,Y1),t.calendarContainer.style.left=`${xa}px`,t.calendarContainer.style.right="auto"}}function he(){let Qe=null;for(let _t=0;_t<document.styleSheets.length;_t++){const ot=document.styleSheets[_t];try{ot.cssRules}catch{continue}Qe=ot;break}return Qe!=null?Qe:Xe()}function Xe(){const Qe=document.createElement("style");return document.head.appendChild(Qe),Qe.sheet}function at(){t.config.noCalendar||t.isMobile||(le(),zn(),Q())}function Se(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function Re(Qe){Qe.preventDefault(),Qe.stopPropagation();const _t=jn=>jn.classList&&jn.classList.contains("flatpickr-day")&&!jn.classList.contains("flatpickr-disabled")&&!jn.classList.contains("notAllowed"),ot=_q(kf(Qe),_t);if(ot===void 0)return;const It=ot,fn=t.latestSelectedDateObj=new Date(It.dateObj.getTime()),an=(fn.getMonth()<t.currentMonth||fn.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=It,t.config.mode==="single")t.selectedDates=[fn];else if(t.config.mode==="multiple"){const jn=br(fn);jn?t.selectedDates.splice(parseInt(jn),1):t.selectedDates.push(fn)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=fn,t.selectedDates.push(fn),zf(fn,t.selectedDates[0],!0)!==0&&t.selectedDates.sort((jn,xn)=>jn.getTime()-xn.getTime()));if(c(),an){const jn=t.currentYear!==fn.getFullYear();t.currentYear=fn.getFullYear(),t.currentMonth=fn.getMonth(),jn&&(wn("onYearChange"),le()),wn("onMonthChange")}if(zn(),Q(),Ut(),!an&&t.config.mode!=="range"&&t.config.showMonths===1?V(It):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){const jn=t.config.mode==="single"&&!t.config.enableTime,xn=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(jn||xn)&&Se()}y()}const Oe={locale:[on,de],showMonths:[K,o,se],minDate:[A],maxDate:[A],clickOpens:[()=>{t.config.clickOpens===!0?(_(t._input,"focus",t.open),_(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function Ue(Qe,_t){if(Qe!==null&&typeof Qe=="object"){Object.assign(t.config,Qe);for(const ot in Qe)Oe[ot]!==void 0&&Oe[ot].forEach(It=>It())}else t.config[Qe]=_t,Oe[Qe]!==void 0?Oe[Qe].forEach(ot=>ot()):$b.indexOf(Qe)>-1&&(t.config[Qe]=wb(_t));t.redraw(),Ut(!0)}function kt(Qe,_t){let ot=[];if(Qe instanceof Array)ot=Qe.map(It=>t.parseDate(It,_t));else if(Qe instanceof Date||typeof Qe=="number")ot=[t.parseDate(Qe,_t)];else if(typeof Qe=="string")switch(t.config.mode){case"single":case"time":ot=[t.parseDate(Qe,_t)];break;case"multiple":ot=Qe.split(t.config.conjunction).map(It=>t.parseDate(It,_t));break;case"range":ot=Qe.split(t.l10n.rangeSeparator).map(It=>t.parseDate(It,_t));break}else t.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(Qe)}`));t.selectedDates=t.config.allowInvalidPreload?ot:ot.filter(It=>It instanceof Date&&Be(It,!1)),t.config.mode==="range"&&t.selectedDates.sort((It,fn)=>It.getTime()-fn.getTime())}function Mt(Qe,_t=!1,ot=t.config.dateFormat){if(Qe!==0&&!Qe||Qe instanceof Array&&Qe.length===0)return t.clear(_t);kt(Qe,ot),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),A(void 0,_t),f(),t.selectedDates.length===0&&t.clear(!1),Ut(_t),_t&&wn("onChange")}function Jt(Qe){return Qe.slice().map(_t=>typeof _t=="string"||typeof _t=="number"||_t instanceof Date?t.parseDate(_t,void 0,!0):_t&&typeof _t=="object"&&_t.from&&_t.to?{from:t.parseDate(_t.from,void 0),to:t.parseDate(_t.to,void 0)}:_t).filter(_t=>_t)}function dn(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;const Qe=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);Qe&&kt(Qe,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function cn(){if(t.input=Ht(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Ba(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),t._positionElement=t.config.positionElement||t._input}function Dn(){const Qe=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Ba("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=Qe,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=Qe==="datetime-local"?"Y-m-d\\TH:i:S":Qe==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}_(t.mobileInput,"change",_t=>{t.setDate(kf(_t).value,!1,t.mobileFormatStr),wn("onChange"),wn("onClose")})}function Pn(Qe){if(t.isOpen===!0)return t.close();t.open(Qe)}function wn(Qe,_t){if(t.config===void 0)return;const ot=t.config[Qe];if(ot!==void 0&&ot.length>0)for(let It=0;ot[It]&&It<ot.length;It++)ot[It](t.selectedDates,t.input.value,t,_t);Qe==="onChange"&&(t.input.dispatchEvent(St("change")),t.input.dispatchEvent(St("input")))}function St(Qe){const _t=document.createEvent("Event");return _t.initEvent(Qe,!0,!0),_t}function br(Qe){for(let _t=0;_t<t.selectedDates.length;_t++)if(zf(t.selectedDates[_t],Qe)===0)return""+_t;return!1}function Un(Qe){return t.config.mode!=="range"||t.selectedDates.length<2?!1:zf(Qe,t.selectedDates[0])>=0&&zf(Qe,t.selectedDates[1])<=0}function zn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach((Qe,_t)=>{const ot=new Date(t.currentYear,t.currentMonth,1);ot.setMonth(t.currentMonth+_t),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[_t].textContent=sv(ot.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ot.getMonth().toString(),Qe.value=ot.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function On(Qe){return t.selectedDates.map(_t=>t.formatDate(_t,Qe)).filter((_t,ot,It)=>t.config.mode!=="range"||t.config.enableTime||It.indexOf(_t)===ot).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Ut(Qe=!0){t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=On(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=On(t.config.altFormat)),Qe!==!1&&wn("onValueUpdate")}function Kn(Qe){const _t=kf(Qe),ot=t.prevMonthNav.contains(_t),It=t.nextMonthNav.contains(_t);ot||It?pe(ot?-1:1):t.yearElements.indexOf(_t)>=0?_t.select():_t.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):_t.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Hr(Qe){Qe.preventDefault();const _t=Qe.type==="keydown",ot=kf(Qe),It=ot;t.amPM!==void 0&&ot===t.amPM&&(t.amPM.textContent=t.l10n.amPM[qf(t.amPM.textContent===t.l10n.amPM[0])]);const fn=parseFloat(It.getAttribute("min")),an=parseFloat(It.getAttribute("max")),jn=parseFloat(It.getAttribute("step")),xn=parseInt(It.value,10),yr=Qe.delta||(_t?Qe.which===38?1:-1:0);let pr=xn+jn*yr;if(typeof It.value<"u"&&It.value.length===2){const vi=It===t.hourElement,Gi=It===t.minuteElement;pr<fn?(pr=an+pr+qf(!vi)+(qf(vi)&&qf(!t.amPM)),Gi&&T(void 0,-1,t.hourElement)):pr>an&&(pr=It===t.hourElement?pr-an-qf(!t.amPM):fn,Gi&&T(void 0,1,t.hourElement)),t.amPM&&vi&&(jn===1?pr+xn===23:Math.abs(pr-xn)>jn)&&(t.amPM.textContent=t.l10n.amPM[qf(t.amPM.textContent===t.l10n.amPM[0])]),It.value=x2(pr)}}return i(),t}function jh(n,e){const t=Array.prototype.slice.call(n).filter(i=>i instanceof HTMLElement),r=[];for(let i=0;i<t.length;i++){const a=t[i];try{if(a.getAttribute("data-fp-omit")!==null)continue;a._flatpickr!==void 0&&(a._flatpickr.destroy(),a._flatpickr=void 0),a._flatpickr=vie(a,e||{}),r.push(a._flatpickr)}catch(o){console.error(o)}}return r.length===1?r[0]:r}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return jh(this,n)},HTMLElement.prototype.flatpickr=function(n){return jh([this],n)});var is=function(n,e){return typeof n=="string"?jh(window.document.querySelectorAll(n),e):n instanceof Node?jh([n],e):jh(n,e)};is.defaultConfig={};is.l10ns={en:Object.assign({},Yg),default:Object.assign({},Yg)};is.localize=n=>{is.l10ns.default=Object.assign(Object.assign({},is.l10ns.default),n)};is.setDefaults=n=>{is.defaultConfig=Object.assign(Object.assign({},is.defaultConfig),n)};is.parseDate=s$({});is.formatDate=bq({});is.compareDates=zf;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return jh(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window<"u"&&(window.flatpickr=is);function _ie(n){let e,t=[n[1]],r={};for(let i=0;i<t.length;i+=1)r=au(r,t[i]);return{c(){e=X("input"),MA(e,r)},m(i,a){C(i,e,a),e.autofocus&&e.focus(),n[11](e)},p(i,a){MA(e,r=Rd(t,[a&2&&i[1]]))},d(i){i&&M(e),n[11](null)}}}function bie(n){let e;const t=n[10].default,r=Xn(t,n,n[9],null),i=r||_ie(n);return{c(){i&&i.c()},m(a,o){i&&i.m(a,o),e=!0},p(a,[o]){r?r.p&&(!e||o&512)&&Zn(r,t,a,a[9],e?Jn(t,a[9],o,null):Qn(a[9]),null):i&&i.p&&(!e||o&3)&&i.p(a,e?o:-1)},i(a){e||(b(i,a),e=!0)},o(a){$(i,a),e=!1},d(a){i&&i.d(a)}}}function yie(n){return n.charAt(2).toLowerCase()+n.substring(3)}function $ie(n,e,t){const r=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let i=Kh(e,r),{$$slots:a={},$$scope:o}=e;const l=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:s="",formattedValue:u="",element:c=null,dateFormat:f=null}=e,{options:h={}}=e,m=!1,{input:_=void 0,flatpickr:y=void 0}=e;ar(()=>{const I=c||_,P=A(h);return P.onReady.push(()=>{t(8,m=!0)}),t(3,y=is(I,Object.assign(P,c?{wrap:!0}:{}))),()=>{y.destroy()}});const w=Nn();function A(I={}){I=Object.assign({},I);for(const P of l){const V=(j,U,W)=>{w(yie(P),[j,U,W])};P in I?(Array.isArray(I[P])||(I[P]=[I[P]]),I[P].push(V)):I[P]=[V]}return I.onChange&&!I.onChange.includes(S)&&I.onChange.push(S),I}function S(I,P){t(2,s=Array.isArray(I)&&I.length===1?I[0]:I),t(4,u=P)}function T(I){De[I?"unshift":"push"](()=>{_=I,t(0,_)})}return n.$$set=I=>{e=au(au({},e),Ug(I)),t(1,i=Kh(e,r)),"value"in I&&t(2,s=I.value),"formattedValue"in I&&t(4,u=I.formattedValue),"element"in I&&t(5,c=I.element),"dateFormat"in I&&t(6,f=I.dateFormat),"options"in I&&t(7,h=I.options),"input"in I&&t(0,_=I.input),"flatpickr"in I&&t(3,y=I.flatpickr),"$$scope"in I&&t(9,o=I.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&y&&m&&y.setDate(s,!1,f),n.$$.dirty&392&&y&&m)for(const[I,P]of Object.entries(A(h)))y.set(I,P)},[_,i,s,y,u,c,f,h,m,o,a,T]}class wie extends Ve{constructor(e){super(),Pe(this,e,$ie,bie,Ie,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function UC(n){let e,t;return{c(){e=ut("svg"),t=ut("use"),Gr(t,"xlink:href","#spectrum-icon-18-Alert"),D(e,"class","spectrum-Icon spectrum-Icon--sizeM spectrum-Textfield-validationIcon"),D(e,"focusable","false"),D(e,"aria-hidden","true")},m(r,i){C(r,e,i),x(e,t)},d(r){r&&M(e)}}}function kie(n){let e,t,r,i,a,o,l,s,u=!!n[2]&&UC();return{c(){e=X("div"),t=X("div"),u&&u.c(),r=q(),i=X("input"),a=q(),o=X("button"),o.innerHTML='<svg class="spectrum-Icon spectrum-Icon--sizeM" focusable="false" aria-hidden="true" aria-label="Calendar"><use xlink:href="#spectrum-icon-18-Calendar"></use></svg>',D(i,"data-input",""),D(i,"type","text"),D(i,"class","spectrum-Textfield-input spectrum-InputGroup-input svelte-s5xzv8"),D(i,"placeholder",n[4]),D(i,"id",n[0]),i.value=n[3],Te(i,"is-disabled",n[1]),D(t,"class","spectrum-Textfield spectrum-InputGroup-textfield svelte-s5xzv8"),Te(t,"is-disabled",n[1]),Te(t,"is-invalid",!!n[2]),D(o,"type","button"),D(o,"class","spectrum-Picker spectrum-Picker--sizeM spectrum-InputGroup-button svelte-s5xzv8"),D(o,"tabindex","-1"),Te(o,"is-disabled",n[1]),Te(o,"is-invalid",!!n[2]),D(e,"id",n[10]),D(e,"class","flatpickr spectrum-InputGroup spectrum-Datepicker svelte-s5xzv8"),D(e,"aria-readonly","false"),D(e,"aria-required","false"),D(e,"aria-haspopup","true"),Te(e,"is-disabled",n[1]),Te(e,"is-invalid",!!n[2]),Te(e,"is-focused",n[6])},m(c,f){C(c,e,f),x(e,t),u&&u.m(t,null),x(t,r),x(t,i),x(e,a),x(e,o),l||(s=[At(t,"click",function(){var h,m;kn((h=n[7])==null?void 0:h.open)&&((m=n[7])==null||m.open.apply(this,arguments))}),At(o,"click",function(){var h,m;kn((h=n[7])==null?void 0:h.open)&&((m=n[7])==null||m.open.apply(this,arguments))})],l=!0)},p(c,f){n=c,n[2]?u||(u=UC(),u.c(),u.m(t,r)):u&&(u.d(1),u=null),f&16&&D(i,"placeholder",n[4]),f&1&&D(i,"id",n[0]),f&8&&i.value!==n[3]&&(i.value=n[3]),f&2&&Te(i,"is-disabled",n[1]),f&2&&Te(t,"is-disabled",n[1]),f&4&&Te(t,"is-invalid",!!n[2]),f&2&&Te(o,"is-disabled",n[1]),f&4&&Te(o,"is-invalid",!!n[2]),f&2&&Te(e,"is-disabled",n[1]),f&4&&Te(e,"is-invalid",!!n[2]),f&64&&Te(e,"is-focused",n[6])},d(c){c&&M(e),u&&u.d(),l=!1,Vi(s)}}}function qC(n){let e,t,r;function i(o){n[20](o)}let a={value:n[5]?n[3]:n[14](n[3]),options:n[8],element:`#${n[10]}`,$$slots:{default:[kie]},$$scope:{ctx:n}};return n[7]!==void 0&&(a.flatpickr=n[7]),e=new wie({props:a}),De.push(()=>tt(e,"flatpickr",i)),e.$on("open",n[12]),e.$on("close",n[13]),e.$on("change",n[11]),{c(){O(e.$$.fragment)},m(o,l){B(e,o,l),r=!0},p(o,l){const s={};l&40&&(s.value=o[5]?o[3]:o[14](o[3])),l&256&&(s.options=o[8]),l&16777439&&(s.$$scope={dirty:l,ctx:o}),!t&&l&128&&(t=!0,s.flatpickr=o[7],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function WC(n){let e,t,r;return{c(){e=X("div"),D(e,"class","overlay svelte-s5xzv8")},m(i,a){C(i,e,a),t||(r=At(e,"mousedown",Mg(function(){var o,l;kn((o=n[7])==null?void 0:o.close)&&((l=n[7])==null||l.close.apply(this,arguments))})),t=!0)},p(i,a){n=i},d(i){i&&M(e),t=!1,r()}}}function zie(n){let e=n[9],t,r,i,a=qC(n),o=n[6]&&WC(n);return{c(){a.c(),t=q(),o&&o.c(),r=yt()},m(l,s){a.m(l,s),C(l,t,s),o&&o.m(l,s),C(l,r,s),i=!0},p(l,[s]){s&512&&Ie(e,e=l[9])?(we(),$(a,1,1,ht),ke(),a=qC(l),a.c(),b(a,1),a.m(t.parentNode,t)):a.p(l,s),l[6]?o?o.p(l,s):(o=WC(l),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},i(l){i||(b(a),i=!0)},o(l){$(a),i=!1},d(l){a.d(l),l&&M(t),o&&o.d(l),l&&M(r)}}}function Aie(n,e,t){let r,{id:i=null}=e,{disabled:a=!1}=e,{error:o=null}=e,{enableTime:l=!0}=e,{value:s=null}=e,{placeholder:u=null}=e,{appendTo:c=void 0}=e,{timeOnly:f=!1}=e,{ignoreTimezones:h=!1}=e,{time24hr:m=!1}=e,{range:_=!1}=e;const y=Nn(),w=`${C4()}-wrapper`;let A=!1,S,T;const I=Q=>{let le=new Date(`0-${Q}`);return le instanceof Date&&!isNaN(le.getTime())?le:null},P=Q=>{const[le]=Q.detail,ie=l&&!f&&h;let K=le[0];if(K&&(K=K.toISOString()),f)!s&&K&&(K=new Date(le[0].getTime()+60*60*1e3).toISOString()),K=`2000-01-01T${K.split("T")[1]}`;else if(l){if(ie){const G=le[0].getTimezoneOffset()*6e4;K=new Date(le[0].getTime()-G).toISOString().slice(0,-1)}}else{const G=le[0].getFullYear(),re=`${le[0].getMonth()+1}`.padStart(2,"0"),se=`${le[0].getDate()}`.padStart(2,"0");K=`${G}-${re}-${se}T00:00:00.000`}_?y("change",Q.detail):y("change",K)},V=Q=>{["Backspace","Clear","Delete"].includes(Q.key)&&(y("change",null),S.close())},j=()=>{t(6,A=!0),document.addEventListener("keyup",V)},U=()=>{t(6,A=!1),document.removeEventListener("keyup",V),document.querySelectorAll(`#${w} input`).forEach(le=>le.blur())},W=Q=>{if(!Q)return null;let le,ie,K=I(Q);return f&&K?le=K:Q instanceof Date?le=Q:isNaN(Q)?le=new Date(Q):le=new Date(parseInt(Q)),ie=le.getTime(),isNaN(ie)?null:new Date(Math.floor(ie/1e3)*1e3)};function te(Q){S=Q,t(7,S)}return n.$$set=Q=>{"id"in Q&&t(0,i=Q.id),"disabled"in Q&&t(1,a=Q.disabled),"error"in Q&&t(2,o=Q.error),"enableTime"in Q&&t(15,l=Q.enableTime),"value"in Q&&t(3,s=Q.value),"placeholder"in Q&&t(4,u=Q.placeholder),"appendTo"in Q&&t(16,c=Q.appendTo),"timeOnly"in Q&&t(17,f=Q.timeOnly),"ignoreTimezones"in Q&&t(18,h=Q.ignoreTimezones),"time24hr"in Q&&t(19,m=Q.time24hr),"range"in Q&&t(5,_=Q.range)},n.$$.update=()=>{n.$$.dirty&753704&&t(8,T={element:`#${w}`,enableTime:f||l||!1,noCalendar:f||!1,altInput:!0,time_24hr:m||!1,altFormat:f?"H:i":l?"F j Y, H:i":"F j, Y",wrap:!0,mode:_?"range":null,appendTo:c,disableMobile:"true",onReady:()=>{let Q=I(s);f&&Q&&y("change",Q.toISOString())}}),n.$$.dirty&688128&&t(9,r={timeOnly:f,enableTime:l,time24hr:m})},[i,a,o,s,u,_,A,S,T,r,w,P,j,U,W,l,c,f,h,m,te]}class Mie extends Ve{constructor(e){super(),Pe(this,e,Aie,zie,Ie,{id:0,disabled:1,error:2,enableTime:15,value:3,placeholder:4,appendTo:16,timeOnly:17,ignoreTimezones:18,time24hr:19,range:5})}}function Cie(n){let e,t;return e=new Mie({props:{error:n[4],disabled:n[3],value:n[0],placeholder:n[8],enableTime:n[5],timeOnly:n[6],time24hr:n[7],appendTo:n[9],ignoreTimezones:n[10],range:n[11]}}),e.$on("change",n[12]),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&16&&(a.error=r[4]),i&8&&(a.disabled=r[3]),i&1&&(a.value=r[0]),i&256&&(a.placeholder=r[8]),i&32&&(a.enableTime=r[5]),i&64&&(a.timeOnly=r[6]),i&128&&(a.time24hr=r[7]),i&512&&(a.appendTo=r[9]),i&1024&&(a.ignoreTimezones=r[10]),i&2048&&(a.range=r[11]),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 Sie(n){let e,t;return e=new Sc({props:{label:n[1],labelPosition:n[2],error:n[4],$$slots:{default:[Cie]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.label=r[1]),i&4&&(a.labelPosition=r[2]),i&16&&(a.error=r[4]),i&20473&&(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 Lie(n,e,t){let{value:r=null}=e,{label:i=null}=e,{labelPosition:a="above"}=e,{disabled:o=!1}=e,{error:l=null}=e,{enableTime:s=!0}=e,{timeOnly:u=!1}=e,{time24hr:c=!1}=e,{placeholder:f=null}=e,{appendTo:h=void 0}=e,{ignoreTimezones:m=!1}=e,{range:_=!1}=e;const y=Nn(),w=A=>{_?t(0,r=A==null?void 0:A.detail[1]):t(0,r=A.detail),y("change",A.detail)};return n.$$set=A=>{"value"in A&&t(0,r=A.value),"label"in A&&t(1,i=A.label),"labelPosition"in A&&t(2,a=A.labelPosition),"disabled"in A&&t(3,o=A.disabled),"error"in A&&t(4,l=A.error),"enableTime"in A&&t(5,s=A.enableTime),"timeOnly"in A&&t(6,u=A.timeOnly),"time24hr"in A&&t(7,c=A.time24hr),"placeholder"in A&&t(8,f=A.placeholder),"appendTo"in A&&t(9,h=A.appendTo),"ignoreTimezones"in A&&t(10,m=A.ignoreTimezones),"range"in A&&t(11,_=A.range)},[r,i,a,o,l,s,u,c,f,h,m,_,w]}class f5 extends Ve{constructor(e){super(),Pe(this,e,Lie,Sie,Ie,{value:0,label:1,labelPosition:2,disabled:3,error:4,enableTime:5,timeOnly:6,time24hr:7,placeholder:8,appendTo:9,ignoreTimezones:10,range:11})}}function Eie(n){var r;let e,t;return e=new pq({props:{id:n[1],error:n[3],disabled:n[2],readonly:n[7],fieldText:n[13],options:n[4],isPlaceholder:!((r=n[0])!=null&&r.length),autocomplete:n[8],isOptionSelected:n[12],getOptionLabel:n[5],getOptionValue:n[6],onSelectOption:n[11],sort:n[9],autoWidth:n[10]}}),{c(){O(e.$$.fragment)},m(i,a){B(e,i,a),t=!0},p(i,[a]){var l;const o={};a&2&&(o.id=i[1]),a&8&&(o.error=i[3]),a&4&&(o.disabled=i[2]),a&128&&(o.readonly=i[7]),a&8192&&(o.fieldText=i[13]),a&16&&(o.options=i[4]),a&1&&(o.isPlaceholder=!((l=i[0])!=null&&l.length)),a&256&&(o.autocomplete=i[8]),a&4096&&(o.isOptionSelected=i[12]),a&32&&(o.getOptionLabel=i[5]),a&64&&(o.getOptionValue=i[6]),a&2048&&(o.onSelectOption=i[11]),a&512&&(o.sort=i[9]),a&1024&&(o.autoWidth=i[10]),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 Tie(n,e,t){let r,i,a,o,l,{value:s=[]}=e,{id:u=null}=e,{placeholder:c=null}=e,{disabled:f=!1}=e,{error:h=null}=e,{options:m=[]}=e,{getOptionLabel:_=W=>W}=e,{getOptionValue:y=W=>W}=e,{readonly:w=!1}=e,{autocomplete:A=!1}=e,{sort:S=!1}=e,{autoWidth:T=!1}=e;const I=Nn(),P=(W,te,Q)=>{if(Array.isArray(W)&&W.length>0){if(!te)return"";const le=W.map(ie=>te[ie]||ie).join(", ");return`(${W.length}) ${le}`}else return Q||"Choose some options"},V=W=>{let te={};return Array.isArray(W)&&W.length>0&&W.forEach(Q=>{Q&&(te[Q]=!0)}),te},j=W=>{let te=null;return W!=null&&W.length&&(te={},W.forEach((Q,le)=>{const ie=y(Q,le);ie!=null&&(te[ie]=_(Q,le)||"")})),te},U=(W,te)=>Q=>{if(W[Q]){const le=te.filter(ie=>ie!==Q);I("change",le)}else I("change",[...te,Q])};return n.$$set=W=>{"value"in W&&t(0,s=W.value),"id"in W&&t(1,u=W.id),"placeholder"in W&&t(14,c=W.placeholder),"disabled"in W&&t(2,f=W.disabled),"error"in W&&t(3,h=W.error),"options"in W&&t(4,m=W.options),"getOptionLabel"in W&&t(5,_=W.getOptionLabel),"getOptionValue"in W&&t(6,y=W.getOptionValue),"readonly"in W&&t(7,w=W.readonly),"autocomplete"in W&&t(8,A=W.autocomplete),"sort"in W&&t(9,S=W.sort),"autoWidth"in W&&t(10,T=W.autoWidth)},n.$$.update=()=>{n.$$.dirty&1&&t(15,r=V(s)),n.$$.dirty&16&&t(16,i=j(m)),n.$$.dirty&81921&&t(13,a=P(s,i,c)),n.$$.dirty&32768&&t(12,o=W=>r[W]===!0),n.$$.dirty&32769&&t(11,l=U(r,s))},[s,u,f,h,m,_,y,w,A,S,T,l,o,a,c,r,i]}class Die extends Ve{constructor(e){super(),Pe(this,e,Tie,Eie,Ie,{value:0,id:1,placeholder:14,disabled:2,error:3,options:4,getOptionLabel:5,getOptionValue:6,readonly:7,autocomplete:8,sort:9,autoWidth:10})}}function Bie(n){let e,t;return e=new Die({props:{error:n[5],disabled:n[2],readonly:n[3],value:n[0],options:n[7],placeholder:n[6],sort:n[10],getOptionLabel:n[8],getOptionValue:n[9],autoWidth:n[11]}}),e.$on("change",n[12]),e.$on("click",n[13]),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&32&&(a.error=r[5]),i&4&&(a.disabled=r[2]),i&8&&(a.readonly=r[3]),i&1&&(a.value=r[0]),i&128&&(a.options=r[7]),i&64&&(a.placeholder=r[6]),i&1024&&(a.sort=r[10]),i&256&&(a.getOptionLabel=r[8]),i&512&&(a.getOptionValue=r[9]),i&2048&&(a.autoWidth=r[11]),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 Hie(n){let e,t;return e=new Sc({props:{label:n[1],labelPosition:n[4],error:n[5],$$slots:{default:[Bie]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.label=r[1]),i&16&&(a.labelPosition=r[4]),i&32&&(a.error=r[5]),i&36845&&(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 Oie(n,e,t){let{value:r=[]}=e,{label:i=null}=e,{disabled:a=!1}=e,{readonly:o=!1}=e,{labelPosition:l="above"}=e,{error:s=null}=e,{placeholder:u=null}=e,{options:c=[]}=e,{getOptionLabel:f=S=>S}=e,{getOptionValue:h=S=>S}=e,{sort:m=!1}=e,{autoWidth:_=!1}=e;const y=Nn(),w=S=>{t(0,r=S.detail),y("change",S.detail)};function A(S){Hn.call(this,n,S)}return n.$$set=S=>{"value"in S&&t(0,r=S.value),"label"in S&&t(1,i=S.label),"disabled"in S&&t(2,a=S.disabled),"readonly"in S&&t(3,o=S.readonly),"labelPosition"in S&&t(4,l=S.labelPosition),"error"in S&&t(5,s=S.error),"placeholder"in S&&t(6,u=S.placeholder),"options"in S&&t(7,c=S.options),"getOptionLabel"in S&&t(8,f=S.getOptionLabel),"getOptionValue"in S&&t(9,h=S.getOptionValue),"sort"in S&&t(10,m=S.sort),"autoWidth"in S&&t(11,_=S.autoWidth)},[r,i,a,o,l,s,u,c,f,h,m,_,w,A]}class _5 extends Ve{constructor(e){super(),Pe(this,e,Oie,Hie,Ie,{value:0,label:1,disabled:2,readonly:3,labelPosition:4,error:5,placeholder:6,options:7,getOptionLabel:8,getOptionValue:9,sort:10,autoWidth:11})}}function Iie(n){let e,t=(typeof n[0]=="object"?JSON.stringify(n[0]):n[0])+"",r;return{c(){e=X("div"),r=oe(t),D(e,"class","svelte-186zidf")},m(i,a){C(i,e,a),x(e,r)},p(i,[a]){a&1&&t!==(t=(typeof i[0]=="object"?JSON.stringify(i[0]):i[0])+"")&>(r,t)},i:ht,o:ht,d(i){i&&M(e)}}}function Pie(n,e,t){let{value:r}=e;return n.$$set=i=>{"value"in i&&t(0,r=i.value)},[r]}class qm extends Ve{constructor(e){super(),Pe(this,e,Pie,Iie,Ie,{value:0})}}function Vie(n){let e,t,r,i,a;return{c(){e=X("label"),t=X("input"),i=q(),a=X("span"),a.innerHTML=`<svg class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Checkbox-checkmark" focusable="false" aria-hidden="true"><use xlink:href="#spectrum-css-icon-Checkmark100"></use></svg>
|
|
32
|
+
`}function be(){t.calendarContainer.classList.add("hasWeeks");const Qe=Ba("div","flatpickr-weekwrapper");Qe.appendChild(Ba("span","flatpickr-weekday",t.l10n.weekAbbreviation));const _t=Ba("div","flatpickr-weeks");return Qe.appendChild(_t),{weekWrapper:Qe,weekNumbers:_t}}function pe(Qe,_t=!0){const ot=_t?Qe:Qe-t.currentMonth;ot<0&&t._hidePrevMonthArrow===!0||ot>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ot,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,wn("onYearChange"),le()),Q(),wn("onMonthChange"),zn())}function _e(Qe=!0,_t=!0){if(t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,_t===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){const{hours:ot,minutes:It,seconds:fn}=zb(t.config);h(ot,It,fn)}t.redraw(),Qe&&wn("onChange")}function Ae(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),wn("onClose")}function me(){t.config!==void 0&&wn("onDestroy");for(let Qe=t._handlers.length;Qe--;)t._handlers[Qe].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){const Qe=t.calendarContainer.parentNode;if(Qe.lastChild&&Qe.removeChild(Qe.lastChild),Qe.parentNode){for(;Qe.firstChild;)Qe.parentNode.insertBefore(Qe.firstChild,Qe);Qe.parentNode.removeChild(Qe)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(Qe=>{try{delete t[Qe]}catch{}})}function it(Qe){return t.config.appendTo&&t.config.appendTo.contains(Qe)?!0:t.calendarContainer.contains(Qe)}function $e(Qe){if(t.isOpen&&!t.config.inline){const _t=kf(Qe),ot=it(_t),It=_t===t.input||_t===t.altInput||t.element.contains(_t)||Qe.path&&Qe.path.indexOf&&(~Qe.path.indexOf(t.input)||~Qe.path.indexOf(t.altInput)),fn=Qe.type==="blur"?It&&Qe.relatedTarget&&!it(Qe.relatedTarget):!It&&!ot&&!it(Qe.relatedTarget),an=!t.config.ignoredFocusElements.some(jn=>jn.contains(_t));fn&&an&&(t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&l(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&(t.clear(!1),t.redraw()))}}function Me(Qe){if(!Qe||t.config.minDate&&Qe<t.config.minDate.getFullYear()||t.config.maxDate&&Qe>t.config.maxDate.getFullYear())return;const _t=Qe,ot=t.currentYear!==_t;t.currentYear=_t||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ot&&(t.redraw(),wn("onYearChange"),le())}function Be(Qe,_t=!0){var ot;const It=t.parseDate(Qe,void 0,_t);if(t.config.minDate&&It&&zf(It,t.config.minDate,_t!==void 0?_t:!t.minDateHasTime)<0||t.config.maxDate&&It&&zf(It,t.config.maxDate,_t!==void 0?_t:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(It===void 0)return!1;const fn=!!t.config.enable,an=(ot=t.config.enable)!==null&&ot!==void 0?ot:t.config.disable;for(let jn=0,xn;jn<an.length;jn++){if(xn=an[jn],typeof xn=="function"&&xn(It))return fn;if(xn instanceof Date&&It!==void 0&&xn.getTime()===It.getTime())return fn;if(typeof xn=="string"){const yr=t.parseDate(xn,void 0,!0);return yr&&yr.getTime()===It.getTime()?fn:!fn}else if(typeof xn=="object"&&It!==void 0&&xn.from&&xn.to&&It.getTime()>=xn.from.getTime()&&It.getTime()<=xn.to.getTime())return fn}return!fn}function xe(Qe){return t.daysContainer!==void 0?Qe.className.indexOf("hidden")===-1&&Qe.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(Qe):!1}function ve(Qe){Qe.target===t._input&&(t.selectedDates.length>0||t._input.value.length>0)&&!(Qe.relatedTarget&&it(Qe.relatedTarget))&&t.setDate(t._input.value,!0,Qe.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function st(Qe){const _t=kf(Qe),ot=t.config.wrap?n.contains(_t):_t===t._input,It=t.config.allowInput,fn=t.isOpen&&(!It||!ot),an=t.config.inline&&ot&&!It;if(Qe.keyCode===13&&ot){if(It)return t.setDate(t._input.value,!0,_t===t.altInput?t.config.altFormat:t.config.dateFormat),_t.blur();t.open()}else if(it(_t)||fn||an){const jn=!!t.timeContainer&&t.timeContainer.contains(_t);switch(Qe.keyCode){case 13:jn?(Qe.preventDefault(),l(),Se()):Re(Qe);break;case 27:Qe.preventDefault(),Se();break;case 8:case 46:ot&&!t.config.allowInput&&(Qe.preventDefault(),t.clear());break;case 37:case 39:if(!jn&&!ot){if(Qe.preventDefault(),t.daysContainer!==void 0&&(It===!1||document.activeElement&&xe(document.activeElement))){const yr=Qe.keyCode===39?1:-1;Qe.ctrlKey?(Qe.stopPropagation(),pe(yr),W(j(1),0)):W(void 0,yr)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:Qe.preventDefault();const xn=Qe.keyCode===40?1:-1;t.daysContainer&&_t.$i!==void 0||_t===t.input||_t===t.altInput?Qe.ctrlKey?(Qe.stopPropagation(),Me(t.currentYear-xn),W(j(1),0)):jn||W(void 0,xn*7):_t===t.currentYearElement?Me(t.currentYear-xn):t.config.enableTime&&(!jn&&t.hourElement&&t.hourElement.focus(),l(Qe),t._debouncedChange());break;case 9:if(jn){const yr=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(vi=>vi),pr=yr.indexOf(_t);if(pr!==-1){const vi=yr[pr+(Qe.shiftKey?-1:1)];Qe.preventDefault(),(vi||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(_t)&&Qe.shiftKey&&(Qe.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&_t===t.amPM)switch(Qe.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),Ut();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),Ut();break}(ot||it(_t))&&wn("onKeyDown",Qe)}function dt(Qe){if(t.selectedDates.length!==1||Qe&&(!Qe.classList.contains("flatpickr-day")||Qe.classList.contains("flatpickr-disabled")))return;const _t=Qe?Qe.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),ot=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),It=Math.min(_t,t.selectedDates[0].getTime()),fn=Math.max(_t,t.selectedDates[0].getTime());let an=!1,jn=0,xn=0;for(let yr=It;yr<fn;yr+=mie.DAY)Be(new Date(yr),!0)||(an=an||yr>It&&yr<fn,yr<ot&&(!jn||yr>jn)?jn=yr:yr>ot&&(!xn||yr<xn)&&(xn=yr));for(let yr=0;yr<t.config.showMonths;yr++){const pr=t.daysContainer.children[yr];for(let vi=0,Gi=pr.children.length;vi<Gi;vi++){const hi=pr.children[vi],Qa=hi.dateObj.getTime(),Qo=jn>0&&Qa<jn||xn>0&&Qa>xn;if(Qo){hi.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(s1=>{hi.classList.remove(s1)});continue}else if(an&&!Qo)continue;["startRange","inRange","endRange","notAllowed"].forEach(s1=>{hi.classList.remove(s1)}),Qe!==void 0&&(Qe.classList.add(_t<=t.selectedDates[0].getTime()?"startRange":"endRange"),ot<_t&&Qa===ot?hi.classList.add("startRange"):ot>_t&&Qa===ot&&hi.classList.add("endRange"),Qa>=jn&&(xn===0||Qa<=xn)&&hie(Qa,ot,_t)&&hi.classList.add("inRange"))}}}function vt(){t.isOpen&&!t.config.static&&!t.config.inline&&Tt()}function Ze(Qe,_t=t._positionElement){if(t.isMobile===!0){if(Qe){Qe.preventDefault();const It=kf(Qe);It&&It.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),wn("onOpen");return}else if(t._input.disabled||t.config.inline)return;const ot=t.isOpen;t.isOpen=!0,ot||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),wn("onOpen"),Tt(_t)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(Qe===void 0||!t.timeContainer.contains(Qe.relatedTarget))&&setTimeout(()=>t.hourElement.select(),50)}function We(Qe){return _t=>{const ot=t.config[`_${Qe}Date`]=t.parseDate(_t,t.config.dateFormat),It=t.config[`_${Qe==="min"?"max":"min"}Date`];ot!==void 0&&(t[Qe==="min"?"minDateHasTime":"maxDateHasTime"]=ot.getHours()>0||ot.getMinutes()>0||ot.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(fn=>Be(fn)),!t.selectedDates.length&&Qe==="min"&&f(ot),Ut()),t.daysContainer&&(at(),ot!==void 0?t.currentYearElement[Qe]=ot.getFullYear().toString():t.currentYearElement.removeAttribute(Qe),t.currentYearElement.disabled=!!It&&ot!==void 0&&It.getFullYear()===ot.getFullYear())}}function nt(){const Qe=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],_t=Object.assign(Object.assign({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ot={};t.config.parseDate=_t.parseDate,t.config.formatDate=_t.formatDate,Object.defineProperty(t.config,"enable",{get:()=>t.config._enable,set:an=>{t.config._enable=Jt(an)}}),Object.defineProperty(t.config,"disable",{get:()=>t.config._disable,set:an=>{t.config._disable=Jt(an)}});const It=_t.mode==="time";if(!_t.dateFormat&&(_t.enableTime||It)){const an=is.defaultConfig.dateFormat||Fh.dateFormat;ot.dateFormat=_t.noCalendar||It?"H:i"+(_t.enableSeconds?":S":""):an+" H:i"+(_t.enableSeconds?":S":"")}if(_t.altInput&&(_t.enableTime||It)&&!_t.altFormat){const an=is.defaultConfig.altFormat||Fh.altFormat;ot.altFormat=_t.noCalendar||It?"h:i"+(_t.enableSeconds?":S K":" K"):an+` h:i${_t.enableSeconds?":S":""} K`}Object.defineProperty(t.config,"minDate",{get:()=>t.config._minDate,set:We("min")}),Object.defineProperty(t.config,"maxDate",{get:()=>t.config._maxDate,set:We("max")});const fn=an=>jn=>{t.config[an==="min"?"_minTime":"_maxTime"]=t.parseDate(jn,"H:i:S")};Object.defineProperty(t.config,"minTime",{get:()=>t.config._minTime,set:fn("min")}),Object.defineProperty(t.config,"maxTime",{get:()=>t.config._maxTime,set:fn("max")}),_t.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ot,_t);for(let an=0;an<Qe.length;an++)t.config[Qe[an]]=t.config[Qe[an]]===!0||t.config[Qe[an]]==="true";$b.filter(an=>t.config[an]!==void 0).forEach(an=>{t.config[an]=wb(t.config[an]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let an=0;an<t.config.plugins.length;an++){const jn=t.config.plugins[an](t)||{};for(const xn in jn)$b.indexOf(xn)>-1?t.config[xn]=wb(jn[xn]).map(a).concat(t.config[xn]):typeof _t[xn]>"u"&&(t.config[xn]=jn[xn])}_t.altInputClass||(t.config.altInputClass=Ht().className+" "+t.config.altInputClass),wn("onParseConfig")}function Ht(){return t.config.wrap?n.querySelector("[data-input]"):n}function on(){typeof t.config.locale!="object"&&typeof is.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error(`flatpickr: invalid locale ${t.config.locale}`)),t.l10n=Object.assign(Object.assign({},is.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?is.l10ns[t.config.locale]:void 0),l$.K=`(${t.l10n.amPM[0]}|${t.l10n.amPM[1]}|${t.l10n.amPM[0].toLowerCase()}|${t.l10n.amPM[1].toLowerCase()})`,Object.assign(Object.assign({},e),JSON.parse(JSON.stringify(n.dataset||{}))).time_24hr===void 0&&is.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=bq(t),t.parseDate=s$({config:t.config,l10n:t.l10n})}function Tt(Qe){if(typeof t.config.position=="function")return void t.config.position(t,Qe);if(t.calendarContainer===void 0)return;wn("onPreCalendarPosition");const _t=Qe||t._positionElement,ot=Array.prototype.reduce.call(t.calendarContainer.children,(n1,Is)=>n1+Is.offsetHeight,0),It=t.calendarContainer.offsetWidth,fn=t.config.position.split(" "),an=fn[0],jn=fn.length>1?fn[1]:null,xn=_t.getBoundingClientRect(),yr=window.innerHeight-xn.bottom,pr=an==="above"||an!=="below"&&yr<ot&&xn.top>ot,vi=window.pageYOffset+xn.top+(pr?-ot-2:_t.offsetHeight+2);if(n2(t.calendarContainer,"arrowTop",!pr),n2(t.calendarContainer,"arrowBottom",pr),t.config.inline)return;let Gi=window.pageXOffset+xn.left,hi=!1,ls=!1;jn==="center"?(Gi-=(It-xn.width)/2,hi=!0):jn==="right"&&(Gi-=It-xn.width,ls=!0),n2(t.calendarContainer,"arrowLeft",!hi&&!ls),n2(t.calendarContainer,"arrowCenter",hi),n2(t.calendarContainer,"arrowRight",ls);const Qa=window.document.body.offsetWidth-(window.pageXOffset+xn.right),Qo=Gi+It>window.document.body.offsetWidth,s1=Qa+It>window.document.body.offsetWidth;if(n2(t.calendarContainer,"rightMost",Qo),!t.config.static)if(t.calendarContainer.style.top=`${vi}px`,!Qo)t.calendarContainer.style.left=`${Gi}px`,t.calendarContainer.style.right="auto";else if(!s1)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=`${Qa}px`;else{const n1=he();if(n1===void 0)return;const Is=window.document.body.offsetWidth,xa=Math.max(0,Is/2-It/2),Ha=".flatpickr-calendar.centerMost:before",x0=".flatpickr-calendar.centerMost:after",Y1=n1.cssRules.length,$a=`{left:${xn.left}px;right:auto;}`;n2(t.calendarContainer,"rightMost",!1),n2(t.calendarContainer,"centerMost",!0),n1.insertRule(`${Ha},${x0}${$a}`,Y1),t.calendarContainer.style.left=`${xa}px`,t.calendarContainer.style.right="auto"}}function he(){let Qe=null;for(let _t=0;_t<document.styleSheets.length;_t++){const ot=document.styleSheets[_t];try{ot.cssRules}catch{continue}Qe=ot;break}return Qe!=null?Qe:Xe()}function Xe(){const Qe=document.createElement("style");return document.head.appendChild(Qe),Qe.sheet}function at(){t.config.noCalendar||t.isMobile||(le(),zn(),Q())}function Se(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function Re(Qe){Qe.preventDefault(),Qe.stopPropagation();const _t=jn=>jn.classList&&jn.classList.contains("flatpickr-day")&&!jn.classList.contains("flatpickr-disabled")&&!jn.classList.contains("notAllowed"),ot=_q(kf(Qe),_t);if(ot===void 0)return;const It=ot,fn=t.latestSelectedDateObj=new Date(It.dateObj.getTime()),an=(fn.getMonth()<t.currentMonth||fn.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=It,t.config.mode==="single")t.selectedDates=[fn];else if(t.config.mode==="multiple"){const jn=br(fn);jn?t.selectedDates.splice(parseInt(jn),1):t.selectedDates.push(fn)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=fn,t.selectedDates.push(fn),zf(fn,t.selectedDates[0],!0)!==0&&t.selectedDates.sort((jn,xn)=>jn.getTime()-xn.getTime()));if(c(),an){const jn=t.currentYear!==fn.getFullYear();t.currentYear=fn.getFullYear(),t.currentMonth=fn.getMonth(),jn&&(wn("onYearChange"),le()),wn("onMonthChange")}if(zn(),Q(),Ut(),!an&&t.config.mode!=="range"&&t.config.showMonths===1?V(It):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){const jn=t.config.mode==="single"&&!t.config.enableTime,xn=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(jn||xn)&&Se()}y()}const Oe={locale:[on,de],showMonths:[K,o,se],minDate:[A],maxDate:[A],clickOpens:[()=>{t.config.clickOpens===!0?(_(t._input,"focus",t.open),_(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function Ue(Qe,_t){if(Qe!==null&&typeof Qe=="object"){Object.assign(t.config,Qe);for(const ot in Qe)Oe[ot]!==void 0&&Oe[ot].forEach(It=>It())}else t.config[Qe]=_t,Oe[Qe]!==void 0?Oe[Qe].forEach(ot=>ot()):$b.indexOf(Qe)>-1&&(t.config[Qe]=wb(_t));t.redraw(),Ut(!0)}function kt(Qe,_t){let ot=[];if(Qe instanceof Array)ot=Qe.map(It=>t.parseDate(It,_t));else if(Qe instanceof Date||typeof Qe=="number")ot=[t.parseDate(Qe,_t)];else if(typeof Qe=="string")switch(t.config.mode){case"single":case"time":ot=[t.parseDate(Qe,_t)];break;case"multiple":ot=Qe.split(t.config.conjunction).map(It=>t.parseDate(It,_t));break;case"range":ot=Qe.split(t.l10n.rangeSeparator).map(It=>t.parseDate(It,_t));break}else t.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(Qe)}`));t.selectedDates=t.config.allowInvalidPreload?ot:ot.filter(It=>It instanceof Date&&Be(It,!1)),t.config.mode==="range"&&t.selectedDates.sort((It,fn)=>It.getTime()-fn.getTime())}function Mt(Qe,_t=!1,ot=t.config.dateFormat){if(Qe!==0&&!Qe||Qe instanceof Array&&Qe.length===0)return t.clear(_t);kt(Qe,ot),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),A(void 0,_t),f(),t.selectedDates.length===0&&t.clear(!1),Ut(_t),_t&&wn("onChange")}function Jt(Qe){return Qe.slice().map(_t=>typeof _t=="string"||typeof _t=="number"||_t instanceof Date?t.parseDate(_t,void 0,!0):_t&&typeof _t=="object"&&_t.from&&_t.to?{from:t.parseDate(_t.from,void 0),to:t.parseDate(_t.to,void 0)}:_t).filter(_t=>_t)}function dn(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;const Qe=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);Qe&&kt(Qe,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function cn(){if(t.input=Ht(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Ba(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),t._positionElement=t.config.positionElement||t._input}function Dn(){const Qe=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Ba("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=Qe,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=Qe==="datetime-local"?"Y-m-d\\TH:i:S":Qe==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}_(t.mobileInput,"change",_t=>{t.setDate(kf(_t).value,!1,t.mobileFormatStr),wn("onChange"),wn("onClose")})}function Pn(Qe){if(t.isOpen===!0)return t.close();t.open(Qe)}function wn(Qe,_t){if(t.config===void 0)return;const ot=t.config[Qe];if(ot!==void 0&&ot.length>0)for(let It=0;ot[It]&&It<ot.length;It++)ot[It](t.selectedDates,t.input.value,t,_t);Qe==="onChange"&&(t.input.dispatchEvent(St("change")),t.input.dispatchEvent(St("input")))}function St(Qe){const _t=document.createEvent("Event");return _t.initEvent(Qe,!0,!0),_t}function br(Qe){for(let _t=0;_t<t.selectedDates.length;_t++)if(zf(t.selectedDates[_t],Qe)===0)return""+_t;return!1}function Un(Qe){return t.config.mode!=="range"||t.selectedDates.length<2?!1:zf(Qe,t.selectedDates[0])>=0&&zf(Qe,t.selectedDates[1])<=0}function zn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach((Qe,_t)=>{const ot=new Date(t.currentYear,t.currentMonth,1);ot.setMonth(t.currentMonth+_t),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[_t].textContent=sv(ot.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ot.getMonth().toString(),Qe.value=ot.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function On(Qe){return t.selectedDates.map(_t=>t.formatDate(_t,Qe)).filter((_t,ot,It)=>t.config.mode!=="range"||t.config.enableTime||It.indexOf(_t)===ot).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Ut(Qe=!0){t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=On(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=On(t.config.altFormat)),Qe!==!1&&wn("onValueUpdate")}function Kn(Qe){const _t=kf(Qe),ot=t.prevMonthNav.contains(_t),It=t.nextMonthNav.contains(_t);ot||It?pe(ot?-1:1):t.yearElements.indexOf(_t)>=0?_t.select():_t.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):_t.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Hr(Qe){Qe.preventDefault();const _t=Qe.type==="keydown",ot=kf(Qe),It=ot;t.amPM!==void 0&&ot===t.amPM&&(t.amPM.textContent=t.l10n.amPM[qf(t.amPM.textContent===t.l10n.amPM[0])]);const fn=parseFloat(It.getAttribute("min")),an=parseFloat(It.getAttribute("max")),jn=parseFloat(It.getAttribute("step")),xn=parseInt(It.value,10),yr=Qe.delta||(_t?Qe.which===38?1:-1:0);let pr=xn+jn*yr;if(typeof It.value<"u"&&It.value.length===2){const vi=It===t.hourElement,Gi=It===t.minuteElement;pr<fn?(pr=an+pr+qf(!vi)+(qf(vi)&&qf(!t.amPM)),Gi&&T(void 0,-1,t.hourElement)):pr>an&&(pr=It===t.hourElement?pr-an-qf(!t.amPM):fn,Gi&&T(void 0,1,t.hourElement)),t.amPM&&vi&&(jn===1?pr+xn===23:Math.abs(pr-xn)>jn)&&(t.amPM.textContent=t.l10n.amPM[qf(t.amPM.textContent===t.l10n.amPM[0])]),It.value=x2(pr)}}return i(),t}function jh(n,e){const t=Array.prototype.slice.call(n).filter(i=>i instanceof HTMLElement),r=[];for(let i=0;i<t.length;i++){const a=t[i];try{if(a.getAttribute("data-fp-omit")!==null)continue;a._flatpickr!==void 0&&(a._flatpickr.destroy(),a._flatpickr=void 0),a._flatpickr=vie(a,e||{}),r.push(a._flatpickr)}catch(o){console.error(o)}}return r.length===1?r[0]:r}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return jh(this,n)},HTMLElement.prototype.flatpickr=function(n){return jh([this],n)});var is=function(n,e){return typeof n=="string"?jh(window.document.querySelectorAll(n),e):n instanceof Node?jh([n],e):jh(n,e)};is.defaultConfig={};is.l10ns={en:Object.assign({},Yg),default:Object.assign({},Yg)};is.localize=n=>{is.l10ns.default=Object.assign(Object.assign({},is.l10ns.default),n)};is.setDefaults=n=>{is.defaultConfig=Object.assign(Object.assign({},is.defaultConfig),n)};is.parseDate=s$({});is.formatDate=bq({});is.compareDates=zf;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return jh(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window<"u"&&(window.flatpickr=is);function _ie(n){let e,t=[n[1]],r={};for(let i=0;i<t.length;i+=1)r=au(r,t[i]);return{c(){e=X("input"),MA(e,r)},m(i,a){C(i,e,a),e.autofocus&&e.focus(),n[11](e)},p(i,a){MA(e,r=Rd(t,[a&2&&i[1]]))},d(i){i&&M(e),n[11](null)}}}function bie(n){let e;const t=n[10].default,r=Xn(t,n,n[9],null),i=r||_ie(n);return{c(){i&&i.c()},m(a,o){i&&i.m(a,o),e=!0},p(a,[o]){r?r.p&&(!e||o&512)&&Zn(r,t,a,a[9],e?Jn(t,a[9],o,null):Qn(a[9]),null):i&&i.p&&(!e||o&3)&&i.p(a,e?o:-1)},i(a){e||(b(i,a),e=!0)},o(a){$(i,a),e=!1},d(a){i&&i.d(a)}}}function yie(n){return n.charAt(2).toLowerCase()+n.substring(3)}function $ie(n,e,t){const r=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let i=Kh(e,r),{$$slots:a={},$$scope:o}=e;const l=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:s="",formattedValue:u="",element:c=null,dateFormat:f=null}=e,{options:h={}}=e,m=!1,{input:_=void 0,flatpickr:y=void 0}=e;ar(()=>{const I=c||_,P=A(h);return P.onReady.push(()=>{t(8,m=!0)}),t(3,y=is(I,Object.assign(P,c?{wrap:!0}:{}))),()=>{y.destroy()}});const w=Nn();function A(I={}){I=Object.assign({},I);for(const P of l){const V=(j,U,W)=>{w(yie(P),[j,U,W])};P in I?(Array.isArray(I[P])||(I[P]=[I[P]]),I[P].push(V)):I[P]=[V]}return I.onChange&&!I.onChange.includes(S)&&I.onChange.push(S),I}function S(I,P){t(2,s=Array.isArray(I)&&I.length===1?I[0]:I),t(4,u=P)}function T(I){De[I?"unshift":"push"](()=>{_=I,t(0,_)})}return n.$$set=I=>{e=au(au({},e),Ug(I)),t(1,i=Kh(e,r)),"value"in I&&t(2,s=I.value),"formattedValue"in I&&t(4,u=I.formattedValue),"element"in I&&t(5,c=I.element),"dateFormat"in I&&t(6,f=I.dateFormat),"options"in I&&t(7,h=I.options),"input"in I&&t(0,_=I.input),"flatpickr"in I&&t(3,y=I.flatpickr),"$$scope"in I&&t(9,o=I.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&y&&m&&y.setDate(s,!1,f),n.$$.dirty&392&&y&&m)for(const[I,P]of Object.entries(A(h)))y.set(I,P)},[_,i,s,y,u,c,f,h,m,o,a,T]}class wie extends Ve{constructor(e){super(),Pe(this,e,$ie,bie,Ie,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function UC(n){let e,t;return{c(){e=ut("svg"),t=ut("use"),Gr(t,"xlink:href","#spectrum-icon-18-Alert"),D(e,"class","spectrum-Icon spectrum-Icon--sizeM spectrum-Textfield-validationIcon"),D(e,"focusable","false"),D(e,"aria-hidden","true")},m(r,i){C(r,e,i),x(e,t)},d(r){r&&M(e)}}}function kie(n){let e,t,r,i,a,o,l,s,u=!!n[2]&&UC();return{c(){e=X("div"),t=X("div"),u&&u.c(),r=q(),i=X("input"),a=q(),o=X("button"),o.innerHTML='<svg class="spectrum-Icon spectrum-Icon--sizeM" focusable="false" aria-hidden="true" aria-label="Calendar"><use xlink:href="#spectrum-icon-18-Calendar"></use></svg>',D(i,"data-input",""),D(i,"type","text"),D(i,"class","spectrum-Textfield-input spectrum-InputGroup-input svelte-s5xzv8"),D(i,"placeholder",n[4]),D(i,"id",n[0]),i.value=n[3],Te(i,"is-disabled",n[1]),D(t,"class","spectrum-Textfield spectrum-InputGroup-textfield svelte-s5xzv8"),Te(t,"is-disabled",n[1]),Te(t,"is-invalid",!!n[2]),D(o,"type","button"),D(o,"class","spectrum-Picker spectrum-Picker--sizeM spectrum-InputGroup-button svelte-s5xzv8"),D(o,"tabindex","-1"),Te(o,"is-disabled",n[1]),Te(o,"is-invalid",!!n[2]),D(e,"id",n[10]),D(e,"class","flatpickr spectrum-InputGroup spectrum-Datepicker svelte-s5xzv8"),D(e,"aria-readonly","false"),D(e,"aria-required","false"),D(e,"aria-haspopup","true"),Te(e,"is-disabled",n[1]),Te(e,"is-invalid",!!n[2]),Te(e,"is-focused",n[6])},m(c,f){C(c,e,f),x(e,t),u&&u.m(t,null),x(t,r),x(t,i),x(e,a),x(e,o),l||(s=[At(t,"click",function(){var h,m;kn((h=n[7])==null?void 0:h.open)&&((m=n[7])==null||m.open.apply(this,arguments))}),At(o,"click",function(){var h,m;kn((h=n[7])==null?void 0:h.open)&&((m=n[7])==null||m.open.apply(this,arguments))})],l=!0)},p(c,f){n=c,n[2]?u||(u=UC(),u.c(),u.m(t,r)):u&&(u.d(1),u=null),f&16&&D(i,"placeholder",n[4]),f&1&&D(i,"id",n[0]),f&8&&i.value!==n[3]&&(i.value=n[3]),f&2&&Te(i,"is-disabled",n[1]),f&2&&Te(t,"is-disabled",n[1]),f&4&&Te(t,"is-invalid",!!n[2]),f&2&&Te(o,"is-disabled",n[1]),f&4&&Te(o,"is-invalid",!!n[2]),f&2&&Te(e,"is-disabled",n[1]),f&4&&Te(e,"is-invalid",!!n[2]),f&64&&Te(e,"is-focused",n[6])},d(c){c&&M(e),u&&u.d(),l=!1,Vi(s)}}}function qC(n){let e,t,r;function i(o){n[20](o)}let a={value:n[5]?n[3]:n[14](n[3]),options:n[8],element:`#${n[10]}`,$$slots:{default:[kie]},$$scope:{ctx:n}};return n[7]!==void 0&&(a.flatpickr=n[7]),e=new wie({props:a}),De.push(()=>tt(e,"flatpickr",i)),e.$on("open",n[12]),e.$on("close",n[13]),e.$on("change",n[11]),{c(){O(e.$$.fragment)},m(o,l){B(e,o,l),r=!0},p(o,l){const s={};l&40&&(s.value=o[5]?o[3]:o[14](o[3])),l&256&&(s.options=o[8]),l&16777439&&(s.$$scope={dirty:l,ctx:o}),!t&&l&128&&(t=!0,s.flatpickr=o[7],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function WC(n){let e,t,r;return{c(){e=X("div"),D(e,"class","overlay svelte-s5xzv8")},m(i,a){C(i,e,a),t||(r=At(e,"mousedown",Mg(function(){var o,l;kn((o=n[7])==null?void 0:o.close)&&((l=n[7])==null||l.close.apply(this,arguments))})),t=!0)},p(i,a){n=i},d(i){i&&M(e),t=!1,r()}}}function zie(n){let e=n[9],t,r,i,a=qC(n),o=n[6]&&WC(n);return{c(){a.c(),t=q(),o&&o.c(),r=yt()},m(l,s){a.m(l,s),C(l,t,s),o&&o.m(l,s),C(l,r,s),i=!0},p(l,[s]){s&512&&Ie(e,e=l[9])?(we(),$(a,1,1,ht),ke(),a=qC(l),a.c(),b(a,1),a.m(t.parentNode,t)):a.p(l,s),l[6]?o?o.p(l,s):(o=WC(l),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},i(l){i||(b(a),i=!0)},o(l){$(a),i=!1},d(l){a.d(l),l&&M(t),o&&o.d(l),l&&M(r)}}}function Aie(n,e,t){let r,{id:i=null}=e,{disabled:a=!1}=e,{error:o=null}=e,{enableTime:l=!0}=e,{value:s=null}=e,{placeholder:u=null}=e,{appendTo:c=void 0}=e,{timeOnly:f=!1}=e,{ignoreTimezones:h=!1}=e,{time24hr:m=!1}=e,{range:_=!1}=e;const y=Nn(),w=`${C4()}-wrapper`;let A=!1,S,T;const I=Q=>{let le=new Date(`0-${Q}`);return le instanceof Date&&!isNaN(le.getTime())?le:null},P=Q=>{const[le]=Q.detail,ie=l&&!f&&h;let K=le[0];if(K&&(K=K.toISOString()),f)!s&&K&&(K=new Date(le[0].getTime()+60*60*1e3).toISOString()),K=`2000-01-01T${K.split("T")[1]}`;else if(l){if(ie){const G=le[0].getTimezoneOffset()*6e4;K=new Date(le[0].getTime()-G).toISOString().slice(0,-1)}}else{const G=le[0].getFullYear(),re=`${le[0].getMonth()+1}`.padStart(2,"0"),se=`${le[0].getDate()}`.padStart(2,"0");K=`${G}-${re}-${se}T00:00:00.000`}_?y("change",Q.detail):y("change",K)},V=Q=>{["Backspace","Clear","Delete"].includes(Q.key)&&(y("change",null),S.close())},j=()=>{t(6,A=!0),document.addEventListener("keyup",V)},U=()=>{t(6,A=!1),document.removeEventListener("keyup",V),document.querySelectorAll(`#${w} input`).forEach(le=>le.blur())},W=Q=>{if(!Q)return null;let le,ie,K=I(Q);return f&&K?le=K:Q instanceof Date?le=Q:isNaN(Q)?le=new Date(Q):le=new Date(parseInt(Q)),ie=le.getTime(),isNaN(ie)?null:new Date(Math.floor(ie/1e3)*1e3)};function te(Q){S=Q,t(7,S)}return n.$$set=Q=>{"id"in Q&&t(0,i=Q.id),"disabled"in Q&&t(1,a=Q.disabled),"error"in Q&&t(2,o=Q.error),"enableTime"in Q&&t(15,l=Q.enableTime),"value"in Q&&t(3,s=Q.value),"placeholder"in Q&&t(4,u=Q.placeholder),"appendTo"in Q&&t(16,c=Q.appendTo),"timeOnly"in Q&&t(17,f=Q.timeOnly),"ignoreTimezones"in Q&&t(18,h=Q.ignoreTimezones),"time24hr"in Q&&t(19,m=Q.time24hr),"range"in Q&&t(5,_=Q.range)},n.$$.update=()=>{n.$$.dirty&753704&&t(8,T={element:`#${w}`,enableTime:f||l||!1,noCalendar:f||!1,altInput:!0,time_24hr:m||!1,altFormat:f?"H:i":l?"F j Y, H:i":"F j, Y",wrap:!0,mode:_?"range":"single",appendTo:c,disableMobile:"true",onReady:()=>{let Q=I(s);f&&Q&&y("change",Q.toISOString())}}),n.$$.dirty&688128&&t(9,r={timeOnly:f,enableTime:l,time24hr:m})},[i,a,o,s,u,_,A,S,T,r,w,P,j,U,W,l,c,f,h,m,te]}class Mie extends Ve{constructor(e){super(),Pe(this,e,Aie,zie,Ie,{id:0,disabled:1,error:2,enableTime:15,value:3,placeholder:4,appendTo:16,timeOnly:17,ignoreTimezones:18,time24hr:19,range:5})}}function Cie(n){let e,t;return e=new Mie({props:{error:n[4],disabled:n[3],value:n[0],placeholder:n[8],enableTime:n[5],timeOnly:n[6],time24hr:n[7],appendTo:n[9],ignoreTimezones:n[10],range:n[11]}}),e.$on("change",n[12]),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&16&&(a.error=r[4]),i&8&&(a.disabled=r[3]),i&1&&(a.value=r[0]),i&256&&(a.placeholder=r[8]),i&32&&(a.enableTime=r[5]),i&64&&(a.timeOnly=r[6]),i&128&&(a.time24hr=r[7]),i&512&&(a.appendTo=r[9]),i&1024&&(a.ignoreTimezones=r[10]),i&2048&&(a.range=r[11]),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 Sie(n){let e,t;return e=new Sc({props:{label:n[1],labelPosition:n[2],error:n[4],$$slots:{default:[Cie]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.label=r[1]),i&4&&(a.labelPosition=r[2]),i&16&&(a.error=r[4]),i&20473&&(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 Lie(n,e,t){let{value:r=null}=e,{label:i=null}=e,{labelPosition:a="above"}=e,{disabled:o=!1}=e,{error:l=null}=e,{enableTime:s=!0}=e,{timeOnly:u=!1}=e,{time24hr:c=!1}=e,{placeholder:f=null}=e,{appendTo:h=void 0}=e,{ignoreTimezones:m=!1}=e,{range:_=!1}=e;const y=Nn(),w=A=>{_?t(0,r=A==null?void 0:A.detail[1]):t(0,r=A.detail),y("change",A.detail)};return n.$$set=A=>{"value"in A&&t(0,r=A.value),"label"in A&&t(1,i=A.label),"labelPosition"in A&&t(2,a=A.labelPosition),"disabled"in A&&t(3,o=A.disabled),"error"in A&&t(4,l=A.error),"enableTime"in A&&t(5,s=A.enableTime),"timeOnly"in A&&t(6,u=A.timeOnly),"time24hr"in A&&t(7,c=A.time24hr),"placeholder"in A&&t(8,f=A.placeholder),"appendTo"in A&&t(9,h=A.appendTo),"ignoreTimezones"in A&&t(10,m=A.ignoreTimezones),"range"in A&&t(11,_=A.range)},[r,i,a,o,l,s,u,c,f,h,m,_,w]}class f5 extends Ve{constructor(e){super(),Pe(this,e,Lie,Sie,Ie,{value:0,label:1,labelPosition:2,disabled:3,error:4,enableTime:5,timeOnly:6,time24hr:7,placeholder:8,appendTo:9,ignoreTimezones:10,range:11})}}function Eie(n){var r;let e,t;return e=new pq({props:{id:n[1],error:n[3],disabled:n[2],readonly:n[7],fieldText:n[13],options:n[4],isPlaceholder:!((r=n[0])!=null&&r.length),autocomplete:n[8],isOptionSelected:n[12],getOptionLabel:n[5],getOptionValue:n[6],onSelectOption:n[11],sort:n[9],autoWidth:n[10]}}),{c(){O(e.$$.fragment)},m(i,a){B(e,i,a),t=!0},p(i,[a]){var l;const o={};a&2&&(o.id=i[1]),a&8&&(o.error=i[3]),a&4&&(o.disabled=i[2]),a&128&&(o.readonly=i[7]),a&8192&&(o.fieldText=i[13]),a&16&&(o.options=i[4]),a&1&&(o.isPlaceholder=!((l=i[0])!=null&&l.length)),a&256&&(o.autocomplete=i[8]),a&4096&&(o.isOptionSelected=i[12]),a&32&&(o.getOptionLabel=i[5]),a&64&&(o.getOptionValue=i[6]),a&2048&&(o.onSelectOption=i[11]),a&512&&(o.sort=i[9]),a&1024&&(o.autoWidth=i[10]),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 Tie(n,e,t){let r,i,a,o,l,{value:s=[]}=e,{id:u=null}=e,{placeholder:c=null}=e,{disabled:f=!1}=e,{error:h=null}=e,{options:m=[]}=e,{getOptionLabel:_=W=>W}=e,{getOptionValue:y=W=>W}=e,{readonly:w=!1}=e,{autocomplete:A=!1}=e,{sort:S=!1}=e,{autoWidth:T=!1}=e;const I=Nn(),P=(W,te,Q)=>{if(Array.isArray(W)&&W.length>0){if(!te)return"";const le=W.map(ie=>te[ie]||ie).join(", ");return`(${W.length}) ${le}`}else return Q||"Choose some options"},V=W=>{let te={};return Array.isArray(W)&&W.length>0&&W.forEach(Q=>{Q&&(te[Q]=!0)}),te},j=W=>{let te=null;return W!=null&&W.length&&(te={},W.forEach((Q,le)=>{const ie=y(Q,le);ie!=null&&(te[ie]=_(Q,le)||"")})),te},U=(W,te)=>Q=>{if(W[Q]){const le=te.filter(ie=>ie!==Q);I("change",le)}else I("change",[...te,Q])};return n.$$set=W=>{"value"in W&&t(0,s=W.value),"id"in W&&t(1,u=W.id),"placeholder"in W&&t(14,c=W.placeholder),"disabled"in W&&t(2,f=W.disabled),"error"in W&&t(3,h=W.error),"options"in W&&t(4,m=W.options),"getOptionLabel"in W&&t(5,_=W.getOptionLabel),"getOptionValue"in W&&t(6,y=W.getOptionValue),"readonly"in W&&t(7,w=W.readonly),"autocomplete"in W&&t(8,A=W.autocomplete),"sort"in W&&t(9,S=W.sort),"autoWidth"in W&&t(10,T=W.autoWidth)},n.$$.update=()=>{n.$$.dirty&1&&t(15,r=V(s)),n.$$.dirty&16&&t(16,i=j(m)),n.$$.dirty&81921&&t(13,a=P(s,i,c)),n.$$.dirty&32768&&t(12,o=W=>r[W]===!0),n.$$.dirty&32769&&t(11,l=U(r,s))},[s,u,f,h,m,_,y,w,A,S,T,l,o,a,c,r,i]}class Die extends Ve{constructor(e){super(),Pe(this,e,Tie,Eie,Ie,{value:0,id:1,placeholder:14,disabled:2,error:3,options:4,getOptionLabel:5,getOptionValue:6,readonly:7,autocomplete:8,sort:9,autoWidth:10})}}function Bie(n){let e,t;return e=new Die({props:{error:n[5],disabled:n[2],readonly:n[3],value:n[0],options:n[7],placeholder:n[6],sort:n[10],getOptionLabel:n[8],getOptionValue:n[9],autoWidth:n[11]}}),e.$on("change",n[12]),e.$on("click",n[13]),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&32&&(a.error=r[5]),i&4&&(a.disabled=r[2]),i&8&&(a.readonly=r[3]),i&1&&(a.value=r[0]),i&128&&(a.options=r[7]),i&64&&(a.placeholder=r[6]),i&1024&&(a.sort=r[10]),i&256&&(a.getOptionLabel=r[8]),i&512&&(a.getOptionValue=r[9]),i&2048&&(a.autoWidth=r[11]),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 Hie(n){let e,t;return e=new Sc({props:{label:n[1],labelPosition:n[4],error:n[5],$$slots:{default:[Bie]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.label=r[1]),i&16&&(a.labelPosition=r[4]),i&32&&(a.error=r[5]),i&36845&&(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 Oie(n,e,t){let{value:r=[]}=e,{label:i=null}=e,{disabled:a=!1}=e,{readonly:o=!1}=e,{labelPosition:l="above"}=e,{error:s=null}=e,{placeholder:u=null}=e,{options:c=[]}=e,{getOptionLabel:f=S=>S}=e,{getOptionValue:h=S=>S}=e,{sort:m=!1}=e,{autoWidth:_=!1}=e;const y=Nn(),w=S=>{t(0,r=S.detail),y("change",S.detail)};function A(S){Hn.call(this,n,S)}return n.$$set=S=>{"value"in S&&t(0,r=S.value),"label"in S&&t(1,i=S.label),"disabled"in S&&t(2,a=S.disabled),"readonly"in S&&t(3,o=S.readonly),"labelPosition"in S&&t(4,l=S.labelPosition),"error"in S&&t(5,s=S.error),"placeholder"in S&&t(6,u=S.placeholder),"options"in S&&t(7,c=S.options),"getOptionLabel"in S&&t(8,f=S.getOptionLabel),"getOptionValue"in S&&t(9,h=S.getOptionValue),"sort"in S&&t(10,m=S.sort),"autoWidth"in S&&t(11,_=S.autoWidth)},[r,i,a,o,l,s,u,c,f,h,m,_,w,A]}class _5 extends Ve{constructor(e){super(),Pe(this,e,Oie,Hie,Ie,{value:0,label:1,disabled:2,readonly:3,labelPosition:4,error:5,placeholder:6,options:7,getOptionLabel:8,getOptionValue:9,sort:10,autoWidth:11})}}function Iie(n){let e,t=(typeof n[0]=="object"?JSON.stringify(n[0]):n[0])+"",r;return{c(){e=X("div"),r=oe(t),D(e,"class","svelte-186zidf")},m(i,a){C(i,e,a),x(e,r)},p(i,[a]){a&1&&t!==(t=(typeof i[0]=="object"?JSON.stringify(i[0]):i[0])+"")&>(r,t)},i:ht,o:ht,d(i){i&&M(e)}}}function Pie(n,e,t){let{value:r}=e;return n.$$set=i=>{"value"in i&&t(0,r=i.value)},[r]}class qm extends Ve{constructor(e){super(),Pe(this,e,Pie,Iie,Ie,{value:0})}}function Vie(n){let e,t,r,i,a;return{c(){e=X("label"),t=X("input"),i=q(),a=X("span"),a.innerHTML=`<svg class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Checkbox-checkmark" focusable="false" aria-hidden="true"><use xlink:href="#spectrum-css-icon-Checkmark100"></use></svg>
|
|
33
33
|
<svg class="spectrum-Icon spectrum-UIIcon-Dash100 spectrum-Checkbox-partialCheckmark" focusable="false" aria-hidden="true"><use xlink:href="#spectrum-css-icon-Dash100"></use></svg>`,D(t,"type","checkbox"),D(t,"class","spectrum-Checkbox-input"),D(t,"id","checkbox-1"),t.disabled=!0,t.checked=r=!!n[0],D(a,"class","spectrum-Checkbox-box svelte-ww1lnr"),D(e,"class","spectrum-Checkbox spectrum-Checkbox--sizeM spectrum-Checkbox--emphasized svelte-ww1lnr")},m(o,l){C(o,e,l),x(e,t),x(e,i),x(e,a)},p(o,[l]){l&1&&r!==(r=!!o[0])&&(t.checked=r)},i:ht,o:ht,d(o){o&&M(e)}}}function Rie(n,e,t){let{value:r}=e;return n.$$set=i=>{"value"in i&&t(0,r=i.value)},[r]}class Nie extends Ve{constructor(e){super(),Pe(this,e,Rie,Vie,Ie,{value:0})}}var b0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fie(n){var e=n.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var yq={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(b0,function(){var t="millisecond",r="second",i="minute",a="hour",o="day",l="week",s="month",u="quarter",c="year",f="date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},y=function(W,te,Q){var le=String(W);return!le||le.length>=te?W:""+Array(te+1-le.length).join(Q)+W},w={s:y,z:function(W){var te=-W.utcOffset(),Q=Math.abs(te),le=Math.floor(Q/60),ie=Q%60;return(te<=0?"+":"-")+y(le,2,"0")+":"+y(ie,2,"0")},m:function W(te,Q){if(te.date()<Q.date())return-W(Q,te);var le=12*(Q.year()-te.year())+(Q.month()-te.month()),ie=te.clone().add(le,s),K=Q-ie<0,G=te.clone().add(le+(K?-1:1),s);return+(-(le+(Q-ie)/(K?ie-G:G-ie))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:s,y:c,w:l,d:o,D:f,h:a,m:i,s:r,ms:t,Q:u}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},A="en",S={};S[A]=_;var T=function(W){return W instanceof j},I=function(W,te,Q){var le;if(!W)return A;if(typeof W=="string")S[W]&&(le=W),te&&(S[W]=te,le=W);else{var ie=W.name;S[ie]=W,le=ie}return!Q&&le&&(A=le),le||!Q&&A},P=function(W,te){if(T(W))return W.clone();var Q=typeof te=="object"?te:{};return Q.date=W,Q.args=arguments,new j(Q)},V=w;V.l=I,V.i=T,V.w=function(W,te){return P(W,{locale:te.$L,utc:te.$u,x:te.$x,$offset:te.$offset})};var j=function(){function W(Q){this.$L=I(Q.locale,null,!0),this.parse(Q)}var te=W.prototype;return te.parse=function(Q){this.$d=function(le){var ie=le.date,K=le.utc;if(ie===null)return new Date(NaN);if(V.u(ie))return new Date;if(ie instanceof Date)return new Date(ie);if(typeof ie=="string"&&!/Z$/i.test(ie)){var G=ie.match(h);if(G){var re=G[2]-1||0,se=(G[7]||"0").substring(0,3);return K?new Date(Date.UTC(G[1],re,G[3]||1,G[4]||0,G[5]||0,G[6]||0,se)):new Date(G[1],re,G[3]||1,G[4]||0,G[5]||0,G[6]||0,se)}}return new Date(ie)}(Q),this.$x=Q.x||{},this.init()},te.init=function(){var Q=this.$d;this.$y=Q.getFullYear(),this.$M=Q.getMonth(),this.$D=Q.getDate(),this.$W=Q.getDay(),this.$H=Q.getHours(),this.$m=Q.getMinutes(),this.$s=Q.getSeconds(),this.$ms=Q.getMilliseconds()},te.$utils=function(){return V},te.isValid=function(){return this.$d.toString()!=="Invalid Date"},te.isSame=function(Q,le){var ie=P(Q);return this.startOf(le)<=ie&&ie<=this.endOf(le)},te.isAfter=function(Q,le){return P(Q)<this.startOf(le)},te.isBefore=function(Q,le){return this.endOf(le)<P(Q)},te.$g=function(Q,le,ie){return V.u(Q)?this[le]:this.set(ie,Q)},te.unix=function(){return Math.floor(this.valueOf()/1e3)},te.valueOf=function(){return this.$d.getTime()},te.startOf=function(Q,le){var ie=this,K=!!V.u(le)||le,G=V.p(Q),re=function(it,$e){var Me=V.w(ie.$u?Date.UTC(ie.$y,$e,it):new Date(ie.$y,$e,it),ie);return K?Me:Me.endOf(o)},se=function(it,$e){return V.w(ie.toDate()[it].apply(ie.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice($e)),ie)},de=this.$W,be=this.$M,pe=this.$D,_e="set"+(this.$u?"UTC":"");switch(G){case c:return K?re(1,0):re(31,11);case s:return K?re(1,be):re(0,be+1);case l:var Ae=this.$locale().weekStart||0,me=(de<Ae?de+7:de)-Ae;return re(K?pe-me:pe+(6-me),be);case o:case f:return se(_e+"Hours",0);case a:return se(_e+"Minutes",1);case i:return se(_e+"Seconds",2);case r:return se(_e+"Milliseconds",3);default:return this.clone()}},te.endOf=function(Q){return this.startOf(Q,!1)},te.$set=function(Q,le){var ie,K=V.p(Q),G="set"+(this.$u?"UTC":""),re=(ie={},ie[o]=G+"Date",ie[f]=G+"Date",ie[s]=G+"Month",ie[c]=G+"FullYear",ie[a]=G+"Hours",ie[i]=G+"Minutes",ie[r]=G+"Seconds",ie[t]=G+"Milliseconds",ie)[K],se=K===o?this.$D+(le-this.$W):le;if(K===s||K===c){var de=this.clone().set(f,1);de.$d[re](se),de.init(),this.$d=de.set(f,Math.min(this.$D,de.daysInMonth())).$d}else re&&this.$d[re](se);return this.init(),this},te.set=function(Q,le){return this.clone().$set(Q,le)},te.get=function(Q){return this[V.p(Q)]()},te.add=function(Q,le){var ie,K=this;Q=Number(Q);var G=V.p(le),re=function(be){var pe=P(K);return V.w(pe.date(pe.date()+Math.round(be*Q)),K)};if(G===s)return this.set(s,this.$M+Q);if(G===c)return this.set(c,this.$y+Q);if(G===o)return re(1);if(G===l)return re(7);var se=(ie={},ie[i]=6e4,ie[a]=36e5,ie[r]=1e3,ie)[G]||1,de=this.$d.getTime()+Q*se;return V.w(de,this)},te.subtract=function(Q,le){return this.add(-1*Q,le)},te.format=function(Q){var le=this;if(!this.isValid())return"Invalid Date";var ie=Q||"YYYY-MM-DDTHH:mm:ssZ",K=V.z(this),G=this.$locale(),re=this.$H,se=this.$m,de=this.$M,be=G.weekdays,pe=G.months,_e=function($e,Me,Be,xe){return $e&&($e[Me]||$e(le,ie))||Be[Me].substr(0,xe)},Ae=function($e){return V.s(re%12||12,$e,"0")},me=G.meridiem||function($e,Me,Be){var xe=$e<12?"AM":"PM";return Be?xe.toLowerCase():xe},it={YY:String(this.$y).slice(-2),YYYY:this.$y,M:de+1,MM:V.s(de+1,2,"0"),MMM:_e(G.monthsShort,de,pe,3),MMMM:_e(pe,de),D:this.$D,DD:V.s(this.$D,2,"0"),d:String(this.$W),dd:_e(G.weekdaysMin,this.$W,be,2),ddd:_e(G.weekdaysShort,this.$W,be,3),dddd:be[this.$W],H:String(re),HH:V.s(re,2,"0"),h:Ae(1),hh:Ae(2),a:me(re,se,!0),A:me(re,se,!1),m:String(se),mm:V.s(se,2,"0"),s:String(this.$s),ss:V.s(this.$s,2,"0"),SSS:V.s(this.$ms,3,"0"),Z:K};return ie.replace(m,function($e,Me){return Me||it[$e]||K.replace(":","")})},te.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},te.diff=function(Q,le,ie){var K,G=V.p(le),re=P(Q),se=6e4*(re.utcOffset()-this.utcOffset()),de=this-re,be=V.m(this,re);return be=(K={},K[c]=be/12,K[s]=be,K[u]=be/3,K[l]=(de-se)/6048e5,K[o]=(de-se)/864e5,K[a]=de/36e5,K[i]=de/6e4,K[r]=de/1e3,K)[G]||de,ie?be:V.a(be)},te.daysInMonth=function(){return this.endOf(s).$D},te.$locale=function(){return S[this.$L]},te.locale=function(Q,le){if(!Q)return this.$L;var ie=this.clone(),K=I(Q,le,!0);return K&&(ie.$L=K),ie},te.clone=function(){return V.w(this.$d,this)},te.toDate=function(){return new Date(this.valueOf())},te.toJSON=function(){return this.isValid()?this.toISOString():null},te.toISOString=function(){return this.$d.toISOString()},te.toString=function(){return this.$d.toUTCString()},W}(),U=j.prototype;return P.prototype=U,[["$ms",t],["$s",r],["$m",i],["$H",a],["$W",o],["$M",s],["$y",c],["$D",f]].forEach(function(W){U[W[1]]=function(te){return this.$g(te,W[0],W[1])}}),P.extend=function(W,te){return W.$i||(W(te,j,P),W.$i=!0),P},P.locale=I,P.isDayjs=T,P.unix=function(W){return P(1e3*W)},P.en=S[A],P.Ls=S,P.p={},P})})(yq);const GC=yq.exports;function jie(n){let e,t=GC(n[1]?n[2]:n[0]).format(n[3])+"",r;return{c(){e=X("div"),r=oe(t),D(e,"class","svelte-1abuiv5")},m(i,a){C(i,e,a),x(e,r)},p(i,[a]){a&15&&t!==(t=GC(i[1]?i[2]:i[0]).format(i[3])+"")&>(r,t)},i:ht,o:ht,d(i){i&&M(e)}}}function xie(n,e,t){let r,i,a,o,{value:l}=e,{schema:s}=e;return n.$$set=u=>{"value"in u&&t(0,l=u.value),"schema"in u&&t(4,s=u.schema)},n.$$.update=()=>{n.$$.dirty&1&&t(2,r=new Date(`0-${l}`)),n.$$.dirty&20&&t(1,i=!isNaN(r)||(s==null?void 0:s.timeOnly)),n.$$.dirty&16&&t(5,a=s==null?void 0:s.dateOnly),n.$$.dirty&34&&t(3,o=i?"HH:mm:ss":a?"MMMM D YYYY":"MMMM D YYYY, HH:mm")},[l,i,r,o,s,a]}class Uie extends Ve{constructor(e){super(),Pe(this,e,xie,jie,Ie,{value:0,schema:4})}}function YC(n,e,t){const r=n.slice();return r[7]=e[t],r}function KC(n){let e,t=n[7].primaryDisplay+"",r,i,a;return{c(){e=X("span"),r=oe(t),D(e,"class","spectrum-Label spectrum-Label--grey svelte-1auwst5")},m(o,l){C(o,e,l),x(e,r),i||(a=At(e,"click",n[2]),i=!0)},p(o,l){l&1&&t!==(t=o[7].primaryDisplay+"")&>(r,t)},d(o){o&&M(e),i=!1,a()}}}function XC(n){var r;let e,t=((r=n[7])==null?void 0:r.primaryDisplay)&&KC(n);return{c(){t&&t.c(),e=yt()},m(i,a){t&&t.m(i,a),C(i,e,a)},p(i,a){var o;(o=i[7])!=null&&o.primaryDisplay?t?t.p(i,a):(t=KC(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&M(e)}}}function JC(n){let e,t,r,i;return{c(){e=X("div"),t=oe("+"),r=oe(n[1]),i=oe(" more")},m(a,o){C(a,e,o),x(e,t),x(e,r),x(e,i)},p(a,o){o&2&>(r,a[1])},d(a){a&&M(e)}}}function qie(n){let e,t,r=n[0],i=[];for(let o=0;o<r.length;o+=1)i[o]=XC(YC(n,r,o));let a=n[1]&&JC(n);return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=q(),a&&a.c(),t=yt()},m(o,l){for(let s=0;s<i.length;s+=1)i[s].m(o,l);C(o,e,l),a&&a.m(o,l),C(o,t,l)},p(o,[l]){if(l&5){r=o[0];let s;for(s=0;s<r.length;s+=1){const u=YC(o,r,s);i[s]?i[s].p(u,l):(i[s]=XC(u),i[s].c(),i[s].m(e.parentNode,e))}for(;s<i.length;s+=1)i[s].d(1);i.length=r.length}o[1]?a?a.p(o,l):(a=JC(o),a.c(),a.m(t.parentNode,t)):a&&(a.d(1),a=null)},i:ht,o:ht,d(o){Bn(i,o),o&&M(e),a&&a.d(o),o&&M(t)}}}const Wie=5;function Gie(n,e,t){let r,i,{row:a}=e,{value:o}=e,{schema:l}=e;const s=Nn(),u=c=>{c.stopPropagation(),s("clickrelationship",{tableId:a.tableId,rowId:a._id,fieldName:l==null?void 0:l.name})};return n.$$set=c=>{"row"in c&&t(3,a=c.row),"value"in c&&t(4,o=c.value),"schema"in c&&t(5,l=c.schema)},n.$$.update=()=>{var c,f;n.$$.dirty&16&&t(0,r=(c=o==null?void 0:o.slice(0,Wie))!=null?c:[]),n.$$.dirty&17&&t(1,i=((f=o==null?void 0:o.length)!=null?f:0)-r.length)},[r,i,u,a,o,l]}class Yie extends Ve{constructor(e){super(),Pe(this,e,Gie,qie,Ie,{row:3,value:4,schema:5})}}function ZC(n,e,t){const r=n.slice();return r[5]=e[t],r}function Kie(n){let e,t,r,i;return t=new x3({props:{quiet:!0,target:"_blank",download:n[5].name,href:n[5].url,$$slots:{default:[Jie]},$$scope:{ctx:n}}}),t.$on("click",n1e),{c(){e=X("div"),O(t.$$.fragment),D(e,"class","file svelte-1abirxi"),D(e,"title",r=n[5].name)},m(a,o){C(a,e,o),B(t,e,null),i=!0},p(a,o){const l={};o&1&&(l.download=a[5].name),o&1&&(l.href=a[5].url),o&257&&(l.$$scope={dirty:o,ctx:a}),t.$set(l),(!i||o&1&&r!==(r=a[5].name))&&D(e,"title",r)},i(a){i||(b(t.$$.fragment,a),i=!0)},o(a){$(t.$$.fragment,a),i=!1},d(a){a&&M(e),H(t)}}}function Xie(n){let e,t;return e=new x3({props:{quiet:!0,target:"_blank",download:n[5].name,href:n[5].url,$$slots:{default:[Zie]},$$scope:{ctx:n}}}),e.$on("click",t1e),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&1&&(a.download=r[5].name),i&1&&(a.href=r[5].url),i&257&&(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 Jie(n){let e=n[5].extension+"",t;return{c(){t=oe(e)},m(r,i){C(r,t,i)},p(r,i){i&1&&e!==(e=r[5].extension+"")&>(t,e)},d(r){r&&M(t)}}}function Zie(n){let e,t,r,i,a;return{c(){e=X("div"),t=X("img"),g1(t.src,r=n[5].url)||D(t,"src",r),D(t,"alt",i=n[5].extension),D(t,"class","svelte-1abirxi"),D(e,"class","center svelte-1abirxi"),D(e,"title",a=n[5].name)},m(o,l){C(o,e,l),x(e,t)},p(o,l){l&1&&!g1(t.src,r=o[5].url)&&D(t,"src",r),l&1&&i!==(i=o[5].extension)&&D(t,"alt",i),l&1&&a!==(a=o[5].name)&&D(e,"title",a)},d(o){o&&M(e)}}}function QC(n){let e,t,r,i,a;const o=[Xie,Kie],l=[];function s(u,c){return c&1&&(e=null),e==null&&(e=!!u[2](u[5].extension)),e?0:1}return t=s(n,-1),r=l[t]=o[t](n),{c(){r.c(),i=yt()},m(u,c){l[t].m(u,c),C(u,i,c),a=!0},p(u,c){let f=t;t=s(u,c),t===f?l[t].p(u,c):(we(),$(l[f],1,1,()=>{l[f]=null}),ke(),r=l[t],r?r.p(u,c):(r=l[t]=o[t](u),r.c()),b(r,1),r.m(i.parentNode,i))},i(u){a||(b(r),a=!0)},o(u){$(r),a=!1},d(u){l[t].d(u),u&&M(i)}}}function eS(n){let e,t,r,i;return{c(){e=X("div"),t=oe("+"),r=oe(n[1]),i=oe(" more")},m(a,o){C(a,e,o),x(e,t),x(e,r),x(e,i)},p(a,o){o&2&>(r,a[1])},d(a){a&&M(e)}}}function Qie(n){let e,t,r,i=n[0],a=[];for(let s=0;s<i.length;s+=1)a[s]=QC(ZC(n,i,s));const o=s=>$(a[s],1,1,()=>{a[s]=null});let l=n[1]&&eS(n);return{c(){for(let s=0;s<a.length;s+=1)a[s].c();e=q(),l&&l.c(),t=yt()},m(s,u){for(let c=0;c<a.length;c+=1)a[c].m(s,u);C(s,e,u),l&&l.m(s,u),C(s,t,u),r=!0},p(s,[u]){if(u&5){i=s[0];let c;for(c=0;c<i.length;c+=1){const f=ZC(s,i,c);a[c]?(a[c].p(f,u),b(a[c],1)):(a[c]=QC(f),a[c].c(),b(a[c],1),a[c].m(e.parentNode,e))}for(we(),c=i.length;c<a.length;c+=1)o(c);ke()}s[1]?l?l.p(s,u):(l=eS(s),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null)},i(s){if(!r){for(let u=0;u<i.length;u+=1)b(a[u]);r=!0}},o(s){a=a.filter(Boolean);for(let u=0;u<a.length;u+=1)$(a[u]);r=!1},d(s){Bn(a,s),s&&M(e),l&&l.d(s),s&&M(t)}}}const e1e=5,t1e=n=>{n.stopPropagation()},n1e=n=>{n.stopPropagation()};function r1e(n,e,t){let r,i,{value:a}=e;const o=["png","tiff","gif","raw","jpg","jpeg"],l=s=>o.includes(s==null?void 0:s.toLowerCase());return n.$$set=s=>{"value"in s&&t(3,a=s.value)},n.$$.update=()=>{var s,u;n.$$.dirty&8&&t(0,r=(s=a==null?void 0:a.slice(0,e1e))!=null?s:[]),n.$$.dirty&9&&t(1,i=((u=a==null?void 0:a.length)!=null?u:0)-r.length)},[r,i,l,a]}class i1e extends Ve{constructor(e){super(),Pe(this,e,r1e,Qie,Ie,{value:3})}}function tS(n,e,t){const r=n.slice();return r[3]=e[t],r}function a1e(n){let e=n[3]+"",t;return{c(){t=oe(e)},m(r,i){C(r,t,i)},p(r,i){i&1&&e!==(e=r[3]+"")&>(t,e)},d(r){r&&M(t)}}}function nS(n){let e,t;return e=new Nh({props:{size:"S",grey:!0,$$slots:{default:[a1e]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&65&&(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 rS(n){let e,t,r,i;return{c(){e=X("div"),t=oe("+"),r=oe(n[1]),i=oe(" more")},m(a,o){C(a,e,o),x(e,t),x(e,r),x(e,i)},p(a,o){o&2&>(r,a[1])},d(a){a&&M(e)}}}function o1e(n){let e,t,r,i=n[0],a=[];for(let s=0;s<i.length;s+=1)a[s]=nS(tS(n,i,s));const o=s=>$(a[s],1,1,()=>{a[s]=null});let l=n[1]&&rS(n);return{c(){for(let s=0;s<a.length;s+=1)a[s].c();e=q(),l&&l.c(),t=yt()},m(s,u){for(let c=0;c<a.length;c+=1)a[c].m(s,u);C(s,e,u),l&&l.m(s,u),C(s,t,u),r=!0},p(s,[u]){if(u&1){i=s[0];let c;for(c=0;c<i.length;c+=1){const f=tS(s,i,c);a[c]?(a[c].p(f,u),b(a[c],1)):(a[c]=nS(f),a[c].c(),b(a[c],1),a[c].m(e.parentNode,e))}for(we(),c=i.length;c<a.length;c+=1)o(c);ke()}s[1]?l?l.p(s,u):(l=rS(s),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null)},i(s){if(!r){for(let u=0;u<i.length;u+=1)b(a[u]);r=!0}},o(s){a=a.filter(Boolean);for(let u=0;u<a.length;u+=1)$(a[u]);r=!1},d(s){Bn(a,s),s&&M(e),l&&l.d(s),s&&M(t)}}}const l1e=5;function s1e(n,e,t){let r,i,{value:a}=e;return n.$$set=o=>{"value"in o&&t(2,a=o.value)},n.$$.update=()=>{var o;n.$$.dirty&4&&t(0,r=Array.isArray(a)?a.slice(0,l1e):[]),n.$$.dirty&5&&t(1,i=((o=a==null?void 0:a.length)!=null?o:0)-r.length)},[r,i,a]}class u1e extends Ve{constructor(e){super(),Pe(this,e,s1e,o1e,Ie,{value:2})}}function c1e(n){let e,t,r,i,a;return t=new un({props:{size:"S",name:"Copy"}}),{c(){e=X("div"),O(t.$$.fragment)},m(o,l){C(o,e,l),B(t,e,null),r=!0,i||(a=At(e,"click",c_(n[0])),i=!0)},p:ht,i(o){r||(b(t.$$.fragment,o),r=!0)},o(o){$(t.$$.fragment,o),r=!1},d(o){o&&M(e),H(t),i=!1,a()}}}function f1e(n,e,t){let{value:r}=e;const i=async a=>{a.stopPropagation();try{await dq(r),$t.success("Copied to clipboard")}catch{$t.error("Failed to copy to clipboard. Check the dev console for the value."),console.warn("Failed to copy the value",r)}};return n.$$set=a=>{"value"in a&&t(1,r=a.value)},[i,r]}class $q extends Ve{constructor(e){super(),Pe(this,e,f1e,c1e,Ie,{value:1})}}(function(){const n={};try{if(process)return process.env=Object.assign({},process.env),void Object.assign(process.env,n)}catch{}globalThis.process={env:n}})();var Ab,Jf=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{};function wh(n){if(Object.keys)return Object.keys(n);var e=[];for(var t in n)e.push(t);return e}function kh(n,e){if(n.forEach)return n.forEach(e);for(var t=0;t<n.length;t++)e(n[t],t,n)}function p1e(){try{return Object.defineProperty({},"_",{}),function(n,e,t){Object.defineProperty(n,e,{writable:!0,enumerable:!1,configurable:!0,value:t})}}catch{return function(e,t,r){e[t]=r}}}var iS=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function uv(){}function h4(n){if(!(this instanceof h4))return new h4(n);this.code=n}function wq(n){if(kq(n))return n;var e=new uv;return typeof n=="object"&&kh(wh(n),function(t){e[t]=n[t]}),e}function kq(n){return n instanceof uv}uv.prototype={},h4.prototype.runInContext=function(n){if(!(n instanceof uv))throw new TypeError("needs a 'context' argument.");if(Jf.document){var e=Jf.document.createElement("iframe");e.style||(e.style={}),e.style.display="none",Jf.document.body.appendChild(e);var t=e.contentWindow,r=t.eval,i=t.execScript;!r&&i&&(i.call(t,"null"),r=t.eval),kh(wh(n),function(l){t[l]=n[l]}),kh(iS,function(l){n[l]&&(t[l]=n[l])});var a=wh(t),o=r.call(t,this.code);return kh(wh(t),function(l){(l in n||function(s,u){if(d1e)return s.indexOf(u);for(var c=0;c<s.length;++c)if(s[c]===u)return c;return-1}(a,l)===-1)&&(n[l]=t[l])}),kh(iS,function(l){l in n||function(s,u,c){typeof Ab!="function"&&(Ab=p1e),Ab(s,u,c)}(n,l,t[l])}),Jf.document.body.removeChild(e),o}return function(l,s){var u=wh(Jf);return u.push("with (this.__ctx__){return eval(this.__code__)}"),Function.apply(null,u).apply({__code__:l,__ctx__:s})}(this.code,n)},h4.prototype.runInThisContext=function(){return new Function("code","return eval(code);").call(Jf,this.code)},h4.prototype.runInNewContext=function(n){var e=wq(n),t=this.runInContext(e);return n&&kh(wh(e),function(r){n[r]=e[r]}),t};var aS={runInContext:function(n,e,t){return new h4(n).runInContext(e,t)},isContext:kq,createContext:wq,createScript:function(n){return new h4(n)},Script:h4,runInThisContext:function(n,e){return new h4(n).runInThisContext(e)},runInNewContext:function(n,e,t){return new h4(n).runInNewContext(e,t)}},d1e=[].indexOf,Ef=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function k7(n){if(n.__esModule)return n;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(n).forEach(function(t){var r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:function(){return n[t]}})}),e}function ur(n){var e={exports:{}};return n(e,e.exports),e.exports}function Mb(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var D1=ur(function(n,e){e.__esModule=!0,e.extend=o,e.indexOf=function(c,f){for(var h=0,m=c.length;h<m;h++)if(c[h]===f)return h;return-1},e.escapeExpression=function(c){if(typeof c!="string"){if(c&&c.toHTML)return c.toHTML();if(c==null)return"";if(!c)return c+"";c=""+c}return i.test(c)?c.replace(r,a):c},e.isEmpty=function(c){return!c&&c!==0||!(!u(c)||c.length!==0)},e.createFrame=function(c){var f=o({},c);return f._parent=c,f},e.blockParams=function(c,f){return c.path=f,c},e.appendContextPath=function(c,f){return(c?c+".":"")+f};var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},r=/[&<>"'`=]/g,i=/[&<>"'`=]/;function a(c){return t[c]}function o(c){for(var f=1;f<arguments.length;f++)for(var h in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],h)&&(c[h]=arguments[f][h]);return c}var l=Object.prototype.toString;e.toString=l;var s=function(c){return typeof c=="function"};s(/x/)&&(e.isFunction=s=function(c){return typeof c=="function"&&l.call(c)==="[object Function]"}),e.isFunction=s;var u=Array.isArray||function(c){return!(!c||typeof c!="object")&&l.call(c)==="[object Array]"};e.isArray=u}),U3=ur(function(n,e){e.__esModule=!0;var t=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function r(i,a){var o=a&&a.loc,l=void 0,s=void 0,u=void 0,c=void 0;o&&(l=o.start.line,s=o.end.line,u=o.start.column,c=o.end.column,i+=" - "+l+":"+u);for(var f=Error.prototype.constructor.call(this,i),h=0;h<t.length;h++)this[t[h]]=f[t[h]];Error.captureStackTrace&&Error.captureStackTrace(this,r);try{o&&(this.lineNumber=l,this.endLineNumber=s,Object.defineProperty?(Object.defineProperty(this,"column",{value:u,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:c,enumerable:!0})):(this.column=u,this.endColumn=c))}catch{}}r.prototype=new Error,e.default=r,n.exports=e.default}),h1e=ur(function(n,e){e.__esModule=!0,e.default=function(t){t.registerHelper("blockHelperMissing",function(r,i){var a=i.inverse,o=i.fn;if(r===!0)return o(this);if(r===!1||r==null)return a(this);if(D1.isArray(r))return r.length>0?(i.ids&&(i.ids=[i.name]),t.helpers.each(r,i)):a(this);if(i.data&&i.ids){var l=D1.createFrame(i.data);l.contextPath=D1.appendContextPath(i.data.contextPath,i.name),i={data:l}}return o(r,i)})},n.exports=e.default}),m1e=ur(function(n,e){e.__esModule=!0;var t,r=(t=U3)&&t.__esModule?t:{default:t};e.default=function(i){i.registerHelper("each",function(a,o){if(!o)throw new r.default("Must pass iterator to #each");var l,s=o.fn,u=o.inverse,c=0,f="",h=void 0,m=void 0;function _(T,I,P){h&&(h.key=T,h.index=I,h.first=I===0,h.last=!!P,m&&(h.contextPath=m+T)),f+=s(a[T],{data:h,blockParams:D1.blockParams([a[T],T],[m+T,null])})}if(o.data&&o.ids&&(m=D1.appendContextPath(o.data.contextPath,o.ids[0])+"."),D1.isFunction(a)&&(a=a.call(this)),o.data&&(h=D1.createFrame(o.data)),a&&typeof a=="object")if(D1.isArray(a))for(var y=a.length;c<y;c++)c in a&&_(c,c,c===a.length-1);else if(Ef.Symbol&&a[Ef.Symbol.iterator]){for(var w=[],A=a[Ef.Symbol.iterator](),S=A.next();!S.done;S=A.next())w.push(S.value);for(y=(a=w).length;c<y;c++)_(c,c,c===a.length-1)}else l=void 0,Object.keys(a).forEach(function(T){l!==void 0&&_(l,c-1),l=T,c++}),l!==void 0&&_(l,c-1,!0);return c===0&&(f=u(this)),f})},n.exports=e.default}),g1e=ur(function(n,e){e.__esModule=!0;var t,r=(t=U3)&&t.__esModule?t:{default:t};e.default=function(i){i.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new r.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},n.exports=e.default}),v1e=ur(function(n,e){e.__esModule=!0;var t,r=(t=U3)&&t.__esModule?t:{default:t};e.default=function(i){i.registerHelper("if",function(a,o){if(arguments.length!=2)throw new r.default("#if requires exactly one argument");return D1.isFunction(a)&&(a=a.call(this)),!o.hash.includeZero&&!a||D1.isEmpty(a)?o.inverse(this):o.fn(this)}),i.registerHelper("unless",function(a,o){if(arguments.length!=2)throw new r.default("#unless requires exactly one argument");return i.helpers.if.call(this,a,{fn:o.inverse,inverse:o.fn,hash:o.hash})})},n.exports=e.default}),_1e=ur(function(n,e){e.__esModule=!0,e.default=function(t){t.registerHelper("log",function(){for(var r=[void 0],i=arguments[arguments.length-1],a=0;a<arguments.length-1;a++)r.push(arguments[a]);var o=1;i.hash.level!=null?o=i.hash.level:i.data&&i.data.level!=null&&(o=i.data.level),r[0]=o,t.log.apply(t,r)})},n.exports=e.default}),b1e=ur(function(n,e){e.__esModule=!0,e.default=function(t){t.registerHelper("lookup",function(r,i,a){return r&&a.lookupProperty(r,i)})},n.exports=e.default}),y1e=ur(function(n,e){e.__esModule=!0;var t,r=(t=U3)&&t.__esModule?t:{default:t};e.default=function(i){i.registerHelper("with",function(a,o){if(arguments.length!=2)throw new r.default("#with requires exactly one argument");D1.isFunction(a)&&(a=a.call(this));var l=o.fn;if(D1.isEmpty(a))return o.inverse(this);var s=o.data;return o.data&&o.ids&&((s=D1.createFrame(o.data)).contextPath=D1.appendContextPath(o.data.contextPath,o.ids[0])),l(a,{data:s,blockParams:D1.blockParams([a],[s&&s.contextPath])})})},n.exports=e.default}),$1e=function(n){k1e.default(n),z1e.default(n),A1e.default(n),M1e.default(n),C1e.default(n),S1e.default(n),L1e.default(n)},w1e=function(n,e,t){n.helpers[e]&&(n.hooks[e]=n.helpers[e],t||delete n.helpers[e])};function xd(n){return n&&n.__esModule?n:{default:n}}var k1e=xd(h1e),z1e=xd(m1e),A1e=xd(g1e),M1e=xd(v1e),C1e=xd(_1e),S1e=xd(b1e),L1e=xd(y1e),u$=Object.defineProperty({registerDefaultHelpers:$1e,moveHelperToHooks:w1e},"__esModule",{value:!0}),E1e=ur(function(n,e){e.__esModule=!0,e.default=function(t){t.registerDecorator("inline",function(r,i,a,o){var l=r;return i.partials||(i.partials={},l=function(s,u){var c=a.partials;a.partials=D1.extend({},c,i.partials);var f=r(s,u);return a.partials=c,f}),i.partials[o.args[0]]=o.fn,l})},n.exports=e.default}),T1e=function(n){D1e.default(n)},J7,D1e=(J7=E1e)&&J7.__esModule?J7:{default:J7},B1e=Object.defineProperty({registerDefaultDecorators:T1e},"__esModule",{value:!0}),zq=ur(function(n,e){e.__esModule=!0;var t={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(r){if(typeof r=="string"){var i=D1.indexOf(t.methodMap,r.toLowerCase());r=i>=0?i:parseInt(r,10)}return r},log:function(r){if(r=t.lookupLevel(r),typeof console<"u"&&t.lookupLevel(t.level)<=r){var i=t.methodMap[r];console[i]||(i="log");for(var a=arguments.length,o=Array(a>1?a-1:0),l=1;l<a;l++)o[l-1]=arguments[l];console[i].apply(console,o)}}};e.default=t,n.exports=e.default}),H1e=function(){for(var n=arguments.length,e=Array(n),t=0;t<n;t++)e[t]=arguments[t];return D1.extend.apply(void 0,[Object.create(null)].concat(e))},oS=Object.defineProperty({createNewLookupObject:H1e},"__esModule",{value:!0}),O1e=function(n){var e=Object.create(null);e.constructor=!1,e.__defineGetter__=!1,e.__defineSetter__=!1,e.__lookupGetter__=!1;var t=Object.create(null);return t.__proto__=!1,{properties:{whitelist:oS.createNewLookupObject(t,n.allowedProtoProperties),defaultValue:n.allowProtoPropertiesByDefault},methods:{whitelist:oS.createNewLookupObject(e,n.allowedProtoMethods),defaultValue:n.allowProtoMethodsByDefault}}},I1e=function(n,e,t){return R1e(typeof n=="function"?e.methods:e.properties,t)},P1e=function(){Object.keys(cv).forEach(function(n){delete cv[n]})},V1e=function(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}(zq),cv=Object.create(null);function R1e(n,e){return n.whitelist[e]!==void 0?n.whitelist[e]===!0:n.defaultValue!==void 0?n.defaultValue:(function(t){cv[t]!==!0&&(cv[t]=!0,V1e.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
|
|
34
34
|
You can add a runtime option to disable the check or this warning:
|
|
35
35
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}(e),!1)}var c$=Object.defineProperty({createProtoAccessControl:O1e,resultIsAllowed:I1e,resetLoggedProperties:P1e},"__esModule",{value:!0}),N1e=f$;function Aq(n){return n&&n.__esModule?n:{default:n}}var Cb=Aq(U3),fv=Aq(zq),F1e={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};function f$(n,e,t){this.helpers=n||{},this.partials=e||{},this.decorators=t||{},u$.registerDefaultHelpers(this),B1e.registerDefaultDecorators(this)}f$.prototype={constructor:f$,logger:fv.default,log:fv.default.log,registerHelper:function(n,e){if(D1.toString.call(n)==="[object Object]"){if(e)throw new Cb.default("Arg not supported with multiple helpers");D1.extend(this.helpers,n)}else this.helpers[n]=e},unregisterHelper:function(n){delete this.helpers[n]},registerPartial:function(n,e){if(D1.toString.call(n)==="[object Object]")D1.extend(this.partials,n);else{if(e===void 0)throw new Cb.default('Attempting to register a partial called "'+n+'" as undefined');this.partials[n]=e}},unregisterPartial:function(n){delete this.partials[n]},registerDecorator:function(n,e){if(D1.toString.call(n)==="[object Object]"){if(e)throw new Cb.default("Arg not supported with multiple decorators");D1.extend(this.decorators,n)}else this.decorators[n]=e},unregisterDecorator:function(n){delete this.decorators[n]},resetLoggedPropertyAccesses:function(){c$.resetLoggedProperties()}};var j1e=fv.default.log,x1e=D1.createFrame,U1e=fv.default,Zf=Object.defineProperty({HandlebarsEnvironment:N1e,VERSION:"4.7.7",COMPILER_REVISION:8,LAST_COMPATIBLE_COMPILER_REVISION:7,REVISION_CHANGES:F1e,log:j1e,createFrame:x1e,logger:U1e},"__esModule",{value:!0}),q1e=ur(function(n,e){function t(r){this.string=r}e.__esModule=!0,t.prototype.toString=t.prototype.toHTML=function(){return""+this.string},e.default=t,n.exports=e.default}),W1e=function(n,e){return typeof n!="function"?n:function(){return arguments[arguments.length-1]=e(arguments[arguments.length-1]),n.apply(this,arguments)}},G1e=Object.defineProperty({wrapHelper:W1e},"__esModule",{value:!0}),Y1e=function(n){var e=n&&n[0]||1,t=Zf.COMPILER_REVISION;if(!(e>=Zf.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Zf.COMPILER_REVISION)){if(e<Zf.LAST_COMPATIBLE_COMPILER_REVISION){var r=Zf.REVISION_CHANGES[t],i=Zf.REVISION_CHANGES[e];throw new e5.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+r+") or downgrade your runtime to an older version ("+i+").")}throw new e5.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+n[1]+").")}},K1e=function(n,e){if(!e)throw new e5.default("No environment passed to template");if(!n||!n.main)throw new e5.default("Unknown template object: "+typeof n);n.main.decorator=n.main_d,e.VM.checkRevision(n.compiler);var t=n.compiler&&n.compiler[0]===7,r={strict:function(a,o,l){if(!a||!(o in a))throw new e5.default('"'+o+'" not defined in '+a,{loc:l});return r.lookupProperty(a,o)},lookupProperty:function(a,o){var l=a[o];return l==null||Object.prototype.hasOwnProperty.call(a,o)||c$.resultIsAllowed(l,r.protoAccessControl,o)?l:void 0},lookup:function(a,o){for(var l=a.length,s=0;s<l;s++)if((a[s]&&r.lookupProperty(a[s],o))!=null)return a[s][o]},lambda:function(a,o){return typeof a=="function"?a.call(o):a},escapeExpression:J4.escapeExpression,invokePartial:function(a,o,l){l.hash&&(o=J4.extend({},o,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,o,l);var s=J4.extend({},l,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),u=e.VM.invokePartial.call(this,a,o,s);if(u==null&&e.compile&&(l.partials[l.name]=e.compile(a,n.compilerOptions,e),u=l.partials[l.name](o,s)),u!=null){if(l.indent){for(var c=u.split(`
|
|
@@ -340,7 +340,7 @@ Please report this to https://github.com/markedjs/marked.`,Xe.silent)return"<p>A
|
|
|
340
340
|
-----
|
|
341
341
|
|
|
342
342
|
`]},dce={link:"URL for the link:",image:"URL of the image:"},hce={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},mce={bold:"**",code:"```",italic:"*"},gce={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},vce={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#).
|
|
343
|
-
Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};function Lr(n){n=n||{},n.parent=this;var e=!0;if(n.autoDownloadFontAwesome===!1&&(e=!1),n.autoDownloadFontAwesome!==!0)for(var t=document.styleSheets,r=0;r<t.length;r++)!t[r].href||t[r].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(e=!1);if(e){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(n.element)this.element=n.element;else if(n.element===null){console.log("EasyMDE: Error. No element was found.");return}if(n.toolbar===void 0){n.toolbar=[];for(var a in zd)Object.prototype.hasOwnProperty.call(zd,a)&&(a.indexOf("separator-")!=-1&&n.toolbar.push("|"),(zd[a].default===!0||n.showIcons&&n.showIcons.constructor===Array&&n.showIcons.indexOf(a)!=-1)&&n.toolbar.push(a))}if(Object.prototype.hasOwnProperty.call(n,"previewClass")||(n.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(n,"status")||(n.status=["autosave","lines","words","cursor"],n.uploadImage&&n.status.unshift("upload-image")),n.previewRender||(n.previewRender=function(l){return this.parent.markdown(l)}),n.parsingConfig=q5({highlightFormatting:!0},n.parsingConfig||{}),n.insertTexts=q5({},pce,n.insertTexts||{}),n.promptTexts=q5({},dce,n.promptTexts||{}),n.blockStyles=q5({},mce,n.blockStyles||{}),n.autosave!=null&&(n.autosave.timeFormat=q5({},hce,n.autosave.timeFormat||{})),n.shortcuts=q5({},ice,n.shortcuts||{}),n.maxHeight=n.maxHeight||void 0,n.direction=n.direction||"ltr",typeof n.maxHeight<"u"?n.minHeight=n.maxHeight:n.minHeight=n.minHeight||"300px",n.errorCallback=n.errorCallback||function(l){alert(l)},n.uploadImage=n.uploadImage||!1,n.imageMaxSize=n.imageMaxSize||2097152,n.imageAccept=n.imageAccept||"image/png, image/jpeg",n.imageTexts=q5({},gce,n.imageTexts||{}),n.errorMessages=q5({},vce,n.errorMessages||{}),n.autosave!=null&&n.autosave.unique_id!=null&&n.autosave.unique_id!=""&&(n.autosave.uniqueId=n.autosave.unique_id),n.overlayMode&&n.overlayMode.combine===void 0&&(n.overlayMode.combine=!0),this.options=n,this.render(),n.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(n.initialValue),n.uploadImage){var o=this;this.codemirror.on("dragenter",function(l,s){o.updateStatusBar("upload-image",o.options.imageTexts.sbOnDragEnter),s.stopPropagation(),s.preventDefault()}),this.codemirror.on("dragend",function(l,s){o.updateStatusBar("upload-image",o.options.imageTexts.sbInit),s.stopPropagation(),s.preventDefault()}),this.codemirror.on("dragleave",function(l,s){o.updateStatusBar("upload-image",o.options.imageTexts.sbInit),s.stopPropagation(),s.preventDefault()}),this.codemirror.on("dragover",function(l,s){o.updateStatusBar("upload-image",o.options.imageTexts.sbOnDragEnter),s.stopPropagation(),s.preventDefault()}),this.codemirror.on("drop",function(l,s){s.stopPropagation(),s.preventDefault(),n.imageUploadFunction?o.uploadImagesUsingCustomFunction(n.imageUploadFunction,s.dataTransfer.files):o.uploadImages(s.dataTransfer.files)}),this.codemirror.on("paste",function(l,s){n.imageUploadFunction?o.uploadImagesUsingCustomFunction(n.imageUploadFunction,s.clipboardData.files):o.uploadImages(s.clipboardData.files)})}}Lr.prototype.uploadImages=function(n,e,t){if(n.length!==0){for(var r=[],i=0;i<n.length;i++)r.push(n[i].name),this.uploadImage(n[i],e,t);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",r.join(", ")))}};Lr.prototype.uploadImagesUsingCustomFunction=function(n,e){if(e.length!==0){for(var t=[],r=0;r<e.length;r++)t.push(e[r].name),this.uploadImageUsingCustomFunction(n,e[r]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",t.join(", ")))}};Lr.prototype.updateStatusBar=function(n,e){if(!!this.gui.statusbar){var t=this.gui.statusbar.getElementsByClassName(n);t.length===1?this.gui.statusbar.getElementsByClassName(n)[0].textContent=e:t.length===0?console.log("EasyMDE: status bar item "+n+" was not found."):console.log("EasyMDE: Several status bar items named "+n+" was found.")}};Lr.prototype.markdown=function(n){if(ay){var e;if(this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?e=this.options.renderingConfig.markedOptions:e={},this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?e.breaks=!1:e.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0){var t=this.options.renderingConfig.hljs||window.hljs;t&&(e.highlight=function(i,a){return a&&t.getLanguage(a)?t.highlight(a,i).value:t.highlightAuto(i).value})}ay.setOptions(e);var r=ay.parse(n);return this.options.renderingConfig&&typeof this.options.renderingConfig.sanitizerFunction=="function"&&(r=this.options.renderingConfig.sanitizerFunction.call(this,r)),r=oce(r),r=lce(r),r}};Lr.prototype.render=function(n){if(n||(n=this.element||document.getElementsByTagName("textarea")[0]),this._rendered&&this._rendered===n)return;this.element=n;var e=this.options,t=this,r={};for(var i in e.shortcuts)e.shortcuts[i]!==null&&Qg[i]!==null&&function(w){r[kG(e.shortcuts[w])]=function(){var A=Qg[w];typeof A=="function"?A(t):typeof A=="string"&&window.open(A,"_blank")}}(i);r.Enter="newlineAndIndentContinueMarkdownList",r.Tab="tabAndIndentMarkdownList",r["Shift-Tab"]="shiftTabAndUnindentMarkdownList",r.Esc=function(w){w.getOption("fullScreen")&&Td(t)},this.documentOnKeyDown=function(w){w=w||window.event,w.keyCode==27&&t.codemirror.getOption("fullScreen")&&Td(t)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var a,o;e.overlayMode?(bh.defineMode("overlay-mode",function(w){return bh.overlayMode(bh.getMode(w,e.spellChecker!==!1?"spell-checker":"gfm"),e.overlayMode.mode,e.overlayMode.combine)}),a="overlay-mode",o=e.parsingConfig,o.gitHubSpice=!1):(a=e.parsingConfig,a.name="gfm",a.gitHubSpice=!1),e.spellChecker!==!1&&(a="spell-checker",o=e.parsingConfig,o.name="gfm",o.gitHubSpice=!1,typeof e.spellChecker=="function"?e.spellChecker({codeMirrorInstance:bh}):nce({codeMirrorInstance:bh}));function l(w,A,S){return{addNew:!1}}if(this.codemirror=bh.fromTextArea(n,{mode:a,backdrop:o,theme:e.theme!=null?e.theme:"easymde",tabSize:e.tabSize!=null?e.tabSize:2,indentUnit:e.tabSize!=null?e.tabSize:2,indentWithTabs:e.indentWithTabs!==!1,lineNumbers:e.lineNumbers===!0,autofocus:e.autofocus===!0,extraKeys:r,direction:e.direction,lineWrapping:e.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:e.placeholder||n.getAttribute("placeholder")||"",styleSelectedText:e.styleSelectedText!=null?e.styleSelectedText:!I$(),scrollbarStyle:e.scrollbarStyle!=null?e.scrollbarStyle:"native",configureMouse:l,inputStyle:e.inputStyle!=null?e.inputStyle:I$()?"contenteditable":"textarea",spellcheck:e.nativeSpellcheck!=null?e.nativeSpellcheck:!0,autoRefresh:e.autoRefresh!=null?e.autoRefresh:!1}),this.codemirror.getScrollerElement().style.minHeight=e.minHeight,typeof e.maxHeight<"u"&&(this.codemirror.getScrollerElement().style.height=e.maxHeight),e.forceSync===!0){var s=this.codemirror;s.on("change",function(){s.save()})}this.gui={};var u=document.createElement("div");u.classList.add("EasyMDEContainer");var c=this.codemirror.getWrapperElement();c.parentNode.insertBefore(u,c),u.appendChild(c),e.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),e.status!==!1&&(this.gui.statusbar=this.createStatusbar()),e.autosave!=null&&e.autosave.enabled===!0&&(this.autosave(),this.codemirror.on("change",function(){clearTimeout(t._autosave_timeout),t._autosave_timeout=setTimeout(function(){t.autosave()},t.options.autosave.submit_delay||t.options.autosave.delay||1e3)}));function f(w,A){var S,T=window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","");return w<T?S=A+"px":S=A/w*100+"%",S}var h=this;function m(w,A){w.setAttribute("data-img-src",A.url),w.setAttribute("style","--bg-image:url("+A.url+");--width:"+A.naturalWidth+"px;--height:"+f(A.naturalWidth,A.naturalHeight)),h.codemirror.setSize()}function _(){!e.previewImagesInEditor||u.querySelectorAll(".cm-image-marker").forEach(function(w){var A=w.parentElement;if(!!A.innerText.match(/^!\[.*?\]\(.*\)/g)&&!A.hasAttribute("data-img-src")){var S=A.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),S&&S.length>=2){var T=S[1];if(window.EMDEimagesCache[T])m(A,window.EMDEimagesCache[T]);else{var I=document.createElement("img");I.onload=function(){window.EMDEimagesCache[T]={naturalWidth:I.naturalWidth,naturalHeight:I.naturalHeight,url:T},m(A,window.EMDEimagesCache[T])},I.src=T}}}})}this.codemirror.on("update",function(){_()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var y=this.codemirror;setTimeout(function(){y.refresh()}.bind(y),0)};Lr.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};function LG(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch{return!1}else return!1;return!0}Lr.prototype.autosave=function(){if(LG()){var n=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(n.element.form!=null&&n.element.form!=null&&n.element.form.addEventListener("submit",function(){clearTimeout(n.autosaveTimeoutId),n.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+n.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var e=n.value();e!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,e):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var t=document.getElementById("autosaved");if(t!=null&&t!=null&&t!=""){var r=new Date,i=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(r),a=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;t.innerHTML=a+i}}else console.log("EasyMDE: localStorage not available, cannot autosave")};Lr.prototype.clearAutosavedValue=function(){if(LG()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")};Lr.prototype.openBrowseFileWindow=function(n,e){var t=this,r=this.gui.toolbar.getElementsByClassName("imageInput")[0];r.click();function i(a){t.options.imageUploadFunction?t.uploadImagesUsingCustomFunction(t.options.imageUploadFunction,a.target.files):t.uploadImages(a.target.files,n,e),r.removeEventListener("change",i)}r.addEventListener("change",i)};Lr.prototype.uploadImage=function(n,e,t){var r=this;e=e||function(u){CG(r,u)};function i(s){r.updateStatusBar("upload-image",s),setTimeout(function(){r.updateStatusBar("upload-image",r.options.imageTexts.sbInit)},1e4),t&&typeof t=="function"&&t(s),r.options.errorCallback(s)}function a(s){var u=r.options.imageTexts.sizeUnits.split(",");return s.replace("#image_name#",n.name).replace("#image_size#",Mv(n.size,u)).replace("#image_max_size#",Mv(r.options.imageMaxSize,u))}if(n.size>this.options.imageMaxSize){i(a(this.options.errorMessages.fileTooLarge));return}var o=new FormData;o.append("image",n),r.options.imageCSRFToken&&o.append("csrfmiddlewaretoken",r.options.imageCSRFToken);var l=new XMLHttpRequest;l.upload.onprogress=function(s){if(s.lengthComputable){var u=""+Math.round(s.loaded*100/s.total);r.updateStatusBar("upload-image",r.options.imageTexts.sbProgress.replace("#file_name#",n.name).replace("#progress#",u))}},l.open("POST",this.options.imageUploadEndpoint),l.onload=function(){try{var s=JSON.parse(this.responseText)}catch{console.error("EasyMDE: The server did not return a valid json."),i(a(r.options.errorMessages.importError));return}this.status===200&&s&&!s.error&&s.data&&s.data.filePath?e((r.options.imagePathAbsolute?"":window.location.origin+"/")+s.data.filePath):s.error&&s.error in r.options.errorMessages?i(a(r.options.errorMessages[s.error])):s.error?i(a(s.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),i(a(r.options.errorMessages.importError)))},l.onerror=function(s){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+s.target.status+" ("+s.target.statusText+")"),i(r.options.errorMessages.importError)},l.send(o)};Lr.prototype.uploadImageUsingCustomFunction=function(n,e){var t=this;function r(o){CG(t,o)}function i(o){var l=a(o);t.updateStatusBar("upload-image",l),setTimeout(function(){t.updateStatusBar("upload-image",t.options.imageTexts.sbInit)},1e4),t.options.errorCallback(l)}function a(o){var l=t.options.imageTexts.sizeUnits.split(",");return o.replace("#image_name#",e.name).replace("#image_size#",Mv(e.size,l)).replace("#image_max_size#",Mv(t.options.imageMaxSize,l))}n.apply(this,[e,r,i])};Lr.prototype.setPreviewMaxHeight=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.nextSibling,r=parseInt(window.getComputedStyle(e).paddingTop),i=parseInt(window.getComputedStyle(e).borderTopWidth),a=parseInt(this.options.maxHeight),o=a+r*2+i*2,l=o.toString()+"px";t.style.height=l};Lr.prototype.createSideBySide=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.nextSibling;if(!t||!/editor-preview-side/.test(t.className)){if(t=document.createElement("div"),t.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var r=0;r<this.options.previewClass.length;r++)t.className+=" "+this.options.previewClass[r];else typeof this.options.previewClass=="string"&&(t.className+=" "+this.options.previewClass);e.parentNode.insertBefore(t,e.nextSibling)}if(typeof this.options.maxHeight<"u"&&this.setPreviewMaxHeight(),this.options.syncSideBySidePreviewScroll===!1)return t;var i=!1,a=!1;return n.on("scroll",function(o){if(i){i=!1;return}a=!0;var l=o.getScrollInfo().height-o.getScrollInfo().clientHeight,s=parseFloat(o.getScrollInfo().top)/l,u=(t.scrollHeight-t.clientHeight)*s;t.scrollTop=u}),t.onscroll=function(){if(a){a=!1;return}i=!0;var o=t.scrollHeight-t.clientHeight,l=parseFloat(t.scrollTop)/o,s=(n.getScrollInfo().height-n.getScrollInfo().clientHeight)*l;n.scrollTo(0,s)},t};Lr.prototype.createToolbar=function(n){if(n=n||this.options.toolbar,!(!n||n.length===0)){var e;for(e=0;e<n.length;e++)zd[n[e]]!=null&&(n[e]=zd[n[e]]);var t=document.createElement("div");t.className="editor-toolbar";var r=this,i={};for(r.toolbar=n,e=0;e<n.length;e++)if(!(n[e].name=="guide"&&r.options.toolbarGuideIcon===!1)&&!(r.options.hideIcons&&r.options.hideIcons.indexOf(n[e].name)!=-1)&&!((n[e].name=="fullscreen"||n[e].name=="side-by-side")&&I$())){if(n[e]==="|"){for(var a=!1,o=e+1;o<n.length;o++)n[o]!=="|"&&(!r.options.hideIcons||r.options.hideIcons.indexOf(n[o].name)==-1)&&(a=!0);if(!a)continue}(function(u){var c;if(u==="|"?c=uce():u.children?c=sce(u,r.options.toolbarTips,r.options.shortcuts,r):c=x9(u,!0,r.options.toolbarTips,r.options.shortcuts,"button",r),i[u.name||u]=c,t.appendChild(c),u.name==="upload-image"){var f=document.createElement("input");f.className="imageInput",f.type="file",f.multiple=!0,f.name="image",f.accept=r.options.imageAccept,f.style.display="none",f.style.opacity=0,t.appendChild(f)}})(n[e])}r.toolbar_div=t,r.toolbarElements=i;var l=this.codemirror;l.on("cursorActivity",function(){var u=k5(l);for(var c in i)(function(f){var h=i[f];u[f]?h.className+=" active":f!="fullscreen"&&f!="side-by-side"&&(h.className=h.className.replace(/\s*active\s*/g,""))})(c)});var s=l.getWrapperElement();return s.parentNode.insertBefore(t,s),t}};Lr.prototype.createStatusbar=function(n){n=n||this.options.status;var e=this.options,t=this.codemirror;if(!(!n||n.length===0)){var r=[],i,a,o,l;for(i=0;i<n.length;i++)if(a=void 0,o=void 0,l=void 0,typeof n[i]=="object")r.push({className:n[i].className,defaultValue:n[i].defaultValue,onUpdate:n[i].onUpdate,onActivity:n[i].onActivity});else{var s=n[i];s==="words"?(l=function(m){m.innerHTML=yE(t.getValue())},a=function(m){m.innerHTML=yE(t.getValue())}):s==="lines"?(l=function(m){m.innerHTML=t.lineCount()},a=function(m){m.innerHTML=t.lineCount()}):s==="cursor"?(l=function(m){m.innerHTML="1:1"},o=function(m){var _=t.getCursor(),y=_.line+1,w=_.ch+1;m.innerHTML=y+":"+w}):s==="autosave"?l=function(m){e.autosave!=null&&e.autosave.enabled===!0&&m.setAttribute("id","autosaved")}:s==="upload-image"&&(l=function(m){m.innerHTML=e.imageTexts.sbInit}),r.push({className:s,defaultValue:l,onUpdate:a,onActivity:o})}var u=document.createElement("div");for(u.className="editor-statusbar",i=0;i<r.length;i++){var c=r[i],f=document.createElement("span");f.className=c.className,typeof c.defaultValue=="function"&&c.defaultValue(f),typeof c.onUpdate=="function"&&this.codemirror.on("update",function(m,_){return function(){_.onUpdate(m)}}(f,c)),typeof c.onActivity=="function"&&this.codemirror.on("cursorActivity",function(m,_){return function(){_.onActivity(m)}}(f,c)),u.appendChild(f)}var h=this.codemirror.getWrapperElement();return h.parentNode.insertBefore(u,h.nextSibling),u}};Lr.prototype.value=function(n){var e=this.codemirror;if(n===void 0)return e.getValue();if(e.getDoc().setValue(n),this.isPreviewActive()){var t=e.getWrapperElement(),r=t.lastChild;r.innerHTML=this.options.previewRender(n,r)}return this};Lr.toggleBold=y_;Lr.toggleItalic=$_;Lr.toggleStrikethrough=w_;Lr.toggleBlockquote=z_;Lr.toggleHeadingSmaller=e7;Lr.toggleHeadingBigger=A_;Lr.toggleHeading1=M_;Lr.toggleHeading2=C_;Lr.toggleHeading3=S_;Lr.toggleCodeBlock=k_;Lr.toggleUnorderedList=L_;Lr.toggleOrderedList=E_;Lr.cleanBlock=T_;Lr.drawLink=D_;Lr.drawImage=B_;Lr.drawUploadedImage=Ck;Lr.drawTable=H_;Lr.drawHorizontalRule=O_;Lr.undo=I_;Lr.redo=P_;Lr.togglePreview=V_;Lr.toggleSideBySide=L6;Lr.toggleFullScreen=Td;Lr.prototype.toggleBold=function(){y_(this)};Lr.prototype.toggleItalic=function(){$_(this)};Lr.prototype.toggleStrikethrough=function(){w_(this)};Lr.prototype.toggleBlockquote=function(){z_(this)};Lr.prototype.toggleHeadingSmaller=function(){e7(this)};Lr.prototype.toggleHeadingBigger=function(){A_(this)};Lr.prototype.toggleHeading1=function(){M_(this)};Lr.prototype.toggleHeading2=function(){C_(this)};Lr.prototype.toggleHeading3=function(){S_(this)};Lr.prototype.toggleCodeBlock=function(){k_(this)};Lr.prototype.toggleUnorderedList=function(){L_(this)};Lr.prototype.toggleOrderedList=function(){E_(this)};Lr.prototype.cleanBlock=function(){T_(this)};Lr.prototype.drawLink=function(){D_(this)};Lr.prototype.drawImage=function(){B_(this)};Lr.prototype.drawUploadedImage=function(){Ck(this)};Lr.prototype.drawTable=function(){H_(this)};Lr.prototype.drawHorizontalRule=function(){O_(this)};Lr.prototype.undo=function(){I_(this)};Lr.prototype.redo=function(){P_(this)};Lr.prototype.togglePreview=function(){V_(this)};Lr.prototype.toggleSideBySide=function(){L6(this)};Lr.prototype.toggleFullScreen=function(){Td(this)};Lr.prototype.isPreviewActive=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.lastChild;return/editor-preview-active/.test(t.className)};Lr.prototype.isSideBySideActive=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.nextSibling;return/editor-preview-active-side/.test(t.className)};Lr.prototype.isFullscreenActive=function(){var n=this.codemirror;return n.getOption("fullScreen")};Lr.prototype.getState=function(){var n=this.codemirror;return k5(n)};Lr.prototype.toTextArea=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.parentNode;t&&(this.gui.toolbar&&t.removeChild(this.gui.toolbar),this.gui.statusbar&&t.removeChild(this.gui.statusbar),this.gui.sideBySide&&t.removeChild(this.gui.sideBySide)),t.parentNode.insertBefore(e,t),t.remove(),n.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())};var _ce=Lr;function bce(n){let e,t;return{c(){e=X("div"),t=X("textarea"),t.disabled=!0,D(t,"id",n[0]),D(e,"style",n[3]),D(e,"class","svelte-1gaj2sn"),Te(e,"disabled",n[1])},m(r,i){C(r,e,i),x(e,t),n[9](t)},p(r,[i]){i&1&&D(t,"id",r[0]),i&8&&D(e,"style",r[3]),i&2&&Te(e,"disabled",r[1])},i:ht,o:ht,d(r){r&&M(e),n[9](null)}}}function yce(n,e,t){let r,{height:i=null}=e,{scroll:a=!0}=e,{easyMDEOptions:o=null}=e,{mde:l=null}=e,{id:s=null}=e,{fullScreenOffset:u=null}=e,{disabled:c=!1}=e,f;ar(()=>(t(4,i=i||"200px"),t(5,l=new _ce({element:f,spellChecker:!1,status:!1,unorderedListStyle:"-",maxHeight:a?i:void 0,minHeight:a?void 0:i,...o})),()=>{l.toTextArea()}));const h=_=>{let y="";return y+=`--fullscreen-offset-x:${(_==null?void 0:_.x)||"0px"};`,y+=`--fullscreen-offset-y:${(_==null?void 0:_.y)||"0px"};`,y};function m(_){De[_?"unshift":"push"](()=>{f=_,t(2,f)})}return n.$$set=_=>{"height"in _&&t(4,i=_.height),"scroll"in _&&t(6,a=_.scroll),"easyMDEOptions"in _&&t(7,o=_.easyMDEOptions),"mde"in _&&t(5,l=_.mde),"id"in _&&t(0,s=_.id),"fullScreenOffset"in _&&t(8,u=_.fullScreenOffset),"disabled"in _&&t(1,c=_.disabled)},n.$$.update=()=>{n.$$.dirty&256&&t(3,r=h(u))},[s,c,f,r,i,l,a,o,u,m]}class $ce extends Ve{constructor(e){super(),Pe(this,e,yce,bce,Ie,{height:4,scroll:6,easyMDEOptions:7,mde:5,id:0,fullScreenOffset:8,disabled:1})}}function $E(n){let e,t,r;function i(o){n[8](o)}let a={scroll:!0,height:n[1],id:n[3],fullScreenOffset:n[4],disabled:n[5],easyMDEOptions:{initialValue:n[0],placeholder:n[2],...n[6]}};return n[7]!==void 0&&(a.mde=n[7]),e=new $ce({props:a}),De.push(()=>tt(e,"mde",i)),{c(){O(e.$$.fragment)},m(o,l){B(e,o,l),r=!0},p(o,l){const s={};l&2&&(s.height=o[1]),l&8&&(s.id=o[3]),l&16&&(s.fullScreenOffset=o[4]),l&32&&(s.disabled=o[5]),l&69&&(s.easyMDEOptions={initialValue:o[0],placeholder:o[2],...o[6]}),!t&&l&128&&(t=!0,s.mde=o[7],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function wce(n){let e=n[1],t,r,i=$E(n);return{c(){i.c(),t=yt()},m(a,o){i.m(a,o),C(a,t,o),r=!0},p(a,[o]){o&2&&Ie(e,e=a[1])?(we(),$(i,1,1,ht),ke(),i=$E(a),i.c(),b(i,1),i.m(t.parentNode,t)):i.p(a,o)},i(a){r||(b(i),r=!0)},o(a){$(i),r=!1},d(a){a&&M(t),i.d(a)}}}function kce(n,e,t){let{value:r=null}=e,{height:i=null}=e,{placeholder:a=null}=e,{id:o=null}=e,{fullScreenOffset:l=0}=e,{disabled:s=!1}=e,{easyMDEOptions:u}=e;const c=Nn();let f,h;const m=S=>{h&&S!==f&&h.value(S)},w=((S,T)=>{let I;return()=>{clearTimeout(I),I=setTimeout(S,T)}})(()=>{f=h.value(),c("change",f)},250);function A(S){h=S,t(7,h)}return n.$$set=S=>{"value"in S&&t(0,r=S.value),"height"in S&&t(1,i=S.height),"placeholder"in S&&t(2,a=S.placeholder),"id"in S&&t(3,o=S.id),"fullScreenOffset"in S&&t(4,l=S.fullScreenOffset),"disabled"in S&&t(5,s=S.disabled),"easyMDEOptions"in S&&t(6,u=S.easyMDEOptions)},n.$$.update=()=>{n.$$.dirty&1&&m(r),n.$$.dirty&128&&(h==null||h.codemirror.on("change",w))},[r,i,a,o,l,s,u,h,A]}class zce extends Ve{constructor(e){super(),Pe(this,e,kce,wce,Ie,{value:0,height:1,placeholder:2,id:3,fullScreenOffset:4,disabled:5,easyMDEOptions:6})}}function Ace(n){let e,t,r;return t=new zce({props:{value:n[0],placeholder:n[1],height:n[4],id:n[5],fullScreenOffset:n[6],disabled:n[2],easyMDEOptions:n[7]}}),t.$on("change",n[8]),{c(){e=X("div"),O(t.$$.fragment),D(e,"class","svelte-rs8sig"),Te(e,"error",n[3])},m(i,a){C(i,e,a),B(t,e,null),r=!0},p(i,[a]){const o={};a&1&&(o.value=i[0]),a&2&&(o.placeholder=i[1]),a&16&&(o.height=i[4]),a&32&&(o.id=i[5]),a&64&&(o.fullScreenOffset=i[6]),a&4&&(o.disabled=i[2]),a&128&&(o.easyMDEOptions=i[7]),t.$set(o),a&8&&Te(e,"error",i[3])},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),H(t)}}}function Mce(n,e,t){let{value:r=""}=e,{placeholder:i=null}=e,{disabled:a=!1}=e,{error:o=null}=e,{height:l=null}=e,{id:s=null}=e,{fullScreenOffset:u=null}=e,{easyMDEOptions:c=null}=e;function f(h){Hn.call(this,n,h)}return n.$$set=h=>{"value"in h&&t(0,r=h.value),"placeholder"in h&&t(1,i=h.placeholder),"disabled"in h&&t(2,a=h.disabled),"error"in h&&t(3,o=h.error),"height"in h&&t(4,l=h.height),"id"in h&&t(5,s=h.id),"fullScreenOffset"in h&&t(6,u=h.fullScreenOffset),"easyMDEOptions"in h&&t(7,c=h.easyMDEOptions)},[r,i,a,o,l,s,u,c,f]}class Cce extends Ve{constructor(e){super(),Pe(this,e,Mce,Ace,Ie,{value:0,placeholder:1,disabled:2,error:3,height:4,id:5,fullScreenOffset:6,easyMDEOptions:7})}}function Sce(n){let e,t;return e=new Cce({props:{error:n[5],disabled:n[4],value:n[0],placeholder:n[3],height:n[6],id:n[7],fullScreenOffset:n[8],easyMDEOptions:n[9]}}),e.$on("change",n[10]),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&32&&(a.error=r[5]),i&16&&(a.disabled=r[4]),i&1&&(a.value=r[0]),i&8&&(a.placeholder=r[3]),i&64&&(a.height=r[6]),i&128&&(a.id=r[7]),i&256&&(a.fullScreenOffset=r[8]),i&512&&(a.easyMDEOptions=r[9]),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 Lce(n){let e,t;return e=new Sc({props:{label:n[1],labelPosition:n[2],error:n[5],$$slots:{default:[Sce]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.label=r[1]),i&4&&(a.labelPosition=r[2]),i&32&&(a.error=r[5]),i&5113&&(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 Ece(n,e,t){let{value:r=null}=e,{label:i=null}=e,{labelPosition:a="above"}=e,{placeholder:o=null}=e,{disabled:l=!1}=e,{error:s=null}=e,{height:u=null}=e,{id:c=null}=e,{fullScreenOffset:f=null}=e,{easyMDEOptions:h=null}=e;const m=Nn(),_=y=>{t(0,r=y.detail),m("change",y.detail)};return n.$$set=y=>{"value"in y&&t(0,r=y.value),"label"in y&&t(1,i=y.label),"labelPosition"in y&&t(2,a=y.labelPosition),"placeholder"in y&&t(3,o=y.placeholder),"disabled"in y&&t(4,l=y.disabled),"error"in y&&t(5,s=y.error),"height"in y&&t(6,u=y.height),"id"in y&&t(7,c=y.id),"fullScreenOffset"in y&&t(8,f=y.fullScreenOffset),"easyMDEOptions"in y&&t(9,h=y.easyMDEOptions)},[r,i,a,o,l,s,u,c,f,h,_]}class Tce extends Ve{constructor(e){super(),Pe(this,e,Ece,Lce,Ie,{value:0,label:1,labelPosition:2,placeholder:3,disabled:4,error:5,height:6,id:7,fullScreenOffset:8,easyMDEOptions:9})}}function wE(n){let e,t,r;return t=new Vu({props:{$$slots:{default:[Dce]},$$scope:{ctx:n}}}),{c(){e=X("div"),O(t.$$.fragment),D(e,"class","title svelte-glsrm")},m(i,a){C(i,e,a),B(t,e,null),r=!0},p(i,a){const o={};a&5&&(o.$$scope={dirty:a,ctx:i}),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 Dce(n){let e;return{c(){e=oe(n[0])},m(t,r){C(t,e,r)},p(t,r){r&1&>(e,t[0])},d(t){t&&M(e)}}}function Bce(n){let e,t,r,i,a=n[0]&&wE(n);const o=n[1].default,l=Xn(o,n,n[2],null);return{c(){e=X("div"),a&&a.c(),t=q(),r=X("div"),l&&l.c(),D(r,"class","list-items svelte-glsrm")},m(s,u){C(s,e,u),a&&a.m(e,null),x(e,t),x(e,r),l&&l.m(r,null),i=!0},p(s,[u]){s[0]?a?(a.p(s,u),u&1&&b(a,1)):(a=wE(s),a.c(),b(a,1),a.m(e,t)):a&&(we(),$(a,1,1,()=>{a=null}),ke()),l&&l.p&&(!i||u&4)&&Zn(l,o,s,s[2],i?Jn(o,s[2],u,null):Qn(s[2]),null)},i(s){i||(b(a),b(l,s),i=!0)},o(s){$(a),$(l,s),i=!1},d(s){s&&M(e),a&&a.d(),l&&l.d(s)}}}function Hce(n,e,t){let{$$slots:r={},$$scope:i}=e,{title:a=null}=e;return n.$$set=o=>{"title"in o&&t(0,a=o.title),"$$scope"in o&&t(2,i=o.$$scope)},[a,r,i]}class E6 extends Ve{constructor(e){super(),Pe(this,e,Hce,Bce,Ie,{title:0})}}function kE(n){let e,t;return e=new Jw({props:{icon:n[0],color:n[2],background:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&1&&(a.icon=r[0]),i&4&&(a.color=r[2]),i&2&&(a.background=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 zE(n){let e,t;return e=new Fd({props:{initials:n[7]}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&128&&(a.initials=r[7]),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 AE(n){let e,t;return e=new jt({props:{$$slots:{default:[Oce]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&1040&&(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 Oce(n){let e;return{c(){e=oe(n[4])},m(t,r){C(t,e,r)},p(t,r){r&16&>(e,t[4])},d(t){t&&M(e)}}}function ME(n){let e,t;return e=new sn({props:{$$slots:{default:[Ice]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&1056&&(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 Ice(n){let e;return{c(){e=oe(n[5])},m(t,r){C(t,e,r)},p(t,r){r&32&>(e,t[5])},d(t){t&&M(e)}}}function Pce(n){let e,t,r,i,a,o,l,s,u,c,f=n[0]&&kE(n),h=n[3]&&zE(n),m=n[4]&&AE(n),_=n[5]&&ME(n);const y=n[8].default,w=Xn(y,n,n[10],null);return{c(){e=X("div"),t=X("div"),f&&f.c(),r=q(),h&&h.c(),i=q(),m&&m.c(),a=q(),_&&_.c(),o=q(),l=X("div"),w&&w.c(),D(t,"class","left svelte-15u15t4"),D(l,"class","right svelte-15u15t4"),D(e,"class","list-item svelte-15u15t4"),Te(e,"hoverable",n[6])},m(A,S){C(A,e,S),x(e,t),f&&f.m(t,null),x(t,r),h&&h.m(t,null),x(t,i),m&&m.m(t,null),x(t,a),_&&_.m(t,null),x(e,o),x(e,l),w&&w.m(l,null),s=!0,u||(c=At(e,"click",n[9]),u=!0)},p(A,[S]){A[0]?f?(f.p(A,S),S&1&&b(f,1)):(f=kE(A),f.c(),b(f,1),f.m(t,r)):f&&(we(),$(f,1,1,()=>{f=null}),ke()),A[3]?h?(h.p(A,S),S&8&&b(h,1)):(h=zE(A),h.c(),b(h,1),h.m(t,i)):h&&(we(),$(h,1,1,()=>{h=null}),ke()),A[4]?m?(m.p(A,S),S&16&&b(m,1)):(m=AE(A),m.c(),b(m,1),m.m(t,a)):m&&(we(),$(m,1,1,()=>{m=null}),ke()),A[5]?_?(_.p(A,S),S&32&&b(_,1)):(_=ME(A),_.c(),b(_,1),_.m(t,null)):_&&(we(),$(_,1,1,()=>{_=null}),ke()),w&&w.p&&(!s||S&1024)&&Zn(w,y,A,A[10],s?Jn(y,A[10],S,null):Qn(A[10]),null),S&64&&Te(e,"hoverable",A[6])},i(A){s||(b(f),b(h),b(m),b(_),b(w,A),s=!0)},o(A){$(f),$(h),$(m),$(_),$(w,A),s=!1},d(A){A&&M(e),f&&f.d(),h&&h.d(),m&&m.d(),_&&_.d(),w&&w.d(A),u=!1,c()}}}function Vce(n,e,t){let r,{$$slots:i={},$$scope:a}=e,{icon:o=null}=e,{iconBackground:l=null}=e,{iconColor:s=null}=e,{avatar:u=!1}=e,{title:c=null}=e,{subtitle:f=null}=e,{hoverable:h=!1}=e;function m(_){Hn.call(this,n,_)}return n.$$set=_=>{"icon"in _&&t(0,o=_.icon),"iconBackground"in _&&t(1,l=_.iconBackground),"iconColor"in _&&t(2,s=_.iconColor),"avatar"in _&&t(3,u=_.avatar),"title"in _&&t(4,c=_.title),"subtitle"in _&&t(5,f=_.subtitle),"hoverable"in _&&t(6,h=_.hoverable),"$$scope"in _&&t(10,a=_.$$scope)},n.$$.update=()=>{n.$$.dirty&24&&t(7,r=u?c==null?void 0:c[0]:null)},[o,l,s,u,c,f,h,r,i,m,a]}class E4 extends Ve{constructor(e){super(),Pe(this,e,Vce,Pce,Ie,{icon:0,iconBackground:1,iconColor:2,avatar:3,title:4,subtitle:5,hoverable:6})}}function Rce(n){let e,t;const r=n[1].default,i=Xn(r,n,n[0],null);return{c(){e=X("div"),i&&i.c(),D(e,"class","icon-side-nav svelte-krsn3q")},m(a,o){C(a,e,o),i&&i.m(e,null),t=!0},p(a,[o]){i&&i.p&&(!t||o&1)&&Zn(i,r,a,a[0],t?Jn(r,a[0],o,null):Qn(a[0]),null)},i(a){t||(b(i,a),t=!0)},o(a){$(i,a),t=!1},d(a){a&&M(e),i&&i.d(a)}}}function Nce(n,e,t){let{$$slots:r={},$$scope:i}=e;return n.$$set=a=>{"$$scope"in a&&t(0,i=a.$$scope)},[i,r]}class Fce extends Ve{constructor(e){super(),Pe(this,e,Nce,Rce,Ie,{})}}function CE(n){let e,t,r,i;return t=new z6({props:{textWrapping:!0,direction:"right",text:n[2]}}),{c(){e=X("div"),O(t.$$.fragment),D(e,"class","tooltip svelte-12yq719")},m(a,o){C(a,e,o),B(t,e,null),i=!0},p(a,o){const l={};o&4&&(l.text=a[2]),t.$set(l)},i(a){i||(b(t.$$.fragment,a),r||Po(()=>{r=Sd(e,ip,{duration:130,delay:250}),r.start()}),i=!0)},o(a){$(t.$$.fragment,a),i=!1},d(a){a&&M(e),H(t)}}}function jce(n){let e,t,r,i,a,o;t=new un({props:{name:n[0],hoverable:!0}});let l=n[2]&&n[3]&&CE(n);return{c(){e=X("div"),O(t.$$.fragment),r=q(),l&&l.c(),D(e,"class","icon-side-nav-item svelte-12yq719"),Te(e,"active",n[1])},m(s,u){C(s,e,u),B(t,e,null),x(e,r),l&&l.m(e,null),i=!0,a||(o=[At(e,"mouseover",n[5]),At(e,"focus",n[6]),At(e,"mouseleave",n[7]),At(e,"click",n[4])],a=!0)},p(s,[u]){const c={};u&1&&(c.name=s[0]),t.$set(c),s[2]&&s[3]?l?(l.p(s,u),u&12&&b(l,1)):(l=CE(s),l.c(),b(l,1),l.m(e,null)):l&&(we(),$(l,1,1,()=>{l=null}),ke()),u&2&&Te(e,"active",s[1])},i(s){i||(b(t.$$.fragment,s),b(l),i=!0)},o(s){$(t.$$.fragment,s),$(l),i=!1},d(s){s&&M(e),H(t),l&&l.d(),a=!1,Vi(o)}}}function xce(n,e,t){let{icon:r}=e,{active:i=!1}=e,{tooltip:a}=e,o=!1;function l(f){Hn.call(this,n,f)}const s=()=>t(3,o=!0),u=()=>t(3,o=!0),c=()=>t(3,o=!1);return n.$$set=f=>{"icon"in f&&t(0,r=f.icon),"active"in f&&t(1,i=f.active),"tooltip"in f&&t(2,a=f.tooltip)},[r,i,a,o,l,s,u,c]}class hg extends Ve{constructor(e){super(),Pe(this,e,xce,jce,Ie,{icon:0,active:1,tooltip:2})}}function Uce(n){let e,t,r,i;return{c(){e=X("div"),t=X("input"),D(t,"type","range"),D(t,"min",n[3]),D(t,"max",n[4]),D(t,"step",n[5]),t.value=n[0],t.disabled=n[2],D(t,"id",n[1]),D(t,"class","svelte-13v9q49"),D(e,"class","svelte-13v9q49")},m(a,o){C(a,e,o),x(e,t),r||(i=At(t,"change",n[6]),r=!0)},p(a,[o]){o&8&&D(t,"min",a[3]),o&16&&D(t,"max",a[4]),o&32&&D(t,"step",a[5]),o&1&&(t.value=a[0]),o&4&&(t.disabled=a[2]),o&2&&D(t,"id",a[1])},i:ht,o:ht,d(a){a&&M(e),r=!1,i()}}}function qce(n,e,t){let{value:r=!1}=e,{id:i=null}=e,{disabled:a=!1}=e,{min:o=0}=e,{max:l=100}=e,{step:s=1}=e;const u=Nn(),c=f=>{u("change",f.target.value)};return n.$$set=f=>{"value"in f&&t(0,r=f.value),"id"in f&&t(1,i=f.id),"disabled"in f&&t(2,a=f.disabled),"min"in f&&t(3,o=f.min),"max"in f&&t(4,l=f.max),"step"in f&&t(5,s=f.step)},[r,i,a,o,l,s,c]}class Wce extends Ve{constructor(e){super(),Pe(this,e,qce,Uce,Ie,{value:0,id:1,disabled:2,min:3,max:4,step:5})}}function Gce(n){let e,t;return e=new Wce({props:{disabled:n[6],value:n[0],min:n[3],max:n[4],step:n[5]}}),e.$on("change",n[8]),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&64&&(a.disabled=r[6]),i&1&&(a.value=r[0]),i&8&&(a.min=r[3]),i&16&&(a.max=r[4]),i&32&&(a.step=r[5]),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 Yce(n){let e,t;return e=new Sc({props:{label:n[1],labelPosition:n[2],error:n[7],$$slots:{default:[Gce]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.label=r[1]),i&4&&(a.labelPosition=r[2]),i&128&&(a.error=r[7]),i&1145&&(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 Kce(n,e,t){let{value:r=null}=e,{label:i=null}=e,{labelPosition:a="above"}=e,{min:o=0}=e,{max:l=100}=e,{step:s=1}=e,{disabled:u=!1}=e,{error:c=null}=e;const f=Nn(),h=m=>{t(0,r=m.detail),f("change",m.detail)};return n.$$set=m=>{"value"in m&&t(0,r=m.value),"label"in m&&t(1,i=m.label),"labelPosition"in m&&t(2,a=m.labelPosition),"min"in m&&t(3,o=m.min),"max"in m&&t(4,l=m.max),"step"in m&&t(5,s=m.step),"disabled"in m&&t(6,u=m.disabled),"error"in m&&t(7,c=m.error)},[r,i,a,o,l,s,u,c,h]}class Xce extends Ve{constructor(e){super(),Pe(this,e,Kce,Yce,Ie,{value:0,label:1,labelPosition:2,min:3,max:4,step:5,disabled:6,error:7})}}function Jce(n){let e,t;return{c(){e=X("div"),t=oe(n[0]),D(e,"class","bold svelte-9amtlb")},m(r,i){C(r,e,i),x(e,t)},p(r,[i]){i&1&>(t,r[0])},i:ht,o:ht,d(r){r&&M(e)}}}function Zce(n,e,t){let{value:r}=e;return n.$$set=i=>{"value"in i&&t(0,r=i.value)},[r]}class Qce extends Ve{constructor(e){super(),Pe(this,e,Zce,Jce,Ie,{value:0})}}function e2e(n){let e,t;return{c(){e=X("code"),t=oe(n[0]),D(e,"class","svelte-e82i3")},m(r,i){C(r,e,i),x(e,t)},p(r,[i]){i&1&>(t,r[0])},i:ht,o:ht,d(r){r&&M(e)}}}function t2e(n,e,t){let{value:r}=e;return n.$$set=i=>{"value"in i&&t(0,r=i.value)},[r]}class n2e extends Ve{constructor(e){super(),Pe(this,e,t2e,e2e,Ie,{value:0})}}const Qf={Equals:{value:"equal",label:"Equals"},NotEquals:{value:"notEqual",label:"Not equals"},Empty:{value:"empty",label:"Is empty"},NotEmpty:{value:"notEmpty",label:"Is not empty"},StartsWith:{value:"string",label:"Starts with"},Like:{value:"fuzzy",label:"Like"},MoreThan:{value:"rangeLow",label:"More than"},LessThan:{value:"rangeHigh",label:"Less than"},Contains:{value:"contains",label:"Contains"},NotContains:{value:"notContains",label:"Does not contain"},In:{value:"oneOf",label:"Is in"},ContainsAny:{value:"containsAny",label:"Has any"}},Bh={Auth:"budibase:auth",CurrentApp:"budibase:currentapp",ReturnUrl:"budibase:returnurl",AccountReturnUrl:"budibase:account:returnurl"},EG={USERS:"ta_users"},u5={AppUser:"appUser",Developer:"developer",Admin:"admin"},R_=[{label:"App User",value:u5.AppUser},{label:"Developer",value:u5.Developer},{label:"Admin",value:u5.Admin}],TG=[{value:u5.AppUser,icon:"User",label:"App user - Only has access to published apps"},{value:u5.Developer,icon:"Hammer",label:"Developer - Access to the app builder"},{value:u5.Admin,icon:"Draw",label:"Admin - Full access"}],w4={FREE:"free",TEAM:"team",PRO:"pro",BUSINESS:"business",ENTERPRISE:"enterprise"},DG="1",P$={USER_GROUPS:"userGroups",BACKUPS:"appBackups"},W2={ADMIN:"ADMIN",POWER:"POWER",BASIC:"BASIC",PUBLIC:"PUBLIC",BUILDER:"BUILDER"},V$={integer:{max:2147483647,min:-2147483648},int:{max:2147483647,min:-2147483648},smallint:{max:32767,min:-32768},mediumint:{max:8388607,min:-8388608}},n6=[{class:"lightest",name:"Lightest"},{class:"light",name:"Light"},{class:"dark",name:"Dark"},{class:"darkest",name:"Darkest"},{class:"nord",name:"Nord",base:"darkest"},{class:"midnight",name:"Midnight",base:"darkest"}],r2e=Object.freeze(Object.defineProperty({__proto__:null,OperatorOptions:Qf,Cookies:Bh,TableNames:EG,BudibaseRoles:u5,BudibaseRoleOptions:R_,BuilderRoleDescriptions:TG,PlanType:w4,ApiVersion:DG,Features:P$,Roles:W2,SqlNumberTypeRangeMap:V$,Themes:n6},Symbol.toStringTag,{value:"Module"})),i2e=n=>({getAnalyticsStatus:async()=>await n.get({url:"/api/bbtel"}),analyticsPing:async({source:e})=>{const t=Intl.DateTimeFormat().resolvedOptions().timeZone;return await n.post({url:"/api/bbtel/ping",body:{source:e,timezone:t}})}}),a2e=n=>({fetchAppPackage:async e=>await n.get({url:`/api/applications/${e}/appPackage`}),saveAppMetadata:async({appId:e,metadata:t})=>await n.put({url:`/api/applications/${e}`,body:t}),deployAppChanges:async()=>await n.post({url:"/api/deploy"}),revertAppChanges:async e=>await n.post({url:`/api/dev/${e}/revert`}),updateAppClientVersion:async e=>await n.post({url:`/api/applications/${e}/client/update`}),revertAppClientVersion:async e=>await n.post({url:`/api/applications/${e}/client/revert`}),getAppDeployments:async()=>await n.get({url:"/api/deployments"}),createApp:async e=>await n.post({url:"/api/applications",body:e,json:!1}),importApps:async e=>await n.post({url:"/api/cloud/import",body:e,json:!1}),unpublishApp:async e=>await n.delete({url:`/api/applications/${e}?unpublish=1`}),deleteApp:async e=>await n.delete({url:`/api/applications/${e}`}),releaseAppLock:async e=>await n.delete({url:`/api/dev/${e}/lock`}),syncApp:async e=>await n.post({url:`/api/applications/${e}/sync`}),getApps:async()=>await n.get({url:"/api/applications?status=all"}),fetchComponentLibDefinitions:async e=>await n.get({url:`/api/${e}/components/definitions`})}),o2e=n=>{const e=async({datasourceId:t,bucket:r,key:i})=>await n.post({url:`/api/attachments/${t}/url`,body:{bucket:r,key:i}});return{getSignedDatasourceURL:e,uploadAttachment:async({data:t,tableId:r})=>await n.post({url:`/api/attachments/${r}/upload`,body:t,json:!1}),uploadBuilderAttachment:async t=>await n.post({url:"/api/attachments/process",body:t,json:!1}),externalUpload:async({datasourceId:t,bucket:r,key:i,data:a})=>{const{signedUrl:o,publicUrl:l}=await e({datasourceId:t,bucket:r,key:i});return await n.put({url:o,body:a,json:!1,external:!0}),{publicUrl:l}},deleteAttachments:async({keys:t,tableId:r})=>await n.post({url:`/api/attachments/${r}/delete`,body:{keys:t}}),deleteBuilderAttachments:async t=>await n.post({url:"/api/attachments/delete",body:{keys:t}})}},l2e=n=>({logIn:async({tenantId:e,username:t,password:r})=>await n.post({url:`/api/global/auth/${e}/login`,body:{username:t,password:r}}),logOut:async()=>await n.post({url:"/api/global/auth/logout"}),setInitInfo:async e=>await n.post({url:"/api/global/auth/init",body:e}),getInitInfo:async()=>await n.get({url:"/api/global/auth/init"}),requestForgotPassword:async({tenantId:e,email:t})=>await n.post({url:`/api/global/auth/${e}/reset`,body:{email:t}}),resetPassword:async({tenantId:e,password:t,resetCode:r})=>await n.post({url:`/api/global/auth/${e}/reset/update`,body:{password:t,resetCode:r}})}),s2e=n=>({triggerAutomation:async({automationId:e,fields:t})=>await n.post({url:`/api/automations/${e}/trigger`,body:{fields:t}}),testAutomation:async({automationId:e,testData:t})=>await n.post({url:`/api/automations/${e}/test`,body:t}),getAutomations:async()=>await n.get({url:"/api/automations"}),getAutomationDefinitions:async()=>await n.get({url:"/api/automations/definitions/list"}),createAutomation:async e=>await n.post({url:"/api/automations",body:e}),updateAutomation:async e=>await n.put({url:"/api/automations",body:e}),deleteAutomation:async({automationId:e,automationRev:t})=>await n.delete({url:`/api/automations/${e}/${t}`}),getAutomationLogs:async({automationId:e,startDate:t,status:r,page:i})=>await n.post({url:"/api/automations/logs/search",body:{automationId:e,startDate:t,status:r,page:i}}),clearAutomationLogErrors:async({automationId:e,appId:t})=>await n.delete({url:"/api/automations/logs",body:{appId:t,automationId:e}})}),u2e=n=>({saveConfig:async e=>await n.post({url:"/api/global/configs",body:e}),getConfig:async e=>await n.get({url:`/api/global/configs/${e}`}),deleteConfig:async({id:e,rev:t})=>await n.delete({url:`/api/global/configs/${e}/${t}`}),getTenantConfig:async e=>await n.get({url:`/api/global/configs/public?tenantId=${e}`}),getOIDCConfig:async e=>await n.get({url:`/api/global/configs/public/oidc?tenantId=${e}`}),getChecklist:async e=>await n.get({url:`/api/global/configs/checklist?tenantId=${e}`}),uploadLogo:async e=>await n.post({url:"/api/global/configs/upload/settings/logoUrl",body:e,json:!1}),uploadOIDCLogo:async({name:e,data:t})=>await n.post({url:`/api/global/configs/upload/logos_oidc/${e}`,body:t,json:!1}),getOIDCLogos:async()=>await n.get({url:"/api/global/configs/logos_oidc"})}),c2e=n=>({getDatasources:async()=>await n.get({url:"/api/datasources"}),buildDatasourceSchema:async({datasourceId:e,tablesFilter:t})=>await n.post({url:`/api/datasources/${e}/schema`,body:{tablesFilter:t}}),createDatasource:async({datasource:e,fetchSchema:t})=>await n.post({url:"/api/datasources",body:{datasource:e,fetchSchema:t}}),updateDatasource:async e=>await n.put({url:`/api/datasources/${e._id}`,body:e}),deleteDatasource:async({datasourceId:e,datasourceRev:t})=>await n.delete({url:`/api/datasources/${e}/${t}`})}),f2e=n=>({getFlags:async()=>await n.get({url:"/api/users/flags"}),updateFlag:async({flag:e,value:t})=>await n.post({url:"/api/users/flags",body:{flag:e,value:t}}),toggleUiFeature:async({value:e})=>await n.post({url:`/api/beta/${e}`})}),p2e=n=>({getHostingURLs:async()=>await n.get({url:"/api/hosting/urls"}),getDeployedApps:async()=>await n.get({url:"/api/hosting/apps"})}),d2e=n=>({saveLayout:async e=>await n.post({url:"/api/layouts",body:e}),deleteLayout:async({layoutId:e,layoutRev:t})=>await n.delete({url:`/api/layouts/${e}/${t}`})}),h2e=n=>({checkImportComplete:async()=>await n.get({url:"/api/cloud/import/complete"}),getEnvironment:async()=>await n.get({url:"/api/system/environment"}),getSystemStatus:async()=>await n.get({url:"/api/system/status"}),getIntegrations:async()=>await n.get({url:"/api/integrations"}),getBudibaseVersion:async()=>(await n.get({url:"/api/dev/version"})).version,getBasePermissions:async()=>await n.get({url:"/api/permission/builtin"}),checkBetaAccess:async e=>await n.get({url:`/api/beta/access?email=${e}`,external:!0})}),m2e=n=>({getPermissionForResource:async e=>await n.get({url:`/api/permission/${e}`}),updatePermissionForResource:async({resourceId:e,roleId:t,level:r})=>await n.post({url:`/api/permission/${t}/${e}/${r}`})}),g2e=n=>({executeQuery:async({queryId:e,pagination:t,parameters:r})=>await n.post({url:`/api/v2/queries/${e}`,body:{parameters:r,pagination:t}}),fetchQueryDefinition:async e=>await n.get({url:`/api/queries/${e}`,cache:!0}),getQueries:async()=>await n.get({url:"/api/queries"}),saveQuery:async e=>await n.post({url:"/api/queries",body:e}),deleteQuery:async({queryId:e,queryRev:t})=>await n.delete({url:`/api/queries/${e}/${t}`}),importQueries:async({datasourceId:e,data:t})=>await n.post({url:"/api/queries/import",body:{datasourceId:e,data:t}}),previewQuery:async e=>await n.post({url:"/api/queries/preview",body:e})}),v2e=n=>({fetchRelationshipData:async({tableId:e,rowId:t,fieldName:r})=>{if(!e||!t)return[];const i=await n.get({url:`/api/${e}/${t}/enrich`});return r?i[r]||[]:i||[]}}),_2e=n=>({deleteRole:async({roleId:e,roleRev:t})=>await n.delete({url:`/api/roles/${e}/${t}`}),saveRole:async e=>await n.post({url:"/api/roles",body:e}),getRoles:async()=>await n.get({url:"/api/roles"}),getRolesForApp:async e=>await n.get({url:`/api/global/roles/${e}`})}),b2e=n=>({fetchClientAppRoutes:async()=>await n.get({url:"/api/routing/client"}),fetchAppRoutes:async()=>await n.get({url:"/api/routing"})}),y2e=n=>({fetchRow:async({tableId:e,rowId:t})=>!e||!t?null:await n.get({url:`/api/${e}/rows/${t}`}),saveRow:async e=>{if(!!(e!=null&&e.tableId))return await n.post({url:`/api/${e.tableId}/rows`,body:e})},deleteRow:async({tableId:e,rowId:t,revId:r})=>{if(!(!e||!t))return await n.delete({url:`/api/${e}/rows`,body:{_id:t,_rev:r}})},deleteRows:async({tableId:e,rows:t})=>await n.delete({url:`/api/${e}/rows`,body:{rows:t}}),exportRows:async({tableId:e,rows:t,format:r,columns:i})=>await n.post({url:`/api/${e}/rows/exportRows?format=${r}`,body:{rows:t,columns:i},parseResponse:async a=>await a.text()})}),$2e=n=>({saveScreen:async e=>await n.post({url:"/api/screens",body:e}),deleteScreen:async({screenId:e,screenRev:t})=>await n.delete({url:`/api/screens/${e}/${t}`})}),w2e=n=>({fetchTableDefinition:async e=>await n.get({url:`/api/tables/${e}`,cache:!0}),fetchTableData:async e=>await n.get({url:`/api/${e}/rows`}),searchTable:async({tableId:e,query:t,bookmark:r,limit:i,sort:a,sortOrder:o,sortType:l,paginate:s})=>!e||!t?{rows:[]}:await n.post({url:`/api/${e}/search`,body:{query:t,bookmark:r,limit:i,sort:a,sortOrder:o,sortType:l,paginate:s}}),importTableData:async({tableId:e,data:t})=>await n.post({url:`/api/tables/${e}/import`,body:{dataImport:t}}),validateTableCSV:async({tableId:e,csvString:t,schema:r})=>await n.post({url:"/api/tables/csv/validate",body:{csvString:t,schema:r,tableId:e}}),getTables:async()=>await n.get({url:"/api/tables"}),saveTable:async e=>await n.post({url:"/api/tables",body:e}),deleteTable:async({tableId:e,tableRev:t})=>await n.delete({url:`/api/tables/${e}/${t}`})}),k2e=n=>({getEmailTemplateDefinitions:async()=>await n.get({url:"/api/global/template/definitions"}),getEmailTemplates:async()=>await n.get({url:"/api/global/template/email"}),saveEmailTemplate:async e=>await n.post({url:"/api/global/template",body:e}),getAppTemplates:async()=>await n.get({url:"/api/templates"})}),z2e=n=>({getUsers:async()=>await n.get({url:"/api/global/users"}),searchUsers:async({page:e,email:t,appId:r}={})=>{const i={};return e&&(i.page=e),t&&(i.email=t),r&&(i.appId=r),await n.post({url:"/api/global/users/search",body:i})},getUser:async e=>await n.get({url:`/api/global/users/${e}`}),createAppUser:async e=>await n.post({url:"/api/users/metadata",body:e}),updateOwnMetadata:async e=>await n.post({url:"/api/users/metadata/self",body:e}),createAdminUser:async e=>await n.post({url:"/api/global/users/init",body:e}),saveUser:async e=>await n.post({url:"/api/global/users",body:e}),createUsers:async({users:e,groups:t})=>(await n.post({url:"/api/global/users/bulk",body:{create:{users:e,groups:t}}})).created,deleteUser:async e=>await n.delete({url:`/api/global/users/${e}`}),deleteUsers:async e=>(await n.post({url:"/api/global/users/bulk",body:{delete:{userIds:e}}})).deleted,inviteUser:async({email:e,builder:t,admin:r})=>await n.post({url:"/api/global/users/invite",body:{email:e,userInfo:{admin:r?{global:!0}:void 0,builder:t?{global:!0}:void 0}}}),inviteUsers:async e=>await n.post({url:"/api/global/users/multi/invite",body:e.map(t=>({email:t.email,userInfo:{admin:t.admin?{global:!0}:void 0,builder:t.admin||t.builder?{global:!0}:void 0,groups:t.groups}}))}),acceptInvite:async({inviteCode:e,password:t})=>await n.post({url:"/api/global/users/invite/accept",body:{inviteCode:e,password:t}}),getUserCountByApp:async({appId:e})=>await n.get({url:`/api/global/users/count/${e}`})}),A2e=n=>({generateAPIKey:async()=>{const e=await n.post({url:"/api/global/self/api_key"});return e==null?void 0:e.apiKey},fetchDeveloperInfo:async()=>n.get({url:"/api/global/self/api_key"}),fetchSelf:async()=>await n.get({url:"/api/self"}),fetchBuilderSelf:async()=>await n.get({url:"/api/global/self"}),updateSelf:async e=>await n.post({url:"/api/global/self",body:e})}),M2e=n=>({fetchViewData:async({name:e,field:t,groupBy:r,calculation:i})=>{const a=new URLSearchParams;i&&(a.set("field",t),a.set("calculation",i)),r&&a.set("group",r);const o=t?`/api/views/${e}?${a}`:`/api/views/${e}`;return await n.get({url:o})},exportView:async({viewName:e,format:t})=>{const r=encodeURIComponent(e);return await n.get({url:`/api/views/export?view=${r}&format=${t}`,parseResponse:async i=>await i.text()})},saveView:async e=>await n.post({url:"/api/views",body:e}),deleteView:async e=>await n.delete({url:`/api/views/${e}`})}),C2e=n=>({activateLicenseKey:async e=>n.post({url:"/api/global/license/activate",body:e}),deleteLicenseKey:async()=>n.delete({url:"/api/global/license/info"}),getLicenseInfo:async()=>n.get({url:"/api/global/license/info"}),refreshLicense:async()=>n.post({url:"/api/global/license/refresh"}),getQuotaUsage:async()=>n.get({url:"/api/global/license/usage"})}),S2e=n=>{async function e(t,r,i,a){return Array.isArray(a)||(a=[a]),await n.post({url:`/api/global/groups/${t}/${r}`,body:{[i]:a}})}return{saveGroup:async t=>await n.post({url:"/api/global/groups",body:t}),getGroups:async()=>await n.get({url:"/api/global/groups"}),getGroup:async t=>await n.get({url:`/api/global/groups/${t}`}),deleteGroup:async({id:t,rev:r})=>await n.delete({url:`/api/global/groups/${t}/${r}`}),addUsersToGroup:async(t,r)=>e(t,"users","add",r),removeUsersFromGroup:async(t,r)=>e(t,"users","remove",r),addAppsToGroup:async(t,r)=>e(t,"apps","add",r),removeAppsFromGroup:async(t,r)=>e(t,"apps","remove",r)}},L2e=n=>({uploadPlugin:async e=>await n.post({url:"/api/plugin/upload",body:e,json:!1}),createPlugin:async e=>await n.post({url:"/api/plugin",body:e}),getPlugins:async()=>await n.get({url:"/api/plugin"}),deletePlugin:async e=>await n.delete({url:`/api/plugin/${e}`})}),E2e=n=>({searchBackups:async({appId:e,trigger:t,type:r,page:i,startDate:a,endDate:o})=>{const l={};return i&&(l.page=i),t&&r&&(l.trigger=t.toLowerCase(),l.type=r.toLowerCase()),a&&o&&(l.startDate=a,l.endDate=o),await n.post({url:`/api/apps/${e}/backups/search`,body:l})},createManualBackup:async({appId:e,name:t})=>await n.post({url:`/api/apps/${e}/backups`,body:{name:t}}),deleteBackup:async({appId:e,backupId:t})=>await n.delete({url:`/api/apps/${e}/backups/${t}`}),updateBackup:async({appId:e,backupId:t,name:r})=>await n.patch({url:`/api/apps/${e}/backups/${t}`,body:{name:r}}),restoreBackup:async({appId:e,backupId:t,name:r})=>await n.post({url:`/api/apps/${e}/backups/${t}/import`,body:{name:r}})}),T2e={enableCaching:!1,attachHeaders:null,onError:null},D2e=n=>{n={...T2e,...n};let e={};const t=async(s,u)=>{let c=s.statusText,f=null;try{f=await s.json(),f!=null&&f.message?c=f.message:f!=null&&f.error&&(c=f.error)}catch{}return{message:c,json:f,status:s.status,url:s.url,method:u,handled:!0}},r=(s,u)=>({message:s,json:null,status:400,url:u==null?void 0:u.url,method:u==null?void 0:u.method,handled:!0}),i=async({method:s,url:u,body:c,json:f=!0,external:h=!1,parseResponse:m})=>{f=f&&s!=="GET";let _={Accept:"application/json"};h||(_["x-budibase-api-version"]=DG),f&&(_["Content-Type"]="application/json"),n!=null&&n.attachHeaders&&n.attachHeaders(_);let y=c;if(f)try{y=JSON.stringify(c)}catch{throw r("Invalid JSON body",{url:u,method:s})}let w;try{w=await fetch(u,{method:s,headers:_,body:y,credentials:"same-origin"})}catch{throw delete e[u],r("Failed to send request",{url:u,method:s})}if(w.status>=200&&w.status<400)try{return m?await m(w):await w.json()}catch{return delete e[u],null}else throw delete e[u],await t(w,s)},a=async s=>{const u=s.url;return u?(e[u]||(e[u]=i(s),e[u]=await e[u]),await e[u]):null},o=s=>async u=>{try{let{url:c,cache:f=!1,external:h=!1}=u;h||(c=`/${c}`.replace("//","/"));const _=f&&(n==null?void 0:n.enableCaching)?a:i,y={...u,method:s,url:c};return await _(y)}catch(c){throw n!=null&&n.onError&&n.onError(c),c}};let l={post:o("POST"),get:o("GET"),patch:o("PATCH"),delete:o("DELETE"),put:o("PUT"),error:s=>{throw r(s)},invalidateCache:()=>{e={}}};return{...l,...i2e(l),...a2e(l),...o2e(l),...l2e(l),...s2e(l),...u2e(l),...c2e(l),...f2e(l),...p2e(l),...d2e(l),...h2e(l),...m2e(l),...g2e(l),...v2e(l),..._2e(l),...b2e(l),...y2e(l),...$2e(l),...w2e(l),...k2e(l),...z2e(l),...M2e(l),...A2e(l),...C2e(l),...S2e(l),...L2e(l),...E2e(l)}};var R$={exports:{}};/**
|
|
343
|
+
Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};function Lr(n){n=n||{},n.parent=this;var e=!0;if(n.autoDownloadFontAwesome===!1&&(e=!1),n.autoDownloadFontAwesome!==!0)for(var t=document.styleSheets,r=0;r<t.length;r++)!t[r].href||t[r].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(e=!1);if(e){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(n.element)this.element=n.element;else if(n.element===null){console.log("EasyMDE: Error. No element was found.");return}if(n.toolbar===void 0){n.toolbar=[];for(var a in zd)Object.prototype.hasOwnProperty.call(zd,a)&&(a.indexOf("separator-")!=-1&&n.toolbar.push("|"),(zd[a].default===!0||n.showIcons&&n.showIcons.constructor===Array&&n.showIcons.indexOf(a)!=-1)&&n.toolbar.push(a))}if(Object.prototype.hasOwnProperty.call(n,"previewClass")||(n.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(n,"status")||(n.status=["autosave","lines","words","cursor"],n.uploadImage&&n.status.unshift("upload-image")),n.previewRender||(n.previewRender=function(l){return this.parent.markdown(l)}),n.parsingConfig=q5({highlightFormatting:!0},n.parsingConfig||{}),n.insertTexts=q5({},pce,n.insertTexts||{}),n.promptTexts=q5({},dce,n.promptTexts||{}),n.blockStyles=q5({},mce,n.blockStyles||{}),n.autosave!=null&&(n.autosave.timeFormat=q5({},hce,n.autosave.timeFormat||{})),n.shortcuts=q5({},ice,n.shortcuts||{}),n.maxHeight=n.maxHeight||void 0,n.direction=n.direction||"ltr",typeof n.maxHeight<"u"?n.minHeight=n.maxHeight:n.minHeight=n.minHeight||"300px",n.errorCallback=n.errorCallback||function(l){alert(l)},n.uploadImage=n.uploadImage||!1,n.imageMaxSize=n.imageMaxSize||2097152,n.imageAccept=n.imageAccept||"image/png, image/jpeg",n.imageTexts=q5({},gce,n.imageTexts||{}),n.errorMessages=q5({},vce,n.errorMessages||{}),n.autosave!=null&&n.autosave.unique_id!=null&&n.autosave.unique_id!=""&&(n.autosave.uniqueId=n.autosave.unique_id),n.overlayMode&&n.overlayMode.combine===void 0&&(n.overlayMode.combine=!0),this.options=n,this.render(),n.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(n.initialValue),n.uploadImage){var o=this;this.codemirror.on("dragenter",function(l,s){o.updateStatusBar("upload-image",o.options.imageTexts.sbOnDragEnter),s.stopPropagation(),s.preventDefault()}),this.codemirror.on("dragend",function(l,s){o.updateStatusBar("upload-image",o.options.imageTexts.sbInit),s.stopPropagation(),s.preventDefault()}),this.codemirror.on("dragleave",function(l,s){o.updateStatusBar("upload-image",o.options.imageTexts.sbInit),s.stopPropagation(),s.preventDefault()}),this.codemirror.on("dragover",function(l,s){o.updateStatusBar("upload-image",o.options.imageTexts.sbOnDragEnter),s.stopPropagation(),s.preventDefault()}),this.codemirror.on("drop",function(l,s){s.stopPropagation(),s.preventDefault(),n.imageUploadFunction?o.uploadImagesUsingCustomFunction(n.imageUploadFunction,s.dataTransfer.files):o.uploadImages(s.dataTransfer.files)}),this.codemirror.on("paste",function(l,s){n.imageUploadFunction?o.uploadImagesUsingCustomFunction(n.imageUploadFunction,s.clipboardData.files):o.uploadImages(s.clipboardData.files)})}}Lr.prototype.uploadImages=function(n,e,t){if(n.length!==0){for(var r=[],i=0;i<n.length;i++)r.push(n[i].name),this.uploadImage(n[i],e,t);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",r.join(", ")))}};Lr.prototype.uploadImagesUsingCustomFunction=function(n,e){if(e.length!==0){for(var t=[],r=0;r<e.length;r++)t.push(e[r].name),this.uploadImageUsingCustomFunction(n,e[r]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",t.join(", ")))}};Lr.prototype.updateStatusBar=function(n,e){if(!!this.gui.statusbar){var t=this.gui.statusbar.getElementsByClassName(n);t.length===1?this.gui.statusbar.getElementsByClassName(n)[0].textContent=e:t.length===0?console.log("EasyMDE: status bar item "+n+" was not found."):console.log("EasyMDE: Several status bar items named "+n+" was found.")}};Lr.prototype.markdown=function(n){if(ay){var e;if(this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?e=this.options.renderingConfig.markedOptions:e={},this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?e.breaks=!1:e.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0){var t=this.options.renderingConfig.hljs||window.hljs;t&&(e.highlight=function(i,a){return a&&t.getLanguage(a)?t.highlight(a,i).value:t.highlightAuto(i).value})}ay.setOptions(e);var r=ay.parse(n);return this.options.renderingConfig&&typeof this.options.renderingConfig.sanitizerFunction=="function"&&(r=this.options.renderingConfig.sanitizerFunction.call(this,r)),r=oce(r),r=lce(r),r}};Lr.prototype.render=function(n){if(n||(n=this.element||document.getElementsByTagName("textarea")[0]),this._rendered&&this._rendered===n)return;this.element=n;var e=this.options,t=this,r={};for(var i in e.shortcuts)e.shortcuts[i]!==null&&Qg[i]!==null&&function(w){r[kG(e.shortcuts[w])]=function(){var A=Qg[w];typeof A=="function"?A(t):typeof A=="string"&&window.open(A,"_blank")}}(i);r.Enter="newlineAndIndentContinueMarkdownList",r.Tab="tabAndIndentMarkdownList",r["Shift-Tab"]="shiftTabAndUnindentMarkdownList",r.Esc=function(w){w.getOption("fullScreen")&&Td(t)},this.documentOnKeyDown=function(w){w=w||window.event,w.keyCode==27&&t.codemirror.getOption("fullScreen")&&Td(t)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var a,o;e.overlayMode?(bh.defineMode("overlay-mode",function(w){return bh.overlayMode(bh.getMode(w,e.spellChecker!==!1?"spell-checker":"gfm"),e.overlayMode.mode,e.overlayMode.combine)}),a="overlay-mode",o=e.parsingConfig,o.gitHubSpice=!1):(a=e.parsingConfig,a.name="gfm",a.gitHubSpice=!1),e.spellChecker!==!1&&(a="spell-checker",o=e.parsingConfig,o.name="gfm",o.gitHubSpice=!1,typeof e.spellChecker=="function"?e.spellChecker({codeMirrorInstance:bh}):nce({codeMirrorInstance:bh}));function l(w,A,S){return{addNew:!1}}if(this.codemirror=bh.fromTextArea(n,{mode:a,backdrop:o,theme:e.theme!=null?e.theme:"easymde",tabSize:e.tabSize!=null?e.tabSize:2,indentUnit:e.tabSize!=null?e.tabSize:2,indentWithTabs:e.indentWithTabs!==!1,lineNumbers:e.lineNumbers===!0,autofocus:e.autofocus===!0,extraKeys:r,direction:e.direction,lineWrapping:e.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:e.placeholder||n.getAttribute("placeholder")||"",styleSelectedText:e.styleSelectedText!=null?e.styleSelectedText:!I$(),scrollbarStyle:e.scrollbarStyle!=null?e.scrollbarStyle:"native",configureMouse:l,inputStyle:e.inputStyle!=null?e.inputStyle:I$()?"contenteditable":"textarea",spellcheck:e.nativeSpellcheck!=null?e.nativeSpellcheck:!0,autoRefresh:e.autoRefresh!=null?e.autoRefresh:!1}),this.codemirror.getScrollerElement().style.minHeight=e.minHeight,typeof e.maxHeight<"u"&&(this.codemirror.getScrollerElement().style.height=e.maxHeight),e.forceSync===!0){var s=this.codemirror;s.on("change",function(){s.save()})}this.gui={};var u=document.createElement("div");u.classList.add("EasyMDEContainer");var c=this.codemirror.getWrapperElement();c.parentNode.insertBefore(u,c),u.appendChild(c),e.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),e.status!==!1&&(this.gui.statusbar=this.createStatusbar()),e.autosave!=null&&e.autosave.enabled===!0&&(this.autosave(),this.codemirror.on("change",function(){clearTimeout(t._autosave_timeout),t._autosave_timeout=setTimeout(function(){t.autosave()},t.options.autosave.submit_delay||t.options.autosave.delay||1e3)}));function f(w,A){var S,T=window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","");return w<T?S=A+"px":S=A/w*100+"%",S}var h=this;function m(w,A){w.setAttribute("data-img-src",A.url),w.setAttribute("style","--bg-image:url("+A.url+");--width:"+A.naturalWidth+"px;--height:"+f(A.naturalWidth,A.naturalHeight)),h.codemirror.setSize()}function _(){!e.previewImagesInEditor||u.querySelectorAll(".cm-image-marker").forEach(function(w){var A=w.parentElement;if(!!A.innerText.match(/^!\[.*?\]\(.*\)/g)&&!A.hasAttribute("data-img-src")){var S=A.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),S&&S.length>=2){var T=S[1];if(window.EMDEimagesCache[T])m(A,window.EMDEimagesCache[T]);else{var I=document.createElement("img");I.onload=function(){window.EMDEimagesCache[T]={naturalWidth:I.naturalWidth,naturalHeight:I.naturalHeight,url:T},m(A,window.EMDEimagesCache[T])},I.src=T}}}})}this.codemirror.on("update",function(){_()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var y=this.codemirror;setTimeout(function(){y.refresh()}.bind(y),0)};Lr.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};function LG(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch{return!1}else return!1;return!0}Lr.prototype.autosave=function(){if(LG()){var n=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(n.element.form!=null&&n.element.form!=null&&n.element.form.addEventListener("submit",function(){clearTimeout(n.autosaveTimeoutId),n.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+n.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var e=n.value();e!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,e):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var t=document.getElementById("autosaved");if(t!=null&&t!=null&&t!=""){var r=new Date,i=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(r),a=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;t.innerHTML=a+i}}else console.log("EasyMDE: localStorage not available, cannot autosave")};Lr.prototype.clearAutosavedValue=function(){if(LG()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")};Lr.prototype.openBrowseFileWindow=function(n,e){var t=this,r=this.gui.toolbar.getElementsByClassName("imageInput")[0];r.click();function i(a){t.options.imageUploadFunction?t.uploadImagesUsingCustomFunction(t.options.imageUploadFunction,a.target.files):t.uploadImages(a.target.files,n,e),r.removeEventListener("change",i)}r.addEventListener("change",i)};Lr.prototype.uploadImage=function(n,e,t){var r=this;e=e||function(u){CG(r,u)};function i(s){r.updateStatusBar("upload-image",s),setTimeout(function(){r.updateStatusBar("upload-image",r.options.imageTexts.sbInit)},1e4),t&&typeof t=="function"&&t(s),r.options.errorCallback(s)}function a(s){var u=r.options.imageTexts.sizeUnits.split(",");return s.replace("#image_name#",n.name).replace("#image_size#",Mv(n.size,u)).replace("#image_max_size#",Mv(r.options.imageMaxSize,u))}if(n.size>this.options.imageMaxSize){i(a(this.options.errorMessages.fileTooLarge));return}var o=new FormData;o.append("image",n),r.options.imageCSRFToken&&o.append("csrfmiddlewaretoken",r.options.imageCSRFToken);var l=new XMLHttpRequest;l.upload.onprogress=function(s){if(s.lengthComputable){var u=""+Math.round(s.loaded*100/s.total);r.updateStatusBar("upload-image",r.options.imageTexts.sbProgress.replace("#file_name#",n.name).replace("#progress#",u))}},l.open("POST",this.options.imageUploadEndpoint),l.onload=function(){try{var s=JSON.parse(this.responseText)}catch{console.error("EasyMDE: The server did not return a valid json."),i(a(r.options.errorMessages.importError));return}this.status===200&&s&&!s.error&&s.data&&s.data.filePath?e((r.options.imagePathAbsolute?"":window.location.origin+"/")+s.data.filePath):s.error&&s.error in r.options.errorMessages?i(a(r.options.errorMessages[s.error])):s.error?i(a(s.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),i(a(r.options.errorMessages.importError)))},l.onerror=function(s){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+s.target.status+" ("+s.target.statusText+")"),i(r.options.errorMessages.importError)},l.send(o)};Lr.prototype.uploadImageUsingCustomFunction=function(n,e){var t=this;function r(o){CG(t,o)}function i(o){var l=a(o);t.updateStatusBar("upload-image",l),setTimeout(function(){t.updateStatusBar("upload-image",t.options.imageTexts.sbInit)},1e4),t.options.errorCallback(l)}function a(o){var l=t.options.imageTexts.sizeUnits.split(",");return o.replace("#image_name#",e.name).replace("#image_size#",Mv(e.size,l)).replace("#image_max_size#",Mv(t.options.imageMaxSize,l))}n.apply(this,[e,r,i])};Lr.prototype.setPreviewMaxHeight=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.nextSibling,r=parseInt(window.getComputedStyle(e).paddingTop),i=parseInt(window.getComputedStyle(e).borderTopWidth),a=parseInt(this.options.maxHeight),o=a+r*2+i*2,l=o.toString()+"px";t.style.height=l};Lr.prototype.createSideBySide=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.nextSibling;if(!t||!/editor-preview-side/.test(t.className)){if(t=document.createElement("div"),t.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var r=0;r<this.options.previewClass.length;r++)t.className+=" "+this.options.previewClass[r];else typeof this.options.previewClass=="string"&&(t.className+=" "+this.options.previewClass);e.parentNode.insertBefore(t,e.nextSibling)}if(typeof this.options.maxHeight<"u"&&this.setPreviewMaxHeight(),this.options.syncSideBySidePreviewScroll===!1)return t;var i=!1,a=!1;return n.on("scroll",function(o){if(i){i=!1;return}a=!0;var l=o.getScrollInfo().height-o.getScrollInfo().clientHeight,s=parseFloat(o.getScrollInfo().top)/l,u=(t.scrollHeight-t.clientHeight)*s;t.scrollTop=u}),t.onscroll=function(){if(a){a=!1;return}i=!0;var o=t.scrollHeight-t.clientHeight,l=parseFloat(t.scrollTop)/o,s=(n.getScrollInfo().height-n.getScrollInfo().clientHeight)*l;n.scrollTo(0,s)},t};Lr.prototype.createToolbar=function(n){if(n=n||this.options.toolbar,!(!n||n.length===0)){var e;for(e=0;e<n.length;e++)zd[n[e]]!=null&&(n[e]=zd[n[e]]);var t=document.createElement("div");t.className="editor-toolbar";var r=this,i={};for(r.toolbar=n,e=0;e<n.length;e++)if(!(n[e].name=="guide"&&r.options.toolbarGuideIcon===!1)&&!(r.options.hideIcons&&r.options.hideIcons.indexOf(n[e].name)!=-1)&&!((n[e].name=="fullscreen"||n[e].name=="side-by-side")&&I$())){if(n[e]==="|"){for(var a=!1,o=e+1;o<n.length;o++)n[o]!=="|"&&(!r.options.hideIcons||r.options.hideIcons.indexOf(n[o].name)==-1)&&(a=!0);if(!a)continue}(function(u){var c;if(u==="|"?c=uce():u.children?c=sce(u,r.options.toolbarTips,r.options.shortcuts,r):c=x9(u,!0,r.options.toolbarTips,r.options.shortcuts,"button",r),i[u.name||u]=c,t.appendChild(c),u.name==="upload-image"){var f=document.createElement("input");f.className="imageInput",f.type="file",f.multiple=!0,f.name="image",f.accept=r.options.imageAccept,f.style.display="none",f.style.opacity=0,t.appendChild(f)}})(n[e])}r.toolbar_div=t,r.toolbarElements=i;var l=this.codemirror;l.on("cursorActivity",function(){var u=k5(l);for(var c in i)(function(f){var h=i[f];u[f]?h.className+=" active":f!="fullscreen"&&f!="side-by-side"&&(h.className=h.className.replace(/\s*active\s*/g,""))})(c)});var s=l.getWrapperElement();return s.parentNode.insertBefore(t,s),t}};Lr.prototype.createStatusbar=function(n){n=n||this.options.status;var e=this.options,t=this.codemirror;if(!(!n||n.length===0)){var r=[],i,a,o,l;for(i=0;i<n.length;i++)if(a=void 0,o=void 0,l=void 0,typeof n[i]=="object")r.push({className:n[i].className,defaultValue:n[i].defaultValue,onUpdate:n[i].onUpdate,onActivity:n[i].onActivity});else{var s=n[i];s==="words"?(l=function(m){m.innerHTML=yE(t.getValue())},a=function(m){m.innerHTML=yE(t.getValue())}):s==="lines"?(l=function(m){m.innerHTML=t.lineCount()},a=function(m){m.innerHTML=t.lineCount()}):s==="cursor"?(l=function(m){m.innerHTML="1:1"},o=function(m){var _=t.getCursor(),y=_.line+1,w=_.ch+1;m.innerHTML=y+":"+w}):s==="autosave"?l=function(m){e.autosave!=null&&e.autosave.enabled===!0&&m.setAttribute("id","autosaved")}:s==="upload-image"&&(l=function(m){m.innerHTML=e.imageTexts.sbInit}),r.push({className:s,defaultValue:l,onUpdate:a,onActivity:o})}var u=document.createElement("div");for(u.className="editor-statusbar",i=0;i<r.length;i++){var c=r[i],f=document.createElement("span");f.className=c.className,typeof c.defaultValue=="function"&&c.defaultValue(f),typeof c.onUpdate=="function"&&this.codemirror.on("update",function(m,_){return function(){_.onUpdate(m)}}(f,c)),typeof c.onActivity=="function"&&this.codemirror.on("cursorActivity",function(m,_){return function(){_.onActivity(m)}}(f,c)),u.appendChild(f)}var h=this.codemirror.getWrapperElement();return h.parentNode.insertBefore(u,h.nextSibling),u}};Lr.prototype.value=function(n){var e=this.codemirror;if(n===void 0)return e.getValue();if(e.getDoc().setValue(n),this.isPreviewActive()){var t=e.getWrapperElement(),r=t.lastChild;r.innerHTML=this.options.previewRender(n,r)}return this};Lr.toggleBold=y_;Lr.toggleItalic=$_;Lr.toggleStrikethrough=w_;Lr.toggleBlockquote=z_;Lr.toggleHeadingSmaller=e7;Lr.toggleHeadingBigger=A_;Lr.toggleHeading1=M_;Lr.toggleHeading2=C_;Lr.toggleHeading3=S_;Lr.toggleCodeBlock=k_;Lr.toggleUnorderedList=L_;Lr.toggleOrderedList=E_;Lr.cleanBlock=T_;Lr.drawLink=D_;Lr.drawImage=B_;Lr.drawUploadedImage=Ck;Lr.drawTable=H_;Lr.drawHorizontalRule=O_;Lr.undo=I_;Lr.redo=P_;Lr.togglePreview=V_;Lr.toggleSideBySide=L6;Lr.toggleFullScreen=Td;Lr.prototype.toggleBold=function(){y_(this)};Lr.prototype.toggleItalic=function(){$_(this)};Lr.prototype.toggleStrikethrough=function(){w_(this)};Lr.prototype.toggleBlockquote=function(){z_(this)};Lr.prototype.toggleHeadingSmaller=function(){e7(this)};Lr.prototype.toggleHeadingBigger=function(){A_(this)};Lr.prototype.toggleHeading1=function(){M_(this)};Lr.prototype.toggleHeading2=function(){C_(this)};Lr.prototype.toggleHeading3=function(){S_(this)};Lr.prototype.toggleCodeBlock=function(){k_(this)};Lr.prototype.toggleUnorderedList=function(){L_(this)};Lr.prototype.toggleOrderedList=function(){E_(this)};Lr.prototype.cleanBlock=function(){T_(this)};Lr.prototype.drawLink=function(){D_(this)};Lr.prototype.drawImage=function(){B_(this)};Lr.prototype.drawUploadedImage=function(){Ck(this)};Lr.prototype.drawTable=function(){H_(this)};Lr.prototype.drawHorizontalRule=function(){O_(this)};Lr.prototype.undo=function(){I_(this)};Lr.prototype.redo=function(){P_(this)};Lr.prototype.togglePreview=function(){V_(this)};Lr.prototype.toggleSideBySide=function(){L6(this)};Lr.prototype.toggleFullScreen=function(){Td(this)};Lr.prototype.isPreviewActive=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.lastChild;return/editor-preview-active/.test(t.className)};Lr.prototype.isSideBySideActive=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.nextSibling;return/editor-preview-active-side/.test(t.className)};Lr.prototype.isFullscreenActive=function(){var n=this.codemirror;return n.getOption("fullScreen")};Lr.prototype.getState=function(){var n=this.codemirror;return k5(n)};Lr.prototype.toTextArea=function(){var n=this.codemirror,e=n.getWrapperElement(),t=e.parentNode;t&&(this.gui.toolbar&&t.removeChild(this.gui.toolbar),this.gui.statusbar&&t.removeChild(this.gui.statusbar),this.gui.sideBySide&&t.removeChild(this.gui.sideBySide)),t.parentNode.insertBefore(e,t),t.remove(),n.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())};var _ce=Lr;function bce(n){let e,t;return{c(){e=X("div"),t=X("textarea"),t.disabled=!0,D(t,"id",n[0]),D(e,"style",n[3]),D(e,"class","svelte-1gaj2sn"),Te(e,"disabled",n[1])},m(r,i){C(r,e,i),x(e,t),n[9](t)},p(r,[i]){i&1&&D(t,"id",r[0]),i&8&&D(e,"style",r[3]),i&2&&Te(e,"disabled",r[1])},i:ht,o:ht,d(r){r&&M(e),n[9](null)}}}function yce(n,e,t){let r,{height:i=null}=e,{scroll:a=!0}=e,{easyMDEOptions:o=null}=e,{mde:l=null}=e,{id:s=null}=e,{fullScreenOffset:u=null}=e,{disabled:c=!1}=e,f;ar(()=>(t(4,i=i||"200px"),t(5,l=new _ce({element:f,spellChecker:!1,status:!1,unorderedListStyle:"-",maxHeight:a?i:void 0,minHeight:a?void 0:i,...o})),()=>{l.toTextArea()}));const h=_=>{let y="";return y+=`--fullscreen-offset-x:${(_==null?void 0:_.x)||"0px"};`,y+=`--fullscreen-offset-y:${(_==null?void 0:_.y)||"0px"};`,y};function m(_){De[_?"unshift":"push"](()=>{f=_,t(2,f)})}return n.$$set=_=>{"height"in _&&t(4,i=_.height),"scroll"in _&&t(6,a=_.scroll),"easyMDEOptions"in _&&t(7,o=_.easyMDEOptions),"mde"in _&&t(5,l=_.mde),"id"in _&&t(0,s=_.id),"fullScreenOffset"in _&&t(8,u=_.fullScreenOffset),"disabled"in _&&t(1,c=_.disabled)},n.$$.update=()=>{n.$$.dirty&256&&t(3,r=h(u))},[s,c,f,r,i,l,a,o,u,m]}class $ce extends Ve{constructor(e){super(),Pe(this,e,yce,bce,Ie,{height:4,scroll:6,easyMDEOptions:7,mde:5,id:0,fullScreenOffset:8,disabled:1})}}function $E(n){let e,t,r;function i(o){n[8](o)}let a={scroll:!0,height:n[1],id:n[3],fullScreenOffset:n[4],disabled:n[5],easyMDEOptions:{initialValue:n[0],placeholder:n[2],...n[6]}};return n[7]!==void 0&&(a.mde=n[7]),e=new $ce({props:a}),De.push(()=>tt(e,"mde",i)),{c(){O(e.$$.fragment)},m(o,l){B(e,o,l),r=!0},p(o,l){const s={};l&2&&(s.height=o[1]),l&8&&(s.id=o[3]),l&16&&(s.fullScreenOffset=o[4]),l&32&&(s.disabled=o[5]),l&69&&(s.easyMDEOptions={initialValue:o[0],placeholder:o[2],...o[6]}),!t&&l&128&&(t=!0,s.mde=o[7],rt(()=>t=!1)),e.$set(s)},i(o){r||(b(e.$$.fragment,o),r=!0)},o(o){$(e.$$.fragment,o),r=!1},d(o){H(e,o)}}}function wce(n){let e=n[1],t,r,i=$E(n);return{c(){i.c(),t=yt()},m(a,o){i.m(a,o),C(a,t,o),r=!0},p(a,[o]){o&2&&Ie(e,e=a[1])?(we(),$(i,1,1,ht),ke(),i=$E(a),i.c(),b(i,1),i.m(t.parentNode,t)):i.p(a,o)},i(a){r||(b(i),r=!0)},o(a){$(i),r=!1},d(a){a&&M(t),i.d(a)}}}function kce(n,e,t){let{value:r=null}=e,{height:i=null}=e,{placeholder:a=null}=e,{id:o=null}=e,{fullScreenOffset:l=0}=e,{disabled:s=!1}=e,{easyMDEOptions:u}=e;const c=Nn();let f,h;const m=S=>{h&&S!==f&&h.value(S)},w=((S,T)=>{let I;return()=>{clearTimeout(I),I=setTimeout(S,T)}})(()=>{f=h.value(),c("change",f)},250);function A(S){h=S,t(7,h)}return n.$$set=S=>{"value"in S&&t(0,r=S.value),"height"in S&&t(1,i=S.height),"placeholder"in S&&t(2,a=S.placeholder),"id"in S&&t(3,o=S.id),"fullScreenOffset"in S&&t(4,l=S.fullScreenOffset),"disabled"in S&&t(5,s=S.disabled),"easyMDEOptions"in S&&t(6,u=S.easyMDEOptions)},n.$$.update=()=>{n.$$.dirty&1&&m(r),n.$$.dirty&128&&(h==null||h.codemirror.on("change",w))},[r,i,a,o,l,s,u,h,A]}class zce extends Ve{constructor(e){super(),Pe(this,e,kce,wce,Ie,{value:0,height:1,placeholder:2,id:3,fullScreenOffset:4,disabled:5,easyMDEOptions:6})}}function Ace(n){let e,t,r;return t=new zce({props:{value:n[0],placeholder:n[1],height:n[4],id:n[5],fullScreenOffset:n[6],disabled:n[2],easyMDEOptions:n[7]}}),t.$on("change",n[8]),{c(){e=X("div"),O(t.$$.fragment),D(e,"class","svelte-rs8sig"),Te(e,"error",n[3])},m(i,a){C(i,e,a),B(t,e,null),r=!0},p(i,[a]){const o={};a&1&&(o.value=i[0]),a&2&&(o.placeholder=i[1]),a&16&&(o.height=i[4]),a&32&&(o.id=i[5]),a&64&&(o.fullScreenOffset=i[6]),a&4&&(o.disabled=i[2]),a&128&&(o.easyMDEOptions=i[7]),t.$set(o),a&8&&Te(e,"error",i[3])},i(i){r||(b(t.$$.fragment,i),r=!0)},o(i){$(t.$$.fragment,i),r=!1},d(i){i&&M(e),H(t)}}}function Mce(n,e,t){let{value:r=""}=e,{placeholder:i=null}=e,{disabled:a=!1}=e,{error:o=null}=e,{height:l=null}=e,{id:s=null}=e,{fullScreenOffset:u=null}=e,{easyMDEOptions:c=null}=e;function f(h){Hn.call(this,n,h)}return n.$$set=h=>{"value"in h&&t(0,r=h.value),"placeholder"in h&&t(1,i=h.placeholder),"disabled"in h&&t(2,a=h.disabled),"error"in h&&t(3,o=h.error),"height"in h&&t(4,l=h.height),"id"in h&&t(5,s=h.id),"fullScreenOffset"in h&&t(6,u=h.fullScreenOffset),"easyMDEOptions"in h&&t(7,c=h.easyMDEOptions)},[r,i,a,o,l,s,u,c,f]}class Cce extends Ve{constructor(e){super(),Pe(this,e,Mce,Ace,Ie,{value:0,placeholder:1,disabled:2,error:3,height:4,id:5,fullScreenOffset:6,easyMDEOptions:7})}}function Sce(n){let e,t;return e=new Cce({props:{error:n[5],disabled:n[4],value:n[0],placeholder:n[3],height:n[6],id:n[7],fullScreenOffset:n[8],easyMDEOptions:n[9]}}),e.$on("change",n[10]),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&32&&(a.error=r[5]),i&16&&(a.disabled=r[4]),i&1&&(a.value=r[0]),i&8&&(a.placeholder=r[3]),i&64&&(a.height=r[6]),i&128&&(a.id=r[7]),i&256&&(a.fullScreenOffset=r[8]),i&512&&(a.easyMDEOptions=r[9]),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 Lce(n){let e,t;return e=new Sc({props:{label:n[1],labelPosition:n[2],error:n[5],$$slots:{default:[Sce]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.label=r[1]),i&4&&(a.labelPosition=r[2]),i&32&&(a.error=r[5]),i&5113&&(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 Ece(n,e,t){let{value:r=null}=e,{label:i=null}=e,{labelPosition:a="above"}=e,{placeholder:o=null}=e,{disabled:l=!1}=e,{error:s=null}=e,{height:u=null}=e,{id:c=null}=e,{fullScreenOffset:f=null}=e,{easyMDEOptions:h=null}=e;const m=Nn(),_=y=>{t(0,r=y.detail),m("change",y.detail)};return n.$$set=y=>{"value"in y&&t(0,r=y.value),"label"in y&&t(1,i=y.label),"labelPosition"in y&&t(2,a=y.labelPosition),"placeholder"in y&&t(3,o=y.placeholder),"disabled"in y&&t(4,l=y.disabled),"error"in y&&t(5,s=y.error),"height"in y&&t(6,u=y.height),"id"in y&&t(7,c=y.id),"fullScreenOffset"in y&&t(8,f=y.fullScreenOffset),"easyMDEOptions"in y&&t(9,h=y.easyMDEOptions)},[r,i,a,o,l,s,u,c,f,h,_]}class Tce extends Ve{constructor(e){super(),Pe(this,e,Ece,Lce,Ie,{value:0,label:1,labelPosition:2,placeholder:3,disabled:4,error:5,height:6,id:7,fullScreenOffset:8,easyMDEOptions:9})}}function wE(n){let e,t,r;return t=new Vu({props:{$$slots:{default:[Dce]},$$scope:{ctx:n}}}),{c(){e=X("div"),O(t.$$.fragment),D(e,"class","title svelte-glsrm")},m(i,a){C(i,e,a),B(t,e,null),r=!0},p(i,a){const o={};a&5&&(o.$$scope={dirty:a,ctx:i}),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 Dce(n){let e;return{c(){e=oe(n[0])},m(t,r){C(t,e,r)},p(t,r){r&1&>(e,t[0])},d(t){t&&M(e)}}}function Bce(n){let e,t,r,i,a=n[0]&&wE(n);const o=n[1].default,l=Xn(o,n,n[2],null);return{c(){e=X("div"),a&&a.c(),t=q(),r=X("div"),l&&l.c(),D(r,"class","list-items svelte-glsrm")},m(s,u){C(s,e,u),a&&a.m(e,null),x(e,t),x(e,r),l&&l.m(r,null),i=!0},p(s,[u]){s[0]?a?(a.p(s,u),u&1&&b(a,1)):(a=wE(s),a.c(),b(a,1),a.m(e,t)):a&&(we(),$(a,1,1,()=>{a=null}),ke()),l&&l.p&&(!i||u&4)&&Zn(l,o,s,s[2],i?Jn(o,s[2],u,null):Qn(s[2]),null)},i(s){i||(b(a),b(l,s),i=!0)},o(s){$(a),$(l,s),i=!1},d(s){s&&M(e),a&&a.d(),l&&l.d(s)}}}function Hce(n,e,t){let{$$slots:r={},$$scope:i}=e,{title:a=null}=e;return n.$$set=o=>{"title"in o&&t(0,a=o.title),"$$scope"in o&&t(2,i=o.$$scope)},[a,r,i]}class E6 extends Ve{constructor(e){super(),Pe(this,e,Hce,Bce,Ie,{title:0})}}function kE(n){let e,t;return e=new Jw({props:{icon:n[0],color:n[2],background:n[1]}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&1&&(a.icon=r[0]),i&4&&(a.color=r[2]),i&2&&(a.background=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 zE(n){let e,t;return e=new Fd({props:{initials:n[7]}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&128&&(a.initials=r[7]),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 AE(n){let e,t;return e=new jt({props:{$$slots:{default:[Oce]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&1040&&(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 Oce(n){let e;return{c(){e=oe(n[4])},m(t,r){C(t,e,r)},p(t,r){r&16&>(e,t[4])},d(t){t&&M(e)}}}function ME(n){let e,t;return e=new sn({props:{$$slots:{default:[Ice]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&1056&&(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 Ice(n){let e;return{c(){e=oe(n[5])},m(t,r){C(t,e,r)},p(t,r){r&32&>(e,t[5])},d(t){t&&M(e)}}}function Pce(n){let e,t,r,i,a,o,l,s,u,c,f=n[0]&&kE(n),h=n[3]&&zE(n),m=n[4]&&AE(n),_=n[5]&&ME(n);const y=n[8].default,w=Xn(y,n,n[10],null);return{c(){e=X("div"),t=X("div"),f&&f.c(),r=q(),h&&h.c(),i=q(),m&&m.c(),a=q(),_&&_.c(),o=q(),l=X("div"),w&&w.c(),D(t,"class","left svelte-15u15t4"),D(l,"class","right svelte-15u15t4"),D(e,"class","list-item svelte-15u15t4"),Te(e,"hoverable",n[6])},m(A,S){C(A,e,S),x(e,t),f&&f.m(t,null),x(t,r),h&&h.m(t,null),x(t,i),m&&m.m(t,null),x(t,a),_&&_.m(t,null),x(e,o),x(e,l),w&&w.m(l,null),s=!0,u||(c=At(e,"click",n[9]),u=!0)},p(A,[S]){A[0]?f?(f.p(A,S),S&1&&b(f,1)):(f=kE(A),f.c(),b(f,1),f.m(t,r)):f&&(we(),$(f,1,1,()=>{f=null}),ke()),A[3]?h?(h.p(A,S),S&8&&b(h,1)):(h=zE(A),h.c(),b(h,1),h.m(t,i)):h&&(we(),$(h,1,1,()=>{h=null}),ke()),A[4]?m?(m.p(A,S),S&16&&b(m,1)):(m=AE(A),m.c(),b(m,1),m.m(t,a)):m&&(we(),$(m,1,1,()=>{m=null}),ke()),A[5]?_?(_.p(A,S),S&32&&b(_,1)):(_=ME(A),_.c(),b(_,1),_.m(t,null)):_&&(we(),$(_,1,1,()=>{_=null}),ke()),w&&w.p&&(!s||S&1024)&&Zn(w,y,A,A[10],s?Jn(y,A[10],S,null):Qn(A[10]),null),S&64&&Te(e,"hoverable",A[6])},i(A){s||(b(f),b(h),b(m),b(_),b(w,A),s=!0)},o(A){$(f),$(h),$(m),$(_),$(w,A),s=!1},d(A){A&&M(e),f&&f.d(),h&&h.d(),m&&m.d(),_&&_.d(),w&&w.d(A),u=!1,c()}}}function Vce(n,e,t){let r,{$$slots:i={},$$scope:a}=e,{icon:o=null}=e,{iconBackground:l=null}=e,{iconColor:s=null}=e,{avatar:u=!1}=e,{title:c=null}=e,{subtitle:f=null}=e,{hoverable:h=!1}=e;function m(_){Hn.call(this,n,_)}return n.$$set=_=>{"icon"in _&&t(0,o=_.icon),"iconBackground"in _&&t(1,l=_.iconBackground),"iconColor"in _&&t(2,s=_.iconColor),"avatar"in _&&t(3,u=_.avatar),"title"in _&&t(4,c=_.title),"subtitle"in _&&t(5,f=_.subtitle),"hoverable"in _&&t(6,h=_.hoverable),"$$scope"in _&&t(10,a=_.$$scope)},n.$$.update=()=>{n.$$.dirty&24&&t(7,r=u?c==null?void 0:c[0]:null)},[o,l,s,u,c,f,h,r,i,m,a]}class E4 extends Ve{constructor(e){super(),Pe(this,e,Vce,Pce,Ie,{icon:0,iconBackground:1,iconColor:2,avatar:3,title:4,subtitle:5,hoverable:6})}}function Rce(n){let e,t;const r=n[1].default,i=Xn(r,n,n[0],null);return{c(){e=X("div"),i&&i.c(),D(e,"class","icon-side-nav svelte-krsn3q")},m(a,o){C(a,e,o),i&&i.m(e,null),t=!0},p(a,[o]){i&&i.p&&(!t||o&1)&&Zn(i,r,a,a[0],t?Jn(r,a[0],o,null):Qn(a[0]),null)},i(a){t||(b(i,a),t=!0)},o(a){$(i,a),t=!1},d(a){a&&M(e),i&&i.d(a)}}}function Nce(n,e,t){let{$$slots:r={},$$scope:i}=e;return n.$$set=a=>{"$$scope"in a&&t(0,i=a.$$scope)},[i,r]}class Fce extends Ve{constructor(e){super(),Pe(this,e,Nce,Rce,Ie,{})}}function CE(n){let e,t,r,i;return t=new z6({props:{textWrapping:!0,direction:"right",text:n[2]}}),{c(){e=X("div"),O(t.$$.fragment),D(e,"class","tooltip svelte-12yq719")},m(a,o){C(a,e,o),B(t,e,null),i=!0},p(a,o){const l={};o&4&&(l.text=a[2]),t.$set(l)},i(a){i||(b(t.$$.fragment,a),r||Po(()=>{r=Sd(e,ip,{duration:130,delay:250}),r.start()}),i=!0)},o(a){$(t.$$.fragment,a),i=!1},d(a){a&&M(e),H(t)}}}function jce(n){let e,t,r,i,a,o;t=new un({props:{name:n[0],hoverable:!0}});let l=n[2]&&n[3]&&CE(n);return{c(){e=X("div"),O(t.$$.fragment),r=q(),l&&l.c(),D(e,"class","icon-side-nav-item svelte-12yq719"),Te(e,"active",n[1])},m(s,u){C(s,e,u),B(t,e,null),x(e,r),l&&l.m(e,null),i=!0,a||(o=[At(e,"mouseover",n[5]),At(e,"focus",n[6]),At(e,"mouseleave",n[7]),At(e,"click",n[4])],a=!0)},p(s,[u]){const c={};u&1&&(c.name=s[0]),t.$set(c),s[2]&&s[3]?l?(l.p(s,u),u&12&&b(l,1)):(l=CE(s),l.c(),b(l,1),l.m(e,null)):l&&(we(),$(l,1,1,()=>{l=null}),ke()),u&2&&Te(e,"active",s[1])},i(s){i||(b(t.$$.fragment,s),b(l),i=!0)},o(s){$(t.$$.fragment,s),$(l),i=!1},d(s){s&&M(e),H(t),l&&l.d(),a=!1,Vi(o)}}}function xce(n,e,t){let{icon:r}=e,{active:i=!1}=e,{tooltip:a}=e,o=!1;function l(f){Hn.call(this,n,f)}const s=()=>t(3,o=!0),u=()=>t(3,o=!0),c=()=>t(3,o=!1);return n.$$set=f=>{"icon"in f&&t(0,r=f.icon),"active"in f&&t(1,i=f.active),"tooltip"in f&&t(2,a=f.tooltip)},[r,i,a,o,l,s,u,c]}class hg extends Ve{constructor(e){super(),Pe(this,e,xce,jce,Ie,{icon:0,active:1,tooltip:2})}}function Uce(n){let e,t,r,i;return{c(){e=X("div"),t=X("input"),D(t,"type","range"),D(t,"min",n[3]),D(t,"max",n[4]),D(t,"step",n[5]),t.value=n[0],t.disabled=n[2],D(t,"id",n[1]),D(t,"class","svelte-13v9q49"),D(e,"class","svelte-13v9q49")},m(a,o){C(a,e,o),x(e,t),r||(i=At(t,"change",n[6]),r=!0)},p(a,[o]){o&8&&D(t,"min",a[3]),o&16&&D(t,"max",a[4]),o&32&&D(t,"step",a[5]),o&1&&(t.value=a[0]),o&4&&(t.disabled=a[2]),o&2&&D(t,"id",a[1])},i:ht,o:ht,d(a){a&&M(e),r=!1,i()}}}function qce(n,e,t){let{value:r=!1}=e,{id:i=null}=e,{disabled:a=!1}=e,{min:o=0}=e,{max:l=100}=e,{step:s=1}=e;const u=Nn(),c=f=>{u("change",f.target.value)};return n.$$set=f=>{"value"in f&&t(0,r=f.value),"id"in f&&t(1,i=f.id),"disabled"in f&&t(2,a=f.disabled),"min"in f&&t(3,o=f.min),"max"in f&&t(4,l=f.max),"step"in f&&t(5,s=f.step)},[r,i,a,o,l,s,c]}class Wce extends Ve{constructor(e){super(),Pe(this,e,qce,Uce,Ie,{value:0,id:1,disabled:2,min:3,max:4,step:5})}}function Gce(n){let e,t;return e=new Wce({props:{disabled:n[6],value:n[0],min:n[3],max:n[4],step:n[5]}}),e.$on("change",n[8]),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,i){const a={};i&64&&(a.disabled=r[6]),i&1&&(a.value=r[0]),i&8&&(a.min=r[3]),i&16&&(a.max=r[4]),i&32&&(a.step=r[5]),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 Yce(n){let e,t;return e=new Sc({props:{label:n[1],labelPosition:n[2],error:n[7],$$slots:{default:[Gce]},$$scope:{ctx:n}}}),{c(){O(e.$$.fragment)},m(r,i){B(e,r,i),t=!0},p(r,[i]){const a={};i&2&&(a.label=r[1]),i&4&&(a.labelPosition=r[2]),i&128&&(a.error=r[7]),i&1145&&(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 Kce(n,e,t){let{value:r=null}=e,{label:i=null}=e,{labelPosition:a="above"}=e,{min:o=0}=e,{max:l=100}=e,{step:s=1}=e,{disabled:u=!1}=e,{error:c=null}=e;const f=Nn(),h=m=>{t(0,r=m.detail),f("change",m.detail)};return n.$$set=m=>{"value"in m&&t(0,r=m.value),"label"in m&&t(1,i=m.label),"labelPosition"in m&&t(2,a=m.labelPosition),"min"in m&&t(3,o=m.min),"max"in m&&t(4,l=m.max),"step"in m&&t(5,s=m.step),"disabled"in m&&t(6,u=m.disabled),"error"in m&&t(7,c=m.error)},[r,i,a,o,l,s,u,c,h]}class Xce extends Ve{constructor(e){super(),Pe(this,e,Kce,Yce,Ie,{value:0,label:1,labelPosition:2,min:3,max:4,step:5,disabled:6,error:7})}}function Jce(n){let e,t;return{c(){e=X("div"),t=oe(n[0]),D(e,"class","bold svelte-9amtlb")},m(r,i){C(r,e,i),x(e,t)},p(r,[i]){i&1&>(t,r[0])},i:ht,o:ht,d(r){r&&M(e)}}}function Zce(n,e,t){let{value:r}=e;return n.$$set=i=>{"value"in i&&t(0,r=i.value)},[r]}class Qce extends Ve{constructor(e){super(),Pe(this,e,Zce,Jce,Ie,{value:0})}}function e2e(n){let e,t;return{c(){e=X("code"),t=oe(n[0]),D(e,"class","svelte-e82i3")},m(r,i){C(r,e,i),x(e,t)},p(r,[i]){i&1&>(t,r[0])},i:ht,o:ht,d(r){r&&M(e)}}}function t2e(n,e,t){let{value:r}=e;return n.$$set=i=>{"value"in i&&t(0,r=i.value)},[r]}class n2e extends Ve{constructor(e){super(),Pe(this,e,t2e,e2e,Ie,{value:0})}}const Qf={Equals:{value:"equal",label:"Equals"},NotEquals:{value:"notEqual",label:"Not equals"},Empty:{value:"empty",label:"Is empty"},NotEmpty:{value:"notEmpty",label:"Is not empty"},StartsWith:{value:"string",label:"Starts with"},Like:{value:"fuzzy",label:"Like"},MoreThan:{value:"rangeLow",label:"More than"},LessThan:{value:"rangeHigh",label:"Less than"},Contains:{value:"contains",label:"Contains"},NotContains:{value:"notContains",label:"Does not contain"},In:{value:"oneOf",label:"Is in"},ContainsAny:{value:"containsAny",label:"Has any"}},Bh={Auth:"budibase:auth",CurrentApp:"budibase:currentapp",ReturnUrl:"budibase:returnurl",AccountReturnUrl:"budibase:account:returnurl"},EG={USERS:"ta_users"},u5={AppUser:"appUser",Developer:"developer",Admin:"admin"},R_=[{label:"App User",value:u5.AppUser},{label:"Developer",value:u5.Developer},{label:"Admin",value:u5.Admin}],TG=[{value:u5.AppUser,icon:"User",label:"App user - Only has access to published apps"},{value:u5.Developer,icon:"Hammer",label:"Developer - Access to the app builder"},{value:u5.Admin,icon:"Draw",label:"Admin - Full access"}],w4={FREE:"free",TEAM:"team",PRO:"pro",BUSINESS:"business",ENTERPRISE:"enterprise"},DG="1",P$={USER_GROUPS:"userGroups",BACKUPS:"appBackups"},W2={ADMIN:"ADMIN",POWER:"POWER",BASIC:"BASIC",PUBLIC:"PUBLIC",BUILDER:"BUILDER"},V$={integer:{max:2147483647,min:-2147483648},int:{max:2147483647,min:-2147483648},smallint:{max:32767,min:-32768},mediumint:{max:8388607,min:-8388608}},n6=[{class:"lightest",name:"Lightest"},{class:"light",name:"Light"},{class:"dark",name:"Dark"},{class:"darkest",name:"Darkest"},{class:"nord",name:"Nord",base:"darkest"},{class:"midnight",name:"Midnight",base:"darkest"}],r2e=Object.freeze(Object.defineProperty({__proto__:null,OperatorOptions:Qf,Cookies:Bh,TableNames:EG,BudibaseRoles:u5,BudibaseRoleOptions:R_,BuilderRoleDescriptions:TG,PlanType:w4,ApiVersion:DG,Features:P$,Roles:W2,SqlNumberTypeRangeMap:V$,Themes:n6},Symbol.toStringTag,{value:"Module"})),i2e=n=>({getAnalyticsStatus:async()=>await n.get({url:"/api/bbtel"}),analyticsPing:async({source:e})=>{const t=Intl.DateTimeFormat().resolvedOptions().timeZone;return await n.post({url:"/api/bbtel/ping",body:{source:e,timezone:t}})}}),a2e=n=>({fetchAppPackage:async e=>await n.get({url:`/api/applications/${e}/appPackage`}),saveAppMetadata:async({appId:e,metadata:t})=>await n.put({url:`/api/applications/${e}`,body:t}),deployAppChanges:async()=>await n.post({url:"/api/deploy"}),revertAppChanges:async e=>await n.post({url:`/api/dev/${e}/revert`}),updateAppClientVersion:async e=>await n.post({url:`/api/applications/${e}/client/update`}),revertAppClientVersion:async e=>await n.post({url:`/api/applications/${e}/client/revert`}),getAppDeployments:async()=>await n.get({url:"/api/deployments"}),createApp:async e=>await n.post({url:"/api/applications",body:e,json:!1}),importApps:async e=>await n.post({url:"/api/cloud/import",body:e,json:!1}),unpublishApp:async e=>await n.delete({url:`/api/applications/${e}?unpublish=1`}),deleteApp:async e=>await n.delete({url:`/api/applications/${e}`}),releaseAppLock:async e=>await n.delete({url:`/api/dev/${e}/lock`}),syncApp:async e=>await n.post({url:`/api/applications/${e}/sync`}),getApps:async()=>await n.get({url:"/api/applications?status=all"}),fetchComponentLibDefinitions:async e=>await n.get({url:`/api/${e}/components/definitions`})}),o2e=n=>{const e=async({datasourceId:t,bucket:r,key:i})=>await n.post({url:`/api/attachments/${t}/url`,body:{bucket:r,key:i}});return{getSignedDatasourceURL:e,uploadAttachment:async({data:t,tableId:r})=>await n.post({url:`/api/attachments/${r}/upload`,body:t,json:!1}),uploadBuilderAttachment:async t=>await n.post({url:"/api/attachments/process",body:t,json:!1}),externalUpload:async({datasourceId:t,bucket:r,key:i,data:a})=>{const{signedUrl:o,publicUrl:l}=await e({datasourceId:t,bucket:r,key:i});return await n.put({url:o,body:a,json:!1,external:!0}),{publicUrl:l}},deleteAttachments:async({keys:t,tableId:r})=>await n.post({url:`/api/attachments/${r}/delete`,body:{keys:t}}),deleteBuilderAttachments:async t=>await n.post({url:"/api/attachments/delete",body:{keys:t}})}},l2e=n=>({logIn:async({tenantId:e,username:t,password:r})=>await n.post({url:`/api/global/auth/${e}/login`,body:{username:t,password:r}}),logOut:async()=>await n.post({url:"/api/global/auth/logout"}),setInitInfo:async e=>await n.post({url:"/api/global/auth/init",body:e}),getInitInfo:async()=>await n.get({url:"/api/global/auth/init"}),requestForgotPassword:async({tenantId:e,email:t})=>await n.post({url:`/api/global/auth/${e}/reset`,body:{email:t}}),resetPassword:async({tenantId:e,password:t,resetCode:r})=>await n.post({url:`/api/global/auth/${e}/reset/update`,body:{password:t,resetCode:r}})}),s2e=n=>({triggerAutomation:async({automationId:e,fields:t})=>await n.post({url:`/api/automations/${e}/trigger`,body:{fields:t}}),testAutomation:async({automationId:e,testData:t})=>await n.post({url:`/api/automations/${e}/test`,body:t}),getAutomations:async()=>await n.get({url:"/api/automations"}),getAutomationDefinitions:async()=>await n.get({url:"/api/automations/definitions/list"}),createAutomation:async e=>await n.post({url:"/api/automations",body:e}),updateAutomation:async e=>await n.put({url:"/api/automations",body:e}),deleteAutomation:async({automationId:e,automationRev:t})=>await n.delete({url:`/api/automations/${e}/${t}`}),getAutomationLogs:async({automationId:e,startDate:t,status:r,page:i})=>await n.post({url:"/api/automations/logs/search",body:{automationId:e,startDate:t,status:r,page:i}}),clearAutomationLogErrors:async({automationId:e,appId:t})=>await n.delete({url:"/api/automations/logs",body:{appId:t,automationId:e}})}),u2e=n=>({saveConfig:async e=>await n.post({url:"/api/global/configs",body:e}),getConfig:async e=>await n.get({url:`/api/global/configs/${e}`}),deleteConfig:async({id:e,rev:t})=>await n.delete({url:`/api/global/configs/${e}/${t}`}),getTenantConfig:async e=>await n.get({url:`/api/global/configs/public?tenantId=${e}`}),getOIDCConfig:async e=>await n.get({url:`/api/global/configs/public/oidc?tenantId=${e}`}),getChecklist:async e=>await n.get({url:`/api/global/configs/checklist?tenantId=${e}`}),uploadLogo:async e=>await n.post({url:"/api/global/configs/upload/settings/logoUrl",body:e,json:!1}),uploadOIDCLogo:async({name:e,data:t})=>await n.post({url:`/api/global/configs/upload/logos_oidc/${e}`,body:t,json:!1}),getOIDCLogos:async()=>await n.get({url:"/api/global/configs/logos_oidc"})}),c2e=n=>({getDatasources:async()=>await n.get({url:"/api/datasources"}),buildDatasourceSchema:async({datasourceId:e,tablesFilter:t})=>await n.post({url:`/api/datasources/${e}/schema`,body:{tablesFilter:t}}),createDatasource:async({datasource:e,fetchSchema:t})=>await n.post({url:"/api/datasources",body:{datasource:e,fetchSchema:t}}),updateDatasource:async e=>await n.put({url:`/api/datasources/${e._id}`,body:e}),deleteDatasource:async({datasourceId:e,datasourceRev:t})=>await n.delete({url:`/api/datasources/${e}/${t}`})}),f2e=n=>({getFlags:async()=>await n.get({url:"/api/users/flags"}),updateFlag:async({flag:e,value:t})=>await n.post({url:"/api/users/flags",body:{flag:e,value:t}}),toggleUiFeature:async({value:e})=>await n.post({url:`/api/beta/${e}`})}),p2e=n=>({getHostingURLs:async()=>await n.get({url:"/api/hosting/urls"}),getDeployedApps:async()=>await n.get({url:"/api/hosting/apps"})}),d2e=n=>({saveLayout:async e=>await n.post({url:"/api/layouts",body:e}),deleteLayout:async({layoutId:e,layoutRev:t})=>await n.delete({url:`/api/layouts/${e}/${t}`})}),h2e=n=>({checkImportComplete:async()=>await n.get({url:"/api/cloud/import/complete"}),getEnvironment:async()=>await n.get({url:"/api/system/environment"}),getSystemStatus:async()=>await n.get({url:"/api/system/status"}),getIntegrations:async()=>await n.get({url:"/api/integrations"}),getBudibaseVersion:async()=>(await n.get({url:"/api/dev/version"})).version,getBasePermissions:async()=>await n.get({url:"/api/permission/builtin"}),checkBetaAccess:async e=>await n.get({url:`/api/beta/access?email=${e}`,external:!0})}),m2e=n=>({getPermissionForResource:async e=>await n.get({url:`/api/permission/${e}`}),updatePermissionForResource:async({resourceId:e,roleId:t,level:r})=>await n.post({url:`/api/permission/${t}/${e}/${r}`})}),g2e=n=>({executeQuery:async({queryId:e,pagination:t,parameters:r})=>await n.post({url:`/api/v2/queries/${e}`,body:{parameters:r,pagination:t}}),fetchQueryDefinition:async e=>await n.get({url:`/api/queries/${e}`,cache:!0}),getQueries:async()=>await n.get({url:"/api/queries"}),saveQuery:async e=>await n.post({url:"/api/queries",body:e}),deleteQuery:async({queryId:e,queryRev:t})=>await n.delete({url:`/api/queries/${e}/${t}`}),importQueries:async({datasourceId:e,data:t})=>await n.post({url:"/api/queries/import",body:{datasourceId:e,data:t}}),previewQuery:async e=>await n.post({url:"/api/queries/preview",body:e})}),v2e=n=>({fetchRelationshipData:async({tableId:e,rowId:t,fieldName:r})=>{if(!e||!t)return[];const i=await n.get({url:`/api/${e}/${t}/enrich`});return r?i[r]||[]:i||[]}}),_2e=n=>({deleteRole:async({roleId:e,roleRev:t})=>await n.delete({url:`/api/roles/${e}/${t}`}),saveRole:async e=>await n.post({url:"/api/roles",body:e}),getRoles:async()=>await n.get({url:"/api/roles"}),getRolesForApp:async e=>await n.get({url:`/api/global/roles/${e}`})}),b2e=n=>({fetchClientAppRoutes:async()=>await n.get({url:"/api/routing/client"}),fetchAppRoutes:async()=>await n.get({url:"/api/routing"})}),y2e=n=>({fetchRow:async({tableId:e,rowId:t})=>!e||!t?null:await n.get({url:`/api/${e}/rows/${t}`}),saveRow:async e=>{if(!!(e!=null&&e.tableId))return await n.post({url:`/api/${e.tableId}/rows`,body:e})},deleteRow:async({tableId:e,rowId:t,revId:r})=>{if(!(!e||!t))return await n.delete({url:`/api/${e}/rows`,body:{_id:t,_rev:r}})},deleteRows:async({tableId:e,rows:t})=>await n.delete({url:`/api/${e}/rows`,body:{rows:t}}),exportRows:async({tableId:e,rows:t,format:r,columns:i})=>await n.post({url:`/api/${e}/rows/exportRows?format=${r}`,body:{rows:t,columns:i},parseResponse:async a=>await a.text()})}),$2e=n=>({saveScreen:async e=>await n.post({url:"/api/screens",body:e}),deleteScreen:async({screenId:e,screenRev:t})=>await n.delete({url:`/api/screens/${e}/${t}`})}),w2e=n=>({fetchTableDefinition:async e=>await n.get({url:`/api/tables/${e}`,cache:!0}),fetchTableData:async e=>await n.get({url:`/api/${e}/rows`}),searchTable:async({tableId:e,query:t,bookmark:r,limit:i,sort:a,sortOrder:o,sortType:l,paginate:s})=>!e||!t?{rows:[]}:await n.post({url:`/api/${e}/search`,body:{query:t,bookmark:r,limit:i,sort:a,sortOrder:o,sortType:l,paginate:s}}),importTableData:async({tableId:e,data:t})=>await n.post({url:`/api/tables/${e}/import`,body:{dataImport:t}}),validateTableCSV:async({tableId:e,csvString:t,schema:r})=>await n.post({url:"/api/tables/csv/validate",body:{csvString:t,schema:r,tableId:e}}),getTables:async()=>await n.get({url:"/api/tables"}),saveTable:async e=>await n.post({url:"/api/tables",body:e}),deleteTable:async({tableId:e,tableRev:t})=>await n.delete({url:`/api/tables/${e}/${t}`})}),k2e=n=>({getEmailTemplateDefinitions:async()=>await n.get({url:"/api/global/template/definitions"}),getEmailTemplates:async()=>await n.get({url:"/api/global/template/email"}),saveEmailTemplate:async e=>await n.post({url:"/api/global/template",body:e}),getAppTemplates:async()=>await n.get({url:"/api/templates"})}),z2e=n=>({getUsers:async()=>await n.get({url:"/api/global/users"}),searchUsers:async({page:e,email:t,appId:r}={})=>{const i={};return e&&(i.page=e),t&&(i.email=t),r&&(i.appId=r),await n.post({url:"/api/global/users/search",body:i})},getUser:async e=>await n.get({url:`/api/global/users/${e}`}),createAppUser:async e=>await n.post({url:"/api/users/metadata",body:e}),updateOwnMetadata:async e=>await n.post({url:"/api/users/metadata/self",body:e}),createAdminUser:async e=>await n.post({url:"/api/global/users/init",body:e}),saveUser:async e=>await n.post({url:"/api/global/users",body:e}),createUsers:async({users:e,groups:t})=>(await n.post({url:"/api/global/users/bulk",body:{create:{users:e,groups:t}}})).created,deleteUser:async e=>await n.delete({url:`/api/global/users/${e}`}),deleteUsers:async e=>(await n.post({url:"/api/global/users/bulk",body:{delete:{userIds:e}}})).deleted,inviteUser:async({email:e,builder:t,admin:r})=>await n.post({url:"/api/global/users/invite",body:{email:e,userInfo:{admin:r?{global:!0}:void 0,builder:t?{global:!0}:void 0}}}),inviteUsers:async e=>await n.post({url:"/api/global/users/multi/invite",body:e.map(t=>({email:t.email,userInfo:{admin:t.admin?{global:!0}:void 0,builder:t.admin||t.builder?{global:!0}:void 0,userGroups:t.groups}}))}),acceptInvite:async({inviteCode:e,password:t})=>await n.post({url:"/api/global/users/invite/accept",body:{inviteCode:e,password:t}}),getUserCountByApp:async({appId:e})=>await n.get({url:`/api/global/users/count/${e}`})}),A2e=n=>({generateAPIKey:async()=>{const e=await n.post({url:"/api/global/self/api_key"});return e==null?void 0:e.apiKey},fetchDeveloperInfo:async()=>n.get({url:"/api/global/self/api_key"}),fetchSelf:async()=>await n.get({url:"/api/self"}),fetchBuilderSelf:async()=>await n.get({url:"/api/global/self"}),updateSelf:async e=>await n.post({url:"/api/global/self",body:e})}),M2e=n=>({fetchViewData:async({name:e,field:t,groupBy:r,calculation:i})=>{const a=new URLSearchParams;i&&(a.set("field",t),a.set("calculation",i)),r&&a.set("group",r);const o=t?`/api/views/${e}?${a}`:`/api/views/${e}`;return await n.get({url:o})},exportView:async({viewName:e,format:t})=>{const r=encodeURIComponent(e);return await n.get({url:`/api/views/export?view=${r}&format=${t}`,parseResponse:async i=>await i.text()})},saveView:async e=>await n.post({url:"/api/views",body:e}),deleteView:async e=>await n.delete({url:`/api/views/${e}`})}),C2e=n=>({activateLicenseKey:async e=>n.post({url:"/api/global/license/activate",body:e}),deleteLicenseKey:async()=>n.delete({url:"/api/global/license/info"}),getLicenseInfo:async()=>n.get({url:"/api/global/license/info"}),refreshLicense:async()=>n.post({url:"/api/global/license/refresh"}),getQuotaUsage:async()=>n.get({url:"/api/global/license/usage"})}),S2e=n=>{async function e(t,r,i,a){return Array.isArray(a)||(a=[a]),await n.post({url:`/api/global/groups/${t}/${r}`,body:{[i]:a}})}return{saveGroup:async t=>await n.post({url:"/api/global/groups",body:t}),getGroups:async()=>await n.get({url:"/api/global/groups"}),getGroup:async t=>await n.get({url:`/api/global/groups/${t}`}),deleteGroup:async({id:t,rev:r})=>await n.delete({url:`/api/global/groups/${t}/${r}`}),addUsersToGroup:async(t,r)=>e(t,"users","add",r),removeUsersFromGroup:async(t,r)=>e(t,"users","remove",r),addAppsToGroup:async(t,r)=>e(t,"apps","add",r),removeAppsFromGroup:async(t,r)=>e(t,"apps","remove",r)}},L2e=n=>({uploadPlugin:async e=>await n.post({url:"/api/plugin/upload",body:e,json:!1}),createPlugin:async e=>await n.post({url:"/api/plugin",body:e}),getPlugins:async()=>await n.get({url:"/api/plugin"}),deletePlugin:async e=>await n.delete({url:`/api/plugin/${e}`})}),E2e=n=>({searchBackups:async({appId:e,trigger:t,type:r,page:i,startDate:a,endDate:o})=>{const l={};return i&&(l.page=i),t&&r&&(l.trigger=t.toLowerCase(),l.type=r.toLowerCase()),a&&o&&(l.startDate=a,l.endDate=o),await n.post({url:`/api/apps/${e}/backups/search`,body:l})},createManualBackup:async({appId:e,name:t})=>await n.post({url:`/api/apps/${e}/backups`,body:{name:t}}),deleteBackup:async({appId:e,backupId:t})=>await n.delete({url:`/api/apps/${e}/backups/${t}`}),updateBackup:async({appId:e,backupId:t,name:r})=>await n.patch({url:`/api/apps/${e}/backups/${t}`,body:{name:r}}),restoreBackup:async({appId:e,backupId:t,name:r})=>await n.post({url:`/api/apps/${e}/backups/${t}/import`,body:{name:r}})}),T2e={enableCaching:!1,attachHeaders:null,onError:null},D2e=n=>{n={...T2e,...n};let e={};const t=async(s,u)=>{let c=s.statusText,f=null;try{f=await s.json(),f!=null&&f.message?c=f.message:f!=null&&f.error&&(c=f.error)}catch{}return{message:c,json:f,status:s.status,url:s.url,method:u,handled:!0}},r=(s,u)=>({message:s,json:null,status:400,url:u==null?void 0:u.url,method:u==null?void 0:u.method,handled:!0}),i=async({method:s,url:u,body:c,json:f=!0,external:h=!1,parseResponse:m})=>{f=f&&s!=="GET";let _={Accept:"application/json"};h||(_["x-budibase-api-version"]=DG),f&&(_["Content-Type"]="application/json"),n!=null&&n.attachHeaders&&n.attachHeaders(_);let y=c;if(f)try{y=JSON.stringify(c)}catch{throw r("Invalid JSON body",{url:u,method:s})}let w;try{w=await fetch(u,{method:s,headers:_,body:y,credentials:"same-origin"})}catch{throw delete e[u],r("Failed to send request",{url:u,method:s})}if(w.status>=200&&w.status<400)try{return m?await m(w):await w.json()}catch{return delete e[u],null}else throw delete e[u],await t(w,s)},a=async s=>{const u=s.url;return u?(e[u]||(e[u]=i(s),e[u]=await e[u]),await e[u]):null},o=s=>async u=>{try{let{url:c,cache:f=!1,external:h=!1}=u;h||(c=`/${c}`.replace("//","/"));const _=f&&(n==null?void 0:n.enableCaching)?a:i,y={...u,method:s,url:c};return await _(y)}catch(c){throw n!=null&&n.onError&&n.onError(c),c}};let l={post:o("POST"),get:o("GET"),patch:o("PATCH"),delete:o("DELETE"),put:o("PUT"),error:s=>{throw r(s)},invalidateCache:()=>{e={}}};return{...l,...i2e(l),...a2e(l),...o2e(l),...l2e(l),...s2e(l),...u2e(l),...c2e(l),...f2e(l),...p2e(l),...d2e(l),...h2e(l),...m2e(l),...g2e(l),...v2e(l),..._2e(l),...b2e(l),...y2e(l),...$2e(l),...w2e(l),...k2e(l),...z2e(l),...M2e(l),...A2e(l),...C2e(l),...S2e(l),...L2e(l),...E2e(l)}};var R$={exports:{}};/**
|
|
344
344
|
* @license
|
|
345
345
|
* Lodash <https://lodash.com/>
|
|
346
346
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -940,7 +940,7 @@ Use Save As... to download, then click back to return to this page.`)&&(location
|
|
|
940
940
|
`),t=X("i"),i=oe(r),a=oe("?"),o=oe(`
|
|
941
941
|
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+"")&>(i,r)},d(l){l&&M(e),l&&M(t),l&&M(o)}}}function Ast(n){let e,t,r,i,a,o;e=new ou({props:{$$slots:{control:[kst],default:[wst]},$$scope:{ctx:n}}});let l={okText:"Delete Automation",onOk:n[3],title:"Confirm Deletion",$$slots:{default:[zst]},$$scope:{ctx:n}};r=new gl({props:l}),n[5](r);let s={automation:n[0]};return a=new _st({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 Mst(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 Cst extends Ve{constructor(e){super(),Pe(this,e,Mst,Ast,Ie,{automation:0})}}function lF(n,e,t){const r=n.slice();return r[5]=e[t],r[7]=t,r}function Sst(n){let e,t,r;return e=new Cst({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:[Sst]},$$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 Lst(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 Est(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 Tst extends Ve{constructor(e){super(),Pe(this,e,Est,Lst,Ie,{})}}function cF(n,e,t){const r=n.slice();return r[17]=e[t][0],r[18]=e[t][1],r}function Dst(n){let e;return{c(){e=oe(`Please name your automation, then select a trigger. Every automation must
|
|
942
942
|
start with a trigger.`)},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Bst(n){let e;return{c(){e=oe("Triggers")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Hst(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+"")&>(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:[Hst]},$$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 Ost(n){let e,t,r,i;e=new jt({props:{size:"S",$$slots:{default:[Bst]},$$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 Ist(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:[Dst]},$$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(()=>tt(a,"value",f)),De.push(()=>tt(a,"error",h)),a.$on("change",n[12]),u=new Pt({props:{noPadding:!0,$$slots:{default:[Ost]},$$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 Pst(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:[Ist]},$$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 Vst(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,Vst,Pst,Ie,{webhookModal:7})}}function Rst(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 Nst(n){let e,t,r,i;e=new Tst({});let a={$$slots:{default:[Rst]},$$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 Fst(n){let e,t;return e=new B1({props:{title:"Automations",$$slots:{default:[Nst]},$$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 jst(n){let e,t,r,i,a,o;return t=new X2({props:{selected:"Automations",$$slots:{default:[Fst]},$$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 xst(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 Ust extends Ve{constructor(e){super(),Pe(this,e,xst,jst,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(()=>tt(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 X2({props:{noHorizPadding:!0,selected:"Input",$$slots:{default:[Yst]},$$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:[qst]},$$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 qst(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)+"")&>(r,t)},d(l){l&&M(e),l&&M(r),l&&M(i)}}}function Wst(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 Gst(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 Yst(n){let e,t,r,i;return e=new B1({props:{title:"Input",$$slots:{default:[Wst]},$$scope:{ctx:n}}}),r=new B1({props:{title:"Output",$$slots:{default:[Gst]},$$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 Kst(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 Xst(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,Xst,Kst,Ie,{automation:4,testResults:5,width:0})}}function Jst(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 Zst(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 Qst extends Ve{constructor(e){super(),Pe(this,e,Zst,Jst,Ie,{automation:0})}}function eut(n){let e,t,r,i;return r=new Pt({props:{gap:"S",justifyItems:"center",$$slots:{default:[aut]},$$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 tut(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 nut(n){let e;return{c(){e=oe("You have no automations")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function rut(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 iut(n){let e;return{c(){e=oe("Create automation")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function aut(n){let e,t,r,i,a,o,l,s,u;return i=new In({props:{size:"M",$$slots:{default:[nut]},$$scope:{ctx:n}}}),o=new jt({props:{size:"M",$$slots:{default:[rut]},$$scope:{ctx:n}}}),s=new _n({props:{size:"M",cta:!0,$$slots:{default:[iut]},$$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 Qst({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 out(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 lut(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 sut(n){let e,t,r,i,a,o,l,s,u,c,f,h,m;r=new Ust({props:{modal:n[1],webhookModal:n[2]}});const _=[tut,eut],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:[out]},$$scope:{ctx:n}};c=new rr({props:S}),n[6](c);let T={width:"30%",$$slots:{default:[lut]},$$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 uut(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 cut extends Ve{constructor(e){super(),Pe(this,e,uut,sut,Ie,{})}}function fut(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(()=>tt(a,"value",s)),{c(){e=X("span"),e.textContent=`The changes you have made will be deleted and the application reverted
|
|
943
|
-
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 put(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:[fut]},$$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 dut(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:[put]},$$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 hut(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 mut extends Ve{constructor(e){super(),Pe(this,e,hut,dut,Ie,{})}}const gut="@budibase/client",vut="2.1.
|
|
943
|
+
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 put(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:[fut]},$$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 dut(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:[put]},$$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 hut(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 mut extends Ve{constructor(e){super(),Pe(this,e,hut,dut,Ie,{})}}const gut="@budibase/client",vut="2.1.11",_ut="MPL-2.0",but="dist/budibase-client.js",yut="dist/budibase-client.js",$ut="module",wut="src/index.js",kut={".":{import:"./dist/budibase-client.js",require:"./dist/budibase-client.js"},"./package.json":"./package.json","./manifest.json":"./manifest.json"},zut={build:"rollup -c","dev:builder":"rollup -cw"},Aut={"@budibase/bbui":"^2.1.11","@budibase/frontend-core":"^2.1.11","@budibase/string-templates":"^2.1.11","@spectrum-css/button":"^3.0.3","@spectrum-css/card":"^3.0.3","@spectrum-css/divider":"^1.0.3","@spectrum-css/link":"^3.1.3","@spectrum-css/page":"^3.0.1","@spectrum-css/tag":"^3.1.4","@spectrum-css/typography":"^3.0.2","@spectrum-css/vars":"^3.0.1",apexcharts:"^3.22.1",dayjs:"^1.10.5",downloadjs:"1.4.7","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"},Mut={"@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"},Cut="d1836a898cab3f8ab80ee6d8f42be1a9eed7dcdc",Pd={name:gut,version:vut,license:_ut,module:but,main:yut,type:$ut,svelte:wut,exports:kut,scripts:zut,dependencies:Aut,devDependencies:Mut,gitHead:Cut};function bF(n){let e,t;return e=new j3({props:{hoverable:!0,notice:!0,$$slots:{default:[Sut]},$$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 Sut(n){let e;return{c(){e=oe("Update available")},m(t,r){C(t,e,r)},d(t){t&&M(e)}}}function Lut(n){let e,t;return e=new jt({props:{size:"S",$$slots:{default:[Tut]},$$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 Eut(n){let e,t;return e=new jt({props:{size:"S",$$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&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 Tut(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
944
|
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+"")&>(i,r)},d(o){o&&M(e),o&&M(t),o&&M(a)}}}function Dut(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
|
|
945
945
|
`),o=X("b"),o.textContent=`${Pd.version}`,l=oe(` is available. Updates can contain new features,
|
|
946
946
|
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+"")&>(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:[But]},$$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,r=n[1].revertableVersion+"",i,a;return{c(){e=oe(`You can revert this app to version
|