UNPKG

@bikematrix/web-components

Version:
1 lines 575 kB
(function(ht,G){typeof exports=="object"&&typeof module<"u"?module.exports=G():typeof define=="function"&&define.amd?define(G):(ht=typeof globalThis<"u"?globalThis:ht||self,ht.BikeMatrix=G())})(this,function(){"use strict";var ht,G,mo,bo,Yt,vo,wo,kn,xo,Gr={},_o=[],dc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Si=Array.isArray;function gt(r,e){for(var t in e)r[t]=e[t];return r}function yo(r){var e=r.parentNode;e&&e.removeChild(r)}function $(r,e,t){var i,n,s,o={};for(s in e)s=="key"?i=e[s]:s=="ref"?n=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?ht.call(arguments,2):t),typeof r=="function"&&r.defaultProps!=null)for(s in r.defaultProps)o[s]===void 0&&(o[s]=r.defaultProps[s]);return Wr(r,o,i,n,null)}function Wr(r,e,t,i,n){var s={type:r,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++mo,__i:-1,__u:0};return n==null&&G.vnode!=null&&G.vnode(s),s}function pc(){return{current:null}}function j(r){return r.children}function Qe(r,e){this.props=r,this.context=e}function cr(r,e){if(e==null)return r.__?cr(r.__,r.__i+1):null;for(var t;e<r.__k.length;e++)if((t=r.__k[e])!=null&&t.__e!=null)return t.__e;return typeof r.type=="function"?cr(r):null}function Co(r){var e,t;if((r=r.__)!=null&&r.__c!=null){for(r.__e=r.__c.base=null,e=0;e<r.__k.length;e++)if((t=r.__k[e])!=null&&t.__e!=null){r.__e=r.__c.base=t.__e;break}return Co(r)}}function Dn(r){(!r.__d&&(r.__d=!0)&&Yt.push(r)&&!Ei.__r++||vo!==G.debounceRendering)&&((vo=G.debounceRendering)||wo)(Ei)}function Ei(){var r,e,t,i,n,s,o,a,l;for(Yt.sort(kn);r=Yt.shift();)r.__d&&(e=Yt.length,i=void 0,s=(n=(t=r).__v).__e,a=[],l=[],(o=t.__P)&&((i=gt({},n)).__v=n.__v+1,G.vnode&&G.vnode(i),An(o,i,n,t.__n,o.ownerSVGElement!==void 0,32&n.__u?[s]:null,a,s??cr(n),!!(32&n.__u),l),i.__v=n.__v,i.__.__k[i.__i]=i,Bo(a,i,l),i.__e!=s&&Co(i)),Yt.length>e&&Yt.sort(kn));Ei.__r=0}function ko(r,e,t,i,n,s,o,a,l,u,c){var d,h,f,b,v,w=i&&i.__k||_o,m=e.length;for(t.__d=l,fc(t,e,w),l=t.__d,d=0;d<m;d++)(f=t.__k[d])!=null&&typeof f!="boolean"&&typeof f!="function"&&(h=f.__i===-1?Gr:w[f.__i]||Gr,f.__i=d,An(r,f,h,n,s,o,a,l,u,c),b=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&Sn(h.ref,null,f),c.push(f.ref,f.__c||b,f)),v==null&&b!=null&&(v=b),65536&f.__u||h.__k===f.__k?l=Do(f,l,r):typeof f.type=="function"&&f.__d!==void 0?l=f.__d:b&&(l=b.nextSibling),f.__d=void 0,f.__u&=-196609);t.__d=l,t.__e=v}function fc(r,e,t){var i,n,s,o,a,l=e.length,u=t.length,c=u,d=0;for(r.__k=[],i=0;i<l;i++)o=i+d,(n=r.__k[i]=(n=e[i])==null||typeof n=="boolean"||typeof n=="function"?null:typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?Wr(null,n,null,null,null):Si(n)?Wr(j,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?Wr(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)!=null?(n.__=r,n.__b=r.__b+1,a=hc(n,t,o,c),n.__i=a,s=null,a!==-1&&(c--,(s=t[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&d--,typeof n.type!="function"&&(n.__u|=65536)):a!==o&&(a===o+1?d++:a>o?c>l-o?d+=a-o:d--:a<o?a==o-1&&(d=a-o):d=0,a!==i+d&&(n.__u|=65536))):(s=t[o])&&s.key==null&&s.__e&&!(131072&s.__u)&&(s.__e==r.__d&&(r.__d=cr(s)),En(s,s,!1),t[o]=null,c--);if(c)for(i=0;i<u;i++)(s=t[i])!=null&&!(131072&s.__u)&&(s.__e==r.__d&&(r.__d=cr(s)),En(s,s))}function Do(r,e,t){var i,n;if(typeof r.type=="function"){for(i=r.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=r,e=Do(i[n],e,t));return e}r.__e!=e&&(t.insertBefore(r.__e,e||null),e=r.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function mt(r,e){return e=e||[],r==null||typeof r=="boolean"||(Si(r)?r.some(function(t){mt(t,e)}):e.push(r)),e}function hc(r,e,t,i){var n=r.key,s=r.type,o=t-1,a=t+1,l=e[t];if(l===null||l&&n==l.key&&s===l.type&&!(131072&l.__u))return t;if(i>(l!=null&&!(131072&l.__u)?1:0))for(;o>=0||a<e.length;){if(o>=0){if((l=e[o])&&!(131072&l.__u)&&n==l.key&&s===l.type)return o;o--}if(a<e.length){if((l=e[a])&&!(131072&l.__u)&&n==l.key&&s===l.type)return a;a++}}return-1}function Ao(r,e,t){e[0]==="-"?r.setProperty(e,t??""):r[e]=t==null?"":typeof t!="number"||dc.test(e)?t:t+"px"}function Bi(r,e,t,i,n){var s;e:if(e==="style")if(typeof t=="string")r.style.cssText=t;else{if(typeof i=="string"&&(r.style.cssText=i=""),i)for(e in i)t&&e in t||Ao(r.style,e,"");if(t)for(e in t)i&&t[e]===i[e]||Ao(r.style,e,t[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in r?e.toLowerCase().slice(2):e.slice(2),r.l||(r.l={}),r.l[e+s]=t,t?i?t.u=i.u:(t.u=Date.now(),r.addEventListener(e,s?Eo:So,s)):r.removeEventListener(e,s?Eo:So,s);else{if(n)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e!=="role"&&e in r)try{r[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!=="-"?r.removeAttribute(e):r.setAttribute(e,t))}}function So(r){if(this.l){var e=this.l[r.type+!1];if(r.t){if(r.t<=e.u)return}else r.t=Date.now();return e(G.event?G.event(r):r)}}function Eo(r){if(this.l)return this.l[r.type+!0](G.event?G.event(r):r)}function An(r,e,t,i,n,s,o,a,l,u){var c,d,h,f,b,v,w,m,g,x,_,y,k,A,C,D=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(l=!!(32&t.__u),s=[a=e.__e=t.__e]),(c=G.__b)&&c(e);e:if(typeof D=="function")try{if(m=e.props,g=(c=D.contextType)&&i[c.__c],x=c?g?g.props.value:c.__:i,t.__c?w=(d=e.__c=t.__c).__=d.__E:("prototype"in D&&D.prototype.render?e.__c=d=new D(m,x):(e.__c=d=new Qe(m,x),d.constructor=D,d.render=mc),g&&g.sub(d),d.props=m,d.state||(d.state={}),d.context=x,d.__n=i,h=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),D.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=gt({},d.__s)),gt(d.__s,D.getDerivedStateFromProps(m,d.__s))),f=d.props,b=d.state,d.__v=e,h)D.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(D.getDerivedStateFromProps==null&&m!==f&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(m,x),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(m,d.__s,x)===!1||e.__v===t.__v)){for(e.__v!==t.__v&&(d.props=m,d.state=d.__s,d.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(S){S&&(S.__=e)}),_=0;_<d._sb.length;_++)d.__h.push(d._sb[_]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(m,d.__s,x),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(f,b,v)})}if(d.context=x,d.props=m,d.__P=r,d.__e=!1,y=G.__r,k=0,"prototype"in D&&D.prototype.render){for(d.state=d.__s,d.__d=!1,y&&y(e),c=d.render(d.props,d.state,d.context),A=0;A<d._sb.length;A++)d.__h.push(d._sb[A]);d._sb=[]}else do d.__d=!1,y&&y(e),c=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++k<25);d.state=d.__s,d.getChildContext!=null&&(i=gt(gt({},i),d.getChildContext())),h||d.getSnapshotBeforeUpdate==null||(v=d.getSnapshotBeforeUpdate(f,b)),ko(r,Si(C=c!=null&&c.type===j&&c.key==null?c.props.children:c)?C:[C],e,t,i,n,s,o,a,l,u),d.base=e.__e,e.__u&=-161,d.__h.length&&o.push(d),w&&(d.__E=d.__=null)}catch(S){e.__v=null,l||s!=null?(e.__e=a,e.__u|=l?160:32,s[s.indexOf(a)]=null):(e.__e=t.__e,e.__k=t.__k),G.__e(S,e,t)}else s==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=gc(t.__e,e,t,i,n,s,o,l,u);(c=G.diffed)&&c(e)}function Bo(r,e,t){e.__d=void 0;for(var i=0;i<t.length;i++)Sn(t[i],t[++i],t[++i]);G.__c&&G.__c(e,r),r.some(function(n){try{r=n.__h,n.__h=[],r.some(function(s){s.call(n)})}catch(s){G.__e(s,n.__v)}})}function gc(r,e,t,i,n,s,o,a,l){var u,c,d,h,f,b,v,w=t.props,m=e.props,g=e.type;if(g==="svg"&&(n=!0),s!=null){for(u=0;u<s.length;u++)if((f=s[u])&&"setAttribute"in f==!!g&&(g?f.localName===g:f.nodeType===3)){r=f,s[u]=null;break}}if(r==null){if(g===null)return document.createTextNode(m);r=n?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,m.is&&m),s=null,a=!1}if(g===null)w===m||a&&r.data===m||(r.data=m);else{if(s=s&&ht.call(r.childNodes),w=t.props||Gr,!a&&s!=null)for(w={},u=0;u<r.attributes.length;u++)w[(f=r.attributes[u]).name]=f.value;for(u in w)f=w[u],u=="children"||(u=="dangerouslySetInnerHTML"?d=f:u==="key"||u in m||Bi(r,u,null,f,n));for(u in m)f=m[u],u=="children"?h=f:u=="dangerouslySetInnerHTML"?c=f:u=="value"?b=f:u=="checked"?v=f:u==="key"||a&&typeof f!="function"||w[u]===f||Bi(r,u,f,w[u],n);if(c)a||d&&(c.__html===d.__html||c.__html===r.innerHTML)||(r.innerHTML=c.__html),e.__k=[];else if(d&&(r.innerHTML=""),ko(r,Si(h)?h:[h],e,t,i,n&&g!=="foreignObject",s,o,s?s[0]:t.__k&&cr(t,0),a,l),s!=null)for(u=s.length;u--;)s[u]!=null&&yo(s[u]);a||(u="value",b!==void 0&&(b!==r[u]||g==="progress"&&!b||g==="option"&&b!==w[u])&&Bi(r,u,b,w[u],!1),u="checked",v!==void 0&&v!==r[u]&&Bi(r,u,v,w[u],!1))}return r}function Sn(r,e,t){try{typeof r=="function"?r(e):r.current=e}catch(i){G.__e(i,t)}}function En(r,e,t){var i,n;if(G.unmount&&G.unmount(r),(i=r.ref)&&(i.current&&i.current!==r.__e||Sn(i,null,e)),(i=r.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(s){G.__e(s,e)}i.base=i.__P=null,r.__c=void 0}if(i=r.__k)for(n=0;n<i.length;n++)i[n]&&En(i[n],e,t||typeof r.type!="function");t||r.__e==null||yo(r.__e),r.__=r.__e=r.__d=void 0}function mc(r,e,t){return this.constructor(r,t)}function Tt(r,e,t){var i,n,s,o;G.__&&G.__(r,e),n=(i=typeof t=="function")?null:t&&t.__k||e.__k,s=[],o=[],An(e,r=(!i&&t||e).__k=$(j,null,[r]),n||Gr,Gr,e.ownerSVGElement!==void 0,!i&&t?[t]:n?null:e.firstChild?ht.call(e.childNodes):null,s,!i&&t?t:n?n.__e:e.firstChild,i,o),Bo(s,r,o)}function Bn(r,e){Tt(r,e,Bn)}function Ln(r,e,t){var i,n,s,o,a=gt({},r.props);for(s in r.type&&r.type.defaultProps&&(o=r.type.defaultProps),e)s=="key"?i=e[s]:s=="ref"?n=e[s]:a[s]=e[s]===void 0&&o!==void 0?o[s]:e[s];return arguments.length>2&&(a.children=arguments.length>3?ht.call(arguments,2):t),Wr(r.type,a,i||r.key,n||r.ref,null)}function Yr(r,e){var t={__c:e="__cC"+xo++,__:r,Consumer:function(i,n){return i.children(n)},Provider:function(i){var n,s;return this.getChildContext||(n=[],(s={})[e]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&n.some(function(a){a.__e=!0,Dn(a)})},this.sub=function(o){n.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){n.splice(n.indexOf(o),1),a&&a.call(o)}}),i.children}};return t.Provider.__=t.Consumer.contextType=t}ht=_o.slice,G={__e:function(r,e,t,i){for(var n,s,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((s=n.constructor)&&s.getDerivedStateFromError!=null&&(n.setState(s.getDerivedStateFromError(r)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(r,i||{}),o=n.__d),o)return n.__E=n}catch(a){r=a}throw r}},mo=0,bo=function(r){return r!=null&&r.constructor==null},Qe.prototype.setState=function(r,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=gt({},this.state),typeof r=="function"&&(r=r(gt({},t),this.props)),r&&gt(t,r),r!=null&&this.__v&&(e&&this._sb.push(e),Dn(this))},Qe.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),Dn(this))},Qe.prototype.render=j,Yt=[],wo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kn=function(r,e){return r.__v.__b-e.__v.__b},Ei.__r=0,xo=0;function Tn(){return(Tn=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r}).apply(this,arguments)}var bc=["context","children"];function vc(r){this.getChildContext=function(){return r.context};var e=r.children,t=function(i,n){if(i==null)return{};var s,o,a={},l=Object.keys(i);for(o=0;o<l.length;o++)n.indexOf(s=l[o])>=0||(a[s]=i[s]);return a}(r,bc);return Ln(e,t)}function wc(){var r=new CustomEvent("_preact",{detail:{},bubbles:!0,cancelable:!0});this.dispatchEvent(r),this._vdom=$(vc,Tn({},this._props,{context:r.detail.context}),function e(t,i){if(t.nodeType===3)return t.data;if(t.nodeType!==1)return null;var n=[],s={},o=0,a=t.attributes,l=t.childNodes;for(o=a.length;o--;)a[o].name!=="slot"&&(s[a[o].name]=a[o].value,s[Lo(a[o].name)]=a[o].value);for(o=l.length;o--;){var u=e(l[o],null),c=l[o].slot;c?s[c]=$(To,{name:c},u):n[o]=u}var d=i?$(To,null,n):n;return $(i||t.nodeName.toLowerCase(),s,d)}(this,this._vdomComponent)),(this.hasAttribute("hydrate")?Bn:Tt)(this._vdom,this._root)}function Lo(r){return r.replace(/-(\w)/g,function(e,t){return t?t.toUpperCase():""})}function xc(r,e,t){if(this._vdom){var i={};i[r]=t=t??void 0,i[Lo(r)]=t,this._vdom=Ln(this._vdom,i),Tt(this._vdom,this._root)}}function _c(){Tt(this._vdom=null,this._root)}function To(r,e){var t=this;return $("slot",Tn({},r,{ref:function(i){i?(t.ref=i,t._listener||(t._listener=function(n){n.stopPropagation(),n.detail.context=e},i.addEventListener("_preact",t._listener))):t.ref.removeEventListener("_preact",t._listener)}}))}function yc(r,e,t,i){function n(){var s=Reflect.construct(HTMLElement,[],n);return s._vdomComponent=r,s._root=i&&i.shadow?s.attachShadow({mode:i.mode||"open"}):s,s}return(n.prototype=Object.create(HTMLElement.prototype)).constructor=n,n.prototype.connectedCallback=wc,n.prototype.attributeChangedCallback=xc,n.prototype.disconnectedCallback=_c,t=t||r.observedAttributes||Object.keys(r.propTypes||{}),n.observedAttributes=t,t.forEach(function(s){Object.defineProperty(n.prototype,s,{get:function(){return this._vdom.props[s]},set:function(o){this._vdom?this.attributeChangedCallback(s,null,o):(this._props||(this._props={}),this._props[s]=o,this.connectedCallback());var a=typeof o;o!=null&&a!=="string"&&a!=="boolean"&&a!=="number"||this.setAttribute(s,o)}})}),customElements.define(e||r.tagName||r.displayName||r.name,n)}var Ft,ae,Fn,Fo,dr=0,No=[],Li=[],de=G,Mo=de.__b,Po=de.__r,Oo=de.diffed,Io=de.__c,Ro=de.unmount,zo=de.__;function pr(r,e){de.__h&&de.__h(ae,r,dr||e),dr=0;var t=ae.__H||(ae.__H={__:[],__h:[]});return r>=t.__.length&&t.__.push({__V:Li}),t.__[r]}function R(r){return dr=1,qo(jo,r)}function qo(r,e,t){var i=pr(Ft++,2);if(i.t=r,!i.__c&&(i.__=[t?t(e):jo(void 0,e),function(a){var l=i.__N?i.__N[0]:i.__[0],u=i.t(l,a);l!==u&&(i.__N=[u,i.__[1]],i.__c.setState({}))}],i.__c=ae,!ae.u)){var n=function(a,l,u){if(!i.__c.__H)return!0;var c=i.__c.__H.__.filter(function(h){return!!h.__c});if(c.every(function(h){return!h.__N}))return!s||s.call(this,a,l,u);var d=!1;return c.forEach(function(h){if(h.__N){var f=h.__[0];h.__=h.__N,h.__N=void 0,f!==h.__[0]&&(d=!0)}}),!(!d&&i.__c.props===a)&&(!s||s.call(this,a,l,u))};ae.u=!0;var s=ae.shouldComponentUpdate,o=ae.componentWillUpdate;ae.componentWillUpdate=function(a,l,u){if(this.__e){var c=s;s=void 0,n(a,l,u),s=c}o&&o.call(this,a,l,u)},ae.shouldComponentUpdate=n}return i.__N||i.__}function U(r,e){var t=pr(Ft++,3);!de.__s&&Mn(t.__H,e)&&(t.__=r,t.i=e,ae.__H.__h.push(t))}function fr(r,e){var t=pr(Ft++,4);!de.__s&&Mn(t.__H,e)&&(t.__=r,t.i=e,ae.__h.push(t))}function Y(r){return dr=5,nt(function(){return{current:r}},[])}function Cc(r,e,t){dr=6,fr(function(){return typeof r=="function"?(r(e()),function(){return r(null)}):r?(r.current=e(),function(){return r.current=null}):void 0},t==null?t:t.concat(r))}function nt(r,e){var t=pr(Ft++,7);return Mn(t.__H,e)?(t.__V=r(),t.i=e,t.__h=r,t.__V):t.__}function $o(r,e){return dr=8,nt(function(){return r},e)}function Ti(r){var e=ae.context[r.__c],t=pr(Ft++,9);return t.c=r,e?(t.__==null&&(t.__=!0,e.sub(ae)),e.props.value):r.__}function kc(r,e){de.useDebugValue&&de.useDebugValue(e?e(r):r)}function Dc(){var r=pr(Ft++,11);if(!r.__){for(var e=ae.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var t=e.__m||(e.__m=[0,0]);r.__="P"+t[0]+"-"+t[1]++}return r.__}function Ac(){for(var r;r=No.shift();)if(r.__P&&r.__H)try{r.__H.__h.forEach(Fi),r.__H.__h.forEach(Nn),r.__H.__h=[]}catch(e){r.__H.__h=[],de.__e(e,r.__v)}}de.__b=function(r){ae=null,Mo&&Mo(r)},de.__=function(r,e){r&&e.__k&&e.__k.__m&&(r.__m=e.__k.__m),zo&&zo(r,e)},de.__r=function(r){Po&&Po(r),Ft=0;var e=(ae=r.__c).__H;e&&(Fn===ae?(e.__h=[],ae.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=Li,t.__N=t.i=void 0})):(e.__h.forEach(Fi),e.__h.forEach(Nn),e.__h=[],Ft=0)),Fn=ae},de.diffed=function(r){Oo&&Oo(r);var e=r.__c;e&&e.__H&&(e.__H.__h.length&&(No.push(e)!==1&&Fo===de.requestAnimationFrame||((Fo=de.requestAnimationFrame)||Sc)(Ac)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==Li&&(t.__=t.__V),t.i=void 0,t.__V=Li})),Fn=ae=null},de.__c=function(r,e){e.some(function(t){try{t.__h.forEach(Fi),t.__h=t.__h.filter(function(i){return!i.__||Nn(i)})}catch(i){e.some(function(n){n.__h&&(n.__h=[])}),e=[],de.__e(i,t.__v)}}),Io&&Io(r,e)},de.unmount=function(r){Ro&&Ro(r);var e,t=r.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{Fi(i)}catch(n){e=n}}),t.__H=void 0,e&&de.__e(e,t.__v))};var Vo=typeof requestAnimationFrame=="function";function Sc(r){var e,t=function(){clearTimeout(i),Vo&&cancelAnimationFrame(e),setTimeout(r)},i=setTimeout(t,100);Vo&&(e=requestAnimationFrame(t))}function Fi(r){var e=ae,t=r.__c;typeof t=="function"&&(r.__c=void 0,t()),ae=e}function Nn(r){var e=ae;r.__c=r.__(),ae=e}function Mn(r,e){return!r||r.length!==e.length||e.some(function(t,i){return t!==r[i]})}function jo(r,e){return typeof e=="function"?e(r):e}function Uo(r,e){for(var t in e)r[t]=e[t];return r}function Pn(r,e){for(var t in r)if(t!=="__source"&&!(t in e))return!0;for(var i in e)if(i!=="__source"&&r[i]!==e[i])return!0;return!1}function On(r,e){this.props=r,this.context=e}function Ec(r,e){function t(n){var s=this.props.ref,o=s==n.ref;return!o&&s&&(s.call?s(null):s.current=null),e?!e(this.props,n)||!o:Pn(this.props,n)}function i(n){return this.shouldComponentUpdate=t,$(r,n)}return i.displayName="Memo("+(r.displayName||r.name)+")",i.prototype.isReactComponent=!0,i.__f=!0,i}(On.prototype=new Qe).isPureReactComponent=!0,On.prototype.shouldComponentUpdate=function(r,e){return Pn(this.props,r)||Pn(this.state,e)};var Ho=G.__b;G.__b=function(r){r.type&&r.type.__f&&r.ref&&(r.props.ref=r.ref,r.ref=null),Ho&&Ho(r)};var Bc=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function In(r){function e(t){var i=Uo({},t);return delete i.ref,r(i,t.ref||null)}return e.$$typeof=Bc,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(r.displayName||r.name)+")",e}var Go=function(r,e){return r==null?null:mt(mt(r).map(e))},Wo={map:Go,forEach:Go,count:function(r){return r?mt(r).length:0},only:function(r){var e=mt(r);if(e.length!==1)throw"Children.only";return e[0]},toArray:mt},Lc=G.__e;G.__e=function(r,e,t,i){if(r.then){for(var n,s=e;s=s.__;)if((n=s.__c)&&n.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),n.__c(r,e)}Lc(r,e,t,i)};var Yo=G.unmount;function Ko(r,e,t){return r&&(r.__c&&r.__c.__H&&(r.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),r.__c.__H=null),(r=Uo({},r)).__c!=null&&(r.__c.__P===t&&(r.__c.__P=e),r.__c=null),r.__k=r.__k&&r.__k.map(function(i){return Ko(i,e,t)})),r}function Zo(r,e,t){return r&&t&&(r.__v=null,r.__k=r.__k&&r.__k.map(function(i){return Zo(i,e,t)}),r.__c&&r.__c.__P===e&&(r.__e&&t.appendChild(r.__e),r.__c.__e=!0,r.__c.__P=t)),r}function Ni(){this.__u=0,this.t=null,this.__b=null}function Xo(r){var e=r.__.__c;return e&&e.__a&&e.__a(r)}function Tc(r){var e,t,i;function n(s){if(e||(e=r()).then(function(o){t=o.default||o},function(o){i=o}),i)throw i;if(!t)throw e;return $(t,s)}return n.displayName="Lazy",n.__f=!0,n}function Kr(){this.u=null,this.o=null}G.unmount=function(r){var e=r.__c;e&&e.__R&&e.__R(),e&&32&r.__u&&(r.type=null),Yo&&Yo(r)},(Ni.prototype=new Qe).__c=function(r,e){var t=e.__c,i=this;i.t==null&&(i.t=[]),i.t.push(t);var n=Xo(i.__v),s=!1,o=function(){s||(s=!0,t.__R=null,n?n(a):a())};t.__R=o;var a=function(){if(!--i.__u){if(i.state.__a){var l=i.state.__a;i.__v.__k[0]=Zo(l,l.__c.__P,l.__c.__O)}var u;for(i.setState({__a:i.__b=null});u=i.t.pop();)u.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),r.then(o,o)},Ni.prototype.componentWillUnmount=function(){this.t=[]},Ni.prototype.render=function(r,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Ko(this.__b,t,i.__O=i.__P)}this.__b=null}var n=e.__a&&$(j,null,r.fallback);return n&&(n.__u&=-33),[$(j,null,e.__a?null:r.children),n]};var Jo=function(r,e,t){if(++t[1]===t[0]&&r.o.delete(e),r.props.revealOrder&&(r.props.revealOrder[0]!=="t"||!r.o.size))for(t=r.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;r.u=t=t[2]}};function Fc(r){return this.getChildContext=function(){return r.context},r.children}function Nc(r){var e=this,t=r.i;e.componentWillUnmount=function(){Tt(null,e.l),e.l=null,e.i=null},e.i&&e.i!==t&&e.componentWillUnmount(),e.l||(e.i=t,e.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(i){this.childNodes.push(i),e.i.appendChild(i)},insertBefore:function(i,n){this.childNodes.push(i),e.i.appendChild(i)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.i.removeChild(i)}}),Tt($(Fc,{context:e.context},r.__v),e.l)}function Mc(r,e){var t=$(Nc,{__v:r,i:e});return t.containerInfo=e,t}(Kr.prototype=new Qe).__a=function(r){var e=this,t=Xo(e.__v),i=e.o.get(r);return i[0]++,function(n){var s=function(){e.props.revealOrder?(i.push(n),Jo(e,r,i)):n()};t?t(s):s()}},Kr.prototype.render=function(r){this.u=null,this.o=new Map;var e=mt(r.children);r.revealOrder&&r.revealOrder[0]==="b"&&e.reverse();for(var t=e.length;t--;)this.o.set(e[t],this.u=[1,0,this.u]);return r.children},Kr.prototype.componentDidUpdate=Kr.prototype.componentDidMount=function(){var r=this;this.o.forEach(function(e,t){Jo(r,t,e)})};var Qo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Pc=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Oc=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ic=/[A-Z0-9]/g,Rc=typeof document<"u",zc=function(r){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(r)};function qc(r,e,t){return e.__k==null&&(e.textContent=""),Tt(r,e),typeof t=="function"&&t(),r?r.__c:null}function $c(r,e,t){return Bn(r,e),typeof t=="function"&&t(),r?r.__c:null}Qe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(r){Object.defineProperty(Qe.prototype,r,{configurable:!0,get:function(){return this["UNSAFE_"+r]},set:function(e){Object.defineProperty(this,r,{configurable:!0,writable:!0,value:e})}})});var ea=G.event;function Vc(){}function jc(){return this.cancelBubble}function Uc(){return this.defaultPrevented}G.event=function(r){return ea&&(r=ea(r)),r.persist=Vc,r.isPropagationStopped=jc,r.isDefaultPrevented=Uc,r.nativeEvent=r};var Rn,Hc={enumerable:!1,configurable:!0,get:function(){return this.class}},ta=G.vnode;G.vnode=function(r){typeof r.type=="string"&&function(e){var t=e.props,i=e.type,n={};for(var s in t){var o=t[s];if(!(s==="value"&&"defaultValue"in t&&o==null||Rc&&s==="children"&&i==="noscript"||s==="class"||s==="className")){var a=s.toLowerCase();s==="defaultValue"&&"value"in t&&t.value==null?s="value":s==="download"&&o===!0?o="":a==="translate"&&o==="no"?o=!1:a==="ondoubleclick"?s="ondblclick":a!=="onchange"||i!=="input"&&i!=="textarea"||zc(t.type)?a==="onfocus"?s="onfocusin":a==="onblur"?s="onfocusout":Oc.test(s)?s=a:i.indexOf("-")===-1&&Pc.test(s)?s=s.replace(Ic,"-$&").toLowerCase():o===null&&(o=void 0):a=s="oninput",a==="oninput"&&n[s=a]&&(s="oninputCapture"),n[s]=o}}i=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=mt(t.children).forEach(function(l){l.props.selected=n.value.indexOf(l.props.value)!=-1})),i=="select"&&n.defaultValue!=null&&(n.value=mt(t.children).forEach(function(l){l.props.selected=n.multiple?n.defaultValue.indexOf(l.props.value)!=-1:n.defaultValue==l.props.value})),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",Hc)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(r),r.$$typeof=Qo,ta&&ta(r)};var ra=G.__r;G.__r=function(r){ra&&ra(r),Rn=r.__c};var ia=G.diffed;G.diffed=function(r){ia&&ia(r);var e=r.props,t=r.__e;t!=null&&r.type==="textarea"&&"value"in e&&e.value!==t.value&&(t.value=e.value==null?"":e.value),Rn=null};var Gc={ReactCurrentDispatcher:{current:{readContext:function(r){return Rn.__n[r.__c].props.value}}}};function Wc(r){return $.bind(null,r)}function Nt(r){return!!r&&r.$$typeof===Qo}function Yc(r){return Nt(r)&&r.type===j}function na(r){return Nt(r)?Ln.apply(null,arguments):r}function Kc(r){return!!r.__k&&(Tt(null,r),!0)}function Zc(r){return r&&(r.base||r.nodeType===1&&r)||null}var Xc=function(r,e){return r(e)},Jc=function(r,e){return r(e)},Qc=j;function sa(r){r()}function ed(r){return r}function td(){return[!1,sa]}var rd=fr,id=Nt;function nd(r,e){var t=e(),i=R({h:{__:t,v:e}}),n=i[0].h,s=i[1];return fr(function(){n.__=t,n.v=e,zn(n)&&s({h:n})},[r,t,e]),U(function(){return zn(n)&&s({h:n}),r(function(){zn(n)&&s({h:n})})},[r]),t}function zn(r){var e,t,i=r.v,n=r.__;try{var s=i();return!((e=n)===(t=s)&&(e!==0||1/e==1/t)||e!=e&&t!=t)}catch{return!0}}var we={useState:R,useId:Dc,useReducer:qo,useEffect:U,useLayoutEffect:fr,useInsertionEffect:rd,useTransition:td,useDeferredValue:ed,useSyncExternalStore:nd,startTransition:sa,useRef:Y,useImperativeHandle:Cc,useMemo:nt,useCallback:$o,useContext:Ti,useDebugValue:kc,version:"17.0.2",Children:Wo,render:qc,hydrate:$c,unmountComponentAtNode:Kc,createPortal:Mc,createElement:$,createContext:Yr,createFactory:Wc,cloneElement:na,createRef:pc,Fragment:j,isValidElement:Nt,isElement:id,isFragment:Yc,findDOMNode:Zc,Component:Qe,PureComponent:On,memo:Ec,forwardRef:In,flushSync:Jc,unstable_batchedUpdates:Xc,StrictMode:Qc,Suspense:Ni,SuspenseList:Kr,lazy:Tc,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Gc},qn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oa(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var sd={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const od=oa(sd);var ad=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function aa(r){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=r.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(od[t[1]]||r.charAt(r.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var i=r.indexOf("-->");return{type:"comment",comment:i!==-1?r.slice(4,i):""}}for(var n=new RegExp(ad),s=null;(s=n.exec(r))!==null;)if(s[0].trim())if(s[1]){var o=s[1].trim(),a=[o,""];o.indexOf("=")>-1&&(a=o.split("=")),e.attrs[a[0]]=a[1],n.lastIndex--}else s[2]&&(e.attrs[s[2]]=s[3].trim().substring(1,s[3].length-1));return e}var ld=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,ud=/^\s*$/,cd=Object.create(null);function la(r,e){switch(e.type){case"text":return r+e.content;case"tag":return r+="<"+e.name+(e.attrs?function(t){var i=[];for(var n in t)i.push(n+'="'+t[n]+'"');return i.length?" "+i.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?r:r+e.children.reduce(la,"")+"</"+e.name+">";case"comment":return r+"<!--"+e.comment+"-->"}}var dd={parse:function(r,e){e||(e={}),e.components||(e.components=cd);var t,i=[],n=[],s=-1,o=!1;if(r.indexOf("<")!==0){var a=r.indexOf("<");i.push({type:"text",content:a===-1?r:r.substring(0,a)})}return r.replace(ld,function(l,u){if(o){if(l!=="</"+t.name+">")return;o=!1}var c,d=l.charAt(1)!=="/",h=l.startsWith("<!--"),f=u+l.length,b=r.charAt(f);if(h){var v=aa(l);return s<0?(i.push(v),i):((c=n[s]).children.push(v),i)}if(d&&(s++,(t=aa(l)).type==="tag"&&e.components[t.name]&&(t.type="component",o=!0),t.voidElement||o||!b||b==="<"||t.children.push({type:"text",content:r.slice(f,r.indexOf("<",f))}),s===0&&i.push(t),(c=n[s-1])&&c.children.push(t),n[s]=t),(!d||t.voidElement)&&(s>-1&&(t.voidElement||t.name===l.slice(2,-1))&&(s--,t=s===-1?i:n[s]),!o&&b!=="<"&&b)){c=s===-1?i:n[s].children;var w=r.indexOf("<",f),m=r.slice(f,w===-1?void 0:w);ud.test(m)&&(m=" "),(w>-1&&s+c.length>=0||m!==" ")&&c.push({type:"text",content:m})}}),i},stringify:function(r){return r.reduce(function(e,t){return e+la("",t)},"")}};const Mi=(...r)=>{console!=null&&console.warn&&(We(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),console.warn(...r))},ua={},Pi=(...r)=>{We(r[0])&&ua[r[0]]||(We(r[0])&&(ua[r[0]]=new Date),Mi(...r))},ca=(r,e)=>()=>{if(r.isInitialized)e();else{const t=()=>{setTimeout(()=>{r.off("initialized",t)},0),e()};r.on("initialized",t)}},da=(r,e,t)=>{r.loadNamespaces(e,ca(r,t))},pa=(r,e,t,i)=>{We(t)&&(t=[t]),t.forEach(n=>{r.options.ns.indexOf(n)<0&&r.options.ns.push(n)}),r.loadLanguages(e,ca(r,i))},pd=(r,e,t={})=>!e.languages||!e.languages.length?(Pi("i18n.languages were undefined or empty",e.languages),!0):e.hasLoadedNamespace(r,{lng:t.lng,precheck:(i,n)=>{var s;if(((s=t.bindI18n)==null?void 0:s.indexOf("languageChanging"))>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!n(i.isLanguageChangingTo,r))return!1}}),We=r=>typeof r=="string",hr=r=>typeof r=="object"&&r!==null,fd=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,hd={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},gd=r=>hd[r];let $n={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:r=>r.replace(fd,gd)};const md=(r={})=>{$n={...$n,...r}},fa=()=>$n;let ha;const bd=r=>{ha=r},Mt=()=>ha,Vn=(r,e)=>{var i;if(!r)return!1;const t=((i=r.props)==null?void 0:i.children)??r.children;return e?t.length>0:!!t},jn=r=>{var t,i;if(!r)return[];const e=((t=r.props)==null?void 0:t.children)??r.children;return(i=r.props)!=null&&i.i18nIsDynamicList?gr(e):e},vd=r=>Array.isArray(r)&&r.every(Nt),gr=r=>Array.isArray(r)?r:[r],wd=(r,e)=>{const t={...e};return t.props=Object.assign(r.props,e.props),t},ga=(r,e)=>{if(!r)return"";let t="";const i=gr(r),n=e!=null&&e.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return i.forEach((s,o)=>{if(We(s))t+=`${s}`;else if(Nt(s)){const{props:a,type:l}=s,u=Object.keys(a).length,c=n.indexOf(l)>-1,d=a.children;if(!d&&c&&!u)t+=`<${l}/>`;else if(!d&&(!c||u)||a.i18nIsDynamicList)t+=`<${o}></${o}>`;else if(c&&u===1&&We(d))t+=`<${l}>${d}</${l}>`;else{const h=ga(d,e);t+=`<${o}>${h}</${o}>`}}else if(s===null)Mi("Trans: the passed in value is invalid - seems you passed in a null child.");else if(hr(s)){const{format:a,...l}=s,u=Object.keys(l);if(u.length===1){const c=a?`${u[0]}, ${a}`:u[0];t+=`{{${c}}}`}else Mi("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",s)}else Mi("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",s)}),t},xd=(r,e,t,i,n,s)=>{if(e==="")return[];const o=i.transKeepBasicHtmlNodesFor||[],a=e&&new RegExp(o.map(w=>`<${w}`).join("|")).test(e);if(!r&&!a&&!s)return[e];const l={},u=w=>{gr(w).forEach(g=>{We(g)||(Vn(g)?u(jn(g)):hr(g)&&!Nt(g)&&Object.assign(l,g))})};u(r);const c=dd.parse(`<0>${e}</0>`),d={...l,...n},h=(w,m,g)=>{var y;const x=jn(w),_=b(x,m.children,g);return vd(x)&&_.length===0||(y=w.props)!=null&&y.i18nIsDynamicList?x:_},f=(w,m,g,x,_)=>{w.dummy?(w.children=m,g.push(na(w,{key:x},_?void 0:m))):g.push(...Wo.map([w],y=>{const k={...y.props};return delete k.i18nIsDynamicList,$(y.type,{...k,key:x,ref:y.ref},_?null:m)}))},b=(w,m,g)=>{const x=gr(w);return gr(m).reduce((y,k,A)=>{var D,S;const C=((S=(D=k.children)==null?void 0:D[0])==null?void 0:S.content)&&t.services.interpolator.interpolate(k.children[0].content,d,t.language);if(k.type==="tag"){let B=x[parseInt(k.name,10)];g.length===1&&!B&&(B=g[0][k.name]),B||(B={});const E=Object.keys(k.attrs).length!==0?wd({props:k.attrs},B):B,T=Nt(E),M=T&&Vn(k,!0)&&!k.voidElement,F=a&&hr(E)&&E.dummy&&!T,V=hr(r)&&Object.hasOwnProperty.call(r,k.name);if(We(E)){const I=t.services.interpolator.interpolate(E,d,t.language);y.push(I)}else if(Vn(E)||M){const I=h(E,k,g);f(E,I,y,A)}else if(F){const I=b(x,k.children,g);f(E,I,y,A)}else if(Number.isNaN(parseFloat(k.name)))if(V){const I=h(E,k,g);f(E,I,y,A,k.voidElement)}else if(i.transSupportBasicHtmlNodes&&o.indexOf(k.name)>-1)if(k.voidElement)y.push($(k.name,{key:`${k.name}-${A}`}));else{const I=b(x,k.children,g);y.push($(k.name,{key:`${k.name}-${A}`},I))}else if(k.voidElement)y.push(`<${k.name} />`);else{const I=b(x,k.children,g);y.push(`<${k.name}>${I}</${k.name}>`)}else if(hr(E)&&!T){const I=k.children[0]?C:null;I&&y.push(I)}else f(E,C,y,A,k.children.length!==1||!C)}else if(k.type==="text"){const B=i.transWrapTextNodes,E=s?i.unescape(t.services.interpolator.interpolate(k.content,d,t.language)):t.services.interpolator.interpolate(k.content,d,t.language);B?y.push($(B,{key:`${k.name}-${A}`},E)):y.push(E)}return y},[])},v=b([{dummy:!0,children:r||[]}],c,gr(r||[]));return jn(v[0])};function _d({children:r,count:e,parent:t,i18nKey:i,context:n,tOptions:s={},values:o,defaults:a,components:l,ns:u,i18n:c,t:d,shouldUnescape:h,...f}){var B,E,T,M,F,V;const b=c||Mt();if(!b)return Pi("You will need to pass in an i18next instance by using i18nextReactModule"),r;const v=d||b.t.bind(b)||(I=>I),w={...fa(),...(B=b.options)==null?void 0:B.react};let m=u||v.ns||((E=b.options)==null?void 0:E.defaultNS);m=We(m)?[m]:m||["translation"];const g=ga(r,w),x=a||g||w.transEmptyNodeValue||i,{hashTransKey:_}=w,y=i||(_?_(g||x):g||x);(M=(T=b.options)==null?void 0:T.interpolation)!=null&&M.defaultVariables&&(o=o&&Object.keys(o).length>0?{...o,...b.options.interpolation.defaultVariables}:{...b.options.interpolation.defaultVariables});const k=o||e!==void 0&&!((V=(F=b.options)==null?void 0:F.interpolation)!=null&&V.alwaysFormat)||!r?s.interpolation:{interpolation:{...s.interpolation,prefix:"#$?",suffix:"?$#"}},A={...s,context:n||s.context,count:e,...o,...k,defaultValue:x,ns:m},C=y?v(y,A):x;l&&Object.keys(l).forEach(I=>{const O=l[I];if(typeof O.type=="function"||!O.props||!O.props.children||C.indexOf(`${I}/>`)<0&&C.indexOf(`${I} />`)<0)return;function P(){return $(j,null,O)}l[I]=$(P)});const D=xd(l||r,C,b,w,A,h),S=t??w.defaultTransParent;return S?$(S,f,D):D}const yd={type:"3rdParty",init(r){md(r.options.react),bd(r)}},ma=Yr();class Cd{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function ba({children:r,count:e,parent:t,i18nKey:i,context:n,tOptions:s={},values:o,defaults:a,components:l,ns:u,i18n:c,t:d,shouldUnescape:h,...f}){var g;const{i18n:b,defaultNS:v}=Ti(ma)||{},w=c||b||Mt(),m=d||(w==null?void 0:w.t.bind(w));return _d({children:r,count:e,parent:t,i18nKey:i,context:n,tOptions:s,values:o,defaults:a,components:l,ns:u||(m==null?void 0:m.ns)||v||((g=w==null?void 0:w.options)==null?void 0:g.defaultNS),i18n:w,t:d,shouldUnescape:h,...f})}const kd=(r,e)=>{const t=Y();return U(()=>{t.current=e?t.current:r},[r,e]),t.current},va=(r,e,t,i)=>r.getFixedT(e,t,i),Dd=(r,e,t,i)=>$o(va(r,e,t,i),[r,e,t,i]),ee=(r,e={})=>{var _,y,k,A;const{i18n:t}=e,{i18n:i,defaultNS:n}=Ti(ma)||{},s=t||i||Mt();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Cd),!s){Pi("You will need to pass in an i18next instance by using initReactI18next");const C=(S,B)=>We(B)?B:hr(B)&&We(B.defaultValue)?B.defaultValue:Array.isArray(S)?S[S.length-1]:S,D=[C,{},!1];return D.t=C,D.i18n={},D.ready=!1,D}(_=s.options.react)!=null&&_.wait&&Pi("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const o={...fa(),...s.options.react,...e},{useSuspense:a,keyPrefix:l}=o;let u=r||n||((y=s.options)==null?void 0:y.defaultNS);u=We(u)?[u]:u||["translation"],(A=(k=s.reportNamespaces).addUsedNamespaces)==null||A.call(k,u);const c=(s.isInitialized||s.initializedStoreOnce)&&u.every(C=>pd(C,s,o)),d=Dd(s,e.lng||null,o.nsMode==="fallback"?u:u[0],l),h=()=>d,f=()=>va(s,e.lng||null,o.nsMode==="fallback"?u:u[0],l),[b,v]=R(h);let w=u.join();e.lng&&(w=`${e.lng}${w}`);const m=kd(w),g=Y(!0);U(()=>{const{bindI18n:C,bindI18nStore:D}=o;g.current=!0,!c&&!a&&(e.lng?pa(s,e.lng,u,()=>{g.current&&v(f)}):da(s,u,()=>{g.current&&v(f)})),c&&m&&m!==w&&g.current&&v(f);const S=()=>{g.current&&v(f)};return C&&(s==null||s.on(C,S)),D&&(s==null||s.store.on(D,S)),()=>{g.current=!1,s&&(C==null||C.split(" ").forEach(B=>s.off(B,S))),D&&s&&D.split(" ").forEach(B=>s.store.off(B,S))}},[s,w]),U(()=>{g.current&&c&&v(h)},[s,l,c]);const x=[b,s,c];if(x.t=b,x.i18n=s,x.ready=c,c||!c&&!a)return x;throw new Promise(C=>{e.lng?pa(s,e.lng,u,()=>C()):da(s,u,()=>C())})};var Ad=Symbol.for("preact-signals");function Oi(){if(Pt>1)Pt--;else{for(var r,e=!1;Zr!==void 0;){var t=Zr;for(Zr=void 0,Un++;t!==void 0;){var i=t.o;if(t.o=void 0,t.f&=-3,!(8&t.f)&&xa(t))try{t.c()}catch(n){e||(r=n,e=!0)}t=i}}if(Un=0,Pt--,e)throw r}}function Sd(r){if(Pt>0)return r();Pt++;try{return r()}finally{Oi()}}var ne=void 0,Zr=void 0,Pt=0,Un=0,Ii=0;function wa(r){if(ne!==void 0){var e=r.n;if(e===void 0||e.t!==ne)return e={i:0,S:r,p:ne.s,n:void 0,t:ne,e:void 0,x:void 0,r:e},ne.s!==void 0&&(ne.s.n=e),ne.s=e,r.n=e,32&ne.f&&r.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=ne.s,e.n=void 0,ne.s.n=e,ne.s=e),e}}function _e(r){this.v=r,this.i=0,this.n=void 0,this.t=void 0}_e.prototype.brand=Ad,_e.prototype.h=function(){return!0},_e.prototype.S=function(r){this.t!==r&&r.e===void 0&&(r.x=this.t,this.t!==void 0&&(this.t.e=r),this.t=r)},_e.prototype.U=function(r){if(this.t!==void 0){var e=r.e,t=r.x;e!==void 0&&(e.x=t,r.e=void 0),t!==void 0&&(t.e=e,r.x=void 0),r===this.t&&(this.t=t)}},_e.prototype.subscribe=function(r){var e=this;return Gn(function(){var t=e.value,i=ne;ne=void 0;try{r(t)}finally{ne=i}})},_e.prototype.valueOf=function(){return this.value},_e.prototype.toString=function(){return this.value+""},_e.prototype.toJSON=function(){return this.value},_e.prototype.peek=function(){var r=ne;ne=void 0;try{return this.value}finally{ne=r}},Object.defineProperty(_e.prototype,"value",{get:function(){var r=wa(this);return r!==void 0&&(r.i=this.i),this.v},set:function(r){if(r!==this.v){if(Un>100)throw new Error("Cycle detected");this.v=r,this.i++,Ii++,Pt++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Oi()}}}});function Ce(r){return new _e(r)}function xa(r){for(var e=r.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function _a(r){for(var e=r.s;e!==void 0;e=e.n){var t=e.S.n;if(t!==void 0&&(e.r=t),e.S.n=e,e.i=-1,e.n===void 0){r.s=e;break}}}function ya(r){for(var e=r.s,t=void 0;e!==void 0;){var i=e.p;e.i===-1?(e.S.U(e),i!==void 0&&(i.n=e.n),e.n!==void 0&&(e.n.p=i)):t=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=i}r.s=t}function mr(r){_e.call(this,void 0),this.x=r,this.s=void 0,this.g=Ii-1,this.f=4}(mr.prototype=new _e).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ii))return!0;if(this.g=Ii,this.f|=1,this.i>0&&!xa(this))return this.f&=-2,!0;var r=ne;try{_a(this),ne=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return ne=r,ya(this),this.f&=-2,!0},mr.prototype.S=function(r){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}_e.prototype.S.call(this,r)},mr.prototype.U=function(r){if(this.t!==void 0&&(_e.prototype.U.call(this,r),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},mr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var r=this.t;r!==void 0;r=r.x)r.t.N()}},Object.defineProperty(mr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var r=wa(this);if(this.h(),r!==void 0&&(r.i=this.i),16&this.f)throw this.v;return this.v}});function Ed(r){return new mr(r)}function Ca(r){var e=r.u;if(r.u=void 0,typeof e=="function"){Pt++;var t=ne;ne=void 0;try{e()}catch(i){throw r.f&=-2,r.f|=8,Hn(r),i}finally{ne=t,Oi()}}}function Hn(r){for(var e=r.s;e!==void 0;e=e.n)e.S.U(e);r.x=void 0,r.s=void 0,Ca(r)}function Bd(r){if(ne!==this)throw new Error("Out-of-order effect");ya(this),ne=r,this.f&=-2,8&this.f&&Hn(this),Oi()}function Xr(r){this.x=r,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Xr.prototype.c=function(){var r=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{r()}},Xr.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ca(this),_a(this),Pt++;var r=ne;return ne=this,Bd.bind(this,r)},Xr.prototype.N=function(){2&this.f||(this.f|=2,this.o=Zr,Zr=this)},Xr.prototype.d=function(){this.f|=8,1&this.f||Hn(this)};function Gn(r){var e=new Xr(r);try{e.c()}catch(t){throw e.d(),t}return e.d.bind(e)}var Wn;function br(r,e){G[r]=e.bind(null,G[r]||function(){})}function Ri(r){Wn&&Wn(),Wn=r&&r.S()}function ka(r){var e=this,t=r.data,i=Td(t);i.value=t;var n=nt(function(){for(var s=e.__v;s=s.__;)if(s.__c){s.__c.__$f|=4;break}return e.__$u.c=function(){var o,a=e.__$u.S(),l=n.value;a(),bo(l)||((o=e.base)==null?void 0:o.nodeType)!==3?(e.__$f|=1,e.setState({})):e.base.data=l},Ed(function(){var o=i.value.value;return o===0?0:o===!0?"":o||""})},[]);return n.value}ka.displayName="_st",Object.defineProperties(_e.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:ka},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),br("__b",function(r,e){if(typeof e.type=="string"){var t,i=e.props;for(var n in i)if(n!=="children"){var s=i[n];s instanceof _e&&(t||(e.__np=t={}),t[n]=s,i[n]=s.peek())}}r(e)}),br("__r",function(r,e){Ri();var t,i=e.__c;i&&(i.__$f&=-2,(t=i.__$u)===void 0&&(i.__$u=t=function(n){var s;return Gn(function(){s=this}),s.c=function(){i.__$f|=1,i.setState({})},s}())),Ri(t),r(e)}),br("__e",function(r,e,t,i){Ri(),r(e,t,i)}),br("diffed",function(r,e){Ri();var t;if(typeof e.type=="string"&&(t=e.__e)){var i=e.__np,n=e.props;if(i){var s=t.U;if(s)for(var o in s){var a=s[o];a!==void 0&&!(o in i)&&(a.d(),s[o]=void 0)}else t.U=s={};for(var l in i){var u=s[l],c=i[l];u===void 0?(u=Ld(t,l,c,n),s[l]=u):u.o(c,n)}}}r(e)});function Ld(r,e,t,i){var n=e in r&&r.ownerSVGElement===void 0,s=Ce(t);return{o:function(o,a){s.value=o,i=a},d:Gn(function(){var o=s.value.value;i[e]!==o&&(i[e]=o,n?r[e]=o:o?r.setAttribute(e,o):r.removeAttribute(e))})}}br("unmount",function(r,e){if(typeof e.type=="string"){var t=e.__e;if(t){var i=t.U;if(i){t.U=void 0;for(var n in i){var s=i[n];s&&s.d()}}}}else{var o=e.__c;if(o){var a=o.__$u;a&&(o.__$u=void 0,a.d())}}r(e)}),br("__h",function(r,e,t,i){(i<3||i===9)&&(e.__$f|=2),r(e,t,i)}),Qe.prototype.shouldComponentUpdate=function(r,e){var t=this.__$u;if(!(t&&t.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var i in e)return!0;for(var n in r)if(n!=="__source"&&r[n]!==this.props[n])return!0;for(var s in this.props)if(!(s in r))return!0;return!1};function Td(r){return nt(function(){return Ce(r)},[])}const Yn=Ce(!1),K=Ce(null),vr=Ce([]),wr=Ce(!1),Ee=Ce(!1),xr=Ce([]),et=Ce(!1),zi=Ce(null),ke=Ce(null),qi=Ce(!1),$i=Ce(!0),bt=Ce(!1),Fd=()=>{Sd(()=>{K.value=null,vr.value=[],wr.value=!1,Ee.value=!1,xr.value=[],et.value=!1,zi.value=null,ke.value=null,qi.value=!1,$i.value=!0,bt.value=!1})},Kn="bm_currentBike",Nd="v2",Zn=2,Xn="https://cdn.bikematrix.io",Vi="https://imagestore.bikematrix.io",Md="1.0.3",Da={isShopify:!1,skuField:"sku",apiUrl:"https://api.bikematrix.io/proxy/v3/",apiKey:"",apiToken:"",currentCollectionHandle:"",categories:[],collections:[],pageType:"index",showHomePageCollection:!1,showSearchPageCollection:!1,designMode:!1,bikeSelectorBrands:"",productsCollections:{},isHomePage:!1,isSearchPage:!1,products:{},collectionUrl:"",compatiblityListCurrentPage:0,showCompatibleList:!0,delayCompatibleListInitialization:!1,sku:"",productCollections:[],logLevel:"none",virtualWorkshop:!0,internalLink:"",showBrowseCategoryButtons:!0,browseCompatibilityUrl:""},Pd={ß:"ss",Æ:"AE",æ:"ae",Œ:"OE",œ:"oe",Ø:"O",ø:"o",Ð:"D",ð:"d",Þ:"TH",þ:"th",Ł:"L",ł:"l"},Be=function(r){return new URL(r,Xn).toString()},Od=(r="")=>r.trim().replace(/\s+/g,"").split("").map(e=>Pd[e]??e).join("").normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-zA-Z0-9_-]/g,"").toLowerCase(),ji=r=>{const e=Od(r);return e.length<3?e.padEnd(3,"1"):e},Id=(r,e)=>{const t=r.match(/\/400-(.+)$/);return t?`${Vi}/${ji(e)}/400/${t[1]}`:r};function Aa(r){var e,t,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var n=r.length;for(e=0;e<n;e++)r[e]&&(t=Aa(r[e]))&&(i&&(i+=" "),i+=t)}else for(t in r)r[t]&&(i&&(i+=" "),i+=t);return i}function Rd(){for(var r,e,t=0,i="",n=arguments.length;t<n;t++)(r=arguments[t])&&(e=Aa(r))&&(i&&(i+=" "),i+=e);return i}const Jn="-";function zd(r){const e=$d(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:i}=r;function n(o){const a=o.split(Jn);return a[0]===""&&a.length!==1&&a.shift(),Sa(a,e)||qd(o)}function s(o,a){const l=t[o]||[];return a&&i[o]?[...l,...i[o]]:l}return{getClassGroupId:n,getConflictingClassGroupIds:s}}function Sa(r,e){var o;if(r.length===0)return e.classGroupId;const t=r[0],i=e.nextPart.get(t),n=i?Sa(r.slice(1),i):void 0;if(n)return n;if(e.validators.length===0)return;const s=r.join(Jn);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId}const Ea=/^\[(.+)\]$/;function qd(r){if(Ea.test(r)){const e=Ea.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}}function $d(r){const{theme:e,prefix:t}=r,i={nextPart:new Map,validators:[]};return jd(Object.entries(r.classGroups),t).forEach(([s,o])=>{Qn(o,i,s,e)}),i}function Qn(r,e,t,i){r.forEach(n=>{if(typeof n=="string"){const s=n===""?e:Ba(e,n);s.classGroupId=t;return}if(typeof n=="function"){if(Vd(n)){Qn(n(i),e,t,i);return}e.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([s,o])=>{Qn(o,Ba(e,s),t,i)})})}function Ba(r,e){let t=r;return e.split(Jn).forEach(i=>{t.nextPart.has(i)||t.nextPart.set(i,{nextPart:new Map,validators:[]}),t=t.nextPart.get(i)}),t}function Vd(r){return r.isThemeGetter}function jd(r,e){return e?r.map(([t,i])=>{const n=i.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[t,n]}):r}function Ud(r){if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,i=new Map;function n(s,o){t.set(s,o),e++,e>r&&(e=0,i=t,t=new Map)}return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=i.get(s))!==void 0)return n(s,o),o},set(s,o){t.has(s)?t.set(s,o):n(s,o)}}}const La="!";function Hd(r){const e=r.separator,t=e.length===1,i=e[0],n=e.length;return function(o){const a=[];let l=0,u=0,c;for(let v=0;v<o.length;v++){let w=o[v];if(l===0){if(w===i&&(t||o.slice(v,v+n)===e)){a.push(o.slice(u,v)),u=v+n;continue}if(w==="/"){c=v;continue}}w==="["?l++:w==="]"&&l--}const d=a.length===0?o:o.substring(u),h=d.startsWith(La),f=h?d.substring(1):d,b=c&&c>u?c-u:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:b}}}function Gd(r){if(r.length<=1)return r;const e=[];let t=[];return r.forEach(i=>{i[0]==="["?(e.push(...t.sort(),i),t=[]):t.push(i)}),e.push(...t.sort()),e}function Wd(r){return{cache:Ud(r.cacheSize),splitModifiers:Hd(r),...zd(r)}}const Yd=/\s+/;function Kd(r,e){const{splitModifiers:t,getClassGroupId:i,getConflictingClassGroupIds:n}=e,s=new Set;return r.trim().split(Yd).map(o=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:c}=t(o);let d=i(c?u.substring(0,c):u),h=!!c;if(!d){if(!c)return{isTailwindClass:!1,originalClassName:o};if(d=i(u),!d)return{isTailwindClass:!1,originalClassName:o};h=!1}const f=Gd(a).join(":");return{isTailwindClass:!0,modifierId:l?f+La:f,classGroupId:d,originalClassName:o,hasPostfixModifier:h}}).reverse().filter(o=>{if(!o.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=o,c=a+l;return s.has(c)?!1:(s.add(c),n(l,u).forEach(d=>s.add(a+d)),!0)}).reverse().map(o=>o.originalClassName).join(" ")}function Zd(){let r=0,e,t,i="";for(;r<arguments.length;)(e=arguments[r++])&&(t=Ta(e))&&(i&&(i+=" "),i+=t);return i}function Ta(r){if(typeof r=="string")return r;let e,t="";for(let i=0;i<r.length;i++)r[i]&&(e=Ta(r[i]))&&(t&&(t+=" "),t+=e);return t}function Xd(r,...e){let t,i,n,s=o;function o(l){const u=e.reduce((c,d)=>d(c),r());return t=Wd(u),i=t.cache.get,n=t.cache.set,s=a,a(l)}function a(l){const u=i(l);if(u)return u;const c=Kd(l,t);return n(l,c),c}return function(){return s(Zd.apply(null,arguments))}}function le(r){const e=t=>t[r]||[];return e.isThemeGetter=!0,e}const Fa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jd=/^\d+\/\d+$/,Qd=new Set(["px","full","screen"]),ep=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ip=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,np=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function vt(r){return Kt(r)||Qd.has(r)||Jd.test(r)}function Ot(r){return _r(r,"length",pp)}function Kt(r){return!!r&&!Number.isNaN(Number(r))}function Ui(r){return _r(r,"number",Kt)}function Jr(r){return!!r&&Number.isInteger(Number(r))}function sp(r){return r.endsWith("%")&&Kt(r.slice(0,-1))}function Z(r){return Fa.test(r)}function It(r){return ep.test(r)}const op=new Set(["length","size","percentage"]);function ap(r){return _r(r,op,Na)}function lp(r){return _r(r,"position",Na)}const up=new Set(["image","url"]);function cp(r){return _r(r,up,hp)}function dp(r){return _r(r,"",fp)}func