From bda790a94383e238ddbe4b49c0b05b993397f8c5 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 12 Jun 2024 13:15:03 +0000 Subject: [PATCH] build of repo at commit https://github.com/betagouv/pitchou/tree/9e1af437687d5d577ee986943142bc316a0e2a18 --- build/rollup-bundle-pitchou.css | 6 ++++++ build/rollup-bundle-pitchou.js | 2 ++ build/rollup-bundle-pitchou.js.map | 1 + 3 files changed, 9 insertions(+) create mode 100644 build/rollup-bundle-pitchou.css create mode 100644 build/rollup-bundle-pitchou.js create mode 100644 build/rollup-bundle-pitchou.js.map diff --git a/build/rollup-bundle-pitchou.css b/build/rollup-bundle-pitchou.css new file mode 100644 index 00000000..4bc86376 --- /dev/null +++ b/build/rollup-bundle-pitchou.css @@ -0,0 +1,6 @@ +code.hostname.svelte-uznn0l{white-space:nowrap} +table.svelte-1uilex1{text-align:left}tr.svelte-1uilex1{border:1px solid #CCC;border-width:1px 0}td.svelte-1uilex1,th.svelte-1uilex1{vertical-align:top;padding:0.3rem 0.6rem} +.autocomplete.svelte-75ckfb.svelte-75ckfb{min-width:200px;display:inline-block;max-width:100%;position:relative;vertical-align:top;height:2.25em}.autocomplete.svelte-75ckfb.svelte-75ckfb:not(.hide-arrow):not(.is-loading)::after{border:3px solid;border-radius:2px;border-right:0;border-top:0;content:" ";display:block;height:0.625em;margin-top:-0.4375em;pointer-events:none;position:absolute;top:50%;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:center;transform-origin:center;width:0.625em;border-color:#3273dc;right:1.125em;z-index:4}.autocomplete.show-clear.svelte-75ckfb.svelte-75ckfb:not(.hide-arrow)::after{right:2.3em}.autocomplete.svelte-75ckfb .svelte-75ckfb{box-sizing:border-box}.autocomplete-input.svelte-75ckfb.svelte-75ckfb{font:inherit;width:100%;height:100%;padding:5px 11px}.autocomplete.svelte-75ckfb:not(.hide-arrow) .autocomplete-input.svelte-75ckfb{padding-right:2em}.autocomplete.show-clear.svelte-75ckfb:not(.hide-arrow) .autocomplete-input.svelte-75ckfb{padding-right:3.2em}.autocomplete.hide-arrow.show-clear.svelte-75ckfb .autocomplete-input.svelte-75ckfb{padding-right:2em}.autocomplete-list.svelte-75ckfb.svelte-75ckfb{background:#fff;position:relative;width:100%;overflow-y:auto;z-index:99;padding:10px 0;top:0px;border:1px solid #999;max-height:calc(15 * (1rem + 10px) + 15px);user-select:none}.autocomplete-list.svelte-75ckfb.svelte-75ckfb:empty{padding:0}.autocomplete-list-item.svelte-75ckfb.svelte-75ckfb{padding:5px 15px;color:#333;cursor:pointer;line-height:1}.autocomplete-list-item.confirmed.svelte-75ckfb.svelte-75ckfb{background-color:#789fed;color:#fff}.autocomplete-list-item.selected.svelte-75ckfb.svelte-75ckfb{background-color:#2e69e2;color:#fff}.autocomplete-list-item-no-results.svelte-75ckfb.svelte-75ckfb{padding:5px 15px;color:#999;line-height:1}.autocomplete-list-item-create.svelte-75ckfb.svelte-75ckfb{padding:5px 15px;line-height:1}.autocomplete-list-item-loading.svelte-75ckfb.svelte-75ckfb{padding:5px 15px;line-height:1}.autocomplete-list.hidden.svelte-75ckfb.svelte-75ckfb{visibility:hidden}.autocomplete.show-clear.svelte-75ckfb .autocomplete-clear-button.svelte-75ckfb{cursor:pointer;display:block;text-align:center;position:absolute;right:0.1em;padding:0.3em 0.6em;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:4}.autocomplete.svelte-75ckfb:not(.show-clear) .autocomplete-clear-button.svelte-75ckfb{display:none}.autocomplete.svelte-75ckfb select.svelte-75ckfb{display:none}.autocomplete.is-multiple.svelte-75ckfb .input-container.svelte-75ckfb{height:auto;box-shadow:inset 0 1px 2px rgba(10, 10, 10, 0.1);border-radius:4px;border:1px solid #b5b5b5;padding-left:0.4em;padding-right:0.4em;display:flex;flex-wrap:wrap;align-items:stretch;background-color:#fff}.autocomplete.is-multiple.svelte-75ckfb .tag.svelte-75ckfb{display:flex;margin-top:0.5em;margin-bottom:0.3em}.autocomplete.is-multiple.svelte-75ckfb .tag.is-delete.svelte-75ckfb{cursor:pointer}.autocomplete.is-multiple.svelte-75ckfb .tags.svelte-75ckfb{margin-right:0.3em;margin-bottom:0}.autocomplete.is-multiple.svelte-75ckfb .autocomplete-input.svelte-75ckfb{display:flex;width:100%;flex:1 1 50px;min-width:3em;border:none;box-shadow:none;background:none} +.copy-link.svelte-1kokzi3.svelte-1kokzi3.svelte-1kokzi3{z-index:1;position:relative;font-size:inherit;font-family:inherit}.copy-link.svelte-1kokzi3.svelte-1kokzi3.svelte-1kokzi3::before{content:"";z-index:-1;position:absolute;top:0;bottom:0;left:0;right:0;background-color:#444;transform-origin:center right;transform:scaleX(0);transition:transform 0.4s ease-in-out}.copy-link.animate.svelte-1kokzi3.svelte-1kokzi3.svelte-1kokzi3{color:white}.copy-link.animate.svelte-1kokzi3.svelte-1kokzi3.svelte-1kokzi3::before{transform-origin:center left;transform:scaleX(1)}article.svelte-1kokzi3.svelte-1kokzi3.svelte-1kokzi3{max-width:90rem;margin:0 auto;border-radius:2em;padding:1em 0}article.svelte-1kokzi3 h1.svelte-1kokzi3.svelte-1kokzi3{margin-bottom:2rem}article.svelte-1kokzi3 section.svelte-1kokzi3.svelte-1kokzi3:first-of-type{padding-bottom:1.5rem}article.svelte-1kokzi3 .saisie-oiseau.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-flore.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-faune.svelte-1kokzi3.svelte-1kokzi3{display:flex;flex-direction:column;align-items:flex-start;border:1px solid grey;border-radius:1em;padding:1em;margin-bottom:2em}article.svelte-1kokzi3 .saisie-oiseau select.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-flore select.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-faune select.svelte-1kokzi3.svelte-1kokzi3{max-width:12rem}article.svelte-1kokzi3 .saisie-oiseau.svelte-1kokzi3>h1.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-flore.svelte-1kokzi3>h1.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-faune.svelte-1kokzi3>h1.svelte-1kokzi3{font-size:1.3rem}article.svelte-1kokzi3 .saisie-oiseau input[type=number].svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-flore input[type=number].svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-faune input[type=number].svelte-1kokzi3.svelte-1kokzi3{border-radius:0.5em;padding:0.4em;width:5em}article.svelte-1kokzi3 .saisie-oiseau label select.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-flore label select.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-faune label select.svelte-1kokzi3.svelte-1kokzi3{max-width:30em}article.svelte-1kokzi3 .saisie-oiseau table tr.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-flore table tr.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-faune table tr.svelte-1kokzi3.svelte-1kokzi3{text-align:left}article.svelte-1kokzi3 .saisie-oiseau table tr th.svelte-1kokzi3.svelte-1kokzi3:not(:last-of-type),article.svelte-1kokzi3 .saisie-flore table tr th.svelte-1kokzi3.svelte-1kokzi3:not(:last-of-type),article.svelte-1kokzi3 .saisie-faune table tr th.svelte-1kokzi3.svelte-1kokzi3:not(:last-of-type){padding-right:1em}article.svelte-1kokzi3 .saisie-oiseau table tr td.svelte-1kokzi3.svelte-1kokzi3:nth-of-type(1),article.svelte-1kokzi3 .saisie-flore table tr td.svelte-1kokzi3.svelte-1kokzi3:nth-of-type(1),article.svelte-1kokzi3 .saisie-faune table tr td.svelte-1kokzi3.svelte-1kokzi3:nth-of-type(1){width:30rem}article.svelte-1kokzi3 .saisie-oiseau table tr td.svelte-1kokzi3.svelte-1kokzi3:last-of-type,article.svelte-1kokzi3 .saisie-flore table tr td.svelte-1kokzi3.svelte-1kokzi3:last-of-type,article.svelte-1kokzi3 .saisie-faune table tr td.svelte-1kokzi3.svelte-1kokzi3:last-of-type{text-align:center}article.svelte-1kokzi3 .saisie-oiseau table tr button.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-flore table tr button.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-faune table tr button.svelte-1kokzi3.svelte-1kokzi3{all:unset;cursor:pointer}article.svelte-1kokzi3 .saisie-oiseau .arrete-prefectoral.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-flore .arrete-prefectoral.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-faune .arrete-prefectoral.svelte-1kokzi3.svelte-1kokzi3{padding:1rem;margin:1rem 0;border-radius:1em;width:100%;text-align:left;background-color:rgba(255, 255, 255, 0.4)}article.svelte-1kokzi3 .saisie-oiseau .arrete-prefectoral h1.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-flore .arrete-prefectoral h1.svelte-1kokzi3.svelte-1kokzi3,article.svelte-1kokzi3 .saisie-faune .arrete-prefectoral h1.svelte-1kokzi3.svelte-1kokzi3{font-size:1.2em}article.svelte-1kokzi3 .saisie-oiseau.svelte-1kokzi3.svelte-1kokzi3{background-color:lightblue}article.svelte-1kokzi3 .saisie-flore.svelte-1kokzi3.svelte-1kokzi3{background-color:lightgreen}article.svelte-1kokzi3 .saisie-faune.svelte-1kokzi3.svelte-1kokzi3{background-color:lightsalmon}article.svelte-1kokzi3 .espece-manquante.svelte-1kokzi3.svelte-1kokzi3{text-align:left;max-width:60rem;margin:0 auto} +article.svelte-a22p9l.svelte-a22p9l{text-align:left;max-width:60rem;margin:auto}article.svelte-a22p9l h1.svelte-a22p9l{text-align:center}article.svelte-a22p9l section.svelte-a22p9l{margin-bottom:3rem}article.svelte-a22p9l .chronologie.svelte-a22p9l{list-style:none}article.svelte-a22p9l .chronologie .text.svelte-a22p9l{display:inline-block;min-width:20rem;font-weight:bold} +article.svelte-yutiun.svelte-yutiun{text-align:left;max-width:80rem;margin:auto}article.svelte-yutiun h1.svelte-yutiun{text-align:center}article.svelte-yutiun label.file.svelte-yutiun{padding:1rem;border-radius:0.5rem;border:1px solid #ddd}article.svelte-yutiun table.svelte-yutiun{text-align:left}article.svelte-yutiun tr.svelte-yutiun{border:1px solid #CCC;border-width:1px 0}article.svelte-yutiun td.svelte-yutiun,article.svelte-yutiun th.svelte-yutiun{vertical-align:top;padding:0.3rem 0.6rem}article.svelte-yutiun td .non-reconnu.svelte-yutiun,article.svelte-yutiun th .non-reconnu.svelte-yutiun{text-decoration:underline dotted} diff --git a/build/rollup-bundle-pitchou.js b/build/rollup-bundle-pitchou.js new file mode 100644 index 00000000..e0837d01 --- /dev/null +++ b/build/rollup-bundle-pitchou.js @@ -0,0 +1,2 @@ +"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t={exports:{}};t.exports=function(){var e=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)},t=v,n=a,r=c,o=l,i=w,s=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e){for(var t,n=[],r=0,o=0,i="";null!=(t=s.exec(e));){var a=t[0],c=t[1],l=t.index;if(i+=e.slice(o,l),o=l+a.length,c)i+=c[1];else{i&&(n.push(i),i="");var u=t[2],h=t[3],f=t[4],m=t[5],p=t[6],g=t[7],w="+"===p||"*"===p,v="?"===p||"*"===p,b=u||"/",y=f||m||(g?".*":"[^"+b+"]+?");n.push({name:h||r++,prefix:u||"",delimiter:b,optional:v,repeat:w,pattern:d(y)})}}return o0){var r=this._window;k&&r.history.back(),this.len--}else e?setTimeout((function(){n.show(e,t)})):setTimeout((function(){n.show(n._getBase(),t)}))},_.prototype.redirect=function(e,t){var n=this;"string"==typeof e&&"string"==typeof t&&D.call(this,e,(function(e){setTimeout((function(){n.replace(t)}),0)})),"string"==typeof e&&void 0===t&&setTimeout((function(){n.replace(e)}),0)},_.prototype.replace=function(e,t,n,r){var o=new E(e,t,this),i=this.prevContext;return this.prevContext=o,this.current=o.path,o.init=n,o.save(),!1!==r&&this.dispatch(o,i),o},_.prototype.dispatch=function(e,t){var n=0,r=0,o=this;function i(){var e=o.exits[r++];if(!e)return s();e(t,i)}function s(){var t=o.callbacks[n++];if(e.path===o.current)return t?void t(e,s):$.call(o,e);e.handled=!1}t?i():s()},_.prototype.exit=function(e,t){if("function"==typeof e)return this.exit("*",e);for(var n=new A(e,null,this),r=1;r-1)&&!(o?t.target.baseVal:t.target)&&(o||this.sameOrigin(t.href))){var s=o?t.href.baseVal:t.pathname+t.search+(t.hash||"");s="/"!==s[0]?"/"+s:s,C&&s.match(/^\/[a-zA-Z]:\//)&&(s=s.replace(/^\/[a-zA-Z]:\//,"/"));var a=s,c=this._getBase();0===s.indexOf(c)&&(s=s.substr(c.length)),this._hashbang&&(s=s.replace("#!","")),(!c||a!==s||N&&"file:"===this._window.location.protocol)&&(e.preventDefault(),this.show(a))}}}}},_.prototype._onpopstate=(b=!1,x?(y&&"complete"===document.readyState?b=!0:window.addEventListener("load",(function(){setTimeout((function(){b=!0}),0)})),function(e){if(b){var t=this;if(e.state){var n=e.state.path;t.replace(n,e.state)}else if(N){var r=t._window.location;t.show(r.pathname+r.search+r.hash,void 0,void 0,!1)}}}):function(){}),_.prototype._which=function(e){return null==(e=e||x&&this._window.event).which?e.button:e.which},_.prototype._toURL=function(e){var t=this._window;if("function"==typeof URL&&N)return new URL(e,t.location.toString());if(y){var n=t.document.createElement("a");return n.href=e,n}},_.prototype.sameOrigin=function(e){if(!e||!N)return!1;var t=this._toURL(e),n=this._window.location;return n.protocol===t.protocol&&n.hostname===t.hostname&&(n.port===t.port||""===n.port&&(80==t.port||443==t.port))},_.prototype._samePath=function(e){if(!N)return!1;var t=this._window.location;return e.pathname===t.pathname&&e.search===t.search},_.prototype._decodeURLEncodedURIComponent=function(e){return"string"!=typeof e?e:this._decodeURLComponents?decodeURIComponent(e.replace(/\+/g," ")):e},E.prototype.pushState=function(){var e=this.page,t=e._window,n=e._hashbang;e.len++,k&&t.history.pushState(this.state,this.title,n&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},E.prototype.save=function(){var e=this.page;k&&e._window.history.replaceState(this.state,this.title,e._hashbang&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},A.prototype.middleware=function(e){var t=this;return function(n,r){if(t.match(n.path,n.params))return n.routePath=t.path,e(n,r);r()}},A.prototype.match=function(e,t){var n=this.keys,r=e.indexOf("?"),o=~r?e.slice(0,r):e,i=this.regexp.exec(decodeURIComponent(o));if(!i)return!1;delete t[0];for(var s=1,a=i.length;s9999?"+"+u(t,6):u(t,4))+"-"+u(e.getUTCMonth()+1,2)+"-"+u(e.getUTCDate(),2)+(i?"T"+u(n,2)+":"+u(r,2)+":"+u(o,2)+"."+u(i,3)+"Z":o?"T"+u(n,2)+":"+u(r,2)+":"+u(o,2)+"Z":r||n?"T"+u(n,2)+":"+u(r,2)+"Z":"")}function h(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function u(e,t){var c,l=[],u=e.length,d=0,h=0,f=u<=0,m=!1;function p(){if(f)return o;if(m)return m=!1,r;var t,c,l=d;if(e.charCodeAt(l)===i){for(;d++=u?f=!0:(c=e.charCodeAt(d++))===s?m=!0:c===a&&(m=!0,e.charCodeAt(d)===s&&++d),e.slice(l+1,t-1).replace(/""/g,'"')}for(;de;function x(e,t){for(const n in t)e[n]=t[n];return e}function k(e){return e()}function C(){return Object.create(null)}function M(e){e.forEach(k)}function N(e){return"function"==typeof e}function _(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function T(e,t,n,r){if(e){const o=D(e,t,n,r);return e[0](o)}}function D(e,t,n,r){return e[1]&&r?x(n.ctx.slice(),e[1](r(t))):n.ctx}function $(e,t,n,r){if(e[2]&&r){const o=e[2](r(n));if(void 0===t.dirty)return o;if("object"==typeof o){const e=[],n=Math.max(t.dirty.length,o.length);for(let r=0;r32){const t=[],n=e.ctx.length/32;for(let e=0;ewindow.performance.now():()=>Date.now(),z=j?e=>requestAnimationFrame(e):b;const O=new Set;function L(e){O.forEach((t=>{t.c(e)||(O.delete(t),t.f())})),0!==O.size&&z(L)}function q(e){let t;return 0===O.size&&z(L),{promise:new Promise((n=>{O.add(t={c:e,f:n})})),abort(){O.delete(t)}}}const F="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function R(e,t){e.appendChild(t)}function H(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Q(e){const t=X("style");return t.textContent="/* empty */",function(e,t){R(e.head||e,t),t.sheet}(H(e),t),t.sheet}function Y(e,t,n){e.insertBefore(t,n||null)}function W(e){e.parentNode&&e.parentNode.removeChild(e)}function B(e,t){for(let n=0;ne.removeEventListener(t,n,r)}function K(e){return function(t){return t.preventDefault(),e.call(this,t)}}function Z(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const ee=["width","height"];function te(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)null==t[r]?e.removeAttribute(r):"style"===r?e.style.cssText=t[r]:"__value"===r?e.value=e[r]=t[r]:n[r]&&n[r].set&&-1===ee.indexOf(r)?e[r]=t[r]:Z(e,r,t[r])}function ne(e){return""===e?null:+e}function re(e,t){t=""+t,e.data!==t&&(e.data=t)}function oe(e,t){e.value=null==t?"":t}function ie(e,t,n){for(let n=0;n>>0}(u)}_${a}`,h=H(e),{stylesheet:f,rules:m}=le.get(h)||function(e,t){const n={stylesheet:Q(t),rules:{}};return le.set(e,n),n}(h,e);m[d]||(m[d]=!0,f.insertRule(`@keyframes ${d} ${u}`,f.cssRules.length));const p=e.style.animation||"";return e.style.animation=`${p?`${p}, `:""}${d} ${r}ms linear ${o}ms 1 both`,de+=1,d}function fe(e,t){const n=(e.style.animation||"").split(", "),r=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),o=n.length-r.length;o&&(e.style.animation=r.join(", "),de-=o,de||z((()=>{de||(le.forEach((e=>{const{ownerNode:t}=e.stylesheet;t&&W(t)})),le.clear())})))}function me(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const r=getComputedStyle(e),o="none"===r.transform?"":r.transform;e.style.transform=`${o} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}function pe(e){ue=e}function ge(){if(!ue)throw new Error("Function called outside component initialization");return ue}const we=[],ve=[];let be=[];const ye=[],xe=Promise.resolve();let ke=!1;function Ce(e){be.push(e)}function Me(e){ye.push(e)}const Ne=new Set;let _e,Te=0;function De(){if(0!==Te)return;const e=ue;do{try{for(;Te{Ee.delete(e),r&&(n&&e.d(1),r())})),e.o(t)}else r&&r()}const Oe={duration:0};function Le(e,t,n,r){let o,i=t(e,n,{direction:"both"}),s=r?0:1,a=null,c=null,l=null;function u(){l&&fe(e,l)}function d(e,t){const n=e.b-s;return t*=Math.abs(n),{a:s,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function h(t){const{delay:n=0,duration:r=300,easing:h=y,tick:f=b,css:m}=i||Oe,p={start:I()+n,b:t};t||(p.group=Ae,Ae.r+=1),"inert"in e&&(t?void 0!==o&&(e.inert=o):(o=e.inert,e.inert=!0)),a||c?c=p:(m&&(u(),l=he(e,s,t,r,n,h,m)),t&&f(0,1),a=d(p,r),Ce((()=>Pe(e,t,"start"))),q((t=>{if(c&&t>c.start&&(a=d(c,r),c=null,Pe(e,a.b,"start"),m&&(u(),l=he(e,s,a.b,a.duration,0,h,i.css))),a)if(t>=a.end)f(s=a.b,1-s),Pe(e,a.b,"end"),c||(a.b?u():--a.group.r||M(a.group.c)),a=null;else if(t>=a.start){const e=t-a.start;s=a.a+a.d*h(e/a.duration),f(s,1-s)}return!(!a&&!c)})))}return{run(e){N(i)?(_e||(_e=Promise.resolve(),_e.then((()=>{_e=null}))),_e).then((()=>{i=i({direction:e?"in":"out"}),h(e)})):h(e)},end(){u(),a=c=null}}}function qe(e,t){const n=t.token={};function r(e,r,o,i){if(t.token!==n)return;t.resolved=i;let s=t.ctx;void 0!==o&&(s=s.slice(),s[o]=i);const a=e&&(t.current=e)(s);let c=!1;t.block&&(t.blocks?t.blocks.forEach(((e,n)=>{n!==r&&e&&(Se(),ze(e,1,1,(()=>{t.blocks[n]===e&&(t.blocks[n]=null)})),je())})):t.block.d(1),a.c(),Ie(a,1),a.m(t.mount(),t.anchor),c=!0),t.block=a,t.blocks&&(t.blocks[r]=a),c&&De()}if(!(o=e)||"object"!=typeof o&&"function"!=typeof o||"function"!=typeof o.then){if(t.current!==t.then)return r(t.then,1,t.value,e),!0;t.resolved=e}else{const n=ge();if(e.then((e=>{pe(n),r(t.then,1,t.value,e),pe(null)}),(e=>{if(pe(n),r(t.catch,2,t.error,e),pe(null),!t.hasCatch)throw e})),t.current!==t.pending)return r(t.pending,0),!0}var o}function Fe(e){return void 0!==e?.length?e:Array.from(e)}function Re(e,t){e.f(),function(e,t){ze(e,1,1,(()=>{t.delete(e.key)}))}(e,t)}function He(e,t,n){const r=e.$$.props[t];void 0!==r&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function Qe(e){e&&e.c()}function Ye(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),Ce((()=>{const t=e.$$.on_mount.map(k).filter(N);e.$$.on_destroy?e.$$.on_destroy.push(...t):M(t),e.$$.on_mount=[]})),o.forEach(Ce)}function We(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];be.forEach((r=>-1===e.indexOf(r)?t.push(r):n.push(r))),n.forEach((e=>e())),be=t}(n.after_update),M(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Be(e,t){-1===e.$$.dirty[0]&&(we.push(e),ke||(ke=!0,xe.then(De)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const i=r.length?r[0]:n;return l.ctx&&o(l.ctx[t],l.ctx[t]=i)&&(!l.skip_bound&&l.bound[t]&&l.bound[t](i),u&&Be(e,t)),n})):[],l.update(),u=!0,M(l.before_update),l.fragment=!!r&&r(l.ctx),t.target){if(t.hydrate){const e=function(e){return Array.from(e.childNodes)}(t.target);l.fragment&&l.fragment.l(e),e.forEach(W)}else l.fragment&&l.fragment.c();t.intro&&Ie(e.$$.fragment),Ye(e,t.target,t.anchor),De()}pe(c)}class Ue{$$=void 0;$$set=void 0;$destroy(){We(this,1),this.$destroy=b}$on(e,t){if(!N(t))return b;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Ve(e,t,n){const r=e.slice();return r[5]=t[n],r[7]=n,r}function Je(e){let t,n,r,o=e[5]+"",i=0!==e[7]&&function(e){let t;return{c(){t=U(", ")},m(e,n){Y(e,t,n)},d(e){e&&W(t)}}}();return{c(){i&&i.c(),t=V(),n=X("code"),r=U(o),Z(n,"class","hostname svelte-uznn0l")},m(e,o){i&&i.m(e,o),Y(e,t,o),Y(e,n,o),R(n,r)},p(e,t){1&t&&o!==(o=e[5]+"")&&re(r,o)},d(e){e&&(W(t),W(n)),i&&i.d(e)}}}function Ge(e){let t,n,r,o,i,s,a,c,l,u,d,h,f,m=Fe([...e[0]]),p=[];for(let t=0;t{"authorizedEmailDomains"in e&&n(0,o=e.authorizedEmailDomains),"envoiEmailConnexion"in e&&n(1,i=e.envoiEmailConnexion)},[o,i,r,function(){r=this.value,n(2,r)},()=>i(r)]}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class Ze extends Ue{constructor(e){super(),Xe(this,e,Ke,Ge,_,{authorizedEmailDomains:0,envoiEmailConnexion:1})}}function et(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}function tt(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function nt(e,t){const n=et(e);return isNaN(t)?tt(e,NaN):t?(n.setDate(n.getDate()+t),n):n}const rt=6048e5,ot=864e5;let it={};function st(){return it}function at(e,t){const n=st(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=et(e),i=o.getDay(),s=(i=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function ut(e){const t=et(e);return t.setHours(0,0,0,0),t}function dt(e){const t=et(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ht(e,t){const n=ut(e),r=ut(t),o=+n-dt(n),i=+r-dt(r);return Math.round((o-i)/ot)}function ft(e){if(!(t=e,t instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)||"number"==typeof e))return!1;var t;const n=et(e);return!isNaN(Number(n))}function mt(e,t){const n=et(e),r=et(t),o=pt(n,r),i=Math.abs(ht(n,r));n.setDate(n.getDate()-o*i);const s=o*(i-Number(pt(n,r)===-o));return 0===s?0:s}function pt(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}const gt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function wt(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const vt={date:wt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:wt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:wt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},bt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function yt(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function xt(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?function(e,t){for(let n=0;ne.test(s))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(a,(e=>e.test(s)));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;return{value:l,rest:t.slice(s.length)}}}function kt(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;return{value:s,rest:t.slice(o.length)}}}const Ct={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=gt[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:vt,formatRelative:(e,t,n,r)=>bt[e],localize:{ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:yt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:yt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:yt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:yt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:yt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:kt({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:xt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:xt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:xt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:xt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:xt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function Mt(e){const t=et(e),n=ht(t,function(e){const t=et(e),n=tt(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}(t));return n+1}function Nt(e){const t=et(e),n=+ct(t)-+function(e){const t=lt(e),n=tt(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ct(n)}(t);return Math.round(n/rt)+1}function _t(e,t){const n=et(e),r=n.getFullYear(),o=st(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=tt(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=at(s,t),c=tt(e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const l=at(c,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Tt(e,t){const n=et(e),r=+at(n,t)-+function(e,t){const n=st(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=_t(e,t),i=tt(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),at(i,t)}(n,t);return Math.round(r/rt)+1}function Dt(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const $t={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Dt("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Dt(n+1,2)},d:(e,t)=>Dt(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Dt(e.getHours()%12||12,t.length),H:(e,t)=>Dt(e.getHours(),t.length),m:(e,t)=>Dt(e.getMinutes(),t.length),s:(e,t)=>Dt(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Dt(Math.trunc(r*Math.pow(10,n-3)),t.length)}},Pt="midnight",Et="noon",At="morning",St="afternoon",jt="evening",It="night",zt={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return $t.y(e,t)},Y:function(e,t,n,r){const o=_t(e,r),i=o>0?o:1-o;if("YY"===t){return Dt(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Dt(i,t.length)},R:function(e,t){return Dt(lt(e),t.length)},u:function(e,t){return Dt(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Dt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Dt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $t.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Dt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Tt(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Dt(o,t.length)},I:function(e,t,n){const r=Nt(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Dt(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):$t.d(e,t)},D:function(e,t,n){const r=Mt(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Dt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Dt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Dt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Dt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?Et:0===r?Pt:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?jt:r>=12?St:r>=4?At:It,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return $t.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):$t.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Dt(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Dt(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$t.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$t.s(e,t)},S:function(e,t){return $t.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Lt(r);case"XXXX":case"XX":return qt(r);default:return qt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Lt(r);case"xxxx":case"xx":return qt(r);default:return qt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ot(r,":");default:return"GMT"+qt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ot(r,":");default:return"GMT"+qt(r,":")}},t:function(e,t,n){return Dt(Math.trunc(e.getTime()/1e3),t.length)},T:function(e,t,n){return Dt(e.getTime(),t.length)}};function Ot(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+Dt(i,2)}function Lt(e,t){if(e%60==0){return(e>0?"-":"+")+Dt(Math.abs(e)/60,2)}return qt(e,t)}function qt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Dt(Math.trunc(r/60),2)+t+Dt(r%60,2)}const Ft=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Rt=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Ht={p:Rt,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ft(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Ft(r,t)).replace("{{time}}",Rt(o,t))}},Qt=/^D+$/,Yt=/^Y+$/,Wt=["D","DD","YY","YYYY"];function Bt(e){return Qt.test(e)}function Xt(e){return Yt.test(e)}function Ut(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Wt.includes(e))throw new RangeError(r)}const Vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Gt=/^'([^]*?)'?$/,Kt=/''/g,Zt=/[a-zA-Z]/;function en(e,t,n){const r=st(),o=n?.locale??r.locale??Ct,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=et(e);if(!ft(a))throw new RangeError("Invalid time value");let c=t.match(Jt).map((e=>{const t=e[0];if("p"===t||"P"===t){return(0,Ht[t])(e,o.formatLong)}return e})).join("").match(Vt).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:tn(e)};if(zt[t])return{isToken:!0,value:e};if(t.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const l={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return c.map((r=>{if(!r.isToken)return r.value;const i=r.value;(!n?.useAdditionalWeekYearTokens&&Xt(i)||!n?.useAdditionalDayOfYearTokens&&Bt(i))&&Ut(i,t,String(e));return(0,zt[i[0]])(a,i,o.localize,l)})).join("")}function tn(e){const t=e.match(Gt);return t?t[1].replace(Kt,"'"):e}class nn{subPriority=0;validate(e,t){return!0}}class rn extends nn{constructor(e,t,n,r,o){super(),this.value=e,this.validateValue=t,this.setValue=n,this.priority=r,o&&(this.subPriority=o)}validate(e,t){return this.validateValue(e,this.value,t)}set(e,t,n){return this.setValue(e,t,this.value,n)}}class on extends nn{priority=10;subPriority=-1;set(e,t){return t.timestampIsSet?e:tt(e,function(e,t){const n=t instanceof Date?tt(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}(e,Date))}}class sn{run(e,t,n,r){const o=this.parse(e,t,n,r);return o?{setter:new rn(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(e,t,n){return!0}}const an=/^(1[0-2]|0?\d)/,cn=/^(3[0-1]|[0-2]?\d)/,ln=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,un=/^(5[0-3]|[0-4]?\d)/,dn=/^(2[0-3]|[0-1]?\d)/,hn=/^(2[0-4]|[0-1]?\d)/,fn=/^(1[0-1]|0?\d)/,mn=/^(1[0-2]|0?\d)/,pn=/^[0-5]?\d/,gn=/^[0-5]?\d/,wn=/^\d/,vn=/^\d{1,2}/,bn=/^\d{1,3}/,yn=/^\d{1,4}/,xn=/^-?\d+/,kn=/^-?\d/,Cn=/^-?\d{1,2}/,Mn=/^-?\d{1,3}/,Nn=/^-?\d{1,4}/,_n=/^([+-])(\d{2})(\d{2})?|Z/,Tn=/^([+-])(\d{2})(\d{2})|Z/,Dn=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,$n=/^([+-])(\d{2}):(\d{2})|Z/,Pn=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function En(e,t){return e?{value:t(e.value),rest:e.rest}:e}function An(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Sn(e,t){const n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};return{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}}function jn(e){return An(xn,e)}function In(e,t){switch(e){case 1:return An(wn,t);case 2:return An(vn,t);case 3:return An(bn,t);case 4:return An(yn,t);default:return An(new RegExp("^\\d{1,"+e+"}"),t)}}function zn(e,t){switch(e){case 1:return An(kn,t);case 2:return An(Cn,t);case 3:return An(Mn,t);case 4:return An(Nn,t);default:return An(new RegExp("^-?\\d{1,"+e+"}"),t)}}function On(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Ln(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const t=r+50;o=e+100*Math.trunc(t/100)-(e>=t%100?100:0)}return n?o:1-o}function qn(e){return e%400==0||e%4==0&&e%100!=0}const Fn=[31,28,31,30,31,30,31,31,30,31,30,31],Rn=[31,29,31,30,31,30,31,31,30,31,30,31];function Hn(e,t,n){const r=st(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=et(e),s=i.getDay(),a=7-o;return nt(i,t<0||t>6?t-(s+a)%7:((t%7+7)%7+a)%7-(s+a)%7)}function Qn(e,t){const n=et(e),r=function(e){let t=et(e).getDay();return 0===t&&(t=7),t}(n);return nt(n,t-r)}const Yn={G:new class extends sn{priority=140;parse(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}set(e,t,n){return t.era=n,e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["R","u","t","T"]},y:new class extends sn{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"yy"===t});switch(t){case"y":return En(In(4,e),r);case"yo":return En(n.ordinalNumber(e,{unit:"year"}),r);default:return En(In(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n){const r=e.getFullYear();if(n.isTwoDigitYear){const t=Ln(n.year,r);return e.setFullYear(t,0,1),e.setHours(0,0,0,0),e}const o="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(o,0,1),e.setHours(0,0,0,0),e}},Y:new class extends sn{priority=130;parse(e,t,n){const r=e=>({year:e,isTwoDigitYear:"YY"===t});switch(t){case"Y":return En(In(4,e),r);case"Yo":return En(n.ordinalNumber(e,{unit:"year"}),r);default:return En(In(t.length,e),r)}}validate(e,t){return t.isTwoDigitYear||t.year>0}set(e,t,n,r){const o=_t(e,r);if(n.isTwoDigitYear){const t=Ln(n.year,o);return e.setFullYear(t,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),at(e,r)}const i="era"in t&&1!==t.era?1-n.year:n.year;return e.setFullYear(i,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),at(e,r)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:new class extends sn{priority=130;parse(e,t){return zn("R"===t?4:t.length,e)}set(e,t,n){const r=tt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ct(r)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:new class extends sn{priority=130;parse(e,t){return zn("u"===t?4:t.length,e)}set(e,t,n){return e.setFullYear(n,0,1),e.setHours(0,0,0,0),e}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]},Q:new class extends sn{priority=120;parse(e,t,n){switch(t){case"Q":case"QQ":return In(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:new class extends sn{priority=120;parse(e,t,n){switch(t){case"q":case"qq":return In(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=1&&t<=4}set(e,t,n){return e.setMonth(3*(n-1),1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:new class extends sn{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"M":return En(An(an,e),r);case"MM":return En(In(2,e),r);case"Mo":return En(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}},L:new class extends sn{priority=110;parse(e,t,n){const r=e=>e-1;switch(t){case"L":return En(An(an,e),r);case"LL":return En(In(2,e),r);case"Lo":return En(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.setMonth(n,1),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:new class extends sn{priority=100;parse(e,t,n){switch(t){case"w":return An(un,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return In(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n,r){return at(function(e,t,n){const r=et(e),o=Tt(r,n)-t;return r.setDate(r.getDate()-7*o),r}(e,n,r),r)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:new class extends sn{priority=100;parse(e,t,n){switch(t){case"I":return An(un,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return In(t.length,e)}}validate(e,t){return t>=1&&t<=53}set(e,t,n){return ct(function(e,t){const n=et(e),r=Nt(n)-t;return n.setDate(n.getDate()-7*r),n}(e,n))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:new class extends sn{priority=90;subPriority=1;parse(e,t,n){switch(t){case"d":return An(cn,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return In(t.length,e)}}validate(e,t){const n=qn(e.getFullYear()),r=e.getMonth();return n?t>=1&&t<=Rn[r]:t>=1&&t<=Fn[r]}set(e,t,n){return e.setDate(n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:new class extends sn{priority=90;subpriority=1;parse(e,t,n){switch(t){case"D":case"DD":return An(ln,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return In(t.length,e)}}validate(e,t){return qn(e.getFullYear())?t>=1&&t<=366:t>=1&&t<=365}set(e,t,n){return e.setMonth(0,n),e.setHours(0,0,0,0),e}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:new class extends sn{priority=90;parse(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Hn(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["D","i","e","c","t","T"]},e:new class extends sn{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return En(In(t.length,e),o);case"eo":return En(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Hn(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:new class extends sn{priority=90;parse(e,t,n,r){const o=e=>{const t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return En(In(t.length,e),o);case"co":return En(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}validate(e,t){return t>=0&&t<=6}set(e,t,n,r){return(e=Hn(e,n,r)).setHours(0,0,0,0),e}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:new class extends sn{priority=90;parse(e,t,n){const r=e=>0===e?7:e;switch(t){case"i":case"ii":return In(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return En(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return En(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return En(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);default:return En(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,t){return t>=1&&t<=7}set(e,t,n){return(e=Qn(e,n)).setHours(0,0,0,0),e}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:new class extends sn{priority=80;parse(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(On(n),0,0,0),e}incompatibleTokens=["b","B","H","k","t","T"]},b:new class extends sn{priority=80;parse(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(On(n),0,0,0),e}incompatibleTokens=["a","B","H","k","t","T"]},B:new class extends sn{priority=80;parse(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,t,n){return e.setHours(On(n),0,0,0),e}incompatibleTokens=["a","b","t","T"]},h:new class extends sn{priority=70;parse(e,t,n){switch(t){case"h":return An(mn,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return In(t.length,e)}}validate(e,t){return t>=1&&t<=12}set(e,t,n){const r=e.getHours()>=12;return r&&n<12?e.setHours(n+12,0,0,0):r||12!==n?e.setHours(n,0,0,0):e.setHours(0,0,0,0),e}incompatibleTokens=["H","K","k","t","T"]},H:new class extends sn{priority=70;parse(e,t,n){switch(t){case"H":return An(dn,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return In(t.length,e)}}validate(e,t){return t>=0&&t<=23}set(e,t,n){return e.setHours(n,0,0,0),e}incompatibleTokens=["a","b","h","K","k","t","T"]},K:new class extends sn{priority=70;parse(e,t,n){switch(t){case"K":return An(fn,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return In(t.length,e)}}validate(e,t){return t>=0&&t<=11}set(e,t,n){return e.getHours()>=12&&n<12?e.setHours(n+12,0,0,0):e.setHours(n,0,0,0),e}incompatibleTokens=["h","H","k","t","T"]},k:new class extends sn{priority=70;parse(e,t,n){switch(t){case"k":return An(hn,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return In(t.length,e)}}validate(e,t){return t>=1&&t<=24}set(e,t,n){const r=n<=24?n%24:n;return e.setHours(r,0,0,0),e}incompatibleTokens=["a","b","h","H","K","t","T"]},m:new class extends sn{priority=60;parse(e,t,n){switch(t){case"m":return An(pn,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return In(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setMinutes(n,0,0),e}incompatibleTokens=["t","T"]},s:new class extends sn{priority=50;parse(e,t,n){switch(t){case"s":return An(gn,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return In(t.length,e)}}validate(e,t){return t>=0&&t<=59}set(e,t,n){return e.setSeconds(n,0),e}incompatibleTokens=["t","T"]},S:new class extends sn{priority=30;parse(e,t){return En(In(t.length,e),(e=>Math.trunc(e*Math.pow(10,3-t.length))))}set(e,t,n){return e.setMilliseconds(n),e}incompatibleTokens=["t","T"]},X:new class extends sn{priority=10;parse(e,t){switch(t){case"X":return Sn(_n,e);case"XX":return Sn(Tn,e);case"XXXX":return Sn(Dn,e);case"XXXXX":return Sn(Pn,e);default:return Sn($n,e)}}set(e,t,n){return t.timestampIsSet?e:tt(e,e.getTime()-dt(e)-n)}incompatibleTokens=["t","T","x"]},x:new class extends sn{priority=10;parse(e,t){switch(t){case"x":return Sn(_n,e);case"xx":return Sn(Tn,e);case"xxxx":return Sn(Dn,e);case"xxxxx":return Sn(Pn,e);default:return Sn($n,e)}}set(e,t,n){return t.timestampIsSet?e:tt(e,e.getTime()-dt(e)-n)}incompatibleTokens=["t","T","X"]},t:new class extends sn{priority=40;parse(e){return jn(e)}set(e,t,n){return[tt(e,1e3*n),{timestampIsSet:!0}]}incompatibleTokens="*"},T:new class extends sn{priority=20;parse(e){return jn(e)}set(e,t,n){return[tt(e,n),{timestampIsSet:!0}]}incompatibleTokens="*"}},Wn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Xn=/^'([^]*?)'?$/,Un=/''/g,Vn=/\S/,Jn=/[a-zA-Z]/;function Gn(e,t,n,r){const o=Object.assign({},st()),i=o.locale??Ct,s=o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(""===t)return""===e?et(n):tt(n,NaN);const c={firstWeekContainsDate:s,weekStartsOn:a,locale:i},l=[new on],u=t.match(Bn).map((e=>{const t=e[0];if(t in Ht){return(0,Ht[t])(e,i.formatLong)}return e})).join("").match(Wn),d=[];for(let r of u){Xt(r)&&Ut(r,t,e),Bt(r)&&Ut(r,t,e);const o=r[0],s=Yn[o];if(s){const{incompatibleTokens:t}=s;if(Array.isArray(t)){const e=d.find((e=>t.includes(e.token)||e.token===o));if(e)throw new RangeError(`The format string mustn't contain \`${e.fullToken}\` and \`${r}\` at the same time`)}else if("*"===s.incompatibleTokens&&d.length>0)throw new RangeError(`The format string mustn't contain \`${r}\` and any other token at the same time`);d.push({token:o,fullToken:r});const a=s.run(e,r,i.match,c);if(!a)return tt(n,NaN);l.push(a.setter),e=a.rest}else{if(o.match(Jn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");if("''"===r?r="'":"'"===o&&(r=r.match(Xn)[1].replace(Un,"'")),0!==e.indexOf(r))return tt(n,NaN);e=e.slice(r.length)}}if(e.length>0&&Vn.test(e))return tt(n,NaN);const h=l.map((e=>e.priority)).sort(((e,t)=>t-e)).filter(((e,t,n)=>n.indexOf(e)===t)).map((e=>l.filter((t=>t.priority===e)).sort(((e,t)=>t.subPriority-e.subPriority)))).map((e=>e[0]));let f=et(n);if(isNaN(f.getTime()))return tt(n,NaN);const m={};for(const e of h){if(!e.validate(f,c))return tt(n,NaN);const t=e.set(f,m,c);Array.isArray(t)?(f=t[0],Object.assign(m,t[1])):f=t}return tt(n,f)}const Kn={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},Zn={date:wt({formats:{full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},defaultWidth:"full"}),time:wt({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:wt({formats:{full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},er={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},tr=["MMM","MMMM"],nr={code:"fr",formatDistance:(e,t,n)=>{let r;const o=Kn[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"dans "+r:"il y a "+r:r},formatLong:Zn,formatRelative:(e,t,n,r)=>er[e],localize:{preprocessor:(e,t)=>{if(1===e.getDate())return t;return t.some((e=>e.isToken&&tr.includes(e.value)))?t.map((e=>e.isToken&&"do"===e.value?{isToken:!0,value:"d"}:e)):t},ordinalNumber:(e,t)=>{const n=Number(e),r=t?.unit;if(0===n)return"0";let o;return o=1===n?r&&["year","week","hour","minute","second"].includes(r)?"ère":"er":"ème",n+o},era:yt({values:{narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},defaultWidth:"wide"}),quarter:yt({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:yt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},defaultWidth:"wide"}),day:yt({values:{narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},defaultWidth:"wide"}),dayPeriod:yt({values:{narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},defaultWidth:"wide"})},match:{ordinalNumber:kt({matchPattern:/^(\d+)(ième|ère|ème|er|e)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e)}),era:xt({matchPatterns:{narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:"any"}),quarter:xt({matchPatterns:{narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:xt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:xt({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:xt({matchPatterns:{narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}};function rr({communes:e,"départements":t,"régions":n}){return e||t||!n?!e&&t?t.join(", "):!e&&!t||0===e.length&&0===t.length?"(inconnue)":e.map((({name:e})=>e)).join(", ")+" "+`(${t.join(", ")})`:`Régions: ${n.join(", ")}`}function or({"déposant_nom":e,"déposant_prénoms":t}){return e||(e=""),t||(t=""),e?e+" "+t:t}function ir({demandeur_personne_physique_nom:e,"demandeur_personne_physique_prénoms":t,demandeur_personne_morale_raison_sociale:n,demandeur_personne_morale_siret:r}){return e?e+" "+t:r?`${n} (${r})`:"(inconnu)"}function sr(e){return e?en(e,"d MMMM yyyy",{locale:nr}):"(date inconnue)"}function ar(e){return e?0===mt(e,new Date)?"Aujourd'hui":Math.abs(mt(e,new Date))<=7?function(e,t,n){const r=et(e),o=et(t),i=st(),s=n?.locale??i.locale??Ct,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,c=ht(r,o);if(isNaN(c))throw new RangeError("Invalid time value");let l;return l=c<-6?"other":c<-1?"lastWeek":c<0?"yesterday":c<1?"today":c<2?"tomorrow":c<7?"nextWeek":"other",en(r,s.formatRelative(l,r,o,{locale:s,weekStartsOn:a}),{locale:s,weekStartsOn:a})}(e,new Date,{locale:nr}):sr(e):"(date inconnue)"}function cr(e,t,n){const r=e.slice();return r[1]=t[n].id,r[2]=t[n].statut,r[3]=t[n].date_dépôt,r[4]=t[n].déposant_nom,r[5]=t[n].déposant_prénoms,r[6]=t[n].demandeur_personne_physique_nom,r[7]=t[n].demandeur_personne_physique_prénoms,r[8]=t[n].demandeur_personne_morale_raison_sociale,r[9]=t[n].demandeur_personne_morale_siret,r[10]=t[n].espèces_protégées_concernées,r[11]=t[n].enjeu_écologiques,r[12]=t[n].communes,r[13]=t[n].départements,r[14]=t[n].régions,r}function lr(e){let t,n,r,o,i,s,a,c,l,u,d,h,f,m,p,g,w,v,b,y,x,k,C,M,N,_,T,D,$,P,E=e[2]+"",A=ar(e[3])+"",S=or({"déposant_nom":e[4],"déposant_prénoms":e[5]})+"",j=ir({demandeur_personne_physique_nom:e[6],"demandeur_personne_physique_prénoms":e[7],demandeur_personne_morale_raison_sociale:e[8],demandeur_personne_morale_siret:e[9]})+"",I=rr({communes:e[12],"départements":e[13],"régions":e[14]})+"",z=e[10]+"",O=e[11]+"";return{c(){t=X("tr"),n=X("td"),r=X("a"),o=U("Voir le dossier"),s=V(),a=X("td"),c=U(E),l=V(),u=X("td"),d=U(A),f=V(),m=X("td"),p=U(S),g=V(),w=X("td"),v=U(j),b=V(),y=X("td"),x=U(I),k=V(),C=X("td"),M=U(z),N=V(),_=X("td"),T=U(O),D=V(),$=X("td"),$.innerHTML='Allé !',P=V(),Z(r,"href",i=`/dossier/${e[1]}`),Z(n,"class","svelte-1uilex1"),Z(a,"class","svelte-1uilex1"),Z(u,"title",h=sr(e[3])),Z(u,"class","svelte-1uilex1"),Z(m,"class","svelte-1uilex1"),Z(w,"class","svelte-1uilex1"),Z(y,"class","svelte-1uilex1"),Z(C,"class","svelte-1uilex1"),Z(_,"class","svelte-1uilex1"),Z($,"class","svelte-1uilex1"),Z(t,"class","svelte-1uilex1")},m(e,i){Y(e,t,i),R(t,n),R(n,r),R(r,o),R(t,s),R(t,a),R(a,c),R(t,l),R(t,u),R(u,d),R(t,f),R(t,m),R(m,p),R(t,g),R(t,w),R(w,v),R(t,b),R(t,y),R(y,x),R(t,k),R(t,C),R(C,M),R(t,N),R(t,_),R(_,T),R(t,D),R(t,$),R(t,P)},p(e,t){1&t&&i!==(i=`/dossier/${e[1]}`)&&Z(r,"href",i),1&t&&E!==(E=e[2]+"")&&re(c,E),1&t&&A!==(A=ar(e[3])+"")&&re(d,A),1&t&&h!==(h=sr(e[3]))&&Z(u,"title",h),1&t&&S!==(S=or({"déposant_nom":e[4],"déposant_prénoms":e[5]})+"")&&re(p,S),1&t&&j!==(j=ir({demandeur_personne_physique_nom:e[6],"demandeur_personne_physique_prénoms":e[7],demandeur_personne_morale_raison_sociale:e[8],demandeur_personne_morale_siret:e[9]})+"")&&re(v,j),1&t&&I!==(I=rr({communes:e[12],"départements":e[13],"régions":e[14]})+"")&&re(x,I),1&t&&z!==(z=e[10]+"")&&re(M,z),1&t&&O!==(O=e[11]+"")&&re(T,O)},d(e){e&&W(t)}}}function ur(e){let t,n,r,o,i,s,a,c,l=Fe(e[0]),u=[];for(let t=0;tSaisie espèces',n=V(),r=X("h1"),r.textContent="Suivi instructeur",o=V(),i=X("table"),s=X("thead"),s.innerHTML='Voir le dossier Statut Date de dépôt Déposant Demandeur de la dérogation Localisation Espèces protégées concernées Enjeu écologique Dossier sur Démarche Simplifiée (pour de faux)',a=V(),c=X("tbody");for(let e=0;e{"dossiers"in e&&n(0,r=e.dossiers)},[r]}class hr extends Ue{constructor(e){super(),Xe(this,e,dr,ur,_,{dossiers:0})}}function fr(e){const t=e-1;return t*t*t+1}function mr(e,{from:t,to:n},r={}){const o=getComputedStyle(e),i="none"===o.transform?"":o.transform,[s,a]=o.transformOrigin.split(" ").map(parseFloat),c=t.left+t.width*s/n.width-(n.left+s),l=t.top+t.height*a/n.height-(n.top+a),{delay:u=0,duration:d=(e=>120*Math.sqrt(e)),easing:h=fr}=r;return{delay:u,duration:N(d)?d(Math.sqrt(c*c+l*l)):d,easing:h,css:(e,r)=>{const o=r*c,s=r*l,a=e+r*t.width/n.width,u=e+r*t.height/n.height;return`transform: ${i} translate(${o}px, ${s}px) scale(${a}, ${u});`}}}function pr(e,{delay:t=0,duration:n=400,easing:r=y}={}){const o=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:r,css:e=>"opacity: "+e*o}}const{window:gr}=F,wr=e=>({noResultsText:1024&e[0]}),vr=e=>({noResultsText:e[10]}),br=e=>({createText:8192&e[0]}),yr=e=>({createText:e[13]}),xr=e=>({loadingText:2048&e[0]}),kr=e=>({loadingText:e[11]}),Cr=e=>({nbItems:1&e[1],maxItemsToShowInList:16&e[0]}),Mr=e=>({nbItems:e[31].length,maxItemsToShowInList:e[4]});function Nr(e,t,n){const r=e.slice();return r[144]=t[n],r[146]=n,r}const _r=e=>({item:1&e[1],label:1&e[1]}),Tr=e=>({item:e[144].item,label:e[144].highlighted?e[144].highlighted:e[144].label}),Dr=e=>({nbItems:1&e[1],maxItemsToShowInList:16&e[0]}),$r=e=>({nbItems:e[31].length,maxItemsToShowInList:e[4]});function Pr(e,t,n){const r=e.slice();return r[147]=t[n],r[146]=n,r}const Er=e=>({label:2&e[0],item:2&e[0]}),Ar=e=>({label:e[43](e[147]),item:e[147],unselectItem:e[50]});function Sr(e,t,n){const r=e.slice();return r[146]=t[n],r}function jr(e){let t,n=Fe(e[1]),r=[];for(let t=0;te[3](e[147],!0);for(let t=0;ta.p(e,t))):(a=l(r,e),a.c()),w.set(r,g[m]=a),r in p&&v.set(r,Math.abs(m-p[r]))}const y=new Set,x=new Set;function k(e){Ie(e,1),e.m(a,u),s.set(e.key,e),u=e.first,f--}for(;h&&f;){const t=g[f-1],n=e[h-1],r=t.key,o=n.key;t===n?(u=t.first,h--,f--):w.has(o)?!s.has(r)||y.has(r)?k(t):x.has(o)?h--:v.get(r)>v.get(o)?(x.add(r),k(t)):(y.add(o),h--):(c(n,s),h--)}for(;h--;){const t=e[h];w.has(t.key)||c(t,s)}for(;f;)k(g[f-1]);return M(b),g}(r,n,s,0,e,i,o,t.parentNode,Re,Lr,t,Pr);for(let e=0;e{if(!m&&e>=c&&(m=!0),m&&e>=l&&(u(1,0),p()),!f)return!1;if(m){const t=0+1*a((e-c)/s);u(t,1-t)}return!0})),d&&(h=he(e,0,1,s,i,a,d)),i||(m=!0),u(0,1),p}(n,i,mr,{duration:200})},i(e){s||(Ie(h,e),e&&Ce((()=>{s&&(o||(o=Le(n,pr,{duration:200},!0)),o.run(1))})),s=!0)},o(e){ze(h,e),e&&(o||(o=Le(n,pr,{duration:200},!1)),o.run(0)),s=!1},d(e){e&&W(n),h&&h.d(e),e&&o&&o.end(),a=!1,M(c)}}}function qr(e){let t,n,r;return{c(){t=X("span"),Z(t,"class","autocomplete-clear-button svelte-75ckfb")},m(o,i){Y(o,t,i),t.innerHTML=e[8],n||(r=[G(t,"click",e[54]),G(t,"keypress",e[108])],n=!0)},p(e,n){256&n[0]&&(t.innerHTML=e[8])},d(e){e&&W(t),n=!1,M(r)}}}function Fr(e){let t,n;const r=e[97]["no-results"],o=T(r,e,e[96],vr),i=o||function(e){let t;return{c(){t=U(e[10])},m(e,n){Y(e,t,n)},p(e,n){1024&n[0]&&re(t,e[10])},d(e){e&&W(t)}}}(e);return{c(){t=X("div"),i&&i.c(),Z(t,"class","autocomplete-list-item-no-results svelte-75ckfb")},m(e,r){Y(e,t,r),i&&i.m(t,null),n=!0},p(e,t){o?o.p&&(!n||1024&t[0]|8&t[3])&&P(o,r,e,e[96],n?$(r,e[96],t,wr):E(e[96]),vr):i&&i.p&&(!n||1024&t[0])&&i.p(e,n?t:[-1,-1,-1,-1,-1])},i(e){n||(Ie(i,e),n=!0)},o(e){ze(i,e),n=!1},d(e){e&&W(t),i&&i.d(e)}}}function Rr(e){let t,n,r,o;const i=e[97].create,s=T(i,e,e[96],yr),a=s||function(e){let t;return{c(){t=U(e[13])},m(e,n){Y(e,t,n)},p(e,n){8192&n[0]&&re(t,e[13])},d(e){e&&W(t)}}}(e);return{c(){t=X("div"),a&&a.c(),Z(t,"class","autocomplete-list-item-create svelte-75ckfb")},m(i,s){Y(i,t,s),a&&a.m(t,null),n=!0,r||(o=[G(t,"click",e[44]),G(t,"keypress",e[113])],r=!0)},p(e,t){s?s.p&&(!n||8192&t[0]|8&t[3])&&P(s,i,e,e[96],n?$(i,e[96],t,br):E(e[96]),yr):a&&a.p&&(!n||8192&t[0])&&a.p(e,n?t:[-1,-1,-1,-1,-1])},i(e){n||(Ie(a,e),n=!0)},o(e){ze(a,e),n=!1},d(e){e&&W(t),a&&a.d(e),r=!1,M(o)}}}function Hr(e){let t,n;const r=e[97].loading,o=T(r,e,e[96],kr),i=o||function(e){let t;return{c(){t=U(e[11])},m(e,n){Y(e,t,n)},p(e,n){2048&n[0]&&re(t,e[11])},d(e){e&&W(t)}}}(e);return{c(){t=X("div"),i&&i.c(),Z(t,"class","autocomplete-list-item-loading svelte-75ckfb")},m(e,r){Y(e,t,r),i&&i.m(t,null),n=!0},p(e,t){o?o.p&&(!n||2048&t[0]|8&t[3])&&P(o,r,e,e[96],n?$(r,e[96],t,xr):E(e[96]),kr):i&&i.p&&(!n||2048&t[0])&&i.p(e,n?t:[-1,-1,-1,-1,-1])},i(e){n||(Ie(i,e),n=!0)},o(e){ze(i,e),n=!1},d(e){e&&W(t),i&&i.d(e)}}}function Qr(e){let t,n,r;const o=e[97]["dropdown-header"],i=T(o,e,e[96],$r);let s=Fe(e[31]),a=[];for(let t=0;tze(a[e],1,1,(()=>{a[e]=null})),l=e[97]["dropdown-footer"],u=T(l,e,e[96],Mr),d=u||function(e){let t,n=e[4]>0&&e[31].length>e[4]&&Ur(e);return{c(){n&&n.c(),t=J()},m(e,r){n&&n.m(e,r),Y(e,t,r)},p(e,r){e[4]>0&&e[31].length>e[4]?n?n.p(e,r):(n=Ur(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){e&&W(t),n&&n.d(e)}}}(e);return{c(){i&&i.c(),t=V();for(let e=0;e{r=null})),je())},i(e){n||(Ie(r),n=!0)},o(e){ze(r),n=!1},d(e){e&&W(t),r&&r.d(e)}}}function Ur(e){let t,n=e[12]&&Vr(e);return{c(){n&&n.c(),t=J()},m(e,r){n&&n.m(e,r),Y(e,t,r)},p(e,r){e[12]?n?n.p(e,r):(n=Vr(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){e&&W(t),n&&n.d(e)}}}function Vr(e){let t,n,r,o,i,s=e[31].length-e[4]+"";return{c(){t=X("div"),n=U("..."),r=U(s),o=V(),i=U(e[12]),Z(t,"class","autocomplete-list-item-no-results svelte-75ckfb")},m(e,s){Y(e,t,s),R(t,n),R(t,r),R(t,o),R(t,i)},p(e,t){16&t[0]|1&t[1]&&s!==(s=e[31].length-e[4]+"")&&re(r,s),4096&t[0]&&re(i,e[12])},d(e){e&&W(t)}}}function Jr(e){let t,n,r,o,i,s,a,c,l,u,d,h,f,m,p,g,w,v,b,y;function k(e,t){return!e[5]&&e[32]?Ir:e[5]&&e[32]?jr:void 0}let C=k(e),N=C&&C(e),_=e[5]&&e[32]&&Or(e),T=[{type:"text"},{class:a=(e[16]?e[16]:"")+" "+(e[27]?"":"input autocomplete-input")},{id:c=e[17]?e[17]:""},{autocomplete:l=e[22]?"on":e[23]},{placeholder:e[14]},{name:e[18]},{disabled:e[26]},{required:e[28]},{title:e[21]},{readOnly:u=e[24]||e[39]},{tabindex:e[29]},e[60]],D={};for(let e=0;e0?0:e[36]&&e[11]?1:e[6]?2:e[10]?3:-1}return~(m=A(e))&&(p=E[m]=P[m](e)),{c(){t=X("div"),n=X("select"),N&&N.c(),r=V(),o=X("div"),_&&_.c(),i=V(),s=X("input"),d=V(),$&&$.c(),h=V(),f=X("div"),p&&p.c(),Z(n,"name",e[19]),Z(n,"id",e[20]),n.multiple=e[5],Z(n,"class","svelte-75ckfb"),te(s,D),ae(s,"svelte-75ckfb",!0),Z(o,"class","input-container svelte-75ckfb"),Z(f,"class",g=(e[25]?e[25]:"")+" autocomplete-list "+(e[41]?"":"hidden")+" is-fullwidth svelte-75ckfb"),Z(t,"class",w=(e[15]?e[15]:"")+" autocomplete select is-fullwidth "+e[42]+" svelte-75ckfb"),ae(t,"hide-arrow",e[7]||!e[0].length),ae(t,"is-multiple",e[5]),ae(t,"show-clear",e[40]),ae(t,"is-loading",e[9]&&e[36])},m(a,c){Y(a,t,c),R(t,n),N&&N.m(n,null),R(t,r),R(t,o),_&&_.m(o,null),R(o,i),R(o,s),s.autofocus&&s.focus(),e[104](s),oe(s,e[2]),R(o,d),$&&$.m(o,null),e[109](o),R(t,h),R(t,f),~m&&E[m].m(f,null),e[114](f),v=!0,b||(y=[G(gr,"click",e[46]),G(gr,"scroll",e[98]),G(s,"input",e[105]),G(s,"input",e[49]),G(s,"focus",e[52]),G(s,"blur",e[53]),G(s,"keydown",e[47]),G(s,"click",e[51]),G(s,"keypress",e[48]),G(s,"dragover",e[106]),G(s,"drop",e[107])],b=!0)},p(e,r){C===(C=k(e))&&N?N.p(e,r):(N&&N.d(1),N=C&&C(e),N&&(N.c(),N.m(n,null))),(!v||524288&r[0])&&Z(n,"name",e[19]),(!v||1048576&r[0])&&Z(n,"id",e[20]),(!v||32&r[0])&&(n.multiple=e[5]),e[5]&&e[32]?_?(_.p(e,r),32&r[0]|2&r[1]&&Ie(_,1)):(_=Or(e),_.c(),Ie(_,1),_.m(o,i)):_&&(Se(),ze(_,1,1,(()=>{_=null})),je()),te(s,D=function(e,t){const n={},r={},o={$$scope:1};let i=e.length;for(;i--;){const s=e[i],a=t[i];if(a){for(const e in s)e in a||(r[e]=1);for(const e in a)o[e]||(n[e]=a[e],o[e]=1);e[i]=a}else for(const e in s)o[e]=1}for(const e in r)e in n||(n[e]=void 0);return n}(T,[{type:"text"},(!v||134283264&r[0]&&a!==(a=(e[16]?e[16]:"")+" "+(e[27]?"":"input autocomplete-input")))&&{class:a},(!v||131072&r[0]&&c!==(c=e[17]?e[17]:""))&&{id:c},(!v||12582912&r[0]&&l!==(l=e[22]?"on":e[23]))&&{autocomplete:l},(!v||16384&r[0])&&{placeholder:e[14]},(!v||262144&r[0])&&{name:e[18]},(!v||67108864&r[0])&&{disabled:e[26]},(!v||268435456&r[0])&&{required:e[28]},(!v||2097152&r[0])&&{title:e[21]},(!v||16777216&r[0]|256&r[1]&&u!==(u=e[24]||e[39]))&&{readOnly:u},(!v||536870912&r[0])&&{tabindex:e[29]},536870912&r[1]&&e[60]])),4&r[0]&&s.value!==e[2]&&oe(s,e[2]),ae(s,"svelte-75ckfb",!0),e[40]?$?$.p(e,r):($=qr(e),$.c(),$.m(o,null)):$&&($.d(1),$=null);let d=m;m=A(e),m===d?~m&&E[m].p(e,r):(p&&(Se(),ze(E[d],1,1,(()=>{E[d]=null})),je()),~m?(p=E[m],p?p.p(e,r):(p=E[m]=P[m](e),p.c()),Ie(p,1),p.m(f,null)):p=null),(!v||33554432&r[0]|1024&r[1]&&g!==(g=(e[25]?e[25]:"")+" autocomplete-list "+(e[41]?"":"hidden")+" is-fullwidth svelte-75ckfb"))&&Z(f,"class",g),(!v||32768&r[0]&&w!==(w=(e[15]?e[15]:"")+" autocomplete select is-fullwidth "+e[42]+" svelte-75ckfb"))&&Z(t,"class",w),(!v||32897&r[0])&&ae(t,"hide-arrow",e[7]||!e[0].length),(!v||32800&r[0])&&ae(t,"is-multiple",e[5]),(!v||32768&r[0]|512&r[1])&&ae(t,"show-clear",e[40]),(!v||33280&r[0]|32&r[1])&&ae(t,"is-loading",e[9]&&e[36])},i(e){v||(Ie(_),Ie(p),v=!0)},o(e){ze(_),ze(p),v=!1},d(n){n&&W(t),N&&N.d(),_&&_.d(),e[104](null),$&&$.d(),e[109](null),~m&&E[m].d(),e[114](null),b=!1,M(y)}}}function Gr(e,t){let n=function(e,t){if("function"!=typeof e)return void console.error("Not a function: "+e+", argument: "+t);let n;try{n=e(t)}catch(n){console.warn("Error executing Autocomplete function on value: "+t+" function: "+e)}return n}(e,t);return null==n&&(n=""),"string"!=typeof n&&(n=n.toString()),n}function Kr(e,t){if(!e)return 0;const n=e.keywords;let r=0;return t.forEach((e=>{n.includes(e)&&r++})),r}function Zr(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function eo(e,t,n){let r,o,i,s;const a=["items","searchFunction","labelFieldName","keywordsFieldName","valueFieldName","labelFunction","keywordsFunction","valueFunction","keywordsCleanFunction","textCleanFunction","beforeChange","onChange","onFocus","onBlur","onCreate","selectFirstIfEmpty","minCharactersToSearch","maxItemsToShowInList","multiple","create","ignoreAccents","matchAllKeywords","sortByMatchedKeywords","itemFilterFunction","itemSortFunction","lock","delay","localFiltering","localSorting","cleanUserText","lowercaseKeywords","closeOnBlur","orderableSelection","hideArrow","showClear","clearText","showLoadingIndicator","noResultsText","loadingText","moreItemsText","createText","placeholder","className","inputClassName","inputId","name","selectName","selectId","title","html5autocomplete","autocompleteOffValue","readonly","dropdownClassName","disabled","noInputStyles","required","debug","tabindex","selectedItem","value","highlightedItem","text","highlightFilter"];let c=A(t,a),{$$slots:l={},$$scope:u}=t,{items:d=[]}=t,{searchFunction:h=!1}=t,{labelFieldName:f}=t,{keywordsFieldName:m=f}=t,{valueFieldName:p}=t,{labelFunction:g=function(e){return null==e?"":f?e[f]:e}}=t,{keywordsFunction:w=function(e){return null==e?"":m?e[m]:g(e)}}=t,{valueFunction:v=function(e,t=!1){return null==e?e:!P||t?p?e[p]:e:e.map((e=>p?e[p]:e))}}=t,{keywordsCleanFunction:b=function(e){return e}}=t,{textCleanFunction:y=function(e){return e}}=t,{beforeChange:k=function(e,t){return!0}}=t,{onChange:C=function(e){}}=t,{onFocus:M=function(){}}=t,{onBlur:N=function(){}}=t,{onCreate:_=function(e){pe&&console.log("onCreate: "+e)}}=t,{selectFirstIfEmpty:T=!1}=t,{minCharactersToSearch:D=1}=t,{maxItemsToShowInList:$=0}=t,{multiple:P=!1}=t,{create:E=!1}=t,{ignoreAccents:S=!0}=t,{matchAllKeywords:j=!0}=t,{sortByMatchedKeywords:I=!1}=t,{itemFilterFunction:z}=t,{itemSortFunction:O}=t,{lock:L=!1}=t,{delay:q=0}=t,{localFiltering:F=!0}=t,{localSorting:R=!0}=t,{cleanUserText:H=!0}=t,{lowercaseKeywords:Q=!0}=t,{closeOnBlur:Y=!1}=t,{orderableSelection:W=!1}=t,{hideArrow:B=!1}=t,{showClear:X=!1}=t,{clearText:U="✖"}=t,{showLoadingIndicator:V=!1}=t,{noResultsText:J="No results found"}=t,{loadingText:G="Loading results..."}=t,{moreItemsText:K="items not shown"}=t,{createText:Z="Not found, add anyway?"}=t,{placeholder:ee}=t,{className:te}=t,{inputClassName:ne}=t,{inputId:re}=t,{name:oe}=t,{selectName:ie}=t,{selectId:se}=t,{title:ae}=t,{html5autocomplete:ce}=t,{autocompleteOffValue:le="off"}=t,{readonly:ue}=t,{dropdownClassName:de}=t,{disabled:he=!1}=t,{noInputStyles:fe=!1}=t,{required:me=null}=t,{debug:pe=!1}=t,{tabindex:we=0}=t,{selectedItem:be=(P?[]:void 0)}=t,{value:ye}=t,{highlightedItem:xe}=t;const ke="sautocomplete-"+Math.floor(1e3*Math.random());let Ce,Me,Ne,_e,Te,De=!1,$e=!1,Pe=-1,{text:Ee}=t,Ae=0,Se=[],je=0,Ie=0,ze=!1;var Oe;function Le(e){return Gr(g,e)}function qe(e){const t=Gr(w,e);let n=Gr(b,t);return n=Q?n.toLowerCase().trim():n,S&&(n=Zr(n)),pe&&console.log("Extracted keywords: '"+n+"' from item: "+JSON.stringify(e)),n}function Fe(){let e;pe&&(e="Autocomplete prepare list "+(re?`(id: ${re})`:""),console.time(e),console.log("Prepare items to search"),console.log("items: "+JSON.stringify(d))),Array.isArray(d)||(console.warn("Autocomplete items / search function did not return array but",d),n(0,d=[]));const t=d?d.length:0;Se=new Array(t),t>0&&d.forEach(((e,t)=>{const n=function(e){return{keywords:F?qe(e):[],label:Le(e),item:e}}(e);void 0===n&&console.log("Undefined item for: ",e),Se[t]=n})),n(31,_e=Se),pe&&(console.log(Se.length+" items to search"),console.timeEnd(e))}async function Re(){let e;pe&&(e="Autocomplete search "+(re?`(id: ${re})`:""),console.time(e),console.log("Searching user entered text: '"+Ee+"'"));let t=function(e){if(null==e)return"";if(!H)return e;const t=e.replace(/[&/\\#,+()$~%.'":*?<>{}]/g," ").trim(),n=Gr(y,t);return Q?n.toLowerCase().trim():n.trim()}(Ee);if(D>1&&t.lengthIe&&n(0,d=[]),Ie=e,n(0,d=[...d,...r]),He(t)}Ie""!==e));let r;F?(r=z?Se.filter((e=>z(e.item,t))):Se.filter((e=>function(e,t){const n=Kr(e,t);return j?n>=t.length:n>0}(e,t))),R&&(O?r=r.sort(((e,n)=>O(e.item,n.item,t))):I&&(r=r.sort(((e,n)=>function(e,t,n){return Kr(t,n)-Kr(e,n)}(e,n,t)))))):r=Se;const o=at(t,"label");return n(31,_e=r.map(o)),it(),!0}function Qe(e){let t;if(pe&&console.log("createdItem",e),void 0!==e){Fe(),n(31,_e=Se);let r=tt(e,_e);r<=0&&(n(0,d=[e]),Fe(),n(31,_e=Se),r=0),r>=0&&(n(30,Pe=r),t=_e[Pe])}return t}function Ye(e){if(pe&&console.log("selectListItem",e),void 0===e&&E){const t=_(Ee);if(void 0!==t){if("function"==typeof t.then)return t.then((e=>{if(void 0!==e){const t=Qe(e);void 0!==t&&Ye(t)}})),!0;e=Qe(t)}}if(void 0===e)return pe&&console.log("listItem is undefined. Can not select."),!1;if(s)return!0;const t=e.item;return k(be,t)&&(P?be?be.includes(t)?n(1,be=be.filter((e=>e!==t))):n(1,be=[...be,t]):n(1,be=[t]):(n(1,be=void 0),n(1,be=t))),!0}function We(){pe&&console.log("selectItem",Pe);Ye(_e[Pe])?(pe&&console.log("selectListItem true, closing"),rt(),P&&(n(2,Ee=""),Ce.focus())):pe&&console.log("selectListItem false, not closing")}function Be(){pe&&console.log("up"),nt(),Pe>0&&n(30,Pe--,Pe),Ue()}function Xe(){pe&&console.log("down"),nt(),Pe<_e.length-1&&n(30,Pe++,Pe),Ue()}function Ue(){pe&&console.log("highlight");const e=".selected";pe&&console.log("Seaching DOM element: "+e+" in "+Me);const t=Me&&Me.querySelector(e);t?"function"==typeof t.scrollIntoViewIfNeeded?(pe&&console.log("Scrolling selected item into view"),t.scrollIntoViewIfNeeded()):"function"===t.scrollIntoView?(pe&&console.log("Scrolling selected item into view"),t.scrollIntoView()):pe&&console.warn("Could not scroll selected item into view, scrollIntoViewIfNeeded not supported"):pe&&console.warn("Selected item not found to scroll into view")}function Ve(e){pe&&console.log("onListItemClick"),Ye(e)&&(rt(),P&&(n(2,Ee=""),Ce.focus()))}function Je(e){pe&&console.log("unselectItem",e),n(1,be=be.filter((t=>t!==e))),Ce.focus()}function Ge(){Re()&&(n(30,Pe=0),nt())}function Ke(e){pe&&console.log("onEsc"),e.stopPropagation(),De&&(Ce.focus(),rt())}function Ze(e){pe&&console.log("onBackspace"),Je(be[be.length-1])}function et(){if(pe&&console.log("resetListToAllItemsAndOpen"),h&&!Se.length?Re():Ee||n(31,_e=Se),nt(),be){pe&&console.log("Searching currently selected item: "+JSON.stringify(be));const e=tt(be,_e);e>=0&&(n(30,Pe=e),Ue())}}function tt(e,t){pe&&console.log("Finding index for item",e);let n=-1;for(let r=0;r=0?console.log("Found index for item: "+n):console.warn("Not found index for item: "+e)),n}function nt(){pe&&console.log("open"),s||ot()||(n(37,ze=!0),n(94,De=!0))}function rt(){pe&&console.log("close"),n(94,De=!1),n(36,$e=!1),!Ee&&T&&(n(30,Pe=0),We())}function ot(){return D>0&&Ae0)}function it(){return!!ot()&&(rt(),!0)}function st(){pe&&console.log("clear"),n(2,Ee=""),n(1,be=P?[]:void 0),setTimeout((()=>{Ce.focus()}))}function at(e,t){return n=>{let r=n[t];const o=Object.assign({highlighted:void 0},n);o.highlighted=r;const i=r.toLowerCase(),s=S?Zr(i):i;if(e&&e.length){const t=[];for(let n=0;n=0){let e=i+o;t.push([i,e]),i=e}}while(-1!==i)}if(t.length>0){const e=new Set;for(let n=0;n$1");o.highlighted=n}}}return o}}Oe=()=>{ze&&function(){const{height:e}=window.visualViewport,{bottom:t,height:r}=Ne.getBoundingClientRect(),{height:o}=Me.getBoundingClientRect();n(34,Me.style.top=t+o>e?`-${r+o}px`:"0px",Me)}(),n(37,ze=!1)},ge().$$.after_update.push(Oe);let ct=!1;function lt(e,t){W&&e.dataTransfer.setData("source",t)}function ut(e,t){W&&(e.preventDefault(),n(38,ct=t))}function dt(e,t){W&&n(38,ct=!1)}function ht(e,t){if(W){e.preventDefault(),n(38,ct=!1);let r=parseInt(e.dataTransfer.getData("source"));r!=t&&function(e,t){let r=[...be];e{t=x(x({},t),function(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}(e)),n(60,c=A(t,a)),"items"in e&&n(0,d=e.items),"searchFunction"in e&&n(63,h=e.searchFunction),"labelFieldName"in e&&n(64,f=e.labelFieldName),"keywordsFieldName"in e&&n(65,m=e.keywordsFieldName),"valueFieldName"in e&&n(66,p=e.valueFieldName),"labelFunction"in e&&n(67,g=e.labelFunction),"keywordsFunction"in e&&n(68,w=e.keywordsFunction),"valueFunction"in e&&n(3,v=e.valueFunction),"keywordsCleanFunction"in e&&n(69,b=e.keywordsCleanFunction),"textCleanFunction"in e&&n(70,y=e.textCleanFunction),"beforeChange"in e&&n(71,k=e.beforeChange),"onChange"in e&&n(72,C=e.onChange),"onFocus"in e&&n(73,M=e.onFocus),"onBlur"in e&&n(74,N=e.onBlur),"onCreate"in e&&n(75,_=e.onCreate),"selectFirstIfEmpty"in e&&n(76,T=e.selectFirstIfEmpty),"minCharactersToSearch"in e&&n(77,D=e.minCharactersToSearch),"maxItemsToShowInList"in e&&n(4,$=e.maxItemsToShowInList),"multiple"in e&&n(5,P=e.multiple),"create"in e&&n(6,E=e.create),"ignoreAccents"in e&&n(78,S=e.ignoreAccents),"matchAllKeywords"in e&&n(79,j=e.matchAllKeywords),"sortByMatchedKeywords"in e&&n(80,I=e.sortByMatchedKeywords),"itemFilterFunction"in e&&n(81,z=e.itemFilterFunction),"itemSortFunction"in e&&n(82,O=e.itemSortFunction),"lock"in e&&n(83,L=e.lock),"delay"in e&&n(84,q=e.delay),"localFiltering"in e&&n(85,F=e.localFiltering),"localSorting"in e&&n(86,R=e.localSorting),"cleanUserText"in e&&n(87,H=e.cleanUserText),"lowercaseKeywords"in e&&n(88,Q=e.lowercaseKeywords),"closeOnBlur"in e&&n(89,Y=e.closeOnBlur),"orderableSelection"in e&&n(90,W=e.orderableSelection),"hideArrow"in e&&n(7,B=e.hideArrow),"showClear"in e&&n(91,X=e.showClear),"clearText"in e&&n(8,U=e.clearText),"showLoadingIndicator"in e&&n(9,V=e.showLoadingIndicator),"noResultsText"in e&&n(10,J=e.noResultsText),"loadingText"in e&&n(11,G=e.loadingText),"moreItemsText"in e&&n(12,K=e.moreItemsText),"createText"in e&&n(13,Z=e.createText),"placeholder"in e&&n(14,ee=e.placeholder),"className"in e&&n(15,te=e.className),"inputClassName"in e&&n(16,ne=e.inputClassName),"inputId"in e&&n(17,re=e.inputId),"name"in e&&n(18,oe=e.name),"selectName"in e&&n(19,ie=e.selectName),"selectId"in e&&n(20,se=e.selectId),"title"in e&&n(21,ae=e.title),"html5autocomplete"in e&&n(22,ce=e.html5autocomplete),"autocompleteOffValue"in e&&n(23,le=e.autocompleteOffValue),"readonly"in e&&n(24,ue=e.readonly),"dropdownClassName"in e&&n(25,de=e.dropdownClassName),"disabled"in e&&n(26,he=e.disabled),"noInputStyles"in e&&n(27,fe=e.noInputStyles),"required"in e&&n(28,me=e.required),"debug"in e&&n(92,pe=e.debug),"tabindex"in e&&n(29,we=e.tabindex),"selectedItem"in e&&n(1,be=e.selectedItem),"value"in e&&n(61,ye=e.value),"highlightedItem"in e&&n(62,xe=e.highlightedItem),"text"in e&&n(2,Ee=e.text),"$$scope"in e&&n(96,u=e.$$scope)},e.$$.update=()=>{1&e.$$.dirty[0]|2&e.$$.dirty[2]&&(h||Fe()),2&e.$$.dirty[0]&&(n(61,ye=v(be)),be&&!P&&n(2,Ee=Le(be)),n(31,_e=Se),C(be)),1073741824&e.$$.dirty[0]|1&e.$$.dirty[1]&&n(62,xe=_e&&Pe&&Pe>=0&&Pe<_e.length?_e[Pe].item:null),1&e.$$.dirty[0]|6&e.$$.dirty[3]&&n(41,r=De&&(d&&d.length>0||Ae>0)),34&e.$$.dirty[0]&&n(32,o=P&&be&&be.length>0||!P&&be),32&e.$$.dirty[0]|2&e.$$.dirty[1]|538968064&e.$$.dirty[2]&&n(40,i=X||(L||P)&&o),2&e.$$.dirty[1]|2097152&e.$$.dirty[2]&&n(39,s=L&&o)},[d,be,Ee,v,$,P,E,B,U,V,J,G,K,Z,ee,te,ne,re,oe,ie,se,ae,ce,le,ue,de,he,fe,me,we,Pe,_e,o,Ce,Me,Ne,$e,ze,ct,s,i,r,ke,Le,We,Ve,function(e){pe&&console.log("onDocumentClick"),e.composedPath().some((e=>e.classList&&e.classList.contains(ke)))?(pe&&console.log("onDocumentClick inside"),Ue()):(pe&&console.log("onDocumentClick outside"),rt())},function(e){pe&&console.log("onKeyDown");let t=e.key;"Tab"===t&&e.shiftKey&&(t="ShiftTab");const n={Tab:De?rt:null,ShiftTab:De?rt:null,ArrowDown:Xe.bind(this),ArrowUp:Be.bind(this),Escape:Ke.bind(this),Backspace:P&&o&&!Ee?Ze.bind(this):null}[t];"function"==typeof n&&n(e)},function(e){pe&&console.log("onKeyPress"),"Enter"===e.key&&function(e){De&&(e.preventDefault(),We())}(e)},function(e){pe&&console.log("onInput"),n(2,Ee=e.target.value),Te&&clearTimeout(Te),q?Te=setTimeout(Ge,q):Ge()},Je,function(){pe&&console.log("onInputClick"),et()},function(){pe&&console.log("onFocus"),M(),et()},function(){pe&&console.log("onBlur"),Y&&rt(),N()},st,function(e){return!!be&&(P?be.includes(e):e===be)},lt,ut,dt,ht,c,ye,xe,h,f,m,p,g,w,b,y,k,C,M,N,_,T,D,S,j,I,z,O,L,q,F,R,H,Q,Y,W,X,pe,at,De,Ae,u,l,()=>n(37,ze=!0),(e,t)=>{"Enter"==t.key&&Je(e)},(e,t)=>lt(t,e),(e,t)=>ut(t,e),(e,t)=>dt(),(e,t)=>ht(t,e),function(e){ve[e?"unshift":"push"]((()=>{Ce=e,n(33,Ce)}))},function(){Ee=this.value,n(2,Ee)},e=>ut(e,be.length-1),e=>ht(e,be.length-1),e=>{"Enter"==e.key&&st()},function(e){ve[e?"unshift":"push"]((()=>{Ne=e,n(35,Ne)}))},e=>Ve(e),(e,t)=>{"Enter"==t.key&&Ve(e)},e=>{n(30,Pe=e)},e=>{"Enter"==e.key&&We()},function(e){ve[e?"unshift":"push"]((()=>{Me=e,n(34,Me)}))}]}class to extends Ue{constructor(e){super(),Xe(this,e,eo,Jr,_,{items:0,searchFunction:63,labelFieldName:64,keywordsFieldName:65,valueFieldName:66,labelFunction:67,keywordsFunction:68,valueFunction:3,keywordsCleanFunction:69,textCleanFunction:70,beforeChange:71,onChange:72,onFocus:73,onBlur:74,onCreate:75,selectFirstIfEmpty:76,minCharactersToSearch:77,maxItemsToShowInList:4,multiple:5,create:6,ignoreAccents:78,matchAllKeywords:79,sortByMatchedKeywords:80,itemFilterFunction:81,itemSortFunction:82,lock:83,delay:84,localFiltering:85,localSorting:86,cleanUserText:87,lowercaseKeywords:88,closeOnBlur:89,orderableSelection:90,hideArrow:7,showClear:91,clearText:8,showLoadingIndicator:9,noResultsText:10,loadingText:11,moreItemsText:12,createText:13,placeholder:14,className:15,inputClassName:16,inputId:17,name:18,selectName:19,selectId:20,title:21,html5autocomplete:22,autocompleteOffValue:23,readonly:24,dropdownClassName:25,disabled:26,noInputStyles:27,required:28,debug:92,tabindex:29,selectedItem:1,value:61,highlightedItem:62,text:2,highlightFilter:93},null,[-1,-1,-1,-1,-1])}get highlightFilter(){return this.$$.ctx[93]}}function no(e){let t,n,r,o,i,s,a=e[7].NOM_VERN+"",c=e[7].LB_NOM+"";return{c(){t=X("div"),n=U(a),r=U(" ("),o=X("i"),i=U(c),s=U(")"),Z(t,"slot","item")},m(e,a){Y(e,t,a),R(t,n),R(t,r),R(t,o),R(o,i),R(t,s)},p(e,t){128&t&&a!==(a=e[7].NOM_VERN+"")&&re(n,a),128&t&&c!==(c=e[7].LB_NOM+"")&&re(i,c)},d(e){e&&W(t)}}}function ro(e){let t,n,r;function o(t){e[6](t)}let i={items:e[1],labelFunction:e[5],maxItemsToShowInList:"20",cleanUserText:"false",beforeChange:e[3],$$slots:{item:[no,({item:e})=>({7:e}),({item:e})=>e?128:0]},$$scope:{ctx:e}};return void 0!==e[0]&&(i.selectedItem=e[0]),t=new to({props:i}),ve.push((()=>He(t,"selectedItem",o))),{c(){Qe(t.$$.fragment)},m(e,n){Ye(t,e,n),r=!0},p(e,[r]){const o={};2&r&&(o.items=e[1]),4&r&&(o.labelFunction=e[5]),384&r&&(o.$$scope={dirty:r,ctx:e}),!n&&1&r&&(n=!0,o.selectedItem=e[0],Me((()=>n=!1))),t.$set(o)},i(e){r||(Ie(t.$$.fragment,e),r=!0)},o(e){ze(t.$$.fragment,e),r=!1},d(e){We(t,e)}}}function oo(e,t,n){let r,{"espèces":o}=t,{selectedItem:i}=t,{onChange:s}=t;return e.$$set=e=>{"espèces"in e&&n(1,o=e.espèces),"selectedItem"in e&&n(0,i=e.selectedItem),"onChange"in e&&n(4,s=e.onChange)},e.$$.update=()=>{2&e.$$.dirty&&n(2,r=function(e){return new Map(e.map((e=>{return[e,(t=e,`${t.NOM_VERN} (${t.LB_NOM})`)];var t})))}(o))},[i,o,r,function(e,t){return s&&s(t),!0},s,e=>r.get(e),function(e){i=e,n(0,i)}]}class io extends Ue{constructor(e){super(),Xe(this,e,oo,ro,_,{"espèces":1,selectedItem:0,onChange:4})}}function so(e,t,n){const r=e.slice();return r[26]=t[n].classification,r[27]=t[n].etresVivantsAtteints,r}function ao(e,t,n){const r=e.slice();return r[30]=t[n].espece,r[32]=n,r}function co(e,t,n){const r=e.slice();return r[30]=t[n].espece,r[33]=t[n].activité,r[34]=t[n].méthode,r[35]=t[n].transport,r[36]=t[n].nombreIndividus,r[37]=t[n].surfaceHabitatDétruit,r[38]=t[n].nombreNids,r[39]=t[n].nombreOeufs,r[40]=t,r[41]=n,r}function lo(e,t,n){const r=e.slice();return r[42]=t[n],r}function uo(e,t,n){const r=e.slice();return r[45]=t[n],r}function ho(e,t,n){const r=e.slice();return r[48]=t[n],r}function fo(e,t,n){const r=e.slice();return r[51]=t[n],r}function mo(e){let t,n,r;return{c(){t=X("th"),t.textContent="Méthode",n=V(),r=X("th"),r.textContent="Moyen de poursuite",Z(t,"class","svelte-1kokzi3"),Z(r,"class","svelte-1kokzi3")},m(e,o){Y(e,t,o),Y(e,n,o),Y(e,r,o)},d(e){e&&(W(t),W(n),W(r))}}}function po(e){let t,n,r;return{c(){t=X("th"),t.textContent="Nids",n=V(),r=X("th"),r.textContent="Œufs",Z(t,"class","svelte-1kokzi3"),Z(r,"class","svelte-1kokzi3")},m(e,o){Y(e,t,o),Y(e,n,o),Y(e,r,o)},d(e){e&&(W(t),W(n),W(r))}}}function go(e){let t,n,r,o=e[51]["étiquette affichée"]+"";return{c(){t=X("option"),n=U(o),t.__value=r=e[51],oe(t,t.__value)},m(e,r){Y(e,t,r),R(t,n)},p(e,i){5&i[0]&&o!==(o=e[51]["étiquette affichée"]+"")&&re(n,o),5&i[0]&&r!==(r=e[51])&&(t.__value=r,oe(t,t.__value))},d(e){e&&W(t)}}}function wo(e){let t,n,r,o,i,s,a,c,l,u,d,h=Fe(e[3].get(e[26])),f=[];for(let t=0;tHe(r,"selectedItem",C)));let _=Fe(e[2].get(e[26])||[]),T=[];for(let t=0;t<_.length;t+=1)T[t]=go(fo(e,_,t));function D(){e[15].call(a,e[40],e[41])}let $="flore"!==e[26]&&wo(e),P=Fe(e[7]),E=[];for(let t=0;to=!1))),r.$set(s),5&i[0]){let t;for(_=Fe(e[2].get(e[26])||[]),t=0;t<_.length;t+=1){const n=fo(e,_,t);T[t]?T[t].p(n,i):(T[t]=go(n),T[t].c(),T[t].m(a,null))}for(;t',n=V(),r=X("td"),r.innerHTML='',Z(t,"class","svelte-1kokzi3"),Z(r,"class","svelte-1kokzi3")},m(e,o){Y(e,t,o),Y(e,n,o),Y(e,r,o)},d(e){e&&(W(t),W(n),W(r))}}}function No(e){let t,n,r,o=Fe(e[27].toSorted(Eo)),i=[];for(let t=0;tze(ie[e],1,1,(()=>{ie[e]=null}));function ae(...t){return e[23](e[26],e[27],...t)}function ce(t){e[24](t)}let le={"espèces":e[1].get(e[26]),onChange:ae};void 0!==e[5]&&(le.selectedItem=e[5]),M=new io({props:le}),ve.push((()=>He(M,"selectedItem",ce)));let ue="flore"!==e[26]&&Co(),de="oiseau"===e[26]&&Mo(),he=e[27].length>=1&&No(e);return{c(){t=X("section"),n=X("h1"),r=U(K),o=V(),i=X("table"),s=X("thead"),a=X("tr"),c=X("th"),c.textContent="Espèce",l=V(),u=X("th"),u.textContent="Type d’impact",d=V(),ee&&ee.c(),h=V(),f=X("th"),f.textContent="Nombre d'individus",m=V(),te&&te.c(),p=V(),g=X("th"),g.textContent="Surface habitat détruit (m²)",w=V(),v=X("th"),v.textContent="Supprimer la ligne",b=V(),y=X("tbody");for(let e=0;e',L=V(),de&&de.c(),q=V(),F=X("td"),H=V(),he&&he.c(),Q=V(),Z(n,"class","svelte-1kokzi3"),Z(c,"class","svelte-1kokzi3"),Z(u,"class","svelte-1kokzi3"),Z(f,"class","svelte-1kokzi3"),Z(g,"class","svelte-1kokzi3"),Z(v,"class","svelte-1kokzi3"),Z(a,"class","svelte-1kokzi3"),Z(C,"class","svelte-1kokzi3"),$.__value="- - - -",oe($,$.__value),D.disabled=!0,Z(D,"class","svelte-1kokzi3"),Z(T,"class","svelte-1kokzi3"),I.__value="- - - -",oe(I,I.__value),j.disabled=!0,Z(j,"class","svelte-1kokzi3"),Z(A,"class","svelte-1kokzi3"),Z(O,"class","svelte-1kokzi3"),Z(F,"class","svelte-1kokzi3"),Z(k,"class","svelte-1kokzi3"),Z(t,"class",J=S(e[8].get(e[26]).sectionClass)+" svelte-1kokzi3")},m(e,N){Y(e,t,N),R(t,n),R(n,r),R(t,o),R(t,i),R(i,s),R(s,a),R(a,c),R(a,l),R(a,u),R(a,d),ee&&ee.m(a,null),R(a,h),R(a,f),R(a,m),te&&te.m(a,null),R(a,p),R(a,g),R(a,w),R(a,v),R(i,b),R(i,y);for(let e=0;eN=!1))),M.$set(i),"flore"!==e[26]?ue||(ue=Co(),ue.c(),ue.m(k,E)):ue&&(ue.d(1),ue=null),"oiseau"===e[26]?de||(de=Mo(),de.c(),de.m(k,q)):de&&(de.d(1),de=null),e[27].length>=1?he?he.p(e,o):(he=No(e),he.c(),he.m(t,Q)):he&&(he.d(1),he=null),(!G||5&o[0]&&J!==(J=S(e[8].get(e[26]).sectionClass)+" svelte-1kokzi3"))&&Z(t,"class",J)},i(e){if(!G){for(let e=0;eze(I[e],1,1,(()=>{I[e]=null}));return{c(){t=X("article"),n=X("h1"),n.textContent="Saisie des espèces protégées impactées",r=V(),o=X("section"),i=X("p"),i.textContent="Une fois la liste des espèces saisie, créer un lien ci-dessous et le copier dans votre dossier Démarches Simplifiées.",s=V(),a=X("button"),a.textContent="Créer le lien et le copier dans le presse-papier",c=V(),l=X("form");for(let e=0;eCD_NOM 4221",P=U("."),Z(n,"class","svelte-1kokzi3"),Z(a,"class","copy-link svelte-1kokzi3"),Z(o,"class","svelte-1kokzi3"),Z(h,"class","svelte-1kokzi3"),Z(g,"target","_blank"),Z(g,"href",$o),Z(N,"target","_blank"),Z(N,"href","https://inpn.mnhn.fr/accueil/recherche-de-donnees"),Z($,"target","_blank"),Z($,"href","https://inpn.mnhn.fr/espece/cd_nom/4221"),Z(d,"class","espece-manquante svelte-1kokzi3"),Z(t,"class","svelte-1kokzi3")},m(j,z){Y(j,t,z),R(t,n),R(t,r),R(t,o),R(o,i),R(o,s),R(o,a),e[13](a),R(t,c),R(t,l);for(let e=0;et?1:0}function Ao(e){const{espece:t,"activité":n,"méthode":r,transport:o,nombreIndividus:i,nombreNids:s,nombreOeufs:a,"surfaceHabitatDétruit":c}=e;return s||a?{espece:t.CD_NOM,"activité":n&&n.Code,"méthode":r&&r.Code,transport:o&&o.Code,nombreIndividus:i,nombreNids:s,nombreOeufs:a,"surfaceHabitatDétruit":c}:{espece:t.CD_NOM,"activité":n&&n.Code,"méthode":r&&r.Code,transport:o&&o.Code,nombreIndividus:i,"surfaceHabitatDétruit":c}}function So(e,t,n){let{"espècesProtégéesParClassification":r}=t,{activitesParClassificationEtreVivant:o}=t,{"méthodesParClassificationEtreVivant":i}=t,{transportsParClassificationEtreVivant:s}=t,{"descriptionMenacesEspèces":a}=t;console.log("descriptionMenacesEspèces",a);const c=new Map([["oiseau",{sectionClass:"saisie-oiseau",sectionTitre:"Espèces d’oiseaux concernées 🐦"}],["faune non-oiseau",{sectionClass:"saisie-faune",sectionTitre:"Espèces animales (hors oiseaux) concernées 🐸"}],["flore",{sectionClass:"saisie-flore",sectionTitre:"Espèces végétales concernées 🍀"}]]);let l,u,d;function h(e,t,r){"oiseau"===t?r.push({espece:e,nombreIndividus:0,nombreNids:0,nombreOeufs:0,"surfaceHabitatDétruit":0}):r.push({espece:e,nombreIndividus:0,"surfaceHabitatDétruit":0}),n(0,a)}function f(e,t){const r=e.findIndex((({espece:e})=>e===t));r>-1&&e.splice(r,1),n(0,a)}return e.$$set=e=>{"espècesProtégéesParClassification"in e&&n(1,r=e.espècesProtégéesParClassification),"activitesParClassificationEtreVivant"in e&&n(2,o=e.activitesParClassificationEtreVivant),"méthodesParClassificationEtreVivant"in e&&n(3,i=e.méthodesParClassificationEtreVivant),"transportsParClassificationEtreVivant"in e&&n(4,s=e.transportsParClassificationEtreVivant),"descriptionMenacesEspèces"in e&&n(0,a=e.descriptionMenacesEspèces)},e.$$.update=()=>{32&e.$$.dirty[0]&&n(5,l=void 0)},[a,r,o,i,s,l,u,["0-10","11-100","101-1000","1001-10000","10001+"],c,h,f,function(){const e=function(e){return e.map((({classification:e,etresVivantsAtteints:t})=>({classification:e,etresVivantsAtteints:t.map(Ao)})))}(a);console.log("jsonable",e,Po(JSON.stringify(e)).length),d=`${location.origin}${location.pathname}?data=${Po(JSON.stringify(e))}`,u.classList.add("animate"),u.addEventListener("animationend",(()=>u.classList.remove("animate"))),navigator.clipboard.writeText(d).then((()=>{n(6,u.textContent="Copié dans le presse-papier !",u)})).catch((e=>{console.error("Une erreur s'est produite lors de la copie : ",e)}))},Po,function(e){ve[e?"unshift":"push"]((()=>{u=e,n(6,u)}))},function(e,t,r,o){r[o].espece=e,n(0,a)},function(e,t){e[t].activité=se(this),n(0,a),n(2,o)},function(e,t){e[t].méthode=se(this),n(0,a),n(2,o)},function(e,t){e[t].transport=se(this),n(0,a),n(2,o)},function(e,t){e[t].nombreIndividus=se(this),n(0,a),n(2,o)},function(e,t){e[t].nombreNids=ne(this.value),n(0,a),n(2,o)},function(e,t){e[t].nombreOeufs=ne(this.value),n(0,a),n(2,o)},function(e,t){e[t].surfaceHabitatDétruit=ne(this.value),n(0,a),n(2,o)},(e,t)=>f(e,t),(e,t,n)=>{h(n,e,t)},function(e){l=e,n(5,l)}]}class jo extends Ue{constructor(e){super(),Xe(this,e,So,Do,_,{"espècesProtégéesParClassification":1,activitesParClassificationEtreVivant:2,"méthodesParClassificationEtreVivant":3,transportsParClassificationEtreVivant:4,"descriptionMenacesEspèces":0,UTF8ToB64:12},null,[-1,-1])}get UTF8ToB64(){return Po}}function Io(e){let t,n,r,o,i,s,a,c,l,u,d,h,f,m,p,g,w,v,y,x,k,C,M,N,_,T,D,$,P,E,A,S,j,I=e[0].id+"",z=ir(e[0])+"",O=rr(e[0])+"",L=e[3]&&function(e){let t,n,r,o=or(e[0])+"";return{c(){t=X("h3"),t.textContent="Déposant",n=V(),r=U(o)},m(e,o){Y(e,t,o),Y(e,n,o),Y(e,r,o)},p(e,t){1&t&&o!==(o=or(e[0])+"")&&re(r,o)},d(e){e&&(W(t),W(n),W(r))}}}(e);return{c(){t=X("article"),n=X("h1"),r=U("Dossier "),o=U(I),i=U(" - "),s=U(e[2]),a=V(),c=X("section"),l=X("h2"),l.textContent="Demandeur",u=V(),d=X("p"),h=U(z),f=V(),m=X("h2"),m.textContent="Localisation",p=V(),g=X("p"),w=U(O),v=V(),y=X("section"),x=X("h2"),x.textContent="Chronologie",k=V(),C=X("ol"),M=X("li"),N=X("span"),N.textContent="Dépôt sur Démarche Simplifiée",_=V(),T=X("span"),T.textContent=`${ar(e[1])}`,D=V(),$=X("section"),P=X("h2"),P.textContent="Interlocueurs",E=V(),L&&L.c(),A=V(),S=X("h3"),S.textContent="Représentant du demandeur",j=U("\n (à faire)"),Z(n,"class","svelte-a22p9l"),Z(c,"class","svelte-a22p9l"),Z(N,"class","text svelte-a22p9l"),Z(T,"class","moment"),Z(C,"class","chronologie svelte-a22p9l"),Z(y,"class","svelte-a22p9l"),Z($,"class","svelte-a22p9l"),Z(t,"class","svelte-a22p9l")},m(e,b){Y(e,t,b),R(t,n),R(n,r),R(n,o),R(n,i),R(n,s),R(t,a),R(t,c),R(c,l),R(c,u),R(c,d),R(d,h),R(c,f),R(c,m),R(c,p),R(c,g),R(g,w),R(t,v),R(t,y),R(y,x),R(y,k),R(y,C),R(C,M),R(M,N),R(M,_),R(M,T),R(t,D),R(t,$),R($,P),R($,E),L&&L.m($,null),R($,A),R($,S),R($,j)},p(e,[t]){1&t&&I!==(I=e[0].id+"")&&re(o,I),1&t&&z!==(z=ir(e[0])+"")&&re(h,z),1&t&&O!==(O=rr(e[0])+"")&&re(w,O),e[3]&&L.p(e,t)},i:b,o:b,d(e){e&&W(t),L&&L.d()}}}function zo(e,t,n){let{dossier:r}=t;const{"date_dépôt":o,statut:i,"déposant_nom":s}=r;return e.$$set=e=>{"dossier"in e&&n(0,r=e.dossier)},[r,o,i,s]}class Oo extends Ue{constructor(e){super(),Xe(this,e,zo,Io,_,{dossier:0})}}function Lo(e){return e instanceof Date&&!Number.isNaN(e.valueOf())}function qo(e){if(!e)return;let t=Gn(e,"dd/MM/yy",new Date);return Lo(t)||(t=Gn(e,"dd/MM/yyyy",new Date)),Lo(t)||(t=Gn(e,"yyyy",new Date)),Lo(t)?t:void 0}function Fo(e){return e.replace(/-|'/g," ").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}function Ro(e,t){return{"Porteur de projet":e["Porteur de projet"],"Le demandeur est…":"","Numéro de SIRET":"",Qualification:"",Adresse:"","Objet du projet":t.get(e["Type de projet"]),"Nom du représentant":"","Prénom du représentant":"","Qualité du représentant":"","Numéro de téléphone de contact":"","Adresse mail de contact":"","Description de la demande":e.But,"Le projet est-il soumis à une autorisation environnementale ?":"AE avec DDEP"===e["Procédure"]||"AE sans DDEP"===e["Procédure"],"À quelle procédure le projet est-il soumis ?":[],"Motif de la dérogation":"","Précisez":"","J'atteste qu'il n'existe aucune alternative satisfaisante permettant d'éviter la dérogation":void 0,"Synthèse des éléments démontrant qu'il n'existe aucune alternative au projet":"","Détails du programme d’activité":"","Lien vers la liste des espèces concernées":"","Nom du projet":e["Nom du projet"],"Cette demande concerne un programme déjà existant":!1,"Le projet se situe au niveau…":void 0,"Commune(s) où se situe le projet":e.Localisation,"Département(s) où se situe le projet":(e.Dpt||"").split(",").map((e=>e.trim())),"Date de début d’intervention":e["Date réception Guichet Unique"],"Date de fin d’intervention":void 0,"Date de début de chantier":void 0,"Date de fin de chantier":void 0,"Qualification des personnes amenées à intervenir":[],"Modalités techniques de l'intervention":"","Bilan d'opérations antérieures":"","Description succincte du projet":"","Dépot du dossier complet de demande de dérogation":"","Mesures d'évitement, réduction et/ou compensation":void 0}}function Ho(e){const t=e["Date réception DDEP"],n=e["Date réception DBEC"];return t||n}const Qo=new Map([["Le demandeur est…","Q2hhbXAtMzg5ODg5NQ=="],["Numéro de SIRET","Q2hhbXAtMzg5NzM5NA=="],["Qualification","Q2hhbXAtMzg5NzM1NQ=="],["Adresse","Q2hhbXAtMzg5NzM2Mg=="],["Objet du projet","Q2hhbXAtMzg5NzQwMA=="],["Nom du représentant","Q2hhbXAtMzg5NzM5Nw=="],["Prénom du représentant","Q2hhbXAtNDIzMDU1OA=="],["Qualité du représentant","Q2hhbXAtMzg5NzM5OA=="],["Numéro de téléphone de contact","Q2hhbXAtMzkzMzczNg=="],["Adresse mail de contact","Q2hhbXAtMzkzMzc0MA=="],["Le projet est-il soumis à une autorisation environnementale ?","Q2hhbXAtNDA4MzAxMQ=="],["À quelle procédure le projet est-il soumis ?","Q2hhbXAtNDA4Mjk1OA=="],["Motif de la dérogation","Q2hhbXAtMzg5NzQwMg=="],["Précisez","Q2hhbXAtNDAzMzk0OA=="],["J'atteste qu'il n'existe aucune alternative satisfaisante permettant d'éviter la dérogation","Q2hhbXAtNDA0MDgyMQ=="],["Synthèse des éléments démontrant qu'il n'existe aucune alternative au projet","Q2hhbXAtNDA0MDgyNg=="],["Détails du programme d’activité","Q2hhbXAtMzg5NzQwNA=="],["Lien vers la liste des espèces concernées","Q2hhbXAtMzg5NzQwNQ=="],["Nom du projet","Q2hhbXAtNDE0OTExNQ=="],["Cette demande concerne un programme déjà existant","Q2hhbXAtMzkyMzYyNA=="],["Le projet se situe au niveau…","Q2hhbXAtMzg5NzQwOA=="],["Commune(s) où se situe le projet","Q2hhbXAtNDA0MTQ0MQ=="],["Département(s) où se situe le projet","Q2hhbXAtNDA0MTQ0NQ=="],["Région(s) où se situe le projet","Q2hhbXAtNDA0MTQ0OA=="],["Date de début d’intervention","Q2hhbXAtMzg5NzQ3NA=="],["Date de fin d’intervention","Q2hhbXAtMzkyMzYyNg=="],["Date de début de chantier","Q2hhbXAtMzg5NzUwMg=="],["Date de fin de chantier","Q2hhbXAtMzkyMzYzMQ=="],["Qualification des personnes amenées à intervenir","Q2hhbXAtMzg5NzQ3Ng=="],["Modalités techniques de l'intervention","Q2hhbXAtMzg5NzQ5OQ=="],["Bilan d'opérations antérieures","Q2hhbXAtMzkyMzY1Ng=="],["Description succincte du projet","Q2hhbXAtMzkyMzY2OA=="],["Dépot du dossier complet de demande de dérogation","Q2hhbXAtMzkyMzY2OQ=="],["Mesures d'évitement, réduction et/ou compensation","Q2hhbXAtMzg5NzUwOQ=="]]),Yo=["Le demandeur est…","Objet du projet","Nom du représentant","Prénom du représentant","Adresse mail de contact","Le projet est-il soumis à une autorisation environnementale ?","Lien vers la liste des espèces concernées","Nom du projet","Le projet se situe au niveau…","Commune(s) où se situe le projet","Département(s) où se situe le projet","Région(s) où se situe le projet"],Wo="https://www.demarches-simplifiees.fr/commencer/derogation-especes-protegees?";function Bo(e){const t={};for(const n of Yo)if(!["Commune(s) où se situe le projet","Département(s) où se situe le projet","Région(s) où se situe le projet"].includes(n)){const r=e[n];r&&(t[`champ_${Qo.get(n)}`]=r.toString())}e["Le demandeur est…"]||(t[`champ_${Qo.get("Le demandeur est…")}`]="une personne morale");return Array.isArray(e["Commune(s) où se situe le projet"])&&e["Commune(s) où se situe le projet"].length,console.log("communesURLParam",""),Wo+new URLSearchParams(t).toString()+""}function Xo(e,t,n){const r=e.slice();return r[9]=t[n].dossier,r[10]=t[n].annotations,r}function Uo(e,t,n){const r=e.slice();return r[13]=t[n],r[15]=n,r}function Vo(e){return{c:b,m:b,p:b,d:b}}function Jo(e){let t,n,r,o,i=e[8]&&Go(e);return{c(){i&&i.c(),t=V(),n=X("h2"),n.textContent="Annotations à rajouter à un dossier",r=V(),o=X("strong"),o.textContent="PPP: Pour toutes les données dans le tableau, proposer d'affecter les données à un dossier dans DS\n Essayer de retrouver le dossier avec le même algo (nom de projet, porteur, représentant)"},m(e,s){i&&i.m(e,s),Y(e,t,s),Y(e,n,s),Y(e,r,s),Y(e,o,s)},p(e,n){e[8]?i?i.p(e,n):(i=Go(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){e&&(W(t),W(n),W(r),W(o)),i&&i.d(e)}}}function Go(e){let t,n,r,o,i,s,a,c,l,u,d,h,f,m=e[8].size+"",p=Fe([...e[8].values()]),g=[];for(let t=0;tDpt Nom du porteur de projet Nom du projet Commune(s) AE Préremplissage Email au porteur de projet',c=V(),l=X("tbody");for(let e=0;e\n Et déposez le fichier .csv ici :",c=V(),l=X("label"),u=X("strong"),u.textContent="Fichier d'import :",d=V(),h=X("input"),f=V(),m=X("section"),C.block.c(),g=V(),w=X("section"),w.innerHTML="

Chronologie

",v=V(),y=X("section"),y.innerHTML="

Interlocueurs

",Z(n,"class","svelte-yutiun"),Z(h,"type","file"),Z(l,"class","file svelte-yutiun"),Z(t,"class","svelte-yutiun")},m(p,b){Y(p,t,b),R(t,n),R(t,r),R(t,o),R(o,i),R(o,s),R(o,a),R(o,c),R(o,l),R(l,u),R(l,d),R(l,h),R(o,f),R(o,m),C.block.m(m,C.anchor=null),C.mount=()=>m,C.anchor=null,R(t,g),R(t,w),R(t,v),R(t,y),x||(k=G(h,"change",e[6]),x=!0)},p(t,[n]){e=t,C.ctx=e,2&n&&p!==(p=e[1])&&qe(p,C)||function(e,t,n){const r=t.slice(),{resolved:o}=e;e.current===e.then&&(r[e.value]=o),e.current===e.catch&&(r[e.error]=o),e.block.p(r,n)}(C,e,n)},i:b,o:b,d(e){e&&W(t),C.block.d(),C.token=null,C=null,x=!1,k()}}}function si(e){return!e["Décision"]&&(e["Porteur de projet"]||e["Nom du projet"]||Array.isArray(e.Localisation)&&e.Localisation.length>=1)}function ai(e,t,n){const r=h(";");let o,i,s,{dossiers:a}=t,{nomToCommune:c}=t,{typeVersObjet:l}=t;return e.$$set=e=>{"dossiers"in e&&n(2,a=e.dossiers),"nomToCommune"in e&&n(3,c=e.nomToCommune),"typeVersObjet"in e&&n(4,l=e.typeVersObjet)},e.$$.update=()=>{9&e.$$.dirty&&o&&n(5,i=o[0].text().then(r.parse).then((e=>e.map((e=>function(e,t){const n={...e};for(const r of Object.keys(e))switch(r){case"Date réception Guichet Unique":case"Date réception DBEC":case"Date envoi dernier avis SPN":case"Date réception DDEP":case"Date saisine CSRPN":case"Date saisine CNPN":case"Date avis CNPN / CSRPN":case"Date arrêté (AP)":case"Date AM":case"Date envoi avis SPN n°2":case"Date envoi avis SPN n°3":n[r]=qo(e[r]);break;case"DDEP requise":n[r]="oui"===e[r].trim();break;case"Localisation":n[r]=(e[r]||"").split(/,|&|\//).map((e=>e.trim())).filter((e=>e.length>=1)).map((n=>{const r=Fo(n);return t.has(r)?t.get(r):(console.warn(`Commune '${n}' non reconnue`,"-",e["Nom du projet"],"-",e["Porteur de projet"]),n)}));break;default:n[r]=e[r]}return n}(e,c))))).then((e=>e.filter(si)))),32&e.$$.dirty&&i&&i.then(console.log),48&e.$$.dirty&&i&&n(1,s=i.then((e=>new Map(e.map((e=>{return[e,{dossier:Ro(e,l),annotations:(t=e,{"Enjeu écologique":"oui"===t["enjeu écologique"],"Enjeu politique":"oui"===t["enjeu politique"],"Commentaires sur les enjeux et la procédure":t["commentaires sur les enjeux et le contexte"],"Date de réception DDEP":Ho(t),"Dernière contribution en lien avec l'instruction DDEP":"","Date d'envoi de la dernière contribution en lien avec l'instruction DDEP":t["Date envoi dernier avis SPN"],"Autres documents relatifs au dossier":"","N° Demande ONAGRE":t["N°ONAGRE de demande"],"Saisine de l'instructeur":"","Date saisine CSRPN":t["Date saisine CSRPN"],"Date saisine CNPN":t["Date saisine CNPN"],"Date avis CSRPN":t["Date avis CNPN / CSRPN"],"Date avis CNPN":t["Date avis CNPN / CSRPN"],"Avis CSRPN/CNPN":"","Avis CSRPN/CNPN fichier":"","Date de début de la consultation du public ou enquête publique":qo(t["Dates consultation public"]),"Décision":t["Décision"],"Date de signature de l'AP":t["Date arrêté (AP)"],"Référence de l'AP":t["Réf arrêté (AP)"],"Date de l'AM":t["Date AM"],"Référence de l'AM":"","AP/AM":t["Type d'arrêté"]})}];var t})))))),2&e.$$.dirty&&s&&s.then(console.log)},[o,s,a,c,l,i,function(){o=this.files,n(0,o)}]}class ci extends Ue{constructor(e){super(),Xe(this,e,ai,ii,_,{dossiers:2,nomToCommune:3,typeVersObjet:4})}}const li={setSecret(e,t){e.secret=t},setDossiers(e,t){e.dossiers=t}},ui=function({state:e,mutations:t}){let n=e;const r=new Set;let o=!1;return{get state(){return n},mutations:function e(t,i=[]){return new Proxy(t,{get(t,n){if(n in t)return e(t[n],[...i,n]);throw new TypeError(`No ${n} property in 'mutations.${i.join(".")}'`)},apply(e,t,s){if("function"!=typeof e)throw new TypeError(`\`mutations.${i.join(".")}\` is not a function`);{const t=Reflect.apply(e,void 0,[n,...s]);return void 0!==t&&(n=t),o||(o=!0,Promise.resolve().then((()=>{for(const e of r)try{e(n)}catch(e){console.error("subscriber error",e)}o=!1}))),t}}})}(t),subscribe:e=>(r.add(e),()=>{r.delete(e)})}}({state:{secret:void 0,dossiers:void 0},mutations:li});let di,hi=e=>{};function fi(e,t){if(!t)throw new Error("Missing _mapStateToProps in replaceComponent");di&&di.$destroy(),di=e,hi=t}function mi(e,t){return void 0===t?Promise.resolve().then((()=>{const t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){return t}})):Promise.resolve().then((()=>{let n=Object(t)===t?JSON.stringify(t):t;localStorage.setItem(e,n)}))}ui.subscribe((function(e){const t=hi(e);t&&di.$set(t)}));const pi="secret-pitchou";function gi(){return console.log("store.state.secret",ui.state.secret),ui.state.secret?v(`/dossiers?secret=${ui.state.secret}`).then((e=>(console.log("dossiers",e),ui.mutations.setDossiers(e),e))):Promise.reject(new TypeError("Impossible de charger les dossiers, secret manquant"))}async function wi(){return ui.mutations.setSecret(void 0),e=pi,Promise.resolve().then((()=>{localStorage.removeItem(e)}));var e}function vi(e){return v(`/envoi-email-connexion?email=${encodeURIComponent(e)}`,{method:"POST"})}const bi=new Set(["developpement-durable.gouv.fr","beta.gouv.fr"]),yi=document.querySelector(".svelte-main");function xi(){function e(){return{authorizedEmailDomains:bi,envoiEmailConnexion:vi}}fi(new Ze({target:yi,props:e()}),e)}n("/",(async()=>{if(console.info("route","/"),await async function(){const e=new URLSearchParams(location.search).get("secret");if(e){const t=new URL(location.href);return t.searchParams.delete("secret"),history.replaceState(null,"",t),ui.mutations.setSecret(e),mi(pi,e)}}(),ui.state.dossiers||await gi().catch((e=>{e.message.includes("403")?console.info("Invalid token. Logout."):console.error("Erreur de chargement des dossiers",e),wi().then(xi)})),ui.state.dossiers){function e({dossiers:e}){return{dossiers:e}}fi(new hr({target:yi,props:e(ui.state)}),e)}else xi()})),n("/dossier/:dossierId",(({params:{dossierId:e}})=>{function t({dossiers:t}){const n=Number(e);return{dossier:t.find((({id:e})=>e===n))}}fi(new Oo({target:yi,props:t(ui.state)}),t)})),n("/saisie-especes",(async()=>{function e(e){return s.includes(e)}function t(e){const t=document.head.querySelector(e);if(!t)throw new TypeError(`Élément ${e} manquant`);const n=t.getAttribute("href");if(!n)throw new TypeError(`Attribut "href" manquant sur ${e}`);return n}const[n,r,o,i]=await Promise.all([p(";",t("link#especes-data")),p(";",t("link#activites-data")),p(";",t("link#methodes-data")),p(";",t("link#transports-data"))]);console.log(n,r,o,i);const s=Object.freeze(["oiseau","faune non-oiseau","flore"]),a=new Map;for(const t of r){const n=t["Espèces"];if(!n.trim()&&!t.Code)break;if(!e(n))throw new TypeError(`Classification d'espèce non reconnue: ${n}. Les choix sont : ${s.join(", ")}`);const r=a.get(n)||[];r.push(t),a.set(n,r)}const c=new Map;for(const t of o){const n=t["Espèces"];if(!n.trim()&&!t.Code)break;if(!e(n))throw new TypeError(`Classification d'espèce non reconnue: ${n}. Les choix sont : ${s.join(", ")}`);const r=c.get(n)||[];r.push(t),c.set(n,r)}const l=new Map;for(const t of i){const n=t["Espèces"];if(!n.trim()&&!t.Code)break;if(!e(n))throw new TypeError(`Classification d'espèce non reconnue: ${n}. Les choix sont : ${s.join(", ")}`);const r=l.get(n)||[];r.push(t),l.set(n,r)}const u=new Map;n.forEach((e=>{u.set(e.CD_NOM,e)})),console.log(u);const d=[...u.values()],h=new Map([["oiseau",({REGNE:e,CLASSE:t})=>"Animalia"===e&&"Aves"===t],["faune non-oiseau",({REGNE:e,CLASSE:t})=>"Animalia"===e&&"Aves"!==t],["flore",({REGNE:e})=>"Plantae"===e]]),f=new Map([...h].map((([e,t])=>[e,d.filter(t)])));function m(){const e=new URLSearchParams(location.search).get("data");if(e)try{const t=JSON.parse(decodeURIComponent(escape(atob(e)))),n=t.map((({classification:e,etresVivantsAtteints:t})=>(console.log("classification, etresVivantsAtteints",e,t),{classification:e,etresVivantsAtteints:t.map((({espece:t,"activité":n,"méthode":s,transport:a,...c})=>({espece:u.get(t),"activité":r.find((e=>e.Code===n)),"méthode":o.find((e=>e.Code===s)),transport:i.find((t=>t.Espèces===e&&t.Code===a)),...c})))})));return console.log("desc",n),n}catch(t){return void console.error("Parsing error",t,e)}}function g(){return{"espècesProtégéesParClassification":f,activitesParClassificationEtreVivant:a,"méthodesParClassificationEtreVivant":c,transportsParClassificationEtreVivant:l,"descriptionMenacesEspèces":m()||[{classification:"oiseau",etresVivantsAtteints:[],"activité":void 0,"méthode":void 0,transport:void 0},{classification:"faune non-oiseau",etresVivantsAtteints:[],"activité":void 0,"méthode":void 0,transport:void 0},{classification:"flore",etresVivantsAtteints:[],"activité":void 0}]}}console.log("espècesProtégéesParClassification",f);fi(new jo({target:yi,props:g()}),g)})),n("/import-historique/nouvelle-aquitaine",(async()=>{const[e,t,n]=await Promise.all([v("https://geo.api.gouv.fr/communes"),g("/data/import-historique/Correspondance Nom projet Objet projet.csv"),v("/data/schema-DS-88444.json")]);if(!e)throw new TypeError("Communes manquantes");const r=new Map;for(const t of e)r.set(Fo(t.nom),t);if(!t)throw new TypeError("Correspondance type/objet manquante");const o=new Map,i=new Set(n.revision.champDescriptors.find((e=>"Q2hhbXAtMzg5NzQwMA=="===e.id)).options);for(let{"Tableau de suivi":e,"Objet du projet (ONAGRE)":n}of t)e=e.trim(),n=n.trim(),e.length>=1&&n.length>=1&&(i.has(n)||console.warn("L'objet dans le fichier de correpondance ne fait pas partie des options du schema",n,i),o.set(e,n));function s({dossiers:e}){return{dossiers:e,nomToCommune:r,typeVersObjet:o}}fi(new ci({target:yi,props:s(ui.state)}),s)})),mi(pi).then((e=>{if(e)return ui.mutations.setSecret(e),gi()})).then((()=>n.start())); +//# sourceMappingURL=rollup-bundle-pitchou.js.map diff --git a/build/rollup-bundle-pitchou.js.map b/build/rollup-bundle-pitchou.js.map new file mode 100644 index 00000000..1bb6eb71 --- /dev/null +++ b/build/rollup-bundle-pitchou.js.map @@ -0,0 +1 @@ +{"version":3,"file":"rollup-bundle-pitchou.js","sources":["../node_modules/page/page.js","../node_modules/d3-dsv/src/dsv.js","../node_modules/d3-fetch/src/text.js","../node_modules/d3-fetch/src/dsv.js","../node_modules/d3-dsv/src/csv.js","../node_modules/d3-fetch/src/json.js","../node_modules/svelte/src/runtime/internal/utils.js","../node_modules/svelte/src/runtime/internal/environment.js","../node_modules/svelte/src/runtime/internal/loop.js","../node_modules/svelte/src/runtime/internal/globals.js","../node_modules/svelte/src/runtime/internal/dom.js","../node_modules/svelte/src/runtime/internal/style_manager.js","../node_modules/svelte/src/runtime/internal/lifecycle.js","../node_modules/svelte/src/runtime/internal/animations.js","../node_modules/svelte/src/runtime/internal/scheduler.js","../node_modules/svelte/src/runtime/internal/transitions.js","../node_modules/svelte/src/runtime/internal/await_block.js","../node_modules/svelte/src/runtime/internal/each.js","../node_modules/svelte/src/runtime/internal/Component.js","../scripts/front-end/components/LoginViaEmail.svelte","../node_modules/svelte/src/runtime/internal/disclose-version/index.js","../node_modules/svelte/src/shared/version.js","../node_modules/date-fns/toDate.mjs","../node_modules/date-fns/constructFrom.mjs","../node_modules/date-fns/addDays.mjs","../node_modules/date-fns/constants.mjs","../node_modules/date-fns/_lib/defaultOptions.mjs","../node_modules/date-fns/startOfWeek.mjs","../node_modules/date-fns/startOfISOWeek.mjs","../node_modules/date-fns/getISOWeekYear.mjs","../node_modules/date-fns/startOfDay.mjs","../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs","../node_modules/date-fns/differenceInCalendarDays.mjs","../node_modules/date-fns/isValid.mjs","../node_modules/date-fns/isDate.mjs","../node_modules/date-fns/differenceInDays.mjs","../node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs","../node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs","../node_modules/date-fns/locale/en-US/_lib/formatLong.mjs","../node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs","../node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs","../node_modules/date-fns/locale/_lib/buildMatchFn.mjs","../node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs","../node_modules/date-fns/locale/en-US/_lib/match.mjs","../node_modules/date-fns/locale/en-US.mjs","../node_modules/date-fns/locale/en-US/_lib/localize.mjs","../node_modules/date-fns/getDayOfYear.mjs","../node_modules/date-fns/startOfYear.mjs","../node_modules/date-fns/getISOWeek.mjs","../node_modules/date-fns/startOfISOWeekYear.mjs","../node_modules/date-fns/getWeekYear.mjs","../node_modules/date-fns/getWeek.mjs","../node_modules/date-fns/startOfWeekYear.mjs","../node_modules/date-fns/_lib/addLeadingZeros.mjs","../node_modules/date-fns/_lib/format/lightFormatters.mjs","../node_modules/date-fns/_lib/format/formatters.mjs","../node_modules/date-fns/_lib/format/longFormatters.mjs","../node_modules/date-fns/_lib/protectedTokens.mjs","../node_modules/date-fns/format.mjs","../node_modules/date-fns/parse/_lib/Setter.mjs","../node_modules/date-fns/transpose.mjs","../node_modules/date-fns/parse/_lib/Parser.mjs","../node_modules/date-fns/parse/_lib/constants.mjs","../node_modules/date-fns/parse/_lib/utils.mjs","../node_modules/date-fns/parse/_lib/parsers/DateParser.mjs","../node_modules/date-fns/setDay.mjs","../node_modules/date-fns/setISODay.mjs","../node_modules/date-fns/getISODay.mjs","../node_modules/date-fns/parse/_lib/parsers.mjs","../node_modules/date-fns/parse/_lib/parsers/EraParser.mjs","../node_modules/date-fns/parse/_lib/parsers/YearParser.mjs","../node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.mjs","../node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.mjs","../node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.mjs","../node_modules/date-fns/parse/_lib/parsers/QuarterParser.mjs","../node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.mjs","../node_modules/date-fns/parse/_lib/parsers/MonthParser.mjs","../node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.mjs","../node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.mjs","../node_modules/date-fns/setWeek.mjs","../node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.mjs","../node_modules/date-fns/setISOWeek.mjs","../node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.mjs","../node_modules/date-fns/parse/_lib/parsers/DayParser.mjs","../node_modules/date-fns/parse/_lib/parsers/LocalDayParser.mjs","../node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.mjs","../node_modules/date-fns/parse/_lib/parsers/ISODayParser.mjs","../node_modules/date-fns/parse/_lib/parsers/AMPMParser.mjs","../node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.mjs","../node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.mjs","../node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.mjs","../node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.mjs","../node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.mjs","../node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.mjs","../node_modules/date-fns/parse/_lib/parsers/MinuteParser.mjs","../node_modules/date-fns/parse/_lib/parsers/SecondParser.mjs","../node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.mjs","../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.mjs","../node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.mjs","../node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.mjs","../node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.mjs","../node_modules/date-fns/parse.mjs","../node_modules/date-fns/getDefaultOptions.mjs","../node_modules/date-fns/locale/fr/_lib/formatDistance.mjs","../node_modules/date-fns/locale/fr/_lib/formatLong.mjs","../node_modules/date-fns/locale/fr/_lib/formatRelative.mjs","../node_modules/date-fns/locale/fr/_lib/localize.mjs","../node_modules/date-fns/locale/fr.mjs","../node_modules/date-fns/locale/fr/_lib/match.mjs","../scripts/front-end/affichageDossier.js","../node_modules/date-fns/formatRelative.mjs","../scripts/front-end/components/SuiviInstructeur.svelte","../node_modules/svelte/src/runtime/easing/index.js","../node_modules/svelte/src/runtime/animate/index.js","../node_modules/svelte/src/runtime/transition/index.js","../node_modules/simple-svelte-autocomplete/src/SimpleAutocomplete.svelte","../node_modules/svelte/src/runtime/internal/spread.js","../scripts/front-end/components/AutocompleteEspèces.svelte","../scripts/front-end/components/SaisieEspèces.svelte","../scripts/front-end/components/Dossier.svelte","../scripts/commun/typeFormat.js","../scripts/commun/préremplissageDémarcheSimplifiée.js","../scripts/front-end/components/ImportHistoriqueNouvelleAquitaine.svelte","../scripts/front-end/store.js","../node_modules/baredux/main.js","../scripts/front-end/routeComponentLifeCycle.js","../node_modules/remember/main.js","../scripts/front-end/actions/main.js","../scripts/front-end/serveur.js","../scripts/commun/constantes.js","../scripts/front-end/main.js"],"sourcesContent":["(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.page = factory());\n}(this, (function () { 'use strict';\n\nvar isarray = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n/**\n * Expose `pathToRegexp`.\n */\nvar pathToRegexp_1 = pathToRegexp;\nvar parse_1 = parse;\nvar compile_1 = compile;\nvar tokensToFunction_1 = tokensToFunction;\nvar tokensToRegExp_1 = tokensToRegExp;\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g');\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {String} str\n * @return {Array}\n */\nfunction parse (str) {\n var tokens = [];\n var key = 0;\n var index = 0;\n var path = '';\n var res;\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0];\n var escaped = res[1];\n var offset = res.index;\n path += str.slice(index, offset);\n index = offset + m.length;\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1];\n continue\n }\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path);\n path = '';\n }\n\n var prefix = res[2];\n var name = res[3];\n var capture = res[4];\n var group = res[5];\n var suffix = res[6];\n var asterisk = res[7];\n\n var repeat = suffix === '+' || suffix === '*';\n var optional = suffix === '?' || suffix === '*';\n var delimiter = prefix || '/';\n var pattern = capture || group || (asterisk ? '.*' : '[^' + delimiter + ']+?');\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n pattern: escapeGroup(pattern)\n });\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index);\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path);\n }\n\n return tokens\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {String} str\n * @return {Function}\n */\nfunction compile (str) {\n return tokensToFunction(parse(str))\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length);\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^' + tokens[i].pattern + '$');\n }\n }\n\n return function (obj) {\n var path = '';\n var data = obj || {};\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n path += token;\n\n continue\n }\n\n var value = data[token.name];\n var segment;\n\n if (value == null) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received \"' + value + '\"')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encodeURIComponent(value[j]);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment;\n }\n\n continue\n }\n\n segment = encodeURIComponent(value);\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment;\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {String} str\n * @return {String}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {String} group\n * @return {String}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {RegExp} re\n * @param {Array} keys\n * @return {RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys;\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {String}\n */\nfunction flags (options) {\n return options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {RegExp} path\n * @param {Array} keys\n * @return {RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g);\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n pattern: null\n });\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {Array} path\n * @param {Array} keys\n * @param {Object} options\n * @return {RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = [];\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source);\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options));\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {String} path\n * @param {Array} keys\n * @param {Object} options\n * @return {RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n var tokens = parse(path);\n var re = tokensToRegExp(tokens, options);\n\n // Attach keys back to the regexp.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] !== 'string') {\n keys.push(tokens[i]);\n }\n }\n\n return attachKeys(re, keys)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {Array} tokens\n * @param {Array} keys\n * @param {Object} options\n * @return {RegExp}\n */\nfunction tokensToRegExp (tokens, options) {\n options = options || {};\n\n var strict = options.strict;\n var end = options.end !== false;\n var route = '';\n var lastToken = tokens[tokens.length - 1];\n var endsWithSlash = typeof lastToken === 'string' && /\\/$/.test(lastToken);\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n\n if (typeof token === 'string') {\n route += escapeString(token);\n } else {\n var prefix = escapeString(token.prefix);\n var capture = token.pattern;\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*';\n }\n\n if (token.optional) {\n if (prefix) {\n capture = '(?:' + prefix + '(' + capture + '))?';\n } else {\n capture = '(' + capture + ')?';\n }\n } else {\n capture = prefix + '(' + capture + ')';\n }\n\n route += capture;\n }\n }\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithSlash ? route.slice(0, -2) : route) + '(?:\\\\/(?=$))?';\n }\n\n if (end) {\n route += '$';\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithSlash ? '' : '(?=\\\\/|$)';\n }\n\n return new RegExp('^' + route, flags(options))\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(String|RegExp|Array)} path\n * @param {Array} [keys]\n * @param {Object} [options]\n * @return {RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n keys = keys || [];\n\n if (!isarray(keys)) {\n options = keys;\n keys = [];\n } else if (!options) {\n options = {};\n }\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, keys, options)\n }\n\n if (isarray(path)) {\n return arrayToRegexp(path, keys, options)\n }\n\n return stringToRegexp(path, keys, options)\n}\n\npathToRegexp_1.parse = parse_1;\npathToRegexp_1.compile = compile_1;\npathToRegexp_1.tokensToFunction = tokensToFunction_1;\npathToRegexp_1.tokensToRegExp = tokensToRegExp_1;\n\n/**\n * Module dependencies.\n */\n\n \n\n /**\n * Short-cuts for global-object checks\n */\n\n var hasDocument = ('undefined' !== typeof document);\n var hasWindow = ('undefined' !== typeof window);\n var hasHistory = ('undefined' !== typeof history);\n var hasProcess = typeof process !== 'undefined';\n\n /**\n * Detect click event\n */\n var clickEvent = hasDocument && document.ontouchstart ? 'touchstart' : 'click';\n\n /**\n * To work properly with the URL\n * history.location generated polyfill in https://github.com/devote/HTML5-History-API\n */\n\n var isLocation = hasWindow && !!(window.history.location || window.location);\n\n /**\n * The page instance\n * @api private\n */\n function Page() {\n // public things\n this.callbacks = [];\n this.exits = [];\n this.current = '';\n this.len = 0;\n\n // private things\n this._decodeURLComponents = true;\n this._base = '';\n this._strict = false;\n this._running = false;\n this._hashbang = false;\n\n // bound functions\n this.clickHandler = this.clickHandler.bind(this);\n this._onpopstate = this._onpopstate.bind(this);\n }\n\n /**\n * Configure the instance of page. This can be called multiple times.\n *\n * @param {Object} options\n * @api public\n */\n\n Page.prototype.configure = function(options) {\n var opts = options || {};\n\n this._window = opts.window || (hasWindow && window);\n this._decodeURLComponents = opts.decodeURLComponents !== false;\n this._popstate = opts.popstate !== false && hasWindow;\n this._click = opts.click !== false && hasDocument;\n this._hashbang = !!opts.hashbang;\n\n var _window = this._window;\n if(this._popstate) {\n _window.addEventListener('popstate', this._onpopstate, false);\n } else if(hasWindow) {\n _window.removeEventListener('popstate', this._onpopstate, false);\n }\n\n if (this._click) {\n _window.document.addEventListener(clickEvent, this.clickHandler, false);\n } else if(hasDocument) {\n _window.document.removeEventListener(clickEvent, this.clickHandler, false);\n }\n\n if(this._hashbang && hasWindow && !hasHistory) {\n _window.addEventListener('hashchange', this._onpopstate, false);\n } else if(hasWindow) {\n _window.removeEventListener('hashchange', this._onpopstate, false);\n }\n };\n\n /**\n * Get or set basepath to `path`.\n *\n * @param {string} path\n * @api public\n */\n\n Page.prototype.base = function(path) {\n if (0 === arguments.length) return this._base;\n this._base = path;\n };\n\n /**\n * Gets the `base`, which depends on whether we are using History or\n * hashbang routing.\n\n * @api private\n */\n Page.prototype._getBase = function() {\n var base = this._base;\n if(!!base) return base;\n var loc = hasWindow && this._window && this._window.location;\n\n if(hasWindow && this._hashbang && loc && loc.protocol === 'file:') {\n base = loc.pathname;\n }\n\n return base;\n };\n\n /**\n * Get or set strict path matching to `enable`\n *\n * @param {boolean} enable\n * @api public\n */\n\n Page.prototype.strict = function(enable) {\n if (0 === arguments.length) return this._strict;\n this._strict = enable;\n };\n\n\n /**\n * Bind with the given `options`.\n *\n * Options:\n *\n * - `click` bind to click events [true]\n * - `popstate` bind to popstate [true]\n * - `dispatch` perform initial dispatch [true]\n *\n * @param {Object} options\n * @api public\n */\n\n Page.prototype.start = function(options) {\n var opts = options || {};\n this.configure(opts);\n\n if (false === opts.dispatch) return;\n this._running = true;\n\n var url;\n if(isLocation) {\n var window = this._window;\n var loc = window.location;\n\n if(this._hashbang && ~loc.hash.indexOf('#!')) {\n url = loc.hash.substr(2) + loc.search;\n } else if (this._hashbang) {\n url = loc.search + loc.hash;\n } else {\n url = loc.pathname + loc.search + loc.hash;\n }\n }\n\n this.replace(url, null, true, opts.dispatch);\n };\n\n /**\n * Unbind click and popstate event handlers.\n *\n * @api public\n */\n\n Page.prototype.stop = function() {\n if (!this._running) return;\n this.current = '';\n this.len = 0;\n this._running = false;\n\n var window = this._window;\n this._click && window.document.removeEventListener(clickEvent, this.clickHandler, false);\n hasWindow && window.removeEventListener('popstate', this._onpopstate, false);\n hasWindow && window.removeEventListener('hashchange', this._onpopstate, false);\n };\n\n /**\n * Show `path` with optional `state` object.\n *\n * @param {string} path\n * @param {Object=} state\n * @param {boolean=} dispatch\n * @param {boolean=} push\n * @return {!Context}\n * @api public\n */\n\n Page.prototype.show = function(path, state, dispatch, push) {\n var ctx = new Context(path, state, this),\n prev = this.prevContext;\n this.prevContext = ctx;\n this.current = ctx.path;\n if (false !== dispatch) this.dispatch(ctx, prev);\n if (false !== ctx.handled && false !== push) ctx.pushState();\n return ctx;\n };\n\n /**\n * Goes back in the history\n * Back should always let the current route push state and then go back.\n *\n * @param {string} path - fallback path to go back if no more history exists, if undefined defaults to page.base\n * @param {Object=} state\n * @api public\n */\n\n Page.prototype.back = function(path, state) {\n var page = this;\n if (this.len > 0) {\n var window = this._window;\n // this may need more testing to see if all browsers\n // wait for the next tick to go back in history\n hasHistory && window.history.back();\n this.len--;\n } else if (path) {\n setTimeout(function() {\n page.show(path, state);\n });\n } else {\n setTimeout(function() {\n page.show(page._getBase(), state);\n });\n }\n };\n\n /**\n * Register route to redirect from one path to other\n * or just redirect to another route\n *\n * @param {string} from - if param 'to' is undefined redirects to 'from'\n * @param {string=} to\n * @api public\n */\n Page.prototype.redirect = function(from, to) {\n var inst = this;\n\n // Define route from a path to another\n if ('string' === typeof from && 'string' === typeof to) {\n page.call(this, from, function(e) {\n setTimeout(function() {\n inst.replace(/** @type {!string} */ (to));\n }, 0);\n });\n }\n\n // Wait for the push state and replace it with another\n if ('string' === typeof from && 'undefined' === typeof to) {\n setTimeout(function() {\n inst.replace(from);\n }, 0);\n }\n };\n\n /**\n * Replace `path` with optional `state` object.\n *\n * @param {string} path\n * @param {Object=} state\n * @param {boolean=} init\n * @param {boolean=} dispatch\n * @return {!Context}\n * @api public\n */\n\n\n Page.prototype.replace = function(path, state, init, dispatch) {\n var ctx = new Context(path, state, this),\n prev = this.prevContext;\n this.prevContext = ctx;\n this.current = ctx.path;\n ctx.init = init;\n ctx.save(); // save before dispatching, which may redirect\n if (false !== dispatch) this.dispatch(ctx, prev);\n return ctx;\n };\n\n /**\n * Dispatch the given `ctx`.\n *\n * @param {Context} ctx\n * @api private\n */\n\n Page.prototype.dispatch = function(ctx, prev) {\n var i = 0, j = 0, page = this;\n\n function nextExit() {\n var fn = page.exits[j++];\n if (!fn) return nextEnter();\n fn(prev, nextExit);\n }\n\n function nextEnter() {\n var fn = page.callbacks[i++];\n\n if (ctx.path !== page.current) {\n ctx.handled = false;\n return;\n }\n if (!fn) return unhandled.call(page, ctx);\n fn(ctx, nextEnter);\n }\n\n if (prev) {\n nextExit();\n } else {\n nextEnter();\n }\n };\n\n /**\n * Register an exit route on `path` with\n * callback `fn()`, which will be called\n * on the previous context when a new\n * page is visited.\n */\n Page.prototype.exit = function(path, fn) {\n if (typeof path === 'function') {\n return this.exit('*', path);\n }\n\n var route = new Route(path, null, this);\n for (var i = 1; i < arguments.length; ++i) {\n this.exits.push(route.middleware(arguments[i]));\n }\n };\n\n /**\n * Handle \"click\" events.\n */\n\n /* jshint +W054 */\n Page.prototype.clickHandler = function(e) {\n if (1 !== this._which(e)) return;\n\n if (e.metaKey || e.ctrlKey || e.shiftKey) return;\n if (e.defaultPrevented) return;\n\n // ensure link\n // use shadow dom when available if not, fall back to composedPath()\n // for browsers that only have shady\n var el = e.target;\n var eventPath = e.path || (e.composedPath ? e.composedPath() : null);\n\n if(eventPath) {\n for (var i = 0; i < eventPath.length; i++) {\n if (!eventPath[i].nodeName) continue;\n if (eventPath[i].nodeName.toUpperCase() !== 'A') continue;\n if (!eventPath[i].href) continue;\n\n el = eventPath[i];\n break;\n }\n }\n\n // continue ensure link\n // el.nodeName for svg links are 'a' instead of 'A'\n while (el && 'A' !== el.nodeName.toUpperCase()) el = el.parentNode;\n if (!el || 'A' !== el.nodeName.toUpperCase()) return;\n\n // check if link is inside an svg\n // in this case, both href and target are always inside an object\n var svg = (typeof el.href === 'object') && el.href.constructor.name === 'SVGAnimatedString';\n\n // Ignore if tag has\n // 1. \"download\" attribute\n // 2. rel=\"external\" attribute\n if (el.hasAttribute('download') || el.getAttribute('rel') === 'external') return;\n\n // ensure non-hash for the same path\n var link = el.getAttribute('href');\n if(!this._hashbang && this._samePath(el) && (el.hash || '#' === link)) return;\n\n // Check for mailto: in the href\n if (link && link.indexOf('mailto:') > -1) return;\n\n // check target\n // svg target is an object and its desired value is in .baseVal property\n if (svg ? el.target.baseVal : el.target) return;\n\n // x-origin\n // note: svg links that are not relative don't call click events (and skip page.js)\n // consequently, all svg links tested inside page.js are relative and in the same origin\n if (!svg && !this.sameOrigin(el.href)) return;\n\n // rebuild path\n // There aren't .pathname and .search properties in svg links, so we use href\n // Also, svg href is an object and its desired value is in .baseVal property\n var path = svg ? el.href.baseVal : (el.pathname + el.search + (el.hash || ''));\n\n path = path[0] !== '/' ? '/' + path : path;\n\n // strip leading \"/[drive letter]:\" on NW.js on Windows\n if (hasProcess && path.match(/^\\/[a-zA-Z]:\\//)) {\n path = path.replace(/^\\/[a-zA-Z]:\\//, '/');\n }\n\n // same page\n var orig = path;\n var pageBase = this._getBase();\n\n if (path.indexOf(pageBase) === 0) {\n path = path.substr(pageBase.length);\n }\n\n if (this._hashbang) path = path.replace('#!', '');\n\n if (pageBase && orig === path && (!isLocation || this._window.location.protocol !== 'file:')) {\n return;\n }\n\n e.preventDefault();\n this.show(orig);\n };\n\n /**\n * Handle \"populate\" events.\n * @api private\n */\n\n Page.prototype._onpopstate = (function () {\n var loaded = false;\n if ( ! hasWindow ) {\n return function () {};\n }\n if (hasDocument && document.readyState === 'complete') {\n loaded = true;\n } else {\n window.addEventListener('load', function() {\n setTimeout(function() {\n loaded = true;\n }, 0);\n });\n }\n return function onpopstate(e) {\n if (!loaded) return;\n var page = this;\n if (e.state) {\n var path = e.state.path;\n page.replace(path, e.state);\n } else if (isLocation) {\n var loc = page._window.location;\n page.show(loc.pathname + loc.search + loc.hash, undefined, undefined, false);\n }\n };\n })();\n\n /**\n * Event button.\n */\n Page.prototype._which = function(e) {\n e = e || (hasWindow && this._window.event);\n return null == e.which ? e.button : e.which;\n };\n\n /**\n * Convert to a URL object\n * @api private\n */\n Page.prototype._toURL = function(href) {\n var window = this._window;\n if(typeof URL === 'function' && isLocation) {\n return new URL(href, window.location.toString());\n } else if (hasDocument) {\n var anc = window.document.createElement('a');\n anc.href = href;\n return anc;\n }\n };\n\n /**\n * Check if `href` is the same origin.\n * @param {string} href\n * @api public\n */\n Page.prototype.sameOrigin = function(href) {\n if(!href || !isLocation) return false;\n\n var url = this._toURL(href);\n var window = this._window;\n\n var loc = window.location;\n\n /*\n When the port is the default http port 80 for http, or 443 for\n https, internet explorer 11 returns an empty string for loc.port,\n so we need to compare loc.port with an empty string if url.port\n is the default port 80 or 443.\n Also the comparition with `port` is changed from `===` to `==` because\n `port` can be a string sometimes. This only applies to ie11.\n */\n return loc.protocol === url.protocol &&\n loc.hostname === url.hostname &&\n (loc.port === url.port || loc.port === '' && (url.port == 80 || url.port == 443)); // jshint ignore:line\n };\n\n /**\n * @api private\n */\n Page.prototype._samePath = function(url) {\n if(!isLocation) return false;\n var window = this._window;\n var loc = window.location;\n return url.pathname === loc.pathname &&\n url.search === loc.search;\n };\n\n /**\n * Remove URL encoding from the given `str`.\n * Accommodates whitespace in both x-www-form-urlencoded\n * and regular percent-encoded form.\n *\n * @param {string} val - URL component to decode\n * @api private\n */\n Page.prototype._decodeURLEncodedURIComponent = function(val) {\n if (typeof val !== 'string') { return val; }\n return this._decodeURLComponents ? decodeURIComponent(val.replace(/\\+/g, ' ')) : val;\n };\n\n /**\n * Create a new `page` instance and function\n */\n function createPage() {\n var pageInstance = new Page();\n\n function pageFn(/* args */) {\n return page.apply(pageInstance, arguments);\n }\n\n // Copy all of the things over. In 2.0 maybe we use setPrototypeOf\n pageFn.callbacks = pageInstance.callbacks;\n pageFn.exits = pageInstance.exits;\n pageFn.base = pageInstance.base.bind(pageInstance);\n pageFn.strict = pageInstance.strict.bind(pageInstance);\n pageFn.start = pageInstance.start.bind(pageInstance);\n pageFn.stop = pageInstance.stop.bind(pageInstance);\n pageFn.show = pageInstance.show.bind(pageInstance);\n pageFn.back = pageInstance.back.bind(pageInstance);\n pageFn.redirect = pageInstance.redirect.bind(pageInstance);\n pageFn.replace = pageInstance.replace.bind(pageInstance);\n pageFn.dispatch = pageInstance.dispatch.bind(pageInstance);\n pageFn.exit = pageInstance.exit.bind(pageInstance);\n pageFn.configure = pageInstance.configure.bind(pageInstance);\n pageFn.sameOrigin = pageInstance.sameOrigin.bind(pageInstance);\n pageFn.clickHandler = pageInstance.clickHandler.bind(pageInstance);\n\n pageFn.create = createPage;\n\n Object.defineProperty(pageFn, 'len', {\n get: function(){\n return pageInstance.len;\n },\n set: function(val) {\n pageInstance.len = val;\n }\n });\n\n Object.defineProperty(pageFn, 'current', {\n get: function(){\n return pageInstance.current;\n },\n set: function(val) {\n pageInstance.current = val;\n }\n });\n\n // In 2.0 these can be named exports\n pageFn.Context = Context;\n pageFn.Route = Route;\n\n return pageFn;\n }\n\n /**\n * Register `path` with callback `fn()`,\n * or route `path`, or redirection,\n * or `page.start()`.\n *\n * page(fn);\n * page('*', fn);\n * page('/user/:id', load, user);\n * page('/user/' + user.id, { some: 'thing' });\n * page('/user/' + user.id);\n * page('/from', '/to')\n * page();\n *\n * @param {string|!Function|!Object} path\n * @param {Function=} fn\n * @api public\n */\n\n function page(path, fn) {\n // \n if ('function' === typeof path) {\n return page.call(this, '*', path);\n }\n\n // route to \n if ('function' === typeof fn) {\n var route = new Route(/** @type {string} */ (path), null, this);\n for (var i = 1; i < arguments.length; ++i) {\n this.callbacks.push(route.middleware(arguments[i]));\n }\n // show with [state]\n } else if ('string' === typeof path) {\n this['string' === typeof fn ? 'redirect' : 'show'](path, fn);\n // start [options]\n } else {\n this.start(path);\n }\n }\n\n /**\n * Unhandled `ctx`. When it's not the initial\n * popstate then redirect. If you wish to handle\n * 404s on your own use `page('*', callback)`.\n *\n * @param {Context} ctx\n * @api private\n */\n function unhandled(ctx) {\n if (ctx.handled) return;\n var current;\n var page = this;\n var window = page._window;\n\n if (page._hashbang) {\n current = isLocation && this._getBase() + window.location.hash.replace('#!', '');\n } else {\n current = isLocation && window.location.pathname + window.location.search;\n }\n\n if (current === ctx.canonicalPath) return;\n page.stop();\n ctx.handled = false;\n isLocation && (window.location.href = ctx.canonicalPath);\n }\n\n /**\n * Escapes RegExp characters in the given string.\n *\n * @param {string} s\n * @api private\n */\n function escapeRegExp(s) {\n return s.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g, '\\\\$1');\n }\n\n /**\n * Initialize a new \"request\" `Context`\n * with the given `path` and optional initial `state`.\n *\n * @constructor\n * @param {string} path\n * @param {Object=} state\n * @api public\n */\n\n function Context(path, state, pageInstance) {\n var _page = this.page = pageInstance || page;\n var window = _page._window;\n var hashbang = _page._hashbang;\n\n var pageBase = _page._getBase();\n if ('/' === path[0] && 0 !== path.indexOf(pageBase)) path = pageBase + (hashbang ? '#!' : '') + path;\n var i = path.indexOf('?');\n\n this.canonicalPath = path;\n var re = new RegExp('^' + escapeRegExp(pageBase));\n this.path = path.replace(re, '') || '/';\n if (hashbang) this.path = this.path.replace('#!', '') || '/';\n\n this.title = (hasDocument && window.document.title);\n this.state = state || {};\n this.state.path = path;\n this.querystring = ~i ? _page._decodeURLEncodedURIComponent(path.slice(i + 1)) : '';\n this.pathname = _page._decodeURLEncodedURIComponent(~i ? path.slice(0, i) : path);\n this.params = {};\n\n // fragment\n this.hash = '';\n if (!hashbang) {\n if (!~this.path.indexOf('#')) return;\n var parts = this.path.split('#');\n this.path = this.pathname = parts[0];\n this.hash = _page._decodeURLEncodedURIComponent(parts[1]) || '';\n this.querystring = this.querystring.split('#')[0];\n }\n }\n\n /**\n * Push state.\n *\n * @api private\n */\n\n Context.prototype.pushState = function() {\n var page = this.page;\n var window = page._window;\n var hashbang = page._hashbang;\n\n page.len++;\n if (hasHistory) {\n window.history.pushState(this.state, this.title,\n hashbang && this.path !== '/' ? '#!' + this.path : this.canonicalPath);\n }\n };\n\n /**\n * Save the context state.\n *\n * @api public\n */\n\n Context.prototype.save = function() {\n var page = this.page;\n if (hasHistory) {\n page._window.history.replaceState(this.state, this.title,\n page._hashbang && this.path !== '/' ? '#!' + this.path : this.canonicalPath);\n }\n };\n\n /**\n * Initialize `Route` with the given HTTP `path`,\n * and an array of `callbacks` and `options`.\n *\n * Options:\n *\n * - `sensitive` enable case-sensitive routes\n * - `strict` enable strict matching for trailing slashes\n *\n * @constructor\n * @param {string} path\n * @param {Object=} options\n * @api private\n */\n\n function Route(path, options, page) {\n var _page = this.page = page || globalPage;\n var opts = options || {};\n opts.strict = opts.strict || _page._strict;\n this.path = (path === '*') ? '(.*)' : path;\n this.method = 'GET';\n this.regexp = pathToRegexp_1(this.path, this.keys = [], opts);\n }\n\n /**\n * Return route middleware with\n * the given callback `fn()`.\n *\n * @param {Function} fn\n * @return {Function}\n * @api public\n */\n\n Route.prototype.middleware = function(fn) {\n var self = this;\n return function(ctx, next) {\n if (self.match(ctx.path, ctx.params)) {\n ctx.routePath = self.path;\n return fn(ctx, next);\n }\n next();\n };\n };\n\n /**\n * Check if this route matches `path`, if so\n * populate `params`.\n *\n * @param {string} path\n * @param {Object} params\n * @return {boolean}\n * @api private\n */\n\n Route.prototype.match = function(path, params) {\n var keys = this.keys,\n qsIndex = path.indexOf('?'),\n pathname = ~qsIndex ? path.slice(0, qsIndex) : path,\n m = this.regexp.exec(decodeURIComponent(pathname));\n\n if (!m) return false;\n\n delete params[0];\n\n for (var i = 1, len = m.length; i < len; ++i) {\n var key = keys[i - 1];\n var val = this.page._decodeURLEncodedURIComponent(m[i]);\n if (val !== undefined || !(hasOwnProperty.call(params, key.name))) {\n params[key.name] = val;\n }\n }\n\n return true;\n };\n\n\n /**\n * Module exports.\n */\n\n var globalPage = createPage();\n var page_js = globalPage;\n var default_1 = globalPage;\n\npage_js.default = default_1;\n\nreturn page_js;\n\n})));\n","var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nfunction pad(value, width) {\n var s = value + \"\", length = s.length;\n return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n return year < 0 ? \"-\" + pad(-year, 6)\n : year > 9999 ? \"+\" + pad(year, 6)\n : pad(year, 4);\n}\n\nfunction formatDate(date) {\n var hours = date.getUTCHours(),\n minutes = date.getUTCMinutes(),\n seconds = date.getUTCSeconds(),\n milliseconds = date.getUTCMilliseconds();\n return isNaN(date) ? \"Invalid Date\"\n : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n : \"\");\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns || [];\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function preformatBody(rows, columns) {\n return rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n });\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n }\n\n function formatBody(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return preformatBody(rows, columns).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(value) {\n return value == null ? \"\"\n : value instanceof Date ? formatDate(value)\n : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : value;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatBody: formatBody,\n formatRows: formatRows,\n formatRow: formatRow,\n formatValue: formatValue\n };\n}\n","function responseText(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n return response.text();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseText);\n}\n","import {csvParse, dsvFormat, tsvParse} from \"d3-dsv\";\nimport text from \"./text.js\";\n\nfunction dsvParse(parse) {\n return function(input, init, row) {\n if (arguments.length === 2 && typeof init === \"function\") row = init, init = undefined;\n return text(input, init).then(function(response) {\n return parse(response, row);\n });\n };\n}\n\nexport default function dsv(delimiter, input, init, row) {\n if (arguments.length === 3 && typeof init === \"function\") row = init, init = undefined;\n var format = dsvFormat(delimiter);\n return text(input, init).then(function(response) {\n return format.parse(response, row);\n });\n}\n\nexport var csv = dsvParse(csvParse);\nexport var tsv = dsvParse(tsvParse);\n","import dsv from \"./dsv.js\";\n\nvar csv = dsv(\",\");\n\nexport var csvParse = csv.parse;\nexport var csvParseRows = csv.parseRows;\nexport var csvFormat = csv.format;\nexport var csvFormatBody = csv.formatBody;\nexport var csvFormatRows = csv.formatRows;\nexport var csvFormatRow = csv.formatRow;\nexport var csvFormatValue = csv.formatValue;\n","function responseJson(response) {\n if (!response.ok) throw new Error(response.status + \" \" + response.statusText);\n if (response.status === 204 || response.status === 205) return;\n return response.json();\n}\n\nexport default function(input, init) {\n return fetch(input, init).then(responseJson);\n}\n","/** @returns {void} */\nexport function noop() {}\n\nexport const identity = (x) => x;\n\n/**\n * @template T\n * @template S\n * @param {T} tar\n * @param {S} src\n * @returns {T & S}\n */\nexport function assign(tar, src) {\n\t// @ts-ignore\n\tfor (const k in src) tar[k] = src[k];\n\treturn /** @type {T & S} */ (tar);\n}\n\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\n/**\n * @param {any} value\n * @returns {value is PromiseLike}\n */\nexport function is_promise(value) {\n\treturn (\n\t\t!!value &&\n\t\t(typeof value === 'object' || typeof value === 'function') &&\n\t\ttypeof (/** @type {any} */ (value).then) === 'function'\n\t);\n}\n\n/** @returns {void} */\nexport function add_location(element, file, line, column, char) {\n\telement.__svelte_meta = {\n\t\tloc: { file, line, column, char }\n\t};\n}\n\nexport function run(fn) {\n\treturn fn();\n}\n\nexport function blank_object() {\n\treturn Object.create(null);\n}\n\n/**\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function run_all(fns) {\n\tfns.forEach(run);\n}\n\n/**\n * @param {any} thing\n * @returns {thing is Function}\n */\nexport function is_function(thing) {\n\treturn typeof thing === 'function';\n}\n\n/** @returns {boolean} */\nexport function safe_not_equal(a, b) {\n\treturn a != a ? b == b : a !== b || (a && typeof a === 'object') || typeof a === 'function';\n}\n\nlet src_url_equal_anchor;\n\n/**\n * @param {string} element_src\n * @param {string} url\n * @returns {boolean}\n */\nexport function src_url_equal(element_src, url) {\n\tif (element_src === url) return true;\n\tif (!src_url_equal_anchor) {\n\t\tsrc_url_equal_anchor = document.createElement('a');\n\t}\n\t// This is actually faster than doing URL(..).href\n\tsrc_url_equal_anchor.href = url;\n\treturn element_src === src_url_equal_anchor.href;\n}\n\n/** @param {string} srcset */\nfunction split_srcset(srcset) {\n\treturn srcset.split(',').map((src) => src.trim().split(' ').filter(Boolean));\n}\n\n/**\n * @param {HTMLSourceElement | HTMLImageElement} element_srcset\n * @param {string | undefined | null} srcset\n * @returns {boolean}\n */\nexport function srcset_url_equal(element_srcset, srcset) {\n\tconst element_urls = split_srcset(element_srcset.srcset);\n\tconst urls = split_srcset(srcset || '');\n\n\treturn (\n\t\turls.length === element_urls.length &&\n\t\turls.every(\n\t\t\t([url, width], i) =>\n\t\t\t\twidth === element_urls[i][1] &&\n\t\t\t\t// We need to test both ways because Vite will create an a full URL with\n\t\t\t\t// `new URL(asset, import.meta.url).href` for the client when `base: './'`, and the\n\t\t\t\t// relative URLs inside srcset are not automatically resolved to absolute URLs by\n\t\t\t\t// browsers (in contrast to img.src). This means both SSR and DOM code could\n\t\t\t\t// contain relative or absolute URLs.\n\t\t\t\t(src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0]))\n\t\t)\n\t);\n}\n\n/** @returns {boolean} */\nexport function not_equal(a, b) {\n\treturn a != a ? b == b : a !== b;\n}\n\n/** @returns {boolean} */\nexport function is_empty(obj) {\n\treturn Object.keys(obj).length === 0;\n}\n\n/** @returns {void} */\nexport function validate_store(store, name) {\n\tif (store != null && typeof store.subscribe !== 'function') {\n\t\tthrow new Error(`'${name}' is not a store with a 'subscribe' method`);\n\t}\n}\n\nexport function subscribe(store, ...callbacks) {\n\tif (store == null) {\n\t\tfor (const callback of callbacks) {\n\t\t\tcallback(undefined);\n\t\t}\n\t\treturn noop;\n\t}\n\tconst unsub = store.subscribe(...callbacks);\n\treturn unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\n\n/**\n * Get the current value from a store by subscribing and immediately unsubscribing.\n *\n * https://svelte.dev/docs/svelte-store#get\n * @template T\n * @param {import('../store/public.js').Readable} store\n * @returns {T}\n */\nexport function get_store_value(store) {\n\tlet value;\n\tsubscribe(store, (_) => (value = _))();\n\treturn value;\n}\n\n/** @returns {void} */\nexport function component_subscribe(component, store, callback) {\n\tcomponent.$$.on_destroy.push(subscribe(store, callback));\n}\n\nexport function create_slot(definition, ctx, $$scope, fn) {\n\tif (definition) {\n\t\tconst slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n\t\treturn definition[0](slot_ctx);\n\t}\n}\n\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n\treturn definition[1] && fn ? assign($$scope.ctx.slice(), definition[1](fn(ctx))) : $$scope.ctx;\n}\n\nexport function get_slot_changes(definition, $$scope, dirty, fn) {\n\tif (definition[2] && fn) {\n\t\tconst lets = definition[2](fn(dirty));\n\t\tif ($$scope.dirty === undefined) {\n\t\t\treturn lets;\n\t\t}\n\t\tif (typeof lets === 'object') {\n\t\t\tconst merged = [];\n\t\t\tconst len = Math.max($$scope.dirty.length, lets.length);\n\t\t\tfor (let i = 0; i < len; i += 1) {\n\t\t\t\tmerged[i] = $$scope.dirty[i] | lets[i];\n\t\t\t}\n\t\t\treturn merged;\n\t\t}\n\t\treturn $$scope.dirty | lets;\n\t}\n\treturn $$scope.dirty;\n}\n\n/** @returns {void} */\nexport function update_slot_base(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tslot_changes,\n\tget_slot_context_fn\n) {\n\tif (slot_changes) {\n\t\tconst slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n\t\tslot.p(slot_context, slot_changes);\n\t}\n}\n\n/** @returns {void} */\nexport function update_slot(\n\tslot,\n\tslot_definition,\n\tctx,\n\t$$scope,\n\tdirty,\n\tget_slot_changes_fn,\n\tget_slot_context_fn\n) {\n\tconst slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n\tupdate_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\n\n/** @returns {any[] | -1} */\nexport function get_all_dirty_from_scope($$scope) {\n\tif ($$scope.ctx.length > 32) {\n\t\tconst dirty = [];\n\t\tconst length = $$scope.ctx.length / 32;\n\t\tfor (let i = 0; i < length; i++) {\n\t\t\tdirty[i] = -1;\n\t\t}\n\t\treturn dirty;\n\t}\n\treturn -1;\n}\n\n/** @returns {{}} */\nexport function exclude_internal_props(props) {\n\tconst result = {};\n\tfor (const k in props) if (k[0] !== '$') result[k] = props[k];\n\treturn result;\n}\n\n/** @returns {{}} */\nexport function compute_rest_props(props, keys) {\n\tconst rest = {};\n\tkeys = new Set(keys);\n\tfor (const k in props) if (!keys.has(k) && k[0] !== '$') rest[k] = props[k];\n\treturn rest;\n}\n\n/** @returns {{}} */\nexport function compute_slots(slots) {\n\tconst result = {};\n\tfor (const key in slots) {\n\t\tresult[key] = true;\n\t}\n\treturn result;\n}\n\n/** @returns {(this: any, ...args: any[]) => void} */\nexport function once(fn) {\n\tlet ran = false;\n\treturn function (...args) {\n\t\tif (ran) return;\n\t\tran = true;\n\t\tfn.call(this, ...args);\n\t};\n}\n\nexport function null_to_empty(value) {\n\treturn value == null ? '' : value;\n}\n\nexport function set_store_value(store, ret, value) {\n\tstore.set(value);\n\treturn ret;\n}\n\nexport const has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nexport function action_destroyer(action_result) {\n\treturn action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\n\n/** @param {number | string} value\n * @returns {[number, string]}\n */\nexport function split_css_unit(value) {\n\tconst split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n\treturn split ? [parseFloat(split[1]), split[2] || 'px'] : [/** @type {number} */ (value), 'px'];\n}\n\nexport const contenteditable_truthy_values = ['', true, 1, 'true', 'contenteditable'];\n","import { noop } from './utils.js';\n\nexport const is_client = typeof window !== 'undefined';\n\n/** @type {() => number} */\nexport let now = is_client ? () => window.performance.now() : () => Date.now();\n\nexport let raf = is_client ? (cb) => requestAnimationFrame(cb) : noop;\n\n// used internally for testing\n/** @returns {void} */\nexport function set_now(fn) {\n\tnow = fn;\n}\n\n/** @returns {void} */\nexport function set_raf(fn) {\n\traf = fn;\n}\n","import { raf } from './environment.js';\n\nconst tasks = new Set();\n\n/**\n * @param {number} now\n * @returns {void}\n */\nfunction run_tasks(now) {\n\ttasks.forEach((task) => {\n\t\tif (!task.c(now)) {\n\t\t\ttasks.delete(task);\n\t\t\ttask.f();\n\t\t}\n\t});\n\tif (tasks.size !== 0) raf(run_tasks);\n}\n\n/**\n * For testing purposes only!\n * @returns {void}\n */\nexport function clear_loops() {\n\ttasks.clear();\n}\n\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n * @param {import('./private.js').TaskCallback} callback\n * @returns {import('./private.js').Task}\n */\nexport function loop(callback) {\n\t/** @type {import('./private.js').TaskEntry} */\n\tlet task;\n\tif (tasks.size === 0) raf(run_tasks);\n\treturn {\n\t\tpromise: new Promise((fulfill) => {\n\t\t\ttasks.add((task = { c: callback, f: fulfill }));\n\t\t}),\n\t\tabort() {\n\t\t\ttasks.delete(task);\n\t\t}\n\t};\n}\n","/** @type {typeof globalThis} */\nexport const globals =\n\ttypeof window !== 'undefined'\n\t\t? window\n\t\t: typeof globalThis !== 'undefined'\n\t\t? globalThis\n\t\t: // @ts-ignore Node typings have this\n\t\t global;\n","import { contenteditable_truthy_values, has_prop } from './utils.js';\n\nimport { ResizeObserverSingleton } from './ResizeObserverSingleton.js';\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\n\n/**\n * @returns {void}\n */\nexport function start_hydrating() {\n\tis_hydrating = true;\n}\n\n/**\n * @returns {void}\n */\nexport function end_hydrating() {\n\tis_hydrating = false;\n}\n\n/**\n * @param {number} low\n * @param {number} high\n * @param {(index: number) => number} key\n * @param {number} value\n * @returns {number}\n */\nfunction upper_bound(low, high, key, value) {\n\t// Return first index of value larger than input value in the range [low, high)\n\twhile (low < high) {\n\t\tconst mid = low + ((high - low) >> 1);\n\t\tif (key(mid) <= value) {\n\t\t\tlow = mid + 1;\n\t\t} else {\n\t\t\thigh = mid;\n\t\t}\n\t}\n\treturn low;\n}\n\n/**\n * @param {NodeEx} target\n * @returns {void}\n */\nfunction init_hydrate(target) {\n\tif (target.hydrate_init) return;\n\ttarget.hydrate_init = true;\n\t// We know that all children have claim_order values since the unclaimed have been detached if target is not \n\n\tlet children = /** @type {ArrayLike} */ (target.childNodes);\n\t// If target is , there may be children without claim_order\n\tif (target.nodeName === 'HEAD') {\n\t\tconst my_children = [];\n\t\tfor (let i = 0; i < children.length; i++) {\n\t\t\tconst node = children[i];\n\t\t\tif (node.claim_order !== undefined) {\n\t\t\t\tmy_children.push(node);\n\t\t\t}\n\t\t}\n\t\tchildren = my_children;\n\t}\n\t/*\n\t * Reorder claimed children optimally.\n\t * We can reorder claimed children optimally by finding the longest subsequence of\n\t * nodes that are already claimed in order and only moving the rest. The longest\n\t * subsequence of nodes that are claimed in order can be found by\n\t * computing the longest increasing subsequence of .claim_order values.\n\t *\n\t * This algorithm is optimal in generating the least amount of reorder operations\n\t * possible.\n\t *\n\t * Proof:\n\t * We know that, given a set of reordering operations, the nodes that do not move\n\t * always form an increasing subsequence, since they do not move among each other\n\t * meaning that they must be already ordered among each other. Thus, the maximal\n\t * set of nodes that do not move form a longest increasing subsequence.\n\t */\n\t// Compute longest increasing subsequence\n\t// m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n\tconst m = new Int32Array(children.length + 1);\n\t// Predecessor indices + 1\n\tconst p = new Int32Array(children.length);\n\tm[0] = -1;\n\tlet longest = 0;\n\tfor (let i = 0; i < children.length; i++) {\n\t\tconst current = children[i].claim_order;\n\t\t// Find the largest subsequence length such that it ends in a value less than our current value\n\t\t// upper_bound returns first greater value, so we subtract one\n\t\t// with fast path for when we are on the current longest subsequence\n\t\tconst seq_len =\n\t\t\t(longest > 0 && children[m[longest]].claim_order <= current\n\t\t\t\t? longest + 1\n\t\t\t\t: upper_bound(1, longest, (idx) => children[m[idx]].claim_order, current)) - 1;\n\t\tp[i] = m[seq_len] + 1;\n\t\tconst new_len = seq_len + 1;\n\t\t// We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n\t\tm[new_len] = i;\n\t\tlongest = Math.max(new_len, longest);\n\t}\n\t// The longest increasing subsequence of nodes (initially reversed)\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst lis = [];\n\t// The rest of the nodes, nodes that will be moved\n\n\t/**\n\t * @type {NodeEx2[]}\n\t */\n\tconst to_move = [];\n\tlet last = children.length - 1;\n\tfor (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n\t\tlis.push(children[cur - 1]);\n\t\tfor (; last >= cur; last--) {\n\t\t\tto_move.push(children[last]);\n\t\t}\n\t\tlast--;\n\t}\n\tfor (; last >= 0; last--) {\n\t\tto_move.push(children[last]);\n\t}\n\tlis.reverse();\n\t// We sort the nodes being moved to guarantee that their insertion order matches the claim order\n\tto_move.sort((a, b) => a.claim_order - b.claim_order);\n\t// Finally, we move the nodes\n\tfor (let i = 0, j = 0; i < to_move.length; i++) {\n\t\twhile (j < lis.length && to_move[i].claim_order >= lis[j].claim_order) {\n\t\t\tj++;\n\t\t}\n\t\tconst anchor = j < lis.length ? lis[j] : null;\n\t\ttarget.insertBefore(to_move[i], anchor);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @returns {void}\n */\nexport function append(target, node) {\n\ttarget.appendChild(node);\n}\n\n/**\n * @param {Node} target\n * @param {string} style_sheet_id\n * @param {string} styles\n * @returns {void}\n */\nexport function append_styles(target, style_sheet_id, styles) {\n\tconst append_styles_to = get_root_for_style(target);\n\tif (!append_styles_to.getElementById(style_sheet_id)) {\n\t\tconst style = element('style');\n\t\tstyle.id = style_sheet_id;\n\t\tstyle.textContent = styles;\n\t\tappend_stylesheet(append_styles_to, style);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {ShadowRoot | Document}\n */\nexport function get_root_for_style(node) {\n\tif (!node) return document;\n\tconst root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n\tif (root && /** @type {ShadowRoot} */ (root).host) {\n\t\treturn /** @type {ShadowRoot} */ (root);\n\t}\n\treturn node.ownerDocument;\n}\n\n/**\n * @param {Node} node\n * @returns {CSSStyleSheet}\n */\nexport function append_empty_stylesheet(node) {\n\tconst style_element = element('style');\n\t// For transitions to work without 'style-src: unsafe-inline' Content Security Policy,\n\t// these empty tags need to be allowed with a hash as a workaround until we move to the Web Animations API.\n\t// Using the hash for the empty string (for an empty tag) works in all browsers except Safari.\n\t// So as a workaround for the workaround, when we append empty style tags we set their content to /* empty */.\n\t// The hash 'sha256-9OlNO0DNEeaVzHL4RZwCLsBHA8WBQ8toBp/4F5XV2nc=' will then work even in Safari.\n\tstyle_element.textContent = '/* empty */';\n\tappend_stylesheet(get_root_for_style(node), style_element);\n\treturn style_element.sheet;\n}\n\n/**\n * @param {ShadowRoot | Document} node\n * @param {HTMLStyleElement} style\n * @returns {CSSStyleSheet}\n */\nfunction append_stylesheet(node, style) {\n\tappend(/** @type {Document} */ (node).head || node, style);\n\treturn style.sheet;\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @returns {void}\n */\nexport function append_hydration(target, node) {\n\tif (is_hydrating) {\n\t\tinit_hydrate(target);\n\t\tif (\n\t\t\ttarget.actual_end_child === undefined ||\n\t\t\t(target.actual_end_child !== null && target.actual_end_child.parentNode !== target)\n\t\t) {\n\t\t\ttarget.actual_end_child = target.firstChild;\n\t\t}\n\t\t// Skip nodes of undefined ordering\n\t\twhile (target.actual_end_child !== null && target.actual_end_child.claim_order === undefined) {\n\t\t\ttarget.actual_end_child = target.actual_end_child.nextSibling;\n\t\t}\n\t\tif (node !== target.actual_end_child) {\n\t\t\t// We only insert if the ordering of this node should be modified or the parent node is not target\n\t\t\tif (node.claim_order !== undefined || node.parentNode !== target) {\n\t\t\t\ttarget.insertBefore(node, target.actual_end_child);\n\t\t\t}\n\t\t} else {\n\t\t\ttarget.actual_end_child = node.nextSibling;\n\t\t}\n\t} else if (node.parentNode !== target || node.nextSibling !== null) {\n\t\ttarget.appendChild(node);\n\t}\n}\n\n/**\n * @param {Node} target\n * @param {Node} node\n * @param {Node} [anchor]\n * @returns {void}\n */\nexport function insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\n/**\n * @param {NodeEx} target\n * @param {NodeEx} node\n * @param {NodeEx} [anchor]\n * @returns {void}\n */\nexport function insert_hydration(target, node, anchor) {\n\tif (is_hydrating && !anchor) {\n\t\tappend_hydration(target, node);\n\t} else if (node.parentNode !== target || node.nextSibling != anchor) {\n\t\ttarget.insertBefore(node, anchor || null);\n\t}\n}\n\n/**\n * @param {Node} node\n * @returns {void}\n */\nexport function detach(node) {\n\tif (node.parentNode) {\n\t\tnode.parentNode.removeChild(node);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function destroy_each(iterations, detaching) {\n\tfor (let i = 0; i < iterations.length; i += 1) {\n\t\tif (iterations[i]) iterations[i].d(detaching);\n\t}\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element(name) {\n\treturn document.createElement(name);\n}\n\n/**\n * @template {keyof HTMLElementTagNameMap} K\n * @param {K} name\n * @param {string} is\n * @returns {HTMLElementTagNameMap[K]}\n */\nexport function element_is(name, is) {\n\treturn document.createElement(name, { is });\n}\n\n/**\n * @template T\n * @template {keyof T} K\n * @param {T} obj\n * @param {K[]} exclude\n * @returns {Pick>}\n */\nexport function object_without_properties(obj, exclude) {\n\tconst target = /** @type {Pick>} */ ({});\n\tfor (const k in obj) {\n\t\tif (\n\t\t\thas_prop(obj, k) &&\n\t\t\t// @ts-ignore\n\t\t\texclude.indexOf(k) === -1\n\t\t) {\n\t\t\t// @ts-ignore\n\t\t\ttarget[k] = obj[k];\n\t\t}\n\t}\n\treturn target;\n}\n\n/**\n * @template {keyof SVGElementTagNameMap} K\n * @param {K} name\n * @returns {SVGElement}\n */\nexport function svg_element(name) {\n\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n}\n\n/**\n * @param {string} data\n * @returns {Text}\n */\nexport function text(data) {\n\treturn document.createTextNode(data);\n}\n\n/**\n * @returns {Text} */\nexport function space() {\n\treturn text(' ');\n}\n\n/**\n * @returns {Text} */\nexport function empty() {\n\treturn text('');\n}\n\n/**\n * @param {string} content\n * @returns {Comment}\n */\nexport function comment(content) {\n\treturn document.createComment(content);\n}\n\n/**\n * @param {EventTarget} node\n * @param {string} event\n * @param {EventListenerOrEventListenerObject} handler\n * @param {boolean | AddEventListenerOptions | EventListenerOptions} [options]\n * @returns {() => void}\n */\nexport function listen(node, event, handler, options) {\n\tnode.addEventListener(event, handler, options);\n\treturn () => node.removeEventListener(event, handler, options);\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function prevent_default(fn) {\n\treturn function (event) {\n\t\tevent.preventDefault();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopPropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => any} */\nexport function stop_immediate_propagation(fn) {\n\treturn function (event) {\n\t\tevent.stopImmediatePropagation();\n\t\t// @ts-ignore\n\t\treturn fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function self(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.target === this) fn.call(this, event);\n\t};\n}\n\n/**\n * @returns {(event: any) => void} */\nexport function trusted(fn) {\n\treturn function (event) {\n\t\t// @ts-ignore\n\t\tif (event.isTrusted) fn.call(this, event);\n\t};\n}\n\n/**\n * @param {Element} node\n * @param {string} attribute\n * @param {string} [value]\n * @returns {void}\n */\nexport function attr(node, attribute, value) {\n\tif (value == null) node.removeAttribute(attribute);\n\telse if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value);\n}\n/**\n * List of attributes that should always be set through the attr method,\n * because updating them through the property setter doesn't work reliably.\n * In the example of `width`/`height`, the problem is that the setter only\n * accepts numeric values, but the attribute can also be set to a string like `50%`.\n * If this list becomes too big, rethink this approach.\n */\nconst always_set_through_set_attribute = ['width', 'height'];\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_attributes(node, attributes) {\n\t// @ts-ignore\n\tconst descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n\tfor (const key in attributes) {\n\t\tif (attributes[key] == null) {\n\t\t\tnode.removeAttribute(key);\n\t\t} else if (key === 'style') {\n\t\t\tnode.style.cssText = attributes[key];\n\t\t} else if (key === '__value') {\n\t\t\t/** @type {any} */ (node).value = node[key] = attributes[key];\n\t\t} else if (\n\t\t\tdescriptors[key] &&\n\t\t\tdescriptors[key].set &&\n\t\t\talways_set_through_set_attribute.indexOf(key) === -1\n\t\t) {\n\t\t\tnode[key] = attributes[key];\n\t\t} else {\n\t\t\tattr(node, key, attributes[key]);\n\t\t}\n\t}\n}\n\n/**\n * @param {Element & ElementCSSInlineStyle} node\n * @param {{ [x: string]: string }} attributes\n * @returns {void}\n */\nexport function set_svg_attributes(node, attributes) {\n\tfor (const key in attributes) {\n\t\tattr(node, key, attributes[key]);\n\t}\n}\n\n/**\n * @param {Record} data_map\n * @returns {void}\n */\nexport function set_custom_element_data_map(node, data_map) {\n\tObject.keys(data_map).forEach((key) => {\n\t\tset_custom_element_data(node, key, data_map[key]);\n\t});\n}\n\n/**\n * @returns {void} */\nexport function set_custom_element_data(node, prop, value) {\n\tconst lower = prop.toLowerCase(); // for backwards compatibility with existing behavior we do lowercase first\n\tif (lower in node) {\n\t\tnode[lower] = typeof node[lower] === 'boolean' && value === '' ? true : value;\n\t} else if (prop in node) {\n\t\tnode[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n\t} else {\n\t\tattr(node, prop, value);\n\t}\n}\n\n/**\n * @param {string} tag\n */\nexport function set_dynamic_element_data(tag) {\n\treturn /-/.test(tag) ? set_custom_element_data_map : set_attributes;\n}\n\n/**\n * @returns {void}\n */\nexport function xlink_attr(node, attribute, value) {\n\tnode.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\n\n/**\n * @param {HTMLElement} node\n * @returns {string}\n */\nexport function get_svelte_dataset(node) {\n\treturn node.dataset.svelteH;\n}\n\n/**\n * @returns {unknown[]} */\nexport function get_binding_group_value(group, __value, checked) {\n\tconst value = new Set();\n\tfor (let i = 0; i < group.length; i += 1) {\n\t\tif (group[i].checked) value.add(group[i].__value);\n\t}\n\tif (!checked) {\n\t\tvalue.delete(__value);\n\t}\n\treturn Array.from(value);\n}\n\n/**\n * @param {HTMLInputElement[]} group\n * @returns {{ p(...inputs: HTMLInputElement[]): void; r(): void; }}\n */\nexport function init_binding_group(group) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\treturn {\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\t_inputs.forEach((input) => group.push(input));\n\t\t},\n\t\t/* remove */ r() {\n\t\t\t_inputs.forEach((input) => group.splice(group.indexOf(input), 1));\n\t\t}\n\t};\n}\n\n/**\n * @param {number[]} indexes\n * @returns {{ u(new_indexes: number[]): void; p(...inputs: HTMLInputElement[]): void; r: () => void; }}\n */\nexport function init_binding_group_dynamic(group, indexes) {\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _group = get_binding_group(group);\n\n\t/**\n\t * @type {HTMLInputElement[]} */\n\tlet _inputs;\n\n\tfunction get_binding_group(group) {\n\t\tfor (let i = 0; i < indexes.length; i++) {\n\t\t\tgroup = group[indexes[i]] = group[indexes[i]] || [];\n\t\t}\n\t\treturn group;\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction push() {\n\t\t_inputs.forEach((input) => _group.push(input));\n\t}\n\n\t/**\n\t * @returns {void} */\n\tfunction remove() {\n\t\t_inputs.forEach((input) => _group.splice(_group.indexOf(input), 1));\n\t}\n\treturn {\n\t\t/* update */ u(new_indexes) {\n\t\t\tindexes = new_indexes;\n\t\t\tconst new_group = get_binding_group(group);\n\t\t\tif (new_group !== _group) {\n\t\t\t\tremove();\n\t\t\t\t_group = new_group;\n\t\t\t\tpush();\n\t\t\t}\n\t\t},\n\t\t/* push */ p(...inputs) {\n\t\t\t_inputs = inputs;\n\t\t\tpush();\n\t\t},\n\t\t/* remove */ r: remove\n\t};\n}\n\n/** @returns {number} */\nexport function to_number(value) {\n\treturn value === '' ? null : +value;\n}\n\n/** @returns {any[]} */\nexport function time_ranges_to_array(ranges) {\n\tconst array = [];\n\tfor (let i = 0; i < ranges.length; i += 1) {\n\t\tarray.push({ start: ranges.start(i), end: ranges.end(i) });\n\t}\n\treturn array;\n}\n\n/**\n * @param {Element} element\n * @returns {ChildNode[]}\n */\nexport function children(element) {\n\treturn Array.from(element.childNodes);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {void}\n */\nfunction init_claim_info(nodes) {\n\tif (nodes.claim_info === undefined) {\n\t\tnodes.claim_info = { last_index: 0, total_claimed: 0 };\n\t}\n}\n\n/**\n * @template {ChildNodeEx} R\n * @param {ChildNodeArray} nodes\n * @param {(node: ChildNodeEx) => node is R} predicate\n * @param {(node: ChildNodeEx) => ChildNodeEx | undefined} process_node\n * @param {() => R} create_node\n * @param {boolean} dont_update_last_index\n * @returns {R}\n */\nfunction claim_node(nodes, predicate, process_node, create_node, dont_update_last_index = false) {\n\t// Try to find nodes in an order such that we lengthen the longest increasing subsequence\n\tinit_claim_info(nodes);\n\tconst result_node = (() => {\n\t\t// We first try to find an element after the previous one\n\t\tfor (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// Otherwise, we try to find one before\n\t\t// We iterate in reverse so that we don't go too far back\n\t\tfor (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n\t\t\tconst node = nodes[i];\n\t\t\tif (predicate(node)) {\n\t\t\t\tconst replacement = process_node(node);\n\t\t\t\tif (replacement === undefined) {\n\t\t\t\t\tnodes.splice(i, 1);\n\t\t\t\t} else {\n\t\t\t\t\tnodes[i] = replacement;\n\t\t\t\t}\n\t\t\t\tif (!dont_update_last_index) {\n\t\t\t\t\tnodes.claim_info.last_index = i;\n\t\t\t\t} else if (replacement === undefined) {\n\t\t\t\t\t// Since we spliced before the last_index, we decrease it\n\t\t\t\t\tnodes.claim_info.last_index--;\n\t\t\t\t}\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\t// If we can't find any matching node, we create a new one\n\t\treturn create_node();\n\t})();\n\tresult_node.claim_order = nodes.claim_info.total_claimed;\n\tnodes.claim_info.total_claimed += 1;\n\treturn result_node;\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @param {(name: string) => Element | SVGElement} create_element\n * @returns {Element | SVGElement}\n */\nfunction claim_element_base(nodes, name, attributes, create_element) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Element | SVGElement} */\n\t\t(node) => node.nodeName === name,\n\t\t/** @param {Element} node */\n\t\t(node) => {\n\t\t\tconst remove = [];\n\t\t\tfor (let j = 0; j < node.attributes.length; j++) {\n\t\t\t\tconst attribute = node.attributes[j];\n\t\t\t\tif (!attributes[attribute.name]) {\n\t\t\t\t\tremove.push(attribute.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tremove.forEach((v) => node.removeAttribute(v));\n\t\t\treturn undefined;\n\t\t},\n\t\t() => create_element(name)\n\t);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @param {string} name\n * @param {{ [key: string]: boolean }} attributes\n * @returns {Element | SVGElement}\n */\nexport function claim_svg_element(nodes, name, attributes) {\n\treturn claim_element_base(nodes, name, attributes, svg_element);\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Text}\n */\nexport function claim_text(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Text} */\n\t\t(node) => node.nodeType === 3,\n\t\t/** @param {Text} node */\n\t\t(node) => {\n\t\t\tconst data_str = '' + data;\n\t\t\tif (node.data.startsWith(data_str)) {\n\t\t\t\tif (node.data.length !== data_str.length) {\n\t\t\t\t\treturn node.splitText(data_str.length);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.data = data_str;\n\t\t\t}\n\t\t},\n\t\t() => text(data),\n\t\ttrue // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n\t);\n}\n\n/**\n * @returns {Text} */\nexport function claim_space(nodes) {\n\treturn claim_text(nodes, ' ');\n}\n\n/**\n * @param {ChildNodeArray} nodes\n * @returns {Comment}\n */\nexport function claim_comment(nodes, data) {\n\treturn claim_node(\n\t\tnodes,\n\t\t/** @returns {node is Comment} */\n\t\t(node) => node.nodeType === 8,\n\t\t/** @param {Comment} node */\n\t\t(node) => {\n\t\t\tnode.data = '' + data;\n\t\t\treturn undefined;\n\t\t},\n\t\t() => comment(data),\n\t\ttrue\n\t);\n}\n\nfunction get_comment_idx(nodes, text, start) {\n\tfor (let i = start; i < nodes.length; i += 1) {\n\t\tconst node = nodes[i];\n\t\tif (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * @param {boolean} is_svg\n * @returns {HtmlTagHydration}\n */\nexport function claim_html_tag(nodes, is_svg) {\n\t// find html opening tag\n\tconst start_index = get_comment_idx(nodes, 'HTML_TAG_START', 0);\n\tconst end_index = get_comment_idx(nodes, 'HTML_TAG_END', start_index + 1);\n\tif (start_index === -1 || end_index === -1) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\n\tinit_claim_info(nodes);\n\tconst html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n\tdetach(html_tag_nodes[0]);\n\tdetach(html_tag_nodes[html_tag_nodes.length - 1]);\n\tconst claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n\tif (claimed_nodes.length === 0) {\n\t\treturn new HtmlTagHydration(is_svg);\n\t}\n\tfor (const n of claimed_nodes) {\n\t\tn.claim_order = nodes.claim_info.total_claimed;\n\t\tnodes.claim_info.total_claimed += 1;\n\t}\n\treturn new HtmlTagHydration(is_svg, claimed_nodes);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data(text, data) {\n\tdata = '' + data;\n\tif (text.data === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @returns {void}\n */\nexport function set_data_contenteditable(text, data) {\n\tdata = '' + data;\n\tif (text.wholeText === data) return;\n\ttext.data = /** @type {string} */ (data);\n}\n\n/**\n * @param {Text} text\n * @param {unknown} data\n * @param {string} attr_value\n * @returns {void}\n */\nexport function set_data_maybe_contenteditable(text, data, attr_value) {\n\tif (~contenteditable_truthy_values.indexOf(attr_value)) {\n\t\tset_data_contenteditable(text, data);\n\t} else {\n\t\tset_data(text, data);\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_input_value(input, value) {\n\tinput.value = value == null ? '' : value;\n}\n\n/**\n * @returns {void} */\nexport function set_input_type(input, type) {\n\ttry {\n\t\tinput.type = type;\n\t} catch (e) {\n\t\t// do nothing\n\t}\n}\n\n/**\n * @returns {void} */\nexport function set_style(node, key, value, important) {\n\tif (value == null) {\n\t\tnode.style.removeProperty(key);\n\t} else {\n\t\tnode.style.setProperty(key, value, important ? 'important' : '');\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_option(select, value, mounting) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\tif (option.__value === value) {\n\t\t\toption.selected = true;\n\t\t\treturn;\n\t\t}\n\t}\n\tif (!mounting || value !== undefined) {\n\t\tselect.selectedIndex = -1; // no option should be selected\n\t}\n}\n\n/**\n * @returns {void} */\nexport function select_options(select, value) {\n\tfor (let i = 0; i < select.options.length; i += 1) {\n\t\tconst option = select.options[i];\n\t\toption.selected = ~value.indexOf(option.__value);\n\t}\n}\n\nexport function select_value(select) {\n\tconst selected_option = select.querySelector(':checked');\n\treturn selected_option && selected_option.__value;\n}\n\nexport function select_multiple_value(select) {\n\treturn [].map.call(select.querySelectorAll(':checked'), (option) => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\n\n/**\n * @type {boolean} */\nlet crossorigin;\n\n/**\n * @returns {boolean} */\nexport function is_crossorigin() {\n\tif (crossorigin === undefined) {\n\t\tcrossorigin = false;\n\t\ttry {\n\t\t\tif (typeof window !== 'undefined' && window.parent) {\n\t\t\t\tvoid window.parent.document;\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tcrossorigin = true;\n\t\t}\n\t}\n\treturn crossorigin;\n}\n\n/**\n * @param {HTMLElement} node\n * @param {() => void} fn\n * @returns {() => void}\n */\nexport function add_iframe_resize_listener(node, fn) {\n\tconst computed_style = getComputedStyle(node);\n\tif (computed_style.position === 'static') {\n\t\tnode.style.position = 'relative';\n\t}\n\tconst iframe = element('iframe');\n\tiframe.setAttribute(\n\t\t'style',\n\t\t'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n\t\t\t'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;'\n\t);\n\tiframe.setAttribute('aria-hidden', 'true');\n\tiframe.tabIndex = -1;\n\tconst crossorigin = is_crossorigin();\n\n\t/**\n\t * @type {() => void}\n\t */\n\tlet unsubscribe;\n\tif (crossorigin) {\n\t\tiframe.src = \"data:text/html,\";\n\t\tunsubscribe = listen(\n\t\t\twindow,\n\t\t\t'message',\n\t\t\t/** @param {MessageEvent} event */ (event) => {\n\t\t\t\tif (event.source === iframe.contentWindow) fn();\n\t\t\t}\n\t\t);\n\t} else {\n\t\tiframe.src = 'about:blank';\n\t\tiframe.onload = () => {\n\t\t\tunsubscribe = listen(iframe.contentWindow, 'resize', fn);\n\t\t\t// make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)\n\t\t\t// see https://github.com/sveltejs/svelte/issues/4233\n\t\t\tfn();\n\t\t};\n\t}\n\tappend(node, iframe);\n\treturn () => {\n\t\tif (crossorigin) {\n\t\t\tunsubscribe();\n\t\t} else if (unsubscribe && iframe.contentWindow) {\n\t\t\tunsubscribe();\n\t\t}\n\t\tdetach(iframe);\n\t};\n}\nexport const resize_observer_content_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'content-box'\n});\nexport const resize_observer_border_box = /* @__PURE__ */ new ResizeObserverSingleton({\n\tbox: 'border-box'\n});\nexport const resize_observer_device_pixel_content_box = /* @__PURE__ */ new ResizeObserverSingleton(\n\t{ box: 'device-pixel-content-box' }\n);\nexport { ResizeObserverSingleton };\n\n/**\n * @returns {void} */\nexport function toggle_class(element, name, toggle) {\n\t// The `!!` is required because an `undefined` flag means flipping the current state.\n\telement.classList.toggle(name, !!toggle);\n}\n\n/**\n * @template T\n * @param {string} type\n * @param {T} [detail]\n * @param {{ bubbles?: boolean, cancelable?: boolean }} [options]\n * @returns {CustomEvent}\n */\nexport function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n\treturn new CustomEvent(type, { detail, bubbles, cancelable });\n}\n\n/**\n * @param {string} selector\n * @param {HTMLElement} parent\n * @returns {ChildNodeArray}\n */\nexport function query_selector_all(selector, parent = document.body) {\n\treturn Array.from(parent.querySelectorAll(selector));\n}\n\n/**\n * @param {string} nodeId\n * @param {HTMLElement} head\n * @returns {any[]}\n */\nexport function head_selector(nodeId, head) {\n\tconst result = [];\n\tlet started = 0;\n\tfor (const node of head.childNodes) {\n\t\tif (node.nodeType === 8 /* comment node */) {\n\t\t\tconst comment = node.textContent.trim();\n\t\t\tif (comment === `HEAD_${nodeId}_END`) {\n\t\t\t\tstarted -= 1;\n\t\t\t\tresult.push(node);\n\t\t\t} else if (comment === `HEAD_${nodeId}_START`) {\n\t\t\t\tstarted += 1;\n\t\t\t\tresult.push(node);\n\t\t\t}\n\t\t} else if (started > 0) {\n\t\t\tresult.push(node);\n\t\t}\n\t}\n\treturn result;\n}\n/** */\nexport class HtmlTag {\n\t/**\n\t * @private\n\t * @default false\n\t */\n\tis_svg = false;\n\t/** parent for creating node */\n\te = undefined;\n\t/** html tag nodes */\n\tn = undefined;\n\t/** target */\n\tt = undefined;\n\t/** anchor */\n\ta = undefined;\n\tconstructor(is_svg = false) {\n\t\tthis.is_svg = is_svg;\n\t\tthis.e = this.n = null;\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @returns {void}\n\t */\n\tc(html) {\n\t\tthis.h(html);\n\t}\n\n\t/**\n\t * @param {string} html\n\t * @param {HTMLElement | SVGElement} target\n\t * @param {HTMLElement | SVGElement} anchor\n\t * @returns {void}\n\t */\n\tm(html, target, anchor = null) {\n\t\tif (!this.e) {\n\t\t\tif (this.is_svg)\n\t\t\t\tthis.e = svg_element(/** @type {keyof SVGElementTagNameMap} */ (target.nodeName));\n\t\t\t/** #7364 target for