From 1a1073c9942831b1fcc6eaa512e14016f7b7d08e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Sat, 27 Jul 2024 09:29:07 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20preview-env=20from=20@=20shlin?= =?UTF-8?q?kio/shlink-web-client@2debbc427a802f09ff290ab6f293aff2f4697f59?= =?UTF-8?q?=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-B2KmSTOz.js => index-ty3txoqs.js} | 30 +++++++++---------- .../npm_and_yarn/typescript-5.5.4/index.html | 2 +- .../typescript-5.5.4/service-worker.js | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) rename dependabot/npm_and_yarn/typescript-5.5.4/assets/{index-B2KmSTOz.js => index-ty3txoqs.js} (98%) diff --git a/dependabot/npm_and_yarn/typescript-5.5.4/assets/index-B2KmSTOz.js b/dependabot/npm_and_yarn/typescript-5.5.4/assets/index-ty3txoqs.js similarity index 98% rename from dependabot/npm_and_yarn/typescript-5.5.4/assets/index-B2KmSTOz.js rename to dependabot/npm_and_yarn/typescript-5.5.4/assets/index-ty3txoqs.js index 02d26b5f..69ecb969 100644 --- a/dependabot/npm_and_yarn/typescript-5.5.4/assets/index-B2KmSTOz.js +++ b/dependabot/npm_and_yarn/typescript-5.5.4/assets/index-ty3txoqs.js @@ -76,7 +76,7 @@ ${ae.current.stack} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function HG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function GG(e,t){return e.button===0&&(!t||t==="_self")&&!HG(e)}const qG=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],KG=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],YG="6";try{window.__reactRouterVersion=YG}catch{}const ZG=R.createContext({isTransitioning:!1}),XG="startTransition",Yj=b_[XG];function A6(e){let{basename:t,children:n,future:r,window:i}=e,o=R.useRef();o.current==null&&(o.current=iG({window:i,v5Compat:!0}));let a=o.current,[s,l]=R.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},f=R.useCallback(d=>{c&&Yj?Yj(()=>l(d)):l(d)},[l,c]);return R.useLayoutEffect(()=>a.listen(f),[a,f]),R.createElement(WG,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const QG=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",JG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,St=R.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:f,unstable_viewTransition:d}=t,p=j6(t,qG),{basename:v}=R.useContext(Xo),g,y=!1;if(typeof c=="string"&&JG.test(c)&&(g=c,QG))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),E=Bc(S.pathname,v);S.origin===w.origin&&E!=null?c=E+S.search+S.hash:y=!0}catch{}let x=jG(c,{relative:i}),_=tq(c,{replace:a,state:s,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:d});function b(w){r&&r(w),w.defaultPrevented||_(w)}return R.createElement("a",zv({},p,{href:g||x,onClick:y||o?r:b,ref:n,target:l}))}),k6=R.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,unstable_viewTransition:c,children:f}=t,d=j6(t,KG),p=Zy(l,{relative:d.relative}),v=gr(),g=R.useContext(S6),{navigator:y,basename:x}=R.useContext(Xo),_=g!=null&&nq(p)&&c===!0,b=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,w=v.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&x&&(S=Bc(S,x)||S);const E=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let C=w===b||!a&&w.startsWith(b)&&w.charAt(E)==="/",T=S!=null&&(S===b||!a&&S.startsWith(b)&&S.charAt(b.length)==="/"),A={isActive:C,isPending:T,isTransitioning:_},D=C?r:void 0,N;typeof o=="function"?N=o(A):N=[o,C?"active":null,T?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let I=typeof s=="function"?s(A):s;return R.createElement(St,zv({},d,{"aria-current":D,className:N,ref:n,style:I,to:l,unstable_viewTransition:c}),typeof f=="function"?f(A):f)});var vx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vx||(vx={}));var Zj;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Zj||(Zj={}));function eq(e){let t=R.useContext(Ky);return t||zt(!1),t}function tq(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s}=t===void 0?{}:t,l=vo(),c=gr(),f=Zy(e,{relative:a});return R.useCallback(d=>{if(GG(d,n)){d.preventDefault();let p=r!==void 0?r:Fv(c)===Fv(f);l(e,{replace:p,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s})}},[c,l,f,r,i,n,e,o,a,s])}function nq(e,t){t===void 0&&(t={});let n=R.useContext(ZG);n==null&&zt(!1);let{basename:r}=eq(vx.useViewTransitionState),i=Zy(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Bc(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Bc(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Bv(i.pathname,a)!=null||Bv(i.pathname,o)!=null}const rq="shlink-web-client",iq="A React-based progressive web application for shlink",oq="/shlink-web-client/dependabot/npm_and_yarn/typescript-5.5.4",aq="https://github.com/shlinkio/shlink-web-client",sq="MIT",lq="module",cq={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint src test config/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 --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},uq={"@fortawesome/fontawesome-free":"^6.6.0","@fortawesome/fontawesome-svg-core":"^6.6.0","@fortawesome/free-brands-svg-icons":"^6.6.0","@fortawesome/free-regular-svg-icons":"^6.6.0","@fortawesome/free-solid-svg-icons":"^6.6.0","@fortawesome/react-fontawesome":"^0.2.2","@json2csv/plainjs":"^7.0.6","@reduxjs/toolkit":"^2.2.6","@shlinkio/data-manipulation":"^1.0.3","@shlinkio/shlink-frontend-kit":"^0.5.2","@shlinkio/shlink-js-sdk":"^1.1.0","@shlinkio/shlink-web-component":"^0.7.0",bootstrap:"5.2.3",bottlejs:"^2.0.1",clsx:"^2.1.1","compare-versions":"^6.1.1",csvtojson:"^2.0.10","date-fns":"^3.6.0",react:"^18.3.1","react-dom":"^18.3.1","react-external-link":"^2.3.1","react-redux":"^9.1.2","react-router-dom":"^6.25.1",reactstrap:"^9.2.2","redux-localstorage-simple":"^2.5.1",uuid:"^10.0.0","workbox-core":"^7.1.0","workbox-expiration":"^7.1.0","workbox-precaching":"^7.1.0","workbox-routing":"^7.1.0","workbox-strategies":"^7.1.0"},fq={"@shlinkio/eslint-config-js-coding-standard":"~3.0.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@stylistic/eslint-plugin":"^2.3.0","@testing-library/jest-dom":"^6.4.6","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.5.2","@total-typescript/shoehorn":"^0.1.2","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@types/uuid":"^10.0.0","@vitejs/plugin-react":"^4.3.1","@vitest/coverage-v8":"^2.0.3","adm-zip":"^0.5.14","axe-core":"^4.9.1",chalk:"^5.3.0",eslint:"^8.57.0","eslint-plugin-jsx-a11y":"^6.9.0","eslint-plugin-react":"^7.35.0","eslint-plugin-react-hooks":"^4.6.2","eslint-plugin-simple-import-sort":"^12.1.1",history:"^5.3.0",jsdom:"^24.1.0",sass:"^1.77.8",stylelint:"^15.11.0",typescript:"^5.5.4","typescript-eslint":"^7.16.1",vite:"^5.3.4","vite-plugin-pwa":"^0.20.0",vitest:"^2.0.2"},dq=[">0.2%","not dead","not ie <= 11","not op_mini all"],Vv={name:rq,description:iq,private:!1,homepage:oq,repository:aq,license:sq,type:lq,scripts:cq,dependencies:uq,devDependencies:fq,browserslist:dq};var Li,co=".",N6="function",M6="string",L6="__global__",KS="Provider",hq=0,YS=Array.prototype.slice,pq=function(t,n){var r=t[n];if(r===void 0&&Li.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=Li.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},R6=function(t){return t.split(co).reduce(pq,this)},mq=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var s=0,l=function(f){if(f)throw f;t[s]&&t[s++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},vq=function(t,n){var r,i;return typeof t===N6&&(n=t,t=L6),r=t.split(co),i=r.shift(),r.length?Qy.call(this,i).middleware(r.join(co),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},gq=function(t,n){return n(t)},Xj=function(t,n){return(t[n]||[]).concat(t.__global__||[])},yq=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+KS,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=Xj(a,t).reduce(gq,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:mq(Xj(s,t),t,f,o)}},Object.defineProperties(o,i),this},$6=function(t,n){var r,i;return r=t.split(co),this.providerMap[t]&&r.length===1&&!this.container[t+KS]?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(co),n),this):yq.call(this,i,n))},ZS=function(t,n){return $6.call(this,t,function(){this.$get=n})},I6=function(t,n,r){var i=arguments.length>3?YS.call(arguments,3):[],o=this;return ZS.call(this,t,function(){var s=n,l=i.map(R6,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},bq=function(t,n){return I6.apply(this,[t,n,!0].concat(YS.call(arguments,2)))},_q=function(t,n){return I6.apply(this,[t,n,!1].concat(YS.call(arguments,2)))},D6=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},F6=function(t,n){var r=t[n];return r||(r={},D6.call(t,n,r)),r},xq=function(t,n){var r;return r=t.split(co),t=r.pop(),D6.call(r.reduce(F6,this.container),t,n),this},wq=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},Oq=function(t,n){var r=t.split(co);return t=r.pop(),wq.call(r.reduce(F6,this.container),t,n),this},B6=function(t,n){var r,i;return typeof t===N6&&(n=t,t=L6),r=t.split(co),i=r.shift(),r.length?Qy.call(this,i).decorator(r.join(co),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},Sq=function(t){return this.deferred.push(t),this},Eq=function(t){return(t||[]).map(R6,this.container)},Cq=function(t,n){return ZS.call(this,t,function(i){return{instance:n.bind(n,i)}})},Pq=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},XS=function(t){return Object.keys(t||this.container||{}).filter(Pq)},Wv={},Tq=function(t){var n;return typeof t===M6?(n=Wv[t],n||(Wv[t]=n=new Li,n.constant("BOTTLE_NAME",t)),n):new Li},jq=function(t){typeof t===M6?delete Wv[t]:Wv={}},U6=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Qj=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+KS]},Aq=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var a=o.split(co);a.length>1&&a.forEach(Qj,Qy.call(this,a[0])),Qj.call(this,o),this.provider(o,n[o])}},this)},kq=function(t){return this.deferred.forEach(function(r){r(t)}),this};Li=function e(t){if(!(this instanceof e))return e.pop(t);this.id=hq++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:B6.bind(this),$register:U6.bind(this),$list:XS.bind(this)}};Li.prototype={constant:Oq,decorator:B6,defer:Sq,digest:Eq,factory:ZS,instanceFactory:Cq,list:XS,middleware:vq,provider:$6,resetProviders:Aq,register:U6,resolve:kq,service:bq,serviceFactory:_q,value:xq};Li.pop=Tq;Li.clear=jq;Li.list=XS;Li.config={strict:!1};const z6=Li;var Nq=Object.defineProperty,Mq=(e,t,n)=>t in e?Nq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lq=(e,t,n)=>(Mq(e,typeof t!="symbol"?t+"":t,n),n);const Rq=(e,t)=>`${e}/rest/v${t}`,$q=e=>e.dir?`${e.field}-${e.dir}`:void 0,Iq=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:$q(e)}),Dq=(e,t)=>{const[n,r]=e.split("://");if(!r)throw new Error(`It is not possible to determine authority on "${e}" for replacement`);const[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},Fq=(e={})=>{const t=Object.entries(e).flatMap(([n,r])=>r==null?[]:Array.isArray(r)?r.map(i=>[`${n}[]`,i]):[[n,r]]);return new URLSearchParams(t).toString()};class Bq{constructor(t,n){Lq(this,"apiVersion"),this.httpClient=t,this.serverInfo=n,this.apiVersion=3}async listShortUrls(t={}){return this.performRequest({url:"/short-urls",query:Iq(t)}).then(({shortUrls:n})=>n)}async createShortUrl(t){const n=Object.entries(t).reduce((r,[i,o])=>(o&&(r[i]=o),r),{});return this.performRequest({url:"/short-urls",method:"POST",body:n})}async getShortUrl(t,n){return this.performRequest({url:`/short-urls/${t}`,query:{domain:n}})}async deleteShortUrl(t,n){return this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}})}async updateShortUrl(t,n,r){return this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r})}async getShortUrlRedirectRules(t,n){return this.performRequest({url:`/short-urls/${t}/redirect-rules`,method:"GET",query:{domain:n}})}async setShortUrlRedirectRules(t,n,r){return this.performRequest({url:`/short-urls/${t}/redirect-rules`,method:"POST",query:{domain:n},body:r})}async getVisitsOverview(){return this.performRequest({url:"/visits"}).then(({visits:t})=>t)}async getShortUrlVisits(t,n){return this.performVisitsRequest({url:`/short-urls/${t}/visits`,query:n})}async getTagVisits(t,n){return this.performVisitsRequest({url:`/tags/${t}/visits`,query:n})}async getDomainVisits(t,n){return this.performVisitsRequest({url:`/domains/${t}/visits`,query:n})}async getOrphanVisits(t){return this.performVisitsRequest({url:"/visits/orphan",query:t})}async getNonOrphanVisits(t){return this.performVisitsRequest({url:"/visits/non-orphan",query:t})}async performVisitsRequest(t){return this.performRequest(t).then(({visits:n})=>n)}async deleteShortUrlVisits(t,n){const r=n?{domain:n}:void 0;return this.performRequest({method:"DELETE",url:`/short-urls/${t}/visits`,query:r})}async deleteOrphanVisits(){return this.performRequest({method:"DELETE",url:"/visits/orphan"})}async listTags(){return this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t)}async tagsStats(){return this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t)}async deleteTags(t){return this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t}))}async editTag(t,n){return this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n}))}async listDomains(){return this.performRequest({url:"/domains"}).then(({domains:t})=>t)}async editDomainRedirects(t){return this.performRequest({url:"/domains/redirects",method:"PATCH",body:t})}async health(t){return this.performRequest({url:"/health",domain:t})}async mercureInfo(){return this.performRequest({url:"/mercure-info"})}async performRequest(t){return this.httpClient.jsonRequest(...this.toFetchParams(t))}async performEmptyRequest(t){return this.httpClient.emptyRequest(...this.toFetchParams(t))}toFetchParams({url:t,method:n="GET",query:r={},body:i,domain:o}){const a=Fq(r),s=a?`?${a}`:"",l=o?Dq(this.serverInfo.baseUrl,o):this.serverInfo.baseUrl;return[`${Rq(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.serverInfo.apiKey}}]}}const V6=e=>!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),ld=e=>!!(e!=null&&e.id),QS=e=>!!(e!=null&&e.version),Uq=e=>!!(e!=null&&e.serverNotFound),zq=e=>ld(e)?e.id:"",Vq=({name:e,url:t,apiKey:n})=>({name:e,url:t,apiKey:n}),Jj={},Wq=e=>typeof e=="function",Hq=e=>{const{selectedServer:t}=e();if(!V6(t))throw new Error("There's no selected server or it is not found");return t},Gq=e=>t=>{const{url:n,apiKey:r}=Wq(t)?Hq(t):t,i=`${r}_${n}`,o=Jj[i]??new Bq(e,{apiKey:r,baseUrl:n});return Jj[i]=o,o},qq=e=>{e.serviceFactory("buildShlinkApiClient",Gq,"HttpClient")},W6={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"]},Kq={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zm64 80l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 400l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},Yq=Kq,Zq={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},JS=Zq,Xq={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 144-208 0c-35.3 0-64 28.7-64 64l0 144-48 0c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM200 352l16 0c22.1 0 40 17.9 40 40l0 8c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-8c0-4.4-3.6-8-8-8l-16 0c-4.4 0-8 3.6-8 8l0 80c0 4.4 3.6 8 8 8l16 0c4.4 0 8-3.6 8-8l0-8c0-8.8 7.2-16 16-16s16 7.2 16 16l0 8c0 22.1-17.9 40-40 40l-16 0c-22.1 0-40-17.9-40-40l0-80c0-22.1 17.9-40 40-40zm133.1 0l34.9 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-34.9 0c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1L304 512c-8.8 0-16-7.2-16-16s7.2-16 16-16l42.9 0c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16l0 31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66l0-31.6c0-8.8 7.2-16 16-16s16 7.2 16 16l0 31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6l0-31.6c0-8.8 7.2-16 16-16z"]},Qq={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1 0 32c0 8.8 7.2 16 16 16l32 0zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},H6=Qq,G6={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},Jq={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},q6={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z"]},eK={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},tK=eK,nK={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"]},eE=nK,rK={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2C297 398 352 333.4 352 256l0-32c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160z"]},iK={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z"]},oK={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},eA={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"]},aK={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-102.1-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31L216 408z"]},sK=aK,lK={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152l0 270.8c0 9.8-6 18.6-15.1 22.3L416 503l0-302.6zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6l0 251.4L32.9 502.7C17.1 509 0 497.4 0 480.4L0 209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77l0 249.3L192 449.4 192 255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},gx=lK,cK={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},uK={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},fK={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7 96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L320 96z"]},dK=fK,tE={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240l0-223.4c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16L304 240zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4L256 288 412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288l238.4 0z"]},Jy={prefix:"fas",iconName:"chart-line",icon:[512,512,["line-chart"],"f201","M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"]},K6={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5L0 80C0 53.5 21.5 32 48 32l149.5 0c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},tA={prefix:"fas",iconName:"calendar-xmark",icon:[448,512,["calendar-times"],"f273","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zM305 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},hK={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"]},pK={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},mK={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-128c0-17.7-14.3-32-32-32L352 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},vK=mK,gK={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80L0 229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7L48 32C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},yK={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},nE=yK,bK={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160l50.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 224c-17.7 0-32-14.3-32-32L16 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},_K=bK,xK={prefix:"fas",iconName:"grip-vertical",icon:[320,512,[],"f58e","M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"]},wK={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},OK={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},SK=OK,EK={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},CK=EK,PK={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},TK=PK,jK={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 232l0 102.1 31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31L168 232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},Y6=jK,AK={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},kK={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},NK={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},MK={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},LK=MK,RK={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},$K={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},ep={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},IK={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},yx=IK,DK={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},FK={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z"]},BK=FK,nA={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32l0 64 120 0c39.8 0 72 32.2 72 72l0 272c0 39.8-32.2 72-72 72l-304 0c-39.8 0-72-32.2-72-72l0-272c0-39.8 32.2-72 72-72l120 0 0-64c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224l16 0 0 192-16 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-16 0 0-192 16 0z"]},Z6={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},UK=Z6,zK={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 96l0 64 64 0 0-64L64 96zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zm64 16l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm80 64l-64 0 0 64 64 0 0-64zM256 304c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16l0 96c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-160zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},VK={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},WK={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"]},HK={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l176 0-10.7 32L160 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-69.3 0L336 416l176 0c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0zM512 64l0 224L64 288 64 64l448 0z"]},Gd={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},GK={prefix:"fas",iconName:"arrows-split-up-and-left",icon:[512,512,[],"e4bc","M246.6 150.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L352 109.3 352 384c0 35.3 28.7 64 64 64l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-70.7 0-128-57.3-128-128c0-35.3-28.7-64-64-64l-114.7 0 41.4 41.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-96-96c-12.5-12.5-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L109.3 256 224 256c23.3 0 45.2 6.2 64 17.1l0-163.9-41.4 41.4z"]},qK={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},KK=qK,rA=()=>{};let rE={},X6={},Q6=null,J6={mark:rA,measure:rA};try{typeof window<"u"&&(rE=window),typeof document<"u"&&(X6=document),typeof MutationObserver<"u"&&(Q6=MutationObserver),typeof performance<"u"&&(J6=performance)}catch{}const{userAgent:iA=""}=rE.navigator||{},Ha=rE,At=X6,oA=Q6,pm=J6;Ha.document;const Jo=!!At.documentElement&&!!At.head&&typeof At.addEventListener=="function"&&typeof At.createElement=="function",eI=~iA.indexOf("MSIE")||~iA.indexOf("Trident/");var Lt="classic",tI="duotone",kr="sharp",Nr="sharp-duotone",YK=[Lt,tI,kr,Nr],ZK={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}},aA={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},XK=["kit"],QK=/fa(s|r|l|t|d|b|k|kd|ss|sr|sl|st|sds)?[\-\ ]/,JK=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,eY={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},tY={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds"}},nY={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}},rY={classic:["fas","far","fal","fat"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds"]},iY={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}},oY={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}},nI={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},aY=["solid","regular","light","thin","duotone","brands"],rI=[1,2,3,4,5,6,7,8,9,10],sY=rI.concat([11,12,13,14,15,16,17,18,19,20]),Vf={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},lY=[...Object.keys(rY),...aY,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Vf.GROUP,Vf.SWAP_OPACITY,Vf.PRIMARY,Vf.SECONDARY].concat(rI.map(e=>"".concat(e,"x"))).concat(sY.map(e=>"w-".concat(e))),cY={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},uY={kit:{"fa-kit":"fak"},"kit-duotone":{"fa-kit-duotone":"fakd"}},fY={kit:{fak:"fa-kit"},"kit-duotone":{fakd:"fa-kit-duotone"}},sA={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}};const zo="___FONT_AWESOME___",bx=16,iI="fa",oI="svg-inline--fa",sl="data-fa-i2svg",_x="data-fa-pseudo-element",dY="data-fa-pseudo-element-pending",iE="data-prefix",oE="data-icon",lA="fontawesome-i2svg",hY="async",pY=["HTML","HEAD","STYLE","SCRIPT"],aI=(()=>{try{return!0}catch{return!1}})(),sI=[Lt,kr,Nr];function tp(e){return new Proxy(e,{get(t,n){return n in t?t[n]:t[Lt]}})}const lI={...nI};lI[Lt]={...nI[Lt],...aA.kit,...aA["kit-duotone"]};const Ks=tp(lI),xx={...oY};xx[Lt]={...xx[Lt],...sA.kit,...sA["kit-duotone"]};const qd=tp(xx),wx={...iY};wx[Lt]={...wx[Lt],...fY.kit};const Ys=tp(wx),Ox={...nY};Ox[Lt]={...Ox[Lt],...uY.kit};const mY=tp(Ox),vY=QK,cI="fa-layers-text",gY=JK,yY={...ZK};tp(yY);const bY=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],m1=Vf,Uc=new Set;Object.keys(qd[Lt]).map(Uc.add.bind(Uc));Object.keys(qd[kr]).map(Uc.add.bind(Uc));Object.keys(qd[Nr]).map(Uc.add.bind(Uc));const _Y=[...XK,...lY],cd=Ha.FontAwesomeConfig||{};function xY(e){var t=At.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function wY(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}At&&typeof At.querySelector=="function"&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(t=>{let[n,r]=t;const i=wY(xY(n));i!=null&&(cd[r]=i)});const uI={styleDefault:"solid",familyDefault:"classic",cssPrefix:iI,replacementClass:oI,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};cd.familyPrefix&&(cd.cssPrefix=cd.familyPrefix);const zc={...uI,...cd};zc.autoReplaceSvg||(zc.observeMutations=!1);const Ie={};Object.keys(uI).forEach(e=>{Object.defineProperty(Ie,e,{enumerable:!0,set:function(t){zc[e]=t,ud.forEach(n=>n(Ie))},get:function(){return zc[e]}})});Object.defineProperty(Ie,"familyPrefix",{enumerable:!0,set:function(e){zc.cssPrefix=e,ud.forEach(t=>t(Ie))},get:function(){return zc.cssPrefix}});Ha.FontAwesomeConfig=Ie;const ud=[];function OY(e){return ud.push(e),()=>{ud.splice(ud.indexOf(e),1)}}const la=bx,Qi={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function SY(e){if(!e||!Jo)return;const t=At.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;const n=At.head.childNodes;let r=null;for(let i=n.length-1;i>-1;i--){const o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return At.head.insertBefore(t,r),e}const EY="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Kd(){let e=12,t="";for(;e-- >0;)t+=EY[Math.random()*62|0];return t}function Pu(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function aE(e){return e.classList?Pu(e.classList):(e.getAttribute("class")||"").split(" ").filter(t=>t)}function fI(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function CY(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,'="').concat(fI(e[n]),'" '),"").trim()}function e0(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";"),"")}function sE(e){return e.size!==Qi.size||e.x!==Qi.x||e.y!==Qi.y||e.rotate!==Qi.rotate||e.flipX||e.flipY}function PY(e){let{transform:t,containerWidth:n,iconWidth:r}=e;const i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function TY(e){let{transform:t,width:n=bx,height:r=bx,startCentered:i=!1}=e,o="";return i&&eI?o+="translate(".concat(t.x/la-n/2,"em, ").concat(t.y/la-r/2,"em) "):i?o+="translate(calc(-50% + ".concat(t.x/la,"em), calc(-50% + ").concat(t.y/la,"em)) "):o+="translate(".concat(t.x/la,"em, ").concat(t.y/la,"em) "),o+="scale(".concat(t.size/la*(t.flipX?-1:1),", ").concat(t.size/la*(t.flipY?-1:1),") "),o+="rotate(".concat(t.rotate,"deg) "),o}var jY=`:root, :host { + */function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function HG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function GG(e,t){return e.button===0&&(!t||t==="_self")&&!HG(e)}const qG=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],KG=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],YG="6";try{window.__reactRouterVersion=YG}catch{}const ZG=R.createContext({isTransitioning:!1}),XG="startTransition",Yj=b_[XG];function A6(e){let{basename:t,children:n,future:r,window:i}=e,o=R.useRef();o.current==null&&(o.current=iG({window:i,v5Compat:!0}));let a=o.current,[s,l]=R.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},f=R.useCallback(d=>{c&&Yj?Yj(()=>l(d)):l(d)},[l,c]);return R.useLayoutEffect(()=>a.listen(f),[a,f]),R.createElement(WG,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const QG=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",JG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,St=R.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:c,preventScrollReset:f,unstable_viewTransition:d}=t,p=j6(t,qG),{basename:v}=R.useContext(Xo),g,y=!1;if(typeof c=="string"&&JG.test(c)&&(g=c,QG))try{let w=new URL(window.location.href),S=c.startsWith("//")?new URL(w.protocol+c):new URL(c),E=Bc(S.pathname,v);S.origin===w.origin&&E!=null?c=E+S.search+S.hash:y=!0}catch{}let x=jG(c,{relative:i}),_=tq(c,{replace:a,state:s,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:d});function b(w){r&&r(w),w.defaultPrevented||_(w)}return R.createElement("a",zv({},p,{href:g||x,onClick:y||o?r:b,ref:n,target:l}))}),k6=R.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:a=!1,style:s,to:l,unstable_viewTransition:c,children:f}=t,d=j6(t,KG),p=Zy(l,{relative:d.relative}),v=gr(),g=R.useContext(S6),{navigator:y,basename:x}=R.useContext(Xo),_=g!=null&&nq(p)&&c===!0,b=y.encodeLocation?y.encodeLocation(p).pathname:p.pathname,w=v.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(w=w.toLowerCase(),S=S?S.toLowerCase():null,b=b.toLowerCase()),S&&x&&(S=Bc(S,x)||S);const E=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let C=w===b||!a&&w.startsWith(b)&&w.charAt(E)==="/",T=S!=null&&(S===b||!a&&S.startsWith(b)&&S.charAt(b.length)==="/"),A={isActive:C,isPending:T,isTransitioning:_},D=C?r:void 0,N;typeof o=="function"?N=o(A):N=[o,C?"active":null,T?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let I=typeof s=="function"?s(A):s;return R.createElement(St,zv({},d,{"aria-current":D,className:N,ref:n,style:I,to:l,unstable_viewTransition:c}),typeof f=="function"?f(A):f)});var vx;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vx||(vx={}));var Zj;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Zj||(Zj={}));function eq(e){let t=R.useContext(Ky);return t||zt(!1),t}function tq(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s}=t===void 0?{}:t,l=vo(),c=gr(),f=Zy(e,{relative:a});return R.useCallback(d=>{if(GG(d,n)){d.preventDefault();let p=r!==void 0?r:Fv(c)===Fv(f);l(e,{replace:p,state:i,preventScrollReset:o,relative:a,unstable_viewTransition:s})}},[c,l,f,r,i,n,e,o,a,s])}function nq(e,t){t===void 0&&(t={});let n=R.useContext(ZG);n==null&&zt(!1);let{basename:r}=eq(vx.useViewTransitionState),i=Zy(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Bc(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Bc(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Bv(i.pathname,a)!=null||Bv(i.pathname,o)!=null}const rq="shlink-web-client",iq="A React-based progressive web application for shlink",oq="/shlink-web-client/dependabot/npm_and_yarn/typescript-5.5.4",aq="https://github.com/shlinkio/shlink-web-client",sq="MIT",lq="module",cq={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint src test config/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 --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},uq={"@fortawesome/fontawesome-free":"^6.6.0","@fortawesome/fontawesome-svg-core":"^6.6.0","@fortawesome/free-brands-svg-icons":"^6.6.0","@fortawesome/free-regular-svg-icons":"^6.6.0","@fortawesome/free-solid-svg-icons":"^6.6.0","@fortawesome/react-fontawesome":"^0.2.2","@json2csv/plainjs":"^7.0.6","@reduxjs/toolkit":"^2.2.6","@shlinkio/data-manipulation":"^1.0.3","@shlinkio/shlink-frontend-kit":"^0.5.2","@shlinkio/shlink-js-sdk":"^1.1.0","@shlinkio/shlink-web-component":"^0.7.0",bootstrap:"5.2.3",bottlejs:"^2.0.1",clsx:"^2.1.1","compare-versions":"^6.1.1",csvtojson:"^2.0.10","date-fns":"^3.6.0",react:"^18.3.1","react-dom":"^18.3.1","react-external-link":"^2.3.1","react-redux":"^9.1.2","react-router-dom":"^6.25.1",reactstrap:"^9.2.2","redux-localstorage-simple":"^2.5.1",uuid:"^10.0.0","workbox-core":"^7.1.0","workbox-expiration":"^7.1.0","workbox-precaching":"^7.1.0","workbox-routing":"^7.1.0","workbox-strategies":"^7.1.0"},fq={"@shlinkio/eslint-config-js-coding-standard":"~3.0.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@stylistic/eslint-plugin":"^2.3.0","@testing-library/jest-dom":"^6.4.8","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.5.2","@total-typescript/shoehorn":"^0.1.2","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@types/uuid":"^10.0.0","@vitejs/plugin-react":"^4.3.1","@vitest/coverage-v8":"^2.0.4","adm-zip":"^0.5.14","axe-core":"^4.9.1",chalk:"^5.3.0",eslint:"^8.57.0","eslint-plugin-jsx-a11y":"^6.9.0","eslint-plugin-react":"^7.35.0","eslint-plugin-react-hooks":"^4.6.2","eslint-plugin-simple-import-sort":"^12.1.1",history:"^5.3.0",jsdom:"^24.1.1",sass:"^1.77.8",stylelint:"^15.11.0",typescript:"^5.5.4","typescript-eslint":"^7.17.0",vite:"^5.3.4","vite-plugin-pwa":"^0.20.1",vitest:"^2.0.2"},dq=[">0.2%","not dead","not ie <= 11","not op_mini all"],Vv={name:rq,description:iq,private:!1,homepage:oq,repository:aq,license:sq,type:lq,scripts:cq,dependencies:uq,devDependencies:fq,browserslist:dq};var Li,co=".",N6="function",M6="string",L6="__global__",KS="Provider",hq=0,YS=Array.prototype.slice,pq=function(t,n){var r=t[n];if(r===void 0&&Li.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=Li.pop(),this.nested[t]=n,this.factory(t,function(){return n.container})),this.nested[t]},R6=function(t){return t.split(co).reduce(pq,this)},mq=function(t,n,r,i){var o={configurable:!0,enumerable:!0};return t.length?o.get=function(){var s=0,l=function(f){if(f)throw f;t[s]&&t[s++](r,l)};return l(),r}:(o.value=r,o.writable=!0),Object.defineProperty(i,n,o),i[n]},vq=function(t,n){var r,i;return typeof t===N6&&(n=t,t=L6),r=t.split(co),i=r.shift(),r.length?Qy.call(this,i).middleware(r.join(co),n):(this.middlewares[i]||(this.middlewares[i]=[]),this.middlewares[i].push(n)),this},gq=function(t,n){return n(t)},Xj=function(t,n){return(t[n]||[]).concat(t.__global__||[])},yq=function(t,n){var r,i,o,a,s;return this.id,o=this.container,a=this.decorators,s=this.middlewares,r=t+KS,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=Xj(a,t).reduce(gq,c.$get(o)),delete o[r],delete o[t]),f===void 0?f:mq(Xj(s,t),t,f,o)}},Object.defineProperties(o,i),this},$6=function(t,n){var r,i;return r=t.split(co),this.providerMap[t]&&r.length===1&&!this.container[t+KS]?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(co),n),this):yq.call(this,i,n))},ZS=function(t,n){return $6.call(this,t,function(){this.$get=n})},I6=function(t,n,r){var i=arguments.length>3?YS.call(arguments,3):[],o=this;return ZS.call(this,t,function(){var s=n,l=i.map(R6,o.container);return r?new(n.bind.apply(n,[null].concat(l))):s.apply(null,l)})},bq=function(t,n){return I6.apply(this,[t,n,!0].concat(YS.call(arguments,2)))},_q=function(t,n){return I6.apply(this,[t,n,!1].concat(YS.call(arguments,2)))},D6=function(t,n){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:n,writable:!0})},F6=function(t,n){var r=t[n];return r||(r={},D6.call(t,n,r)),r},xq=function(t,n){var r;return r=t.split(co),t=r.pop(),D6.call(r.reduce(F6,this.container),t,n),this},wq=function(t,n){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:n,writable:!1})},Oq=function(t,n){var r=t.split(co);return t=r.pop(),wq.call(r.reduce(F6,this.container),t,n),this},B6=function(t,n){var r,i;return typeof t===N6&&(n=t,t=L6),r=t.split(co),i=r.shift(),r.length?Qy.call(this,i).decorator(r.join(co),n):(this.decorators[i]||(this.decorators[i]=[]),this.decorators[i].push(n)),this},Sq=function(t){return this.deferred.push(t),this},Eq=function(t){return(t||[]).map(R6,this.container)},Cq=function(t,n){return ZS.call(this,t,function(i){return{instance:n.bind(n,i)}})},Pq=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},XS=function(t){return Object.keys(t||this.container||{}).filter(Pq)},Wv={},Tq=function(t){var n;return typeof t===M6?(n=Wv[t],n||(Wv[t]=n=new Li,n.constant("BOTTLE_NAME",t)),n):new Li},jq=function(t){typeof t===M6?delete Wv[t]:Wv={}},U6=function(t){var n=t.$value===void 0?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,n].concat(t.$inject||[]))},Qj=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+KS]},Aq=function(t){var n=this.originalProviders,r=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(o){if(!(r&&t.indexOf(o)===-1)){var a=o.split(co);a.length>1&&a.forEach(Qj,Qy.call(this,a[0])),Qj.call(this,o),this.provider(o,n[o])}},this)},kq=function(t){return this.deferred.forEach(function(r){r(t)}),this};Li=function e(t){if(!(this instanceof e))return e.pop(t);this.id=hq++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:B6.bind(this),$register:U6.bind(this),$list:XS.bind(this)}};Li.prototype={constant:Oq,decorator:B6,defer:Sq,digest:Eq,factory:ZS,instanceFactory:Cq,list:XS,middleware:vq,provider:$6,resetProviders:Aq,register:U6,resolve:kq,service:bq,serviceFactory:_q,value:xq};Li.pop=Tq;Li.clear=jq;Li.list=XS;Li.config={strict:!1};const z6=Li;var Nq=Object.defineProperty,Mq=(e,t,n)=>t in e?Nq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lq=(e,t,n)=>(Mq(e,typeof t!="symbol"?t+"":t,n),n);const Rq=(e,t)=>`${e}/rest/v${t}`,$q=e=>e.dir?`${e.field}-${e.dir}`:void 0,Iq=({orderBy:e={},excludeMaxVisitsReached:t,excludePastValidUntil:n,...r})=>({...r,excludeMaxVisitsReached:t===!0?"true":void 0,excludePastValidUntil:n===!0?"true":void 0,orderBy:$q(e)}),Dq=(e,t)=>{const[n,r]=e.split("://");if(!r)throw new Error(`It is not possible to determine authority on "${e}" for replacement`);const[,...i]=r.split("/"),o=i.length?`/${i.join("/")}`:"";return`${n}://${t}${o}`},Fq=(e={})=>{const t=Object.entries(e).flatMap(([n,r])=>r==null?[]:Array.isArray(r)?r.map(i=>[`${n}[]`,i]):[[n,r]]);return new URLSearchParams(t).toString()};class Bq{constructor(t,n){Lq(this,"apiVersion"),this.httpClient=t,this.serverInfo=n,this.apiVersion=3}async listShortUrls(t={}){return this.performRequest({url:"/short-urls",query:Iq(t)}).then(({shortUrls:n})=>n)}async createShortUrl(t){const n=Object.entries(t).reduce((r,[i,o])=>(o&&(r[i]=o),r),{});return this.performRequest({url:"/short-urls",method:"POST",body:n})}async getShortUrl(t,n){return this.performRequest({url:`/short-urls/${t}`,query:{domain:n}})}async deleteShortUrl(t,n){return this.performEmptyRequest({url:`/short-urls/${t}`,method:"DELETE",query:{domain:n}})}async updateShortUrl(t,n,r){return this.performRequest({url:`/short-urls/${t}`,method:"PATCH",query:{domain:n},body:r})}async getShortUrlRedirectRules(t,n){return this.performRequest({url:`/short-urls/${t}/redirect-rules`,method:"GET",query:{domain:n}})}async setShortUrlRedirectRules(t,n,r){return this.performRequest({url:`/short-urls/${t}/redirect-rules`,method:"POST",query:{domain:n},body:r})}async getVisitsOverview(){return this.performRequest({url:"/visits"}).then(({visits:t})=>t)}async getShortUrlVisits(t,n){return this.performVisitsRequest({url:`/short-urls/${t}/visits`,query:n})}async getTagVisits(t,n){return this.performVisitsRequest({url:`/tags/${t}/visits`,query:n})}async getDomainVisits(t,n){return this.performVisitsRequest({url:`/domains/${t}/visits`,query:n})}async getOrphanVisits(t){return this.performVisitsRequest({url:"/visits/orphan",query:t})}async getNonOrphanVisits(t){return this.performVisitsRequest({url:"/visits/non-orphan",query:t})}async performVisitsRequest(t){return this.performRequest(t).then(({visits:n})=>n)}async deleteShortUrlVisits(t,n){const r=n?{domain:n}:void 0;return this.performRequest({method:"DELETE",url:`/short-urls/${t}/visits`,query:r})}async deleteOrphanVisits(){return this.performRequest({method:"DELETE",url:"/visits/orphan"})}async listTags(){return this.performRequest({url:"/tags",query:{withStats:"true"}}).then(({tags:t})=>t)}async tagsStats(){return this.performRequest({url:"/tags/stats"}).then(({tags:t})=>t)}async deleteTags(t){return this.performEmptyRequest({url:"/tags",method:"DELETE",query:{tags:t}}).then(()=>({tags:t}))}async editTag(t,n){return this.performEmptyRequest({url:"/tags",method:"PUT",body:{oldName:t,newName:n}}).then(()=>({oldName:t,newName:n}))}async listDomains(){return this.performRequest({url:"/domains"}).then(({domains:t})=>t)}async editDomainRedirects(t){return this.performRequest({url:"/domains/redirects",method:"PATCH",body:t})}async health(t){return this.performRequest({url:"/health",domain:t})}async mercureInfo(){return this.performRequest({url:"/mercure-info"})}async performRequest(t){return this.httpClient.jsonRequest(...this.toFetchParams(t))}async performEmptyRequest(t){return this.httpClient.emptyRequest(...this.toFetchParams(t))}toFetchParams({url:t,method:n="GET",query:r={},body:i,domain:o}){const a=Fq(r),s=a?`?${a}`:"",l=o?Dq(this.serverInfo.baseUrl,o):this.serverInfo.baseUrl;return[`${Rq(l,this.apiVersion)}${t}${s}`,{method:n,body:i&&JSON.stringify(i),headers:{"X-Api-Key":this.serverInfo.apiKey}}]}}const V6=e=>!!(e!=null&&e.url)&&!!(e!=null&&e.apiKey),ld=e=>!!(e!=null&&e.id),QS=e=>!!(e!=null&&e.version),Uq=e=>!!(e!=null&&e.serverNotFound),zq=e=>ld(e)?e.id:"",Vq=({name:e,url:t,apiKey:n})=>({name:e,url:t,apiKey:n}),Jj={},Wq=e=>typeof e=="function",Hq=e=>{const{selectedServer:t}=e();if(!V6(t))throw new Error("There's no selected server or it is not found");return t},Gq=e=>t=>{const{url:n,apiKey:r}=Wq(t)?Hq(t):t,i=`${r}_${n}`,o=Jj[i]??new Bq(e,{apiKey:r,baseUrl:n});return Jj[i]=o,o},qq=e=>{e.serviceFactory("buildShlinkApiClient",Gq,"HttpClient")},W6={prefix:"fas",iconName:"trash-can",icon:[448,512,[61460,"trash-alt"],"f2ed","M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"]},Kq={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zm64 80l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 400l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},Yq=Kq,Zq={prefix:"fas",iconName:"circle-minus",icon:[512,512,["minus-circle"],"f056","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"]},JS=Zq,Xq={prefix:"fas",iconName:"file-csv",icon:[512,512,[],"f6dd","M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 144-208 0c-35.3 0-64 28.7-64 64l0 144-48 0c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM200 352l16 0c22.1 0 40 17.9 40 40l0 8c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-8c0-4.4-3.6-8-8-8l-16 0c-4.4 0-8 3.6-8 8l0 80c0 4.4 3.6 8 8 8l16 0c4.4 0 8-3.6 8-8l0-8c0-8.8 7.2-16 16-16s16 7.2 16 16l0 8c0 22.1-17.9 40-40 40l-16 0c-22.1 0-40-17.9-40-40l0-80c0-22.1 17.9-40 40-40zm133.1 0l34.9 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-34.9 0c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1L304 512c-8.8 0-16-7.2-16-16s7.2-16 16-16l42.9 0c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16l0 31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66l0-31.6c0-8.8 7.2-16 16-16s16 7.2 16 16l0 31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6l0-31.6c0-8.8 7.2-16 16-16z"]},Qq={prefix:"fas",iconName:"pencil",icon:[512,512,[9999,61504,"pencil-alt"],"f303","M410.3 231l11.3-11.3-33.9-33.9-62.1-62.1L291.7 89.8l-11.3 11.3-22.6 22.6L58.6 322.9c-10.4 10.4-18 23.3-22.2 37.4L1 480.7c-2.5 8.4-.2 17.5 6.1 23.7s15.3 8.5 23.7 6.1l120.3-35.4c14.1-4.2 27-11.8 37.4-22.2L387.7 253.7 410.3 231zM160 399.4l-9.1 22.7c-4 3.1-8.5 5.4-13.3 6.9L59.4 452l23-78.1c1.4-4.9 3.8-9.4 6.9-13.3l22.7-9.1 0 32c0 8.8 7.2 16 16 16l32 0zM362.7 18.7L348.3 33.2 325.7 55.8 314.3 67.1l33.9 33.9 62.1 62.1 33.9 33.9 11.3-11.3 22.6-22.6 14.5-14.5c25-25 25-65.5 0-90.5L453.3 18.7c-25-25-65.5-25-90.5 0zm-47.4 168l-144 144c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l144-144c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6z"]},H6=Qq,G6={prefix:"fas",iconName:"circle-notch",icon:[512,512,[],"f1ce","M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]},Jq={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},q6={prefix:"fas",iconName:"list",icon:[512,512,["list-squares"],"f03a","M40 48C26.7 48 16 58.7 16 72l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24L40 48zM192 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L192 64zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zm0 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l288 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-288 0zM16 232l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24zM40 368c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24l48 0c13.3 0 24-10.7 24-24l0-48c0-13.3-10.7-24-24-24l-48 0z"]},eK={prefix:"fas",iconName:"circle-dot",icon:[512,512,[128280,"dot-circle"],"f192","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-352a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"]},tK=eK,nK={prefix:"fas",iconName:"pen-to-square",icon:[512,512,["edit"],"f044","M471.6 21.7c-21.9-21.9-57.3-21.9-79.2 0L362.3 51.7l97.9 97.9 30.1-30.1c21.9-21.9 21.9-57.3 0-79.2L471.6 21.7zm-299.2 220c-6.1 6.1-10.8 13.6-13.5 21.9l-29.6 88.8c-2.9 8.6-.6 18.1 5.8 24.6s15.9 8.7 24.6 5.8l88.8-29.6c8.2-2.7 15.7-7.4 21.9-13.5L437.7 172.3 339.7 74.3 172.4 241.7zM96 64C43 64 0 107 0 160L0 416c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-96c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7-14.3 32-32 32L96 448c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 64z"]},eE=nK,rK={prefix:"fas",iconName:"plug",icon:[384,512,[128268],"f1e6","M96 0C78.3 0 64 14.3 64 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM288 0c-17.7 0-32 14.3-32 32l0 96 64 0 0-96c0-17.7-14.3-32-32-32zM32 160c-17.7 0-32 14.3-32 32s14.3 32 32 32l0 32c0 77.4 55 142 128 156.8l0 67.2c0 17.7 14.3 32 32 32s32-14.3 32-32l0-67.2C297 398 352 333.4 352 256l0-32c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 160z"]},iK={prefix:"fas",iconName:"globe",icon:[512,512,[127760],"f0ac","M352 256c0 22.2-1.2 43.6-3.3 64l-185.3 0c-2.2-20.4-3.3-41.8-3.3-64s1.2-43.6 3.3-64l185.3 0c2.2 20.4 3.3 41.8 3.3 64zm28.8-64l123.1 0c5.3 20.5 8.1 41.9 8.1 64s-2.8 43.5-8.1 64l-123.1 0c2.1-20.6 3.2-42 3.2-64s-1.1-43.4-3.2-64zm112.6-32l-116.7 0c-10-63.9-29.8-117.4-55.3-151.6c78.3 20.7 142 77.5 171.9 151.6zm-149.1 0l-176.6 0c6.1-36.4 15.5-68.6 27-94.7c10.5-23.6 22.2-40.7 33.5-51.5C239.4 3.2 248.7 0 256 0s16.6 3.2 27.8 13.8c11.3 10.8 23 27.9 33.5 51.5c11.6 26 20.9 58.2 27 94.7zm-209 0L18.6 160C48.6 85.9 112.2 29.1 190.6 8.4C165.1 42.6 145.3 96.1 135.3 160zM8.1 192l123.1 0c-2.1 20.6-3.2 42-3.2 64s1.1 43.4 3.2 64L8.1 320C2.8 299.5 0 278.1 0 256s2.8-43.5 8.1-64zM194.7 446.6c-11.6-26-20.9-58.2-27-94.6l176.6 0c-6.1 36.4-15.5 68.6-27 94.6c-10.5 23.6-22.2 40.7-33.5 51.5C272.6 508.8 263.3 512 256 512s-16.6-3.2-27.8-13.8c-11.3-10.8-23-27.9-33.5-51.5zM135.3 352c10 63.9 29.8 117.4 55.3 151.6C112.2 482.9 48.6 426.1 18.6 352l116.7 0zm358.1 0c-30 74.1-93.6 130.9-171.9 151.6c25.5-34.2 45.2-87.7 55.3-151.6l116.7 0z"]},oK={prefix:"fas",iconName:"ban",icon:[512,512,[128683,"cancel"],"f05e","M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},eA={prefix:"fas",iconName:"server",icon:[512,512,[],"f233","M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"]},aK={prefix:"fas",iconName:"file-arrow-up",icon:[384,512,["file-upload"],"f574","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-102.1-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31L216 408z"]},sK=aK,lK={prefix:"fas",iconName:"map-location-dot",icon:[576,512,["map-marked-alt"],"f5a0","M408 120c0 54.6-73.1 151.9-105.2 192c-7.7 9.6-22 9.6-29.6 0C241.1 271.9 168 174.6 168 120C168 53.7 221.7 0 288 0s120 53.7 120 120zm8 80.4c3.5-6.9 6.7-13.8 9.6-20.6c.5-1.2 1-2.5 1.5-3.7l116-46.4C558.9 123.4 576 135 576 152l0 270.8c0 9.8-6 18.6-15.1 22.3L416 503l0-302.6zM137.6 138.3c2.4 14.1 7.2 28.3 12.8 41.5c2.9 6.8 6.1 13.7 9.6 20.6l0 251.4L32.9 502.7C17.1 509 0 497.4 0 480.4L0 209.6c0-9.8 6-18.6 15.1-22.3l122.6-49zM327.8 332c13.9-17.4 35.7-45.7 56.2-77l0 249.3L192 449.4 192 255c20.5 31.3 42.3 59.6 56.2 77c20.5 25.6 59.1 25.6 79.6 0zM288 152a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"]},gx=lK,cK={prefix:"fas",iconName:"caret-up",icon:[320,512,[],"f0d8","M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"]},uK={prefix:"fas",iconName:"palette",icon:[512,512,[127912],"f53f","M512 256c0 .9 0 1.8 0 2.7c-.4 36.5-33.6 61.3-70.1 61.3L344 320c-26.5 0-48 21.5-48 48c0 3.4 .4 6.7 1 9.9c2.1 10.2 6.5 20 10.8 29.9c6.1 13.8 12.1 27.5 12.1 42c0 31.8-21.6 60.7-53.4 62c-3.5 .1-7 .2-10.6 .2C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256zM128 288a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm0-96a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM288 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 96a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"]},fK={prefix:"fas",iconName:"arrow-down-wide-short",icon:[576,512,["sort-amount-asc","sort-amount-down"],"f160","M151.6 469.6C145.5 476.2 137 480 128 480s-17.5-3.8-23.6-10.4l-88-96c-11.9-13-11.1-33.3 2-45.2s33.3-11.1 45.2 2L96 365.7 96 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 301.7 32.4-35.4c11.9-13 32.2-13.9 45.2-2s13.9 32.2 2 45.2l-88 96zM320 480c-17.7 0-32-14.3-32-32s14.3-32 32-32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-96 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-160 0zm0-128c-17.7 0-32-14.3-32-32s14.3-32 32-32l224 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L320 96z"]},dK=fK,tE={prefix:"fas",iconName:"chart-pie",icon:[576,512,["pie-chart"],"f200","M304 240l0-223.4c0-9 7-16.6 16-16.6C443.7 0 544 100.3 544 224c0 9-7.6 16-16.6 16L304 240zM32 272C32 150.7 122.1 50.3 239 34.3c9.2-1.3 17 6.1 17 15.4L256 288 412.5 444.5c6.7 6.7 6.2 17.7-1.5 23.1C371.8 495.6 323.8 512 272 512C139.5 512 32 404.6 32 272zm526.4 16c9.3 0 16.6 7.8 15.4 17c-7.7 55.9-34.6 105.6-73.9 142.3c-6 5.6-15.4 5.2-21.2-.7L320 288l238.4 0z"]},Jy={prefix:"fas",iconName:"chart-line",icon:[512,512,["line-chart"],"f201","M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64L0 400c0 44.2 35.8 80 80 80l400 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 416c-8.8 0-16-7.2-16-16L64 64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"]},K6={prefix:"fas",iconName:"tags",icon:[512,512,[],"f02c","M345 39.1L472.8 168.4c52.4 53 52.4 138.2 0 191.2L360.8 472.9c-9.3 9.4-24.5 9.5-33.9 .2s-9.5-24.5-.2-33.9L438.6 325.9c33.9-34.3 33.9-89.4 0-123.7L310.9 72.9c-9.3-9.4-9.2-24.6 .2-33.9s24.6-9.2 33.9 .2zM0 229.5L0 80C0 53.5 21.5 32 48 32l149.5 0c17 0 33.3 6.7 45.3 18.7l168 168c25 25 25 65.5 0 90.5L277.3 442.7c-25 25-65.5 25-90.5 0l-168-168C6.7 262.7 0 246.5 0 229.5zM144 144a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},tA={prefix:"fas",iconName:"calendar-xmark",icon:[448,512,["calendar-times"],"f273","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 48 0c26.5 0 48 21.5 48 48l0 48L0 160l0-48C0 85.5 21.5 64 48 64l48 0 0-32c0-17.7 14.3-32 32-32zM0 192l448 0 0 272c0 26.5-21.5 48-48 48L48 512c-26.5 0-48-21.5-48-48L0 192zM305 305c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47z"]},hK={prefix:"fas",iconName:"trash",icon:[448,512,[],"f1f8","M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"]},pK={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},mK={prefix:"fas",iconName:"up-right-from-square",icon:[512,512,["external-link-alt"],"f35d","M352 0c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9L370.7 96 201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L416 141.3l41.4 41.4c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6l0-128c0-17.7-14.3-32-32-32L352 0zM80 32C35.8 32 0 67.8 0 112L0 432c0 44.2 35.8 80 80 80l320 0c44.2 0 80-35.8 80-80l0-112c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 112c0 8.8-7.2 16-16 16L80 448c-8.8 0-16-7.2-16-16l0-320c0-8.8 7.2-16 16-16l112 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L80 32z"]},vK=mK,gK={prefix:"fas",iconName:"tag",icon:[448,512,[127991],"f02b","M0 80L0 229.5c0 17 6.7 33.3 18.7 45.3l176 176c25 25 65.5 25 90.5 0L418.7 317.3c25-25 25-65.5 0-90.5l-176-176c-12-12-28.3-18.7-45.3-18.7L48 32C21.5 32 0 53.5 0 80zm112 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},yK={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},nE=yK,bK={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M125.7 160l50.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L48 224c-17.7 0-32-14.3-32-32L16 64c0-17.7 14.3-32 32-32s32 14.3 32 32l0 51.2L97.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L125.7 160z"]},_K=bK,xK={prefix:"fas",iconName:"grip-vertical",icon:[320,512,[],"f58e","M40 352l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zm192 0l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 320c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 192l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40zM40 160c-22.1 0-40-17.9-40-40L0 72C0 49.9 17.9 32 40 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0zM232 32l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40z"]},wK={prefix:"fas",iconName:"caret-down",icon:[320,512,[],"f0d7","M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"]},OK={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]},SK=OK,EK={prefix:"fas",iconName:"house",icon:[576,512,[127968,63498,63500,"home","home-alt","home-lg-alt"],"f015","M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"]},CK=EK,PK={prefix:"fas",iconName:"arrow-up-wide-short",icon:[576,512,["sort-amount-up"],"f161","M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 480l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm0-128l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32z"]},TK=PK,jK={prefix:"fas",iconName:"file-arrow-down",icon:[384,512,["file-download"],"f56d","M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 232l0 102.1 31-31c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-72 72c-9.4 9.4-24.6 9.4-33.9 0l-72-72c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l31 31L168 232c0-13.3 10.7-24 24-24s24 10.7 24 24z"]},Y6=jK,AK={prefix:"fas",iconName:"sun",icon:[512,512,[9728],"f185","M361.5 1.2c5 2.1 8.6 6.6 9.6 11.9L391 121l107.9 19.8c5.3 1 9.8 4.6 11.9 9.6s1.5 10.7-1.6 15.2L446.9 256l62.3 90.3c3.1 4.5 3.7 10.2 1.6 15.2s-6.6 8.6-11.9 9.6L391 391 371.1 498.9c-1 5.3-4.6 9.8-9.6 11.9s-10.7 1.5-15.2-1.6L256 446.9l-90.3 62.3c-4.5 3.1-10.2 3.7-15.2 1.6s-8.6-6.6-9.6-11.9L121 391 13.1 371.1c-5.3-1-9.8-4.6-11.9-9.6s-1.5-10.7 1.6-15.2L65.1 256 2.8 165.7c-3.1-4.5-3.7-10.2-1.6-15.2s6.6-8.6 11.9-9.6L121 121 140.9 13.1c1-5.3 4.6-9.8 9.6-11.9s10.7-1.5 15.2 1.6L256 65.1 346.3 2.8c4.5-3.1 10.2-3.7 15.2-1.6zM160 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z"]},kK={prefix:"fas",iconName:"arrow-down",icon:[384,512,[8595],"f063","M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},NK={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"]},MK={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},LK=MK,RK={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},$K={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},ep={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"]},IK={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},yx=IK,DK={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},FK={prefix:"fas",iconName:"rotate",icon:[512,512,[128260,"sync-alt"],"f2f1","M142.9 142.9c-17.5 17.5-30.1 38-37.8 59.8c-5.9 16.7-24.2 25.4-40.8 19.5s-25.4-24.2-19.5-40.8C55.6 150.7 73.2 122 97.6 97.6c87.2-87.2 228.3-87.5 315.8-1L455 55c6.9-6.9 17.2-8.9 26.2-5.2s14.8 12.5 14.8 22.2l0 128c0 13.3-10.7 24-24 24l-8.4 0c0 0 0 0 0 0L344 224c-9.7 0-18.5-5.8-22.2-14.8s-1.7-19.3 5.2-26.2l41.1-41.1c-62.6-61.5-163.1-61.2-225.3 1zM16 312c0-13.3 10.7-24 24-24l7.6 0 .7 0L168 288c9.7 0 18.5 5.8 22.2 14.8s1.7 19.3-5.2 26.2l-41.1 41.1c62.6 61.5 163.1 61.2 225.3-1c17.5-17.5 30.1-38 37.8-59.8c5.9-16.7 24.2-25.4 40.8-19.5s25.4 24.2 19.5 40.8c-10.8 30.6-28.4 59.3-52.9 83.8c-87.2 87.2-228.3 87.5-315.8 1L57 457c-6.9 6.9-17.2 8.9-26.2 5.2S16 449.7 16 440l0-119.6 0-.7 0-7.6z"]},BK=FK,nA={prefix:"fas",iconName:"robot",icon:[640,512,[129302],"f544","M320 0c17.7 0 32 14.3 32 32l0 64 120 0c39.8 0 72 32.2 72 72l0 272c0 39.8-32.2 72-72 72l-304 0c-39.8 0-72-32.2-72-72l0-272c0-39.8 32.2-72 72-72l120 0 0-64c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224l16 0 0 192-16 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-16 0 0-192 16 0z"]},Z6={prefix:"fas",iconName:"gears",icon:[640,512,["cogs"],"f085","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},UK=Z6,zK={prefix:"fas",iconName:"qrcode",icon:[448,512,[],"f029","M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48L0 80zM64 96l0 64 64 0 0-64L64 96zM0 336c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96zm64 16l0 64 64 0 0-64-64 0zM304 32l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm80 64l-64 0 0 64 64 0 0-64zM256 304c0-8.8 7.2-16 16-16l64 0c8.8 0 16 7.2 16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s7.2-16 16-16s16 7.2 16 16l0 96c0 8.8-7.2 16-16 16l-64 0c-8.8 0-16-7.2-16-16s-7.2-16-16-16s-16 7.2-16 16l0 64c0 8.8-7.2 16-16 16l-32 0c-8.8 0-16-7.2-16-16l0-160zM368 480a16 16 0 1 1 0-32 16 16 0 1 1 0 32zm64 0a16 16 0 1 1 0-32 16 16 0 1 1 0 32z"]},VK={prefix:"fas",iconName:"moon",icon:[384,512,[127769,9214],"f186","M223.5 32C100 32 0 132.3 0 256S100 480 223.5 480c60.6 0 115.5-24.2 155.8-63.4c5-4.9 6.3-12.5 3.1-18.7s-10.1-9.7-17-8.5c-9.8 1.7-19.8 2.6-30.1 2.6c-96.9 0-175.5-78.8-175.5-176c0-65.8 36-123.1 89.3-153.3c6.1-3.5 9.2-10.5 7.7-17.3s-7.3-11.9-14.3-12.5c-6.3-.5-12.6-.8-19-.8z"]},WK={prefix:"fas",iconName:"link-slash",icon:[640,512,["chain-broken","chain-slash","unlink"],"f127","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"]},HK={prefix:"fas",iconName:"desktop",icon:[576,512,[128421,61704,"desktop-alt"],"f390","M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l176 0-10.7 32L160 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-69.3 0L336 416l176 0c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0zM512 64l0 224L64 288 64 64l448 0z"]},Gd={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]},GK={prefix:"fas",iconName:"arrows-split-up-and-left",icon:[512,512,[],"e4bc","M246.6 150.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L352 109.3 352 384c0 35.3 28.7 64 64 64l64 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-64 0c-70.7 0-128-57.3-128-128c0-35.3-28.7-64-64-64l-114.7 0 41.4 41.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0l-96-96c-12.5-12.5-12.5-32.8 0-45.3l96-96c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L109.3 256 224 256c23.3 0 45.2 6.2 64 17.1l0-163.9-41.4 41.4z"]},qK={prefix:"fas",iconName:"triangle-exclamation",icon:[512,512,[9888,"exclamation-triangle","warning"],"f071","M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]},KK=qK,rA=()=>{};let rE={},X6={},Q6=null,J6={mark:rA,measure:rA};try{typeof window<"u"&&(rE=window),typeof document<"u"&&(X6=document),typeof MutationObserver<"u"&&(Q6=MutationObserver),typeof performance<"u"&&(J6=performance)}catch{}const{userAgent:iA=""}=rE.navigator||{},Ha=rE,At=X6,oA=Q6,pm=J6;Ha.document;const Jo=!!At.documentElement&&!!At.head&&typeof At.addEventListener=="function"&&typeof At.createElement=="function",eI=~iA.indexOf("MSIE")||~iA.indexOf("Trident/");var Lt="classic",tI="duotone",kr="sharp",Nr="sharp-duotone",YK=[Lt,tI,kr,Nr],ZK={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds"}},aA={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},XK=["kit"],QK=/fa(s|r|l|t|d|b|k|kd|ss|sr|sl|st|sds)?[\-\ ]/,JK=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,eY={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}},tY={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds"}},nY={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds"}},rY={classic:["fas","far","fal","fat"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds"]},iY={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid"}},oY={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds"}},nI={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid"}},aY=["solid","regular","light","thin","duotone","brands"],rI=[1,2,3,4,5,6,7,8,9,10],sY=rI.concat([11,12,13,14,15,16,17,18,19,20]),Vf={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},lY=[...Object.keys(rY),...aY,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Vf.GROUP,Vf.SWAP_OPACITY,Vf.PRIMARY,Vf.SECONDARY].concat(rI.map(e=>"".concat(e,"x"))).concat(sY.map(e=>"w-".concat(e))),cY={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},uY={kit:{"fa-kit":"fak"},"kit-duotone":{"fa-kit-duotone":"fakd"}},fY={kit:{fak:"fa-kit"},"kit-duotone":{fakd:"fa-kit-duotone"}},sA={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}};const zo="___FONT_AWESOME___",bx=16,iI="fa",oI="svg-inline--fa",sl="data-fa-i2svg",_x="data-fa-pseudo-element",dY="data-fa-pseudo-element-pending",iE="data-prefix",oE="data-icon",lA="fontawesome-i2svg",hY="async",pY=["HTML","HEAD","STYLE","SCRIPT"],aI=(()=>{try{return!0}catch{return!1}})(),sI=[Lt,kr,Nr];function tp(e){return new Proxy(e,{get(t,n){return n in t?t[n]:t[Lt]}})}const lI={...nI};lI[Lt]={...nI[Lt],...aA.kit,...aA["kit-duotone"]};const Ks=tp(lI),xx={...oY};xx[Lt]={...xx[Lt],...sA.kit,...sA["kit-duotone"]};const qd=tp(xx),wx={...iY};wx[Lt]={...wx[Lt],...fY.kit};const Ys=tp(wx),Ox={...nY};Ox[Lt]={...Ox[Lt],...uY.kit};const mY=tp(Ox),vY=QK,cI="fa-layers-text",gY=JK,yY={...ZK};tp(yY);const bY=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],m1=Vf,Uc=new Set;Object.keys(qd[Lt]).map(Uc.add.bind(Uc));Object.keys(qd[kr]).map(Uc.add.bind(Uc));Object.keys(qd[Nr]).map(Uc.add.bind(Uc));const _Y=[...XK,...lY],cd=Ha.FontAwesomeConfig||{};function xY(e){var t=At.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function wY(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}At&&typeof At.querySelector=="function"&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(t=>{let[n,r]=t;const i=wY(xY(n));i!=null&&(cd[r]=i)});const uI={styleDefault:"solid",familyDefault:"classic",cssPrefix:iI,replacementClass:oI,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};cd.familyPrefix&&(cd.cssPrefix=cd.familyPrefix);const zc={...uI,...cd};zc.autoReplaceSvg||(zc.observeMutations=!1);const Ie={};Object.keys(uI).forEach(e=>{Object.defineProperty(Ie,e,{enumerable:!0,set:function(t){zc[e]=t,ud.forEach(n=>n(Ie))},get:function(){return zc[e]}})});Object.defineProperty(Ie,"familyPrefix",{enumerable:!0,set:function(e){zc.cssPrefix=e,ud.forEach(t=>t(Ie))},get:function(){return zc.cssPrefix}});Ha.FontAwesomeConfig=Ie;const ud=[];function OY(e){return ud.push(e),()=>{ud.splice(ud.indexOf(e),1)}}const la=bx,Qi={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function SY(e){if(!e||!Jo)return;const t=At.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;const n=At.head.childNodes;let r=null;for(let i=n.length-1;i>-1;i--){const o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return At.head.insertBefore(t,r),e}const EY="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Kd(){let e=12,t="";for(;e-- >0;)t+=EY[Math.random()*62|0];return t}function Pu(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function aE(e){return e.classList?Pu(e.classList):(e.getAttribute("class")||"").split(" ").filter(t=>t)}function fI(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function CY(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,'="').concat(fI(e[n]),'" '),"").trim()}function e0(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";"),"")}function sE(e){return e.size!==Qi.size||e.x!==Qi.x||e.y!==Qi.y||e.rotate!==Qi.rotate||e.flipX||e.flipY}function PY(e){let{transform:t,containerWidth:n,iconWidth:r}=e;const i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}function TY(e){let{transform:t,width:n=bx,height:r=bx,startCentered:i=!1}=e,o="";return i&&eI?o+="translate(".concat(t.x/la-n/2,"em, ").concat(t.y/la-r/2,"em) "):i?o+="translate(calc(-50% + ".concat(t.x/la,"em), calc(-50% + ").concat(t.y/la,"em)) "):o+="translate(".concat(t.x/la,"em, ").concat(t.y/la,"em) "),o+="scale(".concat(t.size/la*(t.flipX?-1:1),", ").concat(t.size/la*(t.flipY?-1:1),") "),o+="rotate(".concat(t.rotate,"deg) "),o}var jY=`:root, :host { --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free"; --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free"; --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro"; @@ -637,26 +637,26 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i0?"".concat(e,"px"):null}function nX(){return document.body.clientWidth0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oX;return t?e.split(" ").map(function(n){return t[n]||n}).join(" "):e}function is(e,t){var n={};return Object.keys(e).forEach(function(r){t.indexOf(r)===-1&&(n[r]=e[r])}),n}function II(e,t){for(var n=Array.isArray(t)?t:[t],r=n.length,i,o={};r>0;)r-=1,i=n[r],o[i]=e[i];return o}var AA={};function $x(e){AA[e]||(typeof console<"u"&&console.error(e),AA[e]=!0)}function DI(e,t){return function(r,i,o){r[i]!==null&&typeof r[i]<"u"&&$x('"'.concat(i,'" property of "').concat(o,`" has been deprecated. `).concat(t));for(var a=arguments.length,s=new Array(a>3?a-3:0),l=3;l"u"?"undefined":Vc(window))==="object"&&window.Element||function(){};function pE(e,t,n){if(!(e[t]instanceof aX))return new Error("Invalid prop `"+t+"` supplied to `"+n+"`. Expected prop to be an instance of Element. Validation failed.")}var Wc=$.oneOfType([$.string,$.func,pE,$.shape({current:$.any})]),it=$.oneOfType([$.func,$.string,$.shape({$$typeof:$.symbol,render:$.func}),$.arrayOf($.oneOfType([$.func,$.string,$.shape({$$typeof:$.symbol,render:$.func})]))]),Kv={Fade:150,Collapse:350,Modal:300,Carousel:600,Offcanvas:300},Yv=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],mm={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},ht={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},sX=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],mE=!!(typeof window<"u"&&window.document&&window.document.createElement);function lX(e){return e&&Vc(e)==="object"?"current"in e:!1}function FI(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Ix(e){var t=Vc(e);return e!=null&&(t==="object"||t==="function")}function kA(e){var t=Vc(e),n=NaN;if(t==="number")return e;if(t==="symbol"||t==="object"&&FI(e)==="[object Symbol]")return n;if(Ix(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=Ix(r)?"".concat(r):r}if(t!=="string")return e===0?e:+e;e=e.replace(/^\s+|\s+$/g,"");var i=/^0b[01]+$/i.test(e);return i||/^0o[0-7]+$/i.test(e)?parseInt(e.slice(2),i?2:8):/^[-+]0x[0-9a-f]+$/i.test(e)?n:+e}function cX(e){if(!Ix(e))return!1;var t=FI(e);return t==="[object Function]"||t==="[object AsyncFunction]"||t==="[object GeneratorFunction]"||t==="[object Proxy]"}function uX(e){if(lX(e))return e.current;if(cX(e))return e();if(typeof e=="string"&&mE){var t=document.querySelectorAll(e);if(t.length||(t=document.querySelectorAll("#".concat(e))),!t.length)throw new Error("The target '".concat(e,"' could not be identified in the dom, tip: check spelling"));return t}return e}function NA(e){return e===null?!1:Array.isArray(e)||mE&&typeof e.length=="number"}function Yd(e,t){var n=uX(e);return t?NA(n)?n:n===null?[]:[n]:NA(n)?n[0]:n}var fX=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal):not(.offcanvas)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],dX=["className","cssModule","noGutters","tag","widths"];function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var mX=["xs","sm","md","lg","xl","xxl"],Fl=$.oneOfType([$.number,$.string]),vX={tag:it,noGutters:DI($.bool,"Please use Bootstrap 5 gutter utility classes. https://getbootstrap.com/docs/5.0/layout/gutters/"),className:$.string,cssModule:$.object,xs:Fl,sm:Fl,md:Fl,lg:Fl,xl:Fl,xxl:Fl,widths:$.array};function Kn(e){var t=e.className,n=e.cssModule,r=e.noGutters,i=e.tag,o=i===void 0?"div":i,a=e.widths,s=a===void 0?mX:a,l=hX(e,dX),c=[];s.forEach(function(d,p){var v=e[d];if(delete l[d],!!v){var g=!p;c.push(g?"row-cols-".concat(v):"row-cols-".concat(d,"-").concat(v))}});var f=Be(He(t,r?"gx-0":null,"row",c),n);return V.createElement(o,Dx({},l,{className:f}))}Kn.propTypes=vX;var gX=["expand","className","cssModule","light","dark","fixed","sticky","color","container","tag","children"];function Fx(){return Fx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var _X={children:$.node,className:$.string,color:$.string,container:$.oneOfType([$.bool,$.string]),cssModule:$.object,dark:$.bool,expand:$.oneOfType([$.bool,$.string]),fixed:$.string,light:$.bool,role:$.string,sticky:$.string,tag:it},xX=function(t){return t===!1?!1:t===!0||t==="xs"?"navbar-expand":"navbar-expand-".concat(t)};function BI(e){var t,n=e.expand,r=n===void 0?!1:n,i=e.className,o=e.cssModule,a=e.light,s=e.dark,l=e.fixed,c=e.sticky,f=e.color,d=e.container,p=d===void 0?"fluid":d,v=e.tag,g=v===void 0?"nav":v,y=e.children,x=yX(e,gX),_=Be(He(i,"navbar",xX(r),(t={"navbar-light":a,"navbar-dark":s},x1(t,"bg-".concat(f),f),x1(t,"fixed-".concat(l),l),x1(t,"sticky-".concat(c),c),t)),o),b=p&&p===!0?"container":"container-".concat(p);return V.createElement(g,Fx({},x,{className:_}),p?V.createElement("div",{className:b},y):y)}BI.propTypes=_X;var wX=["className","cssModule","tag"];function Bx(){return Bx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var EX={className:$.string,cssModule:$.object,tag:it};function UI(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"a":r,o=OX(e,wX),a=Be(He(t,"navbar-brand"),n);return V.createElement(i,Bx({},o,{className:a}))}UI.propTypes=EX;var CX=["className","cssModule","children","tag"];function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var kX={className:$.string,cssModule:$.object,tag:it,type:$.string,children:$.node};function zI(e){var t=e.className,n=e.cssModule,r=e.children,i=e.tag,o=i===void 0?"button":i,a=jX(e,CX),s=Be(He(t,"navbar-toggler"),n);return V.createElement(o,Ux({"aria-label":"Toggle navigation"},PX({type:"button"},a),{className:s}),r||V.createElement("span",{className:Be("navbar-toggler-icon",n)}))}zI.propTypes=kX;var NX=["className","cssModule","tabs","pills","vertical","horizontal","justified","fill","navbar","card","tag"];function zx(){return zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var RX={card:$.bool,className:$.string,cssModule:$.object,fill:$.bool,horizontal:$.oneOf(["center","end"]),justified:$.bool,navbar:$.bool,pills:$.bool,tabs:$.bool,tag:it,vertical:$.oneOfType([$.bool,$.string])},$X=function(t){return t===!1?!1:t===!0||t==="xs"?"flex-column":"flex-".concat(t,"-column")};function vE(e){var t=e.className,n=e.cssModule,r=e.tabs,i=e.pills,o=e.vertical,a=o===void 0?!1:o,s=e.horizontal,l=e.justified,c=e.fill,f=e.navbar,d=e.card,p=e.tag,v=p===void 0?"ul":p,g=MX(e,NX),y=Be(He(t,f?"navbar-nav":"nav",s?"justify-content-".concat(s):!1,$X(a),{"nav-tabs":r,"card-header-tabs":d&&r,"nav-pills":i,"card-header-pills":d&&i,"nav-justified":l,"nav-fill":c}),n);return V.createElement(v,zx({},g,{className:y}))}vE.propTypes=RX;var IX=["className","cssModule","active","tag"];function Vx(){return Vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var BX={active:$.bool,className:$.string,cssModule:$.object,tag:it};function gE(e){var t=e.className,n=e.cssModule,r=e.active,i=e.tag,o=i===void 0?"li":i,a=DX(e,IX),s=Be(He(t,"nav-item",r?"active":!1),n);return V.createElement(o,Vx({},a,{className:s}))}gE.propTypes=BX;function Wx(e){"@babel/helpers - typeof";return Wx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wx(e)}var UX=["className","cssModule","active","tag","innerRef"];function Hx(){return Hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VX(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function WX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LA(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zv(e){return Zv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zv(e)}var ZX={active:$.bool,className:$.string,cssModule:$.object,disabled:$.bool,href:$.any,innerRef:$.oneOfType([$.object,$.func,$.string]),onClick:$.func,tag:it},WI=function(e){GX(n,e);var t=qX(n);function n(r){var i;return WX(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(VI(i)),i}return HX(n,[{key:"onClick",value:function(i){if(this.props.disabled){i.preventDefault();return}this.props.href==="#"&&i.preventDefault(),this.props.onClick&&this.props.onClick(i)}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.active,l=i.tag,c=l===void 0?"a":l,f=i.innerRef,d=zX(i,UX),p=Be(He(o,"nav-link",{disabled:d.disabled,active:s}),a);return V.createElement(c,Hx({},d,{ref:f,onClick:this.onClick,className:p}))}}]),n}(V.Component);WI.propTypes=ZX;const HI=WI;var XX=["className","cssModule","variant","innerRef"];function qx(){return qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var nQ={active:$.bool,"aria-label":$.string,onClick:$.func,variant:$.oneOf(["white"]),className:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func])};function GI(e){var t=e.className;e.cssModule;var n=e.variant,r=e.innerRef,i=eQ(e,XX),o=Be(He(t,"btn-close",n&&"btn-close-".concat(n)));return V.createElement("button",qx({ref:r,type:"button",className:o},QX({"aria-label":"close"},i)))}GI.propTypes=nQ;var rQ=["active","aria-label","block","className","close","cssModule","color","outline","size","tag","innerRef"];function Kx(){return Kx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oQ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var aQ={active:$.bool,"aria-label":$.string,block:$.bool,children:$.node,className:$.string,cssModule:$.object,close:$.bool,color:$.string,disabled:$.bool,innerRef:$.oneOfType([$.object,$.func,$.string]),onClick:$.func,outline:$.bool,size:$.string,tag:it};function Ke(e){var t=R.useCallback(function(b){if(e.disabled){b.preventDefault();return}if(e.onClick)return e.onClick(b)},[e.onClick,e.disabled]),n=e.active,r=e["aria-label"],i=e.block,o=e.className,a=e.close,s=e.cssModule,l=e.color,c=l===void 0?"secondary":l,f=e.outline,d=e.size,p=e.tag,v=p===void 0?"button":p,g=e.innerRef,y=iQ(e,rQ);if(a)return V.createElement(GI,y);var x="btn".concat(f?"-outline":"","-").concat(c),_=Be(He(o,"btn",x,d?"btn-".concat(d):!1,i?"d-block w-100":!1,{active:n,disabled:e.disabled}),s);return y.href&&v==="button"&&(v="a"),V.createElement(v,Kx({type:v==="button"&&y.onClick?"button":void 0},y,{className:_,ref:g,onClick:t,"aria-label":r}))}Ke.propTypes=aQ;var qI=R.createContext(),KI=R.createContext();function $A(e){var t=e.children,n=R.useState(null),r=n[0],i=n[1],o=R.useRef(!1);R.useEffect(function(){return function(){o.current=!0}},[]);var a=R.useCallback(function(s){o.current||i(s)},[]);return R.createElement(qI.Provider,{value:r},R.createElement(KI.Provider,{value:a},t))}var YI=function(t){return Array.isArray(t)?t[0]:t},ZI=function(t){if(typeof t=="function"){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i"u")return!1;var t=Rr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bQ(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ai(o)||!fo(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function _Q(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!ai(i)||!fo(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const xQ={name:"applyStyles",enabled:!0,phase:"write",fn:bQ,effect:_Q,requires:["computeStyles"]};function oo(e){return e.split("-")[0]}var Zs=Math.max,Xv=Math.min,Gc=Math.round;function Zx(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function JI(){return!/^((?!chrome|android).)*safari/i.test(Zx())}function qc(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ai(e)&&(i=e.offsetWidth>0&&Gc(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Gc(r.height)/e.offsetHeight||1);var a=cl(e)?Rr(e):window,s=a.visualViewport,l=!JI()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,f=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,p=r.height/o;return{width:d,height:p,top:f,right:c+d,bottom:f+p,left:c,x:c,y:f}}function _E(e){var t=qc(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function eD(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&bE(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Wo(e){return Rr(e).getComputedStyle(e)}function wQ(e){return["table","td","th"].indexOf(fo(e))>=0}function os(e){return((cl(e)?e.ownerDocument:e.document)||window.document).documentElement}function i0(e){return fo(e)==="html"?e:e.assignedSlot||e.parentNode||(bE(e)?e.host:null)||os(e)}function BA(e){return!ai(e)||Wo(e).position==="fixed"?null:e.offsetParent}function OQ(e){var t=/firefox/i.test(Zx()),n=/Trident/i.test(Zx());if(n&&ai(e)){var r=Wo(e);if(r.position==="fixed")return null}var i=i0(e);for(bE(i)&&(i=i.host);ai(i)&&["html","body"].indexOf(fo(i))<0;){var o=Wo(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function ip(e){for(var t=Rr(e),n=BA(e);n&&wQ(n)&&Wo(n).position==="static";)n=BA(n);return n&&(fo(n)==="html"||fo(n)==="body"&&Wo(n).position==="static")?t:n||OQ(e)||t}function xE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fd(e,t,n){return Zs(e,Xv(t,n))}function SQ(e,t,n){var r=fd(e,t,n);return r>n?n:r}function tD(){return{top:0,right:0,bottom:0,left:0}}function nD(e){return Object.assign({},tD(),e)}function rD(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var EQ=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,nD(typeof t!="number"?t:rD(t,rp))};function CQ(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=oo(n.placement),l=xE(s),c=[hr,fi].indexOf(s)>=0,f=c?"height":"width";if(!(!o||!a)){var d=EQ(i.padding,n),p=_E(o),v=l==="y"?dr:hr,g=l==="y"?ui:fi,y=n.rects.reference[f]+n.rects.reference[l]-a[l]-n.rects.popper[f],x=a[l]-n.rects.reference[l],_=ip(o),b=_?l==="y"?_.clientHeight||0:_.clientWidth||0:0,w=y/2-x/2,S=d[v],E=b-p[f]-d[g],C=b/2-p[f]/2+w,T=fd(S,C,E),A=l;n.modifiersData[r]=(t={},t[A]=T,t.centerOffset=T-C,t)}}function PQ(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||eD(t.elements.popper,i)&&(t.elements.arrow=i))}const TQ={name:"arrow",enabled:!0,phase:"main",fn:CQ,effect:PQ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Kc(e){return e.split("-")[1]}var jQ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function AQ(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Gc(n*i)/i||0,y:Gc(r*i)/i||0}}function UA(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,f=e.roundOffsets,d=e.isFixed,p=a.x,v=p===void 0?0:p,g=a.y,y=g===void 0?0:g,x=typeof f=="function"?f({x:v,y}):{x:v,y};v=x.x,y=x.y;var _=a.hasOwnProperty("x"),b=a.hasOwnProperty("y"),w=hr,S=dr,E=window;if(c){var C=ip(n),T="clientHeight",A="clientWidth";if(C===Rr(n)&&(C=os(n),Wo(C).position!=="static"&&s==="absolute"&&(T="scrollHeight",A="scrollWidth")),C=C,i===dr||(i===hr||i===fi)&&o===Zd){S=ui;var D=d&&C===E&&E.visualViewport?E.visualViewport.height:C[T];y-=D-r.height,y*=l?1:-1}if(i===hr||(i===dr||i===ui)&&o===Zd){w=fi;var N=d&&C===E&&E.visualViewport?E.visualViewport.width:C[A];v-=N-r.width,v*=l?1:-1}}var I=Object.assign({position:s},c&&jQ),F=f===!0?AQ({x:v,y},Rr(n)):{x:v,y};if(v=F.x,y=F.y,l){var K;return Object.assign({},I,(K={},K[S]=b?"0":"",K[w]=_?"0":"",K.transform=(E.devicePixelRatio||1)<=1?"translate("+v+"px, "+y+"px)":"translate3d("+v+"px, "+y+"px, 0)",K))}return Object.assign({},I,(t={},t[S]=b?y+"px":"",t[w]=_?v+"px":"",t.transform="",t))}function kQ(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:oo(t.placement),variation:Kc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,UA(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,UA(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const NQ={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kQ,data:{}};var vm={passive:!0};function MQ(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=Rr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(f){f.addEventListener("scroll",n.update,vm)}),s&&l.addEventListener("resize",n.update,vm),function(){o&&c.forEach(function(f){f.removeEventListener("scroll",n.update,vm)}),s&&l.removeEventListener("resize",n.update,vm)}}const LQ={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:MQ,data:{}};var RQ={left:"right",right:"left",bottom:"top",top:"bottom"};function iv(e){return e.replace(/left|right|bottom|top/g,function(t){return RQ[t]})}var $Q={start:"end",end:"start"};function zA(e){return e.replace(/start|end/g,function(t){return $Q[t]})}function wE(e){var t=Rr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function OE(e){return qc(os(e)).left+wE(e).scrollLeft}function IQ(e,t){var n=Rr(e),r=os(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=JI();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+OE(e),y:l}}function DQ(e){var t,n=os(e),r=wE(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Zs(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Zs(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+OE(e),l=-r.scrollTop;return Wo(i||n).direction==="rtl"&&(s+=Zs(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function SE(e){var t=Wo(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function iD(e){return["html","body","#document"].indexOf(fo(e))>=0?e.ownerDocument.body:ai(e)&&SE(e)?e:iD(i0(e))}function dd(e,t){var n;t===void 0&&(t=[]);var r=iD(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Rr(r),a=i?[o].concat(o.visualViewport||[],SE(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(dd(i0(a)))}function Xx(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function FQ(e,t){var n=qc(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function VA(e,t,n){return t===XI?Xx(IQ(e,n)):cl(t)?FQ(t,n):Xx(DQ(os(e)))}function BQ(e){var t=dd(i0(e)),n=["absolute","fixed"].indexOf(Wo(e).position)>=0,r=n&&ai(e)?ip(e):e;return cl(r)?t.filter(function(i){return cl(i)&&eD(i,r)&&fo(i)!=="body"}):[]}function UQ(e,t,n,r){var i=t==="clippingParents"?BQ(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var f=VA(e,c,r);return l.top=Zs(f.top,l.top),l.right=Xv(f.right,l.right),l.bottom=Xv(f.bottom,l.bottom),l.left=Zs(f.left,l.left),l},VA(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function oD(e){var t=e.reference,n=e.element,r=e.placement,i=r?oo(r):null,o=r?Kc(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case dr:l={x:a,y:t.y-n.height};break;case ui:l={x:a,y:t.y+t.height};break;case fi:l={x:t.x+t.width,y:s};break;case hr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?xE(i):null;if(c!=null){var f=c==="y"?"height":"width";switch(o){case Hc:l[c]=l[c]-(t[f]/2-n[f]/2);break;case Zd:l[c]=l[c]+(t[f]/2-n[f]/2);break}}return l}function Xd(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?sQ:s,c=n.rootBoundary,f=c===void 0?XI:c,d=n.elementContext,p=d===void 0?Of:d,v=n.altBoundary,g=v===void 0?!1:v,y=n.padding,x=y===void 0?0:y,_=nD(typeof x!="number"?x:rD(x,rp)),b=p===Of?lQ:Of,w=e.rects.popper,S=e.elements[g?b:p],E=UQ(cl(S)?S:S.contextElement||os(e.elements.popper),l,f,a),C=qc(e.elements.reference),T=oD({reference:C,element:w,strategy:"absolute",placement:i}),A=Xx(Object.assign({},w,T)),D=p===Of?A:C,N={top:E.top-D.top+_.top,bottom:D.bottom-E.bottom+_.bottom,left:E.left-D.left+_.left,right:D.right-E.right+_.right},I=e.modifiersData.offset;if(p===Of&&I){var F=I[i];Object.keys(N).forEach(function(K){var W=[fi,ui].indexOf(K)>=0?1:-1,X=[dr,ui].indexOf(K)>=0?"y":"x";N[K]+=F[X]*W})}return N}function zQ(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?QI:l,f=Kc(r),d=f?s?FA:FA.filter(function(g){return Kc(g)===f}):rp,p=d.filter(function(g){return c.indexOf(g)>=0});p.length===0&&(p=d);var v=p.reduce(function(g,y){return g[y]=Xd(e,{placement:y,boundary:i,rootBoundary:o,padding:a})[oo(y)],g},{});return Object.keys(v).sort(function(g,y){return v[g]-v[y]})}function VQ(e){if(oo(e)===yE)return[];var t=iv(e);return[zA(e),t,zA(t)]}function WQ(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,f=n.boundary,d=n.rootBoundary,p=n.altBoundary,v=n.flipVariations,g=v===void 0?!0:v,y=n.allowedAutoPlacements,x=t.options.placement,_=oo(x),b=_===x,w=l||(b||!g?[iv(x)]:VQ(x)),S=[x].concat(w).reduce(function(te,ie){return te.concat(oo(ie)===yE?zQ(t,{placement:ie,boundary:f,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:y}):ie)},[]),E=t.rects.reference,C=t.rects.popper,T=new Map,A=!0,D=S[0],N=0;N=0,X=W?"width":"height",Q=Xd(t,{placement:I,boundary:f,rootBoundary:d,altBoundary:p,padding:c}),ne=W?K?fi:hr:K?ui:dr;E[X]>C[X]&&(ne=iv(ne));var Z=iv(ne),z=[];if(o&&z.push(Q[F]<=0),s&&z.push(Q[ne]<=0,Q[Z]<=0),z.every(function(te){return te})){D=I,A=!1;break}T.set(I,z)}if(A)for(var B=g?3:1,H=function(ie){var ae=S.find(function(fe){var j=T.get(fe);if(j)return j.slice(0,ie).every(function(k){return k})});if(ae)return D=ae,"break"},ee=B;ee>0;ee--){var q=H(ee);if(q==="break")break}t.placement!==D&&(t.modifiersData[r]._skip=!0,t.placement=D,t.reset=!0)}}const HQ={name:"flip",enabled:!0,phase:"main",fn:WQ,requiresIfExists:["offset"],data:{_skip:!1}};function WA(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function HA(e){return[dr,fi,ui,hr].some(function(t){return e[t]>=0})}function GQ(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Xd(t,{elementContext:"reference"}),s=Xd(t,{altBoundary:!0}),l=WA(a,r),c=WA(s,i,o),f=HA(l),d=HA(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const qQ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:GQ};function KQ(e,t,n){var r=oo(e),i=[hr,dr].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[hr,fi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function YQ(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=QI.reduce(function(f,d){return f[d]=KQ(d,t.rects,o),f},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const ZQ={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:YQ};function XQ(e){var t=e.state,n=e.name;t.modifiersData[n]=oD({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const QQ={name:"popperOffsets",enabled:!0,phase:"read",fn:XQ,data:{}};function JQ(e){return e==="x"?"y":"x"}function eJ(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,f=n.altBoundary,d=n.padding,p=n.tether,v=p===void 0?!0:p,g=n.tetherOffset,y=g===void 0?0:g,x=Xd(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:f}),_=oo(t.placement),b=Kc(t.placement),w=!b,S=xE(_),E=JQ(S),C=t.modifiersData.popperOffsets,T=t.rects.reference,A=t.rects.popper,D=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,N=typeof D=="number"?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,F={x:0,y:0};if(C){if(o){var K,W=S==="y"?dr:hr,X=S==="y"?ui:fi,Q=S==="y"?"height":"width",ne=C[S],Z=ne+x[W],z=ne-x[X],B=v?-A[Q]/2:0,H=b===Hc?T[Q]:A[Q],ee=b===Hc?-A[Q]:-T[Q],q=t.elements.arrow,te=v&&q?_E(q):{width:0,height:0},ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:tD(),ae=ie[W],fe=ie[X],j=fd(0,T[Q],te[Q]),k=w?T[Q]/2-B-j-ae-N.mainAxis:H-j-ae-N.mainAxis,U=w?-T[Q]/2+B+j+fe+N.mainAxis:ee+j+fe+N.mainAxis,J=t.elements.arrow&&ip(t.elements.arrow),Y=J?S==="y"?J.clientTop||0:J.clientLeft||0:0,oe=(K=I==null?void 0:I[S])!=null?K:0,he=ne+k-oe-Y,Se=ne+U-oe,se=fd(v?Xv(Z,he):Z,ne,v?Zs(z,Se):z);C[S]=se,F[S]=se-ne}if(s){var pe,me=S==="x"?dr:hr,xe=S==="x"?ui:fi,Te=C[E],Pe=E==="y"?"height":"width",Ae=Te+x[me],le=Te-x[xe],ue=[dr,hr].indexOf(_)!==-1,ye=(pe=I==null?void 0:I[E])!=null?pe:0,ge=ue?Ae:Te-T[Pe]-A[Pe]-ye+N.altAxis,we=ue?Te+T[Pe]+A[Pe]-ye-N.altAxis:le,ke=v&&ue?SQ(ge,Te,we):fd(v?ge:Ae,Te,v?we:le);C[E]=ke,F[E]=ke-Te}t.modifiersData[r]=F}}const tJ={name:"preventOverflow",enabled:!0,phase:"main",fn:eJ,requiresIfExists:["offset"]};function nJ(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function rJ(e){return e===Rr(e)||!ai(e)?wE(e):nJ(e)}function iJ(e){var t=e.getBoundingClientRect(),n=Gc(t.width)/e.offsetWidth||1,r=Gc(t.height)/e.offsetHeight||1;return n!==1||r!==1}function oJ(e,t,n){n===void 0&&(n=!1);var r=ai(t),i=ai(t)&&iJ(t),o=os(t),a=qc(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((fo(t)!=="body"||SE(o))&&(s=rJ(t)),ai(t)?(l=qc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=OE(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function aJ(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function sJ(e){var t=aJ(e);return yQ.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function lJ(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function cJ(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var GA={placement:"bottom",modifiers:[],strategy:"absolute"};function qA(){for(var e=arguments.length,t=new Array(e),n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function kJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KA(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qv(e){return Qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qv(e)}var IJ={a11y:$.bool,disabled:$.bool,direction:$.oneOf(["up","down","start","end","left","right"]),group:$.bool,isOpen:$.bool,nav:$.bool,active:$.bool,size:$.string,tag:it,toggle:$.func,children:$.node,className:$.string,cssModule:$.object,dropup:$.bool,inNavbar:$.bool,setActiveFromChild:$.bool,menuRole:$.oneOf(["listbox","menu"])},DJ={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,inNavbar:!1,setActiveFromChild:!1},FJ=[ht.space,ht.enter,ht.up,ht.down,ht.end,ht.home],o0=function(e){MJ(n,e);var t=LJ(n);function n(r){var i;return kJ(this,n),i=t.call(this,r),i.addEvents=i.addEvents.bind(fa(i)),i.handleDocumentClick=i.handleDocumentClick.bind(fa(i)),i.handleKeyDown=i.handleKeyDown.bind(fa(i)),i.removeEvents=i.removeEvents.bind(fa(i)),i.toggle=i.toggle.bind(fa(i)),i.handleMenuRef=i.handleMenuRef.bind(fa(i)),i.handleToggleRef=i.handleToggleRef.bind(fa(i)),i.containerRef=V.createRef(),i.menuRef=V.createRef(),i.toggleRef=V.createRef(),i}return NJ(n,[{key:"componentDidMount",value:function(){this.handleProps()}},{key:"componentDidUpdate",value:function(i){this.props.isOpen!==i.isOpen&&this.handleProps()}},{key:"componentWillUnmount",value:function(){this.removeEvents()}},{key:"handleMenuRef",value:function(i){this.menuRef.current=i}},{key:"handleToggleRef",value:function(i){this.toggleRef.current=i}},{key:"handleDocumentClick",value:function(i){if(!(i&&(i.which===3||i.type==="keyup"&&i.which!==ht.tab))){var o=this.getContainer(),a=this.getMenu(),s=this.getToggle();if(s){var l=s.contains(i.target),c=a&&a.contains(i.target)&&a!==i.target,f=!1;o&&(f=o.classList.contains("input-group")&&o.classList.contains("dropdown")&&i.target.tagName==="INPUT"),!((l&&!f||c)&&(i.type!=="keyup"||i.which===ht.tab))&&this.toggle(i)}}}},{key:"handleKeyDown",value:function(i){var o=this,a=i.target.getAttribute("role")==="menuitem"||i.target.getAttribute("role")==="option",s=this.getMenuCtrl()===i.target,l=ht.tab===i.which;if(!(/input|textarea/i.test(i.target.tagName)||l&&!this.props.a11y||l&&!(a||s))&&((FJ.indexOf(i.which)!==-1||i.which>=48&&i.which<=90)&&i.preventDefault(),!this.props.disabled)){if(s)if([ht.space,ht.enter,ht.up,ht.down].indexOf(i.which)>-1)this.props.isOpen||this.toggle(i),setTimeout(function(){var b;return(b=o.getMenuItems()[0])===null||b===void 0?void 0:b.focus()});else if(this.props.isOpen&&l){var c;i.preventDefault(),(c=this.getMenuItems()[0])===null||c===void 0||c.focus()}else this.props.isOpen&&i.which===ht.esc&&this.toggle(i);if(this.props.isOpen&&a){if([ht.tab,ht.esc].indexOf(i.which)>-1)this.toggle(i),this.getMenuCtrl().focus();else if([ht.space,ht.enter].indexOf(i.which)>-1)i.target.click(),this.getMenuCtrl().focus();else if([ht.down,ht.up].indexOf(i.which)>-1||[ht.n,ht.p].indexOf(i.which)>-1&&i.ctrlKey){var f=this.getMenuItems(),d=f.indexOf(i.target);ht.up===i.which||ht.p===i.which&&i.ctrlKey?d=d!==0?d-1:f.length-1:(ht.down===i.which||ht.n===i.which&&i.ctrlKey)&&(d=d===f.length-1?0:d+1),f[d].focus()}else if(ht.end===i.which){var p=this.getMenuItems();p[p.length-1].focus()}else if(ht.home===i.which){var v=this.getMenuItems();v[0].focus()}else if(i.which>=48&&i.which<=90)for(var g=this.getMenuItems(),y=String.fromCharCode(i.which).toLowerCase(),x=0;x=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zJ(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function VJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YA(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jv(e){return Jv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jv(e)}var YJ={children:$.node,active:$.bool,disabled:$.bool,divider:$.bool,tag:it,header:$.bool,onClick:$.func,className:$.string,cssModule:$.object,toggle:$.bool,text:$.bool},EE=function(e){HJ(n,e);var t=GJ(n);function n(r){var i;return VJ(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(iw(i)),i.getTabIndex=i.getTabIndex.bind(iw(i)),i}return WJ(n,[{key:"onClick",value:function(i){var o,a=this.props,s=a.disabled,l=a.header,c=a.divider,f=a.text;if(s||l||c||f){i.preventDefault();return}this.props.onClick&&this.props.onClick(i),(!((o=this.props.toggle)!==null&&o!==void 0)||o)&&this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"option":"menuitem"}},{key:"getTabIndex",value:function(){var i=this.props,o=i.disabled,a=i.header,s=i.divider,l=i.text;return o||a||s||l?"-1":"0"}},{key:"render",value:function(){var i=this.getTabIndex(),o=i>-1?this.getRole():void 0,a=is(this.props,["toggle"]),s=a.className,l=a.cssModule,c=a.divider,f=a.tag,d=f===void 0?"button":f,p=a.header,v=a.active,g=a.text,y=UJ(a,BJ),x=Be(He(s,{disabled:y.disabled,"dropdown-item":!c&&!p&&!g,active:v,"dropdown-header":p,"dropdown-divider":c,"dropdown-item-text":g}),l);return d==="button"&&(p?d="h6":c?d="div":y.href?d="a":g&&(d="span")),V.createElement(d,nw({type:d==="button"&&(y.onClick||this.props.toggle)?"button":void 0},y,{tabIndex:i,role:o,className:x,onClick:this.onClick}))}}]),n}(V.Component);EE.propTypes=YJ;EE.contextType=Qd;const Ne=EE;function ow(e){"@babel/helpers - typeof";return ow=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ow(e)}var ZJ=["className","cssModule","dark","end","right","tag","flip","modifiers","persist","strategy","container","updateOnSelect"];function eg(){return eg=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function oee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XA(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tg(e){return tg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tg(e)}var dee={tag:it,children:$.node.isRequired,dark:$.bool,end:$.bool,flip:$.bool,modifiers:$.array,className:$.string,cssModule:$.object,style:$.object,persist:$.bool,strategy:$.string,container:Wc,updateOnSelect:$.bool,right:DI($.bool,'Please use "end" instead.')},hee={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},CE=function(e){see(n,e);var t=lee(n);function n(){return oee(this,n),t.apply(this,arguments)}return aee(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.cssModule,l=o.dark,c=o.end,f=o.right,d=o.tag,p=d===void 0?"div":d,v=o.flip,g=v===void 0?!0:v,y=o.modifiers,x=y===void 0?[]:y,_=o.persist,b=o.strategy,w=o.container,S=o.updateOnSelect,E=ree(o,ZJ),C=Be(He(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||f,show:this.context.isOpen}),s),T=p;if(_||this.context.isOpen&&!this.context.inNavbar){var A=hee[this.context.direction]||"bottom",D=c||f?"end":"start",N="".concat(A,"-").concat(D),I=[].concat(QJ(x),[{name:"flip",enabled:!!g}]),F={};_&&(F.display="block",F.visibility=this.context.isOpen?"visible":"hidden");var K=V.createElement(aD,{placement:N,modifiers:I,strategy:b},function(X){var Q=X.ref,ne=X.style,Z=X.placement,z=X.update,B=w1(w1(w1({},i.props.style),F),ne),H=function(q){Q(q);var te=i.context.onMenuRef;te&&te(q)};return V.createElement(T,eg({tabIndex:"-1",role:i.getRole(),ref:H},E,{style:B,"aria-hidden":!i.context.isOpen,className:C,"data-popper-placement":Z,onClick:function(){return S&&z()}}))});return w?Bs.createPortal(K,Yd(w)):K}var W=this.context.onMenuRef;return V.createElement(T,eg({tabIndex:"-1",role:this.getRole()},E,{ref:W,"aria-hidden":!this.context.isOpen,className:C,"data-popper-placement":E.placement,"data-bs-popper":"static"}))}}]),n}(V.Component);CE.propTypes=dee;CE.contextType=Qd;const Tu=CE;function lw(e){"@babel/helpers - typeof";return lw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lw(e)}var pee=["className","color","cssModule","caret","split","nav","tag","innerRef"];function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function yee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QA(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ng(e){return ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ng(e)}var See={caret:$.bool,color:$.string,children:$.node,className:$.string,cssModule:$.object,disabled:$.bool,onClick:$.func,"aria-haspopup":$.bool,split:$.bool,tag:it,nav:$.bool,innerRef:$.oneOfType([$.object,$.string,$.func])},Eee={color:"secondary","aria-haspopup":!0},a0=function(e){_ee(n,e);var t=xee(n);function n(r){var i;return yee(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(lD(i)),i}return bee(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.color,l=o.cssModule,c=o.caret,f=o.split,d=o.nav,p=o.tag,v=o.innerRef,g=vee(o,pee),y=g["aria-label"]||"Toggle Dropdown",x=Be(He(a,{"dropdown-toggle":c||f,"dropdown-toggle-split":f,"nav-link":d}),l),_=typeof g.children<"u"?g.children:V.createElement("span",{className:"visually-hidden"},y),b;d&&!p?(b="a",g.href="#"):p?b=p:(b=Ke,g.color=s,g.cssModule=l);var w=function(E){var C=E.ref,T=function(D){C(D);var N=i.context.onToggleRef;N&&N(D)};return V.createElement(b,cw({},g,mee({},typeof b=="string"?"ref":"innerRef",T),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:_}))};return this.context.inNavbar?V.createElement(V.Fragment,null,w({ref:this.context.onToggleRef})):V.createElement(PJ,{innerRef:v},w)}}]),n}(V.Component);a0.propTypes=See;a0.defaultProps=Eee;a0.contextType=Qd;const ju=a0;function Cee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function fw(e,t){return fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},fw(e,t)}function Pee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fw(e,t)}const JA={disabled:!1},cD=V.createContext(null);var Tee=function(t){return t.scrollTop},Hf="unmounted",Cs="exited",Ps="entering",Xl="entered",dw="exiting",yr=function(e){Pee(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Cs,o.appearStatus=Ps):l=Xl:r.unmountOnExit||r.mountOnEnter?l=Hf:l=Cs,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Hf?{status:Cs}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Ps&&a!==Xl&&(o=Ps):(a===Ps||a===Xl)&&(o=dw)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Ps){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Bs.findDOMNode(this);a&&Tee(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Cs&&this.setState({status:Hf})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Bs.findDOMNode(this),s],c=l[0],f=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!i&&!a||JA.disabled){this.safeSetState({status:Xl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:Ps},function(){o.props.onEntering(c,f),o.onTransitionEnd(p,function(){o.safeSetState({status:Xl},function(){o.props.onEntered(c,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Bs.findDOMNode(this);if(!o||JA.disabled){this.safeSetState({status:Cs},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:dw},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Cs},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Bs.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],f=l[1];this.props.addEndListener(c,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Hf)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Cee(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return V.createElement(cD.Provider,{value:null},typeof a=="function"?a(i,s):V.cloneElement(V.Children.only(a),s))},t}(V.Component);yr.contextType=cD;yr.propTypes={};function Bl(){}yr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Bl,onEntering:Bl,onEntered:Bl,onExit:Bl,onExiting:Bl,onExited:Bl};yr.UNMOUNTED=Hf;yr.EXITED=Cs;yr.ENTERING=Ps;yr.ENTERED=Xl;yr.EXITING=dw;var jee=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function rg(){return rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function e3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jd(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Iee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t3(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function og(e){return og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},og(e)}function n3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yc(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Xee={body:$.bool,className:$.string,color:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func]),inverse:$.bool,outline:$.bool,tag:it};function vr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,a=e.outline,s=e.tag,l=s===void 0?"div":s,c=e.innerRef,f=Yee(e,Kee),d=Be(He(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return V.createElement(l,mw({},f,{className:d,ref:c}))}vr.propTypes=Xee;var Qee=["className","cssModule","innerRef","tag"];function vw(){return vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ete(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var tte={className:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func]),tag:it};function Zc(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=Jee(e,Qee),s=Be(He(t,"card-body"),n);return V.createElement(o,vw({},a,{className:s,ref:r}))}Zc.propTypes=tte;var nte=["className","cssModule","tag"];function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ite(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ote={className:$.string,cssModule:$.object,tag:it};function dD(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=rte(e,nte),a=Be(He(t,"card-footer"),n);return V.createElement(i,gw({},o,{className:a}))}dD.propTypes=ote;var ate=["className","cssModule","tag"];function yw(){return yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var cte={className:$.string,cssModule:$.object,tag:it};function Xc(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=ste(e,ate),a=Be(He(t,"card-header"),n);return V.createElement(i,yw({},o,{className:a}))}Xc.propTypes=cte;var ute=["className","cssModule","tag"];function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hte={className:$.string,cssModule:$.object,tag:it};function hD(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=fte(e,ute),a=Be(He(t,"card-text"),n);return V.createElement(i,bw({},o,{className:a}))}hD.propTypes=hte;var pte=["className","cssModule","tag"];function _w(){return _w=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var gte={className:$.string,cssModule:$.object,tag:it};function pD(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=mte(e,pte),a=Be(He(t,"card-title"),n);return V.createElement(i,_w({},o,{className:a}))}pD.propTypes=gte;function xw(e){"@babel/helpers - typeof";return xw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xw(e)}var yte=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ste(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ete(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i3(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ag(e){return ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ag(e)}function o3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function av(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sg(e){return sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sg(e)}var jE={children:$.oneOfType([$.node,$.func]),placement:$.oneOf(sX),target:Wc.isRequired,container:Wc,isOpen:$.bool,disabled:$.bool,hideArrow:$.bool,boundariesElement:$.oneOfType([$.string,pE]),className:$.string,innerClassName:$.string,arrowClassName:$.string,popperClassName:$.string,cssModule:$.object,toggle:$.func,autohide:$.bool,placementPrefix:$.string,delay:$.oneOfType([$.shape({show:$.number,hide:$.number}),$.number]),modifiers:$.array,strategy:$.string,offset:$.arrayOf($.number),innerRef:$.oneOfType([$.func,$.string,$.object]),trigger:$.string,fade:$.bool,flip:$.bool},mD={show:0,hide:50},zte={isOpen:!1,hideArrow:!1,autohide:!1,delay:mD,toggle:function(){},trigger:"click",fade:!0};function vD(e,t){return t&&(e===t||t.contains(e))}function s3(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return vD(e,n)})[0]}var AE=function(e){Dte(n,e);var t=Fte(n);function n(r){var i;return $te(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(wr(i)),i.handleDocumentClick=i.handleDocumentClick.bind(wr(i)),i.removeTargetEvents=i.removeTargetEvents.bind(wr(i)),i.toggle=i.toggle.bind(wr(i)),i.showWithDelay=i.showWithDelay.bind(wr(i)),i.hideWithDelay=i.hideWithDelay.bind(wr(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(wr(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(wr(i)),i.show=i.show.bind(wr(i)),i.hide=i.hide.bind(wr(i)),i.onEscKeyDown=i.onEscKeyDown.bind(wr(i)),i.getRef=i.getRef.bind(wr(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return Ite(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||s3(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!vD(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&s3(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):eh(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return eh(o)==="object"?isNaN(o[i])?mD[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.addEventListener(i,o,a)})}},{key:"removeEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.removeEventListener(i,o,a)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}},{key:"updateTarget",value:function(){var i=Yd(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var a=this.props,s=a.className,l=a.cssModule,c=a.innerClassName,f=a.isOpen,d=a.hideArrow,p=a.boundariesElement,v=a.placement,g=a.placementPrefix,y=a.arrowClassName,x=a.popperClassName,_=a.container,b=a.modifiers,w=a.strategy,S=a.offset,E=a.fade,C=a.flip,T=a.children,A=is(this.props,Object.keys(jE)),D=Be(x,l),N=Be(c,l);return V.createElement(Rte,{className:s,target:o,isOpen:f,hideArrow:d,boundariesElement:p,placement:v,placementPrefix:g,arrowClassName:y,popperClassName:D,container:_,modifiers:b,strategy:w,offset:S,cssModule:l,fade:E,flip:C},function(I){var F=I.update;return V.createElement("div",Ew({},A,{ref:i.getRef,className:N,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof T=="function"?T({update:F}):T)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(V.Component);AE.propTypes=jE;AE.defaultProps=zte;const Vte=AE;var Wte=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"];function lg(){return lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Kte={animated:$.bool,bar:$.bool,barAriaLabelledBy:$.string,barAriaValueText:$.string,barClassName:$.string,barStyle:$.object,children:$.node,className:$.string,cssModule:$.object,color:$.string,max:$.oneOfType([$.string,$.number]),min:$.oneOfType([$.string,$.number]),multi:$.bool,striped:$.bool,style:$.object,tag:it,value:$.oneOfType([$.string,$.number])};function gD(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=o===void 0?0:o,s=e.min,l=s===void 0?0:s,c=e.max,f=c===void 0?100:c,d=e.animated,p=e.striped,v=e.color,g=e.bar,y=e.multi,x=e.tag,_=x===void 0?"div":x,b=e.style,w=b===void 0?{}:b,S=e.barStyle,E=S===void 0?{}:S,C=e.barAriaValueText,T=e.barAriaLabelledBy,A=Gte(e,Wte),D=kA(a)/kA(f)*100,N=Be(He(n,"progress"),i),I=Be(He("progress-bar",g&&n||r,d?"progress-bar-animated":null,v?"bg-".concat(v):null,p||d?"progress-bar-striped":null),i),F={className:I,style:O1(O1(O1({},g?w:{}),E),{},{width:"".concat(D,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":f,"aria-valuetext":C,"aria-labelledby":T,children:t};return g?V.createElement(_,lg({},A,F)):V.createElement(_,lg({},A,{style:w,className:N}),y?t:V.createElement("div",F))}gD.propTypes=Kte;function Pw(e){"@babel/helpers - typeof";return Pw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pw(e)}function Yte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c3(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cg(e){return cg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cg(e)}var nne={children:$.node.isRequired,node:$.any},yD=function(e){Xte(n,e);var t=Qte(n);function n(){return Yte(this,n),t.apply(this,arguments)}return Zte(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return mE?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Bs.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(V.Component);yD.propTypes=nne;const rne=yD;function jw(e){"@babel/helpers - typeof";return jw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jw(e)}function u3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zl(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ug(e){return ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ug(e)}function fg(){}var d3=$.shape(Yn.propTypes),bD={autoFocus:$.bool,backdrop:$.oneOfType([$.bool,$.oneOf(["static"])]),backdropClassName:$.string,backdropTransition:d3,centered:$.bool,children:$.node,contentClassName:$.string,className:$.string,container:Wc,cssModule:$.object,external:$.node,fade:$.bool,fullscreen:$.oneOfType([$.bool,$.oneOf(["sm","md","lg","xl"])]),innerRef:$.oneOfType([$.object,$.string,$.func]),isOpen:$.bool,keyboard:$.bool,labelledBy:$.string,modalClassName:$.string,modalTransition:d3,onClosed:$.func,onEnter:$.func,onExit:$.func,onOpened:$.func,returnFocusAfterClose:$.bool,role:$.string,scrollable:$.bool,size:$.string,toggle:$.func,trapFocus:$.bool,unmountOnClose:$.bool,wrapClassName:$.string,zIndex:$.oneOfType([$.number,$.string])},une=Object.keys(bD),fne={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:fg,onClosed:fg,modalTransition:{timeout:Kv.Modal},backdropTransition:{mountOnEnter:!0,timeout:Kv.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},ap=function(e){ane(n,e);var t=sne(n);function n(r){var i;return ine(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(Yr(i)),i.handleBackdropClick=i.handleBackdropClick.bind(Yr(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(Yr(i)),i.handleEscape=i.handleEscape.bind(Yr(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(Yr(i)),i.handleTab=i.handleTab.bind(Yr(i)),i.onOpened=i.onOpened.bind(Yr(i)),i.onClosed=i.onClosed.bind(Yr(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(Yr(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(Yr(i)),i.trapFocus=i.trapFocus.bind(Yr(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return one(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,a=i.autoFocus,s=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),a&&this.setFocus()),s&&s(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Yd(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=rX(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),iX(),n.openCount===0&&(document.body.className=He(document.body.className,Be("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=Be("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),$I(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=is(this.props,une),s="modal-dialog";return V.createElement("div",hd({},a,{className:Be(He(s,this.props.className,(i={},Ql(i,"modal-".concat(this.props.size),this.props.size),Ql(i,"".concat(s,"-centered"),this.props.centered),Ql(i,"".concat(s,"-scrollable"),this.props.scrollable),Ql(i,"modal-fullscreen",this.props.fullscreen===!0),Ql(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),V.createElement("div",{className:Be(He("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var a=this.props,s=a.wrapClassName,l=a.modalClassName,c=a.backdropClassName,f=a.cssModule,d=a.isOpen,p=a.backdrop,v=a.role,g=a.labelledBy,y=a.external,x=a.innerRef,_={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":g,"aria-modal":!0,role:v,tabIndex:"-1"},b=this.props.fade,w=zl(zl(zl({},Yn.defaultProps),this.props.modalTransition),{},{baseClass:b?this.props.modalTransition.baseClass:"",timeout:b?this.props.modalTransition.timeout:0}),S=zl(zl(zl({},Yn.defaultProps),this.props.backdropTransition),{},{baseClass:b?this.props.backdropTransition.baseClass:"",timeout:b?this.props.backdropTransition.timeout:0}),E=p&&(b?V.createElement(Yn,hd({},S,{in:d&&!!p,cssModule:f,className:Be(He("modal-backdrop",c),f)})):V.createElement("div",{className:Be(He("modal-backdrop","show",c),f)}));return V.createElement(rne,{node:this._element},V.createElement("div",{className:Be(s)},V.createElement(Yn,hd({},_,w,{in:d,onEntered:this.onOpened,onExited:this.onClosed,cssModule:f,className:Be(He("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),f),innerRef:x}),y,this.renderModalDialog()),E))}return null}}]),n}(V.Component);ap.propTypes=bD;ap.defaultProps=fne;ap.openCount=0;ap.originalBodyOverflow=null;const go=ap;var dne=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var mne={children:$.node,className:$.string,close:$.object,closeAriaLabel:$.string,cssModule:$.object,tag:it,toggle:$.func,wrapTag:it};function yo(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=a===void 0?"h5":a,l=e.wrapTag,c=l===void 0?"div":l,f=e.closeAriaLabel,d=f===void 0?"Close":f,p=e.close,v=hne(e,dne),g=Be(He(n,"modal-header"),r);return!p&&o&&(t=V.createElement("button",{type:"button",onClick:o,className:Be("btn-close",r),"aria-label":d})),V.createElement(c,kw({},v,{className:g}),V.createElement(s,{className:Be("modal-title",r)},i),p||t)}yo.propTypes=mne;var vne=["className","cssModule","tag"];function Nw(){return Nw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var bne={className:$.string,cssModule:$.object,tag:it};function $i(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=gne(e,vne),a=Be(He(t,"modal-body"),n);return V.createElement(i,Nw({},o,{className:a}))}$i.propTypes=bne;var _ne=["className","cssModule","tag"];function Mw(){return Mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var One={className:$.string,cssModule:$.object,tag:it};function as(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=xne(e,_ne),a=Be(He(t,"modal-footer"),n);return V.createElement(i,Mw({},o,{className:a}))}as.propTypes=One;function Lw(){return Lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Tne={className:$.string,cssModule:$.object,flush:$.bool,horizontal:$.oneOfType([$.bool,$.string]),numbered:$.bool,tag:it},jne=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function _D(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,a=e.horizontal,s=a===void 0?!1:a,l=e.numbered,c=l===void 0?!1:l,f=Cne(e,Ene),d=Be(He(t,"list-group",o?"list-group-flush":jne(s),{"list-group-numbered":c}),n);return V.createElement(i,Rw({},f,{className:d}))}_D.propTypes=Tne;var Ane=["className","cssModule","row","disabled","check","inline","floating","noMargin","tag","switch"];function $w(){return $w=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Mne={children:$.node,row:$.bool,check:$.bool,switch:$.bool,inline:$.bool,floating:$.bool,noMargin:$.bool,disabled:$.bool,tag:it,className:$.string,cssModule:$.object};function eo(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.floating,l=e.noMargin,c=e.tag,f=c===void 0?"div":c,d=e.switch,p=kne(e,Ane),v=o||d,g=Be(He(t,r?"row":!1,v?"form-check":!1,d?"form-switch":!1,v||l?!1:"mb-3",v&&a?"form-check-inline":!1,v&&i?"disabled":!1,s&&"form-floating"),n);return f==="fieldset"&&(p.disabled=i),V.createElement(f,$w({},p,{className:g}))}eo.propTypes=Mne;function Iw(e){"@babel/helpers - typeof";return Iw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iw(e)}var Lne=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function Dw(){return Dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ine(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h3(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dg(e){return dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dg(e)}var Vne={children:$.node,type:$.string,size:$.oneOfType([$.number,$.string]),bsSize:$.string,valid:$.bool,invalid:$.bool,tag:it,innerRef:$.oneOfType([$.object,$.func,$.string]),plaintext:$.bool,addon:$.bool,className:$.string,cssModule:$.object},xD=function(e){Fne(n,e);var t=Bne(n);function n(r){var i;return Ine(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(Bw(i)),i.focus=i.focus.bind(Bw(i)),i}return Dne(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.type,l=s===void 0?"text":s,c=i.bsSize,f=i.valid,d=i.invalid,p=i.tag,v=i.addon,g=i.plaintext,y=i.innerRef,x=Rne(i,Lne),_=["switch","radio","checkbox"].indexOf(l)>-1,b=/\D/g,w=l==="textarea",S=l==="select",E=l==="range",C=p||(S||w?l:"input"),T="form-control";g?(T="".concat(T,"-plaintext"),C=p||"input"):E?T="form-range":S?T="form-select":_&&(v?T=null:T="form-check-input"),x.size&&b.test(x.size)&&($x(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var A=Be(He(o,d&&"is-invalid",f&&"is-valid",c?S?"form-select-".concat(c):"form-control-".concat(c):!1,T),a);return(C==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(g||l==="select"||typeof C!="string"||C==="select")&&($x('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),V.createElement(C,Dw({},x,{ref:y,className:A,"aria-invalid":d}))}}]),n}(V.Component);xD.propTypes=Vne;const Fn=xD;var Wne=["className","cssModule","tag","type","size"];function hg(){return hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var qne={className:$.string,cssModule:$.object,size:$.string,tag:it,type:$.string};function s0(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=Hne(e,Wne),s=Be(He(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?V.createElement(op,hg({},a,{className:s})):V.createElement(sD.Provider,{value:{insideInputGroup:!0}},V.createElement(i,hg({},a,{className:s})))}s0.propTypes=qne;var Kne=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function Uw(){return Uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Qne={children:$.node,className:$.string,listClassName:$.string,cssModule:$.object,size:$.string,tag:it,listTag:it,"aria-label":$.string};function kE(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,a=o===void 0?"nav":o,s=e.listTag,l=s===void 0?"ul":s,c=e["aria-label"],f=c===void 0?"pagination":c,d=Zne(e,Kne),p=Be(He(t),r),v=Be(He(n,"pagination",Yne({},"pagination-".concat(i),!!i)),r);return V.createElement(a,{className:p,"aria-label":f},V.createElement(l,Uw({},d,{className:v})))}kE.propTypes=Qne;var Jne=["active","className","cssModule","disabled","tag"];function zw(){return zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var nre={active:$.bool,children:$.node,className:$.string,cssModule:$.object,disabled:$.bool,tag:it};function Xs(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=ere(e,Jne),l=Be(He(n,"page-item",{active:t,disabled:i}),r);return V.createElement(a,zw({},s,{className:l}))}Xs.propTypes=nre;var rre=["className","cssModule","next","previous","first","last","tag"];function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ore(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var are={"aria-label":$.string,children:$.node,className:$.string,cssModule:$.object,next:$.bool,previous:$.bool,first:$.bool,last:$.bool,tag:it};function Qs(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,a=e.last,s=e.tag,l=s===void 0?"a":s,c=ire(e,rre),f=Be(He(t,"page-link"),n),d;i?d="Previous":r?d="Next":o?d="First":a&&(d="Last");var p=e["aria-label"]||d,v;i?v="‹":r?v="›":o?v="«":a&&(v="»");var g=e.children;return g&&Array.isArray(g)&&g.length===0&&(g=null),!c.href&&l==="a"&&(l="button"),(i||r||o||a)&&(g=[V.createElement("span",{"aria-hidden":"true",key:"caret"},g||v),V.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),V.createElement(l,Vw({},c,{className:f,"aria-label":p}),g)}Qs.propTypes=are;var sre=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function Ww(){return Ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ure(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var fre={children:$.node,className:$.string,closeClassName:$.string,closeAriaLabel:$.string,color:$.string,cssModule:$.object,fade:$.bool,innerRef:$.oneOfType([$.object,$.string,$.func]),isOpen:$.bool,tag:it,toggle:$.func,transition:$.shape(Yn.propTypes)};function wD(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,a=e.tag,s=a===void 0?"div":a,l=e.color,c=l===void 0?"success":l,f=e.isOpen,d=f===void 0?!0:f,p=e.toggle,v=e.children,g=e.transition,y=g===void 0?Sf(Sf({},Yn.defaultProps),{},{unmountOnExit:!0}):g,x=e.fade,_=x===void 0?!0:x,b=e.innerRef,w=cre(e,sre),S=Be(He(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),E=Be(He("btn-close",n),o),C=Sf(Sf(Sf({},Yn.defaultProps),y),{},{baseClass:_?y.baseClass:"",timeout:_?y.timeout:0});return V.createElement(Yn,Ww({},w,C,{tag:s,className:S,in:d,role:"alert",innerRef:b}),p?V.createElement("button",{type:"button",className:E,"aria-label":i,onClick:p}):null,v)}wD.propTypes=fre;var dre=["className","cssModule","tag","active","disabled","action","color"];function Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var mre={action:$.bool,active:$.bool,className:$.string,cssModule:$.object,color:$.string,disabled:$.bool,tag:it},vre=function(t){t.preventDefault()};function OD(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,a=e.disabled,s=e.action,l=e.color,c=hre(e,dre),f=Be(He(t,o?"active":!1,a?"disabled":!1,s?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return a&&(c.onClick=vre),V.createElement(i,Hw({},c,{className:f}))}OD.propTypes=mre;function Gw(e){"@babel/helpers - typeof";return Gw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gw(e)}function m3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gre(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pg(e){return pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pg(e)}var Ere=["defaultOpen"],lp=function(e){xre(n,e);var t=wre(n);function n(r){var i;return bre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(SD(i)),i}return _re(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(a){return{isOpen:!a.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return V.createElement(op,qw({isOpen:this.state.isOpen,toggle:this.toggle},is(this.props,Ere)))}}]),n}(R.Component);lp.propTypes=gre({defaultOpen:$.bool,onToggle:$.func},op.propTypes);function Yw(e){"@babel/helpers - typeof";return Yw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yw(e)}function g3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cre(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mg(e){return mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mg(e)}var Lre=["defaultOpen"],br=function(e){Are(n,e);var t=kre(n);function n(r){var i;return Tre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(ED(i)),i}return jre(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return V.createElement(sp,Zw({isOpen:this.state.isOpen,toggle:this.toggle},is(this.props,Lre)))}}]),n}(R.Component);br.propTypes=Cre({defaultOpen:$.bool},sp.propTypes);var jn=[];for(var S1=0;S1<256;++S1)jn.push((S1+256).toString(16).slice(1));function Rre(e,t=0){return(jn[e[t+0]]+jn[e[t+1]]+jn[e[t+2]]+jn[e[t+3]]+"-"+jn[e[t+4]]+jn[e[t+5]]+"-"+jn[e[t+6]]+jn[e[t+7]]+"-"+jn[e[t+8]]+jn[e[t+9]]+"-"+jn[e[t+10]]+jn[e[t+11]]+jn[e[t+12]]+jn[e[t+13]]+jn[e[t+14]]+jn[e[t+15]]).toLowerCase()}var gm,$re=new Uint8Array(16);function Ire(){if(!gm&&(gm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gm($re)}var Dre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const b3={randomUUID:Dre};function NE(e,t,n){if(b3.randomUUID&&!t&&!e)return b3.randomUUID();e=e||{};var r=e.random||(e.rng||Ire)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Rre(r)}const Fre=e=>({error:"border-danger",default:""})[e],Bre=e=>({error:"text-danger",default:"text-muted"})[e],Ho=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=Ce({"col-md-12":i,"col-md-10 offset-md-1":!i});return m.jsx(Kn,{className:Ce("g-0",e),children:m.jsx("div",{className:o,children:m.jsx(vr,{className:Fre(r),body:!0,children:m.jsxs("h3",{className:Ce("text-center mb-0",Bre(r)),children:[n&&m.jsx(je,{icon:G6,spin:!0}),n&&m.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},xt=({title:e,children:t,bodyClassName:n,...r})=>m.jsxs(vr,{...r,children:[e&&m.jsx(Xc,{role:"heading","aria-level":4,children:e}),m.jsx(Zc,{className:n,children:t})]}),er=({children:e,type:t,className:n,small:r=!1})=>m.jsx(Kn,{className:n,children:m.jsx("div",{className:Ce({"col-md-10 offset-md-1":!r,"col-12":r}),children:m.jsx(xt,{role:"document",className:Ce("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:Ce({"p-2":r}),children:e})})}),CD=e=>{const t=new URLSearchParams(e),n={};return t.forEach((r,i)=>{if(i.endsWith("[]")){const o=i.slice(0,-2);n[o]??(n[o]=[]),n[o].push(r)}else n[i]=r}),n},Ure=e=>{const t=new URLSearchParams;for(const[n,r]of Object.entries(e))r!==void 0&&(Array.isArray(r)?r.forEach(i=>t.append(`${n}[]`,`${i}`)):t.append(n,`${r}`));return t.toString()},zre=CD,l0=Ure,qt=(e=!1)=>{const[t,n]=R.useState(e),r=R.useCallback(()=>n(a=>!a),[]),i=R.useCallback(()=>n(!0),[]),o=R.useCallback(()=>n(!1),[]);return[t,r,i,o]},PD=(e=!1,t=2e3,n=window.setTimeout,r=window.clearTimeout)=>{const[i,o]=R.useState(e),a=R.useRef(e),s=R.useRef(),l=R.useCallback(()=>{o(!a.current),s.current&&r(s.current),s.current=n(()=>o(a.current),t)},[r,t,n]);return[i,l]},ME=()=>{const{current:e}=R.useRef(`dom-${NE()}`);return e},ea=()=>R.useRef(null),Au=()=>{const{search:e}=gr();return R.useMemo(()=>CD(e),[e])},TD=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const a=ME(),s=f=>t==null?void 0:t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return m.jsxs("span",{className:Ce("form-check",l,n),style:c,children:[m.jsx("input",{type:"checkbox",className:"form-check-input",id:a,checked:e,onChange:s}),m.jsx("label",{className:"form-check-label",htmlFor:a,children:r})]})},jD=e=>m.jsx(TD,{type:"checkbox",...e}),ul=e=>m.jsx(TD,{type:"switch",...e}),ku=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>m.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[m.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),sv=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=ME();return m.jsx(ku,{label:m.jsxs(m.Fragment,{children:[e,":"]}),className:a,labelClassName:s,id:l,children:m.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},Vre=500;let lv;const _3=()=>{lv&&clearTimeout(lv),lv=null},cp=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[a,s]=R.useState(i),l=(c,f=Vre)=>{s(c),_3(),lv=o(()=>{e(c),_3()},f)};return m.jsxs("div",{className:Ce("search-field",t),children:[m.jsx("input",{type:"text",className:Ce("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:a,onChange:c=>l(c.target.value)}),m.jsx(je,{icon:LK,className:"search-field__icon"}),m.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:a==="",id:"search-field__close",onClick:()=>l("",0)})]})},ta=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:c,...f})=>{const[d,p]=qt(),v=Ce("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),g={minWidth:s&&`${s}px`};return m.jsxs(op,{isOpen:d,toggle:p,disabled:t,className:i,children:[m.jsx(ju,{size:c,caret:!o,className:v,color:"primary",...f,children:e}),m.jsx(Tu,{className:"w-100",end:a,style:g,children:r})]})},c0=({children:e,minWidth:t,label:n="Options"})=>m.jsx(ta,{text:m.jsx(je,{className:"px-1",icon:SK}),"aria-label":n,size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),pd=({children:e,...t})=>m.jsx(gE,{children:m.jsx(HI,{className:"nav-pills__nav-link",tag:k6,...t,children:e})}),AD=({children:e,fill:t=!1,className:n=""})=>m.jsx(vr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:m.jsx(vE,{pills:!0,fill:t,children:R.Children.map(e,r=>{if(!R.isValidElement(r)||r.type!==pd)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),u0=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",kD=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,a=n==="ASC"?-1:1;return r[t]>i[t]?o:a}),Wre=e=>e.dir?`${e.field}-${e.dir}`:void 0,Hre=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function up({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=u0(s,t.field,t.dir);n(l?s:void 0,l)};return m.jsxs(lp,{children:[m.jsxs(ju,{caret:!0,color:r?"primary":"link",className:Ce({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&m.jsx(m.Fragment,{children:"Order by"}),r&&!t.field&&m.jsx("i",{children:"Order by..."}),r&&t.field&&m.jsxs(m.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",m.jsx("small",{children:t.dir??"DESC"})]})]}),m.jsxs(Tu,{end:i,className:Ce("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([s,l])=>m.jsxs(Ne,{active:t.field===s,onClick:a(s),children:[l,t.field===s&&m.jsx(je,{icon:t.dir==="ASC"?TK:dK,className:"ordering-dropdown__sort-icon"})]},s)),m.jsx(Ne,{divider:!0}),m.jsx(Ne,{disabled:!t.field,onClick:()=>n(),children:m.jsx("i",{children:"Clear selection"})})]})]})}const th="#4696e5",Gre="rgba(70, 150, 229, 0.4)",Qw="#f77f28",qre="rgba(247, 127, 40, 0.4)",Kre="white",Yre="#161b22",Zre=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},LE=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"},RE=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light",Xre=R.forwardRef(({isOpen:e,toggle:t,forceUpdate:n},r)=>{const[i,,o]=qt(),a=R.useCallback(()=>{o(),n()},[n,o]);return m.jsxs(wD,{className:"app-update-banner",isOpen:e,toggle:t,tag:xt,color:"secondary",innerRef:r,children:[m.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),m.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",m.jsxs(Ke,{role:"button",disabled:i,className:"ms-2",color:"secondary",size:"sm",onClick:a,children:[!i&&m.jsxs(m.Fragment,{children:["Restart now ",m.jsx(je,{icon:BK,className:"ms-1"})]}),i&&m.jsx(m.Fragment,{children:"Restarting..."})]})]})]})}),ND=({to:e="/",children:t="Home"})=>m.jsx("div",{className:"home",children:m.jsxs(xt,{className:"p-4",children:[m.jsx("h2",{children:"Oops! We could not find requested route."}),m.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),m.jsx("br",{}),m.jsx(St,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})});function Ii(e){return R.useRef(e).current}function Di(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const Qre=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})},MD=({fetchServers:e,servers:t,settings:n,appUpdated:r,resetAppUpdate:i})=>{var x;const{MainHeader:o,Home:a,ShlinkWebComponentContainer:s,CreateServer:l,EditServer:c,Settings:f,ManageServers:d,ShlinkVersionsContainer:p}=Ii(MD),v=gr(),g=R.useRef(t),y=v.pathname==="/";return R.useEffect(()=>{Object.keys(g.current).length===0&&e()},[e]),R.useEffect(()=>{var _;Zre(((_=n.ui)==null?void 0:_.theme)??RE())},[(x=n.ui)==null?void 0:x.theme]),m.jsxs("div",{className:"container-fluid app-container",children:[m.jsx(o,{}),m.jsxs("div",{className:"app",children:[m.jsx("div",{className:Ce("shlink-wrapper",{"d-flex d-md-block align-items-center":y}),children:m.jsxs(Xy,{children:[m.jsx(ot,{index:!0,element:m.jsx(a,{})}),m.jsx(ot,{path:"/settings/*",element:m.jsx(f,{})}),m.jsx(ot,{path:"/manage-servers",element:m.jsx(d,{})}),m.jsx(ot,{path:"/server/create",element:m.jsx(l,{})}),m.jsx(ot,{path:"/server/:serverId/edit",element:m.jsx(c,{})}),m.jsx(ot,{path:"/server/:serverId/*",element:m.jsx(s,{})}),m.jsx(ot,{path:"*",element:m.jsx(ND,{})})]})}),m.jsx("div",{className:"shlink-footer",children:m.jsx(p,{})})]}),m.jsx(Xre,{isOpen:r,toggle:i,forceUpdate:Qre})]})},Jre=Di(MD,["MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"]);function An(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eie=typeof Symbol=="function"&&Symbol.observable||"@@observable",x3=eie,E1=()=>Math.random().toString(36).substring(7).split("").join("."),tie={INIT:`@@redux/INIT${E1()}`,REPLACE:`@@redux/REPLACE${E1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${E1()}`},vg=tie;function $E(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function LD(e,t,n){if(typeof e!="function")throw new Error(An(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(An(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(An(1));return n(LD)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,l=!1;function c(){a===o&&(a=new Map,o.forEach((x,_)=>{a.set(_,x)}))}function f(){if(l)throw new Error(An(3));return i}function d(x){if(typeof x!="function")throw new Error(An(4));if(l)throw new Error(An(5));let _=!0;c();const b=s++;return a.set(b,x),function(){if(_){if(l)throw new Error(An(6));_=!1,c(),a.delete(b),o=null}}}function p(x){if(!$E(x))throw new Error(An(7));if(typeof x.type>"u")throw new Error(An(8));if(typeof x.type!="string")throw new Error(An(17));if(l)throw new Error(An(9));try{l=!0,i=r(i,x)}finally{l=!1}return(o=a).forEach(b=>{b()}),x}function v(x){if(typeof x!="function")throw new Error(An(10));r=x,p({type:vg.REPLACE})}function g(){const x=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(An(11));function b(){const S=_;S.next&&S.next(f())}return b(),{unsubscribe:x(b)}},[x3](){return this}}}return p({type:vg.INIT}),{dispatch:p,subscribe:d,getState:f,replaceReducer:v,[x3]:g}}function nie(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:vg.INIT})>"u")throw new Error(An(12));if(typeof n(void 0,{type:vg.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(An(13))})}function IE(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(An(14));c[d]=g,l=l||g!==v}return l=l||r.length!==Object.keys(a).length,l?c:a}}function gg(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function rie(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(An(15))};const a={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},s=e.map(l=>l(a));return o=gg(...s)(i.dispatch),{...i,dispatch:o}}}function iie(e){return $E(e)&&"type"in e&&typeof e.type=="string"}var RD=Symbol.for("immer-nothing"),w3=Symbol.for("immer-draftable"),$r=Symbol.for("immer-state");function Ci(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qc=Object.getPrototypeOf;function Ka(e){return!!e&&!!e[$r]}function Go(e){var t;return e?$D(e)||Array.isArray(e)||!!e[w3]||!!((t=e.constructor)!=null&&t[w3])||d0(e)||h0(e):!1}var oie=Object.prototype.constructor.toString();function $D(e){if(!e||typeof e!="object")return!1;const t=Qc(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===oie}function nh(e,t){f0(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function f0(e){const t=e[$r];return t?t.type_:Array.isArray(e)?1:d0(e)?2:h0(e)?3:0}function Jw(e,t){return f0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ID(e,t,n){const r=f0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function aie(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function d0(e){return e instanceof Map}function h0(e){return e instanceof Set}function Ts(e){return e.copy_||e.base_}function e2(e,t){if(d0(e))return new Map(e);if(h0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&$D(e))return Qc(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[$r];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=sie),Object.freeze(e),t&&nh(e,(n,r)=>DE(r,!0))),e}function sie(){Ci(2)}function p0(e){return Object.isFrozen(e)}var lie={};function fl(e){const t=lie[e];return t||Ci(0,e),t}var rh;function DD(){return rh}function cie(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function O3(e,t){t&&(fl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function t2(e){n2(e),e.drafts_.forEach(uie),e.drafts_=null}function n2(e){e===rh&&(rh=e.parent_)}function S3(e){return rh=cie(rh,e)}function uie(e){const t=e[$r];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function E3(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[$r].modified_&&(t2(t),Ci(4)),Go(e)&&(e=yg(t,e),t.parent_||bg(t,e)),t.patches_&&fl("Patches").generateReplacementPatches_(n[$r].base_,e,t.patches_,t.inversePatches_)):e=yg(t,n,[]),t2(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==RD?e:void 0}function yg(e,t,n){if(p0(t))return t;const r=t[$r];if(!r)return nh(t,(i,o)=>C3(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return bg(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),nh(o,(s,l)=>C3(e,r,i,s,l,n,a)),bg(e,i,!1),n&&e.patches_&&fl("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function C3(e,t,n,r,i,o,a){if(Ka(i)){const s=o&&t&&t.type_!==3&&!Jw(t.assigned_,r)?o.concat(r):void 0,l=yg(e,i,s);if(ID(n,r,l),Ka(l))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(Go(i)&&!p0(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;yg(e,i),(!t||!t.scope_.parent_)&&bg(e,i)}}function bg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&DE(t,n)}function fie(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:DD(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=FE;n&&(i=[r],o=ih);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var FE={get(e,t){if(t===$r)return e;const n=Ts(e);if(!Jw(n,t))return die(e,n,t);const r=n[t];return e.finalized_||!Go(r)?r:r===C1(e.base_,t)?(P1(e),e.copy_[t]=i2(r,e)):r},has(e,t){return t in Ts(e)},ownKeys(e){return Reflect.ownKeys(Ts(e))},set(e,t,n){const r=FD(Ts(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=C1(Ts(e),t),o=i==null?void 0:i[$r];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(aie(n,i)&&(n!==void 0||Jw(e.base_,t)))return!0;P1(e),r2(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return C1(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,P1(e),r2(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ts(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ci(11)},getPrototypeOf(e){return Qc(e.base_)},setPrototypeOf(){Ci(12)}},ih={};nh(FE,(e,t)=>{ih[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ih.deleteProperty=function(e,t){return ih.set.call(this,e,t,void 0)};ih.set=function(e,t,n){return FE.set.call(this,e[0],t,n,e[0])};function C1(e,t){const n=e[$r];return(n?Ts(n):e)[t]}function die(e,t,n){var i;const r=FD(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function FD(e,t){if(!(t in e))return;let n=Qc(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Qc(n)}}function r2(e){e.modified_||(e.modified_=!0,e.parent_&&r2(e.parent_))}function P1(e){e.copy_||(e.copy_=e2(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hie=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(l=o,...c){return a.produce(l,f=>n.call(this,f,...c))}}typeof n!="function"&&Ci(6),r!==void 0&&typeof r!="function"&&Ci(7);let i;if(Go(t)){const o=S3(this),a=i2(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?t2(o):n2(o)}return O3(o,r),E3(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===RD&&(i=void 0),this.autoFreeze_&&DE(i,!0),r){const o=[],a=[];fl("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Ci(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,l=>t(l,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Go(e)||Ci(8),Ka(e)&&(e=BD(e));const t=S3(this),n=i2(e,void 0);return n[$r].isManual_=!0,n2(t),n}finishDraft(e,t){const n=e&&e[$r];(!n||!n.isManual_)&&Ci(9);const{scope_:r}=n;return O3(r,t),E3(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=fl("Patches").applyPatches_;return Ka(e)?r(e,t):this.produce(e,i=>r(i,t))}};function i2(e,t){const n=d0(e)?fl("MapSet").proxyMap_(e,t):h0(e)?fl("MapSet").proxySet_(e,t):fie(e,t);return(t?t.scope_:DD()).drafts_.push(n),n}function BD(e){return Ka(e)||Ci(10,e),UD(e)}function UD(e){if(!Go(e)||p0(e))return e;const t=e[$r];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=e2(e,t.scope_.immer_.useStrictShallowCopy_)}else n=e2(e,!0);return nh(n,(r,i)=>{ID(n,r,UD(i))}),t&&(t.finalized_=!1),n}var Ir=new hie,zD=Ir.produce;Ir.produceWithPatches.bind(Ir);Ir.setAutoFreeze.bind(Ir);Ir.setUseStrictShallowCopy.bind(Ir);Ir.applyPatches.bind(Ir);Ir.createDraft.bind(Ir);Ir.finishDraft.bind(Ir);function pie(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mie(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function vie(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var P3=e=>Array.isArray(e)?e:[e];function gie(e){const t=Array.isArray(e[0])?e[0]:e;return vie(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function yie(e,t){const n=[],{length:r}=e;for(let i=0;i{n=ym(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function VD(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),pie(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const f={...n,...l},{memoize:d,memoizeOptions:p=[],argsMemoize:v=BE,argsMemoizeOptions:g=[],devModeChecks:y={}}=f,x=P3(p),_=P3(g),b=gie(i),w=d(function(){return o++,c.apply(null,arguments)},...x),S=v(function(){a++;const C=yie(b,arguments);return s=w.apply(null,C),s},..._);return Object.assign(S,{resultFunc:c,memoizedResultFunc:w,dependencies:b,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var wie=VD(BE),Oie=Object.assign((e,t=wie)=>{mie(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>Oie});function WD(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var Sie=WD(),Eie=WD,Cie=(...e)=>{const t=VD(...e),n=Object.assign((...r)=>{const i=t(...r),o=(a,...s)=>i(Ka(a)?BD(a):a,...s);return Object.assign(o,i),o},{withTypes:()=>n});return n};Cie(BE);var Pie=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?gg:gg.apply(null,arguments)},Tie=e=>e&&typeof e.match=="function";function un(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(pr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>iie(r)&&r.type===e,n}var HD=class qf extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,qf.prototype)}static get[Symbol.species](){return qf}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new qf(...t[0].concat(this)):new qf(...t.concat(this))}};function j3(e){return Go(e)?zD(e,()=>{}):e}function A3(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(pr(10));const r=n.insert(t,e);return e.set(t,r),r}function jie(e){return typeof e=="boolean"}var Aie=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new HD;return n&&(jie(n)?a.push(Sie):a.push(Eie(n.extraArgument))),a},kie="RTK_autoBatch",GD=e=>t=>{setTimeout(t,e)},Nie=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:GD(10),Mie=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?Nie:e.type==="callback"?e.queueNotification:GD(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const d=()=>i&&f(),p=r.subscribe(d);return s.add(f),()=>{p(),s.delete(f)}},dispatch(f){var d;try{return i=!((d=f==null?void 0:f.meta)!=null&&d[kie]),o=!i,o&&(a||(a=!0,l(c))),r.dispatch(f)}finally{i=!0}}})},Lie=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new HD(e);return r&&i.push(Mie(typeof r=="object"?r:void 0)),i},Rie=!0;function qD(e){const t=Aie(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{};let s;if(typeof n=="function")s=n;else if($E(n))s=IE(n);else throw new Error(pr(1));let l;typeof r=="function"?l=r(t):l=t();let c=gg;i&&(c=Pie({trace:!Rie,...typeof i=="object"&&i}));const f=rie(...l),d=Lie(f);let p=typeof a=="function"?a(d):d();const v=c(...p);return LD(s,o,v)}function KD(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(pr(28));if(s in t)throw new Error(pr(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function $ie(e){return typeof e=="function"}function Iie(e,t){let[n,r,i]=KD(t),o;if($ie(e))o=()=>j3(e());else{const s=j3(e);o=()=>s}function a(s=o(),l){let c=[n[l.type],...r.filter(({matcher:f})=>f(l)).map(({reducer:f})=>f)];return c.filter(f=>!!f).length===0&&(c=[i]),c.reduce((f,d)=>{if(d)if(Ka(f)){const v=d(f,l);return v===void 0?f:v}else{if(Go(f))return zD(f,p=>d(p,l));{const p=d(f,l);if(p===void 0){if(f===null)return f;throw new Error(pr(9))}return p}}return f},s)}return a.getInitialState=o,a}var Die="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",YD=(e=21)=>{let t="",n=e;for(;n--;)t+=Die[Math.random()*64|0];return t},Fie=(e,t)=>Tie(e)?e.match(t):e(t);function Bie(...e){return t=>e.some(n=>Fie(n,t))}var Uie=["name","message","stack","code"],T1=class{constructor(e,t){Il(this,"_type");this.payload=e,this.meta=t}},k3=class{constructor(e,t){Il(this,"_type");this.payload=e,this.meta=t}},zie=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Uie)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},ZD=(()=>{function e(t,n,r){const i=un(t+"/fulfilled",(l,c,f,d)=>({payload:l,meta:{...d||{},arg:f,requestId:c,requestStatus:"fulfilled"}})),o=un(t+"/pending",(l,c,f)=>({payload:void 0,meta:{...f||{},arg:c,requestId:l,requestStatus:"pending"}})),a=un(t+"/rejected",(l,c,f,d,p)=>({payload:d,error:(r&&r.serializeError||zie)(l||"Rejected"),meta:{...p||{},arg:f,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function s(l){return(c,f,d)=>{const p=r!=null&&r.idGenerator?r.idGenerator(l):YD(),v=new AbortController;let g,y;function x(b){y=b,v.abort()}const _=async function(){var S,E;let b;try{let C=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,l,{getState:f,extra:d});if(Wie(C)&&(C=await C),C===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((A,D)=>{g=()=>{D({name:"AbortError",message:y||"Aborted"})},v.signal.addEventListener("abort",g)});c(o(p,l,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:p,arg:l},{getState:f,extra:d}))),b=await Promise.race([T,Promise.resolve(n(l,{dispatch:c,getState:f,extra:d,requestId:p,signal:v.signal,abort:x,rejectWithValue:(A,D)=>new T1(A,D),fulfillWithValue:(A,D)=>new k3(A,D)})).then(A=>{if(A instanceof T1)throw A;return A instanceof k3?i(A.payload,p,l,A.meta):i(A,p,l)})])}catch(C){b=C instanceof T1?a(null,p,l,C.payload,C.meta):a(C,p,l)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&a.match(b)&&b.meta.condition||c(b),b}();return Object.assign(_,{abort:x,requestId:p,arg:l,unwrap(){return _.then(Vie)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:Bie(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Vie(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Wie(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hie=Symbol.for("rtk-slice-createasyncthunk");function Gie(e,t){return`${e}/${t}`}function qie({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Hie];return function(i){const{name:o,reducerPath:a=o}=i;if(!o)throw new Error(pr(11));typeof process<"u";const s=(typeof i.reducers=="function"?i.reducers(Yie()):i.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(w,S){const E=typeof w=="string"?w:w.type;if(!E)throw new Error(pr(12));if(E in c.sliceCaseReducersByType)throw new Error(pr(13));return c.sliceCaseReducersByType[E]=S,f},addMatcher(w,S){return c.sliceMatchers.push({matcher:w,reducer:S}),f},exposeAction(w,S){return c.actionCreators[w]=S,f},exposeCaseReducer(w,S){return c.sliceCaseReducersByName[w]=S,f}};l.forEach(w=>{const S=s[w],E={reducerName:w,type:Gie(o,w),createNotation:typeof i.reducers=="function"};Xie(S)?Jie(E,S,f,t):Zie(E,S,f)});function d(){const[w={},S=[],E=void 0]=typeof i.extraReducers=="function"?KD(i.extraReducers):[i.extraReducers],C={...w,...c.sliceCaseReducersByType};return Iie(i.initialState,T=>{for(let A in C)T.addCase(A,C[A]);for(let A of c.sliceMatchers)T.addMatcher(A.matcher,A.reducer);for(let A of S)T.addMatcher(A.matcher,A.reducer);E&&T.addDefaultCase(E)})}const p=w=>w,v=new Map;let g;function y(w,S){return g||(g=d()),g(w,S)}function x(){return g||(g=d()),g.getInitialState()}function _(w,S=!1){function E(T){let A=T[w];return typeof A>"u"&&S&&(A=x()),A}function C(T=p){const A=A3(v,S,{insert:()=>new WeakMap});return A3(A,T,{insert:()=>{const D={};for(const[N,I]of Object.entries(i.selectors??{}))D[N]=Kie(I,T,x,S);return D}})}return{reducerPath:w,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}const b={name:o,reducer:y,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,..._(a),injectInto(w,{reducerPath:S,...E}={}){const C=S??a;return w.inject({reducerPath:C,reducer:y},E),{...b,..._(C,!0)}}};return b}}function Kie(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var Qt=qie();function Yie(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Zie({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Qie(r))throw new Error(pr(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?un(e,a):un(e))}function Xie(e){return e._reducerDefinitionType==="asyncThunk"}function Qie(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Jie({type:e,reducerName:t},n,r,i){if(!i)throw new Error(pr(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:f}=n,d=i(e,o,f);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||bm,pending:s||bm,rejected:l||bm,settled:c||bm})}function bm(){}var eoe=(e,t)=>{if(typeof e!="function")throw new Error(pr(32))},UE="listenerMiddleware",toe=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=un(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(pr(21));return eoe(o),{predicate:i,type:t,effect:o}},noe=Object.assign(e=>{const{type:t,predicate:n,effect:r}=toe(e);return{id:YD(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(pr(22))}}},{withTypes:()=>noe}),roe=Object.assign(un(`${UE}/add`),{withTypes:()=>roe});un(`${UE}/removeAll`);var ioe=Object.assign(un(`${UE}/remove`),{withTypes:()=>ioe});function pr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const{actions:ooe,reducer:aoe}=Qt({name:"shlink/appUpdates",initialState:!1,reducers:{appUpdateAvailable:()=>!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:soe,resetAppUpdate:loe}=ooe,coe=aoe,uoe=(e,t)=>{e.factory("App",Jre),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>soe),e.serviceFactory("resetAppUpdate",()=>loe)},N3={"Content-Type":"application/json"},M3=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...N3}}:{headers:N3}:e;let foe=class{constructor(t=window.fetch.bind(window)){this.fetch=t}async jsonRequest(t,n){return this.fetch(t,M3(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i})}async emptyRequest(t,n){return this.fetch(t,M3(n)).then(async r=>{if(!r.ok)throw await r.json()})}};var zE=(e=>(e.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",e.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",e.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",e.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",e.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",e.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",e.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",e.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",e.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",e.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",e.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",e.NOT_FOUND="https://shlink.io/api/error/not-found",e.INVALID_URL="https://shlink.io/api/error/invalid-url",e))(zE||{});const XD=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),doe=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),j1=e=>Object.prototype.toString.call(e)==="[object Object]",QD=(e,t)=>{const n={};return(...r)=>{const i=e(...r);if(n[i])return n[i];const o=t(...r);return n[i]=o,o}},m0=(e,t)=>{const n={...e};return!j1(e)||!j1(t)||Object.keys(t).forEach(r=>{j1(t[r])?n[r]=r in e&&e[r]!==void 0?m0(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},VE=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),hoe=(e,t)=>[...e].sort((n,r)=>{const i=t(n),o=t(r);return i===o?0:i{const n=[];for(let r=0;rObject.fromEntries(e.map((n,r)=>[n,t[r]]));function qe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ri(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function WE(e,t){const n=qe(e);return isNaN(t)?Ri(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function poe(e,t){const n=qe(e);if(isNaN(t))return Ri(e,NaN);if(!t)return n;const r=n.getDate(),i=Ri(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const o=i.getDate();return r>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function moe(e,t){const{years:n=0,months:r=0,weeks:i=0,days:o=0,hours:a=0,minutes:s=0,seconds:l=0}=t,c=qe(e),f=r||n?poe(c,r+n*12):c,d=o||i?WE(f,o+i*7):f,p=s+a*60,g=(l+p*60)*1e3;return Ri(e,d.getTime()+g)}const JD=6048e5,voe=864e5,e5=6e4,HE=36e5,_m=43200,R3=1440;let goe={};function Nu(){return goe}function oh(e,t){var s,l,c,f;const n=Nu(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=qe(e),o=i.getDay(),a=(o=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function dl(e){const t=qe(e);return t.setHours(0,0,0,0),t}function _g(e){const t=qe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function n5(e,t){const n=dl(e),r=dl(t),i=+n-_g(n),o=+r-_g(r);return Math.round((i-o)/voe)}function yoe(e){const t=t5(e),n=Ri(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ah(n)}function r5(e){let t;return e.forEach(function(n){const r=qe(n);(t===void 0||t{const r=qe(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function cv(e,t){const n=qe(e),r=qe(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function _oe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xoe(e){if(!_oe(e)&&typeof e!="number")return!1;const t=qe(e);return!isNaN(Number(t))}function woe(e,t){const n=qe(e),r=qe(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function fp(e,t){const n=qe(e),r=qe(t),i=$3(n,r),o=Math.abs(n5(n,r));n.setDate(n.getDate()-i*o);const a=+($3(n,r)===-i),s=i*(o-a);return s===0?0:s}function $3(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function GE(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function i5(e,t){return+qe(e)-+qe(t)}function Ooe(e,t,n){const r=i5(e,t)/HE;return GE(n==null?void 0:n.roundingMethod)(r)}function Jc(e){const t=qe(e);return t.setHours(23,59,59,999),t}function Soe(e){const t=qe(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Eoe(e){const t=qe(e);return+Jc(t)==+Soe(t)}function xg(e,t){const n=qe(e),r=qe(t),i=cv(n,r),o=Math.abs(woe(n,r));let a;if(o<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);let s=cv(n,r)===-i;Eoe(qe(e))&&o===1&&cv(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function Coe(e,t,n){const r=i5(e,t)/1e3;return GE(n==null?void 0:n.roundingMethod)(r)}function Poe(e,t,n){const r=fp(e,t)/7;return GE(n==null?void 0:n.roundingMethod)(r)}function Toe(e){const t=qe(e),n=Ri(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function joe(e,t){var s,l,c,f;const n=Nu(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=qe(e),o=i.getDay(),a=(o{let r;const i=koe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function A1(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Moe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Loe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Roe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$oe={date:A1({formats:Moe,defaultWidth:"full"}),time:A1({formats:Loe,defaultWidth:"full"}),dateTime:A1({formats:Roe,defaultWidth:"full"})},Ioe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Doe=(e,t,n,r)=>Ioe[e];function Ef(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const Foe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Boe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Uoe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},zoe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Voe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Woe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Hoe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Goe={ordinalNumber:Hoe,era:Ef({values:Foe,defaultWidth:"wide"}),quarter:Ef({values:Boe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ef({values:Uoe,defaultWidth:"wide"}),day:Ef({values:zoe,defaultWidth:"wide"}),dayPeriod:Ef({values:Voe,defaultWidth:"wide",formattingValues:Woe,defaultFormattingWidth:"wide"})};function Cf(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Koe(s,d=>d.test(a)):qoe(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const f=t.slice(a.length);return{value:c,rest:f}}}function qoe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Koe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const Zoe=/^(\d+)(th|st|nd|rd)?/i,Xoe=/\d+/i,Qoe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Joe={any:[/^b/i,/^(a|c)/i]},eae={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tae={any:[/1/i,/2/i,/3/i,/4/i]},nae={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rae={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},iae={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},oae={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},aae={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},sae={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},lae={ordinalNumber:Yoe({matchPattern:Zoe,parsePattern:Xoe,valueCallback:e=>parseInt(e,10)}),era:Cf({matchPatterns:Qoe,defaultMatchWidth:"wide",parsePatterns:Joe,defaultParseWidth:"any"}),quarter:Cf({matchPatterns:eae,defaultMatchWidth:"wide",parsePatterns:tae,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cf({matchPatterns:nae,defaultMatchWidth:"wide",parsePatterns:rae,defaultParseWidth:"any"}),day:Cf({matchPatterns:iae,defaultMatchWidth:"wide",parsePatterns:oae,defaultParseWidth:"any"}),dayPeriod:Cf({matchPatterns:aae,defaultMatchWidth:"any",parsePatterns:sae,defaultParseWidth:"any"})},o5={code:"en-US",formatDistance:Noe,formatLong:$oe,formatRelative:Doe,localize:Goe,match:lae,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cae(e){const t=qe(e);return n5(t,Toe(t))+1}function uae(e){const t=qe(e),n=+ah(t)-+yoe(t);return Math.round(n/JD)+1}function a5(e,t){var f,d,p,v;const n=qe(e),r=n.getFullYear(),i=Nu(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((v=(p=i.locale)==null?void 0:p.options)==null?void 0:v.firstWeekContainsDate)??1,a=Ri(e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=oh(a,t),l=Ri(e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=oh(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function fae(e,t){var s,l,c,f;const n=Nu(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,i=a5(e,t),o=Ri(e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),oh(o,t)}function dae(e,t){const n=qe(e),r=+oh(n,t)-+fae(n,t);return Math.round(r/JD)+1}function nt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ua={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return nt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):nt(n+1,2)},d(e,t){return nt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return nt(e.getHours()%12||12,t.length)},H(e,t){return nt(e.getHours(),t.length)},m(e,t){return nt(e.getMinutes(),t.length)},s(e,t){return nt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return nt(i,t.length)}},Vl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},I3={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return ua.y(e,t)},Y:function(e,t,n,r){const i=a5(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return nt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):nt(o,t.length)},R:function(e,t){const n=t5(e);return nt(n,t.length)},u:function(e,t){const n=e.getFullYear();return nt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return nt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return nt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ua.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return nt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=dae(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):nt(i,t.length)},I:function(e,t,n){const r=uae(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):nt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ua.d(e,t)},D:function(e,t,n){const r=cae(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):nt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return nt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return nt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return nt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Vl.noon:r===0?i=Vl.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Vl.evening:r>=12?i=Vl.afternoon:r>=4?i=Vl.morning:i=Vl.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ua.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ua.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ua.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ua.s(e,t)},S:function(e,t){return ua.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return F3(r);case"XXXX":case"XX":return js(r);case"XXXXX":case"XXX":default:return js(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return F3(r);case"xxxx":case"xx":return js(r);case"xxxxx":case"xxx":default:return js(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+D3(r,":");case"OOOO":default:return"GMT"+js(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+D3(r,":");case"zzzz":default:return"GMT"+js(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return nt(r,t.length)},T:function(e,t,n){const r=e.getTime();return nt(r,t.length)}};function D3(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+nt(o,2)}function F3(e,t){return e%60===0?(e>0?"-":"+")+nt(Math.abs(e)/60,2):js(e,t)}function js(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=nt(Math.trunc(r/60),2),o=nt(r%60,2);return n+i+t+o}const B3=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},s5=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},hae=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return B3(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",B3(r,t)).replace("{{time}}",s5(i,t))},pae={p:s5,P:hae},mae=/^D+$/,vae=/^Y+$/,gae=["D","DD","YY","YYYY"];function yae(e){return mae.test(e)}function bae(e){return vae.test(e)}function _ae(e,t,n){const r=xae(e,t,n);if(console.warn(r),gae.includes(e))throw new RangeError(r)}function xae(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const wae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Oae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sae=/^'([^]*?)'?$/,Eae=/''/g,Cae=/[a-zA-Z]/;function wg(e,t,n){var f,d,p,v,g,y,x,_;const r=Nu(),i=(n==null?void 0:n.locale)??r.locale??o5,o=(n==null?void 0:n.firstWeekContainsDate)??((d=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((v=(p=r.locale)==null?void 0:p.options)==null?void 0:v.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((y=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??r.weekStartsOn??((_=(x=r.locale)==null?void 0:x.options)==null?void 0:_.weekStartsOn)??0,s=qe(e);if(!xoe(s))throw new RangeError("Invalid time value");let l=t.match(Oae).map(b=>{const w=b[0];if(w==="p"||w==="P"){const S=pae[w];return S(b,i.formatLong)}return b}).join("").match(wae).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const w=b[0];if(w==="'")return{isToken:!1,value:Pae(b)};if(I3[w])return{isToken:!0,value:b};if(w.match(Cae))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:b}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(b=>{if(!b.isToken)return b.value;const w=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&bae(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&yae(w))&&_ae(w,t,String(e));const S=I3[w[0]];return S(s,w,i.localize,c)}).join("")}function Pae(e){const t=e.match(Sae);return t?t[1].replace(Eae,"'"):e}function Tae(e,t,n){const r=Nu(),i=(n==null?void 0:n.locale)??r.locale??o5,o=2520,a=cv(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const s=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:a});let l,c;a>0?(l=qe(t),c=qe(e)):(l=qe(e),c=qe(t));const f=Coe(c,l),d=(_g(c)-_g(l))/1e3,p=Math.round((f-d)/60);let v;if(p<2)return n!=null&&n.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,s):f<10?i.formatDistance("lessThanXSeconds",10,s):f<20?i.formatDistance("lessThanXSeconds",20,s):f<40?i.formatDistance("halfAMinute",0,s):f<60?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",1,s):p===0?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",p,s);if(p<45)return i.formatDistance("xMinutes",p,s);if(p<90)return i.formatDistance("aboutXHours",1,s);if(pr.getTime()}function Og(e,t){const n=qe(e),r=qe(t);return+n<+r}function o2(e,t){const n=qe(e),r=qe(t);return+n==+r}function Nae(e,t){const n=+qe(e),[r,i]=[+qe(t.start),+qe(t.end)].sort((o,a)=>o-a);return n>=r&&n<=i}function Sg(e,t){return WE(e,-t)}function Ya(e,t){const n=(t==null?void 0:t.additionalDigits)??2,r=$ae(e);let i;if(r.date){const l=Iae(r.date,n);i=Dae(l.restDateString,l.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const o=i.getTime();let a=0,s;if(r.time&&(a=Fae(r.time),isNaN(a)))return new Date(NaN);if(r.timezone){if(s=Bae(r.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(o+a),c=new Date(0);return c.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),c.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),c}return new Date(o+a+s)}const xm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Mae=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Lae=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Rae=/^([+-])(\d{2})(?::?(\d{2}))?$/;function $ae(e){const t={},n=e.split(xm.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],xm.timeZoneDelimiter.test(t.date)&&(t.date=e.split(xm.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=xm.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Iae(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function Dae(e,t){if(t===null)return new Date(NaN);const n=e.match(Mae);if(!n)return new Date(NaN);const r=!!n[4],i=Pf(n[1]),o=Pf(n[2])-1,a=Pf(n[3]),s=Pf(n[4]),l=Pf(n[5])-1;if(r)return Hae(t,s,l)?Uae(t,s,l):new Date(NaN);{const c=new Date(0);return!Vae(t,o,a)||!Wae(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}}function Pf(e){return e?parseInt(e):1}function Fae(e){const t=e.match(Lae);if(!t)return NaN;const n=k1(t[1]),r=k1(t[2]),i=k1(t[3]);return Gae(n,r,i)?n*HE+r*e5+i*1e3:NaN}function k1(e){return e&&parseFloat(e.replace(",","."))||0}function Bae(e){if(e==="Z")return 0;const t=e.match(Rae);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return qae(r,i)?n*(r*HE+i*e5):NaN}function Uae(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const zae=[31,null,31,30,31,30,31,31,30,31,30,31];function l5(e){return e%400===0||e%4===0&&e%100!==0}function Vae(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(zae[t]||(l5(e)?29:28))}function Wae(e,t){return t>=1&&t<=(l5(e)?366:365)}function Hae(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Gae(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function qae(e,t){return t>=0&&t<=59}const mr=({href:e,children:t,rel:n,...r})=>m.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),Kae="Left",Yae="Right",Zae="Up",Xae="Down",gc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},a2={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},U3="mousemove",z3="mouseup",Qae="touchend",Jae="touchmove",ese="touchstart";function tse(e,t,n,r){return e>t?n>0?Yae:Kae:r>0?Xae:Zae}function V3(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function nse(e,t){const n=f=>{const d="touches"in f;d&&f.touches.length>1||e((p,v)=>{v.trackMouse&&!d&&(document.addEventListener(U3,r),document.addEventListener(z3,a));const{clientX:g,clientY:y}=d?f.touches[0]:f,x=V3([g,y],v.rotationAngle);return v.onTouchStartOrOnMouseDown&&v.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),a2),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((d,p)=>{const v="touches"in f;if(v&&f.touches.length>1)return d;if(f.timeStamp-d.start>p.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:g,clientY:y}=v?f.touches[0]:f,[x,_]=V3([g,y],p.rotationAngle),b=x-d.xy[0],w=_-d.xy[1],S=Math.abs(b),E=Math.abs(w),C=(f.timeStamp||0)-d.start,T=Math.sqrt(S*S+E*E)/(C||1),A=[b/(C||1),w/(C||1)],D=tse(S,E,b,w),N=typeof p.delta=="number"?p.delta:p.delta[D.toLowerCase()]||gc.delta;if(S{e((d,p)=>{let v;if(d.swiping&&d.eventData){if(f.timeStamp-d.start{document.removeEventListener(U3,r),document.removeEventListener(z3,a)},a=f=>{o(),i(f)},s=(f,d)=>{let p=()=>{};if(f&&f.addEventListener){const v=Object.assign(Object.assign({},gc.touchEventOptions),d.touchEventOptions),g=[[ese,n,v],[Jae,r,Object.assign(Object.assign({},v),d.preventScrollOnSwipe?{passive:!1}:{})],[Qae,i,v]];g.forEach(([y,x,_])=>f.addEventListener(y,x,_)),p=()=>g.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((d,p)=>{if(d.el===f)return d;const v={};return d.el&&d.el!==f&&d.cleanUpTouch&&(d.cleanUpTouch(),v.cleanUpTouch=void 0),p.trackTouch&&f&&(v.cleanUpTouch=s(f,p)),Object.assign(Object.assign(Object.assign({},d),{el:f}),v)})}};return t.trackMouse&&(c.onMouseDown=n),[c,s]}function rse(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function ise(e){const{trackMouse:t}=e,n=R.useRef(Object.assign({},a2)),r=R.useRef(Object.assign({},gc)),i=R.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},gc),e);let o;for(o in gc)r.current[o]===void 0&&(r.current[o]=gc[o]);const[a,s]=R.useMemo(()=>nse(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=rse(n.current,r.current,i.current,s),a}var s2={exports:{}};/** @license +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eee(e,t){if(e){if(typeof e=="string")return aw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aw(e,t)}}function tee(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nee(e){if(Array.isArray(e))return aw(e)}function aw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function oee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XA(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tg(e){return tg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},tg(e)}var dee={tag:it,children:$.node.isRequired,dark:$.bool,end:$.bool,flip:$.bool,modifiers:$.array,className:$.string,cssModule:$.object,style:$.object,persist:$.bool,strategy:$.string,container:Wc,updateOnSelect:$.bool,right:DI($.bool,'Please use "end" instead.')},hee={up:"top",left:"left",right:"right",start:"left",end:"right",down:"bottom"},CE=function(e){see(n,e);var t=lee(n);function n(){return oee(this,n),t.apply(this,arguments)}return aee(n,[{key:"getRole",value:function(){return this.context.menuRole==="listbox"?"listbox":"menu"}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.cssModule,l=o.dark,c=o.end,f=o.right,d=o.tag,p=d===void 0?"div":d,v=o.flip,g=v===void 0?!0:v,y=o.modifiers,x=y===void 0?[]:y,_=o.persist,b=o.strategy,w=o.container,S=o.updateOnSelect,E=ree(o,ZJ),C=Be(He(a,"dropdown-menu",{"dropdown-menu-dark":l,"dropdown-menu-end":c||f,show:this.context.isOpen}),s),T=p;if(_||this.context.isOpen&&!this.context.inNavbar){var A=hee[this.context.direction]||"bottom",D=c||f?"end":"start",N="".concat(A,"-").concat(D),I=[].concat(QJ(x),[{name:"flip",enabled:!!g}]),F={};_&&(F.display="block",F.visibility=this.context.isOpen?"visible":"hidden");var K=V.createElement(aD,{placement:N,modifiers:I,strategy:b},function(X){var Q=X.ref,ne=X.style,Z=X.placement,z=X.update,B=w1(w1(w1({},i.props.style),F),ne),H=function(q){Q(q);var te=i.context.onMenuRef;te&&te(q)};return V.createElement(T,eg({tabIndex:"-1",role:i.getRole(),ref:H},E,{style:B,"aria-hidden":!i.context.isOpen,className:C,"data-popper-placement":Z,onClick:function(){return S&&z()}}))});return w?Bs.createPortal(K,Yd(w)):K}var W=this.context.onMenuRef;return V.createElement(T,eg({tabIndex:"-1",role:this.getRole()},E,{ref:W,"aria-hidden":!this.context.isOpen,className:C,"data-popper-placement":E.placement,"data-bs-popper":"static"}))}}]),n}(V.Component);CE.propTypes=dee;CE.contextType=Qd;const Tu=CE;function lw(e){"@babel/helpers - typeof";return lw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lw(e)}var pee=["className","color","cssModule","caret","split","nav","tag","innerRef"];function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function yee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QA(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ng(e){return ng=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ng(e)}var See={caret:$.bool,color:$.string,children:$.node,className:$.string,cssModule:$.object,disabled:$.bool,onClick:$.func,"aria-haspopup":$.bool,split:$.bool,tag:it,nav:$.bool,innerRef:$.oneOfType([$.object,$.string,$.func])},Eee={color:"secondary","aria-haspopup":!0},a0=function(e){_ee(n,e);var t=xee(n);function n(r){var i;return yee(this,n),i=t.call(this,r),i.onClick=i.onClick.bind(lD(i)),i}return bee(n,[{key:"onClick",value:function(i){if(this.props.disabled||this.context.disabled){i.preventDefault();return}this.props.nav&&!this.props.tag&&i.preventDefault(),this.props.onClick&&this.props.onClick(i),this.context.toggle(i)}},{key:"getRole",value:function(){return this.context.menuRole||this.props["aria-haspopup"]}},{key:"render",value:function(){var i=this,o=this.props,a=o.className,s=o.color,l=o.cssModule,c=o.caret,f=o.split,d=o.nav,p=o.tag,v=o.innerRef,g=vee(o,pee),y=g["aria-label"]||"Toggle Dropdown",x=Be(He(a,{"dropdown-toggle":c||f,"dropdown-toggle-split":f,"nav-link":d}),l),_=typeof g.children<"u"?g.children:V.createElement("span",{className:"visually-hidden"},y),b;d&&!p?(b="a",g.href="#"):p?b=p:(b=Ke,g.color=s,g.cssModule=l);var w=function(E){var C=E.ref,T=function(D){C(D);var N=i.context.onToggleRef;N&&N(D)};return V.createElement(b,cw({},g,mee({},typeof b=="string"?"ref":"innerRef",T),{className:x,onClick:i.onClick,"aria-expanded":i.context.isOpen,"aria-haspopup":i.getRole(),children:_}))};return this.context.inNavbar?V.createElement(V.Fragment,null,w({ref:this.context.onToggleRef})):V.createElement(PJ,{innerRef:v},w)}}]),n}(V.Component);a0.propTypes=See;a0.defaultProps=Eee;a0.contextType=Qd;const ju=a0;function Cee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function fw(e,t){return fw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},fw(e,t)}function Pee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fw(e,t)}const JA={disabled:!1},cD=V.createContext(null);var Tee=function(t){return t.scrollTop},Hf="unmounted",Cs="exited",Ps="entering",Xl="entered",dw="exiting",yr=function(e){Pee(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=Cs,o.appearStatus=Ps):l=Xl:r.unmountOnExit||r.mountOnEnter?l=Hf:l=Cs,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Hf?{status:Cs}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Ps&&a!==Xl&&(o=Ps):(a===Ps||a===Xl)&&(o=dw)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Ps){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Bs.findDOMNode(this);a&&Tee(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Cs&&this.setState({status:Hf})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Bs.findDOMNode(this),s],c=l[0],f=l[1],d=this.getTimeouts(),p=s?d.appear:d.enter;if(!i&&!a||JA.disabled){this.safeSetState({status:Xl},function(){o.props.onEntered(c)});return}this.props.onEnter(c,f),this.safeSetState({status:Ps},function(){o.props.onEntering(c,f),o.onTransitionEnd(p,function(){o.safeSetState({status:Xl},function(){o.props.onEntered(c,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Bs.findDOMNode(this);if(!o||JA.disabled){this.safeSetState({status:Cs},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:dw},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:Cs},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Bs.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],f=l[1];this.props.addEndListener(c,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Hf)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=Cee(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return V.createElement(cD.Provider,{value:null},typeof a=="function"?a(i,s):V.cloneElement(V.Children.only(a),s))},t}(V.Component);yr.contextType=cD;yr.propTypes={};function Bl(){}yr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Bl,onEntering:Bl,onEntered:Bl,onExit:Bl,onExiting:Bl,onExited:Bl};yr.UNMOUNTED=Hf;yr.EXITED=Cs;yr.ENTERING=Ps;yr.ENTERED=Xl;yr.EXITING=dw;var jee=["tag","baseClass","baseClassActive","className","cssModule","children","innerRef"];function rg(){return rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jd(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Iee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tk(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function og(e){return og=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},og(e)}function nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yc(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zee(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Xee={body:$.bool,className:$.string,color:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func]),inverse:$.bool,outline:$.bool,tag:it};function vr(e){var t=e.className,n=e.cssModule,r=e.color,i=e.body,o=e.inverse,a=e.outline,s=e.tag,l=s===void 0?"div":s,c=e.innerRef,f=Yee(e,Kee),d=Be(He(t,"card",o?"text-white":!1,i?"card-body":!1,r?"".concat(a?"border":"bg","-").concat(r):!1),n);return V.createElement(l,mw({},f,{className:d,ref:c}))}vr.propTypes=Xee;var Qee=["className","cssModule","innerRef","tag"];function vw(){return vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ete(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var tte={className:$.string,cssModule:$.object,innerRef:$.oneOfType([$.object,$.string,$.func]),tag:it};function Zc(e){var t=e.className,n=e.cssModule,r=e.innerRef,i=e.tag,o=i===void 0?"div":i,a=Jee(e,Qee),s=Be(He(t,"card-body"),n);return V.createElement(o,vw({},a,{className:s,ref:r}))}Zc.propTypes=tte;var nte=["className","cssModule","tag"];function gw(){return gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ite(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var ote={className:$.string,cssModule:$.object,tag:it};function dD(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=rte(e,nte),a=Be(He(t,"card-footer"),n);return V.createElement(i,gw({},o,{className:a}))}dD.propTypes=ote;var ate=["className","cssModule","tag"];function yw(){return yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var cte={className:$.string,cssModule:$.object,tag:it};function Xc(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=ste(e,ate),a=Be(He(t,"card-header"),n);return V.createElement(i,yw({},o,{className:a}))}Xc.propTypes=cte;var ute=["className","cssModule","tag"];function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var hte={className:$.string,cssModule:$.object,tag:it};function hD(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"p":r,o=fte(e,ute),a=Be(He(t,"card-text"),n);return V.createElement(i,bw({},o,{className:a}))}hD.propTypes=hte;var pte=["className","cssModule","tag"];function _w(){return _w=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var gte={className:$.string,cssModule:$.object,tag:it};function pD(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=mte(e,pte),a=Be(He(t,"card-title"),n);return V.createElement(i,_w({},o,{className:a}))}pD.propTypes=gte;function xw(e){"@babel/helpers - typeof";return xw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xw(e)}var yte=["cssModule","children","isOpen","flip","target","offset","fallbackPlacements","placementPrefix","arrowClassName","hideArrow","popperClassName","tag","container","modifiers","strategy","boundariesElement","onClosed","fade","transition","placement"];function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ste(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ete(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ik(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ag(e){return ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ag(e)}function ok(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function av(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function sg(e){return sg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sg(e)}var jE={children:$.oneOfType([$.node,$.func]),placement:$.oneOf(sX),target:Wc.isRequired,container:Wc,isOpen:$.bool,disabled:$.bool,hideArrow:$.bool,boundariesElement:$.oneOfType([$.string,pE]),className:$.string,innerClassName:$.string,arrowClassName:$.string,popperClassName:$.string,cssModule:$.object,toggle:$.func,autohide:$.bool,placementPrefix:$.string,delay:$.oneOfType([$.shape({show:$.number,hide:$.number}),$.number]),modifiers:$.array,strategy:$.string,offset:$.arrayOf($.number),innerRef:$.oneOfType([$.func,$.string,$.object]),trigger:$.string,fade:$.bool,flip:$.bool},mD={show:0,hide:50},zte={isOpen:!1,hideArrow:!1,autohide:!1,delay:mD,toggle:function(){},trigger:"click",fade:!0};function vD(e,t){return t&&(e===t||t.contains(e))}function sk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return t&&t.length&&t.filter(function(n){return vD(e,n)})[0]}var AE=function(e){Dte(n,e);var t=Fte(n);function n(r){var i;return $te(this,n),i=t.call(this,r),i._targets=[],i.currentTargetElement=null,i.addTargetEvents=i.addTargetEvents.bind(wr(i)),i.handleDocumentClick=i.handleDocumentClick.bind(wr(i)),i.removeTargetEvents=i.removeTargetEvents.bind(wr(i)),i.toggle=i.toggle.bind(wr(i)),i.showWithDelay=i.showWithDelay.bind(wr(i)),i.hideWithDelay=i.hideWithDelay.bind(wr(i)),i.onMouseOverTooltipContent=i.onMouseOverTooltipContent.bind(wr(i)),i.onMouseLeaveTooltipContent=i.onMouseLeaveTooltipContent.bind(wr(i)),i.show=i.show.bind(wr(i)),i.hide=i.hide.bind(wr(i)),i.onEscKeyDown=i.onEscKeyDown.bind(wr(i)),i.getRef=i.getRef.bind(wr(i)),i.state={isOpen:r.isOpen},i._isMounted=!1,i}return Ite(n,[{key:"componentDidMount",value:function(){this._isMounted=!0,this.updateTarget()}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.removeTargetEvents(),this._targets=null,this.clearShowTimeout(),this.clearHideTimeout()}},{key:"handleDocumentClick",value:function(i){var o=this.props.trigger.split(" ");o.indexOf("legacy")>-1&&(this.props.isOpen||sk(i.target,this._targets))?(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen&&!vD(i.target,this._popover)?this.hideWithDelay(i):this.props.isOpen||this.showWithDelay(i)):o.indexOf("click")>-1&&sk(i.target,this._targets)&&(this._hideTimeout&&this.clearHideTimeout(),this.props.isOpen?this.hideWithDelay(i):this.showWithDelay(i))}},{key:"onMouseOverTooltipContent",value:function(){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._hideTimeout&&this.clearHideTimeout(),this.state.isOpen&&!this.props.isOpen&&this.toggle())}},{key:"onMouseLeaveTooltipContent",value:function(i){this.props.trigger.indexOf("hover")>-1&&!this.props.autohide&&(this._showTimeout&&this.clearShowTimeout(),i.persist(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide")))}},{key:"onEscKeyDown",value:function(i){i.key==="Escape"&&this.hide(i)}},{key:"getRef",value:function(i){var o=this.props.innerRef;o&&(typeof o=="function"?o(i):eh(o)==="object"&&(o.current=i)),this._popover=i}},{key:"getDelay",value:function(i){var o=this.props.delay;return eh(o)==="object"?isNaN(o[i])?mD[i]:o[i]:o}},{key:"getCurrentTarget",value:function(i){if(!i)return null;var o=this._targets.indexOf(i);return o>=0?this._targets[o]:this.getCurrentTarget(i.parentElement)}},{key:"show",value:function(i){if(!this.props.isOpen){if(this.clearShowTimeout(),this.currentTargetElement=i?i.currentTarget||this.getCurrentTarget(i.target):null,i&&i.composedPath&&typeof i.composedPath=="function"){var o=i.composedPath();this.currentTargetElement=o&&o[0]||this.currentTargetElement}this.toggle(i)}}},{key:"showWithDelay",value:function(i){this._hideTimeout&&this.clearHideTimeout(),this._showTimeout=setTimeout(this.show.bind(this,i),this.getDelay("show"))}},{key:"hide",value:function(i){this.props.isOpen&&(this.clearHideTimeout(),this.currentTargetElement=null,this.toggle(i))}},{key:"hideWithDelay",value:function(i){this._showTimeout&&this.clearShowTimeout(),this._hideTimeout=setTimeout(this.hide.bind(this,i),this.getDelay("hide"))}},{key:"clearShowTimeout",value:function(){clearTimeout(this._showTimeout),this._showTimeout=void 0}},{key:"clearHideTimeout",value:function(){clearTimeout(this._hideTimeout),this._hideTimeout=void 0}},{key:"addEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.addEventListener(i,o,a)})}},{key:"removeEventOnTargets",value:function(i,o,a){this._targets.forEach(function(s){s.removeEventListener(i,o,a)})}},{key:"addTargetEvents",value:function(){if(this.props.trigger){var i=this.props.trigger.split(" ");i.indexOf("manual")===-1&&((i.indexOf("click")>-1||i.indexOf("legacy")>-1)&&document.addEventListener("click",this.handleDocumentClick,!0),this._targets&&this._targets.length&&(i.indexOf("hover")>-1&&(this.addEventOnTargets("mouseover",this.showWithDelay,!0),this.addEventOnTargets("mouseout",this.hideWithDelay,!0)),i.indexOf("focus")>-1&&(this.addEventOnTargets("focusin",this.show,!0),this.addEventOnTargets("focusout",this.hide,!0)),this.addEventOnTargets("keydown",this.onEscKeyDown,!0)))}}},{key:"removeTargetEvents",value:function(){this._targets&&(this.removeEventOnTargets("mouseover",this.showWithDelay,!0),this.removeEventOnTargets("mouseout",this.hideWithDelay,!0),this.removeEventOnTargets("keydown",this.onEscKeyDown,!0),this.removeEventOnTargets("focusin",this.show,!0),this.removeEventOnTargets("focusout",this.hide,!0)),document.removeEventListener("click",this.handleDocumentClick,!0)}},{key:"updateTarget",value:function(){var i=Yd(this.props.target,!0);i!==this._targets&&(this.removeTargetEvents(),this._targets=i?Array.from(i):[],this.currentTargetElement=this.currentTargetElement||this._targets[0],this.addTargetEvents())}},{key:"toggle",value:function(i){return this.props.disabled||!this._isMounted?i&&i.preventDefault():this.props.toggle(i)}},{key:"render",value:function(){var i=this;this.props.isOpen&&this.updateTarget();var o=this.currentTargetElement||this._targets[0];if(!o)return null;var a=this.props,s=a.className,l=a.cssModule,c=a.innerClassName,f=a.isOpen,d=a.hideArrow,p=a.boundariesElement,v=a.placement,g=a.placementPrefix,y=a.arrowClassName,x=a.popperClassName,_=a.container,b=a.modifiers,w=a.strategy,S=a.offset,E=a.fade,C=a.flip,T=a.children,A=is(this.props,Object.keys(jE)),D=Be(x,l),N=Be(c,l);return V.createElement(Rte,{className:s,target:o,isOpen:f,hideArrow:d,boundariesElement:p,placement:v,placementPrefix:g,arrowClassName:y,popperClassName:D,container:_,modifiers:b,strategy:w,offset:S,cssModule:l,fade:E,flip:C},function(I){var F=I.update;return V.createElement("div",Ew({},A,{ref:i.getRef,className:N,role:"tooltip",onMouseOver:i.onMouseOverTooltipContent,onMouseLeave:i.onMouseLeaveTooltipContent,onKeyDown:i.onEscKeyDown}),typeof T=="function"?T({update:F}):T)})}}],[{key:"getDerivedStateFromProps",value:function(i,o){return i.isOpen&&!o.isOpen?{isOpen:i.isOpen}:null}}]),n}(V.Component);AE.propTypes=jE;AE.defaultProps=zte;const Vte=AE;var Wte=["children","className","barClassName","cssModule","value","min","max","animated","striped","color","bar","multi","tag","style","barStyle","barAriaValueText","barAriaLabelledBy"];function lg(){return lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qte(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Kte={animated:$.bool,bar:$.bool,barAriaLabelledBy:$.string,barAriaValueText:$.string,barClassName:$.string,barStyle:$.object,children:$.node,className:$.string,cssModule:$.object,color:$.string,max:$.oneOfType([$.string,$.number]),min:$.oneOfType([$.string,$.number]),multi:$.bool,striped:$.bool,style:$.object,tag:it,value:$.oneOfType([$.string,$.number])};function gD(e){var t=e.children,n=e.className,r=e.barClassName,i=e.cssModule,o=e.value,a=o===void 0?0:o,s=e.min,l=s===void 0?0:s,c=e.max,f=c===void 0?100:c,d=e.animated,p=e.striped,v=e.color,g=e.bar,y=e.multi,x=e.tag,_=x===void 0?"div":x,b=e.style,w=b===void 0?{}:b,S=e.barStyle,E=S===void 0?{}:S,C=e.barAriaValueText,T=e.barAriaLabelledBy,A=Gte(e,Wte),D=kA(a)/kA(f)*100,N=Be(He(n,"progress"),i),I=Be(He("progress-bar",g&&n||r,d?"progress-bar-animated":null,v?"bg-".concat(v):null,p||d?"progress-bar-striped":null),i),F={className:I,style:O1(O1(O1({},g?w:{}),E),{},{width:"".concat(D,"%")}),role:"progressbar","aria-valuenow":a,"aria-valuemin":l,"aria-valuemax":f,"aria-valuetext":C,"aria-labelledby":T,children:t};return g?V.createElement(_,lg({},A,F)):V.createElement(_,lg({},A,{style:w,className:N}),y?t:V.createElement("div",F))}gD.propTypes=Kte;function Pw(e){"@babel/helpers - typeof";return Pw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pw(e)}function Yte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ck(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cg(e){return cg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cg(e)}var nne={children:$.node.isRequired,node:$.any},yD=function(e){Xte(n,e);var t=Qte(n);function n(){return Yte(this,n),t.apply(this,arguments)}return Zte(n,[{key:"componentWillUnmount",value:function(){this.defaultNode&&document.body.removeChild(this.defaultNode),this.defaultNode=null}},{key:"render",value:function(){return mE?(!this.props.node&&!this.defaultNode&&(this.defaultNode=document.createElement("div"),document.body.appendChild(this.defaultNode)),Bs.createPortal(this.props.children,this.props.node||this.defaultNode)):null}}]),n}(V.Component);yD.propTypes=nne;const rne=yD;function jw(e){"@babel/helpers - typeof";return jw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jw(e)}function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zl(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ug(e){return ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ug(e)}function fg(){}var dk=$.shape(Yn.propTypes),bD={autoFocus:$.bool,backdrop:$.oneOfType([$.bool,$.oneOf(["static"])]),backdropClassName:$.string,backdropTransition:dk,centered:$.bool,children:$.node,contentClassName:$.string,className:$.string,container:Wc,cssModule:$.object,external:$.node,fade:$.bool,fullscreen:$.oneOfType([$.bool,$.oneOf(["sm","md","lg","xl"])]),innerRef:$.oneOfType([$.object,$.string,$.func]),isOpen:$.bool,keyboard:$.bool,labelledBy:$.string,modalClassName:$.string,modalTransition:dk,onClosed:$.func,onEnter:$.func,onExit:$.func,onOpened:$.func,returnFocusAfterClose:$.bool,role:$.string,scrollable:$.bool,size:$.string,toggle:$.func,trapFocus:$.bool,unmountOnClose:$.bool,wrapClassName:$.string,zIndex:$.oneOfType([$.number,$.string])},une=Object.keys(bD),fne={isOpen:!1,autoFocus:!0,centered:!1,scrollable:!1,role:"dialog",backdrop:!0,keyboard:!0,zIndex:1050,fade:!0,onOpened:fg,onClosed:fg,modalTransition:{timeout:Kv.Modal},backdropTransition:{mountOnEnter:!0,timeout:Kv.Fade},unmountOnClose:!0,returnFocusAfterClose:!0,container:"body",trapFocus:!1},ap=function(e){ane(n,e);var t=sne(n);function n(r){var i;return ine(this,n),i=t.call(this,r),i._element=null,i._originalBodyPadding=null,i.getFocusableChildren=i.getFocusableChildren.bind(Yr(i)),i.handleBackdropClick=i.handleBackdropClick.bind(Yr(i)),i.handleBackdropMouseDown=i.handleBackdropMouseDown.bind(Yr(i)),i.handleEscape=i.handleEscape.bind(Yr(i)),i.handleStaticBackdropAnimation=i.handleStaticBackdropAnimation.bind(Yr(i)),i.handleTab=i.handleTab.bind(Yr(i)),i.onOpened=i.onOpened.bind(Yr(i)),i.onClosed=i.onClosed.bind(Yr(i)),i.manageFocusAfterClose=i.manageFocusAfterClose.bind(Yr(i)),i.clearBackdropAnimationTimeout=i.clearBackdropAnimationTimeout.bind(Yr(i)),i.trapFocus=i.trapFocus.bind(Yr(i)),i.state={isOpen:!1,showStaticBackdropAnimation:!1},i}return one(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isOpen,a=i.autoFocus,s=i.onEnter;o&&(this.init(),this.setState({isOpen:!0}),a&&this.setFocus()),s&&s(),document.addEventListener("focus",this.trapFocus,!0),this._isMounted=!0}},{key:"componentDidUpdate",value:function(i,o){if(this.props.isOpen&&!i.isOpen){this.init(),this.setState({isOpen:!0});return}this.props.autoFocus&&this.state.isOpen&&!o.isOpen&&this.setFocus(),this._element&&i.zIndex!==this.props.zIndex&&(this._element.style.zIndex=this.props.zIndex)}},{key:"componentWillUnmount",value:function(){this.clearBackdropAnimationTimeout(),this.props.onExit&&this.props.onExit(),this._element&&(this.destroy(),(this.props.isOpen||this.state.isOpen)&&this.close()),document.removeEventListener("focus",this.trapFocus,!0),this._isMounted=!1}},{key:"handleBackdropClick",value:function(i){if(i.target===this._mouseDownElement){i.stopPropagation();var o=this._dialog?this._dialog.parentNode:null;if(o&&i.target===o&&this.props.backdrop==="static"&&this.handleStaticBackdropAnimation(),!this.props.isOpen||this.props.backdrop!==!0)return;o&&i.target===o&&this.props.toggle&&this.props.toggle(i)}}},{key:"handleTab",value:function(i){if(i.which===9&&!(this.modalIndex0&&(i.preventDefault(),i.stopPropagation(),o[0].focus())}}},{key:"init",value:function(){try{this._triggeringElement=document.activeElement}catch{this._triggeringElement=null}this._element||(this._element=document.createElement("div"),this._element.setAttribute("tabindex","-1"),this._element.style.position="relative",this._element.style.zIndex=this.props.zIndex,this._mountContainer=Yd(this.props.container),this._mountContainer.appendChild(this._element)),this._originalBodyPadding=rX(),n.openCount<1&&(n.originalBodyOverflow=window.getComputedStyle(document.body).overflow),iX(),n.openCount===0&&(document.body.className=He(document.body.className,Be("modal-open",this.props.cssModule)),document.body.style.overflow="hidden"),this.modalIndex=n.openCount,n.openCount+=1}},{key:"destroy",value:function(){this._element&&(this._mountContainer.removeChild(this._element),this._element=null),this.manageFocusAfterClose()}},{key:"manageFocusAfterClose",value:function(){if(this._triggeringElement){var i=this.props.returnFocusAfterClose;this._triggeringElement.focus&&i&&this._triggeringElement.focus(),this._triggeringElement=null}}},{key:"close",value:function(){if(n.openCount<=1){var i=Be("modal-open",this.props.cssModule),o=new RegExp("(^| )".concat(i,"( |$)"));document.body.className=document.body.className.replace(o," ").trim(),document.body.style.overflow=n.originalBodyOverflow}this.manageFocusAfterClose(),n.openCount=Math.max(0,n.openCount-1),$I(this._originalBodyPadding)}},{key:"clearBackdropAnimationTimeout",value:function(){this._backdropAnimationTimeout&&(clearTimeout(this._backdropAnimationTimeout),this._backdropAnimationTimeout=void 0)}},{key:"renderModalDialog",value:function(){var i,o=this,a=is(this.props,une),s="modal-dialog";return V.createElement("div",hd({},a,{className:Be(He(s,this.props.className,(i={},Ql(i,"modal-".concat(this.props.size),this.props.size),Ql(i,"".concat(s,"-centered"),this.props.centered),Ql(i,"".concat(s,"-scrollable"),this.props.scrollable),Ql(i,"modal-fullscreen",this.props.fullscreen===!0),Ql(i,"modal-fullscreen-".concat(this.props.fullscreen,"-down"),typeof this.props.fullscreen=="string"),i)),this.props.cssModule),role:"document",ref:function(c){o._dialog=c}}),V.createElement("div",{className:Be(He("modal-content",this.props.contentClassName),this.props.cssModule)},this.props.children))}},{key:"render",value:function(){var i=this.props.unmountOnClose;if(this._element&&(this.state.isOpen||!i)){var o=!!this._element&&!this.state.isOpen&&!i;this._element.style.display=o?"none":"block";var a=this.props,s=a.wrapClassName,l=a.modalClassName,c=a.backdropClassName,f=a.cssModule,d=a.isOpen,p=a.backdrop,v=a.role,g=a.labelledBy,y=a.external,x=a.innerRef,_={onClick:this.handleBackdropClick,onMouseDown:this.handleBackdropMouseDown,onKeyUp:this.handleEscape,onKeyDown:this.handleTab,style:{display:"block"},"aria-labelledby":g,"aria-modal":!0,role:v,tabIndex:"-1"},b=this.props.fade,w=zl(zl(zl({},Yn.defaultProps),this.props.modalTransition),{},{baseClass:b?this.props.modalTransition.baseClass:"",timeout:b?this.props.modalTransition.timeout:0}),S=zl(zl(zl({},Yn.defaultProps),this.props.backdropTransition),{},{baseClass:b?this.props.backdropTransition.baseClass:"",timeout:b?this.props.backdropTransition.timeout:0}),E=p&&(b?V.createElement(Yn,hd({},S,{in:d&&!!p,cssModule:f,className:Be(He("modal-backdrop",c),f)})):V.createElement("div",{className:Be(He("modal-backdrop","show",c),f)}));return V.createElement(rne,{node:this._element},V.createElement("div",{className:Be(s)},V.createElement(Yn,hd({},_,w,{in:d,onEntered:this.onOpened,onExited:this.onClosed,cssModule:f,className:Be(He("modal",l,this.state.showStaticBackdropAnimation&&"modal-static"),f),innerRef:x}),y,this.renderModalDialog()),E))}return null}}]),n}(V.Component);ap.propTypes=bD;ap.defaultProps=fne;ap.openCount=0;ap.originalBodyOverflow=null;const go=ap;var dne=["className","cssModule","children","toggle","tag","wrapTag","closeAriaLabel","close"];function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var mne={children:$.node,className:$.string,close:$.object,closeAriaLabel:$.string,cssModule:$.object,tag:it,toggle:$.func,wrapTag:it};function yo(e){var t,n=e.className,r=e.cssModule,i=e.children,o=e.toggle,a=e.tag,s=a===void 0?"h5":a,l=e.wrapTag,c=l===void 0?"div":l,f=e.closeAriaLabel,d=f===void 0?"Close":f,p=e.close,v=hne(e,dne),g=Be(He(n,"modal-header"),r);return!p&&o&&(t=V.createElement("button",{type:"button",onClick:o,className:Be("btn-close",r),"aria-label":d})),V.createElement(c,kw({},v,{className:g}),V.createElement(s,{className:Be("modal-title",r)},i),p||t)}yo.propTypes=mne;var vne=["className","cssModule","tag"];function Nw(){return Nw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var bne={className:$.string,cssModule:$.object,tag:it};function $i(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=gne(e,vne),a=Be(He(t,"modal-body"),n);return V.createElement(i,Nw({},o,{className:a}))}$i.propTypes=bne;var _ne=["className","cssModule","tag"];function Mw(){return Mw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var One={className:$.string,cssModule:$.object,tag:it};function as(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r,o=xne(e,_ne),a=Be(He(t,"modal-footer"),n);return V.createElement(i,Mw({},o,{className:a}))}as.propTypes=One;function Lw(){return Lw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Tne={className:$.string,cssModule:$.object,flush:$.bool,horizontal:$.oneOfType([$.bool,$.string]),numbered:$.bool,tag:it},jne=function(t){return t===!1?!1:t===!0||t==="xs"?"list-group-horizontal":"list-group-horizontal-".concat(t)};function _D(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"ul":r,o=e.flush,a=e.horizontal,s=a===void 0?!1:a,l=e.numbered,c=l===void 0?!1:l,f=Cne(e,Ene),d=Be(He(t,"list-group",o?"list-group-flush":jne(s),{"list-group-numbered":c}),n);return V.createElement(i,Rw({},f,{className:d}))}_D.propTypes=Tne;var Ane=["className","cssModule","row","disabled","check","inline","floating","noMargin","tag","switch"];function $w(){return $w=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Mne={children:$.node,row:$.bool,check:$.bool,switch:$.bool,inline:$.bool,floating:$.bool,noMargin:$.bool,disabled:$.bool,tag:it,className:$.string,cssModule:$.object};function eo(e){var t=e.className,n=e.cssModule,r=e.row,i=e.disabled,o=e.check,a=e.inline,s=e.floating,l=e.noMargin,c=e.tag,f=c===void 0?"div":c,d=e.switch,p=kne(e,Ane),v=o||d,g=Be(He(t,r?"row":!1,v?"form-check":!1,d?"form-switch":!1,v||l?!1:"mb-3",v&&a?"form-check-inline":!1,v&&i?"disabled":!1,s&&"form-floating"),n);return f==="fieldset"&&(p.disabled=i),V.createElement(f,$w({},p,{className:g}))}eo.propTypes=Mne;function Iw(e){"@babel/helpers - typeof";return Iw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Iw(e)}var Lne=["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"];function Dw(){return Dw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $ne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Ine(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hk(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function dg(e){return dg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dg(e)}var Vne={children:$.node,type:$.string,size:$.oneOfType([$.number,$.string]),bsSize:$.string,valid:$.bool,invalid:$.bool,tag:it,innerRef:$.oneOfType([$.object,$.func,$.string]),plaintext:$.bool,addon:$.bool,className:$.string,cssModule:$.object},xD=function(e){Fne(n,e);var t=Bne(n);function n(r){var i;return Ine(this,n),i=t.call(this,r),i.getRef=i.getRef.bind(Bw(i)),i.focus=i.focus.bind(Bw(i)),i}return Dne(n,[{key:"getRef",value:function(i){this.props.innerRef&&this.props.innerRef(i),this.ref=i}},{key:"focus",value:function(){this.ref&&this.ref.focus()}},{key:"render",value:function(){var i=this.props,o=i.className,a=i.cssModule,s=i.type,l=s===void 0?"text":s,c=i.bsSize,f=i.valid,d=i.invalid,p=i.tag,v=i.addon,g=i.plaintext,y=i.innerRef,x=Rne(i,Lne),_=["switch","radio","checkbox"].indexOf(l)>-1,b=/\D/g,w=l==="textarea",S=l==="select",E=l==="range",C=p||(S||w?l:"input"),T="form-control";g?(T="".concat(T,"-plaintext"),C=p||"input"):E?T="form-range":S?T="form-select":_&&(v?T=null:T="form-check-input"),x.size&&b.test(x.size)&&($x(`Please use the prop "bsSize" instead of the "size" to bootstrap's input sizing.`),c=x.size,delete x.size);var A=Be(He(o,d&&"is-invalid",f&&"is-valid",c?S?"form-select-".concat(c):"form-control-".concat(c):!1,T),a);return(C==="input"||p&&typeof p=="function")&&(x.type=l==="switch"?"checkbox":l),x.children&&!(g||l==="select"||typeof C!="string"||C==="select")&&($x('Input with a type of "'.concat(l,'" cannot have children. Please use "value"/"defaultValue" instead.')),delete x.children),V.createElement(C,Dw({},x,{ref:y,className:A,"aria-invalid":d}))}}]),n}(V.Component);xD.propTypes=Vne;const Fn=xD;var Wne=["className","cssModule","tag","type","size"];function hg(){return hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var qne={className:$.string,cssModule:$.object,size:$.string,tag:it,type:$.string};function s0(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"div":r;e.type;var o=e.size,a=Hne(e,Wne),s=Be(He(t,"input-group",o?"input-group-".concat(o):null),n);return e.type==="dropdown"?V.createElement(op,hg({},a,{className:s})):V.createElement(sD.Provider,{value:{insideInputGroup:!0}},V.createElement(i,hg({},a,{className:s})))}s0.propTypes=qne;var Kne=["className","listClassName","cssModule","size","tag","listTag","aria-label"];function Uw(){return Uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Qne={children:$.node,className:$.string,listClassName:$.string,cssModule:$.object,size:$.string,tag:it,listTag:it,"aria-label":$.string};function kE(e){var t=e.className,n=e.listClassName,r=e.cssModule,i=e.size,o=e.tag,a=o===void 0?"nav":o,s=e.listTag,l=s===void 0?"ul":s,c=e["aria-label"],f=c===void 0?"pagination":c,d=Zne(e,Kne),p=Be(He(t),r),v=Be(He(n,"pagination",Yne({},"pagination-".concat(i),!!i)),r);return V.createElement(a,{className:p,"aria-label":f},V.createElement(l,Uw({},d,{className:v})))}kE.propTypes=Qne;var Jne=["active","className","cssModule","disabled","tag"];function zw(){return zw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var nre={active:$.bool,children:$.node,className:$.string,cssModule:$.object,disabled:$.bool,tag:it};function Xs(e){var t=e.active,n=e.className,r=e.cssModule,i=e.disabled,o=e.tag,a=o===void 0?"li":o,s=ere(e,Jne),l=Be(He(n,"page-item",{active:t,disabled:i}),r);return V.createElement(a,zw({},s,{className:l}))}Xs.propTypes=nre;var rre=["className","cssModule","next","previous","first","last","tag"];function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ore(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var are={"aria-label":$.string,children:$.node,className:$.string,cssModule:$.object,next:$.bool,previous:$.bool,first:$.bool,last:$.bool,tag:it};function Qs(e){var t=e.className,n=e.cssModule,r=e.next,i=e.previous,o=e.first,a=e.last,s=e.tag,l=s===void 0?"a":s,c=ire(e,rre),f=Be(He(t,"page-link"),n),d;i?d="Previous":r?d="Next":o?d="First":a&&(d="Last");var p=e["aria-label"]||d,v;i?v="‹":r?v="›":o?v="«":a&&(v="»");var g=e.children;return g&&Array.isArray(g)&&g.length===0&&(g=null),!c.href&&l==="a"&&(l="button"),(i||r||o||a)&&(g=[V.createElement("span",{"aria-hidden":"true",key:"caret"},g||v),V.createElement("span",{className:"visually-hidden",key:"ariaLabel"},p)]),V.createElement(l,Vw({},c,{className:f,"aria-label":p}),g)}Qs.propTypes=are;var sre=["className","closeClassName","closeAriaLabel","cssModule","tag","color","isOpen","toggle","children","transition","fade","innerRef"];function Ww(){return Ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ure(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var fre={children:$.node,className:$.string,closeClassName:$.string,closeAriaLabel:$.string,color:$.string,cssModule:$.object,fade:$.bool,innerRef:$.oneOfType([$.object,$.string,$.func]),isOpen:$.bool,tag:it,toggle:$.func,transition:$.shape(Yn.propTypes)};function wD(e){var t=e.className,n=e.closeClassName,r=e.closeAriaLabel,i=r===void 0?"Close":r,o=e.cssModule,a=e.tag,s=a===void 0?"div":a,l=e.color,c=l===void 0?"success":l,f=e.isOpen,d=f===void 0?!0:f,p=e.toggle,v=e.children,g=e.transition,y=g===void 0?Sf(Sf({},Yn.defaultProps),{},{unmountOnExit:!0}):g,x=e.fade,_=x===void 0?!0:x,b=e.innerRef,w=cre(e,sre),S=Be(He(t,"alert","alert-".concat(c),{"alert-dismissible":p}),o),E=Be(He("btn-close",n),o),C=Sf(Sf(Sf({},Yn.defaultProps),y),{},{baseClass:_?y.baseClass:"",timeout:_?y.timeout:0});return V.createElement(Yn,Ww({},w,C,{tag:s,className:S,in:d,role:"alert",innerRef:b}),p?V.createElement("button",{type:"button",className:E,"aria-label":i,onClick:p}):null,v)}wD.propTypes=fre;var dre=["className","cssModule","tag","active","disabled","action","color"];function Hw(){return Hw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pre(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var mre={action:$.bool,active:$.bool,className:$.string,cssModule:$.object,color:$.string,disabled:$.bool,tag:it},vre=function(t){t.preventDefault()};function OD(e){var t=e.className,n=e.cssModule,r=e.tag,i=r===void 0?"li":r,o=e.active,a=e.disabled,s=e.action,l=e.color,c=hre(e,dre),f=Be(He(t,o?"active":!1,a?"disabled":!1,s?"list-group-item-action":!1,l?"list-group-item-".concat(l):!1,"list-group-item"),n);return a&&(c.onClick=vre),V.createElement(i,Hw({},c,{className:f}))}OD.propTypes=mre;function Gw(e){"@babel/helpers - typeof";return Gw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gw(e)}function mk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gre(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pg(e){return pg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pg(e)}var Ere=["defaultOpen"],lp=function(e){xre(n,e);var t=wre(n);function n(r){var i;return bre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(SD(i)),i}return _re(n,[{key:"toggle",value:function(i){var o=this;this.setState(function(a){return{isOpen:!a.isOpen}},function(){o.props.onToggle&&o.props.onToggle(i,o.state.isOpen)})}},{key:"render",value:function(){return V.createElement(op,qw({isOpen:this.state.isOpen,toggle:this.toggle},is(this.props,Ere)))}}]),n}(R.Component);lp.propTypes=gre({defaultOpen:$.bool,onToggle:$.func},op.propTypes);function Yw(e){"@babel/helpers - typeof";return Yw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yw(e)}function gk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Cre(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function mg(e){return mg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mg(e)}var Lre=["defaultOpen"],br=function(e){Are(n,e);var t=kre(n);function n(r){var i;return Tre(this,n),i=t.call(this,r),i.state={isOpen:r.defaultOpen||!1},i.toggle=i.toggle.bind(ED(i)),i}return jre(n,[{key:"toggle",value:function(){this.setState(function(i){return{isOpen:!i.isOpen}})}},{key:"render",value:function(){return V.createElement(sp,Zw({isOpen:this.state.isOpen,toggle:this.toggle},is(this.props,Lre)))}}]),n}(R.Component);br.propTypes=Cre({defaultOpen:$.bool},sp.propTypes);var jn=[];for(var S1=0;S1<256;++S1)jn.push((S1+256).toString(16).slice(1));function Rre(e,t=0){return(jn[e[t+0]]+jn[e[t+1]]+jn[e[t+2]]+jn[e[t+3]]+"-"+jn[e[t+4]]+jn[e[t+5]]+"-"+jn[e[t+6]]+jn[e[t+7]]+"-"+jn[e[t+8]]+jn[e[t+9]]+"-"+jn[e[t+10]]+jn[e[t+11]]+jn[e[t+12]]+jn[e[t+13]]+jn[e[t+14]]+jn[e[t+15]]).toLowerCase()}var gm,$re=new Uint8Array(16);function Ire(){if(!gm&&(gm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!gm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gm($re)}var Dre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const bk={randomUUID:Dre};function NE(e,t,n){if(bk.randomUUID&&!t&&!e)return bk.randomUUID();e=e||{};var r=e.random||(e.rng||Ire)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Rre(r)}const Fre=e=>({error:"border-danger",default:""})[e],Bre=e=>({error:"text-danger",default:"text-muted"})[e],Ho=({className:e,children:t,loading:n=!1,type:r="default",fullWidth:i=!1})=>{const o=Ce({"col-md-12":i,"col-md-10 offset-md-1":!i});return m.jsx(Kn,{className:Ce("g-0",e),children:m.jsx("div",{className:o,children:m.jsx(vr,{className:Fre(r),body:!0,children:m.jsxs("h3",{className:Ce("text-center mb-0",Bre(r)),children:[n&&m.jsx(je,{icon:G6,spin:!0}),n&&m.jsx("span",{className:"ms-2",children:t??"Loading..."}),!n&&t]})})})})},xt=({title:e,children:t,bodyClassName:n,...r})=>m.jsxs(vr,{...r,children:[e&&m.jsx(Xc,{role:"heading","aria-level":4,children:e}),m.jsx(Zc,{className:n,children:t})]}),er=({children:e,type:t,className:n,small:r=!1})=>m.jsx(Kn,{className:n,children:m.jsx("div",{className:Ce({"col-md-10 offset-md-1":!r,"col-12":r}),children:m.jsx(xt,{role:"document",className:Ce("text-center",{"bg-main":t==="success","bg-danger":t==="error","bg-warning":t==="warning","text-white":t!=="warning"}),bodyClassName:Ce({"p-2":r}),children:e})})}),CD=e=>{const t=new URLSearchParams(e),n={};return t.forEach((r,i)=>{if(i.endsWith("[]")){const o=i.slice(0,-2);n[o]??(n[o]=[]),n[o].push(r)}else n[i]=r}),n},Ure=e=>{const t=new URLSearchParams;for(const[n,r]of Object.entries(e))r!==void 0&&(Array.isArray(r)?r.forEach(i=>t.append(`${n}[]`,`${i}`)):t.append(n,`${r}`));return t.toString()},zre=CD,l0=Ure,qt=(e=!1)=>{const[t,n]=R.useState(e),r=R.useCallback(()=>n(a=>!a),[]),i=R.useCallback(()=>n(!0),[]),o=R.useCallback(()=>n(!1),[]);return[t,r,i,o]},PD=(e=!1,t=2e3,n=window.setTimeout,r=window.clearTimeout)=>{const[i,o]=R.useState(e),a=R.useRef(e),s=R.useRef(),l=R.useCallback(()=>{o(!a.current),s.current&&r(s.current),s.current=n(()=>o(a.current),t)},[r,t,n]);return[i,l]},ME=()=>{const{current:e}=R.useRef(`dom-${NE()}`);return e},ea=()=>R.useRef(null),Au=()=>{const{search:e}=gr();return R.useMemo(()=>CD(e),[e])},TD=({checked:e=!1,onChange:t,className:n,children:r,type:i,inline:o=!1})=>{const a=ME(),s=f=>t==null?void 0:t(f.target.checked,f),l={"form-switch":i==="switch","form-checkbox":i==="checkbox"},c=o?{display:"inline-block"}:{};return m.jsxs("span",{className:Ce("form-check",l,n),style:c,children:[m.jsx("input",{type:"checkbox",className:"form-check-input",id:a,checked:e,onChange:s}),m.jsx("label",{className:"form-check-label",htmlFor:a,children:r})]})},jD=e=>m.jsx(TD,{type:"checkbox",...e}),ul=e=>m.jsx(TD,{type:"switch",...e}),ku=({children:e,label:t,className:n="",labelClassName:r="",noMargin:i=!1,id:o})=>m.jsxs("div",{className:`${n} ${i?"":"mb-3"}`,children:[m.jsx("label",{className:`form-label ${r}`,htmlFor:o,children:t}),e]}),sv=({children:e,value:t,onChange:n,type:r,required:i,placeholder:o,className:a,labelClassName:s})=>{const l=ME();return m.jsx(ku,{label:m.jsxs(m.Fragment,{children:[e,":"]}),className:a,labelClassName:s,id:l,children:m.jsx("input",{id:l,className:"form-control",type:r??"text",value:t,required:i??!0,placeholder:o,onChange:c=>n(c.target.value)})})},Vre=500;let lv;const _k=()=>{lv&&clearTimeout(lv),lv=null},cp=({onChange:e,className:t,large:n=!0,noBorder:r=!1,initialValue:i="",setTimeout_:o=setTimeout})=>{const[a,s]=R.useState(i),l=(c,f=Vre)=>{s(c),_k(),lv=o(()=>{e(c),_k()},f)};return m.jsxs("div",{className:Ce("search-field",t),children:[m.jsx("input",{type:"text",className:Ce("form-control search-field__input",{"form-control-lg":n,"search-field__input--no-border":r}),placeholder:"Search...",value:a,onChange:c=>l(c.target.value)}),m.jsx(je,{icon:LK,className:"search-field__icon"}),m.jsx("button",{"aria-label":"Clear search",type:"button",className:"close search-field__close btn-close",hidden:a==="",id:"search-field__close",onClick:()=>l("",0)})]})},ta=({text:e,disabled:t=!1,className:n,children:r,dropdownClassName:i,noCaret:o,end:a=!1,minWidth:s,inline:l,size:c,...f})=>{const[d,p]=qt(),v=Ce("dropdown-btn__toggle",n,{"btn-block":!l,"dropdown-btn__toggle--with-caret":!o}),g={minWidth:s&&`${s}px`};return m.jsxs(op,{isOpen:d,toggle:p,disabled:t,className:i,children:[m.jsx(ju,{size:c,caret:!o,className:v,color:"primary",...f,children:e}),m.jsx(Tu,{className:"w-100",end:a,style:g,children:r})]})},c0=({children:e,minWidth:t,label:n="Options"})=>m.jsx(ta,{text:m.jsx(je,{className:"px-1",icon:SK}),"aria-label":n,size:"sm",minWidth:t,end:!0,noCaret:!0,inline:!0,children:e}),pd=({children:e,...t})=>m.jsx(gE,{children:m.jsx(HI,{className:"nav-pills__nav-link",tag:k6,...t,children:e})}),AD=({children:e,fill:t=!1,className:n=""})=>m.jsx(vr,{className:`nav-pills__nav p-0 overflow-hidden ${n}`,body:!0,children:m.jsx(vE,{pills:!0,fill:t,children:R.Children.map(e,r=>{if(!R.isValidElement(r)||r.type!==pd)throw new Error("Only NavPillItem children are allowed inside NavPills.");return r})})}),u0=(e,t,n)=>e!==t?"ASC":n?{ASC:"DESC",DESC:void 0}[n]:"ASC",kD=(e,{field:t,dir:n})=>!t||!n?e:e.sort((r,i)=>{const o=n==="ASC"?1:-1,a=n==="ASC"?-1:1;return r[t]>i[t]?o:a}),Wre=e=>e.dir?`${e.field}-${e.dir}`:void 0,Hre=e=>{const[t,n]=e.split("-");return{field:t,dir:n}};function up({items:e,order:t,onChange:n,isButton:r=!0,right:i=!1,prefixed:o=!0}){const a=s=>()=>{const l=u0(s,t.field,t.dir);n(l?s:void 0,l)};return m.jsxs(lp,{children:[m.jsxs(ju,{caret:!0,color:r?"primary":"link",className:Ce({"dropdown-btn__toggle btn-block pe-4 overflow-hidden":r,"btn-sm p-0":!r}),children:[!r&&m.jsx(m.Fragment,{children:"Order by"}),r&&!t.field&&m.jsx("i",{children:"Order by..."}),r&&t.field&&m.jsxs(m.Fragment,{children:[o&&"Order by: ",e[t.field]," - ",m.jsx("small",{children:t.dir??"DESC"})]})]}),m.jsxs(Tu,{end:i,className:Ce("w-100",{"ordering-dropdown__menu--link":!r}),children:[Object.entries(e).map(([s,l])=>m.jsxs(Ne,{active:t.field===s,onClick:a(s),children:[l,t.field===s&&m.jsx(je,{icon:t.dir==="ASC"?TK:dK,className:"ordering-dropdown__sort-icon"})]},s)),m.jsx(Ne,{divider:!0}),m.jsx(Ne,{disabled:!t.field,onClick:()=>n(),children:m.jsx("i",{children:"Clear selection"})})]})]})}const th="#4696e5",Gre="rgba(70, 150, 229, 0.4)",Qw="#f77f28",qre="rgba(247, 127, 40, 0.4)",Kre="white",Yre="#161b22",Zre=e=>{var t;return(t=document.querySelector("html"))==null?void 0:t.setAttribute("data-theme",e)},LE=()=>{var e;return((e=document.querySelector("html"))==null?void 0:e.getAttribute("data-theme"))==="dark"},RE=(e=window.matchMedia.bind(window))=>e("(prefers-color-scheme: dark)").matches?"dark":"light",Xre=R.forwardRef(({isOpen:e,toggle:t,forceUpdate:n},r)=>{const[i,,o]=qt(),a=R.useCallback(()=>{o(),n()},[n,o]);return m.jsxs(wD,{className:"app-update-banner",isOpen:e,toggle:t,tag:xt,color:"secondary",innerRef:r,children:[m.jsx("h4",{className:"mb-4",children:"This app has just been updated!"}),m.jsxs("p",{className:"mb-0",children:["Restart it to enjoy the new features.",m.jsxs(Ke,{role:"button",disabled:i,className:"ms-2",color:"secondary",size:"sm",onClick:a,children:[!i&&m.jsxs(m.Fragment,{children:["Restart now ",m.jsx(je,{icon:BK,className:"ms-1"})]}),i&&m.jsx(m.Fragment,{children:"Restarting..."})]})]})]})}),ND=({to:e="/",children:t="Home"})=>m.jsx("div",{className:"home",children:m.jsxs(xt,{className:"p-4",children:[m.jsx("h2",{children:"Oops! We could not find requested route."}),m.jsx("p",{children:"Use your browser's back button to navigate to the page you have previously come from, or just press this button."}),m.jsx("br",{}),m.jsx(St,{to:e,className:"btn btn-outline-primary btn-lg",children:t})]})});function Ii(e){return R.useRef(e).current}function Di(e,t){return(n,r=globalThis.console)=>(t.forEach(i=>{const o=n[i];e[i]=o}),e)}const Qre=async()=>{var t;(await((t=navigator.serviceWorker)==null?void 0:t.getRegistrations())??[]).forEach(({waiting:n})=>{n==null||n.addEventListener("statechange",r=>{var i;((i=r.target)==null?void 0:i.state)==="activated"&&window.location.reload()}),n==null||n.postMessage({type:"SKIP_WAITING"})})},MD=({fetchServers:e,servers:t,settings:n,appUpdated:r,resetAppUpdate:i})=>{var x;const{MainHeader:o,Home:a,ShlinkWebComponentContainer:s,CreateServer:l,EditServer:c,Settings:f,ManageServers:d,ShlinkVersionsContainer:p}=Ii(MD),v=gr(),g=R.useRef(t),y=v.pathname==="/";return R.useEffect(()=>{Object.keys(g.current).length===0&&e()},[e]),R.useEffect(()=>{var _;Zre(((_=n.ui)==null?void 0:_.theme)??RE())},[(x=n.ui)==null?void 0:x.theme]),m.jsxs("div",{className:"container-fluid app-container",children:[m.jsx(o,{}),m.jsxs("div",{className:"app",children:[m.jsx("div",{className:Ce("shlink-wrapper",{"d-flex d-md-block align-items-center":y}),children:m.jsxs(Xy,{children:[m.jsx(ot,{index:!0,element:m.jsx(a,{})}),m.jsx(ot,{path:"/settings/*",element:m.jsx(f,{})}),m.jsx(ot,{path:"/manage-servers",element:m.jsx(d,{})}),m.jsx(ot,{path:"/server/create",element:m.jsx(l,{})}),m.jsx(ot,{path:"/server/:serverId/edit",element:m.jsx(c,{})}),m.jsx(ot,{path:"/server/:serverId/*",element:m.jsx(s,{})}),m.jsx(ot,{path:"*",element:m.jsx(ND,{})})]})}),m.jsx("div",{className:"shlink-footer",children:m.jsx(p,{})})]}),m.jsx(Xre,{isOpen:r,toggle:i,forceUpdate:Qre})]})},Jre=Di(MD,["MainHeader","Home","ShlinkWebComponentContainer","CreateServer","EditServer","Settings","ManageServers","ShlinkVersionsContainer"]);function An(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var eie=typeof Symbol=="function"&&Symbol.observable||"@@observable",xk=eie,E1=()=>Math.random().toString(36).substring(7).split("").join("."),tie={INIT:`@@redux/INIT${E1()}`,REPLACE:`@@redux/REPLACE${E1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${E1()}`},vg=tie;function $E(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function LD(e,t,n){if(typeof e!="function")throw new Error(An(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(An(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(An(1));return n(LD)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,l=!1;function c(){a===o&&(a=new Map,o.forEach((x,_)=>{a.set(_,x)}))}function f(){if(l)throw new Error(An(3));return i}function d(x){if(typeof x!="function")throw new Error(An(4));if(l)throw new Error(An(5));let _=!0;c();const b=s++;return a.set(b,x),function(){if(_){if(l)throw new Error(An(6));_=!1,c(),a.delete(b),o=null}}}function p(x){if(!$E(x))throw new Error(An(7));if(typeof x.type>"u")throw new Error(An(8));if(typeof x.type!="string")throw new Error(An(17));if(l)throw new Error(An(9));try{l=!0,i=r(i,x)}finally{l=!1}return(o=a).forEach(b=>{b()}),x}function v(x){if(typeof x!="function")throw new Error(An(10));r=x,p({type:vg.REPLACE})}function g(){const x=d;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(An(11));function b(){const S=_;S.next&&S.next(f())}return b(),{unsubscribe:x(b)}},[xk](){return this}}}return p({type:vg.INIT}),{dispatch:p,subscribe:d,getState:f,replaceReducer:v,[xk]:g}}function nie(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:vg.INIT})>"u")throw new Error(An(12));if(typeof n(void 0,{type:vg.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(An(13))})}function IE(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(An(14));c[d]=g,l=l||g!==v}return l=l||r.length!==Object.keys(a).length,l?c:a}}function gg(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function rie(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(An(15))};const a={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},s=e.map(l=>l(a));return o=gg(...s)(i.dispatch),{...i,dispatch:o}}}function iie(e){return $E(e)&&"type"in e&&typeof e.type=="string"}var RD=Symbol.for("immer-nothing"),wk=Symbol.for("immer-draftable"),$r=Symbol.for("immer-state");function Ci(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qc=Object.getPrototypeOf;function Ka(e){return!!e&&!!e[$r]}function Go(e){var t;return e?$D(e)||Array.isArray(e)||!!e[wk]||!!((t=e.constructor)!=null&&t[wk])||d0(e)||h0(e):!1}var oie=Object.prototype.constructor.toString();function $D(e){if(!e||typeof e!="object")return!1;const t=Qc(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===oie}function nh(e,t){f0(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function f0(e){const t=e[$r];return t?t.type_:Array.isArray(e)?1:d0(e)?2:h0(e)?3:0}function Jw(e,t){return f0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ID(e,t,n){const r=f0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function aie(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function d0(e){return e instanceof Map}function h0(e){return e instanceof Set}function Ts(e){return e.copy_||e.base_}function e2(e,t){if(d0(e))return new Map(e);if(h0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&$D(e))return Qc(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[$r];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=sie),Object.freeze(e),t&&nh(e,(n,r)=>DE(r,!0))),e}function sie(){Ci(2)}function p0(e){return Object.isFrozen(e)}var lie={};function fl(e){const t=lie[e];return t||Ci(0,e),t}var rh;function DD(){return rh}function cie(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ok(e,t){t&&(fl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function t2(e){n2(e),e.drafts_.forEach(uie),e.drafts_=null}function n2(e){e===rh&&(rh=e.parent_)}function Sk(e){return rh=cie(rh,e)}function uie(e){const t=e[$r];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ek(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[$r].modified_&&(t2(t),Ci(4)),Go(e)&&(e=yg(t,e),t.parent_||bg(t,e)),t.patches_&&fl("Patches").generateReplacementPatches_(n[$r].base_,e,t.patches_,t.inversePatches_)):e=yg(t,n,[]),t2(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==RD?e:void 0}function yg(e,t,n){if(p0(t))return t;const r=t[$r];if(!r)return nh(t,(i,o)=>Ck(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return bg(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),nh(o,(s,l)=>Ck(e,r,i,s,l,n,a)),bg(e,i,!1),n&&e.patches_&&fl("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ck(e,t,n,r,i,o,a){if(Ka(i)){const s=o&&t&&t.type_!==3&&!Jw(t.assigned_,r)?o.concat(r):void 0,l=yg(e,i,s);if(ID(n,r,l),Ka(l))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(Go(i)&&!p0(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;yg(e,i),(!t||!t.scope_.parent_)&&bg(e,i)}}function bg(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&DE(t,n)}function fie(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:DD(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=FE;n&&(i=[r],o=ih);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var FE={get(e,t){if(t===$r)return e;const n=Ts(e);if(!Jw(n,t))return die(e,n,t);const r=n[t];return e.finalized_||!Go(r)?r:r===C1(e.base_,t)?(P1(e),e.copy_[t]=i2(r,e)):r},has(e,t){return t in Ts(e)},ownKeys(e){return Reflect.ownKeys(Ts(e))},set(e,t,n){const r=FD(Ts(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=C1(Ts(e),t),o=i==null?void 0:i[$r];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(aie(n,i)&&(n!==void 0||Jw(e.base_,t)))return!0;P1(e),r2(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return C1(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,P1(e),r2(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Ts(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ci(11)},getPrototypeOf(e){return Qc(e.base_)},setPrototypeOf(){Ci(12)}},ih={};nh(FE,(e,t)=>{ih[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ih.deleteProperty=function(e,t){return ih.set.call(this,e,t,void 0)};ih.set=function(e,t,n){return FE.set.call(this,e[0],t,n,e[0])};function C1(e,t){const n=e[$r];return(n?Ts(n):e)[t]}function die(e,t,n){var i;const r=FD(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function FD(e,t){if(!(t in e))return;let n=Qc(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Qc(n)}}function r2(e){e.modified_||(e.modified_=!0,e.parent_&&r2(e.parent_))}function P1(e){e.copy_||(e.copy_=e2(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hie=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(l=o,...c){return a.produce(l,f=>n.call(this,f,...c))}}typeof n!="function"&&Ci(6),r!==void 0&&typeof r!="function"&&Ci(7);let i;if(Go(t)){const o=Sk(this),a=i2(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?t2(o):n2(o)}return Ok(o,r),Ek(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===RD&&(i=void 0),this.autoFreeze_&&DE(i,!0),r){const o=[],a=[];fl("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Ci(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,l=>t(l,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Go(e)||Ci(8),Ka(e)&&(e=BD(e));const t=Sk(this),n=i2(e,void 0);return n[$r].isManual_=!0,n2(t),n}finishDraft(e,t){const n=e&&e[$r];(!n||!n.isManual_)&&Ci(9);const{scope_:r}=n;return Ok(r,t),Ek(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=fl("Patches").applyPatches_;return Ka(e)?r(e,t):this.produce(e,i=>r(i,t))}};function i2(e,t){const n=d0(e)?fl("MapSet").proxyMap_(e,t):h0(e)?fl("MapSet").proxySet_(e,t):fie(e,t);return(t?t.scope_:DD()).drafts_.push(n),n}function BD(e){return Ka(e)||Ci(10,e),UD(e)}function UD(e){if(!Go(e)||p0(e))return e;const t=e[$r];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=e2(e,t.scope_.immer_.useStrictShallowCopy_)}else n=e2(e,!0);return nh(n,(r,i)=>{ID(n,r,UD(i))}),t&&(t.finalized_=!1),n}var Ir=new hie,zD=Ir.produce;Ir.produceWithPatches.bind(Ir);Ir.setAutoFreeze.bind(Ir);Ir.setUseStrictShallowCopy.bind(Ir);Ir.applyPatches.bind(Ir);Ir.createDraft.bind(Ir);Ir.finishDraft.bind(Ir);function pie(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mie(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function vie(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Pk=e=>Array.isArray(e)?e:[e];function gie(e){const t=Array.isArray(e[0])?e[0]:e;return vie(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function yie(e,t){const n=[],{length:r}=e;for(let i=0;i{n=ym(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function VD(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),pie(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const f={...n,...l},{memoize:d,memoizeOptions:p=[],argsMemoize:v=BE,argsMemoizeOptions:g=[],devModeChecks:y={}}=f,x=Pk(p),_=Pk(g),b=gie(i),w=d(function(){return o++,c.apply(null,arguments)},...x),S=v(function(){a++;const C=yie(b,arguments);return s=w.apply(null,C),s},..._);return Object.assign(S,{resultFunc:c,memoizedResultFunc:w,dependencies:b,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:d,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var wie=VD(BE),Oie=Object.assign((e,t=wie)=>{mie(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>Oie});function WD(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var Sie=WD(),Eie=WD,Cie=(...e)=>{const t=VD(...e),n=Object.assign((...r)=>{const i=t(...r),o=(a,...s)=>i(Ka(a)?BD(a):a,...s);return Object.assign(o,i),o},{withTypes:()=>n});return n};Cie(BE);var Pie=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?gg:gg.apply(null,arguments)},Tie=e=>e&&typeof e.match=="function";function un(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(pr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>iie(r)&&r.type===e,n}var HD=class qf extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,qf.prototype)}static get[Symbol.species](){return qf}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new qf(...t[0].concat(this)):new qf(...t.concat(this))}};function jk(e){return Go(e)?zD(e,()=>{}):e}function Ak(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(pr(10));const r=n.insert(t,e);return e.set(t,r),r}function jie(e){return typeof e=="boolean"}var Aie=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new HD;return n&&(jie(n)?a.push(Sie):a.push(Eie(n.extraArgument))),a},kie="RTK_autoBatch",GD=e=>t=>{setTimeout(t,e)},Nie=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:GD(10),Mie=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?Nie:e.type==="callback"?e.queueNotification:GD(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const d=()=>i&&f(),p=r.subscribe(d);return s.add(f),()=>{p(),s.delete(f)}},dispatch(f){var d;try{return i=!((d=f==null?void 0:f.meta)!=null&&d[kie]),o=!i,o&&(a||(a=!0,l(c))),r.dispatch(f)}finally{i=!0}}})},Lie=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new HD(e);return r&&i.push(Mie(typeof r=="object"?r:void 0)),i},Rie=!0;function qD(e){const t=Aie(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{};let s;if(typeof n=="function")s=n;else if($E(n))s=IE(n);else throw new Error(pr(1));let l;typeof r=="function"?l=r(t):l=t();let c=gg;i&&(c=Pie({trace:!Rie,...typeof i=="object"&&i}));const f=rie(...l),d=Lie(f);let p=typeof a=="function"?a(d):d();const v=c(...p);return LD(s,o,v)}function KD(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(pr(28));if(s in t)throw new Error(pr(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function $ie(e){return typeof e=="function"}function Iie(e,t){let[n,r,i]=KD(t),o;if($ie(e))o=()=>jk(e());else{const s=jk(e);o=()=>s}function a(s=o(),l){let c=[n[l.type],...r.filter(({matcher:f})=>f(l)).map(({reducer:f})=>f)];return c.filter(f=>!!f).length===0&&(c=[i]),c.reduce((f,d)=>{if(d)if(Ka(f)){const v=d(f,l);return v===void 0?f:v}else{if(Go(f))return zD(f,p=>d(p,l));{const p=d(f,l);if(p===void 0){if(f===null)return f;throw new Error(pr(9))}return p}}return f},s)}return a.getInitialState=o,a}var Die="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",YD=(e=21)=>{let t="",n=e;for(;n--;)t+=Die[Math.random()*64|0];return t},Fie=(e,t)=>Tie(e)?e.match(t):e(t);function Bie(...e){return t=>e.some(n=>Fie(n,t))}var Uie=["name","message","stack","code"],T1=class{constructor(e,t){Il(this,"_type");this.payload=e,this.meta=t}},kk=class{constructor(e,t){Il(this,"_type");this.payload=e,this.meta=t}},zie=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Uie)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},ZD=(()=>{function e(t,n,r){const i=un(t+"/fulfilled",(l,c,f,d)=>({payload:l,meta:{...d||{},arg:f,requestId:c,requestStatus:"fulfilled"}})),o=un(t+"/pending",(l,c,f)=>({payload:void 0,meta:{...f||{},arg:c,requestId:l,requestStatus:"pending"}})),a=un(t+"/rejected",(l,c,f,d,p)=>({payload:d,error:(r&&r.serializeError||zie)(l||"Rejected"),meta:{...p||{},arg:f,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function s(l){return(c,f,d)=>{const p=r!=null&&r.idGenerator?r.idGenerator(l):YD(),v=new AbortController;let g,y;function x(b){y=b,v.abort()}const _=async function(){var S,E;let b;try{let C=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,l,{getState:f,extra:d});if(Wie(C)&&(C=await C),C===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((A,D)=>{g=()=>{D({name:"AbortError",message:y||"Aborted"})},v.signal.addEventListener("abort",g)});c(o(p,l,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:p,arg:l},{getState:f,extra:d}))),b=await Promise.race([T,Promise.resolve(n(l,{dispatch:c,getState:f,extra:d,requestId:p,signal:v.signal,abort:x,rejectWithValue:(A,D)=>new T1(A,D),fulfillWithValue:(A,D)=>new kk(A,D)})).then(A=>{if(A instanceof T1)throw A;return A instanceof kk?i(A.payload,p,l,A.meta):i(A,p,l)})])}catch(C){b=C instanceof T1?a(null,p,l,C.payload,C.meta):a(C,p,l)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&a.match(b)&&b.meta.condition||c(b),b}();return Object.assign(_,{abort:x,requestId:p,arg:l,unwrap(){return _.then(Vie)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:Bie(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Vie(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Wie(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hie=Symbol.for("rtk-slice-createasyncthunk");function Gie(e,t){return`${e}/${t}`}function qie({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Hie];return function(i){const{name:o,reducerPath:a=o}=i;if(!o)throw new Error(pr(11));typeof process<"u";const s=(typeof i.reducers=="function"?i.reducers(Yie()):i.reducers)||{},l=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(w,S){const E=typeof w=="string"?w:w.type;if(!E)throw new Error(pr(12));if(E in c.sliceCaseReducersByType)throw new Error(pr(13));return c.sliceCaseReducersByType[E]=S,f},addMatcher(w,S){return c.sliceMatchers.push({matcher:w,reducer:S}),f},exposeAction(w,S){return c.actionCreators[w]=S,f},exposeCaseReducer(w,S){return c.sliceCaseReducersByName[w]=S,f}};l.forEach(w=>{const S=s[w],E={reducerName:w,type:Gie(o,w),createNotation:typeof i.reducers=="function"};Xie(S)?Jie(E,S,f,t):Zie(E,S,f)});function d(){const[w={},S=[],E=void 0]=typeof i.extraReducers=="function"?KD(i.extraReducers):[i.extraReducers],C={...w,...c.sliceCaseReducersByType};return Iie(i.initialState,T=>{for(let A in C)T.addCase(A,C[A]);for(let A of c.sliceMatchers)T.addMatcher(A.matcher,A.reducer);for(let A of S)T.addMatcher(A.matcher,A.reducer);E&&T.addDefaultCase(E)})}const p=w=>w,v=new Map;let g;function y(w,S){return g||(g=d()),g(w,S)}function x(){return g||(g=d()),g.getInitialState()}function _(w,S=!1){function E(T){let A=T[w];return typeof A>"u"&&S&&(A=x()),A}function C(T=p){const A=Ak(v,S,{insert:()=>new WeakMap});return Ak(A,T,{insert:()=>{const D={};for(const[N,I]of Object.entries(i.selectors??{}))D[N]=Kie(I,T,x,S);return D}})}return{reducerPath:w,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}const b={name:o,reducer:y,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,..._(a),injectInto(w,{reducerPath:S,...E}={}){const C=S??a;return w.inject({reducerPath:C,reducer:y},E),{...b,..._(C,!0)}}};return b}}function Kie(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var Qt=qie();function Yie(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Zie({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Qie(r))throw new Error(pr(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?un(e,a):un(e))}function Xie(e){return e._reducerDefinitionType==="asyncThunk"}function Qie(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Jie({type:e,reducerName:t},n,r,i){if(!i)throw new Error(pr(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:f}=n,d=i(e,o,f);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||bm,pending:s||bm,rejected:l||bm,settled:c||bm})}function bm(){}var eoe=(e,t)=>{if(typeof e!="function")throw new Error(pr(32))},UE="listenerMiddleware",toe=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=un(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(pr(21));return eoe(o),{predicate:i,type:t,effect:o}},noe=Object.assign(e=>{const{type:t,predicate:n,effect:r}=toe(e);return{id:YD(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(pr(22))}}},{withTypes:()=>noe}),roe=Object.assign(un(`${UE}/add`),{withTypes:()=>roe});un(`${UE}/removeAll`);var ioe=Object.assign(un(`${UE}/remove`),{withTypes:()=>ioe});function pr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const{actions:ooe,reducer:aoe}=Qt({name:"shlink/appUpdates",initialState:!1,reducers:{appUpdateAvailable:()=>!0,resetAppUpdate:()=>!1}}),{appUpdateAvailable:soe,resetAppUpdate:loe}=ooe,coe=aoe,uoe=(e,t)=>{e.factory("App",Jre),e.decorator("App",t(["servers","settings","appUpdated"],["fetchServers","resetAppUpdate"])),e.serviceFactory("appUpdateAvailable",()=>soe),e.serviceFactory("resetAppUpdate",()=>loe)},Nk={"Content-Type":"application/json"},Mk=e=>e!=null&&e.body?e?{...e,headers:{...e.headers??{},...Nk}}:{headers:Nk}:e;let foe=class{constructor(t=window.fetch.bind(window)){this.fetch=t}async jsonRequest(t,n){return this.fetch(t,Mk(n)).then(async r=>{const i=await r.json();if(!r.ok)throw i;return i})}async emptyRequest(t,n){return this.fetch(t,Mk(n)).then(async r=>{if(!r.ok)throw await r.json()})}};var zE=(e=>(e.INVALID_ARGUMENT="https://shlink.io/api/error/invalid-data",e.INVALID_SHORT_URL_DELETION="https://shlink.io/api/error/invalid-short-url-deletion",e.DOMAIN_NOT_FOUND="https://shlink.io/api/error/domain-not-found",e.FORBIDDEN_OPERATION="https://shlink.io/api/error/forbidden-tag-operation",e.INVALID_SLUG="https://shlink.io/api/error/non-unique-slug",e.INVALID_SHORTCODE="https://shlink.io/api/error/short-url-not-found",e.TAG_CONFLICT="https://shlink.io/api/error/tag-conflict",e.TAG_NOT_FOUND="https://shlink.io/api/error/tag-not-found",e.MERCURE_NOT_CONFIGURED="https://shlink.io/api/error/mercure-not-configured",e.INVALID_AUTHORIZATION="https://shlink.io/api/error/missing-authentication",e.INVALID_API_KEY="https://shlink.io/api/error/invalid-api-key",e.NOT_FOUND="https://shlink.io/api/error/not-found",e.INVALID_URL="https://shlink.io/api/error/invalid-url",e))(zE||{});const XD=(e,t)=>e.reduce((n,r)=>{const i=t(r);return n[i]=(n[i]||0)+1,n},{}),doe=(e,t)=>e.reduce((n,r)=>{const i=t(r);return(n[i]=n[i]||[]).push(r),n},{}),j1=e=>Object.prototype.toString.call(e)==="[object Object]",QD=(e,t)=>{const n={};return(...r)=>{const i=e(...r);if(n[i])return n[i];const o=t(...r);return n[i]=o,o}},m0=(e,t)=>{const n={...e};return!j1(e)||!j1(t)||Object.keys(t).forEach(r=>{j1(t[r])?n[r]=r in e&&e[r]!==void 0?m0(e[r],t[r]):{...t[r]}:n[r]=t[r]}),n},VE=(e,t)=>Array.from({length:t-e},(n,r)=>e+r),hoe=(e,t)=>[...e].sort((n,r)=>{const i=t(n),o=t(r);return i===o?0:i{const n=[];for(let r=0;rObject.fromEntries(e.map((n,r)=>[n,t[r]]));function qe(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ri(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function WE(e,t){const n=qe(e);return isNaN(t)?Ri(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function poe(e,t){const n=qe(e);if(isNaN(t))return Ri(e,NaN);if(!t)return n;const r=n.getDate(),i=Ri(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const o=i.getDate();return r>=o?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function moe(e,t){const{years:n=0,months:r=0,weeks:i=0,days:o=0,hours:a=0,minutes:s=0,seconds:l=0}=t,c=qe(e),f=r||n?poe(c,r+n*12):c,d=o||i?WE(f,o+i*7):f,p=s+a*60,g=(l+p*60)*1e3;return Ri(e,d.getTime()+g)}const JD=6048e5,voe=864e5,e5=6e4,HE=36e5,_m=43200,Rk=1440;let goe={};function Nu(){return goe}function oh(e,t){var s,l,c,f;const n=Nu(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=qe(e),o=i.getDay(),a=(o=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function dl(e){const t=qe(e);return t.setHours(0,0,0,0),t}function _g(e){const t=qe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function n5(e,t){const n=dl(e),r=dl(t),i=+n-_g(n),o=+r-_g(r);return Math.round((i-o)/voe)}function yoe(e){const t=t5(e),n=Ri(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),ah(n)}function r5(e){let t;return e.forEach(function(n){const r=qe(n);(t===void 0||t{const r=qe(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function cv(e,t){const n=qe(e),r=qe(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function _oe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function xoe(e){if(!_oe(e)&&typeof e!="number")return!1;const t=qe(e);return!isNaN(Number(t))}function woe(e,t){const n=qe(e),r=qe(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function fp(e,t){const n=qe(e),r=qe(t),i=$k(n,r),o=Math.abs(n5(n,r));n.setDate(n.getDate()-i*o);const a=+($k(n,r)===-i),s=i*(o-a);return s===0?0:s}function $k(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function GE(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function i5(e,t){return+qe(e)-+qe(t)}function Ooe(e,t,n){const r=i5(e,t)/HE;return GE(n==null?void 0:n.roundingMethod)(r)}function Jc(e){const t=qe(e);return t.setHours(23,59,59,999),t}function Soe(e){const t=qe(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function Eoe(e){const t=qe(e);return+Jc(t)==+Soe(t)}function xg(e,t){const n=qe(e),r=qe(t),i=cv(n,r),o=Math.abs(woe(n,r));let a;if(o<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);let s=cv(n,r)===-i;Eoe(qe(e))&&o===1&&cv(e,r)===1&&(s=!1),a=i*(o-Number(s))}return a===0?0:a}function Coe(e,t,n){const r=i5(e,t)/1e3;return GE(n==null?void 0:n.roundingMethod)(r)}function Poe(e,t,n){const r=fp(e,t)/7;return GE(n==null?void 0:n.roundingMethod)(r)}function Toe(e){const t=qe(e),n=Ri(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function joe(e,t){var s,l,c,f;const n=Nu(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=qe(e),o=i.getDay(),a=(o{let r;const i=koe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function A1(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Moe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Loe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Roe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$oe={date:A1({formats:Moe,defaultWidth:"full"}),time:A1({formats:Loe,defaultWidth:"full"}),dateTime:A1({formats:Roe,defaultWidth:"full"})},Ioe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Doe=(e,t,n,r)=>Ioe[e];function Ef(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const Foe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Boe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Uoe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},zoe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Voe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Woe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Hoe=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Goe={ordinalNumber:Hoe,era:Ef({values:Foe,defaultWidth:"wide"}),quarter:Ef({values:Boe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ef({values:Uoe,defaultWidth:"wide"}),day:Ef({values:zoe,defaultWidth:"wide"}),dayPeriod:Ef({values:Voe,defaultWidth:"wide",formattingValues:Woe,defaultFormattingWidth:"wide"})};function Cf(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Koe(s,d=>d.test(a)):qoe(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const f=t.slice(a.length);return{value:c,rest:f}}}function qoe(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Koe(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const Zoe=/^(\d+)(th|st|nd|rd)?/i,Xoe=/\d+/i,Qoe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Joe={any:[/^b/i,/^(a|c)/i]},eae={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tae={any:[/1/i,/2/i,/3/i,/4/i]},nae={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rae={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},iae={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},oae={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},aae={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},sae={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},lae={ordinalNumber:Yoe({matchPattern:Zoe,parsePattern:Xoe,valueCallback:e=>parseInt(e,10)}),era:Cf({matchPatterns:Qoe,defaultMatchWidth:"wide",parsePatterns:Joe,defaultParseWidth:"any"}),quarter:Cf({matchPatterns:eae,defaultMatchWidth:"wide",parsePatterns:tae,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Cf({matchPatterns:nae,defaultMatchWidth:"wide",parsePatterns:rae,defaultParseWidth:"any"}),day:Cf({matchPatterns:iae,defaultMatchWidth:"wide",parsePatterns:oae,defaultParseWidth:"any"}),dayPeriod:Cf({matchPatterns:aae,defaultMatchWidth:"any",parsePatterns:sae,defaultParseWidth:"any"})},o5={code:"en-US",formatDistance:Noe,formatLong:$oe,formatRelative:Doe,localize:Goe,match:lae,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cae(e){const t=qe(e);return n5(t,Toe(t))+1}function uae(e){const t=qe(e),n=+ah(t)-+yoe(t);return Math.round(n/JD)+1}function a5(e,t){var f,d,p,v;const n=qe(e),r=n.getFullYear(),i=Nu(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((v=(p=i.locale)==null?void 0:p.options)==null?void 0:v.firstWeekContainsDate)??1,a=Ri(e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=oh(a,t),l=Ri(e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=oh(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=c.getTime()?r:r-1}function fae(e,t){var s,l,c,f;const n=Nu(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,i=a5(e,t),o=Ri(e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),oh(o,t)}function dae(e,t){const n=qe(e),r=+oh(n,t)-+fae(n,t);return Math.round(r/JD)+1}function nt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ua={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return nt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):nt(n+1,2)},d(e,t){return nt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return nt(e.getHours()%12||12,t.length)},H(e,t){return nt(e.getHours(),t.length)},m(e,t){return nt(e.getMinutes(),t.length)},s(e,t){return nt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return nt(i,t.length)}},Vl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ik={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return ua.y(e,t)},Y:function(e,t,n,r){const i=a5(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return nt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):nt(o,t.length)},R:function(e,t){const n=t5(e);return nt(n,t.length)},u:function(e,t){const n=e.getFullYear();return nt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return nt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return nt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ua.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return nt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=dae(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):nt(i,t.length)},I:function(e,t,n){const r=uae(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):nt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ua.d(e,t)},D:function(e,t,n){const r=cae(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):nt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return nt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return nt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return nt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Vl.noon:r===0?i=Vl.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Vl.evening:r>=12?i=Vl.afternoon:r>=4?i=Vl.morning:i=Vl.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ua.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ua.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):nt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ua.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ua.s(e,t)},S:function(e,t){return ua.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Fk(r);case"XXXX":case"XX":return js(r);case"XXXXX":case"XXX":default:return js(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Fk(r);case"xxxx":case"xx":return js(r);case"xxxxx":case"xxx":default:return js(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Dk(r,":");case"OOOO":default:return"GMT"+js(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Dk(r,":");case"zzzz":default:return"GMT"+js(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return nt(r,t.length)},T:function(e,t,n){const r=e.getTime();return nt(r,t.length)}};function Dk(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+nt(o,2)}function Fk(e,t){return e%60===0?(e>0?"-":"+")+nt(Math.abs(e)/60,2):js(e,t)}function js(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=nt(Math.trunc(r/60),2),o=nt(r%60,2);return n+i+t+o}const Bk=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},s5=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},hae=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Bk(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Bk(r,t)).replace("{{time}}",s5(i,t))},pae={p:s5,P:hae},mae=/^D+$/,vae=/^Y+$/,gae=["D","DD","YY","YYYY"];function yae(e){return mae.test(e)}function bae(e){return vae.test(e)}function _ae(e,t,n){const r=xae(e,t,n);if(console.warn(r),gae.includes(e))throw new RangeError(r)}function xae(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const wae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Oae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sae=/^'([^]*?)'?$/,Eae=/''/g,Cae=/[a-zA-Z]/;function wg(e,t,n){var f,d,p,v,g,y,x,_;const r=Nu(),i=(n==null?void 0:n.locale)??r.locale??o5,o=(n==null?void 0:n.firstWeekContainsDate)??((d=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((v=(p=r.locale)==null?void 0:p.options)==null?void 0:v.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((y=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:y.weekStartsOn)??r.weekStartsOn??((_=(x=r.locale)==null?void 0:x.options)==null?void 0:_.weekStartsOn)??0,s=qe(e);if(!xoe(s))throw new RangeError("Invalid time value");let l=t.match(Oae).map(b=>{const w=b[0];if(w==="p"||w==="P"){const S=pae[w];return S(b,i.formatLong)}return b}).join("").match(wae).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const w=b[0];if(w==="'")return{isToken:!1,value:Pae(b)};if(Ik[w])return{isToken:!0,value:b};if(w.match(Cae))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:b}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(b=>{if(!b.isToken)return b.value;const w=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&bae(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&yae(w))&&_ae(w,t,String(e));const S=Ik[w[0]];return S(s,w,i.localize,c)}).join("")}function Pae(e){const t=e.match(Sae);return t?t[1].replace(Eae,"'"):e}function Tae(e,t,n){const r=Nu(),i=(n==null?void 0:n.locale)??r.locale??o5,o=2520,a=cv(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const s=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:a});let l,c;a>0?(l=qe(t),c=qe(e)):(l=qe(e),c=qe(t));const f=Coe(c,l),d=(_g(c)-_g(l))/1e3,p=Math.round((f-d)/60);let v;if(p<2)return n!=null&&n.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,s):f<10?i.formatDistance("lessThanXSeconds",10,s):f<20?i.formatDistance("lessThanXSeconds",20,s):f<40?i.formatDistance("halfAMinute",0,s):f<60?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",1,s):p===0?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",p,s);if(p<45)return i.formatDistance("xMinutes",p,s);if(p<90)return i.formatDistance("aboutXHours",1,s);if(pr.getTime()}function Og(e,t){const n=qe(e),r=qe(t);return+n<+r}function o2(e,t){const n=qe(e),r=qe(t);return+n==+r}function Nae(e,t){const n=+qe(e),[r,i]=[+qe(t.start),+qe(t.end)].sort((o,a)=>o-a);return n>=r&&n<=i}function Sg(e,t){return WE(e,-t)}function Ya(e,t){const n=(t==null?void 0:t.additionalDigits)??2,r=$ae(e);let i;if(r.date){const l=Iae(r.date,n);i=Dae(l.restDateString,l.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const o=i.getTime();let a=0,s;if(r.time&&(a=Fae(r.time),isNaN(a)))return new Date(NaN);if(r.timezone){if(s=Bae(r.timezone),isNaN(s))return new Date(NaN)}else{const l=new Date(o+a),c=new Date(0);return c.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),c.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),c}return new Date(o+a+s)}const xm={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Mae=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Lae=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Rae=/^([+-])(\d{2})(?::?(\d{2}))?$/;function $ae(e){const t={},n=e.split(xm.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],xm.timeZoneDelimiter.test(t.date)&&(t.date=e.split(xm.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=xm.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Iae(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,o=r[2]?parseInt(r[2]):null;return{year:o===null?i:o*100,restDateString:e.slice((r[1]||r[2]).length)}}function Dae(e,t){if(t===null)return new Date(NaN);const n=e.match(Mae);if(!n)return new Date(NaN);const r=!!n[4],i=Pf(n[1]),o=Pf(n[2])-1,a=Pf(n[3]),s=Pf(n[4]),l=Pf(n[5])-1;if(r)return Hae(t,s,l)?Uae(t,s,l):new Date(NaN);{const c=new Date(0);return!Vae(t,o,a)||!Wae(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}}function Pf(e){return e?parseInt(e):1}function Fae(e){const t=e.match(Lae);if(!t)return NaN;const n=k1(t[1]),r=k1(t[2]),i=k1(t[3]);return Gae(n,r,i)?n*HE+r*e5+i*1e3:NaN}function k1(e){return e&&parseFloat(e.replace(",","."))||0}function Bae(e){if(e==="Z")return 0;const t=e.match(Rae);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return qae(r,i)?n*(r*HE+i*e5):NaN}function Uae(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,o=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+o),r}const zae=[31,null,31,30,31,30,31,31,30,31,30,31];function l5(e){return e%400===0||e%4===0&&e%100!==0}function Vae(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(zae[t]||(l5(e)?29:28))}function Wae(e,t){return t>=1&&t<=(l5(e)?366:365)}function Hae(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Gae(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function qae(e,t){return t>=0&&t<=59}const mr=({href:e,children:t,rel:n,...r})=>m.jsx("a",{target:"_blank",rel:`noopener noreferrer${n?` ${n}`:""}`,href:e,...r,children:t??e}),Kae="Left",Yae="Right",Zae="Up",Xae="Down",gc={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},a2={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},Uk="mousemove",zk="mouseup",Qae="touchend",Jae="touchmove",ese="touchstart";function tse(e,t,n,r){return e>t?n>0?Yae:Kae:r>0?Xae:Zae}function Vk(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function nse(e,t){const n=f=>{const d="touches"in f;d&&f.touches.length>1||e((p,v)=>{v.trackMouse&&!d&&(document.addEventListener(Uk,r),document.addEventListener(zk,a));const{clientX:g,clientY:y}=d?f.touches[0]:f,x=Vk([g,y],v.rotationAngle);return v.onTouchStartOrOnMouseDown&&v.onTouchStartOrOnMouseDown({event:f}),Object.assign(Object.assign(Object.assign({},p),a2),{initial:x.slice(),xy:x,start:f.timeStamp||0})})},r=f=>{e((d,p)=>{const v="touches"in f;if(v&&f.touches.length>1)return d;if(f.timeStamp-d.start>p.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:g,clientY:y}=v?f.touches[0]:f,[x,_]=Vk([g,y],p.rotationAngle),b=x-d.xy[0],w=_-d.xy[1],S=Math.abs(b),E=Math.abs(w),C=(f.timeStamp||0)-d.start,T=Math.sqrt(S*S+E*E)/(C||1),A=[b/(C||1),w/(C||1)],D=tse(S,E,b,w),N=typeof p.delta=="number"?p.delta:p.delta[D.toLowerCase()]||gc.delta;if(S{e((d,p)=>{let v;if(d.swiping&&d.eventData){if(f.timeStamp-d.start{document.removeEventListener(Uk,r),document.removeEventListener(zk,a)},a=f=>{o(),i(f)},s=(f,d)=>{let p=()=>{};if(f&&f.addEventListener){const v=Object.assign(Object.assign({},gc.touchEventOptions),d.touchEventOptions),g=[[ese,n,v],[Jae,r,Object.assign(Object.assign({},v),d.preventScrollOnSwipe?{passive:!1}:{})],[Qae,i,v]];g.forEach(([y,x,_])=>f.addEventListener(y,x,_)),p=()=>g.forEach(([y,x])=>f.removeEventListener(y,x))}return p},c={ref:f=>{f!==null&&e((d,p)=>{if(d.el===f)return d;const v={};return d.el&&d.el!==f&&d.cleanUpTouch&&(d.cleanUpTouch(),v.cleanUpTouch=void 0),p.trackTouch&&f&&(v.cleanUpTouch=s(f,p)),Object.assign(Object.assign(Object.assign({},d),{el:f}),v)})}};return t.trackMouse&&(c.onMouseDown=n),[c,s]}function rse(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function ise(e){const{trackMouse:t}=e,n=R.useRef(Object.assign({},a2)),r=R.useRef(Object.assign({},gc)),i=R.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},gc),e);let o;for(o in gc)r.current[o]===void 0&&(r.current[o]=gc[o]);const[a,s]=R.useMemo(()=>nse(l=>n.current=l(n.current,r.current),{trackMouse:t}),[t]);return n.current=rse(n.current,r.current,i.current,s),a}var s2={exports:{}};/** @license * eventsource.js * Available under MIT License (MIT) * https://github.com/Yaffle/EventSource/ */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,a=n.XDomainRequest,s=n.ActiveXObject,l=n.EventSource,c=n.document,f=n.Promise,d=n.fetch,p=n.Response,v=n.TextDecoder,g=n.TextEncoder,y=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(se){c.readyState="complete"},!1)),o==null&&s!=null&&(o=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(se){function pe(){}return pe.prototype=se,new pe}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var x=d;d=function(se,pe){var me=pe.signal;return x(se,{headers:pe.headers,credentials:pe.credentials,cache:pe.cache}).then(function(xe){var Te=xe.body.getReader();return me._reader=Te,me._aborted&&me._reader.cancel(),{status:xe.status,statusText:xe.statusText,headers:xe.headers,body:{getReader:function(){return Te}}}})},y=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function _(){this.bitsNeeded=0,this.codePoint=0}_.prototype.decode=function(se){function pe(ye,ge,we){if(we===1)return ye>=128>>ge&&ye<=2048>>ge&&ye<=57344>>ge&&ye<=65536>>ge&&ye<>6>15?3:ge>31?2:1;if(ye===6*2)return ge>15?3:2;if(ye===6*3)return 3;throw new Error}for(var xe=65533,Te="",Pe=this.bitsNeeded,Ae=this.codePoint,le=0;le191||!pe(Ae<<6|ue&63,Pe-6,me(Pe,Ae)))&&(Pe=0,Ae=xe,Te+=String.fromCharCode(Ae)),Pe===0?(ue>=0&&ue<=127?(Pe=0,Ae=ue):ue>=192&&ue<=223?(Pe=6*1,Ae=ue&31):ue>=224&&ue<=239?(Pe=6*2,Ae=ue&15):ue>=240&&ue<=247?(Pe=6*3,Ae=ue&7):(Pe=0,Ae=xe),Pe!==0&&!pe(Ae,Pe,me(Pe,Ae))&&(Pe=0,Ae=xe)):(Pe-=6,Ae=Ae<<6|ue&63),Pe===0&&(Ae<=65535?Te+=String.fromCharCode(Ae):(Te+=String.fromCharCode(55296+(Ae-65535-1>>10)),Te+=String.fromCharCode(56320+(Ae-65535-1&1023))))}return this.bitsNeeded=Pe,this.codePoint=Ae,Te};var b=function(){try{return new v().decode(new g().encode("test"),{stream:!0})==="test"}catch(se){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+se)}return!1};(v==null||g==null||!b())&&(v=_);var w=function(){};function S(se){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=w,this.onload=w,this.onerror=w,this.onreadystatechange=w,this._contentType="",this._xhr=se,this._sendTimeout=0,this._abort=w}S.prototype.open=function(se,pe){this._abort(!0);var me=this,xe=this._xhr,Te=1,Pe=0;this._abort=function(we){me._sendTimeout!==0&&(i(me._sendTimeout),me._sendTimeout=0),(Te===1||Te===2||Te===3)&&(Te=4,xe.onload=w,xe.onerror=w,xe.onabort=w,xe.onprogress=w,xe.onreadystatechange=w,xe.abort(),Pe!==0&&(i(Pe),Pe=0),we||(me.readyState=4,me.onabort(null),me.onreadystatechange())),Te=0};var Ae=function(){if(Te===1){var we=0,ke="",Me=void 0;if("contentType"in xe)we=200,ke="OK",Me=xe.contentType;else try{we=xe.status,ke=xe.statusText,Me=xe.getResponseHeader("Content-Type")}catch{we=0,ke="",Me=void 0}we!==0&&(Te=2,me.readyState=2,me.status=we,me.statusText=ke,me._contentType=Me,me.onreadystatechange())}},le=function(){if(Ae(),Te===2||Te===3){Te=3;var we="";try{we=xe.responseText}catch{}me.readyState=3,me.responseText=we,me.onprogress()}},ue=function(we,ke){if((ke==null||ke.preventDefault==null)&&(ke={preventDefault:w}),le(),Te===1||Te===2||Te===3){if(Te=4,Pe!==0&&(i(Pe),Pe=0),me.readyState=4,we==="load")me.onload(ke);else if(we==="error")me.onerror(ke);else if(we==="abort")me.onabort(ke);else throw new TypeError;me.onreadystatechange()}},ye=function(we){xe!=null&&(xe.readyState===4?(!("onload"in xe)||!("onerror"in xe)||!("onabort"in xe))&&ue(xe.responseText===""?"error":"load",we):xe.readyState===3?"onprogress"in xe||le():xe.readyState===2&&Ae())},ge=function(){Pe=r(function(){ge()},500),xe.readyState===3&&le()};"onload"in xe&&(xe.onload=function(we){ue("load",we)}),"onerror"in xe&&(xe.onerror=function(we){ue("error",we)}),"onabort"in xe&&(xe.onabort=function(we){ue("abort",we)}),"onprogress"in xe&&(xe.onprogress=le),"onreadystatechange"in xe&&(xe.onreadystatechange=function(we){ye(we)}),("contentType"in xe||!("ontimeout"in o.prototype))&&(pe+=(pe.indexOf("?")===-1?"?":"&")+"padding=true"),xe.open(se,pe,!0),"readyState"in xe&&(Pe=r(function(){ge()},0))},S.prototype.abort=function(){this._abort(!1)},S.prototype.getResponseHeader=function(se){return this._contentType},S.prototype.setRequestHeader=function(se,pe){var me=this._xhr;"setRequestHeader"in me&&me.setRequestHeader(se,pe)},S.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},S.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var se=this;se._sendTimeout=r(function(){se._sendTimeout=0,se.send()},4);return}var pe=this._xhr;"withCredentials"in pe&&(pe.withCredentials=this.withCredentials);try{pe.send(void 0)}catch(me){throw me}};function E(se){return se.replace(/[A-Z]/g,function(pe){return String.fromCharCode(pe.charCodeAt(0)+32)})}function C(se){for(var pe=Object.create(null),me=se.split(`\r `),xe=0;xe"u"?typeof window<"u"?window:typeof self<"u"?self:tc:globalThis)})(s2,s2.exports);var ose=s2.exports;const Js=({children:e})=>m.jsx("small",{className:"form-text text-muted d-block",children:e}),ase=({toggleRealTimeUpdates:e,setRealTimeUpdatesInterval:t})=>{const{enabled:n,interval:r}=_r("realTimeUpdates",{enabled:!0}),i=R.useId();return m.jsxs(xt,{title:"Real-time updates",className:"h-100",children:[m.jsx(eo,{children:m.jsxs(ul,{checked:n,onChange:e,children:["Enable or disable real-time updates.",m.jsxs(Js,{children:["Real-time updates are currently being ",m.jsx("b",{children:n?"processed":"ignored"}),"."]})]})}),m.jsxs(ku,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Ce("form-label",{"text-muted":!n}),id:i,children:[m.jsx(Fn,{type:"number",min:0,placeholder:"Immediate",disabled:!n,value:`${r??""}`,id:i,onChange:({target:o})=>t(Number(o.value))}),n&&m.jsx(Js,{children:r?m.jsxs("span",{children:["Updates will be reflected in the UI every ",m.jsx("b",{children:r})," minute",r>1&&"s","."]}):"Updates will be reflected in the UI as soon as they happen."})]})]})},N1=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",sse=e=>e==="includes"?m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"including"})," provided input."]}):m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"starting with"})," provided input."]}),lse=({updateShortUrlCreationSettings:e})=>{const t=_r("shortUrlCreation",{validateUrls:!1}),n=r=>()=>e({...t??{validateUrls:!1},tagFilteringMode:r});return m.jsxs(xt,{title:"Short URLs form",className:"h-100",children:[m.jsx(eo,{children:m.jsxs(ul,{checked:t.validateUrls??!1,onChange:r=>e({...t,validateUrls:r}),children:["Request validation on long URLs when creating new short URLs."," ",m.jsxs("b",{children:["This option is ignored by Shlink ",">=","4.0.0"]}),m.jsxs(Js,{children:["The initial state of the ",m.jsx("b",{children:"Validate URL"})," checkbox will be ",m.jsx("b",{children:t.validateUrls?"checked":"unchecked"}),"."]})]})}),m.jsx(eo,{children:m.jsxs(ul,{checked:t.forwardQuery??!0,onChange:r=>e({...t,forwardQuery:r}),children:["Make all new short URLs forward their query params to the long URL.",m.jsxs(Js,{children:["The initial state of the ",m.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",m.jsx("b",{children:t.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),m.jsxs(ku,{noMargin:!0,label:"Tag suggestions search mode:",children:[m.jsxs(ta,{text:N1(t.tagFilteringMode),children:[m.jsx(Ne,{active:!t.tagFilteringMode||t.tagFilteringMode==="startsWith",onClick:n("startsWith"),children:N1("startsWith")}),m.jsx(Ne,{active:t.tagFilteringMode==="includes",onClick:n("includes"),children:N1("includes")})]}),m.jsx(Js,{children:sse(t.tagFilteringMode)})]})]})},cse={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},use=({updateShortUrlsListSettings:e,defaultOrdering:t})=>{const n=_r("shortUrlsList");return m.jsx(xt,{title:"Short URLs list",className:"h-100",children:m.jsx(ku,{noMargin:!0,label:"Default ordering for short URLs list:",children:m.jsx(up,{items:cse,order:(n==null?void 0:n.defaultOrdering)??t,onChange:(r,i)=>e({defaultOrdering:{field:r,dir:i}})})})})},fse={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},dse=({updateTagsSettings:e})=>{const t=_r("tags",{});return m.jsx(xt,{title:"Tags",className:"h-100",children:m.jsx(ku,{noMargin:!0,label:"Default ordering for tags list:",children:m.jsx(up,{items:fse,order:t.defaultOrdering??{},onChange:(n,r)=>e({...t,defaultOrdering:{field:n,dir:r}})})})})},hse=({updateUiSettings:e,_matchMedia:t})=>{const n=_r("ui"),r=R.useMemo(()=>(n==null?void 0:n.theme)??RE(t),[n==null?void 0:n.theme,t]);return m.jsxs(xt,{title:"User interface",className:"h-100",children:[m.jsx(je,{icon:r==="dark"?VK:AK,className:"float-end mt-1"}),m.jsx(ul,{checked:r==="dark",onChange:i=>{e({...n,theme:i?"dark":"light"})},children:"Use dark theme."})]})},c5={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},pse=(e,t)=>!e||e==="all"?t:c5[e],mse=({onChange:e,active:t,allText:n})=>m.jsxs(ta,{text:pse(t,n),children:[m.jsx(Ne,{active:t==="all",onClick:()=>e("all"),children:n}),m.jsx(Ne,{divider:!0}),Object.entries(c5).map(([r,i])=>m.jsx(Ne,{active:t===r,onClick:()=>e(r),children:i},r))]}),W3=e=>(e==null?void 0:e.defaultInterval)??"last30Days",vse=({updateVisitsSettings:e})=>{const t=_r("visits"),n=R.useCallback(({defaultInterval:r,...i})=>e({defaultInterval:r??W3(t),...i}),[e,t]);return m.jsxs(xt,{title:"Visits",className:"h-100",children:[m.jsx(eo,{children:m.jsxs(ul,{checked:!!(t!=null&&t.excludeBots),onChange:r=>n({excludeBots:r}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",m.jsxs(Js,{children:["The visits coming from potential bots will be ",m.jsx("b",{children:t!=null&&t.excludeBots?"excluded":"included"}),"."]})]})}),m.jsx(eo,{children:m.jsxs(ul,{checked:!!(t!=null&&t.loadPrevInterval),onChange:r=>n({loadPrevInterval:r}),children:["Compare visits with previous period.",m.jsxs(Js,{children:["When loading visits, previous period ",m.jsx("b",{children:t!=null&&t.loadPrevInterval?"will":"won't"})," be loaded by default."]})]})}),m.jsx(ku,{noMargin:!0,label:"Default interval to load on visits sections:",children:m.jsx(mse,{allText:"All visits",active:W3(t),onChange:r=>n({defaultInterval:r})})})]})},M1=({items:e})=>m.jsx(m.Fragment,{children:e.map((t,n)=>m.jsx("div",{className:"mb-3",children:t},n))}),gse=({settings:e,updateSettings:t,defaultShortUrlsListOrdering:n})=>{const r=R.useCallback(s=>t(m0(e,s)),[e,t]),i=R.useCallback(s=>r({realTimeUpdates:{enabled:s}}),[r]),o=R.useCallback(s=>r({realTimeUpdates:{interval:s}}),[r]),a=R.useCallback((s,l)=>r({[s]:l}),[r]);return m.jsxs(d5,{value:e,children:[m.jsxs(AD,{className:"mb-3",children:[m.jsx(pd,{to:"general",children:"General"}),m.jsx(pd,{to:"short-urls",children:"Short URLs"}),m.jsx(pd,{to:"other-items",children:"Other items"})]}),m.jsxs(Xy,{children:[m.jsx(ot,{path:"general",element:m.jsx(M1,{items:[m.jsx(hse,{updateUiSettings:s=>a("ui",s)}),m.jsx(ase,{toggleRealTimeUpdates:i,setRealTimeUpdatesInterval:o})]})}),m.jsx(ot,{path:"short-urls",element:m.jsx(M1,{items:[m.jsx(lse,{updateShortUrlCreationSettings:s=>a("shortUrlCreation",s)}),m.jsx(use,{defaultOrdering:n,updateShortUrlsListSettings:s=>a("shortUrlsList",s)})]})}),m.jsx(ot,{path:"other-items",element:m.jsx(M1,{items:[m.jsx(dse,{updateTagsSettings:s=>a("tags",s)}),m.jsx(vse,{updateVisitsSettings:s=>a("visits",s)})]})}),m.jsx(ot,{path:"*",element:m.jsx(qS,{replace:!0,to:"general"})})]})]})},u5={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:{field:"dateCreated",dir:"DESC"}}},f5=R.createContext(u5),{Provider:d5}=f5,qE=()=>R.useContext(f5)??u5;function _r(e,t){return qE()[e]??t}const yse={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 151.2c-4.2-4.6-10.1-7.2-16.4-7.2C266 144 256 154 256 166.3l0 41.7-96 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l96 0 0 41.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.4-7.2l84-91c3.5-3.8 5.4-8.7 5.4-13.9s-1.9-10.1-5.4-13.9l-84-91z"]},bse=yse,_se={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},h5={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z"]},xse=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,H3=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(xse);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},G3=e=>e==="*"||e==="x"||e==="X",q3=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},wse=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Ose=(e,t)=>{if(G3(e)||G3(t))return 0;const[n,r]=wse(q3(e),q3(t));return n>r?1:n{for(let n=0;n{const n=H3(e),r=H3(t),i=n.pop(),o=r.pop(),a=K3(n,r);return a!==0?a:i&&o?K3(i.split("."),o.split(".")):i||o?i?-1:1:0},l2=(e,t,n)=>{Ese(n);const r=Sse(e,t);return p5[n].includes(r)},p5={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Y3=Object.keys(p5),Ese=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Y3.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Y3.join("|")}`)},Cse={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},Pse={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]},As={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},KE=Symbol("Create new tag"),m5=Symbol("No options"),Jl=()=>{},xn=V.createContext(void 0);function Z3(e,t){return e===t?[]:e.filter(n=>!t.includes(n))}function Tse(e){return e.selectionStart===0&&e.selectionEnd===0}function jse(e){const t=e.value.length;return e.selectionStart===t&&e.selectionEnd===t}function v0(e){return`${e}-label`}function Ase(e){return`${e}-combobox`}function kse(e){return`${e}-input`}function v5(e){return`${e}-listbox`}function g5(e,t){return`${e}-option-${Dse(t)}`}function Nse(e,t){if((e==null?void 0:e.value)===KE&&e.disabled===!1)return{value:t,label:t}}function Mse(e){const t=Nse(e.activeOption,e.value)||e.activeOption||zse(e.value,e.options);return t&&!t.disabled?t:void 0}function Lse(e,t,n){const r=t-1;return e>r?n:en===e.value)}const Fse=/[-\\^$*+?.()|[\]{}]/g;function y5(e){return e.replace(Fse,"\\$&")}function b5(e){return new RegExp(y5(e),"i")}function Bse(e){return new RegExp(`^${y5(e)}$`,"i")}function Use(e,t){if(e){const n=b5(e);return t.filter(r=>n.test(r.label))}else return[].concat(t)}function zse(e,t){const n=Bse(e);return t.find(r=>n.test(r.label))||null}const Vse={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function Wse({allowBackspace:e,ariaDescribedBy:t,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:a,isDisabled:s,isInvalid:l,managerRef:c}=R.useContext(xn),f=R.useMemo(()=>{const g=N=>{const I=N.currentTarget.value;c.current.updateInputValue(I),document.activeElement===a.current&&c.current.listBoxExpand(I)},y=()=>{c.current.listBoxExpand()},x=N=>{var I;((I=o.current)==null?void 0:I.contains(N.relatedTarget))===!1&&c.current.listBoxCollapse()},_=()=>{c.current.listBoxExpand()},b=N=>{const{activeIndex:I,isExpanded:F}=c.current.state;F?(N.preventDefault(),c.current.updateActiveIndex(I+1)):(jse(N.currentTarget)||N.altKey)&&(N.preventDefault(),c.current.listBoxExpand())},w=N=>{const{activeIndex:I,isExpanded:F}=c.current.state;F?(N.preventDefault(),c.current.updateActiveIndex(I-1)):Tse(N.currentTarget)&&(N.preventDefault(),c.current.listBoxExpand())},S=N=>{const{isExpanded:I,options:F}=c.current.state;I&&(N.preventDefault(),c.current.updateActiveIndex(F.length-1))},E=N=>{c.current.state.isExpanded&&(N.preventDefault(),c.current.updateActiveIndex(0))},C=()=>{c.current.state.isExpanded?c.current.listBoxCollapse():c.current.updateInputValue("")},T=()=>{if(e){const{value:N,selected:I}=c.current.state,F=I[I.length-1];N===""&&F&&c.current.selectTag(F)}},A=N=>{c.current.state.isExpanded&&(N.preventDefault(),c.current.selectTag())};return{onBlur:x,onChange:g,onClick:_,onFocus:y,onKeyDown:N=>{if(N.key===As.UpArrow)return w(N);if(N.key===As.DownArrow)return b(N);if(N.key===As.PageUp)return E(N);if(N.key===As.PageDown)return S(N);if(N.key===As.Escape)return C();if(N.key===As.Backspace)return T();if(r.includes(N.key))return A(N)}}},[e,o,r,a,c]),{activeOption:d,isExpanded:p,value:v}=c.current.state;return{...Vse,"aria-autocomplete":"list","aria-activedescendant":d?g5(i,d):void 0,"aria-controls":v5(i),"aria-describedby":t||void 0,"aria-disabled":s,"aria-errormessage":l&&n||void 0,"aria-invalid":l,"aria-labelledby":v0(i),"aria-expanded":p,id:kse(i),onBlur:s?Jl:f.onBlur,onChange:s?Jl:f.onChange,onClick:s?Jl:f.onClick,onFocus:s?Jl:f.onFocus,onKeyDown:s?Jl:f.onKeyDown,ref:a,role:"combobox",type:"text",value:v}}const Hse={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},Gse=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function qse({allowResize:e=!0,text:t}){const n=R.useRef(null),{inputRef:r}=R.useContext(xn),[i,o]=R.useState(null);return R.useLayoutEffect(()=>{if(e&&r.current&&n.current&&window.getComputedStyle){const a=window.getComputedStyle(r.current);Gse.forEach(s=>{const l=a.getPropertyValue(s);n.current.style.setProperty(s,l)})}},[e,r,n]),R.useLayoutEffect(()=>{var a;if(e){const s=Math.ceil(((a=n.current)==null?void 0:a.scrollWidth)??0)+2;i!==s&&o(s)}},[e,t,i]),{width:i,sizerProps:{ref:n,style:Hse}}}function Kse(){const{id:e,inputRef:t,listBoxRef:n,managerRef:r}=R.useContext(xn),i=r.current.state.activeIndex===-1,o=R.useCallback(a=>{var s;a.target!==t.current&&((s=t.current)==null||s.focus({preventScroll:!0}))},[t]);return R.useEffect(()=>{var a;i&&((a=n.current)==null||a.scrollTo({top:0}))},[n,i]),{"aria-labelledby":v0(e),id:v5(e),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function Yse({activateFirstOption:e,allowNew:t,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:a,onCollapse:s,onExpand:l,onInput:c,onShouldCollapse:f,onShouldExpand:d,onValidate:p,selected:v,suggestions:g,suggestionsTransform:y}){const x=R.useRef(),[_,b]=R.useState(null),[w,S]=R.useState(!1),[E,C]=R.useState(""),T=R.useMemo(()=>{const W=y(E,g);return E&&(t&&W.push({disabled:p?!p(E):!1,label:r,value:KE}),W.length===0&&W.push({disabled:!0,label:i,value:m5})),W},[t,r,i,p,g,y,E]),A=_?u2(_,T):-1,D=e?Math.max(A,0):A,N=T[D],I={activeIndex:D,activeOption:N,isExpanded:w,options:T,selected:v,value:E},F={tagsAdded:x.current?Z3(v,x.current.state.selected):[],tagsDeleted:x.current?Z3(x.current.state.selected,v):[]},K={listBoxCollapse(W){w&&(!f||f(W??I.value))&&(S(!1),b(null),s==null||s())},listBoxExpand(W){w||(!d||d(W??I.value))&&(S(!0),b(T[D]),l==null||l())},updateActiveIndex(W){const X=Lse(W,T.length,e?0:-1);b(T[X])},updateInputValue(W){E!==W&&(C(W),c==null||c(W))},selectTag(W){if(W??(W=Mse(I)),W){const X=u2(W,I.selected);X>-1?a(X):o(W),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return x.current={...K,flags:F,state:I},x}function Zse(e){const{id:t,inputRef:n,listBoxRef:r,managerRef:i}=R.useContext(xn),o=R.useRef(null),a=i.current.state.options[e],s=e===i.current.state.activeIndex,l=a.disabled??!1,c=u2(a,i.current.state.selected)>-1,f=R.useCallback(()=>{var p;i.current.selectTag(),(p=n.current)==null||p.focus()},[n,i]),d=R.useCallback(()=>{e!==i.current.state.activeIndex&&i.current.updateActiveIndex(e)},[e,i]);return Jse(o,r,s),{option:{...a,active:s,disabled:l,index:e,selected:c},optionProps:{"aria-disabled":l,"aria-posinset":e+1,"aria-selected":l?void 0:c,"aria-setsize":i.current.state.options.length,id:g5(t,a),onClick:f,onMouseDown:d,ref:o,role:"option",tabIndex:-1}}}function Xse({inputRef:e,managerRef:t}){return R.useRef({input:{blur(){var r;(r=e.current)==null||r.blur()},focus(){var r;(r=e.current)==null||r.focus()},get value(){return t.current.state.value},set value(r){typeof r!="string"&&(r=String(r)),t.current.updateInputValue(r)}},listBox:{collapse(){t.current.listBoxCollapse()},expand(){t.current.listBoxExpand()},get activeOption(){return t.current.state.activeOption},get isExpanded(){return t.current.state.isExpanded}},select(r){t.current.selectTag(r)}}).current}function Qse({onBlur:e,onFocus:t}){const[n,r]=R.useState(!1),{id:i,inputRef:o,rootRef:a}=R.useContext(xn),s=R.useMemo(()=>({"aria-describedby":v0(i),id:i,onFocus(){r(!0),t==null||t()},onBlur(){var l;(l=a.current)!=null&&l.contains(document.activeElement)||(r(!1),e==null||e())},onClick(){var l;document.activeElement===a.current&&((l=o.current)==null||l.focus())},ref:a,tabIndex:-1}),[o,i,e,t,a]);return{isActive:n,rootProps:s}}function Jse(e,t,n){R.useEffect(()=>{var r,i,o,a;if(n){const s=(r=e.current)==null?void 0:r.offsetHeight,l=(i=e.current)==null?void 0:i.offsetTop,c=(o=t.current)==null?void 0:o.offsetHeight,f=(a=t.current)==null?void 0:a.scrollTop;lf+c&&t.current.scrollTo(0,l+s-c)}},[n,t,e])}function ele(e,t){const{isDisabled:n,managerRef:r}=R.useContext(xn),i=r.current.state.selected[e],o=R.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:Eg(t,i.label),onClick:n?Jl:o}}}function tle(){var e;const{rootRef:t,managerRef:n}=R.useContext(xn),r=R.useRef(),i=n.current.flags.tagsDeleted[0],o=(e=r.current)==null?void 0:e.contains(document.activeElement);return R.useLayoutEffect(()=>{var a,s;if(i){const l=(a=r.current)==null?void 0:a.contains(document.activeElement);o&&!l&&((s=t.current)==null||s.focus({preventScroll:!0}))}},[o,r,t,i]),{listRef:r}}const nle={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function rle({ariaAddedText:e,ariaDeletedText:t}){const{managerRef:n}=R.useContext(xn),r=R.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(Eg(e,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(Eg(t,i.label))}),V.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:nle},r.current.join(` -`))}function ile({children:e}){const{classNames:t,comboBoxRef:n,id:r}=R.useContext(xn);return V.createElement("div",{className:t.comboBox,id:Ase(r),ref:n},e)}const ole=({classNames:e,text:t})=>V.createElement("mark",{className:e.highlight},t);function ale({option:e,query:t,render:n=ole}){const{classNames:r}=R.useContext(xn);if(e.value===KE||e.value===m5)return V.createElement(V.Fragment,null,Eg(e.label,t));if(t){const i=$se(e.label,t);if(i){const o=n({text:i[1],classNames:r});return V.createElement(V.Fragment,null,i[0],o,i[2])}}return V.createElement(V.Fragment,null,e.label)}const sle=V.memo(ale),lle=({classNames:e,inputWidth:t,...n})=>V.createElement("input",{className:e.input,style:{width:t},...n});function cle({allowBackspace:e=!0,allowResize:t=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:a=lle}){const{classNames:s}=R.useContext(xn),{value:l,...c}=Wse({allowBackspace:e,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),f=l.lengthV.createElement("div",{className:t.label,id:n},e);function fle({children:e,render:t=ule}){const{classNames:n,id:r}=R.useContext(xn);return t({children:e,classNames:n,id:v0(r)})}const dle=({children:e,classNames:t,...n})=>V.createElement("div",{className:t.listBox,...n},e);function hle({children:e,render:t=dle}){const{classNames:n,managerRef:r}=R.useContext(xn),i=Kse();return!r.current.state.isExpanded||V.Children.count(e)===0?null:t({children:e,classNames:n,...i})}const ple=({children:e,classNames:t,option:n,...r})=>{const i=[t.option];return n.active&&i.push(t.optionIsActive),V.createElement("div",{className:i.join(" "),...r},e)};function mle({children:e,index:t,render:n=ple}){const{classNames:r}=R.useContext(xn),{option:i,optionProps:o}=Zse(t);return n({classNames:r,children:e,option:i,...o})}const vle=({children:e,classNames:t,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const a=[t.root];return n&&a.push(t.rootIsActive),r&&a.push(t.rootIsDisabled),i&&a.push(t.rootIsInvalid),V.createElement("div",{className:a.join(" "),...o},e)};function gle({children:e,onBlur:t,onFocus:n,render:r=vle}){const{classNames:i,isDisabled:o,isInvalid:a}=R.useContext(xn),{isActive:s,rootProps:l}=Qse({onBlur:t,onFocus:n});return r({children:e,classNames:i,isActive:s,isDisabled:o,isInvalid:a,...l})}const yle=({classNames:e,tag:t,...n})=>V.createElement("button",{type:"button",className:e.tag,...n},V.createElement("span",{className:e.tagName},t.label));function ble({render:e=yle,index:t,title:n}){const{classNames:r}=R.useContext(xn),{tag:i,tagProps:o}=ele(t,n);return e({classNames:r,tag:i,...o})}function _le({children:e,label:t}){const{classNames:n}=R.useContext(xn),{listRef:r}=tle();return V.createElement("ul",{className:n.tagList,"aria-label":t,ref:r,role:"list"},e.map(i=>V.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const xle={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},wle=[As.Enter];function Ole({activateFirstOption:e=!1,allowBackspace:t=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:a,ariaDeletedText:s="Removed tag %value%",classNames:l=xle,collapseOnSelect:c=!1,deleteButtonText:f="Remove %value% from the list",delimiterKeys:d=wle,id:p="react-tags",isDisabled:v=!1,isInvalid:g=!1,labelText:y="Select tags",newOptionText:x="Add %value%",noOptionsText:_="No options found for %value%",onAdd:b,onBlur:w,onCollapse:S,onDelete:E,onExpand:C,onFocus:T,onInput:A,onShouldCollapse:D,onShouldExpand:N,onValidate:I,placeholderText:F="Add a tag",renderHighlight:K,renderInput:W,renderLabel:X,renderListBox:Q,renderOption:ne,renderRoot:Z,renderTag:z,selected:B=[],suggestions:H=[],suggestionsTransform:ee=Use,tagListLabelText:q="Selected tags"},te){const ie=R.useRef(null),ae=R.useRef(null),fe=R.useRef(null),j=R.useRef(null),k=Yse({activateFirstOption:e,allowNew:n,collapseOnSelect:c,newOptionText:x,noOptionsText:_,onAdd:b,onDelete:E,onCollapse:S,onExpand:C,onInput:A,onShouldCollapse:D,onShouldExpand:N,onValidate:I,selected:B,suggestions:H,suggestionsTransform:ee}),U=Xse({inputRef:ae,managerRef:k});return te&&(typeof te=="function"?te(U):te.current=U),V.createElement(xn.Provider,{value:{classNames:l,comboBoxRef:ie,id:p,inputRef:ae,isDisabled:v,isInvalid:g,listBoxRef:fe,managerRef:k,rootRef:j}},V.createElement(gle,{onBlur:w,onFocus:T,render:Z},V.createElement(fle,{render:X},y),V.createElement(_le,{label:q},k.current.state.selected.map((J,Y)=>V.createElement(ble,{key:c2(J),index:Y,render:z,title:f}))),V.createElement(ile,null,V.createElement(cle,{allowBackspace:t,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:a,delimiterKeys:d,placeholderText:F,render:W}),V.createElement(hle,{render:Q},k.current.state.options.map((J,Y)=>V.createElement(mle,{key:c2(J),index:Y,render:ne},V.createElement(sle,{option:J,query:k.current.state.value,render:K}))))),V.createElement(rle,{ariaAddedText:i,ariaDeletedText:s})))}const Sle=V.forwardRef(Ole);function L1(e){return e==null?"":`${e}`}function Ele(e={}){const{separator:t,decimals:n}=e;return t?n?r=>r.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function YE(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;if(!t||t===n)return i=>i;const r=new RegExp(t,"g");return i=>(i.includes(t)&&(i=i.replace(r,n)),`${t}${i}${t}`)}function Cle(e={stringFormatter:YE()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function Ple(e={stringFormatter:YE()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}const Tle=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function jle(e){var t,n,r;const i=[];let o;for(;o=Tle.exec(e);)i.push((r=(t=o[3])!==null&&t!==void 0?t:(n=o[1])===null||n===void 0?void 0:n.trim())!==null&&r!==void 0?r:o[0]);return i}function X3(e,t,n){if(t in e){const o=e[t];return o===void 0?n:o}const r=Array.isArray(t)?t:jle(t);let i=e;for(const o of r)if(i=i==null?void 0:i[o],i===void 0)return n;return i}function _5(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function f2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var Q3;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(Q3||(Q3={}));class Ale{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||YE(),i=Ple({stringFormatter:r}),o={header:r,undefined:L1,boolean:L1,number:Ele(),bigint:L1,string:r,symbol:Cle({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` -`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:i=>X3(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:a=>X3(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return f2(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(_5,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return f2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class x5 extends Ale{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,s)=>(Object.keys(s).forEach(l=>{a.includes(l)||a.push(l)}),a),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(_5,[])}processData(t){return f2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var mn;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(mn||(mn={}));mn.QUOTATION_MARK+"",mn.QUOTATION_MARK,mn.REVERSE_SOLIDUS+"",mn.REVERSE_SOLIDUS,mn.SOLIDUS+"",mn.SOLIDUS,mn.LATIN_SMALL_LETTER_B+"",mn.BACKSPACE,mn.LATIN_SMALL_LETTER_F+"",mn.FORM_FEED,mn.LATIN_SMALL_LETTER_N+"",mn.NEWLINE,mn.LATIN_SMALL_LETTER_R+"",mn.CARRIAGE_RETURN,mn.LATIN_SMALL_LETTER_T+"",mn.TAB;var J3;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(J3||(J3={}));var ek;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR",e[e.BOM_OR_START=29]="BOM_OR_START",e[e.BOM=30]="BOM"})(ek||(ek={}));var tk;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(tk||(tk={}));var nk;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(nk||(nk={}));var kle=Array.isArray,xr=kle,Nle=typeof tc=="object"&&tc&&tc.Object===Object&&tc,w5=Nle,Mle=w5,Lle=typeof self=="object"&&self&&self.Object===Object&&self,Rle=Mle||Lle||Function("return this")(),bo=Rle,$le=bo,Ile=$le.Symbol,dp=Ile,rk=dp,O5=Object.prototype,Dle=O5.hasOwnProperty,Fle=O5.toString,Tf=rk?rk.toStringTag:void 0;function Ble(e){var t=Dle.call(e,Tf),n=e[Tf];try{e[Tf]=void 0;var r=!0}catch{}var i=Fle.call(e);return r&&(t?e[Tf]=n:delete e[Tf]),i}var Ule=Ble,zle=Object.prototype,Vle=zle.toString;function Wle(e){return Vle.call(e)}var Hle=Wle,ik=dp,Gle=Ule,qle=Hle,Kle="[object Null]",Yle="[object Undefined]",ok=ik?ik.toStringTag:void 0;function Zle(e){return e==null?e===void 0?Yle:Kle:ok&&ok in Object(e)?Gle(e):qle(e)}var na=Zle;function Xle(e){return e!=null&&typeof e=="object"}var ra=Xle,Qle=na,Jle=ra,ece="[object Symbol]";function tce(e){return typeof e=="symbol"||Jle(e)&&Qle(e)==ece}var Mu=tce,nce=xr,rce=Mu,ice=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oce=/^\w*$/;function ace(e,t){if(nce(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||rce(e)?!0:oce.test(e)||!ice.test(e)||t!=null&&e in Object(t)}var ZE=ace;function sce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ss=sce;const Lu=at(ss);var lce=na,cce=ss,uce="[object AsyncFunction]",fce="[object Function]",dce="[object GeneratorFunction]",hce="[object Proxy]";function pce(e){if(!cce(e))return!1;var t=lce(e);return t==fce||t==dce||t==uce||t==hce}var XE=pce;const Ve=at(XE);var mce=bo,vce=mce["__core-js_shared__"],gce=vce,R1=gce,ak=function(){var e=/[^.]+$/.exec(R1&&R1.keys&&R1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function yce(e){return!!ak&&ak in e}var bce=yce,_ce=Function.prototype,xce=_ce.toString;function wce(e){if(e!=null){try{return xce.call(e)}catch{}try{return e+""}catch{}}return""}var S5=wce,Oce=XE,Sce=bce,Ece=ss,Cce=S5,Pce=/[\\^$.*+?()[\]{}|]/g,Tce=/^\[object .+?Constructor\]$/,jce=Function.prototype,Ace=Object.prototype,kce=jce.toString,Nce=Ace.hasOwnProperty,Mce=RegExp("^"+kce.call(Nce).replace(Pce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Lce(e){if(!Ece(e)||Sce(e))return!1;var t=Oce(e)?Mce:Tce;return t.test(Cce(e))}var Rce=Lce;function $ce(e,t){return e==null?void 0:e[t]}var Ice=$ce,Dce=Rce,Fce=Ice;function Bce(e,t){var n=Fce(e,t);return Dce(n)?n:void 0}var wl=Bce,Uce=wl,zce=Uce(Object,"create"),g0=zce,sk=g0;function Vce(){this.__data__=sk?sk(null):{},this.size=0}var Wce=Vce;function Hce(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Gce=Hce,qce=g0,Kce="__lodash_hash_undefined__",Yce=Object.prototype,Zce=Yce.hasOwnProperty;function Xce(e){var t=this.__data__;if(qce){var n=t[e];return n===Kce?void 0:n}return Zce.call(t,e)?t[e]:void 0}var Qce=Xce,Jce=g0,eue=Object.prototype,tue=eue.hasOwnProperty;function nue(e){var t=this.__data__;return Jce?t[e]!==void 0:tue.call(t,e)}var rue=nue,iue=g0,oue="__lodash_hash_undefined__";function aue(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iue&&t===void 0?oue:t,this}var sue=aue,lue=Wce,cue=Gce,uue=Qce,fue=rue,due=sue;function Ru(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var jue=Tue,Aue=y0;function kue(e,t){var n=this.__data__,r=Aue(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Nue=kue,Mue=mue,Lue=Oue,Rue=Cue,$ue=jue,Iue=Nue;function $u(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t"u"?typeof window<"u"?window:typeof self<"u"?self:tc:globalThis)})(s2,s2.exports);var ose=s2.exports;const Js=({children:e})=>m.jsx("small",{className:"form-text text-muted d-block",children:e}),ase=({toggleRealTimeUpdates:e,setRealTimeUpdatesInterval:t})=>{const{enabled:n,interval:r}=_r("realTimeUpdates",{enabled:!0}),i=R.useId();return m.jsxs(xt,{title:"Real-time updates",className:"h-100",children:[m.jsx(eo,{children:m.jsxs(ul,{checked:n,onChange:e,children:["Enable or disable real-time updates.",m.jsxs(Js,{children:["Real-time updates are currently being ",m.jsx("b",{children:n?"processed":"ignored"}),"."]})]})}),m.jsxs(ku,{noMargin:!0,label:"Real-time updates frequency (in minutes):",labelClassName:Ce("form-label",{"text-muted":!n}),id:i,children:[m.jsx(Fn,{type:"number",min:0,placeholder:"Immediate",disabled:!n,value:`${r??""}`,id:i,onChange:({target:o})=>t(Number(o.value))}),n&&m.jsx(Js,{children:r?m.jsxs("span",{children:["Updates will be reflected in the UI every ",m.jsx("b",{children:r})," minute",r>1&&"s","."]}):"Updates will be reflected in the UI as soon as they happen."})]})]})},N1=e=>e==="includes"?"Suggest tags including input":"Suggest tags starting with input",sse=e=>e==="includes"?m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"including"})," provided input."]}):m.jsxs(m.Fragment,{children:["The list of suggested tags will contain those ",m.jsx("b",{children:"starting with"})," provided input."]}),lse=({updateShortUrlCreationSettings:e})=>{const t=_r("shortUrlCreation",{validateUrls:!1}),n=r=>()=>e({...t??{validateUrls:!1},tagFilteringMode:r});return m.jsxs(xt,{title:"Short URLs form",className:"h-100",children:[m.jsx(eo,{children:m.jsxs(ul,{checked:t.validateUrls??!1,onChange:r=>e({...t,validateUrls:r}),children:["Request validation on long URLs when creating new short URLs."," ",m.jsxs("b",{children:["This option is ignored by Shlink ",">=","4.0.0"]}),m.jsxs(Js,{children:["The initial state of the ",m.jsx("b",{children:"Validate URL"})," checkbox will be ",m.jsx("b",{children:t.validateUrls?"checked":"unchecked"}),"."]})]})}),m.jsx(eo,{children:m.jsxs(ul,{checked:t.forwardQuery??!0,onChange:r=>e({...t,forwardQuery:r}),children:["Make all new short URLs forward their query params to the long URL.",m.jsxs(Js,{children:["The initial state of the ",m.jsx("b",{children:"Forward query params on redirect"})," checkbox will be ",m.jsx("b",{children:t.forwardQuery??!0?"checked":"unchecked"}),"."]})]})}),m.jsxs(ku,{noMargin:!0,label:"Tag suggestions search mode:",children:[m.jsxs(ta,{text:N1(t.tagFilteringMode),children:[m.jsx(Ne,{active:!t.tagFilteringMode||t.tagFilteringMode==="startsWith",onClick:n("startsWith"),children:N1("startsWith")}),m.jsx(Ne,{active:t.tagFilteringMode==="includes",onClick:n("includes"),children:N1("includes")})]}),m.jsx(Js,{children:sse(t.tagFilteringMode)})]})]})},cse={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},use=({updateShortUrlsListSettings:e,defaultOrdering:t})=>{const n=_r("shortUrlsList");return m.jsx(xt,{title:"Short URLs list",className:"h-100",children:m.jsx(ku,{noMargin:!0,label:"Default ordering for short URLs list:",children:m.jsx(up,{items:cse,order:(n==null?void 0:n.defaultOrdering)??t,onChange:(r,i)=>e({defaultOrdering:{field:r,dir:i}})})})})},fse={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},dse=({updateTagsSettings:e})=>{const t=_r("tags",{});return m.jsx(xt,{title:"Tags",className:"h-100",children:m.jsx(ku,{noMargin:!0,label:"Default ordering for tags list:",children:m.jsx(up,{items:fse,order:t.defaultOrdering??{},onChange:(n,r)=>e({...t,defaultOrdering:{field:n,dir:r}})})})})},hse=({updateUiSettings:e,_matchMedia:t})=>{const n=_r("ui"),r=R.useMemo(()=>(n==null?void 0:n.theme)??RE(t),[n==null?void 0:n.theme,t]);return m.jsxs(xt,{title:"User interface",className:"h-100",children:[m.jsx(je,{icon:r==="dark"?VK:AK,className:"float-end mt-1"}),m.jsx(ul,{checked:r==="dark",onChange:i=>{e({...n,theme:i?"dark":"light"})},children:"Use dark theme."})]})},c5={today:"Today",yesterday:"Yesterday",last7Days:"Last 7 days",last30Days:"Last 30 days",last90Days:"Last 90 days",last180Days:"Last 180 days",last365Days:"Last 365 days"},pse=(e,t)=>!e||e==="all"?t:c5[e],mse=({onChange:e,active:t,allText:n})=>m.jsxs(ta,{text:pse(t,n),children:[m.jsx(Ne,{active:t==="all",onClick:()=>e("all"),children:n}),m.jsx(Ne,{divider:!0}),Object.entries(c5).map(([r,i])=>m.jsx(Ne,{active:t===r,onClick:()=>e(r),children:i},r))]}),Wk=e=>(e==null?void 0:e.defaultInterval)??"last30Days",vse=({updateVisitsSettings:e})=>{const t=_r("visits"),n=R.useCallback(({defaultInterval:r,...i})=>e({defaultInterval:r??Wk(t),...i}),[e,t]);return m.jsxs(xt,{title:"Visits",className:"h-100",children:[m.jsx(eo,{children:m.jsxs(ul,{checked:!!(t!=null&&t.excludeBots),onChange:r=>n({excludeBots:r}),children:["Exclude bots wherever possible (this option‘s effect might depend on Shlink server‘s version).",m.jsxs(Js,{children:["The visits coming from potential bots will be ",m.jsx("b",{children:t!=null&&t.excludeBots?"excluded":"included"}),"."]})]})}),m.jsx(eo,{children:m.jsxs(ul,{checked:!!(t!=null&&t.loadPrevInterval),onChange:r=>n({loadPrevInterval:r}),children:["Compare visits with previous period.",m.jsxs(Js,{children:["When loading visits, previous period ",m.jsx("b",{children:t!=null&&t.loadPrevInterval?"will":"won't"})," be loaded by default."]})]})}),m.jsx(ku,{noMargin:!0,label:"Default interval to load on visits sections:",children:m.jsx(mse,{allText:"All visits",active:Wk(t),onChange:r=>n({defaultInterval:r})})})]})},M1=({items:e})=>m.jsx(m.Fragment,{children:e.map((t,n)=>m.jsx("div",{className:"mb-3",children:t},n))}),gse=({settings:e,updateSettings:t,defaultShortUrlsListOrdering:n})=>{const r=R.useCallback(s=>t(m0(e,s)),[e,t]),i=R.useCallback(s=>r({realTimeUpdates:{enabled:s}}),[r]),o=R.useCallback(s=>r({realTimeUpdates:{interval:s}}),[r]),a=R.useCallback((s,l)=>r({[s]:l}),[r]);return m.jsxs(d5,{value:e,children:[m.jsxs(AD,{className:"mb-3",children:[m.jsx(pd,{to:"general",children:"General"}),m.jsx(pd,{to:"short-urls",children:"Short URLs"}),m.jsx(pd,{to:"other-items",children:"Other items"})]}),m.jsxs(Xy,{children:[m.jsx(ot,{path:"general",element:m.jsx(M1,{items:[m.jsx(hse,{updateUiSettings:s=>a("ui",s)}),m.jsx(ase,{toggleRealTimeUpdates:i,setRealTimeUpdatesInterval:o})]})}),m.jsx(ot,{path:"short-urls",element:m.jsx(M1,{items:[m.jsx(lse,{updateShortUrlCreationSettings:s=>a("shortUrlCreation",s)}),m.jsx(use,{defaultOrdering:n,updateShortUrlsListSettings:s=>a("shortUrlsList",s)})]})}),m.jsx(ot,{path:"other-items",element:m.jsx(M1,{items:[m.jsx(dse,{updateTagsSettings:s=>a("tags",s)}),m.jsx(vse,{updateVisitsSettings:s=>a("visits",s)})]})}),m.jsx(ot,{path:"*",element:m.jsx(qS,{replace:!0,to:"general"})})]})]})},u5={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:{field:"dateCreated",dir:"DESC"}}},f5=R.createContext(u5),{Provider:d5}=f5,qE=()=>R.useContext(f5)??u5;function _r(e,t){return qE()[e]??t}const yse={prefix:"far",iconName:"circle-right",icon:[512,512,[61838,"arrow-alt-circle-right"],"f35a","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 151.2c-4.2-4.6-10.1-7.2-16.4-7.2C266 144 256 154 256 166.3l0 41.7-96 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l96 0 0 41.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.4-7.2l84-91c3.5-3.8 5.4-8.7 5.4-13.9s-1.9-10.1-5.4-13.9l-84-91z"]},bse=yse,_se={prefix:"far",iconName:"circle",icon:[512,512,[128308,128309,128992,128993,128994,128995,128996,9679,9898,9899,11044,61708,61915],"f111","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"]},h5={prefix:"far",iconName:"clone",icon:[512,512,[],"f24d","M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z"]},xse=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Hk=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(xse);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Gk=e=>e==="*"||e==="x"||e==="X",qk=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},wse=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],Ose=(e,t)=>{if(Gk(e)||Gk(t))return 0;const[n,r]=wse(qk(e),qk(t));return n>r?1:n{for(let n=0;n{const n=Hk(e),r=Hk(t),i=n.pop(),o=r.pop(),a=Kk(n,r);return a!==0?a:i&&o?Kk(i.split("."),o.split(".")):i||o?i?-1:1:0},l2=(e,t,n)=>{Ese(n);const r=Sse(e,t);return p5[n].includes(r)},p5={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Yk=Object.keys(p5),Ese=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Yk.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Yk.join("|")}`)},Cse={prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},Pse={prefix:"fab",iconName:"android",icon:[576,512,[],"f17b","M420.55,301.93a24,24,0,1,1,24-24,24,24,0,0,1-24,24m-265.1,0a24,24,0,1,1,24-24,24,24,0,0,1-24,24m273.7-144.48,47.94-83a10,10,0,1,0-17.27-10h0l-48.54,84.07a301.25,301.25,0,0,0-246.56,0L116.18,64.45a10,10,0,1,0-17.27,10h0l47.94,83C64.53,202.22,8.24,285.55,0,384H576c-8.24-98.45-64.54-181.78-146.85-226.55"]},As={Enter:"Enter",Escape:"Escape",Tab:"Tab",Backspace:"Backspace",UpArrow:"ArrowUp",UpArrowCompat:"Up",DownArrow:"ArrowDown",DownArrowCompat:"Down",PageDown:"PageDown",PageUp:"PageUp"},KE=Symbol("Create new tag"),m5=Symbol("No options"),Jl=()=>{},xn=V.createContext(void 0);function Zk(e,t){return e===t?[]:e.filter(n=>!t.includes(n))}function Tse(e){return e.selectionStart===0&&e.selectionEnd===0}function jse(e){const t=e.value.length;return e.selectionStart===t&&e.selectionEnd===t}function v0(e){return`${e}-label`}function Ase(e){return`${e}-combobox`}function kse(e){return`${e}-input`}function v5(e){return`${e}-listbox`}function g5(e,t){return`${e}-option-${Dse(t)}`}function Nse(e,t){if((e==null?void 0:e.value)===KE&&e.disabled===!1)return{value:t,label:t}}function Mse(e){const t=Nse(e.activeOption,e.value)||e.activeOption||zse(e.value,e.options);return t&&!t.disabled?t:void 0}function Lse(e,t,n){const r=t-1;return e>r?n:en===e.value)}const Fse=/[-\\^$*+?.()|[\]{}]/g;function y5(e){return e.replace(Fse,"\\$&")}function b5(e){return new RegExp(y5(e),"i")}function Bse(e){return new RegExp(`^${y5(e)}$`,"i")}function Use(e,t){if(e){const n=b5(e);return t.filter(r=>n.test(r.label))}else return[].concat(t)}function zse(e,t){const n=Bse(e);return t.find(r=>n.test(r.label))||null}const Vse={autoComplete:"off",autoCorrect:"off","data-form-type":"other",spellCheck:!1};function Wse({allowBackspace:e,ariaDescribedBy:t,ariaErrorMessage:n,delimiterKeys:r}){const{id:i,comboBoxRef:o,inputRef:a,isDisabled:s,isInvalid:l,managerRef:c}=R.useContext(xn),f=R.useMemo(()=>{const g=N=>{const I=N.currentTarget.value;c.current.updateInputValue(I),document.activeElement===a.current&&c.current.listBoxExpand(I)},y=()=>{c.current.listBoxExpand()},x=N=>{var I;((I=o.current)==null?void 0:I.contains(N.relatedTarget))===!1&&c.current.listBoxCollapse()},_=()=>{c.current.listBoxExpand()},b=N=>{const{activeIndex:I,isExpanded:F}=c.current.state;F?(N.preventDefault(),c.current.updateActiveIndex(I+1)):(jse(N.currentTarget)||N.altKey)&&(N.preventDefault(),c.current.listBoxExpand())},w=N=>{const{activeIndex:I,isExpanded:F}=c.current.state;F?(N.preventDefault(),c.current.updateActiveIndex(I-1)):Tse(N.currentTarget)&&(N.preventDefault(),c.current.listBoxExpand())},S=N=>{const{isExpanded:I,options:F}=c.current.state;I&&(N.preventDefault(),c.current.updateActiveIndex(F.length-1))},E=N=>{c.current.state.isExpanded&&(N.preventDefault(),c.current.updateActiveIndex(0))},C=()=>{c.current.state.isExpanded?c.current.listBoxCollapse():c.current.updateInputValue("")},T=()=>{if(e){const{value:N,selected:I}=c.current.state,F=I[I.length-1];N===""&&F&&c.current.selectTag(F)}},A=N=>{c.current.state.isExpanded&&(N.preventDefault(),c.current.selectTag())};return{onBlur:x,onChange:g,onClick:_,onFocus:y,onKeyDown:N=>{if(N.key===As.UpArrow)return w(N);if(N.key===As.DownArrow)return b(N);if(N.key===As.PageUp)return E(N);if(N.key===As.PageDown)return S(N);if(N.key===As.Escape)return C();if(N.key===As.Backspace)return T();if(r.includes(N.key))return A(N)}}},[e,o,r,a,c]),{activeOption:d,isExpanded:p,value:v}=c.current.state;return{...Vse,"aria-autocomplete":"list","aria-activedescendant":d?g5(i,d):void 0,"aria-controls":v5(i),"aria-describedby":t||void 0,"aria-disabled":s,"aria-errormessage":l&&n||void 0,"aria-invalid":l,"aria-labelledby":v0(i),"aria-expanded":p,id:kse(i),onBlur:s?Jl:f.onBlur,onChange:s?Jl:f.onChange,onClick:s?Jl:f.onClick,onFocus:s?Jl:f.onFocus,onKeyDown:s?Jl:f.onKeyDown,ref:a,role:"combobox",type:"text",value:v}}const Hse={position:"absolute",width:0,height:0,visibility:"hidden",overflow:"scroll",whiteSpace:"pre"},Gse=["font-family","font-size","font-style","font-weight","letter-spacing","text-transform"];function qse({allowResize:e=!0,text:t}){const n=R.useRef(null),{inputRef:r}=R.useContext(xn),[i,o]=R.useState(null);return R.useLayoutEffect(()=>{if(e&&r.current&&n.current&&window.getComputedStyle){const a=window.getComputedStyle(r.current);Gse.forEach(s=>{const l=a.getPropertyValue(s);n.current.style.setProperty(s,l)})}},[e,r,n]),R.useLayoutEffect(()=>{var a;if(e){const s=Math.ceil(((a=n.current)==null?void 0:a.scrollWidth)??0)+2;i!==s&&o(s)}},[e,t,i]),{width:i,sizerProps:{ref:n,style:Hse}}}function Kse(){const{id:e,inputRef:t,listBoxRef:n,managerRef:r}=R.useContext(xn),i=r.current.state.activeIndex===-1,o=R.useCallback(a=>{var s;a.target!==t.current&&((s=t.current)==null||s.focus({preventScroll:!0}))},[t]);return R.useEffect(()=>{var a;i&&((a=n.current)==null||a.scrollTo({top:0}))},[n,i]),{"aria-labelledby":v0(e),id:v5(e),onFocus:o,ref:n,role:"listbox",tabIndex:-1}}function Yse({activateFirstOption:e,allowNew:t,collapseOnSelect:n,newOptionText:r,noOptionsText:i,onAdd:o,onDelete:a,onCollapse:s,onExpand:l,onInput:c,onShouldCollapse:f,onShouldExpand:d,onValidate:p,selected:v,suggestions:g,suggestionsTransform:y}){const x=R.useRef(),[_,b]=R.useState(null),[w,S]=R.useState(!1),[E,C]=R.useState(""),T=R.useMemo(()=>{const W=y(E,g);return E&&(t&&W.push({disabled:p?!p(E):!1,label:r,value:KE}),W.length===0&&W.push({disabled:!0,label:i,value:m5})),W},[t,r,i,p,g,y,E]),A=_?u2(_,T):-1,D=e?Math.max(A,0):A,N=T[D],I={activeIndex:D,activeOption:N,isExpanded:w,options:T,selected:v,value:E},F={tagsAdded:x.current?Zk(v,x.current.state.selected):[],tagsDeleted:x.current?Zk(x.current.state.selected,v):[]},K={listBoxCollapse(W){w&&(!f||f(W??I.value))&&(S(!1),b(null),s==null||s())},listBoxExpand(W){w||(!d||d(W??I.value))&&(S(!0),b(T[D]),l==null||l())},updateActiveIndex(W){const X=Lse(W,T.length,e?0:-1);b(T[X])},updateInputValue(W){E!==W&&(C(W),c==null||c(W))},selectTag(W){if(W??(W=Mse(I)),W){const X=u2(W,I.selected);X>-1?a(X):o(W),n&&this.listBoxCollapse(),this.updateInputValue("")}}};return x.current={...K,flags:F,state:I},x}function Zse(e){const{id:t,inputRef:n,listBoxRef:r,managerRef:i}=R.useContext(xn),o=R.useRef(null),a=i.current.state.options[e],s=e===i.current.state.activeIndex,l=a.disabled??!1,c=u2(a,i.current.state.selected)>-1,f=R.useCallback(()=>{var p;i.current.selectTag(),(p=n.current)==null||p.focus()},[n,i]),d=R.useCallback(()=>{e!==i.current.state.activeIndex&&i.current.updateActiveIndex(e)},[e,i]);return Jse(o,r,s),{option:{...a,active:s,disabled:l,index:e,selected:c},optionProps:{"aria-disabled":l,"aria-posinset":e+1,"aria-selected":l?void 0:c,"aria-setsize":i.current.state.options.length,id:g5(t,a),onClick:f,onMouseDown:d,ref:o,role:"option",tabIndex:-1}}}function Xse({inputRef:e,managerRef:t}){return R.useRef({input:{blur(){var r;(r=e.current)==null||r.blur()},focus(){var r;(r=e.current)==null||r.focus()},get value(){return t.current.state.value},set value(r){typeof r!="string"&&(r=String(r)),t.current.updateInputValue(r)}},listBox:{collapse(){t.current.listBoxCollapse()},expand(){t.current.listBoxExpand()},get activeOption(){return t.current.state.activeOption},get isExpanded(){return t.current.state.isExpanded}},select(r){t.current.selectTag(r)}}).current}function Qse({onBlur:e,onFocus:t}){const[n,r]=R.useState(!1),{id:i,inputRef:o,rootRef:a}=R.useContext(xn),s=R.useMemo(()=>({"aria-describedby":v0(i),id:i,onFocus(){r(!0),t==null||t()},onBlur(){var l;(l=a.current)!=null&&l.contains(document.activeElement)||(r(!1),e==null||e())},onClick(){var l;document.activeElement===a.current&&((l=o.current)==null||l.focus())},ref:a,tabIndex:-1}),[o,i,e,t,a]);return{isActive:n,rootProps:s}}function Jse(e,t,n){R.useEffect(()=>{var r,i,o,a;if(n){const s=(r=e.current)==null?void 0:r.offsetHeight,l=(i=e.current)==null?void 0:i.offsetTop,c=(o=t.current)==null?void 0:o.offsetHeight,f=(a=t.current)==null?void 0:a.scrollTop;lf+c&&t.current.scrollTo(0,l+s-c)}},[n,t,e])}function ele(e,t){const{isDisabled:n,managerRef:r}=R.useContext(xn),i=r.current.state.selected[e],o=R.useCallback(()=>r.current.selectTag(i),[r,i]);return{tag:i,tagProps:{"aria-disabled":n,title:Eg(t,i.label),onClick:n?Jl:o}}}function tle(){var e;const{rootRef:t,managerRef:n}=R.useContext(xn),r=R.useRef(),i=n.current.flags.tagsDeleted[0],o=(e=r.current)==null?void 0:e.contains(document.activeElement);return R.useLayoutEffect(()=>{var a,s;if(i){const l=(a=r.current)==null?void 0:a.contains(document.activeElement);o&&!l&&((s=t.current)==null||s.focus({preventScroll:!0}))}},[o,r,t,i]),{listRef:r}}const nle={position:"absolute",width:1,height:1,left:-9999,overflow:"hidden",clip:"rect(0 0 0 0)"};function rle({ariaAddedText:e,ariaDeletedText:t}){const{managerRef:n}=R.useContext(xn),r=R.useRef([]);return n.current.flags.tagsAdded.forEach(i=>{r.current.push(Eg(e,i.label))}),n.current.flags.tagsDeleted.forEach(i=>{r.current.push(Eg(t,i.label))}),V.createElement("div",{"aria-live":"polite","aria-relevant":"additions",role:"status",style:nle},r.current.join(` +`))}function ile({children:e}){const{classNames:t,comboBoxRef:n,id:r}=R.useContext(xn);return V.createElement("div",{className:t.comboBox,id:Ase(r),ref:n},e)}const ole=({classNames:e,text:t})=>V.createElement("mark",{className:e.highlight},t);function ale({option:e,query:t,render:n=ole}){const{classNames:r}=R.useContext(xn);if(e.value===KE||e.value===m5)return V.createElement(V.Fragment,null,Eg(e.label,t));if(t){const i=$se(e.label,t);if(i){const o=n({text:i[1],classNames:r});return V.createElement(V.Fragment,null,i[0],o,i[2])}}return V.createElement(V.Fragment,null,e.label)}const sle=V.memo(ale),lle=({classNames:e,inputWidth:t,...n})=>V.createElement("input",{className:e.input,style:{width:t},...n});function cle({allowBackspace:e=!0,allowResize:t=!0,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i,placeholderText:o,render:a=lle}){const{classNames:s}=R.useContext(xn),{value:l,...c}=Wse({allowBackspace:e,ariaDescribedBy:n,ariaErrorMessage:r,delimiterKeys:i}),f=l.lengthV.createElement("div",{className:t.label,id:n},e);function fle({children:e,render:t=ule}){const{classNames:n,id:r}=R.useContext(xn);return t({children:e,classNames:n,id:v0(r)})}const dle=({children:e,classNames:t,...n})=>V.createElement("div",{className:t.listBox,...n},e);function hle({children:e,render:t=dle}){const{classNames:n,managerRef:r}=R.useContext(xn),i=Kse();return!r.current.state.isExpanded||V.Children.count(e)===0?null:t({children:e,classNames:n,...i})}const ple=({children:e,classNames:t,option:n,...r})=>{const i=[t.option];return n.active&&i.push(t.optionIsActive),V.createElement("div",{className:i.join(" "),...r},e)};function mle({children:e,index:t,render:n=ple}){const{classNames:r}=R.useContext(xn),{option:i,optionProps:o}=Zse(t);return n({classNames:r,children:e,option:i,...o})}const vle=({children:e,classNames:t,isActive:n,isDisabled:r,isInvalid:i,...o})=>{const a=[t.root];return n&&a.push(t.rootIsActive),r&&a.push(t.rootIsDisabled),i&&a.push(t.rootIsInvalid),V.createElement("div",{className:a.join(" "),...o},e)};function gle({children:e,onBlur:t,onFocus:n,render:r=vle}){const{classNames:i,isDisabled:o,isInvalid:a}=R.useContext(xn),{isActive:s,rootProps:l}=Qse({onBlur:t,onFocus:n});return r({children:e,classNames:i,isActive:s,isDisabled:o,isInvalid:a,...l})}const yle=({classNames:e,tag:t,...n})=>V.createElement("button",{type:"button",className:e.tag,...n},V.createElement("span",{className:e.tagName},t.label));function ble({render:e=yle,index:t,title:n}){const{classNames:r}=R.useContext(xn),{tag:i,tagProps:o}=ele(t,n);return e({classNames:r,tag:i,...o})}function _le({children:e,label:t}){const{classNames:n}=R.useContext(xn),{listRef:r}=tle();return V.createElement("ul",{className:n.tagList,"aria-label":t,ref:r,role:"list"},e.map(i=>V.createElement("li",{className:n.tagListItem,key:i.key,role:"listitem"},i)))}const xle={root:"react-tags",rootIsActive:"is-active",rootIsDisabled:"is-disabled",rootIsInvalid:"is-invalid",label:"react-tags__label",tagList:"react-tags__list",tagListItem:"react-tags__list-item",tag:"react-tags__tag",tagName:"react-tags__tag-name",comboBox:"react-tags__combobox",input:"react-tags__combobox-input",listBox:"react-tags__listbox",option:"react-tags__listbox-option",optionIsActive:"is-active",highlight:"react-tags__listbox-option-highlight"},wle=[As.Enter];function Ole({activateFirstOption:e=!1,allowBackspace:t=!0,allowNew:n=!1,allowResize:r=!0,ariaAddedText:i="Added tag %value%",ariaDescribedBy:o,ariaErrorMessage:a,ariaDeletedText:s="Removed tag %value%",classNames:l=xle,collapseOnSelect:c=!1,deleteButtonText:f="Remove %value% from the list",delimiterKeys:d=wle,id:p="react-tags",isDisabled:v=!1,isInvalid:g=!1,labelText:y="Select tags",newOptionText:x="Add %value%",noOptionsText:_="No options found for %value%",onAdd:b,onBlur:w,onCollapse:S,onDelete:E,onExpand:C,onFocus:T,onInput:A,onShouldCollapse:D,onShouldExpand:N,onValidate:I,placeholderText:F="Add a tag",renderHighlight:K,renderInput:W,renderLabel:X,renderListBox:Q,renderOption:ne,renderRoot:Z,renderTag:z,selected:B=[],suggestions:H=[],suggestionsTransform:ee=Use,tagListLabelText:q="Selected tags"},te){const ie=R.useRef(null),ae=R.useRef(null),fe=R.useRef(null),j=R.useRef(null),k=Yse({activateFirstOption:e,allowNew:n,collapseOnSelect:c,newOptionText:x,noOptionsText:_,onAdd:b,onDelete:E,onCollapse:S,onExpand:C,onInput:A,onShouldCollapse:D,onShouldExpand:N,onValidate:I,selected:B,suggestions:H,suggestionsTransform:ee}),U=Xse({inputRef:ae,managerRef:k});return te&&(typeof te=="function"?te(U):te.current=U),V.createElement(xn.Provider,{value:{classNames:l,comboBoxRef:ie,id:p,inputRef:ae,isDisabled:v,isInvalid:g,listBoxRef:fe,managerRef:k,rootRef:j}},V.createElement(gle,{onBlur:w,onFocus:T,render:Z},V.createElement(fle,{render:X},y),V.createElement(_le,{label:q},k.current.state.selected.map((J,Y)=>V.createElement(ble,{key:c2(J),index:Y,render:z,title:f}))),V.createElement(ile,null,V.createElement(cle,{allowBackspace:t,allowResize:r,ariaDescribedBy:o,ariaErrorMessage:a,delimiterKeys:d,placeholderText:F,render:W}),V.createElement(hle,{render:Q},k.current.state.options.map((J,Y)=>V.createElement(mle,{key:c2(J),index:Y,render:ne},V.createElement(sle,{option:J,query:k.current.state.value,render:K}))))),V.createElement(rle,{ariaAddedText:i,ariaDeletedText:s})))}const Sle=V.forwardRef(Ole);function L1(e){return e==null?"":`${e}`}function Ele(e={}){const{separator:t,decimals:n}=e;return t?n?r=>r.toFixed(n).replace(".",t):r=>`${r}`.replace(".",t):n?r=>r.toFixed(n):r=>`${r}`}function YE(e={}){const t=typeof e.quote=="string"?e.quote:'"',n=typeof e.escapedQuote=="string"?e.escapedQuote:`${t}${t}`;if(!t||t===n)return i=>i;const r=new RegExp(t,"g");return i=>(i.includes(t)&&(i=i.replace(r,n)),`${t}${i}${t}`)}function Cle(e={stringFormatter:YE()}){return t=>e.stringFormatter(t.toString().slice(7,-1))}function Ple(e={stringFormatter:YE()}){return t=>{if(t===null)return"";let n=JSON.stringify(t);return n===void 0?"":(n[0]==='"'&&(n=n.replace(/^"(.+)"$/,"$1")),e.stringFormatter(n))}}const Tle=RegExp(`[^.[\\]]+|\\[(?:([^"'][^[]*)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))`,"g");function jle(e){var t,n,r;const i=[];let o;for(;o=Tle.exec(e);)i.push((r=(t=o[3])!==null&&t!==void 0?t:(n=o[1])===null||n===void 0?void 0:n.trim())!==null&&r!==void 0?r:o[0]);return i}function Xk(e,t,n){if(t in e){const o=e[t];return o===void 0?n:o}const r=Array.isArray(t)?t:jle(t);let i=e;for(const o of r)if(i=i==null?void 0:i[o],i===void 0)return n;return i}function _5(e,t){try{return Array.isArray(t)?e.push(...t):e.push(t),e}catch{return e.concat(t)}}function f2(e,t){let n=!0;return e.reduce((r,i)=>(i==null&&(i=""),n?(n=!1,`${i}`):`${r}${t}${i}`),"")}var Qk;(function(e){e.header="header",e.undefined="undefined",e.boolean="boolean",e.number="number",e.bigint="bigint",e.string="string",e.symbol="symbol",e.function="function",e.object="object"})(Qk||(Qk={}));class Ale{constructor(t){this.opts=this.preprocessOpts(t)}preprocessOpts(t){const n=Object.assign({},t);n.fields&&(n.fields=this.preprocessFieldsInfo(n.fields,n.defaultValue)),n.transforms=n.transforms||[];const r=n.formatters&&n.formatters.string||YE(),i=Ple({stringFormatter:r}),o={header:r,undefined:L1,boolean:L1,number:Ele(),bigint:L1,string:r,symbol:Cle({stringFormatter:r}),function:i,object:i};return n.formatters=Object.assign(Object.assign({},o),n.formatters),n.delimiter=n.delimiter||",",n.eol=n.eol||` +`,n.header=n.header!==!1,n.includeEmptyRows=n.includeEmptyRows||!1,n.withBOM=n.withBOM||!1,n}preprocessFieldsInfo(t,n){return t.map(r=>{if(typeof r=="string")return{label:r,value:i=>Xk(i,r,n)};if(typeof r=="object"){const i="default"in r?r.default:n;if(typeof r.value=="string"){const o=r.value;return{label:r.label||r.value,value:a=>Xk(a,o,i)}}if(typeof r.value=="function"){const o=r.label||r.value.name||"",a={label:o,default:i},s=r.value;return{label:o,value(l){const c=s(l,a);return c===void 0?i:c}}}}throw new Error("Invalid field info option. "+JSON.stringify(r))})}getHeader(){return f2(this.opts.fields.map(t=>this.opts.formatters.header(t.label)),this.opts.delimiter)}preprocessRow(t){return this.opts.transforms.reduce((n,r)=>n.map(i=>r(i)).reduce(_5,[]),[t])}processRow(t){if(!t)return;const n=this.opts.fields.map(r=>this.processCell(t,r));if(!(!this.opts.includeEmptyRows&&n.every(r=>r==="")))return f2(n,this.opts.delimiter)}processCell(t,n){return this.processValue(n.value(t))}processValue(t){const n=this.opts.formatters[typeof t];return n(t)}}class x5 extends Ale{constructor(t){super(t)}parse(t){const n=this.preprocessData(t);this.opts.fields=this.opts.fields||this.preprocessFieldsInfo(n.reduce((a,s)=>(Object.keys(s).forEach(l=>{a.includes(l)||a.push(l)}),a),[]),this.opts.defaultValue);const r=this.opts.header?this.getHeader():"",i=this.processData(n);return(this.opts.withBOM?"\uFEFF":"")+r+(r&&i?this.opts.eol:"")+i}preprocessData(t){const n=Array.isArray(t)?t:[t];if(!this.opts.fields){if(t==null||n.length===0)throw new Error('Data should not be empty or the "fields" option should be included');if(typeof n[0]!="object")throw new Error('Data items should be objects or the "fields" option should be included')}return this.opts.transforms.length===0?n:n.map(r=>this.preprocessRow(r)).reduce(_5,[])}processData(t){return f2(t.map(n=>this.processRow(n)).filter(n=>n),this.opts.eol)}}var mn;(function(e){e[e.BACKSPACE=8]="BACKSPACE",e[e.FORM_FEED=12]="FORM_FEED",e[e.NEWLINE=10]="NEWLINE",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.TAB=9]="TAB",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.NUMBER_SIGN=35]="NUMBER_SIGN",e[e.DOLLAR_SIGN=36]="DOLLAR_SIGN",e[e.PERCENT_SIGN=37]="PERCENT_SIGN",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.LEFT_PARENTHESIS=40]="LEFT_PARENTHESIS",e[e.RIGHT_PARENTHESIS=41]="RIGHT_PARENTHESIS",e[e.ASTERISK=42]="ASTERISK",e[e.PLUS_SIGN=43]="PLUS_SIGN",e[e.COMMA=44]="COMMA",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.FULL_STOP=46]="FULL_STOP",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_ZERO=48]="DIGIT_ZERO",e[e.DIGIT_ONE=49]="DIGIT_ONE",e[e.DIGIT_TWO=50]="DIGIT_TWO",e[e.DIGIT_THREE=51]="DIGIT_THREE",e[e.DIGIT_FOUR=52]="DIGIT_FOUR",e[e.DIGIT_FIVE=53]="DIGIT_FIVE",e[e.DIGIT_SIX=54]="DIGIT_SIX",e[e.DIGIT_SEVEN=55]="DIGIT_SEVEN",e[e.DIGIT_EIGHT=56]="DIGIT_EIGHT",e[e.DIGIT_NINE=57]="DIGIT_NINE",e[e.COLON=58]="COLON",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.COMMERCIAL_AT=64]="COMMERCIAL_AT",e[e.LATIN_CAPITAL_LETTER_A=65]="LATIN_CAPITAL_LETTER_A",e[e.LATIN_CAPITAL_LETTER_B=66]="LATIN_CAPITAL_LETTER_B",e[e.LATIN_CAPITAL_LETTER_C=67]="LATIN_CAPITAL_LETTER_C",e[e.LATIN_CAPITAL_LETTER_D=68]="LATIN_CAPITAL_LETTER_D",e[e.LATIN_CAPITAL_LETTER_E=69]="LATIN_CAPITAL_LETTER_E",e[e.LATIN_CAPITAL_LETTER_F=70]="LATIN_CAPITAL_LETTER_F",e[e.LATIN_CAPITAL_LETTER_G=71]="LATIN_CAPITAL_LETTER_G",e[e.LATIN_CAPITAL_LETTER_H=72]="LATIN_CAPITAL_LETTER_H",e[e.LATIN_CAPITAL_LETTER_I=73]="LATIN_CAPITAL_LETTER_I",e[e.LATIN_CAPITAL_LETTER_J=74]="LATIN_CAPITAL_LETTER_J",e[e.LATIN_CAPITAL_LETTER_K=75]="LATIN_CAPITAL_LETTER_K",e[e.LATIN_CAPITAL_LETTER_L=76]="LATIN_CAPITAL_LETTER_L",e[e.LATIN_CAPITAL_LETTER_M=77]="LATIN_CAPITAL_LETTER_M",e[e.LATIN_CAPITAL_LETTER_N=78]="LATIN_CAPITAL_LETTER_N",e[e.LATIN_CAPITAL_LETTER_O=79]="LATIN_CAPITAL_LETTER_O",e[e.LATIN_CAPITAL_LETTER_P=80]="LATIN_CAPITAL_LETTER_P",e[e.LATIN_CAPITAL_LETTER_Q=81]="LATIN_CAPITAL_LETTER_Q",e[e.LATIN_CAPITAL_LETTER_R=82]="LATIN_CAPITAL_LETTER_R",e[e.LATIN_CAPITAL_LETTER_S=83]="LATIN_CAPITAL_LETTER_S",e[e.LATIN_CAPITAL_LETTER_T=84]="LATIN_CAPITAL_LETTER_T",e[e.LATIN_CAPITAL_LETTER_U=85]="LATIN_CAPITAL_LETTER_U",e[e.LATIN_CAPITAL_LETTER_V=86]="LATIN_CAPITAL_LETTER_V",e[e.LATIN_CAPITAL_LETTER_W=87]="LATIN_CAPITAL_LETTER_W",e[e.LATIN_CAPITAL_LETTER_X=88]="LATIN_CAPITAL_LETTER_X",e[e.LATIN_CAPITAL_LETTER_Y=89]="LATIN_CAPITAL_LETTER_Y",e[e.LATIN_CAPITAL_LETTER_Z=90]="LATIN_CAPITAL_LETTER_Z",e[e.LEFT_SQUARE_BRACKET=91]="LEFT_SQUARE_BRACKET",e[e.REVERSE_SOLIDUS=92]="REVERSE_SOLIDUS",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.CIRCUMFLEX_ACCENT=94]="CIRCUMFLEX_ACCENT",e[e.LOW_LINE=95]="LOW_LINE",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_LETTER_A=97]="LATIN_SMALL_LETTER_A",e[e.LATIN_SMALL_LETTER_B=98]="LATIN_SMALL_LETTER_B",e[e.LATIN_SMALL_LETTER_C=99]="LATIN_SMALL_LETTER_C",e[e.LATIN_SMALL_LETTER_D=100]="LATIN_SMALL_LETTER_D",e[e.LATIN_SMALL_LETTER_E=101]="LATIN_SMALL_LETTER_E",e[e.LATIN_SMALL_LETTER_F=102]="LATIN_SMALL_LETTER_F",e[e.LATIN_SMALL_LETTER_G=103]="LATIN_SMALL_LETTER_G",e[e.LATIN_SMALL_LETTER_H=104]="LATIN_SMALL_LETTER_H",e[e.LATIN_SMALL_LETTER_I=105]="LATIN_SMALL_LETTER_I",e[e.LATIN_SMALL_LETTER_J=106]="LATIN_SMALL_LETTER_J",e[e.LATIN_SMALL_LETTER_K=107]="LATIN_SMALL_LETTER_K",e[e.LATIN_SMALL_LETTER_L=108]="LATIN_SMALL_LETTER_L",e[e.LATIN_SMALL_LETTER_M=109]="LATIN_SMALL_LETTER_M",e[e.LATIN_SMALL_LETTER_N=110]="LATIN_SMALL_LETTER_N",e[e.LATIN_SMALL_LETTER_O=111]="LATIN_SMALL_LETTER_O",e[e.LATIN_SMALL_LETTER_P=112]="LATIN_SMALL_LETTER_P",e[e.LATIN_SMALL_LETTER_Q=113]="LATIN_SMALL_LETTER_Q",e[e.LATIN_SMALL_LETTER_R=114]="LATIN_SMALL_LETTER_R",e[e.LATIN_SMALL_LETTER_S=115]="LATIN_SMALL_LETTER_S",e[e.LATIN_SMALL_LETTER_T=116]="LATIN_SMALL_LETTER_T",e[e.LATIN_SMALL_LETTER_U=117]="LATIN_SMALL_LETTER_U",e[e.LATIN_SMALL_LETTER_V=118]="LATIN_SMALL_LETTER_V",e[e.LATIN_SMALL_LETTER_W=119]="LATIN_SMALL_LETTER_W",e[e.LATIN_SMALL_LETTER_X=120]="LATIN_SMALL_LETTER_X",e[e.LATIN_SMALL_LETTER_Y=121]="LATIN_SMALL_LETTER_Y",e[e.LATIN_SMALL_LETTER_Z=122]="LATIN_SMALL_LETTER_Z",e[e.LEFT_CURLY_BRACKET=123]="LEFT_CURLY_BRACKET",e[e.VERTICAL_LINE=124]="VERTICAL_LINE",e[e.RIGHT_CURLY_BRACKET=125]="RIGHT_CURLY_BRACKET",e[e.TILDE=126]="TILDE"})(mn||(mn={}));mn.QUOTATION_MARK+"",mn.QUOTATION_MARK,mn.REVERSE_SOLIDUS+"",mn.REVERSE_SOLIDUS,mn.SOLIDUS+"",mn.SOLIDUS,mn.LATIN_SMALL_LETTER_B+"",mn.BACKSPACE,mn.LATIN_SMALL_LETTER_F+"",mn.FORM_FEED,mn.LATIN_SMALL_LETTER_N+"",mn.NEWLINE,mn.LATIN_SMALL_LETTER_R+"",mn.CARRIAGE_RETURN,mn.LATIN_SMALL_LETTER_T+"",mn.TAB;var Jk;(function(e){e[e.LEFT_BRACE=0]="LEFT_BRACE",e[e.RIGHT_BRACE=1]="RIGHT_BRACE",e[e.LEFT_BRACKET=2]="LEFT_BRACKET",e[e.RIGHT_BRACKET=3]="RIGHT_BRACKET",e[e.COLON=4]="COLON",e[e.COMMA=5]="COMMA",e[e.TRUE=6]="TRUE",e[e.FALSE=7]="FALSE",e[e.NULL=8]="NULL",e[e.STRING=9]="STRING",e[e.NUMBER=10]="NUMBER",e[e.SEPARATOR=11]="SEPARATOR"})(Jk||(Jk={}));var e3;(function(e){e[e.START=0]="START",e[e.ENDED=1]="ENDED",e[e.ERROR=2]="ERROR",e[e.TRUE1=3]="TRUE1",e[e.TRUE2=4]="TRUE2",e[e.TRUE3=5]="TRUE3",e[e.FALSE1=6]="FALSE1",e[e.FALSE2=7]="FALSE2",e[e.FALSE3=8]="FALSE3",e[e.FALSE4=9]="FALSE4",e[e.NULL1=10]="NULL1",e[e.NULL2=11]="NULL2",e[e.NULL3=12]="NULL3",e[e.STRING_DEFAULT=13]="STRING_DEFAULT",e[e.STRING_AFTER_BACKSLASH=14]="STRING_AFTER_BACKSLASH",e[e.STRING_UNICODE_DIGIT_1=15]="STRING_UNICODE_DIGIT_1",e[e.STRING_UNICODE_DIGIT_2=16]="STRING_UNICODE_DIGIT_2",e[e.STRING_UNICODE_DIGIT_3=17]="STRING_UNICODE_DIGIT_3",e[e.STRING_UNICODE_DIGIT_4=18]="STRING_UNICODE_DIGIT_4",e[e.STRING_INCOMPLETE_CHAR=19]="STRING_INCOMPLETE_CHAR",e[e.NUMBER_AFTER_INITIAL_MINUS=20]="NUMBER_AFTER_INITIAL_MINUS",e[e.NUMBER_AFTER_INITIAL_ZERO=21]="NUMBER_AFTER_INITIAL_ZERO",e[e.NUMBER_AFTER_INITIAL_NON_ZERO=22]="NUMBER_AFTER_INITIAL_NON_ZERO",e[e.NUMBER_AFTER_FULL_STOP=23]="NUMBER_AFTER_FULL_STOP",e[e.NUMBER_AFTER_DECIMAL=24]="NUMBER_AFTER_DECIMAL",e[e.NUMBER_AFTER_E=25]="NUMBER_AFTER_E",e[e.NUMBER_AFTER_E_AND_SIGN=26]="NUMBER_AFTER_E_AND_SIGN",e[e.NUMBER_AFTER_E_AND_DIGIT=27]="NUMBER_AFTER_E_AND_DIGIT",e[e.SEPARATOR=28]="SEPARATOR",e[e.BOM_OR_START=29]="BOM_OR_START",e[e.BOM=30]="BOM"})(e3||(e3={}));var t3;(function(e){e[e.OBJECT=0]="OBJECT",e[e.ARRAY=1]="ARRAY"})(t3||(t3={}));var n3;(function(e){e[e.VALUE=0]="VALUE",e[e.KEY=1]="KEY",e[e.COLON=2]="COLON",e[e.COMMA=3]="COMMA",e[e.ENDED=4]="ENDED",e[e.ERROR=5]="ERROR",e[e.SEPARATOR=6]="SEPARATOR"})(n3||(n3={}));var kle=Array.isArray,xr=kle,Nle=typeof tc=="object"&&tc&&tc.Object===Object&&tc,w5=Nle,Mle=w5,Lle=typeof self=="object"&&self&&self.Object===Object&&self,Rle=Mle||Lle||Function("return this")(),bo=Rle,$le=bo,Ile=$le.Symbol,dp=Ile,r3=dp,O5=Object.prototype,Dle=O5.hasOwnProperty,Fle=O5.toString,Tf=r3?r3.toStringTag:void 0;function Ble(e){var t=Dle.call(e,Tf),n=e[Tf];try{e[Tf]=void 0;var r=!0}catch{}var i=Fle.call(e);return r&&(t?e[Tf]=n:delete e[Tf]),i}var Ule=Ble,zle=Object.prototype,Vle=zle.toString;function Wle(e){return Vle.call(e)}var Hle=Wle,i3=dp,Gle=Ule,qle=Hle,Kle="[object Null]",Yle="[object Undefined]",o3=i3?i3.toStringTag:void 0;function Zle(e){return e==null?e===void 0?Yle:Kle:o3&&o3 in Object(e)?Gle(e):qle(e)}var na=Zle;function Xle(e){return e!=null&&typeof e=="object"}var ra=Xle,Qle=na,Jle=ra,ece="[object Symbol]";function tce(e){return typeof e=="symbol"||Jle(e)&&Qle(e)==ece}var Mu=tce,nce=xr,rce=Mu,ice=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oce=/^\w*$/;function ace(e,t){if(nce(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||rce(e)?!0:oce.test(e)||!ice.test(e)||t!=null&&e in Object(t)}var ZE=ace;function sce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ss=sce;const Lu=at(ss);var lce=na,cce=ss,uce="[object AsyncFunction]",fce="[object Function]",dce="[object GeneratorFunction]",hce="[object Proxy]";function pce(e){if(!cce(e))return!1;var t=lce(e);return t==fce||t==dce||t==uce||t==hce}var XE=pce;const Ve=at(XE);var mce=bo,vce=mce["__core-js_shared__"],gce=vce,R1=gce,a3=function(){var e=/[^.]+$/.exec(R1&&R1.keys&&R1.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function yce(e){return!!a3&&a3 in e}var bce=yce,_ce=Function.prototype,xce=_ce.toString;function wce(e){if(e!=null){try{return xce.call(e)}catch{}try{return e+""}catch{}}return""}var S5=wce,Oce=XE,Sce=bce,Ece=ss,Cce=S5,Pce=/[\\^$.*+?()[\]{}|]/g,Tce=/^\[object .+?Constructor\]$/,jce=Function.prototype,Ace=Object.prototype,kce=jce.toString,Nce=Ace.hasOwnProperty,Mce=RegExp("^"+kce.call(Nce).replace(Pce,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Lce(e){if(!Ece(e)||Sce(e))return!1;var t=Oce(e)?Mce:Tce;return t.test(Cce(e))}var Rce=Lce;function $ce(e,t){return e==null?void 0:e[t]}var Ice=$ce,Dce=Rce,Fce=Ice;function Bce(e,t){var n=Fce(e,t);return Dce(n)?n:void 0}var wl=Bce,Uce=wl,zce=Uce(Object,"create"),g0=zce,s3=g0;function Vce(){this.__data__=s3?s3(null):{},this.size=0}var Wce=Vce;function Hce(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Gce=Hce,qce=g0,Kce="__lodash_hash_undefined__",Yce=Object.prototype,Zce=Yce.hasOwnProperty;function Xce(e){var t=this.__data__;if(qce){var n=t[e];return n===Kce?void 0:n}return Zce.call(t,e)?t[e]:void 0}var Qce=Xce,Jce=g0,eue=Object.prototype,tue=eue.hasOwnProperty;function nue(e){var t=this.__data__;return Jce?t[e]!==void 0:tue.call(t,e)}var rue=nue,iue=g0,oue="__lodash_hash_undefined__";function aue(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=iue&&t===void 0?oue:t,this}var sue=aue,lue=Wce,cue=Gce,uue=Qce,fue=rue,due=sue;function Ru(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var jue=Tue,Aue=y0;function kue(e,t){var n=this.__data__,r=Aue(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Nue=kue,Mue=mue,Lue=Oue,Rue=Cue,$ue=jue,Iue=Nue;function $u(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Us=function(t){return hp(t)&&t.indexOf("%")===t.length-1},Ee=function(t){return sde(t)&&!Du(t)},cn=function(t){return Ee(t)||hp(t)},fde=0,ls=function(t){var n=++fde;return"".concat(t||"").concat(n)},Xn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ee(t)&&!hp(t))return r;var o;if(Us(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Du(o)&&(o=r),i&&o>n&&(o=n),o},xa=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},dde=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bde(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function p2(e){"@babel/helpers - typeof";return p2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p2(e)}var pk={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},Ro=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},mk=null,I1=null,lC=function e(t){if(t===mk&&Array.isArray(I1))return I1;var n=[];return R.Children.forEach(t,function(r){Ue(r)||(d2.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),I1=n,mk=t,n};function tr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Ro(i)}):r=[Ro(t)],lC(e).forEach(function(i){var o=Mr(i,"type.displayName")||Mr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Cr(e,t){var n=tr(e,t);return n&&n[0]}var vk=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Ee(r)||r<=0||!Ee(i)||i<=0)},_de=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xde=function(t){return t&&t.type&&hp(t.type)&&_de.indexOf(t.type)>=0},L5=function(t){return t&&p2(t)==="object"&&"cx"in t&&"cy"in t&&"r"in t},wde=function(t,n,r,i){var o,a=(o=$1==null?void 0:$1[i])!==null&&o!==void 0?o:[];return!Ve(t)&&(i&&a.includes(n)||mde.includes(n))||r&&sC.includes(n)},De=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(R.isValidElement(t)&&(i=t.props),!Lu(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;wde((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},m2=function e(t,n){if(t===n)return!0;var r=R.Children.count(t);if(r!==R.Children.count(n))return!1;if(r===0)return!0;if(r===1)return gk(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pde(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function g2(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,c=Cde(e,Ede),f=i||{width:n,height:r,x:0,y:0},d=Ce("recharts-surface",o);return V.createElement("svg",v2({},De(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),V.createElement("title",null,s),V.createElement("desc",null,l),t)}var Tde=["children","className"];function y2(){return y2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ade(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Xe=V.forwardRef(function(e,t){var n=e.children,r=e.className,i=jde(e,Tde),o=Ce("recharts-layer",r);return V.createElement("g",y2({className:o},De(i,!0),{ref:t}),n)}),ki=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:Mde(e,t,n)}var Rde=Lde,$de="\\ud800-\\udfff",Ide="\\u0300-\\u036f",Dde="\\ufe20-\\ufe2f",Fde="\\u20d0-\\u20ff",Bde=Ide+Dde+Fde,Ude="\\ufe0e\\ufe0f",zde="\\u200d",Vde=RegExp("["+zde+$de+Bde+Ude+"]");function Wde(e){return Vde.test(e)}var R5=Wde;function Hde(e){return e.split("")}var Gde=Hde,$5="\\ud800-\\udfff",qde="\\u0300-\\u036f",Kde="\\ufe20-\\ufe2f",Yde="\\u20d0-\\u20ff",Zde=qde+Kde+Yde,Xde="\\ufe0e\\ufe0f",Qde="["+$5+"]",b2="["+Zde+"]",_2="\\ud83c[\\udffb-\\udfff]",Jde="(?:"+b2+"|"+_2+")",I5="[^"+$5+"]",D5="(?:\\ud83c[\\udde6-\\uddff]){2}",F5="[\\ud800-\\udbff][\\udc00-\\udfff]",ehe="\\u200d",B5=Jde+"?",U5="["+Xde+"]?",the="(?:"+ehe+"(?:"+[I5,D5,F5].join("|")+")"+U5+B5+")*",nhe=U5+B5+the,rhe="(?:"+[I5+b2+"?",b2,D5,F5,Qde].join("|")+")",ihe=RegExp(_2+"(?="+_2+")|"+rhe+nhe,"g");function ohe(e){return e.match(ihe)||[]}var ahe=ohe,she=Gde,lhe=R5,che=ahe;function uhe(e){return lhe(e)?che(e):she(e)}var fhe=uhe,dhe=Rde,hhe=R5,phe=fhe,mhe=T5;function vhe(e){return function(t){t=mhe(t);var n=hhe(t)?phe(t):void 0,r=n?n[0]:t.charAt(0),i=n?dhe(n,1).join(""):t.slice(1);return r[e]()+i}}var ghe=vhe,yhe=ghe,bhe=yhe("toUpperCase"),_he=bhe;const N0=at(_he);function _t(e){return function(){return e}}const z5=Math.cos,Tg=Math.sin,Fi=Math.sqrt,jg=Math.PI,M0=2*jg,x2=Math.PI,w2=2*x2,ks=1e-6,xhe=w2-ks;function V5(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return V5;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iks)if(!(Math.abs(d*l-c*f)>ks)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-a,g=i-s,y=l*l+c*c,x=v*v+g*g,_=Math.sqrt(y),b=Math.sqrt(p),w=o*Math.tan((x2-Math.acos((y+p-x)/(2*_*b)))/2),S=w/b,E=w/_;Math.abs(S-1)>ks&&this._append`L${t+S*f},${n+S*d}`,this._append`A${o},${o},0,0,${+(d*v>f*g)},${this._x1=t+E*l},${this._y1=n+E*c}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,f=n+l,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>ks||Math.abs(this._y1-f)>ks)&&this._append`L${c},${f}`,r&&(p<0&&(p=p%w2+w2),p>xhe?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=f}`:p>ks&&this._append`A${r},${r},0,${+(p>=x2)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function cC(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Ohe(t)}function uC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function W5(e){this._context=e}W5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function L0(e){return new W5(e)}function H5(e){return e[0]}function G5(e){return e[1]}function q5(e,t){var n=_t(!0),r=null,i=L0,o=null,a=cC(s);e=typeof e=="function"?e:e===void 0?H5:_t(e),t=typeof t=="function"?t:t===void 0?G5:_t(t);function s(l){var c,f=(l=uC(l)).length,d,p=!1,v;for(r==null&&(o=i(v=a())),c=0;c<=f;++c)!(c=v;--g)s.point(w[g],S[g]);s.lineEnd(),s.areaEnd()}_&&(w[p]=+e(x,p,d),S[p]=+t(x,p,d),s.point(r?+r(x,p,d):w[p],n?+n(x,p,d):S[p]))}if(b)return s=null,b+""||null}function f(){return q5().defined(i).curve(a).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:_t(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:_t(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:_t(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:_t(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:_t(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:_t(+d),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:_t(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),c):a},c.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),c):o},c}class K5{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function She(e){return new K5(e,!0)}function Ehe(e){return new K5(e,!1)}const fC={draw(e,t){const n=Fi(t/jg);e.moveTo(n,0),e.arc(0,0,n,0,M0)}},Che={draw(e,t){const n=Fi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Y5=Fi(1/3),Phe=Y5*2,The={draw(e,t){const n=Fi(t/Phe),r=n*Y5;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},jhe={draw(e,t){const n=Fi(t),r=-n/2;e.rect(r,r,n,n)}},Ahe=.8908130915292852,Z5=Tg(jg/10)/Tg(7*jg/10),khe=Tg(M0/10)*Z5,Nhe=-z5(M0/10)*Z5,Mhe={draw(e,t){const n=Fi(t*Ahe),r=khe*n,i=Nhe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=M0*o/5,s=z5(a),l=Tg(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},D1=Fi(3),Lhe={draw(e,t){const n=-Fi(t/(D1*3));e.moveTo(0,n*2),e.lineTo(-D1*n,-n),e.lineTo(D1*n,-n),e.closePath()}},Gr=-.5,qr=Fi(3)/2,O2=1/Fi(12),Rhe=(O2/2+1)*3,$he={draw(e,t){const n=Fi(t/Rhe),r=n/2,i=n*O2,o=r,a=n*O2+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Gr*r-qr*i,qr*r+Gr*i),e.lineTo(Gr*o-qr*a,qr*o+Gr*a),e.lineTo(Gr*s-qr*l,qr*s+Gr*l),e.lineTo(Gr*r+qr*i,Gr*i-qr*r),e.lineTo(Gr*o+qr*a,Gr*a-qr*o),e.lineTo(Gr*s+qr*l,Gr*l-qr*s),e.closePath()}};function Ihe(e,t){let n=null,r=cC(i);e=typeof e=="function"?e:_t(e||fC),t=typeof t=="function"?t:_t(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:_t(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:_t(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Ag(){}function kg(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function X5(e){this._context=e}X5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:kg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dhe(e){return new X5(e)}function Q5(e){this._context=e}Q5.prototype={areaStart:Ag,areaEnd:Ag,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fhe(e){return new Q5(e)}function J5(e){this._context=e}J5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bhe(e){return new J5(e)}function e8(e){this._context=e}e8.prototype={areaStart:Ag,areaEnd:Ag,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Uhe(e){return new e8(e)}function bk(e){return e<0?-1:1}function _k(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(bk(o)+bk(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function xk(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function F1(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Ng(e){this._context=e}Ng.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:F1(this,this._t0,xk(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,F1(this,xk(this,n=_k(this,e,t)),n);break;default:F1(this,this._t0,n=_k(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function t8(e){this._context=new n8(e)}(t8.prototype=Object.create(Ng.prototype)).point=function(e,t){Ng.prototype.point.call(this,t,e)};function n8(e){this._context=e}n8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function zhe(e){return new Ng(e)}function Vhe(e){return new t8(e)}function r8(e){this._context=e}r8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=wk(e),i=wk(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Hhe(e){return new R0(e,.5)}function Ghe(e){return new R0(e,0)}function qhe(e){return new R0(e,1)}function eu(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function Khe(e,t){return e[t]}function Yhe(e){const t=[];return t.key=e,t}function Zhe(){var e=_t([]),t=S2,n=eu,r=Khe;function i(o){var a=Array.from(e.apply(this,arguments),Yhe),s,l=a.length,c=-1,f;for(const d of o)for(s=0,++c;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ope(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var i8={symbolCircle:fC,symbolCross:Che,symbolDiamond:The,symbolSquare:jhe,symbolStar:Mhe,symbolTriangle:Lhe,symbolWye:$he},ape=Math.PI/180,spe=function(t){var n="symbol".concat(N0(t));return i8[n]||fC},lpe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*ape;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},cpe=function(t,n){i8["symbol".concat(N0(t))]=n},$0=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,l=ipe(t,epe),c=Sk(Sk({},l),{},{type:r,size:o,sizeType:s}),f=function(){var x=spe(r),_=Ihe().type(x).size(lpe(o,s,r));return _()},d=c.className,p=c.cx,v=c.cy,g=De(c,!0);return p===+p&&v===+v&&o===+o?V.createElement("path",E2({},g,{className:Ce("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:f()})):null};$0.registerSymbol=cpe;function tu(e){"@babel/helpers - typeof";return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function C2(){return C2=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?1:-1},Us=function(t){return hp(t)&&t.indexOf("%")===t.length-1},Ee=function(t){return sde(t)&&!Du(t)},cn=function(t){return Ee(t)||hp(t)},fde=0,ls=function(t){var n=++fde;return"".concat(t||"").concat(n)},Xn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Ee(t)&&!hp(t))return r;var o;if(Us(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Du(o)&&(o=r),i&&o>n&&(o=n),o},xa=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},dde=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bde(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function p2(e){"@babel/helpers - typeof";return p2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p2(e)}var p3={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},Ro=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},m3=null,I1=null,lC=function e(t){if(t===m3&&Array.isArray(I1))return I1;var n=[];return R.Children.forEach(t,function(r){Ue(r)||(d2.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),I1=n,m3=t,n};function tr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Ro(i)}):r=[Ro(t)],lC(e).forEach(function(i){var o=Mr(i,"type.displayName")||Mr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Cr(e,t){var n=tr(e,t);return n&&n[0]}var v3=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Ee(r)||r<=0||!Ee(i)||i<=0)},_de=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],xde=function(t){return t&&t.type&&hp(t.type)&&_de.indexOf(t.type)>=0},L5=function(t){return t&&p2(t)==="object"&&"cx"in t&&"cy"in t&&"r"in t},wde=function(t,n,r,i){var o,a=(o=$1==null?void 0:$1[i])!==null&&o!==void 0?o:[];return!Ve(t)&&(i&&a.includes(n)||mde.includes(n))||r&&sC.includes(n)},De=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(R.isValidElement(t)&&(i=t.props),!Lu(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;wde((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},m2=function e(t,n){if(t===n)return!0;var r=R.Children.count(t);if(r!==R.Children.count(n))return!1;if(r===0)return!0;if(r===1)return g3(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pde(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function g2(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,c=Cde(e,Ede),f=i||{width:n,height:r,x:0,y:0},d=Ce("recharts-surface",o);return V.createElement("svg",v2({},De(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),V.createElement("title",null,s),V.createElement("desc",null,l),t)}var Tde=["children","className"];function y2(){return y2=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ade(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Xe=V.forwardRef(function(e,t){var n=e.children,r=e.className,i=jde(e,Tde),o=Ce("recharts-layer",r);return V.createElement("g",y2({className:o},De(i,!0),{ref:t}),n)}),ki=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:Mde(e,t,n)}var Rde=Lde,$de="\\ud800-\\udfff",Ide="\\u0300-\\u036f",Dde="\\ufe20-\\ufe2f",Fde="\\u20d0-\\u20ff",Bde=Ide+Dde+Fde,Ude="\\ufe0e\\ufe0f",zde="\\u200d",Vde=RegExp("["+zde+$de+Bde+Ude+"]");function Wde(e){return Vde.test(e)}var R5=Wde;function Hde(e){return e.split("")}var Gde=Hde,$5="\\ud800-\\udfff",qde="\\u0300-\\u036f",Kde="\\ufe20-\\ufe2f",Yde="\\u20d0-\\u20ff",Zde=qde+Kde+Yde,Xde="\\ufe0e\\ufe0f",Qde="["+$5+"]",b2="["+Zde+"]",_2="\\ud83c[\\udffb-\\udfff]",Jde="(?:"+b2+"|"+_2+")",I5="[^"+$5+"]",D5="(?:\\ud83c[\\udde6-\\uddff]){2}",F5="[\\ud800-\\udbff][\\udc00-\\udfff]",ehe="\\u200d",B5=Jde+"?",U5="["+Xde+"]?",the="(?:"+ehe+"(?:"+[I5,D5,F5].join("|")+")"+U5+B5+")*",nhe=U5+B5+the,rhe="(?:"+[I5+b2+"?",b2,D5,F5,Qde].join("|")+")",ihe=RegExp(_2+"(?="+_2+")|"+rhe+nhe,"g");function ohe(e){return e.match(ihe)||[]}var ahe=ohe,she=Gde,lhe=R5,che=ahe;function uhe(e){return lhe(e)?che(e):she(e)}var fhe=uhe,dhe=Rde,hhe=R5,phe=fhe,mhe=T5;function vhe(e){return function(t){t=mhe(t);var n=hhe(t)?phe(t):void 0,r=n?n[0]:t.charAt(0),i=n?dhe(n,1).join(""):t.slice(1);return r[e]()+i}}var ghe=vhe,yhe=ghe,bhe=yhe("toUpperCase"),_he=bhe;const N0=at(_he);function _t(e){return function(){return e}}const z5=Math.cos,Tg=Math.sin,Fi=Math.sqrt,jg=Math.PI,M0=2*jg,x2=Math.PI,w2=2*x2,ks=1e-6,xhe=w2-ks;function V5(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return V5;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iks)if(!(Math.abs(d*l-c*f)>ks)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-a,g=i-s,y=l*l+c*c,x=v*v+g*g,_=Math.sqrt(y),b=Math.sqrt(p),w=o*Math.tan((x2-Math.acos((y+p-x)/(2*_*b)))/2),S=w/b,E=w/_;Math.abs(S-1)>ks&&this._append`L${t+S*f},${n+S*d}`,this._append`A${o},${o},0,0,${+(d*v>f*g)},${this._x1=t+E*l},${this._y1=n+E*c}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,f=n+l,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>ks||Math.abs(this._y1-f)>ks)&&this._append`L${c},${f}`,r&&(p<0&&(p=p%w2+w2),p>xhe?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=f}`:p>ks&&this._append`A${r},${r},0,${+(p>=x2)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function cC(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Ohe(t)}function uC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function W5(e){this._context=e}W5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function L0(e){return new W5(e)}function H5(e){return e[0]}function G5(e){return e[1]}function q5(e,t){var n=_t(!0),r=null,i=L0,o=null,a=cC(s);e=typeof e=="function"?e:e===void 0?H5:_t(e),t=typeof t=="function"?t:t===void 0?G5:_t(t);function s(l){var c,f=(l=uC(l)).length,d,p=!1,v;for(r==null&&(o=i(v=a())),c=0;c<=f;++c)!(c=v;--g)s.point(w[g],S[g]);s.lineEnd(),s.areaEnd()}_&&(w[p]=+e(x,p,d),S[p]=+t(x,p,d),s.point(r?+r(x,p,d):w[p],n?+n(x,p,d):S[p]))}if(b)return s=null,b+""||null}function f(){return q5().defined(i).curve(a).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:_t(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:_t(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:_t(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:_t(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:_t(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:_t(+d),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:_t(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),c):a},c.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),c):o},c}class K5{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function She(e){return new K5(e,!0)}function Ehe(e){return new K5(e,!1)}const fC={draw(e,t){const n=Fi(t/jg);e.moveTo(n,0),e.arc(0,0,n,0,M0)}},Che={draw(e,t){const n=Fi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Y5=Fi(1/3),Phe=Y5*2,The={draw(e,t){const n=Fi(t/Phe),r=n*Y5;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},jhe={draw(e,t){const n=Fi(t),r=-n/2;e.rect(r,r,n,n)}},Ahe=.8908130915292852,Z5=Tg(jg/10)/Tg(7*jg/10),khe=Tg(M0/10)*Z5,Nhe=-z5(M0/10)*Z5,Mhe={draw(e,t){const n=Fi(t*Ahe),r=khe*n,i=Nhe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=M0*o/5,s=z5(a),l=Tg(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},D1=Fi(3),Lhe={draw(e,t){const n=-Fi(t/(D1*3));e.moveTo(0,n*2),e.lineTo(-D1*n,-n),e.lineTo(D1*n,-n),e.closePath()}},Gr=-.5,qr=Fi(3)/2,O2=1/Fi(12),Rhe=(O2/2+1)*3,$he={draw(e,t){const n=Fi(t/Rhe),r=n/2,i=n*O2,o=r,a=n*O2+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Gr*r-qr*i,qr*r+Gr*i),e.lineTo(Gr*o-qr*a,qr*o+Gr*a),e.lineTo(Gr*s-qr*l,qr*s+Gr*l),e.lineTo(Gr*r+qr*i,Gr*i-qr*r),e.lineTo(Gr*o+qr*a,Gr*a-qr*o),e.lineTo(Gr*s+qr*l,Gr*l-qr*s),e.closePath()}};function Ihe(e,t){let n=null,r=cC(i);e=typeof e=="function"?e:_t(e||fC),t=typeof t=="function"?t:_t(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:_t(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:_t(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Ag(){}function kg(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function X5(e){this._context=e}X5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:kg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Dhe(e){return new X5(e)}function Q5(e){this._context=e}Q5.prototype={areaStart:Ag,areaEnd:Ag,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fhe(e){return new Q5(e)}function J5(e){this._context=e}J5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bhe(e){return new J5(e)}function e8(e){this._context=e}e8.prototype={areaStart:Ag,areaEnd:Ag,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Uhe(e){return new e8(e)}function b3(e){return e<0?-1:1}function _3(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(b3(o)+b3(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function x3(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function F1(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Ng(e){this._context=e}Ng.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:F1(this,this._t0,x3(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,F1(this,x3(this,n=_3(this,e,t)),n);break;default:F1(this,this._t0,n=_3(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function t8(e){this._context=new n8(e)}(t8.prototype=Object.create(Ng.prototype)).point=function(e,t){Ng.prototype.point.call(this,t,e)};function n8(e){this._context=e}n8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function zhe(e){return new Ng(e)}function Vhe(e){return new t8(e)}function r8(e){this._context=e}r8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=w3(e),i=w3(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Hhe(e){return new R0(e,.5)}function Ghe(e){return new R0(e,0)}function qhe(e){return new R0(e,1)}function eu(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function Khe(e,t){return e[t]}function Yhe(e){const t=[];return t.key=e,t}function Zhe(){var e=_t([]),t=S2,n=eu,r=Khe;function i(o){var a=Array.from(e.apply(this,arguments),Yhe),s,l=a.length,c=-1,f;for(const d of o)for(s=0,++c;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ope(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var i8={symbolCircle:fC,symbolCross:Che,symbolDiamond:The,symbolSquare:jhe,symbolStar:Mhe,symbolTriangle:Lhe,symbolWye:$he},ape=Math.PI/180,spe=function(t){var n="symbol".concat(N0(t));return i8[n]||fC},lpe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*ape;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},cpe=function(t,n){i8["symbol".concat(N0(t))]=n},$0=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,l=ipe(t,epe),c=S3(S3({},l),{},{type:r,size:o,sizeType:s}),f=function(){var x=spe(r),_=Ihe().type(x).size(lpe(o,s,r));return _()},d=c.className,p=c.cx,v=c.cy,g=De(c,!0);return p===+p&&v===+v&&o===+o?V.createElement("path",E2({},g,{className:Ce("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(v,")"),d:f()})):null};$0.registerSymbol=cpe;function tu(e){"@babel/helpers - typeof";return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function C2(){return C2=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=v.inactive?c:v.color;return V.createElement("li",C2({className:x,style:d,key:"legend-item-".concat(g)},Za(r.props,v,g)),V.createElement(g2,{width:a,height:a,viewBox:f,style:p},r.renderIcon(v)),V.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},y?y(_,v,g):_))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return V.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}]),t}(R.PureComponent);lh(dC,"displayName","Legend");lh(dC,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var ype=b0;function bpe(){this.__data__=new ype,this.size=0}var _pe=bpe;function xpe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var wpe=xpe;function Ope(e){return this.__data__.get(e)}var Spe=Ope;function Epe(e){return this.__data__.has(e)}var Cpe=Epe,Ppe=b0,Tpe=JE,jpe=eC,Ape=200;function kpe(e,t){var n=this.__data__;if(n instanceof Ppe){var r=n.__data__;if(!Tpe||r.lengths))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var d=-1,p=!0,v=n&Jpe?new Ype:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=rve}var vC=ive,ove=na,ave=vC,sve=ra,lve="[object Arguments]",cve="[object Array]",uve="[object Boolean]",fve="[object Date]",dve="[object Error]",hve="[object Function]",pve="[object Map]",mve="[object Number]",vve="[object Object]",gve="[object RegExp]",yve="[object Set]",bve="[object String]",_ve="[object WeakMap]",xve="[object ArrayBuffer]",wve="[object DataView]",Ove="[object Float32Array]",Sve="[object Float64Array]",Eve="[object Int8Array]",Cve="[object Int16Array]",Pve="[object Int32Array]",Tve="[object Uint8Array]",jve="[object Uint8ClampedArray]",Ave="[object Uint16Array]",kve="[object Uint32Array]",Ct={};Ct[Ove]=Ct[Sve]=Ct[Eve]=Ct[Cve]=Ct[Pve]=Ct[Tve]=Ct[jve]=Ct[Ave]=Ct[kve]=!0;Ct[lve]=Ct[cve]=Ct[xve]=Ct[uve]=Ct[wve]=Ct[fve]=Ct[dve]=Ct[hve]=Ct[pve]=Ct[mve]=Ct[vve]=Ct[gve]=Ct[yve]=Ct[bve]=Ct[_ve]=!1;function Nve(e){return sve(e)&&ave(e.length)&&!!Ct[ove(e)]}var Mve=Nve;function Lve(e){return function(t){return e(t)}}var m8=Lve,$g={exports:{}};$g.exports;(function(e,t){var n=w5,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})($g,$g.exports);var Rve=$g.exports,$ve=Mve,Ive=m8,Nk=Rve,Mk=Nk&&Nk.isTypedArray,Dve=Mk?Ive(Mk):$ve,v8=Dve,Fve=zme,Bve=pC,Uve=xr,zve=p8,Vve=mC,Wve=v8,Hve=Object.prototype,Gve=Hve.hasOwnProperty;function qve(e,t){var n=Uve(e),r=!n&&Bve(e),i=!n&&!r&&zve(e),o=!n&&!r&&!i&&Wve(e),a=n||r||i||o,s=a?Fve(e.length,String):[],l=s.length;for(var c in e)(t||Gve.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vve(c,l)))&&s.push(c);return s}var Kve=qve,Yve=Object.prototype;function Zve(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Yve;return e===n}var Xve=Zve;function Qve(e,t){return function(n){return e(t(n))}}var g8=Qve,Jve=g8,ege=Jve(Object.keys,Object),tge=ege,nge=Xve,rge=tge,ige=Object.prototype,oge=ige.hasOwnProperty;function age(e){if(!nge(e))return rge(e);var t=[];for(var n in Object(e))oge.call(e,n)&&n!="constructor"&&t.push(n);return t}var sge=age,lge=XE,cge=vC;function uge(e){return e!=null&&cge(e.length)&&!lge(e)}var pp=uge,fge=Kve,dge=sge,hge=pp;function pge(e){return hge(e)?fge(e):dge(e)}var I0=pge,mge=Ame,vge=Bme,gge=I0;function yge(e){return mge(e,gge,vge)}var bge=yge,Lk=bge,_ge=1,xge=Object.prototype,wge=xge.hasOwnProperty;function Oge(e,t,n,r,i,o){var a=n&_ge,s=Lk(e),l=s.length,c=Lk(t),f=c.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:wge.call(t,p)))return!1}var v=o.get(e),g=o.get(t);if(v&&g)return v==t&&g==e;var y=!0;o.set(e,t),o.set(t,e);for(var x=a;++d-1}var x0e=_0e;function w0e(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=I0e){var c=t?null:R0e(e);if(c)return $0e(c);a=!1,i=L0e,l=new k0e}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Q0e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function J0e(e){return e.value}function ebe(e,t){if(V.isValidElement(e))return V.cloneElement(e,t);if(typeof e=="function")return V.createElement(e,t);t.ref;var n=X0e(t,W0e);return V.createElement(dC,n)}var Zk=1,ch=function(e){Y0e(t,e);function t(){var n;H0e(this,t);for(var r=arguments.length,i=new Array(r),o=0;oZk||Math.abs(i.height-this.lastBoundingBox.height)>Zk)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?bs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,l=i.margin,c=i.chartWidth,f=i.chartHeight,d,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();p={top:((f||0)-g.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return bs(bs({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,d=bs(bs({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return V.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){r.wrapperNode=v}},ebe(o,bs(bs({},this.props),{},{payload:S8(f,c,J0e)})))}}],[{key:"getWithHeight",value:function(r,i){var o=r.props.layout;return o==="vertical"&&Ee(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}]),t}(R.PureComponent);D0(ch,"displayName","Legend");D0(ch,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Xk=dp,tbe=pC,nbe=xr,Qk=Xk?Xk.isConcatSpreadable:void 0;function rbe(e){return nbe(e)||tbe(e)||!!(Qk&&e&&e[Qk])}var ibe=rbe,obe=d8,abe=ibe;function T8(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=abe),i||(i=[]);++o0&&n(s)?t>1?T8(s,t-1,n,r,i):obe(i,s):r||(i[i.length]=s)}return i}var j8=T8;function sbe(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var lbe=sbe,cbe=lbe,ube=cbe(),fbe=ube,dbe=fbe,hbe=I0;function pbe(e,t){return e&&dbe(e,t,hbe)}var A8=pbe,mbe=pp;function vbe(e,t){return function(n,r){if(n==null)return n;if(!mbe(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Abe=jbe,V1=nC,kbe=rC,Nbe=_o,Mbe=k8,Lbe=Ebe,Rbe=m8,$be=Abe,Ibe=Uu,Dbe=xr;function Fbe(e,t,n){t.length?t=V1(t,function(o){return Dbe(o)?function(a){return kbe(a,o.length===1?o[0]:o)}:o}):t=[Ibe];var r=-1;t=V1(t,Rbe(Nbe));var i=Mbe(e,function(o,a,s){var l=V1(t,function(c){return c(o)});return{criteria:l,index:++r,value:o}});return Lbe(i,function(o,a){return $be(o,a,n)})}var Bbe=Fbe;function Ube(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var zbe=Ube,Vbe=zbe,eN=Math.max;function Wbe(e,t,n){return t=eN(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=eN(r.length-t,0),a=Array(o);++i0){if(++t>=e1e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i1e=r1e,o1e=Jbe,a1e=i1e,s1e=a1e(o1e),l1e=s1e,c1e=Uu,u1e=Hbe,f1e=l1e;function d1e(e,t){return f1e(u1e(e,t,c1e),e+"")}var h1e=d1e,p1e=QE,m1e=pp,v1e=mC,g1e=ss;function y1e(e,t,n){if(!g1e(n))return!1;var r=typeof t;return(r=="number"?m1e(n)&&v1e(t,n.length):r=="string"&&t in n)?p1e(n[t],e):!1}var F0=y1e,b1e=j8,_1e=Bbe,x1e=h1e,nN=F0,w1e=x1e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&nN(e,t[0],t[1])?t=[]:n>2&&nN(t[0],t[1],t[2])&&(t=[t[0]]),_1e(e,b1e(t,1),[])}),O1e=w1e;const bC=at(O1e);function uh(e){"@babel/helpers - typeof";return uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uh(e)}function L2(){return L2=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=v.inactive?c:v.color;return V.createElement("li",C2({className:x,style:d,key:"legend-item-".concat(g)},Za(r.props,v,g)),V.createElement(g2,{width:a,height:a,viewBox:f,style:p},r.renderIcon(v)),V.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},y?y(_,v,g):_))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return V.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}]),t}(R.PureComponent);lh(dC,"displayName","Legend");lh(dC,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var ype=b0;function bpe(){this.__data__=new ype,this.size=0}var _pe=bpe;function xpe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var wpe=xpe;function Ope(e){return this.__data__.get(e)}var Spe=Ope;function Epe(e){return this.__data__.has(e)}var Cpe=Epe,Ppe=b0,Tpe=JE,jpe=eC,Ape=200;function kpe(e,t){var n=this.__data__;if(n instanceof Ppe){var r=n.__data__;if(!Tpe||r.lengths))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var d=-1,p=!0,v=n&Jpe?new Ype:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=rve}var vC=ive,ove=na,ave=vC,sve=ra,lve="[object Arguments]",cve="[object Array]",uve="[object Boolean]",fve="[object Date]",dve="[object Error]",hve="[object Function]",pve="[object Map]",mve="[object Number]",vve="[object Object]",gve="[object RegExp]",yve="[object Set]",bve="[object String]",_ve="[object WeakMap]",xve="[object ArrayBuffer]",wve="[object DataView]",Ove="[object Float32Array]",Sve="[object Float64Array]",Eve="[object Int8Array]",Cve="[object Int16Array]",Pve="[object Int32Array]",Tve="[object Uint8Array]",jve="[object Uint8ClampedArray]",Ave="[object Uint16Array]",kve="[object Uint32Array]",Ct={};Ct[Ove]=Ct[Sve]=Ct[Eve]=Ct[Cve]=Ct[Pve]=Ct[Tve]=Ct[jve]=Ct[Ave]=Ct[kve]=!0;Ct[lve]=Ct[cve]=Ct[xve]=Ct[uve]=Ct[wve]=Ct[fve]=Ct[dve]=Ct[hve]=Ct[pve]=Ct[mve]=Ct[vve]=Ct[gve]=Ct[yve]=Ct[bve]=Ct[_ve]=!1;function Nve(e){return sve(e)&&ave(e.length)&&!!Ct[ove(e)]}var Mve=Nve;function Lve(e){return function(t){return e(t)}}var m8=Lve,$g={exports:{}};$g.exports;(function(e,t){var n=w5,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})($g,$g.exports);var Rve=$g.exports,$ve=Mve,Ive=m8,N3=Rve,M3=N3&&N3.isTypedArray,Dve=M3?Ive(M3):$ve,v8=Dve,Fve=zme,Bve=pC,Uve=xr,zve=p8,Vve=mC,Wve=v8,Hve=Object.prototype,Gve=Hve.hasOwnProperty;function qve(e,t){var n=Uve(e),r=!n&&Bve(e),i=!n&&!r&&zve(e),o=!n&&!r&&!i&&Wve(e),a=n||r||i||o,s=a?Fve(e.length,String):[],l=s.length;for(var c in e)(t||Gve.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Vve(c,l)))&&s.push(c);return s}var Kve=qve,Yve=Object.prototype;function Zve(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Yve;return e===n}var Xve=Zve;function Qve(e,t){return function(n){return e(t(n))}}var g8=Qve,Jve=g8,ege=Jve(Object.keys,Object),tge=ege,nge=Xve,rge=tge,ige=Object.prototype,oge=ige.hasOwnProperty;function age(e){if(!nge(e))return rge(e);var t=[];for(var n in Object(e))oge.call(e,n)&&n!="constructor"&&t.push(n);return t}var sge=age,lge=XE,cge=vC;function uge(e){return e!=null&&cge(e.length)&&!lge(e)}var pp=uge,fge=Kve,dge=sge,hge=pp;function pge(e){return hge(e)?fge(e):dge(e)}var I0=pge,mge=Ame,vge=Bme,gge=I0;function yge(e){return mge(e,gge,vge)}var bge=yge,L3=bge,_ge=1,xge=Object.prototype,wge=xge.hasOwnProperty;function Oge(e,t,n,r,i,o){var a=n&_ge,s=L3(e),l=s.length,c=L3(t),f=c.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:wge.call(t,p)))return!1}var v=o.get(e),g=o.get(t);if(v&&g)return v==t&&g==e;var y=!0;o.set(e,t),o.set(t,e);for(var x=a;++d-1}var x0e=_0e;function w0e(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=I0e){var c=t?null:R0e(e);if(c)return $0e(c);a=!1,i=L0e,l=new k0e}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Q0e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function J0e(e){return e.value}function ebe(e,t){if(V.isValidElement(e))return V.cloneElement(e,t);if(typeof e=="function")return V.createElement(e,t);t.ref;var n=X0e(t,W0e);return V.createElement(dC,n)}var Z3=1,ch=function(e){Y0e(t,e);function t(){var n;H0e(this,t);for(var r=arguments.length,i=new Array(r),o=0;oZ3||Math.abs(i.height-this.lastBoundingBox.height)>Z3)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?bs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,l=i.margin,c=i.chartWidth,f=i.chartHeight,d,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var v=this.getBBoxSnapshot();d={left:((c||0)-v.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();p={top:((f||0)-g.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return bs(bs({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,d=bs(bs({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return V.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){r.wrapperNode=v}},ebe(o,bs(bs({},this.props),{},{payload:S8(f,c,J0e)})))}}],[{key:"getWithHeight",value:function(r,i){var o=r.props.layout;return o==="vertical"&&Ee(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}]),t}(R.PureComponent);D0(ch,"displayName","Legend");D0(ch,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var X3=dp,tbe=pC,nbe=xr,Q3=X3?X3.isConcatSpreadable:void 0;function rbe(e){return nbe(e)||tbe(e)||!!(Q3&&e&&e[Q3])}var ibe=rbe,obe=d8,abe=ibe;function T8(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=abe),i||(i=[]);++o0&&n(s)?t>1?T8(s,t-1,n,r,i):obe(i,s):r||(i[i.length]=s)}return i}var j8=T8;function sbe(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var lbe=sbe,cbe=lbe,ube=cbe(),fbe=ube,dbe=fbe,hbe=I0;function pbe(e,t){return e&&dbe(e,t,hbe)}var A8=pbe,mbe=pp;function vbe(e,t){return function(n,r){if(n==null)return n;if(!mbe(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Abe=jbe,V1=nC,kbe=rC,Nbe=_o,Mbe=k8,Lbe=Ebe,Rbe=m8,$be=Abe,Ibe=Uu,Dbe=xr;function Fbe(e,t,n){t.length?t=V1(t,function(o){return Dbe(o)?function(a){return kbe(a,o.length===1?o[0]:o)}:o}):t=[Ibe];var r=-1;t=V1(t,Rbe(Nbe));var i=Mbe(e,function(o,a,s){var l=V1(t,function(c){return c(o)});return{criteria:l,index:++r,value:o}});return Lbe(i,function(o,a){return $be(o,a,n)})}var Bbe=Fbe;function Ube(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var zbe=Ube,Vbe=zbe,eN=Math.max;function Wbe(e,t,n){return t=eN(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=eN(r.length-t,0),a=Array(o);++i0){if(++t>=e1e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i1e=r1e,o1e=Jbe,a1e=i1e,s1e=a1e(o1e),l1e=s1e,c1e=Uu,u1e=Hbe,f1e=l1e;function d1e(e,t){return f1e(u1e(e,t,c1e),e+"")}var h1e=d1e,p1e=QE,m1e=pp,v1e=mC,g1e=ss;function y1e(e,t,n){if(!g1e(n))return!1;var r=typeof t;return(r=="number"?m1e(n)&&v1e(t,n.length):r=="string"&&t in n)?p1e(n[t],e):!1}var F0=y1e,b1e=j8,_1e=Bbe,x1e=h1e,nN=F0,w1e=x1e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&nN(e,t[0],t[1])?t=[]:n>2&&nN(t[0],t[1],t[2])&&(t=[t[0]]),_1e(e,b1e(t,1),[])}),O1e=w1e;const bC=at(O1e);function uh(e){"@babel/helpers - typeof";return uh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uh(e)}function L2(){return L2=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(jf,"-left"),Ee(n)&&t&&Ee(t.x)&&n=t.y),"".concat(jf,"-top"),Ee(r)&&t&&Ee(t.y)&&ry?Math.max(f,l[r]):Math.max(d,l[r])}function D1e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function F1e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,f,d;return a.height>0&&a.width>0&&n?(f=oN({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=oN({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=D1e({translateX:f,translateY:d,useTranslate3d:s})):c=$1e,{cssProperties:c,cssClasses:I1e({translateX:f,translateY:d,coordinate:n})}}function ru(e){"@babel/helpers - typeof";return ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(e)}function aN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sN(e){for(var t=1;tcN||Math.abs(r.height-this.state.lastBoundingBox.height)>cN)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.children,f=i.coordinate,d=i.hasPayload,p=i.isAnimationActive,v=i.offset,g=i.position,y=i.reverseDirection,x=i.useTranslate3d,_=i.viewBox,b=i.wrapperStyle,w=F1e({allowEscapeViewBox:a,coordinate:f,offsetTopLeft:v,position:g,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:_}),S=w.cssClasses,E=w.cssProperties,C=sN(sN({transition:p&&o?"transform ".concat(s,"ms ").concat(l):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},b);return V.createElement("div",{tabIndex:-1,className:S,style:C,ref:function(A){r.wrapperNode=A}},c)}}]),t}(R.PureComponent),q1e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},si={isSsr:q1e(),get:function(t){return si[t]},set:function(t,n){if(typeof t=="string")si[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){si[i]=t[i]})}}};function iu(e){"@babel/helpers - typeof";return iu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(e)}function uN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fN(e){for(var t=1;t0;return V.createElement(G1e,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:p,active:o,coordinate:f,hasPayload:C,offset:v,position:x,reverseDirection:_,useTranslate3d:b,viewBox:w,wrapperStyle:S},n_e(c,fN(fN({},this.props),{},{payload:E})))}}]),t}(R.PureComponent);_C(Xr,"displayName","Tooltip");_C(Xr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!si.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var r_e=bo,i_e=function(){return r_e.Date.now()},o_e=i_e,a_e=/\s/;function s_e(e){for(var t=e.length;t--&&a_e.test(e.charAt(t)););return t}var l_e=s_e,c_e=l_e,u_e=/^\s+/;function f_e(e){return e&&e.slice(0,c_e(e)+1).replace(u_e,"")}var d_e=f_e,h_e=d_e,hN=ss,p_e=Mu,pN=NaN,m_e=/^[-+]0x[0-9a-f]+$/i,v_e=/^0b[01]+$/i,g_e=/^0o[0-7]+$/i,y_e=parseInt;function b_e(e){if(typeof e=="number")return e;if(p_e(e))return pN;if(hN(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=hN(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=h_e(e);var n=v_e.test(e);return n||g_e.test(e)?y_e(e.slice(2),n?2:8):m_e.test(e)?pN:+e}var I8=b_e,__e=ss,H1=o_e,mN=I8,x_e="Expected a function",w_e=Math.max,O_e=Math.min;function S_e(e,t,n){var r,i,o,a,s,l,c=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(x_e);t=mN(t)||0,__e(n)&&(f=!!n.leading,d="maxWait"in n,o=d?w_e(mN(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p);function v(C){var T=r,A=i;return r=i=void 0,c=C,a=e.apply(A,T),a}function g(C){return c=C,s=setTimeout(_,t),f?v(C):a}function y(C){var T=C-l,A=C-c,D=t-T;return d?O_e(D,o-A):D}function x(C){var T=C-l,A=C-c;return l===void 0||T>=t||T<0||d&&A>=o}function _(){var C=H1();if(x(C))return b(C);s=setTimeout(_,y(C))}function b(C){return s=void 0,p&&r?v(C):(r=i=void 0,a)}function w(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function S(){return s===void 0?a:b(H1())}function E(){var C=H1(),T=x(C);if(r=arguments,i=this,l=C,T){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(_,t),v(l)}return s===void 0&&(s=setTimeout(_,t)),a}return E.cancel=w,E.flush=S,E}var E_e=S_e,C_e=E_e,P_e=ss,T_e="Expected a function";function j_e(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(T_e);return P_e(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),C_e(e,t,{leading:r,maxWait:t,trailing:i})}var A_e=j_e;const D8=at(A_e);function dh(e){"@babel/helpers - typeof";return dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(e)}function vN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Em(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(K=D8(K,y,{trailing:!0,leading:!1}));var W=new ResizeObserver(K),X=E.current.getBoundingClientRect(),Q=X.width,ne=X.height;return I(Q,ne),W.observe(E.current),function(){W.disconnect()}},[I,y]);var F=R.useMemo(function(){var K=D.containerWidth,W=D.containerHeight;if(K<0||W<0)return null;ki(Us(a)||Us(l),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,a,l),ki(!n||n>0,"The aspect(%s) must be greater than zero.",n);var X=Us(a)?K:a,Q=Us(l)?W:l;n&&n>0&&(X?Q=X/n:Q&&(X=Q*n),p&&Q>p&&(Q=p)),ki(X>0||Q>0,`The width(%s) and height(%s) of chart should be greater than 0, @@ -712,12 +712,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cPe(e,t){if(e){if(typeof e=="string")return pO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pO(e,t)}}function uPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fPe(e){if(Array.isArray(e))return pO(e)}function pO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){lL(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),lL(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},bd=function(t,n){var r=dPe(t);n&&(r=[r.reduce(function(o,a){return[].concat(sL(o),sL(a))},[])]);var i=r.map(function(o){return o.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},hPe=function(t,n,r){var i=bd(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(bd(n.reverse(),r).slice(1))},pPe=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,a=aPe(t,oPe);if(!n||!n.length)return null;var s=Ce("recharts-polygon",r);if(i&&i.length){var l=a.stroke&&a.stroke!=="none",c=hPe(n,i,o);return V.createElement("g",{className:s},V.createElement("path",bc({},De(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?V.createElement("path",bc({},De(a,!0),{fill:"none",d:bd(n,o)})):null,l?V.createElement("path",bc({},De(a,!0),{fill:"none",d:bd(i,o)})):null)}var f=bd(n,o);return V.createElement("path",bc({},De(a,!0),{fill:f.slice(-1)==="Z"?a.fill:"none",className:s,d:f}))};function mO(){return mO=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var wPe=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},OPe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,f=t.width,d=f===void 0?0:f,p=t.height,v=p===void 0?0:p,g=t.className,y=_Pe(t,mPe),x=vPe({x:r,y:o,top:s,left:c,width:d,height:v},y);return!Ee(r)||!Ee(o)||!Ee(d)||!Ee(v)||!Ee(s)||!Ee(c)?null:V.createElement("path",vO({},De(x,!0),{className:Ce("recharts-cross",g),d:wPe(r,o,d,v,s,c)}))},SPe=G0,EPe=wF,CPe=_o;function PPe(e,t){return e&&e.length?SPe(e,CPe(t),EPe):void 0}var TPe=PPe;const jPe=at(TPe);var APe=G0,kPe=_o,NPe=OF;function MPe(e,t){return e&&e.length?APe(e,kPe(t),NPe):void 0}var LPe=MPe;const RPe=at(LPe);var $Pe=["cx","cy","angle","ticks","axisLine"],IPe=["ticks","tick","angle","tickFormatter","stroke"];function uu(e){"@babel/helpers - typeof";return uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uu(e)}function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function FPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dL(e,t){for(var n=0;nmL?a=i==="outer"?"start":"end":o<-mL?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=xs(xs({},De(this.props,!1)),{},{fill:"none"},De(s,!1));if(l==="circle")return V.createElement(bp,Rs({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:o,r:a}));var f=this.props.ticks,d=f.map(function(p){return Ot(i,o,a,p.coordinate)});return V.createElement(pPe,Rs({className:"recharts-polar-angle-axis-line"},c,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,a=i.tick,s=i.tickLine,l=i.tickFormatter,c=i.stroke,f=De(this.props,!1),d=De(a,!1),p=xs(xs({},f),{},{fill:"none"},De(s,!1)),v=o.map(function(g,y){var x=r.getTickLineCoord(g),_=r.getTickTextAnchor(g),b=xs(xs(xs({textAnchor:_},f),{},{stroke:"none",fill:c},d),{},{index:y,payload:g,x:x.x2,y:x.y2});return V.createElement(Xe,Rs({className:Ce("recharts-polar-angle-axis-tick",KF(a)),key:"tick-".concat(g.coordinate)},Za(r.props,g,y)),s&&V.createElement("line",Rs({className:"recharts-polar-angle-axis-tick-line"},p,x)),a&&t.renderTickItem(a,b,l?l(g.value,y):g.value))});return V.createElement(Xe,{className:"recharts-polar-angle-axis-ticks"},v)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.radius,a=r.axisLine;return o<=0||!i||!i.length?null:V.createElement(Xe,{className:Ce("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,o){var a;return V.isValidElement(r)?a=V.cloneElement(r,i):Ve(r)?a=r(i):a=V.createElement(hl,Rs({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),a}}]),t}(R.PureComponent);Q0(J0,"displayName","PolarAngleAxis");Q0(J0,"axisType","angleAxis");Q0(J0,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var eTe=g8,tTe=eTe(Object.getPrototypeOf,Object),nTe=tTe,rTe=na,iTe=nTe,oTe=ra,aTe="[object Object]",sTe=Function.prototype,lTe=Object.prototype,u7=sTe.toString,cTe=lTe.hasOwnProperty,uTe=u7.call(Object);function fTe(e){if(!oTe(e)||rTe(e)!=aTe)return!1;var t=iTe(e);if(t===null)return!0;var n=cTe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&u7.call(n)==uTe}var dTe=fTe;const hTe=at(dTe);var pTe=na,mTe=ra,vTe="[object Boolean]";function gTe(e){return e===!0||e===!1||mTe(e)&&pTe(e)==vTe}var yTe=gTe;const bTe=at(yTe);function Lh(e){"@babel/helpers - typeof";return Lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lh(e)}function ly(){return ly=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:c},to:{upperWidth:f,lowerWidth:d,height:p,x:l,y:c},duration:y,animationEasing:g,isActive:_},function(w){var S=w.upperWidth,E=w.lowerWidth,C=w.height,T=w.x,A=w.y;return V.createElement(hi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:y,easing:g},V.createElement("path",ly({},De(n,!0),{className:b,d:bL(T,A,S,E,C),ref:r})))}):V.createElement("g",null,V.createElement("path",ly({},De(n,!0),{className:b,d:bL(l,c,f,d,p)})))},ATe=["option","shapeType","propTransformer","activeClassName","isActive"];function Rh(e){"@babel/helpers - typeof";return Rh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rh(e)}function kTe(e,t){if(e==null)return{};var n=NTe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function _L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cy(e){for(var t=1;t0?Mr(w,"paddingAngle",0):0;if(E){var T=Bt(E.endAngle-E.startAngle,w.endAngle-w.startAngle),A=kt(kt({},w),{},{startAngle:b+C,endAngle:b+T(y)+C});x.push(A),b=A.endAngle}else{var D=w.endAngle,N=w.startAngle,I=Bt(0,D-N),F=I(y),K=kt(kt({},w),{},{startAngle:b+C,endAngle:b+F+C});x.push(K),b=K.endAngle}}),V.createElement(Xe,null,r.renderSectorsStatically(x))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,o=r.isAnimationActive,a=this.state.prevSectors;return o&&i&&i.length&&(!a||!Xa(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,o=i.hide,a=i.sectors,s=i.className,l=i.label,c=i.cx,f=i.cy,d=i.innerRadius,p=i.outerRadius,v=i.isAnimationActive,g=this.state.isAnimationFinished;if(o||!a||!a.length||!Ee(c)||!Ee(f)||!Ee(d)||!Ee(p))return null;var y=Ce("recharts-pie",s);return V.createElement(Xe,{tabIndex:this.props.rootTabIndex,className:y,ref:function(_){r.pieRef=_}},this.renderSectors(),l&&this.renderLabels(a),bn.renderCallByParent(this.props,null,!1),(!v||g)&&Ni.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r=360?b:b-1)*l,S=x-b*v-w,E=r.reduce(function(A,D){var N=Tt(D,_,0);return A+(Ee(N)?N:0)},0),C;if(E>0){var T;C=r.map(function(A,D){var N=Tt(A,_,0),I=Tt(A,f,D),F=(Ee(N)?N:0)/E,K;D?K=T.endAngle+Zn(y)*l*(N!==0?1:0):K=a;var W=K+Zn(y)*((N!==0?v:0)+F*S),X=(K+W)/2,Q=(g.innerRadius+g.outerRadius)/2,ne=[{name:I,value:N,payload:A,dataKey:_,type:p}],Z=Ot(g.cx,g.cy,Q,X);return T=kt(kt(kt({percent:F,cornerRadius:o,name:I,tooltipPayload:ne,midAngle:X,middleRadius:Q,tooltipPosition:Z},A),g),{},{value:Tt(A,_),startAngle:K,endAngle:W,payload:A,paddingAngle:Zn(y)*l}),T})}return kt(kt({},g),{},{sectors:C,data:r})});var QTe=Math.ceil,JTe=Math.max;function eje(e,t,n,r){for(var i=-1,o=JTe(QTe((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}var tje=eje,nje=I8,SL=1/0,rje=17976931348623157e292;function ije(e){if(!e)return e===0?e:0;if(e=nje(e),e===SL||e===-SL){var t=e<0?-1:1;return t*rje}return e===e?e:0}var h7=ije,oje=tje,aje=F0,i_=h7;function sje(e){return function(t,n,r){return r&&typeof r!="number"&&aje(t,n,r)&&(n=r=void 0),t=i_(t),n===void 0?(n=t,t=0):n=i_(n),r=r===void 0?t0&&r.handleDrag(i.changedTouches[0])}),Sr(Ki(r),"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a==null||a({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Sr(Ki(r),"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Sr(Ki(r),"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Sr(Ki(r),"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Sr(Ki(r),"handleSlideDragStart",function(i){var o=jL(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(Ki(r),"startX"),endX:r.handleTravellerDragStart.bind(Ki(r),"endX")},r.state={},r}return gje(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,f=c.length-1,d=Math.min(i,o),p=Math.max(i,o),v=t.getIndexInRange(a,d),g=t.getIndexInRange(a,p);return{startIndex:v-v%l,endIndex:g===f?f:g-g%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,l=Tt(o[r],s,r);return Ve(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,l=this.props,c=l.x,f=l.width,d=l.travellerWidth,p=l.startIndex,v=l.endIndex,g=l.onChange,y=r.pageX-o;y>0?y=Math.min(y,c+f-d-s,c+f-d-a):y<0&&(y=Math.max(y,c-a,c-s));var x=this.getIndex({startX:a+y,endX:s+y});(x.startIndex!==p||x.endIndex!==v)&&g&&g(x),this.setState({startX:a+y,endX:s+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=jL(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[a],f=this.props,d=f.x,p=f.width,v=f.travellerWidth,g=f.onChange,y=f.gap,x=f.data,_={startX:this.state.startX,endX:this.state.endX},b=r.pageX-o;b>0?b=Math.min(b,d+p-v-c):b<0&&(b=Math.max(b,d-c)),_[a]=c+b;var w=this.getIndex(_),S=w.startIndex,E=w.endIndex,C=function(){var A=x.length-1;return a==="startX"&&(s>l?S%y===0:E%y===0)||sl?E%y===0:S%y===0)||s>l&&E===A};this.setState(Sr(Sr({},a,c+b),"brushMoveStartX",r.pageX),function(){g&&C()&&g(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var p=d+r;if(!(p===-1||p>=s.length)){var v=s[p];i==="startX"&&v>=c||i==="endX"&&v<=l||this.setState(Sr({},i,v),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return V.createElement("rect",{stroke:c,fill:l,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.data,c=r.children,f=r.padding,d=R.Children.only(c);return d?V.cloneElement(d,{x:i,y:o,width:a,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,l=this.props,c=l.y,f=l.travellerWidth,d=l.height,p=l.traveller,v=l.ariaLabel,g=l.data,y=l.startIndex,x=l.endIndex,_=Math.max(r,this.props.x),b=o_(o_({},De(this.props,!1)),{},{x:_,y:c,width:f,height:d}),w=v||"Min value: ".concat((o=g[y])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[x])===null||a===void 0?void 0:a.name);return V.createElement(Xe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,b))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,l=o.stroke,c=o.travellerWidth,f=Math.min(r,i)+c,d=Math.max(Math.abs(i-r)-c,0);return V.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,f=this.state,d=f.startX,p=f.endX,v=5,g={pointerEvents:"none",fill:c};return V.createElement(Xe,{className:"recharts-brush-texts"},V.createElement(hl,hy({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:a+s/2},g),this.getTextOfTick(i)),V.createElement(hl,hy({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+l+v,y:a+s/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,l=r.y,c=r.width,f=r.height,d=r.alwaysShowText,p=this.state,v=p.startX,g=p.endX,y=p.isTextActive,x=p.isSlideMoving,_=p.isTravellerMoving,b=p.isTravellerFocused;if(!i||!i.length||!Ee(s)||!Ee(l)||!Ee(c)||!Ee(f)||c<=0||f<=0)return null;var w=Ce("recharts-brush",o),S=V.Children.count(a)===1,E=mje("userSelect","none");return V.createElement(Xe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(v,g),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(g,"endX"),(y||x||_||b||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(o+s/2)-1;return V.createElement(V.Fragment,null,V.createElement("rect",{x:i,y:o,width:a,height:s,fill:l,stroke:"none"}),V.createElement("line",{x1:i+1,y1:c,x2:i+a-1,y2:c,fill:"none",stroke:"#fff"}),V.createElement("line",{x1:i+1,y1:c+2,x2:i+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return V.isValidElement(r)?o=V.cloneElement(r,i):Ve(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,f=r.startIndex,d=r.endIndex;if(o!==i.prevData||c!==i.prevUpdateId)return o_({prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},o&&o.length?wje({data:o,width:a,x:s,travellerWidth:l,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+a-l]);var p=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>i?s=l:a=l}return i>=r[s]?s:a}}]),t}(R.PureComponent);Sr(pu,"displayName","Brush");Sr(pu,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Oje=yC;function Sje(e,t){var n;return Oje(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var Eje=Sje,Cje=c8,Pje=_o,Tje=Eje,jje=xr,Aje=F0;function kje(e,t,n){var r=jje(e)?Cje:Tje;return n&&Aje(e,t,n)&&(t=void 0),r(e,Pje(t))}var Nje=kje;const Mje=at(Nje);var so=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},AL=N8;function Lje(e,t,n){t=="__proto__"&&AL?AL(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Rje=Lje,$je=Rje,Ije=A8,Dje=_o;function Fje(e,t){var n={};return t=Dje(t),Ije(e,function(r,i,o){$je(n,i,t(r,i,o))}),n}var Bje=Fje;const Uje=at(Bje);function zje(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oAe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function aAe(e,t){var n=e.x,r=e.y,i=iAe(e,eAe),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),f=parseInt(c,10),d="".concat(t.width||i.width),p=parseInt(d,10);return If(If(If(If(If({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function NL(e){return V.createElement(uy,xO({shapeType:"rectangle",propTransformer:aAe,activeClassName:"recharts-active-bar"},e))}var sAe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||ml(!1),n)}},lAe=["value","background"],y7;function mu(e){"@babel/helpers - typeof";return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(e)}function cAe(e,t){if(e==null)return{};var n=uAe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uAe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(W)0&&Math.abs(K)0&&(K=Math.min((te||0)-(W[ie-1]||0),K))}),Number.isFinite(K)){var X=K/F,Q=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(T=X*Q/2),y.padding==="no-gap"){var ne=Xn(t.barCategoryGap,X*Q),Z=X*Q/2;T=Z-ne-(Z-ne)/Q*ne}}}i==="xAxis"?A=[r.left+(w.left||0)+(T||0),r.left+r.width-(w.right||0)-(T||0)]:i==="yAxis"?A=l==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(T||0),r.top+r.height-(w.bottom||0)-(T||0)]:A=y.range,E&&(A=[A[1],A[0]]);var z=UF(y,o,p),B=z.scale,H=z.realScaleType;B.domain(_).range(A),zF(B);var ee=VF(B,Oi(Oi({},y),{},{realScaleType:H}));i==="xAxis"?(I=x==="top"&&!S||x==="bottom"&&S,D=r.left,N=d[C]-I*y.height):i==="yAxis"&&(I=x==="left"&&!S||x==="right"&&S,D=d[C]-I*y.width,N=r.top);var q=Oi(Oi(Oi({},y),ee),{},{realScaleType:H,x:D,y:N,scale:B,width:i==="xAxis"?r.width:y.width,height:i==="yAxis"?r.height:y.height});return q.bandSize=Jg(q,ee),!y.hide&&i==="xAxis"?d[C]+=(I?-1:1)*q.height:y.hide||(d[C]+=(I?-1:1)*q.width),Oi(Oi({},v),{},nb({},g,q))},{})},O7=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},_Ae=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return O7({x:n,y:r},{x:i,y:o})},S7=function(){function e(t){gAe(this,e),this.scale=t}return yAe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}]),e}();nb(S7,"EPS",1e-4);var KC=function(t){var n=Object.keys(t).reduce(function(r,i){return Oi(Oi({},r),{},nb({},i,S7.create(t[i])))},{});return Oi(Oi({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return Uje(i,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(i){return g7(i,function(o,a){return n[a].isInRange(o)})}})};function xAe(e){return(e%180+180)%180}var wAe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=xAe(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?i[o?t[a]:a]:void 0}}var PAe=CAe,TAe=h7;function jAe(e){var t=TAe(e),n=t%1;return t===t?n?t-n:t:0}var AAe=jAe,kAe=O8,NAe=_o,MAe=AAe,LAe=Math.max;function RAe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:MAe(n);return i<0&&(i=LAe(r+i,0)),kAe(e,NAe(t),i)}var $Ae=RAe,IAe=PAe,DAe=$Ae,FAe=IAe(DAe),BAe=FAe;const UAe=at(BAe);var zAe=hfe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),YC=R.createContext(void 0),ZC=R.createContext(void 0),E7=R.createContext(void 0),C7=R.createContext({}),P7=R.createContext(void 0),T7=R.createContext(0),j7=R.createContext(0),IL=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,f=zAe(o);return V.createElement(YC.Provider,{value:r},V.createElement(ZC.Provider,{value:i},V.createElement(C7.Provider,{value:o},V.createElement(E7.Provider,{value:f},V.createElement(P7.Provider,{value:a},V.createElement(T7.Provider,{value:c},V.createElement(j7.Provider,{value:l},s)))))))},VAe=function(){return R.useContext(P7)},A7=function(t){var n=R.useContext(YC);n==null&&ml(!1);var r=n[t];return r==null&&ml(!1),r},WAe=function(){var t=R.useContext(YC);return xa(t)},HAe=function(){var t=R.useContext(ZC),n=UAe(t,function(r){return g7(r.domain,Number.isFinite)});return n||xa(t)},k7=function(t){var n=R.useContext(ZC);n==null&&ml(!1);var r=n[t];return r==null&&ml(!1),r},GAe=function(){var t=R.useContext(E7);return t},qAe=function(){return R.useContext(C7)},XC=function(){return R.useContext(j7)},QC=function(){return R.useContext(T7)};function Bh(e){"@babel/helpers - typeof";return Bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bh(e)}function DL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FL(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function p3e(e,t){return N7(e,t+1)}function m3e(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,f=a,d=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:N7(r,c)};var y=l,x,_=function(){return x===void 0&&(x=n(g,y)),x},b=g.coordinate,w=l===0||gy(e,b,_,f,s);w||(l=0,f=a,c+=1),w&&(f=b+e*(_()/2+i),l+=c)},p;c<=o.length;)if(p=d(),p)return p.v;return[]}function Vh(e){"@babel/helpers - typeof";return Vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vh(e)}function HL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t0?v.coordinate-x*e:v.coordinate})}else o[p]=v=In(In({},v),{},{tickCoord:v.coordinate});var _=gy(e,v.tickCoord,y,s,l);_&&(l=v.tickCoord-e*(y()/2+i),o[p]=In(In({},v),{},{isShow:!0}))},f=a-1;f>=0;f--)c(f);return o}function _3e(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(o){var f=r[s-1],d=n(f,s-1),p=e*(f.coordinate+e*d/2-c);a[s-1]=f=In(In({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var v=gy(e,f.tickCoord,function(){return d},l,c);v&&(c=f.tickCoord-e*(d/2+i),a[s-1]=In(In({},f),{},{isShow:!0}))}for(var g=o?s-1:s,y=function(b){var w=a[b],S,E=function(){return S===void 0&&(S=n(w,b)),S};if(b===0){var C=e*(w.coordinate-e*E()/2-l);a[b]=w=In(In({},w),{},{tickCoord:C<0?w.coordinate-C*e:w.coordinate})}else a[b]=w=In(In({},w),{},{tickCoord:w.coordinate});var T=gy(e,w.tickCoord,E,l,c);T&&(l=w.tickCoord+e*(E()/2+i),a[b]=In(In({},w),{},{isShow:!0}))},x=0;x=2?Zn(i[1].coordinate-i[0].coordinate):1,_=h3e(o,x,v);return l==="equidistantPreserveStart"?m3e(x,_,y,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=_3e(x,_,y,i,a,l==="preserveStartEnd"):p=b3e(x,_,y,i,a),p.filter(function(b){return b.isShow}))}var x3e=["viewBox"],w3e=["viewBox"],O3e=["ticks"];function vu(e){"@babel/helpers - typeof";return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu(e)}function xc(){return xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function S3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function E3e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qL(e,t){for(var n=0;n0?l(this.props):l(v)),a<=0||s<=0||!g||!g.length?null:V.createElement(Xe,{className:Ce("recharts-cartesian-axis",c),ref:function(x){r.layerReference=x}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),bn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return V.isValidElement(r)?a=V.cloneElement(r,i):Ve(r)?a=r(i):a=V.createElement(hl,xc({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}]),t}(R.Component);tP(qu,"displayName","CartesianAxis");tP(qu,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var N3e=["x1","y1","x2","y2","key"],M3e=["offset"];function vl(e){"@babel/helpers - typeof";return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(e)}function KL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function I3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var D3e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height;return V.createElement("rect",{x:i,y:o,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function R7(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ve(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=YL(t,N3e),c=De(l,!1);c.offset;var f=YL(c,M3e);n=V.createElement("line",Ws({},f,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function F3e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var c=Bn(Bn({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return R7(i,c)});return V.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function B3e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var c=Bn(Bn({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return R7(i,c)});return V.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function U3e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+i-i)}).sort(function(p,v){return p-v});i!==f[0]&&f.unshift(0);var d=f.map(function(p,v){var g=!f[v+1],y=g?i+a-p:f[v+1]-p;if(y<=0)return null;var x=v%t.length;return V.createElement("rect",{key:"react-".concat(v),y:p,x:r,height:y,width:o,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function z3e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var f=c.map(function(p){return Math.round(p+o-o)}).sort(function(p,v){return p-v});o!==f[0]&&f.unshift(0);var d=f.map(function(p,v){var g=!f[v+1],y=g?o+s-p:f[v+1]-p;if(y<=0)return null;var x=v%r.length;return V.createElement("rect",{key:"react-".concat(v),x:p,y:a,width:y,height:l,stroke:"none",fill:r[x],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var V3e=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return BF(eP(Bn(Bn(Bn({},qu.defaultProps),r),{},{ticks:Mo(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},W3e=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return BF(eP(Bn(Bn(Bn({},qu.defaultProps),r),{},{ticks:Mo(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Gl={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function nP(e){var t,n,r,i,o,a,s=XC(),l=QC(),c=qAe(),f=Bn(Bn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Gl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Gl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Gl.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Gl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Gl.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Gl.verticalFill,x:Ee(e.x)?e.x:c.left,y:Ee(e.y)?e.y:c.top,width:Ee(e.width)?e.width:c.width,height:Ee(e.height)?e.height:c.height}),d=f.x,p=f.y,v=f.width,g=f.height,y=f.syncWithTicks,x=f.horizontalValues,_=f.verticalValues,b=WAe(),w=HAe();if(!Ee(v)||v<=0||!Ee(g)||g<=0||!Ee(d)||d!==+d||!Ee(p)||p!==+p)return null;var S=f.verticalCoordinatesGenerator||V3e,E=f.horizontalCoordinatesGenerator||W3e,C=f.horizontalPoints,T=f.verticalPoints;if((!C||!C.length)&&Ve(E)){var A=x&&x.length,D=E({yAxis:w?Bn(Bn({},w),{},{ticks:A?x:w.ticks}):void 0,width:s,height:l,offset:c},A?!0:y);ki(Array.isArray(D),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(vl(D),"]")),Array.isArray(D)&&(C=D)}if((!T||!T.length)&&Ve(S)){var N=_&&_.length,I=S({xAxis:b?Bn(Bn({},b),{},{ticks:N?_:b.ticks}):void 0,width:s,height:l,offset:c},N?!0:y);ki(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(vl(I),"]")),Array.isArray(I)&&(T=I)}return V.createElement("g",{className:"recharts-cartesian-grid"},V.createElement(D3e,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height}),V.createElement(F3e,Ws({},f,{offset:c,horizontalPoints:C,xAxis:b,yAxis:w})),V.createElement(B3e,Ws({},f,{offset:c,verticalPoints:T,xAxis:b,yAxis:w})),V.createElement(U3e,Ws({},f,{horizontalPoints:C})),V.createElement(z3e,Ws({},f,{verticalPoints:T})))}nP.displayName="CartesianGrid";var H3e=["type","layout","connectNulls","ref"];function gu(e){"@babel/helpers - typeof";return gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gu(e)}function G3e(e,t){if(e==null)return{};var n=q3e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function q3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function xd(){return xd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){v=[].concat(ql(l.slice(0,g)),[d-y]);break}var x=v.length%2===0?[0,p]:[p];return[].concat(ql(t.repeat(l,f)),ql(v),x).map(function(_){return"".concat(_,"px")}).join(", ")}),Si(da(n),"id",ls("recharts-line-")),Si(da(n),"pathRef",function(a){n.mainCurve=a}),Si(da(n),"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Si(da(n),"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return J3e(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,s=o.xAxis,l=o.yAxis,c=o.layout,f=o.children,d=tr(f,Hu);if(!d)return null;var p=function(y,x){return{x:y.x,y:y.y,value:y.value,errorVal:Tt(y.payload,x)}},v={clipPath:r?"url(#clipPath-".concat(i,")"):null};return V.createElement(Xe,v,d.map(function(g){return V.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,f=s.dataKey,d=De(this.props,!1),p=De(l,!0),v=c.map(function(y,x){var _=Or(Or(Or({key:"dot-".concat(x),r:3},d),p),{},{value:y.value,dataKey:f,cx:y.x,cy:y.y,index:x,payload:y.payload});return t.renderDotItem(l,_)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return V.createElement(Xe,xd({className:"recharts-line-dots",key:"dots"},g),v)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,l=s.type,c=s.layout,f=s.connectNulls;s.ref;var d=G3e(s,H3e),p=Or(Or(Or({},De(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:f});return V.createElement(Ua,xd({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,p=a.animationEasing,v=a.animationId,g=a.animateNewValues,y=a.width,x=a.height,_=this.state,b=_.prevPoints,w=_.totalLength;return V.createElement(hi,{begin:f,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var E=S.t;if(b){var C=b.length/s.length,T=s.map(function(F,K){var W=Math.floor(K*C);if(b[W]){var X=b[W],Q=Bt(X.x,F.x),ne=Bt(X.y,F.y);return Or(Or({},F),{},{x:Q(E),y:ne(E)})}if(g){var Z=Bt(y*2,F.x),z=Bt(x/2,F.y);return Or(Or({},F),{},{x:Z(E),y:z(E)})}return Or(Or({},F),{},{x:F.x,y:F.y})});return o.renderCurveStatically(T,r,i)}var A=Bt(0,w),D=A(E),N;if(l){var I="".concat(l).split(/[,\s]+/gim).map(function(F){return parseFloat(F)});N=o.getStrokeDasharray(D,w,I)}else N=o.generateSimpleStrokeDasharray(w,D);return o.renderCurveStatically(s,r,i,{strokeDasharray:N})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,l=this.state,c=l.prevPoints,f=l.totalLength;return s&&a&&a.length&&(!c&&f>0||!Xa(c,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,c=i.xAxis,f=i.yAxis,d=i.top,p=i.left,v=i.width,g=i.height,y=i.isAnimationActive,x=i.id;if(o||!s||!s.length)return null;var _=this.state.isAnimationFinished,b=s.length===1,w=Ce("recharts-line",l),S=c&&c.allowDataOverflow,E=f&&f.allowDataOverflow,C=S||E,T=Ue(x)?this.id:x,A=(r=De(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},D=A.r,N=D===void 0?3:D,I=A.strokeWidth,F=I===void 0?2:I,K=L5(a)?a:{},W=K.clipDot,X=W===void 0?!0:W,Q=N*2+F;return V.createElement(Xe,{className:w},S||E?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(T)},V.createElement("rect",{x:S?p:p-v/2,y:E?d:d-g/2,width:S?v:v*2,height:E?g:g*2})),!X&&V.createElement("clipPath",{id:"clipPath-dots-".concat(T)},V.createElement("rect",{x:p-Q/2,y:d-Q/2,width:v+Q,height:g+Q}))):null,!b&&this.renderCurve(C,T),this.renderErrorBar(C,T),(b||a)&&this.renderDots(C,X,T),(!y||_)&&Ni.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(ql(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ake(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Xa(f,a)||!Xa(d,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,c=i.top,f=i.left,d=i.xAxis,p=i.yAxis,v=i.width,g=i.height,y=i.isAnimationActive,x=i.id;if(o||!s||!s.length)return null;var _=this.state.isAnimationFinished,b=s.length===1,w=Ce("recharts-area",l),S=d&&d.allowDataOverflow,E=p&&p.allowDataOverflow,C=S||E,T=Ue(x)?this.id:x,A=(r=De(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},D=A.r,N=D===void 0?3:D,I=A.strokeWidth,F=I===void 0?2:I,K=L5(a)?a:{},W=K.clipDot,X=W===void 0?!0:W,Q=N*2+F;return V.createElement(Xe,{className:w},S||E?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(T)},V.createElement("rect",{x:S?f:f-v/2,y:E?c:c-g/2,width:S?v:v*2,height:E?g:g*2})),!X&&V.createElement("clipPath",{id:"clipPath-dots-".concat(T)},V.createElement("rect",{x:f-Q/2,y:c-Q/2,width:v+Q,height:g+Q}))):null,b?null:this.renderArea(C,T),(a||b)&&this.renderDots(C,X,T),(!y||_)&&Ni.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}]),t}(R.PureComponent);D7=El;no(El,"displayName","Area");no(El,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!si.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});no(El,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(Ee(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var f=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});no(El,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,v=t.layout,g=c&&c.length,y=D7.getBaseValue(t,n,r,i),x=v==="horizontal",_=!1,b=d.map(function(S,E){var C;g?C=c[f+E]:(C=Tt(S,l),Array.isArray(C)?_=!0:C=[y,C]);var T=C[1]==null||g&&Tt(S,l)==null;return x?{x:lu({axis:r,ticks:o,bandSize:s,entry:S,index:E}),y:T?null:i.scale(C[1]),value:C,payload:S}:{x:T?null:r.scale(C[1]),y:lu({axis:i,ticks:a,bandSize:s,entry:S,index:E}),value:C,payload:S}}),w;return g||_?w=b.map(function(S){var E=Array.isArray(S.value)?S.value[0]:null;return x?{x:S.x,y:E!=null&&S.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:S.y}}):w=x?i.scale(y):r.scale(y),ha({points:b,baseLine:w,layout:v,isRange:_},p)});no(El,"renderDotItem",function(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ve(e))n=e(t);else{var r=Ce("recharts-area-dot",typeof e!="boolean"?e.className:"");n=V.createElement(bp,Hs({},t,{className:r}))}return n});var rb=function(){return null};rb.displayName="ZAxis";rb.defaultProps={zAxisId:0,range:[64,64],scale:"auto",type:"number"};var hke=["option","isActive"];function wd(){return wd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function vke(e){var t=e.option,n=e.isActive,r=pke(e,hke);return typeof t=="string"?V.createElement(uy,wd({option:V.createElement($0,wd({type:t},r)),isActive:n,shapeType:"symbols"},r)):V.createElement(uy,wd({option:t,isActive:n,shapeType:"symbols"},r))}function bu(e){"@babel/helpers - typeof";return bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bu(e)}function Od(){return Od=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Gke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sR(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&Ee(i)&&Ee(o)?t.slice(i,o+1):[]};function Z7(e){return e==="number"?[0,"auto"]:void 0}var IO=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=ob(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(l,c){var f,d=(f=c.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(a.dataKey&&!a.allowDuplicatedCategory){var v=d===void 0?s:d;p=Cg(v,a.dataKey,i)}else p=d&&d[r]||s[r];return p?[].concat(xu(l),[HF(c,p)]):l},[])},cR=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=rNe(o,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,f=cSe(a,s,c,l);if(f>=0&&c){var d=c[f]&&c[f].value,p=IO(t,n,f,d),v=iNe(r,s,f,o);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},oNe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,v=FF(f,o);return r.reduce(function(g,y){var x,_=y.props,b=_.type,w=_.dataKey,S=_.allowDataOverflow,E=_.allowDuplicatedCategory,C=_.scale,T=_.ticks,A=_.includeHidden,D=y.props[a];if(g[D])return g;var N=ob(t.data,{graphicalItems:i.filter(function(ee){return ee.props[a]===D}),dataStartIndex:l,dataEndIndex:c}),I=N.length,F,K,W;Mke(y.props.domain,S,b)&&(F=eO(y.props.domain,null,S),v&&(b==="number"||C!=="auto")&&(W=gd(N,w,"category")));var X=Z7(b);if(!F||F.length===0){var Q,ne=(Q=y.props.domain)!==null&&Q!==void 0?Q:X;if(w){if(F=gd(N,w,b),b==="category"&&v){var Z=dde(F);E&&Z?(K=F,F=dy(0,I)):E||(F=EM(ne,F,y).reduce(function(ee,q){return ee.indexOf(q)>=0?ee:[].concat(xu(ee),[q])},[]))}else if(b==="category")E?F=F.filter(function(ee){return ee!==""&&!Ue(ee)}):F=EM(ne,F,y).reduce(function(ee,q){return ee.indexOf(q)>=0||q===""||Ue(q)?ee:[].concat(xu(ee),[q])},[]);else if(b==="number"){var z=pSe(N,i.filter(function(ee){return ee.props[a]===D&&(A||!ee.props.hide)}),w,o,f);z&&(F=z)}v&&(b==="number"||C!=="auto")&&(W=gd(N,w,"category"))}else v?F=dy(0,I):s&&s[D]&&s[D].hasStack&&b==="number"?F=p==="expand"?[0,1]:WF(s[D].stackGroups,l,c):F=DF(N,i.filter(function(ee){return ee.props[a]===D&&(A||!ee.props.hide)}),b,f,!0);if(b==="number")F=LO(d,F,D,o,T),ne&&(F=eO(ne,F,S));else if(b==="category"&&ne){var B=ne,H=F.every(function(ee){return B.indexOf(ee)>=0});H&&(F=B)}}return ve(ve({},g),{},We({},D,ve(ve({},y.props),{},{axisType:o,domain:F,categoricalDomain:W,duplicateDomain:K,originalDomain:(x=y.props.domain)!==null&&x!==void 0?x:X,isCategorical:v,layout:f})))},{})},aNe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,d=t.children,p=ob(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),v=p.length,g=FF(f,o),y=-1;return r.reduce(function(x,_){var b=_.props[a],w=Z7("number");if(!x[b]){y++;var S;return g?S=dy(0,v):s&&s[b]&&s[b].hasStack?(S=WF(s[b].stackGroups,l,c),S=LO(d,S,b,o)):(S=eO(w,DF(p,r.filter(function(E){return E.props[a]===b&&!E.props.hide}),"number",f),i.defaultProps.allowDataOverflow),S=LO(d,S,b,o)),ve(ve({},x),{},We({},b,ve(ve({axisType:o},i.defaultProps),{},{hide:!0,orientation:Mr(tNe,"".concat(o,".").concat(y%2),null),domain:S,originalDomain:w,isCategorical:g,layout:f})))}return x},{})},sNe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),p=tr(f,o),v={};return p&&p.length?v=oNe(t,{axes:p,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(v=aNe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),v},lNe=function(t){var n=xa(t),r=Mo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:bC(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Jg(n,r)}},uR=function(t){var n=t.children,r=t.defaultShowTooltip,i=Cr(n,pu),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},cNe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ro(n&&n.type);return r&&r.indexOf("Bar")>=0})},fR=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},uNe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,f=r.height,d=r.children,p=r.margin||{},v=Cr(d,pu),g=Cr(d,ch),y=Object.keys(l).reduce(function(E,C){var T=l[C],A=T.orientation;return!T.mirror&&!T.hide?ve(ve({},E),{},We({},A,E[A]+T.width)):E},{left:p.left||0,right:p.right||0}),x=Object.keys(a).reduce(function(E,C){var T=a[C],A=T.orientation;return!T.mirror&&!T.hide?ve(ve({},E),{},We({},A,Mr(E,"".concat(A))+T.height)):E},{top:p.top||0,bottom:p.bottom||0}),_=ve(ve({},x),y),b=_.bottom;v&&(_.bottom+=v.props.height||pu.defaultProps.height),g&&n&&(_=dSe(_,i,r,n));var w=c-_.left-_.right,S=f-_.top-_.bottom;return ve(ve({brushBottom:b},_),{},{width:Math.max(w,0),height:Math.max(S,0)})},fNe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},rP=function(t){var n,r=t.chartName,i=t.GraphicalChild,o=t.defaultTooltipEventType,a=o===void 0?"axis":o,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=t.axisComponents,f=t.legendContent,d=t.formatAxisMap,p=t.defaultProps,v=function(x,_){var b=_.graphicalItems,w=_.stackGroups,S=_.offset,E=_.updateId,C=_.dataStartIndex,T=_.dataEndIndex,A=x.barSize,D=x.layout,N=x.barGap,I=x.barCategoryGap,F=x.maxBarSize,K=fR(D),W=K.numericAxisName,X=K.cateAxisName,Q=cNe(b),ne=[];return b.forEach(function(Z,z){var B=ob(x.data,{graphicalItems:[Z],dataStartIndex:C,dataEndIndex:T}),H=Z.props,ee=H.dataKey,q=H.maxBarSize,te=Z.props["".concat(W,"Id")],ie=Z.props["".concat(X,"Id")],ae={},fe=c.reduce(function(Te,Pe){var Ae=_["".concat(Pe.axisType,"Map")],le=Z.props["".concat(Pe.axisType,"Id")];Ae&&Ae[le]||Pe.axisType==="zAxis"||ml(!1);var ue=Ae[le];return ve(ve({},Te),{},We(We({},Pe.axisType,ue),"".concat(Pe.axisType,"Ticks"),Mo(ue)))},ae),j=fe[X],k=fe["".concat(X,"Ticks")],U=w&&w[te]&&w[te].hasStack&&OSe(Z,w[te].stackGroups),J=Ro(Z.type).indexOf("Bar")>=0,Y=Jg(j,k),oe=[],he=Q&&uSe({barSize:A,stackGroups:w,totalSize:fNe(fe,X)});if(J){var Se,se,pe=Ue(q)?F:q,me=(Se=(se=Jg(j,k,!0))!==null&&se!==void 0?se:pe)!==null&&Se!==void 0?Se:0;oe=fSe({barGap:N,barCategoryGap:I,bandSize:me!==Y?me:Y,sizeList:he[ie],maxBarSize:pe}),me!==Y&&(oe=oe.map(function(Te){return ve(ve({},Te),{},{position:ve(ve({},Te.position),{},{offset:Te.position.offset-me/2})})}))}var xe=Z&&Z.type&&Z.type.getComposedData;xe&&ne.push({props:ve(ve({},xe(ve(ve({},fe),{},{displayedData:B,props:x,dataKey:ee,item:Z,bandSize:Y,barPosition:oe,offset:S,stackedData:U,layout:D,dataStartIndex:C,dataEndIndex:T}))),{},We(We(We({key:Z.key||"item-".concat(z)},W,fe[W]),X,fe[X]),"animationId",E)),childIndex:Sde(Z,x.children),item:Z})}),ne},g=function(x,_){var b=x.props,w=x.dataStartIndex,S=x.dataEndIndex,E=x.updateId;if(!vk({props:b}))return null;var C=b.children,T=b.layout,A=b.stackOffset,D=b.data,N=b.reverseStackOrder,I=fR(T),F=I.numericAxisName,K=I.cateAxisName,W=tr(C,i),X=xSe(D,W,"".concat(F,"Id"),"".concat(K,"Id"),A,N),Q=c.reduce(function(H,ee){var q="".concat(ee.axisType,"Map");return ve(ve({},H),{},We({},q,sNe(b,ve(ve({},ee),{},{graphicalItems:W,stackGroups:ee.axisType===F&&X,dataStartIndex:w,dataEndIndex:S}))))},{}),ne=uNe(ve(ve({},Q),{},{props:b,graphicalItems:W}),_==null?void 0:_.legendBBox);Object.keys(Q).forEach(function(H){Q[H]=d(b,Q[H],ne,H.replace("Map",""),r)});var Z=Q["".concat(K,"Map")],z=lNe(Z),B=v(b,ve(ve({},Q),{},{dataStartIndex:w,dataEndIndex:S,updateId:E,graphicalItems:W,stackGroups:X,offset:ne}));return ve(ve({formattedGraphicalItems:B,graphicalItems:W,offset:ne,stackGroups:X},z),Q)};return n=function(y){Zke(x,y);function x(_){var b,w,S;return Gke(this,x),S=Kke(this,x,[_]),We(lt(S),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),We(lt(S),"accessibilityManager",new Nke),We(lt(S),"handleLegendBBoxUpdate",function(E){if(E){var C=S.state,T=C.dataStartIndex,A=C.dataEndIndex,D=C.updateId;S.setState(ve({legendBBox:E},g({props:S.props,dataStartIndex:T,dataEndIndex:A,updateId:D},ve(ve({},S.state),{},{legendBBox:E}))))}}),We(lt(S),"handleReceiveSyncEvent",function(E,C,T){if(S.props.syncId===E){if(T===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(C)}}),We(lt(S),"handleBrushChange",function(E){var C=E.startIndex,T=E.endIndex;if(C!==S.state.dataStartIndex||T!==S.state.dataEndIndex){var A=S.state.updateId;S.setState(function(){return ve({dataStartIndex:C,dataEndIndex:T},g({props:S.props,dataStartIndex:C,dataEndIndex:T,updateId:A},S.state))}),S.triggerSyncEvent({dataStartIndex:C,dataEndIndex:T})}}),We(lt(S),"handleMouseEnter",function(E){var C=S.getMouseInfo(E);if(C){var T=ve(ve({},C),{},{isTooltipActive:!0});S.setState(T),S.triggerSyncEvent(T);var A=S.props.onMouseEnter;Ve(A)&&A(T,E)}}),We(lt(S),"triggeredAfterMouseMove",function(E){var C=S.getMouseInfo(E),T=C?ve(ve({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(T),S.triggerSyncEvent(T);var A=S.props.onMouseMove;Ve(A)&&A(T,E)}),We(lt(S),"handleItemMouseEnter",function(E){S.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),We(lt(S),"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),We(lt(S),"handleMouseMove",function(E){E.persist(),S.throttleTriggeredAfterMouseMove(E)}),We(lt(S),"handleMouseLeave",function(E){S.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};S.setState(C),S.triggerSyncEvent(C);var T=S.props.onMouseLeave;Ve(T)&&T(C,E)}),We(lt(S),"handleOuterEvent",function(E){var C=Ode(E),T=Mr(S.props,"".concat(C));if(C&&Ve(T)){var A,D;/.*touch.*/i.test(C)?D=S.getMouseInfo(E.changedTouches[0]):D=S.getMouseInfo(E),T((A=D)!==null&&A!==void 0?A:{},E)}}),We(lt(S),"handleClick",function(E){var C=S.getMouseInfo(E);if(C){var T=ve(ve({},C),{},{isTooltipActive:!0});S.setState(T),S.triggerSyncEvent(T);var A=S.props.onClick;Ve(A)&&A(T,E)}}),We(lt(S),"handleMouseDown",function(E){var C=S.props.onMouseDown;if(Ve(C)){var T=S.getMouseInfo(E);C(T,E)}}),We(lt(S),"handleMouseUp",function(E){var C=S.props.onMouseUp;if(Ve(C)){var T=S.getMouseInfo(E);C(T,E)}}),We(lt(S),"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),We(lt(S),"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.handleMouseDown(E.changedTouches[0])}),We(lt(S),"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.handleMouseUp(E.changedTouches[0])}),We(lt(S),"triggerSyncEvent",function(E){S.props.syncId!==void 0&&s_.emit(l_,S.props.syncId,E,S.eventEmitterSymbol)}),We(lt(S),"applySyncEvent",function(E){var C=S.props,T=C.layout,A=C.syncMethod,D=S.state.updateId,N=E.dataStartIndex,I=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)S.setState(ve({dataStartIndex:N,dataEndIndex:I},g({props:S.props,dataStartIndex:N,dataEndIndex:I,updateId:D},S.state)));else if(E.activeTooltipIndex!==void 0){var F=E.chartX,K=E.chartY,W=E.activeTooltipIndex,X=S.state,Q=X.offset,ne=X.tooltipTicks;if(!Q)return;if(typeof A=="function")W=A(ne,E);else if(A==="value"){W=-1;for(var Z=0;Z=0){var U,J;if(F.dataKey&&!F.allowDuplicatedCategory){var Y=typeof F.dataKey=="function"?k:"payload.".concat(F.dataKey.toString());U=Cg(Z,Y,W),J=z&&B&&Cg(B,Y,W)}else U=Z==null?void 0:Z[K],J=z&&B&&B[K];if(ie||te){var oe=E.props.activeIndex!==void 0?E.props.activeIndex:K;return[R.cloneElement(E,ve(ve(ve({},A.props),fe),{},{activeIndex:oe})),null,null]}if(!Ue(U))return[j].concat(xu(S.renderActivePoints({item:A,activePoint:U,basePoint:J,childIndex:K,isRange:z})))}else{var he,Se=(he=S.getItemByXY(S.state.activeCoordinate))!==null&&he!==void 0?he:{graphicalItem:j},se=Se.graphicalItem,pe=se.item,me=pe===void 0?E:pe,xe=se.childIndex,Te=ve(ve(ve({},A.props),fe),{},{activeIndex:xe});return[R.cloneElement(me,Te),null,null]}return z?[j,null,null]:[j,null]}),We(lt(S),"renderCustomized",function(E,C,T){return R.cloneElement(E,ve(ve({key:"recharts-customized-".concat(T)},S.props),S.state))}),We(lt(S),"renderMap",{CartesianGrid:{handler:Rm,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Rm},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Rm},YAxis:{handler:Rm},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((b=_.id)!==null&&b!==void 0?b:ls("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=D8(S.triggeredAfterMouseMove,(w=_.throttleDelay)!==null&&w!==void 0?w:1e3/60),S.state={},S}return qke(x,[{key:"componentDidMount",value:function(){var b,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,w=b.children,S=b.data,E=b.height,C=b.layout,T=Cr(w,Xr);if(T){var A=T.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length)){var D=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,N=IO(this.state,S,A,D),I=this.state.tooltipTicks[A].coordinate,F=(this.state.offset.top+E)/2,K=C==="horizontal",W=K?{x:I,y:F}:{y:I,x:F},X=this.state.formattedGraphicalItems.find(function(ne){var Z=ne.item;return Z.type.name==="Scatter"});X&&(W=ve(ve({},W),X.props.points[A].tooltipPosition),N=X.props.points[A].tooltipPayload);var Q={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:D,activePayload:N,activeCoordinate:W};this.setState(Q),this.renderCursor(T),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var S,E;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(b){m2([Cr(b.children,Xr)],[Cr(this.props.children,Xr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Cr(this.props.children,Xr);if(b&&typeof b.props.shared=="boolean"){var w=b.props.shared?"axis":"item";return l.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var w=this.container,S=w.getBoundingClientRect(),E=H_e(S),C={chartX:Math.round(b.pageX-E.left),chartY:Math.round(b.pageY-E.top)},T=S.width/w.offsetWidth||1,A=this.inRange(C.chartX,C.chartY,T);if(!A)return null;var D=this.state,N=D.xAxisMap,I=D.yAxisMap,F=this.getTooltipEventType();if(F!=="axis"&&N&&I){var K=xa(N).scale,W=xa(I).scale,X=K&&K.invert?K.invert(C.chartX):null,Q=W&&W.invert?W.invert(C.chartY):null;return ve(ve({},C),{},{xValue:X,yValue:Q})}var ne=cR(this.state,this.props.data,this.props.layout,A);return ne?ve(ve({},C),ne):null}},{key:"inRange",value:function(b,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,C=b/S,T=w/S;if(E==="horizontal"||E==="vertical"){var A=this.state.offset,D=C>=A.left&&C<=A.left+A.width&&T>=A.top&&T<=A.top+A.height;return D?{x:C,y:T}:null}var N=this.state,I=N.angleAxisMap,F=N.radiusAxisMap;if(I&&F){var K=xa(I);return TM({x:C,y:T},K)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,w=this.getTooltipEventType(),S=Cr(b,Xr),E={};S&&w==="axis"&&(S.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var C=Pg(this.props,this.handleOuterEvent);return ve(ve({},C),E)}},{key:"addListener",value:function(){s_.on(l_,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){s_.removeListener(l_,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,w,S){for(var E=this.state.formattedGraphicalItems,C=0,T=E.length;C");return e}function yNe(e){function t(n,r){const{instance:i,context:o}=e(n).current;return R.useImperativeHandle(r,()=>i),n.children==null?null:V.createElement(J7,{value:o},n.children)}return R.forwardRef(t)}function bNe(e){function t(n,r){const[i,o]=R.useState(!1),{instance:a}=e(n,o).current;R.useImperativeHandle(r,()=>a),R.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?qy.createPortal(n.children,s):null}return R.forwardRef(t)}function _Ne(e){function t(n,r){const{instance:i}=e(n).current;return R.useImperativeHandle(r,()=>i),null}return R.forwardRef(t)}function tB(e,t){const n=R.useRef();R.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function iP(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function xNe(e,t){return function(r,i){const o=eB(),a=e(iP(r,o),o);return X7(o.map,r.attribution),tB(a.current,r.eventHandlers),t(a.current,o,r,i),a}}var DO={exports:{}};/* @preserve + the props "valueKey" will be deprecated in 1.1.0`),_=d);var b=r.filter(function(A){return Tt(A,_,0)!==0}).length,w=(x>=360?b:b-1)*l,S=x-b*v-w,E=r.reduce(function(A,D){var N=Tt(D,_,0);return A+(Ee(N)?N:0)},0),C;if(E>0){var T;C=r.map(function(A,D){var N=Tt(A,_,0),I=Tt(A,f,D),F=(Ee(N)?N:0)/E,K;D?K=T.endAngle+Zn(y)*l*(N!==0?1:0):K=a;var W=K+Zn(y)*((N!==0?v:0)+F*S),X=(K+W)/2,Q=(g.innerRadius+g.outerRadius)/2,ne=[{name:I,value:N,payload:A,dataKey:_,type:p}],Z=Ot(g.cx,g.cy,Q,X);return T=kt(kt(kt({percent:F,cornerRadius:o,name:I,tooltipPayload:ne,midAngle:X,middleRadius:Q,tooltipPosition:Z},A),g),{},{value:Tt(A,_),startAngle:K,endAngle:W,payload:A,paddingAngle:Zn(y)*l}),T})}return kt(kt({},g),{},{sectors:C,data:r})});var QTe=Math.ceil,JTe=Math.max;function eje(e,t,n,r){for(var i=-1,o=JTe(QTe((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}var tje=eje,nje=I8,SL=1/0,rje=17976931348623157e292;function ije(e){if(!e)return e===0?e:0;if(e=nje(e),e===SL||e===-SL){var t=e<0?-1:1;return t*rje}return e===e?e:0}var h7=ije,oje=tje,aje=F0,i_=h7;function sje(e){return function(t,n,r){return r&&typeof r!="number"&&aje(t,n,r)&&(n=r=void 0),t=i_(t),n===void 0?(n=t,t=0):n=i_(n),r=r===void 0?t0&&r.handleDrag(i.changedTouches[0])}),Sr(Ki(r),"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a==null||a({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Sr(Ki(r),"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Sr(Ki(r),"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Sr(Ki(r),"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Sr(Ki(r),"handleSlideDragStart",function(i){var o=jL(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(Ki(r),"startX"),endX:r.handleTravellerDragStart.bind(Ki(r),"endX")},r.state={},r}return gje(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,f=c.length-1,d=Math.min(i,o),p=Math.max(i,o),v=t.getIndexInRange(a,d),g=t.getIndexInRange(a,p);return{startIndex:v-v%l,endIndex:g===f?f:g-g%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,l=Tt(o[r],s,r);return Ve(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,l=this.props,c=l.x,f=l.width,d=l.travellerWidth,p=l.startIndex,v=l.endIndex,g=l.onChange,y=r.pageX-o;y>0?y=Math.min(y,c+f-d-s,c+f-d-a):y<0&&(y=Math.max(y,c-a,c-s));var x=this.getIndex({startX:a+y,endX:s+y});(x.startIndex!==p||x.endIndex!==v)&&g&&g(x),this.setState({startX:a+y,endX:s+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=jL(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[a],f=this.props,d=f.x,p=f.width,v=f.travellerWidth,g=f.onChange,y=f.gap,x=f.data,_={startX:this.state.startX,endX:this.state.endX},b=r.pageX-o;b>0?b=Math.min(b,d+p-v-c):b<0&&(b=Math.max(b,d-c)),_[a]=c+b;var w=this.getIndex(_),S=w.startIndex,E=w.endIndex,C=function(){var A=x.length-1;return a==="startX"&&(s>l?S%y===0:E%y===0)||sl?E%y===0:S%y===0)||s>l&&E===A};this.setState(Sr(Sr({},a,c+b),"brushMoveStartX",r.pageX),function(){g&&C()&&g(w)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var p=d+r;if(!(p===-1||p>=s.length)){var v=s[p];i==="startX"&&v>=c||i==="endX"&&v<=l||this.setState(Sr({},i,v),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return V.createElement("rect",{stroke:c,fill:l,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.data,c=r.children,f=r.padding,d=R.Children.only(c);return d?V.cloneElement(d,{x:i,y:o,width:a,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,l=this.props,c=l.y,f=l.travellerWidth,d=l.height,p=l.traveller,v=l.ariaLabel,g=l.data,y=l.startIndex,x=l.endIndex,_=Math.max(r,this.props.x),b=o_(o_({},De(this.props,!1)),{},{x:_,y:c,width:f,height:d}),w=v||"Min value: ".concat((o=g[y])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[x])===null||a===void 0?void 0:a.name);return V.createElement(Xe,{tabIndex:0,role:"slider","aria-label":w,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,b))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,l=o.stroke,c=o.travellerWidth,f=Math.min(r,i)+c,d=Math.max(Math.abs(i-r)-c,0);return V.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,f=this.state,d=f.startX,p=f.endX,v=5,g={pointerEvents:"none",fill:c};return V.createElement(Xe,{className:"recharts-brush-texts"},V.createElement(hl,hy({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-v,y:a+s/2},g),this.getTextOfTick(i)),V.createElement(hl,hy({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+l+v,y:a+s/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,l=r.y,c=r.width,f=r.height,d=r.alwaysShowText,p=this.state,v=p.startX,g=p.endX,y=p.isTextActive,x=p.isSlideMoving,_=p.isTravellerMoving,b=p.isTravellerFocused;if(!i||!i.length||!Ee(s)||!Ee(l)||!Ee(c)||!Ee(f)||c<=0||f<=0)return null;var w=Ce("recharts-brush",o),S=V.Children.count(a)===1,E=mje("userSelect","none");return V.createElement(Xe,{className:w,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(v,g),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(g,"endX"),(y||x||_||b||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(o+s/2)-1;return V.createElement(V.Fragment,null,V.createElement("rect",{x:i,y:o,width:a,height:s,fill:l,stroke:"none"}),V.createElement("line",{x1:i+1,y1:c,x2:i+a-1,y2:c,fill:"none",stroke:"#fff"}),V.createElement("line",{x1:i+1,y1:c+2,x2:i+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return V.isValidElement(r)?o=V.cloneElement(r,i):Ve(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,f=r.startIndex,d=r.endIndex;if(o!==i.prevData||c!==i.prevUpdateId)return o_({prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},o&&o.length?wje({data:o,width:a,x:s,travellerWidth:l,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+a-l]);var p=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>i?s=l:a=l}return i>=r[s]?s:a}}]),t}(R.PureComponent);Sr(pu,"displayName","Brush");Sr(pu,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Oje=yC;function Sje(e,t){var n;return Oje(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var Eje=Sje,Cje=c8,Pje=_o,Tje=Eje,jje=xr,Aje=F0;function kje(e,t,n){var r=jje(e)?Cje:Tje;return n&&Aje(e,t,n)&&(t=void 0),r(e,Pje(t))}var Nje=kje;const Mje=at(Nje);var so=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},AL=N8;function Lje(e,t,n){t=="__proto__"&&AL?AL(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Rje=Lje,$je=Rje,Ije=A8,Dje=_o;function Fje(e,t){var n={};return t=Dje(t),Ije(e,function(r,i,o){$je(n,i,t(r,i,o))}),n}var Bje=Fje;const Uje=at(Bje);function zje(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oAe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function aAe(e,t){var n=e.x,r=e.y,i=iAe(e,eAe),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),f=parseInt(c,10),d="".concat(t.width||i.width),p=parseInt(d,10);return If(If(If(If(If({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function NL(e){return V.createElement(uy,xO({shapeType:"rectangle",propTransformer:aAe,activeClassName:"recharts-active-bar"},e))}var sAe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||ml(!1),n)}},lAe=["value","background"],y7;function mu(e){"@babel/helpers - typeof";return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(e)}function cAe(e,t){if(e==null)return{};var n=uAe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uAe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(W)0&&Math.abs(K)0&&(K=Math.min((te||0)-(W[ie-1]||0),K))}),Number.isFinite(K)){var X=K/F,Q=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(T=X*Q/2),y.padding==="no-gap"){var ne=Xn(t.barCategoryGap,X*Q),Z=X*Q/2;T=Z-ne-(Z-ne)/Q*ne}}}i==="xAxis"?A=[r.left+(w.left||0)+(T||0),r.left+r.width-(w.right||0)-(T||0)]:i==="yAxis"?A=l==="horizontal"?[r.top+r.height-(w.bottom||0),r.top+(w.top||0)]:[r.top+(w.top||0)+(T||0),r.top+r.height-(w.bottom||0)-(T||0)]:A=y.range,E&&(A=[A[1],A[0]]);var z=UF(y,o,p),B=z.scale,H=z.realScaleType;B.domain(_).range(A),zF(B);var ee=VF(B,Oi(Oi({},y),{},{realScaleType:H}));i==="xAxis"?(I=x==="top"&&!S||x==="bottom"&&S,D=r.left,N=d[C]-I*y.height):i==="yAxis"&&(I=x==="left"&&!S||x==="right"&&S,D=d[C]-I*y.width,N=r.top);var q=Oi(Oi(Oi({},y),ee),{},{realScaleType:H,x:D,y:N,scale:B,width:i==="xAxis"?r.width:y.width,height:i==="yAxis"?r.height:y.height});return q.bandSize=Jg(q,ee),!y.hide&&i==="xAxis"?d[C]+=(I?-1:1)*q.height:y.hide||(d[C]+=(I?-1:1)*q.width),Oi(Oi({},v),{},nb({},g,q))},{})},O7=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},_Ae=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return O7({x:n,y:r},{x:i,y:o})},S7=function(){function e(t){gAe(this,e),this.scale=t}return yAe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}]),e}();nb(S7,"EPS",1e-4);var KC=function(t){var n=Object.keys(t).reduce(function(r,i){return Oi(Oi({},r),{},nb({},i,S7.create(t[i])))},{});return Oi(Oi({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return Uje(i,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(i){return g7(i,function(o,a){return n[a].isInRange(o)})}})};function xAe(e){return(e%180+180)%180}var wAe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=xAe(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?i[o?t[a]:a]:void 0}}var PAe=CAe,TAe=h7;function jAe(e){var t=TAe(e),n=t%1;return t===t?n?t-n:t:0}var AAe=jAe,kAe=O8,NAe=_o,MAe=AAe,LAe=Math.max;function RAe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:MAe(n);return i<0&&(i=LAe(r+i,0)),kAe(e,NAe(t),i)}var $Ae=RAe,IAe=PAe,DAe=$Ae,FAe=IAe(DAe),BAe=FAe;const UAe=at(BAe);var zAe=hfe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),YC=R.createContext(void 0),ZC=R.createContext(void 0),E7=R.createContext(void 0),C7=R.createContext({}),P7=R.createContext(void 0),T7=R.createContext(0),j7=R.createContext(0),IL=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,f=zAe(o);return V.createElement(YC.Provider,{value:r},V.createElement(ZC.Provider,{value:i},V.createElement(C7.Provider,{value:o},V.createElement(E7.Provider,{value:f},V.createElement(P7.Provider,{value:a},V.createElement(T7.Provider,{value:c},V.createElement(j7.Provider,{value:l},s)))))))},VAe=function(){return R.useContext(P7)},A7=function(t){var n=R.useContext(YC);n==null&&ml(!1);var r=n[t];return r==null&&ml(!1),r},WAe=function(){var t=R.useContext(YC);return xa(t)},HAe=function(){var t=R.useContext(ZC),n=UAe(t,function(r){return g7(r.domain,Number.isFinite)});return n||xa(t)},k7=function(t){var n=R.useContext(ZC);n==null&&ml(!1);var r=n[t];return r==null&&ml(!1),r},GAe=function(){var t=R.useContext(E7);return t},qAe=function(){return R.useContext(C7)},XC=function(){return R.useContext(j7)},QC=function(){return R.useContext(T7)};function Bh(e){"@babel/helpers - typeof";return Bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bh(e)}function DL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FL(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function pke(e,t){return N7(e,t+1)}function mke(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,f=a,d=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:N7(r,c)};var y=l,x,_=function(){return x===void 0&&(x=n(g,y)),x},b=g.coordinate,w=l===0||gy(e,b,_,f,s);w||(l=0,f=a,c+=1),w&&(f=b+e*(_()/2+i),l+=c)},p;c<=o.length;)if(p=d(),p)return p.v;return[]}function Vh(e){"@babel/helpers - typeof";return Vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vh(e)}function HL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function In(e){for(var t=1;t0?v.coordinate-x*e:v.coordinate})}else o[p]=v=In(In({},v),{},{tickCoord:v.coordinate});var _=gy(e,v.tickCoord,y,s,l);_&&(l=v.tickCoord-e*(y()/2+i),o[p]=In(In({},v),{},{isShow:!0}))},f=a-1;f>=0;f--)c(f);return o}function _ke(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(o){var f=r[s-1],d=n(f,s-1),p=e*(f.coordinate+e*d/2-c);a[s-1]=f=In(In({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var v=gy(e,f.tickCoord,function(){return d},l,c);v&&(c=f.tickCoord-e*(d/2+i),a[s-1]=In(In({},f),{},{isShow:!0}))}for(var g=o?s-1:s,y=function(b){var w=a[b],S,E=function(){return S===void 0&&(S=n(w,b)),S};if(b===0){var C=e*(w.coordinate-e*E()/2-l);a[b]=w=In(In({},w),{},{tickCoord:C<0?w.coordinate-C*e:w.coordinate})}else a[b]=w=In(In({},w),{},{tickCoord:w.coordinate});var T=gy(e,w.tickCoord,E,l,c);T&&(l=w.tickCoord+e*(E()/2+i),a[b]=In(In({},w),{},{isShow:!0}))},x=0;x=2?Zn(i[1].coordinate-i[0].coordinate):1,_=hke(o,x,v);return l==="equidistantPreserveStart"?mke(x,_,y,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=_ke(x,_,y,i,a,l==="preserveStartEnd"):p=bke(x,_,y,i,a),p.filter(function(b){return b.isShow}))}var xke=["viewBox"],wke=["viewBox"],Oke=["ticks"];function vu(e){"@babel/helpers - typeof";return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu(e)}function xc(){return xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ske(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Eke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qL(e,t){for(var n=0;n0?l(this.props):l(v)),a<=0||s<=0||!g||!g.length?null:V.createElement(Xe,{className:Ce("recharts-cartesian-axis",c),ref:function(x){r.layerReference=x}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),bn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return V.isValidElement(r)?a=V.cloneElement(r,i):Ve(r)?a=r(i):a=V.createElement(hl,xc({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}]),t}(R.Component);tP(qu,"displayName","CartesianAxis");tP(qu,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Nke=["x1","y1","x2","y2","key"],Mke=["offset"];function vl(e){"@babel/helpers - typeof";return vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(e)}function KL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ike(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var Dke=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height;return V.createElement("rect",{x:i,y:o,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function R7(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ve(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=YL(t,Nke),c=De(l,!1);c.offset;var f=YL(c,Mke);n=V.createElement("line",Ws({},f,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function Fke(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var c=Bn(Bn({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return R7(i,c)});return V.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function Bke(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var c=Bn(Bn({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return R7(i,c)});return V.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function Uke(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+i-i)}).sort(function(p,v){return p-v});i!==f[0]&&f.unshift(0);var d=f.map(function(p,v){var g=!f[v+1],y=g?i+a-p:f[v+1]-p;if(y<=0)return null;var x=v%t.length;return V.createElement("rect",{key:"react-".concat(v),y:p,x:r,height:y,width:o,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function zke(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var f=c.map(function(p){return Math.round(p+o-o)}).sort(function(p,v){return p-v});o!==f[0]&&f.unshift(0);var d=f.map(function(p,v){var g=!f[v+1],y=g?o+s-p:f[v+1]-p;if(y<=0)return null;var x=v%r.length;return V.createElement("rect",{key:"react-".concat(v),x:p,y:a,width:y,height:l,stroke:"none",fill:r[x],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return V.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var Vke=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return BF(eP(Bn(Bn(Bn({},qu.defaultProps),r),{},{ticks:Mo(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},Wke=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return BF(eP(Bn(Bn(Bn({},qu.defaultProps),r),{},{ticks:Mo(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Gl={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function nP(e){var t,n,r,i,o,a,s=XC(),l=QC(),c=qAe(),f=Bn(Bn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Gl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Gl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Gl.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Gl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Gl.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Gl.verticalFill,x:Ee(e.x)?e.x:c.left,y:Ee(e.y)?e.y:c.top,width:Ee(e.width)?e.width:c.width,height:Ee(e.height)?e.height:c.height}),d=f.x,p=f.y,v=f.width,g=f.height,y=f.syncWithTicks,x=f.horizontalValues,_=f.verticalValues,b=WAe(),w=HAe();if(!Ee(v)||v<=0||!Ee(g)||g<=0||!Ee(d)||d!==+d||!Ee(p)||p!==+p)return null;var S=f.verticalCoordinatesGenerator||Vke,E=f.horizontalCoordinatesGenerator||Wke,C=f.horizontalPoints,T=f.verticalPoints;if((!C||!C.length)&&Ve(E)){var A=x&&x.length,D=E({yAxis:w?Bn(Bn({},w),{},{ticks:A?x:w.ticks}):void 0,width:s,height:l,offset:c},A?!0:y);ki(Array.isArray(D),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(vl(D),"]")),Array.isArray(D)&&(C=D)}if((!T||!T.length)&&Ve(S)){var N=_&&_.length,I=S({xAxis:b?Bn(Bn({},b),{},{ticks:N?_:b.ticks}):void 0,width:s,height:l,offset:c},N?!0:y);ki(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(vl(I),"]")),Array.isArray(I)&&(T=I)}return V.createElement("g",{className:"recharts-cartesian-grid"},V.createElement(Dke,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height}),V.createElement(Fke,Ws({},f,{offset:c,horizontalPoints:C,xAxis:b,yAxis:w})),V.createElement(Bke,Ws({},f,{offset:c,verticalPoints:T,xAxis:b,yAxis:w})),V.createElement(Uke,Ws({},f,{horizontalPoints:C})),V.createElement(zke,Ws({},f,{verticalPoints:T})))}nP.displayName="CartesianGrid";var Hke=["type","layout","connectNulls","ref"];function gu(e){"@babel/helpers - typeof";return gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gu(e)}function Gke(e,t){if(e==null)return{};var n=qke(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qke(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function xd(){return xd=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){v=[].concat(ql(l.slice(0,g)),[d-y]);break}var x=v.length%2===0?[0,p]:[p];return[].concat(ql(t.repeat(l,f)),ql(v),x).map(function(_){return"".concat(_,"px")}).join(", ")}),Si(da(n),"id",ls("recharts-line-")),Si(da(n),"pathRef",function(a){n.mainCurve=a}),Si(da(n),"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Si(da(n),"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Jke(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,s=o.xAxis,l=o.yAxis,c=o.layout,f=o.children,d=tr(f,Hu);if(!d)return null;var p=function(y,x){return{x:y.x,y:y.y,value:y.value,errorVal:Tt(y.payload,x)}},v={clipPath:r?"url(#clipPath-".concat(i,")"):null};return V.createElement(Xe,v,d.map(function(g){return V.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:p})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,f=s.dataKey,d=De(this.props,!1),p=De(l,!0),v=c.map(function(y,x){var _=Or(Or(Or({key:"dot-".concat(x),r:3},d),p),{},{value:y.value,dataKey:f,cx:y.x,cy:y.y,index:x,payload:y.payload});return t.renderDotItem(l,_)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return V.createElement(Xe,xd({className:"recharts-line-dots",key:"dots"},g),v)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,l=s.type,c=s.layout,f=s.connectNulls;s.ref;var d=Gke(s,Hke),p=Or(Or(Or({},De(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:f});return V.createElement(Ua,xd({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,p=a.animationEasing,v=a.animationId,g=a.animateNewValues,y=a.width,x=a.height,_=this.state,b=_.prevPoints,w=_.totalLength;return V.createElement(hi,{begin:f,duration:d,isActive:c,easing:p,from:{t:0},to:{t:1},key:"line-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var E=S.t;if(b){var C=b.length/s.length,T=s.map(function(F,K){var W=Math.floor(K*C);if(b[W]){var X=b[W],Q=Bt(X.x,F.x),ne=Bt(X.y,F.y);return Or(Or({},F),{},{x:Q(E),y:ne(E)})}if(g){var Z=Bt(y*2,F.x),z=Bt(x/2,F.y);return Or(Or({},F),{},{x:Z(E),y:z(E)})}return Or(Or({},F),{},{x:F.x,y:F.y})});return o.renderCurveStatically(T,r,i)}var A=Bt(0,w),D=A(E),N;if(l){var I="".concat(l).split(/[,\s]+/gim).map(function(F){return parseFloat(F)});N=o.getStrokeDasharray(D,w,I)}else N=o.generateSimpleStrokeDasharray(w,D);return o.renderCurveStatically(s,r,i,{strokeDasharray:N})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,l=this.state,c=l.prevPoints,f=l.totalLength;return s&&a&&a.length&&(!c&&f>0||!Xa(c,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,c=i.xAxis,f=i.yAxis,d=i.top,p=i.left,v=i.width,g=i.height,y=i.isAnimationActive,x=i.id;if(o||!s||!s.length)return null;var _=this.state.isAnimationFinished,b=s.length===1,w=Ce("recharts-line",l),S=c&&c.allowDataOverflow,E=f&&f.allowDataOverflow,C=S||E,T=Ue(x)?this.id:x,A=(r=De(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},D=A.r,N=D===void 0?3:D,I=A.strokeWidth,F=I===void 0?2:I,K=L5(a)?a:{},W=K.clipDot,X=W===void 0?!0:W,Q=N*2+F;return V.createElement(Xe,{className:w},S||E?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(T)},V.createElement("rect",{x:S?p:p-v/2,y:E?d:d-g/2,width:S?v:v*2,height:E?g:g*2})),!X&&V.createElement("clipPath",{id:"clipPath-dots-".concat(T)},V.createElement("rect",{x:p-Q/2,y:d-Q/2,width:v+Q,height:g+Q}))):null,!b&&this.renderCurve(C,T),this.renderErrorBar(C,T),(b||a)&&this.renderDots(C,X,T),(!y||_)&&Ni.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(ql(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function Hs(){return Hs=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Xa(f,a)||!Xa(d,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,c=i.top,f=i.left,d=i.xAxis,p=i.yAxis,v=i.width,g=i.height,y=i.isAnimationActive,x=i.id;if(o||!s||!s.length)return null;var _=this.state.isAnimationFinished,b=s.length===1,w=Ce("recharts-area",l),S=d&&d.allowDataOverflow,E=p&&p.allowDataOverflow,C=S||E,T=Ue(x)?this.id:x,A=(r=De(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},D=A.r,N=D===void 0?3:D,I=A.strokeWidth,F=I===void 0?2:I,K=L5(a)?a:{},W=K.clipDot,X=W===void 0?!0:W,Q=N*2+F;return V.createElement(Xe,{className:w},S||E?V.createElement("defs",null,V.createElement("clipPath",{id:"clipPath-".concat(T)},V.createElement("rect",{x:S?f:f-v/2,y:E?c:c-g/2,width:S?v:v*2,height:E?g:g*2})),!X&&V.createElement("clipPath",{id:"clipPath-dots-".concat(T)},V.createElement("rect",{x:f-Q/2,y:c-Q/2,width:v+Q,height:g+Q}))):null,b?null:this.renderArea(C,T),(a||b)&&this.renderDots(C,X,T),(!y||_)&&Ni.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}]),t}(R.PureComponent);D7=El;no(El,"displayName","Area");no(El,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!si.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});no(El,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(Ee(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var f=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});no(El,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,v=t.layout,g=c&&c.length,y=D7.getBaseValue(t,n,r,i),x=v==="horizontal",_=!1,b=d.map(function(S,E){var C;g?C=c[f+E]:(C=Tt(S,l),Array.isArray(C)?_=!0:C=[y,C]);var T=C[1]==null||g&&Tt(S,l)==null;return x?{x:lu({axis:r,ticks:o,bandSize:s,entry:S,index:E}),y:T?null:i.scale(C[1]),value:C,payload:S}:{x:T?null:r.scale(C[1]),y:lu({axis:i,ticks:a,bandSize:s,entry:S,index:E}),value:C,payload:S}}),w;return g||_?w=b.map(function(S){var E=Array.isArray(S.value)?S.value[0]:null;return x?{x:S.x,y:E!=null&&S.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:S.y}}):w=x?i.scale(y):r.scale(y),ha({points:b,baseLine:w,layout:v,isRange:_},p)});no(El,"renderDotItem",function(e,t){var n;if(V.isValidElement(e))n=V.cloneElement(e,t);else if(Ve(e))n=e(t);else{var r=Ce("recharts-area-dot",typeof e!="boolean"?e.className:"");n=V.createElement(bp,Hs({},t,{className:r}))}return n});var rb=function(){return null};rb.displayName="ZAxis";rb.defaultProps={zAxisId:0,range:[64,64],scale:"auto",type:"number"};var h3e=["option","isActive"];function wd(){return wd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function m3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function v3e(e){var t=e.option,n=e.isActive,r=p3e(e,h3e);return typeof t=="string"?V.createElement(uy,wd({option:V.createElement($0,wd({type:t},r)),isActive:n,shapeType:"symbols"},r)):V.createElement(uy,wd({option:t,isActive:n,shapeType:"symbols"},r))}function bu(e){"@babel/helpers - typeof";return bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bu(e)}function Od(){return Od=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function H3e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function G3e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sR(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&Ee(i)&&Ee(o)?t.slice(i,o+1):[]};function Z7(e){return e==="number"?[0,"auto"]:void 0}var IO=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=ob(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(l,c){var f,d=(f=c.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(a.dataKey&&!a.allowDuplicatedCategory){var v=d===void 0?s:d;p=Cg(v,a.dataKey,i)}else p=d&&d[r]||s[r];return p?[].concat(xu(l),[HF(c,p)]):l},[])},cR=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=rNe(o,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,f=cSe(a,s,c,l);if(f>=0&&c){var d=c[f]&&c[f].value,p=IO(t,n,f,d),v=iNe(r,s,f,o);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:v}}return null},oNe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,v=FF(f,o);return r.reduce(function(g,y){var x,_=y.props,b=_.type,w=_.dataKey,S=_.allowDataOverflow,E=_.allowDuplicatedCategory,C=_.scale,T=_.ticks,A=_.includeHidden,D=y.props[a];if(g[D])return g;var N=ob(t.data,{graphicalItems:i.filter(function(ee){return ee.props[a]===D}),dataStartIndex:l,dataEndIndex:c}),I=N.length,F,K,W;M3e(y.props.domain,S,b)&&(F=eO(y.props.domain,null,S),v&&(b==="number"||C!=="auto")&&(W=gd(N,w,"category")));var X=Z7(b);if(!F||F.length===0){var Q,ne=(Q=y.props.domain)!==null&&Q!==void 0?Q:X;if(w){if(F=gd(N,w,b),b==="category"&&v){var Z=dde(F);E&&Z?(K=F,F=dy(0,I)):E||(F=EM(ne,F,y).reduce(function(ee,q){return ee.indexOf(q)>=0?ee:[].concat(xu(ee),[q])},[]))}else if(b==="category")E?F=F.filter(function(ee){return ee!==""&&!Ue(ee)}):F=EM(ne,F,y).reduce(function(ee,q){return ee.indexOf(q)>=0||q===""||Ue(q)?ee:[].concat(xu(ee),[q])},[]);else if(b==="number"){var z=pSe(N,i.filter(function(ee){return ee.props[a]===D&&(A||!ee.props.hide)}),w,o,f);z&&(F=z)}v&&(b==="number"||C!=="auto")&&(W=gd(N,w,"category"))}else v?F=dy(0,I):s&&s[D]&&s[D].hasStack&&b==="number"?F=p==="expand"?[0,1]:WF(s[D].stackGroups,l,c):F=DF(N,i.filter(function(ee){return ee.props[a]===D&&(A||!ee.props.hide)}),b,f,!0);if(b==="number")F=LO(d,F,D,o,T),ne&&(F=eO(ne,F,S));else if(b==="category"&&ne){var B=ne,H=F.every(function(ee){return B.indexOf(ee)>=0});H&&(F=B)}}return ve(ve({},g),{},We({},D,ve(ve({},y.props),{},{axisType:o,domain:F,categoricalDomain:W,duplicateDomain:K,originalDomain:(x=y.props.domain)!==null&&x!==void 0?x:X,isCategorical:v,layout:f})))},{})},aNe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,d=t.children,p=ob(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),v=p.length,g=FF(f,o),y=-1;return r.reduce(function(x,_){var b=_.props[a],w=Z7("number");if(!x[b]){y++;var S;return g?S=dy(0,v):s&&s[b]&&s[b].hasStack?(S=WF(s[b].stackGroups,l,c),S=LO(d,S,b,o)):(S=eO(w,DF(p,r.filter(function(E){return E.props[a]===b&&!E.props.hide}),"number",f),i.defaultProps.allowDataOverflow),S=LO(d,S,b,o)),ve(ve({},x),{},We({},b,ve(ve({axisType:o},i.defaultProps),{},{hide:!0,orientation:Mr(tNe,"".concat(o,".").concat(y%2),null),domain:S,originalDomain:w,isCategorical:g,layout:f})))}return x},{})},sNe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),p=tr(f,o),v={};return p&&p.length?v=oNe(t,{axes:p,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(v=aNe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),v},lNe=function(t){var n=xa(t),r=Mo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:bC(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Jg(n,r)}},uR=function(t){var n=t.children,r=t.defaultShowTooltip,i=Cr(n,pu),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},cNe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ro(n&&n.type);return r&&r.indexOf("Bar")>=0})},fR=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},uNe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,f=r.height,d=r.children,p=r.margin||{},v=Cr(d,pu),g=Cr(d,ch),y=Object.keys(l).reduce(function(E,C){var T=l[C],A=T.orientation;return!T.mirror&&!T.hide?ve(ve({},E),{},We({},A,E[A]+T.width)):E},{left:p.left||0,right:p.right||0}),x=Object.keys(a).reduce(function(E,C){var T=a[C],A=T.orientation;return!T.mirror&&!T.hide?ve(ve({},E),{},We({},A,Mr(E,"".concat(A))+T.height)):E},{top:p.top||0,bottom:p.bottom||0}),_=ve(ve({},x),y),b=_.bottom;v&&(_.bottom+=v.props.height||pu.defaultProps.height),g&&n&&(_=dSe(_,i,r,n));var w=c-_.left-_.right,S=f-_.top-_.bottom;return ve(ve({brushBottom:b},_),{},{width:Math.max(w,0),height:Math.max(S,0)})},fNe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},rP=function(t){var n,r=t.chartName,i=t.GraphicalChild,o=t.defaultTooltipEventType,a=o===void 0?"axis":o,s=t.validateTooltipEventTypes,l=s===void 0?["axis"]:s,c=t.axisComponents,f=t.legendContent,d=t.formatAxisMap,p=t.defaultProps,v=function(x,_){var b=_.graphicalItems,w=_.stackGroups,S=_.offset,E=_.updateId,C=_.dataStartIndex,T=_.dataEndIndex,A=x.barSize,D=x.layout,N=x.barGap,I=x.barCategoryGap,F=x.maxBarSize,K=fR(D),W=K.numericAxisName,X=K.cateAxisName,Q=cNe(b),ne=[];return b.forEach(function(Z,z){var B=ob(x.data,{graphicalItems:[Z],dataStartIndex:C,dataEndIndex:T}),H=Z.props,ee=H.dataKey,q=H.maxBarSize,te=Z.props["".concat(W,"Id")],ie=Z.props["".concat(X,"Id")],ae={},fe=c.reduce(function(Te,Pe){var Ae=_["".concat(Pe.axisType,"Map")],le=Z.props["".concat(Pe.axisType,"Id")];Ae&&Ae[le]||Pe.axisType==="zAxis"||ml(!1);var ue=Ae[le];return ve(ve({},Te),{},We(We({},Pe.axisType,ue),"".concat(Pe.axisType,"Ticks"),Mo(ue)))},ae),j=fe[X],k=fe["".concat(X,"Ticks")],U=w&&w[te]&&w[te].hasStack&&OSe(Z,w[te].stackGroups),J=Ro(Z.type).indexOf("Bar")>=0,Y=Jg(j,k),oe=[],he=Q&&uSe({barSize:A,stackGroups:w,totalSize:fNe(fe,X)});if(J){var Se,se,pe=Ue(q)?F:q,me=(Se=(se=Jg(j,k,!0))!==null&&se!==void 0?se:pe)!==null&&Se!==void 0?Se:0;oe=fSe({barGap:N,barCategoryGap:I,bandSize:me!==Y?me:Y,sizeList:he[ie],maxBarSize:pe}),me!==Y&&(oe=oe.map(function(Te){return ve(ve({},Te),{},{position:ve(ve({},Te.position),{},{offset:Te.position.offset-me/2})})}))}var xe=Z&&Z.type&&Z.type.getComposedData;xe&&ne.push({props:ve(ve({},xe(ve(ve({},fe),{},{displayedData:B,props:x,dataKey:ee,item:Z,bandSize:Y,barPosition:oe,offset:S,stackedData:U,layout:D,dataStartIndex:C,dataEndIndex:T}))),{},We(We(We({key:Z.key||"item-".concat(z)},W,fe[W]),X,fe[X]),"animationId",E)),childIndex:Sde(Z,x.children),item:Z})}),ne},g=function(x,_){var b=x.props,w=x.dataStartIndex,S=x.dataEndIndex,E=x.updateId;if(!v3({props:b}))return null;var C=b.children,T=b.layout,A=b.stackOffset,D=b.data,N=b.reverseStackOrder,I=fR(T),F=I.numericAxisName,K=I.cateAxisName,W=tr(C,i),X=xSe(D,W,"".concat(F,"Id"),"".concat(K,"Id"),A,N),Q=c.reduce(function(H,ee){var q="".concat(ee.axisType,"Map");return ve(ve({},H),{},We({},q,sNe(b,ve(ve({},ee),{},{graphicalItems:W,stackGroups:ee.axisType===F&&X,dataStartIndex:w,dataEndIndex:S}))))},{}),ne=uNe(ve(ve({},Q),{},{props:b,graphicalItems:W}),_==null?void 0:_.legendBBox);Object.keys(Q).forEach(function(H){Q[H]=d(b,Q[H],ne,H.replace("Map",""),r)});var Z=Q["".concat(K,"Map")],z=lNe(Z),B=v(b,ve(ve({},Q),{},{dataStartIndex:w,dataEndIndex:S,updateId:E,graphicalItems:W,stackGroups:X,offset:ne}));return ve(ve({formattedGraphicalItems:B,graphicalItems:W,offset:ne,stackGroups:X},z),Q)};return n=function(y){Z3e(x,y);function x(_){var b,w,S;return G3e(this,x),S=K3e(this,x,[_]),We(lt(S),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),We(lt(S),"accessibilityManager",new N3e),We(lt(S),"handleLegendBBoxUpdate",function(E){if(E){var C=S.state,T=C.dataStartIndex,A=C.dataEndIndex,D=C.updateId;S.setState(ve({legendBBox:E},g({props:S.props,dataStartIndex:T,dataEndIndex:A,updateId:D},ve(ve({},S.state),{},{legendBBox:E}))))}}),We(lt(S),"handleReceiveSyncEvent",function(E,C,T){if(S.props.syncId===E){if(T===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(C)}}),We(lt(S),"handleBrushChange",function(E){var C=E.startIndex,T=E.endIndex;if(C!==S.state.dataStartIndex||T!==S.state.dataEndIndex){var A=S.state.updateId;S.setState(function(){return ve({dataStartIndex:C,dataEndIndex:T},g({props:S.props,dataStartIndex:C,dataEndIndex:T,updateId:A},S.state))}),S.triggerSyncEvent({dataStartIndex:C,dataEndIndex:T})}}),We(lt(S),"handleMouseEnter",function(E){var C=S.getMouseInfo(E);if(C){var T=ve(ve({},C),{},{isTooltipActive:!0});S.setState(T),S.triggerSyncEvent(T);var A=S.props.onMouseEnter;Ve(A)&&A(T,E)}}),We(lt(S),"triggeredAfterMouseMove",function(E){var C=S.getMouseInfo(E),T=C?ve(ve({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(T),S.triggerSyncEvent(T);var A=S.props.onMouseMove;Ve(A)&&A(T,E)}),We(lt(S),"handleItemMouseEnter",function(E){S.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),We(lt(S),"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),We(lt(S),"handleMouseMove",function(E){E.persist(),S.throttleTriggeredAfterMouseMove(E)}),We(lt(S),"handleMouseLeave",function(E){S.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};S.setState(C),S.triggerSyncEvent(C);var T=S.props.onMouseLeave;Ve(T)&&T(C,E)}),We(lt(S),"handleOuterEvent",function(E){var C=Ode(E),T=Mr(S.props,"".concat(C));if(C&&Ve(T)){var A,D;/.*touch.*/i.test(C)?D=S.getMouseInfo(E.changedTouches[0]):D=S.getMouseInfo(E),T((A=D)!==null&&A!==void 0?A:{},E)}}),We(lt(S),"handleClick",function(E){var C=S.getMouseInfo(E);if(C){var T=ve(ve({},C),{},{isTooltipActive:!0});S.setState(T),S.triggerSyncEvent(T);var A=S.props.onClick;Ve(A)&&A(T,E)}}),We(lt(S),"handleMouseDown",function(E){var C=S.props.onMouseDown;if(Ve(C)){var T=S.getMouseInfo(E);C(T,E)}}),We(lt(S),"handleMouseUp",function(E){var C=S.props.onMouseUp;if(Ve(C)){var T=S.getMouseInfo(E);C(T,E)}}),We(lt(S),"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),We(lt(S),"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.handleMouseDown(E.changedTouches[0])}),We(lt(S),"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&S.handleMouseUp(E.changedTouches[0])}),We(lt(S),"triggerSyncEvent",function(E){S.props.syncId!==void 0&&s_.emit(l_,S.props.syncId,E,S.eventEmitterSymbol)}),We(lt(S),"applySyncEvent",function(E){var C=S.props,T=C.layout,A=C.syncMethod,D=S.state.updateId,N=E.dataStartIndex,I=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)S.setState(ve({dataStartIndex:N,dataEndIndex:I},g({props:S.props,dataStartIndex:N,dataEndIndex:I,updateId:D},S.state)));else if(E.activeTooltipIndex!==void 0){var F=E.chartX,K=E.chartY,W=E.activeTooltipIndex,X=S.state,Q=X.offset,ne=X.tooltipTicks;if(!Q)return;if(typeof A=="function")W=A(ne,E);else if(A==="value"){W=-1;for(var Z=0;Z=0){var U,J;if(F.dataKey&&!F.allowDuplicatedCategory){var Y=typeof F.dataKey=="function"?k:"payload.".concat(F.dataKey.toString());U=Cg(Z,Y,W),J=z&&B&&Cg(B,Y,W)}else U=Z==null?void 0:Z[K],J=z&&B&&B[K];if(ie||te){var oe=E.props.activeIndex!==void 0?E.props.activeIndex:K;return[R.cloneElement(E,ve(ve(ve({},A.props),fe),{},{activeIndex:oe})),null,null]}if(!Ue(U))return[j].concat(xu(S.renderActivePoints({item:A,activePoint:U,basePoint:J,childIndex:K,isRange:z})))}else{var he,Se=(he=S.getItemByXY(S.state.activeCoordinate))!==null&&he!==void 0?he:{graphicalItem:j},se=Se.graphicalItem,pe=se.item,me=pe===void 0?E:pe,xe=se.childIndex,Te=ve(ve(ve({},A.props),fe),{},{activeIndex:xe});return[R.cloneElement(me,Te),null,null]}return z?[j,null,null]:[j,null]}),We(lt(S),"renderCustomized",function(E,C,T){return R.cloneElement(E,ve(ve({key:"recharts-customized-".concat(T)},S.props),S.state))}),We(lt(S),"renderMap",{CartesianGrid:{handler:Rm,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Rm},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Rm},YAxis:{handler:Rm},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((b=_.id)!==null&&b!==void 0?b:ls("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=D8(S.triggeredAfterMouseMove,(w=_.throttleDelay)!==null&&w!==void 0?w:1e3/60),S.state={},S}return q3e(x,[{key:"componentDidMount",value:function(){var b,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,w=b.children,S=b.data,E=b.height,C=b.layout,T=Cr(w,Xr);if(T){var A=T.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length)){var D=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,N=IO(this.state,S,A,D),I=this.state.tooltipTicks[A].coordinate,F=(this.state.offset.top+E)/2,K=C==="horizontal",W=K?{x:I,y:F}:{y:I,x:F},X=this.state.formattedGraphicalItems.find(function(ne){var Z=ne.item;return Z.type.name==="Scatter"});X&&(W=ve(ve({},W),X.props.points[A].tooltipPosition),N=X.props.points[A].tooltipPayload);var Q={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:D,activePayload:N,activeCoordinate:W};this.setState(Q),this.renderCursor(T),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var S,E;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(b){m2([Cr(b.children,Xr)],[Cr(this.props.children,Xr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=Cr(this.props.children,Xr);if(b&&typeof b.props.shared=="boolean"){var w=b.props.shared?"axis":"item";return l.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var w=this.container,S=w.getBoundingClientRect(),E=H_e(S),C={chartX:Math.round(b.pageX-E.left),chartY:Math.round(b.pageY-E.top)},T=S.width/w.offsetWidth||1,A=this.inRange(C.chartX,C.chartY,T);if(!A)return null;var D=this.state,N=D.xAxisMap,I=D.yAxisMap,F=this.getTooltipEventType();if(F!=="axis"&&N&&I){var K=xa(N).scale,W=xa(I).scale,X=K&&K.invert?K.invert(C.chartX):null,Q=W&&W.invert?W.invert(C.chartY):null;return ve(ve({},C),{},{xValue:X,yValue:Q})}var ne=cR(this.state,this.props.data,this.props.layout,A);return ne?ve(ve({},C),ne):null}},{key:"inRange",value:function(b,w){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,C=b/S,T=w/S;if(E==="horizontal"||E==="vertical"){var A=this.state.offset,D=C>=A.left&&C<=A.left+A.width&&T>=A.top&&T<=A.top+A.height;return D?{x:C,y:T}:null}var N=this.state,I=N.angleAxisMap,F=N.radiusAxisMap;if(I&&F){var K=xa(I);return TM({x:C,y:T},K)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,w=this.getTooltipEventType(),S=Cr(b,Xr),E={};S&&w==="axis"&&(S.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var C=Pg(this.props,this.handleOuterEvent);return ve(ve({},C),E)}},{key:"addListener",value:function(){s_.on(l_,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){s_.removeListener(l_,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,w,S){for(var E=this.state.formattedGraphicalItems,C=0,T=E.length;C");return e}function yNe(e){function t(n,r){const{instance:i,context:o}=e(n).current;return R.useImperativeHandle(r,()=>i),n.children==null?null:V.createElement(J7,{value:o},n.children)}return R.forwardRef(t)}function bNe(e){function t(n,r){const[i,o]=R.useState(!1),{instance:a}=e(n,o).current;R.useImperativeHandle(r,()=>a),R.useEffect(function(){i&&a.update()},[a,i,n.children]);const s=a._contentNode;return s?qy.createPortal(n.children,s):null}return R.forwardRef(t)}function _Ne(e){function t(n,r){const{instance:i}=e(n).current;return R.useImperativeHandle(r,()=>i),null}return R.forwardRef(t)}function tB(e,t){const n=R.useRef();R.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function iP(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function xNe(e,t){return function(r,i){const o=eB(),a=e(iP(r,o),o);return X7(o.map,r.attribution),tB(a.current,r.eventHandlers),t(a.current,o,r,i),a}}var DO={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade */(function(e,t){(function(n,r){r(t)})(tc,function(n){var r="1.9.4";function i(u){var h,O,P,M;for(O=1,P=arguments.length;O"u"||!L||!L.Mixin)){u=w(u)?u:[u];for(var h=0;h0?Math.floor(u):Math.ceil(u)};Z.prototype={clone:function(){return new Z(this.x,this.y)},add:function(u){return this.clone()._add(B(u))},_add:function(u){return this.x+=u.x,this.y+=u.y,this},subtract:function(u){return this.clone()._subtract(B(u))},_subtract:function(u){return this.x-=u.x,this.y-=u.y,this},divideBy:function(u){return this.clone()._divideBy(u)},_divideBy:function(u){return this.x/=u,this.y/=u,this},multiplyBy:function(u){return this.clone()._multiplyBy(u)},_multiplyBy:function(u){return this.x*=u,this.y*=u,this},scaleBy:function(u){return new Z(this.x*u.x,this.y*u.y)},unscaleBy:function(u){return new Z(this.x/u.x,this.y/u.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=z(this.x),this.y=z(this.y),this},distanceTo:function(u){u=B(u);var h=u.x-this.x,O=u.y-this.y;return Math.sqrt(h*h+O*O)},equals:function(u){return u=B(u),u.x===this.x&&u.y===this.y},contains:function(u){return u=B(u),Math.abs(u.x)<=Math.abs(this.x)&&Math.abs(u.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function B(u,h,O){return u instanceof Z?u:w(u)?new Z(u[0],u[1]):u==null?u:typeof u=="object"&&"x"in u&&"y"in u?new Z(u.x,u.y):new Z(u,h,O)}function H(u,h){if(u)for(var O=h?[u,h]:u,P=0,M=O.length;P=this.min.x&&O.x<=this.max.x&&h.y>=this.min.y&&O.y<=this.max.y},intersects:function(u){u=ee(u);var h=this.min,O=this.max,P=u.min,M=u.max,G=M.x>=h.x&&P.x<=O.x,re=M.y>=h.y&&P.y<=O.y;return G&&re},overlaps:function(u){u=ee(u);var h=this.min,O=this.max,P=u.min,M=u.max,G=M.x>h.x&&P.xh.y&&P.y=h.lat&&M.lat<=O.lat&&P.lng>=h.lng&&M.lng<=O.lng},intersects:function(u){u=te(u);var h=this._southWest,O=this._northEast,P=u.getSouthWest(),M=u.getNorthEast(),G=M.lat>=h.lat&&P.lat<=O.lat,re=M.lng>=h.lng&&P.lng<=O.lng;return G&&re},overlaps:function(u){u=te(u);var h=this._southWest,O=this._northEast,P=u.getSouthWest(),M=u.getNorthEast(),G=M.lat>h.lat&&P.lath.lng&&P.lng1,Kt=function(){var u=!1;try{var h=Object.defineProperty({},"passive",{get:function(){u=!0}});window.addEventListener("testPassiveEventSupport",d,h),window.removeEventListener("testPassiveEventSupport",d,h)}catch{}return u}(),Vn=function(){return!!document.createElement("canvas").getContext}(),En=!!(document.createElementNS&&Se("svg").createSVGRect),Cn=!!En&&function(){var u=document.createElement("div");return u.innerHTML="",(u.firstChild&&u.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),on=!En&&function(){try{var u=document.createElement("div");u.innerHTML='';var h=u.firstChild;return h.style.behavior="url(#default#VML)",h&&typeof h.adj=="object"}catch{return!1}}(),mi=navigator.platform.indexOf("Mac")===0,vi=navigator.platform.indexOf("Linux")===0;function Pn(u){return navigator.userAgent.toLowerCase().indexOf(u)>=0}var Fe={ie:me,ielt9:xe,edge:Te,webkit:Pe,android:Ae,android23:le,androidStock:ye,opera:ge,chrome:we,gecko:ke,safari:Me,phantom:Je,opera12:tt,win:Ye,ie3d:Wt,webkit3d:It,gecko3d:hn,any3d:zn,mobile:zi,mobileWebkit:Sn,mobileWebkit3d:ef,msPointer:Vi,pointer:Ap,touch:Np,touchNative:kp,mobileOpera:tf,mobileGecko:hs,retina:Jt,passiveEvents:Kt,canvas:Vn,svg:En,vml:on,inlineSvg:Cn,mac:mi,linux:vi},NP=Fe.msPointer?"MSPointerDown":"pointerdown",MP=Fe.msPointer?"MSPointerMove":"pointermove",LP=Fe.msPointer?"MSPointerUp":"pointerup",RP=Fe.msPointer?"MSPointerCancel":"pointercancel",mb={touchstart:NP,touchmove:MP,touchend:LP,touchcancel:RP},$P={touchstart:k9,touchmove:Mp,touchend:Mp,touchcancel:Mp},Tl={},IP=!1;function C9(u,h,O){return h==="touchstart"&&A9(),$P[h]?(O=$P[h].bind(this,O),u.addEventListener(mb[h],O,!1),O):(console.warn("wrong event specified:",h),d)}function P9(u,h,O){if(!mb[h]){console.warn("wrong event specified:",h);return}u.removeEventListener(mb[h],O,!1)}function T9(u){Tl[u.pointerId]=u}function j9(u){Tl[u.pointerId]&&(Tl[u.pointerId]=u)}function DP(u){delete Tl[u.pointerId]}function A9(){IP||(document.addEventListener(NP,T9,!0),document.addEventListener(MP,j9,!0),document.addEventListener(LP,DP,!0),document.addEventListener(RP,DP,!0),IP=!0)}function Mp(u,h){if(h.pointerType!==(h.MSPOINTER_TYPE_MOUSE||"mouse")){h.touches=[];for(var O in Tl)h.touches.push(Tl[O]);h.changedTouches=[h],u(h)}}function k9(u,h){h.MSPOINTER_TYPE_TOUCH&&h.pointerType===h.MSPOINTER_TYPE_TOUCH&&Tn(h),Mp(u,h)}function N9(u){var h={},O,P;for(P in u)O=u[P],h[P]=O&&O.bind?O.bind(u):O;return u=h,h.type="dblclick",h.detail=2,h.isTrusted=!1,h._simulated=!0,h}var M9=200;function L9(u,h){u.addEventListener("dblclick",h);var O=0,P;function M(G){if(G.detail!==1){P=G.detail;return}if(!(G.pointerType==="mouse"||G.sourceCapabilities&&!G.sourceCapabilities.firesTouchEvents)){var re=VP(G);if(!(re.some(function(de){return de instanceof HTMLLabelElement&&de.attributes.for})&&!re.some(function(de){return de instanceof HTMLInputElement||de instanceof HTMLSelectElement}))){var ce=Date.now();ce-O<=M9?(P++,P===2&&h(N9(G))):P=1,O=ce}}}return u.addEventListener("click",M),{dblclick:h,simDblclick:M}}function R9(u,h){u.removeEventListener("dblclick",h.dblclick),u.removeEventListener("click",h.simDblclick)}var vb=$p(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),nf=$p(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),FP=nf==="webkitTransition"||nf==="OTransition"?nf+"End":"transitionend";function BP(u){return typeof u=="string"?document.getElementById(u):u}function rf(u,h){var O=u.style[h]||u.currentStyle&&u.currentStyle[h];if((!O||O==="auto")&&document.defaultView){var P=document.defaultView.getComputedStyle(u,null);O=P?P[h]:null}return O==="auto"?null:O}function ut(u,h,O){var P=document.createElement(u);return P.className=h||"",O&&O.appendChild(P),P}function Dt(u){var h=u.parentNode;h&&h.removeChild(u)}function Lp(u){for(;u.firstChild;)u.removeChild(u.firstChild)}function jl(u){var h=u.parentNode;h&&h.lastChild!==u&&h.appendChild(u)}function Al(u){var h=u.parentNode;h&&h.firstChild!==u&&h.insertBefore(u,h.firstChild)}function gb(u,h){if(u.classList!==void 0)return u.classList.contains(h);var O=Rp(u);return O.length>0&&new RegExp("(^|\\s)"+h+"(\\s|$)").test(O)}function Qe(u,h){if(u.classList!==void 0)for(var O=g(h),P=0,M=O.length;P0?2*window.devicePixelRatio:1;function HP(u){return Fe.edge?u.wheelDeltaY/2:u.deltaY&&u.deltaMode===0?-u.deltaY/D9:u.deltaY&&u.deltaMode===1?-u.deltaY*20:u.deltaY&&u.deltaMode===2?-u.deltaY*60:u.deltaX||u.deltaZ?0:u.wheelDelta?(u.wheelDeltaY||u.wheelDelta)/2:u.detail&&Math.abs(u.detail)<32765?-u.detail*20:u.detail?u.detail/-32765*60:0}function jb(u,h){var O=h.relatedTarget;if(!O)return!0;try{for(;O&&O!==u;)O=O.parentNode}catch{return!1}return O!==u}var F9={__proto__:null,on:Ze,off:bt,stopPropagation:vs,disableScrollPropagation:Tb,disableClickPropagation:lf,preventDefault:Tn,stop:gs,getPropagationPath:VP,getMousePosition:WP,getWheelDelta:HP,isExternalTarget:jb,addListener:Ze,removeListener:bt},GP=ne.extend({run:function(u,h,O,P){this.stop(),this._el=u,this._inProgress=!0,this._duration=O||.25,this._easeOutPower=1/Math.max(P||.5,.2),this._startPos=ms(u),this._offset=h.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=I(this._animate,this),this._step()},_step:function(u){var h=+new Date-this._startTime,O=this._duration*1e3;hthis.options.maxZoom)?this.setZoom(u):this},panInsideBounds:function(u,h){this._enforcingBounds=!0;var O=this.getCenter(),P=this._limitCenter(O,this._zoom,te(u));return O.equals(P)||this.panTo(P,h),this._enforcingBounds=!1,this},panInside:function(u,h){h=h||{};var O=B(h.paddingTopLeft||h.padding||[0,0]),P=B(h.paddingBottomRight||h.padding||[0,0]),M=this.project(this.getCenter()),G=this.project(u),re=this.getPixelBounds(),ce=ee([re.min.add(O),re.max.subtract(P)]),de=ce.getSize();if(!ce.contains(G)){this._enforcingBounds=!0;var _e=G.subtract(ce.getCenter()),Le=ce.extend(G).getSize().subtract(de);M.x+=_e.x<0?-Le.x:Le.x,M.y+=_e.y<0?-Le.y:Le.y,this.panTo(this.unproject(M),h),this._enforcingBounds=!1}return this},invalidateSize:function(u){if(!this._loaded)return this;u=i({animate:!1,pan:!0},u===!0?{animate:!0}:u);var h=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var O=this.getSize(),P=h.divideBy(2).round(),M=O.divideBy(2).round(),G=P.subtract(M);return!G.x&&!G.y?this:(u.animate&&u.pan?this.panBy(G):(u.pan&&this._rawPanBy(G),this.fire("move"),u.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:h,newSize:O}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(u){if(u=this._locateOptions=i({timeout:1e4,watch:!1},u),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var h=a(this._handleGeolocationResponse,this),O=a(this._handleGeolocationError,this);return u.watch?this._locationWatchId=navigator.geolocation.watchPosition(h,O,u):navigator.geolocation.getCurrentPosition(h,O,u),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(u){if(this._container._leaflet_id){var h=u.code,O=u.message||(h===1?"permission denied":h===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:h,message:"Geolocation error: "+O+"."})}},_handleGeolocationResponse:function(u){if(this._container._leaflet_id){var h=u.coords.latitude,O=u.coords.longitude,P=new ie(h,O),M=P.toBounds(u.coords.accuracy*2),G=this._locateOptions;if(G.setView){var re=this.getBoundsZoom(M);this.setView(P,G.maxZoom?Math.min(re,G.maxZoom):re)}var ce={latlng:P,bounds:M,timestamp:u.timestamp};for(var de in u.coords)typeof u.coords[de]=="number"&&(ce[de]=u.coords[de]);this.fire("locationfound",ce)}},addHandler:function(u,h){if(!h)return this;var O=this[u]=new h(this);return this._handlers.push(O),this.options[u]&&O.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Dt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(F(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var u;for(u in this._layers)this._layers[u].remove();for(u in this._panes)Dt(this._panes[u]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(u,h){var O="leaflet-pane"+(u?" leaflet-"+u.replace("Pane","")+"-pane":""),P=ut("div",O,h||this._mapPane);return u&&(this._panes[u]=P),P},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var u=this.getPixelBounds(),h=this.unproject(u.getBottomLeft()),O=this.unproject(u.getTopRight());return new q(h,O)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(u,h,O){u=te(u),O=B(O||[0,0]);var P=this.getZoom()||0,M=this.getMinZoom(),G=this.getMaxZoom(),re=u.getNorthWest(),ce=u.getSouthEast(),de=this.getSize().subtract(O),_e=ee(this.project(ce,P),this.project(re,P)).getSize(),Le=Fe.any3d?this.options.zoomSnap:1,ze=de.x/_e.x,et=de.y/_e.y,Wn=h?Math.max(ze,et):Math.min(ze,et);return P=this.getScaleZoom(Wn,P),Le&&(P=Math.round(P/(Le/100))*(Le/100),P=h?Math.ceil(P/Le)*Le:Math.floor(P/Le)*Le),Math.max(M,Math.min(G,P))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new Z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(u,h){var O=this._getTopLeftPoint(u,h);return new H(O,O.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(u){return this.options.crs.getProjectedBounds(u===void 0?this.getZoom():u)},getPane:function(u){return typeof u=="string"?this._panes[u]:u},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(u,h){var O=this.options.crs;return h=h===void 0?this._zoom:h,O.scale(u)/O.scale(h)},getScaleZoom:function(u,h){var O=this.options.crs;h=h===void 0?this._zoom:h;var P=O.zoom(u*O.scale(h));return isNaN(P)?1/0:P},project:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.latLngToPoint(ae(u),h)},unproject:function(u,h){return h=h===void 0?this._zoom:h,this.options.crs.pointToLatLng(B(u),h)},layerPointToLatLng:function(u){var h=B(u).add(this.getPixelOrigin());return this.unproject(h)},latLngToLayerPoint:function(u){var h=this.project(ae(u))._round();return h._subtract(this.getPixelOrigin())},wrapLatLng:function(u){return this.options.crs.wrapLatLng(ae(u))},wrapLatLngBounds:function(u){return this.options.crs.wrapLatLngBounds(te(u))},distance:function(u,h){return this.options.crs.distance(ae(u),ae(h))},containerPointToLayerPoint:function(u){return B(u).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(u){return B(u).add(this._getMapPanePos())},containerPointToLatLng:function(u){var h=this.containerPointToLayerPoint(B(u));return this.layerPointToLatLng(h)},latLngToContainerPoint:function(u){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ae(u)))},mouseEventToContainerPoint:function(u){return WP(u,this._container)},mouseEventToLayerPoint:function(u){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(u))},mouseEventToLatLng:function(u){return this.layerPointToLatLng(this.mouseEventToLayerPoint(u))},_initContainer:function(u){var h=this._container=BP(u);if(h){if(h._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Ze(h,"scroll",this._onScroll,this),this._containerId=l(h)},_initLayout:function(){var u=this._container;this._fadeAnimated=this.options.fadeAnimation&&Fe.any3d,Qe(u,"leaflet-container"+(Fe.touch?" leaflet-touch":"")+(Fe.retina?" leaflet-retina":"")+(Fe.ielt9?" leaflet-oldie":"")+(Fe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var h=rf(u,"position");h!=="absolute"&&h!=="relative"&&h!=="fixed"&&h!=="sticky"&&(u.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var u=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),en(this._mapPane,new Z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Qe(u.markerPane,"leaflet-zoom-hide"),Qe(u.shadowPane,"leaflet-zoom-hide"))},_resetView:function(u,h,O){en(this._mapPane,new Z(0,0));var P=!this._loaded;this._loaded=!0,h=this._limitZoom(h),this.fire("viewprereset");var M=this._zoom!==h;this._moveStart(M,O)._move(u,h)._moveEnd(M),this.fire("viewreset"),P&&this.fire("load")},_moveStart:function(u,h){return u&&this.fire("zoomstart"),h||this.fire("movestart"),this},_move:function(u,h,O,P){h===void 0&&(h=this._zoom);var M=this._zoom!==h;return this._zoom=h,this._lastCenter=u,this._pixelOrigin=this._getNewPixelOrigin(u),P?O&&O.pinch&&this.fire("zoom",O):((M||O&&O.pinch)&&this.fire("zoom",O),this.fire("move",O)),this},_moveEnd:function(u){return u&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return F(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(u){en(this._mapPane,this._getMapPanePos().subtract(u))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(u){this._targets={},this._targets[l(this._container)]=this;var h=u?bt:Ze;h(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&h(window,"resize",this._onResize,this),Fe.any3d&&this.options.transform3DLimit&&(u?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){F(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var u=this._getMapPanePos();Math.max(Math.abs(u.x),Math.abs(u.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(u,h){for(var O=[],P,M=h==="mouseout"||h==="mouseover",G=u.target||u.srcElement,re=!1;G;){if(P=this._targets[l(G)],P&&(h==="click"||h==="preclick")&&this._draggableMoved(P)){re=!0;break}if(P&&P.listens(h,!0)&&(M&&!jb(G,u)||(O.push(P),M))||G===this._container)break;G=G.parentNode}return!O.length&&!re&&!M&&this.listens(h,!0)&&(O=[this]),O},_isClickDisabled:function(u){for(;u&&u!==this._container;){if(u._leaflet_disable_click)return!0;u=u.parentNode}},_handleDOMEvent:function(u){var h=u.target||u.srcElement;if(!(!this._loaded||h._leaflet_disable_events||u.type==="click"&&this._isClickDisabled(h))){var O=u.type;O==="mousedown"&&Ob(h),this._fireDOMEvent(u,O)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(u,h,O){if(u.type==="click"){var P=i({},u);P.type="preclick",this._fireDOMEvent(P,P.type,O)}var M=this._findEventTargets(u,h);if(O){for(var G=[],re=0;re0?Math.round(u-h)/2:Math.max(0,Math.ceil(u))-Math.max(0,Math.floor(h))},_limitZoom:function(u){var h=this.getMinZoom(),O=this.getMaxZoom(),P=Fe.any3d?this.options.zoomSnap:1;return P&&(u=Math.round(u/P)*P),Math.max(h,Math.min(O,u))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Yt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(u,h){var O=this._getCenterOffset(u)._trunc();return(h&&h.animate)!==!0&&!this.getSize().contains(O)?!1:(this.panBy(O,h),!0)},_createAnimProxy:function(){var u=this._proxy=ut("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(u),this.on("zoomanim",function(h){var O=vb,P=this._proxy.style[O];ps(this._proxy,this.project(h.center,h.zoom),this.getZoomScale(h.zoom,1)),P===this._proxy.style[O]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Dt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var u=this.getCenter(),h=this.getZoom();ps(this._proxy,this.project(u,h),this.getZoomScale(h,1))},_catchTransitionEnd:function(u){this._animatingZoom&&u.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(u,h,O){if(this._animatingZoom)return!0;if(O=O||{},!this._zoomAnimated||O.animate===!1||this._nothingToAnimate()||Math.abs(h-this._zoom)>this.options.zoomAnimationThreshold)return!1;var P=this.getZoomScale(h),M=this._getCenterOffset(u)._divideBy(1-1/P);return O.animate!==!0&&!this.getSize().contains(M)?!1:(I(function(){this._moveStart(!0,O.noMoveStart||!1)._animateZoom(u,h,!0)},this),!0)},_animateZoom:function(u,h,O,P){this._mapPane&&(O&&(this._animatingZoom=!0,this._animateToCenter=u,this._animateToZoom=h,Qe(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:u,zoom:h,noUpdate:P}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Yt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function B9(u,h){return new st(u,h)}var gi=W.extend({options:{position:"topright"},initialize:function(u){y(this,u)},getPosition:function(){return this.options.position},setPosition:function(u){var h=this._map;return h&&h.removeControl(this),this.options.position=u,h&&h.addControl(this),this},getContainer:function(){return this._container},addTo:function(u){this.remove(),this._map=u;var h=this._container=this.onAdd(u),O=this.getPosition(),P=u._controlCorners[O];return Qe(h,"leaflet-control"),O.indexOf("bottom")!==-1?P.insertBefore(h,P.firstChild):P.appendChild(h),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Dt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(u){this._map&&u&&u.screenX>0&&u.screenY>0&&this._map.getContainer().focus()}}),cf=function(u){return new gi(u)};st.include({addControl:function(u){return u.addTo(this),this},removeControl:function(u){return u.remove(),this},_initControlPos:function(){var u=this._controlCorners={},h="leaflet-",O=this._controlContainer=ut("div",h+"control-container",this._container);function P(M,G){var re=h+M+" "+h+G;u[M+G]=ut("div",re,O)}P("top","left"),P("top","right"),P("bottom","left"),P("bottom","right")},_clearControlPos:function(){for(var u in this._controlCorners)Dt(this._controlCorners[u]);Dt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var qP=gi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(u,h,O,P){return O1,this._baseLayersList.style.display=u?"":"none"),this._separator.style.display=h&&u?"":"none",this},_onLayerChange:function(u){this._handlingClick||this._update();var h=this._getLayer(l(u.target)),O=h.overlay?u.type==="add"?"overlayadd":"overlayremove":u.type==="add"?"baselayerchange":null;O&&this._map.fire(O,h)},_createRadioElement:function(u,h){var O='",P=document.createElement("div");return P.innerHTML=O,P.firstChild},_addItem:function(u){var h=document.createElement("label"),O=this._map.hasLayer(u.layer),P;u.overlay?(P=document.createElement("input"),P.type="checkbox",P.className="leaflet-control-layers-selector",P.defaultChecked=O):P=this._createRadioElement("leaflet-base-layers_"+l(this),O),this._layerControlInputs.push(P),P.layerId=l(u.layer),Ze(P,"click",this._onInputClick,this);var M=document.createElement("span");M.innerHTML=" "+u.name;var G=document.createElement("span");h.appendChild(G),G.appendChild(P),G.appendChild(M);var re=u.overlay?this._overlaysList:this._baseLayersList;return re.appendChild(h),this._checkDisabledLayers(),h},_onInputClick:function(){if(!this._preventClick){var u=this._layerControlInputs,h,O,P=[],M=[];this._handlingClick=!0;for(var G=u.length-1;G>=0;G--)h=u[G],O=this._getLayer(h.layerId).layer,h.checked?P.push(O):h.checked||M.push(O);for(G=0;G=0;M--)h=u[M],O=this._getLayer(h.layerId).layer,h.disabled=O.options.minZoom!==void 0&&PO.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var u=this._section;this._preventClick=!0,Ze(u,"click",Tn),this.expand();var h=this;setTimeout(function(){bt(u,"click",Tn),h._preventClick=!1})}}),U9=function(u,h,O){return new qP(u,h,O)},Ab=gi.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(u){var h="leaflet-control-zoom",O=ut("div",h+" leaflet-bar"),P=this.options;return this._zoomInButton=this._createButton(P.zoomInText,P.zoomInTitle,h+"-in",O,this._zoomIn),this._zoomOutButton=this._createButton(P.zoomOutText,P.zoomOutTitle,h+"-out",O,this._zoomOut),this._updateDisabled(),u.on("zoomend zoomlevelschange",this._updateDisabled,this),O},onRemove:function(u){u.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(u){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(u.shiftKey?3:1))},_createButton:function(u,h,O,P,M){var G=ut("a",O,P);return G.innerHTML=u,G.href="#",G.title=h,G.setAttribute("role","button"),G.setAttribute("aria-label",h),lf(G),Ze(G,"click",gs),Ze(G,"click",M,this),Ze(G,"click",this._refocusOnMap,this),G},_updateDisabled:function(){var u=this._map,h="leaflet-disabled";Yt(this._zoomInButton,h),Yt(this._zoomOutButton,h),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||u._zoom===u.getMinZoom())&&(Qe(this._zoomOutButton,h),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||u._zoom===u.getMaxZoom())&&(Qe(this._zoomInButton,h),this._zoomInButton.setAttribute("aria-disabled","true"))}});st.mergeOptions({zoomControl:!0}),st.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ab,this.addControl(this.zoomControl))});var z9=function(u){return new Ab(u)},KP=gi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(u){var h="leaflet-control-scale",O=ut("div",h),P=this.options;return this._addScales(P,h+"-line",O),u.on(P.updateWhenIdle?"moveend":"move",this._update,this),u.whenReady(this._update,this),O},onRemove:function(u){u.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(u,h,O){u.metric&&(this._mScale=ut("div",h,O)),u.imperial&&(this._iScale=ut("div",h,O))},_update:function(){var u=this._map,h=u.getSize().y/2,O=u.distance(u.containerPointToLatLng([0,h]),u.containerPointToLatLng([this.options.maxWidth,h]));this._updateScales(O)},_updateScales:function(u){this.options.metric&&u&&this._updateMetric(u),this.options.imperial&&u&&this._updateImperial(u)},_updateMetric:function(u){var h=this._getRoundNum(u),O=h<1e3?h+" m":h/1e3+" km";this._updateScale(this._mScale,O,h/u)},_updateImperial:function(u){var h=u*3.2808399,O,P,M;h>5280?(O=h/5280,P=this._getRoundNum(O),this._updateScale(this._iScale,P+" mi",P/O)):(M=this._getRoundNum(h),this._updateScale(this._iScale,M+" ft",M/h))},_updateScale:function(u,h,O){u.style.width=Math.round(this.options.maxWidth*O)+"px",u.innerHTML=h},_getRoundNum:function(u){var h=Math.pow(10,(Math.floor(u)+"").length-1),O=u/h;return O=O>=10?10:O>=5?5:O>=3?3:O>=2?2:1,h*O}}),V9=function(u){return new KP(u)},W9='',kb=gi.extend({options:{position:"bottomright",prefix:''+(Fe.inlineSvg?W9+" ":"")+"Leaflet"},initialize:function(u){y(this,u),this._attributions={}},onAdd:function(u){u.attributionControl=this,this._container=ut("div","leaflet-control-attribution"),lf(this._container);for(var h in u._layers)u._layers[h].getAttribution&&this.addAttribution(u._layers[h].getAttribution());return this._update(),u.on("layeradd",this._addAttribution,this),this._container},onRemove:function(u){u.off("layeradd",this._addAttribution,this)},_addAttribution:function(u){u.layer.getAttribution&&(this.addAttribution(u.layer.getAttribution()),u.layer.once("remove",function(){this.removeAttribution(u.layer.getAttribution())},this))},setPrefix:function(u){return this.options.prefix=u,this._update(),this},addAttribution:function(u){return u?(this._attributions[u]||(this._attributions[u]=0),this._attributions[u]++,this._update(),this):this},removeAttribution:function(u){return u?(this._attributions[u]&&(this._attributions[u]--,this._update()),this):this},_update:function(){if(this._map){var u=[];for(var h in this._attributions)this._attributions[h]&&u.push(h);var O=[];this.options.prefix&&O.push(this.options.prefix),u.length&&O.push(u.join(", ")),this._container.innerHTML=O.join(' ')}}});st.mergeOptions({attributionControl:!0}),st.addInitHook(function(){this.options.attributionControl&&new kb().addTo(this)});var H9=function(u){return new kb(u)};gi.Layers=qP,gi.Zoom=Ab,gi.Scale=KP,gi.Attribution=kb,cf.layers=U9,cf.zoom=z9,cf.scale=V9,cf.attribution=H9;var Hi=W.extend({initialize:function(u){this._map=u},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Hi.addTo=function(u,h){return u.addHandler(h,this),this};var G9={Events:Q},YP=Fe.touch?"touchstart mousedown":"mousedown",oa=ne.extend({options:{clickTolerance:3},initialize:function(u,h,O,P){y(this,P),this._element=u,this._dragStartTarget=h||u,this._preventOutline=O},enable:function(){this._enabled||(Ze(this._dragStartTarget,YP,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(oa._dragging===this&&this.finishDrag(!0),bt(this._dragStartTarget,YP,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(u){if(this._enabled&&(this._moved=!1,!gb(this._element,"leaflet-zoom-anim"))){if(u.touches&&u.touches.length!==1){oa._dragging===this&&this.finishDrag();return}if(!(oa._dragging||u.shiftKey||u.which!==1&&u.button!==1&&!u.touches)&&(oa._dragging=this,this._preventOutline&&Ob(this._element),_b(),of(),!this._moving)){this.fire("down");var h=u.touches?u.touches[0]:u,O=UP(this._element);this._startPoint=new Z(h.clientX,h.clientY),this._startPos=ms(this._element),this._parentScale=Sb(O);var P=u.type==="mousedown";Ze(document,P?"mousemove":"touchmove",this._onMove,this),Ze(document,P?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(u){if(this._enabled){if(u.touches&&u.touches.length>1){this._moved=!0;return}var h=u.touches&&u.touches.length===1?u.touches[0]:u,O=new Z(h.clientX,h.clientY)._subtract(this._startPoint);!O.x&&!O.y||Math.abs(O.x)+Math.abs(O.y)G&&(re=ce,G=de);G>O&&(h[re]=1,Mb(u,h,O,P,re),Mb(u,h,O,re,M))}function Z9(u,h){for(var O=[u[0]],P=1,M=0,G=u.length;Ph&&(O.push(u[P]),M=P);return Mh.max.x&&(O|=2),u.yh.max.y&&(O|=8),O}function X9(u,h){var O=h.x-u.x,P=h.y-u.y;return O*O+P*P}function uf(u,h,O,P){var M=h.x,G=h.y,re=O.x-M,ce=O.y-G,de=re*re+ce*ce,_e;return de>0&&(_e=((u.x-M)*re+(u.y-G)*ce)/de,_e>1?(M=O.x,G=O.y):_e>0&&(M+=re*_e,G+=ce*_e)),re=u.x-M,ce=u.y-G,P?re*re+ce*ce:new Z(M,G)}function Wr(u){return!w(u[0])||typeof u[0][0]!="object"&&typeof u[0][0]<"u"}function nT(u){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Wr(u)}function rT(u,h){var O,P,M,G,re,ce,de,_e;if(!u||u.length===0)throw new Error("latlngs not passed");Wr(u)||(console.warn("latlngs are not flat! Only the first ring will be used"),u=u[0]);var Le=ae([0,0]),ze=te(u),et=ze.getNorthWest().distanceTo(ze.getSouthWest())*ze.getNorthEast().distanceTo(ze.getNorthWest());et<1700&&(Le=Nb(u));var Wn=u.length,pn=[];for(O=0;OP){de=(G-P)/M,_e=[ce.x-de*(ce.x-re.x),ce.y-de*(ce.y-re.y)];break}var or=h.unproject(B(_e));return ae([or.lat+Le.lat,or.lng+Le.lng])}var Q9={__proto__:null,simplify:QP,pointToSegmentDistance:JP,closestPointOnSegment:K9,clipSegment:tT,_getEdgeIntersection:Fp,_getBitCode:ys,_sqClosestPointOnSegment:uf,isFlat:Wr,_flat:nT,polylineCenter:rT},Lb={project:function(u){return new Z(u.lng,u.lat)},unproject:function(u){return new ie(u.y,u.x)},bounds:new H([-180,-90],[180,90])},Rb={R:6378137,R_MINOR:6356752314245179e-9,bounds:new H([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(u){var h=Math.PI/180,O=this.R,P=u.lat*h,M=this.R_MINOR/O,G=Math.sqrt(1-M*M),re=G*Math.sin(P),ce=Math.tan(Math.PI/4-P/2)/Math.pow((1-re)/(1+re),G/2);return P=-O*Math.log(Math.max(ce,1e-10)),new Z(u.lng*h*O,P)},unproject:function(u){for(var h=180/Math.PI,O=this.R,P=this.R_MINOR/O,M=Math.sqrt(1-P*P),G=Math.exp(-u.y/O),re=Math.PI/2-2*Math.atan(G),ce=0,de=.1,_e;ce<15&&Math.abs(de)>1e-7;ce++)_e=M*Math.sin(re),_e=Math.pow((1-_e)/(1+_e),M/2),de=Math.PI/2-2*Math.atan(G*_e)-re,re+=de;return new ie(re*h,u.x*h/O)}},J9={__proto__:null,LonLat:Lb,Mercator:Rb,SphericalMercator:U},ez=i({},j,{code:"EPSG:3395",projection:Rb,transformation:function(){var u=.5/(Math.PI*Rb.R);return Y(u,.5,-u,.5)}()}),iT=i({},j,{code:"EPSG:4326",projection:Lb,transformation:Y(1/180,1,-1/180,.5)}),tz=i({},fe,{projection:Lb,transformation:Y(1,0,-1,0),scale:function(u){return Math.pow(2,u)},zoom:function(u){return Math.log(u)/Math.LN2},distance:function(u,h){var O=h.lng-u.lng,P=h.lat-u.lat;return Math.sqrt(O*O+P*P)},infinite:!0});fe.Earth=j,fe.EPSG3395=ez,fe.EPSG3857=oe,fe.EPSG900913=he,fe.EPSG4326=iT,fe.Simple=tz;var yi=ne.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(u){return u.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(u){return u&&u.removeLayer(this),this},getPane:function(u){return this._map.getPane(u?this.options[u]||u:this.options.pane)},addInteractiveTarget:function(u){return this._map._targets[l(u)]=this,this},removeInteractiveTarget:function(u){return delete this._map._targets[l(u)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(u){var h=u.target;if(h.hasLayer(this)){if(this._map=h,this._zoomAnimated=h._zoomAnimated,this.getEvents){var O=this.getEvents();h.on(O,this),this.once("remove",function(){h.off(O,this)},this)}this.onAdd(h),this.fire("add"),h.fire("layeradd",{layer:this})}}});st.include({addLayer:function(u){if(!u._layerAdd)throw new Error("The provided object is not a Layer.");var h=l(u);return this._layers[h]?this:(this._layers[h]=u,u._mapToAdd=this,u.beforeAdd&&u.beforeAdd(this),this.whenReady(u._layerAdd,u),this)},removeLayer:function(u){var h=l(u);return this._layers[h]?(this._loaded&&u.onRemove(this),delete this._layers[h],this._loaded&&(this.fire("layerremove",{layer:u}),u.fire("remove")),u._map=u._mapToAdd=null,this):this},hasLayer:function(u){return l(u)in this._layers},eachLayer:function(u,h){for(var O in this._layers)u.call(h,this._layers[O]);return this},_addLayers:function(u){u=u?w(u)?u:[u]:[];for(var h=0,O=u.length;hthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&h[0]instanceof ie&&h[0].equals(h[O-1])&&h.pop(),h},_setLatLngs:function(u){wo.prototype._setLatLngs.call(this,u),Wr(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Wr(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var u=this._renderer._bounds,h=this.options.weight,O=new Z(h,h);if(u=new H(u.min.subtract(O),u.max.add(O)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(u))){if(this.options.noClip){this._parts=this._rings;return}for(var P=0,M=this._rings.length,G;Pu.y!=M.y>u.y&&u.x<(M.x-P.x)*(u.y-P.y)/(M.y-P.y)+P.x&&(h=!h);return h||wo.prototype._containsPoint.call(this,u,!0)}});function cz(u,h){return new Ml(u,h)}var Oo=xo.extend({initialize:function(u,h){y(this,h),this._layers={},u&&this.addData(u)},addData:function(u){var h=w(u)?u:u.features,O,P,M;if(h){for(O=0,P=h.length;O0&&M.push(M[0].slice()),M}function Ll(u,h){return u.feature?i({},u.feature,{geometry:h}):Hp(h)}function Hp(u){return u.type==="Feature"||u.type==="FeatureCollection"?u:{type:"Feature",properties:{},geometry:u}}var Fb={toGeoJSON:function(u){return Ll(this,{type:"Point",coordinates:Db(this.getLatLng(),u)})}};Bp.include(Fb),$b.include(Fb),Up.include(Fb),wo.include({toGeoJSON:function(u){var h=!Wr(this._latlngs),O=Wp(this._latlngs,h?1:0,!1,u);return Ll(this,{type:(h?"Multi":"")+"LineString",coordinates:O})}}),Ml.include({toGeoJSON:function(u){var h=!Wr(this._latlngs),O=h&&!Wr(this._latlngs[0]),P=Wp(this._latlngs,O?2:h?1:0,!0,u);return h||(P=[P]),Ll(this,{type:(O?"Multi":"")+"Polygon",coordinates:P})}}),kl.include({toMultiPoint:function(u){var h=[];return this.eachLayer(function(O){h.push(O.toGeoJSON(u).geometry.coordinates)}),Ll(this,{type:"MultiPoint",coordinates:h})},toGeoJSON:function(u){var h=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(h==="MultiPoint")return this.toMultiPoint(u);var O=h==="GeometryCollection",P=[];return this.eachLayer(function(M){if(M.toGeoJSON){var G=M.toGeoJSON(u);if(O)P.push(G.geometry);else{var re=Hp(G);re.type==="FeatureCollection"?P.push.apply(P,re.features):P.push(re)}}}),O?Ll(this,{geometries:P,type:"GeometryCollection"}):{type:"FeatureCollection",features:P}}});function sT(u,h){return new Oo(u,h)}var uz=sT,Gp=yi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(u,h,O){this._url=u,this._bounds=te(h),y(this,O)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Qe(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Dt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(u){return this.options.opacity=u,this._image&&this._updateOpacity(),this},setStyle:function(u){return u.opacity&&this.setOpacity(u.opacity),this},bringToFront:function(){return this._map&&jl(this._image),this},bringToBack:function(){return this._map&&Al(this._image),this},setUrl:function(u){return this._url=u,this._image&&(this._image.src=u),this},setBounds:function(u){return this._bounds=te(u),this._map&&this._reset(),this},getEvents:function(){var u={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(u.zoomanim=this._animateZoom),u},setZIndex:function(u){return this.options.zIndex=u,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var u=this._url.tagName==="IMG",h=this._image=u?this._url:ut("img");if(Qe(h,"leaflet-image-layer"),this._zoomAnimated&&Qe(h,"leaflet-zoom-animated"),this.options.className&&Qe(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onload=a(this.fire,this,"load"),h.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(h.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),u){this._url=h.src;return}h.src=this._url,h.alt=this.options.alt},_animateZoom:function(u){var h=this._map.getZoomScale(u.zoom),O=this._map._latLngBoundsToNewLayerBounds(this._bounds,u.zoom,u.center).min;ps(this._image,O,h)},_reset:function(){var u=this._image,h=new H(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),O=h.getSize();en(u,h.min),u.style.width=O.x+"px",u.style.height=O.y+"px"},_updateOpacity:function(){Vr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var u=this.options.errorOverlayUrl;u&&this._url!==u&&(this._url=u,this._image.src=u)},getCenter:function(){return this._bounds.getCenter()}}),fz=function(u,h,O){return new Gp(u,h,O)},lT=Gp.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var u=this._url.tagName==="VIDEO",h=this._image=u?this._url:ut("video");if(Qe(h,"leaflet-image-layer"),this._zoomAnimated&&Qe(h,"leaflet-zoom-animated"),this.options.className&&Qe(h,this.options.className),h.onselectstart=d,h.onmousemove=d,h.onloadeddata=a(this.fire,this,"load"),u){for(var O=h.getElementsByTagName("source"),P=[],M=0;M0?P:[h.src];return}w(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(h.style,"objectFit")&&(h.style.objectFit="fill"),h.autoplay=!!this.options.autoplay,h.loop=!!this.options.loop,h.muted=!!this.options.muted,h.playsInline=!!this.options.playsInline;for(var G=0;GM?(h.height=M+"px",Qe(u,G)):Yt(u,G),this._containerWidth=this._container.offsetWidth},_animateZoom:function(u){var h=this._map._latLngToNewLayerPoint(this._latlng,u.zoom,u.center),O=this._getAnchor();en(this._container,h.add(O))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var u=this._map,h=parseInt(rf(this._container,"marginBottom"),10)||0,O=this._container.offsetHeight+h,P=this._containerWidth,M=new Z(this._containerLeft,-O-this._containerBottom);M._add(ms(this._container));var G=u.layerPointToContainerPoint(M),re=B(this.options.autoPanPadding),ce=B(this.options.autoPanPaddingTopLeft||re),de=B(this.options.autoPanPaddingBottomRight||re),_e=u.getSize(),Le=0,ze=0;G.x+P+de.x>_e.x&&(Le=G.x+P-_e.x+de.x),G.x-Le-ce.x<0&&(Le=G.x-ce.x),G.y+O+de.y>_e.y&&(ze=G.y+O-_e.y+de.y),G.y-ze-ce.y<0&&(ze=G.y-ce.y),(Le||ze)&&(this.options.keepInView&&(this._autopanning=!0),u.fire("autopanstart").panBy([Le,ze]))}},_getAnchor:function(){return B(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),pz=function(u,h){return new qp(u,h)};st.mergeOptions({closePopupOnClick:!0}),st.include({openPopup:function(u,h,O){return this._initOverlay(qp,u,h,O).openOn(this),this},closePopup:function(u){return u=arguments.length?u:this._popup,u&&u.close(),this}}),yi.include({bindPopup:function(u,h){return this._popup=this._initOverlay(qp,this._popup,u,h),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(u){return this._popup&&(this instanceof xo||(this._popup._source=this),this._popup._prepareOpen(u||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(u){return this._popup&&this._popup.setContent(u),this},getPopup:function(){return this._popup},_openPopup:function(u){if(!(!this._popup||!this._map)){gs(u);var h=u.layer||u.target;if(this._popup._source===h&&!(h instanceof aa)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(u.latlng);return}this._popup._source=h,this.openPopup(u.latlng)}},_movePopup:function(u){this._popup.setLatLng(u.latlng)},_onKeyPress:function(u){u.originalEvent.keyCode===13&&this._openPopup(u)}});var Kp=Gi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(u){Gi.prototype.onAdd.call(this,u),this.setOpacity(this.options.opacity),u.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(u){Gi.prototype.onRemove.call(this,u),u.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var u=Gi.prototype.getEvents.call(this);return this.options.permanent||(u.preclick=this.close),u},_initLayout:function(){var u="leaflet-tooltip",h=u+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ut("div",h),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(u){var h,O,P=this._map,M=this._container,G=P.latLngToContainerPoint(P.getCenter()),re=P.layerPointToContainerPoint(u),ce=this.options.direction,de=M.offsetWidth,_e=M.offsetHeight,Le=B(this.options.offset),ze=this._getAnchor();ce==="top"?(h=de/2,O=_e):ce==="bottom"?(h=de/2,O=0):ce==="center"?(h=de/2,O=_e/2):ce==="right"?(h=0,O=_e/2):ce==="left"?(h=de,O=_e/2):re.xthis.options.maxZoom||OP?this._retainParent(M,G,re,P):!1)},_retainChildren:function(u,h,O,P){for(var M=2*u;M<2*u+2;M++)for(var G=2*h;G<2*h+2;G++){var re=new Z(M,G);re.z=O+1;var ce=this._tileCoordsToKey(re),de=this._tiles[ce];if(de&&de.active){de.retain=!0;continue}else de&&de.loaded&&(de.retain=!0);O+1this.options.maxZoom||this.options.minZoom!==void 0&&M1){this._setView(u,O);return}for(var ze=M.min.y;ze<=M.max.y;ze++)for(var et=M.min.x;et<=M.max.x;et++){var Wn=new Z(et,ze);if(Wn.z=this._tileZoom,!!this._isValidTile(Wn)){var pn=this._tiles[this._tileCoordsToKey(Wn)];pn?pn.current=!0:re.push(Wn)}}if(re.sort(function(or,$l){return or.distanceTo(G)-$l.distanceTo(G)}),re.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Hr=document.createDocumentFragment();for(et=0;etO.max.x)||!h.wrapLat&&(u.yO.max.y))return!1}if(!this.options.bounds)return!0;var P=this._tileCoordsToBounds(u);return te(this.options.bounds).overlaps(P)},_keyToBounds:function(u){return this._tileCoordsToBounds(this._keyToTileCoords(u))},_tileCoordsToNwSe:function(u){var h=this._map,O=this.getTileSize(),P=u.scaleBy(O),M=P.add(O),G=h.unproject(P,u.z),re=h.unproject(M,u.z);return[G,re]},_tileCoordsToBounds:function(u){var h=this._tileCoordsToNwSe(u),O=new q(h[0],h[1]);return this.options.noWrap||(O=this._map.wrapLatLngBounds(O)),O},_tileCoordsToKey:function(u){return u.x+":"+u.y+":"+u.z},_keyToTileCoords:function(u){var h=u.split(":"),O=new Z(+h[0],+h[1]);return O.z=+h[2],O},_removeTile:function(u){var h=this._tiles[u];h&&(Dt(h.el),delete this._tiles[u],this.fire("tileunload",{tile:h.el,coords:this._keyToTileCoords(u)}))},_initTile:function(u){Qe(u,"leaflet-tile");var h=this.getTileSize();u.style.width=h.x+"px",u.style.height=h.y+"px",u.onselectstart=d,u.onmousemove=d,Fe.ielt9&&this.options.opacity<1&&Vr(u,this.options.opacity)},_addTile:function(u,h){var O=this._getTilePos(u),P=this._tileCoordsToKey(u),M=this.createTile(this._wrapCoords(u),a(this._tileReady,this,u));this._initTile(M),this.createTile.length<2&&I(a(this._tileReady,this,u,null,M)),en(M,O),this._tiles[P]={el:M,coords:u,current:!0},h.appendChild(M),this.fire("tileloadstart",{tile:M,coords:u})},_tileReady:function(u,h,O){h&&this.fire("tileerror",{error:h,tile:O,coords:u});var P=this._tileCoordsToKey(u);O=this._tiles[P],O&&(O.loaded=+new Date,this._map._fadeAnimated?(Vr(O.el,0),F(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(O.active=!0,this._pruneTiles()),h||(Qe(O.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:O.el,coords:u})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Fe.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(u){return u.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(u){var h=new Z(this._wrapX?f(u.x,this._wrapX):u.x,this._wrapY?f(u.y,this._wrapY):u.y);return h.z=u.z,h},_pxBoundsToTileRange:function(u){var h=this.getTileSize();return new H(u.min.unscaleBy(h).floor(),u.max.unscaleBy(h).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var u in this._tiles)if(!this._tiles[u].loaded)return!1;return!0}});function gz(u){return new df(u)}var Rl=df.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(u,h){this._url=u,h=y(this,h),h.detectRetina&&Fe.retina&&h.maxZoom>0?(h.tileSize=Math.floor(h.tileSize/2),h.zoomReverse?(h.zoomOffset--,h.minZoom=Math.min(h.maxZoom,h.minZoom+1)):(h.zoomOffset++,h.maxZoom=Math.max(h.minZoom,h.maxZoom-1)),h.minZoom=Math.max(0,h.minZoom)):h.zoomReverse?h.minZoom=Math.min(h.maxZoom,h.minZoom):h.maxZoom=Math.max(h.minZoom,h.maxZoom),typeof h.subdomains=="string"&&(h.subdomains=h.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(u,h){return this._url===u&&h===void 0&&(h=!0),this._url=u,h||this.redraw(),this},createTile:function(u,h){var O=document.createElement("img");return Ze(O,"load",a(this._tileOnLoad,this,h,O)),Ze(O,"error",a(this._tileOnError,this,h,O)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(O.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(O.referrerPolicy=this.options.referrerPolicy),O.alt="",O.src=this.getTileUrl(u),O},getTileUrl:function(u){var h={r:Fe.retina?"@2x":"",s:this._getSubdomain(u),x:u.x,y:u.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var O=this._globalTileRange.max.y-u.y;this.options.tms&&(h.y=O),h["-y"]=O}return b(this._url,i(h,this.options))},_tileOnLoad:function(u,h){Fe.ielt9?setTimeout(a(u,this,null,h),0):u(null,h)},_tileOnError:function(u,h,O){var P=this.options.errorTileUrl;P&&h.getAttribute("src")!==P&&(h.src=P),u(O,h)},_onTileRemove:function(u){u.tile.onload=null},_getZoomForUrl:function(){var u=this._tileZoom,h=this.options.maxZoom,O=this.options.zoomReverse,P=this.options.zoomOffset;return O&&(u=h-u),u+P},_getSubdomain:function(u){var h=Math.abs(u.x+u.y)%this.options.subdomains.length;return this.options.subdomains[h]},_abortLoading:function(){var u,h;for(u in this._tiles)if(this._tiles[u].coords.z!==this._tileZoom&&(h=this._tiles[u].el,h.onload=d,h.onerror=d,!h.complete)){h.src=E;var O=this._tiles[u].coords;Dt(h),delete this._tiles[u],this.fire("tileabort",{tile:h,coords:O})}},_removeTile:function(u){var h=this._tiles[u];if(h)return h.el.setAttribute("src",E),df.prototype._removeTile.call(this,u)},_tileReady:function(u,h,O){if(!(!this._map||O&&O.getAttribute("src")===E))return df.prototype._tileReady.call(this,u,h,O)}});function fT(u,h){return new Rl(u,h)}var dT=Rl.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(u,h){this._url=u;var O=i({},this.defaultWmsParams);for(var P in h)P in this.options||(O[P]=h[P]);h=y(this,h);var M=h.detectRetina&&Fe.retina?2:1,G=this.getTileSize();O.width=G.x*M,O.height=G.y*M,this.wmsParams=O},onAdd:function(u){this._crs=this.options.crs||u.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var h=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[h]=this._crs.code,Rl.prototype.onAdd.call(this,u)},getTileUrl:function(u){var h=this._tileCoordsToNwSe(u),O=this._crs,P=ee(O.project(h[0]),O.project(h[1])),M=P.min,G=P.max,re=(this._wmsVersion>=1.3&&this._crs===iT?[M.y,M.x,G.y,G.x]:[M.x,M.y,G.x,G.y]).join(","),ce=Rl.prototype.getTileUrl.call(this,u);return ce+x(this.wmsParams,ce,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+re},setParams:function(u,h){return i(this.wmsParams,u),h||this.redraw(),this}});function yz(u,h){return new dT(u,h)}Rl.WMS=dT,fT.wms=yz;var So=yi.extend({options:{padding:.1},initialize:function(u){y(this,u),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Qe(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var u={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(u.zoomanim=this._onAnimZoom),u},_onAnimZoom:function(u){this._updateTransform(u.center,u.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(u,h){var O=this._map.getZoomScale(h,this._zoom),P=this._map.getSize().multiplyBy(.5+this.options.padding),M=this._map.project(this._center,h),G=P.multiplyBy(-O).add(M).subtract(this._map._getNewPixelOrigin(u,h));Fe.any3d?ps(this._container,G,O):en(this._container,G)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var u in this._layers)this._layers[u]._reset()},_onZoomEnd:function(){for(var u in this._layers)this._layers[u]._project()},_updatePaths:function(){for(var u in this._layers)this._layers[u]._update()},_update:function(){var u=this.options.padding,h=this._map.getSize(),O=this._map.containerPointToLayerPoint(h.multiplyBy(-u)).round();this._bounds=new H(O,O.add(h.multiplyBy(1+u*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),hT=So.extend({options:{tolerance:0},getEvents:function(){var u=So.prototype.getEvents.call(this);return u.viewprereset=this._onViewPreReset,u},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){So.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var u=this._container=document.createElement("canvas");Ze(u,"mousemove",this._onMouseMove,this),Ze(u,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ze(u,"mouseout",this._handleMouseOut,this),u._leaflet_disable_events=!0,this._ctx=u.getContext("2d")},_destroyContainer:function(){F(this._redrawRequest),delete this._ctx,Dt(this._container),bt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var u;this._redrawBounds=null;for(var h in this._layers)u=this._layers[h],u._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){So.prototype._update.call(this);var u=this._bounds,h=this._container,O=u.getSize(),P=Fe.retina?2:1;en(h,u.min),h.width=P*O.x,h.height=P*O.y,h.style.width=O.x+"px",h.style.height=O.y+"px",Fe.retina&&this._ctx.scale(2,2),this._ctx.translate(-u.min.x,-u.min.y),this.fire("update")}},_reset:function(){So.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(u){this._updateDashArray(u),this._layers[l(u)]=u;var h=u._order={layer:u,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=h),this._drawLast=h,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(u){this._requestRedraw(u)},_removePath:function(u){var h=u._order,O=h.next,P=h.prev;O?O.prev=P:this._drawLast=P,P?P.next=O:this._drawFirst=O,delete u._order,delete this._layers[l(u)],this._requestRedraw(u)},_updatePath:function(u){this._extendRedrawBounds(u),u._project(),u._update(),this._requestRedraw(u)},_updateStyle:function(u){this._updateDashArray(u),this._requestRedraw(u)},_updateDashArray:function(u){if(typeof u.options.dashArray=="string"){var h=u.options.dashArray.split(/[, ]+/),O=[],P,M;for(M=0;M')}}catch{}return function(u){return document.createElement("<"+u+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),bz={_initContainer:function(){this._container=ut("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(So.prototype._update.call(this),this.fire("update"))},_initPath:function(u){var h=u._container=hf("shape");Qe(h,"leaflet-vml-shape "+(this.options.className||"")),h.coordsize="1 1",u._path=hf("path"),h.appendChild(u._path),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){var h=u._container;this._container.appendChild(h),u.options.interactive&&u.addInteractiveTarget(h)},_removePath:function(u){var h=u._container;Dt(h),u.removeInteractiveTarget(h),delete this._layers[l(u)]},_updateStyle:function(u){var h=u._stroke,O=u._fill,P=u.options,M=u._container;M.stroked=!!P.stroke,M.filled=!!P.fill,P.stroke?(h||(h=u._stroke=hf("stroke")),M.appendChild(h),h.weight=P.weight+"px",h.color=P.color,h.opacity=P.opacity,P.dashArray?h.dashStyle=w(P.dashArray)?P.dashArray.join(" "):P.dashArray.replace(/( *, *)/g," "):h.dashStyle="",h.endcap=P.lineCap.replace("butt","flat"),h.joinstyle=P.lineJoin):h&&(M.removeChild(h),u._stroke=null),P.fill?(O||(O=u._fill=hf("fill")),M.appendChild(O),O.color=P.fillColor||P.color,O.opacity=P.fillOpacity):O&&(M.removeChild(O),u._fill=null)},_updateCircle:function(u){var h=u._point.round(),O=Math.round(u._radius),P=Math.round(u._radiusY||O);this._setPath(u,u._empty()?"M0 0":"AL "+h.x+","+h.y+" "+O+","+P+" 0,"+65535*360)},_setPath:function(u,h){u._path.v=h},_bringToFront:function(u){jl(u._container)},_bringToBack:function(u){Al(u._container)}},Yp=Fe.vml?hf:Se,pf=So.extend({_initContainer:function(){this._container=Yp("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yp("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Dt(this._container),bt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){So.prototype._update.call(this);var u=this._bounds,h=u.getSize(),O=this._container;(!this._svgSize||!this._svgSize.equals(h))&&(this._svgSize=h,O.setAttribute("width",h.x),O.setAttribute("height",h.y)),en(O,u.min),O.setAttribute("viewBox",[u.min.x,u.min.y,h.x,h.y].join(" ")),this.fire("update")}},_initPath:function(u){var h=u._path=Yp("path");u.options.className&&Qe(h,u.options.className),u.options.interactive&&Qe(h,"leaflet-interactive"),this._updateStyle(u),this._layers[l(u)]=u},_addPath:function(u){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(u._path),u.addInteractiveTarget(u._path)},_removePath:function(u){Dt(u._path),u.removeInteractiveTarget(u._path),delete this._layers[l(u)]},_updatePath:function(u){u._project(),u._update()},_updateStyle:function(u){var h=u._path,O=u.options;h&&(O.stroke?(h.setAttribute("stroke",O.color),h.setAttribute("stroke-opacity",O.opacity),h.setAttribute("stroke-width",O.weight),h.setAttribute("stroke-linecap",O.lineCap),h.setAttribute("stroke-linejoin",O.lineJoin),O.dashArray?h.setAttribute("stroke-dasharray",O.dashArray):h.removeAttribute("stroke-dasharray"),O.dashOffset?h.setAttribute("stroke-dashoffset",O.dashOffset):h.removeAttribute("stroke-dashoffset")):h.setAttribute("stroke","none"),O.fill?(h.setAttribute("fill",O.fillColor||O.color),h.setAttribute("fill-opacity",O.fillOpacity),h.setAttribute("fill-rule",O.fillRule||"evenodd")):h.setAttribute("fill","none"))},_updatePoly:function(u,h){this._setPath(u,se(u._parts,h))},_updateCircle:function(u){var h=u._point,O=Math.max(Math.round(u._radius),1),P=Math.max(Math.round(u._radiusY),1)||O,M="a"+O+","+P+" 0 1,0 ",G=u._empty()?"M0 0":"M"+(h.x-O)+","+h.y+M+O*2+",0 "+M+-O*2+",0 ";this._setPath(u,G)},_setPath:function(u,h){u._path.setAttribute("d",h)},_bringToFront:function(u){jl(u._path)},_bringToBack:function(u){Al(u._path)}});Fe.vml&&pf.include(bz);function mT(u){return Fe.svg||Fe.vml?new pf(u):null}st.include({getRenderer:function(u){var h=u.options.renderer||this._getPaneRenderer(u.options.pane)||this.options.renderer||this._renderer;return h||(h=this._renderer=this._createRenderer()),this.hasLayer(h)||this.addLayer(h),h},_getPaneRenderer:function(u){if(u==="overlayPane"||u===void 0)return!1;var h=this._paneRenderers[u];return h===void 0&&(h=this._createRenderer({pane:u}),this._paneRenderers[u]=h),h},_createRenderer:function(u){return this.options.preferCanvas&&pT(u)||mT(u)}});var vT=Ml.extend({initialize:function(u,h){Ml.prototype.initialize.call(this,this._boundsToLatLngs(u),h)},setBounds:function(u){return this.setLatLngs(this._boundsToLatLngs(u))},_boundsToLatLngs:function(u){return u=te(u),[u.getSouthWest(),u.getNorthWest(),u.getNorthEast(),u.getSouthEast()]}});function _z(u,h){return new vT(u,h)}pf.create=Yp,pf.pointsToPath=se,Oo.geometryToLayer=zp,Oo.coordsToLatLng=Ib,Oo.coordsToLatLngs=Vp,Oo.latLngToCoords=Db,Oo.latLngsToCoords=Wp,Oo.getFeature=Ll,Oo.asFeature=Hp,st.mergeOptions({boxZoom:!0});var gT=Hi.extend({initialize:function(u){this._map=u,this._container=u._container,this._pane=u._panes.overlayPane,this._resetStateTimeout=0,u.on("unload",this._destroy,this)},addHooks:function(){Ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){bt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Dt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(u){if(!u.shiftKey||u.which!==1&&u.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),of(),_b(),this._startPoint=this._map.mouseEventToContainerPoint(u),Ze(document,{contextmenu:gs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(u){this._moved||(this._moved=!0,this._box=ut("div","leaflet-zoom-box",this._container),Qe(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(u);var h=new H(this._point,this._startPoint),O=h.getSize();en(this._box,h.min),this._box.style.width=O.x+"px",this._box.style.height=O.y+"px"},_finish:function(){this._moved&&(Dt(this._box),Yt(this._container,"leaflet-crosshair")),af(),xb(),bt(document,{contextmenu:gs,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(u){if(!(u.which!==1&&u.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var h=new q(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(h).fire("boxzoomend",{boxZoomBounds:h})}},_onKeyDown:function(u){u.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});st.addInitHook("addHandler","boxZoom",gT),st.mergeOptions({doubleClickZoom:!0});var yT=Hi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(u){var h=this._map,O=h.getZoom(),P=h.options.zoomDelta,M=u.originalEvent.shiftKey?O-P:O+P;h.options.doubleClickZoom==="center"?h.setZoom(M):h.setZoomAround(u.containerPoint,M)}});st.addInitHook("addHandler","doubleClickZoom",yT),st.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var bT=Hi.extend({addHooks:function(){if(!this._draggable){var u=this._map;this._draggable=new oa(u._mapPane,u._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),u.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),u.on("zoomend",this._onZoomEnd,this),u.whenReady(this._onZoomEnd,this))}Qe(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Yt(this._map._container,"leaflet-grab"),Yt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var u=this._map;if(u._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var h=te(this._map.options.maxBounds);this._offsetLimit=ee(this._map.latLngToContainerPoint(h.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(h.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;u.fire("movestart").fire("dragstart"),u.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(u){if(this._map.options.inertia){var h=this._lastTime=+new Date,O=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(O),this._times.push(h),this._prunePositions(h)}this._map.fire("move",u).fire("drag",u)},_prunePositions:function(u){for(;this._positions.length>1&&u-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var u=this._map.getSize().divideBy(2),h=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=h.subtract(u).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(u,h){return u-(u-h)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var u=this._draggable._newPos.subtract(this._draggable._startPos),h=this._offsetLimit;u.xh.max.x&&(u.x=this._viscousLimit(u.x,h.max.x)),u.y>h.max.y&&(u.y=this._viscousLimit(u.y,h.max.y)),this._draggable._newPos=this._draggable._startPos.add(u)}},_onPreDragWrap:function(){var u=this._worldWidth,h=Math.round(u/2),O=this._initialWorldOffset,P=this._draggable._newPos.x,M=(P-h+O)%u+h-O,G=(P+h+O)%u-h-O,re=Math.abs(M+O)0?G:-G))-h;this._delta=0,this._startTime=null,re&&(u.options.scrollWheelZoom==="center"?u.setZoom(h+re):u.setZoomAround(this._lastMousePos,h+re))}});st.addInitHook("addHandler","scrollWheelZoom",xT);var xz=600;st.mergeOptions({tapHold:Fe.touchNative&&Fe.safari&&Fe.mobile,tapTolerance:15});var wT=Hi.extend({addHooks:function(){Ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){bt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(u){if(clearTimeout(this._holdTimeout),u.touches.length===1){var h=u.touches[0];this._startPos=this._newPos=new Z(h.clientX,h.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(Ze(document,"touchend",Tn),Ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",h))},this),xz),Ze(document,"touchend touchcancel contextmenu",this._cancel,this),Ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function u(){bt(document,"touchend",Tn),bt(document,"touchend touchcancel",u)},_cancel:function(){clearTimeout(this._holdTimeout),bt(document,"touchend touchcancel contextmenu",this._cancel,this),bt(document,"touchmove",this._onMove,this)},_onMove:function(u){var h=u.touches[0];this._newPos=new Z(h.clientX,h.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(u,h){var O=new MouseEvent(u,{bubbles:!0,cancelable:!0,view:window,screenX:h.screenX,screenY:h.screenY,clientX:h.clientX,clientY:h.clientY});O._simulated=!0,h.target.dispatchEvent(O)}});st.addInitHook("addHandler","tapHold",wT),st.mergeOptions({touchZoom:Fe.touch,bounceAtZoomLimits:!0});var OT=Hi.extend({addHooks:function(){Qe(this._map._container,"leaflet-touch-zoom"),Ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Yt(this._map._container,"leaflet-touch-zoom"),bt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(u){var h=this._map;if(!(!u.touches||u.touches.length!==2||h._animatingZoom||this._zooming)){var O=h.mouseEventToContainerPoint(u.touches[0]),P=h.mouseEventToContainerPoint(u.touches[1]);this._centerPoint=h.getSize()._divideBy(2),this._startLatLng=h.containerPointToLatLng(this._centerPoint),h.options.touchZoom!=="center"&&(this._pinchStartLatLng=h.containerPointToLatLng(O.add(P)._divideBy(2))),this._startDist=O.distanceTo(P),this._startZoom=h.getZoom(),this._moved=!1,this._zooming=!0,h._stop(),Ze(document,"touchmove",this._onTouchMove,this),Ze(document,"touchend touchcancel",this._onTouchEnd,this),Tn(u)}},_onTouchMove:function(u){if(!(!u.touches||u.touches.length!==2||!this._zooming)){var h=this._map,O=h.mouseEventToContainerPoint(u.touches[0]),P=h.mouseEventToContainerPoint(u.touches[1]),M=O.distanceTo(P)/this._startDist;if(this._zoom=h.getScaleZoom(M,this._startZoom),!h.options.bounceAtZoomLimits&&(this._zoomh.getMaxZoom()&&M>1)&&(this._zoom=h._limitZoom(this._zoom)),h.options.touchZoom==="center"){if(this._center=this._startLatLng,M===1)return}else{var G=O._add(P)._divideBy(2)._subtract(this._centerPoint);if(M===1&&G.x===0&&G.y===0)return;this._center=h.unproject(h.project(this._pinchStartLatLng,this._zoom).subtract(G),this._zoom)}this._moved||(h._moveStart(!0,!1),this._moved=!0),F(this._animRequest);var re=a(h._move,h,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I(re,this,!0),Tn(u)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,F(this._animRequest),bt(document,"touchmove",this._onTouchMove,this),bt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});st.addInitHook("addHandler","touchZoom",OT),st.BoxZoom=gT,st.DoubleClickZoom=yT,st.Drag=bT,st.Keyboard=_T,st.ScrollWheelZoom=xT,st.TapHold=wT,st.TouchZoom=OT,n.Bounds=H,n.Browser=Fe,n.CRS=fe,n.Canvas=hT,n.Circle=$b,n.CircleMarker=Up,n.Class=W,n.Control=gi,n.DivIcon=uT,n.DivOverlay=Gi,n.DomEvent=F9,n.DomUtil=I9,n.Draggable=oa,n.Evented=ne,n.FeatureGroup=xo,n.GeoJSON=Oo,n.GridLayer=df,n.Handler=Hi,n.Icon=Nl,n.ImageOverlay=Gp,n.LatLng=ie,n.LatLngBounds=q,n.Layer=yi,n.LayerGroup=kl,n.LineUtil=Q9,n.Map=st,n.Marker=Bp,n.Mixin=G9,n.Path=aa,n.Point=Z,n.PolyUtil=q9,n.Polygon=Ml,n.Polyline=wo,n.Popup=qp,n.PosAnimation=GP,n.Projection=J9,n.Rectangle=vT,n.Renderer=So,n.SVG=pf,n.SVGOverlay=cT,n.TileLayer=Rl,n.Tooltip=Kp,n.Transformation=J,n.Util=K,n.VideoOverlay=lT,n.bind=a,n.bounds=ee,n.canvas=pT,n.circle=sz,n.circleMarker=az,n.control=cf,n.divIcon=vz,n.extend=i,n.featureGroup=rz,n.geoJSON=sT,n.geoJson=uz,n.gridLayer=gz,n.icon=iz,n.imageOverlay=fz,n.latLng=ae,n.latLngBounds=te,n.layerGroup=nz,n.map=B9,n.marker=oz,n.point=B,n.polygon=cz,n.polyline=lz,n.popup=pz,n.rectangle=_z,n.setOptions=y,n.stamp=l,n.svg=mT,n.svgOverlay=hz,n.tileLayer=fT,n.tooltip=mz,n.transformation=Y,n.version=r,n.videoOverlay=dz;var wz=window.L;n.noConflict=function(){return window.L=wz,this},window.L=n})})(DO,DO.exports);var wp=DO.exports;const dR=at(wp);function oP(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function aP(e,t){return t==null?function(r,i){const o=R.useRef();return o.current||(o.current=e(r,i)),o}:function(r,i){const o=R.useRef();o.current||(o.current=e(r,i));const a=R.useRef(r),{instance:s}=o.current;return R.useEffect(function(){a.current!==r&&(t(s,r,a.current),a.current=r)},[s,r,i]),o}}function wNe(e,t){R.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var o;(o=t.layerContainer)==null||o.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function nB(e){return function(n){const r=eB(),i=e(iP(n,r),r);return X7(r.map,n.attribution),tB(i.current,n.eventHandlers),wNe(i.current,r),i}}function ONe(e,t){const n=aP(e,t),r=nB(n);return yNe(r)}function SNe(e,t){const n=aP(e),r=xNe(n,t);return bNe(r)}function ENe(e,t){const n=aP(e,t),r=nB(n);return _Ne(r)}function CNe(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}function FO(){return FO=Object.assign||function(e){for(var t=1;t(v==null?void 0:v.map)??null,[v]);const y=R.useCallback(_=>{if(_!==null&&v===null){const b=new wp.Map(_,f);n!=null&&c!=null?b.setView(n,c):e!=null&&b.fitBounds(e,t),l!=null&&b.whenReady(l),g(vNe(b))}},[]);R.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const x=v?V.createElement(J7,{value:v},r):a??null;return V.createElement("div",FO({},p,{ref:y}),x)}const TNe=R.forwardRef(PNe),jNe=ONe(function({position:t,...n},r){const i=new wp.Marker(t,n);return oP(i,gNe(r,{overlayContainer:i}))},function(t,n,r){n.position!==r.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==r.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==r.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==r.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==r.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),ANe=SNe(function(t,n){const r=new wp.Popup(t,n.overlayContainer);return oP(r,n)},function(t,n,{position:r},i){R.useEffect(function(){const{instance:a}=t;function s(c){c.popup===a&&(a.update(),i(!0))}function l(c){c.popup===a&&i(!1)}return n.map.on({popupopen:s,popupclose:l}),n.overlayContainer==null?(r!=null&&a.setLatLng(r),a.openOn(n.map)):n.overlayContainer.bindPopup(a),function(){var f;n.map.off({popupopen:s,popupclose:l}),(f=n.overlayContainer)==null||f.unbindPopup(),n.map.removeLayer(a)}},[t,n,i,r])}),kNe=ENe(function({url:t,...n},r){const i=new wp.TileLayer(t,iP(n,r));return oP(i,r)},function(t,n,r){CNe(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)}),NNe={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},rB={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Zt={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Gn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},pa={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class be{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const i=be.getVersionPrecision(t),o=be.getVersionPrecision(n);let a=Math.max(i,o),s=0;const l=be.map([t,n],c=>{const f=a-be.getVersionPrecision(c),d=c+new Array(f+1).join(".0");return be.map(d.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(l[0][a]>l[1][a])return 1;if(l[0][a]===l[1][a]){if(a===s)return 0;a-=1}else if(l[0][a]{r[l]=a[l]})}return t}static getBrowserAlias(t){return NNe[t]}static getBrowserTypeByAlias(t){return rB[t]||""}}const gt=/version\/(\d+(\.?_?\d+)+)/i,MNe=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=be.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=be.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=be.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=be.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=be.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=be.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=be.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=be.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=be.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=be.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=be.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=be.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=be.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=be.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=be.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=be.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=be.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=be.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=be.getFirstMatch(gt,e)||be.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=be.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=be.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=be.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=be.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=be.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=be.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=be.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=be.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=be.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=be.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,i=e.search("\\(")!==-1?n:t;return{name:be.getFirstMatch(i,e),version:be.getSecondMatch(i,e)}}}],LNe=[{test:[/Roku\/DVP/],describe(e){const t=be.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Gn.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=be.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Gn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=be.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=be.getWindowsVersionName(t);return{name:Gn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Gn.iOS},n=be.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=be.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=be.getMacOSVersionName(t),r={name:Gn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=be.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Gn.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=be.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=be.getAndroidVersionName(t),r={name:Gn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=be.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Gn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=be.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||be.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||be.getFirstMatch(/\bbb(\d+)/i,e);return{name:Gn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=be.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Gn.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=be.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Gn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Gn.Linux}}},{test:[/CrOS/],describe(){return{name:Gn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=be.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Gn.PlayStation4,version:t}}}],RNe=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=be.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Zt.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Zt.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Zt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Zt.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Zt.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Zt.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Zt.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=be.getFirstMatch(/(ipod|iphone)/i,e);return{type:Zt.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Zt.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Zt.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Zt.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Zt.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Zt.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Zt.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Zt.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Zt.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Zt.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Zt.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Zt.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Zt.tv}}}],$Ne=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:pa.Blink};const n=be.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:pa.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:pa.Trident},n=be.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:pa.Presto},n=be.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:pa.Gecko},n=be.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:pa.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:pa.WebKit},n=be.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class hR{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=be.find(MNe,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=be.find(LNe,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=be.find(RNe,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=be.find($Ne,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return be.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const i={};let o=0;if(Object.keys(t).forEach(s=>{const l=t[s];typeof l=="string"?(i[s]=l,o+=1):typeof l=="object"&&(n[s]=l,r+=1)}),r>0){const s=Object.keys(n),l=be.find(s,f=>this.isOS(f));if(l){const f=this.satisfies(n[l]);if(f!==void 0)return f}const c=be.find(s,f=>this.isPlatform(f));if(c){const f=this.satisfies(n[c]);if(f!==void 0)return f}}if(o>0){const s=Object.keys(i),l=be.find(s,c=>this.isBrowser(c,!0));if(l!==void 0)return this.compareVersion(i[l])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let i=t.toLowerCase();const o=be.getBrowserTypeByAlias(i);return n&&o&&(i=o.toLowerCase()),i===r}compareVersion(t){let n=[0],r=t,i=!1;const o=this.getBrowserVersion();if(typeof o=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(i=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(i=!0,r=t.substr(1)),n.indexOf(be.compareVersions(o,r,i))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*! @@ -732,7 +732,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top: -9999px; z-index: 999999; display: none; - `,document.body.append(t.touchedNode),NB(e.targetData.node.el,t.touchedNode),t.touchedNode.style.display="none",document.addEventListener("contextmenu",BB)}function vLe(e,t){const n=e.targetData.parent.data.config;n.longTouch&&(t.longTouchTimeout=setTimeout(()=>{t&&(t.longTouch=!0,n.longTouchClass&&e.e.cancelable&&yl(t.draggedNodes.map(r=>r.el),n.longTouchClass),e.e.preventDefault())},n.longTouchTimeout||200))}function gLe(e){!Ge||!("touchedNode"in Ge)||CLe(e,Ge)}function yLe(e,t){t.longTouchClass&&Sy(e.draggedNodes.map(n=>n.el),t==null?void 0:t.longTouchClass),t.touchDraggingClass&&yl([e.touchedNode],t.touchDraggingClass),t.touchDropZoneClass&&yl(e.draggedNodes.map(n=>n.el),t.touchDropZoneClass)}function bLe(e){if(!e||!e.scrollParent)return;const{x:t,y:n,width:r,height:i}=e.scrollParent.getBoundingClientRect(),{x:o,y:a,scrollOutside:s}=e.lastParent.data.config.scrollBehavior;return{state:e,xThresh:o,yThresh:a,scrollOutside:s,scrollParent:e.scrollParent,x:t,y:n,width:r,height:i}}function _Le(e){const t=bLe(Ge);if(t)switch(e){case"down":return SLe(t.state,t);case"up":return OLe(t.state,t);case"right":return xLe(t.state,t);case"left":return wLe(t.state,t)}}function xLe(e,t){const n=t.scrollParent.clientWidth+t.x-e.coordinates.x;if(!(!t.scrollOutside&&n<0)&&n<(1-t.xThresh)*t.scrollParent.clientWidth&&!(t.scrollParent.scrollLeft+t.scrollParent.clientWidth>=t.scrollParent.scrollWidth))return e}function wLe(e,t){const n=t.scrollParent.clientWidth+t.x-e.coordinates.x;if(!(!t.scrollOutside&&n>t.scrollParent.clientWidth)&&n>t.xThresh*t.scrollParent.clientWidth&&t.scrollParent.scrollLeft!==0)return e}function OLe(e,t){const n=t.scrollParent.clientHeight+t.y-e.coordinates.y;if(!(!t.scrollOutside&&n>t.scrollParent.clientHeight)&&n>t.yThresh*t.scrollParent.clientHeight&&t.scrollParent.scrollTop!==0)return e}function SLe(e,t){const n=t.scrollParent.clientHeight+t.y-e.coordinates.y;if(!(!t.scrollOutside&&n<0)&&n<(1-t.yThresh)*t.scrollParent.clientHeight&&!(t.scrollParent.scrollTop+t.scrollParent.clientHeight>=t.scrollParent.scrollHeight))return e}function ELe(e,t){t.touchMoving=!0,t.touchedNode.style.display=t.touchedNodeDisplay||"";const{x:n,y:r}=Cl(e.e);t.coordinates.y=r,t.coordinates.x=n;const i=t.touchStartLeft??0,o=t.touchStartTop??0;t.touchedNode.style.left=`${n-i}px`,t.touchedNode.style.top=`${r-o}px`,yLe(t,e.targetData.parent.data.config)}function CLe(e,t){if(e.targetData.parent.data.config.longTouch&&!t.longTouch){clearTimeout(t.longTouchTimeout);return}e.e.cancelable&&e.e.preventDefault(),ELe(e,t),cb();const n=qMe(e);if(!n)return;const r={e:e.e,targetData:n};"node"in n?n.node.el.dispatchEvent(new CustomEvent("touchOverNode",{detail:r})):n.parent.el.dispatchEvent(new CustomEvent("touchOverParent",{detail:r}))}function cb(){for(const e of Object.keys(SR)){const[t,n]=SR[e];UB(e,t,n)}}function UB(e,t,n){const r=_Le(e);r&&(r.scrollParent.scrollBy(t,n),setTimeout(()=>{UB(e,t,n)},"touchedNode"in r?10:100))}function PLe(e){if(!Ge)return;const{x:t,y:n}=Cl(e.e);Ge.coordinates.y=n,Ge.coordinates.x=t,cb(),kLe(e,Ge)}function TLe(e){if(!Ge)return;const{x:t,y:n}=Cl(e.e);Ge.coordinates.y=n,Ge.coordinates.x=t,cb(),ub(e,Ge)}function jLe(e){Ge&&ub(e.detail,Ge)}function ALe(e,t){if(e.targetData.parent.el===t.lastParent.el)return!1;const n=e.targetData.parent.data.config;if(n.dropZone===!1)return!1;const r=t.initialParent.data.config;return n.accepts?n.accepts(e.targetData.parent,t.initialParent,t.lastParent,t):!(!n.group||n.group!==r.group)}function kLe(e,t){var n;e.e.preventDefault(),e.e.stopPropagation(),e.targetData.parent.el===((n=t.lastParent)==null?void 0:n.el)?zB(e,t):ub(e,t)}function NLe(e,t,n,r){var i;if(t.remapJustFinished)return t.remapJustFinished=!1,t.lastTargetValue=e.targetData.node.data.value,!1;if(t.lastTargetValue===e.targetData.node.data.value||t.draggedNodes.map(p=>p.el).includes(e.targetData.node.el)||t.preventEnter||t.swappedNodeValue===e.targetData.node.data.value||e.targetData.parent.el!==((i=t.lastParent)==null?void 0:i.el)||e.targetData.parent.data.config.sortable===!1)return!1;const o=e.targetData.node.el.getBoundingClientRect(),a=t.draggedNode.el.getBoundingClientRect(),s=o.y-a.y,l=o.x-a.x;let c;const f=t.draggedNode.data.index>e.targetData.node.data.index?[e.targetData.node.data.index,t.draggedNode.data.index]:[t.draggedNode.data.index,e.targetData.node.data.index];t.targetIndex=e.targetData.node.data.index,t.affectedNodes=e.targetData.parent.data.enabledNodes.filter(p=>f[0]<=p.data.index&&p.data.index<=f[1]&&p.el!==t.draggedNode.el),Math.abs(s)>Math.abs(l)?c=s>0?"above":"below":c=l>0?"left":"right";const d=t.lastParent.data.config.threshold;switch(c){case"left":if(n>o.x+o.width*d.horizontal)return t.incomingDirection="left",!0;break;case"right":if(no.y+o.height*d.vertical)return t.incomingDirection="above",!0;break;case"below":if(r{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r})}}function MLe(e,t){const n=RB(e),r=VO(e.lastParent.el,e.lastParent.data).filter(s=>!n.includes(s)),i=VO(t.targetData.parent.el,t.targetData.parent.data),o=e.initialParent.el===t.targetData.parent.el&&t.targetData.parent.data.config.sortable===!1;let a;"node"in t.targetData?(o?a=e.initialIndex:t.targetData.parent.data.config.sortable===!1?a=t.targetData.parent.data.enabledNodes.length:a=t.targetData.node.data.index,i.splice(a,0,...n)):(a=o?e.initialIndex:t.targetData.parent.data.enabledNodes.length,i.splice(a,0,...n)),WO(e.lastParent.el,e.lastParent.data,r),WO(t.targetData.parent.el,t.targetData.parent.data,i)}function ub(e,t){ALe(e,t)&&(e.targetData.parent.data.config.performTransfer(t,e),t.lastParent=e.targetData.parent)}function LLe(e){function t(n){const r=Ti.get(n);if(r)return{parent:{el:n,data:r}}}return n=>{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r})}}function RLe(e){if(e instanceof HTMLElement)return e;if("current"in e&&e.current instanceof HTMLElement)return e.current;console.warn("Invalid parent element",e)}function $Le(e,t){const n=RLe(e);n&&t(n)}var Ey=new WeakMap;function ILe(e){const t=Ey.get(e);return t?t[0]:(console.warn("No values found for parent element"),[])}function DLe(e,t){const n=Ey.get(t);n&&n[1](e),Ey.set(t,[e,n[1]])}function FLe(e,t){return n=>{Ey.set(n,t),XMe({parent:n,getValues:ILe,setValues:DLe,config:e})}}function ER(e){jB&&(Array.isArray(e)||(e=[e]),e.forEach(t=>{const{parent:n,state:r,...i}=t;$Le(n,FLe(i,r))}))}function BLe(e,t={}){const n=R.useRef(null),[r,i]=R.useState(e);function o(a={}){ER({parent:n,state:[r,i],...a})}return R.useEffect(()=>{ER({parent:n,state:[r,i],...t})},[r]),R.useEffect(()=>()=>{n.current&&$B(n.current)},[]),[n,r,i,o]}const fb=()=>{const e=vo(),t=ds(),n=Au(),r=R.useMemo(()=>{const{orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f}=n,d=o?Hre(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...f,orderBy:d,tags:p,excludeBots:s!==void 0?s==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}},[n]),i=R.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:d,...p}=a,v={...p,orderBy:s&&Wre(s),tags:l.length>0?l.join(","):void 0,excludeBots:f_(c),excludeMaxVisitsReached:f_(f),excludePastValidUntil:f_(d)},g=l0(v),y=g?`?${g}`:"";e(`${t}/list-short-urls/1${y}`)},[r,e,t]);return[r,i]},bP=()=>{const{domain:e}=Au(),{shortCode:t=""}=Cu();return R.useMemo(()=>({shortCode:uP(t),domain:e}),[e,t])},db=()=>{const e=yMe();return m.jsx(Ke,{color:"link",size:"lg",className:"p-0 me-3",onClick:e,"aria-label":"Go back",children:m.jsx(je,{icon:pK})})},ULe={android:"Android",ios:"iOS",desktop:"Desktop"},zLe=({deviceType:e,onDeviceTypeChange:t})=>{const n=R.useId();return m.jsxs("div",{children:[m.jsx("label",{htmlFor:n,children:"Device type:"}),m.jsxs("select",{id:n,className:"form-select",value:e,onChange:r=>t(r.target.value),required:!0,children:[!e&&m.jsx("option",{value:"",children:"- Select type -"}),Object.entries(ULe).map(([r,i])=>m.jsx("option",{value:r,children:i},r))]})]})},VLe=({language:e,onLanguageChange:t})=>{const n=R.useId();return m.jsxs("div",{children:[m.jsx("label",{htmlFor:n,children:"Language:"}),m.jsx(Fn,{id:n,value:e??"",onChange:r=>t(r.target.value),placeholder:"en-US / en",required:!0})]})},WLe=({name:e,value:t,onNameChange:n,onValueChange:r})=>{const i=R.useId(),o=R.useId();return m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:i,children:"Param name:"}),m.jsx(Fn,{id:i,value:e??"",onChange:a=>n(a.target.value),placeholder:"hello",required:!0})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:o,children:"Param value:"}),m.jsx(Fn,{id:o,value:t??"",onChange:a=>r(a.target.value),placeholder:"world",required:!0})]})]})},HLe={device:"Device type",language:"Language","query-param":"Query param"},GLe=({condition:e,onConditionChange:t,onDelete:n})=>{const r=R.useId(),i=R.useCallback(s=>t({type:s,matchValue:"",matchKey:null}),[t]),o=R.useCallback(s=>t({...e,matchValue:s}),[e,t]),a=R.useCallback(s=>t({...e,matchKey:s}),[e,t]);return m.jsxs("div",{className:"redirect-rule-modal__condition rounded p-3 h-100 d-flex flex-column gap-2",children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:r,children:"Type:"}),m.jsxs("div",{className:"d-flex gap-2",children:[m.jsx("select",{id:r,className:"form-select flex-grow-1",value:e.type,onChange:s=>i(s.target.value),children:Object.entries(HLe).map(([s,l])=>m.jsx("option",{value:s,children:l},s))}),m.jsx(Ke,{outline:!0,color:"danger",type:"button","aria-label":"Delete condition",onClick:n,children:m.jsx(je,{icon:W6})})]})]}),e.type==="device"&&m.jsx(zLe,{deviceType:e.matchValue,onDeviceTypeChange:o}),e.type==="language"&&m.jsx(VLe,{language:e.matchValue,onLanguageChange:o}),e.type==="query-param"&&m.jsx(WLe,{value:e.matchValue,name:e.matchKey??"",onNameChange:a,onValueChange:o})]})},VB=({isOpen:e,toggle:t,onSave:n,initialData:r})=>{const[i,o]=R.useState(r??{longUrl:"",conditions:[]}),a=R.useCallback(v=>{v.preventDefault(),v.stopPropagation(),i&&n(i),t()},[n,i,t]),s=R.useCallback(()=>o(({longUrl:v,conditions:g})=>({longUrl:v,conditions:[...g,{type:"device",matchValue:"",matchKey:null}]})),[]),l=R.useCallback((v,g)=>o(({longUrl:y,conditions:x})=>{const _=[...x];return _[v]=g,{longUrl:y,conditions:_}}),[]),c=R.useCallback(v=>o(({longUrl:g,conditions:y})=>{const x=[...y];return x.splice(v,1),{longUrl:g,conditions:x}}),[]),f=ea(),d=R.useCallback(()=>{var v;return(v=f==null?void 0:f.current)==null?void 0:v.focus()},[f]),p=R.useCallback(()=>o(r??{longUrl:"",conditions:[]}),[r]);return m.jsx(go,{size:"xl",isOpen:e,toggle:t,centered:!0,onOpened:d,onClosed:p,children:m.jsxs("form",{onSubmit:a,children:[m.jsx(yo,{toggle:t,className:"sticky-top redirect-rule-modal__header",children:"Redirect rule"}),m.jsxs($i,{children:[m.jsx("label",{htmlFor:"longUrl",className:"fw-bold",children:"Long URL:"}),m.jsx(Fn,{id:"longUrl",type:"url",placeholder:"https://www.example.com",value:i.longUrl,onChange:v=>o(g=>({...g,longUrl:v.target.value})),required:!0,innerRef:f}),m.jsx("hr",{}),m.jsxs("div",{className:"d-flex justify-content-between",children:[m.jsx("b",{children:"Conditions:"}),m.jsx(Ke,{outline:!0,size:"sm",type:"button","aria-label":"Add condition",onClick:s,children:m.jsx(je,{icon:ep})})]}),i.conditions.length===0&&m.jsx("div",{className:"text-center",children:m.jsx("i",{children:"Add conditions..."})}),i.conditions.length>0&&m.jsx(Kn,{children:i.conditions.map((v,g)=>m.jsx("div",{className:"col-lg-6 col-xl-4 mt-3",children:m.jsx(GLe,{condition:v,onConditionChange:y=>l(g,y),onDelete:()=>c(g)})},`${g}_${v.type}`))})]}),m.jsxs(as,{className:"sticky-bottom redirect-rule-modal__footer",children:[m.jsx(Ke,{type:"button",color:"link",onClick:t,children:"Cancel"}),m.jsx(Ke,{color:"primary",disabled:i.conditions.length===0,children:"Confirm"})]})]})})},qLe=({priority:e,isLast:t,redirectRule:n,onDelete:r,onMoveUp:i,onMoveDown:o,onUpdate:a})=>{const[s,l]=qt();return m.jsxs(xt,{children:[m.jsxs("div",{className:"d-flex align-content-center gap-3",children:[m.jsx("div",{className:"d-flex flex-column my-auto drag-n-drop-handler d-none d-md-block",style:{cursor:"grab"},children:m.jsx(je,{icon:xK})}),m.jsxs("div",{className:"d-flex flex-column my-auto",children:[m.jsx(Ke,{outline:!0,color:"secondary",size:"sm","aria-label":`Move rule with priority ${e} up`,disabled:e===1,onClick:i,className:"rounded-0 rounded-top",style:{marginBottom:"-1px"},children:m.jsx(je,{icon:$K})}),m.jsx(Ke,{outline:!0,color:"secondary",size:"sm","aria-label":`Move rule with priority ${e} down`,disabled:t,onClick:o,className:"rounded-0 rounded-bottom",children:m.jsx(je,{icon:kK})})]}),m.jsxs("div",{className:"flex-grow-1",children:[m.jsxs("div",{className:"mb-2",children:[m.jsx("b",{children:"Long URL:"})," ",m.jsx(mr,{href:n.longUrl,"data-testid":"rule-long-url"})]}),m.jsxs("div",{className:"d-flex flex-column flex-lg-row gap-2",children:[m.jsx("b",{children:"Conditions:"}),n.conditions.map((c,f)=>m.jsxs("div",{className:"badge bg-secondary",children:[c.type==="device"&&m.jsxs(m.Fragment,{children:["Device is ",c.matchValue]}),c.type==="language"&&m.jsxs(m.Fragment,{children:[c.matchValue," language is accepted"]}),c.type==="query-param"&&m.jsxs(m.Fragment,{children:["Query string contains ",c.matchKey,"=",c.matchValue]})]},`${c.type}_${f}`))]})]}),m.jsxs("div",{className:"d-flex flex-column flex-sm-row gap-1 my-auto",children:[m.jsx(Ke,{outline:!0,color:"secondary",size:"sm","aria-label":`Edit rule with priority ${e}`,onClick:l,children:m.jsx(je,{icon:H6})}),m.jsx(Ke,{outline:!0,color:"danger",size:"sm","aria-label":`Delete rule with priority ${e}`,onClick:r,children:m.jsx(je,{icon:W6})})]})]}),m.jsx(VB,{onSave:a,isOpen:s,toggle:l,initialData:n})]})},KLe=({shortUrlRedirectRules:e,getShortUrlRedirectRules:t,getShortUrlsDetails:n,shortUrlsDetails:r,setShortUrlRedirectRules:i,shortUrlRedirectRulesSaving:o,resetSetRules:a})=>{const s=bP(),{shortUrls:l}=r,c=s&&(l==null?void 0:l.get(s)),[f,d,p]=BLe([],{dragHandle:".drag-n-drop-handler",dropZoneClass:"opacity-25"}),{saving:v,saved:g,errorData:y}=o,[x,_]=qt(),b=R.useCallback(D=>p((N=[])=>[...N,D]),[p]),w=R.useCallback(D=>p((N=[])=>{const I=[...N];return I.splice(D,1),I}),[p]),S=R.useCallback((D,N)=>p((I=[])=>{const F=[...I];return F[D]=N,F}),[p]),E=R.useCallback((D,N)=>p((I=[])=>{if(!I[N])return I;const F=[...I],K=F[N];return F[N]=F[D],F[D]=K,F}),[p]),C=R.useCallback(D=>E(D,D-1),[E]),T=R.useCallback(D=>E(D,D+1),[E]),A=R.useCallback(D=>{D.preventDefault(),d&&i({shortUrl:s,data:{redirectRules:d}})},[s,d,i]);return R.useEffect(()=>(t(s),n([s]),a),[t,n,s,a]),R.useEffect(()=>{e.redirectRules&&p(e.redirectRules)},[p,e.redirectRules]),m.jsxs("div",{className:"d-flex flex-column gap-3",children:[m.jsx("header",{children:m.jsxs(vr,{body:!0,children:[m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(db,{}),m.jsxs("div",{className:"text-center flex-grow-1",children:[r.loading&&m.jsx(m.Fragment,{children:"Loading..."}),!r.loading&&m.jsxs("small",{children:["Redirect rules for ",m.jsx(mr,{href:(c==null?void 0:c.shortUrl)??""})]})]})]}),m.jsx("hr",{}),m.jsxs("div",{children:[m.jsx("p",{className:"mb-2",children:"Configure dynamic conditions that will be checked at runtime."}),"If no conditions match, visitors will be redirected to: ",m.jsx(mr,{href:e.defaultLongUrl??""})]})]})}),m.jsx("div",{children:m.jsxs(Ke,{outline:!0,color:"primary",onClick:_,children:[m.jsx(je,{icon:ep,className:"me-1"})," Add rule"]})}),m.jsxs("form",{onSubmit:A,children:[e.loading&&m.jsx(Ho,{loading:!0}),d.length===0&&!e.loading&&m.jsx(xt,{className:"text-center",children:m.jsx("i",{children:"This short URL has no dynamic redirect rules"})}),m.jsx("div",{className:"d-flex flex-column gap-2",ref:f,children:d.map((D,N)=>m.jsx(qLe,{redirectRule:D,priority:N+1,isLast:N===d.length-1,onDelete:()=>w(N),onMoveUp:()=>C(N),onMoveDown:()=>T(N),onUpdate:I=>S(N,I)},`${D.longUrl}_${N}`))}),m.jsx("div",{className:"text-center mt-3",children:m.jsx(Ke,{outline:!0,color:"primary",className:"btn-sm-block",disabled:v,"data-testid":"save-button",children:v?"Saving...":"Save rules"})})]}),y&&m.jsx(er,{type:"error",children:m.jsx(mo,{errorData:y,fallbackMessage:"An error occurred while saving short URL redirect rules :("})}),g&&m.jsx(er,{type:"success",children:"Redirect rules properly saved."}),m.jsx(VB,{isOpen:x,toggle:_,onSave:b})]})},YLe=(e,t)=>{e.serviceFactory("ShortUrlRedirectRules",()=>KLe),e.decorator("ShortUrlRedirectRules",t(["shortUrlRedirectRules","shortUrlsDetails","shortUrlRedirectRulesSaving"],["getShortUrlRedirectRules","getShortUrlsDetails","setShortUrlRedirectRules","resetSetRules"])),e.serviceFactory("getShortUrlRedirectRules",WMe,"apiClientFactory"),e.serviceFactory("setShortUrlRedirectRules",UMe,"apiClientFactory"),e.serviceFactory("resetSetRules",n=>n.resetSetRules,"setShortUrlRedirectRulesReducerCreator"),e.serviceFactory("shortUrlRedirectRulesReducerCreator",HMe,"getShortUrlRedirectRules"),e.serviceFactory("shortUrlRedirectRulesReducer",n=>n.reducer,"shortUrlRedirectRulesReducerCreator"),e.serviceFactory("setShortUrlRedirectRulesReducerCreator",zMe,"setShortUrlRedirectRules"),e.serviceFactory("setShortUrlRedirectRulesReducer",n=>n.reducer,"setShortUrlRedirectRulesReducerCreator")},ZLe=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(e==null?void 0:e.validateUrls)??!1,forwardQuery:(e==null?void 0:e.forwardQuery)??!0}),WB=({createShortUrl:e,shortUrlCreation:t,resetCreateShortUrl:n,basicMode:r=!1})=>{const{ShortUrlForm:i,CreateShortUrlResult:o}=Rt(WB),a=_r("shortUrlCreation"),s=R.useMemo(()=>ZLe(a),[a]);return m.jsxs(m.Fragment,{children:[m.jsx(i,{initialState:s,saving:t.saving,basicMode:r,onSave:async l=>(n(),e(l))}),m.jsx(o,{creation:t,resetCreateShortUrl:n,canBeClosed:r})]})},XLe=$t(WB,["ShortUrlForm","CreateShortUrlResult"]),HB=({shortUrlsDetails:e,getShortUrlsDetails:t,shortUrlEdition:n,editShortUrl:r})=>{const{ShortUrlForm:i}=Rt(HB),o=bP(),{loading:a,error:s,errorData:l,shortUrls:c}=e,f=o&&(c==null?void 0:c.get(o)),{saving:d,saved:p,error:v,errorData:g}=n,y=_r("shortUrlCreation"),x=R.useMemo(()=>qNe(f,y),[f,y]);return R.useEffect(()=>{o&&t([o])},[t,o]),a?m.jsx(Ho,{loading:!0}):s?m.jsx(er,{type:"error",children:m.jsx(mo,{errorData:l,fallbackMessage:"An error occurred while loading short URL detail :("})}):m.jsxs(m.Fragment,{children:[m.jsx("header",{className:"mb-3",children:m.jsx(vr,{body:!0,children:m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(db,{}),m.jsx("div",{className:"text-center flex-grow-1",children:m.jsxs("small",{children:["Edit ",m.jsx(mr,{href:(f==null?void 0:f.shortUrl)??""})]})})]})})}),m.jsx(i,{initialState:x,saving:d,onSave:async _=>{f&&r({...f,data:_})}}),p&&v&&m.jsx(er,{type:"error",className:"mt-3",children:m.jsx(mo,{errorData:g,fallbackMessage:"An error occurred while updating short URL :("})}),p&&!v&&m.jsx(er,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})},QLe=$t(HB,["ShortUrlForm"]),GB=({text:e,onCopy:t},n=navigator)=>{var r;return(r=n.clipboard)==null?void 0:r.writeText(e).then(()=>t==null?void 0:t(e,!0)).catch(()=>t==null?void 0:t(e,!1))},qB=({creation:e,resetCreateShortUrl:t,canBeClosed:n=!1})=>{const{useTimeoutToggle:r}=Rt(qB),[i,o]=r(),{error:a,saved:s}=e;if(R.useEffect(()=>{t()},[t]),a)return m.jsxs(er,{type:"error",className:"mt-3",children:[n&&m.jsx(je,{"data-testid":"error-close-button",icon:yx,className:"float-end pointer",onClick:t}),m.jsx(mo,{errorData:e.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=e.result;return m.jsxs(er,{type:"success",className:"mt-3",children:[n&&m.jsx(je,{"data-testid":"success-close-button",icon:yx,className:"float-end pointer",onClick:t}),m.jsxs("span",{children:[m.jsx("b",{children:"Great!"})," The short URL is ",m.jsx("b",{children:l})]}),m.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",onClick:()=>GB({text:l,onCopy:o}),children:[m.jsx(je,{icon:h5})," Copy ",m.jsxs("span",{className:"sr-only",children:[l," to clipboard"]})]}),m.jsx(sp,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},JLe=$t(qB,["useTimeoutToggle"]),p_="delete",eRe=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=R.useState("");R.useEffect(()=>i,[i]);const{loading:c,error:f,deleted:d,errorData:p}=r,v=R.useCallback(()=>{i(),t()},[i,t]),g=R.useCallback(y=>(y.preventDefault(),o(e).then(t)),[o,e,t]);return m.jsx(go,{isOpen:n,toggle:v,centered:!0,onClosed:()=>d&&a(e),children:m.jsxs("form",{onSubmit:g,children:[m.jsx(yo,{toggle:v,children:m.jsx("span",{className:"text-danger",children:"Delete short URL"})}),m.jsxs($i,{children:[m.jsxs("p",{children:[m.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),m.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),m.jsxs("p",{children:["Write ",m.jsx("b",{children:p_})," to confirm deletion."]}),m.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${p_}`,value:s,onChange:y=>l(y.target.value)}),f&&m.jsx(er,{type:zNe(p)?"warning":"error",small:!0,className:"mt-2",children:m.jsx(mo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),m.jsxs(as,{children:[m.jsx("button",{type:"button",className:"btn btn-link",onClick:v,children:"Cancel"}),m.jsx("button",{type:"submit",className:"btn btn-danger",disabled:s!==p_||c,children:c?"Deleting...":"Delete"})]})]})})},KB=({amount:e=0,loading:t=!1,...n})=>m.jsxs(Ke,{...n,outline:!0,color:"primary",disabled:t,children:[m.jsx(je,{icon:Xq})," ",t?"Exporting...":m.jsxs(m.Fragment,{children:["Export (",Gt(e),")"]})]}),CR=20,YB=({amount:e=0})=>{const{apiClientFactory:t,ReportExporter:n}=Rt(YB),[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=fb(),[c,,f,d]=qt(),p=R.useCallback(async()=>{const v=e/CR,g=async(x=1)=>{const{data:_}=await t().listShortUrls({page:`${x}`,tags:r,searchTerm:i,startDate:o,endDate:a,orderBy:s,tagsMode:l,itemsPerPage:CR});return x>=v?_:_.concat(await g(x+1))};f();const y=await g();n.exportShortUrls(y.map(x=>{var _;const{hostname:b,pathname:w}=new URL(x.shortUrl),S=w.substring(1);return{createdAt:x.dateCreated,domain:b,shortCode:S,shortUrl:x.shortUrl,longUrl:x.longUrl,title:x.title??"",tags:x.tags.join("|"),visits:((_=x==null?void 0:x.visitsSummary)==null?void 0:_.total)??x.visitsCount??0}})),d()},[e,t,a,s,n,i,o,f,d,r,l]);return m.jsx(KB,{loading:c,className:"btn-md-block",amount:e,onClick:p})},tRe=$t(YB,["apiClientFactory","ReportExporter"]),ZB=({text:e,onCopy:t,copyToClipboard:n=GB})=>m.jsx(gl,{className:"ms-2 p-0","aria-label":`Copy ${e} to clipboard`,onClick:()=>n({text:e,onCopy:t}),children:m.jsx(je,{icon:h5,className:"fs-5"})}),nRe=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=l0({...n,margin:t>0?t:void 0});return`${r}${i?`?${i}`:""}`},rRe=({errorCorrection:e,setErrorCorrection:t})=>m.jsxs(ta,{text:`Error correction (${e})`,children:[m.jsxs(Ne,{active:e==="L",onClick:()=>t("L"),children:[m.jsx("b",{children:"L"}),"ow"]}),m.jsxs(Ne,{active:e==="M",onClick:()=>t("M"),children:[m.jsx("b",{children:"M"}),"edium"]}),m.jsxs(Ne,{active:e==="Q",onClick:()=>t("Q"),children:[m.jsx("b",{children:"Q"}),"uartile"]}),m.jsxs(Ne,{active:e==="H",onClick:()=>t("H"),children:[m.jsx("b",{children:"H"}),"igh"]})]}),iRe=({format:e,setFormat:t})=>m.jsxs(ta,{text:`Format (${e})`,children:[m.jsx(Ne,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),m.jsx(Ne,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]}),XB=({shortUrl:{shortUrl:e,shortCode:t},toggle:n,isOpen:r})=>{const{ImageDownloader:i}=Rt(XB),[o,a]=R.useState(300),[s,l]=R.useState(0),[c,f]=R.useState("png"),[d,p]=R.useState("L"),v=R.useMemo(()=>nRe(e,{size:o,format:c,margin:s,errorCorrection:d}),[e,o,c,s,d]),g=R.useMemo(()=>o+s,[o,s]),y=R.useMemo(()=>{if(!(g<500))return g<800?"lg":"xl"},[g]);return m.jsxs(go,{isOpen:r,toggle:n,centered:!0,size:y,children:[m.jsxs(yo,{toggle:n,children:["QR code for ",m.jsx(mr,{href:e,children:e})]}),m.jsxs($i,{children:[m.jsxs(Kn,{children:[m.jsxs(eo,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"sizeControl",children:["Size: ",o,"px"]}),m.jsx("input",{id:"sizeControl",type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:x=>a(Number(x.target.value))})]}),m.jsxs(eo,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",s,"px"]}),m.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:s,step:1,min:0,max:100,onChange:x=>l(Number(x.target.value))})]}),m.jsx(eo,{className:"d-grid col-md-6",children:m.jsx(iRe,{format:c,setFormat:f})}),m.jsx(eo,{className:"col-md-6",children:m.jsx(rRe,{errorCorrection:d,setErrorCorrection:p})})]}),m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"mb-3",children:[m.jsx(mr,{href:v}),m.jsx(ZB,{text:v})]}),m.jsx("img",{src:v,className:"qr-code-modal__img",alt:"QR code"}),m.jsx("div",{className:"mt-3",children:m.jsxs(Ke,{block:!0,color:"primary",onClick:()=>{i.saveImage(v,`${t}-qr-code.${c}`).catch(()=>{})},children:["Download ",m.jsx(je,{icon:Y6,className:"ms-1"})]})})]})]})]})},oRe=$t(XB,["ImageDownloader"]),Cy=({date:e,format:t=lB,relative:n=!1})=>{const r=dP(e)?e:Ya(e);return m.jsx("time",{dateTime:`${Aae(r)}000`,children:n?`${Tae(Qa(),r)} ago`:wg(r,t)})},aRe=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:a}=t,s=(r==null?void 0:r.total)??n??0;return i&&s>=i?{icon:WK,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",m.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:a&&Og(jr(a),Qa())?{icon:tA,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be visited since ",m.jsx("b",{className:"indivisible",children:Gh(jr(a))}),"."]})}:o&&Og(Qa(),jr(o))?{icon:tA,className:"text-warning",description:m.jsxs(m.Fragment,{children:["This short URL will start working on ",m.jsx("b",{className:"indivisible",children:Gh(jr(o))}),"."]})}:{icon:Gd,className:"text-primary",description:"This short URL can be visited normally."}},sRe=({shortUrl:e})=>{const t=ea(),{icon:n,className:r,description:i}=aRe(e);return m.jsxs(m.Fragment,{children:[m.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:m.jsx(je,{icon:n,className:r})}),m.jsx(br,{target:t,placement:"bottom",children:i})]})},lRe=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${aB(t)}/${r}${i}`},dv=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=ds();return!n||!e?m.jsx("span",{...i,children:r}):m.jsx(St,{to:lRe(o,e,t),...i,children:r})},QB=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const i=ea(),{maxVisits:o,validSince:a,validUntil:s}=(t==null?void 0:t.meta)??{},l=!!o||!!a||!!s,c=m.jsx(dv,{shortUrl:t,suffix:"visits",asLink:r,children:m.jsx("strong",{className:Ce("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:Gt(e)})});return l?m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"indivisible",children:[c,m.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:i,children:[o&&m.jsxs(m.Fragment,{children:[" / ",Gt(o)]}),m.jsx("sup",{className:"ms-1",children:m.jsx(je,{icon:nE})})]})]}),m.jsx(br,{target:i,placement:"bottom",children:m.jsxs("ul",{className:"list-unstyled mb-0",children:[o&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",m.jsx("b",{children:Gt(o)})," visit",o===1?"":"s","."]}),a&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",m.jsx("b",{className:"indivisible",children:Gh(jr(a))}),"."]}),s&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",m.jsx("b",{className:"indivisible",children:Gh(jr(s))}),"."]})]})})]}):c},cRe=e=>!!e.onClose,uRe=e=>!!e.onClick,hb=e=>{const{text:t,children:n,className:r,colorGenerator:i}=e,o=uRe(e),a=o?gl:"span",s=R.useMemo(()=>i.stylesForKey(t),[t,i]);return m.jsxs(a,{className:Ce("badge tag fw-bold",r,{pointer:o}),style:s,onClick:o?e.onClick:void 0,children:[n??t,cRe(e)&&m.jsx(gl,{"aria-label":`Remove ${t}`,className:"bg-transparent ms-1 opacity-100 p-0 fw-bold tag__close",onClick:e.onClose,children:"×"})]})},fRe=({tags:e,onTagClick:t,colorGenerator:n})=>e.length===0?m.jsx("i",{className:"indivisible",children:m.jsx("small",{children:"No tags"})}):m.jsx(m.Fragment,{children:e.map(r=>m.jsx(hb,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))}),JB=({shortUrl:e,onTagClick:t})=>{var n,r,i,o;const{ShortUrlsRowMenu:a,ColorGenerator:s,useTimeoutToggle:l}=Rt(JB),[c,f]=l(),[d,p]=l(!1,500),v=R.useRef(!0),[{excludeBots:g}]=fb(),y=_r("visits"),x=g??(y==null?void 0:y.excludeBots);return R.useEffect(()=>{!v.current&&p(),v.current=!1},[(n=e.visitsSummary)==null?void 0:n.total,(r=e.visitsSummary)==null?void 0:r.nonBots,e.visitsCount,p]),m.jsxs("tr",{className:"responsive-table__row",children:[m.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:m.jsx(Cy,{date:e.dateCreated})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:m.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[m.jsx("span",{className:"short-urls-row__short-url-wrapper",children:m.jsx(mr,{href:e.shortUrl})}),m.jsx(ZB,{text:e.shortUrl,onCopy:f}),m.jsx("span",{role:"status",className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!c,children:"Copied short URL!"})]})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${e.title?"Title":"Long URL"}`,children:m.jsx(mr,{href:e.longUrl,children:e.title??e.longUrl})}),e.title&&m.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:m.jsx(mr,{href:e.longUrl})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:m.jsx(fRe,{tags:e.tags,colorGenerator:s,onTagClick:t})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:m.jsx(QB,{visitsCount:(x?(i=e.visitsSummary)==null?void 0:i.nonBots:(o=e.visitsSummary)==null?void 0:o.total)??e.visitsCount??0,shortUrl:e,active:d,asLink:!0})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:m.jsx(sRe,{shortUrl:e})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:m.jsx(a,{shortUrl:e})})]})},dRe=$t(JB,["ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"]),hRe=(e,{maxVersion:t,minVersion:n})=>{const r=!n||l2(e,n,">=");return(!t||l2(e,t,"<="))&&r},eU={excludeBotsOnShortUrls:{minVersion:"3.4.0"},filterDisabledUrls:{minVersion:"3.4.0"},deviceLongUrls:{minVersion:"3.5.0",maxVersion:"3.*.*"},shortUrlVisitsDeletion:{minVersion:"3.6.0"},orphanVisitsDeletion:{minVersion:"3.7.0"},shortUrlRedirectRules:{minVersion:"4.0.0"},urlValidation:{maxVersion:"3.*.*"}};Object.freeze(eU);const Os=(e,t)=>t==="latest"||hRe(t,eU[e]),tU=e=>({excludeBotsOnShortUrls:Os("excludeBotsOnShortUrls",e),filterDisabledUrls:Os("filterDisabledUrls",e),deviceLongUrls:Os("deviceLongUrls",e),shortUrlVisitsDeletion:Os("shortUrlVisitsDeletion",e),orphanVisitsDeletion:Os("orphanVisitsDeletion",e),shortUrlRedirectRules:Os("shortUrlRedirectRules",e),urlValidation:Os("urlValidation",e)}),nU=R.createContext(tU("0.0.0")),pRe=nU.Provider,mRe=e=>R.useMemo(()=>tU(e),[e]),es=e=>R.useContext(nU)[e],rU=({shortUrl:e})=>{const{DeleteShortUrlModal:t,QrCodeModal:n}=Rt(rU),[r,,i,o]=qt(),[a,,s,l]=qt(),c=ab(),f=es("shortUrlRedirectRules");return m.jsxs(c0,{minWidth:f?220:190,children:[m.jsxs(Ne,{tag:dv,shortUrl:e,suffix:"visits",asLink:!0,children:[m.jsx(je,{icon:tE,fixedWidth:!0})," Visit stats"]}),c&&m.jsxs(m.Fragment,{children:[m.jsxs(Ne,{disabled:!c.canAddItemWithName(e.shortUrl),onClick:()=>c.addItemToCompare({name:e.shortUrl,query:fP(e)}),children:[m.jsx(je,{icon:Jy,fixedWidth:!0})," Compare visits"]}),m.jsx(Ne,{divider:!0,tag:"hr"})]}),m.jsxs(Ne,{tag:dv,shortUrl:e,suffix:"edit",asLink:!0,children:[m.jsx(je,{icon:eE,fixedWidth:!0})," Edit short URL"]}),f&&m.jsxs(Ne,{tag:dv,shortUrl:e,suffix:"redirect-rules",asLink:!0,children:[m.jsx(je,{icon:GK,fixedWidth:!0})," Manage redirect rules"]}),m.jsxs(Ne,{onClick:i,children:[m.jsx(je,{icon:zK,fixedWidth:!0})," QR code"]}),m.jsx(n,{shortUrl:e,isOpen:r,toggle:o}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{className:"dropdown-item--danger",onClick:s,children:[m.jsx(je,{icon:JS,fixedWidth:!0})," Delete short URL"]}),m.jsx(t,{shortUrl:e,isOpen:a,toggle:l})]})},vRe=$t(rU,["DeleteShortUrlModal","QrCodeModal"]),iU="shlink/shortUrlCreation",PR={saving:!1,saved:!1,error:!1},gRe=e=>fn(`${iU}/createShortUrl`,t=>e().createShortUrl(t)),yRe=e=>{const{reducer:t,actions:n}=Qt({name:iU,initialState:PR,reducers:{resetCreateShortUrl:()=>PR},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:zr(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},oU="shlink/shortUrlEdition",bRe={saving:!1,saved:!1,error:!1},_Re=e=>fn(`${oU}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),xRe=e=>Qt({name:oU,initialState:bRe,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,saving:!0,error:!1,saved:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,saving:!1,error:!0,saved:!1,errorData:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),TR="shlink/shortUrlsDetails",jR={loading:!1,error:!1},wRe=e=>{const t=fn(`${TR}/getShortUrlsDetails`,async(r,{getState:i})=>{const{shortUrlsList:o}=i(),a=await Promise.all(r.map(async s=>{var l;const{shortCode:c,domain:f}=s,d=(l=o==null?void 0:o.shortUrls)==null?void 0:l.data.find(p=>Ed(p,c,f));return[s,d??await e().getShortUrl(c,f)]}));return new Map(a)}),{reducer:n}=Qt({name:TR,initialState:jR,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:zr(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...jR,shortUrls:o}))}});return{reducer:n,getShortUrlsDetails:t}},m_=({icon:e,className:t,...n})=>{const r=ea();return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Fn,{className:Ce("icon-input-container__input",t),innerRef:r,...n}),m.jsx(je,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var i;return(i=r.current)==null?void 0:i.focus()}})]})},ORe=({minDate:e,maxDate:t,value:n,onChange:r,withTime:i=!1,...o})=>{const a=R.useCallback(({target:l})=>{if(!l.value){r==null||r(null);return}r==null||r(jr(l.value))},[r]),s=R.useMemo(()=>i?Gh:ja,[i]);return m.jsx(Fn,{...o,type:i?"datetime-local":"date",value:s(n)??"",max:s(t)??void 0,min:s(e)??void 0,onChange:a})},Py=({label:e,id:t,...n})=>{const r=R.useId();return m.jsxs(m.Fragment,{children:[m.jsxs("label",{htmlFor:t??r,className:"mb-1",children:[e,":"]}),m.jsx(ORe,{id:t??r,...n})]})},v_=({children:e,infoTooltip:t,checked:n,onChange:r})=>m.jsxs("p",{children:[m.jsx(jD,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&m.jsx(fv,{placement:"right",children:t})]}),SRe=({isOpen:e,toggle:t})=>m.jsxs(go,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[m.jsx(yo,{toggle:t,children:"Info"}),m.jsxs($i,{children:[m.jsxs("p",{children:["When the ",m.jsx("b",{children:m.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),m.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),m.jsxs("ul",{children:[m.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),m.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",m.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),m.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),ERe=()=>{const[e,t]=qt();return m.jsxs(m.Fragment,{children:[m.jsx(gl,{className:"p-0",title:"What does this mean?",onClick:t,children:m.jsx(je,{icon:nE})}),m.jsx(SRe,{isOpen:e,toggle:t})]})},Fm=e=>typeof e=="string"?Ya(e):e,CRe=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,PRe=e=>"error"in e,aU=({basicMode:e=!1,saving:t,onSave:n,initialState:r,tagsList:i})=>{var o,a,s;const{TagsSelector:l,DomainSelector:c}=Rt(aU),[f,d]=R.useState(r),p=CRe(f),v=es("deviceLongUrls"),g=es("urlValidation"),y=g||p,x=R.useCallback(()=>d(r),[r]),_=R.useCallback((C,T)=>$s(C)?C:$s(T)?null:void 0,[]),b=R.useCallback((C,T)=>d(({deviceLongUrls:A={},...D})=>{var N;return{...D,deviceLongUrls:{...A,[C]:_(T,(N=r.deviceLongUrls)==null?void 0:N[C])}}}),[r.deviceLongUrls,_]),w=R.useCallback(C=>d(T=>({...T,tags:C})),[]),S=R.useCallback(async C=>(C.preventDefault(),n(f).then(T=>p&&!PRe(T)&&x()).catch(()=>{})),[p,n,x,f]),E=R.useMemo(()=>m.jsxs("div",{className:"d-flex flex-column gap-3",children:[m.jsx(Fn,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:f.longUrl,onChange:C=>d(T=>({...T,longUrl:C.target.value}))}),m.jsxs("div",{className:Ce("d-flex flex-column flex-lg-row gap-3",{"mb-3":e}),children:[e&&p&&m.jsx("div",{className:"w-100 w-lg-50",children:m.jsx(Fn,{bsSize:"lg",placeholder:"Custom slug",value:f.customSlug??"",onChange:C=>d(T=>({...T,customSlug:C.target.value}))})}),m.jsx("div",{className:Ce("w-100",{"w-lg-50":e}),children:m.jsx(l,{tags:i.tags,selectedTags:f.tags??[],onChange:w})})]})]}),[l,e,w,p,f,i.tags]);return m.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:S,children:[e&&E,!e&&m.jsxs(m.Fragment,{children:[m.jsxs(Kn,{children:[m.jsx("div",{className:Ce("mb-3",{"col-sm-6":v,"col-12":!v}),children:m.jsx(xt,{title:"Main options",children:E})}),v&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Device-specific long URLs",bodyClassName:"d-flex flex-column gap-3",children:[m.jsx(m_,{type:"url",icon:Pse,placeholder:"Android-specific redirection",value:((o=f.deviceLongUrls)==null?void 0:o.android)??"",onChange:({target:C})=>b("android",C.value)}),m.jsx(m_,{type:"url",icon:Cse,placeholder:"iOS-specific redirection",value:((a=f.deviceLongUrls)==null?void 0:a.ios)??"",onChange:({target:C})=>b("ios",C.value)}),m.jsx(m_,{type:"url",icon:HK,placeholder:"Desktop-specific redirection",value:((s=f.deviceLongUrls)==null?void 0:s.desktop)??"",onChange:({target:C})=>b("desktop",C.value)})]})})]}),m.jsxs(Kn,{children:[m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Customize the short URL",bodyClassName:"d-flex flex-column gap-3",children:[m.jsx(Fn,{placeholder:"Title",value:f.title??"",onChange:({target:C})=>d(T=>({...T,title:_(C.value,r.title)}))}),p&&m.jsxs(m.Fragment,{children:[m.jsxs(Kn,{children:[m.jsx("div",{className:"col-lg-6 mb-3 mb-lg-0",children:m.jsx(Fn,{placeholder:"Custom slug",value:f.customSlug??"",onChange:C=>d(T=>({...T,customSlug:C.target.value})),disabled:$s(f.shortCodeLength)})}),m.jsx("div",{className:"col-lg-6",children:m.jsx(Fn,{type:"number",placeholder:"Short code length",value:f.shortCodeLength??"",onChange:C=>d(T=>({...T,shortCodeLength:C.target.value})),min:4,disabled:$s(f.customSlug)})})]}),m.jsx(c,{value:f.domain,onChange:C=>d(T=>({...T,domain:C}))})]})]})}),m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Limit access to the short URL",children:[m.jsxs("div",{className:"row mb-3",children:[m.jsx("div",{className:"col-lg-6",children:m.jsx(Py,{label:"Enabled since",withTime:!0,maxDate:f.validUntil?Fm(f.validUntil):void 0,value:f.validSince?Fm(f.validSince):null,onChange:C=>d(T=>({...T,validSince:Ja(C)}))})}),m.jsx("div",{className:"col-lg-6 mt-3 mt-lg-0",children:m.jsx(Py,{label:"Enabled until",withTime:!0,minDate:f.validSince?Fm(f.validSince):void 0,value:f.validUntil?Fm(f.validUntil):null,onChange:C=>d(T=>({...T,validUntil:Ja(C)}))})})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:"maxVisits",className:"mb-1",children:"Maximum visits allowed:"}),m.jsx(Fn,{id:"maxVisits",type:"number",min:1,placeholder:"25...",value:f.maxVisits??"",onChange:C=>d(T=>({...T,maxVisits:$s(C.target.value)?Number(C.target.value):null}))})]})]})})]}),m.jsxs(Kn,{children:[y&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Extra checks",children:[g&&m.jsx(v_,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:f.validateUrl,onChange:C=>d(T=>({...T,validateUrl:C})),children:"Validate URL"}),p&&m.jsxs("p",{children:[m.jsx(jD,{inline:!0,className:"me-2",checked:f.findIfExists,onChange:C=>d(T=>({...T,findIfExists:C})),children:"Use existing URL if found"}),m.jsx(ERe,{})]})]})}),m.jsx("div",{className:Ce("mb-3",{"col-sm-6":y}),children:m.jsxs(xt,{title:"Configure behavior",children:[m.jsx(v_,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:f.crawlable,onChange:C=>d(T=>({...T,crawlable:C})),children:"Make it crawlable"}),m.jsx(v_,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:f.forwardQuery,onChange:C=>d(T=>({...T,forwardQuery:C})),children:"Forward query params on redirect"})]})})]})]}),m.jsx("div",{className:"text-center",children:m.jsx(Ke,{outline:!0,color:"primary",disabled:t||!f.longUrl,className:"btn-xs-block",children:t?"Saving...":"Save"})})]})},TRe=$t(aU,["TagsSelector","DomainSelector"]),jRe=({active:e,allText:t,onChange:n})=>m.jsxs(m.Fragment,{children:[m.jsx(Ne,{active:e==="all",onClick:()=>n("all"),children:t}),m.jsx(Ne,{divider:!0,tag:"hr"}),ZNe.map(r=>m.jsx(Ne,{active:e===r,onClick:()=>n(r),children:dB(r)},r))]}),ARe=({startDate:e,endDate:t,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(Py,{label:"Since",value:e,maxDate:t??void 0,disabled:n,onChange:r})}),m.jsx("div",{className:"col-md-6 mt-3 mt-md-0",children:m.jsx(Py,{label:"Until",value:t,minDate:e??void 0,disabled:n,onChange:o=>i(o&&Jc(o))})})]}),_P=({onDatesChange:e,dateRangeOrInterval:t,defaultText:n,disabled:r})=>{const i=R.useMemo(()=>dB(t)??n,[t,n]),[o,a]=R.useMemo(()=>Oy(t)?[void 0,t]:[t,void 0],[t]),s=R.useCallback(l=>{Oy(l)?e(hB(l),l):e(l)},[e]);return m.jsxs(ta,{disabled:r,text:i,children:[m.jsx(jRe,{allText:n,active:a,onChange:s}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx("div",{className:"px-3 py-1",children:m.jsx(ARe,{...o,onStartDateChange:l=>s({...o,startDate:l}),onEndDateChange:l=>s({...o,endDate:l})})})]})},kRe={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},NRe=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:a=!1}=t,s=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return m.jsxs(ta,{text:"Filters",dropdownClassName:n,end:!0,minWidth:250,children:[m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Visits:"}),m.jsx(Ne,{active:i,onClick:s("excludeBots"),children:"Ignore visits from bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Short URLs:"}),m.jsx(Ne,{active:o,onClick:s("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),m.jsx(Ne,{active:a,onClick:s("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{disabled:t.excludeBots===void 0&&t.excludeMaxVisitsReached===void 0&&t.excludePastValidUntil===void 0,onClick:()=>e({excludeBots:void 0,excludeMaxVisitsReached:void 0,excludePastValidUntil:void 0}),children:m.jsx("i",{children:"Reset to defaults"})})]})},sU=({className:e,shortUrlsAmount:t,order:n,handleOrderBy:r,tagsList:i})=>{const{ExportShortUrlsBtn:o,TagsSelector:a}=Rt(sU),[{search:s,tags:l,startDate:c,endDate:f,excludeBots:d,excludeMaxVisitsReached:p,excludePastValidUntil:v,tagsMode:g="any"},y]=fb(),x=es("filterDisabledUrls"),_=_r("visits"),[b,w]=R.useState(),S=R.useCallback(({startDate:A,endDate:D},N)=>{y({startDate:Ja(A)??void 0,endDate:Ja(D)??void 0}),w(N)},[y]),E=R.useCallback(A=>y({search:A||void 0}),[y]),C=R.useCallback(A=>y({tags:A}),[y]),T=R.useCallback(()=>y({tagsMode:g==="any"?"all":"any"}),[g,y]);return m.jsxs("div",{className:Ce("short-urls-filtering-bar-container",e),children:[m.jsx(cp,{initialValue:s,onChange:E}),m.jsxs(s0,{className:"mt-3",children:[m.jsx(a,{immutable:!0,placeholder:"With tags...",tags:i.tags,selectedTags:l,onChange:C}),l.length>1&&m.jsxs(m.Fragment,{children:[m.jsx(Ke,{outline:!0,color:"secondary",onClick:T,id:"tagsModeBtn","aria-label":"Change tags mode",children:m.jsx(je,{className:"short-urls-filtering-bar__tags-icon",icon:g==="all"?K6:gK})}),m.jsx(br,{target:"tagsModeBtn",placement:"left",children:g==="all"?"With all the tags.":"With any of the tags."})]})]}),m.jsxs(Kn,{className:"flex-lg-row-reverse",children:[m.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(_P,{defaultText:"All short URLs",dateRangeOrInterval:b??fB(c,f),onDatesChange:S})}),m.jsx(NRe,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:d??(_==null?void 0:_.excludeBots),excludeMaxVisitsReached:p,excludePastValidUntil:v},onChange:y,supportsDisabledFiltering:x})]})}),m.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:m.jsx(o,{amount:t})}),m.jsx("div",{className:"col-6 d-lg-none mt-3",children:m.jsx(up,{prefixed:!1,items:kRe,order:n,onChange:r})})]})]})},MRe=$t(sU,["ExportShortUrlsBtn","TagsSelector"]);function Cd({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:m.jsx(je,{icon:e.dir==="ASC"?cK:wK,className:n})}const Zl=2,HO="...",lU=(e,t)=>{const n=VE(Math.max(Zl,e-Zl),Math.min(t-1,e+Zl)+1);return e-Zl>Zl&&n.unshift(HO),e+Zle===HO,cU=e=>qh(e)?e:Gt(e),uU=(e,t)=>qh(e)?`${e}_${t}`:`${e}`,LRe=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=ds(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return m.jsx("div",{className:"pb-3"});const a=()=>lU(n,r).map((s,l)=>m.jsx(Xs,{disabled:qh(s),active:n===s,children:m.jsx(Qs,{tag:St,to:o(s),children:cU(s)})},uU(s,l)));return m.jsxs(kE,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[m.jsx(Xs,{disabled:n===1,children:m.jsx(Qs,{previous:!0,tag:St,to:o(n-1)})}),a(),m.jsx(Xs,{disabled:n>=r,children:m.jsx(Qs,{next:!0,tag:St,to:o(n+1)})})]})},RRe={field:"dateCreated",dir:"DESC"},fU=Bi(({listShortUrls:e,shortUrlsList:t})=>{var n,r,i;const{ShortUrlsTable:o,ShortUrlsFilteringBar:a}=Rt(fU),{page:s}=Cu(),l=gr(),[{tags:c,search:f,startDate:d,endDate:p,orderBy:v,tagsMode:g,excludeBots:y,excludePastValidUntil:x,excludeMaxVisitsReached:_},b]=fb(),w=qE(),[S,E]=R.useState(v??((n=w.shortUrlsList)==null?void 0:n.defaultOrdering)??RRe),{pagination:C}=(t==null?void 0:t.shortUrls)??{},T=R.useMemo(()=>{var X;return y??((X=w.visits)==null?void 0:X.excludeBots)},[y,(r=w.visits)==null?void 0:r.excludeBots]),A=es("excludeBotsOnShortUrls"),D=R.useCallback((X,Q)=>{b({orderBy:{field:X,dir:Q}}),E({field:X,dir:Q})},[b]),N=X=>()=>D(X,u0(X,S.field,S.dir)),I=X=>m.jsx(Cd,{currentOrder:S,field:X}),F=R.useCallback(X=>b({tags:[...new Set([...c,X])]}),[c,b]),K=R.useCallback(({field:X,dir:Q})=>A&&T&&X==="visits"?{field:"nonBotVisits",dir:Q}:{field:X,dir:Q},[T,A]),W=lP();return R.useEffect(()=>{e({page:s,searchTerm:f,tags:c,startDate:d,endDate:p,orderBy:K(S),tagsMode:g,excludePastValidUntil:x,excludeMaxVisitsReached:_})},[e,K,s,f,c,d,p,S,g,x,_]),m.jsxs(sP,{value:W,children:[m.jsx(a,{shortUrlsAmount:(i=t.shortUrls)==null?void 0:i.pagination.totalItems,order:S,handleOrderBy:D,className:"mb-3"}),m.jsx(cP,{type:"short-urls",className:"mb-3"}),m.jsxs(vr,{body:!0,className:Ce({"pb-0":!t.loading}),children:[m.jsx(o,{shortUrlsList:t,orderByColumn:N,renderOrderIcon:I,onTagClick:F}),!t.loading&&m.jsx(LRe,{paginator:C,currentQueryString:l.search})]})]})},()=>[nr.visits]),$Re=$t(fU,["ShortUrlsTable","ShortUrlsFilteringBar"]),dU=({orderByColumn:e,renderOrderIcon:t,shortUrlsList:n,onTagClick:r,className:i})=>{const{ShortUrlsRow:o}=Rt(dU),{error:a,loading:s,shortUrls:l}=n,c=Ce({"short-urls-table__header-cell--with-action":!!e}),f=Ce("short-urls-table__header-cell",c),d=Ce("table table-hover responsive-table short-urls-table",i),p=()=>a?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):s?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!s&&(!l||l.data.length===0)?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(v=>m.jsx(o,{shortUrl:v,onTagClick:r},v.shortUrl));return m.jsxs("table",{className:d,children:[m.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:m.jsxs("tr",{children:[m.jsxs("th",{className:f,onClick:e==null?void 0:e("dateCreated"),children:["Created at ",t==null?void 0:t("dateCreated")]}),m.jsxs("th",{className:f,onClick:e==null?void 0:e("shortCode"),children:["Short URL ",t==null?void 0:t("shortCode")]}),m.jsxs("th",{className:"short-urls-table__header-cell",children:[m.jsxs(gl,{className:Ce("p-0",c),onClick:e==null?void 0:e("title"),children:["Title ",t==null?void 0:t("title")]}),"  /  ",m.jsxs(gl,{className:Ce("p-0",c),onClick:e==null?void 0:e("longUrl"),children:[m.jsx("span",{className:"indivisible",children:"Long URL"})," ",t==null?void 0:t("longUrl")]})]}),m.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),m.jsx("th",{className:f,onClick:e==null?void 0:e("visits"),children:m.jsxs("span",{className:"indivisible",children:["Visits ",t==null?void 0:t("visits")]})}),m.jsx("th",{className:"short-urls-table__header-cell",colSpan:2,"aria-hidden":!0})]})}),m.jsx("tbody",{children:p()})]})},IRe=$t(dU,["ShortUrlsRow"]),DRe=(e,t)=>{e.factory("ShortUrlsList",$Re),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.factory("ShortUrlsTable",IRe),e.factory("ShortUrlsRow",dRe),e.factory("ShortUrlsRowMenu",vRe),e.factory("CreateShortUrlResult",JLe),e.factory("ShortUrlForm",TRe),e.decorator("ShortUrlForm",t(["tagsList"])),e.factory("CreateShortUrl",XLe),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.factory("EditShortUrl",QLe),e.decorator("EditShortUrl",t(["shortUrlsDetails","shortUrlEdition"],["getShortUrlsDetails","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>eRe),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.factory("QrCodeModal",oRe),e.factory("ExportShortUrlsBtn",tRe),e.factory("ShortUrlsFilteringBar",MRe),e.decorator("ShortUrlsFilteringBar",t(["tagsList"])),e.serviceFactory("shortUrlsListReducerCreator",RMe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",n=>n.reducer,"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",yRe,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",n=>n.reducer,"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",xRe,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",n=>n.reducer,"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",NMe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",n=>n.reducer,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlsDetailsReducerCreator",wRe,"apiClientFactory"),e.serviceFactory("shortUrlsDetailsReducer",n=>n.reducer,"shortUrlsDetailsReducerCreator"),e.serviceFactory("listShortUrls",LMe,"apiClientFactory"),e.serviceFactory("createShortUrl",gRe,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",n=>n.resetCreateShortUrl,"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",kMe,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",n=>n.resetDeleteShortUrl,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>wB),e.serviceFactory("getShortUrlsDetails",n=>n.getShortUrlsDetails,"shortUrlsDetailsReducerCreator"),e.serviceFactory("editShortUrl",_Re,"apiClientFactory")},FRe=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:a,error:s,deleted:l,errorData:c}=i;return m.jsxs(go,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[m.jsx(yo,{toggle:t,className:"text-danger",children:"Delete tag"}),m.jsxs($i,{children:["Are you sure you want to delete tag ",m.jsx("b",{children:e}),"?",s&&m.jsx(er,{type:"error",small:!0,className:"mt-2",children:m.jsx(mo,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),m.jsxs(as,{children:[m.jsx(Ke,{color:"link",onClick:t,children:"Cancel"}),m.jsx(Ke,{color:"danger",disabled:a,onClick:async()=>{await r(e),t()},children:a?"Deleting tag...":"Delete tag"})]})]})},hU=({tag:e,editTag:t,toggle:n,tagEdited:r,isOpen:i,tagEdit:o})=>{const{ColorGenerator:a}=Rt(hU),[s,l]=R.useState(e),[c,f]=R.useState(a.getColorForKey(e)),{editing:d,error:p,edited:v,errorData:g}=o,y=xB(async()=>{await t({oldName:e,newName:s,color:c}),n()}),x=R.useCallback(()=>v&&r({oldName:e,newName:s,color:c}),[c,v,s,e,r]);return m.jsx(go,{isOpen:i,toggle:n,centered:!0,onClosed:x,children:m.jsxs("form",{name:"editTag",onSubmit:y,children:[m.jsx(yo,{toggle:n,children:"Edit tag"}),m.jsxs($i,{children:[m.jsxs(s0,{children:[m.jsxs("div",{className:"input-group-text p-0 position-relative",style:{backgroundColor:c,borderColor:c},children:[m.jsx(je,{icon:uK,className:"position-absolute top-50 start-50 translate-middle text-white"}),m.jsx(Fn,{className:"form-control-color opacity-0",type:"color",value:c,onChange:_=>f(_.target.value)})]}),m.jsx(Fn,{value:s,placeholder:"Tag",required:!0,onChange:({target:_})=>l(_.value)})]}),p&&m.jsx(er,{type:"error",small:!0,className:"mt-2",children:m.jsx(mo,{errorData:g,fallbackMessage:"Something went wrong while editing the tag :("})})]}),m.jsxs(as,{children:[m.jsx(Ke,{type:"button",color:"link",onClick:n,children:"Cancel"}),m.jsx(Ke,{color:"primary",disabled:d,children:d?"Saving...":"Save"})]})]})})},BRe=$t(hU,["ColorGenerator"]),URe=/\s+/g,pU=e=>e.trim().toLowerCase().replace(URe,"-"),mU=({color:e})=>m.jsx("div",{style:{backgroundColor:e},className:"color-bullet"}),vU=({tag:e,colorGenerator:t})=>m.jsx(mU,{color:t.getColorForKey(e)});let AR=1;const gU="Tag not found",yU="Add tag",zRe=e=>e!==gU,VRe=e=>e===yU,kR=e=>(AR+=1,{label:e,value:`${e}${AR}`}),WRe=e=>({tag:t,onClick:n})=>m.jsx(hb,{colorGenerator:e,text:t.label,className:"react-tags__tag",onClose:n}),HRe=(e,t)=>({option:n,classNames:r,...i})=>{var o;const a=zRe(n.label),s=VRe(n.label);return m.jsx("div",{className:Ce(r.option,{[r.optionIsActive]:a&&n.active,"react-tags__listbox-option--not-selectable":!a}),...i,children:a?m.jsxs(m.Fragment,{children:[!s&&m.jsx(vU,{tag:`${n.label}`,colorGenerator:e}),s?m.jsxs("i",{children:['Add "',pU(((o=t.current)==null?void 0:o.input.value)??""),'"']}):n.label]}):m.jsx("i",{children:n.label})})},bU=({selectedTags:e,onChange:t,placeholder:n,tags:r,immutable:i=!1})=>{const{ColorGenerator:o}=Rt(bU),a=_r("shortUrlCreation"),s=(a==null?void 0:a.tagFilteringMode)??"startsWith",l=ea();return m.jsx(Sle,{ref:l,selected:e.map(kR),suggestions:r.filter(c=>!e.includes(c)).map(kR),renderTag:WRe(o),renderOption:HRe(o,l),activateFirstOption:!0,allowNew:!i,newOptionText:yU,noOptionsText:gU,placeholderText:n??"Add tags to the URL",delimiterKeys:["Enter",","],suggestionsTransform:(c,f)=>{const d=c.toLowerCase().trim();return d.length<1?[]:[...f.filter(({label:p})=>s==="includes"?p.includes(d):p.startsWith(d))].slice(0,5)},onDelete:c=>{const f=[...e];f.splice(c,1),t(f)},onAdd:({label:c})=>t([...new Set([...e,...c.split(",").map(pU)])])})},GRe=$t(bU,["ColorGenerator"]),GO="shlink/tagDelete",qRe={deleting:!1,deleted:!1,error:!1},_U=un(`${GO}/tagDeleted`),KRe=e=>{const t=fn(`${GO}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=Qt({name:GO,initialState:qRe,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({deleting:!1,deleted:!1,error:!0,errorData:zr(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},xP="shlink/tagEdit",YRe={editing:!1,edited:!1,error:!1},xU=un(`${xP}/tagEdited`),ZRe=(e,t)=>fn(`${xP}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),XRe=e=>Qt({name:xP,initialState:YRe,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({editing:!0,edited:!1,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{oldName:i,newName:o}=r;return{oldName:i,newName:o,editing:!1,edited:!0,error:!1}})}}),wP="shlink/tagsList",g_={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},NR=(e,t)=>n=>n===e?t:n,MR=(e,t)=>e.filter(n=>n!==t),QRe=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:a}=i,s=n[r];return{...n,[r]:{...s,visitsSummary:s.visitsSummary&&{total:s.visitsSummary.total+o+a,bots:s.visitsSummary.bots+o,nonBots:s.visitsSummary.nonBots+a},visitsCount:(s.visitsCount??0)+o+a}}},{...t}),JRe=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),e4e=e=>fn(`${wP}/listTags`,async()=>{const{data:t}=await e().tagsStats(),n=t.reduce((r,{tag:i,...o})=>(r[i]=o,r),{});return{tags:Object.keys(n),stats:n}}),wU=un(`${wP}/filterTags`),t4e=(e,t)=>Qt({name:wP,initialState:g_,reducers:{},extraReducers:n=>{n.addCase(wU,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(o=>o.toLowerCase().match(i.toLowerCase()))})),n.addCase(e.pending,r=>({...r,loading:!0,error:!1})),n.addCase(e.rejected,(r,{error:i})=>({...g_,error:!0,errorData:zr(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...g_,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(_U,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:MR(r,a),filteredTags:MR(i,a)})),n.addCase(xU,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map(NR(s.oldName,s.newName)).sort(),filteredTags:i.map(NR(s.oldName,s.newName)).sort()})),n.addCase(Xu,(r,{payload:i})=>({...r,stats:QRe(JRe(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),n4e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},OU=Bi(({filterTags:e,tagsList:t})=>{var n,r;const{TagsTable:i}=Rt(OU),o=qE(),[a,s]=R.useState(((n=o.tags)==null?void 0:n.defaultOrdering)??{}),l=R.useMemo(()=>{const f=t.filteredTags.map(d=>{var p,v,g;const y=t.stats[d],x=((p=o.visits)!=null&&p.excludeBots?(v=y==null?void 0:y.visitsSummary)==null?void 0:v.nonBots:(g=y==null?void 0:y.visitsSummary)==null?void 0:g.total)??(y==null?void 0:y.visitsCount)??0;return{tag:d,visits:x,shortUrls:(y==null?void 0:y.shortUrlsCount)??0}});return kD(f,a)},[a,(r=o.visits)==null?void 0:r.excludeBots,t.filteredTags,t.stats]),c=lP();return t.loading?m.jsx(Ho,{loading:!0}):t.error?m.jsx(er,{type:"error",children:m.jsx(mo,{errorData:t.errorData,fallbackMessage:"Error loading tags :("})}):m.jsxs(sP,{value:c,children:[m.jsx(cp,{className:"mb-3",onChange:e}),m.jsx(Kn,{className:"mb-3",children:m.jsx("div",{className:"col-lg-6 offset-lg-6",children:m.jsx(up,{items:n4e,order:a,onChange:(f,d)=>s({field:f,dir:d})})})}),m.jsx(cP,{type:"tags",className:"mb-3"}),m.jsx(i,{sortedTags:l,currentOrder:a,orderByColumn:f=>()=>{const d=u0(f,a.field,a.dir);s({field:d?f:void 0,dir:d})}})]})},()=>[nr.visits]),r4e=$t(OU,["TagsTable"]),OP=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!qh(o)&&n(o);return m.jsxs(kE,{listClassName:Ce("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[m.jsx(Xs,{disabled:t<=1,children:m.jsx(Qs,{previous:!0,tag:"span",onClick:i(t-1)})}),lU(t,e).map((o,a)=>m.jsx(Xs,{disabled:qh(o),active:t===o,children:m.jsx(Qs,{role:"link",tag:"span",onClick:i(o),children:cU(o)})},uU(o,a))),m.jsx(Xs,{disabled:t>=e,children:m.jsx(Qs,{next:!0,tag:"span",onClick:i(t+1)})})]})},i4e=20,SU=({sortedTags:e,orderByColumn:t,currentOrder:n})=>{const{TagsTableRow:r}=Rt(SU),i=R.useRef(!0),{page:o=1}=Au(),[a,s]=gMe("page",Number(o)),l=jc(e,i4e),c=l.length>1,f=l[a-1]??[];return R.useEffect(()=>{!i.current&&s(1),i.current=!1},[s,e]),R.useEffect(()=>{scrollTo(0,0)},[a]),m.jsxs(xt,{bodyClassName:c?"pb-1":"",children:[m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsxs("thead",{className:"responsive-table__header",children:[m.jsxs("tr",{children:[m.jsxs("th",{className:"tags-table__header-cell",onClick:t("tag"),children:["Tag ",m.jsx(Cd,{currentOrder:n,field:"tag"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("shortUrls"),children:["Short URLs ",m.jsx(Cd,{currentOrder:n,field:"shortUrls"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("visits"),children:["Visits ",m.jsx(Cd,{currentOrder:n,field:"visits"})]}),m.jsx("th",{className:"tags-table__header-cell",children:m.jsx("span",{className:"sr-only",children:"Options"})})]}),m.jsx("tr",{children:m.jsx("th",{"aria-hidden":!0,colSpan:4,className:"p-0 border-top-0"})})]}),m.jsxs("tbody",{children:[f.length===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:4,className:"text-center",children:"No tags found"})}),f.map(d=>m.jsx(r,{tag:d},d.tag))]})]}),c&&m.jsx("div",{className:"sticky-card-paginator",children:m.jsx(OP,{pagesCount:l.length,currentPage:a,setCurrentPage:s})})]},a)},o4e=$t(SU,["TagsTableRow"]),EU=({tag:e})=>{const{DeleteTagConfirmModal:t,EditTagModal:n,ColorGenerator:r}=Rt(EU),[i,o]=qt(),[a,s]=qt(),l=ds(),c=ab();return m.jsxs("tr",{className:"responsive-table__row",children:[m.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[m.jsx(vU,{tag:e.tag,colorGenerator:r})," ",e.tag]}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:m.jsx(St,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(e.tag)}`,children:Gt(e.shortUrls)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:m.jsx(St,{to:`${l}/tag/${e.tag}/visits`,children:Gt(e.visits)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end",children:m.jsxs(c0,{children:[m.jsxs(Ne,{onClick:s,children:[m.jsx(je,{icon:H6,fixedWidth:!0,className:"me-1"})," Edit"]}),m.jsxs(Ne,{disabled:!c||!c.canAddItemWithName(e.tag),onClick:()=>c==null?void 0:c.addItemToCompare({name:e.tag,query:e.tag,style:r.stylesForKey(e.tag)}),children:[m.jsx(je,{icon:Jy,fixedWidth:!0})," Compare visits"]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{className:"dropdown-item--danger",onClick:o,children:[m.jsx(je,{icon:hK,fixedWidth:!0,className:"me-1"})," Delete tag"]})]})}),m.jsx(n,{tag:e.tag,toggle:s,isOpen:a}),m.jsx(t,{tag:e.tag,toggle:o,isOpen:i})]})},a4e=$t(EU,["DeleteTagConfirmModal","EditTagModal","ColorGenerator"]),s4e=(e,t)=>{e.factory("TagsSelector",GRe),e.serviceFactory("DeleteTagConfirmModal",()=>FRe),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.factory("EditTagModal",BRe),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.factory("TagsTableRow",a4e),e.factory("TagsTable",o4e),e.factory("TagsList",r4e),e.decorator("TagsList",t(["tagsList","mercureInfo"],["filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",XRe,"editTag"),e.serviceFactory("tagEditReducer",n=>n.reducer,"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",KRe,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",n=>n.reducer,"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",t4e,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",n=>n.reducer,"tagsListReducerCreator"),e.serviceFactory("listTags",e4e,"apiClientFactory"),e.serviceFactory("filterTags",()=>wU),e.serviceFactory("deleteTag",n=>n.deleteTag,"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>_U),e.serviceFactory("editTag",ZRe,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>xU)},l4e=new x5,c4e=e=>l4e.parse(e),u4e=6,LR="0123456789ABCDEF",f4e=128,{floor:d4e,random:h4e,sqrt:p4e,round:m4e}=Math,v4e=()=>`#${mP(u4e,()=>LR[d4e(h4e()*LR.length)]).join("")}`,RR=e=>e.toLowerCase().trim(),g4e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),y4e=(e=0,t=0,n=0)=>m4e(p4e(.299*e**2+.587*t**2+.114*n**2));class b4e{constructor(t){za(this,"colors"),za(this,"lights");var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}getColorForKey(t){const n=RR(t);return this.colors[n]||this.setColorForKey(n,v4e())}setColorForKey(t,n){var r;const i=RR(t);return this.colors[i]=n,(r=this.storage)==null||r.storeTagColors(this.colors),n}stylesForKey(t){const n=this.getColorForKey(t);return{backgroundColor:n,color:this.isLightColor(n)?"#222":"#fff"}}isLightColor(t){const n=t.substring(1);if(this.lights[n]===void 0){const r=g4e(n);this.lights[n]=y4e(...r)>=f4e}return this.lights[n]}}const CU=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},_4e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);CU(e,i,n)};class x4e{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);CU(this.window,i,n)}}class w4e{constructor(t,n){za(this,"exportVisits",(r,i)=>{i.length&&this.exportCsv(r,i)}),za(this,"exportShortUrls",r=>{r.length&&this.exportCsv("short_urls.csv",r)}),za(this,"exportCsv",(r,i)=>{const o=this.jsonToCsv(i);_4e(this.window,o,r)}),this.window=t,this.jsonToCsv=n}}function O4e(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",x4e,"fetch","window"),e.service("ColorGenerator",b4e,"TagColorsStorage"),e.constant("jsonToCsv",c4e),e.service("ReportExporter",w4e,"window","jsonToCsv"),e.serviceFactory("useTimeoutToggle",()=>PD)}const Tp=({visits:e,shortUrl:t,children:n,title:r})=>m.jsx("header",{children:m.jsxs(vr,{body:!0,children:[m.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[m.jsx(db,{}),m.jsx("span",{className:"text-center d-none d-sm-block",children:m.jsx("small",{children:r})}),m.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",m.jsx(QB,{visitsCount:e.length,shortUrl:t})]})]}),m.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:m.jsx("small",{children:r})}),n&&m.jsx("div",{className:"mt-md-2",children:n})]})}),PU=({title:e,footer:t,children:n})=>m.jsxs(vr,{role:"document",children:[m.jsx(Xc,{className:"chart-card__header",children:e}),m.jsx(Zc,{children:n}),t&&m.jsx(dD,{className:"chart-card__footer--sticky",children:t})]}),TU={color:"white",background:"rgb(0 0 0 / .9)",border:"none",borderRadius:"5px"},S4e={marginBottom:"5px",fontWeight:"bold"},jU={contentStyle:TU,labelStyle:S4e,itemStyle:{padding:0}},$R=["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],AU=e=>$R[e%$R.length],Ty="#46e587",E4e="rgba(70, 229, 135, 0.4)",C4e=({chartData:e,showNumbers:t})=>m.jsx("ul",{className:"doughnut-chart-legend",children:e.map(({name:n,color:r,value:i})=>m.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[m.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:r}}),m.jsxs("small",{className:"doughnut-chart-legend__item-text flex-fill",children:[n,t&&m.jsxs("b",{children:[" (",Gt(i),")"]})]})]},n))}),IR=e=>R.useMemo(()=>Object.entries(e).map(([t,n],r)=>({name:t,value:n,color:AU(r)})),[e]),P4e=({stats:e,prevStats:t,showNumbersInLegend:n,dimensions:r})=>{const i=IR(e),o=IR(t),a=o.length>0,s=LE()?Yre:Kre;return m.jsxs("div",{className:"row align-items-center",children:[m.jsx("div",{className:"col-sm-12 col-md-7",children:m.jsx("div",{style:r??{width:"100%",height:300},children:m.jsx(r?R.Fragment:xC,{children:m.jsxs(hNe,{...r,children:[m.jsx(Xr,{formatter:Gt,contentStyle:TU,itemStyle:{color:"white"}}),m.jsx(po,{data:i,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"100%",innerRadius:a?"65%":"50%",animationBegin:0,children:i.map((l,c)=>m.jsx(Fa,{fill:l.color,stroke:s},`${l.name}-${c}`))}),a&&m.jsx(po,{data:o,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"55%",innerRadius:"20%",animationBegin:0,stroke:s,fill:Ty})]})})})}),m.jsx("div",{className:"col-sm-12 col-md-5",children:m.jsx(C4e,{chartData:i,showNumbers:n})})]})},DR=({title:e,...t})=>{const[n,r]=qt(!1);return m.jsx(PU,{title:m.jsxs(m.Fragment,{children:[e,m.jsx("div",{className:"float-end",children:m.jsx(ul,{checked:n,onChange:r,children:"Show numbers"})})]}),children:m.jsx(P4e,{...t,showNumbersInLegend:n})})},T4e=({visitsGroups:e})=>{const t=R.useMemo(()=>Object.entries(e),[e]);return t.length===0?null:m.jsx("ul",{className:"list-unstyled mb-0 mt-2 d-flex flex-wrap justify-content-center gap-3",children:t.map(([n,r],i)=>m.jsxs("li",{className:"d-inline",children:[m.jsx(mU,{color:kU(r)}),m.jsxs("strong",{children:[n," (",Gt(r.length),")"]})]},`${n}${i}`))})},j4e={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},A4e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},k4e={hourly:Ooe,daily:fp,weekly:Poe,monthly:xg},SP={hourly:e=>wg(e,"yyyy-MM-dd HH:00"),daily:e=>ja(e),weekly(e){const t=ja(ah(e)),n=ja(Aoe(e));return`${t} - ${n}`},monthly:e=>wg(e,"yyyy-MM")},N4e=e=>{var t;const n=Object.values(e).filter(a=>a.length>0);if(n.length===0)return"monthly";const r=new Date,i=n.map(a=>Ya(a[a.length-1].date)),o=r5(i);return((t=[[()=>fp(r,o)<=2,"hourly"],[()=>xg(r,o)<=1,"daily"],[()=>xg(r,o)<=6,"weekly"]].find(([a])=>a()))==null?void 0:t[1])??"monthly"},M4e=(e,t)=>Object.keys(t).reduce((n,r)=>(n[r]=XD(t[r],i=>SP[e](Ya(i.date))),n),{}),L4e=(e,t)=>t.reduce((n,r)=>{const i=SP[e](Ya(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),R4e=(e,t)=>{const n=Object.values(t).filter(d=>d.length>0).map(d=>[...d].reverse());if(n.length===0)return[];const r=k4e[e],i=SP[e],o=A4e[e],a=n.map(d=>Ya(d[0].date)),s=n.map(d=>Ya(d[d.length-1].date)),l=r5(s),c=boe(a),f=r(l,c)+1;return[i(c),...mP(f,d=>i(moe(c,o(d))))]},kU=e=>{if(e.color)return e.color;const t={main:th,highlighted:Qw,previous:Ty};return e.type?t[e.type]:th},FR=(e,t)=>R.useMemo(()=>Object.values(e).find(n=>n.type===t)??[],[e,t]),$4e=(e,t,n)=>{const r=FR(e,"main"),i=FR(e,"highlighted"),o=R.useMemo(()=>n?L4e(t,r):{},[n,t,r]),a=R.useCallback((s,{payload:l})=>{const c=o[l.date]??[];n==null||n(c===i?[]:c)},[o,i,n]);return n&&{cursor:"pointer",onClick:a}},NU=({visitsGroups:e,setSelectedVisits:t,dimensions:n,matchMedia:r})=>{const[i,o]=R.useState(N4e(e)),a=gP(767,r??window.matchMedia),s=R.useMemo(()=>{const d=M4e(i,e),p=Object.keys(d);return R4e(i,e).map(v=>({date:v,...p.reduce((g,y)=>(g[y]=d[y][v]??0,g),{})}))},[i,e]),l=$4e(e,i,t),c=n?R.Fragment:xC,f=R.useMemo(()=>n?{}:{width:"100%",height:a?300:400},[n,a]);return m.jsxs(vr,{children:[m.jsxs(Xc,{role:"heading","aria-level":4,children:["Visits over time",m.jsx("div",{className:"float-end",children:m.jsxs(lp,{children:[m.jsx(ju,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),m.jsx(Tu,{end:!0,children:Object.entries(j4e).map(([d,p])=>m.jsx(Ne,{active:i===d,onClick:()=>o(d),children:p},d))})]})})]}),m.jsxs(Zc,{children:[m.jsx(c,{...f,children:m.jsxs(dNe,{data:s,...n,children:[m.jsx(Yu,{dataKey:"date"}),m.jsx(Zu,{tickFormatter:Gt}),m.jsx(Xr,{formatter:Gt,...jU}),m.jsx(nP,{strokeOpacity:LE()?.1:.9}),Object.entries(e).map(([d,p])=>p.length>0&&m.jsx(Ku,{dataKey:d,type:"monotone",stroke:kU(p),strokeWidth:2,activeDot:p.type==="previous"?void 0:l,strokeDasharray:p.type==="previous"?"8 3":void 0},d))]})}),m.jsx(T4e,{visitsGroups:e})]})]})},I4e=({toggleClassName:e,ranges:t,value:n,setValue:r})=>m.jsxs(lp,{children:[m.jsx(ju,{caret:!0,color:"link",className:e,children:"Paginate"}),m.jsxs(Tu,{end:!0,children:[t.map(i=>m.jsxs(Ne,{active:i===n,onClick:()=>r(i),children:[m.jsx("b",{children:i})," items per page"]},i)),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{disabled:n===1/0,onClick:()=>r(1/0),children:m.jsx("i",{children:"Clear pagination"})})]})]}),BR=e=>e.startsWith("hidden_"),D4e=({stats:e,prevStats:t,highlightedStats:n,highlightedLabel:r,max:i,onClick:o,dimensions:a})=>{const s=R.useMemo(()=>Object.entries(e).map(([d,p])=>{const v=(n==null?void 0:n[d])??0,g=(t==null?void 0:t[d])??0,y=BR(d);return{name:d,amount:Math.max(p,g),nonHighlightedAmount:y?null:p-v,highlightedAmount:y?null:v,prevAmount:y?null:g}}),[e,t,n]),l=R.useMemo(()=>{const d=s.reduce((p,{name:v})=>p>v.length?p:v.length,0);return Math.min(150,d*7)},[s]),c=a?R.Fragment:xC,f=R.useMemo(()=>a?{}:{width:"100%",height:Math.max(300,s.length*(t?44:22))},[a,s.length,t]);return m.jsx(c,{...f,children:m.jsxs(pNe,{layout:"vertical",data:s,barCategoryGap:3,...a,children:[m.jsx(Yu,{type:"number",dataKey:"amount",tickFormatter:Gt,domain:i?[0,i]:void 0}),m.jsx(Zu,{type:"category",dataKey:"name",width:l,interval:0,style:{fontSize:".8rem"},tickFormatter:d=>BR(d)?"":d}),m.jsx(nP,{strokeOpacity:LE()?.05:.9}),m.jsx(Xr,{filterNull:!0,...jU,formatter:(d,p)=>[Gt(d),p==="highlightedAmount"?r:p==="prevAmount"?"Previous period":n?"Non-selected":"Visits"]}),m.jsx(Io,{dataKey:"nonHighlightedAmount",stackId:"main",cursor:"pointer",fill:th,onClick:({name:d})=>o==null?void 0:o(d),children:s.map(d=>m.jsx(Fa,{fill:Gre,stroke:th,strokeWidth:2},d.name))}),n&&m.jsx(Io,{dataKey:"highlightedAmount",stackId:"main",cursor:"pointer",fill:Qw,onClick:({name:d})=>o==null?void 0:o(d),children:s.map(d=>m.jsx(Fa,{fill:qre,stroke:Qw,strokeWidth:2},d.name))}),t&&m.jsx(Io,{dataKey:"prevAmount",fill:Ty,children:s.map(d=>m.jsx(Fa,{fill:E4e,stroke:Ty,strokeWidth:2},d.name))})]})})},F4e=e=>typeof e=="string"?e.toLowerCase():e,B4e=([e])=>e,U4e=([,e])=>e,Bm=({stats:e,prevStats:t,highlightedStats:n,title:r,sortingItems:i,extraHeaderContent:o,withPagination:a=!0,...s})=>{const[l,c]=R.useState({}),[f,d]=R.useState(1),[p,v]=R.useState(50),g=R.useCallback((A,D)=>{const N=Object.entries(A),I=l.field?hoe(N,([F,K])=>F4e(l.field===Object.keys(D)[0]?F:K)):N;return!l.dir||l.dir==="ASC"?I:[...I].reverse()},[l.dir,l.field]),y=R.useCallback(A=>{const D=A[f-1];if(f[`hidden_${I}`,0])]},[f]),x=R.useCallback(A=>m.jsx(OP,{currentPage:f,pagesCount:A,setCurrentPage:d}),[f]),_=R.useCallback((A,D,N,I)=>{const F=g(A,D),K=F.map(B4e),W=N&&Object.entries({...L3(K,K.map(()=>0)),...N}),X=I&&Object.entries({...L3(K,K.map(()=>0)),...I});if(F.length<=p)return{currentPageStats:Object.fromEntries(F),currentPageHighlightedStats:W&&Object.fromEntries(W),currentPagePrevStats:X&&Object.fromEntries(X)};const Q=jc(F,p),ne=W&&jc(W,p),Z=X&&jc(X,p);return{currentPageStats:Object.fromEntries(y(Q)),currentPageHighlightedStats:ne&&Object.fromEntries(y(ne)),currentPagePrevStats:Z&&Object.fromEntries(y(Z)),pagination:x(Q.length),max:DMe(Math.max(...F.map(U4e)))}},[y,g,p,x]),{currentPageStats:b,currentPagePrevStats:w,currentPageHighlightedStats:S,pagination:E,max:C}=R.useMemo(()=>_(e,i,n&&Object.keys(n).length>0?n:void 0,t&&Object.keys(t).length>0?t:void 0),[_,n,t,i,e]),T=R.useMemo(()=>Object.keys(b),[b]);return m.jsx(PU,{title:m.jsxs(m.Fragment,{children:[r,m.jsx("div",{className:"float-end",children:m.jsx(up,{isButton:!1,right:!0,items:i,order:l,onChange:(A,D)=>{c({field:A,dir:D}),d(1)}})}),a&&Object.keys(e).length>50&&m.jsx("div",{className:"float-end",children:m.jsx(I4e,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:p,setValue:A=>{v(A),d(1)}})}),o&&m.jsx("div",{className:"float-end",children:o(E?T:void 0)})]}),footer:E,children:m.jsx(D4e,{stats:b,prevStats:w,highlightedStats:S,max:C,...s})})},UR=(e,t)=>{if(!(!t||!(e in t)))return t[e]&&Ja(t[e])||""},MU=()=>{const e=vo(),t=Au(),{startDate:n,endDate:r,orphanVisitsType:i,excludeBots:o,loadPrevInterval:a,...s}=t,l=R.useMemo(()=>({dateRange:n!=null||r!=null?fB(n,r):void 0,visitsFilter:{orphanVisitsType:i,excludeBots:o!==void 0?o==="true":void 0},loadPrevInterval:a!==void 0?a==="true":void 0}),[r,o,a,i,n]),c=R.useCallback(f=>{const{dateRange:d,visitsFilter:p={},loadPrevInterval:v}=m0(l,f),{excludeBots:g,orphanVisitsType:y}=p,x={...s,startDate:UR("startDate",d),endDate:UR("endDate",d),excludeBots:g===void 0?void 0:UO(g),orphanVisitsType:y,loadPrevInterval:v===void 0?void 0:UO(v)},_=l0(x),b=_?`?${_}`:"";e(b,{replace:!0,relative:"route"})},[l,e,s]);return[l,c]},z4e=()=>m.jsx(kNe,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),V4e=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(({latLong:n})=>n)};const[{latLong:t}]=e;return{zoom:10,center:t}},LU=({toggle:e,isOpen:t,title:n,locations:r=[]})=>m.jsx(go,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:m.jsxs($i,{className:"map-modal__modal-body",children:[m.jsxs("h3",{className:"map-modal__modal-title",children:[n,m.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),m.jsxs(TNe,{...V4e(r),children:[m.jsx(z4e,{}),r.map(({cityName:i,latLong:o,count:a},s)=>m.jsx(jNe,{position:o,children:m.jsxs(ANe,{children:[m.jsx("b",{children:a})," visit",a>1?"s":""," from ",m.jsx("b",{children:i})]})},s))]})]})}),W4e=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=qt(),[a,s]=qt(),[l,c]=R.useState([]),f=ME(),d=R.useCallback(p=>{c(p?n.filter(p):n),i()},[n,i]);return m.jsxs(m.Fragment,{children:[!t&&m.jsx(Ke,{color:"link",className:"open-map-modal-btn__btn",id:f,onClick:()=>d(),"aria-label":"Show in map",children:m.jsx(je,{icon:gx})}),t&&m.jsxs(op,{isOpen:a,toggle:s,children:[m.jsx(ju,{color:"link",className:"open-map-modal-btn__btn",id:f,children:m.jsx(je,{icon:gx})}),m.jsxs(Tu,{end:!0,children:[m.jsx(Ne,{onClick:()=>d(),children:"Show all locations"}),m.jsx(Ne,{onClick:()=>d(({cityName:p})=>t.includes(p)),children:"Show locations in current page"})]})]}),m.jsx(br,{placement:"left",target:f,children:"Show in map"}),m.jsx(LU,{toggle:o,isOpen:r,title:e,locations:l})]})},RU=({onChange:e,selected:t={},className:n,isOrphanVisits:r=!1,withPrevInterval:i=!1,disabled:o})=>{const{orphanVisitsType:a,excludeBots:s=!1,loadPrevInterval:l=!1}=t,c=p=>({active:a===p,onClick:()=>e({...t,orphanVisitsType:p===a?void 0:p})}),f=R.useCallback(()=>e({...t,excludeBots:!s}),[s,e,t]),d=R.useCallback(()=>e({...t,loadPrevInterval:!l}),[l,e,t]);return m.jsxs(ta,{disabled:o,text:"More",dropdownClassName:n,end:!0,minWidth:250,children:[i&&m.jsxs(m.Fragment,{children:[m.jsx(Ne,{active:l,onClick:d,children:"Compare with previous period"}),m.jsx(Ne,{divider:!0,tag:"hr"})]}),m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Bots:"}),m.jsx(Ne,{active:s,onClick:f,children:"Exclude potential bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Orphan visits type:"}),m.jsx(Ne,{...c("base_url"),children:"Base URL"}),m.jsx(Ne,{...c("invalid_short_url"),children:"Invalid short URL"}),m.jsx(Ne,{...c("regular_404"),children:"Regular 404"})]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{disabled:t.excludeBots===void 0&&t.loadPrevInterval===void 0&&t.orphanVisitsType===void 0,onClick:()=>e({excludeBots:void 0,loadPrevInterval:void 0,orphanVisitsType:void 0}),children:m.jsx("i",{children:"Reset to defaults"})})]})},$U=({info:e})=>{const{loading:t,errorData:n,progress:r}=e;return m.jsxs(m.Fragment,{children:[t&&r===null&&m.jsx(Ho,{loading:!0}),t&&r!==null&&m.jsxs(Ho,{loading:!0,children:["This is going to take a while... :S",m.jsx(gD,{value:r,striped:r>=100,className:"mt-3"})]}),n&&m.jsx(er,{type:"error",children:m.jsx(mo,{errorData:n,fallbackMessage:"An error occurred while loading visits :("})})]})},hv=({children:e,showFallback:t})=>m.jsxs(m.Fragment,{children:[t&&m.jsx(Ho,{className:"mt-3",children:"There are no visits matching current filter"}),!t&&m.jsx(m.Fragment,{children:e})]}),H4e=({visitsDeletion:e,deleteVisits:t})=>{const{deleting:n}=e,[r,,i]=qt();return m.jsx(xt,{title:m.jsx("span",{className:"text-danger fw-bold",children:"Danger zone"}),children:m.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[m.jsxs("dl",{className:"m-0 me-3",children:[m.jsx("dt",{children:"Delete visits."}),m.jsxs("dd",{className:"m-0",children:["This will delete ",m.jsx("b",{children:"all"})," visits, not only the ones matching current filter."]})]}),!r&&m.jsx(Ke,{color:"danger",className:"indivisible",onClick:i,children:"Delete visits"}),r&&m.jsxs(Ke,{color:"danger",disabled:n,className:"indivisible",onClick:t,innerRef:o=>{o==null||o.focus()},children:[!n&&m.jsx(m.Fragment,{children:"Click again to confirm"}),n&&m.jsx(m.Fragment,{children:"Deleting..."})]})]})})},Um="Others",G4e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],q4e=e=>{if(!$s(e))return{browser:Um,os:Um};const{browser:{name:t},os:{name:n}}=INe.parse(e);return{os:n??Um,browser:t&&G4e.includes(t)?t:Um}},K4e=e=>{var t;return $s(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},IU=(e,t)=>e[t]!==void 0,zR=e=>typeof e=="number"?e:e?parseFloat(e):0,Y4e=(e,{os:t})=>{e[t]=(e[t]||0)+1},Z4e=(e,{browser:t})=>{e[t]=(e[t]||0)+1},X4e=(e,{referer:t})=>{e[t]=(e[t]||0)+1},DU=e=>(t,n)=>{const r=IU(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},Q4e=DU("country"),J4e=DU("city"),e$e=(e,t)=>{if(!IU(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[zR(r),zR(i)]};o.count+=1,e[n]=o},t$e=(e,t)=>{if(!tMe(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},qO=e=>e.reduce((t,n)=>(Y4e(t.os,n),Z4e(t.browsers,n),X4e(t.referrers,n),Q4e(t.countries,n),J4e(t.cities,n),e$e(t.citiesForMap,n),t$e(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),jy=e=>e.map(t=>{const{userAgent:n,date:r,referer:i,visitLocation:o,potentialBot:a}=t;return{date:r,potentialBot:a,...q4e(n),referer:K4e(i),country:(o==null?void 0:o.countryName)||"Unknown",city:(o==null?void 0:o.cityName)||"Unknown",latitude:o==null?void 0:o.latitude,longitude:o==null?void 0:o.longitude,visitedUrl:t.visitedUrl,type:pP(t)?t.type:void 0}}),n$e=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:jy,processStatsFromVisits:qO},Symbol.toStringTag,{value:"Module"})),Qf=20,r$e=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),i$e=(e,t)=>t.filter(n=>r$e(n,e)),o$e=(e,t)=>kD(t,e),a$e=(e,t,n)=>{const r=t?i$e(t,e):[...e],i=o$e(n,r),o=i.length;return{visitsGroups:jc(i,Qf),total:o}},Eo="visits-table__header-cell visits-table__sticky",s$e=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia})=>{var i;const o=gP(767,r),[a,s]=R.useState(void 0),l=R.useRef(a),[c,f]=R.useState({}),d=R.useMemo(()=>a$e(e,a,c),[e,a,c]),[p,v]=R.useState(1),g=p*Qf,y=g-Qf,x=R.useMemo(()=>{var S,E;return!!((E=(S=d.visitsGroups[p-1])==null?void 0:S[0])!=null&&E.visitedUrl)},[p,d.visitsGroups]),_=8+Number(x),b=S=>()=>f({field:S,dir:u0(S,c.field,c.dir)}),w=S=>m.jsx(Cd,{currentOrder:c,field:S,className:"visits-table__header-icon"});return R.useEffect(()=>{l.current!==a&&(v(1),n([])),l.current=a},[a,n]),m.jsx("div",{className:"table-responsive-md",children:m.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[m.jsxs("thead",{className:"visits-table__header",children:[m.jsxs("tr",{children:[m.jsxs("th",{className:`${Eo} text-center`,onClick:()=>n(t.length0})})]}),m.jsxs("th",{className:`${Eo} text-center`,onClick:b("potentialBot"),children:[m.jsx("span",{className:"sr-only",children:"Is bot"}),m.jsx(je,{icon:nA}),w("potentialBot")]}),m.jsxs("th",{className:Eo,onClick:b("date"),children:["Date",w("date")]}),m.jsxs("th",{className:Eo,onClick:b("country"),children:["Country",w("country")]}),m.jsxs("th",{className:Eo,onClick:b("city"),children:["City",w("city")]}),m.jsxs("th",{className:Eo,onClick:b("browser"),children:["Browser",w("browser")]}),m.jsxs("th",{className:Eo,onClick:b("os"),children:["OS",w("os")]}),m.jsxs("th",{className:Eo,onClick:b("referer"),children:["Referrer",w("referer")]}),x&&m.jsxs("th",{className:Eo,onClick:b("visitedUrl"),children:["Visited URL",w("visitedUrl")]})]}),m.jsx("tr",{children:m.jsx("td",{colSpan:_,className:"p-0",children:m.jsx(cp,{noBorder:!0,large:!1,onChange:s})})})]}),m.jsxs("tbody",{children:[d.total===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:_,className:"text-center",children:"There are no visits matching current filter"})}),(i=d.visitsGroups[p-1])==null?void 0:i.map((S,E)=>{const C=t.includes(S);return m.jsxs("tr",{style:{cursor:"pointer"},className:Ce({"table-active":C}),onClick:()=>n(C?t.filter(T=>T!==S):[...t,S]),children:[m.jsx("td",{className:"text-center",children:C&&m.jsx(je,{icon:Gd,className:"text-primary"})}),m.jsx("td",{className:"text-center",children:S.potentialBot&&m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:nA,id:`botIcon${E}`}),m.jsx(br,{placement:"right",target:`botIcon${E}`,children:"Potentially a visit from a bot or crawler"})]})}),m.jsx("td",{children:m.jsx(Cy,{date:S.date})}),m.jsx("td",{children:S.country}),m.jsx("td",{children:S.city}),m.jsx("td",{children:S.browser}),m.jsx("td",{children:S.os}),m.jsx("td",{children:S.referer}),S.visitedUrl&&m.jsx("td",{children:S.visitedUrl})]},E)})]}),d.total>Qf&&m.jsx("tfoot",{children:m.jsx("tr",{children:m.jsx("td",{colSpan:_,className:"visits-table__footer-cell visits-table__sticky",children:m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(OP,{pagesCount:Math.ceil(d.total/Qf),currentPage:p,setCurrentPage:v,centered:o})}),m.jsx("div",{className:Ce("col-md-6",{"d-flex align-items-center flex-row-reverse":!o,"text-center mt-3":o}),children:m.jsxs("div",{children:["Visits ",m.jsx("b",{children:Gt(y+1)})," to"," ",m.jsx("b",{children:Gt(Math.min(g,d.total))})," of"," ",m.jsx("b",{children:Gt(d.total)})]})})]})})})})]})})},ma={byTime:{title:"By time",subPath:"by-time",icon:Yq},byContext:{title:"By context",subPath:"by-context",icon:tE},byLocation:{title:"By location",subPath:"by-location",icon:gx},list:{title:"List",subPath:"list",icon:q6},options:{title:"Options",subPath:"options",icon:Z6,shouldRender:({deletion:e})=>!!e}};Object.freeze(ma);const y_=({display:e})=>e&&m.jsx("div",{className:"mt-3 mx-auto w-75",children:m.jsx(xt,{children:m.jsxs("div",{className:"d-flex gap-2",children:[m.jsx(je,{icon:KK,className:"mt-1"}),m.jsx("i",{children:"Could not calculate previous period because selected one does not have a strictly defined start date."})]})})});let zm;const jp=e=>{const{children:t,visitsInfo:n,getVisits:r,cancelGetVisits:i,deletion:o,exportCsv:a,isOrphanVisits:s=!1}=e,{visits:l,prevVisits:c,loading:f,errorData:d,fallbackInterval:p}=n,[{dateRange:v,visitsFilter:g,loadPrevInterval:y},x]=MU(),_=_r("visits"),[b,w]=R.useState(),S=R.useCallback(({startDate:j,endDate:k},U)=>{x({dateRange:{startDate:j??void 0,endDate:k??void 0}}),w(U)},[x]),E=R.useRef(v??p??(_==null?void 0:_.defaultInterval)??"last30Days"),[C,T]=R.useState([]),[A,D]=R.useState(),N=R.useRef(!0),{search:I}=gr(),F=R.useCallback(j=>j?`${j}${I}`:I,[I]),K=R.useMemo(()=>jy(l),[l]),W=R.useMemo(()=>c&&jy(c),[c]),{os:X,browsers:Q,referrers:ne,countries:Z,cities:z,citiesForMap:B,visitedUrls:H}=R.useMemo(()=>qO(K),[K]),ee=R.useMemo(()=>qO(W??[]),[W]),q=R.useMemo(()=>Object.fromEntries([["Visits",Object.assign(K,{type:"main"})],W&&["Previous period",Object.assign(W,{type:"previous"})],C.length>0&&[A??"Selected",Object.assign(C,{type:"highlighted"})]].filter(Boolean)),[A,C,W,K]),te=R.useMemo(()=>({...g,excludeBots:g.excludeBots??(_==null?void 0:_.excludeBots),loadPrevInterval:y??(_==null?void 0:_.loadPrevInterval)}),[y,g,_==null?void 0:_.excludeBots,_==null?void 0:_.loadPrevInterval]),ie=R.useMemo(()=>Object.values(B),[B]),ae=R.useCallback(j=>{zm=void 0,T(j)},[]),fe=R.useCallback((j,k)=>{const U=`${j}_${k}`;zm===U?(T([]),D(void 0),zm=void 0):(T(K.filter(J=>J[j]===k)),D(k),zm=U)},[K]);return R.useEffect(()=>i,[i]),R.useEffect(()=>{const j=v??pB(E.current),{loadPrevInterval:k,...U}=te,J={doIntervalFallback:N.current,loadPrevInterval:k};r({dateRange:j,filter:U},J),ae([]),N.current=!1},[v,g,r,te,ae]),R.useEffect(()=>{p&&E.current===((_==null?void 0:_.defaultInterval)??"last30Days")&&(E.current=p)},[p,_==null?void 0:_.defaultInterval]),m.jsxs(m.Fragment,{children:[t,m.jsx("section",{className:"mt-3",children:m.jsxs("div",{className:"row flex-md-row-reverse",children:[m.jsx("div",{className:"col-lg-7 col-xl-6",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(_P,{disabled:f,dateRangeOrInterval:b??v??E.current,defaultText:"All visits",onDatesChange:S})}),m.jsx(RU,{disabled:f,className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:s,withPrevInterval:!0,selected:te,onChange:({loadPrevInterval:j,...k})=>x({visitsFilter:k,loadPrevInterval:j})})]})}),l.length>0&&m.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:m.jsxs("div",{className:"d-flex",children:[m.jsx(KB,{className:"btn-md-block",amount:K.length,onClick:()=>a(K)}),m.jsxs(Ke,{outline:!0,disabled:C.length===0,className:"btn-md-block ms-2",onClick:()=>ae([]),children:["Clear selection ",C.length>0&&m.jsxs(m.Fragment,{children:["(",Gt(C.length),")"]})]})]})})]})}),m.jsxs("section",{className:"mt-3",children:[m.jsx($U,{info:n}),!f&&!d&&m.jsxs(m.Fragment,{children:[m.jsx(AD,{fill:!0,children:Object.values(ma).map(({title:j,icon:k,subPath:U,shouldRender:J},Y)=>!J||J(e)?m.jsxs(pd,{to:F(U),replace:!0,children:[m.jsx(je,{icon:k}),m.jsx("span",{className:"ms-2 d-none d-lg-inline",children:j})]},Y):void 0).filter(Boolean)}),m.jsx(Kn,{children:m.jsxs(Xy,{children:[m.jsx(ot,{path:ma.byTime.subPath,element:m.jsxs(hv,{showFallback:l.length===0,children:[m.jsx("div",{className:"col-12 mt-3","data-testid":"line-chart-container",children:m.jsx(NU,{visitsGroups:q,setSelectedVisits:ae})}),m.jsx(y_,{display:!!te.loadPrevInterval&&!c})]})}),m.jsx(ot,{path:ma.byContext.subPath,element:m.jsxs(hv,{showFallback:l.length===0,children:[m.jsx("div",{className:Ce("mt-3 col-lg-6",{"col-xl-4":!s}),children:m.jsx(DR,{title:"Operating systems",stats:X,prevStats:ee.os})}),m.jsx("div",{className:Ce("mt-3 col-lg-6",{"col-xl-4":!s}),children:m.jsx(DR,{title:"Browsers",stats:Q,prevStats:ee.browsers})}),m.jsx("div",{className:Ce("mt-3",{"col-xl-4":!s,"col-lg-6":s}),children:m.jsx(Bm,{title:"Referrers",withPagination:!1,stats:ne,prevStats:ee.referrers,highlightedStats:$m(C,"referer"),highlightedLabel:A,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:j=>fe("referer",j)})}),s&&m.jsx("div",{className:"mt-3 col-lg-6",children:m.jsx(Bm,{title:"Visited URLs",stats:H,prevStats:ee.visitedUrls,highlightedStats:$m(C,"visitedUrl"),highlightedLabel:A,sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:j=>fe("visitedUrl",j)})}),m.jsx("div",{className:"col-12",children:m.jsx(y_,{display:!!te.loadPrevInterval&&!c})})]})}),m.jsx(ot,{path:ma.byLocation.subPath,element:m.jsxs(hv,{showFallback:l.length===0,children:[m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(Bm,{title:"Countries",stats:Z,prevStats:ee.countries,highlightedStats:$m(C,"country"),highlightedLabel:A,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:j=>fe("country",j)})}),m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(Bm,{title:"Cities",stats:z,prevStats:ee.cities,highlightedStats:$m(C,"city"),highlightedLabel:A,extraHeaderContent:j=>ie.length>0&&m.jsx(W4e,{modalTitle:"Cities",locations:ie,activeCities:j}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:j=>fe("city",j)})}),m.jsx("div",{className:"col-12",children:m.jsx(y_,{display:!!te.loadPrevInterval&&!c})})]})}),m.jsx(ot,{path:ma.list.subPath,element:m.jsx("div",{className:"col-12",children:m.jsx(s$e,{visits:K,selectedVisits:C,setSelectedVisits:ae})})}),o&&m.jsx(ot,{path:ma.options.subPath,element:m.jsx("div",{className:"col-12 mt-3",children:m.jsx(H4e,{...o})})}),m.jsx(ot,{path:"*",element:m.jsx(qS,{replace:!0,to:F(ma.byTime.subPath)})})]})})]})]})]})},FU=Bi(({getDomainVisits:e,domainVisits:t,cancelGetDomainVisits:n})=>{const{ReportExporter:r}=Rt(FU),{domain:i=""}=Cu(),[o,a=o]=i.split("_"),s=R.useCallback((c,f)=>e({domain:a,options:f,params:c}),[a,e]),l=R.useCallback(c=>r.exportVisits(`domain_${o}_visits.csv`,c),[o,r]);return m.jsx(jp,{getVisits:s,cancelGetVisits:n,visitsInfo:t,exportCsv:l,children:m.jsx(Tp,{visits:t.visits,title:`"${o}" visits`})})},()=>[nr.visits]),l$e=$t(FU,["ReportExporter"]),BU=Bi(({getNonOrphanVisits:e,nonOrphanVisits:t,cancelGetNonOrphanVisits:n})=>{const{ReportExporter:r}=Rt(BU),i=R.useCallback(a=>r.exportVisits("non_orphan_visits.csv",a),[r]),o=R.useCallback((a,s)=>e({options:s,params:a}),[e]);return m.jsx(jp,{getVisits:o,cancelGetVisits:n,visitsInfo:t,exportCsv:i,children:m.jsx(Tp,{title:"Non-orphan visits",visits:t.visits})})},()=>[nr.visits]),c$e=$t(BU,["ReportExporter"]),UU=Bi(({getOrphanVisits:e,orphanVisits:t,cancelGetOrphanVisits:n,deleteOrphanVisits:r,orphanVisitsDeletion:i})=>{const o=es("orphanVisitsDeletion"),{ReportExporter:a}=Rt(UU),s=R.useCallback(f=>a.exportVisits("orphan_visits.csv",f),[a]),l=R.useCallback((f,d)=>{var p;return e({options:d,params:f,orphanVisitsType:(p=f.filter)==null?void 0:p.orphanVisitsType})},[e]),c=R.useMemo(()=>o?{deleteVisits:r,visitsDeletion:i}:void 0,[r,i,o]);return m.jsx(jp,{getVisits:l,cancelGetVisits:n,visitsInfo:t,exportCsv:s,deletion:c,isOrphanVisits:!0,children:m.jsx(Tp,{title:"Orphan visits",visits:t.visits})})},()=>[nr.orphanVisits]),u$e=$t(UU,["ReportExporter"]),zU="shlink/orphanVisits",f$e={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},d$e=e=>Ep({typePrefix:`${zU}/getNonOrphanVisits`,createLoaders:({options:t})=>{const n=e(),{doIntervalFallback:r=!1}=t,i=async a=>n.getNonOrphanVisits(a),o=Sp(r,a=>n.getNonOrphanVisits(a));return{visitsLoader:i,lastVisitLoader:o}},shouldCancel:t=>t().orphanVisits.cancelLoad}),h$e=e=>Cp({name:zU,initialState:f$e,asyncThunkCreator:e,filterCreatedVisits:({params:t},n)=>{const{startDate:r,endDate:i}=(t==null?void 0:t.dateRange)??{};return n.filter(({visit:o})=>Op(o.date,r,i))}}),VU="shlink/orphanVisits",p$e={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},m$e=(e,t)=>!t||t===e.type,v$e=({data:e,...t},n)=>{const r=e.filter(i=>pP(i)&&m$e(i,n));return{...t,data:r}},g$e=e=>Ep({typePrefix:`${VU}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=async s=>r.getOrphanVisits({...s,type:t}).then(l=>v$e(l,t)),a=Sp(i,s=>r.getOrphanVisits(s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().orphanVisits.cancelLoad}),y$e=(e,t)=>Cp({name:VU,initialState:p$e,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,r=>({...r,visits:[]}))},filterCreatedVisits:({params:n},r)=>{const{startDate:i,endDate:o}=(n==null?void 0:n.dateRange)??{};return r.filter(({visit:a,shortUrl:s})=>!s&&Op(a.date,i,o))}}),WU="shlink/orphanVisitsDeletion",VR={deletedVisits:0,deleting:!1,error:!1},b$e=e=>fn(`${WU}/deleteOrphanVisits`,()=>e().deleteOrphanVisits()),_$e=e=>Qt({name:WU,initialState:VR,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{deletedVisits:i}=r;return{...VR,deletedVisits:i}})}}),HU="shlink/shortUrlVisits",x$e={visits:[],shortCode:"",loading:!1,errorData:null,cancelLoad:!1,progress:null},w$e=e=>Ep({typePrefix:`${HU}/getShortUrlVisits`,createLoaders:({shortCode:t,domain:n,options:r})=>{const i=e(),{doIntervalFallback:o=!1}=r,a=l=>i.getShortUrlVisits(t,{...l,domain:n}),s=Sp(o,l=>i.getShortUrlVisits(t,{...l,domain:n}));return{visitsLoader:a,lastVisitLoader:s}},shouldCancel:t=>t().shortUrlVisits.cancelLoad}),O$e=(e,t)=>Cp({name:HU,initialState:x$e,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,(r,{payload:i})=>r.shortCode===i.shortCode&&r.domain===i.domain?{...r,visits:[]}:r)},filterCreatedVisits:({shortCode:n,domain:r,params:i},o)=>vB(o,{shortCode:n,domain:r},i==null?void 0:i.dateRange)}),GU="shlink/shortUrlVisitsDeletion",WR={shortCode:"",deletedVisits:0,deleting:!1,error:!1},S$e=e=>fn(`${GU}/deleteShortUrlVisits`,async({shortCode:t,domain:n})=>({...await e().deleteShortUrlVisits(t,n),shortCode:t,domain:n})),E$e=e=>Qt({name:GU,initialState:WR,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{shortCode:i,domain:o,deletedVisits:a}=r;return{...WR,shortCode:i,domain:o,deletedVisits:a}})}}),qU="shlink/tagVisits",C$e={visits:[],tag:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},P$e=e=>Ep({typePrefix:`${qU}/getTagVisits`,createLoaders:({tag:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=s=>r.getTagVisits(t,s),a=Sp(i,async s=>r.getTagVisits(t,s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().tagVisits.cancelLoad}),T$e=e=>Cp({name:qU,initialState:C$e,asyncThunkCreator:e,filterCreatedVisits:({tag:t,params:n},r)=>yB(r,t,n==null?void 0:n.dateRange)}),KU="shlink/visitsOverview",Vm={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},HR=e=>e.filter(({visit:t})=>t.potentialBot).length,j$e=e=>fn(`${KU}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n=0,orphanVisits:r,orphanVisitsCount:i=0})=>({nonOrphanVisits:{total:(t==null?void 0:t.total)??n,nonBots:t==null?void 0:t.nonBots,bots:t==null?void 0:t.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),A$e=e=>Qt({name:KU,initialState:Vm,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...Vm,loading:!0})),t.addCase(e.rejected,()=>({...Vm,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Vm,...r})),t.addCase(Xu,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=nMe(o.createdVisits),l=a.length,c=HR(a),f=l-c,d=s.length,p=HR(s),v=d-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+d,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+v}}})}}),k$e=({shortUrl:e,loading:t,shortUrlVisits:n})=>{const{visits:r}=n,i=(e==null?void 0:e.shortUrl)??"",o=(e==null?void 0:e.longUrl)??"",a=e==null?void 0:e.title;return m.jsxs(Tp,{title:m.jsxs(m.Fragment,{children:["Visits for ",m.jsx(mr,{href:i})]}),visits:r,shortUrl:e,children:[m.jsx("hr",{}),m.jsxs("div",{children:["Created: ",e?m.jsxs("span",{children:[m.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:m.jsx(Cy,{date:e.dateCreated,relative:!0})}),m.jsx(br,{placement:"bottom",target:"created",children:m.jsx(Cy,{date:e.dateCreated})})]}):m.jsx("small",{children:"Loading..."})]}),m.jsxs("div",{className:"long-url-container",children:[`${a?"Title":"Long URL"}: `,t&&m.jsx("small",{children:"Loading..."}),!t&&m.jsx(mr,{href:o,children:a??o})]})]})},YU=Bi(({shortUrlVisits:e,shortUrlVisitsDeletion:t,shortUrlsDetails:n,getShortUrlVisits:r,getShortUrlsDetails:i,deleteShortUrlVisits:o,cancelGetShortUrlVisits:a})=>{const s=es("shortUrlVisitsDeletion"),{ReportExporter:l}=Rt(YU),c=bP(),f=R.useMemo(()=>{var g;return(g=n.shortUrls)==null?void 0:g.get(c)},[c,n.shortUrls]),d=R.useCallback((g,y)=>r({...c,options:y,params:g}),[r,c]),p=R.useCallback(g=>l.exportVisits(`short-url_${f==null?void 0:f.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,g),[l,f==null?void 0:f.shortUrl]),v=R.useMemo(()=>s?{deleteVisits:()=>o(c),visitsDeletion:t}:void 0,[o,c,t,s]);return R.useEffect(()=>{i([c])},[c,i]),m.jsx(jp,{getVisits:d,cancelGetVisits:a,visitsInfo:e,exportCsv:p,deletion:v,children:m.jsx(k$e,{shortUrl:f,loading:n.loading,shortUrlVisits:e})})},e=>e.shortCode?[nr.shortUrlVisits(uP(e.shortCode))]:[]),N$e=$t(YU,["ReportExporter"]),M$e=({tagVisits:e,colorGenerator:t})=>{const{visits:n,tag:r}=e;return m.jsx(Tp,{title:m.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[m.jsx("span",{className:"me-2",children:"Visits for"}),m.jsx(hb,{text:r,colorGenerator:t})]}),visits:n})},ZU=Bi(({getTagVisits:e,tagVisits:t,cancelGetTagVisits:n})=>{const{ColorGenerator:r,ReportExporter:i}=Rt(ZU),{tag:o=""}=Cu(),a=R.useCallback((l,c)=>e({tag:o,params:l,options:c}),[e,o]),s=R.useCallback(l=>i.exportVisits(`tag_${o}_visits.csv`,l),[i,o]);return m.jsx(jp,{getVisits:a,cancelGetVisits:n,visitsInfo:t,exportCsv:s,children:m.jsx(M$e,{tagVisits:t,colorGenerator:r})})},()=>[nr.visits]),L$e=$t(ZU,["ColorGenerator","ReportExporter"]),EP=({title:e,colors:t,getVisitsForComparison:n,visitsComparisonInfo:r,cancelGetVisitsComparison:i})=>{const{loading:o,visitsGroups:a}=r,s=_r("visits"),l=R.useMemo(()=>Object.keys(a).reduce((b,w,S)=>(b[w]=Object.assign(jy(a[w]),{color:(t==null?void 0:t[w])??AU(S)}),b),{}),[t,a]),c=R.useMemo(()=>Object.values(a).every(b=>b.length===0),[a]),[{dateRange:f,visitsFilter:d},p]=MU(),[v,g]=R.useState(),y=R.useCallback(({startDate:b,endDate:w},S)=>{p({dateRange:{startDate:b??void 0,endDate:w??void 0}}),g(S)},[p]),x=R.useRef(f??(s==null?void 0:s.defaultInterval)??"last30Days"),_=R.useMemo(()=>({...d,excludeBots:d.excludeBots??(s==null?void 0:s.excludeBots)}),[d,s==null?void 0:s.excludeBots]);return R.useEffect(()=>{const b=f??pB(x.current);return n({params:{dateRange:b,filter:_}}),i},[i,f,n,_]),m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"mb-3",children:m.jsxs(xt,{bodyClassName:"d-flex",children:[m.jsx(db,{}),m.jsx("h3",{className:"mb-0 flex-grow-1 text-center",children:e})]})}),m.jsx("div",{className:"col-lg-7 col-xl-6 offset-lg-5 offset-xl-6 mb-3",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(_P,{disabled:o,defaultText:"All visits",dateRangeOrInterval:v??x.current,onDatesChange:y})}),m.jsx(RU,{disabled:o,className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:_,onChange:({orphanVisitsType:b,excludeBots:w})=>p({visitsFilter:{orphanVisitsType:b,excludeBots:w}})})]})}),m.jsx($U,{info:r}),!o&&m.jsx(hv,{showFallback:c,children:m.jsx(NU,{visitsGroups:l})})]})},R$e=Bi(({getDomainVisitsForComparison:e,domainVisitsComparison:t,cancelGetDomainVisitsComparison:n})=>{const r=vP("domains"),i=R.useCallback(o=>e({...o,domains:r}),[r,e]);return m.jsx(EP,{title:`Comparing "${r.join('", "')}"`,getVisitsForComparison:i,visitsComparisonInfo:t,cancelGetVisitsComparison:n})},()=>[nr.visits]),$$e=({visitsLoaders:e,shouldCancel:t,progressChanged:n})=>{const r=Object.keys(e),i=Math.max(1,Math.round(4/r.length)),o=Object.fromEntries(r.map(l=>[l,0])),a=(l,c)=>{o[l]=c;const f=Object.values(o),d=f.reduce((p,v)=>p+v,0);n(d/f.length)},s=Object.entries(e).map(([l,c])=>[l,bB({visitsLoader:c,batchSize:i,shouldCancel:t,progressChanged:f=>a(l,f)})]);return async l=>{const c=await Promise.all(s.map(async([f,d])=>{const p=await d(l);return[f,p]}));return Object.fromEntries(c)}},CP=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=un(`${e}/progressChanged`),i=fn(e,async(o,{getState:a,dispatch:s})=>{const l=t(o),c=await $$e({visitsLoaders:l,shouldCancel:()=>n(a),progressChanged:f=>s(r(f))})(BO(o.params));return{...o,visitsGroups:c}});return Object.assign(i,{progressChanged:r})},PP=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisitsForGroup:r})=>{const{pending:i,rejected:o,fulfilled:a,progressChanged:s}=t,{reducer:l,actions:c}=Qt({name:e,initialState:n,reducers:{cancelGetVisits:d=>({...d,cancelLoad:!0})},extraReducers:d=>{d.addCase(i,()=>({...n,loading:!0})),d.addCase(o,(p,{error:v})=>({...n,errorData:zr(v)??null})),d.addCase(a,(p,{payload:v})=>({...p,...v,loading:!1,progress:null,errorData:null})),d.addCase(s,(p,{payload:v})=>({...p,progress:v})),d.addCase(Xu,(p,{payload:v})=>{const{visitsGroups:g,...y}=p,x=Object.keys(g).map(b=>{const w=r({...y,groupKey:b},v.createdVisits).map(({visit:S})=>S);return[b,[...w,...g[b]]]}),_=Object.fromEntries(x);return{...y,visitsGroups:_}})}}),{cancelGetVisits:f}=c;return{reducer:l,cancelGetVisits:f}},XU="shlink/domainVisitsComparison",I$e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},D$e=e=>CP({typePrefix:`${XU}/getDomainVisitsForComparison`,createLoaders:({domains:t})=>{const n=e(),r=t.map(i=>[i,o=>n.getDomainVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:t=>t().domainVisitsComparison.cancelLoad}),F$e=e=>PP({name:XU,initialState:I$e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>gB(r,t,n==null?void 0:n.dateRange)}),QU="shlink/shortUrlVisitsComparison",B$e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},U$e=e=>CP({typePrefix:`${QU}/getShortUrlVisitsForComparison`,createLoaders:({shortUrls:t})=>{const n=e(),r=t.map(i=>[fP(i),o=>n.getShortUrlVisits(i.shortCode,{...o,domain:i.domain})]);return Object.fromEntries(r)},shouldCancel:t=>t().shortUrlVisitsComparison.cancelLoad}),z$e=e=>PP({name:QU,initialState:B$e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>vB(r,sB(t),n==null?void 0:n.dateRange)}),JU="shlink/tagVisitsComparison",V$e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},W$e=e=>CP({typePrefix:`${JU}/getTagVisitsForComparison`,createLoaders:({tags:t})=>{const n=e(),r=t.map(i=>[i,o=>n.getTagVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:t=>t().tagVisitsComparison.cancelLoad}),H$e=e=>PP({name:JU,initialState:V$e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>yB(r,t,n==null?void 0:n.dateRange)}),G$e=Bi(({getShortUrlVisitsForComparison:e,shortUrlVisitsComparison:t,cancelGetShortUrlVisitsComparison:n,shortUrlsDetails:r,getShortUrlsDetails:i})=>{const o=vP("short-urls"),a=R.useMemo(()=>o.map(sB),[o]),s=R.useCallback(f=>e({...f,shortUrls:a}),[e,a]),l=R.useMemo(()=>{var f;return[...((f=r.shortUrls)==null?void 0:f.values())??[]]},[r.shortUrls]),c=R.useMemo(()=>{const{visitsGroups:f,loading:d,...p}=t,v=l.reduce((g,y)=>(g[y.shortUrl]=f[fP(y)]??[],g),{});return{...p,visitsGroups:v,loading:d||r.loading}},[t,r.loading,l]);return R.useEffect(()=>{a.length>0&&i(a)},[i,a]),m.jsx(EP,{title:m.jsx("span",{"data-testid":"title",children:r.loading?"Loading...":`Comparing ${l.length} short URLs`}),getVisitsForComparison:s,visitsComparisonInfo:c,cancelGetVisitsComparison:n})},()=>[nr.visits]),e9=Bi(({getTagVisitsForComparison:e,tagVisitsComparison:t,cancelGetTagVisitsComparison:n})=>{const{ColorGenerator:r}=Rt(e9),i=vP("tags"),o=R.useCallback(l=>e({...l,tags:i}),[e,i]),{visitsGroups:a}=t,s=R.useMemo(()=>Object.keys(a).reduce((l,c)=>(l[c]=r.getColorForKey(c),l),{}),[r,a]);return m.jsx(EP,{title:m.jsxs(m.Fragment,{children:["Comparing ",i.map(l=>m.jsx(hb,{colorGenerator:r,text:l},l))]}),getVisitsForComparison:o,visitsComparisonInfo:t,cancelGetVisitsComparison:n,colors:s})},()=>[nr.visits]),q$e=$t(e9,["ColorGenerator"]),K$e=(e,t)=>{const n=(r,i)=>t([...r,"mercureInfo"],[...i,"createNewVisits","loadMercureInfo"]);e.serviceFactory("MapModal",()=>LU),e.factory("ShortUrlVisits",N$e),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlVisitsDeletion","shortUrlsDetails","mercureInfo"],["getShortUrlVisits","deleteShortUrlVisits","getShortUrlsDetails","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.factory("TagVisits",L$e),e.decorator("TagVisits",n(["tagVisits"],["getTagVisits","cancelGetTagVisits"])),e.factory("TagVisitsComparison",q$e),e.decorator("TagVisitsComparison",n(["tagVisitsComparison"],["getTagVisitsForComparison","cancelGetTagVisitsForComparison"])),e.serviceFactory("DomainVisitsComparison",()=>R$e),e.decorator("DomainVisitsComparison",n(["domainVisitsComparison"],["getDomainVisitsForComparison","cancelGetDomainVisitsForComparison"])),e.serviceFactory("ShortUrlVisitsComparison",()=>G$e),e.decorator("ShortUrlVisitsComparison",n(["shortUrlVisitsComparison","shortUrlsDetails"],["getShortUrlVisitsForComparison","cancelGetShortUrlVisitsForComparison","getShortUrlsDetails"])),e.factory("DomainVisits",l$e),e.decorator("DomainVisits",n(["domainVisits"],["getDomainVisits","cancelGetDomainVisits"])),e.factory("OrphanVisits",u$e),e.decorator("OrphanVisits",n(["orphanVisits","orphanVisitsDeletion"],["getOrphanVisits","cancelGetOrphanVisits","deleteOrphanVisits"])),e.factory("NonOrphanVisits",c$e),e.decorator("NonOrphanVisits",n(["nonOrphanVisits"],["getNonOrphanVisits","cancelGetNonOrphanVisits"])),e.serviceFactory("VisitsParser",()=>n$e),e.serviceFactory("getShortUrlVisits",w$e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",r=>r.cancelGetVisits,"shortUrlVisitsReducerCreator"),e.serviceFactory("getShortUrlVisitsForComparison",U$e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisitsForComparison",r=>r.cancelGetVisits,"shortUrlVisitsComparisonReducerCreator"),e.serviceFactory("deleteShortUrlVisits",S$e,"apiClientFactory"),e.serviceFactory("getTagVisits",P$e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",r=>r.cancelGetVisits,"tagVisitsReducerCreator"),e.serviceFactory("getTagVisitsForComparison",W$e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisitsForComparison",r=>r.cancelGetVisits,"tagVisitsComparisonReducerCreator"),e.serviceFactory("getDomainVisits",fMe,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",r=>r.cancelGetVisits,"domainVisitsReducerCreator"),e.serviceFactory("getDomainVisitsForComparison",D$e,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisitsForComparison",r=>r.cancelGetVisits,"domainVisitsComparisonReducerCreator"),e.serviceFactory("getOrphanVisits",g$e,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",r=>r.cancelGetVisits,"orphanVisitsReducerCreator"),e.serviceFactory("deleteOrphanVisits",b$e,"apiClientFactory"),e.serviceFactory("getNonOrphanVisits",d$e,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",r=>r.cancelGetVisits,"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>Xu),e.serviceFactory("loadVisitsOverview",j$e,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",A$e,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",r=>r.reducer,"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",dMe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",r=>r.reducer,"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",h$e,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",r=>r.reducer,"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",y$e,"getOrphanVisits","deleteOrphanVisits"),e.serviceFactory("orphanVisitsReducer",r=>r.reducer,"orphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsDeletionReducerCreator",_$e,"deleteOrphanVisits"),e.serviceFactory("orphanVisitsDeletionReducer",r=>r.reducer,"orphanVisitsDeletionReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",O$e,"getShortUrlVisits","deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",r=>r.reducer,"shortUrlVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsDeletionReducerCreator",E$e,"deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsDeletionReducer",r=>r.reducer,"shortUrlVisitsDeletionReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",T$e,"getTagVisits"),e.serviceFactory("tagVisitsReducer",r=>r.reducer,"tagVisitsReducerCreator"),e.serviceFactory("tagVisitsComparisonReducerCreator",H$e,"getTagVisitsForComparison"),e.serviceFactory("tagVisitsComparisonReducer",r=>r.reducer,"tagVisitsComparisonReducerCreator"),e.serviceFactory("domainVisitsComparisonReducerCreator",F$e,"getDomainVisitsForComparison"),e.serviceFactory("domainVisitsComparisonReducer",r=>r.reducer,"domainVisitsComparisonReducerCreator"),e.serviceFactory("shortUrlVisitsComparisonReducerCreator",z$e,"getShortUrlVisitsForComparison"),e.serviceFactory("shortUrlVisitsComparisonReducer",r=>r.reducer,"shortUrlVisitsComparisonReducerCreator")},Df=({children:e,to:t,className:n,...r})=>m.jsx(k6,{className:({isActive:i})=>Ce("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Y$e=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=gr(),r=Ce("aside-menu",{"aside-menu--hidden":!t}),i=o=>`${e}${o}`;return m.jsx("aside",{className:r,children:m.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[m.jsxs(Df,{to:i("/overview"),children:[m.jsx(je,{fixedWidth:!0,icon:CK}),m.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),m.jsxs(Df,{to:i("/list-short-urls/1"),className:Ce({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[m.jsx(je,{fixedWidth:!0,icon:q6}),m.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),m.jsxs(Df,{to:i("/create-short-url"),children:[m.jsx(je,{fixedWidth:!0,icon:NK,flip:"horizontal"}),m.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),m.jsxs(Df,{to:i("/manage-tags"),children:[m.jsx(je,{fixedWidth:!0,icon:K6}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),m.jsxs(Df,{to:i("/manage-domains"),children:[m.jsx(je,{fixedWidth:!0,icon:iK}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})},t9=({createNotFound:e})=>{const{TagsList:t,ShortUrlsList:n,CreateShortUrl:r,ShortUrlVisits:i,TagVisits:o,DomainVisits:a,OrphanVisits:s,NonOrphanVisits:l,Overview:c,EditShortUrl:f,ManageDomains:d,TagVisitsComparison:p,DomainVisitsComparison:v,ShortUrlVisitsComparison:g,ShortUrlRedirectRules:y}=Rt(t9),x=gr(),_=ds(),[b,w,S,E]=qt();R.useEffect(()=>E(),[x,E]);const C=Ce("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":b}),T=vMe(S,E),A=es("shortUrlRedirectRules");return m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:Jq,className:C,onClick:w}),m.jsx("div",{...T,className:"shlink-layout__swipeable",children:m.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[m.jsx(Y$e,{routePrefix:_,showOnMobile:b}),m.jsx("div",{className:"shlink-layout__container",onPointerDown:()=>E(),children:m.jsx("div",{className:"container-xl",children:m.jsxs(Xy,{children:[m.jsx(ot,{index:!0,element:m.jsx(qS,{replace:!0,to:"overview"})}),m.jsx(ot,{path:"/overview",element:m.jsx(c,{})}),m.jsx(ot,{path:"/list-short-urls/:page",element:m.jsx(n,{})}),m.jsx(ot,{path:"/create-short-url",element:m.jsx(r,{})}),m.jsx(ot,{path:"/short-code/:shortCode/visits/*",element:m.jsx(i,{})}),m.jsx(ot,{path:"/short-code/:shortCode/edit",element:m.jsx(f,{})}),A&&m.jsx(ot,{path:"/short-code/:shortCode/redirect-rules",element:m.jsx(y,{})}),m.jsx(ot,{path:"/short-urls/compare-visits",element:m.jsx(g,{})}),m.jsx(ot,{path:"/tag/:tag/visits/*",element:m.jsx(o,{})}),m.jsx(ot,{path:"/tags/compare-visits",element:m.jsx(p,{})}),m.jsx(ot,{path:"/domain/:domain/visits/*",element:m.jsx(a,{})}),m.jsx(ot,{path:"/orphan-visits/*",element:m.jsx(s,{})}),m.jsx(ot,{path:"/non-orphan-visits/*",element:m.jsx(l,{})}),m.jsx(ot,{path:"/manage-tags",element:m.jsx(t,{})}),m.jsx(ot,{path:"/manage-domains",element:m.jsx(d,{})}),m.jsx(ot,{path:"/domains/compare-visits",element:m.jsx(v,{})}),e&&m.jsx(ot,{path:"*",element:e("/list-short-urls/1")})]})})})]})})]})},Z$e=$t(t9,["TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains","TagVisitsComparison","DomainVisitsComparison","ShortUrlVisitsComparison","ShortUrlRedirectRules"]),X$e=!0,Q$e=e=>qD({devTools:!X$e,reducer:IE({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlsDetails:e.shortUrlsDetailsReducer,shortUrlVisits:e.shortUrlVisitsReducer,shortUrlVisitsDeletion:e.shortUrlVisitsDeletionReducer,shortUrlVisitsComparison:e.shortUrlVisitsComparisonReducer,tagVisits:e.tagVisitsReducer,tagVisitsComparison:e.tagVisitsComparisonReducer,domainVisits:e.domainVisitsReducer,domainVisitsComparison:e.domainVisitsComparisonReducer,orphanVisits:e.orphanVisitsReducer,orphanVisitsDeletion:e.orphanVisitsDeletionReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,shortUrlRedirectRules:e.shortUrlRedirectRulesReducer,shortUrlRedirectRulesSaving:e.setShortUrlRedirectRulesReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),J$e=e=>{e.factory("Main",Z$e),e.factory("store",Q$e)},Ui=new z6,{container:e6e}=Ui,t6e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),n6e=(e,t)=>(...n)=>e[t](...n),r6e=(e,t)=>({...e,[t]:n6e(e6e,t)}),Qu=(e,t=[])=>y6(e?t6e(e):null,t.reduce(r6e,{}));J$e(Ui);DRe(Ui,Qu);s4e(Ui,Qu);K$e(Ui,Qu);jMe(Ui);CMe(Ui,Qu);BMe(Ui,Qu);O4e(Ui);YLe(Ui,Qu);let GR;const i6e=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=mRe(t),l=R.useRef(),[c,f]=R.useState(),d=xl(),p=R.useMemo(()=>d?R.Fragment:A6,[d]);return R.useEffect(()=>{GR=n,e.value("apiClientFactory",()=>GR),a&&e.value("TagColorsStorage",a);const{container:v}=e,{Main:g,store:y,loadMercureInfo:x,listTags:_}=v;l.current=m.jsx(g,{createNotFound:o}),f(y),y.dispatch(x(r)),y.dispatch(_())},[n,o,r,a]),c?m.jsx(b6,{store:c,children:m.jsx(d5,{value:r??{},children:m.jsx(pRe,{value:s,children:m.jsx(WNe,{value:i,children:m.jsx(p,{children:l.current})})})})}):m.jsx(m.Fragment,{})},o6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",a6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",s6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",l6e=()=>{delete dR.Icon.Default.prototype._getIconUrl,dR.Icon.Default.mergeOptions({iconRetinaUrl:a6e,iconUrl:o6e,shadowUrl:s6e})};l6e();const c6e=i6e(Ui);function Ay(e){return t=>{const{resetSelectedServer:n}=t;return R.useEffect(()=>{n()},[n]),m.jsx(e,{...t})}}let u6e=class extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){const{console:n=globalThis.console}=this.props;n.error(t)}render(){const{hasError:t}=this.state,{location:n=globalThis.location}=this.props;if(t)return m.jsx("div",{className:"home",children:m.jsxs(xt,{className:"p-4",children:[m.jsx("h1",{children:"Oops! This is awkward :S"}),m.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),m.jsx("br",{}),m.jsx(Ke,{outline:!0,color:"primary",onClick:()=>n.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};const f6e=({id:e,name:t})=>m.jsxs(OD,{tag:St,to:`/server/${e}`,className:"servers-list__server-item",children:[t,m.jsx(je,{icon:DK,className:"servers-list__server-item-icon"})]}),n9=({servers:e,children:t,embedded:n=!1})=>m.jsxs(m.Fragment,{children:[t&&m.jsx("div",{"data-testid":"title",className:"mb-0 fs-5 fw-normal lh-sm",children:t}),e.length>0&&m.jsx(_D,{"data-testid":"list",tag:"div",className:Ce("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>m.jsx(f6e,{id:r,name:i},r))})]}),r9=({color:e=th,className:t})=>m.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:m.jsxs("g",{fill:e,children:[m.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),m.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),m.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),m.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})}),d6e=({servers:e})=>{const t=vo(),n=Object.values(e),r=n.length>0;return R.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[n,t]),m.jsx("div",{className:"home",children:m.jsx(vr,{className:"home__main-card",children:m.jsxs(Kn,{className:"g-0",children:[m.jsx("div",{className:"col-md-5 d-none d-md-block",children:m.jsx("div",{className:"home__logo-wrapper",children:m.jsx("div",{className:"home__logo",children:m.jsx(r9,{})})})}),m.jsxs("div",{className:"col-md-7 home__servers-container",children:[m.jsx("div",{className:"home__title-wrapper",children:m.jsx("h1",{className:"home__title",children:"Welcome!"})}),m.jsx(n9,{embedded:!0,servers:n,children:!r&&m.jsxs("div",{className:"p-4 text-center",children:[m.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),m.jsx("p",{children:m.jsxs(St,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[m.jsx(je,{icon:ep})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]})}),m.jsx("p",{className:"mb-0 mt-5",children:m.jsx(mr,{href:"https://shlink.io/documentation",children:m.jsxs("small",{children:[m.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",m.jsx(je,{icon:vK})]})})})]})})]})]})})})},i9=()=>{const{ServersDropdown:e}=Ii(i9),[t,n,,r]=qt(),i=gr(),{pathname:o}=i;R.useEffect(r,[i,r]);const a="/settings",s=Ce("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return m.jsxs(BI,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[m.jsxs(UI,{tag:St,to:"/",children:[m.jsx(r9,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),m.jsx(zI,{onClick:n,children:m.jsx(je,{icon:RK,className:s})}),m.jsx(qee,{navbar:!0,isOpen:t,children:m.jsxs(vE,{navbar:!0,className:"ms-auto",children:[m.jsx(gE,{children:m.jsxs(HI,{tag:St,to:a,active:o.startsWith(a),children:[m.jsx(je,{icon:UK}),"  Settings"]})}),m.jsx(e,{})]})})]})},h6e=Di(i9,["ServersDropdown"]),p6e=({children:e})=>{const t=gr();return R.useEffect(()=>{scrollTo(0,0)},[t]),m.jsx(m.Fragment,{children:e})},o9=QD(e=>e,e=>{try{return l2(e,e,"=")}catch{return!1}}),a9=e=>o9(e)?`v${e}`:e,s9=(e,t="latest")=>o9(e)?e:t,m6e="%_VERSION_%",v6e=e=>a9(s9(e)),qR=({project:e,version:t})=>m.jsx(mr,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:m.jsx("b",{children:t})}),g6e=({selectedServer:e,clientVersion:t=m6e})=>{const n=v6e(t);return m.jsxs("small",{className:"text-muted",children:[QS(e)&&m.jsxs(m.Fragment,{children:["Server: ",m.jsx(qR,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",m.jsx(qR,{project:"shlink-web-client",version:n})]})},y6e=({selectedServer:e})=>m.jsx("div",{className:Ce("text-center",{"shlink-versions-container--with-sidebar":QS(e)}),children:m.jsx(g6e,{selectedServer:e})}),Ju=({children:e})=>m.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function l9(e){const t=n=>{const{ServerError:r}=Ii(t),i=Cu(),{selectServer:o,selectedServer:a}=n;return R.useEffect(()=>{i.serverId&&o(i.serverId)},[i.serverId,o]),a?Uq(a)?m.jsx(r,{}):m.jsx(e,{...n}):m.jsx(Ju,{children:m.jsx(Ho,{loading:!0})})};return t}const c9=l9(R.memo(({selectedServer:e,settings:t})=>{const{buildShlinkApiClient:n,TagColorsStorage:r,ShlinkWebComponent:i,ServerError:o}=Ii(c9);if(!QS(e))return m.jsx(o,{});const a=`/server/${e.id}`;return m.jsx(i,{serverVersion:e.version,apiClient:n(e),settings:t,routesPrefix:a,tagColorsStorage:r,createNotFound:s=>m.jsx(ND,{to:`${a}${s}`,children:"List short URLs"})})})),b6e=Di(c9,["buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"]),_6e=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",foe,"fetch"),e.serviceFactory("ScrollToTop",()=>p6e),e.factory("MainHeader",h6e),e.serviceFactory("Home",()=>d6e),e.decorator("Home",Ay),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>c6e),e.factory("ShlinkWebComponentContainer",b6e),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>y6e),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",()=>u6e)},u9=()=>{const e=vo();return R.useCallback(()=>e(-1),[e])},f9=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return m.jsxs(go,{centered:!0,isOpen:e,children:[m.jsxs(yo,{children:["Duplicated server",i&&"s"]}),m.jsxs($i,{children:[m.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),m.jsx("ul",{children:t.map(({url:o,apiKey:a},s)=>i?m.jsxs("li",{children:[m.jsx("b",{children:o})," - ",m.jsx("b",{children:a})]},s):m.jsxs(R.Fragment,{children:[m.jsxs("li",{children:["URL: ",m.jsx("b",{children:o})]}),m.jsxs("li",{children:["API key: ",m.jsx("b",{children:a})]})]},s))}),m.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),m.jsxs(as,{children:[m.jsx(Ke,{color:"link",onClick:n,children:i?"Ignore duplicates":"Discard"}),m.jsx(Ke,{color:"primary",onClick:r,children:"Save anyway"})]})]})},x6e=e=>t=>{t.preventDefault(),e()},d9=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=R.useState(""),[a,s]=R.useState(""),[l,c]=R.useState(""),f=x6e(()=>e({name:i,url:a,apiKey:l}));return R.useEffect(()=>{t&&o(t.name),t&&s(t.url),t&&c(t.apiKey)},[t]),m.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[m.jsxs(xt,{className:"mb-3",title:r,children:[m.jsx(sv,{value:i,onChange:o,children:"Name"}),m.jsx(sv,{type:"url",value:a,onChange:s,children:"URL"}),m.jsx(sv,{value:l,onChange:c,children:"API key"})]}),m.jsx("div",{className:"text-end",children:n})]})},KR=4e3,YR=({type:e})=>m.jsx("div",{className:"mt-3",children:m.jsxs(er,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),h9=({servers:e,createServers:t})=>{const{ImportServersBtn:n,useTimeoutToggle:r}=Ii(h9),i=vo(),o=u9(),a=!!Object.keys(e).length,[s,l]=r(!1,KR),[c,f]=r(!1,KR),[d,p]=qt(),[v,g]=R.useState(),y=R.useCallback(x=>{const _=NE();t([{...x,id:_}]),i(`/server/${_}`)},[t,i]);return R.useEffect(()=>{if(!v)return;Object.values(e).some(({url:_,apiKey:b})=>(v==null?void 0:v.url)===_&&(v==null?void 0:v.apiKey)===b)?p():y(v)},[y,v,e,p]),m.jsxs(Ju,{children:[m.jsxs(d9,{title:m.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:g,children:[!a&&m.jsx(n,{tooltipPlacement:"top",onImport:l,onImportError:f}),a&&m.jsx(Ke,{outline:!0,onClick:o,children:"Cancel"}),m.jsx(Ke,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),s&&m.jsx(YR,{type:"success"}),c&&m.jsx(YR,{type:"error"}),m.jsx(f9,{isOpen:d,duplicatedServers:v?[v]:[],onDiscard:o,onSave:()=>v&&y(v)})]})},w6e=Di(h9,["ImportServersBtn","useTimeoutToggle"]),p9=({server:e,className:t,children:n,textClassName:r})=>{const{DeleteServerModal:i}=Ii(p9),[o,,a,s]=qt();return m.jsxs(m.Fragment,{children:[m.jsxs("button",{type:"button",className:Ce(t,"p-0 bg-transparent border-0"),onClick:a,children:[!n&&m.jsx(je,{fixedWidth:!0,icon:JS}),m.jsx("span",{className:r,children:n??"Remove this server"})]}),m.jsx(i,{server:e,isOpen:o,toggle:s})]})},O6e=Di(p9,["DeleteServerModal"]),S6e=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=vo(),a=R.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return m.jsxs(go,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[m.jsx(yo,{toggle:t,className:"text-danger",children:"Remove server"}),m.jsxs($i,{children:[m.jsxs("p",{children:["Are you sure you want to remove ",m.jsx("b",{children:e?e.name:""}),"?"]}),m.jsx("p",{children:m.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),m.jsxs(as,{children:[m.jsx(Ke,{color:"link",onClick:t,children:"Cancel"}),m.jsx(Ke,{color:"danger",onClick:s,children:"Delete"})]})]})},E6e=l9(({editServer:e,selectedServer:t,selectServer:n})=>{const r=u9(),{reconnect:i}=Au();if(!ld(t))return null;const o=a=>{e(t.id,a),i==="true"&&n(t.id),r()};return m.jsx(Ju,{children:m.jsxs(d9,{title:m.jsxs("h5",{className:"mb-0",children:['Edit "',t.name,'"']}),initialValues:t,onSubmit:o,children:[m.jsx(Ke,{outline:!0,className:"me-2",onClick:r,children:"Cancel"}),m.jsx(Ke,{outline:!0,color:"primary",children:"Save"})]})})}),C6e=Di(E6e,["ServerError"]),ZR=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),m9=({createServers:e,servers:t,children:n,onImport:r=()=>{},onImportError:i=()=>{},tooltipPlacement:o="bottom",className:a=""})=>{const{ServersImporter:s}=Ii(m9),l=ea(),[c,f]=R.useState([]),[d,,p,v]=qt(),g=R.useRef([]),y=R.useCallback(w=>{e(w),r()},[e,r]),x=R.useCallback(async({target:w})=>{var S;return s.importServersFromFile((S=w.files)==null?void 0:S[0]).then(E=>{g.current=E;const C=Object.values(t),T=E.filter(D=>ZR(C,D)),A=!!T.length;A?f(T):y(E),A&&p()}).then(()=>{w.value=null}).catch(i)},[y,i,t,s,p]),_=R.useCallback(()=>{y(g.current),v()},[y,v,g]),b=R.useCallback(()=>{y(g.current.filter(w=>!ZR(c,w))),v()},[y,c,v]);return m.jsxs(m.Fragment,{children:[m.jsxs(Ke,{outline:!0,id:"importBtn",className:a,onClick:()=>{var w;return(w=l.current)==null?void 0:w.click()},children:[m.jsx(je,{icon:sK,fixedWidth:!0})," ",n??"Import from file"]}),m.jsxs(br,{placement:o,target:"importBtn",children:["You can create servers by importing a CSV file with ",m.jsx("b",{children:"name"}),", ",m.jsx("b",{children:"apiKey"})," and ",m.jsx("b",{children:"url"})," columns."]}),m.jsx("input",{type:"file",accept:".csv",className:"d-none",ref:l,onChange:x,"aria-hidden":!0}),m.jsx(f9,{isOpen:d,duplicatedServers:c,onDiscard:b,onSave:_})]})},P6e=Di(m9,["ServersImporter"]),v9=({servers:e,selectedServer:t})=>{const{DeleteServerButton:n}=Ii(v9);return m.jsx(Ju,{children:m.jsxs("div",{className:"server-error__container flex-column",children:[m.jsxs(Ho,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!ld(t)&&"Could not find this Shlink server.",ld(t)&&m.jsxs(m.Fragment,{children:[m.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),m.jsx(n9,{servers:Object.values(e),children:m.jsxs("p",{className:"mb-md-3",children:["These are the Shlink servers currently configured. Choose one of them or ",m.jsx(St,{to:"/server/create",children:"add a new one"}),"."]})}),ld(t)&&m.jsx("div",{className:"container mt-3 mt-md-5",children:m.jsxs("p",{className:"fs-5 fw-normal lh-sm",children:["Alternatively, if you think you may have miss-configured this server, you can ",m.jsx(n,{server:t,className:"server-error__delete-btn",children:"remove it"})," or ",m.jsx(St,{to:`/server/${t.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})})},T6e=Di(v9,["DeleteServerButton"]),j6e=4e3,g9=({servers:e})=>{const{ServersExporter:t,ImportServersBtn:n,useTimeoutToggle:r,ManageServersRow:i}=Ii(g9),o=Object.values(e),[a,s]=R.useState(o),l=p=>s(o.filter(({name:v,url:g})=>`${v} ${g}`.toLowerCase().match(p.toLowerCase()))),c=a.some(({autoConnect:p})=>!!p),[f,d]=r(!1,j6e);return R.useEffect(()=>{s(Object.values(e))},[e]),m.jsxs(Ju,{children:[m.jsx(cp,{className:"mb-3",onChange:l}),m.jsxs(Kn,{className:"mb-3",children:[m.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[m.jsx(n,{className:"flex-fill",onImportError:d,children:"Import servers"}),o.length>0&&m.jsxs(Ke,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>t.exportServers(),children:[m.jsx(je,{icon:Y6,fixedWidth:!0})," Export servers"]})]}),m.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:m.jsxs(Ke,{outline:!0,color:"primary",className:"flex-fill",tag:St,to:"/server/create",children:[m.jsx(je,{icon:ep,fixedWidth:!0})," Add a server"]})})]}),m.jsx(xt,{children:m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsx("thead",{className:"responsive-table__header",children:m.jsxs("tr",{children:[c&&m.jsx("th",{style:{width:"50px"},children:m.jsx("span",{className:"sr-only",children:"Auto-connect"})}),m.jsx("th",{children:"Name"}),m.jsx("th",{children:"Base URL"}),m.jsx("th",{children:m.jsx("span",{className:"sr-only",children:"Options"})})]})}),m.jsxs("tbody",{children:[!a.length&&m.jsx("tr",{className:"text-center",children:m.jsx("td",{colSpan:4,children:"No servers found."})}),a.map(p=>m.jsx(i,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&m.jsx("div",{className:"mt-3",children:m.jsx(er,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},A6e=Di(g9,["ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"]),y9=({server:e,hasAutoConnect:t})=>{const{ManageServersRowDropdown:n}=Ii(y9);return m.jsxs("tr",{className:"responsive-table__row",children:[t&&m.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:e.autoConnect&&m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:Gd,className:"text-primary",id:"autoConnectIcon"}),m.jsx(br,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:m.jsx(St,{to:`/server/${e.id}`,children:e.name})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:e.url}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(n,{server:e})})]})},k6e=Di(y9,["ManageServersRowDropdown"]),b9=({server:e,setAutoConnect:t})=>{const{DeleteServerModal:n}=Ii(b9),[r,,i,o]=qt(),a=`/server/${e.id}`,{autoConnect:s}=e,l=s?oK:_se;return m.jsxs(c0,{minWidth:s?210:170,children:[m.jsxs(Ne,{tag:St,to:a,children:[m.jsx(je,{icon:rK,fixedWidth:!0})," Connect"]}),m.jsxs(Ne,{tag:St,to:`${a}/edit`,children:[m.jsx(je,{icon:eE,fixedWidth:!0})," Edit server"]}),m.jsxs(Ne,{onClick:()=>t(e,!s),children:[m.jsx(je,{icon:l,fixedWidth:!0})," ",s?"Do not a":"A","uto-connect"]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{className:"dropdown-item--danger",onClick:i,children:[m.jsx(je,{icon:JS,fixedWidth:!0})," Remove server"]}),m.jsx(n,{redirectHome:!1,server:e,isOpen:r,toggle:o})]})},N6e=Di(b9,["DeleteServerModal"]),_9=(e,t)=>ZD(e,t,{serializeError:n=>n}),M6e={},L6e=e=>"id"in e?e:{...e,id:NE()},R6e=e=>e.reduce((t,n)=>({...t,[n.id]:n}),{}),{actions:$6e,reducer:I6e}=Qt({name:"shlink/servers",initialState:M6e,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?{...e,[n]:{...e[n],...r}}:e}},deleteServer:(e,{payload:t})=>(delete e[t.id],e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Object.fromEntries(Object.entries(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:R6e(e.map(L6e))}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:D6e,deleteServer:F6e,setAutoConnect:B6e,createServers:x9}=$6e,U6e=I6e,z6e=e=>Array.isArray(e)?e.filter(V6):[],V6e=e=>_9("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.jsonRequest(`${Vv.homepage}/servers.json`),i=z6e(r);n(x9(i))}),TP="shlink/selectedServer",W6e="1.0.0",H6e="999.999.999",G6e="latest",q6e=e=>s9(e===G6e?H6e:e,W6e),K6e=QD(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:q6e(n),printableVersion:a9(n)}))),XR=null,jP=un(`${TP}/resetSelectedServer`),Y6e=e=>_9(`${TP}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(jP());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const a=e(o),{version:s,printableVersion:l}=await K6e(o,()=>a.health());return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),Z6e=e=>Qt({name:TP,initialState:XR,reducers:{},extraReducers:t=>{t.addCase(jP,()=>XR),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),X6e=({servers:e,selectedServer:t})=>{const n=Object.values(e),r=()=>n.length===0?m.jsxs(Ne,{tag:St,to:"/server/create",children:[m.jsx(je,{icon:ep})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]}):m.jsxs(m.Fragment,{children:[n.map(({name:i,id:o})=>m.jsx(Ne,{tag:St,to:`/server/${o}`,active:zq(t)===o,children:i},o)),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{tag:St,to:"/manage-servers",children:[m.jsx(je,{icon:eA})," ",m.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return m.jsxs(lp,{nav:!0,inNavbar:!0,children:[m.jsxs(ju,{nav:!0,caret:!0,children:[m.jsx(je,{icon:eA})," ",m.jsx("span",{className:"ms-1",children:"Servers"})]}),m.jsx(Tu,{end:!0,style:{right:0},children:r()})]})},Q6e=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},J6e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);Q6e(e,i,n)},eIe="shlink-servers.csv";class tIe{constructor(t,n,r){Il(this,"exportServers",async()=>{const t=Object.values(this.storage.get("servers")??{}).map(Vq);try{const n=this.jsonToCsv(t);J6e(this.window,n,eIe)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const nIe=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",rIe=e=>Array.isArray(e)&&e.every(nIe);class iIe{constructor(t){this.csvToJson=t}async importServersFromFile(t){if(!t)throw new Error("No file provided");const n=await t.text(),r=await this.csvToJson(n);if(!rIe(r))throw new Error("Provided file does not have the right format.");return r}}const oIe=(e,t)=>{e.factory("ManageServers",A6e),e.decorator("ManageServers",Ay),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.factory("ManageServersRow",k6e),e.factory("ManageServersRowDropdown",N6e),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.factory("CreateServer",w6e),e.decorator("CreateServer",Ay),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.factory("EditServer",C6e),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>X6e),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>S6e),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.factory("DeleteServerButton",O6e),e.factory("ImportServersBtn",P6e),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.factory("ServerError",T6e),e.decorator("ServerError",t(["servers","selectedServer"])),e.service("ServersImporter",iIe,"csvToJson"),e.service("ServersExporter",tIe,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",Y6e,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>x9),e.serviceFactory("deleteServer",()=>F6e),e.serviceFactory("editServer",()=>D6e),e.serviceFactory("setAutoConnect",()=>B6e),e.serviceFactory("fetchServers",V6e,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>jP),e.serviceFactory("selectedServerReducerCreator",Z6e,"selectServer"),e.serviceFactory("selectedServerReducer",n=>n.reducer,"selectedServerReducerCreator")},w9={field:"dateCreated",dir:"DESC"},aIe={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:RE()},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:w9}},{reducer:sIe,actions:lIe}=Qt({name:"shlink/settings",initialState:aIe,reducers:{setSettings:(e,{payload:t})=>m0(e,t)}}),{setSettings:cIe}=lIe,uIe=sIe,fIe=({settings:e,setSettings:t})=>m.jsx(Ju,{children:m.jsx(gse,{settings:e,updateSettings:t,defaultShortUrlsListOrdering:w9})}),dIe=(e,t)=>{e.serviceFactory("Settings",()=>fIe),e.decorator("Settings",Ay),e.decorator("Settings",t(["settings"],["setSettings","resetSelectedServer"])),e.serviceFactory("setSettings",()=>cIe)};var hIe=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,(function(s){return r[s]}).bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(g){var y=[];for(var x in g)y.push(x);return y};e.exports=d;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(d,a);for(var l=i(s.prototype),c=0;c{t&&(t.longTouch=!0,n.longTouchClass&&e.e.cancelable&&yl(t.draggedNodes.map(r=>r.el),n.longTouchClass),e.e.preventDefault())},n.longTouchTimeout||200))}function gLe(e){!Ge||!("touchedNode"in Ge)||CLe(e,Ge)}function yLe(e,t){t.longTouchClass&&Sy(e.draggedNodes.map(n=>n.el),t==null?void 0:t.longTouchClass),t.touchDraggingClass&&yl([e.touchedNode],t.touchDraggingClass),t.touchDropZoneClass&&yl(e.draggedNodes.map(n=>n.el),t.touchDropZoneClass)}function bLe(e){if(!e||!e.scrollParent)return;const{x:t,y:n,width:r,height:i}=e.scrollParent.getBoundingClientRect(),{x:o,y:a,scrollOutside:s}=e.lastParent.data.config.scrollBehavior;return{state:e,xThresh:o,yThresh:a,scrollOutside:s,scrollParent:e.scrollParent,x:t,y:n,width:r,height:i}}function _Le(e){const t=bLe(Ge);if(t)switch(e){case"down":return SLe(t.state,t);case"up":return OLe(t.state,t);case"right":return xLe(t.state,t);case"left":return wLe(t.state,t)}}function xLe(e,t){const n=t.scrollParent.clientWidth+t.x-e.coordinates.x;if(!(!t.scrollOutside&&n<0)&&n<(1-t.xThresh)*t.scrollParent.clientWidth&&!(t.scrollParent.scrollLeft+t.scrollParent.clientWidth>=t.scrollParent.scrollWidth))return e}function wLe(e,t){const n=t.scrollParent.clientWidth+t.x-e.coordinates.x;if(!(!t.scrollOutside&&n>t.scrollParent.clientWidth)&&n>t.xThresh*t.scrollParent.clientWidth&&t.scrollParent.scrollLeft!==0)return e}function OLe(e,t){const n=t.scrollParent.clientHeight+t.y-e.coordinates.y;if(!(!t.scrollOutside&&n>t.scrollParent.clientHeight)&&n>t.yThresh*t.scrollParent.clientHeight&&t.scrollParent.scrollTop!==0)return e}function SLe(e,t){const n=t.scrollParent.clientHeight+t.y-e.coordinates.y;if(!(!t.scrollOutside&&n<0)&&n<(1-t.yThresh)*t.scrollParent.clientHeight&&!(t.scrollParent.scrollTop+t.scrollParent.clientHeight>=t.scrollParent.scrollHeight))return e}function ELe(e,t){t.touchMoving=!0,t.touchedNode.style.display=t.touchedNodeDisplay||"";const{x:n,y:r}=Cl(e.e);t.coordinates.y=r,t.coordinates.x=n;const i=t.touchStartLeft??0,o=t.touchStartTop??0;t.touchedNode.style.left=`${n-i}px`,t.touchedNode.style.top=`${r-o}px`,yLe(t,e.targetData.parent.data.config)}function CLe(e,t){if(e.targetData.parent.data.config.longTouch&&!t.longTouch){clearTimeout(t.longTouchTimeout);return}e.e.cancelable&&e.e.preventDefault(),ELe(e,t),cb();const n=qMe(e);if(!n)return;const r={e:e.e,targetData:n};"node"in n?n.node.el.dispatchEvent(new CustomEvent("touchOverNode",{detail:r})):n.parent.el.dispatchEvent(new CustomEvent("touchOverParent",{detail:r}))}function cb(){for(const e of Object.keys(SR)){const[t,n]=SR[e];UB(e,t,n)}}function UB(e,t,n){const r=_Le(e);r&&(r.scrollParent.scrollBy(t,n),setTimeout(()=>{UB(e,t,n)},"touchedNode"in r?10:100))}function PLe(e){if(!Ge)return;const{x:t,y:n}=Cl(e.e);Ge.coordinates.y=n,Ge.coordinates.x=t,cb(),kLe(e,Ge)}function TLe(e){if(!Ge)return;const{x:t,y:n}=Cl(e.e);Ge.coordinates.y=n,Ge.coordinates.x=t,cb(),ub(e,Ge)}function jLe(e){Ge&&ub(e.detail,Ge)}function ALe(e,t){if(e.targetData.parent.el===t.lastParent.el)return!1;const n=e.targetData.parent.data.config;if(n.dropZone===!1)return!1;const r=t.initialParent.data.config;return n.accepts?n.accepts(e.targetData.parent,t.initialParent,t.lastParent,t):!(!n.group||n.group!==r.group)}function kLe(e,t){var n;e.e.preventDefault(),e.e.stopPropagation(),e.targetData.parent.el===((n=t.lastParent)==null?void 0:n.el)?zB(e,t):ub(e,t)}function NLe(e,t,n,r){var i;if(t.remapJustFinished)return t.remapJustFinished=!1,t.lastTargetValue=e.targetData.node.data.value,!1;if(t.lastTargetValue===e.targetData.node.data.value||t.draggedNodes.map(p=>p.el).includes(e.targetData.node.el)||t.preventEnter||t.swappedNodeValue===e.targetData.node.data.value||e.targetData.parent.el!==((i=t.lastParent)==null?void 0:i.el)||e.targetData.parent.data.config.sortable===!1)return!1;const o=e.targetData.node.el.getBoundingClientRect(),a=t.draggedNode.el.getBoundingClientRect(),s=o.y-a.y,l=o.x-a.x;let c;const f=t.draggedNode.data.index>e.targetData.node.data.index?[e.targetData.node.data.index,t.draggedNode.data.index]:[t.draggedNode.data.index,e.targetData.node.data.index];t.targetIndex=e.targetData.node.data.index,t.affectedNodes=e.targetData.parent.data.enabledNodes.filter(p=>f[0]<=p.data.index&&p.data.index<=f[1]&&p.el!==t.draggedNode.el),Math.abs(s)>Math.abs(l)?c=s>0?"above":"below":c=l>0?"left":"right";const d=t.lastParent.data.config.threshold;switch(c){case"left":if(n>o.x+o.width*d.horizontal)return t.incomingDirection="left",!0;break;case"right":if(no.y+o.height*d.vertical)return t.incomingDirection="above",!0;break;case"below":if(r{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r})}}function MLe(e,t){const n=RB(e),r=VO(e.lastParent.el,e.lastParent.data).filter(s=>!n.includes(s)),i=VO(t.targetData.parent.el,t.targetData.parent.data),o=e.initialParent.el===t.targetData.parent.el&&t.targetData.parent.data.config.sortable===!1;let a;"node"in t.targetData?(o?a=e.initialIndex:t.targetData.parent.data.config.sortable===!1?a=t.targetData.parent.data.enabledNodes.length:a=t.targetData.node.data.index,i.splice(a,0,...n)):(a=o?e.initialIndex:t.targetData.parent.data.enabledNodes.length,i.splice(a,0,...n)),WO(e.lastParent.el,e.lastParent.data,r),WO(t.targetData.parent.el,t.targetData.parent.data,i)}function ub(e,t){ALe(e,t)&&(e.targetData.parent.data.config.performTransfer(t,e),t.lastParent=e.targetData.parent)}function LLe(e){function t(n){const r=Ti.get(n);if(r)return{parent:{el:n,data:r}}}return n=>{const r=t(n.currentTarget);if(r)return e({e:n,targetData:r})}}function RLe(e){if(e instanceof HTMLElement)return e;if("current"in e&&e.current instanceof HTMLElement)return e.current;console.warn("Invalid parent element",e)}function $Le(e,t){const n=RLe(e);n&&t(n)}var Ey=new WeakMap;function ILe(e){const t=Ey.get(e);return t?t[0]:(console.warn("No values found for parent element"),[])}function DLe(e,t){const n=Ey.get(t);n&&n[1](e),Ey.set(t,[e,n[1]])}function FLe(e,t){return n=>{Ey.set(n,t),XMe({parent:n,getValues:ILe,setValues:DLe,config:e})}}function ER(e){jB&&(Array.isArray(e)||(e=[e]),e.forEach(t=>{const{parent:n,state:r,...i}=t;$Le(n,FLe(i,r))}))}function BLe(e,t={}){const n=R.useRef(null),[r,i]=R.useState(e);function o(a={}){ER({parent:n,state:[r,i],...a})}return R.useEffect(()=>{ER({parent:n,state:[r,i],...t})},[r]),R.useEffect(()=>()=>{n.current&&$B(n.current)},[]),[n,r,i,o]}const fb=()=>{const e=vo(),t=ds(),n=Au(),r=R.useMemo(()=>{const{orderBy:o,tags:a,excludeBots:s,excludeMaxVisitsReached:l,excludePastValidUntil:c,...f}=n,d=o?Hre(o):void 0,p=(a==null?void 0:a.split(","))??[];return{...f,orderBy:d,tags:p,excludeBots:s!==void 0?s==="true":void 0,excludeMaxVisitsReached:l!==void 0?l==="true":void 0,excludePastValidUntil:c!==void 0?c==="true":void 0}},[n]),i=R.useCallback(o=>{const a={...r,...o},{orderBy:s,tags:l,excludeBots:c,excludeMaxVisitsReached:f,excludePastValidUntil:d,...p}=a,v={...p,orderBy:s&&Wre(s),tags:l.length>0?l.join(","):void 0,excludeBots:f_(c),excludeMaxVisitsReached:f_(f),excludePastValidUntil:f_(d)},g=l0(v),y=g?`?${g}`:"";e(`${t}/list-short-urls/1${y}`)},[r,e,t]);return[r,i]},bP=()=>{const{domain:e}=Au(),{shortCode:t=""}=Cu();return R.useMemo(()=>({shortCode:uP(t),domain:e}),[e,t])},db=()=>{const e=yMe();return m.jsx(Ke,{color:"link",size:"lg",className:"p-0 me-3",onClick:e,"aria-label":"Go back",children:m.jsx(je,{icon:pK})})},ULe={android:"Android",ios:"iOS",desktop:"Desktop"},zLe=({deviceType:e,onDeviceTypeChange:t})=>{const n=R.useId();return m.jsxs("div",{children:[m.jsx("label",{htmlFor:n,children:"Device type:"}),m.jsxs("select",{id:n,className:"form-select",value:e,onChange:r=>t(r.target.value),required:!0,children:[!e&&m.jsx("option",{value:"",children:"- Select type -"}),Object.entries(ULe).map(([r,i])=>m.jsx("option",{value:r,children:i},r))]})]})},VLe=({language:e,onLanguageChange:t})=>{const n=R.useId();return m.jsxs("div",{children:[m.jsx("label",{htmlFor:n,children:"Language:"}),m.jsx(Fn,{id:n,value:e??"",onChange:r=>t(r.target.value),placeholder:"en-US / en",required:!0})]})},WLe=({name:e,value:t,onNameChange:n,onValueChange:r})=>{const i=R.useId(),o=R.useId();return m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:i,children:"Param name:"}),m.jsx(Fn,{id:i,value:e??"",onChange:a=>n(a.target.value),placeholder:"hello",required:!0})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:o,children:"Param value:"}),m.jsx(Fn,{id:o,value:t??"",onChange:a=>r(a.target.value),placeholder:"world",required:!0})]})]})},HLe={device:"Device type",language:"Language","query-param":"Query param"},GLe=({condition:e,onConditionChange:t,onDelete:n})=>{const r=R.useId(),i=R.useCallback(s=>t({type:s,matchValue:"",matchKey:null}),[t]),o=R.useCallback(s=>t({...e,matchValue:s}),[e,t]),a=R.useCallback(s=>t({...e,matchKey:s}),[e,t]);return m.jsxs("div",{className:"redirect-rule-modal__condition rounded p-3 h-100 d-flex flex-column gap-2",children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:r,children:"Type:"}),m.jsxs("div",{className:"d-flex gap-2",children:[m.jsx("select",{id:r,className:"form-select flex-grow-1",value:e.type,onChange:s=>i(s.target.value),children:Object.entries(HLe).map(([s,l])=>m.jsx("option",{value:s,children:l},s))}),m.jsx(Ke,{outline:!0,color:"danger",type:"button","aria-label":"Delete condition",onClick:n,children:m.jsx(je,{icon:W6})})]})]}),e.type==="device"&&m.jsx(zLe,{deviceType:e.matchValue,onDeviceTypeChange:o}),e.type==="language"&&m.jsx(VLe,{language:e.matchValue,onLanguageChange:o}),e.type==="query-param"&&m.jsx(WLe,{value:e.matchValue,name:e.matchKey??"",onNameChange:a,onValueChange:o})]})},VB=({isOpen:e,toggle:t,onSave:n,initialData:r})=>{const[i,o]=R.useState(r??{longUrl:"",conditions:[]}),a=R.useCallback(v=>{v.preventDefault(),v.stopPropagation(),i&&n(i),t()},[n,i,t]),s=R.useCallback(()=>o(({longUrl:v,conditions:g})=>({longUrl:v,conditions:[...g,{type:"device",matchValue:"",matchKey:null}]})),[]),l=R.useCallback((v,g)=>o(({longUrl:y,conditions:x})=>{const _=[...x];return _[v]=g,{longUrl:y,conditions:_}}),[]),c=R.useCallback(v=>o(({longUrl:g,conditions:y})=>{const x=[...y];return x.splice(v,1),{longUrl:g,conditions:x}}),[]),f=ea(),d=R.useCallback(()=>{var v;return(v=f==null?void 0:f.current)==null?void 0:v.focus()},[f]),p=R.useCallback(()=>o(r??{longUrl:"",conditions:[]}),[r]);return m.jsx(go,{size:"xl",isOpen:e,toggle:t,centered:!0,onOpened:d,onClosed:p,children:m.jsxs("form",{onSubmit:a,children:[m.jsx(yo,{toggle:t,className:"sticky-top redirect-rule-modal__header",children:"Redirect rule"}),m.jsxs($i,{children:[m.jsx("label",{htmlFor:"longUrl",className:"fw-bold",children:"Long URL:"}),m.jsx(Fn,{id:"longUrl",type:"url",placeholder:"https://www.example.com",value:i.longUrl,onChange:v=>o(g=>({...g,longUrl:v.target.value})),required:!0,innerRef:f}),m.jsx("hr",{}),m.jsxs("div",{className:"d-flex justify-content-between",children:[m.jsx("b",{children:"Conditions:"}),m.jsx(Ke,{outline:!0,size:"sm",type:"button","aria-label":"Add condition",onClick:s,children:m.jsx(je,{icon:ep})})]}),i.conditions.length===0&&m.jsx("div",{className:"text-center",children:m.jsx("i",{children:"Add conditions..."})}),i.conditions.length>0&&m.jsx(Kn,{children:i.conditions.map((v,g)=>m.jsx("div",{className:"col-lg-6 col-xl-4 mt-3",children:m.jsx(GLe,{condition:v,onConditionChange:y=>l(g,y),onDelete:()=>c(g)})},`${g}_${v.type}`))})]}),m.jsxs(as,{className:"sticky-bottom redirect-rule-modal__footer",children:[m.jsx(Ke,{type:"button",color:"link",onClick:t,children:"Cancel"}),m.jsx(Ke,{color:"primary",disabled:i.conditions.length===0,children:"Confirm"})]})]})})},qLe=({priority:e,isLast:t,redirectRule:n,onDelete:r,onMoveUp:i,onMoveDown:o,onUpdate:a})=>{const[s,l]=qt();return m.jsxs(xt,{children:[m.jsxs("div",{className:"d-flex align-content-center gap-3",children:[m.jsx("div",{className:"d-flex flex-column my-auto drag-n-drop-handler d-none d-md-block",style:{cursor:"grab"},children:m.jsx(je,{icon:xK})}),m.jsxs("div",{className:"d-flex flex-column my-auto",children:[m.jsx(Ke,{outline:!0,color:"secondary",size:"sm","aria-label":`Move rule with priority ${e} up`,disabled:e===1,onClick:i,className:"rounded-0 rounded-top",style:{marginBottom:"-1px"},children:m.jsx(je,{icon:$K})}),m.jsx(Ke,{outline:!0,color:"secondary",size:"sm","aria-label":`Move rule with priority ${e} down`,disabled:t,onClick:o,className:"rounded-0 rounded-bottom",children:m.jsx(je,{icon:kK})})]}),m.jsxs("div",{className:"flex-grow-1",children:[m.jsxs("div",{className:"mb-2",children:[m.jsx("b",{children:"Long URL:"})," ",m.jsx(mr,{href:n.longUrl,"data-testid":"rule-long-url"})]}),m.jsxs("div",{className:"d-flex flex-column flex-lg-row gap-2",children:[m.jsx("b",{children:"Conditions:"}),n.conditions.map((c,f)=>m.jsxs("div",{className:"badge bg-secondary",children:[c.type==="device"&&m.jsxs(m.Fragment,{children:["Device is ",c.matchValue]}),c.type==="language"&&m.jsxs(m.Fragment,{children:[c.matchValue," language is accepted"]}),c.type==="query-param"&&m.jsxs(m.Fragment,{children:["Query string contains ",c.matchKey,"=",c.matchValue]})]},`${c.type}_${f}`))]})]}),m.jsxs("div",{className:"d-flex flex-column flex-sm-row gap-1 my-auto",children:[m.jsx(Ke,{outline:!0,color:"secondary",size:"sm","aria-label":`Edit rule with priority ${e}`,onClick:l,children:m.jsx(je,{icon:H6})}),m.jsx(Ke,{outline:!0,color:"danger",size:"sm","aria-label":`Delete rule with priority ${e}`,onClick:r,children:m.jsx(je,{icon:W6})})]})]}),m.jsx(VB,{onSave:a,isOpen:s,toggle:l,initialData:n})]})},KLe=({shortUrlRedirectRules:e,getShortUrlRedirectRules:t,getShortUrlsDetails:n,shortUrlsDetails:r,setShortUrlRedirectRules:i,shortUrlRedirectRulesSaving:o,resetSetRules:a})=>{const s=bP(),{shortUrls:l}=r,c=s&&(l==null?void 0:l.get(s)),[f,d,p]=BLe([],{dragHandle:".drag-n-drop-handler",dropZoneClass:"opacity-25"}),{saving:v,saved:g,errorData:y}=o,[x,_]=qt(),b=R.useCallback(D=>p((N=[])=>[...N,D]),[p]),w=R.useCallback(D=>p((N=[])=>{const I=[...N];return I.splice(D,1),I}),[p]),S=R.useCallback((D,N)=>p((I=[])=>{const F=[...I];return F[D]=N,F}),[p]),E=R.useCallback((D,N)=>p((I=[])=>{if(!I[N])return I;const F=[...I],K=F[N];return F[N]=F[D],F[D]=K,F}),[p]),C=R.useCallback(D=>E(D,D-1),[E]),T=R.useCallback(D=>E(D,D+1),[E]),A=R.useCallback(D=>{D.preventDefault(),d&&i({shortUrl:s,data:{redirectRules:d}})},[s,d,i]);return R.useEffect(()=>(t(s),n([s]),a),[t,n,s,a]),R.useEffect(()=>{e.redirectRules&&p(e.redirectRules)},[p,e.redirectRules]),m.jsxs("div",{className:"d-flex flex-column gap-3",children:[m.jsx("header",{children:m.jsxs(vr,{body:!0,children:[m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(db,{}),m.jsxs("div",{className:"text-center flex-grow-1",children:[r.loading&&m.jsx(m.Fragment,{children:"Loading..."}),!r.loading&&m.jsxs("small",{children:["Redirect rules for ",m.jsx(mr,{href:(c==null?void 0:c.shortUrl)??""})]})]})]}),m.jsx("hr",{}),m.jsxs("div",{children:[m.jsx("p",{className:"mb-2",children:"Configure dynamic conditions that will be checked at runtime."}),"If no conditions match, visitors will be redirected to: ",m.jsx(mr,{href:e.defaultLongUrl??""})]})]})}),m.jsx("div",{children:m.jsxs(Ke,{outline:!0,color:"primary",onClick:_,children:[m.jsx(je,{icon:ep,className:"me-1"})," Add rule"]})}),m.jsxs("form",{onSubmit:A,children:[e.loading&&m.jsx(Ho,{loading:!0}),d.length===0&&!e.loading&&m.jsx(xt,{className:"text-center",children:m.jsx("i",{children:"This short URL has no dynamic redirect rules"})}),m.jsx("div",{className:"d-flex flex-column gap-2",ref:f,children:d.map((D,N)=>m.jsx(qLe,{redirectRule:D,priority:N+1,isLast:N===d.length-1,onDelete:()=>w(N),onMoveUp:()=>C(N),onMoveDown:()=>T(N),onUpdate:I=>S(N,I)},`${D.longUrl}_${N}`))}),m.jsx("div",{className:"text-center mt-3",children:m.jsx(Ke,{outline:!0,color:"primary",className:"btn-sm-block",disabled:v,"data-testid":"save-button",children:v?"Saving...":"Save rules"})})]}),y&&m.jsx(er,{type:"error",children:m.jsx(mo,{errorData:y,fallbackMessage:"An error occurred while saving short URL redirect rules :("})}),g&&m.jsx(er,{type:"success",children:"Redirect rules properly saved."}),m.jsx(VB,{isOpen:x,toggle:_,onSave:b})]})},YLe=(e,t)=>{e.serviceFactory("ShortUrlRedirectRules",()=>KLe),e.decorator("ShortUrlRedirectRules",t(["shortUrlRedirectRules","shortUrlsDetails","shortUrlRedirectRulesSaving"],["getShortUrlRedirectRules","getShortUrlsDetails","setShortUrlRedirectRules","resetSetRules"])),e.serviceFactory("getShortUrlRedirectRules",WMe,"apiClientFactory"),e.serviceFactory("setShortUrlRedirectRules",UMe,"apiClientFactory"),e.serviceFactory("resetSetRules",n=>n.resetSetRules,"setShortUrlRedirectRulesReducerCreator"),e.serviceFactory("shortUrlRedirectRulesReducerCreator",HMe,"getShortUrlRedirectRules"),e.serviceFactory("shortUrlRedirectRulesReducer",n=>n.reducer,"shortUrlRedirectRulesReducerCreator"),e.serviceFactory("setShortUrlRedirectRulesReducerCreator",zMe,"setShortUrlRedirectRules"),e.serviceFactory("setShortUrlRedirectRulesReducer",n=>n.reducer,"setShortUrlRedirectRulesReducerCreator")},ZLe=e=>({longUrl:"",tags:[],customSlug:"",title:void 0,shortCodeLength:void 0,domain:"",validSince:void 0,validUntil:void 0,maxVisits:void 0,findIfExists:!1,validateUrl:(e==null?void 0:e.validateUrls)??!1,forwardQuery:(e==null?void 0:e.forwardQuery)??!0}),WB=({createShortUrl:e,shortUrlCreation:t,resetCreateShortUrl:n,basicMode:r=!1})=>{const{ShortUrlForm:i,CreateShortUrlResult:o}=Rt(WB),a=_r("shortUrlCreation"),s=R.useMemo(()=>ZLe(a),[a]);return m.jsxs(m.Fragment,{children:[m.jsx(i,{initialState:s,saving:t.saving,basicMode:r,onSave:async l=>(n(),e(l))}),m.jsx(o,{creation:t,resetCreateShortUrl:n,canBeClosed:r})]})},XLe=$t(WB,["ShortUrlForm","CreateShortUrlResult"]),HB=({shortUrlsDetails:e,getShortUrlsDetails:t,shortUrlEdition:n,editShortUrl:r})=>{const{ShortUrlForm:i}=Rt(HB),o=bP(),{loading:a,error:s,errorData:l,shortUrls:c}=e,f=o&&(c==null?void 0:c.get(o)),{saving:d,saved:p,error:v,errorData:g}=n,y=_r("shortUrlCreation"),x=R.useMemo(()=>qNe(f,y),[f,y]);return R.useEffect(()=>{o&&t([o])},[t,o]),a?m.jsx(Ho,{loading:!0}):s?m.jsx(er,{type:"error",children:m.jsx(mo,{errorData:l,fallbackMessage:"An error occurred while loading short URL detail :("})}):m.jsxs(m.Fragment,{children:[m.jsx("header",{className:"mb-3",children:m.jsx(vr,{body:!0,children:m.jsxs("h2",{className:"d-sm-flex justify-content-between align-items-center mb-0",children:[m.jsx(db,{}),m.jsx("div",{className:"text-center flex-grow-1",children:m.jsxs("small",{children:["Edit ",m.jsx(mr,{href:(f==null?void 0:f.shortUrl)??""})]})})]})})}),m.jsx(i,{initialState:x,saving:d,onSave:async _=>{f&&r({...f,data:_})}}),p&&v&&m.jsx(er,{type:"error",className:"mt-3",children:m.jsx(mo,{errorData:g,fallbackMessage:"An error occurred while updating short URL :("})}),p&&!v&&m.jsx(er,{type:"success",className:"mt-3",children:"Short URL properly edited."})]})},QLe=$t(HB,["ShortUrlForm"]),GB=({text:e,onCopy:t},n=navigator)=>{var r;return(r=n.clipboard)==null?void 0:r.writeText(e).then(()=>t==null?void 0:t(e,!0)).catch(()=>t==null?void 0:t(e,!1))},qB=({creation:e,resetCreateShortUrl:t,canBeClosed:n=!1})=>{const{useTimeoutToggle:r}=Rt(qB),[i,o]=r(),{error:a,saved:s}=e;if(R.useEffect(()=>{t()},[t]),a)return m.jsxs(er,{type:"error",className:"mt-3",children:[n&&m.jsx(je,{"data-testid":"error-close-button",icon:yx,className:"float-end pointer",onClick:t}),m.jsx(mo,{errorData:e.errorData,fallbackMessage:"An error occurred while creating the URL :("})]});if(!s)return null;const{shortUrl:l}=e.result;return m.jsxs(er,{type:"success",className:"mt-3",children:[n&&m.jsx(je,{"data-testid":"success-close-button",icon:yx,className:"float-end pointer",onClick:t}),m.jsxs("span",{children:[m.jsx("b",{children:"Great!"})," The short URL is ",m.jsx("b",{children:l})]}),m.jsxs("button",{className:"btn btn-light btn-sm create-short-url-result__copy-btn",id:"copyBtn",type:"button",onClick:()=>GB({text:l,onCopy:o}),children:[m.jsx(je,{icon:h5})," Copy ",m.jsxs("span",{className:"sr-only",children:[l," to clipboard"]})]}),m.jsx(sp,{placement:"left",isOpen:i,target:"copyBtn",children:"Copied!"})]})},JLe=$t(qB,["useTimeoutToggle"]),p_="delete",eRe=({shortUrl:e,toggle:t,isOpen:n,shortUrlDeletion:r,resetDeleteShortUrl:i,deleteShortUrl:o,shortUrlDeleted:a})=>{const[s,l]=R.useState("");R.useEffect(()=>i,[i]);const{loading:c,error:f,deleted:d,errorData:p}=r,v=R.useCallback(()=>{i(),t()},[i,t]),g=R.useCallback(y=>(y.preventDefault(),o(e).then(t)),[o,e,t]);return m.jsx(go,{isOpen:n,toggle:v,centered:!0,onClosed:()=>d&&a(e),children:m.jsxs("form",{onSubmit:g,children:[m.jsx(yo,{toggle:v,children:m.jsx("span",{className:"text-danger",children:"Delete short URL"})}),m.jsxs($i,{children:[m.jsxs("p",{children:[m.jsx("b",{className:"text-danger",children:"Caution!"})," You are about to delete a short URL."]}),m.jsx("p",{children:"This action cannot be undone. Once you have deleted it, all the visits stats will be lost."}),m.jsxs("p",{children:["Write ",m.jsx("b",{children:p_})," to confirm deletion."]}),m.jsx("input",{type:"text",className:"form-control",placeholder:`Insert ${p_}`,value:s,onChange:y=>l(y.target.value)}),f&&m.jsx(er,{type:zNe(p)?"warning":"error",small:!0,className:"mt-2",children:m.jsx(mo,{errorData:p,fallbackMessage:"Something went wrong while deleting the URL :("})})]}),m.jsxs(as,{children:[m.jsx("button",{type:"button",className:"btn btn-link",onClick:v,children:"Cancel"}),m.jsx("button",{type:"submit",className:"btn btn-danger",disabled:s!==p_||c,children:c?"Deleting...":"Delete"})]})]})})},KB=({amount:e=0,loading:t=!1,...n})=>m.jsxs(Ke,{...n,outline:!0,color:"primary",disabled:t,children:[m.jsx(je,{icon:Xq})," ",t?"Exporting...":m.jsxs(m.Fragment,{children:["Export (",Gt(e),")"]})]}),CR=20,YB=({amount:e=0})=>{const{apiClientFactory:t,ReportExporter:n}=Rt(YB),[{tags:r,search:i,startDate:o,endDate:a,orderBy:s,tagsMode:l}]=fb(),[c,,f,d]=qt(),p=R.useCallback(async()=>{const v=e/CR,g=async(x=1)=>{const{data:_}=await t().listShortUrls({page:`${x}`,tags:r,searchTerm:i,startDate:o,endDate:a,orderBy:s,tagsMode:l,itemsPerPage:CR});return x>=v?_:_.concat(await g(x+1))};f();const y=await g();n.exportShortUrls(y.map(x=>{var _;const{hostname:b,pathname:w}=new URL(x.shortUrl),S=w.substring(1);return{createdAt:x.dateCreated,domain:b,shortCode:S,shortUrl:x.shortUrl,longUrl:x.longUrl,title:x.title??"",tags:x.tags.join("|"),visits:((_=x==null?void 0:x.visitsSummary)==null?void 0:_.total)??x.visitsCount??0}})),d()},[e,t,a,s,n,i,o,f,d,r,l]);return m.jsx(KB,{loading:c,className:"btn-md-block",amount:e,onClick:p})},tRe=$t(YB,["apiClientFactory","ReportExporter"]),ZB=({text:e,onCopy:t,copyToClipboard:n=GB})=>m.jsx(gl,{className:"ms-2 p-0","aria-label":`Copy ${e} to clipboard`,onClick:()=>n({text:e,onCopy:t}),children:m.jsx(je,{icon:h5,className:"fs-5"})}),nRe=(e,{margin:t,...n})=>{const r=`${e}/qr-code`,i=l0({...n,margin:t>0?t:void 0});return`${r}${i?`?${i}`:""}`},rRe=({errorCorrection:e,setErrorCorrection:t})=>m.jsxs(ta,{text:`Error correction (${e})`,children:[m.jsxs(Ne,{active:e==="L",onClick:()=>t("L"),children:[m.jsx("b",{children:"L"}),"ow"]}),m.jsxs(Ne,{active:e==="M",onClick:()=>t("M"),children:[m.jsx("b",{children:"M"}),"edium"]}),m.jsxs(Ne,{active:e==="Q",onClick:()=>t("Q"),children:[m.jsx("b",{children:"Q"}),"uartile"]}),m.jsxs(Ne,{active:e==="H",onClick:()=>t("H"),children:[m.jsx("b",{children:"H"}),"igh"]})]}),iRe=({format:e,setFormat:t})=>m.jsxs(ta,{text:`Format (${e})`,children:[m.jsx(Ne,{active:e==="png",onClick:()=>t("png"),children:"PNG"}),m.jsx(Ne,{active:e==="svg",onClick:()=>t("svg"),children:"SVG"})]}),XB=({shortUrl:{shortUrl:e,shortCode:t},toggle:n,isOpen:r})=>{const{ImageDownloader:i}=Rt(XB),[o,a]=R.useState(300),[s,l]=R.useState(0),[c,f]=R.useState("png"),[d,p]=R.useState("L"),v=R.useMemo(()=>nRe(e,{size:o,format:c,margin:s,errorCorrection:d}),[e,o,c,s,d]),g=R.useMemo(()=>o+s,[o,s]),y=R.useMemo(()=>{if(!(g<500))return g<800?"lg":"xl"},[g]);return m.jsxs(go,{isOpen:r,toggle:n,centered:!0,size:y,children:[m.jsxs(yo,{toggle:n,children:["QR code for ",m.jsx(mr,{href:e,children:e})]}),m.jsxs($i,{children:[m.jsxs(Kn,{children:[m.jsxs(eo,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"sizeControl",children:["Size: ",o,"px"]}),m.jsx("input",{id:"sizeControl",type:"range",className:"form-control-range",value:o,step:10,min:50,max:1e3,onChange:x=>a(Number(x.target.value))})]}),m.jsxs(eo,{className:"d-grid col-md-6",children:[m.jsxs("label",{htmlFor:"marginControl",children:["Margin: ",s,"px"]}),m.jsx("input",{id:"marginControl",type:"range",className:"form-control-range",value:s,step:1,min:0,max:100,onChange:x=>l(Number(x.target.value))})]}),m.jsx(eo,{className:"d-grid col-md-6",children:m.jsx(iRe,{format:c,setFormat:f})}),m.jsx(eo,{className:"col-md-6",children:m.jsx(rRe,{errorCorrection:d,setErrorCorrection:p})})]}),m.jsxs("div",{className:"text-center",children:[m.jsxs("div",{className:"mb-3",children:[m.jsx(mr,{href:v}),m.jsx(ZB,{text:v})]}),m.jsx("img",{src:v,className:"qr-code-modal__img",alt:"QR code"}),m.jsx("div",{className:"mt-3",children:m.jsxs(Ke,{block:!0,color:"primary",onClick:()=>{i.saveImage(v,`${t}-qr-code.${c}`).catch(()=>{})},children:["Download ",m.jsx(je,{icon:Y6,className:"ms-1"})]})})]})]})]})},oRe=$t(XB,["ImageDownloader"]),Cy=({date:e,format:t=lB,relative:n=!1})=>{const r=dP(e)?e:Ya(e);return m.jsx("time",{dateTime:`${Aae(r)}000`,children:n?`${Tae(Qa(),r)} ago`:wg(r,t)})},aRe=e=>{const{meta:t,visitsCount:n,visitsSummary:r}=e,{maxVisits:i,validSince:o,validUntil:a}=t,s=(r==null?void 0:r.total)??n??0;return i&&s>=i?{icon:WK,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be currently visited because it has reached the maximum amount of ",m.jsx("b",{children:i})," visit",i>1?"s":"","."]})}:a&&Og(jr(a),Qa())?{icon:tA,className:"text-danger",description:m.jsxs(m.Fragment,{children:["This short URL cannot be visited since ",m.jsx("b",{className:"indivisible",children:Gh(jr(a))}),"."]})}:o&&Og(Qa(),jr(o))?{icon:tA,className:"text-warning",description:m.jsxs(m.Fragment,{children:["This short URL will start working on ",m.jsx("b",{className:"indivisible",children:Gh(jr(o))}),"."]})}:{icon:Gd,className:"text-primary",description:"This short URL can be visited normally."}},sRe=({shortUrl:e})=>{const t=ea(),{icon:n,className:r,description:i}=aRe(e);return m.jsxs(m.Fragment,{children:[m.jsx("span",{style:{cursor:i?"help":void 0},ref:t,children:m.jsx(je,{icon:n,className:r})}),m.jsx(br,{target:t,placement:"bottom",children:i})]})},lRe=(e,{shortCode:t,domain:n},r)=>{const i=n?`?domain=${n}`:"";return`${e}/short-code/${aB(t)}/${r}${i}`},dv=({shortUrl:e,suffix:t,asLink:n,children:r,...i})=>{const o=ds();return!n||!e?m.jsx("span",{...i,children:r}):m.jsx(St,{to:lRe(o,e,t),...i,children:r})},QB=({visitsCount:e,shortUrl:t,active:n=!1,asLink:r=!1})=>{const i=ea(),{maxVisits:o,validSince:a,validUntil:s}=(t==null?void 0:t.meta)??{},l=!!o||!!a||!!s,c=m.jsx(dv,{shortUrl:t,suffix:"visits",asLink:r,children:m.jsx("strong",{className:Ce("short-url-visits-count__amount",{"short-url-visits-count__amount--big":n}),children:Gt(e)})});return l?m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:"indivisible",children:[c,m.jsxs("small",{className:"short-urls-visits-count__max-visits-control",ref:i,children:[o&&m.jsxs(m.Fragment,{children:[" / ",Gt(o)]}),m.jsx("sup",{className:"ms-1",children:m.jsx(je,{icon:nE})})]})]}),m.jsx(br,{target:i,placement:"bottom",children:m.jsxs("ul",{className:"list-unstyled mb-0",children:[o&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept more than ",m.jsx("b",{children:Gt(o)})," visit",o===1?"":"s","."]}),a&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits before ",m.jsx("b",{className:"indivisible",children:Gh(jr(a))}),"."]}),s&&m.jsxs("li",{className:"short-url-visits-count__tooltip-list-item",children:["This short URL will not accept visits after ",m.jsx("b",{className:"indivisible",children:Gh(jr(s))}),"."]})]})})]}):c},cRe=e=>!!e.onClose,uRe=e=>!!e.onClick,hb=e=>{const{text:t,children:n,className:r,colorGenerator:i}=e,o=uRe(e),a=o?gl:"span",s=R.useMemo(()=>i.stylesForKey(t),[t,i]);return m.jsxs(a,{className:Ce("badge tag fw-bold",r,{pointer:o}),style:s,onClick:o?e.onClick:void 0,children:[n??t,cRe(e)&&m.jsx(gl,{"aria-label":`Remove ${t}`,className:"bg-transparent ms-1 opacity-100 p-0 fw-bold tag__close",onClick:e.onClose,children:"×"})]})},fRe=({tags:e,onTagClick:t,colorGenerator:n})=>e.length===0?m.jsx("i",{className:"indivisible",children:m.jsx("small",{children:"No tags"})}):m.jsx(m.Fragment,{children:e.map(r=>m.jsx(hb,{text:r,colorGenerator:n,onClick:()=>t==null?void 0:t(r)},r))}),JB=({shortUrl:e,onTagClick:t})=>{var n,r,i,o;const{ShortUrlsRowMenu:a,ColorGenerator:s,useTimeoutToggle:l}=Rt(JB),[c,f]=l(),[d,p]=l(!1,500),v=R.useRef(!0),[{excludeBots:g}]=fb(),y=_r("visits"),x=g??(y==null?void 0:y.excludeBots);return R.useEffect(()=>{!v.current&&p(),v.current=!1},[(n=e.visitsSummary)==null?void 0:n.total,(r=e.visitsSummary)==null?void 0:r.nonBots,e.visitsCount,p]),m.jsxs("tr",{className:"responsive-table__row",children:[m.jsx("td",{className:"indivisible short-urls-row__cell responsive-table__cell","data-th":"Created at",children:m.jsx(Cy,{date:e.dateCreated})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Short URL",children:m.jsxs("span",{className:"position-relative short-urls-row__cell--indivisible",children:[m.jsx("span",{className:"short-urls-row__short-url-wrapper",children:m.jsx(mr,{href:e.shortUrl})}),m.jsx(ZB,{text:e.shortUrl,onCopy:f}),m.jsx("span",{role:"status",className:"badge bg-warning text-black short-urls-row__copy-hint",hidden:!c,children:"Copied short URL!"})]})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell short-urls-row__cell--break","data-th":`${e.title?"Title":"Long URL"}`,children:m.jsx(mr,{href:e.longUrl,children:e.title??e.longUrl})}),e.title&&m.jsx("td",{className:"short-urls-row__cell responsive-table__cell short-urls-row__cell--break d-lg-none","data-th":"Long URL",children:m.jsx(mr,{href:e.longUrl})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Tags",children:m.jsx(fRe,{tags:e.tags,colorGenerator:s,onTagClick:t})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-lg-end","data-th":"Visits",children:m.jsx(QB,{visitsCount:(x?(i=e.visitsSummary)==null?void 0:i.nonBots:(o=e.visitsSummary)==null?void 0:o.total)??e.visitsCount??0,shortUrl:e,active:d,asLink:!0})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell","data-th":"Status",children:m.jsx(sRe,{shortUrl:e})}),m.jsx("td",{className:"responsive-table__cell short-urls-row__cell text-end",children:m.jsx(a,{shortUrl:e})})]})},dRe=$t(JB,["ShortUrlsRowMenu","ColorGenerator","useTimeoutToggle"]),hRe=(e,{maxVersion:t,minVersion:n})=>{const r=!n||l2(e,n,">=");return(!t||l2(e,t,"<="))&&r},eU={excludeBotsOnShortUrls:{minVersion:"3.4.0"},filterDisabledUrls:{minVersion:"3.4.0"},deviceLongUrls:{minVersion:"3.5.0",maxVersion:"3.*.*"},shortUrlVisitsDeletion:{minVersion:"3.6.0"},orphanVisitsDeletion:{minVersion:"3.7.0"},shortUrlRedirectRules:{minVersion:"4.0.0"},urlValidation:{maxVersion:"3.*.*"}};Object.freeze(eU);const Os=(e,t)=>t==="latest"||hRe(t,eU[e]),tU=e=>({excludeBotsOnShortUrls:Os("excludeBotsOnShortUrls",e),filterDisabledUrls:Os("filterDisabledUrls",e),deviceLongUrls:Os("deviceLongUrls",e),shortUrlVisitsDeletion:Os("shortUrlVisitsDeletion",e),orphanVisitsDeletion:Os("orphanVisitsDeletion",e),shortUrlRedirectRules:Os("shortUrlRedirectRules",e),urlValidation:Os("urlValidation",e)}),nU=R.createContext(tU("0.0.0")),pRe=nU.Provider,mRe=e=>R.useMemo(()=>tU(e),[e]),es=e=>R.useContext(nU)[e],rU=({shortUrl:e})=>{const{DeleteShortUrlModal:t,QrCodeModal:n}=Rt(rU),[r,,i,o]=qt(),[a,,s,l]=qt(),c=ab(),f=es("shortUrlRedirectRules");return m.jsxs(c0,{minWidth:f?220:190,children:[m.jsxs(Ne,{tag:dv,shortUrl:e,suffix:"visits",asLink:!0,children:[m.jsx(je,{icon:tE,fixedWidth:!0})," Visit stats"]}),c&&m.jsxs(m.Fragment,{children:[m.jsxs(Ne,{disabled:!c.canAddItemWithName(e.shortUrl),onClick:()=>c.addItemToCompare({name:e.shortUrl,query:fP(e)}),children:[m.jsx(je,{icon:Jy,fixedWidth:!0})," Compare visits"]}),m.jsx(Ne,{divider:!0,tag:"hr"})]}),m.jsxs(Ne,{tag:dv,shortUrl:e,suffix:"edit",asLink:!0,children:[m.jsx(je,{icon:eE,fixedWidth:!0})," Edit short URL"]}),f&&m.jsxs(Ne,{tag:dv,shortUrl:e,suffix:"redirect-rules",asLink:!0,children:[m.jsx(je,{icon:GK,fixedWidth:!0})," Manage redirect rules"]}),m.jsxs(Ne,{onClick:i,children:[m.jsx(je,{icon:zK,fixedWidth:!0})," QR code"]}),m.jsx(n,{shortUrl:e,isOpen:r,toggle:o}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{className:"dropdown-item--danger",onClick:s,children:[m.jsx(je,{icon:JS,fixedWidth:!0})," Delete short URL"]}),m.jsx(t,{shortUrl:e,isOpen:a,toggle:l})]})},vRe=$t(rU,["DeleteShortUrlModal","QrCodeModal"]),iU="shlink/shortUrlCreation",PR={saving:!1,saved:!1,error:!1},gRe=e=>fn(`${iU}/createShortUrl`,t=>e().createShortUrl(t)),yRe=e=>{const{reducer:t,actions:n}=Qt({name:iU,initialState:PR,reducers:{resetCreateShortUrl:()=>PR},extraReducers:i=>{i.addCase(e.pending,()=>({saving:!0,saved:!1,error:!1})),i.addCase(e.rejected,(o,{error:a})=>({saving:!1,saved:!1,error:!0,errorData:zr(a)})),i.addCase(e.fulfilled,(o,{payload:a})=>({result:a,saving:!1,saved:!0,error:!1}))}}),{resetCreateShortUrl:r}=n;return{reducer:t,resetCreateShortUrl:r}},oU="shlink/shortUrlEdition",bRe={saving:!1,saved:!1,error:!1},_Re=e=>fn(`${oU}/editShortUrl`,({shortCode:t,domain:n,data:r})=>e().updateShortUrl(t,n,r)),xRe=e=>Qt({name:oU,initialState:bRe,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,saving:!0,error:!1,saved:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,saving:!1,error:!0,saved:!1,errorData:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>({shortUrl:r,saving:!1,error:!1,saved:!0}))}}),TR="shlink/shortUrlsDetails",jR={loading:!1,error:!1},wRe=e=>{const t=fn(`${TR}/getShortUrlsDetails`,async(r,{getState:i})=>{const{shortUrlsList:o}=i(),a=await Promise.all(r.map(async s=>{var l;const{shortCode:c,domain:f}=s,d=(l=o==null?void 0:o.shortUrls)==null?void 0:l.data.find(p=>Ed(p,c,f));return[s,d??await e().getShortUrl(c,f)]}));return new Map(a)}),{reducer:n}=Qt({name:TR,initialState:jR,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({loading:!0,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({loading:!1,error:!0,errorData:zr(o)})),r.addCase(t.fulfilled,(i,{payload:o})=>({...jR,shortUrls:o}))}});return{reducer:n,getShortUrlsDetails:t}},m_=({icon:e,className:t,...n})=>{const r=ea();return m.jsxs("div",{className:"icon-input-container",children:[m.jsx(Fn,{className:Ce("icon-input-container__input",t),innerRef:r,...n}),m.jsx(je,{icon:e,fixedWidth:!0,className:"icon-input-container__icon",onClick:()=>{var i;return(i=r.current)==null?void 0:i.focus()}})]})},ORe=({minDate:e,maxDate:t,value:n,onChange:r,withTime:i=!1,...o})=>{const a=R.useCallback(({target:l})=>{if(!l.value){r==null||r(null);return}r==null||r(jr(l.value))},[r]),s=R.useMemo(()=>i?Gh:ja,[i]);return m.jsx(Fn,{...o,type:i?"datetime-local":"date",value:s(n)??"",max:s(t)??void 0,min:s(e)??void 0,onChange:a})},Py=({label:e,id:t,...n})=>{const r=R.useId();return m.jsxs(m.Fragment,{children:[m.jsxs("label",{htmlFor:t??r,className:"mb-1",children:[e,":"]}),m.jsx(ORe,{id:t??r,...n})]})},v_=({children:e,infoTooltip:t,checked:n,onChange:r})=>m.jsxs("p",{children:[m.jsx(jD,{inline:!0,checked:n,className:t?"me-2":"",onChange:r,children:e}),t&&m.jsx(fv,{placement:"right",children:t})]}),SRe=({isOpen:e,toggle:t})=>m.jsxs(go,{isOpen:e,toggle:t,centered:!0,size:"lg",children:[m.jsx(yo,{toggle:t,children:"Info"}),m.jsxs($i,{children:[m.jsxs("p",{children:["When the ",m.jsx("b",{children:m.jsx("i",{children:'"Use existing URL if found"'})})," checkbox is checked, the server will return an existing short URL if it matches provided params."]}),m.jsx("p",{children:"These are the checks performed by Shlink in order to determine if an existing short URL should be returned:"}),m.jsxs("ul",{children:[m.jsx("li",{children:"When only the long URL is provided: The most recent match will be returned, or a new short URL will be created if none is found."}),m.jsxs("li",{children:["When long URL and custom slug and/or domain are provided: Same as in previous case, but it will try to match the short URL using both the long URL and the slug, the long URL and the domain, or the three of them.",m.jsx("br",{}),"If the slug is being used by another long URL, an error will be returned."]}),m.jsx("li",{children:"When other params are provided: Same as in previous cases, but it will try to match existing short URLs with all provided data. If any of them does not match, a new short URL will be created"})]})]})]}),ERe=()=>{const[e,t]=qt();return m.jsxs(m.Fragment,{children:[m.jsx(gl,{className:"p-0",title:"What does this mean?",onClick:t,children:m.jsx(je,{icon:nE})}),m.jsx(SRe,{isOpen:e,toggle:t})]})},Fm=e=>typeof e=="string"?Ya(e):e,CRe=e=>"shortCodeLength"in e&&"customSlug"in e&&"domain"in e,PRe=e=>"error"in e,aU=({basicMode:e=!1,saving:t,onSave:n,initialState:r,tagsList:i})=>{var o,a,s;const{TagsSelector:l,DomainSelector:c}=Rt(aU),[f,d]=R.useState(r),p=CRe(f),v=es("deviceLongUrls"),g=es("urlValidation"),y=g||p,x=R.useCallback(()=>d(r),[r]),_=R.useCallback((C,T)=>$s(C)?C:$s(T)?null:void 0,[]),b=R.useCallback((C,T)=>d(({deviceLongUrls:A={},...D})=>{var N;return{...D,deviceLongUrls:{...A,[C]:_(T,(N=r.deviceLongUrls)==null?void 0:N[C])}}}),[r.deviceLongUrls,_]),w=R.useCallback(C=>d(T=>({...T,tags:C})),[]),S=R.useCallback(async C=>(C.preventDefault(),n(f).then(T=>p&&!PRe(T)&&x()).catch(()=>{})),[p,n,x,f]),E=R.useMemo(()=>m.jsxs("div",{className:"d-flex flex-column gap-3",children:[m.jsx(Fn,{bsSize:"lg",type:"url",placeholder:"URL to be shortened",required:!0,value:f.longUrl,onChange:C=>d(T=>({...T,longUrl:C.target.value}))}),m.jsxs("div",{className:Ce("d-flex flex-column flex-lg-row gap-3",{"mb-3":e}),children:[e&&p&&m.jsx("div",{className:"w-100 w-lg-50",children:m.jsx(Fn,{bsSize:"lg",placeholder:"Custom slug",value:f.customSlug??"",onChange:C=>d(T=>({...T,customSlug:C.target.value}))})}),m.jsx("div",{className:Ce("w-100",{"w-lg-50":e}),children:m.jsx(l,{tags:i.tags,selectedTags:f.tags??[],onChange:w})})]})]}),[l,e,w,p,f,i.tags]);return m.jsxs("form",{name:"shortUrlForm",className:"short-url-form",onSubmit:S,children:[e&&E,!e&&m.jsxs(m.Fragment,{children:[m.jsxs(Kn,{children:[m.jsx("div",{className:Ce("mb-3",{"col-sm-6":v,"col-12":!v}),children:m.jsx(xt,{title:"Main options",children:E})}),v&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Device-specific long URLs",bodyClassName:"d-flex flex-column gap-3",children:[m.jsx(m_,{type:"url",icon:Pse,placeholder:"Android-specific redirection",value:((o=f.deviceLongUrls)==null?void 0:o.android)??"",onChange:({target:C})=>b("android",C.value)}),m.jsx(m_,{type:"url",icon:Cse,placeholder:"iOS-specific redirection",value:((a=f.deviceLongUrls)==null?void 0:a.ios)??"",onChange:({target:C})=>b("ios",C.value)}),m.jsx(m_,{type:"url",icon:HK,placeholder:"Desktop-specific redirection",value:((s=f.deviceLongUrls)==null?void 0:s.desktop)??"",onChange:({target:C})=>b("desktop",C.value)})]})})]}),m.jsxs(Kn,{children:[m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Customize the short URL",bodyClassName:"d-flex flex-column gap-3",children:[m.jsx(Fn,{placeholder:"Title",value:f.title??"",onChange:({target:C})=>d(T=>({...T,title:_(C.value,r.title)}))}),p&&m.jsxs(m.Fragment,{children:[m.jsxs(Kn,{children:[m.jsx("div",{className:"col-lg-6 mb-3 mb-lg-0",children:m.jsx(Fn,{placeholder:"Custom slug",value:f.customSlug??"",onChange:C=>d(T=>({...T,customSlug:C.target.value})),disabled:$s(f.shortCodeLength)})}),m.jsx("div",{className:"col-lg-6",children:m.jsx(Fn,{type:"number",placeholder:"Short code length",value:f.shortCodeLength??"",onChange:C=>d(T=>({...T,shortCodeLength:C.target.value})),min:4,disabled:$s(f.customSlug)})})]}),m.jsx(c,{value:f.domain,onChange:C=>d(T=>({...T,domain:C}))})]})]})}),m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Limit access to the short URL",children:[m.jsxs("div",{className:"row mb-3",children:[m.jsx("div",{className:"col-lg-6",children:m.jsx(Py,{label:"Enabled since",withTime:!0,maxDate:f.validUntil?Fm(f.validUntil):void 0,value:f.validSince?Fm(f.validSince):null,onChange:C=>d(T=>({...T,validSince:Ja(C)}))})}),m.jsx("div",{className:"col-lg-6 mt-3 mt-lg-0",children:m.jsx(Py,{label:"Enabled until",withTime:!0,minDate:f.validSince?Fm(f.validSince):void 0,value:f.validUntil?Fm(f.validUntil):null,onChange:C=>d(T=>({...T,validUntil:Ja(C)}))})})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:"maxVisits",className:"mb-1",children:"Maximum visits allowed:"}),m.jsx(Fn,{id:"maxVisits",type:"number",min:1,placeholder:"25...",value:f.maxVisits??"",onChange:C=>d(T=>({...T,maxVisits:$s(C.target.value)?Number(C.target.value):null}))})]})]})})]}),m.jsxs(Kn,{children:[y&&m.jsx("div",{className:"col-sm-6 mb-3",children:m.jsxs(xt,{title:"Extra checks",children:[g&&m.jsx(v_,{infoTooltip:"If checked, Shlink will try to reach the long URL, failing in case it's not publicly accessible.",checked:f.validateUrl,onChange:C=>d(T=>({...T,validateUrl:C})),children:"Validate URL"}),p&&m.jsxs("p",{children:[m.jsx(jD,{inline:!0,className:"me-2",checked:f.findIfExists,onChange:C=>d(T=>({...T,findIfExists:C})),children:"Use existing URL if found"}),m.jsx(ERe,{})]})]})}),m.jsx("div",{className:Ce("mb-3",{"col-sm-6":y}),children:m.jsxs(xt,{title:"Configure behavior",children:[m.jsx(v_,{infoTooltip:"This short URL will be included in the robots.txt for your Shlink instance, allowing web crawlers (like Google) to index it.",checked:f.crawlable,onChange:C=>d(T=>({...T,crawlable:C})),children:"Make it crawlable"}),m.jsx(v_,{infoTooltip:"When this short URL is visited, any query params appended to it will be forwarded to the long URL.",checked:f.forwardQuery,onChange:C=>d(T=>({...T,forwardQuery:C})),children:"Forward query params on redirect"})]})})]})]}),m.jsx("div",{className:"text-center",children:m.jsx(Ke,{outline:!0,color:"primary",disabled:t||!f.longUrl,className:"btn-xs-block",children:t?"Saving...":"Save"})})]})},TRe=$t(aU,["TagsSelector","DomainSelector"]),jRe=({active:e,allText:t,onChange:n})=>m.jsxs(m.Fragment,{children:[m.jsx(Ne,{active:e==="all",onClick:()=>n("all"),children:t}),m.jsx(Ne,{divider:!0,tag:"hr"}),ZNe.map(r=>m.jsx(Ne,{active:e===r,onClick:()=>n(r),children:dB(r)},r))]}),ARe=({startDate:e,endDate:t,disabled:n=!1,onStartDateChange:r,onEndDateChange:i})=>m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(Py,{label:"Since",value:e,maxDate:t??void 0,disabled:n,onChange:r})}),m.jsx("div",{className:"col-md-6 mt-3 mt-md-0",children:m.jsx(Py,{label:"Until",value:t,minDate:e??void 0,disabled:n,onChange:o=>i(o&&Jc(o))})})]}),_P=({onDatesChange:e,dateRangeOrInterval:t,defaultText:n,disabled:r})=>{const i=R.useMemo(()=>dB(t)??n,[t,n]),[o,a]=R.useMemo(()=>Oy(t)?[void 0,t]:[t,void 0],[t]),s=R.useCallback(l=>{Oy(l)?e(hB(l),l):e(l)},[e]);return m.jsxs(ta,{disabled:r,text:i,children:[m.jsx(jRe,{allText:n,active:a,onChange:s}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx("div",{className:"px-3 py-1",children:m.jsx(ARe,{...o,onStartDateChange:l=>s({...o,startDate:l}),onEndDateChange:l=>s({...o,endDate:l})})})]})},kRe={dateCreated:"Created at",shortCode:"Short URL",longUrl:"Long URL",title:"Title",visits:"Visits"},NRe=({onChange:e,selected:t={},className:n,supportsDisabledFiltering:r})=>{const{excludeBots:i=!1,excludeMaxVisitsReached:o=!1,excludePastValidUntil:a=!1}=t,s=l=>()=>e({...t,[l]:!(t!=null&&t[l])});return m.jsxs(ta,{text:"Filters",dropdownClassName:n,end:!0,minWidth:250,children:[m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Visits:"}),m.jsx(Ne,{active:i,onClick:s("excludeBots"),children:"Ignore visits from bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Short URLs:"}),m.jsx(Ne,{active:o,onClick:s("excludeMaxVisitsReached"),children:"Exclude with visits reached"}),m.jsx(Ne,{active:a,onClick:s("excludePastValidUntil"),children:"Exclude enabled in the past"})]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{disabled:t.excludeBots===void 0&&t.excludeMaxVisitsReached===void 0&&t.excludePastValidUntil===void 0,onClick:()=>e({excludeBots:void 0,excludeMaxVisitsReached:void 0,excludePastValidUntil:void 0}),children:m.jsx("i",{children:"Reset to defaults"})})]})},sU=({className:e,shortUrlsAmount:t,order:n,handleOrderBy:r,tagsList:i})=>{const{ExportShortUrlsBtn:o,TagsSelector:a}=Rt(sU),[{search:s,tags:l,startDate:c,endDate:f,excludeBots:d,excludeMaxVisitsReached:p,excludePastValidUntil:v,tagsMode:g="any"},y]=fb(),x=es("filterDisabledUrls"),_=_r("visits"),[b,w]=R.useState(),S=R.useCallback(({startDate:A,endDate:D},N)=>{y({startDate:Ja(A)??void 0,endDate:Ja(D)??void 0}),w(N)},[y]),E=R.useCallback(A=>y({search:A||void 0}),[y]),C=R.useCallback(A=>y({tags:A}),[y]),T=R.useCallback(()=>y({tagsMode:g==="any"?"all":"any"}),[g,y]);return m.jsxs("div",{className:Ce("short-urls-filtering-bar-container",e),children:[m.jsx(cp,{initialValue:s,onChange:E}),m.jsxs(s0,{className:"mt-3",children:[m.jsx(a,{immutable:!0,placeholder:"With tags...",tags:i.tags,selectedTags:l,onChange:C}),l.length>1&&m.jsxs(m.Fragment,{children:[m.jsx(Ke,{outline:!0,color:"secondary",onClick:T,id:"tagsModeBtn","aria-label":"Change tags mode",children:m.jsx(je,{className:"short-urls-filtering-bar__tags-icon",icon:g==="all"?K6:gK})}),m.jsx(br,{target:"tagsModeBtn",placement:"left",children:g==="all"?"With all the tags.":"With any of the tags."})]})]}),m.jsxs(Kn,{className:"flex-lg-row-reverse",children:[m.jsx("div",{className:"col-lg-8 col-xl-6 mt-3",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(_P,{defaultText:"All short URLs",dateRangeOrInterval:b??fB(c,f),onDatesChange:S})}),m.jsx(NRe,{className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:{excludeBots:d??(_==null?void 0:_.excludeBots),excludeMaxVisitsReached:p,excludePastValidUntil:v},onChange:y,supportsDisabledFiltering:x})]})}),m.jsx("div",{className:"col-6 col-lg-4 col-xl-6 mt-3",children:m.jsx(o,{amount:t})}),m.jsx("div",{className:"col-6 d-lg-none mt-3",children:m.jsx(up,{prefixed:!1,items:kRe,order:n,onChange:r})})]})]})},MRe=$t(sU,["ExportShortUrlsBtn","TagsSelector"]);function Cd({currentOrder:e,field:t,className:n="ms-1"}){return!e.dir||e.field!==t?null:m.jsx(je,{icon:e.dir==="ASC"?cK:wK,className:n})}const Zl=2,HO="...",lU=(e,t)=>{const n=VE(Math.max(Zl,e-Zl),Math.min(t-1,e+Zl)+1);return e-Zl>Zl&&n.unshift(HO),e+Zle===HO,cU=e=>qh(e)?e:Gt(e),uU=(e,t)=>qh(e)?`${e}_${t}`:`${e}`,LRe=({paginator:e,currentQueryString:t=""})=>{const{currentPage:n=0,pagesCount:r=0}=e??{},i=ds(),o=s=>`${i}/list-short-urls/${s}${t}`;if(r<=1)return m.jsx("div",{className:"pb-3"});const a=()=>lU(n,r).map((s,l)=>m.jsx(Xs,{disabled:qh(s),active:n===s,children:m.jsx(Qs,{tag:St,to:o(s),children:cU(s)})},uU(s,l)));return m.jsxs(kE,{className:"sticky-card-paginator py-3",listClassName:"flex-wrap justify-content-center mb-0",children:[m.jsx(Xs,{disabled:n===1,children:m.jsx(Qs,{previous:!0,tag:St,to:o(n-1)})}),a(),m.jsx(Xs,{disabled:n>=r,children:m.jsx(Qs,{next:!0,tag:St,to:o(n+1)})})]})},RRe={field:"dateCreated",dir:"DESC"},fU=Bi(({listShortUrls:e,shortUrlsList:t})=>{var n,r,i;const{ShortUrlsTable:o,ShortUrlsFilteringBar:a}=Rt(fU),{page:s}=Cu(),l=gr(),[{tags:c,search:f,startDate:d,endDate:p,orderBy:v,tagsMode:g,excludeBots:y,excludePastValidUntil:x,excludeMaxVisitsReached:_},b]=fb(),w=qE(),[S,E]=R.useState(v??((n=w.shortUrlsList)==null?void 0:n.defaultOrdering)??RRe),{pagination:C}=(t==null?void 0:t.shortUrls)??{},T=R.useMemo(()=>{var X;return y??((X=w.visits)==null?void 0:X.excludeBots)},[y,(r=w.visits)==null?void 0:r.excludeBots]),A=es("excludeBotsOnShortUrls"),D=R.useCallback((X,Q)=>{b({orderBy:{field:X,dir:Q}}),E({field:X,dir:Q})},[b]),N=X=>()=>D(X,u0(X,S.field,S.dir)),I=X=>m.jsx(Cd,{currentOrder:S,field:X}),F=R.useCallback(X=>b({tags:[...new Set([...c,X])]}),[c,b]),K=R.useCallback(({field:X,dir:Q})=>A&&T&&X==="visits"?{field:"nonBotVisits",dir:Q}:{field:X,dir:Q},[T,A]),W=lP();return R.useEffect(()=>{e({page:s,searchTerm:f,tags:c,startDate:d,endDate:p,orderBy:K(S),tagsMode:g,excludePastValidUntil:x,excludeMaxVisitsReached:_})},[e,K,s,f,c,d,p,S,g,x,_]),m.jsxs(sP,{value:W,children:[m.jsx(a,{shortUrlsAmount:(i=t.shortUrls)==null?void 0:i.pagination.totalItems,order:S,handleOrderBy:D,className:"mb-3"}),m.jsx(cP,{type:"short-urls",className:"mb-3"}),m.jsxs(vr,{body:!0,className:Ce({"pb-0":!t.loading}),children:[m.jsx(o,{shortUrlsList:t,orderByColumn:N,renderOrderIcon:I,onTagClick:F}),!t.loading&&m.jsx(LRe,{paginator:C,currentQueryString:l.search})]})]})},()=>[nr.visits]),$Re=$t(fU,["ShortUrlsTable","ShortUrlsFilteringBar"]),dU=({orderByColumn:e,renderOrderIcon:t,shortUrlsList:n,onTagClick:r,className:i})=>{const{ShortUrlsRow:o}=Rt(dU),{error:a,loading:s,shortUrls:l}=n,c=Ce({"short-urls-table__header-cell--with-action":!!e}),f=Ce("short-urls-table__header-cell",c),d=Ce("table table-hover responsive-table short-urls-table",i),p=()=>a?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center table-danger text-dark",children:"Something went wrong while loading short URLs :("})}):s?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"Loading..."})}):!s&&(!l||l.data.length===0)?m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"text-center",children:"No results found"})}):l==null?void 0:l.data.map(v=>m.jsx(o,{shortUrl:v,onTagClick:r},v.shortUrl));return m.jsxs("table",{className:d,children:[m.jsx("thead",{className:"responsive-table__header short-urls-table__header",children:m.jsxs("tr",{children:[m.jsxs("th",{className:f,onClick:e==null?void 0:e("dateCreated"),children:["Created at ",t==null?void 0:t("dateCreated")]}),m.jsxs("th",{className:f,onClick:e==null?void 0:e("shortCode"),children:["Short URL ",t==null?void 0:t("shortCode")]}),m.jsxs("th",{className:"short-urls-table__header-cell",children:[m.jsxs(gl,{className:Ce("p-0",c),onClick:e==null?void 0:e("title"),children:["Title ",t==null?void 0:t("title")]}),"  /  ",m.jsxs(gl,{className:Ce("p-0",c),onClick:e==null?void 0:e("longUrl"),children:[m.jsx("span",{className:"indivisible",children:"Long URL"})," ",t==null?void 0:t("longUrl")]})]}),m.jsx("th",{className:"short-urls-table__header-cell",children:"Tags"}),m.jsx("th",{className:f,onClick:e==null?void 0:e("visits"),children:m.jsxs("span",{className:"indivisible",children:["Visits ",t==null?void 0:t("visits")]})}),m.jsx("th",{className:"short-urls-table__header-cell",colSpan:2,"aria-hidden":!0})]})}),m.jsx("tbody",{children:p()})]})},IRe=$t(dU,["ShortUrlsRow"]),DRe=(e,t)=>{e.factory("ShortUrlsList",$Re),e.decorator("ShortUrlsList",t(["mercureInfo","shortUrlsList"],["listShortUrls","createNewVisits","loadMercureInfo"])),e.factory("ShortUrlsTable",IRe),e.factory("ShortUrlsRow",dRe),e.factory("ShortUrlsRowMenu",vRe),e.factory("CreateShortUrlResult",JLe),e.factory("ShortUrlForm",TRe),e.decorator("ShortUrlForm",t(["tagsList"])),e.factory("CreateShortUrl",XLe),e.decorator("CreateShortUrl",t(["shortUrlCreation"],["createShortUrl","resetCreateShortUrl"])),e.factory("EditShortUrl",QLe),e.decorator("EditShortUrl",t(["shortUrlsDetails","shortUrlEdition"],["getShortUrlsDetails","editShortUrl"])),e.serviceFactory("DeleteShortUrlModal",()=>eRe),e.decorator("DeleteShortUrlModal",t(["shortUrlDeletion"],["deleteShortUrl","shortUrlDeleted","resetDeleteShortUrl"])),e.factory("QrCodeModal",oRe),e.factory("ExportShortUrlsBtn",tRe),e.factory("ShortUrlsFilteringBar",MRe),e.decorator("ShortUrlsFilteringBar",t(["tagsList"])),e.serviceFactory("shortUrlsListReducerCreator",RMe,"listShortUrls","editShortUrl","createShortUrl"),e.serviceFactory("shortUrlsListReducer",n=>n.reducer,"shortUrlsListReducerCreator"),e.serviceFactory("shortUrlCreationReducerCreator",yRe,"createShortUrl"),e.serviceFactory("shortUrlCreationReducer",n=>n.reducer,"shortUrlCreationReducerCreator"),e.serviceFactory("shortUrlEditionReducerCreator",xRe,"editShortUrl"),e.serviceFactory("shortUrlEditionReducer",n=>n.reducer,"shortUrlEditionReducerCreator"),e.serviceFactory("shortUrlDeletionReducerCreator",NMe,"deleteShortUrl"),e.serviceFactory("shortUrlDeletionReducer",n=>n.reducer,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlsDetailsReducerCreator",wRe,"apiClientFactory"),e.serviceFactory("shortUrlsDetailsReducer",n=>n.reducer,"shortUrlsDetailsReducerCreator"),e.serviceFactory("listShortUrls",LMe,"apiClientFactory"),e.serviceFactory("createShortUrl",gRe,"apiClientFactory"),e.serviceFactory("resetCreateShortUrl",n=>n.resetCreateShortUrl,"shortUrlCreationReducerCreator"),e.serviceFactory("deleteShortUrl",kMe,"apiClientFactory"),e.serviceFactory("resetDeleteShortUrl",n=>n.resetDeleteShortUrl,"shortUrlDeletionReducerCreator"),e.serviceFactory("shortUrlDeleted",()=>wB),e.serviceFactory("getShortUrlsDetails",n=>n.getShortUrlsDetails,"shortUrlsDetailsReducerCreator"),e.serviceFactory("editShortUrl",_Re,"apiClientFactory")},FRe=({tag:e,toggle:t,isOpen:n,deleteTag:r,tagDelete:i,tagDeleted:o})=>{const{deleting:a,error:s,deleted:l,errorData:c}=i;return m.jsxs(go,{toggle:t,isOpen:n,centered:!0,onClosed:()=>l&&o(e),children:[m.jsx(yo,{toggle:t,className:"text-danger",children:"Delete tag"}),m.jsxs($i,{children:["Are you sure you want to delete tag ",m.jsx("b",{children:e}),"?",s&&m.jsx(er,{type:"error",small:!0,className:"mt-2",children:m.jsx(mo,{errorData:c,fallbackMessage:"Something went wrong while deleting the tag :("})})]}),m.jsxs(as,{children:[m.jsx(Ke,{color:"link",onClick:t,children:"Cancel"}),m.jsx(Ke,{color:"danger",disabled:a,onClick:async()=>{await r(e),t()},children:a?"Deleting tag...":"Delete tag"})]})]})},hU=({tag:e,editTag:t,toggle:n,tagEdited:r,isOpen:i,tagEdit:o})=>{const{ColorGenerator:a}=Rt(hU),[s,l]=R.useState(e),[c,f]=R.useState(a.getColorForKey(e)),{editing:d,error:p,edited:v,errorData:g}=o,y=xB(async()=>{await t({oldName:e,newName:s,color:c}),n()}),x=R.useCallback(()=>v&&r({oldName:e,newName:s,color:c}),[c,v,s,e,r]);return m.jsx(go,{isOpen:i,toggle:n,centered:!0,onClosed:x,children:m.jsxs("form",{name:"editTag",onSubmit:y,children:[m.jsx(yo,{toggle:n,children:"Edit tag"}),m.jsxs($i,{children:[m.jsxs(s0,{children:[m.jsxs("div",{className:"input-group-text p-0 position-relative",style:{backgroundColor:c,borderColor:c},children:[m.jsx(je,{icon:uK,className:"position-absolute top-50 start-50 translate-middle text-white"}),m.jsx(Fn,{className:"form-control-color opacity-0",type:"color",value:c,onChange:_=>f(_.target.value)})]}),m.jsx(Fn,{value:s,placeholder:"Tag",required:!0,onChange:({target:_})=>l(_.value)})]}),p&&m.jsx(er,{type:"error",small:!0,className:"mt-2",children:m.jsx(mo,{errorData:g,fallbackMessage:"Something went wrong while editing the tag :("})})]}),m.jsxs(as,{children:[m.jsx(Ke,{type:"button",color:"link",onClick:n,children:"Cancel"}),m.jsx(Ke,{color:"primary",disabled:d,children:d?"Saving...":"Save"})]})]})})},BRe=$t(hU,["ColorGenerator"]),URe=/\s+/g,pU=e=>e.trim().toLowerCase().replace(URe,"-"),mU=({color:e})=>m.jsx("div",{style:{backgroundColor:e},className:"color-bullet"}),vU=({tag:e,colorGenerator:t})=>m.jsx(mU,{color:t.getColorForKey(e)});let AR=1;const gU="Tag not found",yU="Add tag",zRe=e=>e!==gU,VRe=e=>e===yU,kR=e=>(AR+=1,{label:e,value:`${e}${AR}`}),WRe=e=>({tag:t,onClick:n})=>m.jsx(hb,{colorGenerator:e,text:t.label,className:"react-tags__tag",onClose:n}),HRe=(e,t)=>({option:n,classNames:r,...i})=>{var o;const a=zRe(n.label),s=VRe(n.label);return m.jsx("div",{className:Ce(r.option,{[r.optionIsActive]:a&&n.active,"react-tags__listbox-option--not-selectable":!a}),...i,children:a?m.jsxs(m.Fragment,{children:[!s&&m.jsx(vU,{tag:`${n.label}`,colorGenerator:e}),s?m.jsxs("i",{children:['Add "',pU(((o=t.current)==null?void 0:o.input.value)??""),'"']}):n.label]}):m.jsx("i",{children:n.label})})},bU=({selectedTags:e,onChange:t,placeholder:n,tags:r,immutable:i=!1})=>{const{ColorGenerator:o}=Rt(bU),a=_r("shortUrlCreation"),s=(a==null?void 0:a.tagFilteringMode)??"startsWith",l=ea();return m.jsx(Sle,{ref:l,selected:e.map(kR),suggestions:r.filter(c=>!e.includes(c)).map(kR),renderTag:WRe(o),renderOption:HRe(o,l),activateFirstOption:!0,allowNew:!i,newOptionText:yU,noOptionsText:gU,placeholderText:n??"Add tags to the URL",delimiterKeys:["Enter",","],suggestionsTransform:(c,f)=>{const d=c.toLowerCase().trim();return d.length<1?[]:[...f.filter(({label:p})=>s==="includes"?p.includes(d):p.startsWith(d))].slice(0,5)},onDelete:c=>{const f=[...e];f.splice(c,1),t(f)},onAdd:({label:c})=>t([...new Set([...e,...c.split(",").map(pU)])])})},GRe=$t(bU,["ColorGenerator"]),GO="shlink/tagDelete",qRe={deleting:!1,deleted:!1,error:!1},_U=un(`${GO}/tagDeleted`),KRe=e=>{const t=fn(`${GO}/deleteTag`,async r=>{await e().deleteTags([r])}),{reducer:n}=Qt({name:GO,initialState:qRe,reducers:{},extraReducers:r=>{r.addCase(t.pending,()=>({deleting:!0,deleted:!1,error:!1})),r.addCase(t.rejected,(i,{error:o})=>({deleting:!1,deleted:!1,error:!0,errorData:zr(o)})),r.addCase(t.fulfilled,()=>({deleting:!1,deleted:!0,error:!1}))}});return{reducer:n,deleteTag:t}},xP="shlink/tagEdit",YRe={editing:!1,edited:!1,error:!1},xU=un(`${xP}/tagEdited`),ZRe=(e,t)=>fn(`${xP}/editTag`,async({oldName:n,newName:r,color:i})=>(await e().editTag(n,r),t.setColorForKey(r,i),{oldName:n,newName:r,color:i})),XRe=e=>Qt({name:xP,initialState:YRe,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({editing:!0,edited:!1,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({editing:!1,edited:!1,error:!0,errorData:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{oldName:i,newName:o}=r;return{oldName:i,newName:o,editing:!1,edited:!0,error:!1}})}}),wP="shlink/tagsList",g_={tags:[],filteredTags:[],stats:{},loading:!1,error:!1},NR=(e,t)=>n=>n===e?t:n,MR=(e,t)=>e.filter(n=>n!==t),QRe=(e,t)=>e.reduce((n,[r,i])=>{if(!n[r])return n;const{bots:o,nonBots:a}=i,s=n[r];return{...n,[r]:{...s,visitsSummary:s.visitsSummary&&{total:s.visitsSummary.total+o+a,bots:s.visitsSummary.bots+o,nonBots:s.visitsSummary.nonBots+a},visitsCount:(s.visitsCount??0)+o+a}}},{...t}),JRe=e=>Object.entries(e.reduce((t,{shortUrl:n,visit:r})=>(n==null||n.tags.forEach(i=>{t[i]||(t[i]={bots:0,nonBots:0}),r.potentialBot?t[i].bots+=1:t[i].nonBots+=1}),t),{})),e4e=e=>fn(`${wP}/listTags`,async()=>{const{data:t}=await e().tagsStats(),n=t.reduce((r,{tag:i,...o})=>(r[i]=o,r),{});return{tags:Object.keys(n),stats:n}}),wU=un(`${wP}/filterTags`),t4e=(e,t)=>Qt({name:wP,initialState:g_,reducers:{},extraReducers:n=>{n.addCase(wU,(r,{payload:i})=>({...r,filteredTags:r.tags.filter(o=>o.toLowerCase().match(i.toLowerCase()))})),n.addCase(e.pending,r=>({...r,loading:!0,error:!1})),n.addCase(e.rejected,(r,{error:i})=>({...g_,error:!0,errorData:zr(i)})),n.addCase(e.fulfilled,(r,{payload:i})=>({...g_,stats:i.stats,tags:i.tags,filteredTags:i.tags})),n.addCase(_U,({tags:r,filteredTags:i,...o},{payload:a})=>({...o,tags:MR(r,a),filteredTags:MR(i,a)})),n.addCase(xU,({tags:r,filteredTags:i,stats:o,...a},{payload:s})=>({...a,stats:{...o,[s.newName]:o[s.oldName]},tags:r.map(NR(s.oldName,s.newName)).sort(),filteredTags:i.map(NR(s.oldName,s.newName)).sort()})),n.addCase(Xu,(r,{payload:i})=>({...r,stats:QRe(JRe(i.createdVisits),r.stats)})),n.addCase(t.fulfilled,({tags:r,...i},{payload:o})=>({...i,tags:r.concat(o.tags.filter(a=>!r.includes(a)))}))}}),n4e={tag:"Tag",shortUrls:"Short URLs",visits:"Visits"},OU=Bi(({filterTags:e,tagsList:t})=>{var n,r;const{TagsTable:i}=Rt(OU),o=qE(),[a,s]=R.useState(((n=o.tags)==null?void 0:n.defaultOrdering)??{}),l=R.useMemo(()=>{const f=t.filteredTags.map(d=>{var p,v,g;const y=t.stats[d],x=((p=o.visits)!=null&&p.excludeBots?(v=y==null?void 0:y.visitsSummary)==null?void 0:v.nonBots:(g=y==null?void 0:y.visitsSummary)==null?void 0:g.total)??(y==null?void 0:y.visitsCount)??0;return{tag:d,visits:x,shortUrls:(y==null?void 0:y.shortUrlsCount)??0}});return kD(f,a)},[a,(r=o.visits)==null?void 0:r.excludeBots,t.filteredTags,t.stats]),c=lP();return t.loading?m.jsx(Ho,{loading:!0}):t.error?m.jsx(er,{type:"error",children:m.jsx(mo,{errorData:t.errorData,fallbackMessage:"Error loading tags :("})}):m.jsxs(sP,{value:c,children:[m.jsx(cp,{className:"mb-3",onChange:e}),m.jsx(Kn,{className:"mb-3",children:m.jsx("div",{className:"col-lg-6 offset-lg-6",children:m.jsx(up,{items:n4e,order:a,onChange:(f,d)=>s({field:f,dir:d})})})}),m.jsx(cP,{type:"tags",className:"mb-3"}),m.jsx(i,{sortedTags:l,currentOrder:a,orderByColumn:f=>()=>{const d=u0(f,a.field,a.dir);s({field:d?f:void 0,dir:d})}})]})},()=>[nr.visits]),r4e=$t(OU,["TagsTable"]),OP=({pagesCount:e,currentPage:t,setCurrentPage:n,centered:r=!0})=>{if(e<2)return null;const i=o=>()=>!qh(o)&&n(o);return m.jsxs(kE,{listClassName:Ce("flex-wrap mb-0 simple-paginator",{"justify-content-center":r}),children:[m.jsx(Xs,{disabled:t<=1,children:m.jsx(Qs,{previous:!0,tag:"span",onClick:i(t-1)})}),lU(t,e).map((o,a)=>m.jsx(Xs,{disabled:qh(o),active:t===o,children:m.jsx(Qs,{role:"link",tag:"span",onClick:i(o),children:cU(o)})},uU(o,a))),m.jsx(Xs,{disabled:t>=e,children:m.jsx(Qs,{next:!0,tag:"span",onClick:i(t+1)})})]})},i4e=20,SU=({sortedTags:e,orderByColumn:t,currentOrder:n})=>{const{TagsTableRow:r}=Rt(SU),i=R.useRef(!0),{page:o=1}=Au(),[a,s]=gMe("page",Number(o)),l=jc(e,i4e),c=l.length>1,f=l[a-1]??[];return R.useEffect(()=>{!i.current&&s(1),i.current=!1},[s,e]),R.useEffect(()=>{scrollTo(0,0)},[a]),m.jsxs(xt,{bodyClassName:c?"pb-1":"",children:[m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsxs("thead",{className:"responsive-table__header",children:[m.jsxs("tr",{children:[m.jsxs("th",{className:"tags-table__header-cell",onClick:t("tag"),children:["Tag ",m.jsx(Cd,{currentOrder:n,field:"tag"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("shortUrls"),children:["Short URLs ",m.jsx(Cd,{currentOrder:n,field:"shortUrls"})]}),m.jsxs("th",{className:"tags-table__header-cell text-lg-end",onClick:t("visits"),children:["Visits ",m.jsx(Cd,{currentOrder:n,field:"visits"})]}),m.jsx("th",{className:"tags-table__header-cell",children:m.jsx("span",{className:"sr-only",children:"Options"})})]}),m.jsx("tr",{children:m.jsx("th",{"aria-hidden":!0,colSpan:4,className:"p-0 border-top-0"})})]}),m.jsxs("tbody",{children:[f.length===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:4,className:"text-center",children:"No tags found"})}),f.map(d=>m.jsx(r,{tag:d},d.tag))]})]}),c&&m.jsx("div",{className:"sticky-card-paginator",children:m.jsx(OP,{pagesCount:l.length,currentPage:a,setCurrentPage:s})})]},a)},o4e=$t(SU,["TagsTableRow"]),EU=({tag:e})=>{const{DeleteTagConfirmModal:t,EditTagModal:n,ColorGenerator:r}=Rt(EU),[i,o]=qt(),[a,s]=qt(),l=ds(),c=ab();return m.jsxs("tr",{className:"responsive-table__row",children:[m.jsxs("th",{className:"responsive-table__cell","data-th":"Tag",children:[m.jsx(vU,{tag:e.tag,colorGenerator:r})," ",e.tag]}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Short URLs",children:m.jsx(St,{to:`${l}/list-short-urls/1?tags=${encodeURIComponent(e.tag)}`,children:Gt(e.shortUrls)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end","data-th":"Visits",children:m.jsx(St,{to:`${l}/tag/${e.tag}/visits`,children:Gt(e.visits)})}),m.jsx("td",{className:"responsive-table__cell text-lg-end",children:m.jsxs(c0,{children:[m.jsxs(Ne,{onClick:s,children:[m.jsx(je,{icon:H6,fixedWidth:!0,className:"me-1"})," Edit"]}),m.jsxs(Ne,{disabled:!c||!c.canAddItemWithName(e.tag),onClick:()=>c==null?void 0:c.addItemToCompare({name:e.tag,query:e.tag,style:r.stylesForKey(e.tag)}),children:[m.jsx(je,{icon:Jy,fixedWidth:!0})," Compare visits"]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{className:"dropdown-item--danger",onClick:o,children:[m.jsx(je,{icon:hK,fixedWidth:!0,className:"me-1"})," Delete tag"]})]})}),m.jsx(n,{tag:e.tag,toggle:s,isOpen:a}),m.jsx(t,{tag:e.tag,toggle:o,isOpen:i})]})},a4e=$t(EU,["DeleteTagConfirmModal","EditTagModal","ColorGenerator"]),s4e=(e,t)=>{e.factory("TagsSelector",GRe),e.serviceFactory("DeleteTagConfirmModal",()=>FRe),e.decorator("DeleteTagConfirmModal",t(["tagDelete"],["deleteTag","tagDeleted"])),e.factory("EditTagModal",BRe),e.decorator("EditTagModal",t(["tagEdit"],["editTag","tagEdited"])),e.factory("TagsTableRow",a4e),e.factory("TagsTable",o4e),e.factory("TagsList",r4e),e.decorator("TagsList",t(["tagsList","mercureInfo"],["filterTags","createNewVisits","loadMercureInfo"])),e.serviceFactory("tagEditReducerCreator",XRe,"editTag"),e.serviceFactory("tagEditReducer",n=>n.reducer,"tagEditReducerCreator"),e.serviceFactory("tagDeleteReducerCreator",KRe,"apiClientFactory"),e.serviceFactory("tagDeleteReducer",n=>n.reducer,"tagDeleteReducerCreator"),e.serviceFactory("tagsListReducerCreator",t4e,"listTags","createShortUrl"),e.serviceFactory("tagsListReducer",n=>n.reducer,"tagsListReducerCreator"),e.serviceFactory("listTags",e4e,"apiClientFactory"),e.serviceFactory("filterTags",()=>wU),e.serviceFactory("deleteTag",n=>n.deleteTag,"tagDeleteReducerCreator"),e.serviceFactory("tagDeleted",()=>_U),e.serviceFactory("editTag",ZRe,"apiClientFactory","ColorGenerator"),e.serviceFactory("tagEdited",()=>xU)},l4e=new x5,c4e=e=>l4e.parse(e),u4e=6,LR="0123456789ABCDEF",f4e=128,{floor:d4e,random:h4e,sqrt:p4e,round:m4e}=Math,v4e=()=>`#${mP(u4e,()=>LR[d4e(h4e()*LR.length)]).join("")}`,RR=e=>e.toLowerCase().trim(),g4e=e=>(e.match(/../g)??[]).map(t=>parseInt(t,16)||0),y4e=(e=0,t=0,n=0)=>m4e(p4e(.299*e**2+.587*t**2+.114*n**2));class b4e{constructor(t){za(this,"colors"),za(this,"lights");var n;this.storage=t,this.colors=((n=this.storage)==null?void 0:n.getTagColors())??{},this.lights={}}getColorForKey(t){const n=RR(t);return this.colors[n]||this.setColorForKey(n,v4e())}setColorForKey(t,n){var r;const i=RR(t);return this.colors[i]=n,(r=this.storage)==null||r.storeTagColors(this.colors),n}stylesForKey(t){const n=this.getColorForKey(t);return{backgroundColor:n,color:this.isLightColor(n)?"#222":"#fff"}}isLightColor(t){const n=t.substring(1);if(this.lights[n]===void 0){const r=g4e(n);this.lights[n]=y4e(...r)>=f4e}return this.lights[n]}}const CU=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},_4e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);CU(e,i,n)};class x4e{constructor(t,n){this.fetch=t,this.window=n}async saveImage(t,n){const r=await this.fetch(t).then(o=>o.blob()),i=URL.createObjectURL(r);CU(this.window,i,n)}}class w4e{constructor(t,n){za(this,"exportVisits",(r,i)=>{i.length&&this.exportCsv(r,i)}),za(this,"exportShortUrls",r=>{r.length&&this.exportCsv("short_urls.csv",r)}),za(this,"exportCsv",(r,i)=>{const o=this.jsonToCsv(i);_4e(this.window,o,r)}),this.window=t,this.jsonToCsv=n}}function O4e(e){e.constant("window",window),e.constant("fetch",window.fetch.bind(window)),e.service("ImageDownloader",x4e,"fetch","window"),e.service("ColorGenerator",b4e,"TagColorsStorage"),e.constant("jsonToCsv",c4e),e.service("ReportExporter",w4e,"window","jsonToCsv"),e.serviceFactory("useTimeoutToggle",()=>PD)}const Tp=({visits:e,shortUrl:t,children:n,title:r})=>m.jsx("header",{children:m.jsxs(vr,{body:!0,children:[m.jsxs("h2",{className:"d-flex justify-content-between align-items-center mb-0",children:[m.jsx(db,{}),m.jsx("span",{className:"text-center d-none d-sm-block",children:m.jsx("small",{children:r})}),m.jsxs("span",{className:"badge badge-main ms-3",children:["Visits:"," ",m.jsx(QB,{visitsCount:e.length,shortUrl:t})]})]}),m.jsx("h3",{className:"text-center d-block d-sm-none mb-0 mt-3",children:m.jsx("small",{children:r})}),n&&m.jsx("div",{className:"mt-md-2",children:n})]})}),PU=({title:e,footer:t,children:n})=>m.jsxs(vr,{role:"document",children:[m.jsx(Xc,{className:"chart-card__header",children:e}),m.jsx(Zc,{children:n}),t&&m.jsx(dD,{className:"chart-card__footer--sticky",children:t})]}),TU={color:"white",background:"rgb(0 0 0 / .9)",border:"none",borderRadius:"5px"},S4e={marginBottom:"5px",fontWeight:"bold"},jU={contentStyle:TU,labelStyle:S4e,itemStyle:{padding:0}},$R=["#97BBCD","#F7464A","#46BFBD","#FDB45C","#949FB1","#57A773","#414066","#08B2E3","#B6C454","#DCDCDC","#463730"],AU=e=>$R[e%$R.length],Ty="#46e587",E4e="rgba(70, 229, 135, 0.4)",C4e=({chartData:e,showNumbers:t})=>m.jsx("ul",{className:"doughnut-chart-legend",children:e.map(({name:n,color:r,value:i})=>m.jsxs("li",{className:"doughnut-chart-legend__item d-flex",children:[m.jsx("div",{className:"doughnut-chart-legend__item-color",style:{backgroundColor:r}}),m.jsxs("small",{className:"doughnut-chart-legend__item-text flex-fill",children:[n,t&&m.jsxs("b",{children:[" (",Gt(i),")"]})]})]},n))}),IR=e=>R.useMemo(()=>Object.entries(e).map(([t,n],r)=>({name:t,value:n,color:AU(r)})),[e]),P4e=({stats:e,prevStats:t,showNumbersInLegend:n,dimensions:r})=>{const i=IR(e),o=IR(t),a=o.length>0,s=LE()?Yre:Kre;return m.jsxs("div",{className:"row align-items-center",children:[m.jsx("div",{className:"col-sm-12 col-md-7",children:m.jsx("div",{style:r??{width:"100%",height:300},children:m.jsx(r?R.Fragment:xC,{children:m.jsxs(hNe,{...r,children:[m.jsx(Xr,{formatter:Gt,contentStyle:TU,itemStyle:{color:"white"}}),m.jsx(po,{data:i,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"100%",innerRadius:a?"65%":"50%",animationBegin:0,children:i.map((l,c)=>m.jsx(Fa,{fill:l.color,stroke:s},`${l.name}-${c}`))}),a&&m.jsx(po,{data:o,dataKey:"value",nameKey:"name",startAngle:360,endAngle:0,outerRadius:"55%",innerRadius:"20%",animationBegin:0,stroke:s,fill:Ty})]})})})}),m.jsx("div",{className:"col-sm-12 col-md-5",children:m.jsx(C4e,{chartData:i,showNumbers:n})})]})},DR=({title:e,...t})=>{const[n,r]=qt(!1);return m.jsx(PU,{title:m.jsxs(m.Fragment,{children:[e,m.jsx("div",{className:"float-end",children:m.jsx(ul,{checked:n,onChange:r,children:"Show numbers"})})]}),children:m.jsx(P4e,{...t,showNumbersInLegend:n})})},T4e=({visitsGroups:e})=>{const t=R.useMemo(()=>Object.entries(e),[e]);return t.length===0?null:m.jsx("ul",{className:"list-unstyled mb-0 mt-2 d-flex flex-wrap justify-content-center gap-3",children:t.map(([n,r],i)=>m.jsxs("li",{className:"d-inline",children:[m.jsx(mU,{color:kU(r)}),m.jsxs("strong",{children:[n," (",Gt(r.length),")"]})]},`${n}${i}`))})},j4e={monthly:"Month",weekly:"Week",daily:"Day",hourly:"Hour"},A4e={hourly:e=>({hours:e}),daily:e=>({days:e}),weekly:e=>({weeks:e}),monthly:e=>({months:e})},k4e={hourly:Ooe,daily:fp,weekly:Poe,monthly:xg},SP={hourly:e=>wg(e,"yyyy-MM-dd HH:00"),daily:e=>ja(e),weekly(e){const t=ja(ah(e)),n=ja(Aoe(e));return`${t} - ${n}`},monthly:e=>wg(e,"yyyy-MM")},N4e=e=>{var t;const n=Object.values(e).filter(a=>a.length>0);if(n.length===0)return"monthly";const r=new Date,i=n.map(a=>Ya(a[a.length-1].date)),o=r5(i);return((t=[[()=>fp(r,o)<=2,"hourly"],[()=>xg(r,o)<=1,"daily"],[()=>xg(r,o)<=6,"weekly"]].find(([a])=>a()))==null?void 0:t[1])??"monthly"},M4e=(e,t)=>Object.keys(t).reduce((n,r)=>(n[r]=XD(t[r],i=>SP[e](Ya(i.date))),n),{}),L4e=(e,t)=>t.reduce((n,r)=>{const i=SP[e](Ya(r.date));return n[i]=n[i]??[],n[i].push(r),n},{}),R4e=(e,t)=>{const n=Object.values(t).filter(d=>d.length>0).map(d=>[...d].reverse());if(n.length===0)return[];const r=k4e[e],i=SP[e],o=A4e[e],a=n.map(d=>Ya(d[0].date)),s=n.map(d=>Ya(d[d.length-1].date)),l=r5(s),c=boe(a),f=r(l,c)+1;return[i(c),...mP(f,d=>i(moe(c,o(d))))]},kU=e=>{if(e.color)return e.color;const t={main:th,highlighted:Qw,previous:Ty};return e.type?t[e.type]:th},FR=(e,t)=>R.useMemo(()=>Object.values(e).find(n=>n.type===t)??[],[e,t]),$4e=(e,t,n)=>{const r=FR(e,"main"),i=FR(e,"highlighted"),o=R.useMemo(()=>n?L4e(t,r):{},[n,t,r]),a=R.useCallback((s,{payload:l})=>{const c=o[l.date]??[];n==null||n(c===i?[]:c)},[o,i,n]);return n&&{cursor:"pointer",onClick:a}},NU=({visitsGroups:e,setSelectedVisits:t,dimensions:n,matchMedia:r})=>{const[i,o]=R.useState(N4e(e)),a=gP(767,r??window.matchMedia),s=R.useMemo(()=>{const d=M4e(i,e),p=Object.keys(d);return R4e(i,e).map(v=>({date:v,...p.reduce((g,y)=>(g[y]=d[y][v]??0,g),{})}))},[i,e]),l=$4e(e,i,t),c=n?R.Fragment:xC,f=R.useMemo(()=>n?{}:{width:"100%",height:a?300:400},[n,a]);return m.jsxs(vr,{children:[m.jsxs(Xc,{role:"heading","aria-level":4,children:["Visits over time",m.jsx("div",{className:"float-end",children:m.jsxs(lp,{children:[m.jsx(ju,{caret:!0,color:"link",className:"btn-sm p-0",children:"Group by"}),m.jsx(Tu,{end:!0,children:Object.entries(j4e).map(([d,p])=>m.jsx(Ne,{active:i===d,onClick:()=>o(d),children:p},d))})]})})]}),m.jsxs(Zc,{children:[m.jsx(c,{...f,children:m.jsxs(dNe,{data:s,...n,children:[m.jsx(Yu,{dataKey:"date"}),m.jsx(Zu,{tickFormatter:Gt}),m.jsx(Xr,{formatter:Gt,...jU}),m.jsx(nP,{strokeOpacity:LE()?.1:.9}),Object.entries(e).map(([d,p])=>p.length>0&&m.jsx(Ku,{dataKey:d,type:"monotone",stroke:kU(p),strokeWidth:2,activeDot:p.type==="previous"?void 0:l,strokeDasharray:p.type==="previous"?"8 3":void 0},d))]})}),m.jsx(T4e,{visitsGroups:e})]})]})},I4e=({toggleClassName:e,ranges:t,value:n,setValue:r})=>m.jsxs(lp,{children:[m.jsx(ju,{caret:!0,color:"link",className:e,children:"Paginate"}),m.jsxs(Tu,{end:!0,children:[t.map(i=>m.jsxs(Ne,{active:i===n,onClick:()=>r(i),children:[m.jsx("b",{children:i})," items per page"]},i)),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{disabled:n===1/0,onClick:()=>r(1/0),children:m.jsx("i",{children:"Clear pagination"})})]})]}),BR=e=>e.startsWith("hidden_"),D4e=({stats:e,prevStats:t,highlightedStats:n,highlightedLabel:r,max:i,onClick:o,dimensions:a})=>{const s=R.useMemo(()=>Object.entries(e).map(([d,p])=>{const v=(n==null?void 0:n[d])??0,g=(t==null?void 0:t[d])??0,y=BR(d);return{name:d,amount:Math.max(p,g),nonHighlightedAmount:y?null:p-v,highlightedAmount:y?null:v,prevAmount:y?null:g}}),[e,t,n]),l=R.useMemo(()=>{const d=s.reduce((p,{name:v})=>p>v.length?p:v.length,0);return Math.min(150,d*7)},[s]),c=a?R.Fragment:xC,f=R.useMemo(()=>a?{}:{width:"100%",height:Math.max(300,s.length*(t?44:22))},[a,s.length,t]);return m.jsx(c,{...f,children:m.jsxs(pNe,{layout:"vertical",data:s,barCategoryGap:3,...a,children:[m.jsx(Yu,{type:"number",dataKey:"amount",tickFormatter:Gt,domain:i?[0,i]:void 0}),m.jsx(Zu,{type:"category",dataKey:"name",width:l,interval:0,style:{fontSize:".8rem"},tickFormatter:d=>BR(d)?"":d}),m.jsx(nP,{strokeOpacity:LE()?.05:.9}),m.jsx(Xr,{filterNull:!0,...jU,formatter:(d,p)=>[Gt(d),p==="highlightedAmount"?r:p==="prevAmount"?"Previous period":n?"Non-selected":"Visits"]}),m.jsx(Io,{dataKey:"nonHighlightedAmount",stackId:"main",cursor:"pointer",fill:th,onClick:({name:d})=>o==null?void 0:o(d),children:s.map(d=>m.jsx(Fa,{fill:Gre,stroke:th,strokeWidth:2},d.name))}),n&&m.jsx(Io,{dataKey:"highlightedAmount",stackId:"main",cursor:"pointer",fill:Qw,onClick:({name:d})=>o==null?void 0:o(d),children:s.map(d=>m.jsx(Fa,{fill:qre,stroke:Qw,strokeWidth:2},d.name))}),t&&m.jsx(Io,{dataKey:"prevAmount",fill:Ty,children:s.map(d=>m.jsx(Fa,{fill:E4e,stroke:Ty,strokeWidth:2},d.name))})]})})},F4e=e=>typeof e=="string"?e.toLowerCase():e,B4e=([e])=>e,U4e=([,e])=>e,Bm=({stats:e,prevStats:t,highlightedStats:n,title:r,sortingItems:i,extraHeaderContent:o,withPagination:a=!0,...s})=>{const[l,c]=R.useState({}),[f,d]=R.useState(1),[p,v]=R.useState(50),g=R.useCallback((A,D)=>{const N=Object.entries(A),I=l.field?hoe(N,([F,K])=>F4e(l.field===Object.keys(D)[0]?F:K)):N;return!l.dir||l.dir==="ASC"?I:[...I].reverse()},[l.dir,l.field]),y=R.useCallback(A=>{const D=A[f-1];if(f[`hidden_${I}`,0])]},[f]),x=R.useCallback(A=>m.jsx(OP,{currentPage:f,pagesCount:A,setCurrentPage:d}),[f]),_=R.useCallback((A,D,N,I)=>{const F=g(A,D),K=F.map(B4e),W=N&&Object.entries({...Lk(K,K.map(()=>0)),...N}),X=I&&Object.entries({...Lk(K,K.map(()=>0)),...I});if(F.length<=p)return{currentPageStats:Object.fromEntries(F),currentPageHighlightedStats:W&&Object.fromEntries(W),currentPagePrevStats:X&&Object.fromEntries(X)};const Q=jc(F,p),ne=W&&jc(W,p),Z=X&&jc(X,p);return{currentPageStats:Object.fromEntries(y(Q)),currentPageHighlightedStats:ne&&Object.fromEntries(y(ne)),currentPagePrevStats:Z&&Object.fromEntries(y(Z)),pagination:x(Q.length),max:DMe(Math.max(...F.map(U4e)))}},[y,g,p,x]),{currentPageStats:b,currentPagePrevStats:w,currentPageHighlightedStats:S,pagination:E,max:C}=R.useMemo(()=>_(e,i,n&&Object.keys(n).length>0?n:void 0,t&&Object.keys(t).length>0?t:void 0),[_,n,t,i,e]),T=R.useMemo(()=>Object.keys(b),[b]);return m.jsx(PU,{title:m.jsxs(m.Fragment,{children:[r,m.jsx("div",{className:"float-end",children:m.jsx(up,{isButton:!1,right:!0,items:i,order:l,onChange:(A,D)=>{c({field:A,dir:D}),d(1)}})}),a&&Object.keys(e).length>50&&m.jsx("div",{className:"float-end",children:m.jsx(I4e,{toggleClassName:"btn-sm p-0 me-3",ranges:[50,100,200,500],value:p,setValue:A=>{v(A),d(1)}})}),o&&m.jsx("div",{className:"float-end",children:o(E?T:void 0)})]}),footer:E,children:m.jsx(D4e,{stats:b,prevStats:w,highlightedStats:S,max:C,...s})})},UR=(e,t)=>{if(!(!t||!(e in t)))return t[e]&&Ja(t[e])||""},MU=()=>{const e=vo(),t=Au(),{startDate:n,endDate:r,orphanVisitsType:i,excludeBots:o,loadPrevInterval:a,...s}=t,l=R.useMemo(()=>({dateRange:n!=null||r!=null?fB(n,r):void 0,visitsFilter:{orphanVisitsType:i,excludeBots:o!==void 0?o==="true":void 0},loadPrevInterval:a!==void 0?a==="true":void 0}),[r,o,a,i,n]),c=R.useCallback(f=>{const{dateRange:d,visitsFilter:p={},loadPrevInterval:v}=m0(l,f),{excludeBots:g,orphanVisitsType:y}=p,x={...s,startDate:UR("startDate",d),endDate:UR("endDate",d),excludeBots:g===void 0?void 0:UO(g),orphanVisitsType:y,loadPrevInterval:v===void 0?void 0:UO(v)},_=l0(x),b=_?`?${_}`:"";e(b,{replace:!0,relative:"route"})},[l,e,s]);return[l,c]},z4e=()=>m.jsx(kNe,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),V4e=e=>{if(e.length===0)return{};if(e.length>1)return{bounds:e.map(({latLong:n})=>n)};const[{latLong:t}]=e;return{zoom:10,center:t}},LU=({toggle:e,isOpen:t,title:n,locations:r=[]})=>m.jsx(go,{toggle:e,isOpen:t,className:"map-modal__modal",contentClassName:"map-modal__modal-content",children:m.jsxs($i,{className:"map-modal__modal-body",children:[m.jsxs("h3",{className:"map-modal__modal-title",children:[n,m.jsx("button",{type:"button",className:"btn-close float-end","aria-label":"Close",onClick:e})]}),m.jsxs(TNe,{...V4e(r),children:[m.jsx(z4e,{}),r.map(({cityName:i,latLong:o,count:a},s)=>m.jsx(jNe,{position:o,children:m.jsxs(ANe,{children:[m.jsx("b",{children:a})," visit",a>1?"s":""," from ",m.jsx("b",{children:i})]})},s))]})]})}),W4e=({modalTitle:e,activeCities:t,locations:n=[]})=>{const[r,,i,o]=qt(),[a,s]=qt(),[l,c]=R.useState([]),f=ME(),d=R.useCallback(p=>{c(p?n.filter(p):n),i()},[n,i]);return m.jsxs(m.Fragment,{children:[!t&&m.jsx(Ke,{color:"link",className:"open-map-modal-btn__btn",id:f,onClick:()=>d(),"aria-label":"Show in map",children:m.jsx(je,{icon:gx})}),t&&m.jsxs(op,{isOpen:a,toggle:s,children:[m.jsx(ju,{color:"link",className:"open-map-modal-btn__btn",id:f,children:m.jsx(je,{icon:gx})}),m.jsxs(Tu,{end:!0,children:[m.jsx(Ne,{onClick:()=>d(),children:"Show all locations"}),m.jsx(Ne,{onClick:()=>d(({cityName:p})=>t.includes(p)),children:"Show locations in current page"})]})]}),m.jsx(br,{placement:"left",target:f,children:"Show in map"}),m.jsx(LU,{toggle:o,isOpen:r,title:e,locations:l})]})},RU=({onChange:e,selected:t={},className:n,isOrphanVisits:r=!1,withPrevInterval:i=!1,disabled:o})=>{const{orphanVisitsType:a,excludeBots:s=!1,loadPrevInterval:l=!1}=t,c=p=>({active:a===p,onClick:()=>e({...t,orphanVisitsType:p===a?void 0:p})}),f=R.useCallback(()=>e({...t,excludeBots:!s}),[s,e,t]),d=R.useCallback(()=>e({...t,loadPrevInterval:!l}),[l,e,t]);return m.jsxs(ta,{disabled:o,text:"More",dropdownClassName:n,end:!0,minWidth:250,children:[i&&m.jsxs(m.Fragment,{children:[m.jsx(Ne,{active:l,onClick:d,children:"Compare with previous period"}),m.jsx(Ne,{divider:!0,tag:"hr"})]}),m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Bots:"}),m.jsx(Ne,{active:s,onClick:f,children:"Exclude potential bots"}),r&&m.jsxs(m.Fragment,{children:[m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{header:!0,"aria-hidden":!0,children:"Orphan visits type:"}),m.jsx(Ne,{...c("base_url"),children:"Base URL"}),m.jsx(Ne,{...c("invalid_short_url"),children:"Invalid short URL"}),m.jsx(Ne,{...c("regular_404"),children:"Regular 404"})]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsx(Ne,{disabled:t.excludeBots===void 0&&t.loadPrevInterval===void 0&&t.orphanVisitsType===void 0,onClick:()=>e({excludeBots:void 0,loadPrevInterval:void 0,orphanVisitsType:void 0}),children:m.jsx("i",{children:"Reset to defaults"})})]})},$U=({info:e})=>{const{loading:t,errorData:n,progress:r}=e;return m.jsxs(m.Fragment,{children:[t&&r===null&&m.jsx(Ho,{loading:!0}),t&&r!==null&&m.jsxs(Ho,{loading:!0,children:["This is going to take a while... :S",m.jsx(gD,{value:r,striped:r>=100,className:"mt-3"})]}),n&&m.jsx(er,{type:"error",children:m.jsx(mo,{errorData:n,fallbackMessage:"An error occurred while loading visits :("})})]})},hv=({children:e,showFallback:t})=>m.jsxs(m.Fragment,{children:[t&&m.jsx(Ho,{className:"mt-3",children:"There are no visits matching current filter"}),!t&&m.jsx(m.Fragment,{children:e})]}),H4e=({visitsDeletion:e,deleteVisits:t})=>{const{deleting:n}=e,[r,,i]=qt();return m.jsx(xt,{title:m.jsx("span",{className:"text-danger fw-bold",children:"Danger zone"}),children:m.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[m.jsxs("dl",{className:"m-0 me-3",children:[m.jsx("dt",{children:"Delete visits."}),m.jsxs("dd",{className:"m-0",children:["This will delete ",m.jsx("b",{children:"all"})," visits, not only the ones matching current filter."]})]}),!r&&m.jsx(Ke,{color:"danger",className:"indivisible",onClick:i,children:"Delete visits"}),r&&m.jsxs(Ke,{color:"danger",disabled:n,className:"indivisible",onClick:t,innerRef:o=>{o==null||o.focus()},children:[!n&&m.jsx(m.Fragment,{children:"Click again to confirm"}),n&&m.jsx(m.Fragment,{children:"Deleting..."})]})]})})},Um="Others",G4e=["Android Browser","Chrome","Chromium","Firefox","Internet Explorer","Microsoft Edge","Opera","Safari","Samsung Internet for Android","Vivaldi","WeChat"],q4e=e=>{if(!$s(e))return{browser:Um,os:Um};const{browser:{name:t},os:{name:n}}=INe.parse(e);return{os:n??Um,browser:t&&G4e.includes(t)?t:Um}},K4e=e=>{var t;return $s(e)?((t=e.split("/")[e.includes("://")?2:0])==null?void 0:t.split(":")[0])??"":"Direct"},IU=(e,t)=>e[t]!==void 0,zR=e=>typeof e=="number"?e:e?parseFloat(e):0,Y4e=(e,{os:t})=>{e[t]=(e[t]||0)+1},Z4e=(e,{browser:t})=>{e[t]=(e[t]||0)+1},X4e=(e,{referer:t})=>{e[t]=(e[t]||0)+1},DU=e=>(t,n)=>{const r=IU(n,e)?n[e]:"Unknown";t[r]=(t[r]||0)+1},Q4e=DU("country"),J4e=DU("city"),e$e=(e,t)=>{if(!IU(t,"city")||t.city==="Unknown")return;const{city:n,latitude:r,longitude:i}=t,o=e[n]||{cityName:n,count:0,latLong:[zR(r),zR(i)]};o.count+=1,e[n]=o},t$e=(e,t)=>{if(!tMe(t))return;const{visitedUrl:n}=t;e[n]=(e[n]||0)+1},qO=e=>e.reduce((t,n)=>(Y4e(t.os,n),Z4e(t.browsers,n),X4e(t.referrers,n),Q4e(t.countries,n),J4e(t.cities,n),e$e(t.citiesForMap,n),t$e(t.visitedUrls,n),t),{os:{},browsers:{},referrers:{},countries:{},cities:{},citiesForMap:{},visitedUrls:{}}),jy=e=>e.map(t=>{const{userAgent:n,date:r,referer:i,visitLocation:o,potentialBot:a}=t;return{date:r,potentialBot:a,...q4e(n),referer:K4e(i),country:(o==null?void 0:o.countryName)||"Unknown",city:(o==null?void 0:o.cityName)||"Unknown",latitude:o==null?void 0:o.latitude,longitude:o==null?void 0:o.longitude,visitedUrl:t.visitedUrl,type:pP(t)?t.type:void 0}}),n$e=Object.freeze(Object.defineProperty({__proto__:null,normalizeVisits:jy,processStatsFromVisits:qO},Symbol.toStringTag,{value:"Module"})),Qf=20,r$e=({browser:e,os:t,referer:n,country:r,city:i,...o},a)=>`${e} ${t} ${n} ${r} ${i} ${o.visitedUrl}`.toLowerCase().includes(a.toLowerCase()),i$e=(e,t)=>t.filter(n=>r$e(n,e)),o$e=(e,t)=>kD(t,e),a$e=(e,t,n)=>{const r=t?i$e(t,e):[...e],i=o$e(n,r),o=i.length;return{visitsGroups:jc(i,Qf),total:o}},Eo="visits-table__header-cell visits-table__sticky",s$e=({visits:e,selectedVisits:t=[],setSelectedVisits:n,matchMedia:r=window.matchMedia})=>{var i;const o=gP(767,r),[a,s]=R.useState(void 0),l=R.useRef(a),[c,f]=R.useState({}),d=R.useMemo(()=>a$e(e,a,c),[e,a,c]),[p,v]=R.useState(1),g=p*Qf,y=g-Qf,x=R.useMemo(()=>{var S,E;return!!((E=(S=d.visitsGroups[p-1])==null?void 0:S[0])!=null&&E.visitedUrl)},[p,d.visitsGroups]),_=8+Number(x),b=S=>()=>f({field:S,dir:u0(S,c.field,c.dir)}),w=S=>m.jsx(Cd,{currentOrder:c,field:S,className:"visits-table__header-icon"});return R.useEffect(()=>{l.current!==a&&(v(1),n([])),l.current=a},[a,n]),m.jsx("div",{className:"table-responsive-md",children:m.jsxs("table",{className:"table table-bordered table-hover table-sm visits-table",children:[m.jsxs("thead",{className:"visits-table__header",children:[m.jsxs("tr",{children:[m.jsxs("th",{className:`${Eo} text-center`,onClick:()=>n(t.length0})})]}),m.jsxs("th",{className:`${Eo} text-center`,onClick:b("potentialBot"),children:[m.jsx("span",{className:"sr-only",children:"Is bot"}),m.jsx(je,{icon:nA}),w("potentialBot")]}),m.jsxs("th",{className:Eo,onClick:b("date"),children:["Date",w("date")]}),m.jsxs("th",{className:Eo,onClick:b("country"),children:["Country",w("country")]}),m.jsxs("th",{className:Eo,onClick:b("city"),children:["City",w("city")]}),m.jsxs("th",{className:Eo,onClick:b("browser"),children:["Browser",w("browser")]}),m.jsxs("th",{className:Eo,onClick:b("os"),children:["OS",w("os")]}),m.jsxs("th",{className:Eo,onClick:b("referer"),children:["Referrer",w("referer")]}),x&&m.jsxs("th",{className:Eo,onClick:b("visitedUrl"),children:["Visited URL",w("visitedUrl")]})]}),m.jsx("tr",{children:m.jsx("td",{colSpan:_,className:"p-0",children:m.jsx(cp,{noBorder:!0,large:!1,onChange:s})})})]}),m.jsxs("tbody",{children:[d.total===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:_,className:"text-center",children:"There are no visits matching current filter"})}),(i=d.visitsGroups[p-1])==null?void 0:i.map((S,E)=>{const C=t.includes(S);return m.jsxs("tr",{style:{cursor:"pointer"},className:Ce({"table-active":C}),onClick:()=>n(C?t.filter(T=>T!==S):[...t,S]),children:[m.jsx("td",{className:"text-center",children:C&&m.jsx(je,{icon:Gd,className:"text-primary"})}),m.jsx("td",{className:"text-center",children:S.potentialBot&&m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:nA,id:`botIcon${E}`}),m.jsx(br,{placement:"right",target:`botIcon${E}`,children:"Potentially a visit from a bot or crawler"})]})}),m.jsx("td",{children:m.jsx(Cy,{date:S.date})}),m.jsx("td",{children:S.country}),m.jsx("td",{children:S.city}),m.jsx("td",{children:S.browser}),m.jsx("td",{children:S.os}),m.jsx("td",{children:S.referer}),S.visitedUrl&&m.jsx("td",{children:S.visitedUrl})]},E)})]}),d.total>Qf&&m.jsx("tfoot",{children:m.jsx("tr",{children:m.jsx("td",{colSpan:_,className:"visits-table__footer-cell visits-table__sticky",children:m.jsxs("div",{className:"row",children:[m.jsx("div",{className:"col-md-6",children:m.jsx(OP,{pagesCount:Math.ceil(d.total/Qf),currentPage:p,setCurrentPage:v,centered:o})}),m.jsx("div",{className:Ce("col-md-6",{"d-flex align-items-center flex-row-reverse":!o,"text-center mt-3":o}),children:m.jsxs("div",{children:["Visits ",m.jsx("b",{children:Gt(y+1)})," to"," ",m.jsx("b",{children:Gt(Math.min(g,d.total))})," of"," ",m.jsx("b",{children:Gt(d.total)})]})})]})})})})]})})},ma={byTime:{title:"By time",subPath:"by-time",icon:Yq},byContext:{title:"By context",subPath:"by-context",icon:tE},byLocation:{title:"By location",subPath:"by-location",icon:gx},list:{title:"List",subPath:"list",icon:q6},options:{title:"Options",subPath:"options",icon:Z6,shouldRender:({deletion:e})=>!!e}};Object.freeze(ma);const y_=({display:e})=>e&&m.jsx("div",{className:"mt-3 mx-auto w-75",children:m.jsx(xt,{children:m.jsxs("div",{className:"d-flex gap-2",children:[m.jsx(je,{icon:KK,className:"mt-1"}),m.jsx("i",{children:"Could not calculate previous period because selected one does not have a strictly defined start date."})]})})});let zm;const jp=e=>{const{children:t,visitsInfo:n,getVisits:r,cancelGetVisits:i,deletion:o,exportCsv:a,isOrphanVisits:s=!1}=e,{visits:l,prevVisits:c,loading:f,errorData:d,fallbackInterval:p}=n,[{dateRange:v,visitsFilter:g,loadPrevInterval:y},x]=MU(),_=_r("visits"),[b,w]=R.useState(),S=R.useCallback(({startDate:j,endDate:k},U)=>{x({dateRange:{startDate:j??void 0,endDate:k??void 0}}),w(U)},[x]),E=R.useRef(v??p??(_==null?void 0:_.defaultInterval)??"last30Days"),[C,T]=R.useState([]),[A,D]=R.useState(),N=R.useRef(!0),{search:I}=gr(),F=R.useCallback(j=>j?`${j}${I}`:I,[I]),K=R.useMemo(()=>jy(l),[l]),W=R.useMemo(()=>c&&jy(c),[c]),{os:X,browsers:Q,referrers:ne,countries:Z,cities:z,citiesForMap:B,visitedUrls:H}=R.useMemo(()=>qO(K),[K]),ee=R.useMemo(()=>qO(W??[]),[W]),q=R.useMemo(()=>Object.fromEntries([["Visits",Object.assign(K,{type:"main"})],W&&["Previous period",Object.assign(W,{type:"previous"})],C.length>0&&[A??"Selected",Object.assign(C,{type:"highlighted"})]].filter(Boolean)),[A,C,W,K]),te=R.useMemo(()=>({...g,excludeBots:g.excludeBots??(_==null?void 0:_.excludeBots),loadPrevInterval:y??(_==null?void 0:_.loadPrevInterval)}),[y,g,_==null?void 0:_.excludeBots,_==null?void 0:_.loadPrevInterval]),ie=R.useMemo(()=>Object.values(B),[B]),ae=R.useCallback(j=>{zm=void 0,T(j)},[]),fe=R.useCallback((j,k)=>{const U=`${j}_${k}`;zm===U?(T([]),D(void 0),zm=void 0):(T(K.filter(J=>J[j]===k)),D(k),zm=U)},[K]);return R.useEffect(()=>i,[i]),R.useEffect(()=>{const j=v??pB(E.current),{loadPrevInterval:k,...U}=te,J={doIntervalFallback:N.current,loadPrevInterval:k};r({dateRange:j,filter:U},J),ae([]),N.current=!1},[v,g,r,te,ae]),R.useEffect(()=>{p&&E.current===((_==null?void 0:_.defaultInterval)??"last30Days")&&(E.current=p)},[p,_==null?void 0:_.defaultInterval]),m.jsxs(m.Fragment,{children:[t,m.jsx("section",{className:"mt-3",children:m.jsxs("div",{className:"row flex-md-row-reverse",children:[m.jsx("div",{className:"col-lg-7 col-xl-6",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(_P,{disabled:f,dateRangeOrInterval:b??v??E.current,defaultText:"All visits",onDatesChange:S})}),m.jsx(RU,{disabled:f,className:"ms-0 ms-md-2 mt-3 mt-md-0",isOrphanVisits:s,withPrevInterval:!0,selected:te,onChange:({loadPrevInterval:j,...k})=>x({visitsFilter:k,loadPrevInterval:j})})]})}),l.length>0&&m.jsx("div",{className:"col-lg-5 col-xl-6 mt-3 mt-lg-0",children:m.jsxs("div",{className:"d-flex",children:[m.jsx(KB,{className:"btn-md-block",amount:K.length,onClick:()=>a(K)}),m.jsxs(Ke,{outline:!0,disabled:C.length===0,className:"btn-md-block ms-2",onClick:()=>ae([]),children:["Clear selection ",C.length>0&&m.jsxs(m.Fragment,{children:["(",Gt(C.length),")"]})]})]})})]})}),m.jsxs("section",{className:"mt-3",children:[m.jsx($U,{info:n}),!f&&!d&&m.jsxs(m.Fragment,{children:[m.jsx(AD,{fill:!0,children:Object.values(ma).map(({title:j,icon:k,subPath:U,shouldRender:J},Y)=>!J||J(e)?m.jsxs(pd,{to:F(U),replace:!0,children:[m.jsx(je,{icon:k}),m.jsx("span",{className:"ms-2 d-none d-lg-inline",children:j})]},Y):void 0).filter(Boolean)}),m.jsx(Kn,{children:m.jsxs(Xy,{children:[m.jsx(ot,{path:ma.byTime.subPath,element:m.jsxs(hv,{showFallback:l.length===0,children:[m.jsx("div",{className:"col-12 mt-3","data-testid":"line-chart-container",children:m.jsx(NU,{visitsGroups:q,setSelectedVisits:ae})}),m.jsx(y_,{display:!!te.loadPrevInterval&&!c})]})}),m.jsx(ot,{path:ma.byContext.subPath,element:m.jsxs(hv,{showFallback:l.length===0,children:[m.jsx("div",{className:Ce("mt-3 col-lg-6",{"col-xl-4":!s}),children:m.jsx(DR,{title:"Operating systems",stats:X,prevStats:ee.os})}),m.jsx("div",{className:Ce("mt-3 col-lg-6",{"col-xl-4":!s}),children:m.jsx(DR,{title:"Browsers",stats:Q,prevStats:ee.browsers})}),m.jsx("div",{className:Ce("mt-3",{"col-xl-4":!s,"col-lg-6":s}),children:m.jsx(Bm,{title:"Referrers",withPagination:!1,stats:ne,prevStats:ee.referrers,highlightedStats:$m(C,"referer"),highlightedLabel:A,sortingItems:{name:"Referrer name",amount:"Visits amount"},onClick:j=>fe("referer",j)})}),s&&m.jsx("div",{className:"mt-3 col-lg-6",children:m.jsx(Bm,{title:"Visited URLs",stats:H,prevStats:ee.visitedUrls,highlightedStats:$m(C,"visitedUrl"),highlightedLabel:A,sortingItems:{visitedUrl:"Visited URL",amount:"Visits amount"},onClick:j=>fe("visitedUrl",j)})}),m.jsx("div",{className:"col-12",children:m.jsx(y_,{display:!!te.loadPrevInterval&&!c})})]})}),m.jsx(ot,{path:ma.byLocation.subPath,element:m.jsxs(hv,{showFallback:l.length===0,children:[m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(Bm,{title:"Countries",stats:Z,prevStats:ee.countries,highlightedStats:$m(C,"country"),highlightedLabel:A,sortingItems:{name:"Country name",amount:"Visits amount"},onClick:j=>fe("country",j)})}),m.jsx("div",{className:"col-lg-6 mt-3",children:m.jsx(Bm,{title:"Cities",stats:z,prevStats:ee.cities,highlightedStats:$m(C,"city"),highlightedLabel:A,extraHeaderContent:j=>ie.length>0&&m.jsx(W4e,{modalTitle:"Cities",locations:ie,activeCities:j}),sortingItems:{name:"City name",amount:"Visits amount"},onClick:j=>fe("city",j)})}),m.jsx("div",{className:"col-12",children:m.jsx(y_,{display:!!te.loadPrevInterval&&!c})})]})}),m.jsx(ot,{path:ma.list.subPath,element:m.jsx("div",{className:"col-12",children:m.jsx(s$e,{visits:K,selectedVisits:C,setSelectedVisits:ae})})}),o&&m.jsx(ot,{path:ma.options.subPath,element:m.jsx("div",{className:"col-12 mt-3",children:m.jsx(H4e,{...o})})}),m.jsx(ot,{path:"*",element:m.jsx(qS,{replace:!0,to:F(ma.byTime.subPath)})})]})})]})]})]})},FU=Bi(({getDomainVisits:e,domainVisits:t,cancelGetDomainVisits:n})=>{const{ReportExporter:r}=Rt(FU),{domain:i=""}=Cu(),[o,a=o]=i.split("_"),s=R.useCallback((c,f)=>e({domain:a,options:f,params:c}),[a,e]),l=R.useCallback(c=>r.exportVisits(`domain_${o}_visits.csv`,c),[o,r]);return m.jsx(jp,{getVisits:s,cancelGetVisits:n,visitsInfo:t,exportCsv:l,children:m.jsx(Tp,{visits:t.visits,title:`"${o}" visits`})})},()=>[nr.visits]),l$e=$t(FU,["ReportExporter"]),BU=Bi(({getNonOrphanVisits:e,nonOrphanVisits:t,cancelGetNonOrphanVisits:n})=>{const{ReportExporter:r}=Rt(BU),i=R.useCallback(a=>r.exportVisits("non_orphan_visits.csv",a),[r]),o=R.useCallback((a,s)=>e({options:s,params:a}),[e]);return m.jsx(jp,{getVisits:o,cancelGetVisits:n,visitsInfo:t,exportCsv:i,children:m.jsx(Tp,{title:"Non-orphan visits",visits:t.visits})})},()=>[nr.visits]),c$e=$t(BU,["ReportExporter"]),UU=Bi(({getOrphanVisits:e,orphanVisits:t,cancelGetOrphanVisits:n,deleteOrphanVisits:r,orphanVisitsDeletion:i})=>{const o=es("orphanVisitsDeletion"),{ReportExporter:a}=Rt(UU),s=R.useCallback(f=>a.exportVisits("orphan_visits.csv",f),[a]),l=R.useCallback((f,d)=>{var p;return e({options:d,params:f,orphanVisitsType:(p=f.filter)==null?void 0:p.orphanVisitsType})},[e]),c=R.useMemo(()=>o?{deleteVisits:r,visitsDeletion:i}:void 0,[r,i,o]);return m.jsx(jp,{getVisits:l,cancelGetVisits:n,visitsInfo:t,exportCsv:s,deletion:c,isOrphanVisits:!0,children:m.jsx(Tp,{title:"Orphan visits",visits:t.visits})})},()=>[nr.orphanVisits]),u$e=$t(UU,["ReportExporter"]),zU="shlink/orphanVisits",f$e={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},d$e=e=>Ep({typePrefix:`${zU}/getNonOrphanVisits`,createLoaders:({options:t})=>{const n=e(),{doIntervalFallback:r=!1}=t,i=async a=>n.getNonOrphanVisits(a),o=Sp(r,a=>n.getNonOrphanVisits(a));return{visitsLoader:i,lastVisitLoader:o}},shouldCancel:t=>t().orphanVisits.cancelLoad}),h$e=e=>Cp({name:zU,initialState:f$e,asyncThunkCreator:e,filterCreatedVisits:({params:t},n)=>{const{startDate:r,endDate:i}=(t==null?void 0:t.dateRange)??{};return n.filter(({visit:o})=>Op(o.date,r,i))}}),VU="shlink/orphanVisits",p$e={visits:[],loading:!1,cancelLoad:!1,errorData:null,progress:null},m$e=(e,t)=>!t||t===e.type,v$e=({data:e,...t},n)=>{const r=e.filter(i=>pP(i)&&m$e(i,n));return{...t,data:r}},g$e=e=>Ep({typePrefix:`${VU}/getOrphanVisits`,createLoaders:({orphanVisitsType:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=async s=>r.getOrphanVisits({...s,type:t}).then(l=>v$e(l,t)),a=Sp(i,s=>r.getOrphanVisits(s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().orphanVisits.cancelLoad}),y$e=(e,t)=>Cp({name:VU,initialState:p$e,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,r=>({...r,visits:[]}))},filterCreatedVisits:({params:n},r)=>{const{startDate:i,endDate:o}=(n==null?void 0:n.dateRange)??{};return r.filter(({visit:a,shortUrl:s})=>!s&&Op(a.date,i,o))}}),WU="shlink/orphanVisitsDeletion",VR={deletedVisits:0,deleting:!1,error:!1},b$e=e=>fn(`${WU}/deleteOrphanVisits`,()=>e().deleteOrphanVisits()),_$e=e=>Qt({name:WU,initialState:VR,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{deletedVisits:i}=r;return{...VR,deletedVisits:i}})}}),HU="shlink/shortUrlVisits",x$e={visits:[],shortCode:"",loading:!1,errorData:null,cancelLoad:!1,progress:null},w$e=e=>Ep({typePrefix:`${HU}/getShortUrlVisits`,createLoaders:({shortCode:t,domain:n,options:r})=>{const i=e(),{doIntervalFallback:o=!1}=r,a=l=>i.getShortUrlVisits(t,{...l,domain:n}),s=Sp(o,l=>i.getShortUrlVisits(t,{...l,domain:n}));return{visitsLoader:a,lastVisitLoader:s}},shouldCancel:t=>t().shortUrlVisits.cancelLoad}),O$e=(e,t)=>Cp({name:HU,initialState:x$e,asyncThunkCreator:e,extraReducers:n=>{n.addCase(t.fulfilled,(r,{payload:i})=>r.shortCode===i.shortCode&&r.domain===i.domain?{...r,visits:[]}:r)},filterCreatedVisits:({shortCode:n,domain:r,params:i},o)=>vB(o,{shortCode:n,domain:r},i==null?void 0:i.dateRange)}),GU="shlink/shortUrlVisitsDeletion",WR={shortCode:"",deletedVisits:0,deleting:!1,error:!1},S$e=e=>fn(`${GU}/deleteShortUrlVisits`,async({shortCode:t,domain:n})=>({...await e().deleteShortUrlVisits(t,n),shortCode:t,domain:n})),E$e=e=>Qt({name:GU,initialState:WR,reducers:{},extraReducers:t=>{t.addCase(e.pending,n=>({...n,deleting:!0,error:!1})),t.addCase(e.rejected,(n,{error:r})=>({...n,deleting:!1,error:!0,errorData:zr(r)})),t.addCase(e.fulfilled,(n,{payload:r})=>{const{shortCode:i,domain:o,deletedVisits:a}=r;return{...WR,shortCode:i,domain:o,deletedVisits:a}})}}),qU="shlink/tagVisits",C$e={visits:[],tag:"",loading:!1,cancelLoad:!1,errorData:null,progress:null},P$e=e=>Ep({typePrefix:`${qU}/getTagVisits`,createLoaders:({tag:t,options:n})=>{const r=e(),{doIntervalFallback:i=!1}=n,o=s=>r.getTagVisits(t,s),a=Sp(i,async s=>r.getTagVisits(t,s));return{visitsLoader:o,lastVisitLoader:a}},shouldCancel:t=>t().tagVisits.cancelLoad}),T$e=e=>Cp({name:qU,initialState:C$e,asyncThunkCreator:e,filterCreatedVisits:({tag:t,params:n},r)=>yB(r,t,n==null?void 0:n.dateRange)}),KU="shlink/visitsOverview",Vm={nonOrphanVisits:{total:0},orphanVisits:{total:0},loading:!1,error:!1},HR=e=>e.filter(({visit:t})=>t.potentialBot).length,j$e=e=>fn(`${KU}/loadVisitsOverview`,()=>e().getVisitsOverview().then(({nonOrphanVisits:t,visitsCount:n=0,orphanVisits:r,orphanVisitsCount:i=0})=>({nonOrphanVisits:{total:(t==null?void 0:t.total)??n,nonBots:t==null?void 0:t.nonBots,bots:t==null?void 0:t.bots},orphanVisits:{total:(r==null?void 0:r.total)??i,nonBots:r==null?void 0:r.nonBots,bots:r==null?void 0:r.bots}}))),A$e=e=>Qt({name:KU,initialState:Vm,reducers:{},extraReducers:t=>{t.addCase(e.pending,()=>({...Vm,loading:!0})),t.addCase(e.rejected,()=>({...Vm,error:!0})),t.addCase(e.fulfilled,(n,{payload:r})=>({...Vm,...r})),t.addCase(Xu,({nonOrphanVisits:n,orphanVisits:r,...i},{payload:o})=>{const{nonOrphanVisits:a,orphanVisits:s}=nMe(o.createdVisits),l=a.length,c=HR(a),f=l-c,d=s.length,p=HR(s),v=d-p;return{...i,nonOrphanVisits:{total:n.total+l,bots:n.bots&&n.bots+c,nonBots:n.nonBots&&n.nonBots+f},orphanVisits:{total:r.total+d,bots:r.bots&&r.bots+p,nonBots:r.nonBots&&r.nonBots+v}}})}}),k$e=({shortUrl:e,loading:t,shortUrlVisits:n})=>{const{visits:r}=n,i=(e==null?void 0:e.shortUrl)??"",o=(e==null?void 0:e.longUrl)??"",a=e==null?void 0:e.title;return m.jsxs(Tp,{title:m.jsxs(m.Fragment,{children:["Visits for ",m.jsx(mr,{href:i})]}),visits:r,shortUrl:e,children:[m.jsx("hr",{}),m.jsxs("div",{children:["Created: ",e?m.jsxs("span",{children:[m.jsx("b",{id:"created",className:"short-url-visits-header__created-at",children:m.jsx(Cy,{date:e.dateCreated,relative:!0})}),m.jsx(br,{placement:"bottom",target:"created",children:m.jsx(Cy,{date:e.dateCreated})})]}):m.jsx("small",{children:"Loading..."})]}),m.jsxs("div",{className:"long-url-container",children:[`${a?"Title":"Long URL"}: `,t&&m.jsx("small",{children:"Loading..."}),!t&&m.jsx(mr,{href:o,children:a??o})]})]})},YU=Bi(({shortUrlVisits:e,shortUrlVisitsDeletion:t,shortUrlsDetails:n,getShortUrlVisits:r,getShortUrlsDetails:i,deleteShortUrlVisits:o,cancelGetShortUrlVisits:a})=>{const s=es("shortUrlVisitsDeletion"),{ReportExporter:l}=Rt(YU),c=bP(),f=R.useMemo(()=>{var g;return(g=n.shortUrls)==null?void 0:g.get(c)},[c,n.shortUrls]),d=R.useCallback((g,y)=>r({...c,options:y,params:g}),[r,c]),p=R.useCallback(g=>l.exportVisits(`short-url_${f==null?void 0:f.shortUrl.replace(/https?:\/\//g,"")}_visits.csv`,g),[l,f==null?void 0:f.shortUrl]),v=R.useMemo(()=>s?{deleteVisits:()=>o(c),visitsDeletion:t}:void 0,[o,c,t,s]);return R.useEffect(()=>{i([c])},[c,i]),m.jsx(jp,{getVisits:d,cancelGetVisits:a,visitsInfo:e,exportCsv:p,deletion:v,children:m.jsx(k$e,{shortUrl:f,loading:n.loading,shortUrlVisits:e})})},e=>e.shortCode?[nr.shortUrlVisits(uP(e.shortCode))]:[]),N$e=$t(YU,["ReportExporter"]),M$e=({tagVisits:e,colorGenerator:t})=>{const{visits:n,tag:r}=e;return m.jsx(Tp,{title:m.jsxs("span",{className:"d-flex align-items-center justify-content-center",children:[m.jsx("span",{className:"me-2",children:"Visits for"}),m.jsx(hb,{text:r,colorGenerator:t})]}),visits:n})},ZU=Bi(({getTagVisits:e,tagVisits:t,cancelGetTagVisits:n})=>{const{ColorGenerator:r,ReportExporter:i}=Rt(ZU),{tag:o=""}=Cu(),a=R.useCallback((l,c)=>e({tag:o,params:l,options:c}),[e,o]),s=R.useCallback(l=>i.exportVisits(`tag_${o}_visits.csv`,l),[i,o]);return m.jsx(jp,{getVisits:a,cancelGetVisits:n,visitsInfo:t,exportCsv:s,children:m.jsx(M$e,{tagVisits:t,colorGenerator:r})})},()=>[nr.visits]),L$e=$t(ZU,["ColorGenerator","ReportExporter"]),EP=({title:e,colors:t,getVisitsForComparison:n,visitsComparisonInfo:r,cancelGetVisitsComparison:i})=>{const{loading:o,visitsGroups:a}=r,s=_r("visits"),l=R.useMemo(()=>Object.keys(a).reduce((b,w,S)=>(b[w]=Object.assign(jy(a[w]),{color:(t==null?void 0:t[w])??AU(S)}),b),{}),[t,a]),c=R.useMemo(()=>Object.values(a).every(b=>b.length===0),[a]),[{dateRange:f,visitsFilter:d},p]=MU(),[v,g]=R.useState(),y=R.useCallback(({startDate:b,endDate:w},S)=>{p({dateRange:{startDate:b??void 0,endDate:w??void 0}}),g(S)},[p]),x=R.useRef(f??(s==null?void 0:s.defaultInterval)??"last30Days"),_=R.useMemo(()=>({...d,excludeBots:d.excludeBots??(s==null?void 0:s.excludeBots)}),[d,s==null?void 0:s.excludeBots]);return R.useEffect(()=>{const b=f??pB(x.current);return n({params:{dateRange:b,filter:_}}),i},[i,f,n,_]),m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"mb-3",children:m.jsxs(xt,{bodyClassName:"d-flex",children:[m.jsx(db,{}),m.jsx("h3",{className:"mb-0 flex-grow-1 text-center",children:e})]})}),m.jsx("div",{className:"col-lg-7 col-xl-6 offset-lg-5 offset-xl-6 mb-3",children:m.jsxs("div",{className:"d-md-flex",children:[m.jsx("div",{className:"flex-grow-1",children:m.jsx(_P,{disabled:o,defaultText:"All visits",dateRangeOrInterval:v??x.current,onDatesChange:y})}),m.jsx(RU,{disabled:o,className:"ms-0 ms-md-2 mt-3 mt-md-0",selected:_,onChange:({orphanVisitsType:b,excludeBots:w})=>p({visitsFilter:{orphanVisitsType:b,excludeBots:w}})})]})}),m.jsx($U,{info:r}),!o&&m.jsx(hv,{showFallback:c,children:m.jsx(NU,{visitsGroups:l})})]})},R$e=Bi(({getDomainVisitsForComparison:e,domainVisitsComparison:t,cancelGetDomainVisitsComparison:n})=>{const r=vP("domains"),i=R.useCallback(o=>e({...o,domains:r}),[r,e]);return m.jsx(EP,{title:`Comparing "${r.join('", "')}"`,getVisitsForComparison:i,visitsComparisonInfo:t,cancelGetVisitsComparison:n})},()=>[nr.visits]),$$e=({visitsLoaders:e,shouldCancel:t,progressChanged:n})=>{const r=Object.keys(e),i=Math.max(1,Math.round(4/r.length)),o=Object.fromEntries(r.map(l=>[l,0])),a=(l,c)=>{o[l]=c;const f=Object.values(o),d=f.reduce((p,v)=>p+v,0);n(d/f.length)},s=Object.entries(e).map(([l,c])=>[l,bB({visitsLoader:c,batchSize:i,shouldCancel:t,progressChanged:f=>a(l,f)})]);return async l=>{const c=await Promise.all(s.map(async([f,d])=>{const p=await d(l);return[f,p]}));return Object.fromEntries(c)}},CP=({typePrefix:e,createLoaders:t,shouldCancel:n})=>{const r=un(`${e}/progressChanged`),i=fn(e,async(o,{getState:a,dispatch:s})=>{const l=t(o),c=await $$e({visitsLoaders:l,shouldCancel:()=>n(a),progressChanged:f=>s(r(f))})(BO(o.params));return{...o,visitsGroups:c}});return Object.assign(i,{progressChanged:r})},PP=({name:e,asyncThunkCreator:t,initialState:n,filterCreatedVisitsForGroup:r})=>{const{pending:i,rejected:o,fulfilled:a,progressChanged:s}=t,{reducer:l,actions:c}=Qt({name:e,initialState:n,reducers:{cancelGetVisits:d=>({...d,cancelLoad:!0})},extraReducers:d=>{d.addCase(i,()=>({...n,loading:!0})),d.addCase(o,(p,{error:v})=>({...n,errorData:zr(v)??null})),d.addCase(a,(p,{payload:v})=>({...p,...v,loading:!1,progress:null,errorData:null})),d.addCase(s,(p,{payload:v})=>({...p,progress:v})),d.addCase(Xu,(p,{payload:v})=>{const{visitsGroups:g,...y}=p,x=Object.keys(g).map(b=>{const w=r({...y,groupKey:b},v.createdVisits).map(({visit:S})=>S);return[b,[...w,...g[b]]]}),_=Object.fromEntries(x);return{...y,visitsGroups:_}})}}),{cancelGetVisits:f}=c;return{reducer:l,cancelGetVisits:f}},XU="shlink/domainVisitsComparison",I$e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},D$e=e=>CP({typePrefix:`${XU}/getDomainVisitsForComparison`,createLoaders:({domains:t})=>{const n=e(),r=t.map(i=>[i,o=>n.getDomainVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:t=>t().domainVisitsComparison.cancelLoad}),F$e=e=>PP({name:XU,initialState:I$e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>gB(r,t,n==null?void 0:n.dateRange)}),QU="shlink/shortUrlVisitsComparison",B$e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},U$e=e=>CP({typePrefix:`${QU}/getShortUrlVisitsForComparison`,createLoaders:({shortUrls:t})=>{const n=e(),r=t.map(i=>[fP(i),o=>n.getShortUrlVisits(i.shortCode,{...o,domain:i.domain})]);return Object.fromEntries(r)},shouldCancel:t=>t().shortUrlVisitsComparison.cancelLoad}),z$e=e=>PP({name:QU,initialState:B$e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>vB(r,sB(t),n==null?void 0:n.dateRange)}),JU="shlink/tagVisitsComparison",V$e={visitsGroups:{},loading:!1,cancelLoad:!1,errorData:null,progress:null},W$e=e=>CP({typePrefix:`${JU}/getTagVisitsForComparison`,createLoaders:({tags:t})=>{const n=e(),r=t.map(i=>[i,o=>n.getTagVisits(i,o)]);return Object.fromEntries(r)},shouldCancel:t=>t().tagVisitsComparison.cancelLoad}),H$e=e=>PP({name:JU,initialState:V$e,asyncThunkCreator:e,filterCreatedVisitsForGroup:({groupKey:t,params:n},r)=>yB(r,t,n==null?void 0:n.dateRange)}),G$e=Bi(({getShortUrlVisitsForComparison:e,shortUrlVisitsComparison:t,cancelGetShortUrlVisitsComparison:n,shortUrlsDetails:r,getShortUrlsDetails:i})=>{const o=vP("short-urls"),a=R.useMemo(()=>o.map(sB),[o]),s=R.useCallback(f=>e({...f,shortUrls:a}),[e,a]),l=R.useMemo(()=>{var f;return[...((f=r.shortUrls)==null?void 0:f.values())??[]]},[r.shortUrls]),c=R.useMemo(()=>{const{visitsGroups:f,loading:d,...p}=t,v=l.reduce((g,y)=>(g[y.shortUrl]=f[fP(y)]??[],g),{});return{...p,visitsGroups:v,loading:d||r.loading}},[t,r.loading,l]);return R.useEffect(()=>{a.length>0&&i(a)},[i,a]),m.jsx(EP,{title:m.jsx("span",{"data-testid":"title",children:r.loading?"Loading...":`Comparing ${l.length} short URLs`}),getVisitsForComparison:s,visitsComparisonInfo:c,cancelGetVisitsComparison:n})},()=>[nr.visits]),e9=Bi(({getTagVisitsForComparison:e,tagVisitsComparison:t,cancelGetTagVisitsComparison:n})=>{const{ColorGenerator:r}=Rt(e9),i=vP("tags"),o=R.useCallback(l=>e({...l,tags:i}),[e,i]),{visitsGroups:a}=t,s=R.useMemo(()=>Object.keys(a).reduce((l,c)=>(l[c]=r.getColorForKey(c),l),{}),[r,a]);return m.jsx(EP,{title:m.jsxs(m.Fragment,{children:["Comparing ",i.map(l=>m.jsx(hb,{colorGenerator:r,text:l},l))]}),getVisitsForComparison:o,visitsComparisonInfo:t,cancelGetVisitsComparison:n,colors:s})},()=>[nr.visits]),q$e=$t(e9,["ColorGenerator"]),K$e=(e,t)=>{const n=(r,i)=>t([...r,"mercureInfo"],[...i,"createNewVisits","loadMercureInfo"]);e.serviceFactory("MapModal",()=>LU),e.factory("ShortUrlVisits",N$e),e.decorator("ShortUrlVisits",t(["shortUrlVisits","shortUrlVisitsDeletion","shortUrlsDetails","mercureInfo"],["getShortUrlVisits","deleteShortUrlVisits","getShortUrlsDetails","cancelGetShortUrlVisits","createNewVisits","loadMercureInfo"])),e.factory("TagVisits",L$e),e.decorator("TagVisits",n(["tagVisits"],["getTagVisits","cancelGetTagVisits"])),e.factory("TagVisitsComparison",q$e),e.decorator("TagVisitsComparison",n(["tagVisitsComparison"],["getTagVisitsForComparison","cancelGetTagVisitsForComparison"])),e.serviceFactory("DomainVisitsComparison",()=>R$e),e.decorator("DomainVisitsComparison",n(["domainVisitsComparison"],["getDomainVisitsForComparison","cancelGetDomainVisitsForComparison"])),e.serviceFactory("ShortUrlVisitsComparison",()=>G$e),e.decorator("ShortUrlVisitsComparison",n(["shortUrlVisitsComparison","shortUrlsDetails"],["getShortUrlVisitsForComparison","cancelGetShortUrlVisitsForComparison","getShortUrlsDetails"])),e.factory("DomainVisits",l$e),e.decorator("DomainVisits",n(["domainVisits"],["getDomainVisits","cancelGetDomainVisits"])),e.factory("OrphanVisits",u$e),e.decorator("OrphanVisits",n(["orphanVisits","orphanVisitsDeletion"],["getOrphanVisits","cancelGetOrphanVisits","deleteOrphanVisits"])),e.factory("NonOrphanVisits",c$e),e.decorator("NonOrphanVisits",n(["nonOrphanVisits"],["getNonOrphanVisits","cancelGetNonOrphanVisits"])),e.serviceFactory("VisitsParser",()=>n$e),e.serviceFactory("getShortUrlVisits",w$e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisits",r=>r.cancelGetVisits,"shortUrlVisitsReducerCreator"),e.serviceFactory("getShortUrlVisitsForComparison",U$e,"apiClientFactory"),e.serviceFactory("cancelGetShortUrlVisitsForComparison",r=>r.cancelGetVisits,"shortUrlVisitsComparisonReducerCreator"),e.serviceFactory("deleteShortUrlVisits",S$e,"apiClientFactory"),e.serviceFactory("getTagVisits",P$e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisits",r=>r.cancelGetVisits,"tagVisitsReducerCreator"),e.serviceFactory("getTagVisitsForComparison",W$e,"apiClientFactory"),e.serviceFactory("cancelGetTagVisitsForComparison",r=>r.cancelGetVisits,"tagVisitsComparisonReducerCreator"),e.serviceFactory("getDomainVisits",fMe,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisits",r=>r.cancelGetVisits,"domainVisitsReducerCreator"),e.serviceFactory("getDomainVisitsForComparison",D$e,"apiClientFactory"),e.serviceFactory("cancelGetDomainVisitsForComparison",r=>r.cancelGetVisits,"domainVisitsComparisonReducerCreator"),e.serviceFactory("getOrphanVisits",g$e,"apiClientFactory"),e.serviceFactory("cancelGetOrphanVisits",r=>r.cancelGetVisits,"orphanVisitsReducerCreator"),e.serviceFactory("deleteOrphanVisits",b$e,"apiClientFactory"),e.serviceFactory("getNonOrphanVisits",d$e,"apiClientFactory"),e.serviceFactory("cancelGetNonOrphanVisits",r=>r.cancelGetVisits,"nonOrphanVisitsReducerCreator"),e.serviceFactory("createNewVisits",()=>Xu),e.serviceFactory("loadVisitsOverview",j$e,"apiClientFactory"),e.serviceFactory("visitsOverviewReducerCreator",A$e,"loadVisitsOverview"),e.serviceFactory("visitsOverviewReducer",r=>r.reducer,"visitsOverviewReducerCreator"),e.serviceFactory("domainVisitsReducerCreator",dMe,"getDomainVisits"),e.serviceFactory("domainVisitsReducer",r=>r.reducer,"domainVisitsReducerCreator"),e.serviceFactory("nonOrphanVisitsReducerCreator",h$e,"getNonOrphanVisits"),e.serviceFactory("nonOrphanVisitsReducer",r=>r.reducer,"nonOrphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsReducerCreator",y$e,"getOrphanVisits","deleteOrphanVisits"),e.serviceFactory("orphanVisitsReducer",r=>r.reducer,"orphanVisitsReducerCreator"),e.serviceFactory("orphanVisitsDeletionReducerCreator",_$e,"deleteOrphanVisits"),e.serviceFactory("orphanVisitsDeletionReducer",r=>r.reducer,"orphanVisitsDeletionReducerCreator"),e.serviceFactory("shortUrlVisitsReducerCreator",O$e,"getShortUrlVisits","deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsReducer",r=>r.reducer,"shortUrlVisitsReducerCreator"),e.serviceFactory("shortUrlVisitsDeletionReducerCreator",E$e,"deleteShortUrlVisits"),e.serviceFactory("shortUrlVisitsDeletionReducer",r=>r.reducer,"shortUrlVisitsDeletionReducerCreator"),e.serviceFactory("tagVisitsReducerCreator",T$e,"getTagVisits"),e.serviceFactory("tagVisitsReducer",r=>r.reducer,"tagVisitsReducerCreator"),e.serviceFactory("tagVisitsComparisonReducerCreator",H$e,"getTagVisitsForComparison"),e.serviceFactory("tagVisitsComparisonReducer",r=>r.reducer,"tagVisitsComparisonReducerCreator"),e.serviceFactory("domainVisitsComparisonReducerCreator",F$e,"getDomainVisitsForComparison"),e.serviceFactory("domainVisitsComparisonReducer",r=>r.reducer,"domainVisitsComparisonReducerCreator"),e.serviceFactory("shortUrlVisitsComparisonReducerCreator",z$e,"getShortUrlVisitsForComparison"),e.serviceFactory("shortUrlVisitsComparisonReducer",r=>r.reducer,"shortUrlVisitsComparisonReducerCreator")},Df=({children:e,to:t,className:n,...r})=>m.jsx(k6,{className:({isActive:i})=>Ce("aside-menu__item",n,{"aside-menu__item--selected":i}),to:t,...r,children:e}),Y$e=({routePrefix:e,showOnMobile:t=!1})=>{const{pathname:n}=gr(),r=Ce("aside-menu",{"aside-menu--hidden":!t}),i=o=>`${e}${o}`;return m.jsx("aside",{className:r,children:m.jsxs("nav",{className:"nav flex-column aside-menu__nav",children:[m.jsxs(Df,{to:i("/overview"),children:[m.jsx(je,{fixedWidth:!0,icon:CK}),m.jsx("span",{className:"aside-menu__item-text",children:"Overview"})]}),m.jsxs(Df,{to:i("/list-short-urls/1"),className:Ce({"aside-menu__item--selected":n.match("/list-short-urls")!==null}),children:[m.jsx(je,{fixedWidth:!0,icon:q6}),m.jsx("span",{className:"aside-menu__item-text",children:"List short URLs"})]}),m.jsxs(Df,{to:i("/create-short-url"),children:[m.jsx(je,{fixedWidth:!0,icon:NK,flip:"horizontal"}),m.jsx("span",{className:"aside-menu__item-text",children:"Create short URL"})]}),m.jsxs(Df,{to:i("/manage-tags"),children:[m.jsx(je,{fixedWidth:!0,icon:K6}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage tags"})]}),m.jsxs(Df,{to:i("/manage-domains"),children:[m.jsx(je,{fixedWidth:!0,icon:iK}),m.jsx("span",{className:"aside-menu__item-text",children:"Manage domains"})]})]})})},t9=({createNotFound:e})=>{const{TagsList:t,ShortUrlsList:n,CreateShortUrl:r,ShortUrlVisits:i,TagVisits:o,DomainVisits:a,OrphanVisits:s,NonOrphanVisits:l,Overview:c,EditShortUrl:f,ManageDomains:d,TagVisitsComparison:p,DomainVisitsComparison:v,ShortUrlVisitsComparison:g,ShortUrlRedirectRules:y}=Rt(t9),x=gr(),_=ds(),[b,w,S,E]=qt();R.useEffect(()=>E(),[x,E]);const C=Ce("shlink-layout__burger-icon",{"shlink-layout__burger-icon--active":b}),T=vMe(S,E),A=es("shortUrlRedirectRules");return m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:Jq,className:C,onClick:w}),m.jsx("div",{...T,className:"shlink-layout__swipeable",children:m.jsxs("div",{className:"shlink-layout__swipeable-inner",children:[m.jsx(Y$e,{routePrefix:_,showOnMobile:b}),m.jsx("div",{className:"shlink-layout__container",onPointerDown:()=>E(),children:m.jsx("div",{className:"container-xl",children:m.jsxs(Xy,{children:[m.jsx(ot,{index:!0,element:m.jsx(qS,{replace:!0,to:"overview"})}),m.jsx(ot,{path:"/overview",element:m.jsx(c,{})}),m.jsx(ot,{path:"/list-short-urls/:page",element:m.jsx(n,{})}),m.jsx(ot,{path:"/create-short-url",element:m.jsx(r,{})}),m.jsx(ot,{path:"/short-code/:shortCode/visits/*",element:m.jsx(i,{})}),m.jsx(ot,{path:"/short-code/:shortCode/edit",element:m.jsx(f,{})}),A&&m.jsx(ot,{path:"/short-code/:shortCode/redirect-rules",element:m.jsx(y,{})}),m.jsx(ot,{path:"/short-urls/compare-visits",element:m.jsx(g,{})}),m.jsx(ot,{path:"/tag/:tag/visits/*",element:m.jsx(o,{})}),m.jsx(ot,{path:"/tags/compare-visits",element:m.jsx(p,{})}),m.jsx(ot,{path:"/domain/:domain/visits/*",element:m.jsx(a,{})}),m.jsx(ot,{path:"/orphan-visits/*",element:m.jsx(s,{})}),m.jsx(ot,{path:"/non-orphan-visits/*",element:m.jsx(l,{})}),m.jsx(ot,{path:"/manage-tags",element:m.jsx(t,{})}),m.jsx(ot,{path:"/manage-domains",element:m.jsx(d,{})}),m.jsx(ot,{path:"/domains/compare-visits",element:m.jsx(v,{})}),e&&m.jsx(ot,{path:"*",element:e("/list-short-urls/1")})]})})})]})})]})},Z$e=$t(t9,["TagsList","ShortUrlsList","CreateShortUrl","ShortUrlVisits","TagVisits","DomainVisits","OrphanVisits","NonOrphanVisits","Overview","EditShortUrl","ManageDomains","TagVisitsComparison","DomainVisitsComparison","ShortUrlVisitsComparison","ShortUrlRedirectRules"]),X$e=!0,Q$e=e=>qD({devTools:!X$e,reducer:IE({mercureInfo:e.mercureInfoReducer,shortUrlsList:e.shortUrlsListReducer,shortUrlCreation:e.shortUrlCreationReducer,shortUrlDeletion:e.shortUrlDeletionReducer,shortUrlEdition:e.shortUrlEditionReducer,shortUrlsDetails:e.shortUrlsDetailsReducer,shortUrlVisits:e.shortUrlVisitsReducer,shortUrlVisitsDeletion:e.shortUrlVisitsDeletionReducer,shortUrlVisitsComparison:e.shortUrlVisitsComparisonReducer,tagVisits:e.tagVisitsReducer,tagVisitsComparison:e.tagVisitsComparisonReducer,domainVisits:e.domainVisitsReducer,domainVisitsComparison:e.domainVisitsComparisonReducer,orphanVisits:e.orphanVisitsReducer,orphanVisitsDeletion:e.orphanVisitsDeletionReducer,nonOrphanVisits:e.nonOrphanVisitsReducer,tagsList:e.tagsListReducer,tagDelete:e.tagDeleteReducer,tagEdit:e.tagEditReducer,domainsList:e.domainsListReducer,visitsOverview:e.visitsOverviewReducer,shortUrlRedirectRules:e.shortUrlRedirectRulesReducer,shortUrlRedirectRulesSaving:e.setShortUrlRedirectRulesReducer}),middleware:t=>t({immutableCheck:!1,serializableCheck:!1})}),J$e=e=>{e.factory("Main",Z$e),e.factory("store",Q$e)},Ui=new z6,{container:e6e}=Ui,t6e=e=>t=>Object.fromEntries(e.map(n=>[n,t[n]])),n6e=(e,t)=>(...n)=>e[t](...n),r6e=(e,t)=>({...e,[t]:n6e(e6e,t)}),Qu=(e,t=[])=>y6(e?t6e(e):null,t.reduce(r6e,{}));J$e(Ui);DRe(Ui,Qu);s4e(Ui,Qu);K$e(Ui,Qu);jMe(Ui);CMe(Ui,Qu);BMe(Ui,Qu);O4e(Ui);YLe(Ui,Qu);let GR;const i6e=e=>({serverVersion:t,apiClient:n,settings:r,routesPrefix:i="",createNotFound:o,tagColorsStorage:a})=>{const s=mRe(t),l=R.useRef(),[c,f]=R.useState(),d=xl(),p=R.useMemo(()=>d?R.Fragment:A6,[d]);return R.useEffect(()=>{GR=n,e.value("apiClientFactory",()=>GR),a&&e.value("TagColorsStorage",a);const{container:v}=e,{Main:g,store:y,loadMercureInfo:x,listTags:_}=v;l.current=m.jsx(g,{createNotFound:o}),f(y),y.dispatch(x(r)),y.dispatch(_())},[n,o,r,a]),c?m.jsx(b6,{store:c,children:m.jsx(d5,{value:r??{},children:m.jsx(pRe,{value:s,children:m.jsx(WNe,{value:i,children:m.jsx(p,{children:l.current})})})})}):m.jsx(m.Fragment,{})},o6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=",a6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==",s6e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC",l6e=()=>{delete dR.Icon.Default.prototype._getIconUrl,dR.Icon.Default.mergeOptions({iconRetinaUrl:a6e,iconUrl:o6e,shadowUrl:s6e})};l6e();const c6e=i6e(Ui);function Ay(e){return t=>{const{resetSelectedServer:n}=t;return R.useEffect(()=>{n()},[n]),m.jsx(e,{...t})}}let u6e=class extends R.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){const{console:n=globalThis.console}=this.props;n.error(t)}render(){const{hasError:t}=this.state,{location:n=globalThis.location}=this.props;if(t)return m.jsx("div",{className:"home",children:m.jsxs(xt,{className:"p-4",children:[m.jsx("h1",{children:"Oops! This is awkward :S"}),m.jsx("p",{children:"It seems that something went wrong. Try refreshing the page or just click this button."}),m.jsx("br",{}),m.jsx(Ke,{outline:!0,color:"primary",onClick:()=>n.reload(),children:"Take me back"})]})});const{children:r}=this.props;return r}};const f6e=({id:e,name:t})=>m.jsxs(OD,{tag:St,to:`/server/${e}`,className:"servers-list__server-item",children:[t,m.jsx(je,{icon:DK,className:"servers-list__server-item-icon"})]}),n9=({servers:e,children:t,embedded:n=!1})=>m.jsxs(m.Fragment,{children:[t&&m.jsx("div",{"data-testid":"title",className:"mb-0 fs-5 fw-normal lh-sm",children:t}),e.length>0&&m.jsx(_D,{"data-testid":"list",tag:"div",className:Ce("servers-list__list-group",{"servers-list__list-group--embedded":n}),children:e.map(({id:r,name:i})=>m.jsx(f6e,{id:r,name:i},r))})]}),r9=({color:e=th,className:t})=>m.jsx("svg",{className:t,viewBox:"0 0 512 512",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:m.jsxs("g",{fill:e,children:[m.jsx("path",{d:" M 23.71 85.08 C 17.22 49.81 49.44 14.86 85.08 18.12 C 118.83 19.21 145.72 53.33 139.45 86.37 C 155.64 102.30 171.32 118.83 187.87 134.36 C 198.32 111.73 208.84 89.12 219.57 66.62 C 226.05 53.84 243.47 48.74 255.73 56.27 C 263.76 62.10 270.34 69.69 277.25 76.75 C 286.28 86.61 285.72 102.89 276.31 112.31 C 223.38 165.37 170.38 218.37 117.35 271.34 C 107.72 280.99 91.01 281.25 81.11 271.86 C 74.39 264.94 66.82 258.69 61.24 250.77 C 53.72 238.52 58.85 221.07 71.64 214.62 C 94.11 203.87 116.72 193.38 139.33 182.91 C 123.81 166.36 107.30 150.68 91.37 134.49 C 60.20 140.28 27.37 116.78 23.71 85.08 Z"}),m.jsx("path",{d:" M 205.21 201.23 C 225.32 181.36 260.88 181.11 281.14 200.86 C 299.25 218.75 317.37 236.65 335.10 254.93 C 356.73 278.01 352.01 318.70 326.03 336.56 C 320.07 330.47 313.73 324.65 308.12 318.28 C 323.86 309.39 328.76 286.18 316.63 272.39 C 301.73 256.95 286.30 242.03 271.24 226.75 C 264.49 219.65 256.80 212.00 246.37 211.52 C 224.65 208.64 205.52 233.36 214.49 253.58 C 221.09 266.81 234.22 275.12 243.62 286.24 C 240.43 295.96 238.09 306.13 238.29 316.46 C 225.55 304.29 213.16 291.73 200.89 279.09 C 180.97 257.57 183.10 220.45 205.21 201.23 Z"}),m.jsx("path",{d:" M 273.90 352.07 C 252.28 328.99 256.98 288.31 282.96 270.46 C 288.93 276.54 295.26 282.36 300.88 288.72 C 285.14 297.62 280.23 320.82 292.38 334.61 C 307.27 350.05 322.70 364.96 337.75 380.25 C 344.51 387.35 352.20 395.00 362.64 395.48 C 384.35 398.37 403.49 373.64 394.51 353.42 C 387.92 340.18 374.78 331.88 365.38 320.76 C 368.56 311.04 370.91 300.86 370.71 290.54 C 383.45 302.70 395.84 315.27 408.11 327.91 C 428.03 349.43 425.90 386.55 403.78 405.77 C 383.68 425.64 348.13 425.89 327.86 406.14 C 309.75 388.25 291.60 370.37 273.90 352.07 Z"}),m.jsx("path",{d:" M 422.11 403.83 C 431.96 394.07 441.60 384.06 451.66 374.51 C 460.90 383.74 471.89 392.70 474.89 406.11 C 480.16 429.97 484.08 454.13 488.76 478.12 C 490.00 483.41 484.47 488.29 479.35 486.63 C 454.66 481.52 429.55 478.12 405.14 471.84 C 393.17 467.97 385.20 457.75 376.55 449.27 C 386.39 439.49 396.13 429.60 406.06 419.91 C 416.37 433.45 435.74 414.00 422.11 403.83 Z"})]})}),d6e=({servers:e})=>{const t=vo(),n=Object.values(e),r=n.length>0;return R.useEffect(()=>{const i=n.find(({autoConnect:o})=>o);i&&t(`/server/${i.id}`)},[n,t]),m.jsx("div",{className:"home",children:m.jsx(vr,{className:"home__main-card",children:m.jsxs(Kn,{className:"g-0",children:[m.jsx("div",{className:"col-md-5 d-none d-md-block",children:m.jsx("div",{className:"home__logo-wrapper",children:m.jsx("div",{className:"home__logo",children:m.jsx(r9,{})})})}),m.jsxs("div",{className:"col-md-7 home__servers-container",children:[m.jsx("div",{className:"home__title-wrapper",children:m.jsx("h1",{className:"home__title",children:"Welcome!"})}),m.jsx(n9,{embedded:!0,servers:n,children:!r&&m.jsxs("div",{className:"p-4 text-center",children:[m.jsx("p",{className:"mb-5",children:"This application will help you manage your Shlink servers."}),m.jsx("p",{children:m.jsxs(St,{to:"/server/create",className:"btn btn-outline-primary btn-lg me-2",children:[m.jsx(je,{icon:ep})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]})}),m.jsx("p",{className:"mb-0 mt-5",children:m.jsx(mr,{href:"https://shlink.io/documentation",children:m.jsxs("small",{children:[m.jsx("span",{className:"me-1",children:"Learn more about Shlink"})," ",m.jsx(je,{icon:vK})]})})})]})})]})]})})})},i9=()=>{const{ServersDropdown:e}=Ii(i9),[t,n,,r]=qt(),i=gr(),{pathname:o}=i;R.useEffect(r,[i,r]);const a="/settings",s=Ce("main-header__toggle-icon",{"main-header__toggle-icon--opened":t});return m.jsxs(BI,{color:"primary",dark:!0,fixed:"top",className:"main-header",expand:"md",children:[m.jsxs(UI,{tag:St,to:"/",children:[m.jsx(r9,{className:"main-header__brand-logo",color:"white"})," Shlink"]}),m.jsx(zI,{onClick:n,children:m.jsx(je,{icon:RK,className:s})}),m.jsx(qee,{navbar:!0,isOpen:t,children:m.jsxs(vE,{navbar:!0,className:"ms-auto",children:[m.jsx(gE,{children:m.jsxs(HI,{tag:St,to:a,active:o.startsWith(a),children:[m.jsx(je,{icon:UK}),"  Settings"]})}),m.jsx(e,{})]})})]})},h6e=Di(i9,["ServersDropdown"]),p6e=({children:e})=>{const t=gr();return R.useEffect(()=>{scrollTo(0,0)},[t]),m.jsx(m.Fragment,{children:e})},o9=QD(e=>e,e=>{try{return l2(e,e,"=")}catch{return!1}}),a9=e=>o9(e)?`v${e}`:e,s9=(e,t="latest")=>o9(e)?e:t,m6e="%_VERSION_%",v6e=e=>a9(s9(e)),qR=({project:e,version:t})=>m.jsx(mr,{href:`https://github.com/shlinkio/${e}/releases/${t}`,className:"text-muted",children:m.jsx("b",{children:t})}),g6e=({selectedServer:e,clientVersion:t=m6e})=>{const n=v6e(t);return m.jsxs("small",{className:"text-muted",children:[QS(e)&&m.jsxs(m.Fragment,{children:["Server: ",m.jsx(qR,{project:"shlink",version:e.printableVersion})," - "]}),"Client: ",m.jsx(qR,{project:"shlink-web-client",version:n})]})},y6e=({selectedServer:e})=>m.jsx("div",{className:Ce("text-center",{"shlink-versions-container--with-sidebar":QS(e)}),children:m.jsx(g6e,{selectedServer:e})}),Ju=({children:e})=>m.jsx("div",{className:"no-menu-wrapper container-xl",children:e});function l9(e){const t=n=>{const{ServerError:r}=Ii(t),i=Cu(),{selectServer:o,selectedServer:a}=n;return R.useEffect(()=>{i.serverId&&o(i.serverId)},[i.serverId,o]),a?Uq(a)?m.jsx(r,{}):m.jsx(e,{...n}):m.jsx(Ju,{children:m.jsx(Ho,{loading:!0})})};return t}const c9=l9(R.memo(({selectedServer:e,settings:t})=>{const{buildShlinkApiClient:n,TagColorsStorage:r,ShlinkWebComponent:i,ServerError:o}=Ii(c9);if(!QS(e))return m.jsx(o,{});const a=`/server/${e.id}`;return m.jsx(i,{serverVersion:e.version,apiClient:n(e),settings:t,routesPrefix:a,tagColorsStorage:r,createNotFound:s=>m.jsx(ND,{to:`${a}${s}`,children:"List short URLs"})})})),b6e=Di(c9,["buildShlinkApiClient","TagColorsStorage","ShlinkWebComponent","ServerError"]),_6e=(e,t)=>{e.constant("window",window),e.constant("console",console),e.constant("fetch",window.fetch.bind(window)),e.service("HttpClient",foe,"fetch"),e.serviceFactory("ScrollToTop",()=>p6e),e.factory("MainHeader",h6e),e.serviceFactory("Home",()=>d6e),e.decorator("Home",Ay),e.decorator("Home",t(["servers"],["resetSelectedServer"])),e.serviceFactory("ShlinkWebComponent",()=>c6e),e.factory("ShlinkWebComponentContainer",b6e),e.decorator("ShlinkWebComponentContainer",t(["selectedServer","settings"],["selectServer"])),e.serviceFactory("ShlinkVersionsContainer",()=>y6e),e.decorator("ShlinkVersionsContainer",t(["selectedServer"])),e.serviceFactory("ErrorHandler",()=>u6e)},u9=()=>{const e=vo();return R.useCallback(()=>e(-1),[e])},f9=({isOpen:e,duplicatedServers:t,onDiscard:n,onSave:r})=>{const i=t.length>1;return m.jsxs(go,{centered:!0,isOpen:e,children:[m.jsxs(yo,{children:["Duplicated server",i&&"s"]}),m.jsxs($i,{children:[m.jsx("p",{children:i?"The next servers already exist:":"There is already a server with:"}),m.jsx("ul",{children:t.map(({url:o,apiKey:a},s)=>i?m.jsxs("li",{children:[m.jsx("b",{children:o})," - ",m.jsx("b",{children:a})]},s):m.jsxs(R.Fragment,{children:[m.jsxs("li",{children:["URL: ",m.jsx("b",{children:o})]}),m.jsxs("li",{children:["API key: ",m.jsx("b",{children:a})]})]},s))}),m.jsxs("span",{children:[i?"Do you want to ignore duplicated servers":"Do you want to save this server anyway","?"]})]}),m.jsxs(as,{children:[m.jsx(Ke,{color:"link",onClick:n,children:i?"Ignore duplicates":"Discard"}),m.jsx(Ke,{color:"primary",onClick:r,children:"Save anyway"})]})]})},x6e=e=>t=>{t.preventDefault(),e()},d9=({onSubmit:e,initialValues:t,children:n,title:r})=>{const[i,o]=R.useState(""),[a,s]=R.useState(""),[l,c]=R.useState(""),f=x6e(()=>e({name:i,url:a,apiKey:l}));return R.useEffect(()=>{t&&o(t.name),t&&s(t.url),t&&c(t.apiKey)},[t]),m.jsxs("form",{className:"server-form",name:"serverForm",onSubmit:f,children:[m.jsxs(xt,{className:"mb-3",title:r,children:[m.jsx(sv,{value:i,onChange:o,children:"Name"}),m.jsx(sv,{type:"url",value:a,onChange:s,children:"URL"}),m.jsx(sv,{value:l,onChange:c,children:"API key"})]}),m.jsx("div",{className:"text-end",children:n})]})},KR=4e3,YR=({type:e})=>m.jsx("div",{className:"mt-3",children:m.jsxs(er,{type:e,children:[e==="success"&&"Servers properly imported. You can now select one from the list :)",e==="error"&&"The servers could not be imported. Make sure the format is correct."]})}),h9=({servers:e,createServers:t})=>{const{ImportServersBtn:n,useTimeoutToggle:r}=Ii(h9),i=vo(),o=u9(),a=!!Object.keys(e).length,[s,l]=r(!1,KR),[c,f]=r(!1,KR),[d,p]=qt(),[v,g]=R.useState(),y=R.useCallback(x=>{const _=NE();t([{...x,id:_}]),i(`/server/${_}`)},[t,i]);return R.useEffect(()=>{if(!v)return;Object.values(e).some(({url:_,apiKey:b})=>(v==null?void 0:v.url)===_&&(v==null?void 0:v.apiKey)===b)?p():y(v)},[y,v,e,p]),m.jsxs(Ju,{children:[m.jsxs(d9,{title:m.jsx("h5",{className:"mb-0",children:"Add new server"}),onSubmit:g,children:[!a&&m.jsx(n,{tooltipPlacement:"top",onImport:l,onImportError:f}),a&&m.jsx(Ke,{outline:!0,onClick:o,children:"Cancel"}),m.jsx(Ke,{outline:!0,color:"primary",className:"ms-2",children:"Create server"})]}),s&&m.jsx(YR,{type:"success"}),c&&m.jsx(YR,{type:"error"}),m.jsx(f9,{isOpen:d,duplicatedServers:v?[v]:[],onDiscard:o,onSave:()=>v&&y(v)})]})},w6e=Di(h9,["ImportServersBtn","useTimeoutToggle"]),p9=({server:e,className:t,children:n,textClassName:r})=>{const{DeleteServerModal:i}=Ii(p9),[o,,a,s]=qt();return m.jsxs(m.Fragment,{children:[m.jsxs("button",{type:"button",className:Ce(t,"p-0 bg-transparent border-0"),onClick:a,children:[!n&&m.jsx(je,{fixedWidth:!0,icon:JS}),m.jsx("span",{className:r,children:n??"Remove this server"})]}),m.jsx(i,{server:e,isOpen:o,toggle:s})]})},O6e=Di(p9,["DeleteServerModal"]),S6e=({server:e,toggle:t,isOpen:n,deleteServer:r,redirectHome:i=!0})=>{const o=vo(),a=R.useRef(!1),s=()=>{a.current=!0,t()},l=()=>{a.current&&(r(e),i&&o("/"))};return m.jsxs(go,{isOpen:n,toggle:t,centered:!0,onClosed:l,children:[m.jsx(yo,{toggle:t,className:"text-danger",children:"Remove server"}),m.jsxs($i,{children:[m.jsxs("p",{children:["Are you sure you want to remove ",m.jsx("b",{children:e?e.name:""}),"?"]}),m.jsx("p",{children:m.jsx("i",{children:"No data will be deleted, only the access to this server will be removed from this device. You can create it again at any moment."})})]}),m.jsxs(as,{children:[m.jsx(Ke,{color:"link",onClick:t,children:"Cancel"}),m.jsx(Ke,{color:"danger",onClick:s,children:"Delete"})]})]})},E6e=l9(({editServer:e,selectedServer:t,selectServer:n})=>{const r=u9(),{reconnect:i}=Au();if(!ld(t))return null;const o=a=>{e(t.id,a),i==="true"&&n(t.id),r()};return m.jsx(Ju,{children:m.jsxs(d9,{title:m.jsxs("h5",{className:"mb-0",children:['Edit "',t.name,'"']}),initialValues:t,onSubmit:o,children:[m.jsx(Ke,{outline:!0,className:"me-2",onClick:r,children:"Cancel"}),m.jsx(Ke,{outline:!0,color:"primary",children:"Save"})]})})}),C6e=Di(E6e,["ServerError"]),ZR=(e,{url:t,apiKey:n})=>e.some(r=>r.url===t&&r.apiKey===n),m9=({createServers:e,servers:t,children:n,onImport:r=()=>{},onImportError:i=()=>{},tooltipPlacement:o="bottom",className:a=""})=>{const{ServersImporter:s}=Ii(m9),l=ea(),[c,f]=R.useState([]),[d,,p,v]=qt(),g=R.useRef([]),y=R.useCallback(w=>{e(w),r()},[e,r]),x=R.useCallback(async({target:w})=>{var S;return s.importServersFromFile((S=w.files)==null?void 0:S[0]).then(E=>{g.current=E;const C=Object.values(t),T=E.filter(D=>ZR(C,D)),A=!!T.length;A?f(T):y(E),A&&p()}).then(()=>{w.value=null}).catch(i)},[y,i,t,s,p]),_=R.useCallback(()=>{y(g.current),v()},[y,v,g]),b=R.useCallback(()=>{y(g.current.filter(w=>!ZR(c,w))),v()},[y,c,v]);return m.jsxs(m.Fragment,{children:[m.jsxs(Ke,{outline:!0,id:"importBtn",className:a,onClick:()=>{var w;return(w=l.current)==null?void 0:w.click()},children:[m.jsx(je,{icon:sK,fixedWidth:!0})," ",n??"Import from file"]}),m.jsxs(br,{placement:o,target:"importBtn",children:["You can create servers by importing a CSV file with ",m.jsx("b",{children:"name"}),", ",m.jsx("b",{children:"apiKey"})," and ",m.jsx("b",{children:"url"})," columns."]}),m.jsx("input",{type:"file",accept:".csv",className:"d-none",ref:l,onChange:x,"aria-hidden":!0}),m.jsx(f9,{isOpen:d,duplicatedServers:c,onDiscard:b,onSave:_})]})},P6e=Di(m9,["ServersImporter"]),v9=({servers:e,selectedServer:t})=>{const{DeleteServerButton:n}=Ii(v9);return m.jsx(Ju,{children:m.jsxs("div",{className:"server-error__container flex-column",children:[m.jsxs(Ho,{className:"w-100 mb-3 mb-md-5",type:"error",fullWidth:!0,children:[!ld(t)&&"Could not find this Shlink server.",ld(t)&&m.jsxs(m.Fragment,{children:[m.jsx("p",{children:"Oops! Could not connect to this Shlink server."}),"Make sure you have internet connection, and the server is properly configured and on-line."]})]}),m.jsx(n9,{servers:Object.values(e),children:m.jsxs("p",{className:"mb-md-3",children:["These are the Shlink servers currently configured. Choose one of them or ",m.jsx(St,{to:"/server/create",children:"add a new one"}),"."]})}),ld(t)&&m.jsx("div",{className:"container mt-3 mt-md-5",children:m.jsxs("p",{className:"fs-5 fw-normal lh-sm",children:["Alternatively, if you think you may have miss-configured this server, you can ",m.jsx(n,{server:t,className:"server-error__delete-btn",children:"remove it"})," or ",m.jsx(St,{to:`/server/${t.id}/edit?reconnect=true`,children:"edit it"}),"."]})})]})})},T6e=Di(v9,["DeleteServerButton"]),j6e=4e3,g9=({servers:e})=>{const{ServersExporter:t,ImportServersBtn:n,useTimeoutToggle:r,ManageServersRow:i}=Ii(g9),o=Object.values(e),[a,s]=R.useState(o),l=p=>s(o.filter(({name:v,url:g})=>`${v} ${g}`.toLowerCase().match(p.toLowerCase()))),c=a.some(({autoConnect:p})=>!!p),[f,d]=r(!1,j6e);return R.useEffect(()=>{s(Object.values(e))},[e]),m.jsxs(Ju,{children:[m.jsx(cp,{className:"mb-3",onChange:l}),m.jsxs(Kn,{className:"mb-3",children:[m.jsxs("div",{className:"col-md-6 d-flex d-md-block mb-2 mb-md-0",children:[m.jsx(n,{className:"flex-fill",onImportError:d,children:"Import servers"}),o.length>0&&m.jsxs(Ke,{outline:!0,className:"ms-2 flex-fill",onClick:async()=>t.exportServers(),children:[m.jsx(je,{icon:Y6,fixedWidth:!0})," Export servers"]})]}),m.jsx("div",{className:"col-md-6 text-md-end d-flex d-md-block",children:m.jsxs(Ke,{outline:!0,color:"primary",className:"flex-fill",tag:St,to:"/server/create",children:[m.jsx(je,{icon:ep,fixedWidth:!0})," Add a server"]})})]}),m.jsx(xt,{children:m.jsxs("table",{className:"table table-hover responsive-table mb-0",children:[m.jsx("thead",{className:"responsive-table__header",children:m.jsxs("tr",{children:[c&&m.jsx("th",{style:{width:"50px"},children:m.jsx("span",{className:"sr-only",children:"Auto-connect"})}),m.jsx("th",{children:"Name"}),m.jsx("th",{children:"Base URL"}),m.jsx("th",{children:m.jsx("span",{className:"sr-only",children:"Options"})})]})}),m.jsxs("tbody",{children:[!a.length&&m.jsx("tr",{className:"text-center",children:m.jsx("td",{colSpan:4,children:"No servers found."})}),a.map(p=>m.jsx(i,{server:p,hasAutoConnect:c},p.id))]})]})}),f&&m.jsx("div",{className:"mt-3",children:m.jsx(er,{type:"error",children:"The servers could not be imported. Make sure the format is correct."})})]})},A6e=Di(g9,["ServersExporter","ImportServersBtn","useTimeoutToggle","ManageServersRow"]),y9=({server:e,hasAutoConnect:t})=>{const{ManageServersRowDropdown:n}=Ii(y9);return m.jsxs("tr",{className:"responsive-table__row",children:[t&&m.jsx("td",{className:"responsive-table__cell","data-th":"Auto-connect",children:e.autoConnect&&m.jsxs(m.Fragment,{children:[m.jsx(je,{icon:Gd,className:"text-primary",id:"autoConnectIcon"}),m.jsx(br,{target:"autoConnectIcon",placement:"right",children:"Auto-connect to this server"})]})}),m.jsx("th",{className:"responsive-table__cell","data-th":"Name",children:m.jsx(St,{to:`/server/${e.id}`,children:e.name})}),m.jsx("td",{className:"responsive-table__cell","data-th":"Base URL",children:e.url}),m.jsx("td",{className:"responsive-table__cell text-end",children:m.jsx(n,{server:e})})]})},k6e=Di(y9,["ManageServersRowDropdown"]),b9=({server:e,setAutoConnect:t})=>{const{DeleteServerModal:n}=Ii(b9),[r,,i,o]=qt(),a=`/server/${e.id}`,{autoConnect:s}=e,l=s?oK:_se;return m.jsxs(c0,{minWidth:s?210:170,children:[m.jsxs(Ne,{tag:St,to:a,children:[m.jsx(je,{icon:rK,fixedWidth:!0})," Connect"]}),m.jsxs(Ne,{tag:St,to:`${a}/edit`,children:[m.jsx(je,{icon:eE,fixedWidth:!0})," Edit server"]}),m.jsxs(Ne,{onClick:()=>t(e,!s),children:[m.jsx(je,{icon:l,fixedWidth:!0})," ",s?"Do not a":"A","uto-connect"]}),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{className:"dropdown-item--danger",onClick:i,children:[m.jsx(je,{icon:JS,fixedWidth:!0})," Remove server"]}),m.jsx(n,{redirectHome:!1,server:e,isOpen:r,toggle:o})]})},N6e=Di(b9,["DeleteServerModal"]),_9=(e,t)=>ZD(e,t,{serializeError:n=>n}),M6e={},L6e=e=>"id"in e?e:{...e,id:NE()},R6e=e=>e.reduce((t,n)=>({...t,[n.id]:n}),{}),{actions:$6e,reducer:I6e}=Qt({name:"shlink/servers",initialState:M6e,reducers:{editServer:{prepare:(e,t)=>({payload:{serverId:e,serverData:t}}),reducer:(e,{payload:t})=>{const{serverId:n,serverData:r}=t;return e[n]?{...e,[n]:{...e[n],...r}}:e}},deleteServer:(e,{payload:t})=>(delete e[t.id],e),setAutoConnect:{prepare:({id:e},t)=>({payload:{serverId:e,autoConnect:t}}),reducer:(e,{payload:t})=>{const{serverId:n,autoConnect:r}=t;return e[n]?r?Object.fromEntries(Object.entries(e).map(([i,o])=>[i,{...o,autoConnect:i===n}])):{...e,[n]:{...e[n],autoConnect:r}}:e}},createServers:{prepare:e=>({payload:R6e(e.map(L6e))}),reducer:(e,{payload:t})=>({...e,...t})}}}),{editServer:D6e,deleteServer:F6e,setAutoConnect:B6e,createServers:x9}=$6e,U6e=I6e,z6e=e=>Array.isArray(e)?e.filter(V6):[],V6e=e=>_9("shlink/remoteServers/fetchServers",async(t,{dispatch:n})=>{const r=await e.jsonRequest(`${Vv.homepage}/servers.json`),i=z6e(r);n(x9(i))}),TP="shlink/selectedServer",W6e="1.0.0",H6e="999.999.999",G6e="latest",q6e=e=>s9(e===G6e?H6e:e,W6e),K6e=QD(e=>`${e.id}_${e.url}_${e.apiKey}`,async(e,t)=>t().then(({version:n})=>({version:q6e(n),printableVersion:a9(n)}))),XR=null,jP=un(`${TP}/resetSelectedServer`),Y6e=e=>_9(`${TP}/selectServer`,async(t,{dispatch:n,getState:r})=>{n(jP());const{servers:i}=r(),o=i[t];if(!o)return{serverNotFound:!0};try{const a=e(o),{version:s,printableVersion:l}=await K6e(o,()=>a.health());return{...o,version:s,printableVersion:l}}catch{return{...o,serverNotReachable:!0}}}),Z6e=e=>Qt({name:TP,initialState:XR,reducers:{},extraReducers:t=>{t.addCase(jP,()=>XR),t.addCase(e.fulfilled,(n,{payload:r})=>r)}}),X6e=({servers:e,selectedServer:t})=>{const n=Object.values(e),r=()=>n.length===0?m.jsxs(Ne,{tag:St,to:"/server/create",children:[m.jsx(je,{icon:ep})," ",m.jsx("span",{className:"ms-1",children:"Add a server"})]}):m.jsxs(m.Fragment,{children:[n.map(({name:i,id:o})=>m.jsx(Ne,{tag:St,to:`/server/${o}`,active:zq(t)===o,children:i},o)),m.jsx(Ne,{divider:!0,tag:"hr"}),m.jsxs(Ne,{tag:St,to:"/manage-servers",children:[m.jsx(je,{icon:eA})," ",m.jsx("span",{className:"ms-1",children:"Manage servers"})]})]});return m.jsxs(lp,{nav:!0,inNavbar:!0,children:[m.jsxs(ju,{nav:!0,caret:!0,children:[m.jsx(je,{icon:eA})," ",m.jsx("span",{className:"ms-1",children:"Servers"})]}),m.jsx(Tu,{end:!0,style:{right:0},children:r()})]})},Q6e=({document:e},t,n)=>{const r=e.createElement("a");r.setAttribute("href",t),r.setAttribute("download",n),r.style.visibility="hidden",e.body.appendChild(r),r.click(),e.body.removeChild(r)},J6e=(e,t,n)=>{const r=new Blob([t],{type:"text/csv;charset=utf-8;"}),i=URL.createObjectURL(r);Q6e(e,i,n)},eIe="shlink-servers.csv";class tIe{constructor(t,n,r){Il(this,"exportServers",async()=>{const t=Object.values(this.storage.get("servers")??{}).map(Vq);try{const n=this.jsonToCsv(t);J6e(this.window,n,eIe)}catch(n){console.error(n)}});this.storage=t,this.window=n,this.jsonToCsv=r}}const nIe=e=>typeof e.url=="string"&&typeof e.apiKey=="string"&&typeof e.name=="string",rIe=e=>Array.isArray(e)&&e.every(nIe);class iIe{constructor(t){this.csvToJson=t}async importServersFromFile(t){if(!t)throw new Error("No file provided");const n=await t.text(),r=await this.csvToJson(n);if(!rIe(r))throw new Error("Provided file does not have the right format.");return r}}const oIe=(e,t)=>{e.factory("ManageServers",A6e),e.decorator("ManageServers",Ay),e.decorator("ManageServers",t(["selectedServer","servers"],["resetSelectedServer"])),e.factory("ManageServersRow",k6e),e.factory("ManageServersRowDropdown",N6e),e.decorator("ManageServersRowDropdown",t(null,["setAutoConnect"])),e.factory("CreateServer",w6e),e.decorator("CreateServer",Ay),e.decorator("CreateServer",t(["selectedServer","servers"],["createServers","resetSelectedServer"])),e.factory("EditServer",C6e),e.decorator("EditServer",t(["selectedServer"],["editServer","selectServer","resetSelectedServer"])),e.serviceFactory("ServersDropdown",()=>X6e),e.decorator("ServersDropdown",t(["servers","selectedServer"])),e.serviceFactory("DeleteServerModal",()=>S6e),e.decorator("DeleteServerModal",t(null,["deleteServer"])),e.factory("DeleteServerButton",O6e),e.factory("ImportServersBtn",P6e),e.decorator("ImportServersBtn",t(["servers"],["createServers"])),e.factory("ServerError",T6e),e.decorator("ServerError",t(["servers","selectedServer"])),e.service("ServersImporter",iIe,"csvToJson"),e.service("ServersExporter",tIe,"Storage","window","jsonToCsv"),e.serviceFactory("selectServer",Y6e,"buildShlinkApiClient","loadMercureInfo"),e.serviceFactory("createServers",()=>x9),e.serviceFactory("deleteServer",()=>F6e),e.serviceFactory("editServer",()=>D6e),e.serviceFactory("setAutoConnect",()=>B6e),e.serviceFactory("fetchServers",V6e,"HttpClient"),e.serviceFactory("resetSelectedServer",()=>jP),e.serviceFactory("selectedServerReducerCreator",Z6e,"selectServer"),e.serviceFactory("selectedServerReducer",n=>n.reducer,"selectedServerReducerCreator")},w9={field:"dateCreated",dir:"DESC"},aIe={realTimeUpdates:{enabled:!0},shortUrlCreation:{validateUrls:!1},ui:{theme:RE()},visits:{defaultInterval:"last30Days"},shortUrlsList:{defaultOrdering:w9}},{reducer:sIe,actions:lIe}=Qt({name:"shlink/settings",initialState:aIe,reducers:{setSettings:(e,{payload:t})=>m0(e,t)}}),{setSettings:cIe}=lIe,uIe=sIe,fIe=({settings:e,setSettings:t})=>m.jsx(Ju,{children:m.jsx(gse,{settings:e,updateSettings:t,defaultShortUrlsListOrdering:w9})}),dIe=(e,t)=>{e.serviceFactory("Settings",()=>fIe),e.decorator("Settings",Ay),e.decorator("Settings",t(["settings"],["setSettings","resetSelectedServer"])),e.serviceFactory("setSettings",()=>cIe)};var hIe=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)n.d(o,a,(function(s){return r[s]}).bind(null,a));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=32)}([function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){var r=n(6),i=Object.keys||function(g){var y=[];for(var x in g)y.push(x);return y};e.exports=d;var o=n(5);o.inherits=n(2);var a=n(23),s=n(14);o.inherits(d,a);for(var l=i(s.prototype),c=0;c diff --git a/dependabot/npm_and_yarn/typescript-5.5.4/index.html b/dependabot/npm_and_yarn/typescript-5.5.4/index.html index 397dbbae..7163b712 100644 --- a/dependabot/npm_and_yarn/typescript-5.5.4/index.html +++ b/dependabot/npm_and_yarn/typescript-5.5.4/index.html @@ -79,7 +79,7 @@ Shlink — The URL shortener - + diff --git a/dependabot/npm_and_yarn/typescript-5.5.4/service-worker.js b/dependabot/npm_and_yarn/typescript-5.5.4/service-worker.js index 9588a3f6..45201cf5 100644 --- a/dependabot/npm_and_yarn/typescript-5.5.4/service-worker.js +++ b/dependabot/npm_and_yarn/typescript-5.5.4/service-worker.js @@ -1,2 +1,2 @@ try{self["workbox:core:7.0.0"]&&_()}catch{}const G=(s,...e)=>{let t=s;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},Q=G;class h extends Error{constructor(e,t){const n=Q(e,t);super(n),this.name=e,this.details=t}}const B=new Set;function z(s){B.add(s)}const d={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},k=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||k(d.googleAnalytics),getPrecacheName:s=>s||k(d.precache),getPrefix:()=>d.prefix,getRuntimeName:s=>s||k(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 i=K(e.url,t);if(e.url===i)return s.match(e,n);const a=Object.assign(Object.assign({},n),{ignoreSearch:!0}),r=await s.keys(e,a);for(const c of r){const o=K(c.url,t);if(i===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(),i={headers:new Headers(n.headers),status:n.status,statusText:n.statusText},a=e?e(i):i,r=Y()?n.body:await n.blob();return new Response(r,a)}function ie(){self.addEventListener("activate",()=>self.clients.claim())}const ae=(s,e)=>e.some(t=>s instanceof t);let j,O;function re(){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,E=new WeakMap,P=new WeakMap;function oe(s){const e=new Promise((t,n)=>{const i=()=>{s.removeEventListener("success",a),s.removeEventListener("error",r)},a=()=>{t(f(s.result)),i()},r=()=>{n(s.error),i()};s.addEventListener("success",a),s.addEventListener("error",r)});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 i=()=>{s.removeEventListener("complete",a),s.removeEventListener("error",r),s.removeEventListener("abort",r)},a=()=>{t(),i()},r=()=>{n(s.error||new DOMException("AbortError","AbortError")),i()};s.addEventListener("complete",a),s.addEventListener("error",r),s.addEventListener("abort",r)});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(v(this),e,...t);return H.set(n,e.sort?e.sort():[e]),f(n)}:ce().includes(s)?function(...e){return s.apply(v(this),e),f(F.get(this))}:function(...e){return f(s.apply(v(this),e))}}function de(s){return typeof s=="function"?ue(s):(s instanceof IDBTransaction&&le(s),ae(s,re())?new Proxy(s,T):s)}function f(s){if(s instanceof IDBRequest)return oe(s);if(E.has(s))return E.get(s);const e=de(s);return e!==s&&(E.set(s,e),P.set(e,s)),e}const v=s=>P.get(s);function fe(s,e,{blocked:t,upgrade:n,blocking:i,terminated:a}={}){const r=indexedDB.open(s,e),c=f(r);return n&&r.addEventListener("upgradeneeded",o=>{n(f(r.result),o.oldVersion,o.newVersion,f(r.transaction),o)}),t&&r.addEventListener("blocked",o=>t(o.oldVersion,o.newVersion,o)),c.then(o=>{a&&o.addEventListener("close",()=>a()),i&&o.addEventListener("versionchange",l=>i(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"],D=new Map;function S(s,e){if(!(s instanceof IDBDatabase&&!(e in s)&&typeof e=="string"))return;if(D.get(e))return D.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,i=me.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(i||ge.includes(t)))return;const a=async function(r,...c){const o=this.transaction(r,i?"readwrite":"readonly");let l=o.store;return n&&(l=l.index(c.shift())),(await Promise.all([l[t](...c),i&&o.done]))[0]};return D.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:7.0.0"]&&_()}catch{}const we="workbox-expiration",w="cache-entries",W=s=>{const e=new URL(s,location.href);return e.hash="",e.href};class ye{constructor(e){this._db=null,this._cacheName=e}_upgradeDb(e){const t=e.createObjectStore(w,{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(w,"readwrite",{durability:"relaxed"});await a.store.put(n),await a.done}async getTimestamp(e){const n=await(await this.getDb()).get(w,this._getId(e));return n==null?void 0:n.timestamp}async expireEntries(e,t){const n=await this.getDb();let i=await n.transaction(w).store.index("timestamp").openCursor(null,"prev");const a=[];let r=0;for(;i;){const o=i.value;o.cacheName===this._cacheName&&(e&&o.timestamp=t?a.push(i.value):r++),i=await i.continue()}const c=[];for(const o of a)await n.delete(w,o.id),c.push(o.url);return c}_getId(e){return this._cacheName+"|"+W(e)}async getDb(){return this._db||(this._db=await fe(we,1,{upgrade:this._upgradeDbAndDeleteOldDbs.bind(this)})),this._db}}class _e{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 ye(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 i of t)await n.delete(i,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 r=this._isResponseDateFresh(a),c=this._getCacheExpiration(i);q(c.expireEntries());const o=c.updateTimestamp(n.url);if(t)try{t.waitUntil(o)}catch{}return r?a:null},this.cacheDidUpdate=async({cacheName:t,request:n})=>{const i=this._getCacheExpiration(t);await i.updateTimestamp(n.url),await i.expireEntries()},this._config=e,this._maxAgeSeconds=e.maxAgeSeconds,this._cacheExpirations=new Map,e.purgeOnQuotaError&&z(()=>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 _e(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"),i=new Date(t).getTime();return isNaN(i)?null:i}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:7.0.0"]&&_()}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),i=new URL(t,location.href);return n.searchParams.set(Re,e),{cacheKey:n.href,url:i.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 i=t.originalRequest.url;n?this.notUpdatedURLs.push(i):this.updatedURLs.push(i)}return n}}}class ke{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:n})=>{const i=(n==null?void 0:n.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return i?new Request(i,{headers:t.headers}):t},this._precacheController=e}}try{self["workbox:strategies:7.0.0"]&&_()}catch{}function R(s){return typeof s=="string"?new Request(s):s}class Ee{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 r=await t.preloadResponse;if(r)return r}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const r of this.iterateCallbacks("requestWillFetch"))n=await r({request:n.clone(),event:t})}catch(r){if(r instanceof Error)throw new h("plugin-error-request-will-fetch",{thrownErrorMessage:r.message})}const a=n.clone();try{let r;r=await fetch(n,n.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const c of this.iterateCallbacks("fetchDidSucceed"))r=await c({event:t,request:a,response:r});return r}catch(r){throw i&&await this.runCallbacks("fetchDidFail",{error:r,event:t,originalRequest:i.clone(),request:a.clone()}),r}}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:i,matchOptions:a}=this._strategy,r=await this.getCacheKey(t,"read"),c=Object.assign(Object.assign({},a),{cacheName:i});n=await caches.match(r,c);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))n=await o({cacheName:i,matchOptions:a,cachedResponse:n,request:r,event:this.event})||void 0;return n}async cachePut(e,t){const n=R(e);await se(0);const i=await this.getCacheKey(n,"write");if(!t)throw new h("cache-put-with-no-response",{url:te(i.url)});const a=await this._ensureResponseSafeToCache(t);if(!a)return!1;const{cacheName:r,matchOptions:c}=this._strategy,o=await self.caches.open(r),l=this.hasCallback("cacheDidUpdate"),g=l?await X(o,i.clone(),["__WB_REVISION__"],c):null;try{await o.put(i,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:r,oldResponse:g,newResponse:a.clone(),request:i,event:this.event});return!0}async getCacheKey(e,t){const n=`${e.url} | ${t}`;if(!this._cacheKeys[n]){let i=e;for(const a of this.iterateCallbacks("cacheKeyWillBeUsed"))i=R(await a({mode:t,request:i,event:this.event,params:this.params}));this._cacheKeys[n]=i}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 r=Object.assign(Object.assign({},a),{state:n});return t[e](r)}}}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 i of this.iterateCallbacks("cacheWillUpdate"))if(t=await i({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,i="params"in e?e.params:void 0,a=new Ee(this,{event:t,request:n,params:i}),r=this._getResponse(a,n,t),c=this._awaitComplete(r,a,n,t);return[r,c]}async _getResponse(e,t,n){await e.runCallbacks("handlerWillStart",{event:n,request:t});let i;try{if(i=await this._handle(t,e),!i||i.type==="error")throw new h("no-response",{url:t.url})}catch(a){if(a instanceof Error){for(const r of e.iterateCallbacks("handlerDidError"))if(i=await r({error:a,event:n,request:t}),i)break}if(!i)throw a}for(const a of e.iterateCallbacks("handlerWillRespond"))i=await a({event:n,request:t,response:i});return i}async _awaitComplete(e,t,n,i){let a,r;try{a=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:i,request:n,response:a}),await t.doneWaiting()}catch(c){c instanceof Error&&(r=c)}if(await t.runCallbacks("handlerDidComplete",{event:i,request:n,response:a,error:r}),t.destroy(),r)throw r}}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 i=t.params||{};if(this._fallbackToNetwork){const a=i.integrity,r=e.integrity,c=!r||r===a;n=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?r||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,i]of this.plugins.entries())i!==p.copyRedirectedCacheableResponsesPlugin&&(i===p.defaultPrecacheCacheabilityPlugin&&(e=n),i.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 ve{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 ke({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:i,url:a}=Ce(n),r=typeof n!="string"&&n.revision?"reload":"default";if(this._urlsToCacheKeys.has(a)&&this._urlsToCacheKeys.get(a)!==i)throw new h("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(a),secondEntry:i});if(typeof n!="string"&&n.integrity){if(this._cacheKeysToIntegrities.has(i)&&this._cacheKeysToIntegrities.get(i)!==n.integrity)throw new h("add-to-cache-list-conflicting-integrities",{url:a});this._cacheKeysToIntegrities.set(i,n.integrity)}if(this._urlsToCacheKeys.set(a,i),this._urlsToCacheModes.set(a,r),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,r]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(r),o=this._urlsToCacheModes.get(a),l=new Request(a,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:i}=t;return{updatedURLs:n,notUpdatedURLs:i}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),i=new Set(this._urlsToCacheKeys.values()),a=[];for(const r of n)i.has(r.url)||(await t.delete(r),a.push(r.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 ve),L);try{self["workbox:routing:7.0.0"]&&_()}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 De extends b{constructor(e,t,n){const i=({url:a})=>{const r=e.exec(a.href);if(r&&!(a.origin!==location.origin&&r.index!==0))return r.slice(1)};super(i,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(i=>{typeof i=="string"&&(i=[i]);const a=new Request(...i);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 i=n.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:i,url:n});let c=r&&r.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=r&&r.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:i}){const a=this._routes.get(n.method)||[];for(const r of a){let c;const o=r.match({url:e,sameOrigin:t,request:n,event:i});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:r,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 y;const Ue=()=>(y||(y=new Le,y.addFetchListener(),y.addCacheListener()),y);function M(s,e,t){let n;if(typeof s=="string"){const a=new URL(s,location.href),r=({url:c})=>c.href===a.href;n=new b(r,e,t)}else if(s instanceof RegExp)n=new De(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:i}={}){const a=new URL(s,location.href);a.hash="",yield a.href;const r=Te(a,e);if(yield r.href,t&&r.pathname.endsWith("/")){const c=new URL(r.href);c.pathname+=t,yield c.href}if(n){const c=new URL(r.href);c.pathname+=".html",yield c.href}if(i){const c=i({url:a});for(const o of c)yield o.href}}class Ie extends b{constructor(e,t){const n=({request:i})=>{const a=e.getURLsToCacheKeys();for(const r of Pe(i.url,t)){const c=a.get(r);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 i=await t.cacheMatch(e),a;if(!i)try{i=await n}catch(r){r instanceof Error&&(a=r)}if(!i)throw new h("no-response",{url:e.url,error:a});return i}}const Se="shlink-web-client",We="A React-based progressive web application for shlink",Be="/shlink-web-client/dependabot/npm_and_yarn/typescript-5.5.4",qe="https://github.com/shlinkio/shlink-web-client",Fe="MIT",He="module",Ve={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint src test config/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 --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},$e={"@fortawesome/fontawesome-free":"^6.6.0","@fortawesome/fontawesome-svg-core":"^6.6.0","@fortawesome/free-brands-svg-icons":"^6.6.0","@fortawesome/free-regular-svg-icons":"^6.6.0","@fortawesome/free-solid-svg-icons":"^6.6.0","@fortawesome/react-fontawesome":"^0.2.2","@json2csv/plainjs":"^7.0.6","@reduxjs/toolkit":"^2.2.6","@shlinkio/data-manipulation":"^1.0.3","@shlinkio/shlink-frontend-kit":"^0.5.2","@shlinkio/shlink-js-sdk":"^1.1.0","@shlinkio/shlink-web-component":"^0.7.0",bootstrap:"5.2.3",bottlejs:"^2.0.1",clsx:"^2.1.1","compare-versions":"^6.1.1",csvtojson:"^2.0.10","date-fns":"^3.6.0",react:"^18.3.1","react-dom":"^18.3.1","react-external-link":"^2.3.1","react-redux":"^9.1.2","react-router-dom":"^6.25.1",reactstrap:"^9.2.2","redux-localstorage-simple":"^2.5.1",uuid:"^10.0.0","workbox-core":"^7.1.0","workbox-expiration":"^7.1.0","workbox-precaching":"^7.1.0","workbox-routing":"^7.1.0","workbox-strategies":"^7.1.0"},Ge={"@shlinkio/eslint-config-js-coding-standard":"~3.0.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@stylistic/eslint-plugin":"^2.3.0","@testing-library/jest-dom":"^6.4.6","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.5.2","@total-typescript/shoehorn":"^0.1.2","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@types/uuid":"^10.0.0","@vitejs/plugin-react":"^4.3.1","@vitest/coverage-v8":"^2.0.3","adm-zip":"^0.5.14","axe-core":"^4.9.1",chalk:"^5.3.0",eslint:"^8.57.0","eslint-plugin-jsx-a11y":"^6.9.0","eslint-plugin-react":"^7.35.0","eslint-plugin-react-hooks":"^4.6.2","eslint-plugin-simple-import-sort":"^12.1.1",history:"^5.3.0",jsdom:"^24.1.0",sass:"^1.77.8",stylelint:"^15.11.0",typescript:"^5.5.4","typescript-eslint":"^7.16.1",vite:"^5.3.4","vite-plugin-pwa":"^0.20.0",vitest:"^2.0.2"},Qe=[">0.2%","not dead","not ie <= 11","not op_mini all"],ze={name:Se,description:We,private:!1,homepage:Be,repository:qe,license:Fe,type:He,scripts:Ve,dependencies:$e,devDependencies:Ge,browserslist:Qe};ie();Ae([{"revision":null,"url":"assets/index-B2KmSTOz.js"},{"revision":null,"url":"assets/index-CRpH7Bmq.css"},{"revision":"bca27e41715cbd6d1bef880957d79167","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":"1fea22cc5319d8b8738d5bdc5f6c6047","url":"manifest.json"}]);const Je=new RegExp("/[^/?]+\\.[^/]+$");M(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(Je)),Ne(`${ze.homepage}/index.html`));M(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Oe({cacheName:"images",plugins:[new be({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,r]of this._urlsToCacheKeys){const c=this._cacheKeysToIntegrities.get(r),o=this._urlsToCacheModes.get(a),l=new Request(a,{integrity:c,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:r},request:l,event:e}))}const{updatedURLs:n,notUpdatedURLs:i}=t;return{updatedURLs:n,notUpdatedURLs:i}})}activate(e){return A(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),n=await t.keys(),i=new Set(this._urlsToCacheKeys.values()),a=[];for(const r of n)i.has(r.url)||(await t.delete(r),a.push(r.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 ve),L);try{self["workbox:routing:7.0.0"]&&_()}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 De extends b{constructor(e,t,n){const i=({url:a})=>{const r=e.exec(a.href);if(r&&!(a.origin!==location.origin&&r.index!==0))return r.slice(1)};super(i,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(i=>{typeof i=="string"&&(i=[i]);const a=new Request(...i);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 i=n.origin===location.origin,{params:a,route:r}=this.findMatchingRoute({event:t,request:e,sameOrigin:i,url:n});let c=r&&r.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=r&&r.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:i}){const a=this._routes.get(n.method)||[];for(const r of a){let c;const o=r.match({url:e,sameOrigin:t,request:n,event:i});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:r,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 y;const Ue=()=>(y||(y=new Le,y.addFetchListener(),y.addCacheListener()),y);function M(s,e,t){let n;if(typeof s=="string"){const a=new URL(s,location.href),r=({url:c})=>c.href===a.href;n=new b(r,e,t)}else if(s instanceof RegExp)n=new De(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:i}={}){const a=new URL(s,location.href);a.hash="",yield a.href;const r=Te(a,e);if(yield r.href,t&&r.pathname.endsWith("/")){const c=new URL(r.href);c.pathname+=t,yield c.href}if(n){const c=new URL(r.href);c.pathname+=".html",yield c.href}if(i){const c=i({url:a});for(const o of c)yield o.href}}class Ie extends b{constructor(e,t){const n=({request:i})=>{const a=e.getURLsToCacheKeys();for(const r of Pe(i.url,t)){const c=a.get(r);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 i=await t.cacheMatch(e),a;if(!i)try{i=await n}catch(r){r instanceof Error&&(a=r)}if(!i)throw new h("no-response",{url:e.url,error:a});return i}}const Se="shlink-web-client",We="A React-based progressive web application for shlink",Be="/shlink-web-client/dependabot/npm_and_yarn/typescript-5.5.4",qe="https://github.com/shlinkio/shlink-web-client",Fe="MIT",He="module",Ve={lint:"npm run lint:css && npm run lint:js","lint:css":"stylelint src/*.scss src/**/*.scss","lint:js":"eslint src test config/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 --watch","test:ci":"npm run test -- --coverage","test:verbose":"npm run test -- --verbose"},$e={"@fortawesome/fontawesome-free":"^6.6.0","@fortawesome/fontawesome-svg-core":"^6.6.0","@fortawesome/free-brands-svg-icons":"^6.6.0","@fortawesome/free-regular-svg-icons":"^6.6.0","@fortawesome/free-solid-svg-icons":"^6.6.0","@fortawesome/react-fontawesome":"^0.2.2","@json2csv/plainjs":"^7.0.6","@reduxjs/toolkit":"^2.2.6","@shlinkio/data-manipulation":"^1.0.3","@shlinkio/shlink-frontend-kit":"^0.5.2","@shlinkio/shlink-js-sdk":"^1.1.0","@shlinkio/shlink-web-component":"^0.7.0",bootstrap:"5.2.3",bottlejs:"^2.0.1",clsx:"^2.1.1","compare-versions":"^6.1.1",csvtojson:"^2.0.10","date-fns":"^3.6.0",react:"^18.3.1","react-dom":"^18.3.1","react-external-link":"^2.3.1","react-redux":"^9.1.2","react-router-dom":"^6.25.1",reactstrap:"^9.2.2","redux-localstorage-simple":"^2.5.1",uuid:"^10.0.0","workbox-core":"^7.1.0","workbox-expiration":"^7.1.0","workbox-precaching":"^7.1.0","workbox-routing":"^7.1.0","workbox-strategies":"^7.1.0"},Ge={"@shlinkio/eslint-config-js-coding-standard":"~3.0.0","@shlinkio/stylelint-config-css-coding-standard":"~1.1.1","@stylistic/eslint-plugin":"^2.3.0","@testing-library/jest-dom":"^6.4.8","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.5.2","@total-typescript/shoehorn":"^0.1.2","@types/react":"^18.3.3","@types/react-dom":"^18.3.0","@types/uuid":"^10.0.0","@vitejs/plugin-react":"^4.3.1","@vitest/coverage-v8":"^2.0.4","adm-zip":"^0.5.14","axe-core":"^4.9.1",chalk:"^5.3.0",eslint:"^8.57.0","eslint-plugin-jsx-a11y":"^6.9.0","eslint-plugin-react":"^7.35.0","eslint-plugin-react-hooks":"^4.6.2","eslint-plugin-simple-import-sort":"^12.1.1",history:"^5.3.0",jsdom:"^24.1.1",sass:"^1.77.8",stylelint:"^15.11.0",typescript:"^5.5.4","typescript-eslint":"^7.17.0",vite:"^5.3.4","vite-plugin-pwa":"^0.20.1",vitest:"^2.0.2"},Qe=[">0.2%","not dead","not ie <= 11","not op_mini all"],ze={name:Se,description:We,private:!1,homepage:Be,repository:qe,license:Fe,type:He,scripts:Ve,dependencies:$e,devDependencies:Ge,browserslist:Qe};ie();Ae([{"revision":null,"url":"assets/index-CRpH7Bmq.css"},{"revision":null,"url":"assets/index-ty3txoqs.js"},{"revision":"7a49ac814d67ac84257966a53b59ad77","url":"index.html"},{"revision":"583b223ad8e20f05aaa64923d7db2e46","url":"icons/icon-1024x1024.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":"3e8169a112865ef0d76bba4e2dfd3a89","url":"icons/icon-16x16.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":"20f0b51945ae3c973420e31d6b4d43c1","url":"icons/icon-24x24.png"},{"revision":"4d896c5c7025582605de31fb74f0316b","url":"icons/icon-256x256.png"},{"revision":"d99b49e5bcad41968313c3e132e7c661","url":"icons/icon-310x310.png"},{"revision":"4c9695cfb4cea403c1b66bbb7b4f7420","url":"icons/icon-32x32.png"},{"revision":"f9597636bef677327c3abc0fd1a743c4","url":"icons/icon-384x384.png"},{"revision":"f74edb9cc54ac938c1589876f8da9f21","url":"icons/icon-40x40.png"},{"revision":"52933970fac8498311687de13549b014","url":"icons/icon-48x48.png"},{"revision":"de22c0eb9e08d3576df5cedb568ca56b","url":"icons/icon-512x512.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":"1fea22cc5319d8b8738d5bdc5f6c6047","url":"manifest.json"}]);const Je=new RegExp("/[^/?]+\\.[^/]+$");M(({request:s,url:e})=>!(s.mode!=="navigate"||e.pathname.startsWith("/_")||e.pathname.match(Je)),Ne(`${ze.homepage}/index.html`));M(({url:s})=>s.origin===self.location.origin&&s.pathname.endsWith(".png"),new Oe({cacheName:"images",plugins:[new be({maxEntries:50})]}));self.addEventListener("message",s=>{s.data&&s.data.type==="SKIP_WAITING"&&self.skipWaiting()});