diff --git a/feature/vitest-migration/assets/index-7e3ad523.js b/feature/vitest-migration/assets/index-18ad4e1f.js similarity index 98% rename from feature/vitest-migration/assets/index-7e3ad523.js rename to feature/vitest-migration/assets/index-18ad4e1f.js index f9e626d4..1d4d4a85 100644 --- a/feature/vitest-migration/assets/index-7e3ad523.js +++ b/feature/vitest-migration/assets/index-18ad4e1f.js @@ -116,7 +116,7 @@ ${se.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function VY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HY(e,t){return e.button===0&&(!t||t==="_self")&&!VY(e)}const WY=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],YY=["aria-current","caseSensitive","className","end","style","to","children"];function qY(e){let{basename:t,children:n,window:r}=e,i=V.useRef();i.current==null&&(i.current=qW({window:r,v5Compat:!0}));let o=i.current,[s,a]=V.useState({action:o.action,location:o.location});return V.useLayoutEffect(()=>o.listen(a),[o]),V.createElement(UY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}const Lt=V.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:f}=t,h=tj(t,WY),p=NY(c,{relative:i}),m=GY(c,{replace:s,state:a,target:l,preventScrollReset:f,relative:i});function v(y){r&&r(y),y.defaultPrevented||m(y)}return V.createElement("a",zg({},h,{href:p,onClick:o?r:v,ref:n,target:l}))}),nj=V.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,children:c}=t,f=tj(t,YY),h=VS(l,{relative:f.relative}),p=Pn(),m=V.useContext(Zy),{navigator:v}=V.useContext(Fd),y=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,x=p.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(x=x.toLowerCase(),_=_?_.toLowerCase():null,y=y.toLowerCase());let w=x===y||!s&&x.startsWith(y)&&x.charAt(y.length)==="/",S=_!=null&&(_===y||!s&&_.startsWith(y)&&_.charAt(y.length)==="/"),T=w?r:void 0,P;typeof o=="function"?P=o({isActive:w,isPending:S}):P=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let k=typeof a=="function"?a({isActive:w,isPending:S}):a;return V.createElement(Lt,zg({},f,{"aria-current":T,className:P,ref:n,style:k,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var Kk;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Kk||(Kk={}));var Xk;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xk||(Xk={}));function GY(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=Io(),l=Pn(),c=VS(e,{relative:s});return V.useCallback(f=>{if(HY(f,n)){f.preventDefault();let h=r!==void 0?r:od(l)===od(c);a(e,{replace:h,state:i,preventScrollReset:o,relative:s})}},[l,a,c,r,i,n,e,o,s])}const ZY="shlink-web-client",KY="A React-based progressive web application for shlink",XY="/shlink-web-client/feature/vitest-migration",QY="https://github.com/shlinkio/shlink-web-client",JY="MIT",eq={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest run --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},tq={"@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},nq={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.0","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^4.0.0","@vitest/coverage-c8":"^0.31.1","adm-zip":"^0.5.10",chalk:"^5.2.0",eslint:"^8.30.0",jsdom:"^22.0.0","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0",typescript:"^5.0.2",vite:"^4.3.1","vite-plugin-pwa":"^0.14.4",vitest:"^0.31.1","vitest-canvas-mock":"^0.2.2"},rq=[">0.2%","not dead","not ie <= 11","not op_mini all"],Ug={name:ZY,description:KY,private:!1,homepage:XY,repository:QY,license:JY,scripts:eq,dependencies:tq,devDependencies:nq,browserslist:rq};var Oi,Qi=".",rj="function",ij="string",oj="__global__",WS="Provider",iq=0,YS=Array.prototype.slice,oq=function(t,n){var r=t[n];if(r===void 0&&Oi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Qy=function(t){var n;return this.nested[t]||(n=Oi.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},sj=function(t){return t.split(Qi).reduce(oq,this)},sq=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var a=0,l=function(f){if(f)throw f;t[a]&&t[a++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},aq=function(t,n){var r,i;return typeof t===rj&&(n=t,t=oj),r=t.split(Qi),i=r.shift(),r.length?Qy.call(this,i).middleware(r.join(Qi),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},lq=function(t,n){return n(t)},Qk=function(t,n){return(t[n]||[]).concat(t.__global__||[])},cq=function(t,n){var r,i,o,s,a;return this.id,o=this.container,s=this.decorators,a=this.middlewares,r=t+WS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=Qk(s,t).reduce(lq,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:sq(Qk(a,t),t,f,o)}},Object.defineProperties(o,i),this},aj=function(t,n){var r,i;return r=t.split(Qi),this.providerMap[t]&&r.length===1&&!this.container[t+WS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(Qy.call(this,i).provider(r.join(Qi),n),this):cq.call(this,i,n))},qS=function(t,n){return aj.call(this,t,function(){this.$get=n})},lj=function(t,n,r){var i=arguments.length>3?YS.call(arguments,3):[],o=this;return qS.call(this,t,function(){var a=n,l=i.map(sj,o.container);return r?new(n.bind.apply(n,[null].concat(l))):a.apply(null,l)})},uq=function(t,n){return lj.apply(this,[t,n,!0].concat(YS.call(arguments,2)))},fq=function(t,n){return lj.apply(this,[t,n,!1].concat(YS.call(arguments,2)))},cj=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},uj=function(t,n){var r=t[n];return r||(r={},cj.call(t,n,r)),r},dq=function(t,n){var r;return r=t.split(Qi),t=r.pop(),cj.call(r.reduce(uj,this.container),t,n),this},hq=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},pq=function(t,n){var r=t.split(Qi);return t=r.pop(),hq.call(r.reduce(uj,this.container),t,n),this},fj=function(t,n){var r,i;return typeof t===rj&&(n=t,t=oj),r=t.split(Qi),i=r.shift(),r.length?Qy.call(this,i).decorator(r.join(Qi),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},mq=function(t){return this.deferred.push(t),this},gq=function(t){return(t||[]).map(sj,this.container)},vq=function(t,n){return qS.call(this,t,function(i){return{instance:n.bind(n,i)}})},yq=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},GS=function(t){return Object.keys(t||this.container||{}).filter(yq)},Vg={},_q=function(t){var n;return typeof t===ij?(n=Vg[t],n||(Vg[t]=n=new Oi,n.constant("BOTTLE_NAME",t)),n):new Oi},bq=function(t){typeof t===ij?delete Vg[t]:Vg={}},dj=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Jk=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+WS]},wq=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var s=o.split(Qi);s.length>1&&s.forEach(Jk,Qy.call(this,s[0])),Jk.call(this,o),this.provider(o,n[o])}},this)},xq=function(t){return this.deferred.forEach(function(r){r(t)}),this};Oi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=iq++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:fj.bind(this),$register:dj.bind(this),$list:GS.bind(this)}};Oi.prototype={constant:pq,decorator:fj,defer:mq,digest:gq,factory:qS,instanceFactory:vq,list:GS,middleware:aq,provider:aj,resetProviders:wq,register:dj,resolve:xq,service:uq,serviceFactory:fq,value:dq};Oi.pop=_q;Oi.clear=bq;Oi.list=GS;Oi.config={strict:!1};const Sq=Oi;var Cq=function(){return!0};const hj=Cq;function Ot(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function yt(e){return function t(n){return arguments.length===0||Ot(n)?t:e.apply(this,arguments)}}function lt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:yt(function(i){return e(n,i)});default:return Ot(n)&&Ot(r)?t:Ot(n)?yt(function(i){return e(i,r)}):Ot(r)?yt(function(i){return e(n,i)}):e(n,r)}}}function Eq(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,o=[];for(n=0;n=arguments.length)?a=t[s]:(a=arguments[i],i+=1),r[s]=a,Ot(a)||(o-=1),s+=1}return o<=0?n.apply(this,r):Zc(o,Jy(e,r,n))}}var Tq=lt(function(t,n){return t===1?yt(n):Zc(t,Jy(t,[],n))});const Hg=Tq;function Qs(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:lt(function(o,s){return e(n,o,s)});case 2:return Ot(n)&&Ot(r)?t:Ot(n)?lt(function(o,s){return e(o,r,s)}):Ot(r)?lt(function(o,s){return e(n,o,s)}):yt(function(o){return e(n,r,o)});default:return Ot(n)&&Ot(r)&&Ot(i)?t:Ot(n)&&Ot(r)?lt(function(o,s){return e(o,s,i)}):Ot(n)&&Ot(i)?lt(function(o,s){return e(o,r,s)}):Ot(r)&&Ot(i)?lt(function(o,s){return e(n,o,s)}):Ot(n)?yt(function(o){return e(o,r,i)}):Ot(r)?yt(function(o){return e(n,o,i)}):Ot(i)?yt(function(o){return e(n,r,o)}):e(n,r,i)}}}const $d=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Oq(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function ZS(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!$d(i)){for(var o=0;ot?n:t});const pj=Pq;function am(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const mj=kq;var Mq=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function Rq(e){return new Mq(e)}var Nq=lt(function(t,n){return Zc(t.length,function(){return t.apply(n,arguments)})});const Lq=Nq;function Dq(e,t,n){for(var r=0,i=n.length;r=0;)n=iM[r],Mr(n,t)&&!Bq(i,n)&&(i[i.length]=n),r-=1;return i});const Ji=zq;var Uq=lt(ZS(["fantasy-land/map","map"],Iq,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Hg(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Kc(function(r,i){return r[i]=t(n[i]),r},{},Ji(n));default:return am(t,n)}}));const Bd=Uq,aw=Number.isInteger||function(t){return t<<0===t};var Vq=lt(function(t,n){var r=t<0?n.length+t:t;return e_(n)?n.charAt(r):n[r]});const vj=Vq;var Hq=lt(function(t,n){return t.map(function(r){for(var i=n,o=0,s;o1){var o=!Fo(r)&&Mr(i,r)?r[i]:aw(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(aw(i)&&$d(r)){var s=[].concat(r);return s[i]=n,s}else return ad(i,n,r)});const Ol=nG;function rG(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var iG=lt(function(t,n){var r=Hg(t,n);return Hg(t,function(){return Kc(Qq,Bd(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const oG=iG;var sG=yt(function(t){return oG(t.length,t)});const aG=sG;function lG(e){return function t(n){for(var r,i,o,s=[],a=0,l=n.length;a=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:lM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:lM(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=Ji(e);if(s.length!==Ji(t).length)return!1;var a=n.concat([e]),l=r.concat([t]);for(o=s.length-1;o>=0;){var c=s[o];if(!(Mr(c,t)&&JS(t[c],e[c],a,l)))return!1;o-=1}return!0}var CG=lt(function(t,n){return JS(t,n,[],[])});const eC=CG;function EG(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n=0}function G0(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var Lu=function(t){return(t<10?"0":"")+t},OG=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Lu(t.getUTCMonth()+1)+"-"+Lu(t.getUTCDate())+"T"+Lu(t.getUTCHours())+":"+Lu(t.getUTCMinutes())+":"+Lu(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const PG=OG;function kG(e){return function(){return!e.apply(this,arguments)}}function MG(e,t){for(var n=0,r=t.length,i=[];n":wj(s,a)},r=function(o,s){return am(function(a){return G0(a)+": "+n(o[a])},s.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+am(n,e).join(", ")+"))";case"[object Array]":return"["+am(n,e).concat(r(e,zd(function(o){return/^\d+$/.test(o)},Ji(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):G0(PG(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":G0(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var i=e.toString();if(i!=="[object Object]")return i}return"{"+r(e,Ji(e)).join(", ")+"}"}}var jG=yt(function(t){return wj(t,[])});const IG=jG;var FG=yt(function(t){var n=KS(pj,0,Bd(function(r){return r[0].length},t));return Zc(n,function(){for(var r=0;rs?1:0})});const bZ=_Z;var wZ=lt(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;i=0)&&(n[i]=e[i]);return n}function VY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function HY(e,t){return e.button===0&&(!t||t==="_self")&&!VY(e)}const WY=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],YY=["aria-current","caseSensitive","className","end","style","to","children"];function qY(e){let{basename:t,children:n,window:r}=e,i=V.useRef();i.current==null&&(i.current=qW({window:r,v5Compat:!0}));let o=i.current,[s,a]=V.useState({action:o.action,location:o.location});return V.useLayoutEffect(()=>o.listen(a),[o]),V.createElement(UY,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}const Lt=V.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:f}=t,h=tj(t,WY),p=NY(c,{relative:i}),m=GY(c,{replace:s,state:a,target:l,preventScrollReset:f,relative:i});function v(y){r&&r(y),y.defaultPrevented||m(y)}return V.createElement("a",zg({},h,{href:p,onClick:o?r:v,ref:n,target:l}))}),nj=V.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,children:c}=t,f=tj(t,YY),h=VS(l,{relative:f.relative}),p=Pn(),m=V.useContext(Zy),{navigator:v}=V.useContext(Fd),y=v.encodeLocation?v.encodeLocation(h).pathname:h.pathname,x=p.pathname,_=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(x=x.toLowerCase(),_=_?_.toLowerCase():null,y=y.toLowerCase());let w=x===y||!s&&x.startsWith(y)&&x.charAt(y.length)==="/",S=_!=null&&(_===y||!s&&_.startsWith(y)&&_.charAt(y.length)==="/"),T=w?r:void 0,P;typeof o=="function"?P=o({isActive:w,isPending:S}):P=[o,w?"active":null,S?"pending":null].filter(Boolean).join(" ");let k=typeof a=="function"?a({isActive:w,isPending:S}):a;return V.createElement(Lt,zg({},f,{"aria-current":T,className:P,ref:n,style:k,to:l}),typeof c=="function"?c({isActive:w,isPending:S}):c)});var Kk;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Kk||(Kk={}));var Xk;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xk||(Xk={}));function GY(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=Io(),l=Pn(),c=VS(e,{relative:s});return V.useCallback(f=>{if(HY(f,n)){f.preventDefault();let h=r!==void 0?r:od(l)===od(c);a(e,{replace:h,state:i,preventScrollReset:o,relative:s})}},[l,a,c,r,i,n,e,o,s])}const ZY="shlink-web-client",KY="A React-based progressive web application for shlink",XY="/shlink-web-client/feature/vitest-migration",QY="https://github.com/shlinkio/shlink-web-client",JY="MIT",eq={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest run --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},tq={"@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5","redux-localstorage-simple":"^2.5.1",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},nq={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.0","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^4.0.0","@vitest/coverage-c8":"^0.31.1","adm-zip":"^0.5.10",chalk:"^5.2.0",eslint:"^8.30.0",jsdom:"^22.0.0","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0",typescript:"^5.0.2",vite:"^4.3.1","vite-plugin-pwa":"^0.14.4",vitest:"^0.31.1","vitest-canvas-mock":"^0.2.2"},rq=[">0.2%","not dead","not ie <= 11","not op_mini all"],Ug={name:ZY,description:KY,private:!1,homepage:XY,repository:QY,license:JY,scripts:eq,dependencies:tq,devDependencies:nq,browserslist:rq};var Oi,Qi=".",rj="function",ij="string",oj="__global__",WS="Provider",iq=0,YS=Array.prototype.slice,oq=function(t,n){var r=t[n];if(r===void 0&&Oi.config.strict)throw new Error("Bottle was unable to resolve a service. `"+n+"` is undefined.");return r},Qy=function(t){var n;return this.nested[t]||(n=Oi.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},sj=function(t){return t.split(Qi).reduce(oq,this)},sq=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var a=0,l=function(f){if(f)throw f;t[a]&&t[a++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},aq=function(t,n){var r,i;return typeof t===rj&&(n=t,t=oj),r=t.split(Qi),i=r.shift(),r.length?Qy.call(this,i).middleware(r.join(Qi),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},lq=function(t,n){return n(t)},Qk=function(t,n){return(t[n]||[]).concat(t.__global__||[])},cq=function(t,n){var r,i,o,s,a;return this.id,o=this.container,s=this.decorators,a=this.middlewares,r=t+WS,i=Object.create(null),i[r]={configurable:!0,enumerable:!0,get:function(){var c=new n;return delete o[r],o[r]=c,c}},i[t]={configurable:!0,enumerable:!0,get:function(){var c=o[r],f;return c&&(f=Qk(s,t).reduce(lq,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:sq(Qk(a,t),t,f,o)}},Object.defineProperties(o,i),this},aj=function(t,n){var r,i;return r=t.split(Qi),this.providerMap[t]&&r.length===1&&!this.container[t+WS]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=n,this.providerMap[t]=!0,i=r.shift(),r.length?(Qy.call(this,i).provider(r.join(Qi),n),this):cq.call(this,i,n))},qS=function(t,n){return aj.call(this,t,function(){this.$get=n})},lj=function(t,n,r){var i=arguments.length>3?YS.call(arguments,3):[],o=this;return qS.call(this,t,function(){var a=n,l=i.map(sj,o.container);return r?new(n.bind.apply(n,[null].concat(l))):a.apply(null,l)})},uq=function(t,n){return lj.apply(this,[t,n,!0].concat(YS.call(arguments,2)))},fq=function(t,n){return lj.apply(this,[t,n,!1].concat(YS.call(arguments,2)))},cj=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},uj=function(t,n){var r=t[n];return r||(r={},cj.call(t,n,r)),r},dq=function(t,n){var r;return r=t.split(Qi),t=r.pop(),cj.call(r.reduce(uj,this.container),t,n),this},hq=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},pq=function(t,n){var r=t.split(Qi);return t=r.pop(),hq.call(r.reduce(uj,this.container),t,n),this},fj=function(t,n){var r,i;return typeof t===rj&&(n=t,t=oj),r=t.split(Qi),i=r.shift(),r.length?Qy.call(this,i).decorator(r.join(Qi),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},mq=function(t){return this.deferred.push(t),this},gq=function(t){return(t||[]).map(sj,this.container)},vq=function(t,n){return qS.call(this,t,function(i){return{instance:n.bind(n,i)}})},yq=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},GS=function(t){return Object.keys(t||this.container||{}).filter(yq)},Vg={},_q=function(t){var n;return typeof t===ij?(n=Vg[t],n||(Vg[t]=n=new Oi,n.constant("BOTTLE_NAME",t)),n):new Oi},bq=function(t){typeof t===ij?delete Vg[t]:Vg={}},dj=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Jk=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+WS]},wq=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var s=o.split(Qi);s.length>1&&s.forEach(Jk,Qy.call(this,s[0])),Jk.call(this,o),this.provider(o,n[o])}},this)},xq=function(t){return this.deferred.forEach(function(r){r(t)}),this};Oi=function e(t){if(!(this instanceof e))return e.pop(t);this.id=iq++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:fj.bind(this),$register:dj.bind(this),$list:GS.bind(this)}};Oi.prototype={constant:pq,decorator:fj,defer:mq,digest:gq,factory:qS,instanceFactory:vq,list:GS,middleware:aq,provider:aj,resetProviders:wq,register:dj,resolve:xq,service:uq,serviceFactory:fq,value:dq};Oi.pop=_q;Oi.clear=bq;Oi.list=GS;Oi.config={strict:!1};const Sq=Oi;var Cq=function(){return!0};const hj=Cq;function Ot(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function yt(e){return function t(n){return arguments.length===0||Ot(n)?t:e.apply(this,arguments)}}function lt(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:yt(function(i){return e(n,i)});default:return Ot(n)&&Ot(r)?t:Ot(n)?yt(function(i){return e(i,r)}):Ot(r)?yt(function(i){return e(n,i)}):e(n,r)}}}function Eq(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,o=[];for(n=0;n=arguments.length)?a=t[s]:(a=arguments[i],i+=1),r[s]=a,Ot(a)||(o-=1),s+=1}return o<=0?n.apply(this,r):Zc(o,Jy(e,r,n))}}var Tq=lt(function(t,n){return t===1?yt(n):Zc(t,Jy(t,[],n))});const Hg=Tq;function Qs(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return Ot(n)?t:lt(function(o,s){return e(n,o,s)});case 2:return Ot(n)&&Ot(r)?t:Ot(n)?lt(function(o,s){return e(o,r,s)}):Ot(r)?lt(function(o,s){return e(n,o,s)}):yt(function(o){return e(n,r,o)});default:return Ot(n)&&Ot(r)&&Ot(i)?t:Ot(n)&&Ot(r)?lt(function(o,s){return e(o,s,i)}):Ot(n)&&Ot(i)?lt(function(o,s){return e(o,r,s)}):Ot(r)&&Ot(i)?lt(function(o,s){return e(n,o,s)}):Ot(n)?yt(function(o){return e(o,r,i)}):Ot(r)?yt(function(o){return e(n,o,i)}):Ot(i)?yt(function(o){return e(n,r,o)}):e(n,r,i)}}}const $d=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function Oq(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function ZS(e,t,n){return function(){if(arguments.length===0)return n();var r=Array.prototype.slice.call(arguments,0),i=r.pop();if(!$d(i)){for(var o=0;ot?n:t});const pj=Pq;function am(e,t){for(var n=0,r=t.length,i=Array(r);n0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1});const mj=kq;var Mq=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function Rq(e){return new Mq(e)}var Nq=lt(function(t,n){return Zc(t.length,function(){return t.apply(n,arguments)})});const Lq=Nq;function Dq(e,t,n){for(var r=0,i=n.length;r=0;)n=iM[r],Mr(n,t)&&!Bq(i,n)&&(i[i.length]=n),r-=1;return i});const Ji=zq;var Uq=lt(ZS(["fantasy-land/map","map"],Iq,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Hg(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Kc(function(r,i){return r[i]=t(n[i]),r},{},Ji(n));default:return am(t,n)}}));const Bd=Uq,aw=Number.isInteger||function(t){return t<<0===t};var Vq=lt(function(t,n){var r=t<0?n.length+t:t;return e_(n)?n.charAt(r):n[r]});const vj=Vq;var Hq=lt(function(t,n){return t.map(function(r){for(var i=n,o=0,s;o1){var o=!Fo(r)&&Mr(i,r)?r[i]:aw(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,o)}if(aw(i)&&$d(r)){var s=[].concat(r);return s[i]=n,s}else return ad(i,n,r)});const Ol=nG;function rG(e){var t=Object.prototype.toString.call(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object AsyncGeneratorFunction]"}var iG=lt(function(t,n){var r=Hg(t,n);return Hg(t,function(){return Kc(Qq,Bd(r,arguments[0]),Array.prototype.slice.call(arguments,1))})});const oG=iG;var sG=yt(function(t){return oG(t.length,t)});const aG=sG;function lG(e){return function t(n){for(var r,i,o,s=[],a=0,l=n.length;a=0;){if(n[o]===e)return r[o]===t;o-=1}switch(i){case"Map":return e.size!==t.size?!1:lM(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:lM(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=Ji(e);if(s.length!==Ji(t).length)return!1;var a=n.concat([e]),l=r.concat([t]);for(o=s.length-1;o>=0;){var c=s[o];if(!(Mr(c,t)&&JS(t[c],e[c],a,l)))return!1;o-=1}return!0}var CG=lt(function(t,n){return JS(t,n,[],[])});const eC=CG;function EG(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n=0}function G0(e){var t=e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+t.replace(/"/g,'\\"')+'"'}var Lu=function(t){return(t<10?"0":"")+t},OG=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Lu(t.getUTCMonth()+1)+"-"+Lu(t.getUTCDate())+"T"+Lu(t.getUTCHours())+":"+Lu(t.getUTCMinutes())+":"+Lu(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};const PG=OG;function kG(e){return function(){return!e.apply(this,arguments)}}function MG(e,t){for(var n=0,r=t.length,i=[];n":wj(s,a)},r=function(o,s){return am(function(a){return G0(a)+": "+n(o[a])},s.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+am(n,e).join(", ")+"))";case"[object Array]":return"["+am(n,e).concat(r(e,zd(function(o){return/^\d+$/.test(o)},Ji(e)))).join(", ")+"]";case"[object Boolean]":return typeof e=="object"?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):G0(PG(e)))+")";case"[object Null]":return"null";case"[object Number]":return typeof e=="object"?"new Number("+n(e.valueOf())+")":1/e===-1/0?"-0":e.toString(10);case"[object String]":return typeof e=="object"?"new String("+n(e.valueOf())+")":G0(e);case"[object Undefined]":return"undefined";default:if(typeof e.toString=="function"){var i=e.toString();if(i!=="[object Object]")return i}return"{"+r(e,Ji(e)).join(", ")+"}"}}var jG=yt(function(t){return wj(t,[])});const IG=jG;var FG=yt(function(t){var n=KS(pj,0,Bd(function(r){return r[0].length},t));return Zc(n,function(){for(var r=0;rs?1:0})});const bZ=_Z;var wZ=lt(function(t,n){if(t<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],i=0;i!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),ks=e=>!!(e!=null&&e.id),t_=e=>!!(e!=null&&e.version),MZ=e=>!!(e!=null&&e.serverNotFound),Ud=e=>ks(e)?e.id:"",RZ=e=>dZ(["id","autoConnect"],e),n_=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",kj=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,s=n==="ASC"?-1:1;return r[t]>i[t]?o:s}),Mj=e=>e.dir?`${e.field}-${e.dir}`:void 0,NZ=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};var LZ=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0},uM=typeof Symbol<"u"&&Symbol,DZ=LZ,AZ=function(){return typeof uM!="function"||typeof Symbol!="function"||typeof uM("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:DZ()},jZ="Function.prototype.bind called on incompatible ",Z0=Array.prototype.slice,IZ=Object.prototype.toString,FZ="[object Function]",$Z=function(t){var n=this;if(typeof n!="function"||IZ.call(n)!==FZ)throw new TypeError(jZ+n);for(var r=Z0.call(arguments,1),i,o=function(){if(this instanceof i){var f=n.apply(this,r.concat(Z0.call(arguments)));return Object(f)===f?f:this}else return n.apply(t,r.concat(Z0.call(arguments)))},s=Math.max(0,n.length-r.length),a=[],l=0;l"u"?st:ts(Uint8Array),dc={"%AggregateError%":typeof AggregateError>"u"?st:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?st:ArrayBuffer,"%ArrayIteratorPrototype%":Pl?ts([][Symbol.iterator]()):st,"%AsyncFromSyncIteratorPrototype%":st,"%AsyncFunction%":Fl,"%AsyncGenerator%":Fl,"%AsyncGeneratorFunction%":Fl,"%AsyncIteratorPrototype%":Fl,"%Atomics%":typeof Atomics>"u"?st:Atomics,"%BigInt%":typeof BigInt>"u"?st:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?st:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?st:Float32Array,"%Float64Array%":typeof Float64Array>"u"?st:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?st:FinalizationRegistry,"%Function%":Rj,"%GeneratorFunction%":Fl,"%Int8Array%":typeof Int8Array>"u"?st:Int8Array,"%Int16Array%":typeof Int16Array>"u"?st:Int16Array,"%Int32Array%":typeof Int32Array>"u"?st:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Pl?ts(ts([][Symbol.iterator]())):st,"%JSON%":typeof JSON=="object"?JSON:st,"%Map%":typeof Map>"u"?st:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Pl?st:ts(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?st:Promise,"%Proxy%":typeof Proxy>"u"?st:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?st:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?st:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Pl?st:ts(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?st:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Pl?ts(""[Symbol.iterator]()):st,"%Symbol%":Pl?Symbol:st,"%SyntaxError%":cd,"%ThrowTypeError%":VZ,"%TypedArray%":HZ,"%TypeError%":fc,"%Uint8Array%":typeof Uint8Array>"u"?st:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?st:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?st:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?st:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?st:WeakMap,"%WeakRef%":typeof WeakRef>"u"?st:WeakRef,"%WeakSet%":typeof WeakSet>"u"?st:WeakSet},WZ=function e(t){var n;if(t==="%AsyncFunction%")n=K0("async function () {}");else if(t==="%GeneratorFunction%")n=K0("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=K0("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(n=ts(i.prototype))}return dc[t]=n,n},fM={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},r_=iC,Gg=UZ,YZ=r_.call(Function.call,Array.prototype.concat),qZ=r_.call(Function.apply,Array.prototype.splice),dM=r_.call(Function.call,String.prototype.replace),Zg=r_.call(Function.call,String.prototype.slice),GZ=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ZZ=/\\(\\)?/g,KZ=function(t){var n=Zg(t,0,1),r=Zg(t,-1);if(n==="%"&&r!=="%")throw new cd("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new cd("invalid intrinsic syntax, expected opening `%`");var i=[];return dM(t,GZ,function(o,s,a,l){i[i.length]=a?dM(l,ZZ,"$1"):s||o}),i},XZ=function(t,n){var r=t,i;if(Gg(fM,r)&&(i=fM[r],r="%"+i[0]+"%"),Gg(dc,r)){var o=dc[r];if(o===Fl&&(o=WZ(r)),typeof o>"u"&&!n)throw new fc("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new cd("intrinsic "+t+" does not exist!")},oC=function(t,n){if(typeof t!="string"||t.length===0)throw new fc("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new fc('"allowMissing" argument must be a boolean');var r=KZ(t),i=r.length>0?r[0]:"",o=XZ("%"+i+"%",n),s=o.name,a=o.value,l=!1,c=o.alias;c&&(i=c[0],qZ(r,YZ([0,1],c)));for(var f=1,h=!0;f=r.length){var y=Ba(a,p);h=!!y,h&&"get"in y&&!("originalValue"in y.get)?a=y.get:a=a[p]}else h=Gg(a,p),a=a[p];h&&!l&&(dc[s]=a)}}return a},cw={},QZ={get exports(){return cw},set exports(e){cw=e}};(function(e){var t=iC,n=oC,r=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),o=n("%Reflect.apply%",!0)||t.call(i,r),s=n("%Object.getOwnPropertyDescriptor%",!0),a=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}e.exports=function(h){var p=o(t,i,arguments);if(s&&a){var m=s(p,"length");m.configurable&&a(p,"length",{value:1+l(0,h.length-(arguments.length-1))})}return p};var c=function(){return o(t,r,arguments)};a?a(e.exports,"apply",{value:c}):e.exports.apply=c})(QZ);var Nj=oC,Lj=cw,JZ=Lj(Nj("String.prototype.indexOf")),eK=function(t,n){var r=Nj(t,!!n);return typeof r=="function"&&JZ(t,".prototype.")>-1?Lj(r):r};const tK={},nK=Object.freeze(Object.defineProperty({__proto__:null,default:tK},Symbol.toStringTag,{value:"Module"})),rK=d$(nK);var sC=typeof Map=="function"&&Map.prototype,Q0=Object.getOwnPropertyDescriptor&&sC?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Kg=sC&&Q0&&typeof Q0.get=="function"?Q0.get:null,iK=sC&&Map.prototype.forEach,aC=typeof Set=="function"&&Set.prototype,J0=Object.getOwnPropertyDescriptor&&aC?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xg=aC&&J0&&typeof J0.get=="function"?J0.get:null,oK=aC&&Set.prototype.forEach,sK=typeof WeakMap=="function"&&WeakMap.prototype,_f=sK?WeakMap.prototype.has:null,aK=typeof WeakSet=="function"&&WeakSet.prototype,bf=aK?WeakSet.prototype.has:null,lK=typeof WeakRef=="function"&&WeakRef.prototype,hM=lK?WeakRef.prototype.deref:null,cK=Boolean.prototype.valueOf,uK=Object.prototype.toString,fK=Function.prototype.toString,dK=String.prototype.match,lC=String.prototype.slice,ms=String.prototype.replace,hK=String.prototype.toUpperCase,pM=String.prototype.toLowerCase,Dj=RegExp.prototype.test,mM=Array.prototype.concat,zi=Array.prototype.join,pK=Array.prototype.slice,gM=Math.floor,uw=typeof BigInt=="function"?BigInt.prototype.valueOf:null,e1=Object.getOwnPropertySymbols,fw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Mc=typeof Symbol=="function"&&typeof Symbol.iterator=="object",nr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Mc||"symbol")?Symbol.toStringTag:null,Aj=Object.prototype.propertyIsEnumerable,vM=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function yM(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Dj.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-gM(-e):gM(e);if(r!==e){var i=String(r),o=lC.call(t,i.length+1);return ms.call(i,n,"$&_")+"."+ms.call(ms.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ms.call(t,n,"$&_")}var t1=rK.custom,n1=t1&&Ij(t1)?t1:null,mK=function e(t,n,r,i){var o=n||{};if(ns(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ns(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ns(o,"customInspect")?o.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ns(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ns(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return $j(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?yM(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?yM(t,c):c}var f=typeof o.depth>"u"?5:o.depth;if(typeof r>"u"&&(r=0),r>=f&&f>0&&typeof t=="object")return dw(t)?"[Array]":"[Object]";var h=DK(o,r);if(typeof i>"u")i=[];else if(Fj(i,t)>=0)return"[Circular]";function p(J,Z,ee){if(Z&&(i=pK.call(i),i.push(Z)),ee){var ie={depth:o.depth};return ns(o,"quoteStyle")&&(ie.quoteStyle=o.quoteStyle),e(J,ie,r+1,i)}return e(J,o,r+1,i)}if(typeof t=="function"){var m=EK(t),v=hp(t,p);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(v.length>0?" { "+zi.call(v,", ")+" }":"")}if(Ij(t)){var y=Mc?ms.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):fw.call(t);return typeof t=="object"&&!Mc?Au(y):y}if(RK(t)){for(var x="<"+pM.call(String(t.nodeName)),_=t.attributes||[],w=0;w<_.length;w++)x+=" "+_[w].name+"="+jj(gK(_[w].value),"double",o);return x+=">",t.childNodes&&t.childNodes.length&&(x+="..."),x+="",x}if(dw(t)){if(t.length===0)return"[]";var S=hp(t,p);return h&&!LK(S)?"["+hw(S,h)+"]":"[ "+zi.call(S,", ")+" ]"}if(_K(t)){var T=hp(t,p);return"cause"in t&&!Aj.call(t,"cause")?"{ ["+String(t)+"] "+zi.call(mM.call("[cause]: "+p(t.cause),T),", ")+" }":T.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+zi.call(T,", ")+" }"}if(typeof t=="object"&&s){if(n1&&typeof t[n1]=="function")return t[n1]();if(s!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(TK(t)){var P=[];return iK.call(t,function(J,Z){P.push(p(Z,t,!0)+" => "+p(J,t))}),_M("Map",Kg.call(t),P,h)}if(kK(t)){var k=[];return oK.call(t,function(J){k.push(p(J,t))}),_M("Set",Xg.call(t),k,h)}if(OK(t))return r1("WeakMap");if(MK(t))return r1("WeakSet");if(PK(t))return r1("WeakRef");if(wK(t))return Au(p(Number(t)));if(SK(t))return Au(p(uw.call(t)));if(xK(t))return Au(cK.call(t));if(bK(t))return Au(p(String(t)));if(!vK(t)&&!yK(t)){var N=hp(t,p),D=vM?vM(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",A=!D&&nr&&Object(t)===t&&nr in t?lC.call(Js(t),8,-1):z?"Object":"",W=D||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",Y=W+(A||z?"["+zi.call(mM.call([],A||[],z||[]),": ")+"] ":"");return N.length===0?Y+"{}":h?Y+"{"+hw(N,h)+"}":Y+"{ "+zi.call(N,", ")+" }"}return String(t)};function jj(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function gK(e){return ms.call(String(e),/"/g,""")}function dw(e){return Js(e)==="[object Array]"&&(!nr||!(typeof e=="object"&&nr in e))}function vK(e){return Js(e)==="[object Date]"&&(!nr||!(typeof e=="object"&&nr in e))}function yK(e){return Js(e)==="[object RegExp]"&&(!nr||!(typeof e=="object"&&nr in e))}function _K(e){return Js(e)==="[object Error]"&&(!nr||!(typeof e=="object"&&nr in e))}function bK(e){return Js(e)==="[object String]"&&(!nr||!(typeof e=="object"&&nr in e))}function wK(e){return Js(e)==="[object Number]"&&(!nr||!(typeof e=="object"&&nr in e))}function xK(e){return Js(e)==="[object Boolean]"&&(!nr||!(typeof e=="object"&&nr in e))}function Ij(e){if(Mc)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!fw)return!1;try{return fw.call(e),!0}catch{}return!1}function SK(e){if(!e||typeof e!="object"||!uw)return!1;try{return uw.call(e),!0}catch{}return!1}var CK=Object.prototype.hasOwnProperty||function(e){return e in this};function ns(e,t){return CK.call(e,t)}function Js(e){return uK.call(e)}function EK(e){if(e.name)return e.name;var t=dK.call(fK.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Fj(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return $j(lC.call(e,0,t.maxStringLength),t)+r}var i=ms.call(ms.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,NK);return jj(i,"single",t)}function NK(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+hK.call(t.toString(16))}function Au(e){return"Object("+e+")"}function r1(e){return e+" { ? }"}function _M(e,t,n,r){var i=r?hw(n,r):zi.call(n,", ");return e+" ("+t+") {"+i+"}"}function LK(e){for(var t=0;t=0)return!1;return!0}function DK(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=zi.call(Array(e.indent+1)," ");else return null;return{base:n,prev:zi.call(Array(t+1),n)}}function hw(e,t){if(e.length===0)return"";var n=` `+t.prev+t.base;return n+zi.call(e,","+n)+` diff --git a/feature/vitest-migration/index.html b/feature/vitest-migration/index.html index 72f97063..60f437b2 100644 --- a/feature/vitest-migration/index.html +++ b/feature/vitest-migration/index.html @@ -79,7 +79,7 @@ Shlink — The URL shortener - + diff --git a/feature/vitest-migration/service-worker.js b/feature/vitest-migration/service-worker.js index f4c4ed8c..6fac93e4 100644 --- a/feature/vitest-migration/service-worker.js +++ b/feature/vitest-migration/service-worker.js @@ -1,2 +1,2 @@ try{self["workbox:core:6.5.3"]&&_()}catch{}const z=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},G=z;class h extends Error{constructor(e,t){const n=G(e,t);super(n),this.name=e,this.details=t}}const B=new Set;function Q(s){B.add(s)}const d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},E=s=>[d.prefix,s,d.suffix].filter(e=>e&&e.length>0).join("-"),J=s=>{for(const e of Object.keys(d))s(e)},x={updateDetails:s=>{J(e=>{typeof s[e]=="string"&&(d[e]=s[e])})},getGoogleAnalyticsName:s=>s||E(d.googleAnalytics),getPrecacheName:s=>s||E(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||E(d.runtime),getSuffix:()=>d.suffix};function K(s,e){const t=new URL(s);for(const n of e)t.searchParams.delete(n);return t.href}async function X(s,e,t,n){const r=K(e.url,t);if(e.url===r)return s.match(e,n);const a=Object.assign(Object.assign({},n),{ignoreSearch:!0}),i=await s.keys(e,a);for(const c of i){const o=K(c.url,t);if(r===o)return s.match(c,n)}}let m;function Y(){if(m===void 0){const s=new Response("");if("body"in s)try{new Response(s.body),m=!0}catch{m=!1}m=!1}return m}function q(s){s.then(()=>{})}class Z{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}async function ee(){for(const s of B)await s()}const te=s=>new URL(String(s),location.href).href.replace(new RegExp(`^${location.origin}`),"");function se(s){return new Promise(e=>setTimeout(e,s))}function A(s,e){const t=e();return s.waitUntil(t),t}async function ne(s,e){let t=null;if(s.url&&(t=new URL(s.url).origin),t!==self.location.origin)throw new h("cross-origin-copy-response",{origin:t});const n=s.clone(),r={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},a=e?e(r):r,i=Y()?n.body:await n.blob();return new Response(i,a)}function re(){self.addEventListener("activate",()=>self.clients.claim())}const ae=(s,e)=>e.some(t=>s instanceof t);let j,O;function ie(){return j||(j=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ce(){return O||(O=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const F=new WeakMap,U=new WeakMap,H=new WeakMap,k=new WeakMap,P=new WeakMap;function oe(s){const e=new Promise((t,n)=>{const r=()=>{s.removeEventListener("success",a),s.removeEventListener("error",i)},a=()=>{t(f(s.result)),r()},i=()=>{n(s.error),r()};s.addEventListener("success",a),s.addEventListener("error",i)});return e.then(t=>{t instanceof IDBCursor&&F.set(t,s)}).catch(()=>{}),P.set(e,s),e}function le(s){if(U.has(s))return;const e=new Promise((t,n)=>{const r=()=>{s.removeEventListener("complete",a),s.removeEventListener("error",i),s.removeEventListener("abort",i)},a=()=>{t(),r()},i=()=>{n(s.error||new DOMException("AbortError","AbortError")),r()};s.addEventListener("complete",a),s.addEventListener("error",i),s.addEventListener("abort",i)});U.set(s,e)}let T={get(s,e,t){if(s instanceof IDBTransaction){if(e==="done")return U.get(s);if(e==="objectStoreNames")return s.objectStoreNames||H.get(s);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return f(s[e])},set(s,e,t){return s[e]=t,!0},has(s,e){return s instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in s}};function he(s){T=s(T)}function ue(s){return s===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=s.call(D(this),e,...t);return H.set(n,e.sort?e.sort():[e]),f(n)}:ce().includes(s)?function(...e){return s.apply(D(this),e),f(F.get(this))}:function(...e){return f(s.apply(D(this),e))}}function de(s){return typeof s=="function"?ue(s):(s instanceof IDBTransaction&&le(s),ae(s,ie())?new Proxy(s,T):s)}function f(s){if(s instanceof IDBRequest)return oe(s);if(k.has(s))return k.get(s);const e=de(s);return e!==s&&(k.set(s,e),P.set(e,s)),e}const D=s=>P.get(s);function fe(s,e,{blocked:t,upgrade:n,blocking:r,terminated:a}={}){const i=indexedDB.open(s,e),c=f(i);return n&&i.addEventListener("upgradeneeded",o=>{n(f(i.result),o.oldVersion,o.newVersion,f(i.transaction),o)}),t&&i.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{a&&o.addEventListener("close",()=>a()),r&&o.addEventListener("versionchange",l=>r(l.oldVersion,l.newVersion,l))}).catch(()=>{}),c}function pe(s,{blocked:e}={}){const t=indexedDB.deleteDatabase(s);return e&&t.addEventListener("blocked",n=>e(n.oldVersion,n)),f(t).then(()=>{})}const ge=["get","getKey","getAll","getAllKeys","count"],me=["put","add","delete","clear"],v=new Map;function S(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(v.get(e))return v.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,r=me.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(r||ge.includes(t)))return;const a=async function(i,...c){const o=this.transaction(i,r?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),r&&o.done]))[0]};return v.set(e,a),a}he(s=>({...s,get:(e,t,n)=>S(e,t)||s.get(e,t,n),has:(e,t)=>!!S(e,t)||s.has(e,t)}));try{self["workbox:expiration:6.5.3"]&&_()}catch{}const ye="workbox-expiration",y="cache-entries",W=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class we{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(y,{keyPath:"id"});t.createIndex("cacheName","cacheName",{unique:!1}),t.createIndex("timestamp","timestamp",{unique:!1})}_upgradeDbAndDeleteOldDbs(e){this._upgradeDb(e),this._cacheName&&pe(this._cacheName)}async setTimestamp(e,t){e=W(e);const n={url:e,timestamp:t,cacheName:this._cacheName,id:this._getId(e)},a=(await this.getDb()).transaction(y,"readwrite",{durability:"relaxed"});await a.store.put(n),await a.done}async getTimestamp(e){const n=await(await this.getDb()).get(y,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let r=await n.transaction(y).store.index("timestamp").openCursor(null,"prev");const a=[];let i=0;for(;r;){const o=r.value;o.cacheName===this._cacheName&&(e&&o.timestamp=t?a.push(r.value):i++),r=await r.continue()}const c=[];for(const o of a)await n.delete(y,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+W(e)}async getDb(){return this._db||(this._db=await fe(ye,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class be{constructor(e,t={}){this._isRunning=!1,this._rerunRequested=!1,this._maxEntries=t.maxEntries,this._maxAgeSeconds=t.maxAgeSeconds,this._matchOptions=t.matchOptions,this._cacheName=e,this._timestampModel=new we(e)}async expireEntries(){if(this._isRunning){this._rerunRequested=!0;return}this._isRunning=!0;const e=this._maxAgeSeconds?Date.now()-this._maxAgeSeconds*1e3:0,t=await this._timestampModel.expireEntries(e,this._maxEntries),n=await self.caches.open(this._cacheName);for(const r of t)await n.delete(r,this._matchOptions);this._isRunning=!1,this._rerunRequested&&(this._rerunRequested=!1,q(this.expireEntries()))}async updateTimestamp(e){await this._timestampModel.setTimestamp(e,Date.now())}async isURLExpired(e){if(this._maxAgeSeconds){const t=await this._timestampModel.getTimestamp(e),n=Date.now()-this._maxAgeSeconds*1e3;return t!==void 0?t{if(!a)return null;const i=this._isResponseDateFresh(a),c=this._getCacheExpiration(r);q(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return i?a:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const r=this._getCacheExpiration(t);await r.updateTimestamp(n.url),await r.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&Q(()=>this.deleteCacheAndMetadata())}_getCacheExpiration(e){if(e===x.getRuntimeName())throw new h("expire-custom-caches-only");let t=this._cacheExpirations.get(e);return t||(t=new be(e,this._config),this._cacheExpirations.set(e,t)),t}_isResponseDateFresh(e){if(!this._maxAgeSeconds)return!0;const t=this._getDateHeaderTimestamp(e);if(t===null)return!0;const n=Date.now();return t>=n-this._maxAgeSeconds*1e3}_getDateHeaderTimestamp(e){if(!e.headers.has("date"))return null;const t=e.headers.get("date"),r=new Date(t).getTime();return isNaN(r)?null:r}async deleteCacheAndMetadata(){for(const[e,t]of this._cacheExpirations)await self.caches.delete(e),await t.delete();this._cacheExpirations=new Map}}try{self["workbox:precaching:6.5.3"]&&_()}catch{}const Re="__WB_REVISION__";function Ce(s){if(!s)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(typeof s=="string"){const a=new URL(s,location.href);return{cacheKey:a.href,url:a.href}}const{revision:e,url:t}=s;if(!t)throw new h("add-to-cache-list-unexpected-type",{entry:s});if(!e){const a=new URL(t,location.href);return{cacheKey:a.href,url:a.href}}const n=new URL(t,location.href),r=new URL(t,location.href);return n.searchParams.set(Re,e),{cacheKey:n.href,url:r.href}}class xe{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:n})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const r=t.originalRequest.url;n?this.notUpdatedURLs.push(r):this.updatedURLs.push(r)}return n}}}class Ee{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const r=(n==null?void 0:n.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return r?new Request(r,{headers:t.headers}):t},this._precacheController=e}}try{self["workbox:strategies:6.5.3"]&&_()}catch{}function R(s){return typeof s=="string"?new Request(s):s}class ke{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new Z,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const n of this._plugins)this._pluginStateMap.set(n,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let n=R(e);if(n.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const i=await t.preloadResponse;if(i)return i}const r=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const i of this.iterateCallbacks("requestWillFetch"))n=await i({request:n.clone(),event:t})}catch(i){if(i instanceof Error)throw new h("plugin-error-request-will-fetch",{thrownErrorMessage:i.message})}const a=n.clone();try{let i;i=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))i=await c({event:t,request:a,response:i});return i}catch(i){throw r&&await this.runCallbacks("fetchDidFail",{error:i,event:t,originalRequest:r.clone(),request:a.clone()}),i}}async fetchAndCachePut(e){const t=await this.fetch(e),n=t.clone();return this.waitUntil(this.cachePut(e,n)),t}async cacheMatch(e){const t=R(e);let n;const{cacheName:r,matchOptions:a}=this._strategy,i=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},a),{cacheName:r});n=await caches.match(i,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:r,matchOptions:a,cachedResponse:n,request:i,event:this.event})||void 0;return n}async cachePut(e,t){const n=R(e);await se(0);const r=await this.getCacheKey(n,"write");if(!t)throw new h("cache-put-with-no-response",{url:te(r.url)});const a=await this._ensureResponseSafeToCache(t);if(!a)return!1;const{cacheName:i,matchOptions:c}=this._strategy,o=await self.caches.open(i),l=this.hasCallback("cacheDidUpdate"),g=l?await X(o,r.clone(),["__WB_REVISION__"],c):null;try{await o.put(r,l?a.clone():a)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await ee(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:i,oldResponse:g,newResponse:a.clone(),request:r,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let r=e;for(const a of this.iterateCallbacks("cacheKeyWillBeUsed"))r=R(await a({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[n]=r}return this._cacheKeys[n]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const n of this.iterateCallbacks(e))await n(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const n=this._pluginStateMap.get(t);yield a=>{const i=Object.assign(Object.assign({},a),{state:n});return t[e](i)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){let e;for(;e=this._extendLifetimePromises.shift();)await e}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,n=!1;for(const r of this.iterateCallbacks("cacheWillUpdate"))if(t=await r({request:this.request,response:t,event:this.event})||void 0,n=!0,!t)break;return n||t&&t.status!==200&&(t=void 0),t}}class V{constructor(e={}){this.cacheName=x.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,n=typeof e.request=="string"?new Request(e.request):e.request,r="params"in e?e.params:void 0,a=new ke(this,{event:t,request:n,params:r}),i=this._getResponse(a,n,t),c=this._awaitComplete(i,a,n,t);return[i,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let r;try{if(r=await this._handle(t,e),!r||r.type==="error")throw new h("no-response",{url:t.url})}catch(a){if(a instanceof Error){for(const i of e.iterateCallbacks("handlerDidError"))if(r=await i({error:a,event:n,request:t}),r)break}if(!r)throw a}for(const a of e.iterateCallbacks("handlerWillRespond"))r=await a({event:n,request:t,response:r});return r}async _awaitComplete(e,t,n,r){let a,i;try{a=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:r,request:n,response:a}),await t.doneWaiting()}catch(c){c instanceof Error&&(i=c)}if(await t.runCallbacks("handlerDidComplete",{event:r,request:n,response:a,error:i}),t.destroy(),i)throw i}}class p extends V{constructor(e={}){e.cacheName=x.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(p.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const n=await t.cacheMatch(e);return n||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let n;const r=t.params||{};if(this._fallbackToNetwork){const a=r.integrity,i=e.integrity,c=!i||i===a;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?i||a:void 0})),a&&c&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,n.clone()))}else throw new h("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return n}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const n=await t.fetch(e);if(!await t.cachePut(e,n.clone()))throw new h("bad-precaching-response",{url:e.url,status:n.status});return n}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[n,r]of this.plugins.entries())r!==p.copyRedirectedCacheableResponsesPlugin&&(r===p.defaultPrecacheCacheabilityPlugin&&(e=n),r.cacheWillUpdate&&t++);t===0?this.plugins.push(p.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}p.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:s}){return!s||s.status>=400?null:s}};p.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:s}){return s.redirected?await ne(s):s}};class De{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:n=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new p({cacheName:x.getPrecacheName(e),plugins:[...t,new Ee({precacheController:this})],fallbackToNetwork:n}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const n of e){typeof n=="string"?t.push(n):n&&n.revision===void 0&&t.push(n.url);const{cacheKey:r,url:a}=Ce(n),i=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==r)throw new h("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:r});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(r)&&this._cacheKeysToIntegrities.get(r)!==n.integrity)throw new h("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(r,n.integrity)}if(this._urlsToCacheKeys.set(a,r),this._urlsToCacheModes.set(a,i),t.length>0){const c=`Workbox is precaching URLs without revision info: ${t.join(", ")} -This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return A(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[a,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(a),l=new Request(a,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),r=new Set(this._urlsToCacheKeys.values()),a=[];for(const i of n)r.has(i.url)||(await t.delete(i),a.push(i.url));return{deletedURLs:a}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let L;const I=()=>(L||(L=new De),L);try{self["workbox:routing:6.5.3"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class b{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class ve extends b{constructor(e,t,n){const r=({url:a})=>{const i=e.exec(a.href);if(i&&!(a.origin!==location.origin&&i.index!==0))return i.slice(1)};super(r,t,n)}}class Le{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(r=>{typeof r=="string"&&(r=[r]);const a=new Request(...r);return this.handleRequest({request:a,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const r=n.origin===location.origin,{params:a,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:a})}catch(u){l=Promise.reject(u)}const g=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:a})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){const a=this._routes.get(n.method)||[];for(const i of a){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:r});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=$){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let w;const Ue=()=>(w||(w=new Le,w.addFetchListener(),w.addCacheListener()),w);function M(s,e,t){let n;if(typeof s=="string"){const a=new URL(s,location.href),i=({url:c})=>c.href===a.href;n=new b(i,e,t)}else if(s instanceof RegExp)n=new ve(s,e,t);else if(typeof s=="function")n=new b(s,e,t);else if(s instanceof b)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Ue().registerRoute(n),n}function Te(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Pe(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const a=new URL(s,location.href);a.hash="",yield a.href;const i=Te(a,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(r){const c=r({url:a});for(const o of c)yield o.href}}class Ie extends b{constructor(e,t){const n=({request:r})=>{const a=e.getURLsToCacheKeys();for(const i of Pe(r.url,t)){const c=a.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function Me(s){const e=I(),t=new Ie(e,s);M(t)}function Ne(s){return I().createHandlerBoundToURL(s)}function Ke(s){I().precache(s)}function Ae(s,e){Ke(s),Me(e)}const je={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Oe extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(je)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let r=await t.cacheMatch(e),a;if(!r)try{r=await n}catch(i){i instanceof Error&&(a=i)}if(!r)throw new h("no-response",{url:e.url,error:a});return r}}const Se="shlink-web-client",We="A React-based progressive web application for shlink",Be="/shlink-web-client/feature/vitest-migration",qe="https://github.com/shlinkio/shlink-web-client",Fe="MIT",He={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest run --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},Ve={"@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5",redux:"^4.2.0","redux-localstorage-simple":"^2.5.1","redux-thunk":"^2.4.2",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},$e={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.0","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^4.0.0","@vitest/coverage-c8":"^0.31.1","adm-zip":"^0.5.10",chalk:"^5.2.0",eslint:"^8.30.0",jsdom:"^22.0.0","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0",typescript:"^5.0.2",vite:"^4.3.1","vite-plugin-pwa":"^0.14.4",vitest:"^0.31.1","vitest-canvas-mock":"^0.2.2"},ze=[">0.2%","not dead","not ie <= 11","not op_mini all"];var Ge={name:Se,description:We,private:!1,homepage:Be,repository:qe,license:Fe,scripts:He,dependencies:Ve,devDependencies:$e,browserslist:ze};re();Ae([{"revision":null,"url":"assets/index-14f07603.css"},{"revision":null,"url":"assets/index-7e3ad523.js"},{"revision":"f8c40c64ccc6124b232eb839f06d27e2","url":"index.html"},{"revision":"3e8169a112865ef0d76bba4e2dfd3a89","url":"./icons/icon-16x16.png"},{"revision":"20f0b51945ae3c973420e31d6b4d43c1","url":"./icons/icon-24x24.png"},{"revision":"4c9695cfb4cea403c1b66bbb7b4f7420","url":"./icons/icon-32x32.png"},{"revision":"f74edb9cc54ac938c1589876f8da9f21","url":"./icons/icon-40x40.png"},{"revision":"52933970fac8498311687de13549b014","url":"./icons/icon-48x48.png"},{"revision":"40209a194f29b21882571c77bd2bd906","url":"./icons/icon-60x60.png"},{"revision":"c8ba5a8c1da76d74c7bb21827fcf975c","url":"./icons/icon-64x64.png"},{"revision":"ae3435baceb494f9c966e2c2c736ea35","url":"./icons/icon-72x72.png"},{"revision":"850aa5b026fd1452af6c1ddd9d71850f","url":"./icons/icon-76x76.png"},{"revision":"8c62535e6b7a498ece1f6c6ae62ede59","url":"./icons/icon-96x96.png"},{"revision":"2dff586aaefa4c8d17f4c0bcbdef8b53","url":"./icons/icon-114x114.png"},{"revision":"8e28257a68ef1c55bc68bfff80e1a310","url":"./icons/icon-120x120.png"},{"revision":"0059b6f0c97fa871a5c29643b2857585","url":"./icons/icon-128x128.png"},{"revision":"41478c2456281f61e54d714718743ecc","url":"./icons/icon-144x144.png"},{"revision":"625251910295f33a578ae6d8117711c9","url":"./icons/icon-150x150.png"},{"revision":"19b71508b1d05defe32cf16a7d453001","url":"./icons/icon-152x152.png"},{"revision":"9d029a32a54ba3084c67acd5d74f8ac4","url":"./icons/icon-160x160.png"},{"revision":"6ec104aeaf745f003ecdaef2edddce97","url":"./icons/icon-167x167.png"},{"revision":"871d67907434ed0ddf5d2a6c220e09af","url":"./icons/icon-180x180.png"},{"revision":"cee2529402074d73b2135e2ddee25f6b","url":"./icons/icon-192x192.png"},{"revision":"85055b452284c0193142936dee7d2cd1","url":"./icons/icon-196x196.png"},{"revision":"f471155dd70b99924422dd9dd87ea94d","url":"./icons/icon-228x228.png"},{"revision":"4d896c5c7025582605de31fb74f0316b","url":"./icons/icon-256x256.png"},{"revision":"d99b49e5bcad41968313c3e132e7c661","url":"./icons/icon-310x310.png"},{"revision":"f9597636bef677327c3abc0fd1a743c4","url":"./icons/icon-384x384.png"},{"revision":"de22c0eb9e08d3576df5cedb568ca56b","url":"./icons/icon-512x512.png"},{"revision":"583b223ad8e20f05aaa64923d7db2e46","url":"./icons/icon-1024x1024.png"},{"revision":"2699ecf9f47ed80b64b6483b89eae1f9","url":"manifest.json"}]);const Qe=new RegExp("/[^/?]+\\.[^/]+$");M(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(Qe)),Ne(`${Ge.homepage}/index.html`));M(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Oe({cacheName:"images",plugins:[new _e({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()}); +This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(c)}}}install(e){return A(e,async()=>{const t=new xe;this.strategy.plugins.push(t);for(const[a,i]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(i),o=this._urlsToCacheModes.get(a),l=new Request(a,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:i},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:r}=t;return{updatedURLs:n,notUpdatedURLs:r}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),r=new Set(this._urlsToCacheKeys.values()),a=[];for(const i of n)r.has(i.url)||(await t.delete(i),a.push(i.url));return{deletedURLs:a}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,n=this.getCacheKeyForURL(t);if(n)return(await self.caches.open(this.strategy.cacheName)).match(n)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new h("non-precached-url",{url:e});return n=>(n.request=new Request(e),n.params=Object.assign({cacheKey:t},n.params),this.strategy.handle(n))}}let L;const I=()=>(L||(L=new De),L);try{self["workbox:routing:6.5.3"]&&_()}catch{}const $="GET",C=s=>s&&typeof s=="object"?s:{handle:s};class b{constructor(e,t,n=$){this.handler=C(t),this.match=e,this.method=n}setCatchHandler(e){this.catchHandler=C(e)}}class ve extends b{constructor(e,t,n){const r=({url:a})=>{const i=e.exec(a.href);if(i&&!(a.origin!==location.origin&&i.index!==0))return i.slice(1)};super(r,t,n)}}class Le{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,n=this.handleRequest({request:t,event:e});n&&e.respondWith(n)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,n=Promise.all(t.urlsToCache.map(r=>{typeof r=="string"&&(r=[r]);const a=new Request(...r);return this.handleRequest({request:a,event:e})}));e.waitUntil(n),e.ports&&e.ports[0]&&n.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const n=new URL(e.url,location.href);if(!n.protocol.startsWith("http"))return;const r=n.origin===location.origin,{params:a,route:i}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:n});let c=i&&i.handler;const o=e.method;if(!c&&this._defaultHandlerMap.has(o)&&(c=this._defaultHandlerMap.get(o)),!c)return;let l;try{l=c.handle({url:n,request:e,event:t,params:a})}catch(u){l=Promise.reject(u)}const g=i&&i.catchHandler;return l instanceof Promise&&(this._catchHandler||g)&&(l=l.catch(async u=>{if(g)try{return await g.handle({url:n,request:e,event:t,params:a})}catch(N){N instanceof Error&&(u=N)}if(this._catchHandler)return this._catchHandler.handle({url:n,request:e,event:t});throw u})),l}findMatchingRoute({url:e,sameOrigin:t,request:n,event:r}){const a=this._routes.get(n.method)||[];for(const i of a){let c;const o=i.match({url:e,sameOrigin:t,request:n,event:r});if(o)return c=o,(Array.isArray(c)&&c.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(c=void 0),{route:i,params:c}}return{}}setDefaultHandler(e,t=$){this._defaultHandlerMap.set(t,C(e))}setCatchHandler(e){this._catchHandler=C(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new h("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new h("unregister-route-route-not-registered")}}let w;const Ue=()=>(w||(w=new Le,w.addFetchListener(),w.addCacheListener()),w);function M(s,e,t){let n;if(typeof s=="string"){const a=new URL(s,location.href),i=({url:c})=>c.href===a.href;n=new b(i,e,t)}else if(s instanceof RegExp)n=new ve(s,e,t);else if(typeof s=="function")n=new b(s,e,t);else if(s instanceof b)n=s;else throw new h("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return Ue().registerRoute(n),n}function Te(s,e=[]){for(const t of[...s.searchParams.keys()])e.some(n=>n.test(t))&&s.searchParams.delete(t);return s}function*Pe(s,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:n=!0,urlManipulation:r}={}){const a=new URL(s,location.href);a.hash="",yield a.href;const i=Te(a,e);if(yield i.href,t&&i.pathname.endsWith("/")){const c=new URL(i.href);c.pathname+=t,yield c.href}if(n){const c=new URL(i.href);c.pathname+=".html",yield c.href}if(r){const c=r({url:a});for(const o of c)yield o.href}}class Ie extends b{constructor(e,t){const n=({request:r})=>{const a=e.getURLsToCacheKeys();for(const i of Pe(r.url,t)){const c=a.get(i);if(c){const o=e.getIntegrityForCacheKey(c);return{cacheKey:c,integrity:o}}}};super(n,e.strategy)}}function Me(s){const e=I(),t=new Ie(e,s);M(t)}function Ne(s){return I().createHandlerBoundToURL(s)}function Ke(s){I().precache(s)}function Ae(s,e){Ke(s),Me(e)}const je={cacheWillUpdate:async({response:s})=>s.status===200||s.status===0?s:null};class Oe extends V{constructor(e={}){super(e),this.plugins.some(t=>"cacheWillUpdate"in t)||this.plugins.unshift(je)}async _handle(e,t){const n=t.fetchAndCachePut(e).catch(()=>{});t.waitUntil(n);let r=await t.cacheMatch(e),a;if(!r)try{r=await n}catch(i){i instanceof Error&&(a=i)}if(!r)throw new h("no-response",{url:e.url,error:a});return r}}const Se="shlink-web-client",We="A React-based progressive web application for shlink",Be="/shlink-web-client/feature/vitest-migration",qe="https://github.com/shlinkio/shlink-web-client",Fe="MIT",He={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint --ext .js,.ts,.tsx src test","lint:fix":"npm run lint:css:fix && npm run lint:js:fix","lint:css:fix":"npm run lint:css -- --fix","lint:js:fix":"npm run lint:js -- --fix",types:"tsc",start:"vite serve --host=0.0.0.0",preview:"vite preview --host=0.0.0.0",build:"npm run types && vite build && node scripts/replace-version.mjs","build:dist":"npm run build && node scripts/create-dist-file.mjs",test:"vitest run --run","test:watch":"vitest run --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},Ve={"@fortawesome/fontawesome-free":"^6.3.0","@fortawesome/fontawesome-svg-core":"^6.3.0","@fortawesome/free-brands-svg-icons":"^6.3.0","@fortawesome/free-regular-svg-icons":"^6.3.0","@fortawesome/free-solid-svg-icons":"^6.3.0","@fortawesome/react-fontawesome":"^0.2.0","@json2csv/plainjs":"^6.1.2","@reduxjs/toolkit":"^1.9.1",bootstrap:"^5.2.3",bottlejs:"^2.0.1",bowser:"^2.11.0","chart.js":"^4.1.1",classnames:"^2.3.2","compare-versions":"^5.0.3",csvtojson:"^2.0.10","date-fns":"^2.29.3","event-source-polyfill":"^1.0.31",history:"^5.3.0",leaflet:"^1.9.3",qs:"^6.11.0",ramda:"^0.27.2",react:"^18.2.0","react-chartjs-2":"^5.1.0","react-colorful":"^5.6.1","react-copy-to-clipboard":"^5.1.0","react-datepicker":"^4.8.0","react-dom":"^18.2.0","react-external-link":"^2.2.0","react-leaflet":"^4.2.0","react-redux":"^8.0.5","react-router-dom":"^6.6.1","react-swipeable":"^7.0.0","react-tag-autocomplete":"^6.3.0",reactstrap:"^9.1.5","redux-localstorage-simple":"^2.5.1",uuid:"^8.3.2","workbox-core":"^6.5.4","workbox-expiration":"^6.5.4","workbox-precaching":"^6.5.4","workbox-routing":"^6.5.4","workbox-strategies":"^6.5.4"},$e={"@shlinkio/eslint-config-js-coding-standard":"~2.1.0","@shlinkio/stylelint-config-css-coding-standard":"~1.0.1","@testing-library/jest-dom":"^5.16.5","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.4.3","@total-typescript/shoehorn":"^0.1.0","@types/json2csv":"^5.0.3","@types/leaflet":"^1.9.0","@types/qs":"^6.9.7","@types/ramda":"^0.28.15","@types/react":"^18.0.26","@types/react-color":"^3.0.6","@types/react-copy-to-clipboard":"^5.0.4","@types/react-datepicker":"^4.8.0","@types/react-dom":"^18.0.10","@types/react-tag-autocomplete":"^6.3.0","@types/uuid":"^8.3.4","@vitejs/plugin-react":"^4.0.0","@vitest/coverage-c8":"^0.31.1","adm-zip":"^0.5.10",chalk:"^5.2.0",eslint:"^8.30.0",jsdom:"^22.0.0","resize-observer-polyfill":"^1.5.1",sass:"^1.57.1",stylelint:"^14.16.0",typescript:"^5.0.2",vite:"^4.3.1","vite-plugin-pwa":"^0.14.4",vitest:"^0.31.1","vitest-canvas-mock":"^0.2.2"},ze=[">0.2%","not dead","not ie <= 11","not op_mini all"];var Ge={name:Se,description:We,private:!1,homepage:Be,repository:qe,license:Fe,scripts:He,dependencies:Ve,devDependencies:$e,browserslist:ze};re();Ae([{"revision":null,"url":"assets/index-14f07603.css"},{"revision":null,"url":"assets/index-18ad4e1f.js"},{"revision":"cc8bd15892b327fdd4b8bad26d32cffc","url":"index.html"},{"revision":"3e8169a112865ef0d76bba4e2dfd3a89","url":"./icons/icon-16x16.png"},{"revision":"20f0b51945ae3c973420e31d6b4d43c1","url":"./icons/icon-24x24.png"},{"revision":"4c9695cfb4cea403c1b66bbb7b4f7420","url":"./icons/icon-32x32.png"},{"revision":"f74edb9cc54ac938c1589876f8da9f21","url":"./icons/icon-40x40.png"},{"revision":"52933970fac8498311687de13549b014","url":"./icons/icon-48x48.png"},{"revision":"40209a194f29b21882571c77bd2bd906","url":"./icons/icon-60x60.png"},{"revision":"c8ba5a8c1da76d74c7bb21827fcf975c","url":"./icons/icon-64x64.png"},{"revision":"ae3435baceb494f9c966e2c2c736ea35","url":"./icons/icon-72x72.png"},{"revision":"850aa5b026fd1452af6c1ddd9d71850f","url":"./icons/icon-76x76.png"},{"revision":"8c62535e6b7a498ece1f6c6ae62ede59","url":"./icons/icon-96x96.png"},{"revision":"2dff586aaefa4c8d17f4c0bcbdef8b53","url":"./icons/icon-114x114.png"},{"revision":"8e28257a68ef1c55bc68bfff80e1a310","url":"./icons/icon-120x120.png"},{"revision":"0059b6f0c97fa871a5c29643b2857585","url":"./icons/icon-128x128.png"},{"revision":"41478c2456281f61e54d714718743ecc","url":"./icons/icon-144x144.png"},{"revision":"625251910295f33a578ae6d8117711c9","url":"./icons/icon-150x150.png"},{"revision":"19b71508b1d05defe32cf16a7d453001","url":"./icons/icon-152x152.png"},{"revision":"9d029a32a54ba3084c67acd5d74f8ac4","url":"./icons/icon-160x160.png"},{"revision":"6ec104aeaf745f003ecdaef2edddce97","url":"./icons/icon-167x167.png"},{"revision":"871d67907434ed0ddf5d2a6c220e09af","url":"./icons/icon-180x180.png"},{"revision":"cee2529402074d73b2135e2ddee25f6b","url":"./icons/icon-192x192.png"},{"revision":"85055b452284c0193142936dee7d2cd1","url":"./icons/icon-196x196.png"},{"revision":"f471155dd70b99924422dd9dd87ea94d","url":"./icons/icon-228x228.png"},{"revision":"4d896c5c7025582605de31fb74f0316b","url":"./icons/icon-256x256.png"},{"revision":"d99b49e5bcad41968313c3e132e7c661","url":"./icons/icon-310x310.png"},{"revision":"f9597636bef677327c3abc0fd1a743c4","url":"./icons/icon-384x384.png"},{"revision":"de22c0eb9e08d3576df5cedb568ca56b","url":"./icons/icon-512x512.png"},{"revision":"583b223ad8e20f05aaa64923d7db2e46","url":"./icons/icon-1024x1024.png"},{"revision":"2699ecf9f47ed80b64b6483b89eae1f9","url":"manifest.json"}]);const Qe=new RegExp("/[^/?]+\\.[^/]+$");M(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(Qe)),Ne(`${Ge.homepage}/index.html`));M(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Oe({cacheName:"images",plugins:[new _e({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()});