UNPKG

vanilla-jsoneditor

Version:

A web-based tool to view, edit, format, transform, and validate JSON

1 lines 585 kB
var e=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],n=["mainAxis","crossAxis","limiter"];function t(e,n){if(null==e)return{};var t,o,r=function(e,n){if(null==e)return{};var t,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)t=i[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)t=i[o],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}function o(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=$(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(s)throw i}}}}function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return n};var e,n={},t=Object.prototype,o=t.hasOwnProperty,i=Object.defineProperty||function(e,n,t){e[n]=t.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(e,n,t){return Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{u({},"")}catch(e){u=function(e,n,t){return e[n]=t}}function d(e,n,t,o){var r=n&&n.prototype instanceof j?n:j,a=Object.create(r.prototype),s=new q(o||[]);return i(a,"_invoke",{value:O(e,t,s)}),a}function f(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}n.wrap=d;var v="suspendedStart",p="suspendedYield",m="executing",g="completed",h={};function j(){}function b(){}function y(){}var x={};u(x,s,(function(){return this}));var w=Object.getPrototypeOf,$=w&&w(w(P([])));$&&$!==t&&o.call($,s)&&(x=$);var k=y.prototype=j.prototype=Object.create(x);function C(e){["next","throw","return"].forEach((function(n){u(e,n,(function(e){return this._invoke(n,e)}))}))}function M(e,n){function t(r,i,a,s){var l=f(e[r],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==S(u)&&o.call(u,"__await")?n.resolve(u.__await).then((function(e){t("next",e,a,s)}),(function(e){t("throw",e,a,s)})):n.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return t("throw",e,a,s)}))}s(l.arg)}var r;i(this,"_invoke",{value:function(e,o){function i(){return new n((function(n,r){t(e,o,n,r)}))}return r=r?r.then(i,i):i()}})}function O(n,t,o){var r=v;return function(i,a){if(r===m)throw Error("Generator is already running");if(r===g){if("throw"===i)throw a;return{value:e,done:!0}}for(o.method=i,o.arg=a;;){var s=o.delegate;if(s){var l=z(s,o);if(l){if(l===h)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===v)throw r=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=m;var c=f(n,t,o);if("normal"===c.type){if(r=o.done?g:p,c.arg===h)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(r=g,o.method="throw",o.arg=c.arg)}}}function z(n,t){var o=t.method,r=n.iterator[o];if(r===e)return t.delegate=null,"throw"===o&&n.iterator.return&&(t.method="return",t.arg=e,z(n,t),"throw"===t.method)||"return"!==o&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+o+"' method")),h;var i=f(r,n.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var a=i.arg;return a?a.done?(t[n.resultName]=a.value,t.next=n.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,h):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function R(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function E(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function P(n){if(n||""===n){var t=n[s];if(t)return t.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var r=-1,i=function t(){for(;++r<n.length;)if(o.call(n,r))return t.value=n[r],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}throw new TypeError(S(n)+" is not iterable")}return b.prototype=y,i(k,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:b,configurable:!0}),b.displayName=u(y,c,"GeneratorFunction"),n.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===b||"GeneratorFunction"===(n.displayName||n.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},n.awrap=function(e){return{__await:e}},C(M.prototype),u(M.prototype,l,(function(){return this})),n.AsyncIterator=M,n.async=function(e,t,o,r,i){void 0===i&&(i=Promise);var a=new M(d(e,t,o,r),i);return n.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(k),u(k,c,"Generator"),u(k,s,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var n=Object(e),t=[];for(var o in n)t.push(o);return t.reverse(),function e(){for(;t.length;){var o=t.pop();if(o in n)return e.value=o,e.done=!1,e}return e.done=!0,e}},n.values=P,q.prototype={constructor:q,reset:function(n){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!n)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var t=this;function r(o,r){return s.type="throw",s.arg=n,t.next=o,r&&(t.method="next",t.arg=e),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,n){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=n,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),h},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),E(t),h}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var o=t.completion;if("throw"===o.type){var r=o.arg;E(t)}return r}}throw Error("illegal catch attempt")},delegateYield:function(n,t,o){return this.delegate={iterator:P(n),resultName:t,nextLoc:o},"next"===this.method&&(this.arg=e),h}},n}function i(e,n,t,o,r,i,a){try{var s=e[i](a),l=s.value}catch(e){return void t(e)}s.done?n(l):Promise.resolve(l).then(o,r)}function a(e){return function(){var n=this,t=arguments;return new Promise((function(o,r){var a=e.apply(n,t);function s(e){i(a,o,r,s,l,"next",e)}function l(e){i(a,o,r,s,l,"throw",e)}s(void 0)}))}}function s(e,n){return c(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,r,i,a,s=[],l=!0,c=!1;try{if(i=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(o=i.call(t)).done)&&(s.push(o.value),s.length!==n);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,n)||$(e,n)||l()}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e){if(Array.isArray(e))return e}function u(e,n,t){return n=f(n),function(e,n){if(n&&("object"===S(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(n,t||[],f(e).constructor):n.apply(e,t))}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function v(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&p(e,n)}function p(e,n){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},p(e,n)}function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?m(Object(t),!0).forEach((function(n){y(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function h(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function j(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,x(o.key),o)}}function b(e,n,t){return n&&j(e.prototype,n),t&&j(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,n,t){return(n=x(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e){var n=function(e,n){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,n||"default");if("object"!=S(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==S(n)?n:n+""}function w(e){return function(e){if(Array.isArray(e))return C(e)}(e)||k(e)||$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e,n){if(e){if("string"==typeof e)return C(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?C(e,n):void 0}}function k(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=new Array(n);t<n;t++)o[t]=e[t];return o}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}import{parseJSONPointer as M,compileJSONPointer as O,getIn as z,immutableJSONPatch as R,isJSONPatchAdd as E,isJSONPatchRemove as q,isJSONPatchReplace as P,isJSONPatchCopy as I,isJSONPatchMove as T,parsePath as A,isJSONArray as N,isJSONObject as B,startsWithJSONPointer as F,existsIn as L,revertJSONPatch as U,setIn as D,appendToJSONPointer as J,compileJSONPointerProp as V}from"immutable-json-patch";import H from"json-source-map";import{jsonrepair as _}from"jsonrepair";import*as W from"lodash-es";import{map as Q,minBy as Y,isEmpty as K,memoize as G,sortBy as Z,initial as X,last as ee,isEqual as ne,first as te,noop as oe,cloneDeepWith as re,times as ie,groupBy as ae,forEachRight as se,range as le,debounce as ce,partition as ue,mapValues as de,uniqueId as fe,cloneDeep as ve}from"lodash-es";import{faCheckSquare as pe,faSquare as me,faClock as ge,faLightbulb as he}from"@fortawesome/free-regular-svg-icons";import{faTimes as je,faDownLeftAndUpRightToCenter as be,faUpRightAndDownLeftFromCenter as ye,faCog as xe,faExclamationTriangle as we,faAngleRight as $e,faAngleDown as ke,faCheck as Ce,faArrowDown as Se,faWrench as Me,faCaretDown as Oe,faCaretRight as ze,faSearch as Re,faSortAmountDownAlt as Ee,faFilter as qe,faEllipsisV as Pe,faUndo as Ie,faRedo as Te,faCopy as Ae,faClose as Ne,faEdit as Be,faChevronDown as Fe,faChevronUp as Le,faCircleNotch as Ue,faPen as De,faCheckSquare as Je,faSquare as Ve,faCut as He,faPaste as _e,faClone as We,faCropAlt as Qe,faTrashCan as Ye,faArrowRightArrowLeft as Ke,faPlus as Ge,faCaretSquareUp as Ze,faCaretSquareDown as Xe,faCode as en,faEye as nn,faCaretUp as tn,faRotate as on,faCaretLeft as rn}from"@fortawesome/free-solid-svg-icons";import an from"natural-compare-lite";import sn from"memoize-one";import{Compartment as ln,EditorState as cn,EditorSelection as un}from"@codemirror/state";import{keymap as dn,lineNumbers as fn,highlightActiveLineGutter as vn,highlightSpecialChars as pn,drawSelection as mn,dropCursor as gn,rectangularSelection as hn,crosshairCursor as jn,highlightActiveLine as bn,EditorView as yn}from"@codemirror/view";import{indentWithTab as xn,history as wn,defaultKeymap as $n,historyKeymap as kn,undo as Cn,redo as Sn,undoDepth as Mn,redoDepth as On}from"@codemirror/commands";import{lintGutter as zn,lintKeymap as Rn,linter as En}from"@codemirror/lint";import{json as qn}from"@codemirror/lang-json";import{HighlightStyle as Pn,syntaxHighlighting as In,foldGutter as Tn,indentOnInput as An,defaultHighlightStyle as Nn,bracketMatching as Bn,foldKeymap as Fn,indentUnit as Ln}from"@codemirror/language";import{highlightSelectionMatches as Un,searchKeymap as Dn,search as Jn,openSearchPanel as Vn,closeSearchPanel as Hn}from"@codemirror/search";import{closeBrackets as _n,autocompletion as Wn,closeBracketsKeymap as Qn,completionKeymap as Yn}from"@codemirror/autocomplete";import{tags as Kn}from"@lezer/highlight";import{indentationMarkers as Gn}from"@replit/codemirror-indentation-markers";import{wrappedLineIndent as Zn}from"codemirror-wrapped-line-indent";import Xn from"ajv";import et from"jmespath";function nt(){}var tt=function(e){return e};function ot(e,n){for(var t in n)e[t]=n[t];return e}function rt(e){return e()}function it(){return Object.create(null)}function at(e){e.forEach(rt)}function st(e){return"function"==typeof e}function lt(e,n){return e!=e?n==n:e!==n||e&&"object"===S(e)||"function"==typeof e}function ct(e,n){return e!=e?n==n:e!==n}function ut(e,n,t,o){if(e){var r=dt(e,n,t,o);return e[0](r)}}function dt(e,n,t,o){return e[1]&&o?ot(t.ctx.slice(),e[1](o(n))):t.ctx}function ft(e,n,t,o){if(e[2]&&o){var r=e[2](o(t));if(void 0===n.dirty)return r;if("object"===S(r)){for(var i=[],a=Math.max(n.dirty.length,r.length),s=0;s<a;s+=1)i[s]=n.dirty[s]|r[s];return i}return n.dirty|r}return n.dirty}function vt(e,n,t,o,r,i){if(r){var a=dt(n,t,o,i);e.p(a,r)}}function pt(e){if(e.ctx.length>32){for(var n=[],t=e.ctx.length/32,o=0;o<t;o++)n[o]=-1;return n}return-1}function mt(e){var n={};for(var t in e)"$"!==t[0]&&(n[t]=e[t]);return n}function gt(e,n){var t={};for(var o in n=new Set(n),e)n.has(o)||"$"===o[0]||(t[o]=e[o]);return t}function ht(e){return null==e?"":e}function jt(e){return e&&st(e.destroy)?e.destroy:nt}var bt="undefined"!=typeof window,yt=bt?function(){return window.performance.now()}:function(){return Date.now()},xt=bt?function(e){return requestAnimationFrame(e)}:nt,wt=new Set;function $t(e){wt.forEach((function(n){n.c(e)||(wt.delete(n),n.f())})),0!==wt.size&&xt($t)}var kt="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function Ct(e,n){e.appendChild(n)}function St(e,n,t){var o=Mt(e);if(!o.getElementById(n)){var r=Pt("style");r.id=n,r.textContent=t,zt(o,r)}}function Mt(e){if(!e)return document;var n=e.getRootNode?e.getRootNode():e.ownerDocument;return n&&n.host?n:e.ownerDocument}function Ot(e){var n=Pt("style");return n.textContent="/* empty */",zt(Mt(e),n),n.sheet}function zt(e,n){return Ct(e.head||e,n),n.sheet}function Rt(e,n,t){e.insertBefore(n,t||null)}function Et(e){e.parentNode&&e.parentNode.removeChild(e)}function qt(e,n){for(var t=0;t<e.length;t+=1)e[t]&&e[t].d(n)}function Pt(e){return document.createElement(e)}function It(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Tt(e){return document.createTextNode(e)}function At(){return Tt(" ")}function Nt(){return Tt("")}function Bt(e,n,t,o){return e.addEventListener(n,t,o),function(){return e.removeEventListener(n,t,o)}}function Ft(e){return function(n){return n.preventDefault(),e.call(this,n)}}function Lt(e){return function(n){return n.stopPropagation(),e.call(this,n)}}function Ut(e,n,t){null==t?e.removeAttribute(n):e.getAttribute(n)!==t&&e.setAttribute(n,t)}var Dt=["width","height"];function Jt(e,n){var t=Object.getOwnPropertyDescriptors(e.__proto__);for(var o in n)null==n[o]?e.removeAttribute(o):"style"===o?e.style.cssText=n[o]:"__value"===o?e.value=e[o]=n[o]:t[o]&&t[o].set&&-1===Dt.indexOf(o)?e[o]=n[o]:Ut(e,o,n[o])}function Vt(e,n){for(var t in n)Ut(e,t,n[t])}function Ht(e,n){n=""+n,e.data!==n&&(e.data=n)}function _t(e,n){e.value=null==n?"":n}function Wt(e,n,t,o){null==t?e.style.removeProperty(n):e.style.setProperty(n,t,o?"important":"")}function Qt(e,n,t){for(var o=0;o<e.options.length;o+=1){var r=e.options[o];if(r.__value===n)return void(r.selected=!0)}t&&void 0===n||(e.selectedIndex=-1)}function Yt(e,n,t){e.classList.toggle(n,!!t)}function Kt(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=t.bubbles,r=void 0!==o&&o,i=t.cancelable;return new CustomEvent(e,{detail:n,bubbles:r,cancelable:void 0!==i&&i})}function Gt(e,n){return new e(n)}var Zt,Xt=new Map,eo=0;function no(e,n,t,o,r,i,a){for(var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=16.666/o,c="{\n",u=0;u<=1;u+=l){var d=n+(t-n)*i(u);c+=100*u+"%{".concat(a(d,1-d),"}\n")}var f=c+"100% {".concat(a(t,1-t),"}\n}"),v="__svelte_".concat(function(e){for(var n=5381,t=e.length;t--;)n=(n<<5)-n^e.charCodeAt(t);return n>>>0}(f),"_").concat(s),p=Mt(e),m=Xt.get(p)||function(e,n){var t={stylesheet:Ot(n),rules:{}};return Xt.set(e,t),t}(p,e),g=m.stylesheet,h=m.rules;h[v]||(h[v]=!0,g.insertRule("@keyframes ".concat(v," ").concat(f),g.cssRules.length));var j=e.style.animation||"";return e.style.animation="".concat(j?"".concat(j,", "):"").concat(v," ").concat(o,"ms linear ").concat(r,"ms 1 both"),eo+=1,v}function to(e,n){var t=(e.style.animation||"").split(", "),o=t.filter(n?function(e){return e.indexOf(n)<0}:function(e){return-1===e.indexOf("__svelte")}),r=t.length-o.length;r&&(e.style.animation=o.join(", "),(eo-=r)||xt((function(){eo||(Xt.forEach((function(e){var n=e.stylesheet.ownerNode;n&&Et(n)})),Xt.clear())})))}function oo(e){Zt=e}function ro(){if(!Zt)throw new Error("Function called outside component initialization");return Zt}function io(e){ro().$$.on_mount.push(e)}function ao(e){ro().$$.on_destroy.push(e)}function so(){var e=ro();return function(n,t){var o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).cancelable,r=void 0!==o&&o,i=e.$$.callbacks[n];if(i){var a=Kt(n,t,{cancelable:r});return i.slice().forEach((function(n){n.call(e,a)})),!a.defaultPrevented}return!0}}function lo(e,n){return ro().$$.context.set(e,n),n}function co(e){return ro().$$.context.get(e)}function uo(e,n){var t=this,o=e.$$.callbacks[n.type];o&&o.slice().forEach((function(e){return e.call(t,n)}))}var fo=[],vo=[],po=[],mo=[],go=Promise.resolve(),ho=!1;function jo(){ho||(ho=!0,go.then(Co))}function bo(){return jo(),go}function yo(e){po.push(e)}function xo(e){mo.push(e)}var wo,$o=new Set,ko=0;function Co(){if(0===ko){var e=Zt;do{try{for(;ko<fo.length;){var n=fo[ko];ko++,oo(n),So(n.$$)}}catch(e){throw fo.length=0,ko=0,e}for(oo(null),fo.length=0,ko=0;vo.length;)vo.pop()();for(var t=0;t<po.length;t+=1){var o=po[t];$o.has(o)||($o.add(o),o())}po.length=0}while(fo.length);for(;mo.length;)mo.pop()();ho=!1,$o.clear(),oo(e)}}function So(e){if(null!==e.fragment){e.update(),at(e.before_update);var n=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,n),e.after_update.forEach(yo)}}function Mo(e,n,t){e.dispatchEvent(Kt("".concat(n?"intro":"outro").concat(t)))}var Oo,zo=new Set;function Ro(){Oo={r:0,c:[],p:Oo}}function Eo(){Oo.r||at(Oo.c),Oo=Oo.p}function qo(e,n){e&&e.i&&(zo.delete(e),e.i(n))}function Po(e,n,t,o){if(e&&e.o){if(zo.has(e))return;zo.add(e),Oo.c.push((function(){zo.delete(e),o&&(t&&e.d(1),o())})),e.o(n)}else o&&o()}var Io={duration:0};function To(e,n,t,o){var r,i=n(e,t,{direction:"both"}),a=o?0:1,s=null,l=null,c=null;function u(){c&&to(e,c)}function d(e,n){var t=e.b-a;return n*=Math.abs(t),{a:a,b:e.b,d:t,duration:n,start:e.start,end:e.start+n,group:e.group}}function f(n){var t,o=i||Io,f=o.delay,v=void 0===f?0:f,p=o.duration,m=void 0===p?300:p,g=o.easing,h=void 0===g?tt:g,j=o.tick,b=void 0===j?nt:j,y=o.css,x={start:yt()+v,b:n};n||(x.group=Oo,Oo.r+=1),"inert"in e&&(n?void 0!==r&&(e.inert=r):(r=e.inert,e.inert=!0)),s||l?l=x:(y&&(u(),c=no(e,a,n,m,v,h,y)),n&&b(0,1),s=d(x,m),yo((function(){return Mo(e,n,"start")})),t=function(n){if(l&&n>l.start&&(s=d(l,m),l=null,Mo(e,s.b,"start"),y&&(u(),c=no(e,a,s.b,s.duration,0,h,i.css))),s)if(n>=s.end)b(a=s.b,1-a),Mo(e,s.b,"end"),l||(s.b?u():--s.group.r||at(s.group.c)),s=null;else if(n>=s.start){var t=n-s.start;a=s.a+s.d*h(t/s.duration),b(a,1-a)}return!(!s&&!l)},0===wt.size&&xt($t),new Promise((function(e){wt.add({c:t,f:e})})))}return{run:function(e){st(i)?(wo||(wo=Promise.resolve()).then((function(){wo=null})),wo).then((function(){i=i({direction:e?"in":"out"}),f(e)})):f(e)},end:function(){u(),s=l=null}}}function Ao(e){return void 0!==(null==e?void 0:e.length)?e:Array.from(e)}function No(e,n){e.d(1),n.delete(e.key)}function Bo(e,n){Po(e,1,1,(function(){n.delete(e.key)}))}function Fo(e,n,t,o,r,i,a,s,l,c,u,d){for(var f=e.length,v=i.length,p=f,m={};p--;)m[e[p].key]=p;var g=[],h=new Map,j=new Map,b=[];p=v;for(var y=function(){var e=d(r,i,p),s=t(e),l=a.get(s);l?o&&b.push((function(){return l.p(e,n)})):(l=c(s,e)).c(),h.set(s,g[p]=l),s in m&&j.set(s,Math.abs(p-m[s]))};p--;)y();var x=new Set,w=new Set;function $(e){qo(e,1),e.m(s,u),a.set(e.key,e),u=e.first,v--}for(;f&&v;){var k=g[v-1],C=e[f-1],S=k.key,M=C.key;k===C?(u=k.first,f--,v--):h.has(M)?!a.has(S)||x.has(S)?$(k):w.has(M)?f--:j.get(S)>j.get(M)?(w.add(S),$(k)):(x.add(M),f--):(l(C,a),f--)}for(;f--;){var O=e[f];h.has(O.key)||l(O,a)}for(;v;)$(g[v-1]);return at(b),g}function Lo(e,n){for(var t={},o={},r={$$scope:1},i=e.length;i--;){var a=e[i],s=n[i];if(s){for(var l in a)l in s||(o[l]=1);for(var c in s)r[c]||(t[c]=s[c],r[c]=1);e[i]=s}else for(var u in a)r[u]=1}for(var d in o)d in t||(t[d]=void 0);return t}function Uo(e){return"object"===S(e)&&null!==e?e:{}}function Do(e,n,t){var o=e.$$.props[n];void 0!==o&&(e.$$.bound[o]=t,t(e.$$.ctx[o]))}function Jo(e){e&&e.c()}function Vo(e,n,t){var o=e.$$,r=o.fragment,i=o.after_update;r&&r.m(n,t),yo((function(){var n,t=e.$$.on_mount.map(rt).filter(st);e.$$.on_destroy?(n=e.$$.on_destroy).push.apply(n,w(t)):at(t);e.$$.on_mount=[]})),i.forEach(yo)}function Ho(e,n){var t,o,r,i=e.$$;null!==i.fragment&&(t=i.after_update,o=[],r=[],po.forEach((function(e){return-1===t.indexOf(e)?o.push(e):r.push(e)})),r.forEach((function(e){return e()})),po=o,at(i.on_destroy),i.fragment&&i.fragment.d(n),i.on_destroy=i.fragment=null,i.ctx=[])}function _o(e,n,t,o,r,i){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[-1],l=Zt;oo(e);var c=e.$$={fragment:null,ctx:[],props:i,update:nt,not_equal:r,bound:it(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(n.context||(l?l.$$.context:[])),callbacks:it(),dirty:s,skip_bound:!1,root:n.target||l.$$.root};a&&a(c.root);var u=!1;if(c.ctx=t?t(e,n.props||{},(function(n,t){var o=!(arguments.length<=2)&&arguments.length-2?arguments.length<=2?void 0:arguments[2]:t;return c.ctx&&r(c.ctx[n],c.ctx[n]=o)&&(!c.skip_bound&&c.bound[n]&&c.bound[n](o),u&&function(e,n){-1===e.$$.dirty[0]&&(fo.push(e),jo(),e.$$.dirty.fill(0)),e.$$.dirty[n/31|0]|=1<<n%31}(e,n)),t})):[],c.update(),u=!0,at(c.before_update),c.fragment=!!o&&o(c.ctx),n.target){if(n.hydrate){var d=function(e){return Array.from(e.childNodes)}(n.target);c.fragment&&c.fragment.l(d),d.forEach(Et)}else c.fragment&&c.fragment.c();n.intro&&qo(e.$$.fragment),Vo(e,n.target,n.anchor),Co()}oo(l)}var Wo=function(){return b((function e(){h(this,e),y(this,"$$",void 0),y(this,"$$set",void 0)}),[{key:"$destroy",value:function(){Ho(this,1),this.$destroy=nt}},{key:"$on",value:function(e,n){if(!st(n))return nt;var t=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return t.push(n),function(){var e=t.indexOf(n);-1!==e&&t.splice(e,1)}}},{key:"$set",value:function(e){var n;this.$$set&&(n=e,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}])}();function Qo(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){var n=function(e){try{if("undefined"!=typeof window&&void 0!==window.localStorage)return window.localStorage[e]}catch(e){}}("debug");return null!=n&&n.endsWith("*")?e.startsWith(n.slice(0,-1)):e===n}(e);if(!n)return Yo;var t=function(e){for(var n=0,t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return Ko[Math.abs(n)%Ko.length]}(e);return function(){for(var n,o=arguments.length,r=new Array(o),i=0;i<o;i++)r[i]=arguments[i];(n=console).log.apply(n,["%c".concat(e),"color:".concat(t)].concat(r))}}function Yo(){}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");var Ko=["#0000CC","#0099FF","#009400","#8dd200","#CCCC00","#CC9933","#ae04e7","#ff35d7","#FF3333","#FF6600","#FF9933","#FFCC33"];function Go(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.delay,o=void 0===t?0:t,r=n.duration,i=void 0===r?400:r,a=n.easing,s=void 0===a?tt:a,l=+getComputedStyle(e).opacity;return{delay:o,duration:i,easing:s,css:function(e){return"opacity: ".concat(e*l)}}}var Zo=kt.window;function Xo(e){St(e,"svelte-n7cvum",".svelte-n7cvum{box-sizing:border-box}.bg.svelte-n7cvum{position:fixed;z-index:1000;top:0;left:0;display:flex;flex-direction:column;justify-content:center;width:100vw;height:100vh;background:rgba(0, 0, 0, 0.66)}@supports (-webkit-touch-callout: none){}.wrap.svelte-n7cvum{position:relative;margin:2rem;max-height:100%}.window.svelte-n7cvum{position:relative;width:40rem;max-width:100%;max-height:100%;margin:2rem auto;color:black;border-radius:0.5rem;background:white}.content.svelte-n7cvum{position:relative;padding:1rem;max-height:calc(100vh - 4rem);overflow:auto}.close.svelte-n7cvum{display:block;box-sizing:border-box;position:absolute;z-index:1000;top:1rem;right:1rem;margin:0;padding:0;width:1.5rem;height:1.5rem;border:0;color:black;border-radius:1.5rem;background:white;box-shadow:0 0 0 1px black;transition:transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);-webkit-appearance:none}.close.svelte-n7cvum:before,.close.svelte-n7cvum:after{content:'';display:block;box-sizing:border-box;position:absolute;top:50%;width:1rem;height:1px;background:black;transform-origin:center;transition:height 0.2s cubic-bezier(0.25, 0.1, 0.25, 1),\n background 0.2s cubic-bezier(0.25, 0.1, 0.25, 1)}.close.svelte-n7cvum:before{-webkit-transform:translate(0, -50%) rotate(45deg);-moz-transform:translate(0, -50%) rotate(45deg);transform:translate(0, -50%) rotate(45deg);left:0.25rem}.close.svelte-n7cvum:after{-webkit-transform:translate(0, -50%) rotate(-45deg);-moz-transform:translate(0, -50%) rotate(-45deg);transform:translate(0, -50%) rotate(-45deg);left:0.25rem}.close.svelte-n7cvum:hover{background:black}.close.svelte-n7cvum:hover:before,.close.svelte-n7cvum:hover:after{height:2px;background:white}.close.svelte-n7cvum:focus{border-color:#3399ff;box-shadow:0 0 0 2px #3399ff}.close.svelte-n7cvum:active{transform:scale(0.9)}.close.svelte-n7cvum:hover,.close.svelte-n7cvum:focus,.close.svelte-n7cvum:active{outline:none}")}function er(e){var n,t,o,r,i,a,s,l,c,u,d,f,v,p,m,g,h,j,b=e[1].closeButton&&nr(e),y=e[2];return y&&(a=Gt(y,{})),{c:function(){n=Pt("div"),t=Pt("div"),o=Pt("div"),b&&b.c(),r=At(),i=Pt("div"),a&&Jo(a.$$.fragment),Ut(i,"class",s=ht(e[1].classContent)+" svelte-n7cvum"),Ut(i,"style",e[9]),Yt(i,"content",!e[0]),Ut(o,"class",l=ht(e[1].classWindow)+" svelte-n7cvum"),Ut(o,"role","dialog"),Ut(o,"aria-modal","true"),Ut(o,"aria-label",c=e[1].ariaLabelledBy?null:e[1].ariaLabel||null),Ut(o,"aria-labelledby",u=e[1].ariaLabelledBy||null),Ut(o,"style",e[8]),Yt(o,"window",!e[0]),Ut(t,"class",f=ht(e[1].classWindowWrap)+" svelte-n7cvum"),Ut(t,"style",e[7]),Yt(t,"wrap",!e[0]),Ut(n,"aria-hidden","true"),Ut(n,"id",v=e[1].id),Ut(n,"class",p=ht(e[1].classBg)+" svelte-n7cvum"),Ut(n,"style",e[6]),Yt(n,"bg",!e[0])},m:function(s,l){Rt(s,n,l),Ct(n,t),Ct(t,o),b&&b.m(o,null),Ct(o,r),Ct(o,i),a&&Vo(a,i,null),e[50](o),e[51](t),e[52](n),g=!0,h||(j=[Bt(o,"introstart",(function(){st(e[13])&&e[13].apply(this,arguments)})),Bt(o,"outrostart",(function(){st(e[14])&&e[14].apply(this,arguments)})),Bt(o,"introend",(function(){st(e[15])&&e[15].apply(this,arguments)})),Bt(o,"outroend",(function(){st(e[16])&&e[16].apply(this,arguments)})),Bt(n,"mousedown",e[20]),Bt(n,"mouseup",e[21])],h=!0)},p:function(d,m){if((e=d)[1].closeButton?b?(b.p(e,m),2&m[0]&&qo(b,1)):((b=nr(e)).c(),qo(b,1),b.m(o,r)):b&&(Ro(),Po(b,1,1,(function(){b=null})),Eo()),4&m[0]&&y!==(y=e[2])){if(a){Ro();var h=a;Po(h.$$.fragment,1,0,(function(){Ho(h,1)})),Eo()}y?(Jo((a=Gt(y,{})).$$.fragment),qo(a.$$.fragment,1),Vo(a,i,null)):a=null}(!g||2&m[0]&&s!==(s=ht(e[1].classContent)+" svelte-n7cvum"))&&Ut(i,"class",s),(!g||512&m[0])&&Ut(i,"style",e[9]),(!g||3&m[0])&&Yt(i,"content",!e[0]),(!g||2&m[0]&&l!==(l=ht(e[1].classWindow)+" svelte-n7cvum"))&&Ut(o,"class",l),(!g||2&m[0]&&c!==(c=e[1].ariaLabelledBy?null:e[1].ariaLabel||null))&&Ut(o,"aria-label",c),(!g||2&m[0]&&u!==(u=e[1].ariaLabelledBy||null))&&Ut(o,"aria-labelledby",u),(!g||256&m[0])&&Ut(o,"style",e[8]),(!g||3&m[0])&&Yt(o,"window",!e[0]),(!g||2&m[0]&&f!==(f=ht(e[1].classWindowWrap)+" svelte-n7cvum"))&&Ut(t,"class",f),(!g||128&m[0])&&Ut(t,"style",e[7]),(!g||3&m[0])&&Yt(t,"wrap",!e[0]),(!g||2&m[0]&&v!==(v=e[1].id))&&Ut(n,"id",v),(!g||2&m[0]&&p!==(p=ht(e[1].classBg)+" svelte-n7cvum"))&&Ut(n,"class",p),(!g||64&m[0])&&Ut(n,"style",e[6]),(!g||3&m[0])&&Yt(n,"bg",!e[0])},i:function(t){g||(qo(b),a&&qo(a.$$.fragment,t),t&&yo((function(){g&&(d||(d=To(o,e[12],e[1].transitionWindowProps,!0)),d.run(1))})),t&&yo((function(){g&&(m||(m=To(n,e[11],e[1].transitionBgProps,!0)),m.run(1))})),g=!0)},o:function(t){Po(b),a&&Po(a.$$.fragment,t),t&&(d||(d=To(o,e[12],e[1].transitionWindowProps,!1)),d.run(0)),t&&(m||(m=To(n,e[11],e[1].transitionBgProps,!1)),m.run(0)),g=!1},d:function(t){t&&Et(n),b&&b.d(),a&&Ho(a),e[50](null),t&&d&&d.end(),e[51](null),e[52](null),t&&m&&m.end(),h=!1,at(j)}}}function nr(e){var n,t,o,r,i,a=[or,tr],s=[];function l(e,t){return 2&t[0]&&(n=null),null==n&&(n=!!e[17](e[1].closeButton)),n?0:1}return t=l(e,[-1,-1,-1]),o=s[t]=a[t](e),{c:function(){o.c(),r=Nt()},m:function(e,n){s[t].m(e,n),Rt(e,r,n),i=!0},p:function(e,n){var i=t;(t=l(e,n))===i?s[t].p(e,n):(Ro(),Po(s[i],1,1,(function(){s[i]=null})),Eo(),(o=s[t])?o.p(e,n):(o=s[t]=a[t](e)).c(),qo(o,1),o.m(r.parentNode,r))},i:function(e){i||(qo(o),i=!0)},o:function(e){Po(o),i=!1},d:function(e){e&&Et(r),s[t].d(e)}}}function tr(e){var n,t,o,r;return{c:function(){Ut(n=Pt("button"),"class",t=ht(e[1].classCloseButton)+" svelte-n7cvum"),Ut(n,"aria-label","Close modal"),Ut(n,"style",e[10]),Ut(n,"type","button"),Yt(n,"close",!e[0])},m:function(t,i){Rt(t,n,i),o||(r=Bt(n,"click",e[18]),o=!0)},p:function(e,o){2&o[0]&&t!==(t=ht(e[1].classCloseButton)+" svelte-n7cvum")&&Ut(n,"class",t),1024&o[0]&&Ut(n,"style",e[10]),3&o[0]&&Yt(n,"close",!e[0])},i:nt,o:nt,d:function(e){e&&Et(n),o=!1,r()}}}function or(e){var n,t,o,r=e[1].closeButton;function i(e,n){return{props:{onClose:e[18]}}}return r&&(n=Gt(r,i(e))),{c:function(){n&&Jo(n.$$.fragment),t=Nt()},m:function(e,r){n&&Vo(n,e,r),Rt(e,t,r),o=!0},p:function(e,o){if(2&o[0]&&r!==(r=e[1].closeButton)){if(n){Ro();var a=n;Po(a.$$.fragment,1,0,(function(){Ho(a,1)})),Eo()}r?(Jo((n=Gt(r,i(e))).$$.fragment),qo(n.$$.fragment,1),Vo(n,t.parentNode,t)):n=null}},i:function(e){o||(n&&qo(n.$$.fragment,e),o=!0)},o:function(e){n&&Po(n.$$.fragment,e),o=!1},d:function(e){e&&Et(t),n&&Ho(n,e)}}}function rr(e){var n,t,o,r,i=e[2]&&er(e),a=e[49].default,s=ut(a,e,e[48],null);return{c:function(){i&&i.c(),n=At(),s&&s.c()},m:function(a,l){i&&i.m(a,l),Rt(a,n,l),s&&s.m(a,l),t=!0,o||(r=Bt(Zo,"keydown",e[19]),o=!0)},p:function(e,o){e[2]?i?(i.p(e,o),4&o[0]&&qo(i,1)):((i=er(e)).c(),qo(i,1),i.m(n.parentNode,n)):i&&(Ro(),Po(i,1,1,(function(){i=null})),Eo()),s&&s.p&&(!t||131072&o[1])&&vt(s,a,e,e[48],t?ft(a,e[48],o,null):pt(e[48]),null)},i:function(e){t||(qo(i),qo(s,e),t=!0)},o:function(e){Po(i),Po(s,e),t=!1},d:function(e){e&&Et(n),i&&i.d(e),s&&s.d(e),o=!1,r()}}}function ir(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t){return new e(g(g({},t),{},{props:g(g({},n),t.props)}))}}function ar(e,n,t){var o,r,i,a,s,l,c,u,d,f,v,p,m,h,j,b=n.$$slots,y=void 0===b?{}:b,x=n.$$scope,w=so(),$=lo,k=n.isTabbable,C=void 0===k?function(e){return e.tabIndex>=0&&!e.hidden&&!e.disabled&&"none"!==e.style.display&&"hidden"!==e.type&&Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}:k,S=n.show,M=void 0===S?null:S,O=n.id,z=void 0===O?null:O,R=n.key,E=void 0===R?"simple-modal":R,q=n.ariaLabel,P=void 0===q?null:q,I=n.ariaLabelledBy,T=void 0===I?null:I,A=n.closeButton,N=void 0===A||A,B=n.closeOnEsc,F=void 0===B||B,L=n.closeOnOuterClick,U=void 0===L||L,D=n.styleBg,J=void 0===D?{}:D,V=n.styleWindowWrap,H=void 0===V?{}:V,_=n.styleWindow,W=void 0===_?{}:_,Q=n.styleContent,Y=void 0===Q?{}:Q,K=n.styleCloseButton,G=void 0===K?{}:K,Z=n.classBg,X=void 0===Z?null:Z,ee=n.classWindowWrap,ne=void 0===ee?null:ee,te=n.classWindow,oe=void 0===te?null:te,re=n.classContent,ie=void 0===re?null:re,ae=n.classCloseButton,se=void 0===ae?null:ae,le=n.unstyled,ce=void 0!==le&&le,ue=n.setContext,de=void 0===ue?$:ue,fe=n.transitionBg,ve=void 0===fe?Go:fe,pe=n.transitionBgProps,me=void 0===pe?{duration:250}:pe,ge=n.transitionWindow,he=void 0===ge?ve:ge,je=n.transitionWindowProps,be=void 0===je?me:je,ye=n.disableFocusTrap,xe=void 0!==ye&&ye,we={id:z,ariaLabel:P,ariaLabelledBy:T,closeButton:N,closeOnEsc:F,closeOnOuterClick:U,styleBg:J,styleWindowWrap:H,styleWindow:W,styleContent:Y,styleCloseButton:G,classBg:X,classWindowWrap:ne,classWindow:oe,classContent:ie,classCloseButton:se,transitionBg:ve,transitionBgProps:me,transitionWindow:he,transitionWindowProps:be,disableFocusTrap:xe,isTabbable:C,unstyled:ce},$e=g({},we),ke=null,Ce=function(e){return e?Object.keys(e).reduce((function(n,t){return"".concat(n,"; ").concat(function(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}(t),": ").concat(e[t])}),""):""},Se=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},Me=function(){},Oe=Me,ze=Me,Re=Me,Ee=Me,qe=function(e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t(2,ke=ir(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})),t(1,$e=g(g({},we),n)),t(6,s=Ce(Object.assign({},{width:window.innerWidth,height:window.innerHeight},$e.styleBg))),t(7,l=Ce($e.styleWindowWrap)),t(8,c=Ce($e.styleWindow)),t(9,u=Ce($e.styleContent)),t(10,d=Ce($e.styleCloseButton)),t(11,f=$e.transitionBg),t(12,v=$e.transitionWindow),Ie(),t(13,Oe=function(e){o.onOpen&&o.onOpen(e),w("open"),w("opening")}),t(14,ze=function(e){o.onClose&&o.onClose(e),w("close"),w("closing")}),t(15,Re=function(e){o.onOpened&&o.onOpened(e),w("opened")}),t(16,Ee=function(e){o.onClosed&&o.onClosed(e),w("closed")})},Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ke&&(t(14,ze=e.onClose||ze),t(16,Ee=e.onClosed||Ee),t(2,ke=null),Te())},Ie=function(){a=window.scrollY,p=document.body.style.position,m=document.body.style.overflow,h=document.body.style.width,document.body.style.position="fixed",document.body.style.top="-".concat(a,"px"),document.body.style.overflow="hidden",document.body.style.width="100%"},Te=function(){document.body.style.position=p||"",document.body.style.top="",document.body.style.overflow=m||"",document.body.style.width=h||"",window.scrollTo({top:a,left:0,behavior:"instant"})};de(E,{open:qe,close:Pe});var Ae=!1;return ao((function(){Ae&&Pe()})),io((function(){t(47,Ae=!0)})),e.$$set=function(e){"isTabbable"in e&&t(22,C=e.isTabbable),"show"in e&&t(23,M=e.show),"id"in e&&t(24,z=e.id),"key"in e&&t(25,E=e.key),"ariaLabel"in e&&t(26,P=e.ariaLabel),"ariaLabelledBy"in e&&t(27,T=e.ariaLabelledBy),"closeButton"in e&&t(28,N=e.closeButton),"closeOnEsc"in e&&t(29,F=e.closeOnEsc),"closeOnOuterClick"in e&&t(30,U=e.closeOnOuterClick),"styleBg"in e&&t(31,J=e.styleBg),"styleWindowWrap"in e&&t(32,H=e.styleWindowWrap),"styleWindow"in e&&t(33,W=e.styleWindow),"styleContent"in e&&t(34,Y=e.styleContent),"styleCloseButton"in e&&t(35,G=e.styleCloseButton),"classBg"in e&&t(36,X=e.classBg),"classWindowWrap"in e&&t(37,ne=e.classWindowWrap),"classWindow"in e&&t(38,oe=e.classWindow),"classContent"in e&&t(39,ie=e.classContent),"classCloseButton"in e&&t(40,se=e.classCloseButton),"unstyled"in e&&t(0,ce=e.unstyled),"setContext"in e&&t(41,de=e.setContext),"transitionBg"in e&&t(42,ve=e.transitionBg),"transitionBgProps"in e&&t(43,me=e.transitionBgProps),"transitionWindow"in e&&t(44,he=e.transitionWindow),"transitionWindowProps"in e&&t(45,be=e.transitionWindowProps),"disableFocusTrap"in e&&t(46,xe=e.disableFocusTrap),"$$scope"in e&&t(48,x=e.$$scope)},e.$$.update=function(){8388608&e.$$.dirty[0]|65536&e.$$.dirty[1]&&Ae&&(Se(M)?qe(M):Pe())},[ce,$e,ke,o,r,i,s,l,c,u,d,f,v,Oe,ze,Re,Ee,Se,Pe,function(e){if($e.closeOnEsc&&ke&&"Escape"===e.key&&(e.preventDefault(),Pe()),ke&&"Tab"===e.key&&!$e.disableFocusTrap){var n=i.querySelectorAll("*"),t=Array.from(n).filter($e.isTabbable).sort((function(e,n){return e.tabIndex-n.tabIndex})),o=t.indexOf(document.activeElement);-1===o&&e.shiftKey&&(o=0),o+=t.length+(e.shiftKey?-1:1),t[o%=t.length].focus(),e.preventDefault()}},function(e){!$e.closeOnOuterClick||e.target!==o&&e.target!==r||(j=e.target)},function(e){$e.closeOnOuterClick&&e.target===j&&(e.preventDefault(),Pe())},C,M,z,E,P,T,N,F,U,J,H,W,Y,G,X,ne,oe,ie,se,de,ve,me,he,be,xe,Ae,x,y,function(e){vo[e?"unshift":"push"]((function(){t(5,i=e)}))},function(e){vo[e?"unshift":"push"]((function(){t(4,r=e)}))},function(e){vo[e?"unshift":"push"]((function(){t(3,o=e)}))}]}var sr,lr,cr,ur,dr,fr,vr,pr=function(e){function n(e){var t;return h(this,n),_o(t=u(this,n),e,ar,rr,lt,{isTabbable:22,show:23,id:24,key:25,ariaLabel:26,ariaLabelledBy:27,closeButton:28,closeOnEsc:29,closeOnOuterClick:30,styleBg:31,styleWindowWrap:32,styleWindow:33,styleContent:34,styleCloseButton:35,classBg:36,classWindowWrap:37,classWindow:38,classContent:39,classCloseButton:40,unstyled:0,setContext:41,transitionBg:42,transitionBgProps:43,transitionWindow:44,transitionWindowProps:45,disableFocusTrap:46},Xo,[-1,-1,-1]),t}return v(n,Wo),b(n)}();!function(e){e.text="text",e.tree="tree",e.table="table"}(sr||(sr={})),function(e){e.after="after",e.inside="inside",e.key="key",e.value="value",e.multi="multi",e.text="text"}(lr||(lr={})),function(e){e.after="after",e.key="key",e.value="value",e.inside="inside"}(cr||(cr={})),function(e){e.info="info",e.warning="warning",e.error="error"}(ur||(ur={})),function(e){e.key="key",e.value="value"}(dr||(dr={})),function(e){e.asc="asc",e.desc="desc"}(fr||(fr={})),function(e){e.no="no",e.self="self",e.nextInside="nextInside"}(vr||(vr={}));var mr=50,gr=200,hr=400,jr=1200,br=1e3,yr=100,xr=100,wr=2e4,$r=[{start:0,end:yr}],kr=104857600,Cr=1048576,Sr=10485760,Mr=10240,Or={closeButton:!1,classBg:"jse-modal-bg",classWindow:"jse-modal-window",classWindowWrap:"jse-modal-window-wrap",classContent:"jse-modal-container"},zr=g(g({},Or),{},{classWindow:"jse-modal-window jse-modal-window-sort"}),Rr=g(g({},Or),{},{classWindow:"jse-modal-window jse-modal-window-transform"}),Er=g(g({},Or),{},{classWindow:"jse-modal-window jse-modal-window-jsoneditor"}),qr="Insert or paste contents, enter [ insert a new array, enter { to insert a new object, or start typing to insert a new value",Pr="Open context menu (Click here, right click on the selection, or use the context menu button or Ctrl+Q)",Ir="hover-insert-inside",Tr="hover-insert-after",Ar="hover-collection",Nr="valid",Br="repairable",Fr=336,Lr=260,Ur=100,Dr=y(y({},fr.asc,"ascending"),fr.desc,"descending"),Jr=0;function Vr(){return++Jr}function Hr(e){return parseInt(e,10)}function _r(e){return Wr.test(e)}var Wr=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$/;function Qr(e){return"object"===S(e)&&null!==e&&(void 0===e.constructor||"Object"===e.constructor.name)}function Yr(e){return"object"===S(e)&&null!==e&&(void 0===e.constructor||"Object"===e.constructor.name||"Array"===e.constructor.name)}function Kr(e){if("number"==typeof e)return e>9466848e5&&isFinite(e)&&Math.floor(e)===e&&!isNaN(new Date(e).valueOf());if("bigint"==typeof e)return Kr(Number(e));try{var n=e?e.valueOf():e;if(n!==e)return Kr(n)}catch(e){return!1}return!1}function Gr(e){(Zr=Zr||window.document.createElement("div")).style.color="",Zr.style.color=e;var n=Zr.style.color;return""!==n?n.replace(/\s+/g,"").toLowerCase():null}var Zr=null;function Xr(e,n){if("number"==typeof e||"string"==typeof e||"boolean"==typeof e||void 0===e)return S(e);if("bigint"==typeof e)return"number";if(null===e)return"null";if(Array.isArray(e))return"array";if(Qr(e))return"object";var t=n.stringify(e);return t&&_r(t)?"number":"true"===t||"false"===t?"boolean":"null"===t?"null":"unknown"}var ei=/^https?:\/\/\S+$/;function ni(e){return"string"==typeof e&&ei.test(e)}function ti(e,n){if(""===e)return"";var t=e.trim();return"null"===t?null:"true"===t||"false"!==t&&(_r(t)?n.parse(t):e)}function oi(e){return ri.test(e)}var ri=/^-?[0-9]+$/,ii=1e4,ai=[];function si(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t={};if(!Array.isArray(e))throw new TypeError("Array expected");function o(e,r){(!Array.isArray(e)&&!Qr(e)||n&&r.length>0)&&(t[O(r)]=!0),Qr(e)&&Object.keys(e).forEach((function(n){o(e[n],r.concat(n))}))}for(var r=Math.min(e.length,ii),i=0;i<r;i++){o(e[i],ai)}return Object.keys(t).sort().map(M)}function li(e,n,t){if(!(n<=e))for(var o=e;o<n;o++)t(o)}function ci(e,n){return e.length>n?e.slice(0,n):e}function ui(e){return g({},e)}function di(e){return Object.values(e)}function fi(e,n,t,o){var r=e.slice(0),i=r.splice(n,t);return r.splice.apply(r,[n+o,0].concat(w(i))),r}function vi(e,n){try{return n.parse(e)}catch(t){return n.parse(_(e))}}function pi(e,n){try{return vi(e,n)}catch(e){return}}function mi(e,n){e=e.replace(hi,"");try{return n(e)}catch(e){}try{return n("["+e+"]")}catch(e){}try{return n("{"+e+"}")}catch(e){}throw new Error("Failed to parse partial JSON")}function gi(e){e=e.replace(hi,"");try{return _(e)}catch(e){}try{var n=_("["+e+"]");return n.substring(1,n.length-1)}catch(e){}try{var t=_("{"+e+"}");return t.substring(1,t.length-1)}catch(e){}throw new Error("Failed to repair partial JSON")}var hi=/,\s*$/;function ji(e,n){var t=Oi.exec(n);if(t){var o=Hr(t[2]),r=function(e,n){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length,r=0,i=t;i<o;i++)e.charAt(i)===n&&r++;return r}(e,"\n",0,o),i=o-e.lastIndexOf("\n",o)-1;return{position:o,line:r,column:i,message:n.replace(Oi,(function(){return"line ".concat(r+1," column ").concat(i+1)}))}}var a=zi.exec(n),s=a?Hr(a[1]):null,l=null!==s?s-1:null,c=Ri.exec(n),u=c?Hr(c[1]):null,d=null!==u?u-1:null,f=null!==l&&null!==d?function(e,n,t){var o=e.indexOf("\n"),r=1;for(;r<n&&-1!==o;)o=e.indexOf("\n",o+1),r++;return-1!==o?o+t+1:null}(e,l,d):null;return{position:f,line:l,column:d,message:n.replace(/^JSON.parse: /,"").replace(/ of the JSON data$/,"")}}function bi(e){return Qr(e)?void 0!==e.json?void 0!==e.text?'Content must contain either a property "json" or a property "text" but not both':null:void 0===e.text?'Content must contain either a property "json" or a property "text"':"string"!=typeof e.text?'Content "text" property must be a string containing a JSON document. Did you mean to use the "json" property instead?':null:"Content must be an object"}function yi(e){return Qr(e)&&(void 0!==e.json||"string"==typeof e.text)}function xi(e){return Qr(e)&&"string"==typeof e.text}function wi(e){return Qr(e)&&void 0!==e.json}function $i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:JSON;return xi(e)?e:{text:t.stringify(e.json,null,n)}}function ki(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:JSON;return wi(e)?e:{json:n.parse(e.text)}}function Ci(e,n,t){return $i(e,n,t).text}function Si(e,n){return Mi(e,n)>n}function Mi(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(xi(e))return e.text.length;var t=e.json,o=0;return function e(t){if(Array.isArray(t)){if((o+=t.length-1+2)>n)return o;for(var r=0;r<t.length;r++){if(e(t[r]),o>n)return o}}else if(Qr(t)){var i=Object.keys(t);o+=2+i.length+(i.length-1);for(var a=0;a<i.length;a++){var s=i[a],l=t[s];o+=s.length+2,e(l)}}else o+="string"==typeof t?t.length+2:String(t).length}(t),o}var Oi=/(position|char) (\d+)/,zi=/line (\d+)/,Ri=/column (\d+)/;function Ei(e,n){return e.parse===n.parse&&e.stringify===n.stringify}function qi(e){var n=e.substring(0,999).trim();return!n.includes("\n")&&Pi.test(n)}var Pi=/[,:]\S/;function Ii(e){var n=e.escapeControlCharacters,t=e.escapeUnicodeCharacters;return n?t?Ti:Ai:t?Ni:Bi}var Ti={escapeValue:function(e){return Fi(Ji(String(e)))},unescapeValue:function(e){return Vi(Li(e))}},Ai={escapeValue:function(e){return Ji(String(e))},unescapeValue:function(e){return Vi(e)}},Ni={escapeValue:function(e){return Fi(String(e))},unescapeValue:function(e){return Li(e)}},Bi={escapeValue:function(e){return String(e)},unescapeValue:function(e){return e}};function Fi(e){return e.replace(/[^\x20-\x7F]/g,(function(e){var n;return"\b"===e||"\f"===e||"\n"===e||"\r"===e||"\t"===e?e:"\\u"+("000"+(null===(n=e.codePointAt(0))||void 0===n?void 0:n.toString(16))).slice(-4)}))}function Li(e){return e.replace(/\\u[a-fA-F0-9]{4}/g,(function(e){try{var n=JSON.parse('"'+e+'"');return Ui[n]||n}catch(n){return e}}))}var Ui={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"},Di={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"};function Ji(e){return e.replace(/["\b\f\n\r\t\\]/g,(function(e){return Ui[e]||e}))}function Vi(e){return e.replace(/\\["bfnrt\\]/g,(function(e){return Di[e]||e}))}function Hi(e){return"string"!=typeof e?String(e):e.endsWith("\n")?e+"\n":e}function _i(e,n){return Qi(e,(function(e){return e.nodeName.toUpperCase()===n.toUpperCase()}))}function Wi(e,n,t){return Qi(e,(function(e){return function(e,n,t){return"function"==typeof e.getAttribute&&e.getAttribute(n)===t}(e,n,t)}))}function Qi(e,n){return!!Yi(e,n)}function Yi(e,n){for(var t=e;t&&!n(t);)t=t.parentNode;return t||void 0}function Ki(e){if(null!=e.firstChild){var n=document.createRange(),t=window.getSelection();n.setStart(e,1),n.collapse(!0),null==t||t.removeAllRanges(),null==t||t.addRange(n)}else e.focus()}function Gi(e,n,t,o){var r=Zi(e);if(r){var i=r.document.activeElement?r.document.activeElement:null;i&&i.isContentEditable&&(i.textContent=t?n:i.textContent+n,Ki(i),o&&o(i))}}function Zi(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:null}function Xi(e){var n=Zi(e),t=null==n?void 0:n.document.activeElement;return!!t&&Qi(t,(function(n){return n===e}))}function ea(e,n){return Yi(e,(function(e){return e.nodeName===n}))}function na(e){return Wi(e,"data-type","selectable-key")?lr.key:Wi(e,"data-type","selectable-value")?lr.value:Wi(e,"data-type","insert-selection-area-inside")?lr.inside:Wi(e,"data-type","insert-selection-area-after")?lr.after:lr.multi}function ta(e){return encodeURIComponent(O(e))}function oa(e){var n=Yi(e,(function(e){return!(null==e||!e.hasAttribute)&&e.hasAttribute("data-path")})),t=null==n?void 0:n.getAttribute("data-path");return t?M(decodeURIComponent(t)):null}function ra(e){var n=e.allElements,t=e.currentElement,o=e.direction,r=e.hasPrio,i=void 0===r?function(){return!0}:r,a=e.margin,s=void 0===a?10:a,l=Q(n.filter((function(e){var n=e.getBoundingClientRect();return n.width>0&&n.height>0})),u),c=u(t);function u(e){var n=e.getBoundingClientRect();return{x:n.left+n.width/2,y:n.top+n.height/2,rect:n,element:e}}function d(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=e.x-n.x,r=(e.y-n.y)*t;return Math.sqrt(o*o+r*r)}var f=function(e){return d(e,c)};if("Left"===o||"Right"===o){var v="Left"===o?l.fi