From 685cd6ba4aedb383de8d87fd85bbedadfae1d70c Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 16 Feb 2024 14:23:44 +0000 Subject: [PATCH] build of repo at commit https://github.com/betagouv/pitchou/tree/0d06c46ebb81dd989d62d1f4bb89c87df095f90a --- build/bundle.css | 2 ++ build/bundle.js | 2 ++ build/bundle.js.map | 1 + 3 files changed, 5 insertions(+) create mode 100644 build/bundle.css create mode 100644 build/bundle.js create mode 100644 build/bundle.js.map diff --git a/build/bundle.css b/build/bundle.css new file mode 100644 index 00000000..c257ec26 --- /dev/null +++ b/build/bundle.css @@ -0,0 +1,2 @@ +.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} +main{text-align:center;padding:1em;max-width:240px;margin:0 auto}@media(min-width: 640px){main{max-width:none}} diff --git a/build/bundle.js b/build/bundle.js new file mode 100644 index 00000000..39206af9 --- /dev/null +++ b/build/bundle.js @@ -0,0 +1,2 @@ +function e(){}const t=e=>e;function n(e,t){for(const n in t)e[n]=t[n];return e}function o(e){return e()}function i(){return Object.create(null)}function l(e){e.forEach(o)}function r(e){return"function"==typeof e}function c(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function s(e,t,n,o){if(e){const i=u(e,t,n,o);return e[0](i)}}function u(e,t,o,i){return e[1]&&i?n(o.ctx.slice(),e[1](i(t))):o.ctx}function a(e,t,n,o){if(e[2]&&o){const i=e[2](o(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let o=0;o32){const t=[],n=e.ctx.length/32;for(let e=0;ewindow.performance.now():()=>Date.now(),g=m?e=>requestAnimationFrame(e):e;const y=new Set;function w(e){y.forEach((t=>{t.c(e)||(y.delete(t),t.f())})),0!==y.size&&g(w)}function b(e){let t;return 0===y.size&&g(w),{promise:new Promise((n=>{y.add(t={c:e,f:n})})),abort(){y.delete(t)}}}const $="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function v(e,t){e.appendChild(t)}function x(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function C(e){const t=I("style");return t.textContent="/* empty */",function(e,t){v(e.head||e,t),t.sheet}(x(e),t),t.sheet}function T(e,t,n){e.insertBefore(t,n||null)}function k(e){e.parentNode&&e.parentNode.removeChild(e)}function F(e,t){for(let n=0;ne.removeEventListener(t,n,o)}function E(e){return function(t){return t.preventDefault(),e.call(this,t)}}function L(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const O=["width","height"];function M(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const o in t)null==t[o]?e.removeAttribute(o):"style"===o?e.style.cssText=t[o]:"__value"===o?e.value=e[o]=t[o]:n[o]&&n[o].set&&-1===O.indexOf(o)?e[o]=t[o]:L(e,o,t[o])}function B(e,t){t=""+t,e.data!==t&&(e.data=t)}function R(e,t){e.value=null==t?"":t}function D(e,t,n){e.classList.toggle(t,!!n)}class K{is_svg=!1;e=void 0;n=void 0;t=void 0;a=void 0;constructor(e=!1){this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){var o;this.e||(this.is_svg?this.e=(o=t.nodeName,document.createElementNS("http://www.w3.org/2000/svg",o)):this.e=I(11===t.nodeType?"TEMPLATE":t.nodeName),this.t="TEMPLATE"!==t.tagName?t:t.content,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from("TEMPLATE"===this.e.nodeName?this.e.content.childNodes:this.e.childNodes)}i(e){for(let t=0;t>>0}(a)}_${c}`,f=x(e),{stylesheet:h,rules:m}=U.get(f)||function(e,t){const n={stylesheet:C(t),rules:{}};return U.set(e,n),n}(f,e);m[d]||(m[d]=!0,h.insertRule(`@keyframes ${d} ${a}`,h.cssRules.length));const p=e.style.animation||"";return e.style.animation=`${p?`${p}, `:""}${d} ${o}ms linear ${i}ms 1 both`,q+=1,d}function P(e,t){const n=(e.style.animation||"").split(", "),o=n.filter(t?e=>e.indexOf(t)<0:e=>-1===e.indexOf("__svelte")),i=n.length-o.length;i&&(e.style.animation=o.join(", "),q-=i,q||g((()=>{q||(U.forEach((e=>{const{ownerNode:t}=e.stylesheet;t&&k(t)})),U.clear())})))}function H(e,t){const n=e.getBoundingClientRect();if(t.left!==n.left||t.top!==n.top){const o=getComputedStyle(e),i="none"===o.transform?"":o.transform;e.style.transform=`${i} translate(${t.left-n.left}px, ${t.top-n.top}px)`}}function J(e){j=e}function z(e){(function(){if(!j)throw new Error("Function called outside component initialization");return j})().$$.after_update.push(e)}const Z=[],G=[];let Y=[];const Q=[],W=Promise.resolve();let X=!1;function ee(e){Y.push(e)}const te=new Set;let ne,oe=0;function ie(){if(0!==oe)return;const e=j;do{try{for(;oe{ce.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}else o&&o()}const he={duration:0};function me(n,o,i,c){let s,u=o(n,i,{direction:"both"}),a=c?0:1,d=null,f=null,h=null;function m(){h&&P(n,h)}function g(e,t){const n=e.b-a;return t*=Math.abs(n),{a:a,b:e.b,d:n,duration:t,start:e.start,end:e.start+t,group:e.group}}function y(o){const{delay:i=0,duration:r=300,easing:c=t,tick:y=e,css:w}=u||he,$={start:p()+i,b:o};o||($.group=se,se.r+=1),"inert"in n&&(o?void 0!==s&&(n.inert=s):(s=n.inert,n.inert=!0)),d||f?f=$:(w&&(m(),h=V(n,a,o,r,i,c,w)),o&&y(0,1),d=g($,r),ee((()=>re(n,o,"start"))),b((e=>{if(f&&e>f.start&&(d=g(f,r),f=null,re(n,d.b,"start"),w&&(m(),h=V(n,a,d.b,d.duration,0,c,u.css))),d)if(e>=d.end)y(a=d.b,1-a),re(n,d.b,"end"),f||(d.b?m():--d.group.r||l(d.group.c)),d=null;else if(e>=d.start){const t=e-d.start;a=d.a+d.d*c(t/d.duration),y(a,1-a)}return!(!d&&!f)})))}return{run(e){r(u)?(ne||(ne=Promise.resolve(),ne.then((()=>{ne=null}))),ne).then((()=>{u=u({direction:e?"in":"out"}),y(e)})):y(e)},end(){m(),d=f=null}}}function pe(e){return void 0!==e?.length?e:Array.from(e)}function ge(e,t){e.f(),function(e,t){fe(e,1,1,(()=>{t.delete(e.key)}))}(e,t)}function ye(e,t,n){const{fragment:i,after_update:c}=e.$$;i&&i.m(t,n),ee((()=>{const t=e.$$.on_mount.map(o).filter(r);e.$$.on_destroy?e.$$.on_destroy.push(...t):l(t),e.$$.on_mount=[]})),c.forEach(ee)}function we(e,t){const n=e.$$;null!==n.fragment&&(!function(e){const t=[],n=[];Y.forEach((o=>-1===e.indexOf(o)?t.push(o):n.push(o))),n.forEach((e=>e())),Y=t}(n.after_update),l(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]&&(Z.push(e),X||(X=!0,W.then(ie)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const i=o.length?o[0]:n;return f.ctx&&c(f.ctx[e],f.ctx[e]=i)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](i),h&&be(t,e)),n})):[],f.update(),h=!0,l(f.before_update),f.fragment=!!r&&r(f.ctx),n.target){if(n.hydrate){const e=function(e){return Array.from(e.childNodes)}(n.target);f.fragment&&f.fragment.l(e),e.forEach(k)}else f.fragment&&f.fragment.c();n.intro&&de(t.$$.fragment),ye(t,n.target,n.anchor),ie()}J(d)}class ve{$$=void 0;$$set=void 0;$destroy(){we(this,1),this.$destroy=e}$on(t,n){if(!r(n))return e;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const e=o.indexOf(n);-1!==e&&o.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 xe(e){const t=e-1;return t*t*t+1}function Ce(e,{from:t,to:n},o={}){const i=getComputedStyle(e),l="none"===i.transform?"":i.transform,[c,s]=i.transformOrigin.split(" ").map(parseFloat),u=t.left+t.width*c/n.width-(n.left+c),a=t.top+t.height*s/n.height-(n.top+s),{delay:d=0,duration:f=(e=>120*Math.sqrt(e)),easing:h=xe}=o;return{delay:d,duration:r(f)?f(Math.sqrt(u*u+a*a)):f,easing:h,css:(e,o)=>{const i=o*u,r=o*a,c=e+o*t.width/n.width,s=e+o*t.height/n.height;return`transform: ${l} translate(${i}px, ${r}px) scale(${c}, ${s});`}}}function Te(e,{delay:n=0,duration:o=400,easing:i=t}={}){const l=+getComputedStyle(e).opacity;return{delay:n,duration:o,easing:i,css:e=>"opacity: "+e*l}}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");const{window:ke}=$,Fe=e=>({noResultsText:1024&e[0]}),Ie=e=>({noResultsText:e[10]}),Ne=e=>({createText:8192&e[0]}),Se=e=>({createText:e[13]}),_e=e=>({loadingText:2048&e[0]}),Ae=e=>({loadingText:e[11]}),Ee=e=>({nbItems:1&e[1],maxItemsToShowInList:16&e[0]}),Le=e=>({nbItems:e[31].length,maxItemsToShowInList:e[4]});function Oe(e,t,n){const o=e.slice();return o[144]=t[n],o[146]=n,o}const Me=e=>({item:1&e[1],label:1&e[1]}),Be=e=>({item:e[144].item,label:e[144].highlighted?e[144].highlighted:e[144].label}),Re=e=>({nbItems:1&e[1],maxItemsToShowInList:16&e[0]}),De=e=>({nbItems:e[31].length,maxItemsToShowInList:e[4]});function Ke(e,t,n){const o=e.slice();return o[147]=t[n],o[146]=n,o}const Ue=e=>({label:2&e[0],item:2&e[0]}),je=e=>({label:e[43](e[147]),item:e[147],unselectItem:e[50]});function qe(e,t,n){const o=e.slice();return o[146]=t[n],o}function Ve(e){let t,n=pe(e[1]),o=[];for(let t=0;te[3](e[147],!0);for(let t=0;ts.p(e,t))):(s=a(l,e),s.c()),w.set(l,y[p]=s),l in g&&b.set(l,Math.abs(p-g[l]))}const v=new Set,x=new Set;function C(e){de(e,1),e.m(s,d),c.set(e.key,e),d=e.first,m--}for(;h&&m;){const t=y[m-1],n=e[h-1],o=t.key,i=n.key;t===n?(d=t.first,h--,m--):w.has(i)?!c.has(o)||v.has(o)?C(t):x.has(i)?h--:b.get(o)>b.get(i)?(x.add(o),C(t)):(v.add(i),h--):(u(n,c),h--)}for(;h--;){const t=e[h];w.has(t.key)||u(t,c)}for(;m;)C(y[m-1]);return l($),y}(o,n,c,1,e,r,i,t.parentNode,ge,ze,t,Ke);for(let e=0;e{if(!y&&e>=a&&(y=!0),y&&e>=d&&(f(1,0),w()),!g)return!1;if(y){const t=0+1*u((e-a)/s);f(t,1-t)}return!0})),h&&(m=V(n,0,1,s,c,u,h)),c||(y=!0),f(0,1),w}(i,h,Ce,{duration:200})},i(e){m||(de(C,e),e&&ee((()=>{m&&(u||(u=me(i,Te,{duration:200},!0)),u.run(1))})),m=!0)},o(e){fe(C,e),e&&(u||(u=me(i,Te,{duration:200},!1)),u.run(0)),m=!1},d(e){e&&k(i),C&&C.d(e),e&&u&&u.end(),g=!1,l(y)}}}function Ze(e){let t,n,o;return{c(){t=I("span"),L(t,"class","autocomplete-clear-button svelte-75ckfb")},m(i,l){T(i,t,l),t.innerHTML=e[8],n||(o=[A(t,"click",e[54]),A(t,"keypress",e[108])],n=!0)},p(e,n){256&n[0]&&(t.innerHTML=e[8])},d(e){e&&k(t),n=!1,l(o)}}}function Ge(e){let t,n;const o=e[97]["no-results"],i=s(o,e,e[96],Ie),l=i||function(e){let t;return{c(){t=N(e[10])},m(e,n){T(e,t,n)},p(e,n){1024&n[0]&&B(t,e[10])},d(e){e&&k(t)}}}(e);return{c(){t=I("div"),l&&l.c(),L(t,"class","autocomplete-list-item-no-results svelte-75ckfb")},m(e,o){T(e,t,o),l&&l.m(t,null),n=!0},p(e,t){i?i.p&&(!n||1024&t[0]|8&t[3])&&d(i,o,e,e[96],n?a(o,e[96],t,Fe):f(e[96]),Ie):l&&l.p&&(!n||1024&t[0])&&l.p(e,n?t:[-1,-1,-1,-1,-1])},i(e){n||(de(l,e),n=!0)},o(e){fe(l,e),n=!1},d(e){e&&k(t),l&&l.d(e)}}}function Ye(e){let t,n,o,i;const r=e[97].create,c=s(r,e,e[96],Se),u=c||function(e){let t;return{c(){t=N(e[13])},m(e,n){T(e,t,n)},p(e,n){8192&n[0]&&B(t,e[13])},d(e){e&&k(t)}}}(e);return{c(){t=I("div"),u&&u.c(),L(t,"class","autocomplete-list-item-create svelte-75ckfb")},m(l,r){T(l,t,r),u&&u.m(t,null),n=!0,o||(i=[A(t,"click",e[44]),A(t,"keypress",e[113])],o=!0)},p(e,t){c?c.p&&(!n||8192&t[0]|8&t[3])&&d(c,r,e,e[96],n?a(r,e[96],t,Ne):f(e[96]),Se):u&&u.p&&(!n||8192&t[0])&&u.p(e,n?t:[-1,-1,-1,-1,-1])},i(e){n||(de(u,e),n=!0)},o(e){fe(u,e),n=!1},d(e){e&&k(t),u&&u.d(e),o=!1,l(i)}}}function Qe(e){let t,n;const o=e[97].loading,i=s(o,e,e[96],Ae),l=i||function(e){let t;return{c(){t=N(e[11])},m(e,n){T(e,t,n)},p(e,n){2048&n[0]&&B(t,e[11])},d(e){e&&k(t)}}}(e);return{c(){t=I("div"),l&&l.c(),L(t,"class","autocomplete-list-item-loading svelte-75ckfb")},m(e,o){T(e,t,o),l&&l.m(t,null),n=!0},p(e,t){i?i.p&&(!n||2048&t[0]|8&t[3])&&d(i,o,e,e[96],n?a(o,e[96],t,_e):f(e[96]),Ae):l&&l.p&&(!n||2048&t[0])&&l.p(e,n?t:[-1,-1,-1,-1,-1])},i(e){n||(de(l,e),n=!0)},o(e){fe(l,e),n=!1},d(e){e&&k(t),l&&l.d(e)}}}function We(e){let t,n,o;const i=e[97]["dropdown-header"],l=s(i,e,e[96],De);let r=pe(e[31]),c=[];for(let t=0;tfe(c[e],1,1,(()=>{c[e]=null})),h=e[97]["dropdown-footer"],m=s(h,e,e[96],Le),p=m||function(e){let t,n=e[4]>0&&e[31].length>e[4]&&ot(e);return{c(){n&&n.c(),t=_()},m(e,o){n&&n.m(e,o),T(e,t,o)},p(e,o){e[4]>0&&e[31].length>e[4]?n?n.p(e,o):(n=ot(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){e&&k(t),n&&n.d(e)}}}(e);return{c(){l&&l.c(),t=S();for(let e=0;e{o=null})),ae())},i(e){n||(de(o),n=!0)},o(e){fe(o),n=!1},d(e){e&&k(t),o&&o.d(e)}}}function ot(e){let t,n=e[12]&&it(e);return{c(){n&&n.c(),t=_()},m(e,o){n&&n.m(e,o),T(e,t,o)},p(e,o){e[12]?n?n.p(e,o):(n=it(e),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null)},d(e){e&&k(t),n&&n.d(e)}}}function it(e){let t,n,o,i,l,r=e[31].length-e[4]+"";return{c(){t=I("div"),n=N("..."),o=N(r),i=S(),l=N(e[12]),L(t,"class","autocomplete-list-item-no-results svelte-75ckfb")},m(e,r){T(e,t,r),v(t,n),v(t,o),v(t,i),v(t,l)},p(e,t){16&t[0]|1&t[1]&&r!==(r=e[31].length-e[4]+"")&&B(o,r),4096&t[0]&&B(l,e[12])},d(e){e&&k(t)}}}function lt(e){let t,o,i,r,c,s,u,a,d,f,h,m,p,g,y,w,b,$,x,C;function F(e,t){return!e[5]&&e[32]?Pe:e[5]&&e[32]?Ve:void 0}let N=F(e),_=N&&N(e),E=e[5]&&e[32]&&Je(e),O=[{type:"text"},{class:u=(e[16]?e[16]:"")+" "+(e[27]?"":"input autocomplete-input")},{id:a=e[17]?e[17]:""},{autocomplete:d=e[22]?"on":e[23]},{placeholder:e[14]},{name:e[18]},{disabled:e[26]},{required:e[28]},{title:e[21]},{readOnly:f=e[24]||e[39]},{tabindex:e[29]},e[60]],B={};for(let e=0;e0?0:e[36]&&e[11]?1:e[6]?2:e[10]?3:-1}return~(g=q(e))&&(y=j[g]=U[g](e)),{c(){t=I("div"),o=I("select"),_&&_.c(),i=S(),r=I("div"),E&&E.c(),c=S(),s=I("input"),h=S(),K&&K.c(),m=S(),p=I("div"),y&&y.c(),L(o,"name",e[19]),L(o,"id",e[20]),o.multiple=e[5],L(o,"class","svelte-75ckfb"),M(s,B),D(s,"svelte-75ckfb",!0),L(r,"class","input-container svelte-75ckfb"),L(p,"class",w=(e[25]?e[25]:"")+" autocomplete-list "+(e[41]?"":"hidden")+" is-fullwidth svelte-75ckfb"),L(t,"class",b=(e[15]?e[15]:"")+" autocomplete select is-fullwidth "+e[42]+" svelte-75ckfb"),D(t,"hide-arrow",e[7]||!e[0].length),D(t,"is-multiple",e[5]),D(t,"show-clear",e[40]),D(t,"is-loading",e[9]&&e[36])},m(n,l){T(n,t,l),v(t,o),_&&_.m(o,null),v(t,i),v(t,r),E&&E.m(r,null),v(r,c),v(r,s),s.autofocus&&s.focus(),e[104](s),R(s,e[2]),v(r,h),K&&K.m(r,null),e[109](r),v(t,m),v(t,p),~g&&j[g].m(p,null),e[114](p),$=!0,x||(C=[A(ke,"click",e[46]),A(ke,"scroll",e[98]),A(s,"input",e[105]),A(s,"input",e[49]),A(s,"focus",e[52]),A(s,"blur",e[53]),A(s,"keydown",e[47]),A(s,"click",e[51]),A(s,"keypress",e[48]),A(s,"dragover",e[106]),A(s,"drop",e[107])],x=!0)},p(e,n){N===(N=F(e))&&_?_.p(e,n):(_&&_.d(1),_=N&&N(e),_&&(_.c(),_.m(o,null))),(!$||524288&n[0])&&L(o,"name",e[19]),(!$||1048576&n[0])&&L(o,"id",e[20]),(!$||32&n[0])&&(o.multiple=e[5]),e[5]&&e[32]?E?(E.p(e,n),32&n[0]|2&n[1]&&de(E,1)):(E=Je(e),E.c(),de(E,1),E.m(r,c)):E&&(ue(),fe(E,1,1,(()=>{E=null})),ae()),M(s,B=function(e,t){const n={},o={},i={$$scope:1};let l=e.length;for(;l--;){const r=e[l],c=t[l];if(c){for(const e in r)e in c||(o[e]=1);for(const e in c)i[e]||(n[e]=c[e],i[e]=1);e[l]=c}else for(const e in r)i[e]=1}for(const e in o)e in n||(n[e]=void 0);return n}(O,[{type:"text"},(!$||134283264&n[0]&&u!==(u=(e[16]?e[16]:"")+" "+(e[27]?"":"input autocomplete-input")))&&{class:u},(!$||131072&n[0]&&a!==(a=e[17]?e[17]:""))&&{id:a},(!$||12582912&n[0]&&d!==(d=e[22]?"on":e[23]))&&{autocomplete:d},(!$||16384&n[0])&&{placeholder:e[14]},(!$||262144&n[0])&&{name:e[18]},(!$||67108864&n[0])&&{disabled:e[26]},(!$||268435456&n[0])&&{required:e[28]},(!$||2097152&n[0])&&{title:e[21]},(!$||16777216&n[0]|256&n[1]&&f!==(f=e[24]||e[39]))&&{readOnly:f},(!$||536870912&n[0])&&{tabindex:e[29]},536870912&n[1]&&e[60]])),4&n[0]&&s.value!==e[2]&&R(s,e[2]),D(s,"svelte-75ckfb",!0),e[40]?K?K.p(e,n):(K=Ze(e),K.c(),K.m(r,null)):K&&(K.d(1),K=null);let i=g;g=q(e),g===i?~g&&j[g].p(e,n):(y&&(ue(),fe(j[i],1,1,(()=>{j[i]=null})),ae()),~g?(y=j[g],y?y.p(e,n):(y=j[g]=U[g](e),y.c()),de(y,1),y.m(p,null)):y=null),(!$||33554432&n[0]|1024&n[1]&&w!==(w=(e[25]?e[25]:"")+" autocomplete-list "+(e[41]?"":"hidden")+" is-fullwidth svelte-75ckfb"))&&L(p,"class",w),(!$||32768&n[0]&&b!==(b=(e[15]?e[15]:"")+" autocomplete select is-fullwidth "+e[42]+" svelte-75ckfb"))&&L(t,"class",b),(!$||32897&n[0])&&D(t,"hide-arrow",e[7]||!e[0].length),(!$||32800&n[0])&&D(t,"is-multiple",e[5]),(!$||32768&n[0]|512&n[1])&&D(t,"show-clear",e[40]),(!$||33280&n[0]|32&n[1])&&D(t,"is-loading",e[9]&&e[36])},i(e){$||(de(E),de(y),$=!0)},o(e){fe(E),fe(y),$=!1},d(n){n&&k(t),_&&_.d(),E&&E.d(),e[104](null),K&&K.d(),e[109](null),~g&&j[g].d(),e[114](null),x=!1,l(C)}}}function rt(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 ct(e,t){if(!e)return 0;const n=e.keywords;let o=0;return t.forEach((e=>{n.includes(e)&&o++})),o}function st(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function ut(e,t,o){let i,l,r,c;const s=["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 u=h(t,s),{$$slots:a={},$$scope:d}=t,{items:f=[]}=t,{searchFunction:m=!1}=t,{labelFieldName:p}=t,{keywordsFieldName:g=p}=t,{valueFieldName:y}=t,{labelFunction:w=function(e){return null==e?"":p?e[p]:e}}=t,{keywordsFunction:b=function(e){return null==e?"":g?e[g]:w(e)}}=t,{valueFunction:$=function(e,t=!1){return null==e?e:!A||t?y?e[y]:e:e.map((e=>y?e[y]:e))}}=t,{keywordsCleanFunction:v=function(e){return e}}=t,{textCleanFunction:x=function(e){return e}}=t,{beforeChange:C=function(e,t){return!0}}=t,{onChange:T=function(e){}}=t,{onFocus:k=function(){}}=t,{onBlur:F=function(){}}=t,{onCreate:I=function(e){ye&&console.log("onCreate: "+e)}}=t,{selectFirstIfEmpty:N=!1}=t,{minCharactersToSearch:S=1}=t,{maxItemsToShowInList:_=0}=t,{multiple:A=!1}=t,{create:E=!1}=t,{ignoreAccents:L=!0}=t,{matchAllKeywords:O=!0}=t,{sortByMatchedKeywords:M=!1}=t,{itemFilterFunction:B}=t,{itemSortFunction:R}=t,{lock:D=!1}=t,{delay:K=0}=t,{localFiltering:U=!0}=t,{localSorting:j=!0}=t,{cleanUserText:q=!0}=t,{lowercaseKeywords:V=!0}=t,{closeOnBlur:P=!1}=t,{orderableSelection:H=!1}=t,{hideArrow:J=!1}=t,{showClear:Z=!1}=t,{clearText:Y="✖"}=t,{showLoadingIndicator:Q=!1}=t,{noResultsText:W="No results found"}=t,{loadingText:X="Loading results..."}=t,{moreItemsText:ee="items not shown"}=t,{createText:te="Not found, add anyway?"}=t,{placeholder:ne}=t,{className:oe}=t,{inputClassName:ie}=t,{inputId:le}=t,{name:re}=t,{selectName:ce}=t,{selectId:se}=t,{title:ue}=t,{html5autocomplete:ae}=t,{autocompleteOffValue:de="off"}=t,{readonly:fe}=t,{dropdownClassName:he}=t,{disabled:me=!1}=t,{noInputStyles:pe=!1}=t,{required:ge=null}=t,{debug:ye=!1}=t,{tabindex:we=0}=t,{selectedItem:be=(A?[]:void 0)}=t,{value:$e}=t,{highlightedItem:ve}=t;const xe="sautocomplete-"+Math.floor(1e3*Math.random());let Ce,Te,ke,Fe,Ie,Ne=!1,Se=!1,_e=-1,{text:Ae}=t,Ee=0,Le=[],Oe=0,Me=0,Be=!1;function Re(e){return rt(w,e)}function De(e){const t=rt(b,e);let n=rt(v,t);return n=V?n.toLowerCase().trim():n,L&&(n=st(n)),ye&&console.log("Extracted keywords: '"+n+"' from item: "+JSON.stringify(e)),n}function Ke(){let e;ye&&(e="Autocomplete prepare list "+(le?`(id: ${le})`:""),console.time(e),console.log("Prepare items to search"),console.log("items: "+JSON.stringify(f))),Array.isArray(f)||(console.warn("Autocomplete items / search function did not return array but",f),o(0,f=[]));const t=f?f.length:0;Le=new Array(t),t>0&&f.forEach(((e,t)=>{const n=function(e){return{keywords:U?De(e):[],label:Re(e),item:e}}(e);void 0===n&&console.log("Undefined item for: ",e),Le[t]=n})),o(31,Fe=Le),ye&&(console.log(Le.length+" items to search"),console.timeEnd(e))}async function Ue(){let e;ye&&(e="Autocomplete search "+(le?`(id: ${le})`:""),console.time(e),console.log("Searching user entered text: '"+Ae+"'"));let t=function(e){if(null==e)return"";if(!q)return e;const t=e.replace(/[&/\\#,+()$~%.'":*?<>{}]/g," ").trim(),n=rt(x,t);return V?n.toLowerCase().trim():n.trim()}(Ae);if(S>1&&t.lengthMe&&o(0,f=[]),Me=e,o(0,f=[...f,...n]),je(t)}Me""!==e));let n;U?(n=B?Le.filter((e=>B(e.item,t))):Le.filter((e=>function(e,t){const n=ct(e,t);return O?n>=t.length:n>0}(e,t))),j&&(R?n=n.sort(((e,n)=>R(e.item,n.item,t))):M&&(n=n.sort(((e,n)=>function(e,t,n){return ct(t,n)-ct(e,n)}(e,n,t)))))):n=Le;const i=ut(t,"label");return o(31,Fe=n.map(i)),it(),!0}function qe(e){let t;if(ye&&console.log("createdItem",e),void 0!==e){Ke(),o(31,Fe=Le);let n=et(e,Fe);n<=0&&(o(0,f=[e]),Ke(),o(31,Fe=Le),n=0),n>=0&&(o(30,_e=n),t=Fe[_e])}return t}function Ve(e){if(ye&&console.log("selectListItem",e),void 0===e&&E){const t=I(Ae);if(void 0!==t){if("function"==typeof t.then)return t.then((e=>{if(void 0!==e){const t=qe(e);void 0!==t&&Ve(t)}})),!0;e=qe(t)}}if(void 0===e)return ye&&console.log("listItem is undefined. Can not select."),!1;if(c)return!0;const t=e.item;return C(be,t)&&(A?be?be.includes(t)?o(1,be=be.filter((e=>e!==t))):o(1,be=[...be,t]):o(1,be=[t]):(o(1,be=void 0),o(1,be=t))),!0}function Pe(){ye&&console.log("selectItem",_e);Ve(Fe[_e])?(ye&&console.log("selectListItem true, closing"),nt(),A&&(o(2,Ae=""),Ce.focus())):ye&&console.log("selectListItem false, not closing")}function He(){ye&&console.log("up"),tt(),_e>0&&o(30,_e--,_e),ze()}function Je(){ye&&console.log("down"),tt(),_et!==e))),Ce.focus()}function Ye(){Ue()&&(o(30,_e=0),tt())}function Qe(e){ye&&console.log("onEsc"),e.stopPropagation(),Ne&&(Ce.focus(),nt())}function We(e){ye&&console.log("onBackspace"),Ge(be[be.length-1])}function Xe(){if(ye&&console.log("resetListToAllItemsAndOpen"),m&&!Le.length?Ue():Ae||o(31,Fe=Le),tt(),be){ye&&console.log("Searching currently selected item: "+JSON.stringify(be));const e=et(be,Fe);e>=0&&(o(30,_e=e),ze())}}function et(e,t){ye&&console.log("Finding index for item",e);let n=-1;for(let o=0;o=0?console.log("Found index for item: "+n):console.warn("Not found index for item: "+e)),n}function tt(){ye&&console.log("open"),c||ot()||(o(37,Be=!0),o(94,Ne=!0))}function nt(){ye&&console.log("close"),o(94,Ne=!1),o(36,Se=!1),!Ae&&N&&(o(30,_e=0),Pe())}function ot(){return S>0&&Ee0)}function it(){return!!ot()&&(nt(),!0)}function lt(){ye&&console.log("clear"),o(2,Ae=""),o(1,be=A?[]:void 0),setTimeout((()=>{Ce.focus()}))}function ut(e,t){return n=>{let o=n[t];const i=Object.assign({highlighted:void 0},n);i.highlighted=o;const l=o.toLowerCase(),r=L?st(l):l;if(e&&e.length){const t=[];for(let n=0;n=0){let e=l+i;t.push([l,e]),l=e}}while(-1!==l)}if(t.length>0){const e=new Set;for(let n=0;n$1");i.highlighted=n}}}return i}}z((()=>{Be&&function(){const{height:e}=window.visualViewport,{bottom:t,height:n}=ke.getBoundingClientRect(),{height:i}=Te.getBoundingClientRect();o(34,Te.style.top=t+i>e?`-${n+i}px`:"0px",Te)}(),o(37,Be=!1)}));let at=!1;function dt(e,t){H&&e.dataTransfer.setData("source",t)}function ft(e,t){H&&(e.preventDefault(),o(38,at=t))}function ht(e,t){H&&o(38,at=!1)}function mt(e,t){if(H){e.preventDefault(),o(38,at=!1);let n=parseInt(e.dataTransfer.getData("source"));n!=t&&function(e,t){let n=[...be];e{t=n(n({},t),function(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}(e)),o(60,u=h(t,s)),"items"in e&&o(0,f=e.items),"searchFunction"in e&&o(63,m=e.searchFunction),"labelFieldName"in e&&o(64,p=e.labelFieldName),"keywordsFieldName"in e&&o(65,g=e.keywordsFieldName),"valueFieldName"in e&&o(66,y=e.valueFieldName),"labelFunction"in e&&o(67,w=e.labelFunction),"keywordsFunction"in e&&o(68,b=e.keywordsFunction),"valueFunction"in e&&o(3,$=e.valueFunction),"keywordsCleanFunction"in e&&o(69,v=e.keywordsCleanFunction),"textCleanFunction"in e&&o(70,x=e.textCleanFunction),"beforeChange"in e&&o(71,C=e.beforeChange),"onChange"in e&&o(72,T=e.onChange),"onFocus"in e&&o(73,k=e.onFocus),"onBlur"in e&&o(74,F=e.onBlur),"onCreate"in e&&o(75,I=e.onCreate),"selectFirstIfEmpty"in e&&o(76,N=e.selectFirstIfEmpty),"minCharactersToSearch"in e&&o(77,S=e.minCharactersToSearch),"maxItemsToShowInList"in e&&o(4,_=e.maxItemsToShowInList),"multiple"in e&&o(5,A=e.multiple),"create"in e&&o(6,E=e.create),"ignoreAccents"in e&&o(78,L=e.ignoreAccents),"matchAllKeywords"in e&&o(79,O=e.matchAllKeywords),"sortByMatchedKeywords"in e&&o(80,M=e.sortByMatchedKeywords),"itemFilterFunction"in e&&o(81,B=e.itemFilterFunction),"itemSortFunction"in e&&o(82,R=e.itemSortFunction),"lock"in e&&o(83,D=e.lock),"delay"in e&&o(84,K=e.delay),"localFiltering"in e&&o(85,U=e.localFiltering),"localSorting"in e&&o(86,j=e.localSorting),"cleanUserText"in e&&o(87,q=e.cleanUserText),"lowercaseKeywords"in e&&o(88,V=e.lowercaseKeywords),"closeOnBlur"in e&&o(89,P=e.closeOnBlur),"orderableSelection"in e&&o(90,H=e.orderableSelection),"hideArrow"in e&&o(7,J=e.hideArrow),"showClear"in e&&o(91,Z=e.showClear),"clearText"in e&&o(8,Y=e.clearText),"showLoadingIndicator"in e&&o(9,Q=e.showLoadingIndicator),"noResultsText"in e&&o(10,W=e.noResultsText),"loadingText"in e&&o(11,X=e.loadingText),"moreItemsText"in e&&o(12,ee=e.moreItemsText),"createText"in e&&o(13,te=e.createText),"placeholder"in e&&o(14,ne=e.placeholder),"className"in e&&o(15,oe=e.className),"inputClassName"in e&&o(16,ie=e.inputClassName),"inputId"in e&&o(17,le=e.inputId),"name"in e&&o(18,re=e.name),"selectName"in e&&o(19,ce=e.selectName),"selectId"in e&&o(20,se=e.selectId),"title"in e&&o(21,ue=e.title),"html5autocomplete"in e&&o(22,ae=e.html5autocomplete),"autocompleteOffValue"in e&&o(23,de=e.autocompleteOffValue),"readonly"in e&&o(24,fe=e.readonly),"dropdownClassName"in e&&o(25,he=e.dropdownClassName),"disabled"in e&&o(26,me=e.disabled),"noInputStyles"in e&&o(27,pe=e.noInputStyles),"required"in e&&o(28,ge=e.required),"debug"in e&&o(92,ye=e.debug),"tabindex"in e&&o(29,we=e.tabindex),"selectedItem"in e&&o(1,be=e.selectedItem),"value"in e&&o(61,$e=e.value),"highlightedItem"in e&&o(62,ve=e.highlightedItem),"text"in e&&o(2,Ae=e.text),"$$scope"in e&&o(96,d=e.$$scope)},e.$$.update=()=>{1&e.$$.dirty[0]|2&e.$$.dirty[2]&&(m||Ke()),2&e.$$.dirty[0]&&(o(61,$e=$(be)),be&&!A&&o(2,Ae=Re(be)),o(31,Fe=Le),T(be)),1073741824&e.$$.dirty[0]|1&e.$$.dirty[1]&&o(62,ve=Fe&&_e&&_e>=0&&_e0||Ee>0)),34&e.$$.dirty[0]&&o(32,l=A&&be&&be.length>0||!A&&be),32&e.$$.dirty[0]|2&e.$$.dirty[1]|538968064&e.$$.dirty[2]&&o(40,r=Z||(D||A)&&l),2&e.$$.dirty[1]|2097152&e.$$.dirty[2]&&o(39,c=D&&l)},[f,be,Ae,$,_,A,E,J,Y,Q,W,X,ee,te,ne,oe,ie,le,re,ce,se,ue,ae,de,fe,he,me,pe,ge,we,_e,Fe,l,Ce,Te,ke,Se,Be,at,c,r,i,xe,Re,Pe,Ze,function(e){ye&&console.log("onDocumentClick"),e.composedPath().some((e=>e.classList&&e.classList.contains(xe)))?(ye&&console.log("onDocumentClick inside"),ze()):(ye&&console.log("onDocumentClick outside"),nt())},function(e){ye&&console.log("onKeyDown");let t=e.key;"Tab"===t&&e.shiftKey&&(t="ShiftTab");const n={Tab:Ne?nt:null,ShiftTab:Ne?nt:null,ArrowDown:Je.bind(this),ArrowUp:He.bind(this),Escape:Qe.bind(this),Backspace:A&&l&&!Ae?We.bind(this):null}[t];"function"==typeof n&&n(e)},function(e){ye&&console.log("onKeyPress"),"Enter"===e.key&&function(e){Ne&&(e.preventDefault(),Pe())}(e)},function(e){ye&&console.log("onInput"),o(2,Ae=e.target.value),Ie&&clearTimeout(Ie),K?Ie=setTimeout(Ye,K):Ye()},Ge,function(){ye&&console.log("onInputClick"),Xe()},function(){ye&&console.log("onFocus"),k(),Xe()},function(){ye&&console.log("onBlur"),P&&nt(),F()},lt,function(e){return!!be&&(A?be.includes(e):e===be)},dt,ft,ht,mt,u,$e,ve,m,p,g,y,w,b,v,x,C,T,k,F,I,N,S,L,O,M,B,R,D,K,U,j,q,V,P,H,Z,ye,ut,Ne,Ee,d,a,()=>o(37,Be=!0),(e,t)=>{"Enter"==t.key&&Ge(e)},(e,t)=>dt(t,e),(e,t)=>ft(t,e),(e,t)=>ht(),(e,t)=>mt(t,e),function(e){G[e?"unshift":"push"]((()=>{Ce=e,o(33,Ce)}))},function(){Ae=this.value,o(2,Ae)},e=>ft(e,be.length-1),e=>mt(e,be.length-1),e=>{"Enter"==e.key&<()},function(e){G[e?"unshift":"push"]((()=>{ke=e,o(35,ke)}))},e=>Ze(e),(e,t)=>{"Enter"==t.key&&Ze(e)},e=>{o(30,_e=e)},e=>{"Enter"==e.key&&Pe()},function(e){G[e?"unshift":"push"]((()=>{Te=e,o(34,Te)}))}]}class at extends ve{constructor(e){super(),$e(this,e,ut,lt,c,{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 dt(e){let t,n=e[3]+"";return{c(){t=I("div"),L(t,"slot","item")},m(e,o){T(e,t,o),t.innerHTML=n},p(e,o){8&o&&n!==(n=e[3]+"")&&(t.innerHTML=n)},d(e){e&&k(t)}}}function ft(e){let t,n,o,i;return o=new at({props:{items:e[0],labelFunction:e[2],maxItemsToShowInList:"20",cleanUserText:"false",$$slots:{item:[dt,({label:e,item:t})=>({3:e,4:t}),({label:e,item:t})=>(e?8:0)|(t?16:0)]},$$scope:{ctx:e}}}),{c(){var e;t=I("h1"),t.textContent="Recherche d'une espèce",n=S(),(e=o.$$.fragment)&&e.c()},m(e,l){T(e,t,l),T(e,n,l),ye(o,e,l),i=!0},p(e,[t]){const n={};1&t&&(n.items=e[0]),2&t&&(n.labelFunction=e[2]),40&t&&(n.$$scope={dirty:t,ctx:e}),o.$set(n)},i(e){i||(de(o.$$.fragment,e),i=!0)},o(e){fe(o.$$.fragment,e),i=!1},d(e){e&&(k(t),k(n)),we(o,e)}}}function ht(e,t,n){let o,{"espèces":i}=t;return e.$$set=e=>{"espèces"in e&&n(0,i=e.espèces)},e.$$.update=()=>{1&e.$$.dirty&&n(1,o=function(e){return new Map(e.map((e=>{return[e,(t=e,`${t.NOM_VERN} - ${t.LB_NOM}`)];var t})))}(i))},[i,o,e=>o.get(e)]}var mt={},pt={},gt=34,yt=10,wt=13;function bt(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function $t(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var o in e)o in t||n.push(t[o]=o)})),n}function vt(e,t){var n=e+"",o=n.length;return o9999?"+"+vt(t,6):vt(t,4))+"-"+vt(e.getUTCMonth()+1,2)+"-"+vt(e.getUTCDate(),2)+(l?"T"+vt(n,2)+":"+vt(o,2)+":"+vt(i,2)+"."+vt(l,3)+"Z":i?"T"+vt(n,2)+":"+vt(o,2)+":"+vt(i,2)+"Z":o||n?"T"+vt(n,2)+":"+vt(o,2)+"Z":"")}function Ct(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function o(e,t){var o,i=[],l=e.length,r=0,c=0,s=l<=0,u=!1;function a(){if(s)return pt;if(u)return u=!1,mt;var t,o,i=r;if(e.charCodeAt(i)===gt){for(;r++=l?s=!0:(o=e.charCodeAt(r++))===yt?u=!0:o===wt&&(u=!0,e.charCodeAt(r)===yt&&++r),e.slice(i+1,t-1).replace(/""/g,'"')}for(;r{Ft.set(e.CD_NOM,e)})),console.log(Ft),new class extends ve{constructor(e){super(),$e(this,e,ht,ft,c,{"espèces":0})}}({target:document.querySelector(".svelte-main"),props:{"espèces":[...Ft.values()]}}); +//# sourceMappingURL=bundle.js.map diff --git a/build/bundle.js.map b/build/bundle.js.map new file mode 100644 index 00000000..a39e60ce --- /dev/null +++ b/build/bundle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bundle.js","sources":["../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/each.js","../node_modules/svelte/src/runtime/internal/Component.js","../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/svelte/src/runtime/internal/disclose-version/index.js","../node_modules/svelte/src/shared/version.js","../node_modules/simple-svelte-autocomplete/src/SimpleAutocomplete.svelte","../node_modules/svelte/src/runtime/internal/spread.js","../scripts/App.svelte","../node_modules/d3-dsv/src/dsv.js","../node_modules/d3-fetch/src/text.js","../scripts/main.js","../node_modules/d3-fetch/src/dsv.js"],"sourcesContent":["/** @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