@yoast/ai-insights-client 1.4.129 → 1.4.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,35 +5,35 @@ Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}
|
|
|
5
5
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Gd]=this[Gd]={accessors:{}}).accessors,i=this.prototype;function s(a){const o=os(a);r[o]||($1(i,a),r[o]=!0)}return q.isArray(e)?e.forEach(s):s(e),this}};Ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(Ot.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});q.freezeMethods(Ot);function wl(t,e){const n=this||ma,r=e||n,i=Ot.from(r.headers);let s=r.data;return q.forEach(t,function(o){s=o.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function r0(t){return!!(t&&t.__CANCEL__)}function Zi(t,e,n){ge.call(this,t==null?"canceled":t,ge.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(Zi,ge,{__CANCEL__:!0});function i0(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ex(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function tx(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),d=r[s];a||(a=u),n[i]=l,r[i]=u;let f=s,y=0;for(;f!==i;)y+=n[f++],f=f%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),u-a<e)return;const h=d&&u-d;return h?Math.round(y*1e3/h):void 0}}function nx(t,e){let n=0,r=1e3/e,i,s;const a=(u,d=Date.now())=>{n=d,i=null,s&&(clearTimeout(s),s=null),t.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?a(u,d):(i=u,s||(s=setTimeout(()=>{s=null,a(i)},r-f)))},()=>i&&a(i)]}const bo=(t,e,n=3)=>{let r=0;const i=tx(50,250);return nx(s=>{const a=s.loaded,o=s.lengthComputable?s.total:void 0,l=a-r,u=i(l),d=a<=o;r=a;const f={loaded:a,total:o,progress:o?a/o:void 0,bytes:l,rate:u||void 0,estimated:u&&o&&d?(o-a)/u:void 0,event:s,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(f)},n)},Qd=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Yd=t=>(...e)=>q.asap(()=>t(...e)),rx=ct.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,ct.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(ct.origin),ct.navigator&&/(msie|trident)/i.test(ct.navigator.userAgent)):()=>!0,ix=ct.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const a=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),q.isString(r)&&a.push("path="+r),q.isString(i)&&a.push("domain="+i),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function sx(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ax(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function s0(t,e,n){let r=!sx(e);return t&&(r||n==!1)?ax(t,e):e}const Vd=t=>t instanceof Ot?{...t}:t;function ai(t,e){e=e||{};const n={};function r(u,d,f,y){return q.isPlainObject(u)&&q.isPlainObject(d)?q.merge.call({caseless:y},u,d):q.isPlainObject(d)?q.merge({},d):q.isArray(d)?d.slice():d}function i(u,d,f,y){if(q.isUndefined(d)){if(!q.isUndefined(u))return r(void 0,u,f,y)}else return r(u,d,f,y)}function s(u,d){if(!q.isUndefined(d))return r(void 0,d)}function a(u,d){if(q.isUndefined(d)){if(!q.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function o(u,d,f){if(f in e)return r(u,d);if(f in t)return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(u,d,f)=>i(Vd(u),Vd(d),f,!0)};return q.forEach(Object.keys(Object.assign({},t,e)),function(d){const f=l[d]||i,y=f(t[d],e[d],d);q.isUndefined(y)&&f!==o||(n[d]=y)}),n}const a0=t=>{const e=ai({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:o}=e;e.headers=a=Ot.from(a),e.url=e0(s0(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let l;if(q.isFormData(n)){if(ct.hasStandardBrowserEnv||ct.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(ct.hasStandardBrowserEnv&&(r&&q.isFunction(r)&&(r=r(e)),r||r!==!1&&rx(e.url))){const u=i&&s&&ix.read(s);u&&a.set(i,u)}return e},ox=typeof XMLHttpRequest!="undefined",lx=ox&&function(t){return new Promise(function(n,r){const i=a0(t);let s=i.data;const a=Ot.from(i.headers).normalize();let{responseType:o,onUploadProgress:l,onDownloadProgress:u}=i,d,f,y,h,p;function m(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(d),i.signal&&i.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(i.method.toUpperCase(),i.url,!0),g.timeout=i.timeout;function v(){if(!g)return;const k=Ot.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),C={data:!o||o==="text"||o==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:k,config:t,request:g};i0(function(w){n(w),m()},function(w){r(w),m()},C),g=null}"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(v)},g.onabort=function(){g&&(r(new ge("Request aborted",ge.ECONNABORTED,t,g)),g=null)},g.onerror=function(){r(new ge("Network Error",ge.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let j=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||t0;i.timeoutErrorMessage&&(j=i.timeoutErrorMessage),r(new ge(j,C.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,t,g)),g=null},s===void 0&&a.setContentType(null),"setRequestHeader"in g&&q.forEach(a.toJSON(),function(j,C){g.setRequestHeader(C,j)}),q.isUndefined(i.withCredentials)||(g.withCredentials=!!i.withCredentials),o&&o!=="json"&&(g.responseType=i.responseType),u&&([y,p]=bo(u,!0),g.addEventListener("progress",y)),l&&g.upload&&([f,h]=bo(l),g.upload.addEventListener("progress",f),g.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(d=k=>{g&&(r(!k||k.type?new Zi(null,t,g):k),g.abort(),g=null)},i.cancelToken&&i.cancelToken.subscribe(d),i.signal&&(i.signal.aborted?d():i.signal.addEventListener("abort",d)));const S=ex(i.url);if(S&&ct.protocols.indexOf(S)===-1){r(new ge("Unsupported protocol "+S+":",ge.ERR_BAD_REQUEST,t));return}g.send(s||null)})},ux=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,o();const d=u instanceof Error?u:this.reason;r.abort(d instanceof ge?d:new Zi(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,s(new ge(`timeout ${e} of ms exceeded`,ge.ETIMEDOUT))},e);const o=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),t=null)};t.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>q.asap(o),l}},cx=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},dx=async function*(t,e){for await(const n of fx(t))yield*cx(n,e)},fx=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Kd=(t,e,n,r)=>{const i=dx(t,e);let s=0,a,o=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await i.next();if(u){o(),l.close();return}let f=d.byteLength;if(n){let y=s+=f;n(y)}l.enqueue(new Uint8Array(d))}catch(u){throw o(u),u}},cancel(l){return o(l),i.return()}},{highWaterMark:2})},Yo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",o0=Yo&&typeof ReadableStream=="function",hx=Yo&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),l0=(t,...e)=>{try{return!!t(...e)}catch(n){return!1}},yx=o0&&l0(()=>{let t=!1;const e=new Request(ct.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Xd=64*1024,Lu=o0&&l0(()=>q.isReadableStream(new Response("").body)),xo={stream:Lu&&(t=>t.body)};Yo&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!xo[e]&&(xo[e]=q.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new ge(`Response type '${e}' is not supported`,ge.ERR_NOT_SUPPORT,r)})})})(new Response);const px=async t=>{if(t==null)return 0;if(q.isBlob(t))return t.size;if(q.isSpecCompliantForm(t))return(await new Request(ct.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(q.isArrayBufferView(t)||q.isArrayBuffer(t))return t.byteLength;if(q.isURLSearchParams(t)&&(t=t+""),q.isString(t))return(await hx(t)).byteLength},mx=async(t,e)=>{const n=q.toFiniteNumber(t.getContentLength());return n==null?px(e):n},gx=Yo&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:s,timeout:a,onDownloadProgress:o,onUploadProgress:l,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:y}=a0(t);u=u?(u+"").toLowerCase():"text";let h=ux([i,s&&s.toAbortSignal()],a),p;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&yx&&n!=="get"&&n!=="head"&&(g=await mx(d,r))!==0){let C=new Request(e,{method:"POST",body:r,duplex:"half"}),b;if(q.isFormData(r)&&(b=C.headers.get("content-type"))&&d.setContentType(b),C.body){const[w,x]=Qd(g,bo(Yd(l)));r=Kd(C.body,Xd,w,x)}}q.isString(f)||(f=f?"include":"omit");const v="credentials"in Request.prototype;p=new Request(e,{...y,signal:h,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:v?f:void 0});let S=await fetch(p,y);const k=Lu&&(u==="stream"||u==="response");if(Lu&&(o||k&&m)){const C={};["status","statusText","headers"].forEach(L=>{C[L]=S[L]});const b=q.toFiniteNumber(S.headers.get("content-length")),[w,x]=o&&Qd(b,bo(Yd(o),!0))||[];S=new Response(Kd(S.body,Xd,w,()=>{x&&x(),m&&m()}),C)}u=u||"text";let j=await xo[q.findKey(xo,u)||"text"](S,t);return!k&&m&&m(),await new Promise((C,b)=>{i0(C,b,{data:j,headers:Ot.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:p})})}catch(v){throw m&&m(),v&&v.name==="TypeError"&&/Load failed|fetch/i.test(v.message)?Object.assign(new ge("Network Error",ge.ERR_NETWORK,t,p),{cause:v.cause||v}):ge.from(v,v&&v.code,t,p)}}),Nu={http:L1,xhr:lx,fetch:gx};q.forEach(Nu,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}});const Jd=t=>`- ${t}`,vx=t=>q.isFunction(t)||t===null||t===!1,u0={getAdapter:t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let a;if(r=n,!vx(n)&&(r=Nu[(a=String(n)).toLowerCase()],r===void 0))throw new ge(`Unknown adapter '${a}'`);if(r)break;i[a||"#"+s]=r}if(!r){const s=Object.entries(i).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
|
|
6
6
|
`+s.map(Jd).join(`
|
|
7
7
|
`):" "+Jd(s[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Nu};function Al(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Zi(null,t)}function Zd(t){return Al(t),t.headers=Ot.from(t.headers),t.data=wl.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),u0.getAdapter(t.adapter||ma.adapter)(t).then(function(r){return Al(t),r.data=wl.call(t,t.transformResponse,r),r.headers=Ot.from(r.headers),r},function(r){return r0(r)||(Al(t),r&&r.response&&(r.response.data=wl.call(t,t.transformResponse,r.response),r.response.headers=Ot.from(r.response.headers))),Promise.reject(r)})}const c0="1.10.0",Vo={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Vo[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const $d={};Vo.transitional=function(e,n,r){function i(s,a){return"[Axios v"+c0+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,o)=>{if(e===!1)throw new ge(i(a," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!$d[a]&&($d[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,o):!0}};Vo.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function bx(t,e,n){if(typeof t!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],a=e[s];if(a){const o=t[s],l=o===void 0||a(o,s,t);if(l!==!0)throw new ge("option "+s+" must be "+l,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+s,ge.ERR_BAD_OPTION)}}const ao={assertOptions:bx,validators:Vo},Sn=ao.validators;let ti=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Wd,response:new Wd}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
8
|
-
`+s):r.stack=s}catch(a){}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ai(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&ao.assertOptions(r,{silentJSONParsing:Sn.transitional(Sn.boolean),forcedJSONParsing:Sn.transitional(Sn.boolean),clarifyTimeoutError:Sn.transitional(Sn.boolean)},!1),i!=null&&(q.isFunction(i)?n.paramsSerializer={serialize:i}:ao.assertOptions(i,{encode:Sn.function,serialize:Sn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ao.assertOptions(n,{baseUrl:Sn.spelling("baseURL"),withXsrfToken:Sn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&q.merge(s.common,s[n.method]);s&&q.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=Ot.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,y;if(!l){const p=[Zd.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,u),y=p.length,d=Promise.resolve(n);f<y;)d=d.then(p[f++],p[f++]);return d}y=o.length;let h=n;for(f=0;f<y;){const p=o[f++],m=o[f++];try{h=p(h)}catch(g){m.call(this,g);break}}try{d=Zd.call(this,h)}catch(p){return Promise.reject(p)}for(f=0,y=u.length;f<y;)d=d.then(u[f++],u[f++]);return d}getUri(e){e=ai(this.defaults,e);const n=s0(e.baseURL,e.url,e.allowAbsoluteUrls);return e0(n,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){ti.prototype[e]=function(n,r){return this.request(ai(r||{},{method:e,url:n,data:(r||{}).data}))}});q.forEach(["post","put","patch"],function(e){function n(r){return function(s,a,o){return this.request(ai(o||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}ti.prototype[e]=n(),ti.prototype[e+"Form"]=n(!0)});let xx=class d0{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{r.subscribe(o),s=o}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},e(function(s,a,o){r.reason||(r.reason=new Zi(s,a,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new d0(function(i){e=i}),cancel:e}}};function wx(t){return function(n){return t.apply(null,n)}}function Ax(t){return q.isObject(t)&&t.isAxiosError===!0}const Mu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Mu).forEach(([t,e])=>{Mu[e]=t});function f0(t){const e=new ti(t),n=Hm(ti.prototype.request,e);return q.extend(n,ti.prototype,e,{allOwnKeys:!0}),q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return f0(ai(t,i))},n}const We=f0(ma);We.Axios=ti;We.CanceledError=Zi;We.CancelToken=xx;We.isCancel=r0;We.VERSION=c0;We.toFormData=Qo;We.AxiosError=ge;We.Cancel=We.CanceledError;We.all=function(e){return Promise.all(e)};We.spread=wx;We.isAxiosError=Ax;We.mergeConfig=ai;We.AxiosHeaders=Ot;We.formToJSON=t=>n0(q.isHTMLForm(t)?new FormData(t):t);We.getAdapter=u0.getAdapter;We.HttpStatusCode=Mu;We.default=We;const{Axios:wL,AxiosError:AL,CanceledError:SL,isCancel:CL,CancelToken:jL,VERSION:kL,all:EL,Cancel:OL,isAxiosError:Sx,spread:TL,toFormData:PL,AxiosHeaders:IL,HttpStatusCode:LL,formToJSON:NL,getAdapter:ML,mergeConfig:_L}=We,Cx={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function qs(t){"@babel/helpers - typeof";return qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qs(t)}function vt(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Rt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(O,_){return b=O,w=0,x=t,I.n=_,a}};function z(P,O){for(w=P,x=O,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];P>3?(_=Y===O)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=P<2&&G<R[1])?(w=0,I.v=O,I.n=R[1]):G<Y&&(_=P<3||R[0]>O||O>Y)&&(R[4]=P,R[5]=O,I.n=Y,w=0))}if(_||P>1)return a;throw M=!0,O}return function(P,O,_){if(L>1)throw TypeError("Generator is already running");for(M&&O===1&&z(O,_),w=O,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(P="next"),e=b[P]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+P+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Rt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Rt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Rt(f,"constructor",u),Rt(u,"constructor",l),l.displayName="GeneratorFunction",Rt(u,i,"GeneratorFunction"),Rt(f),Rt(f,i,"Generator"),Rt(f,r,function(){return this}),Rt(f,"toString",function(){return"[object Generator]"}),(vt=function(){return{w:s,m:y}})()}function Rt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Rt=function(a,o,l,u){function d(f,y){Rt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Rt(t,e,n,r)}function ef(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ni(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ef(Object(n),!0).forEach(function(r){jx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ef(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jx(t,e,n){return(e=kx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kx(t){var e=Ex(t,"string");return qs(e)=="symbol"?e:e+""}function Ex(t,e){if(qs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(qs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function tf(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function oi(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){tf(s,r,i,a,o,"next",l)}function o(l){tf(s,r,i,a,o,"throw",l)}a(void 0)})}}var h0=function(){var e,n;if((e=document)!==null&&e!==void 0&&e.cookie){var r=document.cookie.match(new RegExp("(^| )access_token=([^;]+)"));if(r)return decodeURIComponent(r[2])}return((n=Cx)===null||n===void 0?void 0:n.VITE_MYYOAST_ACCESS_TOKEN)||""};function nf(t){var e;if(typeof document!="undefined"){var n="; ".concat(document.cookie),r=n.split("; ".concat(t,"="));if(r.length===2)return(e=r.pop())===null||e===void 0?void 0:e.split(";").shift()}}var Ox="yst-insights-token",$i=We.create({withCredentials:!0});$i.interceptors.request.use(function(){var t=oi(vt().m(function e(n){var r,i;return vt().w(function(s){for(;;)switch(s.n){case 0:return s.n=1,Px();case 1:return r=s.v,s.n=2,p0();case 2:return i=s.v,n.headers=ni(ni(ni({},n.headers||{}),i?{"X-XSRF-TOKEN":i}:{}),r?{Authorization:"Bearer ".concat(r)}:{}),s.a(2,n)}},e)}));return function(e){return t.apply(this,arguments)}}(),function(t){return Promise.reject(t)},{synchronous:!1});$i.interceptors.response.use(function(t){return t},function(){var t=oi(vt().m(function e(n){var r;return vt().w(function(i){for(;;)switch(i.n){case 0:return n==null||(r=n.response)===null||r===void 0||r.status,i.a(2,Promise.reject(n))}},e)}));return function(e){return t.apply(this,arguments)}}());function Ke(t){return _u.apply(this,arguments)}function _u(){return _u=oi(vt().m(function t(e){var n;return vt().w(function(r){for(;;)switch(r.n){case 0:return n=ni({},e),delete n.baseURL,r.a(2,$i.request(ni(ni({},n),{},{withCredentials:!0})))}},t)})),_u.apply(this,arguments)}function y0(t){$i.defaults.baseURL=t}function rf(){return $i.defaults.baseURL}function Tx(t){h0=t}var ls=null;function Px(){return Ru.apply(this,arguments)}function Ru(){return Ru=oi(vt().m(function t(){var e,n,r,i,s;return vt().w(function(a){for(;;)switch(a.p=a.n){case 0:if(e=h0(),n=$i.defaults.baseURL,r=Ix(e,n),i=sessionStorage.getItem(r),!i){a.n=4;break}if(a.p=1,s=JSON.parse(i),!((s==null?void 0:s.validUntil)>Date.now()&&s.value)){a.n=2;break}return a.a(2,String(s.value));case 2:a.n=4;break;case 3:a.p=3,a.v;case 4:if(!ls){a.n=5;break}return a.a(2,ls);case 5:return ls=oi(vt().m(function o(){var l,u,d,f,y;return vt().w(function(h){for(;;)switch(h.p=h.n){case 0:return h.p=0,h.n=1,p0();case 1:return l=h.v,h.n=2,We.post(n+"/users/getToken",{},{headers:ni({Authorization:"Bearer "+e},l?{"X-XSRF-TOKEN":l}:{}),withCredentials:!0});case 2:if(u=h.v,d=u.data,!(d!=null&&d.plainTextToken)){h.n=3;break}return sessionStorage.setItem(r,JSON.stringify({value:d.plainTextToken,validUntil:Date.parse(((f=d.accessToken)===null||f===void 0?void 0:f.expires_at)||"")||Date.now()+15*60*1e3})),h.a(2,d.plainTextToken);case 3:h.n=5;break;case 4:h.p=4,y=h.v,We.isAxiosError(y)?y.response?console.error("Login failed with status",y.response.status,y.response.data):y.request?console.error("Login request made but no response received",y.request):console.error("Error setting up login request",y.message):console.error("Non-Axios error during login",y);case 5:return h.p=5,ls=null,h.f(5);case 6:return h.a(2,"")}},o,null,[[0,4,5,6]])}))(),a.a(2,ls)}},t,null,[[1,3]])})),Ru.apply(this,arguments)}function Ix(t,e){var n=Array.from(t+e).reduce(function(r,i){return(r<<5)-r+i.charCodeAt(0)},0);return Ox+":"+n}var us=null;function p0(){return Du.apply(this,arguments)}function Du(){return Du=oi(vt().m(function t(){var e;return vt().w(function(n){for(;;)switch(n.n){case 0:if(window.location.hostname===new URL(rf()||window.location.href).hostname){n.n=1;break}return n.a(2,"");case 1:if(e=nf("XSRF-TOKEN"),!e){n.n=2;break}return n.a(2,decodeURIComponent(e));case 2:if(!us){n.n=3;break}return n.a(2,us);case 3:return us=oi(vt().m(function r(){var i;return vt().w(function(s){for(;;)switch(s.p=s.n){case 0:return s.p=0,s.n=1,We.get(((i=rf())===null||i===void 0?void 0:i.replace("/api/v1",""))+"/sanctum/csrf-cookie",{withCredentials:!0});case 1:return s.a(2,decodeURIComponent(nf("XSRF-TOKEN")||""));case 2:return s.p=2,us=null,s.f(2);case 3:return s.a(2)}},r,null,[[0,,2,3]])}))(),n.a(2,us)}},t)})),Du.apply(this,arguments)}function Ws(t){"@babel/helpers - typeof";return Ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ws(t)}function sf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ne(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sf(Object(n),!0).forEach(function(r){Lx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Lx(t,e,n){return(e=Nx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nx(t){var e=Mx(t,"string");return Ws(e)=="symbol"?e:e+""}function Mx(t,e){if(Ws(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ws(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _x=function(e,n){return Ke({url:"/brands/".concat(e,"/analysis"),method:"GET",signal:n})},Ko=function(e){return["/brands/".concat(e,"/analysis")]},Rx=function(e,n){var r,i=n!=null?n:{},s=i.query,a=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Ko(e),o=function(u){var d=u.signal;return _x(e,d)};return ne({queryKey:a,queryFn:o,enabled:!!e},s)};function Xo(t,e,n){var r=Rx(t,e),i=Dn(r);return i.queryKey=r.queryKey,i}var Dx=function(e,n){return Ke({url:"/brands/".concat(e,"/trial-analysis"),method:"POST",signal:n})},Bx=function(e){var n=["postTrialAnalysis"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId;return Dx(u)};return ne({mutationFn:s},i)},Fx=function(e,n){var r=Bx(e);return vn(r)},zx=function(e,n,r){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n),method:"GET",signal:r})},mn=function(e,n){return["/brands/".concat(e,"/analysis/").concat(n)]},Ux=function(e,n,r){var i,s=r!=null?r:{},a=s.query,o=(i=a==null?void 0:a.queryKey)!==null&&i!==void 0?i:mn(e,n),l=function(d){var f=d.signal;return zx(e,n,f)};return ne({queryKey:o,queryFn:l,enabled:!!(e&&n)},a)};function ga(t,e,n,r){var i=Ux(t,e,n),s=Dn(i);return s.queryKey=i.queryKey,s}var Hx=function(e,n,r){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n,"/scans/").concat(r),method:"DELETE"})},qx=function(e){var n=["deleteScan"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.analysisId,f=l.scanId;return Hx(u,d,f)};return ne({mutationFn:s},i)},Wx=function(e,n){var r=qx(e);return vn(r)},Gx=function(e,n,r,i){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n,"/scans/").concat(r,"/manual-retry"),method:"POST",signal:i})},Qx=function(e){var n=["manualRetryScan"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.analysisId,f=l.scanId;return Gx(u,d,f)};return ne({mutationFn:s},i)},Yx=function(e,n){var r=Qx(e);return vn(r)},Vx=function(e,n,r){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n,"/status"),method:"GET",signal:r})},tr=function(e,n){return["/brands/".concat(e,"/analysis/").concat(n,"/status")]},Kx=function(e,n,r){var i,s=r!=null?r:{},a=s.query,o=(i=a==null?void 0:a.queryKey)!==null&&i!==void 0?i:tr(e,n),l=function(d){var f=d.signal;return Vx(e,n,f)};return ne({queryKey:o,queryFn:l,enabled:!!(e&&n)},a)};function Xx(t,e,n,r){var i=Kx(t,e,n),s=Dn(i);return s.queryKey=i.queryKey,s}var Jx=function(e,n,r,i){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n,"/scans/").concat(r,"/query-results"),method:"GET",signal:i})},Zx=function(e,n,r){return["/brands/".concat(e,"/analysis/").concat(n,"/scans/").concat(r,"/query-results")]},$x=function(e,n,r,i){var s,a=i!=null?i:{},o=a.query,l=(s=o==null?void 0:o.queryKey)!==null&&s!==void 0?s:Zx(e,n,r),u=function(f){var y=f.signal;return Jx(e,n,r,y)};return ne({queryKey:l,queryFn:u,enabled:!!(e&&n&&r)},o)};function m0(t,e,n,r,i){var s=$x(t,e,n,r),a=Dn(s);return a.queryKey=s.queryKey,a}var ew=function(e){return Ke({url:"/users/logout",method:"POST",signal:e})},tw=function(e){var n=["logout"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return ew()};return ne({mutationFn:s},i)},nw=function(e,n){var r=tw(e);return vn(r)},rw=function(e,n){return Ke({url:"/brands/".concat(e,"/associated-brands"),method:"GET",signal:n})},wo=function(e){return["/brands/".concat(e,"/associated-brands")]},iw=function(e,n){var r,i=n!=null?n:{},s=i.query,a=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:wo(e),o=function(u){var d=u.signal;return rw(e,d)};return ne({queryKey:a,queryFn:o,enabled:!!e},s)};function sw(t,e,n){var r=iw(t,e),i=Dn(r);return i.queryKey=r.queryKey,i}var aw=function(e,n,r){return Ke({url:"/brands/".concat(e,"/associated-brand-groups"),method:"POST",headers:{"Content-Type":"application/json"},data:n,signal:r})},ow=function(e){var n=["createBrandAssociationGroup"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.data;return aw(u,d)};return ne({mutationFn:s},i)},g0=function(e,n){var r=ow(e);return vn(r)},lw=function(e,n){return Ke({url:"/brands/".concat(e,"/associated-brand-groups/").concat(n),method:"DELETE"})},uw=function(e){var n=["deleteBrandAssociationGroup"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.brandGroupId;return lw(u,d)};return ne({mutationFn:s},i)},cw=function(e,n){var r=uw(e);return vn(r)},dw=function(e){return Ke({url:"/brands",method:"GET",signal:e})},pn=function(){return["/brands"]},fw=function(e){var n,r=e!=null?e:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:pn(),a=function(l){var u=l.signal;return dw(u)};return ne({queryKey:s,queryFn:a},i)};function hi(t,e){var n=fw(t),r=Dn(n);return r.queryKey=n.queryKey,r}var hw=function(e,n){return Ke({url:"/brands",method:"POST",headers:{"Content-Type":"application/json"},data:e,signal:n})},yw=function(e){var n=["createBrand"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.data;return hw(u)};return ne({mutationFn:s},i)},pw=function(e,n){var r=yw(e);return vn(r)},mw=function(e,n){return Ke({url:"/brands/".concat(e),method:"GET",signal:n})},Jo=function(e){return["/brands/".concat(e)]},gw=function(e,n){var r,i=n!=null?n:{},s=i.query,a=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Jo(e),o=function(u){var d=u.signal;return mw(e,d)};return ne({queryKey:a,queryFn:o,enabled:!!e},s)};function va(t,e,n){var r=gw(t,e),i=Dn(r);return i.queryKey=r.queryKey,i}var vw=function(e){return Ke({url:"/brands/".concat(e),method:"DELETE"})},bw=function(e){var n=["deleteBrand"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId;return vw(u)};return ne({mutationFn:s},i)},xw=function(e,n){var r=bw(e);return vn(r)},ww=function(e,n){return Ke({url:"/brands/".concat(e,"/settings"),method:"PATCH",headers:{"Content-Type":"application/json"},data:n})},Aw=function(e){var n=["updateBrandSettings"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.data;return ww(u,d)};return ne({mutationFn:s},i)},v0=function(e,n){var r=Aw(e);return vn(r)},Sw=function(e,n){return Ke({url:"/brands/".concat(e,"/queries"),method:"PUT",headers:{"Content-Type":"application/json"},data:n})},Cw=function(e){var n=["updateBrandQueries"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.data;return Sw(u,d)};return ne({mutationFn:s},i)},jw=function(e,n){var r=Cw(e);return vn(r)},kw=function(e,n){return Ke({url:"/brands/".concat(e,"/query-suggestions"),method:"GET",signal:n})},Ew=function(e){return["/brands/".concat(e,"/query-suggestions")]},Ow=function(e,n){var r,i=n!=null?n:{},s=i.query,a=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Ew(e),o=function(u){var d=u.signal;return kw(e,d)};return ne({queryKey:a,queryFn:o,enabled:!!e},s)};function Tw(t,e,n){var r=Ow(t,e),i=Dn(r);return i.queryKey=r.queryKey,i}var Pw=function(e){return Ke({url:"/users/current",method:"GET",signal:e})},ba=function(){return["/users/current"]},Iw=function(e){var n,r=e!=null?e:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:ba(),a=function(l){var u=l.signal;return Pw(u)};return ne({queryKey:s,queryFn:a},i)};function yi(t,e){var n=Iw(t),r=Dn(n);return r.queryKey=n.queryKey,r}var Lw=function(e){return Ke({url:"/users/account-debug",method:"GET",signal:e})},Nw=function(){return["/users/account-debug"]},Mw=function(e){var n,r=e!=null?e:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:Nw(),a=function(l){var u=l.signal;return Lw(u)};return ne({queryKey:s,queryFn:a},i)};function _w(t,e){var n=Mw(t),r=Dn(n);return r.queryKey=n.queryKey,r}var Rw=function(){return Ke({url:"/users/data",method:"DELETE"})},Dw=function(e){var n=["deleteUserData"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return Rw()};return ne({mutationFn:s},i)},Bw=function(e,n){var r=Dw(e);return vn(r)},b0=F.createContext(void 0),Fw=function(e){var n,r,i,s,a,o,l=e.children,u=e.brandId,d=e.analysisId,f=e.aiProvider,y=e.hostAppProps,h=y===void 0?{}:y,p=Ta("/brands/:brandId"),m=Ta("/brands/:brandId/*"),g=Ta("/brands/:brandId/analysis/:analysisId"),v=Ta("/brands/:brandId/analysis/:analysisId/*"),S=(g==null||(n=g.params)===null||n===void 0?void 0:n.brandId)||(v==null||(r=v.params)===null||r===void 0?void 0:r.brandId)||(m==null||(i=m.params)===null||i===void 0?void 0:i.brandId)||(p==null||(s=p.params)===null||s===void 0?void 0:s.brandId),k=(g==null||(a=g.params)===null||a===void 0?void 0:a.analysisId)||(v==null||(o=v.params)===null||o===void 0?void 0:o.analysisId),j=F.useMemo(function(){return{brandId:S||u||"",analysisId:k||d||"latest",aiProvider:f||"openai",hostAppProps:h}},[S,u,k,d,f,h]),C=F.useMemo(function(){return{data:j}},[j]);return c.jsx(b0.Provider,{value:C,children:l})},x0=F.createContext(void 0),zw=function(e){var n=e.children,r=e.setBrandId,i=e.setAnalysisId,s=e.setAiProvider,a=F.useCallback(function(f){r(f),i("latest")},[r,i]),o=F.useCallback(function(f){i(f)},[i]),l=F.useCallback(function(f){s(f)},[s]),u=F.useMemo(function(){return{setBrandId:a,setAnalysisId:o,setAiProvider:l}},[a,o,l]),d=F.useMemo(function(){return{mutations:u}},[u]);return c.jsx(x0.Provider,{value:d,children:n})};function Sl(t,e){return Ww(t)||qw(t,e)||Hw(t,e)||Uw()}function Uw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
8
|
+
`+s):r.stack=s}catch(a){}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ai(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&ao.assertOptions(r,{silentJSONParsing:Sn.transitional(Sn.boolean),forcedJSONParsing:Sn.transitional(Sn.boolean),clarifyTimeoutError:Sn.transitional(Sn.boolean)},!1),i!=null&&(q.isFunction(i)?n.paramsSerializer={serialize:i}:ao.assertOptions(i,{encode:Sn.function,serialize:Sn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ao.assertOptions(n,{baseUrl:Sn.spelling("baseURL"),withXsrfToken:Sn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&q.merge(s.common,s[n.method]);s&&q.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=Ot.concat(a,s);const o=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,f=0,y;if(!l){const p=[Zd.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,u),y=p.length,d=Promise.resolve(n);f<y;)d=d.then(p[f++],p[f++]);return d}y=o.length;let h=n;for(f=0;f<y;){const p=o[f++],m=o[f++];try{h=p(h)}catch(g){m.call(this,g);break}}try{d=Zd.call(this,h)}catch(p){return Promise.reject(p)}for(f=0,y=u.length;f<y;)d=d.then(u[f++],u[f++]);return d}getUri(e){e=ai(this.defaults,e);const n=s0(e.baseURL,e.url,e.allowAbsoluteUrls);return e0(n,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){ti.prototype[e]=function(n,r){return this.request(ai(r||{},{method:e,url:n,data:(r||{}).data}))}});q.forEach(["post","put","patch"],function(e){function n(r){return function(s,a,o){return this.request(ai(o||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}ti.prototype[e]=n(),ti.prototype[e+"Form"]=n(!0)});let xx=class d0{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{r.subscribe(o),s=o}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},e(function(s,a,o){r.reason||(r.reason=new Zi(s,a,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new d0(function(i){e=i}),cancel:e}}};function wx(t){return function(n){return t.apply(null,n)}}function Ax(t){return q.isObject(t)&&t.isAxiosError===!0}const Mu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Mu).forEach(([t,e])=>{Mu[e]=t});function f0(t){const e=new ti(t),n=Hm(ti.prototype.request,e);return q.extend(n,ti.prototype,e,{allOwnKeys:!0}),q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return f0(ai(t,i))},n}const We=f0(ma);We.Axios=ti;We.CanceledError=Zi;We.CancelToken=xx;We.isCancel=r0;We.VERSION=c0;We.toFormData=Qo;We.AxiosError=ge;We.Cancel=We.CanceledError;We.all=function(e){return Promise.all(e)};We.spread=wx;We.isAxiosError=Ax;We.mergeConfig=ai;We.AxiosHeaders=Ot;We.formToJSON=t=>n0(q.isHTMLForm(t)?new FormData(t):t);We.getAdapter=u0.getAdapter;We.HttpStatusCode=Mu;We.default=We;const{Axios:wL,AxiosError:AL,CanceledError:SL,isCancel:CL,CancelToken:jL,VERSION:kL,all:EL,Cancel:OL,isAxiosError:Sx,spread:TL,toFormData:PL,AxiosHeaders:IL,HttpStatusCode:LL,formToJSON:NL,getAdapter:ML,mergeConfig:_L}=We,Cx={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};function qs(t){"@babel/helpers - typeof";return qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qs(t)}function vt(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Rt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Rt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Rt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Rt(f,"constructor",u),Rt(u,"constructor",l),l.displayName="GeneratorFunction",Rt(u,i,"GeneratorFunction"),Rt(f),Rt(f,i,"Generator"),Rt(f,r,function(){return this}),Rt(f,"toString",function(){return"[object Generator]"}),(vt=function(){return{w:s,m:y}})()}function Rt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Rt=function(a,o,l,u){function d(f,y){Rt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Rt(t,e,n,r)}function ef(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ni(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ef(Object(n),!0).forEach(function(r){jx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ef(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function jx(t,e,n){return(e=kx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kx(t){var e=Ex(t,"string");return qs(e)=="symbol"?e:e+""}function Ex(t,e){if(qs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(qs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function tf(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function oi(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){tf(s,r,i,a,o,"next",l)}function o(l){tf(s,r,i,a,o,"throw",l)}a(void 0)})}}var h0=function(){var e,n;if((e=document)!==null&&e!==void 0&&e.cookie){var r=document.cookie.match(new RegExp("(^| )access_token=([^;]+)"));if(r)return decodeURIComponent(r[2])}return((n=Cx)===null||n===void 0?void 0:n.VITE_MYYOAST_ACCESS_TOKEN)||""};function nf(t){var e;if(typeof document!="undefined"){var n="; ".concat(document.cookie),r=n.split("; ".concat(t,"="));if(r.length===2)return(e=r.pop())===null||e===void 0?void 0:e.split(";").shift()}}var Ox="yst-insights-token",$i=We.create({withCredentials:!0});$i.interceptors.request.use(function(){var t=oi(vt().m(function e(n){var r,i;return vt().w(function(s){for(;;)switch(s.n){case 0:return s.n=1,Px();case 1:return r=s.v,s.n=2,p0();case 2:return i=s.v,n.headers=ni(ni(ni({},n.headers||{}),i?{"X-XSRF-TOKEN":i}:{}),r?{Authorization:"Bearer ".concat(r)}:{}),s.a(2,n)}},e)}));return function(e){return t.apply(this,arguments)}}(),function(t){return Promise.reject(t)},{synchronous:!1});$i.interceptors.response.use(function(t){return t},function(){var t=oi(vt().m(function e(n){var r;return vt().w(function(i){for(;;)switch(i.n){case 0:return n==null||(r=n.response)===null||r===void 0||r.status,i.a(2,Promise.reject(n))}},e)}));return function(e){return t.apply(this,arguments)}}());function Ke(t){return _u.apply(this,arguments)}function _u(){return _u=oi(vt().m(function t(e){var n;return vt().w(function(r){for(;;)switch(r.n){case 0:return n=ni({},e),delete n.baseURL,r.a(2,$i.request(ni(ni({},n),{},{withCredentials:!0})))}},t)})),_u.apply(this,arguments)}function y0(t){$i.defaults.baseURL=t}function rf(){return $i.defaults.baseURL}function Tx(t){h0=t}var ls=null;function Px(){return Ru.apply(this,arguments)}function Ru(){return Ru=oi(vt().m(function t(){var e,n,r,i,s;return vt().w(function(a){for(;;)switch(a.p=a.n){case 0:if(e=h0(),n=$i.defaults.baseURL,r=Ix(e,n),i=sessionStorage.getItem(r),!i){a.n=4;break}if(a.p=1,s=JSON.parse(i),!((s==null?void 0:s.validUntil)>Date.now()&&s.value)){a.n=2;break}return a.a(2,String(s.value));case 2:a.n=4;break;case 3:a.p=3,a.v;case 4:if(!ls){a.n=5;break}return a.a(2,ls);case 5:return ls=oi(vt().m(function o(){var l,u,d,f,y;return vt().w(function(h){for(;;)switch(h.p=h.n){case 0:return h.p=0,h.n=1,p0();case 1:return l=h.v,h.n=2,We.post(n+"/users/getToken",{},{headers:ni({Authorization:"Bearer "+e},l?{"X-XSRF-TOKEN":l}:{}),withCredentials:!0});case 2:if(u=h.v,d=u.data,!(d!=null&&d.plainTextToken)){h.n=3;break}return sessionStorage.setItem(r,JSON.stringify({value:d.plainTextToken,validUntil:Date.parse(((f=d.accessToken)===null||f===void 0?void 0:f.expires_at)||"")||Date.now()+15*60*1e3})),h.a(2,d.plainTextToken);case 3:h.n=5;break;case 4:h.p=4,y=h.v,We.isAxiosError(y)?y.response?console.error("Login failed with status",y.response.status,y.response.data):y.request?console.error("Login request made but no response received",y.request):console.error("Error setting up login request",y.message):console.error("Non-Axios error during login",y);case 5:return h.p=5,ls=null,h.f(5);case 6:return h.a(2,"")}},o,null,[[0,4,5,6]])}))(),a.a(2,ls)}},t,null,[[1,3]])})),Ru.apply(this,arguments)}function Ix(t,e){var n=Array.from(t+e).reduce(function(r,i){return(r<<5)-r+i.charCodeAt(0)},0);return Ox+":"+n}var us=null;function p0(){return Du.apply(this,arguments)}function Du(){return Du=oi(vt().m(function t(){var e;return vt().w(function(n){for(;;)switch(n.n){case 0:if(window.location.hostname===new URL(rf()||window.location.href).hostname){n.n=1;break}return n.a(2,"");case 1:if(e=nf("XSRF-TOKEN"),!e){n.n=2;break}return n.a(2,decodeURIComponent(e));case 2:if(!us){n.n=3;break}return n.a(2,us);case 3:return us=oi(vt().m(function r(){var i;return vt().w(function(s){for(;;)switch(s.p=s.n){case 0:return s.p=0,s.n=1,We.get(((i=rf())===null||i===void 0?void 0:i.replace("/api/v1",""))+"/sanctum/csrf-cookie",{withCredentials:!0});case 1:return s.a(2,decodeURIComponent(nf("XSRF-TOKEN")||""));case 2:return s.p=2,us=null,s.f(2);case 3:return s.a(2)}},r,null,[[0,,2,3]])}))(),n.a(2,us)}},t)})),Du.apply(this,arguments)}function Ws(t){"@babel/helpers - typeof";return Ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ws(t)}function sf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ne(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sf(Object(n),!0).forEach(function(r){Lx(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Lx(t,e,n){return(e=Nx(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nx(t){var e=Mx(t,"string");return Ws(e)=="symbol"?e:e+""}function Mx(t,e){if(Ws(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ws(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _x=function(e,n){return Ke({url:"/brands/".concat(e,"/analysis"),method:"GET",signal:n})},Ko=function(e){return["/brands/".concat(e,"/analysis")]},Rx=function(e,n){var r,i=n!=null?n:{},s=i.query,a=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Ko(e),o=function(u){var d=u.signal;return _x(e,d)};return ne({queryKey:a,queryFn:o,enabled:!!e},s)};function Xo(t,e,n){var r=Rx(t,e),i=Dn(r);return i.queryKey=r.queryKey,i}var Dx=function(e,n){return Ke({url:"/brands/".concat(e,"/trial-analysis"),method:"POST",signal:n})},Bx=function(e){var n=["postTrialAnalysis"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId;return Dx(u)};return ne({mutationFn:s},i)},Fx=function(e,n){var r=Bx(e);return vn(r)},zx=function(e,n,r){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n),method:"GET",signal:r})},mn=function(e,n){return["/brands/".concat(e,"/analysis/").concat(n)]},Ux=function(e,n,r){var i,s=r!=null?r:{},a=s.query,o=(i=a==null?void 0:a.queryKey)!==null&&i!==void 0?i:mn(e,n),l=function(d){var f=d.signal;return zx(e,n,f)};return ne({queryKey:o,queryFn:l,enabled:!!(e&&n)},a)};function ga(t,e,n,r){var i=Ux(t,e,n),s=Dn(i);return s.queryKey=i.queryKey,s}var Hx=function(e,n,r){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n,"/scans/").concat(r),method:"DELETE"})},qx=function(e){var n=["deleteScan"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.analysisId,f=l.scanId;return Hx(u,d,f)};return ne({mutationFn:s},i)},Wx=function(e,n){var r=qx(e);return vn(r)},Gx=function(e,n,r,i){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n,"/scans/").concat(r,"/manual-retry"),method:"POST",signal:i})},Qx=function(e){var n=["manualRetryScan"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.analysisId,f=l.scanId;return Gx(u,d,f)};return ne({mutationFn:s},i)},Yx=function(e,n){var r=Qx(e);return vn(r)},Vx=function(e,n,r){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n,"/status"),method:"GET",signal:r})},tr=function(e,n){return["/brands/".concat(e,"/analysis/").concat(n,"/status")]},Kx=function(e,n,r){var i,s=r!=null?r:{},a=s.query,o=(i=a==null?void 0:a.queryKey)!==null&&i!==void 0?i:tr(e,n),l=function(d){var f=d.signal;return Vx(e,n,f)};return ne({queryKey:o,queryFn:l,enabled:!!(e&&n)},a)};function Xx(t,e,n,r){var i=Kx(t,e,n),s=Dn(i);return s.queryKey=i.queryKey,s}var Jx=function(e,n,r,i){return Ke({url:"/brands/".concat(e,"/analysis/").concat(n,"/scans/").concat(r,"/query-results"),method:"GET",signal:i})},Zx=function(e,n,r){return["/brands/".concat(e,"/analysis/").concat(n,"/scans/").concat(r,"/query-results")]},$x=function(e,n,r,i){var s,a=i!=null?i:{},o=a.query,l=(s=o==null?void 0:o.queryKey)!==null&&s!==void 0?s:Zx(e,n,r),u=function(f){var y=f.signal;return Jx(e,n,r,y)};return ne({queryKey:l,queryFn:u,enabled:!!(e&&n&&r)},o)};function m0(t,e,n,r,i){var s=$x(t,e,n,r),a=Dn(s);return a.queryKey=s.queryKey,a}var ew=function(e){return Ke({url:"/users/logout",method:"POST",signal:e})},tw=function(e){var n=["logout"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return ew()};return ne({mutationFn:s},i)},nw=function(e,n){var r=tw(e);return vn(r)},rw=function(e,n){return Ke({url:"/brands/".concat(e,"/associated-brands"),method:"GET",signal:n})},wo=function(e){return["/brands/".concat(e,"/associated-brands")]},iw=function(e,n){var r,i=n!=null?n:{},s=i.query,a=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:wo(e),o=function(u){var d=u.signal;return rw(e,d)};return ne({queryKey:a,queryFn:o,enabled:!!e},s)};function sw(t,e,n){var r=iw(t,e),i=Dn(r);return i.queryKey=r.queryKey,i}var aw=function(e,n,r){return Ke({url:"/brands/".concat(e,"/associated-brand-groups"),method:"POST",headers:{"Content-Type":"application/json"},data:n,signal:r})},ow=function(e){var n=["createBrandAssociationGroup"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.data;return aw(u,d)};return ne({mutationFn:s},i)},g0=function(e,n){var r=ow(e);return vn(r)},lw=function(e,n){return Ke({url:"/brands/".concat(e,"/associated-brand-groups/").concat(n),method:"DELETE"})},uw=function(e){var n=["deleteBrandAssociationGroup"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.brandGroupId;return lw(u,d)};return ne({mutationFn:s},i)},cw=function(e,n){var r=uw(e);return vn(r)},dw=function(e){return Ke({url:"/brands",method:"GET",signal:e})},pn=function(){return["/brands"]},fw=function(e){var n,r=e!=null?e:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:pn(),a=function(l){var u=l.signal;return dw(u)};return ne({queryKey:s,queryFn:a},i)};function hi(t,e){var n=fw(t),r=Dn(n);return r.queryKey=n.queryKey,r}var hw=function(e,n){return Ke({url:"/brands",method:"POST",headers:{"Content-Type":"application/json"},data:e,signal:n})},yw=function(e){var n=["createBrand"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.data;return hw(u)};return ne({mutationFn:s},i)},pw=function(e,n){var r=yw(e);return vn(r)},mw=function(e,n){return Ke({url:"/brands/".concat(e),method:"GET",signal:n})},Jo=function(e){return["/brands/".concat(e)]},gw=function(e,n){var r,i=n!=null?n:{},s=i.query,a=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Jo(e),o=function(u){var d=u.signal;return mw(e,d)};return ne({queryKey:a,queryFn:o,enabled:!!e},s)};function va(t,e,n){var r=gw(t,e),i=Dn(r);return i.queryKey=r.queryKey,i}var vw=function(e){return Ke({url:"/brands/".concat(e),method:"DELETE"})},bw=function(e){var n=["deleteBrand"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId;return vw(u)};return ne({mutationFn:s},i)},xw=function(e,n){var r=bw(e);return vn(r)},ww=function(e,n){return Ke({url:"/brands/".concat(e,"/settings"),method:"PATCH",headers:{"Content-Type":"application/json"},data:n})},Aw=function(e){var n=["updateBrandSettings"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.data;return ww(u,d)};return ne({mutationFn:s},i)},v0=function(e,n){var r=Aw(e);return vn(r)},Sw=function(e,n){return Ke({url:"/brands/".concat(e,"/queries"),method:"PUT",headers:{"Content-Type":"application/json"},data:n})},Cw=function(e){var n=["updateBrandQueries"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(o){var l=o!=null?o:{},u=l.brandId,d=l.data;return Sw(u,d)};return ne({mutationFn:s},i)},jw=function(e,n){var r=Cw(e);return vn(r)},kw=function(e,n){return Ke({url:"/brands/".concat(e,"/query-suggestions"),method:"GET",signal:n})},Ew=function(e){return["/brands/".concat(e,"/query-suggestions")]},Ow=function(e,n){var r,i=n!=null?n:{},s=i.query,a=(r=s==null?void 0:s.queryKey)!==null&&r!==void 0?r:Ew(e),o=function(u){var d=u.signal;return kw(e,d)};return ne({queryKey:a,queryFn:o,enabled:!!e},s)};function Tw(t,e,n){var r=Ow(t,e),i=Dn(r);return i.queryKey=r.queryKey,i}var Pw=function(e){return Ke({url:"/users/current",method:"GET",signal:e})},ba=function(){return["/users/current"]},Iw=function(e){var n,r=e!=null?e:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:ba(),a=function(l){var u=l.signal;return Pw(u)};return ne({queryKey:s,queryFn:a},i)};function yi(t,e){var n=Iw(t),r=Dn(n);return r.queryKey=n.queryKey,r}var Lw=function(e){return Ke({url:"/users/account-debug",method:"GET",signal:e})},Nw=function(){return["/users/account-debug"]},Mw=function(e){var n,r=e!=null?e:{},i=r.query,s=(n=i==null?void 0:i.queryKey)!==null&&n!==void 0?n:Nw(),a=function(l){var u=l.signal;return Lw(u)};return ne({queryKey:s,queryFn:a},i)};function _w(t,e){var n=Mw(t),r=Dn(n);return r.queryKey=n.queryKey,r}var Rw=function(){return Ke({url:"/users/data",method:"DELETE"})},Dw=function(e){var n=["deleteUserData"],r=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:ne(ne({},e),{},{mutation:ne(ne({},e.mutation),{},{mutationKey:n})}):{mutation:{mutationKey:n}},i=r.mutation,s=function(){return Rw()};return ne({mutationFn:s},i)},Bw=function(e,n){var r=Dw(e);return vn(r)},b0=F.createContext(void 0),Fw=function(e){var n,r,i,s,a,o,l=e.children,u=e.brandId,d=e.analysisId,f=e.aiProvider,y=e.hostAppProps,h=y===void 0?{}:y,p=Ta("/brands/:brandId"),m=Ta("/brands/:brandId/*"),g=Ta("/brands/:brandId/analysis/:analysisId"),v=Ta("/brands/:brandId/analysis/:analysisId/*"),S=(g==null||(n=g.params)===null||n===void 0?void 0:n.brandId)||(v==null||(r=v.params)===null||r===void 0?void 0:r.brandId)||(m==null||(i=m.params)===null||i===void 0?void 0:i.brandId)||(p==null||(s=p.params)===null||s===void 0?void 0:s.brandId),k=(g==null||(a=g.params)===null||a===void 0?void 0:a.analysisId)||(v==null||(o=v.params)===null||o===void 0?void 0:o.analysisId),j=F.useMemo(function(){return{brandId:S||u||"",analysisId:k||d||"latest",aiProvider:f||"openai",hostAppProps:h}},[S,u,k,d,f,h]),C=F.useMemo(function(){return{data:j}},[j]);return c.jsx(b0.Provider,{value:C,children:l})},x0=F.createContext(void 0),zw=function(e){var n=e.children,r=e.setBrandId,i=e.setAnalysisId,s=e.setAiProvider,a=F.useCallback(function(f){r(f),i("latest")},[r,i]),o=F.useCallback(function(f){i(f)},[i]),l=F.useCallback(function(f){s(f)},[s]),u=F.useMemo(function(){return{setBrandId:a,setAnalysisId:o,setAiProvider:l}},[a,o,l]),d=F.useMemo(function(){return{mutations:u}},[u]);return c.jsx(x0.Provider,{value:d,children:n})};function Sl(t,e){return Ww(t)||qw(t,e)||Hw(t,e)||Uw()}function Uw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
9
9
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hw(t,e){if(t){if(typeof t=="string")return af(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?af(t,e):void 0}}function af(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qw(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function Ww(t){if(Array.isArray(t))return t}var Gw=function(e){var n=e.children,r=e.hostAppProps,i=r===void 0?{}:r,s=F.useState(void 0),a=Sl(s,2),o=a[0],l=a[1],u=F.useState("latest"),d=Sl(u,2),f=d[0],y=d[1],h=F.useState(void 0),p=Sl(h,2),m=p[0],g=p[1];return c.jsx(zw,{brandId:o,setBrandId:l,analysisId:f,setAnalysisId:y,aiProvider:m,setAiProvider:g,children:c.jsx(Fw,{brandId:o,analysisId:f,aiProvider:m,hostAppProps:i,children:n})})},xt=function(){var e=F.useContext(b0);if(e===void 0)throw new Error("useBrandAnalysisData must be used within a BrandAnalysisDataProvider");return e.data},es=function(){var e=F.useContext(x0);if(e===void 0)throw new Error("useBrandAnalysisMutations must be used within a BrandAnalysisMutationsProvider");return e.mutations},Cl={exports:{}};var of;function Qw(){return of||(of=1,function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",a=0;a<arguments.length;a++){var o=arguments[a];o&&(s=i(s,r(o)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var o in s)e.call(s,o)&&s[o]&&(a=i(a,o));return a}function i(s,a){return a?s?s+" "+a:s+a:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()}(Cl)),Cl.exports}var Yw=Qw();const oe=Bo(Yw);var Vw=function(e){return nw({mutation:{onSettled:function(){e&&e()}}})};function Kw(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"}))}const Xw=N.forwardRef(Kw);function Jw(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 13.255A23.931 23.931 0 0112 15c-3.183 0-6.22-.62-9-1.745M16 6V4a2 2 0 00-2-2h-4a2 2 0 00-2 2v2m4 6h.01M5 20h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"}))}const Zw=N.forwardRef(Jw);function $w(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}))}const eA=N.forwardRef($w);function tA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const nA=N.forwardRef(tA);function rA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))}const xa=N.forwardRef(rA);function iA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"}))}const sA=N.forwardRef(iA);function aA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))}const oA=N.forwardRef(aA);function lA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))}const uA=N.forwardRef(lA);function cA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"}))}const dA=N.forwardRef(cA);function fA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"}))}const hA=N.forwardRef(fA);function yA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"}))}const oo=N.forwardRef(yA);function pA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))}const lf=N.forwardRef(pA);function mA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))}const gA=N.forwardRef(mA);function vA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 11V7a4 4 0 118 0m-4 8v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2z"}))}const bA=N.forwardRef(vA);function xA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))}const w0=N.forwardRef(xA);function wA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))}const A0=N.forwardRef(wA);function AA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 12l3-3 3 3 4-4M8 21l4-4 4 4M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z"}))}const SA=N.forwardRef(AA);function CA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))}const jA=N.forwardRef(CA);function kA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"}))}const EA=N.forwardRef(kA);function OA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 10h4.764a2 2 0 011.789 2.894l-3.5 7A2 2 0 0115.263 21h-4.017c-.163 0-.326-.02-.485-.06L7 20m7-10V5a2 2 0 00-2-2h-.095c-.5 0-.905.405-.905.905 0 .714-.211 1.412-.608 2.006L7 11v9m7-10h-2M7 20H5a2 2 0 01-2-2v-6a2 2 0 012-2h2.5"}))}const TA=N.forwardRef(OA);function PA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))}const zc=N.forwardRef(PA);function IA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"}))}const LA=N.forwardRef(IA);function NA(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"}))}const MA=N.forwardRef(NA);var _A=function(){return[{label:"Brand analysis",href:"/",Icon:SA,isActive:function(n){return n.startsWith("/setup")||n==="/"},showInMenu:!0},{label:"Settings",href:"/settings",Icon:uA,isActive:function(n){return n.startsWith("/settings")},showInMenu:!0}]},uf;function RA(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var cf=function(e){var n=e.className,r=bt(),i=r.pathname,s=_A();return c.jsx("div",{className:oe("yst-flex yst-flex-col yst-gap-10",n),children:c.jsx(A.SidebarNavigation.Sidebar,{children:c.jsx(A.SidebarNavigation.List,{className:"yst-space-y-2",children:s.filter(function(a){return a.showInMenu!==!1}).map(function(a){var o=a.isActive?a.isActive(i):!1;return c.jsx(A.SidebarNavigation.SubmenuItem,{className:oe("yst-flex yst-gap-x-3",{"yst-sidebar-navigation__item--active":o}),href:a.href,to:a.href,as:an,label:c.jsxs(c.Fragment,{children:[c.jsx(a.Icon,{className:oe(uf||(uf=RA(["yst-sidebar-navigation__icon yst-h-6 yst-w-6"])))}),a.label]})},a.label)})})})})};const DA="data:image/svg+xml,%3csvg%20width='208'%20height='42'%20viewBox='0%200%20208%2042'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='169'%20width='39'%20height='16'%20rx='8'%20fill='%23BFDBFE'/%3e%3cpath%20d='M177.869%2012V4.9541H180.813C182.151%204.9541%20182.957%205.62793%20182.957%206.70703V6.7168C182.957%207.4541%20182.41%208.1084%20181.702%208.2207V8.30859C182.649%208.39648%20183.304%209.08008%20183.304%209.99316V10.0029C183.304%2011.2383%20182.386%2012%20180.882%2012H177.869ZM180.506%205.93555H179.129V7.92285H180.345C181.238%207.92285%20181.712%207.57617%20181.712%206.93652V6.92676C181.712%206.30176%20181.268%205.93555%20180.506%205.93555ZM180.545%208.81641H179.129V11.0186H180.594C181.521%2011.0186%20182.015%2010.6328%20182.015%209.91504V9.90527C182.015%209.19238%20181.507%208.81641%20180.545%208.81641ZM186.834%2012.1074C185.247%2012.1074%20184.285%2011.043%20184.285%209.34375V9.33887C184.285%207.65918%20185.257%206.56055%20186.775%206.56055C188.294%206.56055%20189.231%207.625%20189.231%209.23633V9.63672H185.501C185.516%2010.5938%20186.033%2011.1504%20186.858%2011.1504C187.518%2011.1504%20187.894%2010.8184%20188.011%2010.5742L188.025%2010.54H189.183L189.168%2010.584C188.997%2011.2725%20188.284%2012.1074%20186.834%2012.1074ZM186.79%207.5127C186.111%207.5127%20185.604%207.97168%20185.511%208.82129H188.045C187.962%207.94727%20187.469%207.5127%20186.79%207.5127ZM192.547%2012.0244C191.321%2012.0244%20190.818%2011.6143%20190.818%2010.584V7.60547H189.988V6.66309H190.818V5.35449H192.054V6.66309H193.182V7.60547H192.054V10.2959C192.054%2010.8281%20192.264%2011.0527%20192.771%2011.0527C192.942%2011.0527%20193.035%2011.0479%20193.182%2011.0332V11.9707C193.006%2012.0049%20192.781%2012.0244%20192.547%2012.0244ZM195.848%2012.0879C194.832%2012.0879%20194.095%2011.4629%20194.095%2010.4912V10.4814C194.095%209.5293%20194.822%208.97266%20196.121%208.89453L197.493%208.81152V8.35254C197.493%207.82031%20197.146%207.52734%20196.492%207.52734C195.936%207.52734%20195.574%207.72754%20195.452%208.0791L195.447%208.09863H194.3L194.305%208.05469C194.422%207.15625%20195.281%206.56055%20196.551%206.56055C197.923%206.56055%20198.694%207.22461%20198.694%208.35254V12H197.493V11.2676H197.41C197.117%2011.7852%20196.551%2012.0879%20195.848%2012.0879ZM195.296%2010.4326C195.296%2010.8867%20195.682%2011.1553%20196.219%2011.1553C196.951%2011.1553%20197.493%2010.6768%20197.493%2010.042V9.6123L196.292%209.69043C195.613%209.73438%20195.296%209.9834%20195.296%2010.4229V10.4326Z'%20fill='%231E3A8A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M22.5037%2019.2842C22.9203%2019.2842%2023.2881%2019.5608%2023.402%2019.9612L24.4143%2023.5057C24.857%2025.0583%2026.071%2026.2724%2027.6236%2026.715L31.1682%2027.7273C31.6629%2027.8705%2031.9526%2028.3881%2031.8094%2028.8828C31.7215%2029.192%2031.4774%2029.4361%2031.1682%2029.524L27.6236%2030.5363C26.071%2030.9789%2024.857%2032.193%2024.4143%2033.7456L23.402%2037.2901C23.2588%2037.7849%2022.7413%2038.0745%2022.2466%2037.9313C21.9373%2037.8434%2021.6932%2037.5993%2021.6053%2037.2901L20.5931%2033.7456C20.1504%2032.193%2018.9364%2030.9789%2017.3838%2030.5363L13.8392%2029.524C13.3445%2029.3808%2013.0548%2028.8633%2013.198%2028.3685C13.2859%2028.0593%2013.53%2027.8152%2013.8392%2027.7273L17.3838%2026.715C18.9364%2026.2724%2020.1504%2025.0583%2020.5931%2023.5057L21.6053%2019.9612C21.7193%2019.5608%2022.0871%2019.2842%2022.5037%2019.2842Z'%20fill='url(%23paint0_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.3742%2012C13.6573%2012%2013.9047%2012.192%2013.9731%2012.4654L14.1846%2013.315C14.3799%2014.0864%2014.9821%2014.6918%2015.7535%2014.8838L16.603%2015.0954C16.9318%2015.1768%2017.1335%2015.512%2017.0522%2015.8407C16.9968%2016.0621%2016.8243%2016.2346%2016.603%2016.2899L15.7535%2016.5015C14.9821%2016.6968%2014.3767%2017.2989%2014.1846%2018.0703L13.9731%2018.9199C13.8917%2019.2486%2013.5564%2019.4504%2013.2277%2019.369C13.0064%2019.3137%2012.8339%2019.1412%2012.7785%2018.9199L12.567%2018.0703C12.3749%2017.2989%2011.7695%2016.6935%2010.9981%2016.5015L10.1486%2016.2899C9.81986%2016.2085%209.61805%2015.8733%209.69943%2015.5446C9.75476%2015.3232%209.92727%2015.1507%2010.1486%2015.0954L10.9981%2014.8838C11.7695%2014.6918%2012.3749%2014.0864%2012.567%2013.315L12.7785%2012.4654C12.8469%2012.192%2013.0943%2012%2013.3774%2012H13.3742Z'%20fill='url(%23paint1_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.39254%2026.8813C6.54226%2026.8813%206.67571%2026.979%206.72453%2027.1189L6.90681%2027.669C6.97516%2027.8773%207.1379%2028.0401%207.34947%2028.1117L7.89954%2028.294C8.08181%2028.3558%208.17946%2028.5543%208.12087%2028.7366C8.08507%2028.8408%208.0037%2028.9222%207.89954%2028.958L7.34947%2029.1402C7.14116%2029.2086%206.97841%2029.3713%206.90681%2029.5829L6.72453%2030.133C6.66269%2030.3152%206.46414%2030.4129%206.28187%2030.3543C6.17771%2030.3185%206.09634%2030.2371%206.06054%2030.133L5.87827%2029.5829C5.80992%2029.3746%205.64392%2029.2118%205.4356%2029.1402L4.88553%2028.958C4.70326%2028.8961%204.60561%2028.6976%204.6642%2028.5153C4.7%2028.4111%204.78138%2028.3298%204.88553%2028.294L5.4356%2028.1117C5.64392%2028.0433%205.80666%2027.8806%205.87827%2027.669L6.06054%2027.1189C6.10936%2026.9757%206.24281%2026.8813%206.39254%2026.8813Z'%20fill='url(%23paint2_radial_4548_14216)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M2.80904%2033.5596C2.95876%2033.5596%203.09221%2033.6572%203.14104%2033.7972L3.32331%2034.3473C3.39166%2034.5556%203.5544%2034.7183%203.76597%2034.7899L4.31604%2034.9722C4.49832%2035.034%204.59596%2035.2326%204.53737%2035.4148C4.50157%2035.519%204.4202%2035.6004%204.31604%2035.6362L3.76597%2035.8185C3.55766%2035.8868%203.39492%2036.0495%203.32331%2036.2611L3.14104%2036.8112C3.07919%2036.9935%202.88065%2037.0911%202.69837%2037.0325C2.59422%2036.9967%202.51285%2036.9153%202.47704%2036.8112L2.29477%2036.2611C2.22642%2036.0528%202.06042%2035.8901%201.85211%2035.8185L1.30204%2035.6362C1.11976%2035.5743%201.02212%2035.3758%201.0807%2035.1935C1.11651%2035.0894%201.19788%2035.008%201.30204%2034.9722L1.85211%2034.7899C2.06042%2034.7216%202.22316%2034.5588%202.29477%2034.3473L2.47704%2033.7972C2.52587%2033.654%202.65931%2033.5596%202.80904%2033.5596Z'%20fill='url(%23paint3_radial_4548_14216)'/%3e%3cpath%20d='M2.42488%2032.7235C1.94641%2031.4476%201.68277%2030.0676%201.68277%2028.6256C1.68277%2023.5806%204.89532%2019.2712%209.38379%2017.634L8.79466%2016.0586C3.66498%2017.9269%200%2022.8483%200%2028.6256C0%2030.2661%200.296193%2031.835%200.836502%2033.2866L2.42488%2032.7268V32.7235Z'%20fill='url(%23paint4_radial_4548_14216)'/%3e%3cpath%20d='M20.6587%2037.7652C18.6602%2039.3633%2016.1279%2040.3202%2013.3743%2040.3202C10.0023%2040.3202%206.96221%2038.8849%204.82702%2036.5967L3.58691%2037.7359C6.02807%2040.3593%209.51078%2041.9998%2013.3776%2041.9998C16.5218%2041.9998%2019.4121%2040.9159%2021.6938%2039.0997L20.662%2037.7684L20.6587%2037.7652Z'%20fill='url(%23paint5_radial_4548_14216)'/%3e%3cpath%20d='M13.3739%2022.3664C15.0436%2022.3664%2016.5604%2023.0238%2017.6833%2024.0914L18.8095%2022.8383C17.3904%2021.5038%2015.4798%2020.6836%2013.3771%2020.6836C9.89444%2020.6836%206.93902%2022.9262%205.86816%2026.0476L7.44678%2026.627C8.28328%2024.1533%2010.6235%2022.3631%2013.3771%2022.3631L13.3739%2022.3664Z'%20fill='url(%23paint6_radial_4548_14216)'/%3e%3cpath%20d='M17.6737%2033.1658C16.5508%2034.2301%2015.0373%2034.8843%2013.3741%2034.8843C10.6074%2034.8843%208.2574%2033.0811%207.43392%2030.5879L5.84229%2031.1249C6.89035%2034.2822%209.8653%2036.5638%2013.3773%2036.5638C15.4832%2036.5638%2017.3971%2035.7436%2018.8162%2034.4059L17.677%2033.169L17.6737%2033.1658Z'%20fill='url(%23paint7_radial_4548_14216)'/%3e%3cpath%20d='M39.169%2021.2891H43.677C45.7666%2021.2891%2047.2802%2021.595%2048.2111%2022.2037C49.142%2022.8123%2049.6074%2023.7758%2049.6074%2025.0908C49.6074%2025.9761%2049.3796%2026.7149%2048.9206%2027.3041C48.4617%2027.8932%2047.8075%2028.2642%2046.9482%2028.414V28.5181C48.0158%2028.7199%2048.8002%2029.1138%2049.3014%2029.7062C49.8027%2030.2985%2050.0533%2031.0992%2050.0533%2032.1115C50.0533%2033.4753%2049.5781%2034.5429%2048.6244%2035.3143C47.6707%2036.0857%2046.3493%2036.473%2044.6502%2036.473H39.1658V21.2891H39.169ZM41.6525%2027.5645H44.0416C45.0799%2027.5645%2045.8383%2027.3985%2046.3167%2027.0697C46.7952%2026.741%2047.0328%2026.1811%2047.0328%2025.3935C47.0328%2024.6806%2046.7757%2024.1631%2046.2581%2023.8474C45.7406%2023.5284%2044.9236%2023.3689%2043.8007%2023.3689H41.6492V27.5645H41.6525ZM41.6525%2029.5792V34.3867H44.2889C45.3272%2034.3867%2046.1117%2034.1881%2046.6422%2033.791C47.1728%2033.3939%2047.4364%2032.7657%2047.4364%2031.9065C47.4364%2031.1188%2047.1662%2030.5329%2046.6259%2030.1521C46.0856%2029.7713%2045.2654%2029.5792%2044.1653%2029.5792H41.6525Z'%20fill='url(%23paint8_linear_4548_14216)'/%3e%3cpath%20d='M58.7762%2024.7817C59.2677%2024.7817%2059.6713%2024.8175%2059.9902%2024.8859L59.7526%2027.161C59.4076%2027.0764%2059.0463%2027.0374%2058.672%2027.0374C57.6955%2027.0374%2056.9046%2027.3563%2056.2992%2027.9943C55.6938%2028.6322%2055.3911%2029.459%2055.3911%2030.4778V36.4797H52.95V24.9933H54.8606L55.1828%2027.0178H55.3065C55.6873%2026.3311%2056.1853%2025.7908%2056.7972%2025.3871C57.4091%2024.9868%2058.0699%2024.785%2058.7762%2024.785V24.7817Z'%20fill='url(%23paint9_linear_4548_14216)'/%3e%3cpath%20d='M69.309%2036.4734L68.8208%2034.8753H68.7394C68.1861%2035.575%2067.6295%2036.0503%2067.0664%2036.3041C66.5065%2036.558%2065.784%2036.685%2064.9051%2036.685C63.7757%2036.685%2062.8969%2036.379%2062.2622%2035.7703C61.6275%2035.1617%2061.3118%2034.2991%2061.3118%2033.186C61.3118%2032.0012%2061.7512%2031.1094%2062.63%2030.5072C63.5088%2029.9051%2064.8498%2029.5763%2066.6498%2029.521L68.632%2029.4591V28.8472C68.632%2028.1116%2068.4595%2027.5648%2068.1177%2027.2003C67.7759%2026.8357%2067.2421%2026.6534%2066.5228%2026.6534C65.9337%2026.6534%2065.3706%2026.7413%2064.8303%2026.9138C64.29%2027.0864%2063.7692%2027.2914%2063.2712%2027.5258L62.4803%2025.7811C63.1019%2025.4557%2063.7855%2025.2083%2064.5276%2025.039C65.2697%2024.8698%2065.9662%2024.7852%2066.627%2024.7852C68.0884%2024.7852%2069.1918%2025.1041%2069.9339%2025.7421C70.6793%2026.38%2071.0503%2027.3793%2071.0503%2028.7431V36.4799H69.3057L69.309%2036.4734ZM65.6733%2034.8134C66.5586%2034.8134%2067.2714%2034.566%2067.8085%2034.0713C68.3455%2033.5766%2068.6124%2032.8833%2068.6124%2031.9882V30.9922L67.138%2031.054C65.989%2031.0963%2065.1525%2031.2884%2064.6285%2031.6301C64.1044%2031.9719%2063.8441%2032.4992%2063.8441%2033.2055C63.8441%2033.7165%2063.997%2034.1136%2064.2997%2034.3935C64.6057%2034.6734%2065.0614%2034.8134%2065.67%2034.8134H65.6733Z'%20fill='url(%23paint10_linear_4548_14216)'/%3e%3cpath%20d='M84.5646%2036.4732H82.1137V29.4102C82.1137%2028.5248%2081.9347%2027.8641%2081.5799%2027.4279C81.2219%2026.9918%2080.6588%2026.7737%2079.8809%2026.7737C78.8491%2026.7737%2078.0939%2027.0797%2077.6155%2027.6883C77.137%2028.297%2076.8994%2029.319%2076.8994%2030.7512V36.4732H74.4583V24.9868H76.3689L76.7106%2026.4938H76.8343C77.1793%2025.947%2077.6708%2025.5238%2078.3088%2025.2277C78.9467%2024.9315%2079.653%2024.7817%2080.4277%2024.7817C83.1846%2024.7817%2084.5614%2026.1846%2084.5614%2028.987V36.4765L84.5646%2036.4732Z'%20fill='url(%23paint11_linear_4548_14216)'/%3e%3cpath%20d='M91.836%2036.6814C90.4038%2036.6814%2089.2841%2036.1606%2088.4802%2035.1223C87.6762%2034.084%2087.2759%2032.6258%2087.2759%2030.751C87.2759%2028.8762%2087.6827%2027.4018%2088.4965%2026.3537C89.3102%2025.3056%2090.4364%2024.7816%2091.8783%2024.7816C93.3202%2024.7816%2094.5375%2025.3382%2095.3252%2026.4546H95.4489C95.3317%2025.6311%2095.2731%2024.9802%2095.2731%2024.5017V20.3159H97.724V36.4763H95.8134L95.387%2034.9693H95.2731C94.4919%2036.1118%2093.3462%2036.6847%2091.836%2036.6847V36.6814ZM92.4902%2034.709C93.4927%2034.709%2094.225%2034.4258%2094.6807%2033.8627C95.1364%2033.2996%2095.374%2032.3817%2095.387%2031.1156V30.7738C95.387%2029.3254%2095.1527%2028.2969%2094.6807%2027.6882C94.2088%2027.0795%2093.4732%2026.7736%2092.4674%2026.7736C91.6081%2026.7736%2090.9474%2027.1219%2090.4852%2027.8184C90.023%2028.5149%2089.7886%2029.5044%2089.7886%2030.7933C89.7886%2032.0823%2090.0132%2033.0392%2090.4624%2033.7065C90.9116%2034.3737%2091.5886%2034.709%2092.4869%2034.709H92.4902Z'%20fill='url(%23paint12_linear_4548_14216)'/%3e%3cpath%20d='M106.997%2036.473V21.2891H109.481V36.473H106.997Z'%20fill='url(%23paint13_linear_4548_14216)'/%3e%3cpath%20d='M123.334%2036.4732H120.883V29.4102C120.883%2028.5248%20120.704%2027.8641%20120.349%2027.4279C119.991%2026.9918%20119.428%2026.7737%20118.65%2026.7737C117.618%2026.7737%20116.863%2027.0797%20116.385%2027.6883C115.906%2028.297%20115.668%2029.319%20115.668%2030.7512V36.4732H113.227V24.9868H115.138L115.48%2026.4938H115.603C115.948%2025.947%20116.44%2025.5238%20117.078%2025.2277C117.716%2024.9315%20118.422%2024.7817%20119.197%2024.7817C121.954%2024.7817%20123.33%2026.1846%20123.33%2028.987V36.4765L123.334%2036.4732Z'%20fill='url(%23paint14_linear_4548_14216)'/%3e%3cpath%20d='M134.449%2033.2019C134.449%2034.3249%20134.039%2035.1841%20133.222%2035.783C132.405%2036.3819%20131.233%2036.6814%20129.71%2036.6814C128.187%2036.6814%20126.95%2036.4503%20126.022%2035.9848V33.8757C127.373%2034.4974%20128.629%2034.8098%20129.791%2034.8098C131.295%2034.8098%20132.044%2034.3574%20132.044%2033.4493C132.044%2033.1596%20131.959%2032.9155%20131.793%2032.7235C131.627%2032.5314%20131.354%2032.3296%20130.973%2032.1213C130.592%2031.913%20130.062%2031.6786%20129.385%2031.415C128.063%2030.904%20127.168%2030.3897%20126.699%2029.8787C126.231%2029.3677%20126%2028.7004%20126%2027.8835C126%2026.9005%20126.397%2026.1389%20127.188%2025.592C127.982%2025.0485%20129.059%2024.7783%20130.423%2024.7783C131.787%2024.7783%20133.05%2025.0517%20134.254%2025.5986L133.466%2027.4376C132.226%2026.9265%20131.185%2026.6694%20130.342%2026.6694C129.053%2026.6694%20128.411%2027.0372%20128.411%2027.7695C128.411%2028.1308%20128.581%2028.4335%20128.916%2028.6842C129.251%2028.9348%20129.983%2029.2766%20131.113%2029.7127C132.06%2030.0805%20132.75%2030.4158%20133.18%2030.7217C133.609%2031.0277%20133.928%2031.3792%20134.137%2031.7763C134.345%2032.1734%20134.449%2032.6519%20134.449%2033.2052V33.2019Z'%20fill='url(%23paint15_linear_4548_14216)'/%3e%3cpath%20d='M136.939%2021.9434C136.939%2021.5072%20137.059%2021.172%20137.297%2020.9344C137.535%2020.6968%20137.876%2020.5796%20138.319%2020.5796C138.762%2020.5796%20139.081%2020.6968%20139.322%2020.9344C139.562%2021.1687%20139.68%2021.504%20139.68%2021.9434C139.68%2022.3828%20139.559%2022.6855%20139.322%2022.9264C139.084%2023.164%20138.749%2023.2844%20138.319%2023.2844C137.889%2023.2844%20137.535%2023.164%20137.297%2022.9264C137.059%2022.6887%20136.939%2022.36%20136.939%2021.9434ZM139.527%2036.4731H137.085V24.9867H139.527V36.4731Z'%20fill='url(%23paint16_linear_4548_14216)'/%3e%3cpath%20d='M152.715%2024.987V26.328L150.752%2026.6925C150.931%2026.9334%20151.081%2027.2328%20151.198%2027.5843C151.316%2027.9359%20151.374%2028.3102%20151.374%2028.7073C151.374%2029.892%20150.964%2030.8229%20150.147%2031.5C149.33%2032.177%20148.204%2032.5187%20146.772%2032.5187C146.404%2032.5187%20146.072%2032.4927%20145.776%2032.4373C145.248%2032.7628%20144.988%2033.1437%20144.988%2033.5798C144.988%2033.8435%20145.112%2034.0387%20145.356%2034.1722C145.603%2034.3024%20146.052%2034.3707%20146.71%2034.3707H148.715C149.981%2034.3707%20150.945%2034.6409%20151.602%2035.1812C152.259%2035.7215%20152.588%2036.4994%20152.588%2037.5182C152.588%2038.8202%20152.051%2039.8227%20150.977%2040.529C149.903%2041.2353%20148.354%2041.5868%20146.326%2041.5868C144.76%2041.5868%20143.566%2041.3101%20142.742%2040.7568C141.919%2040.2035%20141.505%2039.4125%20141.505%2038.3905C141.505%2037.6842%20141.73%2037.0918%20142.176%2036.6101C142.622%2036.1284%20143.247%2035.7964%20144.051%2035.6076C143.725%2035.4676%20143.455%2035.2463%20143.247%2034.9371C143.035%2034.6279%20142.931%2034.3056%20142.931%2033.9671C142.931%2033.5375%20143.051%2033.173%20143.296%2032.8768C143.54%2032.5806%20143.898%2032.2844%20144.376%2031.9947C143.781%2031.7376%20143.299%2031.3209%20142.928%2030.7416C142.557%2030.1655%20142.371%2029.4884%20142.371%2028.7105C142.371%2027.4639%20142.765%2026.4972%20143.549%2025.8137C144.334%2025.1269%20145.454%2024.7852%20146.908%2024.7852C147.234%2024.7852%20147.576%2024.8079%20147.93%2024.8535C148.289%2024.8991%20148.555%2024.9446%20148.734%2024.9935H152.712L152.715%2024.987ZM143.689%2038.2603C143.689%2038.7876%20143.927%2039.1912%20144.402%2039.4744C144.877%2039.7576%20145.541%2039.9008%20146.401%2039.9008C147.729%2039.9008%20148.721%2039.7087%20149.372%2039.3279C150.023%2038.9471%20150.349%2038.4426%20150.349%2037.8111C150.349%2037.3131%20150.17%2036.9584%20149.815%2036.7468C149.457%2036.5352%20148.796%2036.4311%20147.826%2036.4311H145.978C145.278%2036.4311%20144.721%2036.5971%20144.311%2036.9258C143.898%2037.2546%20143.693%2037.7005%20143.693%2038.2603H143.689ZM144.741%2028.7073C144.741%2029.4266%20144.926%2029.9799%20145.297%2030.3705C145.668%2030.7578%20146.199%2030.9531%20146.892%2030.9531C148.305%2030.9531%20149.011%2030.198%20149.011%2028.6877C149.011%2027.9391%20148.835%2027.363%20148.487%2026.9594C148.139%2026.5558%20147.605%2026.3507%20146.892%2026.3507C146.179%2026.3507%20145.652%2026.5526%20145.288%2026.9529C144.923%2027.3532%20144.741%2027.9391%20144.741%2028.7073Z'%20fill='url(%23paint17_linear_4548_14216)'/%3e%3cpath%20d='M164.95%2036.4729H162.499V29.4099C162.499%2028.5245%20162.32%2027.8638%20161.965%2027.4276C161.607%2026.9915%20161.044%2026.7734%20160.266%2026.7734C159.241%2026.7734%20158.489%2027.0794%20158.007%2027.6913C157.526%2028.3032%20157.285%2029.3317%20157.285%2030.7704V36.4729H154.844V20.3125H157.285V24.4136C157.285%2025.0711%20157.243%2025.7742%20157.161%2026.5228H157.317C157.649%2025.9695%20158.112%2025.5398%20158.704%2025.2339C159.296%2024.9279%20159.986%2024.7782%20160.774%2024.7782C163.557%2024.7782%20164.95%2026.181%20164.95%2028.9835V36.4729Z'%20fill='url(%23paint18_linear_4548_14216)'/%3e%3cpath%20d='M172.625%2034.709C173.221%2034.709%20173.816%2034.6146%20174.412%2034.4291V36.2681C174.142%2036.3853%20173.794%2036.4829%20173.367%2036.5643C172.941%2036.6424%20172.501%2036.6847%20172.042%2036.6847C169.728%2036.6847%20168.573%2035.4674%20168.573%2033.0295V26.8387H167.004V25.7581L168.687%2024.863L169.517%2022.4316H171.024V24.9867H174.295V26.8355H171.024V32.9839C171.024%2033.5731%20171.17%2034.006%20171.466%2034.2859C171.763%2034.5658%20172.147%2034.7058%20172.625%2034.7058V34.709Z'%20fill='url(%23paint19_linear_4548_14216)'/%3e%3cpath%20d='M184.424%2033.2019C184.424%2034.3249%20184.014%2035.1841%20183.197%2035.783C182.38%2036.3819%20181.208%2036.6814%20179.685%2036.6814C178.161%2036.6814%20176.925%2036.4503%20175.997%2035.9848V33.8757C177.348%2034.4974%20178.604%2034.8098%20179.766%2034.8098C181.27%2034.8098%20182.018%2034.3574%20182.018%2033.4493C182.018%2033.1596%20181.934%2032.9155%20181.768%2032.7235C181.602%2032.5314%20181.328%2032.3296%20180.948%2032.1213C180.567%2031.913%20180.036%2031.6786%20179.359%2031.415C178.038%2030.904%20177.143%2030.3897%20176.674%2029.8787C176.205%2029.3677%20175.974%2028.7004%20175.974%2027.8835C175.974%2026.9005%20176.371%2026.1389%20177.162%2025.592C177.956%2025.0485%20179.034%2024.7783%20180.397%2024.7783C181.761%2024.7783%20183.024%2025.0517%20184.228%2025.5986L183.441%2027.4376C182.201%2026.9265%20181.159%2026.6694%20180.316%2026.6694C179.027%2026.6694%20178.386%2027.0372%20178.386%2027.7695C178.386%2028.1308%20178.555%2028.4335%20178.89%2028.6842C179.226%2028.9348%20179.958%2029.2766%20181.088%2029.7127C182.035%2030.0805%20182.725%2030.4158%20183.154%2030.7217C183.584%2031.0277%20183.903%2031.3792%20184.111%2031.7763C184.32%2032.1734%20184.424%2032.6519%20184.424%2033.2052V33.2019Z'%20fill='url(%23paint20_linear_4548_14216)'/%3e%3cdefs%3e%3cradialGradient%20id='paint0_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0672%2015.5248)%20scale(61.1655%2061.1655)'%3e%3cstop%20offset='0.17'%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint1_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0676%2015.525)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint2_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8974)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint3_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8984)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint4_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1655)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint5_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0677%20-58.8978)%20scale(61.1655%2061.1654)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint6_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0673%2015.5246)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3cradialGradient%20id='paint7_radial_4548_14216'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(44.0675%20-58.8983)%20scale(61.1655%2061.1656)'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/radialGradient%3e%3clinearGradient%20id='paint8_linear_4548_14216'%20x1='27.6858'%20y1='26.9883'%20x2='184.655'%20y2='47.7609'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint9_linear_4548_14216'%20x1='27.7019'%20y1='26.8681'%20x2='184.671'%20y2='47.6374'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint10_linear_4548_14216'%20x1='27.8582'%20y1='25.703'%20x2='184.827'%20y2='46.4723'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint11_linear_4548_14216'%20x1='28.0796'%20y1='24.0657'%20x2='185.049'%20y2='44.835'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint12_linear_4548_14216'%20x1='28.6426'%20y1='19.7724'%20x2='185.612'%20y2='40.5417'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint13_linear_4548_14216'%20x1='28.8281'%20y1='18.376'%20x2='185.794'%20y2='39.1453'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint14_linear_4548_14216'%20x1='28.7407'%20y1='19.0206'%20x2='185.71'%20y2='39.7899'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint15_linear_4548_14216'%20x1='28.9621'%20y1='17.367'%20x2='185.928'%20y2='38.1363'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint16_linear_4548_14216'%20x1='29.382'%20y1='14.187'%20x2='186.351'%20y2='34.9563'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint17_linear_4548_14216'%20x1='28.9585'%20y1='17.3836'%20x2='185.928'%20y2='38.1529'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint18_linear_4548_14216'%20x1='29.7136'%20y1='11.6741'%20x2='186.683'%20y2='32.4466'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint19_linear_4548_14216'%20x1='29.8241'%20y1='10.8313'%20x2='186.794'%20y2='31.6039'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint20_linear_4548_14216'%20x1='29.8206'%20y1='10.867'%20x2='186.79'%20y2='31.6364'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A61E69'/%3e%3cstop%20offset='1'%20stop-color='%236366F1'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";function BA(t,e){return HA(t)||UA(t,e)||zA(t,e)||FA()}function FA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
10
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zA(t,e){if(t){if(typeof t=="string")return df(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?df(t,e):void 0}}function df(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function UA(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function HA(t){if(Array.isArray(t))return t}var qA=function(e){var n=e.className,r=bt(),i=r.pathname,s=xt(),a=s.hostAppProps,o=a.onLogout,l=F.useState(!1),u=BA(l,2),d=u[0],f=u[1],y=yi({query:{select:function(j){var C=j.data;return C==null?void 0:C.data}}}),h=y.data,p=y.isLoading,m=Vw(o),g=m.mutate,v=m.isPending,S=function(j){if(j.preventDefault(),f(!0),!v)return g()};return c.jsxs("div",{className:oe("ystaii-sidemenu"),children:[c.jsx("div",{className:"ystaii-mobile-menu lg:yst-hidden",children:c.jsx(A.SidebarNavigation,{activePath:i,children:c.jsx(A.SidebarNavigation.Mobile,{closeButtonScreenReaderText:"Close sidebar",openButtonScreenReaderText:"Open sidebar",children:c.jsx(cf,{})})})}),c.jsxs("div",{className:oe("ystaii-menuHeader","yst-mb-6 yst-mt-10 yst-flex yst-flex-row yst-justify-between yst-px-4","yst-flex-col yst-items-start yst-space-y-12 yst-max-w-2xl yst-mx-auto"),children:[c.jsx(A.Title,{children:c.jsx(an,{className:oe("yst-outline-none"),to:"/",children:c.jsx("img",{src:DA,alt:"Yoast",width:"208",height:"42",className:"yst-block"})})}),c.jsxs("div",{className:oe("ystaii-userInfoContainer","yst-flex yst-flex-col"),children:[c.jsx("div",{children:c.jsx("b",{children:p?c.jsx(A.SkeletonLoader,{children:"Display name"}):h==null?void 0:h.displayName})}),c.jsx("div",{children:p?c.jsx(A.SkeletonLoader,{children:"loading-email@address.com"}):h==null?void 0:h.email}),c.jsx("div",{children:c.jsx(A.Link,{variant:"primary",className:"yst-no-underline",onClick:S,children:p?c.jsxs(A.SkeletonLoader,{children:["Sign out ",c.jsx("span",{"aria-hidden":"true",children:"→"})]}):d||v?c.jsx(c.Fragment,{children:"Signing out..."}):c.jsxs(c.Fragment,{children:["Sign out ",c.jsx("span",{"aria-hidden":"true",children:"→"})]})})})]})]}),c.jsx("div",{className:oe("ystaii-desktopMenu","yst-hidden","lg:yst-mb-0 lg:yst-block lg:yst-w-full lg:yst-shrink-0"),children:c.jsx(A.SidebarNavigation,{activePath:i,children:c.jsx(cf,{className:n})})})]})},WA=["className","href"];function GA(t,e){if(t==null)return{};var n,r,i=QA(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function QA(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var YA=function(e){var n=e.className,r=e.href,i=r===void 0?"#content":r,s=GA(e,WA);return c.jsx("a",{href:i,className:oe("yst-outline-none yst-absolute yst--top-[1000em] yst-left-[10px] yst-z-[100000] yst-block yst-h-12 yst-min-w-[150px] yst-rounded yst-bg-[var(--bg-color-white)] yst-px-[15px] yst-text-center yst-text-[14px] yst-leading-[48px] yst-underline yst-shadow-md focus:yst-top-[10px] focus:yst-text-[var(--text-color-blue)]",n),...s,children:"Skip to main content"})},VA=F.lazy(function(){return Promise.resolve({default:function(){return null}})});function jl(t){var e=t.children,n=t.disable,r=n===void 0?!1:n,i=t.hideNav,s=i===void 0?!1:i,a=t.DebugInfo;return r?e:c.jsxs("div",{className:oe("ystaii-layout","yst-block","lg:yst-flex lg:yst-min-h-full lg:yst-overflow-visible"),children:[c.jsx(YA,{children:"Skip to main content"}),!s&&c.jsxs("div",{className:oe("ystaii-sidebar","yst-overflow-hidden","lg:yst-flex-grow-1 lg:yst-max-w-[300px] lg:yst-flex-shrink-0 lg:yst-basis-[300px] lg:yst-overflow-visible lg:yst-pl-4"),children:[c.jsx(qA,{}),a&&c.jsx(a,{}),c.jsx(F.Suspense,{fallback:null,children:c.jsx(VA,{})}),c.jsxs("div",{id:"toast-portal",className:"yst-fixed yst-bottom-4 yst-left-4 yst-w-96 yst-space-y-4",children:[c.jsx("div",{id:"hook-toasts"}),c.jsx("div",{id:"tsx-toasts"})]})]}),c.jsx("main",{id:"content",className:oe("ystaii-main","yst-mx-4 yst-my-0 yst-flex yst-min-w-0 yst-shrink yst-grow yst-basis-auto yst-px-0 yst-py-6","lg:yst-ml-12 lg:yst-mr-6"),children:c.jsx("div",{className:oe("ystaii-main-content","yst-mx-auto yst-flex yst-flex-col yst-gap-8","lg:yst-w-full lg:yst-flex-row"),children:c.jsx("div",{className:"yst-layout-root yst-mx-auto yst-w-full yst-max-w-[1200px] yst-flex-1",children:e})})})]})}function js(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Dt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(
|
|
10
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zA(t,e){if(t){if(typeof t=="string")return df(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?df(t,e):void 0}}function df(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function UA(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function HA(t){if(Array.isArray(t))return t}var qA=function(e){var n=e.className,r=bt(),i=r.pathname,s=xt(),a=s.hostAppProps,o=a.onLogout,l=F.useState(!1),u=BA(l,2),d=u[0],f=u[1],y=yi({query:{select:function(j){var C=j.data;return C==null?void 0:C.data}}}),h=y.data,p=y.isLoading,m=Vw(o),g=m.mutate,v=m.isPending,S=function(j){if(j.preventDefault(),f(!0),!v)return g()};return c.jsxs("div",{className:oe("ystaii-sidemenu"),children:[c.jsx("div",{className:"ystaii-mobile-menu lg:yst-hidden",children:c.jsx(A.SidebarNavigation,{activePath:i,children:c.jsx(A.SidebarNavigation.Mobile,{closeButtonScreenReaderText:"Close sidebar",openButtonScreenReaderText:"Open sidebar",children:c.jsx(cf,{})})})}),c.jsxs("div",{className:oe("ystaii-menuHeader","yst-mb-6 yst-mt-10 yst-flex yst-flex-row yst-justify-between yst-px-4","yst-flex-col yst-items-start yst-space-y-12 yst-max-w-2xl yst-mx-auto"),children:[c.jsx(A.Title,{children:c.jsx(an,{className:oe("yst-outline-none"),to:"/",children:c.jsx("img",{src:DA,alt:"Yoast",width:"208",height:"42",className:"yst-block"})})}),c.jsxs("div",{className:oe("ystaii-userInfoContainer","yst-flex yst-flex-col"),children:[c.jsx("div",{children:c.jsx("b",{children:p?c.jsx(A.SkeletonLoader,{children:"Display name"}):h==null?void 0:h.displayName})}),c.jsx("div",{children:p?c.jsx(A.SkeletonLoader,{children:"loading-email@address.com"}):h==null?void 0:h.email}),c.jsx("div",{children:c.jsx(A.Link,{variant:"primary",className:"yst-no-underline",onClick:S,children:p?c.jsxs(A.SkeletonLoader,{children:["Sign out ",c.jsx("span",{"aria-hidden":"true",children:"→"})]}):d||v?c.jsx(c.Fragment,{children:"Signing out..."}):c.jsxs(c.Fragment,{children:["Sign out ",c.jsx("span",{"aria-hidden":"true",children:"→"})]})})})]})]}),c.jsx("div",{className:oe("ystaii-desktopMenu","yst-hidden","lg:yst-mb-0 lg:yst-block lg:yst-w-full lg:yst-shrink-0"),children:c.jsx(A.SidebarNavigation,{activePath:i,children:c.jsx(cf,{className:n})})})]})},WA=["className","href"];function GA(t,e){if(t==null)return{};var n,r,i=QA(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function QA(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var YA=function(e){var n=e.className,r=e.href,i=r===void 0?"#content":r,s=GA(e,WA);return c.jsx("a",{href:i,className:oe("yst-outline-none yst-absolute yst--top-[1000em] yst-left-[10px] yst-z-[100000] yst-block yst-h-12 yst-min-w-[150px] yst-rounded yst-bg-[var(--bg-color-white)] yst-px-[15px] yst-text-center yst-text-[14px] yst-leading-[48px] yst-underline yst-shadow-md focus:yst-top-[10px] focus:yst-text-[var(--text-color-blue)]",n),...s,children:"Skip to main content"})},VA=F.lazy(function(){return Promise.resolve({default:function(){return null}})});function jl(t){var e=t.children,n=t.disable,r=n===void 0?!1:n,i=t.hideNav,s=i===void 0?!1:i,a=t.DebugInfo;return r?e:c.jsxs("div",{className:oe("ystaii-layout","yst-block","lg:yst-flex lg:yst-min-h-full lg:yst-overflow-visible"),children:[c.jsx(YA,{children:"Skip to main content"}),!s&&c.jsxs("div",{className:oe("ystaii-sidebar","yst-overflow-hidden","lg:yst-flex-grow-1 lg:yst-max-w-[300px] lg:yst-flex-shrink-0 lg:yst-basis-[300px] lg:yst-overflow-visible lg:yst-pl-4"),children:[c.jsx(qA,{}),a&&c.jsx(a,{}),c.jsx(F.Suspense,{fallback:null,children:c.jsx(VA,{})}),c.jsxs("div",{id:"toast-portal",className:"yst-fixed yst-bottom-4 yst-left-4 yst-w-96 yst-space-y-4",children:[c.jsx("div",{id:"hook-toasts"}),c.jsx("div",{id:"tsx-toasts"})]})]}),c.jsx("main",{id:"content",className:oe("ystaii-main","yst-mx-4 yst-my-0 yst-flex yst-min-w-0 yst-shrink yst-grow yst-basis-auto yst-px-0 yst-py-6","lg:yst-ml-12 lg:yst-mr-6"),children:c.jsx("div",{className:oe("ystaii-main-content","yst-mx-auto yst-flex yst-flex-col yst-gap-8","lg:yst-w-full lg:yst-flex-row"),children:c.jsx("div",{className:"yst-layout-root yst-mx-auto yst-w-full yst-max-w-[1200px] yst-flex-1",children:e})})})]})}function js(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Dt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Dt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Dt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Dt(f,"constructor",u),Dt(u,"constructor",l),l.displayName="GeneratorFunction",Dt(u,i,"GeneratorFunction"),Dt(f),Dt(f,i,"Generator"),Dt(f,r,function(){return this}),Dt(f,"toString",function(){return"[object Generator]"}),(js=function(){return{w:s,m:y}})()}function Dt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Dt=function(a,o,l,u){function d(f,y){Dt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Dt(t,e,n,r)}function ff(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function hf(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){ff(s,r,i,a,o,"next",l)}function o(l){ff(s,r,i,a,o,"throw",l)}a(void 0)})}}function KA(t,e){return $A(t)||ZA(t,e)||JA(t,e)||XA()}function XA(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11
11
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JA(t,e){if(t){if(typeof t=="string")return yf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yf(t,e):void 0}}function yf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ZA(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function $A(t){if(Array.isArray(t))return t}var eS=function(e){var n,r=e.className,i=It(),s=ft(),a=F.useState(!1),o=KA(a,2),l=o[0],u=o[1],d=hi({query:{select:function(C){var b=C.data;return b==null?void 0:b.brands}}}),f=d.data,y=v0({mutation:{onSettled:function(){i.invalidateQueries({queryKey:[pn()]})}}}),h=y.mutateAsync,p=y.isPending,m=F.useMemo(function(){var j;return(j=f==null?void 0:f.filter(function(C){var b;return((b=C.settings)===null||b===void 0?void 0:b.showAutomaticAnalysisDisabledNotification)===!0}))!==null&&j!==void 0?j:[]},[f]);F.useEffect(function(){u(m.length!==0)},[m]);var g=function(){var j=hf(js().m(function C(){var b;return js().w(function(w){for(;;)switch(w.n){case 0:return b=m.map(function(x){return h({brandId:String(x.id),data:{showAutomaticAnalysisDisabledNotification:!1}})}),w.n=1,Promise.all(b);case 1:u(!1);case 2:return w.a(2)}},C)}));return function(){return j.apply(this,arguments)}}(),v=function(){var j=hf(js().m(function C(){return js().w(function(b){for(;;)switch(b.n){case 0:return b.n=1,g();case 1:s("/settings");case 2:return b.a(2)}},C)}));return function(){return j.apply(this,arguments)}}(),S=m.length===1?"One brand has been deactivated":"Multiple brands have been deactivated",k=m.length===1?c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),c.jsxs("p",{children:["The brand ",c.jsx("b",{children:m==null||(n=m[0])===null||n===void 0?void 0:n.name})," was deactivated, since it was the most recently analyzed."]}),c.jsxs("p",{children:["If you prefer, you can go to ",c.jsx("b",{children:"Settings"})," and deactivate a different brand instead."]})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"You recently lost a subscription. Because of this, we could not analyze all your active brands."}),c.jsx("p",{children:"The following brands were deactivated, since they were the most recently analyzed:"}),c.jsx("ul",{children:m.map(function(j){return c.jsx("li",{children:c.jsx("b",{children:j.name})},j.id)})}),c.jsxs("p",{children:["If you prefer, you can go to ",c.jsx("b",{children:"Settings"})," and deactivate different brand(s) instead."]})]});return l?c.jsx(A.Modal,{isOpen:l,onClose:v,position:"center",as:"div",className:r,children:c.jsxs(A.Modal.Panel,{children:[c.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:S})}),c.jsx(A.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:k})]})}),c.jsxs(A.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[c.jsx(A.Button,{variant:"secondary",onClick:v,children:"Close"}),c.jsx(A.Button,{variant:"primary",onClick:v,isLoading:p,disabled:p,children:"Go to settings"})]})]})}):null};const tS=t=>N.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8948 6.33943C17.1675 6.33943 17.4064 6.52012 17.4816 6.78187L18.1436 9.09795C18.4332 10.112 19.226 10.9049 20.2401 11.1945L22.5562 11.8565C22.8804 11.9493 23.0679 12.2871 22.975 12.6113C22.9167 12.814 22.7588 12.9719 22.5562 13.0301L20.2401 13.6921C19.226 13.9817 18.4332 14.7746 18.1436 15.7886L17.4816 18.1047C17.3887 18.4289 17.051 18.6164 16.7267 18.5235C16.5241 18.4652 16.3662 18.3073 16.3079 18.1047L15.646 15.7886C15.3563 14.7746 14.5635 13.9817 13.5494 13.6921L11.2333 13.0301C10.9091 12.9372 10.7217 12.5995 10.8145 12.2753C10.8728 12.0726 11.0307 11.9147 11.2333 11.8565L13.5494 11.1945C14.5635 10.9049 15.3563 10.112 15.646 9.09795L16.3079 6.78187C16.3831 6.52012 16.622 6.33943 16.8948 6.33943Z",fill:"url(#paint0_linear_1940_1302)"}),N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.9302 1.57979C11.1151 1.57979 11.2764 1.7056 11.3211 1.8846L11.4596 2.44103C11.5863 2.94596 11.9806 3.33943 12.4847 3.46608L13.0411 3.60456C13.2572 3.65775 13.3881 3.87644 13.3349 4.09175C13.2986 4.23698 13.1855 4.35012 13.0411 4.38559L12.4847 4.52406C11.9797 4.65071 11.5863 5.04503 11.4596 5.54911L11.3211 6.10554C11.2679 6.3217 11.0492 6.45257 10.8339 6.39938C10.6887 6.36307 10.5756 6.24993 10.5401 6.10554L10.4016 5.54911C10.2758 5.04418 9.8815 4.64987 9.37658 4.52406L8.82015 4.38559C8.60399 4.33239 8.47312 4.1137 8.52631 3.89839C8.56262 3.75316 8.67576 3.64002 8.82015 3.60456L9.37658 3.46608C9.8815 3.34027 10.2758 2.94596 10.4016 2.44103L10.5401 1.8846C10.584 1.7056 10.7453 1.57979 10.9302 1.57979Z",fill:"url(#paint1_linear_1940_1302)"}),N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.36896 11.3034C6.4669 11.3034 6.55472 11.3659 6.58511 11.4596L6.70501 11.8193C6.75061 11.9552 6.857 12.0625 6.99294 12.1072L7.35263 12.2271C7.47169 12.2668 7.5367 12.3968 7.49617 12.5159C7.47338 12.5835 7.42018 12.6366 7.35263 12.6594L6.99294 12.7793C6.857 12.8249 6.74976 12.9313 6.70501 13.0673L6.58511 13.427C6.54543 13.546 6.4154 13.611 6.29634 13.5705C6.22879 13.5477 6.1756 13.4945 6.1528 13.427L6.0329 13.0673C5.98731 12.9313 5.88092 12.8241 5.74498 12.7793L5.38528 12.6594C5.26623 12.6198 5.20121 12.4897 5.24174 12.3707C5.26454 12.3031 5.31773 12.2499 5.38528 12.2271L5.74498 12.1072C5.88092 12.0616 5.98815 11.9552 6.0329 11.8193L6.1528 11.4596C6.18404 11.3667 6.27101 11.3034 6.36896 11.3034Z",fill:"url(#paint2_linear_1940_1302)"}),N.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.02759 15.6679C4.12553 15.6679 4.21335 15.7304 4.24374 15.8241L4.36364 16.1838C4.40924 16.3197 4.51563 16.427 4.65157 16.4717L5.01126 16.5916C5.13032 16.6313 5.19533 16.7613 5.1548 16.8804C5.13201 16.9479 5.07881 17.0011 5.01126 17.0239L4.65157 17.1438C4.51563 17.1894 4.40839 17.2958 4.36364 17.4318L4.24374 17.7915C4.20406 17.9105 4.07403 17.9755 3.95497 17.935C3.88742 17.9122 3.83423 17.859 3.81143 17.7915L3.69153 17.4318C3.64594 17.2958 3.53955 17.1886 3.40361 17.1438L3.04391 17.0239C2.92486 16.9842 2.85984 16.8542 2.90037 16.7352C2.92317 16.6676 2.97636 16.6144 3.04391 16.5916L3.40361 16.4717C3.53955 16.4261 3.64678 16.3197 3.69153 16.1838L3.81143 15.8241C3.84267 15.7312 3.92964 15.6679 4.02759 15.6679Z",fill:"url(#paint3_linear_1940_1302)"}),N.createElement("path",{d:"M3.77599 15.1216C3.46273 14.2874 3.29133 13.3856 3.29133 12.4433C3.29133 9.14607 5.39124 6.33014 8.3237 5.26287L7.93951 4.23276C4.58742 5.4537 2.19366 8.66901 2.19366 12.4433C2.19366 13.5139 2.38702 14.5398 2.73912 15.488L3.77599 15.1216Z",fill:"url(#paint4_linear_1940_1302)"}),N.createElement("path",{d:"M15.6899 18.4137C14.3837 19.4574 12.7287 20.0822 10.9302 20.0822C8.72816 20.0822 6.74055 19.1449 5.34482 17.6487L4.53424 18.3935C6.12923 20.1075 8.40393 21.179 10.9302 21.179C12.9846 21.179 14.8725 20.4697 16.3645 19.2834L15.6899 18.4129V18.4137Z",fill:"url(#paint5_linear_1940_1302)"}),N.createElement("path",{d:"M10.9302 8.35407C12.0203 8.35407 13.0115 8.78385 13.7453 9.48129L14.4807 8.66311C13.5528 7.79089 12.3048 7.25641 10.931 7.25641C8.65549 7.25641 6.7236 8.72221 6.02448 10.7613L7.05628 11.1396C7.60173 9.52266 9.13171 8.35407 10.931 8.35407H10.9302Z",fill:"url(#paint6_linear_1940_1302)"}),N.createElement("path",{d:"M13.7402 15.4104C13.0073 16.1053 12.0177 16.5325 10.931 16.5325C9.1241 16.5325 7.58906 15.3546 7.04951 13.7259L6.00842 14.0771C6.6932 16.1407 8.63775 17.6302 10.931 17.6302C12.3065 17.6302 13.5561 17.0932 14.4849 16.2193L13.7402 15.4104Z",fill:"url(#paint7_linear_1940_1302)"}),N.createElement("defs",null,N.createElement("linearGradient",{id:"paint0_linear_1940_1302",x1:5.35747,y1:4.15001,x2:20.3929,y2:14.9578,gradientUnits:"userSpaceOnUse"},N.createElement("stop",{stopColor:"#A61E69"}),N.createElement("stop",{offset:1,stopColor:"#6366F1"})),N.createElement("linearGradient",{id:"paint1_linear_1940_1302",x1:7.32986,y1:1.40754,x2:22.3653,y2:12.2153,gradientUnits:"userSpaceOnUse"},N.createElement("stop",{stopColor:"#A61E69"}),N.createElement("stop",{offset:1,stopColor:"#6366F1"})),N.createElement("linearGradient",{id:"paint2_linear_1940_1302",x1:1.77228,y1:9.13847,x2:16.8077,y2:19.9462,gradientUnits:"userSpaceOnUse"},N.createElement("stop",{stopColor:"#A61E69"}),N.createElement("stop",{offset:1,stopColor:"#6366F1"})),N.createElement("linearGradient",{id:"paint3_linear_1940_1302",x1:-1.09428,y1:13.1255,x2:13.9412,y2:23.9333,gradientUnits:"userSpaceOnUse"},N.createElement("stop",{stopColor:"#A61E69"}),N.createElement("stop",{offset:1,stopColor:"#6366F1"})),N.createElement("linearGradient",{id:"paint4_linear_1940_1302",x1:2.64455,y1:7.92344,x2:17.68,y2:18.7312,gradientUnits:"userSpaceOnUse"},N.createElement("stop",{stopColor:"#A61E69"}),N.createElement("stop",{offset:1,stopColor:"#6366F1"})),N.createElement("linearGradient",{id:"paint5_linear_1940_1302",x1:.172293,y1:11.3642,x2:15.2078,y2:22.172,gradientUnits:"userSpaceOnUse"},N.createElement("stop",{stopColor:"#A61E69"}),N.createElement("stop",{offset:1,stopColor:"#6366F1"})),N.createElement("linearGradient",{id:"paint6_linear_1940_1302",x1:4.40247,y1:5.47904,x2:19.4379,y2:16.2868,gradientUnits:"userSpaceOnUse"},N.createElement("stop",{stopColor:"#A61E69"}),N.createElement("stop",{offset:1,stopColor:"#6366F1"})),N.createElement("linearGradient",{id:"paint7_linear_1940_1302",x1:1.58821,y1:9.39517,x2:16.6237,y2:20.2029,gradientUnits:"userSpaceOnUse"},N.createElement("stop",{stopColor:"#A61E69"}),N.createElement("stop",{offset:1,stopColor:"#6366F1"})))),Bu=t=>N.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},N.createElement("path",{d:"M3.33284 2V4.66667M1.99951 3.33333H4.66618M3.99951 11.3333V14M2.66618 12.6667H5.33284M8.66618 2L10.19 6.57143L13.9995 8L10.19 9.42857L8.66618 14L7.14237 9.42857L3.33284 8L7.14237 6.57143L8.66618 2Z",stroke:"url(#paint0_linear_3891_2757)",strokeWidth:1.33333,strokeLinecap:"round",strokeLinejoin:"round"}),N.createElement("defs",null,N.createElement("linearGradient",{id:"paint0_linear_3891_2757",x1:1.99951,y1:2,x2:15.3308,y2:3.72773,gradientUnits:"userSpaceOnUse"},N.createElement("stop",{stopColor:"#A61E69"}),N.createElement("stop",{offset:1,stopColor:"#6366F1"})))),nS="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2AAAAHoCAYAAAAv7ow4AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAOtaSURBVHgB7L0HgBzFmb/99uYg7SqDhERSAiSiwBYCgYkHlg3YBgsHggPRCQyOdwaDz8afDQf2nYlnsm2CfMYE4z/ZBoRsEBgFQGQQklDWrrRB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wRrSro+pICuYwxbo7hVRHtYU0WH6eEEIIIYSQ2jMmc8DwMI90Nsz/yqD6YSrjqoBoBdKAeV8ogc4qfCOnmnL0LD9PCCGEEEJI7RlTu4FMYYN8DfftkHw25zoHqW+d03qUhJHaUKhmGH5ldJafJ4QQQgghZHQYlwoLSEdEUQ0vyeqY2k35qjFGOfrQ57P8PCGEEEIIIaPCuJW4gxC0tkVs+xB1YdW90SFSQUohy88TQgghhBAyOoyr7UQd63tFud7XqNFWQUphKwtwEEIIIYQQMiqMq4AhKmNNjeOD/+gRNgKGOXiMQhJCCCGEEDI6jGulBchXx5RuVRkx2tXOB/9RxCisUa4aIsvPE0IIIYQQMnqMe6k7FIjARkafMOXoWX6eEEIIIYSQ0YMhpwkEFsQOAhFIlp8nhBBCCCFk9KCATSCQhtjeE/c/NmWSEEIIIYQQQkaPFk1HyIQim0ipeXdIRzSWA2jv7VIFOAghhBBCCCGjBwWMEEIIIYQQQsYIpiASQgghhBBCyBhBASOEEEIIIYSQMYICRgghhBBCCCFjBAWMEEIIIYQQQsYIChghhBBCCCGEjBEUMEIIIYQQQggZIyhghBBCCCGEEDJGUMAIIYQQQgghZIyggBFCCCGEEELIGEEBI4QQQgghhJAxggJGCCGEEEIIIWMEBYwQQgghhBBCxggKGCGEEEIIIYSMERQwQgghhBBCCBkjKGCEEEIIIYQQMkZQwAghhBBCCCFkjKCAEUIIIYQQQsgYQQEjhBBCCCGEkDGCAkYIIYQQQgghY8T/B+cQ4pXsw1icAAAAAElFTkSuQmCC";var S0=function(e){var n=e.isOpen,r=e.variant,i=r===void 0?"purchase":r,s=e.onClose,a=xt(),o=a.hostAppProps.onAddSubscription,l=function(){o==null||o()};return c.jsx(A.Modal,{isOpen:n,onClose:s||function(){},position:"center",as:"div",className:"[&_.yst-modal\\_\\_close-button]:yst-bg-transparent",children:c.jsxs(A.Modal.Panel,{className:oe("yst-relative yst-max-w-[512px] yst-rounded-3xl yst-bg-gradient-to-b yst-from-[rgba(166,30,105,0.25)] yst-via-white yst-via-40% yst-to-white yst-px-10",{"yst-pt-10":!!s,"yst-py-10":!s}),hasCloseButton:!!s,children:[c.jsx("img",{src:nS,alt:"Upsell image",className:"yst-mb-6 yst-rounded-lg yst-shadow-lg"}),c.jsxs(A.Modal.Container.Header,{className:"yst-mb-4 yst-space-y-4 yst-text-center",children:[c.jsxs("p",{className:"yst-flex yst-items-center yst-justify-center yst-gap-1 yst-text-center yst-text-xs yst-uppercase yst-text-slate-500",children:[c.jsx(tS,{className:"yst-h-6 yst-w-6"})," Yoast AI Brand Insights"]}),i==="trial"?c.jsxs(c.Fragment,{children:[c.jsx(A.Modal.Title,{as:"h2",className:"yst-text-lg yst-font-medium yst-text-slate-900",children:"Your first brand analysis is free!"}),c.jsx("p",{className:"yst-text-tiny yst-font-normal yst-text-slate-600",children:"As a Yoast customer, you can run your first brand analysis at no cost. See how your brand shows up in AI responses."})]}):c.jsxs(c.Fragment,{children:[c.jsx(A.Modal.Title,{as:"h2",className:"yst-pr-8 yst-text-lg yst-font-medium yst-text-slate-900",children:"How does your brand show up in AI responses?"}),c.jsx("p",{className:"yst-text-tiny yst-font-normal yst-text-slate-600",children:"Track visibility, control perception, and stay ahead - tools to manage your AI presence are now live!"})]})]}),c.jsxs(A.Modal.Container.Footer,{className:"yst-mt-6 yst-flex yst-flex-col yst-gap-2",children:[i==="trial"?c.jsxs(A.Button,{onClick:s,className:"yst-flex yst-w-full yst-items-center yst-gap-1 yst-border-transparent yst-bg-gradient-to-r yst-from-[#A61E69] yst-to-[#6366F1] yst-text-white yst-shadow-[0_1px_2px_rgba(0,0,0,0.05)] hover:yst-opacity-90 focus:yst-outline-[#A61E69]",children:[c.jsx(Bu,{className:"yst-h-5 yst-w-5 [&_path]:yst-stroke-white"})," Set up free analysis"]}):c.jsxs(A.Button,{variant:"upsell",onClick:l,className:"yst-flex yst-w-full yst-items-center yst-gap-1",children:[c.jsx(bA,{})," Unlock Yoast AI Brand Insights"]}),!!s&&c.jsx(A.Button,{onClick:s,variant:"tertiary",className:"yst-text-center",children:"Close"})]})]})})},Pr=function(){return c.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-3 yst-text-center",children:[c.jsx(A.Spinner,{variant:"primary"}),c.jsx("span",{className:"yst-italic",children:"Just a moment while we get things ready for you..."})]})})};function rS(t,e){return oS(t)||aS(t,e)||sS(t,e)||iS()}function iS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
12
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sS(t,e){if(t){if(typeof t=="string")return pf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pf(t,e):void 0}}function pf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function aS(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function oS(t){if(Array.isArray(t))return t}var lS={HOME:"/"},uS=function(e){var n,r,i,s,a,o,l=e.hideNav,u=l===void 0?!1:l,d=e.disableLayout,f=d===void 0?!1:d,y=e.DebugInfo,h=bt(),p=ft(),m=F.useState(!0),g=rS(m,2),v=g[0],S=g[1],k={disable:f,hideNav:u},j=xt(),C=j.brandId,b=es(),w=b.setBrandId,x=hi({query:{refetchOnReconnect:!1,refetchOnWindowFocus:!1,select:function(
|
|
12
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sS(t,e){if(t){if(typeof t=="string")return pf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pf(t,e):void 0}}function pf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function aS(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function oS(t){if(Array.isArray(t))return t}var lS={HOME:"/"},uS=function(e){var n,r,i,s,a,o,l=e.hideNav,u=l===void 0?!1:l,d=e.disableLayout,f=d===void 0?!1:d,y=e.DebugInfo,h=bt(),p=ft(),m=F.useState(!0),g=rS(m,2),v=g[0],S=g[1],k={disable:f,hideNav:u},j=xt(),C=j.brandId,b=es(),w=b.setBrandId,x=hi({query:{refetchOnReconnect:!1,refetchOnWindowFocus:!1,select:function(P){var Q;return P==null||(Q=P.data)===null||Q===void 0?void 0:Q.brands}}}),L=x.data,D=x.isLoading,M=x.error,I=x.refetch,z=yi(),O=z.data,T=F.useRef(!1),_=F.useMemo(function(){return L==null?void 0:L.find(function(H){return H.id===C})},[L,C]);F.useEffect(function(){var H;if(!(L===void 0||C)){var P=(H=L[0])===null||H===void 0?void 0:H.id;P&&w(P)}},[L,C,w,p,h.pathname]),F.useEffect(function(){!C||T.current||(T.current=!0)},[_,C,p,h.pathname,L]);var R=F.useCallback(function(){I()},[I]);if(h.pathname!==lS.HOME&&D)return c.jsx(jl,{...k,children:c.jsx(Pr,{})});if(M)return c.jsx(jl,{...k,children:c.jsx("div",{className:"yst-flex yst-min-h-screen yst-items-center yst-justify-center",children:c.jsxs("div",{className:"yst-space-y-4 yst-text-center",children:[c.jsx("div",{className:"yst-mb-4 yst-text-6xl yst-text-red-600",children:"⚠️"}),c.jsx("h2",{className:"yst-text-xl yst-font-semibold yst-text-slate-900",children:"Something went wrong"}),c.jsx("p",{className:"yst-text-slate-600",children:"We couldn't load your Brand Analysis. Please try again shortly."}),c.jsx(A.Button,{variant:"primary",onClick:R,children:"Retry"})]})})});var G=O==null||(n=O.data)===null||n===void 0?void 0:n.trialAnalysisCompletedAt,Y=!!G&&Date.now()-new Date(G).getTime()<8*60*60*1e3,E=(O==null||(r=O.data)===null||r===void 0?void 0:r.activeSubscriptions)===0&&!Y,W=(O==null||(i=O.data)===null||i===void 0?void 0:i.brands)&&(O==null||(s=O.data)===null||s===void 0||(s=s.brands)===null||s===void 0?void 0:s.length)>0;return c.jsxs(jl,{DebugInfo:y,...k,children:[c.jsx(Wi,{}),c.jsx(eS,{}),E&&c.jsx(S0,{isOpen:v,variant:O!=null&&(a=O.data)!==null&&a!==void 0&&a.isEligibleForFreeTrial?"trial":"purchase",onClose:W||O!=null&&(o=O.data)!==null&&o!==void 0&&o.isEligibleForFreeTrial?function(){S(!1)}:void 0})]})},un=function(e){var n=e.title,r=bt();return F.useEffect(function(){document.title=n},[r,n]),null},cS=function(){var e=zo(),n=e.brandId,r=e.analysisId,i=Xo(n,{query:{enabled:!!n,select:function(d){var f=d.data;return(f==null?void 0:f.analyses)||[]}}}),s=i.data,a=i.isLoading,o=i.error;if(a)return c.jsx(Pr,{});if(o)return console.error("Error fetching analyses for validation:",o),c.jsx(ji,{to:"/brands/".concat(n),replace:!0});if(!r||r.trim()==="")return c.jsx(ji,{to:"/brands/".concat(n),replace:!0});if(r==="latest")return c.jsx(Wi,{});var l=s==null?void 0:s.some(function(u){return u.id===r});return l?c.jsx(Wi,{}):c.jsx(ji,{to:"/brands/".concat(n),replace:!0})},mf=function(){var e=zo(),n=e.brandId,r=hi({query:{select:function(f){var y=f.data;return y}}}),i=r.data,s=r.isLoading,a=r.error,o=r.isFetched,l=(i==null?void 0:i.brands)||[];if(s||!o)return c.jsx(Pr,{});if(a)return c.jsx(ji,{to:"/",replace:!0});if(!n||n.trim()==="")return c.jsx(ji,{to:"/",replace:!0});var u=l.length>0&&l.some(function(d){return String(d.id)===n});return o&&!u?c.jsx(ji,{to:"/",replace:!0}):c.jsx(Wi,{})};function dS(t){return yS(t)||hS(t)||C0(t)||fS()}function fS(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
13
13
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hS(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function yS(t){if(Array.isArray(t))return Fu(t)}function pS(t,e){return vS(t)||gS(t,e)||C0(t,e)||mS()}function mS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
14
14
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C0(t,e){if(t){if(typeof t=="string")return Fu(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fu(t,e):void 0}}function Fu(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function gS(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function vS(t){if(Array.isArray(t))return t}var Uc=F.createContext(void 0),bS=function(e){var n=e.children,r=F.useState([]),i=pS(r,2),s=i[0],a=i[1],o=F.useCallback(function(u){a(function(d){return d.filter(function(f){return f.id!==u})})},[]),l=F.useCallback(function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(function(f){var y,h,p=typeof u=="string"?f.some(function(S){return typeof S.message!="string"?!1:S.message===u&&S.variant===(d.variant||"info")}):!1;if(p)return f;var m="toast-".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2,11)),g=(y=d.duration)!==null&&y!==void 0?y:5e3,v={id:m,message:u,variant:d.variant||"info",duration:g,dismissible:(h=d.dismissible)!==null&&h!==void 0?h:!0};return g>0&&setTimeout(function(){o(m)},g),[].concat(dS(f),[v])})},[o]);return c.jsx(Uc.Provider,{value:{toasts:s,addToast:l,removeToast:o},children:n})},xS=function(){var e=F.useContext(Uc);if(!e)return null;var n=e.toasts,r=e.removeToast;if(typeof window=="undefined")return null;var i=document.getElementById("hook-toasts");return i?pm.createPortal(c.jsx("div",{className:oe("yst-w-full yst-space-y-4"),"aria-live":"polite","aria-atomic":"true",children:n.map(function(s){var a;return c.jsxs(A.Toast,{className:oe("yst-w-full",s.className),id:s.id,variant:s.variant||"info",autoDismiss:s.dismissible?0:(a=s.duration)!==null&&a!==void 0?a:1500,onDismiss:function(){return r(s.id)},isVisible:!0,setIsVisible:function(){},children:[c.jsxs("div",{className:"yst-flex yst-gap-3",children:[c.jsx("div",{className:"yst-flex-shrink-0",children:c.jsx(A.ValidationIcon,{className:"yst-h-5 yst-w-5",variant:s.variant})}),c.jsxs("div",{className:"yst-flex-1",children:[typeof s.title=="string"?c.jsx(A.Title,{title:s.title}):s.title,typeof s.message=="string"?c.jsx("p",{className:"yst-mb-0",children:s.message}):s.message]}),s.dismissible&&c.jsx("div",{children:c.jsx(A.Toast.Close,{className:"yst-p-0 yst-text-slate-400",dismissScreenReaderLabel:"Dismiss"})})]}),s.actions&&c.jsx("div",{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-3",children:c.jsx(s.actions,{dismiss:function(){return r(s.id)}})})]},s.id)})}),i):null},Zo=function(){var e=F.useContext(Uc);if(!e)throw new Error("useToast must be used within a ToastProvider");var n=e.addToast;return F.useCallback(function(r,i){n(r,i)},[n])};function wS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{fillRule:"evenodd",d:"M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"}))}const j0=N.forwardRef(wS);function AS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{fillRule:"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"}))}const SS=N.forwardRef(AS);function CS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{fillRule:"evenodd",d:"M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z",clipRule:"evenodd"}))}const k0=N.forwardRef(CS);function jS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))}const E0=N.forwardRef(jS);function kS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"}))}const ES=N.forwardRef(kS);function OS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{fillRule:"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z",clipRule:"evenodd"}))}const TS=N.forwardRef(OS);function PS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{d:"M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),N.createElement("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))}const O0=N.forwardRef(PS);function IS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"}))}const LS=N.forwardRef(IS);function NS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"}))}const MS=N.forwardRef(NS);function _S(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}))}const RS=N.forwardRef(_S);function DS(t,e){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:e},t),N.createElement("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"}))}const $o=N.forwardRef(DS);var cn={openai:"openai",perplexity:"perplexity",anthropic:"anthropic",gemini:"gemini"},BS={updating:"updating"},yn={processing:"processing",completed:"completed",failed:"failed",cancelled:"cancelled"};const zu=t=>N.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},N.createElement("path",{d:"M3.652 15.0488C2.3816 15.0488 1.348 14.0152 1.348 12.7448V5.22476C1.348 3.95436 2.3816 2.92075 3.652 2.92075H9.5912L9.9304 2.07275H3.652C1.9144 2.07275 0.5 3.48716 0.5 5.22476V12.7448C0.5 14.4824 1.9144 15.8968 3.652 15.8968H3.6776V15.0488H3.652Z",fill:"#A61E69"}),N.createElement("path",{d:"M16.5 5.22468C16.5 3.74948 15.4824 2.51428 14.1096 2.17188L13.812 2.97188C14.8584 3.18628 15.6488 4.11748 15.6488 5.22788V15.0519H9.16236C9.00236 15.3527 8.83276 15.6375 8.65356 15.8999H16.4968V5.22468H16.5Z",fill:"#A61E69"}),N.createElement("path",{d:"M11.5815 0.140137L8.03267 9.99614L6.28867 4.53374H4.15747L6.82307 11.3785C7.06947 12.0121 7.06947 12.7129 6.82307 13.3497C6.56387 14.0121 6.10627 14.8025 4.82947 15.0361L4.77187 15.0457V16.8633H4.84547C5.91107 16.8185 6.73667 16.4665 7.44387 15.7561C8.16387 15.0329 8.78147 13.9065 9.38947 12.2137L13.8919 0.140137H11.5815Z",fill:"#A61E69"}));var gf="production",vf="development",bf="staging",xf={development:["localhost","my.yoast.test"],staging:["staging","pages.dev"]};function FS(){var t=xt(),e=t.hostAppProps,n=e==null?void 0:e.env,r=F.useMemo(function(){return typeof window!="undefined"?window.location.hostname:""},[]);return F.useMemo(function(){var i=function(u){return u.some(function(d){return r.includes(d)})},s=n?n===vf:i(xf.development),a=n?n===bf:i(xf.staging),o=n?n===gf:!s&&!a;return{env:n||(s?vf:a?bf:gf),isProduction:o,isDevelopment:s,isStaging:a}},[n,r])}var wf=function(e){return typeof e=="string"&&e!=="latest"&&e.trim().length>0};function Gs(t){"@babel/helpers - typeof";return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gs(t)}var zS=["children","as","startColor","endColor","angle","disabled","style","className"];function Af(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Sf(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Af(Object(n),!0).forEach(function(r){US(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Af(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function US(t,e,n){return(e=HS(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function HS(t){var e=qS(t,"string");return Gs(e)=="symbol"?e:e+""}function qS(t,e){if(Gs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Gs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function WS(t,e){if(t==null)return{};var n,r,i=GS(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function GS(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var Qs=function(e){var n=e.children,r=e.as,i=r===void 0?"span":r,s=e.startColor,a=s===void 0?"#A61E69":s,o=e.endColor,l=o===void 0?"#6366F1":o,u=e.angle,d=u===void 0?102:u,f=e.disabled,y=f===void 0?!1:f,h=e.style,p=h===void 0?{}:h,m=e.className,g=m===void 0?"":m,v=WS(e,zS),S=Sf(y?{display:"inline-block"}:{background:"linear-gradient(".concat(d,"deg, ").concat(a,", ").concat(l,")"),WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text",display:"inline-block"},p);return c.jsx(i,{className:g,style:S,...v,children:n})};function Hc(t){var e=t.children,n=t.nestedInPaperContent,r=n===void 0?!1:n,i=t.className;return c.jsx("div",{className:oe("yst-mt-8 yst-flex yst-items-center yst-justify-end yst-gap-6 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",{"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem]":r},i),children:e})}var QS=function(){var e=ft();return c.jsx("form",{onSubmit:function(){return e("/setup")},children:c.jsxs(A.Paper,{className:"yst-mx-auto yst-flex yst-max-w-2xl",children:[c.jsx(A.Paper.Header,{children:c.jsxs(A.Title,{size:"1",children:["Welcome to ",c.jsx(Qs,{children:"Yoast AI Brand Insights"}),"!"]})}),c.jsxs(A.Paper.Content,{className:"yst-space-y-8",children:[c.jsxs("div",{className:"yst-space-y-4 *:yst-text-tiny",children:[c.jsx("p",{children:"See how your brand is represented in AI answers."}),c.jsxs("p",{children:[c.jsx("b",{className:"yst-font-medium yst-text-slate-800",children:"Yoast AI Brand Insights"})," ","shows how often your brand appears, how it's described, and how it compares to competitors in tools like ChatGPT and Perplexity."]}),c.jsx("p",{children:"It only takes three simple steps to get your brand insights:"})]}),c.jsx("div",{className:"yst-flex yst-flex-col yst-items-stretch yst-justify-stretch yst-gap-4 yst-pb-8",children:[{title:"1. ADD BRAND INFO",description:"Tell us about your brand and where it's active so we can customize your analysis."},{title:"2. REVIEW QUERIES",description:"Edit or approve the queries generated from your input."},{title:"3. RUN ANALYSIS",description:"Run your queries through relevant AI platforms to see how your brand shows up."}].map(function(n,r,i){return c.jsxs("div",{className:"yst-relative yst-flex yst-flex-col yst-items-stretch",children:[c.jsxs("div",{className:"yst-flex yst-flex-row yst-items-center yst-justify-stretch yst-gap-6",children:[c.jsx(A.Stepper.Step,{isActive:!0,isComplete:!1,children:c.jsx("span",{className:"yst-hidden",children:r+1})}),c.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-gap-2 yst-rounded yst-border yst-border-slate-200 yst-p-6",children:[c.jsx(A.Title,{size:"3",className:"yst-font-semibold yst-uppercase",children:n.title}),c.jsx("p",{className:"yst-my-0 yst-py-0",children:n.description})]})]}),r<i.length-1&&c.jsx("div",{className:"yst-absolute yst-left-[-2px] yst-top-1/2 yst-my-0 yst-ml-[13px] yst-h-full yst-border-l-2 yst-border-l-primary-600"})]},n.title)})})]}),c.jsx(Hc,{className:"yst-justify-end",children:c.jsxs(A.Button,{variant:"primary",onClick:function(){return e("/setup")},children:["Start your first analysis ",c.jsx(SS,{})]})})]})})};function Ao(t){return typeof t!="number"?{}:{"yst-text-green-600":t>0,"yst-text-red-600":t<0,"yst-text-gray-400":t===0}}function ts(t){var e=t.score,n=t.total,r=t.suffix,i=t.isLoading,s=i===void 0?!1:i,a=t.className,o=t.hideTotal,l=o===void 0?!1:o,u=t.delta,d=t.deltaFormat,f=d===void 0?"absolute":d,y=t.deltaSuffix,h=t.scoreFormat,p=h===void 0?"absolute":h;return c.jsxs("div",{className:oe(a,"yst-font-medium"),children:[c.jsxs("span",{className:"yst-mr-1 yst-text-xl yst-font-bold yst-text-slate-900",children:[s||e===void 0||e===null?"—":e,!s&&e!==void 0&&e!==null&&p==="percentage"?"%":""]}),!l&&n&&n!==0&&n!=="0"&&c.jsxs("span",{className:"yst-text-slate-500",children:["/ ",s?"—":n]}),r&&c.jsxs("span",{className:"yst-text-slate-500",children:[" ",r]}),typeof u=="number"&&!isNaN(u)&&c.jsxs("span",{className:oe("yst-ml-2",Ao(u)),children:[u>-1&&"+",u,f==="percentage"&&"%"," ",y]})]})}var YS=["Icon","className","children","position","id"];function VS(t,e){return ZS(t)||JS(t,e)||XS(t,e)||KS()}function KS(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
15
15
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XS(t,e){if(t){if(typeof t=="string")return Cf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cf(t,e):void 0}}function Cf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function JS(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function ZS(t){if(Array.isArray(t))return t}function $S(t,e){if(t==null)return{};var n,r,i=e3(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function e3(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function qc(t){var e=t.Icon,n=e===void 0?gA:e,r=t.className,i=r===void 0?"":r,s=t.children,a=t.position,o=a===void 0?"left":a,l=t.id,u=l===void 0?"":l,d=$S(t,YS),f=F.useState(!1),y=VS(f,2),h=y[0],p=y[1];return s?c.jsxs("div",{className:i||"yst-relative",onMouseEnter:function(){return p(!0)},onMouseLeave:function(){return p(!1)},"aria-describedby":u?"tooltip-button-id":"tooltip-button",...d,children:[c.jsx(n,{className:"yst-relative yst-h-6 yst-w-6 yst-text-slate-400"}),h&&c.jsx(A.Tooltip,{position:o,id:u||"tooltip-button",children:s})]}):null}var wa=function(e){var n=e.title,r=e.tooltip,i=e.size,s=i===void 0?"3":i,a=e.className,o=a===void 0?"":a,l=function(f){var y=typeof f=="string"?f:"tooltip";return"tooltip-".concat(y.toLowerCase().replace(/\s+/g,"-"))},u=l(n);return c.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between ".concat(o),children:[c.jsx(A.Title,{size:s,children:n}),c.jsx(qc,{id:u,children:r})]})},jf=function(e){var n=e.keywords,r=e.badgeClassName;return c.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:n.map(function(i,s){return i&&c.jsx(A.Badge,{className:r,children:i},s)})})},T0=function(e){var n,r,i,s,a=e.title,o=a===void 0?"Sentiment":a,l=e.tooltip,u=l===void 0?"":l,d=e.data,f=d==null?void 0:d.brandName,y=d==null||(n=d.positivityPercentage)===null||n===void 0?void 0:n.value,h=d==null||(r=d.positivityPercentage)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,p=d==null||(i=d.keywords)===null||i===void 0?void 0:i.positive,m=d==null||(s=d.keywords)===null||s===void 0?void 0:s.negative,g=!d||y===void 0&&h===void 0;return c.jsx(A.Card,{className:"yst-overflow-visible",children:c.jsxs(A.Card.Content,{className:"yst-space-y-8",children:[c.jsx(wa,{title:o,tooltip:u}),c.jsx("div",{className:"yst-space-y-3",children:!g&&c.jsxs(c.Fragment,{children:[c.jsx("p",{children:f||c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-20"})}),c.jsxs("div",{children:[c.jsx("div",{className:"yst-inline-flex",children:c.jsx(ts,{className:"yst-mb-1.5",score:y,scoreFormat:"percentage",suffix:"positive",delta:h})}),c.jsx(A.ProgressBar,{max:100,min:0,progress:y||0,className:oe({"yst-bg-red-500":y},"[&>*]:yst-bg-green-500")})]})]})}),g&&c.jsx(A.Alert,{variant:"info",children:"The selected AI platform returned no brand sentiment data for your queries. This can happen with some queries or platforms."}),!!p&&c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx(A.Title,{as:"h5",size:"5",children:"Positive keywords"}),c.jsx(jf,{keywords:p,badgeClassName:"yst-bg-green-100 yst-text-green-800"})]}),!!m&&c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx(A.Title,{as:"h5",size:"5",children:"Negative keywords"}),c.jsx(jf,{keywords:m,badgeClassName:"yst-bg-red-100 yst-text-red-800"})]})]})})};function Ys(t){"@babel/helpers - typeof";return Ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ys(t)}var t3=["data"];function kf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function n3(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?kf(Object(n),!0).forEach(function(r){r3(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function r3(t,e,n){return(e=i3(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i3(t){var e=s3(t,"string");return Ys(e)=="symbol"?e:e+""}function s3(t,e){if(Ys(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Ys(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function a3(t,e){if(t==null)return{};var n,r,i=o3(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function o3(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var or=function(e,n,r){var i=xt(),s=i.brandId,a=i.analysisId,o=i.aiProvider,l=s,u=a,d=o,f=ga(l,u,{query:{enabled:!!l&&!!u,select:function(g){var v=g.data;return v==null?void 0:v.analysis}}}),y=f.data,h=a3(f,t3),p=F.useMemo(function(){if(!y||!d)return null;var m=y.completedScans||[];return m.find(function(g){return String(g.aiProvider)===String(d)})||null},[y,d]);return n3({data:p},h)};function l3(){var t,e=or(),n=e.data;return c.jsx(T0,{title:"Brand sentiment",data:n==null||(t=n.sentiment)===null||t===void 0?void 0:t.own,tooltip:"Percentage of positive versus negative keywords in your query results related to your brand."})}var u3=["children","as","className"];function c3(t,e){if(t==null)return{};var n,r,i=d3(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function d3(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var Ir=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var s=e.reduce(function(a,o,l){return a+o+(r[l]||"")},"");return function(a){var o=a.children,l=a.as,u=l===void 0?"div":l,d=a.className,f=d===void 0?"":d,y=c3(a,u3);return c.jsx(u,{className:oe(String(s).trim(),f),...y,children:o})}},kl=[{bg:"yst-bg-blue-200",text:"yst-text-blue-900"},{bg:"yst-bg-green-200",text:"yst-text-green-900"},{bg:"yst-bg-purple-200",text:"yst-text-purple-900"},{bg:"yst-bg-pink-200",text:"yst-text-pink-900"},{bg:"yst-bg-yellow-200",text:"yst-text-yellow-900"},{bg:"yst-bg-indigo-200",text:"yst-text-indigo-900"},{bg:"yst-bg-red-200",text:"yst-text-red-900"},{bg:"yst-bg-orange-200",text:"yst-text-orange-900"},{bg:"yst-bg-teal-200",text:"yst-text-teal-900"},{bg:"yst-bg-cyan-200",text:"yst-text-cyan-900"},{bg:"yst-bg-lime-200",text:"yst-text-lime-900"},{bg:"yst-bg-emerald-200",text:"yst-text-emerald-900"},{bg:"yst-bg-sky-200",text:"yst-text-sky-900"},{bg:"yst-bg-violet-200",text:"yst-text-violet-900"},{bg:"yst-bg-fuchsia-200",text:"yst-text-fuchsia-900"},{bg:"yst-bg-rose-200",text:"yst-text-rose-900"},{bg:"yst-bg-amber-200",text:"yst-text-amber-900"}],Ef=function(e){if(!e)return kl[0];if(e.toLowerCase()==="other")return{bg:"yst-bg-slate-200",text:"yst-text-slate-900"};for(var n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}var s=Math.abs(n)%kl.length;return kl[s]};function Vs(t){"@babel/helpers - typeof";return Vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vs(t)}var Of,Tf;function Pf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function If(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Pf(Object(n),!0).forEach(function(r){f3(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pf(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function f3(t,e,n){return(e=h3(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h3(t){var e=y3(t,"string");return Vs(e)=="symbol"?e:e+""}function y3(t,e){if(Vs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Vs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function p3(t){return v3(t)||g3(t)||P0(t)||m3()}function m3(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
16
16
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g3(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function v3(t){if(Array.isArray(t))return Uu(t)}function Lf(t,e){return w3(t)||x3(t,e)||P0(t,e)||b3()}function b3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
17
17
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P0(t,e){if(t){if(typeof t=="string")return Uu(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Uu(t,e):void 0}}function Uu(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function x3(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function w3(t){if(Array.isArray(t))return t}function I0(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var cs=Ir(Of||(Of=I0(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-slate-400 yst-inline-flex yst-w-20"]))),Nf=Ir(Tf||(Tf=I0(["yst-hidden md:yst-inline-flex"]))),Mf=function(e){var n=e.data,r=e.isLoading,i=r===void 0?!1:r,s=e.enableCategories,a=s===void 0?!1:s,o=i||!n,l=n||{},u=l.rank,d=l.url,f=l.rootDomain,y=l.category,h=l.isBrand,p=l.associatedBrands;return c.jsxs("tr",{className:"yst-flex yst-flex-col yst-py-4 md:yst-table-row md:yst-py-0",children:[c.jsxs(A.Table.Cell,{className:"yst-p-0 yst-py-1 yst-align-top md:yst-ml-0 md:yst-p-2",children:[c.jsx(cs,{as:"span",children:"Rank:"}),o?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):c.jsxs("div",{className:"yst-inline-flex yst-items-center yst-gap-1",children:[c.jsx("span",{className:"yst-whitespace-nowrap yst-text-slate-500",children:u?c.jsxs(c.Fragment,{children:[u,c.jsx(Nf,{children:"."})]}):"—"}),h&&c.jsx(Nf,{children:c.jsx(Hu,{})}),h&&c.jsx(cs,{children:c.jsx(Hu,{})})]})]}),c.jsx(A.Table.Cell,{className:"yst-break-all yst-p-0 yst-py-1 yst-align-top md:yst-ml-0 md:yst-w-1/2 md:yst-p-2",children:o?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-full"}):c.jsxs(A.Link,{className:"yst-font-medium",href:d||"#",rel:"nofollow noreferrer",target:"_blank",children:[c.jsx("span",{className:"yst-inline yst-break-all",children:d!=null?d:"—"}),c.jsx(O0,{className:"yst-ml-1 yst-inline-block yst-h-4 yst-w-4 yst-align-text-bottom"})]})}),c.jsxs(A.Table.Cell,{className:"yst-p-0 yst-py-1 yst-align-top yst-font-medium md:yst-ml-0 md:yst-p-2",children:[c.jsx(cs,{as:"span",children:"Domain:"}),o?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):c.jsx("span",{className:"yst-inline yst-break-all yst-font-medium yst-text-slate-900",children:f!=null?f:"—"})]}),a&&c.jsxs(A.Table.Cell,{className:"yst-p-0 yst-py-1 yst-align-top md:yst-ml-0 md:yst-p-2",children:[c.jsx(cs,{as:"span",children:"Category:"}),o?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-16"}):c.jsx(A.Badge,{className:oe(Ef(y||"").bg,Ef(y||"").text),children:y!=null?y:"—"})]}),c.jsxs(A.Table.Cell,{className:"yst-p-0 yst-py-1 yst-align-top md:yst-ml-0 md:yst-p-2",children:[c.jsx(cs,{as:"span",children:"Brands:"}),o?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):p&&p.length>0?c.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-1",children:p.map(function(m){return c.jsx(A.Badge,{variant:m.isSelf?"ai":"plain",children:m.name},m.id)})}):c.jsx("span",{className:"yst-text-slate-500",children:"—"})]})]},o?void 0:d)},Hu=function(){return c.jsx("span",{role:"img","aria-label":"Brand citation",children:c.jsx(RS,{className:"yst-inline yst-h-4 yst-w-4 yst-fill-amber-500"})})},A3=function(e){var n,r,i,s,a=e.enableCategories,o=a===void 0?!1:a,l=F.useState("all"),u=Lf(l,2),d=u[0],f=u[1],y=F.useState(1),h=Lf(y,2),p=h[0],m=h[1],g=or(),v=g.data,S=g.isLoading,k=g.isRefetching,j=v==null?void 0:v.citations,C=j==null||(n=j.list)===null||n===void 0?void 0:n.filter(function(I){return d==="all"?!0:I.category===d}),b=10,w=(C==null?void 0:C.length)||0,x=Math.ceil(w/b),L=(p-1)*b,D=L+b,M=C==null?void 0:C.slice(L,D);return F.useEffect(function(){p>x&&x>0&&m(1)},[x,p,m,d]),c.jsx(A.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:c.jsxs(A.Card.Content,{className:"yst-flex yst-flex-col yst-gap-6",children:[c.jsxs("div",{className:"yst-space-y-4",children:[c.jsx(wa,{title:"Citations",tooltip:"Sources the AI used to support brand mentions in the results."}),c.jsxs("p",{children:["This table highlights the key sources where your brand (",c.jsx(Hu,{}),") or competitors were mentioned, ordered by their relevance."]}),c.jsx(ts,{score:j==null||(r=j.total)===null||r===void 0?void 0:r.value,suffix:"citations",delta:j==null||(i=j.total)===null||i===void 0||(i=i.previous)===null||i===void 0?void 0:i.difference,deltaSuffix:"since last analysis",isLoading:S,hideTotal:!0})]}),(j==null||(s=j.list)===null||s===void 0?void 0:s.length)===0&&!S&&!k?c.jsx(A.Alert,{children:"The selected AI platform returned no citations for your queries. This can happen with some queries or platforms."}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[o&&c.jsx(A.Select,{className:"yst-mb-4 md:yst-max-w-sm",label:"Filter categories",value:d,onChange:function(I){f(I)},id:"citation-category-filter",options:[{value:"all",label:"All categories"}].concat(p3(j!=null&&j.categories?j.categories.map(function(I){return{value:I,label:I}}):[]))}),c.jsxs(A.Table,{variant:"minimal",children:[c.jsx(A.Table.Head,{className:"yst-font-semibold",children:c.jsxs(A.Table.Row,{children:[c.jsx(A.Table.Cell,{className:"yst-hidden yst-align-top yst-text-slate-900 md:yst-table-cell md:yst-pl-1",children:" "}),c.jsx(A.Table.Cell,{className:"yst yst-hidden yst-align-top yst-text-slate-900 md:yst-table-cell md:yst-px-1",children:"URL"}),c.jsx(A.Table.Cell,{className:"yst-hidden yst-align-top yst-text-slate-900 md:yst-table-cell md:yst-px-1",children:"Root domain"}),o&&c.jsx(A.Table.Cell,{className:"yst-hidden yst-align-top yst-text-slate-900 md:yst-table-cell",children:"Category"}),c.jsx(A.Table.Cell,{className:"yst-hidden yst-align-top yst-text-slate-900 md:yst-table-cell",children:"Brands"})]})}),c.jsx(A.Table.Body,{children:S||k?Array.from({length:5}).map(function(I,z){return c.jsx(Mf,{isLoading:!0,enableCategories:o},"skeleton-".concat(z))}):M&&M.length>0?M.map(function(I,z){return c.jsx(Mf,{data:If(If({},I),{},{rank:L+z+1}),enableCategories:o},"citation-table-row-".concat(I.url,"-").concat(z))}):c.jsx(A.Table.Row,{children:c.jsxs(A.Table.Cell,{colSpan:o?6:5,className:"yst-py-8 yst-text-center yst-text-slate-500",children:[d==="all"?"No citations found.":'No citations found for the "'.concat(d,'" category.')," ",c.jsx(A.Link,{onClick:function(){return f("all")},children:"Show all categories."})]})},"no-results")})]})]}),C&&C.length>b&&c.jsxs("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:[c.jsxs("p",{className:"yst-mb-0",children:["Showing ",L+1," to"," ",D>w?w:D," of"," ",w," results"]}),c.jsx(A.Pagination,{variant:"text",className:"yst-flex-row yst-gap-0",current:p,total:x,onNavigate:m,screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]})]})})};function S3(t,e){return E3(t)||k3(t,e)||j3(t,e)||C3()}function C3(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
18
18
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function j3(t,e){if(t){if(typeof t=="string")return _f(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_f(t,e):void 0}}function _f(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function k3(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function E3(t){if(Array.isArray(t))return t}var Rf=function(e){var n,r=e.data,i=e.totalQueries,s=e.isFirstScan,a=s===void 0?!0:s,o=e.isLoading,l=o===void 0?!1:o,u=l||!r,d=r||{},f=d.rank,y=d.brand,h=f==null?void 0:f.previous,p=typeof(h==null?void 0:h.difference)=="number"?h.difference*-1:void 0,m=y==null?void 0:y.numberOfMentions,g=m==null?void 0:m.previous,v=typeof(g==null?void 0:g.difference)=="number"?g.difference:void 0;return c.jsxs(A.Table.Row,{children:[c.jsx(A.Table.Cell,{children:u?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):c.jsxs("span",{className:"yst-flex yst-justify-between yst-gap-4",children:[c.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-2 yst-font-medium",children:[c.jsx("span",{className:"yst-text-slate-500",children:"#"}),c.jsx("span",{className:"yst-text-slate-900",children:(f==null?void 0:f.value)||"—"})]}),!a&&c.jsx("span",{className:oe("yst-inline-flex yst-items-center yst-justify-end",Ao(h&&typeof p=="number"?p:0)),children:h&&typeof p=="number"&&p!==0?c.jsxs(c.Fragment,{children:[Math.abs(p),p>0?c.jsx(TS,{className:"yst-h-4 yst-w-4"}):c.jsx(ES,{className:"yst-h-4 yst-w-4"})]}):null})]})}),c.jsx(A.Table.Cell,{children:u?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):c.jsx("span",{className:"yst-font-medium",children:y!=null&&y.isSelf?c.jsx(Qs,{children:y==null?void 0:y.name}):(n=y==null?void 0:y.name)!==null&&n!==void 0?n:"—"})}),c.jsx(A.Table.Cell,{children:u?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-8"}):c.jsxs("span",{className:"yst-flex yst-justify-end yst-gap-4",children:[c.jsxs("span",{className:"yst-flex yst-flex-nowrap yst-gap-1 yst-font-medium",children:[c.jsx("span",{className:"yst-text-slate-500",children:m==null?void 0:m.value}),c.jsxs("span",{className:"yst-text-slate-900",children:["/ ",i]})]}),!a&&c.jsx("span",{className:oe("yst-ml-auto",Ao(g&&typeof v=="number"?v:0)),children:g&&typeof v=="number"?c.jsxs(c.Fragment,{children:[v>-1&&"+",v]}):null})]})})]},u||f==null?void 0:f.value)},O3=function(e){var n,r,i=e.className,s=F.useRef(null),a=F.useState(1),o=S3(a,2),l=o[0],u=o[1],d=or(),f=d.data,y=d.isLoading,h=d.isRefetching,p=f==null||(n=f.rankings)===null||n===void 0?void 0:n.list,m=(f==null||(r=f.scores)===null||r===void 0||(r=r.standardized)===null||r===void 0?void 0:r.ranking)||{},g=Object.hasOwn(m,"previous"),v=5,S=(p==null?void 0:p.length)||0,k=Math.ceil(S/v),j=(l-1)*v,C=j+v,b=p==null?void 0:p.slice(j,C);return F.useEffect(function(){l>k&&k>0&&u(1)},[k,l,u]),c.jsx(A.Card,{ref:s,className:oe("yst-overflow-visible",i),children:c.jsxs(A.Card.Content,{className:"yst-mt-0 yst-space-y-6",children:[c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx(wa,{title:"Competitor ranking",tooltip:"How often competitors are mentioned in your submitted queries."}),c.jsx("p",{children:"Brands with the most mentions for your prompts."})]}),!y&&!h&&(!p||p.length===0)?c.jsx(A.Alert,{variant:"info",children:"The selected AI platform returned no brands for your queries. This can happen with some queries or platforms."}):c.jsxs(A.Table,{variant:"minimal",children:[c.jsx(A.Table.Head,{children:c.jsxs(A.Table.Row,{children:[c.jsx(A.Table.Cell,{className:"yst-w-20 yst-font-semibold",children:"Rank"}),c.jsx(A.Table.Cell,{className:"yst-font-semibold",children:"Brand"}),c.jsx(A.Table.Cell,{className:"yst-w-20 yst-text-right yst-font-semibold",children:"Mentions"})]})}),c.jsx(A.Table.Body,{children:b&&Array.isArray(b)&&b.length>0?b.map(function(w){var x;return c.jsx(Rf,{data:w,totalQueries:f==null?void 0:f.numberOfQueries,isFirstScan:!g},"rank-row-".concat((x=w.rank)===null||x===void 0?void 0:x.value))}):y||h?Array.from({length:v}).map(function(w,x){return c.jsx(Rf,{isLoading:!0},"skeleton-".concat(x))}):null})]}),!y&&!h&&p&&p.length>v&&c.jsx(A.Pagination,{current:l,total:k,className:"yst-flex-row",onNavigate:u,screenReaderTextNext:"Next",screenReaderTextPrevious:"Previous",variant:"text"})]})})},T3=function(){var e,n=or(),r=n.data,i=r==null||(e=r.sentiment)===null||e===void 0?void 0:e.topCompetitor;return c.jsx(T0,{title:"Competitor sentiment",data:i,tooltip:"Percentage of positive versus negative keywords in your query results related to your competitor's brand."})};const L0=6048e5,P3=864e5,Df=Symbol.for("constructDateFrom");function Pt(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Df in t?t[Df](e):t instanceof Date?new t.constructor(e):new Date(e)}function wt(t,e){return Pt(e||t,t)}function I3(t,e,n){const r=wt(t,n==null?void 0:n.in);return isNaN(e)?Pt(t,NaN):(r.setDate(r.getDate()+e),r)}function N0(t,e,n){const r=wt(t,n==null?void 0:n.in);if(isNaN(e))return Pt(t,NaN);if(!e)return r;const i=r.getDate(),s=Pt(t,r.getTime());s.setMonth(r.getMonth()+e+1,0);const a=s.getDate();return i>=a?s:(r.setFullYear(s.getFullYear(),s.getMonth(),i),r)}let L3={};function el(){return L3}function Ks(t,e){var o,l,u,d,f,y,h,p;const n=el(),r=(p=(h=(d=(u=e==null?void 0:e.weekStartsOn)!=null?u:(l=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)!=null?d:n.weekStartsOn)!=null?h:(y=(f=n.locale)==null?void 0:f.options)==null?void 0:y.weekStartsOn)!=null?p:0,i=wt(t,e==null?void 0:e.in),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function So(t,e){return Ks(t,{...e,weekStartsOn:1})}function M0(t,e){const n=wt(t,e==null?void 0:e.in),r=n.getFullYear(),i=Pt(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=So(i),a=Pt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=So(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function Bf(t){const e=wt(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function tl(t,...e){const n=Pt.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function Co(t,e){const n=wt(t,e==null?void 0:e.in);return n.setHours(0,0,0,0),n}function N3(t,e,n){const[r,i]=tl(n==null?void 0:n.in,t,e),s=Co(r),a=Co(i),o=+s-Bf(s),l=+a-Bf(a);return Math.round((o-l)/P3)}function M3(t,e){const n=M0(t,e),r=Pt(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),So(r)}function _0(t){return Pt(t,Date.now())}function R0(t,e,n){const[r,i]=tl(n==null?void 0:n.in,t,e);return+Co(r)==+Co(i)}function _3(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function R3(t){return!(!_3(t)&&typeof t!="number"||isNaN(+wt(t)))}function D3(t,e){const n=wt(t,e==null?void 0:e.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function B3(t,e){const[n,r]=tl(t,e.start,e.end);return{start:n,end:r}}function F3(t,e){const{start:n,end:r}=B3(e==null?void 0:e.in,t);let i=+n>+r;const s=i?+n:+r,a=i?r:n;a.setHours(0,0,0,0);let o=1;const l=[];for(;+a<=s;)l.push(Pt(n,a)),a.setDate(a.getDate()+o),a.setHours(0,0,0,0);return i?l.reverse():l}function z3(t,e){const n=wt(t,e==null?void 0:e.in);return n.setDate(1),n.setHours(0,0,0,0),n}function U3(t,e){const n=wt(t,e==null?void 0:e.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const H3={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},q3=(t,e,n)=>{let r;const i=H3[t];return typeof i=="string"?r=i:e===1?r=i.one:r=i.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function El(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const W3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},G3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Q3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Y3={date:El({formats:W3,defaultWidth:"full"}),time:El({formats:G3,defaultWidth:"full"}),dateTime:El({formats:Q3,defaultWidth:"full"})},V3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},K3=(t,e,n,r)=>V3[t];function ds(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=t.formattingValues[o]||t.formattingValues[a]}else{const a=t.defaultWidth,o=n!=null&&n.width?String(n.width):t.defaultWidth;i=t.values[o]||t.values[a]}const s=t.argumentCallback?t.argumentCallback(e):e;return i[s]}}const X3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},J3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Z3={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"]},$3={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"]},eC={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"}},tC={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"}},nC=(t,e)=>{const n=Number(t),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"},rC={ordinalNumber:nC,era:ds({values:X3,defaultWidth:"wide"}),quarter:ds({values:J3,defaultWidth:"wide",argumentCallback:t=>t-1}),month:ds({values:Z3,defaultWidth:"wide"}),day:ds({values:$3,defaultWidth:"wide"}),dayPeriod:ds({values:eC,defaultWidth:"wide",formattingValues:tC,defaultFormattingWidth:"wide"})};function fs(t){return(e,n={})=>{const r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],s=e.match(i);if(!s)return null;const a=s[0],o=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(o)?sC(o,f=>f.test(a)):iC(o,f=>f.test(a));let u;u=t.valueCallback?t.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const d=e.slice(a.length);return{value:u,rest:d}}}function iC(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function sC(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function aC(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const i=r[0],s=e.match(t.parsePattern);if(!s)return null;let a=t.valueCallback?t.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=e.slice(i.length);return{value:a,rest:o}}}const oC=/^(\d+)(th|st|nd|rd)?/i,lC=/\d+/i,uC={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},cC={any:[/^b/i,/^(a|c)/i]},dC={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fC={any:[/1/i,/2/i,/3/i,/4/i]},hC={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},yC={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]},pC={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},mC={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]},gC={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},vC={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}},bC={ordinalNumber:aC({matchPattern:oC,parsePattern:lC,valueCallback:t=>parseInt(t,10)}),era:fs({matchPatterns:uC,defaultMatchWidth:"wide",parsePatterns:cC,defaultParseWidth:"any"}),quarter:fs({matchPatterns:dC,defaultMatchWidth:"wide",parsePatterns:fC,defaultParseWidth:"any",valueCallback:t=>t+1}),month:fs({matchPatterns:hC,defaultMatchWidth:"wide",parsePatterns:yC,defaultParseWidth:"any"}),day:fs({matchPatterns:pC,defaultMatchWidth:"wide",parsePatterns:mC,defaultParseWidth:"any"}),dayPeriod:fs({matchPatterns:gC,defaultMatchWidth:"any",parsePatterns:vC,defaultParseWidth:"any"})},xC={code:"en-US",formatDistance:q3,formatLong:Y3,formatRelative:K3,localize:rC,match:bC,options:{weekStartsOn:0,firstWeekContainsDate:1}};function wC(t,e){const n=wt(t,e==null?void 0:e.in);return N3(n,U3(n))+1}function AC(t,e){const n=wt(t,e==null?void 0:e.in),r=+So(n)-+M3(n);return Math.round(r/L0)+1}function D0(t,e){var d,f,y,h,p,m,g,v;const n=wt(t,e==null?void 0:e.in),r=n.getFullYear(),i=el(),s=(v=(g=(h=(y=e==null?void 0:e.firstWeekContainsDate)!=null?y:(f=(d=e==null?void 0:e.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)!=null?h:i.firstWeekContainsDate)!=null?g:(m=(p=i.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)!=null?v:1,a=Pt((e==null?void 0:e.in)||t,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=Ks(a,e),l=Pt((e==null?void 0:e.in)||t,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=Ks(l,e);return+n>=+o?r+1:+n>=+u?r:r-1}function SC(t,e){var o,l,u,d,f,y,h,p;const n=el(),r=(p=(h=(d=(u=e==null?void 0:e.firstWeekContainsDate)!=null?u:(l=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)!=null?d:n.firstWeekContainsDate)!=null?h:(y=(f=n.locale)==null?void 0:f.options)==null?void 0:y.firstWeekContainsDate)!=null?p:1,i=D0(t,e),s=Pt((e==null?void 0:e.in)||t,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Ks(s,e)}function CC(t,e){const n=wt(t,e==null?void 0:e.in),r=+Ks(n,e)-+SC(n,e);return Math.round(r/L0)+1}function _e(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const lr={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return _e(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):_e(n+1,2)},d(t,e){return _e(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){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(t,e){return _e(t.getHours()%12||12,e.length)},H(t,e){return _e(t.getHours(),e.length)},m(t,e){return _e(t.getMinutes(),e.length)},s(t,e){return _e(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return _e(i,e.length)}},gi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ff={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){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(t,e,n){if(e==="yo"){const r=t.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return lr.y(t,e)},Y:function(t,e,n,r){const i=D0(t,r),s=i>0?i:1-i;if(e==="YY"){const a=s%100;return _e(a,2)}return e==="Yo"?n.ordinalNumber(s,{unit:"year"}):_e(s,e.length)},R:function(t,e){const n=M0(t);return _e(n,e.length)},u:function(t,e){const n=t.getFullYear();return _e(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return _e(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(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return _e(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(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return lr.M(t,e);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(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return _e(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(t,e,n,r){const i=CC(t,r);return e==="wo"?n.ordinalNumber(i,{unit:"week"}):_e(i,e.length)},I:function(t,e,n){const r=AC(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):_e(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):lr.d(t,e)},D:function(t,e,n){const r=wC(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):_e(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){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(t,e,n,r){const i=t.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return _e(s,2);case"eo":return n.ordinalNumber(s,{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(t,e,n,r){const i=t.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return _e(s,e.length);case"co":return n.ordinalNumber(s,{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(t,e,n){const r=t.getDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return _e(i,e.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(t,e,n){const i=t.getHours()/12>=1?"pm":"am";switch(e){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(t,e,n){const r=t.getHours();let i;switch(r===12?i=gi.noon:r===0?i=gi.midnight:i=r/12>=1?"pm":"am",e){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(t,e,n){const r=t.getHours();let i;switch(r>=17?i=gi.evening:r>=12?i=gi.afternoon:r>=4?i=gi.morning:i=gi.night,e){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(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return lr.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):lr.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):_e(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):_e(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):lr.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):lr.s(t,e)},S:function(t,e){return lr.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Uf(r);case"XXXX":case"XX":return Fr(r);case"XXXXX":case"XXX":default:return Fr(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Uf(r);case"xxxx":case"xx":return Fr(r);case"xxxxx":case"xxx":default:return Fr(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+zf(r,":");case"OOOO":default:return"GMT"+Fr(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+zf(r,":");case"zzzz":default:return"GMT"+Fr(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return _e(r,e.length)},T:function(t,e,n){return _e(+t,e.length)}};function zf(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+e+_e(s,2)}function Uf(t,e){return t%60===0?(t>0?"-":"+")+_e(Math.abs(t)/60,2):Fr(t,e)}function Fr(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),i=_e(Math.trunc(r/60),2),s=_e(r%60,2);return n+i+e+s}const Hf=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},B0=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},jC=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Hf(t,e);let s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",Hf(r,e)).replace("{{time}}",B0(i,e))},kC={p:B0,P:jC},EC=/^D+$/,OC=/^Y+$/,TC=["D","DD","YY","YYYY"];function PC(t){return EC.test(t)}function IC(t){return OC.test(t)}function LC(t,e,n){const r=NC(t,e,n);if(console.warn(r),TC.includes(t))throw new RangeError(r)}function NC(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const MC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_C=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RC=/^'([^]*?)'?$/,DC=/''/g,BC=/[a-zA-Z]/;function _n(t,e,n){var d,f,y,h,p,m,g,v,S;const r=el(),i=(d=r.locale)!=null?d:xC,s=(p=(h=r.firstWeekContainsDate)!=null?h:(y=(f=r.locale)==null?void 0:f.options)==null?void 0:y.firstWeekContainsDate)!=null?p:1,a=(S=(v=r.weekStartsOn)!=null?v:(g=(m=r.locale)==null?void 0:m.options)==null?void 0:g.weekStartsOn)!=null?S:0,o=wt(t,n==null?void 0:n.in);if(!R3(o))throw new RangeError("Invalid time value");let l=e.match(_C).map(k=>{const j=k[0];if(j==="p"||j==="P"){const C=kC[j];return C(k,i.formatLong)}return k}).join("").match(MC).map(k=>{if(k==="''")return{isToken:!1,value:"'"};const j=k[0];if(j==="'")return{isToken:!1,value:FC(k)};if(Ff[j])return{isToken:!0,value:k};if(j.match(BC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+j+"`");return{isToken:!1,value:k}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const u={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return l.map(k=>{if(!k.isToken)return k.value;const j=k.value;(IC(j)||PC(j))&&LC(j,e,String(t));const C=Ff[j[0]];return C(o,j,i.localize,u)}).join("")}function FC(t){const e=t.match(RC);return e?e[1].replace(DC,"'"):t}function qf(t,e,n){const[r,i]=tl(n==null?void 0:n.in,t,e);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function F0(t,e){return R0(Pt(t,t),_0(t))}function zC(t,e){return R0(t,I3(_0(t),1),e)}function UC(t,e,n){return N0(t,-1,n)}var HC=function(e){var n=e.brand,r=ft(),i=es(),s=i.setBrandId;return(n==null?void 0:n.setupStatus)==="pendingQuerySelection"?c.jsx(A.Alert,{className:"yst-mt-0",children:c.jsxs("div",{className:"yst-max-w-xl yst-space-y-4",children:[c.jsxs("div",{className:"yst-space-y-2",children:[c.jsxs("h3",{className:"yst-font-medium",children:["Finish setting up your analysis for ",(n==null?void 0:n.name)||"Brand ".concat(n==null?void 0:n.id)]}),c.jsx("p",{children:"Your brand is saved, but you haven’t completed the analysis setup yet. Finalize your settings now and run the analysis to get your brand insights!"})]}),c.jsx("div",{className:"yst-flex yst-justify-start yst-gap-6",children:c.jsx(A.Link,{onClick:function(){n.id?(s(n.id),r("/setup/".concat(n.id,"/queries"))):console.error("Brand ID is missing.")},children:"Finish analysis setup"})})]})}):null},qC=function(){var e=xt(),n=e.hostAppProps.basename,r=F.useCallback(function(a){if(!n||!a.startsWith(n))return a;var o=a.slice(n.length);return o||"/"},[n]),i=F.useCallback(function(a){if(!n)return a;var o=a.startsWith("/")?a:"/".concat(a);return"".concat(n).concat(o)},[n]),s=F.useCallback(function(a){return n?a.startsWith(n):a.startsWith("/")&&!a.startsWith("//")},[n]);return{basename:n||"",stripBasename:r,addBasename:i,isWithinBasename:s}};function Ol(t,e){return YC(t)||QC(t,e)||GC(t,e)||WC()}function WC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
19
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GC(t,e){if(t){if(typeof t=="string")return Wf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wf(t,e):void 0}}function Wf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function QC(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function YC(t){if(Array.isArray(t))return t}var VC=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.shouldBlock,r=n===void 0?!0:n,i=e.onConfirmLeave,s=e.onCancelLeave,a=ft(),o=qC(),l=o.basename,u=o.stripBasename,d=F.useState(!1),f=Ol(d,2),y=f[0],h=f[1],p=F.useState(null),m=Ol(p,2),g=m[0],v=m[1],S=F.useState(!1),k=Ol(S,2),j=k[0],C=k[1],b=F.useRef(!1);F.useEffect(function(){if(!(!r||j)){var M=function(z){var
|
|
19
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GC(t,e){if(t){if(typeof t=="string")return Wf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wf(t,e):void 0}}function Wf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function QC(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function YC(t){if(Array.isArray(t))return t}var VC=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.shouldBlock,r=n===void 0?!0:n,i=e.onConfirmLeave,s=e.onCancelLeave,a=ft(),o=qC(),l=o.basename,u=o.stripBasename,d=F.useState(!1),f=Ol(d,2),y=f[0],h=f[1],p=F.useState(null),m=Ol(p,2),g=m[0],v=m[1],S=F.useState(!1),k=Ol(S,2),j=k[0],C=k[1],b=F.useRef(!1);F.useEffect(function(){if(!(!r||j)){var M=function(z){var O=z.target,T=O.closest("a");if(T){var _=T.getAttribute("href");if(_&&_.startsWith("/")&&!_.startsWith("//")){var R=window.location.pathname,G=u(_),Y=u(R);G!==Y&&(z.preventDefault(),z.stopPropagation(),v(G),h(!0))}}};return document.addEventListener("click",M,!0),function(){return document.removeEventListener("click",M,!0)}}},[r,u,j]),F.useEffect(function(){if(!(!r||j)){b.current=!1;var M=function(){if(!b.current){b.current=!0;return}v(-1),h(!0);var O=window.location.href;window.history.pushState({blockerActive:!0},"",O)};window.addEventListener("popstate",M);var I=setTimeout(function(){var z=window.location.href;window.history.pushState({blockerActive:!0},"",z),b.current=!0},50);return function(){var z;clearTimeout(I),window.removeEventListener("popstate",M),b.current&&(z=window.history.state)!==null&&z!==void 0&&z.blockerActive&&window.history.back()}}},[r,j]),F.useEffect(function(){if(r){var M=function(z){z.preventDefault(),z.returnValue=""};return window.addEventListener("beforeunload",M),function(){return window.removeEventListener("beforeunload",M)}}},[r]);var w=F.useCallback(function(M){if(typeof M=="number")a(M);else{var I=l&&M.startsWith(l)?u(M):M;a(I)}},[a,u,l]),x=F.useCallback(function(){g!==null&&(h(!1),C(!0),i==null||i(),setTimeout(function(){if(g===-1){var M;(M=window.history.state)!==null&&M!==void 0&&M.blockerActive?(window.history.back(),setTimeout(function(){window.history.back()},10)):window.history.back()}else w(g);v(null),setTimeout(function(){return C(!1)},100)},0))},[g,w,i]),L=F.useCallback(function(){h(!1),v(null),s==null||s()},[s]),D=F.useCallback(function(M){r?(v(M),h(!0)):w(M)},[r,w]);return{showModal:y,pendingNavigation:g,confirmLeave:x,cancelLeave:L,navigateAway:D}};function KC(t,e){return $C(t)||ZC(t,e)||JC(t,e)||XC()}function XC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
20
20
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JC(t,e){if(t){if(typeof t=="string")return Gf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gf(t,e):void 0}}function Gf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function ZC(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function $C(t){if(Array.isArray(t))return t}var e5=function(e){var n,r=e.brand,i=It(),s=Zo(),a=F.useState(!1),o=KC(a,2),l=o[0],u=o[1],d=yi(),f=d.data,y=(f==null||(n=f.data)===null||n===void 0?void 0:n.isEligibleForFreeTrial)===!0,h=Fx({mutation:{onSuccess:function(){u(!0),i.invalidateQueries({queryKey:ba()}),i.invalidateQueries({queryKey:pn()})},onError:function(){s("Something went wrong starting your free analysis. Please try again.",{variant:"error"})}}}),p=h.mutate,m=h.isPending;if(l)return c.jsx(A.Alert,{className:"yst-mt-0",variant:"info",children:c.jsxs("div",{className:"yst-max-w-xl yst-space-y-2",children:[c.jsx("h3",{className:"yst-font-medium",children:"Your free trial analysis has started!"}),c.jsxs("p",{children:["We’re analyzing “",r.name,"” now. This usually takes a few minutes — we’ll email you when it’s ready."]})]})});var g=r.setupStatus==="pendingQuerySelection"||r.setupStatus==="firstAnalysisInProgress";return!y||g||r.setupStatus!=="firstAnalysisNotScheduled"?null:c.jsx(A.Alert,{className:"yst-mt-0",children:c.jsxs("div",{className:"yst-max-w-xl yst-space-y-4",children:[c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx("h3",{className:"yst-font-medium",children:"Use your free trial on this brand?"}),c.jsxs("p",{children:["You are eligible for a free brand insights analysis. If you’d rather analyze a different brand than “",r.name,"”, you can delete this brand in the settings and create a new one."]})]}),c.jsx("div",{className:"yst-flex yst-justify-start",children:c.jsx(A.Button,{variant:"primary",onClick:function(){return p({brandId:r.id})},disabled:m,children:m?"Starting analysis…":"Use the free trial"})})]})})},nl=function(e){var n=e.isOpen,r=e.onClose,i=e.onConfirm,s=e.isLoading,a=s===void 0?!1:s,o=e.title,l=e.description,u=e.disabled,d=u===void 0?!1:u,f=e.confirmText,y=f===void 0?"Yes, delete":f,h=e.cancelText,p=h===void 0?"No, go back":h,m=e.className;return c.jsx(A.Modal,{isOpen:n,onClose:r,position:"center",as:"div",className:m,children:c.jsxs(A.Modal.Panel,{children:[c.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[c.jsx("div",{children:c.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-red-100",children:c.jsx(oo,{className:"yst-h-6 yst-w-6 yst-text-red-600"})})}),c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:o})}),c.jsx(A.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:typeof l=="string"?c.jsx("p",{children:l}):l})]})]}),c.jsxs(A.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[c.jsx(A.Button,{variant:"secondary",onClick:r,children:p}),c.jsx(A.Button,{variant:"error",onClick:i,isLoading:a,disabled:d,children:y})]})]})})},li=function(e){var n=e.className,r=n===void 0?"":n,i=e.size,s=i===void 0?6:i;return c.jsx("hr",{className:oe("yst-mb-".concat(s," yst-mt-").concat(s),r)})};function z0(t){if(t!=null){if(typeof t=="number"){var e=1e12;return t>e?t-Date.now():t}var n=Date.parse(t);if(!Number.isNaN(n))return n-Date.now()}}function t5(t,e){var n=z0(t);return n!==void 0&&n>e*60*1e3}var n5=2;function U0(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n5,n=z0(t);return n!==void 0&&n<=e*60*1e3}function qu(t){if(t==null)return"a future date";var e;if(typeof t=="number"){var n=1e12;t>n?e=t:e=Date.now()+t}else{var r=Date.parse(t);Number.isNaN(r)||(e=r)}if(e===void 0)return"a future date";var i=new Date(e),s={month:"long",day:"numeric"},a={hour:"numeric",minute:"2-digit",hour12:!0},o=i.toLocaleDateString("en-US",s),l=i.toLocaleTimeString("en-US",a);return"".concat(o," at ").concat(l)}function hr(t){if(!t)return null;var e=new Date(t);return isNaN(e.getTime())?null:e}function Xs(t){"@babel/helpers - typeof";return Xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xs(t)}function Tl(t,e,n){return(e=r5(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r5(t){var e=i5(t,"string");return Xs(e)=="symbol"?e:e+""}function i5(t,e){if(Xs(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Xs(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function s5(t,e){return u5(t)||l5(t,e)||o5(t,e)||a5()}function a5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
21
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o5(t,e){if(t){if(typeof t=="string")return Qf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qf(t,e):void 0}}function Qf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l5(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function u5(t){if(Array.isArray(t))return t}var Cn={selected:{background:"yst-bg-primary-500",text:"yst-text-white",hover:"hover:yst-bg-primary-600"},hasAnalysis:{border:"yst-border-2 yst-border-primary-500",text:"yst-text-slate-900",hover:"hover:yst-bg-primary-50"},today:{underline:"yst-border-b-2 yst-border-slate-400"},indicator:{default:"yst-bg-blue-500"}},c5=function(e){var n=e.analyses,r=e.selectedAnalysisId,i=e.onAnalysisSelect,s=e.isLoading,a=s===void 0?!1:s,o=e.isOpen,l=o===void 0?!1:o,u=e.onClose,d=F.useState(new Date),f=s5(d,2),y=f[0],h=f[1],p=F.useMemo(function(){var b=new Map;return n.forEach(function(w){var x=hr(w.createdAt),L=x?_n(x,"yyyy-MM-dd"):"";L&&(b.has(L)||b.set(L,[]),b.get(L).push(w))}),b},[n]);F.useEffect(function(){if(l&&r){var b=n.find(function(D){return D.id===r});if(b){var w=hr(b.createdAt);w&&h(w)}}else if(l&&n.length>0){var x=n.reduce(function(D,M){return new Date(M.createdAt)>new Date(D.createdAt)?M:D}),L=hr(x.createdAt);L&&h(L)}},[l,r,n]);var m=F.useMemo(function(){return n.length===0?null:n.reduce(function(b,w){return new Date(w.createdAt)>new Date(b.createdAt)?w:b})},[n]),g=function(){if(m){var w=hr(m.createdAt);w&&h(w)}},v=F.useMemo(function(){if(!m)return!1;var b=hr(m.createdAt);return b?qf(b,y):!1},[m,y]),S=F.useMemo(function(){var b=z3(y),w=D3(y),x=new Date(b),L=x.getDay(),D=L===0?6:L-1;x.setDate(x.getDate()-D);var M=new Date(w),I=M.getDay(),z=I===0?0:7-I;return M.setDate(M.getDate()+z),F3({start:x,end:M}).map(function(
|
|
22
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f5(t,e){if(t){if(typeof t=="string")return Vf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vf(t,e):void 0}}function Vf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h5(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function y5(t){if(Array.isArray(t))return t}var H0=function(e){var n=e.analyses,r=e.selectedAnalysisId,i=e.onAnalysisSelect,s=e.isLoading,a=s===void 0?!1:s,o=e.disabled,l=o===void 0?!1:o,u=e.id,d=u===void 0?"analysis-date-select":u,f=F.useState(!1),y=Yf(f,2),h=y[0],p=y[1],m=F.useState("latest"),g=Yf(m,2),v=g[0],S=g[1],k=F.useRef(null),j=F.useCallback(function(z){var
|
|
23
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m5(t,e){if(t){if(typeof t=="string")return Xf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xf(t,e):void 0}}function Xf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function g5(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function v5(t){if(Array.isArray(t))return t}var Jf=function(e){var n=e.id,r=e.isVisible,i=e.onClose,s=e.children,a=e.className,o=e.variant,l=o===void 0?"info":o,u=e.showArrow,d=u===void 0?!0:u,f=e.keepOpenOnExternalClick,y=f===void 0?!1:f,h=e.delay,p=h===void 0?0:h,m=F.useRef(null),g=F.useState(!1),v=Kf(g,2),S=v[0],k=v[1],j=F.useState(!1),C=Kf(j,2),b=C[0],w=C[1];return F.useEffect(function(){if(!r){(S||b)&&(k(!1),w(!1));return}if(r)if(p>0){w(!1),k(!1);var x=setTimeout(function(){k(!0),setTimeout(function(){return w(!0)},50)},p);return function(){return clearTimeout(x)}}else k(!0),w(!1)},[r,p]),F.useEffect(function(){if(!y){var x=function(D){m.current&&!m.current.contains(D.target)&&i()};return r&&document.addEventListener("mousedown",x),function(){document.removeEventListener("mousedown",x)}}},[r,i,y]),r?c.jsxs("div",{id:n,className:"yst-absolute yst-w-80",ref:m,children:[S&&d&&c.jsx("div",{className:oe("yst-absolute yst-left-1/2 yst-top-full yst-z-[60] yst-mt-[7px] yst-h-3 yst-w-3 yst--translate-x-1/2 yst--translate-y-1/2 yst-rotate-45 yst-transform yst-border-l yst-border-t yst-border-gray-100 yst-bg-white",{"yst-opacity-0":p>0&&!b,"yst-animate-in yst-fade-in yst-slide-in-from-top-1 yst-duration-300":p>0&&b})}),c.jsx(A.Toast,{id:"".concat(n,"--toast"),className:oe("yst-absolute yst-left-1/2 yst-top-full yst-z-50 yst-mt-2 yst-w-80 yst--translate-x-1/2 yst-transform",{"yst-block":S,"yst-hidden":!S,"yst-opacity-0":p>0&&S&&!b,"yst-animate-in yst-fade-in yst-slide-in-from-top-2 yst-duration-300":p>0&&b},a),variant:l,isVisible:S,setIsVisible:function(){},autoDismiss:0,children:s})]}):null},b5=function(e){for(var n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n).toString(36)},jo=function(e,n,r,i){var s="".concat(e,"_").concat(n,"_").concat(r,"_").concat(i),a=b5(s);return"yst_legal_alert_dismissed_".concat(a)},x5=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ks=function(e){switch(e){case"openai":return"ChatGPT";case"perplexity":return"Perplexity AI";case"anthropic":return"Anthropic";case"gemini":return"Gemini";default:return e||"Unknown"}},Wu=function(e){return Math.round((e+1)/2*100)},Wc=function(e){return e.some(function(n){return n.canManualRetry})?"can_retry":e.some(function(n){return n.manualRetryCount===1&&!n.canManualRetry&&n.nextManualRetryAfter!=null})?"cooldown":e.some(function(n){return n.manualRetryCount>=2})?"exhausted":"none"},q0=function(e){var n=new Date(e),r=_n(n,"h:mm a");return F0(n)?"today at ".concat(r):zC(n)?"tomorrow at ".concat(r):"".concat(_n(n,"MMM d")," at ").concat(r)},W0=function(e){return e.map(function(n){return n.nextManualRetryAfter}).filter(function(n){return n!=null}).sort()[0]},w5=function(e,n){return"incomplete_analysis_dismissed_".concat(e,"_").concat(n)};function Gu(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Bt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(O,_){return b=O,w=0,x=t,I.n=_,a}};function z(P,O){for(w=P,x=O,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];P>3?(_=Y===O)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=P<2&&G<R[1])?(w=0,I.v=O,I.n=R[1]):G<Y&&(_=P<3||R[0]>O||O>Y)&&(R[4]=P,R[5]=O,I.n=Y,w=0))}if(_||P>1)return a;throw M=!0,O}return function(P,O,_){if(L>1)throw TypeError("Generator is already running");for(M&&O===1&&z(O,_),w=O,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(P="next"),e=b[P]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+P+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Bt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Bt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Bt(f,"constructor",u),Bt(u,"constructor",l),l.displayName="GeneratorFunction",Bt(u,i,"GeneratorFunction"),Bt(f),Bt(f,i,"Generator"),Bt(f,r,function(){return this}),Bt(f,"toString",function(){return"[object Generator]"}),(Gu=function(){return{w:s,m:y}})()}function Bt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Bt=function(a,o,l,u){function d(f,y){Bt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Bt(t,e,n,r)}function Zf(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function A5(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){Zf(s,r,i,a,o,"next",l)}function o(l){Zf(s,r,i,a,o,"throw",l)}a(void 0)})}}var G0=function(e,n){var r=It();return Yx({mutation:{onSuccess:function(){var i=A5(Gu().m(function a(){return Gu().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,Promise.all([r.invalidateQueries({queryKey:mn(e,n)}),r.invalidateQueries({queryKey:Ko(e)})]);case 1:return o.a(2)}},a)}));function s(){return i.apply(this,arguments)}return s}()}})},S5=function(e){var n=e.failedScans,r=e.brandId,i=e.analysisId,s=e.onDismiss,a=Wc(n),o=G0(r,i),l=o.mutate,u=o.isPending;if(a==="none")return null;var d=function(){n.filter(function(v){return v.canManualRetry}).forEach(function(v){l({brandId:r,analysisId:i,scanId:v.id})})},f=c.jsx(A.Link,{as:"button",className:"yst-py-1.5 yst-pr-2 yst-no-underline yst-text-inherit yst-font-medium",onClick:s,variant:"default",children:"Dismiss"}),y=c.jsx("div",{className:"yst-ml-auto yst-flex-shrink-0",children:c.jsx(A.Link,{onClick:s,variant:"default",children:c.jsx($o,{className:"yst-h-4 yst-w-4"})})}),h=function(){return c.jsx(A.Alert,{variant:"error",children:c.jsxs("div",{className:"yst-flex yst-w-full",children:[c.jsxs("div",{className:"yst-flex-1 yst-space-y-2",children:[c.jsx("p",{className:"yst-mb-0 yst-font-medium",children:"Analysis incomplete"}),c.jsx("p",{className:"yst-mb-0",children:"We couldn't retrieve results for all AI platforms. Please run the analysis again to complete the dataset."}),c.jsxs("div",{className:"yst-flex yst-gap-4",children:[c.jsx(A.Link,{as:"button",className:"yst-py-1.5 yst-pr-2 yst-no-underline yst-text-inherit yst-font-medium",onClick:d,variant:"default",children:u?"Running...":"Run analysis again"}),f]})]}),y]})})},p=function(){var v=W0(n);return c.jsx(A.Alert,{variant:"info",children:c.jsxs("div",{className:"yst-flex yst-w-full",children:[c.jsxs("div",{className:"yst-flex-1 yst-space-y-2",children:[c.jsx("p",{className:"yst-mb-0 yst-font-medium",children:"Analysis still incomplete"}),c.jsxs("p",{className:"yst-mb-0",children:["We still can't retrieve the data. Please wait 24 hours before trying again.",v&&c.jsxs(c.Fragment,{children:[c.jsx("br",{}),"Next retry available: ",c.jsx("strong",{children:x5(q0(v))}),"."]})]})]}),y]})})},m=function(){return c.jsx(A.Alert,{variant:"error",children:c.jsxs("div",{className:"yst-flex yst-w-full",children:[c.jsxs("div",{className:"yst-flex-1 yst-space-y-2",children:[c.jsx("p",{className:"yst-mb-0 yst-font-medium",children:"Analysis still incomplete"}),c.jsx("p",{className:"yst-mb-0",children:"Re-running the analysis didn't resolve the issue. Please contact support so we can investigate the missing data for you."}),c.jsxs("div",{className:"yst-flex yst-gap-4",children:[c.jsx(A.Link,{href:"mailto:support@yoast.com",className:"yst-py-1.5 yst-pr-2 yst-no-underline yst-text-inherit yst-font-medium",variant:"default",children:"Contact support"}),f]})]}),y]})})};return a==="can_retry"?h():a==="cooldown"?p():m()},C5=function(e){var n=e.failedScans,r=e.brandId,i=e.analysisId,s=Wc(n),a=G0(r,i),o=a.mutate,l=a.isPending;if(s==="none")return null;var u=function(y){y.preventDefault(),n.filter(function(h){return h.canManualRetry}).forEach(function(h){o({brandId:r,analysisId:i,scanId:h.id})})};if(s==="can_retry")return l?c.jsx("p",{className:"yst-text-sm yst-text-red-600 yst-mt-1 yst-mb-0",children:"Preparing the scan retry..."}):c.jsxs("p",{className:"yst-text-sm yst-text-red-600 yst-mt-1 yst-mb-0",children:["Analysis incomplete. Please"," ",c.jsx(A.Link,{as:"button",type:"button",className:"yst-text-sm yst-text-red-600",onClick:u,variant:"default",children:"run analysis again"}),"."]});if(s==="cooldown"){var d=W0(n);return c.jsxs("p",{className:"yst-text-sm yst-text-red-600 yst-mt-1 yst-mb-0",children:["Analysis incomplete."," ",d?"You can run the analysis again ".concat(q0(d),"."):"You can run the analysis again later."]})}return c.jsxs("p",{className:"yst-text-sm yst-text-red-600 yst-mt-1 yst-mb-0",children:["Analysis incomplete. Please"," ",c.jsx(A.Link,{href:"mailto:support@yoast.com",className:"yst-text-sm yst-text-red-600",variant:"default",children:"contact support"}),"."]})};function Js(t){"@babel/helpers - typeof";return Js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Js(t)}var $f;function eh(t,e,n){return(e=j5(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j5(t){var e=k5(t,"string");return Js(e)=="symbol"?e:e+""}function k5(t,e){if(Js(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Js(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qu(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Ft(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(O,_){return b=O,w=0,x=t,I.n=_,a}};function z(P,O){for(w=P,x=O,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];P>3?(_=Y===O)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=P<2&&G<R[1])?(w=0,I.v=O,I.n=R[1]):G<Y&&(_=P<3||R[0]>O||O>Y)&&(R[4]=P,R[5]=O,I.n=Y,w=0))}if(_||P>1)return a;throw M=!0,O}return function(P,O,_){if(L>1)throw TypeError("Generator is already running");for(M&&O===1&&z(O,_),w=O,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(P="next"),e=b[P]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+P+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Ft(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Ft(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Ft(f,"constructor",u),Ft(u,"constructor",l),l.displayName="GeneratorFunction",Ft(u,i,"GeneratorFunction"),Ft(f),Ft(f,i,"Generator"),Ft(f,r,function(){return this}),Ft(f,"toString",function(){return"[object Generator]"}),(Qu=function(){return{w:s,m:y}})()}function Ft(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Ft=function(a,o,l,u){function d(f,y){Ft(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Ft(t,e,n,r)}function th(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function E5(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){th(s,r,i,a,o,"next",l)}function o(l){th(s,r,i,a,o,"throw",l)}a(void 0)})}}function vi(t,e){return I5(t)||P5(t,e)||T5(t,e)||O5()}function O5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
24
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T5(t,e){if(t){if(typeof t=="string")return nh(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nh(t,e):void 0}}function nh(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function P5(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function I5(t){if(Array.isArray(t))return t}function L5(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var rh="perplexity_tooltip_dismissed",N5=new Date("2026-01-13"),ih="gemini_tooltip_dismissed",M5=new Date("2026-03-01"),Pl=Ir($f||($f=L5(["yst-flex-1 yst-space-y-2"]))),_5=function(e,n){return"yst_legal_alert_dismissed_".concat(e,"_").concat(n)},R5=function(e){var n,r,i,s,a,o,l,u,d,f=e.className,y=xt(),h=y.brandId,p=y.analysisId,m=y.aiProvider,g=es(),v=g.setAiProvider,S=g.setAnalysisId,k=It(),j=ft(),C=F.useState(function(){return localStorage.getItem(rh)==="true"}),b=vi(C,2),w=b[0],x=b[1],L=F.useState(function(){return localStorage.getItem(ih)==="true"}),D=vi(L,2),M=D[0],I=D[1],z=or(),P=z.data,O=yi({query:{select:function(we){var Oe=we.data;return Oe}}}),_=O.data,R=O.isLoading,G=_==null?void 0:_.data,Y=G==null?void 0:G.displayName,E=hi({query:{select:function(we){var Oe=we.data;return Oe==null?void 0:Oe.brands}}}),W=E.data,H=E.isLoading,T=Xo(h,{query:{enabled:!!h,select:function(we){var Oe=we.data;return Oe==null?void 0:Oe.analyses}}}),Q=T.data,Z=T.isLoading,K=ga(h,p,{query:{enabled:!!h&&!!p,select:function(we){var Oe=we.data;return Oe}}}),J=K.data,le=K.isLoading,ue=F.useMemo(function(){var ae,we;return(ae=J==null||(we=J.analysis)===null||we===void 0?void 0:we.completedScans)!==null&&ae!==void 0?ae:[]},[J==null||(n=J.analysis)===null||n===void 0?void 0:n.completedScans]),ie=(r=J==null||(i=J.analysis)===null||i===void 0?void 0:i.failedScans)!==null&&r!==void 0?r:[],ke=(s=J==null||(a=J.analysis)===null||a===void 0?void 0:a.pendingScans)!==null&&s!==void 0?s:[],$=Wc(ie),He=w5(p,$),Nt=F.useState(function(){return localStorage.getItem(He)!==null}),at=vi(Nt,2),Ve=at[0],et=at[1];F.useEffect(function(){et(localStorage.getItem(He)!==null)},[He]);var xn=function(){localStorage.setItem(He,"true"),et(!0)},ot=ue.some(function(ae){return ae.aiProvider===cn.perplexity}),Bn=ue.some(function(ae){return ae.aiProvider===cn.gemini}),Fn=F.useMemo(function(){return new Date},[]),Ue=Fn<N5&&!w&&(P==null?void 0:P.aiProvider)!==cn.perplexity&&!!ot,ye=Fn<M5&&!M&&(P==null?void 0:P.aiProvider)!==cn.gemini&&!!Bn,pe=F.useState(!1),Ae=vi(pe,2),U=Ae[0],X=Ae[1],de=function(){X(!1)},ve=Wx({mutation:{onSuccess:function(){var ae=E5(Qu().m(function Oe(){var Mt,ln,qn,Mr,yl,pl,ml;return Qu().w(function(mi){for(;;)switch(mi.n){case 0:if(Mt=J==null?void 0:J.analysis,ln=(Mt==null?void 0:Mt.completedScans)||[],qn=Q||[],Mr=function(){return Promise.all([k.invalidateQueries({queryKey:Ko(h)}),k.invalidateQueries({queryKey:mn(h,p)}),k.invalidateQueries({queryKey:Jo(h)})])},X(!1),Mt){mi.n=2;break}return j("/brands/".concat(h)),mi.n=1,Mr();case 1:return mi.a(2);case 2:return yl=ln.filter(function(_r){return _r.aiProvider!==m}),yl.length>0?v(yl[0].aiProvider):(pl=qn.filter(function(_r){return _r.id!==p}),pl.length>0?(ml=pl.reduce(function(_r,jd){return new Date(jd.createdAt||0)>new Date(_r.createdAt||0)?jd:_r}),S(ml.id),j("/brands/".concat(h,"/analysis/").concat(ml.id))):(S("latest"),j("/brands/".concat(h)))),mi.n=3,Mr();case 3:return mi.a(2)}},Oe)}));function we(){return ae.apply(this,arguments)}return we}()}}),Ee=ve.mutate,it=ve.isPending,Xt=F.useState(!1),yt=vi(Xt,2),zn=yt[0],wn=yt[1],Te=W==null?void 0:W.find(function(ae){return String(ae.id)===String(h)}),An=(Te==null||(o=Te.settings)===null||o===void 0?void 0:o.enableAutomaticAnalysis)!==!1,st=ue.length>0?ue.map(function(ae){return{value:ae.aiProvider,label:ks(ae.aiProvider)}}):[{value:"",label:"AI platform"}];F.useEffect(function(){if(ue.length>0){var ae=ue.map(function(Oe){return Oe.aiProvider});if(!m||!ae.includes(m)){var we=ue[0].aiProvider;we&&v(we)}}},[ue,m,v]);var hl=Q!=null&&Q.some(function(ae){return String(ae.id)===String(p)})?p:Q&&Q.length>0?Q[0].id:"latest",ja=va(h,{query:{enabled:!!h,select:function(we){var Oe=we.data;return Oe}}}),Un=ja.data,te=ja.isLoading,re=qu(Un==null?void 0:Un.nextScheduledAnalysis),ce=J==null||(l=J.analysis)===null||l===void 0?void 0:l.status,me=F.useState(!1),Me=vi(me,2),lt=Me[0],Hn=Me[1];F.useEffect(function(){var ae,we=J==null||(ae=J.analysis)===null||ae===void 0?void 0:ae.id,Oe=G==null?void 0:G.id;if(!h||!we||!m||!Oe||ce!==yn.completed){Hn(!1);return}var Mt=jo(Oe,h,we,m),ln=window.localStorage.getItem(Mt)!==null;if(!ln&&m==="openai"){var qn=_5(h,we),Mr=window.localStorage.getItem(qn)!==null;Mr&&(window.localStorage.setItem(Mt,"true"),window.localStorage.removeItem(qn),ln=!0)}Hn(!ln)},[h,J==null||(u=J.analysis)===null||u===void 0?void 0:u.id,ce,m,G==null?void 0:G.id]);var Mv=function(we){var Oe;we.preventDefault();var Mt=J==null||(Oe=J.analysis)===null||Oe===void 0?void 0:Oe.id,ln=G==null?void 0:G.id;if(!(!h||!Mt||!m||!ln)){var qn=jo(ln,h,Mt,m);window.localStorage.setItem(qn,"true"),Hn(!1)}},_v=eh(eh({},yn.failed,{alertContent:c.jsx(c.Fragment,{children:"Analysis failed. Try restarting the analysis or contact support if the issue persists."}),alertVariant:"danger"}),yn.cancelled,{alertContent:c.jsx(c.Fragment,{children:"Analysis was cancelled. You can restart the analysis when ready."}),alertVariant:"warning"}),Ad=(d=_v[ce])!==null&&d!==void 0?d:{alertContent:null,alertVariant:"info"},Sd=Ad.alertContent,Rv=Ad.alertVariant,Cd=ce===yn.completed&&P&&["updating","completed"].includes(P.status)&&!P.isUpToDateWithBrandGroups,Dv=(P==null?void 0:P.status)===BS.updating&&Cd===!0,Bv=function(){var we,Oe,Mt=(we=_==null?void 0:_.maxNumberOfActiveBrands)!==null&&we!==void 0?we:0,ln=(Oe=_==null?void 0:_.numberOfActiveBrands)!==null&&Oe!==void 0?Oe:0,qn=Mt-ln,Mr=qn>0;if(!Mr){wn(!0);return}j("/setup")},ka=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;x(!0),we&&localStorage.setItem(rh,"true")},Ea=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;I(!0),we&&localStorage.setItem(ih,"true")};return c.jsxs(c.Fragment,{children:[c.jsx(S0,{isOpen:zn,onClose:function(){return wn(!1)}}),c.jsx(nl,{isOpen:U,onClose:de,onConfirm:function(){h&&p&&P!==null&&P!==void 0&&P.id&&Ee({brandId:h,analysisId:p,scanId:P.id})},isLoading:it,title:"Delete ".concat(ks(m)," analysis?"),description:c.jsxs(c.Fragment,{children:[c.jsxs("p",{children:["This will permanently delete the"," ",c.jsx("b",{children:ks(m)})," analysis for"," ",c.jsx("b",{children:P!=null&&P.finishedAt?_n(new Date(P.finishedAt),"MMMM d, yyyy"):"this date"}),". Analyses from other AI platforms for that date will not be affected."]}),c.jsx("p",{children:"This action cannot be undone."})]}),confirmText:"Yes, delete analysis",cancelText:"No, go back"}),ie.length>0&&!Ve&&c.jsx(S5,{failedScans:ie,brandId:h,analysisId:p,onDismiss:xn}),c.jsx(A.Card,{className:oe("yst-relative yst-overflow-visible",f),children:c.jsxs(A.Card.Content,{className:"yst-mt-0",children:[c.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-flex-wrap yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row xl:yst-items-center",children:[c.jsx("div",{className:"xl:yst-max-w-1/4",children:c.jsxs("div",{className:"yst-flex yst-flex-col yst-gap-2 lg:yst-gap-2 xl:yst-flex-row xl:yst-items-baseline",children:[c.jsx(A.Title,{children:c.jsxs(c.Fragment,{children:[R?c.jsx(A.SkeletonLoader,{className:"yst-inline-block yst-h-8 yst-w-64"}):c.jsxs(c.Fragment,{children:["Hi",Y&&" ".concat(Y),","]})," "]})}),c.jsx("p",{className:"yst-text-sm yst-font-normal yst-text-slate-600",children:"welcome to your brand analysis!"})]})}),c.jsxs("div",{className:"yst-flex yst-flex-row yst-flex-wrap yst-items-center yst-justify-end yst-gap-4 yst-self-end md:yst-self-start",children:[c.jsxs(A.Button,{variant:"primary",onClick:Bv,disabled:Z||H||R,children:[c.jsx(A0,{})," Analyze a different brand"]}),c.jsx("div",{className:"yst-relative yst-flex yst-items-center",children:c.jsxs(A.DropdownMenu,{children:[c.jsx(A.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:"Open brand list options",disabled:Z||H||W&&(W==null?void 0:W.length)<1,children:c.jsx(hA,{})}),c.jsx(A.DropdownMenu.List,{className:"yst-absolute yst-right-0 yst-top-full yst-z-40 yst-mt-2 yst-flex yst-w-64 yst-flex-col yst-justify-start",children:c.jsxs(A.DropdownMenu.ButtonItem,{className:"yst-flex yst-justify-start yst-text-red-600 hover:yst-bg-red-50",onClick:function(){return X(!0)},disabled:!P,children:[c.jsx(zc,{className:"yst-h-4 yst-w-4"}),"Delete analysis"]})})]})})]})]}),c.jsx(li,{}),c.jsxs("form",{className:"yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-start",children:[c.jsxs(Pl,{className:"yst-relative",children:[c.jsx(A.Label,{htmlFor:"brand-name",children:"Brand"}),c.jsx(A.Select,{onChange:function(ae){j("/brands/".concat(ae))},id:"brand-name",value:h||"loading",options:W&&W.length>0?W.map(function(ae){return{value:ae.id,label:ae.name}}):[{value:"loading",label:"Loading..."}],disabled:H||!W||W.length<2||!h})]}),c.jsxs(Pl,{className:"yst-relative",children:[c.jsx(A.Label,{htmlFor:"analysis-date",children:"Analysis date"}),c.jsx(H0,{analyses:Q||[],selectedAnalysisId:hl,onAnalysisSelect:function(ae){j("/brands/".concat(h,"/analysis/").concat(String(ae)))},isLoading:Z,disabled:Z||!Q||Q.length<1,id:"analysis-date"})]}),c.jsxs(Pl,{className:"yst-relative",children:[c.jsx("div",{className:"yst-flex yst-items-center yst-gap-2",children:c.jsx(A.Label,{htmlFor:"ai-tool",children:"AI platform"})}),c.jsx(A.Select,{onChange:function(ae){Object.values(cn).includes(ae)?v(ae):console.error("Invalid AI provider selected:",ae),ae===cn.perplexity&&ka(),ae===cn.gemini&&Ea()},id:"ai-tool",value:m,options:le||Z?[{value:m,label:"Loading..."}]:st,disabled:le||Z||st.length<2,buttonProps:{className:oe("yst-select__button",{"yst-ring-2 yst-ring-primary-500":Ue||ye})}}),ie.length>0&&Ve&&c.jsx(C5,{failedScans:ie,brandId:h,analysisId:p}),c.jsx(Jf,{id:"perplexity-introduction-popover",isVisible:Ue,onClose:function(){return ka(!1)},variant:"info",delay:2e3,children:c.jsxs("div",{className:"yst-space-y-3",children:[c.jsxs("div",{className:"yst-flex yst-items-start yst-gap-2",children:[c.jsx(zu,{className:"yst-mt-0.5 yst-h-4 yst-w-4 yst-flex-shrink-0"}),c.jsxs("div",{className:"yst-flex-1 yst-space-y-1",children:[c.jsx(A.Title,{size:"4",className:"yst-text-sm yst-font-medium",children:"New: See how your brand appears in Perplexity"}),c.jsxs("p",{className:"yst-mb-4 yst-text-sm",children:["Select 'Perplexity' from the"," ",c.jsx("strong",{className:"yst-font-medium",children:"AI platform"})," ","dropdown to see how your brand appears."]})]})]}),c.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[c.jsx(A.Button,{variant:"tertiary",size:"small",onClick:function(){return ka(!0)},children:"Dismiss"}),c.jsx(A.Button,{variant:"primary",size:"small",onClick:function(){var ae=st.find(function(we){return we.value===cn.perplexity});ae&&v(cn.perplexity),ka(!0)},children:"Select Perplexity"})]})]})}),c.jsx(Jf,{id:"gemini-introduction-popover",isVisible:ye,onClose:function(){return Ea(!1)},variant:"info",delay:2e3,children:c.jsxs("div",{className:"yst-space-y-3",children:[c.jsxs("div",{className:"yst-flex yst-items-start yst-gap-2",children:[c.jsx(zu,{className:"yst-mt-0.5 yst-h-4 yst-w-4 yst-flex-shrink-0"}),c.jsxs("div",{className:"yst-flex-1 yst-space-y-1",children:[c.jsx(A.Title,{size:"4",className:"yst-text-sm yst-font-medium",children:"New: See how your brand appears in Gemini"}),c.jsxs("p",{className:"yst-mb-4 yst-text-sm",children:["Select 'Gemini' from the"," ",c.jsx("strong",{className:"yst-font-medium",children:"AI platform"})," ","dropdown to see how your brand appears."]})]})]}),c.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[c.jsx(A.Button,{variant:"tertiary",size:"small",onClick:function(){return Ea(!0)},children:"Dismiss"}),c.jsx(A.Button,{variant:"primary",size:"small",onClick:function(){var ae=st.find(function(we){return we.value===cn.gemini});ae&&v(cn.gemini),Ea(!0)},children:"Select Gemini"})]})]})})]})]}),(Te==null?void 0:Te.setupStatus)!=="pendingQuerySelection"&&c.jsxs(c.Fragment,{children:[c.jsx(li,{}),c.jsx("div",{className:"yst-flex yst-items-center yst-justify-center yst-gap-2 yst-text-sm yst-text-slate-600",children:H||te?c.jsx(A.SkeletonLoader,{className:"yst-h-5 yst-w-64"}):ce===yn.processing||Te!=null&&Te.hasAnalysisInProgress?c.jsxs(c.Fragment,{children:[c.jsx(A.Spinner,{size:"3"}),c.jsx("span",{children:"Your analysis is running now, and we'll email you when it's ready."})]}):An?Un!=null&&Un.nextScheduledAnalysis?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"yst-inline-block yst-h-2 yst-w-2 yst-rounded-full yst-bg-green-500"}),c.jsxs("span",{children:["Your analysis is scheduled for ",re,", and we'll email you when it's ready."]})]}):c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"yst-inline-block yst-h-2 yst-w-2 yst-rounded-full yst-bg-slate-400"}),c.jsx("span",{children:"Next analysis date will appear here soon"})]}):c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"yst-inline-block yst-h-2 yst-w-2 yst-rounded-full yst-bg-slate-400"}),c.jsxs("span",{children:["Automatic analysis is paused ·"," ",c.jsx(A.Link,{as:an,to:"/settings",className:"yst-font-medium yst-text-primary-500 yst-underline",children:"Enable in Settings"})]})]})})]})]})}),c.jsxs("div",{className:"ystaii-alerts yst-space-y-4",children:[lt&&c.jsx(A.Alert,{children:c.jsxs("div",{className:"yst-flex yst-w-full",children:[c.jsx("div",{className:"yst-max-w-xl yst-space-y-4",children:c.jsx("p",{className:"yst-mb-0",children:"Note: These insights are produced using AI and may contain errors."})}),c.jsx("div",{className:"yst-ml-auto",children:c.jsx(A.Link,{onClick:Mv,variant:"default",children:c.jsx($o,{})})})]})}),ce!==yn.completed&&Sd&&c.jsx(A.Alert,{className:"md:yst-col-span-2",variant:Rv,children:Sd}),ce===yn.completed&&ke.some(function(ae){return ae.manualRetryCount>=1})&&c.jsx(A.Alert,{variant:"info",children:function(){var ae=ke.filter(function(Oe){return Oe.manualRetryCount>=1}),we=ae.map(function(Oe){return ks(Oe.aiProvider)});return ae.length===1?c.jsxs(c.Fragment,{children:["Retrying the ",we[0]," scan — this may take a few minutes."]}):c.jsxs(c.Fragment,{children:["Retrying the ",we.join(" and ")," scans — this may take a few minutes."]})}()}),Cd&&c.jsxs(A.Alert,{variant:"warning",children:["Note: This scan is not up to date with your current brand groups.",Dv?c.jsxs(c.Fragment,{children:[" ","We're updating your sentiment analysis to reflect your new brand groups. This may take a few minutes."]}):c.jsx(c.Fragment,{children:" Newer scans will use your newly selected brand groupings."})]})]}),Te&&c.jsx(HC,{brand:Te},Te.id),Te&&c.jsx(e5,{brand:Te},"trial-".concat(Te.id))]})},D5=function(){var e,n,r,i=or(),s=i.data,a=i.isLoading,o=i.isRefetching,l=s==null?void 0:s.mentions;return c.jsx(A.Card,{className:"yst-overflow-visible",children:c.jsxs(A.Card.Content,{className:"yst-space-y-4",children:[c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx(wa,{title:"Mentions",tooltip:"The queries where your brand was mentioned."}),c.jsx(ts,{score:l==null||(e=l.mentionedInNumberOfQueries)===null||e===void 0?void 0:e.value,total:l==null||(n=l.queriesWithMentions)===null||n===void 0?void 0:n.length,suffix:"queries",isLoading:a||o})]}),!a&&l?c.jsx("ul",{children:l==null||(r=l.queriesWithMentions)===null||r===void 0?void 0:r.map(function(u,d){var f=d===0,y=l.queriesWithMentions&&d===l.queriesWithMentions.length-1;return c.jsxs("li",{className:oe("yst-flex yst-flex-row yst-items-center yst-gap-2 yst-border-l yst-border-r yst-border-slate-300 yst-p-4 yst-font-medium yst-text-slate-800",{"yst-rounded-t-lg yst-border-t":f,"yst-rounded-b-lg yst-border-b":y,"yst-border-b":!y}),children:[c.jsx("div",{className:"yst-h-4 yst-w-4",children:u!=null&&u.mentioned?c.jsx(nA,{className:"yst-text-green-500"}):c.jsx(MA,{className:"yst-text-red-500"})}),c.jsx("span",{className:"yst-justify-start",children:u.query}),c.jsx("span",{className:"yst-ml-auto yst-flex yst-items-end",children:u!=null&&u.mentioned?c.jsx(A.Badge,{className:"yst-bg-green-100 yst-text-green-800",children:"Found"}):c.jsx(A.Badge,{className:"yst-bg-red-100 yst-text-red-800",children:"Not found"})})]},u.query)})}):c.jsx(A.SkeletonLoader,{className:"yst-h-56 yst-w-full"})]})})};function Aa(t){return t+.5|0}const Ar=(t,e,n)=>Math.max(Math.min(t,n),e);function Es(t){return Ar(Aa(t*2.55),0,255)}function Er(t){return Ar(Aa(t*255),0,255)}function Kn(t){return Ar(Aa(t/2.55)/100,0,1)}function sh(t){return Ar(Aa(t*100),0,100)}const Jt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Yu=[..."0123456789ABCDEF"],B5=t=>Yu[t&15],F5=t=>Yu[(t&240)>>4]+Yu[t&15],La=t=>(t&240)>>4===(t&15),z5=t=>La(t.r)&&La(t.g)&&La(t.b)&&La(t.a);function U5(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Jt[t[1]]*17,g:255&Jt[t[2]]*17,b:255&Jt[t[3]]*17,a:e===5?Jt[t[4]]*17:255}:(e===7||e===9)&&(n={r:Jt[t[1]]<<4|Jt[t[2]],g:Jt[t[3]]<<4|Jt[t[4]],b:Jt[t[5]]<<4|Jt[t[6]],a:e===9?Jt[t[7]]<<4|Jt[t[8]]:255})),n}const H5=(t,e)=>t<255?e(t):"";function q5(t){var e=z5(t)?B5:F5;return t?"#"+e(t.r)+e(t.g)+e(t.b)+H5(t.a,e):void 0}const W5=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Q0(t,e,n){const r=e*Math.min(n,1-n),i=(s,a=(s+t/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function G5(t,e,n){const r=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function Q5(t,e,n){const r=Q0(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function Y5(t,e,n,r,i){return t===i?(e-n)/r+(e<n?6:0):e===i?(n-t)/r+2:(t-e)/r+4}function Gc(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=(s+a)/2;let l,u,d;return s!==a&&(d=s-a,u=o>.5?d/(2-s-a):d/(s+a),l=Y5(n,r,i,d,s),l=l*60+.5),[l|0,u||0,o]}function Qc(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(Er)}function Yc(t,e,n){return Qc(Q0,t,e,n)}function V5(t,e,n){return Qc(Q5,t,e,n)}function K5(t,e,n){return Qc(G5,t,e,n)}function Y0(t){return(t%360+360)%360}function X5(t){const e=W5.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?Es(+e[5]):Er(+e[5]));const i=Y0(+e[2]),s=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?r=V5(i,s,a):e[1]==="hsv"?r=K5(i,s,a):r=Yc(i,s,a),{r:r[0],g:r[1],b:r[2],a:n}}function J5(t,e){var n=Gc(t);n[0]=Y0(n[0]+e),n=Yc(n),t.r=n[0],t.g=n[1],t.b=n[2]}function Z5(t){if(!t)return;const e=Gc(t),n=e[0],r=sh(e[1]),i=sh(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${Kn(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const ah={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},oh={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function $5(){const t={},e=Object.keys(oh),n=Object.keys(ah);let r,i,s,a,o;for(r=0;r<e.length;r++){for(a=o=e[r],i=0;i<n.length;i++)s=n[i],o=o.replace(s,ah[s]);s=parseInt(oh[a],16),t[o]=[s>>16&255,s>>8&255,s&255]}return t}let Na;function e6(t){Na||(Na=$5(),Na.transparent=[0,0,0,0]);const e=Na[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const t6=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function n6(t){const e=t6.exec(t);let n=255,r,i,s;if(e){if(e[7]!==r){const a=+e[7];n=e[8]?Es(a):Ar(a*255,0,255)}return r=+e[1],i=+e[3],s=+e[5],r=255&(e[2]?Es(r):Ar(r,0,255)),i=255&(e[4]?Es(i):Ar(i,0,255)),s=255&(e[6]?Es(s):Ar(s,0,255)),{r,g:i,b:s,a:n}}}function r6(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Kn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Il=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,bi=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function i6(t,e,n){const r=bi(Kn(t.r)),i=bi(Kn(t.g)),s=bi(Kn(t.b));return{r:Er(Il(r+n*(bi(Kn(e.r))-r))),g:Er(Il(i+n*(bi(Kn(e.g))-i))),b:Er(Il(s+n*(bi(Kn(e.b))-s))),a:t.a+n*(e.a-t.a)}}function Ma(t,e,n){if(t){let r=Gc(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=Yc(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function V0(t,e){return t&&Object.assign(e||{},t)}function lh(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Er(t[3]))):(e=V0(t,{r:0,g:0,b:0,a:1}),e.a=Er(e.a)),e}function s6(t){return t.charAt(0)==="r"?n6(t):X5(t)}class Zs{constructor(e){if(e instanceof Zs)return e;const n=typeof e;let r;n==="object"?r=lh(e):n==="string"&&(r=U5(e)||e6(e)||s6(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=V0(this._rgb);return e&&(e.a=Kn(e.a)),e}set rgb(e){this._rgb=lh(e)}rgbString(){return this._valid?r6(this._rgb):void 0}hexString(){return this._valid?q5(this._rgb):void 0}hslString(){return this._valid?Z5(this._rgb):void 0}mix(e,n){if(e){const r=this.rgb,i=e.rgb;let s;const a=n===s?.5:n,o=2*a-1,l=r.a-i.a,u=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;s=1-u,r.r=255&u*r.r+s*i.r+.5,r.g=255&u*r.g+s*i.g+.5,r.b=255&u*r.b+s*i.b+.5,r.a=a*r.a+(1-a)*i.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=i6(this._rgb,e._rgb,n)),this}clone(){return new Zs(this.rgb)}alpha(e){return this._rgb.a=Er(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Aa(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ma(this._rgb,2,e),this}darken(e){return Ma(this._rgb,2,-e),this}saturate(e){return Ma(this._rgb,1,e),this}desaturate(e){return Ma(this._rgb,1,-e),this}rotate(e){return J5(this._rgb,e),this}}function Wn(){}const a6=(()=>{let t=0;return()=>t++})();function De(t){return t==null}function Ge(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function je(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function rt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function jn(t,e){return rt(t)?t:e}function Se(t,e){return typeof t=="undefined"?e:t}const o6=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Fe(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Re(t,e,n,r){let i,s,a;if(Ge(t))for(s=t.length,i=0;i<s;i++)e.call(n,t[i],i);else if(je(t))for(a=Object.keys(t),s=a.length,i=0;i<s;i++)e.call(n,t[a[i]],a[i])}function ko(t,e){let n,r,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function Eo(t){if(Ge(t))return t.map(Eo);if(je(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let i=0;for(;i<r;++i)e[n[i]]=Eo(t[n[i]]);return e}return t}function K0(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function l6(t,e,n,r){if(!K0(t))return;const i=e[t],s=n[t];je(i)&&je(s)?$s(i,s,r):e[t]=Eo(s)}function $s(t,e,n){const r=Ge(e)?e:[e],i=r.length;if(!je(t))return t;n=n||{};const s=n.merger||l6;let a;for(let o=0;o<i;++o){if(a=r[o],!je(a))continue;const l=Object.keys(a);for(let u=0,d=l.length;u<d;++u)s(l[u],t,a,n)}return t}function Ms(t,e){return $s(t,e,{merger:u6})}function u6(t,e,n){if(!K0(t))return;const r=e[t],i=n[t];je(r)&&je(i)?Ms(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Eo(i))}const uh={"":t=>t,x:t=>t.x,y:t=>t.y};function c6(t){const e=t.split("."),n=[];let r="";for(const i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function d6(t){const e=c6(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function ea(t,e){return(uh[e]||(uh[e]=d6(e)))(t)}function Vc(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Oo=t=>typeof t!="undefined",Tr=t=>typeof t=="function",ch=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function f6(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Je=Math.PI,Kt=2*Je,h6=Kt+Je,To=Number.POSITIVE_INFINITY,y6=Je/180,Yt=Je/2,Rr=Je/4,dh=Je*2/3,X0=Math.log10,Gi=Math.sign;function _s(t,e,n){return Math.abs(t-e)<n}function fh(t){const e=Math.round(t);t=_s(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(X0(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function p6(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function m6(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function ta(t){return!m6(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function g6(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function v6(t,e,n){let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Sr(t){return t*(Je/180)}function Kc(t){return t*(180/Je)}function hh(t){if(!rt(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function b6(t,e){const n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*Je&&(s+=Kt),{angle:s,distance:i}}function Vu(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x6(t,e){return(t-e+h6)%Kt-Je}function Qt(t){return(t%Kt+Kt)%Kt}function J0(t,e,n,r){const i=Qt(t),s=Qt(e),a=Qt(n),o=Qt(s-i),l=Qt(a-i),u=Qt(i-s),d=Qt(i-a);return i===s||i===a||r&&s===a||o>l&&u<d}function nn(t,e,n){return Math.max(e,Math.min(n,t))}function w6(t){return nn(t,-32768,32767)}function Si(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function Xc(t,e,n){n=n||(a=>t[a]<e);let r=t.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const Wr=(t,e,n,r)=>Xc(t,n,r?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),A6=(t,e,n)=>Xc(t,n,r=>t[r][e]>=n);function S6(t,e,n){let r=0,i=t.length;for(;r<i&&t[r]<e;)r++;for(;i>r&&t[i-1]>n;)i--;return r>0||i<t.length?t.slice(r,i):t}const Z0=["push","pop","shift","splice","unshift"];function C6(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Z0.forEach(n=>{const r="_onData"+Vc(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const a=i.apply(this,s);return t._chartjs.listeners.forEach(o=>{typeof o[r]=="function"&&o[r](...s)}),a}})})}function yh(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(e);i!==-1&&r.splice(i,1),!(r.length>0)&&(Z0.forEach(s=>{delete t[s]}),delete t._chartjs)}function j6(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const $0=function(){return typeof window=="undefined"?function(t){return t()}:window.requestAnimationFrame}();function eg(t,e){let n=[],r=!1;return function(...i){n=i,r||(r=!0,$0.call(window,()=>{r=!1,t.apply(e,n)}))}}function k6(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const Jc=t=>t==="start"?"left":t==="end"?"right":"center",ut=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,E6=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function O6(t,e,n){const r=e.length;let i=0,s=r;if(t._sorted){const{iScale:a,vScale:o,_parsed:l}=t,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=a.axis,{min:f,max:y,minDefined:h,maxDefined:p}=a.getUserBounds();if(h){if(i=Math.min(Wr(l,d,f).lo,n?r:Wr(e,d,a.getPixelForValue(f)).lo),u){const m=l.slice(0,i+1).reverse().findIndex(g=>!De(g[o.axis]));i-=Math.max(0,m)}i=nn(i,0,r-1)}if(p){let m=Math.max(Wr(l,a.axis,y,!0).hi+1,n?0:Wr(e,d,a.getPixelForValue(y),!0).hi+1);if(u){const g=l.slice(m-1).findIndex(v=>!De(v[o.axis]));m+=Math.max(0,g)}s=nn(m,i,r)-i}else s=r-i}return{start:i,count:s}}function T6(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;const s=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const _a=t=>t===0||t===1,ph=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Kt/n)),mh=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Kt/n)+1,Rs={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Yt)+1,easeOutSine:t=>Math.sin(t*Yt),easeInOutSine:t=>-.5*(Math.cos(Je*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>_a(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>_a(t)?t:ph(t,.075,.3),easeOutElastic:t=>_a(t)?t:mh(t,.075,.3),easeInOutElastic(t){return _a(t)?t:t<.5?.5*ph(t*2,.1125,.45):.5+.5*mh(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Rs.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Rs.easeInBounce(t*2)*.5:Rs.easeOutBounce(t*2-1)*.5+.5};function Zc(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function gh(t){return Zc(t)?t:new Zs(t)}function Ll(t){return Zc(t)?t:new Zs(t).saturate(.5).darken(.1).hexString()}const P6=["x","y","borderWidth","radius","tension"],I6=["color","borderColor","backgroundColor"];function L6(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:I6},numbers:{type:"number",properties:P6}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function N6(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const vh=new Map;function M6(t,e){e=e||{};const n=t+JSON.stringify(e);let r=vh.get(n);return r||(r=new Intl.NumberFormat(t,e),vh.set(n,r)),r}function tg(t,e,n){return M6(e,n).format(t)}const _6={values(t){return Ge(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let i,s=t;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),s=R6(t,n)}const a=X0(Math.abs(s)),o=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),tg(t,r,l)}};function R6(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var $c={formatters:_6};function D6(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:$c.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const ui=Object.create(null),Ku=Object.create(null);function Ds(t,e){if(!e)return t;const n=e.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];t=t[s]||(t[s]=Object.create(null))}return t}function Nl(t,e,n){return typeof e=="string"?$s(Ds(t,e),n):$s(Ds(t,""),e)}class B6{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Ll(i.backgroundColor),this.hoverBorderColor=(r,i)=>Ll(i.borderColor),this.hoverColor=(r,i)=>Ll(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Nl(this,e,n)}get(e){return Ds(this,e)}describe(e,n){return Nl(Ku,e,n)}override(e,n){return Nl(ui,e,n)}route(e,n,r,i){const s=Ds(this,e),a=Ds(this,r),o="_"+n;Object.defineProperties(s,{[o]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[o],u=a[i];return je(l)?Object.assign({},u,l):Se(l,u)},set(l){this[o]=l}}})}apply(e){e.forEach(n=>n(this))}}var Ye=new B6({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[L6,N6,D6]);function F6(t){return!t||De(t.size)||De(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Po(t,e,n,r,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>r&&(r=s),r}function z6(t,e,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},s=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let a=0;const o=n.length;let l,u,d,f,y;for(l=0;l<o;l++)if(f=n[l],f!=null&&!Ge(f))a=Po(t,i,s,a,f);else if(Ge(f))for(u=0,d=f.length;u<d;u++)y=f[u],y!=null&&!Ge(y)&&(a=Po(t,i,s,a,y));t.restore();const h=s.length/2;if(h>n.length){for(l=0;l<h;l++)delete i[s[l]];s.splice(0,h)}return a}function Dr(t,e,n){const r=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function bh(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Xu(t,e,n,r){ng(t,e,n,r,null)}function ng(t,e,n,r,i){let s,a,o,l,u,d,f,y;const h=e.pointStyle,p=e.rotation,m=e.radius;let g=(p||0)*y6;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(g),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),t.restore();return}if(!(isNaN(m)||m<=0)){switch(t.beginPath(),h){default:i?t.ellipse(n,r,i/2,m,0,0,Kt):t.arc(n,r,m,0,Kt),t.closePath();break;case"triangle":d=i?i/2:m,t.moveTo(n+Math.sin(g)*d,r-Math.cos(g)*m),g+=dh,t.lineTo(n+Math.sin(g)*d,r-Math.cos(g)*m),g+=dh,t.lineTo(n+Math.sin(g)*d,r-Math.cos(g)*m),t.closePath();break;case"rectRounded":u=m*.516,l=m-u,a=Math.cos(g+Rr)*l,f=Math.cos(g+Rr)*(i?i/2-u:l),o=Math.sin(g+Rr)*l,y=Math.sin(g+Rr)*(i?i/2-u:l),t.arc(n-f,r-o,u,g-Je,g-Yt),t.arc(n+y,r-a,u,g-Yt,g),t.arc(n+f,r+o,u,g,g+Yt),t.arc(n-y,r+a,u,g+Yt,g+Je),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,d=i?i/2:l,t.rect(n-d,r-l,2*d,2*l);break}g+=Rr;case"rectRot":f=Math.cos(g)*(i?i/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,y=Math.sin(g)*(i?i/2:m),t.moveTo(n-f,r-o),t.lineTo(n+y,r-a),t.lineTo(n+f,r+o),t.lineTo(n-y,r+a),t.closePath();break;case"crossRot":g+=Rr;case"cross":f=Math.cos(g)*(i?i/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,y=Math.sin(g)*(i?i/2:m),t.moveTo(n-f,r-o),t.lineTo(n+f,r+o),t.moveTo(n+y,r-a),t.lineTo(n-y,r+a);break;case"star":f=Math.cos(g)*(i?i/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,y=Math.sin(g)*(i?i/2:m),t.moveTo(n-f,r-o),t.lineTo(n+f,r+o),t.moveTo(n+y,r-a),t.lineTo(n-y,r+a),g+=Rr,f=Math.cos(g)*(i?i/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,y=Math.sin(g)*(i?i/2:m),t.moveTo(n-f,r-o),t.lineTo(n+f,r+o),t.moveTo(n+y,r-a),t.lineTo(n-y,r+a);break;case"line":a=i?i/2:Math.cos(g)*m,o=Math.sin(g)*m,t.moveTo(n-a,r-o),t.lineTo(n+a,r+o);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(g)*(i?i/2:m),r+Math.sin(g)*m);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function nr(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function rl(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function il(t){t.restore()}function U6(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function H6(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function q6(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),De(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function W6(t,e,n,r,i){if(i.strikethrough||i.underline){const s=t.measureText(r),a=e-s.actualBoundingBoxLeft,o=e+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,u=n+s.actualBoundingBoxDescent,d=i.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(a,d),t.lineTo(o,d),t.stroke()}}function G6(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function ci(t,e,n,r,i,s={}){const a=Ge(e)?e:[e],o=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(t.save(),t.font=i.string,q6(t,s),l=0;l<a.length;++l)u=a[l],s.backdrop&&G6(t,s.backdrop),o&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),De(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(u,n,r,s.maxWidth)),t.fillText(u,n,r,s.maxWidth),W6(t,n,r,u,s),r+=Number(i.lineHeight);t.restore()}function Io(t,e){const{x:n,y:r,w:i,h:s,radius:a}=e;t.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*Je,Je,!0),t.lineTo(n,r+s-a.bottomLeft),t.arc(n+a.bottomLeft,r+s-a.bottomLeft,a.bottomLeft,Je,Yt,!0),t.lineTo(n+i-a.bottomRight,r+s),t.arc(n+i-a.bottomRight,r+s-a.bottomRight,a.bottomRight,Yt,0,!0),t.lineTo(n+i,r+a.topRight),t.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Yt,!0),t.lineTo(n+a.topLeft,r)}const Q6=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Y6=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function V6(t,e){const n=(""+t).match(Q6);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const K6=t=>+t||0;function rg(t,e){const n={},r=je(e),i=r?Object.keys(e):e,s=je(t)?r?a=>Se(t[a],t[e[a]]):a=>t[a]:()=>t;for(const a of i)n[a]=K6(s(a));return n}function X6(t){return rg(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ki(t){return rg(t,["topLeft","topRight","bottomLeft","bottomRight"])}function dt(t){const e=X6(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function $e(t,e){t=t||{},e=e||Ye.font;let n=Se(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=Se(t.style,e.style);r&&!(""+r).match(Y6)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Se(t.family,e.family),lineHeight:V6(Se(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:Se(t.weight,e.weight),string:""};return i.string=F6(i),i}function Ra(t,e,n,r){let i,s,a;for(i=0,s=t.length;i<s;++i)if(a=t[i],a!==void 0&&a!==void 0)return a}function J6(t,e,n){const{min:r,max:i}=t,s=o6(e,(i-r)/2),a=(o,l)=>n&&o===0?0:o+l;return{min:a(r,-Math.abs(s)),max:a(i,s)}}function Lr(t,e){return Object.assign(Object.create(t),e)}function ed(t,e=[""],n,r,i=()=>t[0]){const s=n||t;typeof r=="undefined"&&(r=og("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:r,_getTarget:i,override:o=>ed([o,...t],e,s,r)};return new Proxy(a,{deleteProperty(o,l){return delete o[l],delete o._keys,delete t[0][l],!0},get(o,l){return sg(o,l,()=>sj(l,e,t,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(o,l){return wh(o).includes(l)},ownKeys(o){return wh(o)},set(o,l,u){const d=o._storage||(o._storage=i());return o[l]=d[l]=u,delete o._keys,!0}})}function Qi(t,e,n,r){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:ig(t,r),setContext:s=>Qi(t,s,n,r),override:s=>Qi(t.override(s),e,n,r)};return new Proxy(i,{deleteProperty(s,a){return delete s[a],delete t[a],!0},get(s,a,o){return sg(s,a,()=>$6(s,a,o))},getOwnPropertyDescriptor(s,a){return s._descriptors.allKeys?Reflect.has(t,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,a)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,a){return Reflect.has(t,a)},ownKeys(){return Reflect.ownKeys(t)},set(s,a,o){return t[a]=o,delete s[a],!0}})}function ig(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Tr(n)?n:()=>n,isIndexable:Tr(r)?r:()=>r}}const Z6=(t,e)=>t?t+Vc(e):e,td=(t,e)=>je(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function sg(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const r=n();return t[e]=r,r}function $6(t,e,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:a}=t;let o=r[e];return Tr(o)&&a.isScriptable(e)&&(o=ej(e,o,t,n)),Ge(o)&&o.length&&(o=tj(e,o,t,a.isIndexable)),td(e,o)&&(o=Qi(o,i,s&&s[e],a)),o}function ej(t,e,n,r){const{_proxy:i,_context:s,_subProxy:a,_stack:o}=n;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let l=e(s,a||r);return o.delete(t),td(t,l)&&(l=nd(i._scopes,i,t,l)),l}function tj(t,e,n,r){const{_proxy:i,_context:s,_subProxy:a,_descriptors:o}=n;if(typeof s.index!="undefined"&&r(t))return e[s.index%e.length];if(je(e[0])){const l=e,u=i._scopes.filter(d=>d!==l);e=[];for(const d of l){const f=nd(u,i,t,d);e.push(Qi(f,s,a&&a[t],o))}}return e}function ag(t,e,n){return Tr(t)?t(e,n):t}const nj=(t,e)=>t===!0?e:typeof t=="string"?ea(e,t):void 0;function rj(t,e,n,r,i){for(const s of e){const a=nj(n,s);if(a){t.add(a);const o=ag(a._fallback,n,i);if(typeof o!="undefined"&&o!==n&&o!==r)return o}else if(a===!1&&typeof r!="undefined"&&n!==r)return null}return!1}function nd(t,e,n,r){const i=e._rootScopes,s=ag(e._fallback,n,r),a=[...t,...i],o=new Set;o.add(r);let l=xh(o,a,n,s||n,r);return l===null||typeof s!="undefined"&&s!==n&&(l=xh(o,a,s,l,r),l===null)?!1:ed(Array.from(o),[""],i,s,()=>ij(e,n,r))}function xh(t,e,n,r,i){for(;n;)n=rj(t,e,n,r,i);return n}function ij(t,e,n){const r=t._getTarget();e in r||(r[e]={});const i=r[e];return Ge(i)&&je(n)?n:i||{}}function sj(t,e,n,r){let i;for(const s of e)if(i=og(Z6(s,t),n),typeof i!="undefined")return td(t,i)?nd(n,r,t,i):i}function og(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r!="undefined")return r}}function wh(t){let e=t._keys;return e||(e=t._keys=aj(t._scopes)),e}function aj(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(r);return Array.from(e)}function oj(t,e,n,r){const{iScale:i}=t,{key:s="r"}=this._parsing,a=new Array(r);let o,l,u,d;for(o=0,l=r;o<l;++o)u=o+n,d=e[u],a[o]={r:i.parse(ea(d,s),u)};return a}const lj=Number.EPSILON||1e-14,Yi=(t,e)=>e<t.length&&!t[e].skip&&t[e],lg=t=>t==="x"?"y":"x";function uj(t,e,n,r){const i=t.skip?e:t,s=e,a=n.skip?e:n,o=Vu(s,i),l=Vu(a,s);let u=o/(o+l),d=l/(o+l);u=isNaN(u)?0:u,d=isNaN(d)?0:d;const f=r*u,y=r*d;return{previous:{x:s.x-f*(a.x-i.x),y:s.y-f*(a.y-i.y)},next:{x:s.x+y*(a.x-i.x),y:s.y+y*(a.y-i.y)}}}function cj(t,e,n){const r=t.length;let i,s,a,o,l,u=Yi(t,0);for(let d=0;d<r-1;++d)if(l=u,u=Yi(t,d+1),!(!l||!u)){if(_s(e[d],0,lj)){n[d]=n[d+1]=0;continue}i=n[d]/e[d],s=n[d+1]/e[d],o=Math.pow(i,2)+Math.pow(s,2),!(o<=9)&&(a=3/Math.sqrt(o),n[d]=i*a*e[d],n[d+1]=s*a*e[d])}}function dj(t,e,n="x"){const r=lg(n),i=t.length;let s,a,o,l=Yi(t,0);for(let u=0;u<i;++u){if(a=o,o=l,l=Yi(t,u+1),!o)continue;const d=o[n],f=o[r];a&&(s=(d-a[n])/3,o[`cp1${n}`]=d-s,o[`cp1${r}`]=f-s*e[u]),l&&(s=(l[n]-d)/3,o[`cp2${n}`]=d+s,o[`cp2${r}`]=f+s*e[u])}}function fj(t,e="x"){const n=lg(e),r=t.length,i=Array(r).fill(0),s=Array(r);let a,o,l,u=Yi(t,0);for(a=0;a<r;++a)if(o=l,l=u,u=Yi(t,a+1),!!l){if(u){const d=u[e]-l[e];i[a]=d!==0?(u[n]-l[n])/d:0}s[a]=o?u?Gi(i[a-1])!==Gi(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}cj(t,i,s),dj(t,s,e)}function Da(t,e,n){return Math.max(Math.min(t,n),e)}function hj(t,e){let n,r,i,s,a,o=nr(t[0],e);for(n=0,r=t.length;n<r;++n)a=s,s=o,o=n<r-1&&nr(t[n+1],e),s&&(i=t[n],a&&(i.cp1x=Da(i.cp1x,e.left,e.right),i.cp1y=Da(i.cp1y,e.top,e.bottom)),o&&(i.cp2x=Da(i.cp2x,e.left,e.right),i.cp2y=Da(i.cp2y,e.top,e.bottom)))}function yj(t,e,n,r,i){let s,a,o,l;if(e.spanGaps&&(t=t.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")fj(t,i);else{let u=r?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)o=t[s],l=uj(u,o,t[Math.min(s+1,a-(r?0:1))%a],e.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,u=o}e.capBezierPoints&&hj(t,n)}function rd(){return typeof window!="undefined"&&typeof document!="undefined"}function id(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Lo(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}const sl=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function pj(t,e){return sl(t).getPropertyValue(e)}const mj=["top","right","bottom","left"];function ri(t,e,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=mj[i];r[s]=parseFloat(t[e+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const gj=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function vj(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=r;let a=!1,o,l;if(gj(i,s,t.target))o=i,l=s;else{const u=e.getBoundingClientRect();o=r.clientX-u.left,l=r.clientY-u.top,a=!0}return{x:o,y:l,box:a}}function zr(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,i=sl(n),s=i.boxSizing==="border-box",a=ri(i,"padding"),o=ri(i,"border","width"),{x:l,y:u,box:d}=vj(t,n),f=a.left+(d&&o.left),y=a.top+(d&&o.top);let{width:h,height:p}=e;return s&&(h-=a.width+o.width,p-=a.height+o.height),{x:Math.round((l-f)/h*n.width/r),y:Math.round((u-y)/p*n.height/r)}}function bj(t,e,n){let r,i;if(e===void 0||n===void 0){const s=t&&id(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const a=s.getBoundingClientRect(),o=sl(s),l=ri(o,"border","width"),u=ri(o,"padding");e=a.width-u.width-l.width,n=a.height-u.height-l.height,r=Lo(o.maxWidth,s,"clientWidth"),i=Lo(o.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:r||To,maxHeight:i||To}}const Cr=t=>Math.round(t*10)/10;function xj(t,e,n,r){const i=sl(t),s=ri(i,"margin"),a=Lo(i.maxWidth,t,"clientWidth")||To,o=Lo(i.maxHeight,t,"clientHeight")||To,l=bj(t,e,n);let{width:u,height:d}=l;if(i.boxSizing==="content-box"){const y=ri(i,"border","width"),h=ri(i,"padding");u-=h.width+y.width,d-=h.height+y.height}return u=Math.max(0,u-s.width),d=Math.max(0,r?u/r:d-s.height),u=Cr(Math.min(u,a,l.maxWidth)),d=Cr(Math.min(d,o,l.maxHeight)),u&&!d&&(d=Cr(u/2)),(e!==void 0||n!==void 0)&&r&&l.height&&d>l.height&&(d=l.height,u=Cr(Math.floor(d*r))),{width:u,height:d}}function Ah(t,e,n){const r=e||1,i=Cr(t.height*r),s=Cr(t.width*r);t.height=Cr(t.height),t.width=Cr(t.width);const a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||a.height!==i||a.width!==s?(t.currentDevicePixelRatio=r,a.height=i,a.width=s,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const wj=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};rd()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function Sh(t,e){const n=pj(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Ur(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Aj(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function Sj(t,e,n,r){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=Ur(t,i,n),o=Ur(i,s,n),l=Ur(s,e,n),u=Ur(a,o,n),d=Ur(o,l,n);return Ur(u,d,n)}const Cj=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},jj=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Ei(t,e,n){return t?Cj(e,n):jj()}function ug(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function cg(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function dg(t){return t==="angle"?{between:J0,compare:x6,normalize:Qt}:{between:Si,compare:(e,n)=>e-n,normalize:e=>e}}function Ch({start:t,end:e,count:n,loop:r,style:i}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:i}}function kj(t,e,n){const{property:r,start:i,end:s}=n,{between:a,normalize:o}=dg(r),l=e.length;let{start:u,end:d,loop:f}=t,y,h;if(f){for(u+=l,d+=l,y=0,h=l;y<h&&a(o(e[u%l][r]),i,s);++y)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:f,style:t.style}}function fg(t,e,n){if(!n)return[t];const{property:r,start:i,end:s}=n,a=e.length,{compare:o,between:l,normalize:u}=dg(r),{start:d,end:f,loop:y,style:h}=kj(t,e,n),p=[];let m=!1,g=null,v,S,k;const j=()=>l(i,k,v)&&o(i,k)!==0,C=()=>o(s,v)===0||l(s,k,v),b=()=>m||j(),w=()=>!m||C();for(let x=d,L=d;x<=f;++x)S=e[x%a],!S.skip&&(v=u(S[r]),v!==k&&(m=l(v,i,s),g===null&&b()&&(g=o(v,i)===0?x:L),g!==null&&w()&&(p.push(Ch({start:g,end:x,loop:y,count:a,style:h})),g=null),L=x,k=v));return g!==null&&p.push(Ch({start:g,end:f,loop:y,count:a,style:h})),p}function hg(t,e){const n=[],r=t.segments;for(let i=0;i<r.length;i++){const s=fg(r[i],t.points,e);s.length&&n.push(...s)}return n}function Ej(t,e,n,r){let i=0,s=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function Oj(t,e,n,r){const i=t.length,s=[];let a=e,o=t[e],l;for(l=e+1;l<=n;++l){const u=t[l%i];u.skip||u.stop?o.skip||(r=!1,s.push({start:e%i,end:(l-1)%i,loop:r}),e=a=u.stop?l:null):(a=l,o.skip&&(e=l)),o=u}return a!==null&&s.push({start:e%i,end:a%i,loop:r}),s}function Tj(t,e){const n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:a,end:o}=Ej(n,i,s,r);if(r===!0)return jh(t,[{start:a,end:o,loop:s}],n,e);const l=o<a?o+i:o,u=!!t._fullLoop&&a===0&&o===i-1;return jh(t,Oj(n,a,l,u),n,e)}function jh(t,e,n,r){return!r||!r.setContext||!n?e:Pj(t,e,n,r)}function Pj(t,e,n,r){const i=t._chart.getContext(),s=kh(t.options),{_datasetIndex:a,options:{spanGaps:o}}=t,l=n.length,u=[];let d=s,f=e[0].start,y=f;function h(p,m,g,v){const S=o?-1:1;if(p!==m){for(p+=l;n[p%l].skip;)p-=S;for(;n[m%l].skip;)m+=S;p%l!==m%l&&(u.push({start:p%l,end:m%l,loop:g,style:v}),d=v,f=m%l)}}for(const p of e){f=o?f:p.start;let m=n[f%l],g;for(y=f+1;y<=p.end;y++){const v=n[y%l];g=kh(r.setContext(Lr(i,{type:"segment",p0:m,p1:v,p0DataIndex:(y-1)%l,p1DataIndex:y%l,datasetIndex:a}))),Ij(g,d)&&h(f,y-1,p.loop,d),m=v,d=g}f<y-1&&h(f,y-1,p.loop,d)}return u}function kh(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Ij(t,e){if(!e)return!1;const n=[],r=function(i,s){return Zc(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,r)!==JSON.stringify(e,r)}function Ba(t,e,n){return t.options.clip?t[n]:e[n]}function Lj(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:Ba(n,e,"left"),right:Ba(n,e,"right"),top:Ba(r,e,"top"),bottom:Ba(r,e,"bottom")}:e}function yg(t,e){const n=e._clip;if(n.disabled)return!1;const r=Lj(e,t.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:r.bottom+(n.bottom===!0?0:n.bottom)}}class Nj{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,i){const s=n.listeners[i],a=n.duration;s.forEach(o=>o({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=$0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let a=s.length-1,o=!1,l;for(;a>=0;--a)l=s[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),o=!0):(s[a]=s[s.length-1],s.pop());o&&(i.draw(),this._notify(i,r,e,"progress")),s.length||(r.running=!1,this._notify(i,r,e,"complete"),r.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Yn=new Nj;const Eh="transparent",Mj={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=gh(t||Eh),i=r.valid&&gh(e||Eh);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class _j{constructor(e,n,r,i){const s=n[r];i=Ra([e.to,i,s,e.from]);const a=Ra([e.from,s,i]);this._active=!0,this._fn=e.fn||Mj[e.type||typeof a],this._easing=Rs[e.easing]||Rs.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,a=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Ra([e.to,n,i,e.from]),this._from=Ra([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,i=this._prop,s=this._from,a=this._loop,o=this._to;let l;if(this._active=s!==o&&(a||n<r),!this._active){this._target[i]=o,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,o,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class pg{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!je(e))return;const n=Object.keys(Ye.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!je(s))return;const a={};for(const o of n)a[o]=s[o];(Ge(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!r.has(o))&&r.set(o,a)})})}_animateOptions(e,n){const r=n.options,i=Dj(e,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&Rj(e.options.$animations,r).then(()=>{e.options=r},()=>{}),s}_createAnimations(e,n){const r=this._properties,i=[],s=e.$animations||(e.$animations={}),a=Object.keys(n),o=Date.now();let l;for(l=a.length-1;l>=0;--l){const u=a[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,n));continue}const d=n[u];let f=s[u];const y=r.get(u);if(f)if(y&&f.active()){f.update(y,d,o);continue}else f.cancel();if(!y||!y.duration){e[u]=d;continue}s[u]=f=new _j(y,e,u,d),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Yn.add(this._chart,r),!0}}function Rj(t,e){const n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){const s=t[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function Dj(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Oh(t,e){const n=t&&t.options||{},r=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:r?s:i,end:r?i:s}}function Bj(t,e,n){if(n===!1)return!1;const r=Oh(t,n),i=Oh(e,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function Fj(t){let e,n,r,i;return je(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:t===!1}}function mg(t,e){const n=[],r=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function Th(t,e,n,r={}){const i=t.keys,s=r.mode==="single";let a,o,l,u;if(e===null)return;let d=!1;for(a=0,o=i.length;a<o;++a){if(l=+i[a],l===n){if(d=!0,r.all)continue;break}u=t.values[l],rt(u)&&(s||e===0||Gi(e)===Gi(u))&&(e+=u)}return!d&&!r.all?0:e}function zj(t,e){const{iScale:n,vScale:r}=e,i=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",a=Object.keys(t),o=new Array(a.length);let l,u,d;for(l=0,u=a.length;l<u;++l)d=a[l],o[l]={[i]:d,[s]:t[d]};return o}function Ml(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Uj(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Hj(t){const{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function qj(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function Ph(t,e,n,r){for(const i of e.getMatchingVisibleMetas(r).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Ih(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:a,index:o}=r,l=s.axis,u=a.axis,d=Uj(s,a,r),f=e.length;let y;for(let h=0;h<f;++h){const p=e[h],{[l]:m,[u]:g}=p,v=p._stacks||(p._stacks={});y=v[u]=qj(i,d,m),y[o]=g,y._top=Ph(y,a,!0,r.type),y._bottom=Ph(y,a,!1,r.type);const S=y._visualValues||(y._visualValues={});S[o]=g}}function _l(t,e){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function Wj(t,e){return Lr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Gj(t,e,n){return Lr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function hs(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Rl=t=>t==="reset"||t==="none",Lh=(t,e)=>e?t:Object.assign({},t),Qj=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:mg(n,!0),values:null};class Oi{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Ml(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&hs(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(f,y,h,p)=>f==="x"?y:f==="r"?p:h,s=n.xAxisID=Se(r.xAxisID,_l(e,"x")),a=n.yAxisID=Se(r.yAxisID,_l(e,"y")),o=n.rAxisID=Se(r.rAxisID,_l(e,"r")),l=n.indexAxis,u=n.iAxisID=i(l,s,a,o),d=n.vAxisID=i(l,a,s,o);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&yh(this._data,this),e._stacked&&hs(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(je(n)){const i=this._cachedMeta;this._data=zj(n,i)}else if(r!==n){if(r){yh(r,this);const i=this._cachedMeta;hs(i),i._parsed=[]}n&&Object.isExtensible(n)&&C6(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Ml(n.vScale,n),n.stack!==r.stack&&(i=!0,hs(n),n.stack=r.stack),this._resyncElements(e),(i||s!==n._stacked)&&(Ih(this,n._parsed),n._stacked=Ml(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:a}=r,o=s.axis;let l=e===0&&n===i.length?!0:r._sorted,u=e>0&&r._parsed[e-1],d,f,y;if(this._parsing===!1)r._parsed=i,r._sorted=!0,y=i;else{Ge(i[e])?y=this.parseArrayData(r,i,e,n):je(i[e])?y=this.parseObjectData(r,i,e,n):y=this.parsePrimitiveData(r,i,e,n);const h=()=>f[o]===null||u&&f[o]<u[o];for(d=0;d<n;++d)r._parsed[d+e]=f=y[d],l&&(h()&&(l=!1),u=f);r._sorted=l}a&&Ih(this,y)}parsePrimitiveData(e,n,r,i){const{iScale:s,vScale:a}=e,o=s.axis,l=a.axis,u=s.getLabels(),d=s===a,f=new Array(i);let y,h,p;for(y=0,h=i;y<h;++y)p=y+r,f[y]={[o]:d||s.parse(u[p],p),[l]:a.parse(n[p],p)};return f}parseArrayData(e,n,r,i){const{xScale:s,yScale:a}=e,o=new Array(i);let l,u,d,f;for(l=0,u=i;l<u;++l)d=l+r,f=n[d],o[l]={x:s.parse(f[0],d),y:a.parse(f[1],d)};return o}parseObjectData(e,n,r,i){const{xScale:s,yScale:a}=e,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let d,f,y,h;for(d=0,f=i;d<f;++d)y=d+r,h=n[y],u[d]={x:s.parse(ea(h,o),y),y:a.parse(ea(h,l),y)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){const i=this.chart,s=this._cachedMeta,a=n[e.axis],o={keys:mg(i,!0),values:n._stacks[e.axis]._visualValues};return Th(o,a,s.index,{mode:r})}updateRangeFromParsed(e,n,r,i){const s=r[n.axis];let a=s===null?NaN:s;const o=i&&r._stacks[n.axis];i&&o&&(i.values=o,a=Th(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&e===r.iScale,a=i.length,o=this._getOtherScale(e),l=Qj(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:f}=Hj(o);let y,h;function p(){h=i[y];const m=h[o.axis];return!rt(h[e.axis])||d>m||f<m}for(y=0;y<a&&!(!p()&&(this.updateRangeFromParsed(u,e,h,l),s));++y);if(s){for(y=a-1;y>=0;--y)if(!p()){this.updateRangeFromParsed(u,e,h,l);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let i,s,a;for(i=0,s=n.length;i<s;++i)a=n[i][e.axis],rt(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=Fj(Se(this.options.clip,Bj(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,a=[],o=this._drawStart||0,l=this._drawCount||i.length-o,u=this.options.drawActiveElementsOnTop;let d;for(r.dataset&&r.dataset.draw(e,s,o,l),d=o;d<o+l;++d){const f=i[d];f.hidden||(f.active&&u?a.push(f):f.draw(e,s))}for(d=0;d<a.length;++d)a[d].draw(e,s)}getStyle(e,n){const r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){const i=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];s=a.$context||(a.$context=Gj(this.getContext(),e,a)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=Wj(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){const i=n==="active",s=this._cachedDataOpts,a=e+"-"+n,o=s[a],l=this.enableOptionSharing&&Oo(r);if(o)return Lh(o,l);const u=this.chart.config,d=u.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],y=u.getOptionScopes(this.getDataset(),d),h=Object.keys(Ye.elements[e]),p=()=>this.getContext(r,i,n),m=u.resolveNamedOptions(y,h,p,f);return m.$shared&&(m.$shared=l,s[a]=Object.freeze(Lh(m,l))),m}_resolveAnimations(e,n,r){const i=this.chart,s=this._cachedDataOpts,a=`animation-${n}`,o=s[a];if(o)return o;let l;if(i.options.animation!==!1){const d=this.chart.config,f=d.datasetAnimationScopeKeys(this._type,n),y=d.getOptionScopes(this.getDataset(),f);l=d.createResolver(y,this.getContext(e,r,n))}const u=new pg(i,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Rl(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(r),a=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:a}}updateElement(e,n,r,i){Rl(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r)}updateSharedOptions(e,n,r){e&&!Rl(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[o,l,u]of this._syncList)this[o](l,u);this._syncList=[];const i=r.length,s=n.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,r=!0){const i=this._cachedMeta,s=i.data,a=e+n;let o;const l=u=>{for(u.length+=n,o=u.length-1;o>=a;o--)u[o]=u[o-n]};for(l(s),o=e;o<a;++o)s[o]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(e,n),r&&this.updateElements(s,e,n,"reset")}updateElements(e,n,r,i){}_removeElements(e,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(e,n);r._stacked&&hs(r,i)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,r,i]=e;this[n](r,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}fe(Oi,"defaults",{}),fe(Oi,"datasetElementType",null),fe(Oi,"dataElementType",null);class lo extends Oi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,a=this.chart._animationsDisabled;let{start:o,count:l}=O6(n,i,a);this._drawStart=o,this._drawCount=l,T6(n)&&(o=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:u},e),this.updateElements(i,o,l,e)}updateElements(e,n,r,i){const s=i==="reset",{iScale:a,vScale:o,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i),y=a.axis,h=o.axis,{spanGaps:p,segment:m}=this.options,g=ta(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||s||i==="none",S=n+r,k=e.length;let j=n>0&&this.getParsed(n-1);for(let C=0;C<k;++C){const b=e[C],w=v?b:{};if(C<n||C>=S){w.skip=!0;continue}const x=this.getParsed(C),L=De(x[h]),D=w[y]=a.getPixelForValue(x[y],C),M=w[h]=s||L?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,x,l):x[h],C);w.skip=isNaN(D)||isNaN(M)||L,w.stop=C>0&&Math.abs(x[y]-j[y])>g,m&&(w.parsed=x,w.raw=u.data[C]),f&&(w.options=d||this.resolveDataElementOptions(C,b.active?"active":i)),v||this.updateElement(b,C,w,i),j=x}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}fe(lo,"id","line"),fe(lo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),fe(lo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class uo extends Oi{getLabelAndValue(e){const n=this._cachedMeta.vScale,r=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,i){return oj.bind(this)(e,n,r,i)}update(e){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const o={_loop:!0,_fullLoop:s.length===i.length,options:a};this.updateElement(r,void 0,o,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,r,i){const s=this._cachedMeta.rScale,a=i==="reset";for(let o=n;o<n+r;o++){const l=e[o],u=this.resolveDataElementOptions(o,l.active?"active":i),d=s.getPointPositionForValue(o,this.getParsed(o).r),f=a?s.xCenter:d.x,y=a?s.yCenter:d.y,h={x:f,y,angle:d.angle,skip:isNaN(f)||isNaN(y),options:u};this.updateElement(l,o,h,i)}}}fe(uo,"id","radar"),fe(uo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),fe(uo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});function Br(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sd{constructor(e){fe(this,"options");this.options=e||{}}static override(e){Object.assign(sd.prototype,e)}init(){}formats(){return Br()}parse(){return Br()}format(){return Br()}add(){return Br()}diff(){return Br()}startOf(){return Br()}endOf(){return Br()}}var Yj={_date:sd};function Vj(t,e,n,r){const{controller:i,data:s,_sorted:a}=t,o=i._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(o&&e===o.axis&&e!=="r"&&a&&s.length){const u=o._reversePixels?A6:Wr;if(r){if(i._sharedOptions){const d=s[0],f=typeof d.getRange=="function"&&d.getRange(e);if(f){const y=u(s,e,n-f),h=u(s,e,n+f);return{lo:y.lo,hi:h.hi}}}}else{const d=u(s,e,n);if(l){const{vScale:f}=i._cachedMeta,{_parsed:y}=t,h=y.slice(0,d.lo+1).reverse().findIndex(m=>!De(m[f.axis]));d.lo-=Math.max(0,h);const p=y.slice(d.hi).findIndex(m=>!De(m[f.axis]));d.hi+=Math.max(0,p)}return d}}return{lo:0,hi:s.length-1}}function al(t,e,n,r,i){const s=t.getSortedVisibleDatasetMetas(),a=n[e];for(let o=0,l=s.length;o<l;++o){const{index:u,data:d}=s[o],{lo:f,hi:y}=Vj(s[o],e,a,i);for(let h=f;h<=y;++h){const p=d[h];p.skip||r(p,u,h)}}}function Kj(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,i){const s=e?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}function Dl(t,e,n,r,i){const s=[];return!i&&!t.isPointInArea(e)||al(t,n,e,function(o,l,u){!i&&!nr(o,t.chartArea,0)||o.inRange(e.x,e.y,r)&&s.push({element:o,datasetIndex:l,index:u})},!0),s}function Xj(t,e,n,r){let i=[];function s(a,o,l){const{startAngle:u,endAngle:d}=a.getProps(["startAngle","endAngle"],r),{angle:f}=b6(a,{x:e.x,y:e.y});J0(f,u,d)&&i.push({element:a,datasetIndex:o,index:l})}return al(t,n,e,s),i}function Jj(t,e,n,r,i,s){let a=[];const o=Kj(n);let l=Number.POSITIVE_INFINITY;function u(d,f,y){const h=d.inRange(e.x,e.y,i);if(r&&!h)return;const p=d.getCenterPoint(i);if(!(!!s||t.isPointInArea(p))&&!h)return;const g=o(e,p);g<l?(a=[{element:d,datasetIndex:f,index:y}],l=g):g===l&&a.push({element:d,datasetIndex:f,index:y})}return al(t,n,e,u),a}function Bl(t,e,n,r,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!r?Xj(t,e,n,i):Jj(t,e,n,r,i,s)}function Nh(t,e,n,r,i){const s=[],a=n==="x"?"inXRange":"inYRange";let o=!1;return al(t,n,e,(l,u,d)=>{l[a]&&l[a](e[n],i)&&(s.push({element:l,datasetIndex:u,index:d}),o=o||l.inRange(e.x,e.y,i))}),r&&!o?[]:s}var Zj={modes:{index(t,e,n,r){const i=zr(e,t),s=n.axis||"x",a=n.includeInvisible||!1,o=n.intersect?Dl(t,i,s,r,a):Bl(t,i,s,!1,r,a),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const d=o[0].index,f=u.data[d];f&&!f.skip&&l.push({element:f,datasetIndex:u.index,index:d})}),l):[]},dataset(t,e,n,r){const i=zr(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;let o=n.intersect?Dl(t,i,s,r,a):Bl(t,i,s,!1,r,a);if(o.length>0){const l=o[0].datasetIndex,u=t.getDatasetMeta(l).data;o=[];for(let d=0;d<u.length;++d)o.push({element:u[d],datasetIndex:l,index:d})}return o},point(t,e,n,r){const i=zr(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return Dl(t,i,s,r,a)},nearest(t,e,n,r){const i=zr(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return Bl(t,i,s,n.intersect,r,a)},x(t,e,n,r){const i=zr(e,t);return Nh(t,i,"x",n.intersect,r)},y(t,e,n,r){const i=zr(e,t);return Nh(t,i,"y",n.intersect,r)}}};const gg=["left","top","right","bottom"];function ys(t,e){return t.filter(n=>n.pos===e)}function Mh(t,e){return t.filter(n=>gg.indexOf(n.pos)===-1&&n.box.axis===e)}function ps(t,e){return t.sort((n,r)=>{const i=e?r:n,s=e?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function $j(t){const e=[];let n,r,i,s,a,o;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],{position:s,options:{stack:a,stackWeight:o=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&s+a,stackWeight:o});return e}function e4(t){const e={};for(const n of t){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!gg.includes(i))continue;const a=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return e}function t4(t,e){const n=e4(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e;let s,a,o;for(s=0,a=t.length;s<a;++s){o=t[s];const{fullSize:l}=o.box,u=n[o.stack],d=u&&o.stackWeight/u.weight;o.horizontal?(o.width=d?d*r:l&&e.availableWidth,o.height=i):(o.width=r,o.height=d?d*i:l&&e.availableHeight)}return n}function n4(t){const e=$j(t),n=ps(e.filter(u=>u.box.fullSize),!0),r=ps(ys(e,"left"),!0),i=ps(ys(e,"right")),s=ps(ys(e,"top"),!0),a=ps(ys(e,"bottom")),o=Mh(e,"x"),l=Mh(e,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(a).concat(o),chartArea:ys(e,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(a).concat(o)}}function _h(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function vg(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function r4(t,e,n,r){const{pos:i,box:s}=n,a=t.maxPadding;if(!je(i)){n.size&&(t[i]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&vg(a,s.getPadding());const o=Math.max(0,e.outerWidth-_h(a,t,"left","right")),l=Math.max(0,e.outerHeight-_h(a,t,"top","bottom")),u=o!==t.w,d=l!==t.h;return t.w=o,t.h=l,n.horizontal?{same:u,other:d}:{same:d,other:u}}function i4(t){const e=t.maxPadding;function n(r){const i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function s4(t,e){const n=e.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{s[a]=Math.max(e[a],n[a])}),s}return r(t?["left","right"]:["top","bottom"])}function Os(t,e,n,r){const i=[];let s,a,o,l,u,d;for(s=0,a=t.length,u=0;s<a;++s){o=t[s],l=o.box,l.update(o.width||e.w,o.height||e.h,s4(o.horizontal,e));const{same:f,other:y}=r4(e,n,o,r);u|=f&&i.length,d=d||y,l.fullSize||i.push(o)}return u&&Os(i,e,n,r)||d}function Fa(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i}function Rh(t,e,n,r){const i=n.padding;let{x:s,y:a}=e;for(const o of t){const l=o.box,u=r[o.stack]||{placed:0,weight:1},d=o.stackWeight/u.weight||1;if(o.horizontal){const f=e.w*d,y=u.size||l.height;Oo(u.start)&&(a=u.start),l.fullSize?Fa(l,i.left,a,n.outerWidth-i.right-i.left,y):Fa(l,e.left+u.placed,a,f,y),u.start=a,u.placed+=f,a=l.bottom}else{const f=e.h*d,y=u.size||l.width;Oo(u.start)&&(s=u.start),l.fullSize?Fa(l,s,i.top,y,n.outerHeight-i.bottom-i.top):Fa(l,s,e.top+u.placed,y,f),u.start=s,u.placed+=f,s=l.right}}e.x=s,e.y=a}var rn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const i=dt(t.options.layout.padding),s=Math.max(e-i.width,0),a=Math.max(n-i.height,0),o=n4(t.boxes),l=o.vertical,u=o.horizontal;Re(t.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const d=l.reduce((m,g)=>g.box.options&&g.box.options.display===!1?m:m+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/d,hBoxMaxHeight:a/2}),y=Object.assign({},i);vg(y,dt(r));const h=Object.assign({maxPadding:y,w:s,h:a,x:i.left,y:i.top},i),p=t4(l.concat(u),f);Os(o.fullSize,h,f,p),Os(l,h,f,p),Os(u,h,f,p)&&Os(l,h,f,p),i4(h),Rh(o.leftAndTop,h,f,p),h.x+=h.w,h.y+=h.h,Rh(o.rightAndBottom,h,f,p),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Re(o.chartArea,m=>{const g=m.box;Object.assign(g,t.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class bg{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return!0}updateConfig(e){}}class a4 extends bg{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const co="$chartjs",o4={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Dh=t=>t===null||t==="";function l4(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[co]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Dh(i)){const s=Sh(t,"width");s!==void 0&&(t.width=s)}if(Dh(r))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Sh(t,"height");s!==void 0&&(t.height=s)}return t}const xg=wj?{passive:!0}:!1;function u4(t,e,n){t&&t.addEventListener(e,n,xg)}function c4(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,xg)}function d4(t,e){const n=o4[t.type]||t.type,{x:r,y:i}=zr(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function No(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function f4(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const o of s)a=a||No(o.addedNodes,r),a=a&&!No(o.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function h4(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const o of s)a=a||No(o.removedNodes,r),a=a&&!No(o.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const na=new Map;let Bh=0;function wg(){const t=window.devicePixelRatio;t!==Bh&&(Bh=t,na.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function y4(t,e){na.size||window.addEventListener("resize",wg),na.set(t,e)}function p4(t){na.delete(t),na.size||window.removeEventListener("resize",wg)}function m4(t,e,n){const r=t.canvas,i=r&&id(r);if(!i)return;const s=eg((o,l)=>{const u=i.clientWidth;n(o,l),u<i.clientWidth&&n()},window),a=new ResizeObserver(o=>{const l=o[0],u=l.contentRect.width,d=l.contentRect.height;u===0&&d===0||s(u,d)});return a.observe(i),y4(t,s),a}function Fl(t,e,n){n&&n.disconnect(),e==="resize"&&p4(t)}function g4(t,e,n){const r=t.canvas,i=eg(s=>{t.ctx!==null&&n(d4(s,t))},t);return u4(r,e,i),i}class v4 extends bg{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(l4(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[co])return!1;const r=n[co].initial;["height","width"].forEach(s=>{const a=r[s];De(a)?n.removeAttribute(s):n.setAttribute(s,a)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[co],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),a={attach:f4,detach:h4,resize:m4}[n]||g4;i[n]=a(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),i=r[n];if(!i)return;({attach:Fl,detach:Fl,resize:Fl}[n]||c4)(e,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return xj(e,n,r,i)}isAttached(e){const n=e&&id(e);return!!(n&&n.isConnected)}}function b4(t){return!rd()||typeof OffscreenCanvas!="undefined"&&t instanceof OffscreenCanvas?a4:v4}class ar{constructor(){fe(this,"x");fe(this,"y");fe(this,"active",!1);fe(this,"options");fe(this,"$animations")}tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return ta(this.x)&&ta(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const i={};return e.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}}fe(ar,"defaults",{}),fe(ar,"defaultRoutes");function x4(t,e){const n=t.options.ticks,r=w4(t),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?S4(e):[],a=s.length,o=s[0],l=s[a-1],u=[];if(a>i)return C4(e,u,s,a/i),u;const d=A4(s,e,i);if(a>0){let f,y;const h=a>1?Math.round((l-o)/(a-1)):null;for(za(e,u,d,De(h)?0:o-h,o),f=0,y=a-1;f<y;f++)za(e,u,d,s[f],s[f+1]);return za(e,u,d,l,De(h)?e.length:l+h),u}return za(e,u,d),u}function w4(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}function A4(t,e,n){const r=j4(t),i=e.length/n;if(!r)return Math.max(i,1);const s=p6(r);for(let a=0,o=s.length-1;a<o;a++){const l=s[a];if(l>i)return l}return Math.max(i,1)}function S4(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function C4(t,e,n,r){let i=0,s=n[0],a;for(r=Math.ceil(r),a=0;a<t.length;a++)a===s&&(e.push(t[a]),i++,s=n[i*r])}function za(t,e,n,r,i){const s=Se(r,0),a=Math.min(Se(i,t.length),t.length);let o=0,l,u,d;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),d=s;d<0;)o++,d=Math.round(s+o*n);for(u=Math.max(s,0);u<a;u++)u===d&&(e.push(t[u]),o++,d=Math.round(s+o*n))}function j4(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}const k4=t=>t==="left"?"right":t==="right"?"left":t,Fh=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,zh=(t,e)=>Math.min(e||t,t);function Uh(t,e){const n=[],r=t.length/e,i=t.length;let s=0;for(;s<i;s+=r)n.push(t[Math.floor(s)]);return n}function E4(t,e,n){const r=t.ticks.length,i=Math.min(e,r-1),s=t._startPixel,a=t._endPixel,o=1e-6;let l=t.getPixelForTick(i),u;if(!(n&&(r===1?u=Math.max(l-s,a-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(i-1))/2,l+=i<e?u:-u,l<s-o||l>a+o)))return l}function O4(t,e){Re(t,n=>{const r=n.gc,i=r.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function ms(t){return t.drawTicks?t.tickLength:0}function Hh(t,e){if(!t.display)return 0;const n=$e(t.font,e),r=dt(t.padding);return(Ge(t.text)?t.text.length:1)*n.lineHeight+r.height}function T4(t,e){return Lr(t,{scale:e,type:"scale"})}function P4(t,e,n){return Lr(t,{tick:n,index:e,type:"tick"})}function I4(t,e,n){let r=Jc(t);return(n&&e!=="right"||!n&&e==="right")&&(r=k4(r)),r}function L4(t,e,n,r){const{top:i,left:s,bottom:a,right:o,chart:l}=t,{chartArea:u,scales:d}=l;let f=0,y,h,p;const m=a-i,g=o-s;if(t.isHorizontal()){if(h=ut(r,s,o),je(n)){const v=Object.keys(n)[0],S=n[v];p=d[v].getPixelForValue(S)+m-e}else n==="center"?p=(u.bottom+u.top)/2+m-e:p=Fh(t,n,e);y=o-s}else{if(je(n)){const v=Object.keys(n)[0],S=n[v];h=d[v].getPixelForValue(S)-g+e}else n==="center"?h=(u.left+u.right)/2-g+e:h=Fh(t,n,e);p=ut(r,a,i),f=n==="left"?-Yt:Yt}return{titleX:h,titleY:p,maxWidth:y,rotation:f}}class ns extends ar{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return e=jn(e,Number.POSITIVE_INFINITY),n=jn(n,Number.NEGATIVE_INFINITY),r=jn(r,Number.POSITIVE_INFINITY),i=jn(i,Number.NEGATIVE_INFINITY),{min:jn(e,r),max:jn(n,i),minDefined:rt(e),maxDefined:rt(n)}}getMinMax(e){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),a;if(i&&s)return{min:n,max:r};const o=this.getMatchingVisibleMetas();for(let l=0,u=o.length;l<u;++l)a=o[l].controller.getMinMax(this,e),i||(n=Math.min(n,a.min)),s||(r=Math.max(r,a.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:jn(n,jn(r,n)),max:jn(r,jn(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Fe(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:i,grace:s,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=J6(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Uh(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=x4(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Fe(this.options.afterUpdate,[this])}beforeSetDimensions(){Fe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Fe(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Fe(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Fe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r],s.label=Fe(n.callback,[s.value,r,e],this)}afterTickToLabelConversion(){Fe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Fe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,r=zh(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let a=i,o,l,u;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),f=d.widest.width,y=d.highest.height,h=nn(this.chart.width-f,0,this.maxWidth);o=e.offset?this.maxWidth/r:h/(r-1),f+6>o&&(o=h/(r-(e.offset?.5:1)),l=this.maxHeight-ms(e.grid)-n.padding-Hh(e.title,this.chart.options.font),u=Math.sqrt(f*f+y*y),a=Kc(Math.min(Math.asin(nn((d.highest.height+6)/o,-1,1)),Math.asin(nn(l/u,-1,1))-Math.asin(nn(y/u,-1,1)))),a=Math.max(i,Math.min(s,a))),this.labelRotation=a}afterCalculateLabelRotation(){Fe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Fe(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const l=Hh(i,n.options.font);if(o?(e.width=this.maxWidth,e.height=ms(s)+l):(e.height=this.maxHeight,e.width=ms(s)+l),r.display&&this.ticks.length){const{first:u,last:d,widest:f,highest:y}=this._getLabelSizes(),h=r.padding*2,p=Sr(this.labelRotation),m=Math.cos(p),g=Math.sin(p);if(o){const v=r.mirror?0:g*f.width+m*y.height;e.height=Math.min(this.maxHeight,e.height+v+h)}else{const v=r.mirror?0:m*f.width+g*y.height;e.width=Math.min(this.maxWidth,e.width+v+h)}this._calculatePadding(u,d,g,m)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,i){const{ticks:{align:s,padding:a},position:o}=this.options,l=this.labelRotation!==0,u=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let y=0,h=0;l?u?(y=i*e.width,h=r*n.height):(y=r*e.height,h=i*n.width):s==="start"?h=n.width:s==="end"?y=e.width:s!=="inner"&&(y=e.width/2,h=n.width/2),this.paddingLeft=Math.max((y-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((h-f+a)*this.width/(this.width-f),0)}else{let d=n.height/2,f=e.height/2;s==="start"?(d=0,f=e.height):s==="end"&&(d=n.height,f=0),this.paddingTop=d+a,this.paddingBottom=f+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Fe(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)De(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Uh(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){const{ctx:i,_longestTextCache:s}=this,a=[],o=[],l=Math.floor(n/zh(n,r));let u=0,d=0,f,y,h,p,m,g,v,S,k,j,C;for(f=0;f<n;f+=l){if(p=e[f].label,m=this._resolveTickFontOptions(f),i.font=g=m.string,v=s[g]=s[g]||{data:{},gc:[]},S=m.lineHeight,k=j=0,!De(p)&&!Ge(p))k=Po(i,v.data,v.gc,k,p),j=S;else if(Ge(p))for(y=0,h=p.length;y<h;++y)C=p[y],!De(C)&&!Ge(C)&&(k=Po(i,v.data,v.gc,k,C),j+=S);a.push(k),o.push(j),u=Math.max(k,u),d=Math.max(j,d)}O4(s,n);const b=a.indexOf(u),w=o.indexOf(d),x=L=>({width:a[L]||0,height:o[L]||0});return{first:x(0),last:x(n-1),widest:x(b),highest:x(w),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return w6(this._alignToPixels?Dr(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const r=n[e];return r.$context||(r.$context=P4(this.getContext(),e,r))}return this.$context||(this.$context=T4(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Sr(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),a=e.autoSkipPadding||0,o=s?s.widest.width+a:0,l=s?s.highest.height+a:0;return this.isHorizontal()?l*r>o*i?o/r:l/i:l*i<o*r?l/r:o/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:a,border:o}=i,l=s.offset,u=this.isHorizontal(),f=this.ticks.length+(l?1:0),y=ms(s),h=[],p=o.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,v=function(_){return Dr(r,_,m)};let S,k,j,C,b,w,x,L,D,M,I,z;if(a==="top")S=v(this.bottom),w=this.bottom-y,L=S-g,M=v(e.top)+g,z=e.bottom;else if(a==="bottom")S=v(this.top),M=e.top,z=v(e.bottom)-g,w=S+g,L=this.top+y;else if(a==="left")S=v(this.right),b=this.right-y,x=S-g,D=v(e.left)+g,I=e.right;else if(a==="right")S=v(this.left),D=e.left,I=v(e.right)-g,b=S+g,x=this.left+y;else if(n==="x"){if(a==="center")S=v((e.top+e.bottom)/2+.5);else if(je(a)){const _=Object.keys(a)[0],R=a[_];S=v(this.chart.scales[_].getPixelForValue(R))}M=e.top,z=e.bottom,w=S+g,L=w+y}else if(n==="y"){if(a==="center")S=v((e.left+e.right)/2);else if(je(a)){const _=Object.keys(a)[0],R=a[_];S=v(this.chart.scales[_].getPixelForValue(R))}b=S-g,x=b-y,D=e.left,I=e.right}const P=Se(i.ticks.maxTicksLimit,f),O=Math.max(1,Math.ceil(f/P));for(k=0;k<f;k+=O){const _=this.getContext(k),R=s.setContext(_),G=o.setContext(_),Y=R.lineWidth,E=R.color,W=G.dash||[],H=G.dashOffset,T=R.tickWidth,Q=R.tickColor,Z=R.tickBorderDash||[],K=R.tickBorderDashOffset;j=E4(this,k,l),j!==void 0&&(C=Dr(r,j,Y),u?b=x=D=I=C:w=L=M=z=C,h.push({tx1:b,ty1:w,tx2:x,ty2:L,x1:D,y1:M,x2:I,y2:z,width:Y,color:E,borderDash:W,borderDashOffset:H,tickWidth:T,tickColor:Q,tickBorderDash:Z,tickBorderDashOffset:K}))}return this._ticksLength=f,this._borderValue=S,h}_computeLabelItems(e){const n=this.axis,r=this.options,{position:i,ticks:s}=r,a=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:u,padding:d,mirror:f}=s,y=ms(r.grid),h=y+d,p=f?-d:h,m=-Sr(this.labelRotation),g=[];let v,S,k,j,C,b,w,x,L,D,M,I,z="middle";if(i==="top")b=this.bottom-p,w=this._getXAxisLabelAlignment();else if(i==="bottom")b=this.top+p,w=this._getXAxisLabelAlignment();else if(i==="left"){const O=this._getYAxisLabelAlignment(y);w=O.textAlign,C=O.x}else if(i==="right"){const O=this._getYAxisLabelAlignment(y);w=O.textAlign,C=O.x}else if(n==="x"){if(i==="center")b=(e.top+e.bottom)/2+h;else if(je(i)){const O=Object.keys(i)[0],_=i[O];b=this.chart.scales[O].getPixelForValue(_)+h}w=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")C=(e.left+e.right)/2-h;else if(je(i)){const O=Object.keys(i)[0],_=i[O];C=this.chart.scales[O].getPixelForValue(_)}w=this._getYAxisLabelAlignment(y).textAlign}n==="y"&&(l==="start"?z="top":l==="end"&&(z="bottom"));const P=this._getLabelSizes();for(v=0,S=o.length;v<S;++v){k=o[v],j=k.label;const O=s.setContext(this.getContext(v));x=this.getPixelForTick(v)+s.labelOffset,L=this._resolveTickFontOptions(v),D=L.lineHeight,M=Ge(j)?j.length:1;const _=M/2,R=O.color,G=O.textStrokeColor,Y=O.textStrokeWidth;let E=w;a?(C=x,w==="inner"&&(v===S-1?E=this.options.reverse?"left":"right":v===0?E=this.options.reverse?"right":"left":E="center"),i==="top"?u==="near"||m!==0?I=-M*D+D/2:u==="center"?I=-P.highest.height/2-_*D+D:I=-P.highest.height+D/2:u==="near"||m!==0?I=D/2:u==="center"?I=P.highest.height/2-_*D:I=P.highest.height-M*D,f&&(I*=-1),m!==0&&!O.showLabelBackdrop&&(C+=D/2*Math.sin(m))):(b=x,I=(1-M)*D/2);let W;if(O.showLabelBackdrop){const H=dt(O.backdropPadding),T=P.heights[v],Q=P.widths[v];let Z=I-H.top,K=0-H.left;switch(z){case"middle":Z-=T/2;break;case"bottom":Z-=T;break}switch(w){case"center":K-=Q/2;break;case"right":K-=Q;break;case"inner":v===S-1?K-=Q:v>0&&(K-=Q/2);break}W={left:K,top:Z,width:Q+H.width,height:T+H.height,color:O.backdropColor}}g.push({label:j,font:L,textOffset:I,options:{rotation:m,color:R,strokeColor:G,strokeWidth:Y,textAlign:E,textBaseline:z,translation:[C,b],backdrop:W}})}return g}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Sr(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,a=this._getLabelSizes(),o=e+s,l=a.widest.width;let u,d;return n==="left"?i?(d=this.right+s,r==="near"?u="left":r==="center"?(u="center",d+=l/2):(u="right",d+=l)):(d=this.right-o,r==="near"?u="right":r==="center"?(u="center",d-=l/2):(u="left",d=this.left)):n==="right"?i?(d=this.left+s,r==="near"?u="right":r==="center"?(u="center",d-=l/2):(u="left",d-=l)):(d=this.left+o,r==="near"?u="left":r==="center"?(u="center",d+=l/2):(u="right",d=this.right)):u="right",{textAlign:u,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:r,top:i,width:s,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,i,s,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,a;const o=(l,u,d)=>{!d.width||!d.color||(r.save(),r.lineWidth=d.width,r.strokeStyle=d.color,r.setLineDash(d.borderDash||[]),r.lineDashOffset=d.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(s=0,a=i.length;s<a;++s){const l=i[s];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),a=r.display?s.width:0;if(!a)return;const o=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,d,f,y;this.isHorizontal()?(u=Dr(e,this.left,a)-a/2,d=Dr(e,this.right,o)+o/2,f=y=l):(f=Dr(e,this.top,a)-a/2,y=Dr(e,this.bottom,o)+o/2,u=d=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,f),n.lineTo(d,y),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&rl(r,i);const s=this.getLabelItems(e);for(const a of s){const o=a.options,l=a.font,u=a.label,d=a.textOffset;ci(r,u,0,d,l,o)}i&&il(r)}drawTitle(){const{ctx:e,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=$e(r.font),a=dt(r.padding),o=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||je(n)?(l+=a.bottom,Ge(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:u,titleY:d,maxWidth:f,rotation:y}=L4(this,l,n,o);ci(e,r.text,0,0,s,{color:r.color,maxWidth:f,rotation:y,textAlign:I4(o,n,i),textBaseline:"middle",translation:[u,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,r=Se(e.grid&&e.grid.z,-1),i=Se(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==ns.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,a;for(s=0,a=n.length;s<a;++s){const o=n[s];o[r]===this.id&&(!e||o.type===e)&&i.push(o)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return $e(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Ua{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let r;_4(n)&&(r=this.register(n));const i=this.items,s=e.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,N4(e,a,r),this.override&&Ye.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const n=this.items,r=e.id,i=this.scope;r in n&&delete n[r],i&&r in Ye[i]&&(delete Ye[i][r],this.override&&delete ui[r])}}function N4(t,e,n){const r=$s(Object.create(null),[n?Ye.get(n):{},Ye.get(e),t.defaults]);Ye.set(e,r),t.defaultRoutes&&M4(e,t.defaultRoutes),t.descriptors&&Ye.describe(e,t.descriptors)}function M4(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),i=r.pop(),s=[t].concat(r).join("."),a=e[n].split("."),o=a.pop(),l=a.join(".");Ye.route(s,i,l,o)})}function _4(t){return"id"in t&&"defaults"in t}class R4{constructor(){this.controllers=new Ua(Oi,"datasets",!0),this.elements=new Ua(ar,"elements"),this.plugins=new Ua(Object,"plugins"),this.scales=new Ua(ns,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):Re(i,a=>{const o=r||this._getRegistryForType(a);this._exec(e,o,a)})})}_exec(e,n,r){const i=Vc(e);Fe(r["before"+i],[],r),n[e](r),Fe(r["after"+i],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return i}}var On=new R4;class D4{constructor(){this._init=void 0}notify(e,n,r,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const s=i?this._descriptors(e).filter(i):this._descriptors(e),a=this._notify(s,e,n,r);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),a}_notify(e,n,r,i){i=i||{};for(const s of e){const a=s.plugin,o=a[r],l=[n,i,s.options];if(Fe(o,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){De(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const r=e&&e.config,i=Se(r.options&&r.options.plugins,{}),s=B4(r);return i===!1&&!n?[]:z4(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],r=this._cache,i=(s,a)=>s.filter(o=>!a.some(l=>o.plugin.id===l.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start")}}function B4(t){const e={},n=[],r=Object.keys(On.plugins.items);for(let s=0;s<r.length;s++)n.push(On.getPlugin(r[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const a=i[s];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function F4(t,e){return!e&&t===!1?null:t===!0?{}:t}function z4(t,{plugins:e,localIds:n},r,i){const s=[],a=t.getContext();for(const o of e){const l=o.id,u=F4(r[l],i);u!==null&&s.push({plugin:o,options:U4(t.config,{plugin:o,local:n[l]},u,a)})}return s}function U4(t,{plugin:e,local:n},r,i){const s=t.pluginScopeKeys(e),a=t.getOptionScopes(r,s);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ju(t,e){const n=Ye.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function H4(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function q4(t,e){return t===e?"_index_":"_value_"}function qh(t){if(t==="x"||t==="y"||t==="r")return t}function W4(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Zu(t,...e){if(qh(t))return t;for(const n of e){const r=n.axis||W4(n.position)||t.length>1&&qh(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Wh(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function G4(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return Wh(t,"x",n[0])||Wh(t,"y",n[0])}return{}}function Q4(t,e){const n=ui[t.type]||{scales:{}},r=e.scales||{},i=Ju(t.type,e),s=Object.create(null);return Object.keys(r).forEach(a=>{const o=r[a];if(!je(o))return console.error(`Invalid scale configuration for scale: ${a}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Zu(a,o,G4(a,t),Ye.scales[o.type]),u=q4(l,i),d=n.scales||{};s[a]=Ms(Object.create(null),[{axis:l},o,d[l],d[u]])}),t.data.datasets.forEach(a=>{const o=a.type||t.type,l=a.indexAxis||Ju(o,e),d=(ui[o]||{}).scales||{};Object.keys(d).forEach(f=>{const y=H4(f,l),h=a[y+"AxisID"]||y;s[h]=s[h]||Object.create(null),Ms(s[h],[{axis:y},r[h],d[f]])})}),Object.keys(s).forEach(a=>{const o=s[a];Ms(o,[Ye.scales[o.type],Ye.scale])}),s}function Ag(t){const e=t.options||(t.options={});e.plugins=Se(e.plugins,{}),e.scales=Q4(t,e)}function Sg(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Y4(t){return t=t||{},t.data=Sg(t.data),Ag(t),t}const Gh=new Map,Cg=new Set;function Ha(t,e){let n=Gh.get(t);return n||(n=e(),Gh.set(t,n),Cg.add(n)),n}const gs=(t,e,n)=>{const r=ea(e,n);r!==void 0&&t.add(r)};class V4{constructor(e){this._config=Y4(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Sg(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Ag(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ha(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Ha(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Ha(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Ha(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let i=r.get(e);return(!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){const{options:i,type:s}=this,a=this._cachedScopes(e,r),o=a.get(n);if(o)return o;const l=new Set;n.forEach(d=>{e&&(l.add(e),d.forEach(f=>gs(l,e,f))),d.forEach(f=>gs(l,i,f)),d.forEach(f=>gs(l,ui[s]||{},f)),d.forEach(f=>gs(l,Ye,f)),d.forEach(f=>gs(l,Ku,f))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),Cg.has(n)&&a.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,ui[n]||{},Ye.datasets[n]||{},{type:n},Ye,Ku]}resolveNamedOptions(e,n,r,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:o}=Qh(this._resolverCache,e,i);let l=a;if(X4(a,n)){s.$shared=!1,r=Tr(r)?r():r;const u=this.createResolver(e,r,o);l=Qi(a,r,u)}for(const u of n)s[u]=l[u];return s}createResolver(e,n,r=[""],i){const{resolver:s}=Qh(this._resolverCache,e,r);return je(n)?Qi(s,n,void 0,i):s}}function Qh(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let s=r.get(i);return s||(s={resolver:ed(e,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},r.set(i,s)),s}const K4=t=>je(t)&&Object.getOwnPropertyNames(t).some(e=>Tr(t[e]));function X4(t,e){const{isScriptable:n,isIndexable:r}=ig(t);for(const i of e){const s=n(i),a=r(i),o=(a||s)&&t[i];if(s&&(Tr(o)||K4(o))||a&&Ge(o))return!0}return!1}var J4="4.5.1";const Z4=["top","bottom","left","right","chartArea"];function Yh(t,e){return t==="top"||t==="bottom"||Z4.indexOf(t)===-1&&e==="x"}function Vh(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function Kh(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Fe(n&&n.onComplete,[t],e)}function $4(t){const e=t.chart,n=e.options.animation;Fe(n&&n.onProgress,[t],e)}function jg(t){return rd()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const fo={},Xh=t=>{const e=jg(t);return Object.values(fo).filter(n=>n.canvas===e).pop()};function ek(t,e,n){const r=Object.keys(t);for(const i of r){const s=+i;if(s>=e){const a=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=a)}}}function tk(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}var dr;let ol=(dr=class{static register(...e){On.add(...e),Jh()}static unregister(...e){On.remove(...e),Jh()}constructor(e,n){const r=this.config=new V4(n),i=jg(e),s=Xh(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||b4(i)),this.platform.updateConfig(r);const o=this.platform.acquireContext(i,a.aspectRatio),l=o&&o.canvas,u=l&&l.height,d=l&&l.width;if(this.id=a6(),this.ctx=o,this.canvas=l,this.width=d,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new D4,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=k6(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],fo[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Yn.listen(this,"complete",Kh),Yn.listen(this,"progress",$4),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return De(e)?n&&s?s:i?r/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return On}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ah(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return bh(this.canvas,this.ctx),this}stop(){return Yn.stop(this),this}resize(e,n){Yn.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,e,n,s),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ah(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),Fe(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Re(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((a,o)=>(a[o]=!1,a),{});let s=[];n&&(s=s.concat(Object.keys(n).map(a=>{const o=n[a],l=Zu(a,o),u=l==="r",d=l==="x";return{options:o,dposition:u?"chartArea":d?"bottom":"left",dtype:u?"radialLinear":d?"category":"linear"}}))),Re(s,a=>{const o=a.options,l=o.id,u=Zu(l,o),d=Se(o.type,a.dtype);(o.position===void 0||Yh(o.position,u)!==Yh(a.dposition))&&(o.position=a.dposition),i[l]=!0;let f=null;if(l in r&&r[l].type===d)f=r[l];else{const y=On.getScale(d);f=new y({id:l,type:d,ctx:this.ctx,chart:this}),r[f.id]=f}f.init(o,e)}),Re(i,(a,o)=>{a||delete r[o]}),Re(r,a=>{rn.configure(this,a,a.options),rn.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);e.splice(n,r-n)}this._sortedMetasets=e.slice(0).sort(Vh("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let a=this.getDatasetMeta(r);const o=s.type||this.config.type;if(a.type&&a.type!==o&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=o,a.indexAxis=s.indexAxis||Ju(o,this.options),a.order=s.order||0,a.index=r,a.label=""+s.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=On.getController(o),{datasetElementType:u,dataElementType:d}=Ye.datasets[o];Object.assign(l,{dataElementType:On.getElement(d),datasetElementType:u&&On.getElement(u)}),a.controller=new l(this,r),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){Re(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let u=0,d=this.data.datasets.length;u<d;u++){const{controller:f}=this.getDatasetMeta(u),y=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(y),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||Re(s,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Vh("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Re(this.scales,e=>{rn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!ch(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const a=r==="_removeElements"?-s:s;ek(e,i,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(e.filter(a=>a[0]===s).map((a,o)=>o+","+a.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!ch(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;rn.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Re(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Tr(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const r=this.getDatasetMeta(e),i={meta:r,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Yn.has(this)?this.attached&&!Yn.running(this)&&Yn.start(this):(this.draw(),Kh({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const a=n[i];(!e||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,r={meta:e,index:e.index,cancelable:!0},i=yg(this,e);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&rl(n,i),e.controller.draw(),i&&il(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return nr(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,i){const s=Zj.modes[n];return typeof s=="function"?s(this,e,r,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Lr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(e),a=s.controller._resolveAnimations(void 0,i);Oo(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),a.update(s,{visible:r}),this.update(o=>o.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Yn.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),bh(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete fo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,r=(s,a)=>{n.addEventListener(this,s,a),e[s]=a},i=(s,a,o)=>{s.offsetX=a,s.offsetY=o,this._eventHandler(s)};Re(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),e[l]=u},i=(l,u)=>{e[l]&&(n.removeEventListener(this,l,u),delete e[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};let a;const o=()=>{i("attach",o),this.attached=!0,this.resize(),r("resize",s),r("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",o)},n.isAttached(this.canvas)?o():a()}unbindEvents(){Re(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Re(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const i=r?"set":"remove";let s,a,o,l;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),o=0,l=e.length;o<l;++o){a=e[o];const u=a&&this.getDatasetMeta(a.datasetIndex).controller;u&&u[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],r=e.map(({datasetIndex:s,index:a})=>{const o=this.getDatasetMeta(s);if(!o)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:o.data[a],index:a}});!ko(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const i=this.options.hover,s=(l,u)=>l.filter(d=>!u.some(f=>d.datasetIndex===f.datasetIndex&&d.index===f.index)),a=s(n,e),o=r?e:s(e,n);a.length&&this.updateHoverStyle(a,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:i=[],options:s}=this,a=n,o=this._getActiveElements(e,i,r,a),l=f6(e),u=tk(e,this._lastEvent,r,l);r&&(this._lastEvent=null,Fe(s.onHover,[e,o,this],this),l&&Fe(s.onClick,[e,o,this],this));const d=!ko(o,i);return(d||n)&&(this._active=o,this._updateHoverStyles(o,i,n)),this._lastEvent=u,d}_getActiveElements(e,n,r,i){if(e.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}},fe(dr,"defaults",Ye),fe(dr,"instances",fo),fe(dr,"overrides",ui),fe(dr,"registry",On),fe(dr,"version",J4),fe(dr,"getChart",Xh),dr);function Jh(){return Re(ol.instances,t=>t._plugins.invalidate())}function kg(t,e,n=e){t.lineCap=Se(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Se(n.borderDash,e.borderDash)),t.lineDashOffset=Se(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Se(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Se(n.borderWidth,e.borderWidth),t.strokeStyle=Se(n.borderColor,e.borderColor)}function nk(t,e,n){t.lineTo(n.x,n.y)}function rk(t){return t.stepped?U6:t.tension||t.cubicInterpolationMode==="monotone"?H6:nk}function Eg(t,e,n={}){const r=t.length,{start:i=0,end:s=r-1}=n,{start:a,end:o}=e,l=Math.max(i,a),u=Math.min(s,o),d=i<a&&s<a||i>o&&s>o;return{count:r,start:l,loop:e.loop,ilen:u<l&&!d?r+u-l:u-l}}function ik(t,e,n,r){const{points:i,options:s}=e,{count:a,start:o,loop:l,ilen:u}=Eg(i,n,r),d=rk(s);let{move:f=!0,reverse:y}=r||{},h,p,m;for(h=0;h<=u;++h)p=i[(o+(y?u-h:h))%a],!p.skip&&(f?(t.moveTo(p.x,p.y),f=!1):d(t,m,p,y,s.stepped),m=p);return l&&(p=i[(o+(y?u:0))%a],d(t,m,p,y,s.stepped)),!!l}function sk(t,e,n,r){const i=e.points,{count:s,start:a,ilen:o}=Eg(i,n,r),{move:l=!0,reverse:u}=r||{};let d=0,f=0,y,h,p,m,g,v;const S=j=>(a+(u?o-j:j))%s,k=()=>{m!==g&&(t.lineTo(d,g),t.lineTo(d,m),t.lineTo(d,v))};for(l&&(h=i[S(0)],t.moveTo(h.x,h.y)),y=0;y<=o;++y){if(h=i[S(y)],h.skip)continue;const j=h.x,C=h.y,b=j|0;b===p?(C<m?m=C:C>g&&(g=C),d=(f*d+j)/++f):(k(),t.lineTo(j,C),p=b,f=0,m=g=C),v=C}k()}function $u(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?sk:ik}function ak(t){return t.stepped?Aj:t.tension||t.cubicInterpolationMode==="monotone"?Sj:Ur}function ok(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),kg(t,e.options),t.stroke(i)}function lk(t,e,n,r){const{segments:i,options:s}=e,a=$u(e);for(const o of i)kg(t,s,o.style),t.beginPath(),a(t,e,o,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const uk=typeof Path2D=="function";function ck(t,e,n,r){uk&&!e.options.segment?ok(t,e,n,r):lk(t,e,n,r)}class jr extends ar{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;yj(this._points,r,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Tj(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){const r=this.options,i=e[n],s=this.points,a=hg(this,{property:n,start:i,end:i});if(!a.length)return;const o=[],l=ak(r);let u,d;for(u=0,d=a.length;u<d;++u){const{start:f,end:y}=a[u],h=s[f],p=s[y];if(h===p){o.push(h);continue}const m=Math.abs((i-h[n])/(p[n]-h[n])),g=l(h,p,m,r.stepped);g[n]=e[n],o.push(g)}return o.length===1?o[0]:o}pathSegment(e,n,r){return $u(this)(e,this,n,r)}path(e,n,r){const i=this.segments,s=$u(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const o of i)a&=s(e,this,o,{start:n,end:n+r-1});return!!a}draw(e,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),ck(e,this,r,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}fe(jr,"id","line"),fe(jr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),fe(jr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),fe(jr,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Zh(t,e,n,r){const i=t.options,{[n]:s}=t.getProps([n],r);return Math.abs(e-s)<i.radius+i.hitRadius}class ho extends ar{constructor(n){super();fe(this,"parsed");fe(this,"skip");fe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:a,y:o}=this.getProps(["x","y"],i);return Math.pow(n-a,2)+Math.pow(r-o,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return Zh(this,n,"x",r)}inYRange(n,r){return Zh(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!nr(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Xu(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}fe(ho,"id","point"),fe(ho,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),fe(ho,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function dk(t,e,n){const r=t.segments,i=t.points,s=e.points,a=[];for(const o of r){let{start:l,end:u}=o;u=ll(l,u,i);const d=ec(n,i[l],i[u],o.loop);if(!e.segments){a.push({source:o,target:d,start:i[l],end:i[u]});continue}const f=hg(e,d);for(const y of f){const h=ec(n,s[y.start],s[y.end],y.loop),p=fg(o,i,h);for(const m of p)a.push({source:m,target:y,start:{[n]:$h(d,h,"start",Math.max)},end:{[n]:$h(d,h,"end",Math.min)}})}}return a}function ec(t,e,n,r){if(r)return;let i=e[t],s=n[t];return t==="angle"&&(i=Qt(i),s=Qt(s)),{property:t,start:i,end:s}}function fk(t,e){const{x:n=null,y:r=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:a,end:o})=>{o=ll(a,o,i);const l=i[a],u=i[o];r!==null?(s.push({x:l.x,y:r}),s.push({x:u.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:u.y}))}),s}function ll(t,e,n){for(;e>t;e--){const r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function $h(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function Og(t,e){let n=[],r=!1;return Ge(t)?(r=!0,n=t):n=fk(t,e),n.length?new jr({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function ey(t){return t&&t.fill!==!1}function hk(t,e,n){let i=t[e].fill;const s=[e];let a;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!rt(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function yk(t,e,n){const r=vk(t);if(je(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return rt(i)&&Math.floor(i)===i?pk(r[0],e,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function pk(t,e,n,r){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?!1:n}function mk(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:je(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function gk(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:je(t)?r=t.value:r=e.getBaseValue(),r}function vk(t){const e=t.options,n=e.fill;let r=Se(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function bk(t){const{scale:e,index:n,line:r}=t,i=[],s=r.segments,a=r.points,o=xk(e,n);o.push(Og({x:null,y:e.bottom},r));for(let l=0;l<s.length;l++){const u=s[l];for(let d=u.start;d<=u.end;d++)wk(i,a[d],o)}return new jr({points:i,options:{}})}function xk(t,e){const n=[],r=t.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function wk(t,e,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:a,last:o,point:l}=Ak(s,e,"x");if(!(!l||a&&o)){if(a)r.unshift(l);else if(t.push(l),!o)break}}t.push(...r)}function Ak(t,e,n){const r=t.interpolate(e,n);if(!r)return{};const i=r[n],s=t.segments,a=t.points;let o=!1,l=!1;for(let u=0;u<s.length;u++){const d=s[u],f=a[d.start][n],y=a[d.end][n];if(Si(i,f,y)){o=i===f,l=i===y;break}}return{first:o,last:l,point:r}}class Tg{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,r){const{x:i,y:s,radius:a}=this;return n=n||{start:0,end:Kt},e.arc(i,s,a,n.end,n.start,!0),!r.bounds}interpolate(e){const{x:n,y:r,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function Sk(t){const{chart:e,fill:n,line:r}=t;if(rt(n))return Ck(e,n);if(n==="stack")return bk(t);if(n==="shape")return!0;const i=jk(t);return i instanceof Tg?i:Og(i,r)}function Ck(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function jk(t){return(t.scale||{}).getPointPositionForValue?Ek(t):kk(t)}function kk(t){const{scale:e={},fill:n}=t,r=mk(n,e);if(rt(r)){const i=e.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function Ek(t){const{scale:e,fill:n}=t,r=e.options,i=e.getLabels().length,s=r.reverse?e.max:e.min,a=gk(n,e,s),o=[];if(r.grid.circular){const l=e.getPointPositionForValue(0,s);return new Tg({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(a)})}for(let l=0;l<i;++l)o.push(e.getPointPositionForValue(l,a));return o}function zl(t,e,n){const r=Sk(e),{chart:i,index:s,line:a,scale:o,axis:l}=e,u=a.options,d=u.fill,f=u.backgroundColor,{above:y=f,below:h=f}=d||{},p=i.getDatasetMeta(s),m=yg(i,p);r&&a.points.length&&(rl(t,n),Ok(t,{line:a,target:r,above:y,below:h,area:n,scale:o,axis:l,clip:m}),il(t))}function Ok(t,e){const{line:n,target:r,above:i,below:s,area:a,scale:o,clip:l}=e,u=n._loop?"angle":e.axis;t.save();let d=s;s!==i&&(u==="x"?(ty(t,r,a.top),Ul(t,{line:n,target:r,color:i,scale:o,property:u,clip:l}),t.restore(),t.save(),ty(t,r,a.bottom)):u==="y"&&(ny(t,r,a.left),Ul(t,{line:n,target:r,color:s,scale:o,property:u,clip:l}),t.restore(),t.save(),ny(t,r,a.right),d=i)),Ul(t,{line:n,target:r,color:d,scale:o,property:u,clip:l}),t.restore()}function ty(t,e,n){const{segments:r,points:i}=e;let s=!0,a=!1;t.beginPath();for(const o of r){const{start:l,end:u}=o,d=i[l],f=i[ll(l,u,i)];s?(t.moveTo(d.x,d.y),s=!1):(t.lineTo(d.x,n),t.lineTo(d.x,d.y)),a=!!e.pathSegment(t,o,{move:a}),a?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function ny(t,e,n){const{segments:r,points:i}=e;let s=!0,a=!1;t.beginPath();for(const o of r){const{start:l,end:u}=o,d=i[l],f=i[ll(l,u,i)];s?(t.moveTo(d.x,d.y),s=!1):(t.lineTo(n,d.y),t.lineTo(d.x,d.y)),a=!!e.pathSegment(t,o,{move:a}),a?t.closePath():t.lineTo(n,f.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function Ul(t,e){const{line:n,target:r,property:i,color:s,scale:a,clip:o}=e,l=dk(n,r,i);for(const{source:u,target:d,start:f,end:y}of l){const{style:{backgroundColor:h=s}={}}=u,p=r!==!0;t.save(),t.fillStyle=h,Tk(t,a,o,p&&ec(i,f,y)),t.beginPath();const m=!!n.pathSegment(t,u);let g;if(p){m?t.closePath():ry(t,r,y,i);const v=!!r.pathSegment(t,d,{move:m,reverse:!0});g=m&&v,g||ry(t,r,f,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function Tk(t,e,n,r){const i=e.chart.chartArea,{property:s,start:a,end:o}=r||{};if(s==="x"||s==="y"){let l,u,d,f;s==="x"?(l=a,u=i.top,d=o,f=i.bottom):(l=i.left,u=a,d=i.right,f=o),t.beginPath(),n&&(l=Math.max(l,n.left),d=Math.min(d,n.right),u=Math.max(u,n.top),f=Math.min(f,n.bottom)),t.rect(l,u,d-l,f-u),t.clip()}}function ry(t,e,n,r){const i=e.interpolate(n,r);i&&t.lineTo(i.x,i.y)}var Pk={id:"filler",afterDatasetsUpdate(t,e,n){const r=(t.data.datasets||[]).length,i=[];let s,a,o,l;for(a=0;a<r;++a)s=t.getDatasetMeta(a),o=s.dataset,l=null,o&&o.options&&o instanceof jr&&(l={visible:t.isDatasetVisible(a),index:a,fill:yk(o,a,r),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:o}),s.$filler=l,i.push(l);for(a=0;a<r;++a)l=i[a],!(!l||l.fill===!1)&&(l.fill=hk(i,a,n.propagate))},beforeDraw(t,e,n){const r=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let a=i.length-1;a>=0;--a){const o=i[a].$filler;o&&(o.line.updateControlPoints(s,o.axis),r&&o.fill&&zl(t.ctx,o,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;ey(s)&&zl(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const r=e.meta.$filler;!ey(r)||n.drawTime!=="beforeDatasetDraw"||zl(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const iy=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},Ik=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class sy extends ar{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=Fe(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,i)=>e.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,i=$e(r.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=iy(r,s);let u,d;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,d=this._fitRows(a,s,o,l)+10):(d=this.maxHeight,u=this._fitCols(a,i,o,l)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(d,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,i){const{ctx:s,maxWidth:a,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],d=i+o;let f=e;s.textAlign="left",s.textBaseline="middle";let y=-1,h=-d;return this.legendItems.forEach((p,m)=>{const g=r+n/2+s.measureText(p.text).width;(m===0||u[u.length-1]+g+2*o>a)&&(f+=d,u[u.length-(m>0?0:1)]=0,h+=d,y++),l[m]={left:0,top:h,row:y,width:g,height:i},u[u.length-1]+=g+o}),f}_fitCols(e,n,r,i){const{ctx:s,maxHeight:a,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],d=a-e;let f=o,y=0,h=0,p=0,m=0;return this.legendItems.forEach((g,v)=>{const{itemWidth:S,itemHeight:k}=Lk(r,n,s,g,i);v>0&&h+k+2*o>d&&(f+=y+o,u.push({width:y,height:h}),p+=y+o,m++,y=h=0),l[v]={left:p,top:h,col:m,width:S,height:k},y=Math.max(y,S),h+=k+o}),f+=y,u.push({width:y,height:h}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,a=Ei(s,this.left,this.width);if(this.isHorizontal()){let o=0,l=ut(r,this.left+i,this.right-this.lineWidths[o]);for(const u of n)o!==u.row&&(o=u.row,l=ut(r,this.left+i,this.right-this.lineWidths[o])),u.top+=this.top+e+i,u.left=a.leftForLtr(a.x(l),u.width),l+=u.width+i}else{let o=0,l=ut(r,this.top+e+i,this.bottom-this.columnSizes[o].height);for(const u of n)u.col!==o&&(o=u.col,l=ut(r,this.top+e+i,this.bottom-this.columnSizes[o].height)),u.top=l,u.left+=this.left+i,u.left=a.leftForLtr(a.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;rl(e,this),this._draw(),il(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:a}=e,o=Ye.color,l=Ei(e.rtl,this.left,this.width),u=$e(a.font),{padding:d}=a,f=u.size,y=f/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:p,boxHeight:m,itemHeight:g}=iy(a,f),v=function(b,w,x){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;i.save();const L=Se(x.lineWidth,1);if(i.fillStyle=Se(x.fillStyle,o),i.lineCap=Se(x.lineCap,"butt"),i.lineDashOffset=Se(x.lineDashOffset,0),i.lineJoin=Se(x.lineJoin,"miter"),i.lineWidth=L,i.strokeStyle=Se(x.strokeStyle,o),i.setLineDash(Se(x.lineDash,[])),a.usePointStyle){const D={radius:m*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:L},M=l.xPlus(b,p/2),I=w+y;ng(i,D,M,I,a.pointStyleWidth&&p)}else{const D=w+Math.max((f-m)/2,0),M=l.leftForLtr(b,p),I=ki(x.borderRadius);i.beginPath(),Object.values(I).some(z=>z!==0)?Io(i,{x:M,y:D,w:p,h:m,radius:I}):i.rect(M,D,p,m),i.fill(),L!==0&&i.stroke()}i.restore()},S=function(b,w,x){ci(i,x.text,b,w+g/2,u,{strikethrough:x.hidden,textAlign:l.textAlign(x.textAlign)})},k=this.isHorizontal(),j=this._computeTitleHeight();k?h={x:ut(s,this.left+d,this.right-r[0]),y:this.top+d+j,line:0}:h={x:this.left+d,y:ut(s,this.top+j+d,this.bottom-n[0].height),line:0},ug(this.ctx,e.textDirection);const C=g+d;this.legendItems.forEach((b,w)=>{i.strokeStyle=b.fontColor,i.fillStyle=b.fontColor;const x=i.measureText(b.text).width,L=l.textAlign(b.textAlign||(b.textAlign=a.textAlign)),D=p+y+x;let M=h.x,I=h.y;l.setWidth(this.width),k?w>0&&M+D+d>this.right&&(I=h.y+=C,h.line++,M=h.x=ut(s,this.left+d,this.right-r[h.line])):w>0&&I+C>this.bottom&&(M=h.x=M+n[h.line].width+d,h.line++,I=h.y=ut(s,this.top+j+d,this.bottom-n[h.line].height));const z=l.x(M);if(v(z,I,b),M=E6(L,M+p+y,k?M+D:this.right,e.rtl),S(l.x(M),I,b),k)h.x+=D+d;else if(typeof b.text!="string"){const P=u.lineHeight;h.y+=Pg(b,P)+d}else h.y+=C}),cg(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=$e(n.font),i=dt(n.padding);if(!n.display)return;const s=Ei(e.rtl,this.left,this.width),a=this.ctx,o=n.position,l=r.size/2,u=i.top+l;let d,f=this.left,y=this.width;if(this.isHorizontal())y=Math.max(...this.lineWidths),d=this.top+u,f=ut(e.align,f,this.right-y);else{const p=this.columnSizes.reduce((m,g)=>Math.max(m,g.height),0);d=u+ut(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const h=ut(o,f,f+y);a.textAlign=s.textAlign(Jc(o)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,ci(a,n.text,h,d,r)}_computeTitleHeight(){const e=this.options.title,n=$e(e.font),r=dt(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,s;if(Si(e,this.left,this.right)&&Si(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],Si(e,i.left,i.left+i.width)&&Si(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(e){const n=this.options;if(!_k(e.type,n))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=Ik(i,r);i&&!s&&Fe(n.onLeave,[e,i,this],this),this._hoveredItem=r,r&&!s&&Fe(n.onHover,[e,r,this],this)}else r&&Fe(n.onClick,[e,r,this],this)}}function Lk(t,e,n,r,i){const s=Nk(r,t,e,n),a=Mk(i,r,e.lineHeight);return{itemWidth:s,itemHeight:a}}function Nk(t,e,n,r){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,a)=>s.length>a.length?s:a)),e+n.size/2+r.measureText(i).width}function Mk(t,e,n){let r=t;return typeof e.text!="string"&&(r=Pg(e,n)),r}function Pg(t,e){const n=t.text?t.text.length:0;return e*n}function _k(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var Rk={id:"legend",_element:sy,start(t,e,n){const r=t.legend=new sy({ctx:t.ctx,options:n,chart:t});rn.configure(t,r,n),rn.addBox(t,r)},stop(t){rn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;rn.configure(t,r,n),r.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=!0):(i.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:a,borderRadius:o}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),d=dt(u.borderWidth);return{text:e[l.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:a&&(o||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Ig extends ar{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=Ge(r.text)?r.text.length:1;this._padding=dt(r.padding);const s=i*$e(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:r,bottom:i,right:s,options:a}=this,o=a.align;let l=0,u,d,f;return this.isHorizontal()?(d=ut(o,r,s),f=n+e,u=s-r):(a.position==="left"?(d=r+e,f=ut(o,i,n),l=Je*-.5):(d=s-e,f=ut(o,n,i),l=Je*.5),u=i-n),{titleX:d,titleY:f,maxWidth:u,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const r=$e(n.font),s=r.lineHeight/2+this._padding.top,{titleX:a,titleY:o,maxWidth:l,rotation:u}=this._drawArgs(s);ci(e,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:Jc(n.align),textBaseline:"middle",translation:[a,o]})}}function Dk(t,e){const n=new Ig({ctx:t.ctx,options:e,chart:t});rn.configure(t,n,e),rn.addBox(t,n),t.titleBlock=n}var Bk={id:"title",_element:Ig,start(t,e,n){Dk(t,n)},stop(t){const e=t.titleBlock;rn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;rn.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ts={average(t){if(!t.length)return!1;let e,n,r=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const o=t[e].element;if(o&&o.hasValue()){const l=o.tooltipPosition();r.add(l.x),i+=l.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((o,l)=>o+l)/r.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,i=Number.POSITIVE_INFINITY,s,a,o;for(s=0,a=t.length;s<a;++s){const l=t[s].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),d=Vu(e,u);d<i&&(i=d,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function En(t,e){return e&&(Ge(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Vn(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
21
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o5(t,e){if(t){if(typeof t=="string")return Qf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qf(t,e):void 0}}function Qf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function l5(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function u5(t){if(Array.isArray(t))return t}var Cn={selected:{background:"yst-bg-primary-500",text:"yst-text-white",hover:"hover:yst-bg-primary-600"},hasAnalysis:{border:"yst-border-2 yst-border-primary-500",text:"yst-text-slate-900",hover:"hover:yst-bg-primary-50"},today:{underline:"yst-border-b-2 yst-border-slate-400"},indicator:{default:"yst-bg-blue-500"}},c5=function(e){var n=e.analyses,r=e.selectedAnalysisId,i=e.onAnalysisSelect,s=e.isLoading,a=s===void 0?!1:s,o=e.isOpen,l=o===void 0?!1:o,u=e.onClose,d=F.useState(new Date),f=s5(d,2),y=f[0],h=f[1],p=F.useMemo(function(){var b=new Map;return n.forEach(function(w){var x=hr(w.createdAt),L=x?_n(x,"yyyy-MM-dd"):"";L&&(b.has(L)||b.set(L,[]),b.get(L).push(w))}),b},[n]);F.useEffect(function(){if(l&&r){var b=n.find(function(D){return D.id===r});if(b){var w=hr(b.createdAt);w&&h(w)}}else if(l&&n.length>0){var x=n.reduce(function(D,M){return new Date(M.createdAt)>new Date(D.createdAt)?M:D}),L=hr(x.createdAt);L&&h(L)}},[l,r,n]);var m=F.useMemo(function(){return n.length===0?null:n.reduce(function(b,w){return new Date(w.createdAt)>new Date(b.createdAt)?w:b})},[n]),g=function(){if(m){var w=hr(m.createdAt);w&&h(w)}},v=F.useMemo(function(){if(!m)return!1;var b=hr(m.createdAt);return b?qf(b,y):!1},[m,y]),S=F.useMemo(function(){var b=z3(y),w=D3(y),x=new Date(b),L=x.getDay(),D=L===0?6:L-1;x.setDate(x.getDate()-D);var M=new Date(w),I=M.getDay(),z=I===0?0:7-I;return M.setDate(M.getDate()+z),F3({start:x,end:M}).map(function(O){var T=_n(O,"yyyy-MM-dd"),_=p.get(T)||[],R=_.find(function(G){return String(G.id)===String(r)});return{date:T,dateObj:O,isCurrentMonth:qf(O,y),isToday:F0(O),isSelected:!!R,hasAnalyses:_.length>0,analyses:_}})},[y,p,r]),k=function(){h(function(w){return UC(w)})},j=function(){h(function(w){return N0(w,1)})},C=function(w){if(w.hasAnalyses){if(w.analyses.length===1)i(w.analyses[0].id);else{var x=w.analyses.reduce(function(L,D){return new Date(D.createdAt)>new Date(L.createdAt)?D:L});i(x.id)}u==null||u()}};return l?a?c.jsx("div",{className:"yst-absolute yst-left-0 yst-right-0 yst-top-full yst-z-50 yst-mt-1 yst-rounded-md yst-border yst-border-slate-200 yst-bg-white yst-p-4 yst-shadow-lg",children:c.jsxs("div",{className:"yst-animate-pulse yst-space-y-4",children:[c.jsx("div",{className:"yst-h-6 yst-rounded yst-bg-slate-200"}),c.jsx("div",{className:"yst-h-48 yst-rounded yst-bg-slate-200"})]})}):c.jsxs("div",{className:"yst-absolute yst-left-0 yst-right-0 yst-top-full yst-z-50 yst-mt-1 yst-min-w-80 yst-max-w-sm yst-rounded-md yst-border yst-border-slate-200 yst-bg-white yst-p-4 yst-shadow-lg",children:[c.jsxs("div",{className:"yst-mb-6 yst-flex yst-items-center yst-justify-between",children:[c.jsxs("button",{type:"button",onClick:k,className:"yst-rounded-md yst-p-1.5 yst-text-slate-400 hover:yst-bg-slate-100 hover:yst-text-slate-500",children:[c.jsx("span",{className:"yst-sr-only",children:"Previous month"}),c.jsx(sA,{className:"yst-h-5 yst-w-5"})]}),c.jsx("h2",{className:"yst-text-sm yst-font-semibold yst-text-slate-900",children:_n(y,"MMMM yyyy")}),c.jsxs("button",{type:"button",onClick:j,className:"yst-rounded-md yst-p-1.5 yst-text-slate-400 hover:yst-bg-slate-100 hover:yst-text-slate-500",children:[c.jsx("span",{className:"yst-sr-only",children:"Next month"}),c.jsx(oA,{className:"yst-h-5 yst-w-5"})]})]}),c.jsx("div",{className:"yst-mb-0 yst-grid yst-grid-cols-7 yst-gap-x-1",children:["M","T","W","T","F","S","S"].map(function(b,w){return c.jsx("div",{className:"yst-py-2 yst-text-center yst-text-xs yst-font-medium yst-text-slate-500",children:b},"".concat(b,"-").concat(w))})}),c.jsx("div",{className:"yst-grid yst-grid-cols-7 yst-gap-x-1",children:S.map(function(b){return c.jsx("div",{className:"yst-flex yst-items-center yst-justify-center yst-py-1",children:c.jsxs("button",{type:"button",onClick:function(){return C(b)},disabled:!b.hasAnalyses,className:oe("yst-relative yst-rounded-full yst-text-sm yst-transition-colors","yst-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center","yst-p-0",{"yst-text-slate-900":b.isCurrentMonth,"yst-text-slate-400":!b.isCurrentMonth},{"focus:yst-outline-none focus:yst-ring-2 focus:yst-ring-blue-500":b.hasAnalyses,"yst-cursor-not-allowed":!b.hasAnalyses,"yst-cursor-pointer":b.hasAnalyses},Tl({},"".concat(Cn.selected.background," ").concat(Cn.selected.text," ").concat(Cn.selected.hover),b.isSelected),Tl({},"".concat(Cn.hasAnalysis.border," ").concat(Cn.hasAnalysis.text," ").concat(Cn.hasAnalysis.hover),b.hasAnalyses&&!b.isSelected)),children:[c.jsx("span",{className:oe("yst-relative yst-z-10 yst-w-4",Tl({},Cn.today.underline,b.isToday&&!b.isSelected)),children:_n(b.dateObj,"d")}),b.hasAnalyses&&b.analyses.length>1&&!b.isSelected&&c.jsx("span",{className:oe("yst-absolute yst-right-1 yst-top-1 yst-h-2 yst-w-2 yst-rounded-full",Cn.indicator.default)})]})},b.date)})}),c.jsxs("div",{className:"yst-mt-4 yst-flex yst-items-center yst-gap-4 yst-text-xs yst-text-slate-600",children:[c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[c.jsx("div",{className:"yst-h-3 yst-w-3 yst-rounded-full ".concat(Cn.hasAnalysis.border)}),c.jsx("span",{children:"Has analysis"})]}),c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[c.jsx("div",{className:"yst-h-3 yst-w-3 yst-rounded-full ".concat(Cn.selected.background)}),c.jsx("span",{children:"Selected"})]}),c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1",children:[c.jsx("div",{className:"yst-h-0.5 yst-w-4 yst-bg-slate-400"}),c.jsx("span",{children:"Today"})]})]}),m&&c.jsx("div",{className:"yst-mt-6",children:c.jsx(A.Button,{onClick:g,className:"yst-w-full",disabled:v,children:"Show latest analysis"})})]}):null};function Yf(t,e){return y5(t)||h5(t,e)||f5(t,e)||d5()}function d5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
22
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f5(t,e){if(t){if(typeof t=="string")return Vf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vf(t,e):void 0}}function Vf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h5(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function y5(t){if(Array.isArray(t))return t}var H0=function(e){var n=e.analyses,r=e.selectedAnalysisId,i=e.onAnalysisSelect,s=e.isLoading,a=s===void 0?!1:s,o=e.disabled,l=o===void 0?!1:o,u=e.id,d=u===void 0?"analysis-date-select":u,f=F.useState(!1),y=Yf(f,2),h=y[0],p=y[1],m=F.useState("latest"),g=Yf(m,2),v=g[0],S=g[1],k=F.useRef(null),j=F.useCallback(function(z){var O=hr(z.createdAt);return O?O.getTime():-1/0},[]);F.useEffect(function(){if((r==="latest"||!r)&&n.length>0&&!a){var z=n.reduce(function(O,T){return j(T)>j(O)?T:O});i(z.id)}},[n,r,i,a,j]);var C=F.useMemo(function(){if(r==="latest"||!r){if(n.length>0){var z=n.reduce(function(O,T){return j(T)>j(O)?T:O});return z.id}return"latest"}return r},[r,n,j]);F.useEffect(function(){S(C)},[C]);var b=n.find(function(z){return String(z.id)===String(v)}),w=n.length>0?String(n.reduce(function(z,O){return j(O)>j(z)?O:z}).id):"",x=function(){if(b){var z=hr(b.createdAt),O=z?_n(z,"MMMM d, yyyy"):b.createdAt?b.createdAt.slice(0,10):"Unknown date",T=String(b.id)===w?"(latest)":"(older)";return"".concat(O," ").concat(T)}return n.length>0?"Select date...":"No analyses available"}();F.useEffect(function(){var z=function(T){k.current&&!k.current.contains(T.target)&&p(!1)};return h&&document.addEventListener("mousedown",z),function(){document.removeEventListener("mousedown",z)}},[h]);var L=function(){!l&&!a&&p(!h)},D=function(O){S(O),i(O),p(!1)},M=function(){p(!1)},I=function(O){O.key==="Enter"||O.key===" "?(O.preventDefault(),L()):O.key==="Escape"&&p(!1)};return c.jsxs("div",{ref:k,className:"yst-relative",children:[c.jsxs("div",{className:"yst-relative",children:[c.jsx(A.TextInput,{id:d,onClick:L,onKeyDown:I,onChange:function(){},disabled:l||a,value:x,"aria-expanded":h,"aria-haspopup":"true","aria-label":"Select analysis date",className:oe("yst-pr-10",{"yst-cursor-default":!l&&!a})}),c.jsx(eA,{className:oe("yst-pointer-events-none yst-absolute yst-right-3 yst-top-1/2 yst--translate-y-1/2 yst-transform",{"yst-text-gray-400":l||a})})]}),c.jsx(c5,{analyses:n,selectedAnalysisId:v,onAnalysisSelect:D,isLoading:a,isOpen:h,onClose:M})]})};function Kf(t,e){return v5(t)||g5(t,e)||m5(t,e)||p5()}function p5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
23
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m5(t,e){if(t){if(typeof t=="string")return Xf(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xf(t,e):void 0}}function Xf(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function g5(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function v5(t){if(Array.isArray(t))return t}var Jf=function(e){var n=e.id,r=e.isVisible,i=e.onClose,s=e.children,a=e.className,o=e.variant,l=o===void 0?"info":o,u=e.showArrow,d=u===void 0?!0:u,f=e.keepOpenOnExternalClick,y=f===void 0?!1:f,h=e.delay,p=h===void 0?0:h,m=F.useRef(null),g=F.useState(!1),v=Kf(g,2),S=v[0],k=v[1],j=F.useState(!1),C=Kf(j,2),b=C[0],w=C[1];return F.useEffect(function(){if(!r){(S||b)&&(k(!1),w(!1));return}if(r)if(p>0){w(!1),k(!1);var x=setTimeout(function(){k(!0),setTimeout(function(){return w(!0)},50)},p);return function(){return clearTimeout(x)}}else k(!0),w(!1)},[r,p]),F.useEffect(function(){if(!y){var x=function(D){m.current&&!m.current.contains(D.target)&&i()};return r&&document.addEventListener("mousedown",x),function(){document.removeEventListener("mousedown",x)}}},[r,i,y]),r?c.jsxs("div",{id:n,className:"yst-absolute yst-w-80",ref:m,children:[S&&d&&c.jsx("div",{className:oe("yst-absolute yst-left-1/2 yst-top-full yst-z-[60] yst-mt-[7px] yst-h-3 yst-w-3 yst--translate-x-1/2 yst--translate-y-1/2 yst-rotate-45 yst-transform yst-border-l yst-border-t yst-border-gray-100 yst-bg-white",{"yst-opacity-0":p>0&&!b,"yst-animate-in yst-fade-in yst-slide-in-from-top-1 yst-duration-300":p>0&&b})}),c.jsx(A.Toast,{id:"".concat(n,"--toast"),className:oe("yst-absolute yst-left-1/2 yst-top-full yst-z-50 yst-mt-2 yst-w-80 yst--translate-x-1/2 yst-transform",{"yst-block":S,"yst-hidden":!S,"yst-opacity-0":p>0&&S&&!b,"yst-animate-in yst-fade-in yst-slide-in-from-top-2 yst-duration-300":p>0&&b},a),variant:l,isVisible:S,setIsVisible:function(){},autoDismiss:0,children:s})]}):null},b5=function(e){for(var n=0,r=0;r<e.length;r++){var i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n).toString(36)},jo=function(e,n,r,i){var s="".concat(e,"_").concat(n,"_").concat(r,"_").concat(i),a=b5(s);return"yst_legal_alert_dismissed_".concat(a)},x5=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},ks=function(e){switch(e){case"openai":return"ChatGPT";case"perplexity":return"Perplexity AI";case"anthropic":return"Anthropic";case"gemini":return"Gemini";default:return e||"Unknown"}},Wu=function(e){return Math.round((e+1)/2*100)},Wc=function(e){return e.some(function(n){return n.canManualRetry})?"can_retry":e.some(function(n){return n.manualRetryCount===1&&!n.canManualRetry&&n.nextManualRetryAfter!=null})?"cooldown":e.some(function(n){return n.manualRetryCount>=2})?"exhausted":"none"},q0=function(e){var n=new Date(e),r=_n(n,"h:mm a");return F0(n)?"today at ".concat(r):zC(n)?"tomorrow at ".concat(r):"".concat(_n(n,"MMM d")," at ").concat(r)},W0=function(e){return e.map(function(n){return n.nextManualRetryAfter}).filter(function(n){return n!=null}).sort()[0]},w5=function(e,n){return"incomplete_analysis_dismissed_".concat(e,"_").concat(n)};function Gu(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Bt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Bt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Bt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Bt(f,"constructor",u),Bt(u,"constructor",l),l.displayName="GeneratorFunction",Bt(u,i,"GeneratorFunction"),Bt(f),Bt(f,i,"Generator"),Bt(f,r,function(){return this}),Bt(f,"toString",function(){return"[object Generator]"}),(Gu=function(){return{w:s,m:y}})()}function Bt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Bt=function(a,o,l,u){function d(f,y){Bt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Bt(t,e,n,r)}function Zf(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function A5(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){Zf(s,r,i,a,o,"next",l)}function o(l){Zf(s,r,i,a,o,"throw",l)}a(void 0)})}}var G0=function(e,n){var r=It();return Yx({mutation:{onSuccess:function(){var i=A5(Gu().m(function a(){return Gu().w(function(o){for(;;)switch(o.n){case 0:return o.n=1,Promise.all([r.invalidateQueries({queryKey:mn(e,n)}),r.invalidateQueries({queryKey:Ko(e)})]);case 1:return o.a(2)}},a)}));function s(){return i.apply(this,arguments)}return s}()}})},S5=function(e){var n=e.failedScans,r=e.brandId,i=e.analysisId,s=e.onDismiss,a=Wc(n),o=G0(r,i),l=o.mutate,u=o.isPending;if(a==="none")return null;var d=function(){n.filter(function(v){return v.canManualRetry}).forEach(function(v){l({brandId:r,analysisId:i,scanId:v.id})})},f=c.jsx(A.Link,{as:"button",className:"yst-py-1.5 yst-pr-2 yst-no-underline yst-text-inherit yst-font-medium",onClick:s,variant:"default",children:"Dismiss"}),y=c.jsx("div",{className:"yst-ml-auto yst-flex-shrink-0",children:c.jsx(A.Link,{onClick:s,variant:"default",children:c.jsx($o,{className:"yst-h-4 yst-w-4"})})}),h=function(){return c.jsx(A.Alert,{variant:"error",children:c.jsxs("div",{className:"yst-flex yst-w-full",children:[c.jsxs("div",{className:"yst-flex-1 yst-space-y-2",children:[c.jsx("p",{className:"yst-mb-0 yst-font-medium",children:"Analysis incomplete"}),c.jsx("p",{className:"yst-mb-0",children:"We couldn't retrieve results for all AI platforms. Please run the analysis again to complete the dataset."}),c.jsxs("div",{className:"yst-flex yst-gap-4",children:[c.jsx(A.Link,{as:"button",className:"yst-py-1.5 yst-pr-2 yst-no-underline yst-text-inherit yst-font-medium",onClick:d,variant:"default",children:u?"Running...":"Run analysis again"}),f]})]}),y]})})},p=function(){var v=W0(n);return c.jsx(A.Alert,{variant:"info",children:c.jsxs("div",{className:"yst-flex yst-w-full",children:[c.jsxs("div",{className:"yst-flex-1 yst-space-y-2",children:[c.jsx("p",{className:"yst-mb-0 yst-font-medium",children:"Analysis still incomplete"}),c.jsxs("p",{className:"yst-mb-0",children:["We still can't retrieve the data. Please wait 24 hours before trying again.",v&&c.jsxs(c.Fragment,{children:[c.jsx("br",{}),"Next retry available: ",c.jsx("strong",{children:x5(q0(v))}),"."]})]})]}),y]})})},m=function(){return c.jsx(A.Alert,{variant:"error",children:c.jsxs("div",{className:"yst-flex yst-w-full",children:[c.jsxs("div",{className:"yst-flex-1 yst-space-y-2",children:[c.jsx("p",{className:"yst-mb-0 yst-font-medium",children:"Analysis still incomplete"}),c.jsx("p",{className:"yst-mb-0",children:"Re-running the analysis didn't resolve the issue. Please contact support so we can investigate the missing data for you."}),c.jsxs("div",{className:"yst-flex yst-gap-4",children:[c.jsx(A.Link,{href:"mailto:support@yoast.com",className:"yst-py-1.5 yst-pr-2 yst-no-underline yst-text-inherit yst-font-medium",variant:"default",children:"Contact support"}),f]})]}),y]})})};return a==="can_retry"?h():a==="cooldown"?p():m()},C5=function(e){var n=e.failedScans,r=e.brandId,i=e.analysisId,s=Wc(n),a=G0(r,i),o=a.mutate,l=a.isPending;if(s==="none")return null;var u=function(y){y.preventDefault(),n.filter(function(h){return h.canManualRetry}).forEach(function(h){o({brandId:r,analysisId:i,scanId:h.id})})};if(s==="can_retry")return l?c.jsx("p",{className:"yst-text-sm yst-text-red-600 yst-mt-1 yst-mb-0",children:"Preparing the scan retry..."}):c.jsxs("p",{className:"yst-text-sm yst-text-red-600 yst-mt-1 yst-mb-0",children:["Analysis incomplete. Please"," ",c.jsx(A.Link,{as:"button",type:"button",className:"yst-text-sm yst-text-red-600",onClick:u,variant:"default",children:"run analysis again"}),"."]});if(s==="cooldown"){var d=W0(n);return c.jsxs("p",{className:"yst-text-sm yst-text-red-600 yst-mt-1 yst-mb-0",children:["Analysis incomplete."," ",d?"You can run the analysis again ".concat(q0(d),"."):"You can run the analysis again later."]})}return c.jsxs("p",{className:"yst-text-sm yst-text-red-600 yst-mt-1 yst-mb-0",children:["Analysis incomplete. Please"," ",c.jsx(A.Link,{href:"mailto:support@yoast.com",className:"yst-text-sm yst-text-red-600",variant:"default",children:"contact support"}),"."]})};function Js(t){"@babel/helpers - typeof";return Js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Js(t)}var $f;function eh(t,e,n){return(e=j5(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j5(t){var e=k5(t,"string");return Js(e)=="symbol"?e:e+""}function k5(t,e){if(Js(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Js(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qu(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Ft(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Ft(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Ft(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Ft(f,"constructor",u),Ft(u,"constructor",l),l.displayName="GeneratorFunction",Ft(u,i,"GeneratorFunction"),Ft(f),Ft(f,i,"Generator"),Ft(f,r,function(){return this}),Ft(f,"toString",function(){return"[object Generator]"}),(Qu=function(){return{w:s,m:y}})()}function Ft(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Ft=function(a,o,l,u){function d(f,y){Ft(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Ft(t,e,n,r)}function th(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function E5(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){th(s,r,i,a,o,"next",l)}function o(l){th(s,r,i,a,o,"throw",l)}a(void 0)})}}function vi(t,e){return I5(t)||P5(t,e)||T5(t,e)||O5()}function O5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
24
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function T5(t,e){if(t){if(typeof t=="string")return nh(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nh(t,e):void 0}}function nh(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function P5(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function I5(t){if(Array.isArray(t))return t}function L5(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var rh="perplexity_tooltip_dismissed",N5=new Date("2026-01-13"),ih="gemini_tooltip_dismissed",M5=new Date("2026-03-01"),Pl=Ir($f||($f=L5(["yst-flex-1 yst-space-y-2"]))),_5=function(e,n){return"yst_legal_alert_dismissed_".concat(e,"_").concat(n)},R5=function(e){var n,r,i,s,a,o,l,u,d,f=e.className,y=xt(),h=y.brandId,p=y.analysisId,m=y.aiProvider,g=es(),v=g.setAiProvider,S=g.setAnalysisId,k=It(),j=ft(),C=F.useState(function(){return localStorage.getItem(rh)==="true"}),b=vi(C,2),w=b[0],x=b[1],L=F.useState(function(){return localStorage.getItem(ih)==="true"}),D=vi(L,2),M=D[0],I=D[1],z=or(),O=z.data,T=yi({query:{select:function(we){var Oe=we.data;return Oe}}}),_=T.data,R=T.isLoading,G=_==null?void 0:_.data,Y=G==null?void 0:G.displayName,E=hi({query:{select:function(we){var Oe=we.data;return Oe==null?void 0:Oe.brands}}}),W=E.data,H=E.isLoading,P=Xo(h,{query:{enabled:!!h,select:function(we){var Oe=we.data;return Oe==null?void 0:Oe.analyses}}}),Q=P.data,Z=P.isLoading,K=ga(h,p,{query:{enabled:!!h&&!!p,select:function(we){var Oe=we.data;return Oe}}}),J=K.data,le=K.isLoading,ue=F.useMemo(function(){var ae,we;return(ae=J==null||(we=J.analysis)===null||we===void 0?void 0:we.completedScans)!==null&&ae!==void 0?ae:[]},[J==null||(n=J.analysis)===null||n===void 0?void 0:n.completedScans]),ie=(r=J==null||(i=J.analysis)===null||i===void 0?void 0:i.failedScans)!==null&&r!==void 0?r:[],ke=(s=J==null||(a=J.analysis)===null||a===void 0?void 0:a.pendingScans)!==null&&s!==void 0?s:[],$=Wc(ie),He=w5(p,$),Nt=F.useState(function(){return localStorage.getItem(He)!==null}),at=vi(Nt,2),Ve=at[0],et=at[1];F.useEffect(function(){et(localStorage.getItem(He)!==null)},[He]);var xn=function(){localStorage.setItem(He,"true"),et(!0)},ot=ue.some(function(ae){return ae.aiProvider===cn.perplexity}),Bn=ue.some(function(ae){return ae.aiProvider===cn.gemini}),Fn=F.useMemo(function(){return new Date},[]),Ue=Fn<N5&&!w&&(O==null?void 0:O.aiProvider)!==cn.perplexity&&!!ot,ye=Fn<M5&&!M&&(O==null?void 0:O.aiProvider)!==cn.gemini&&!!Bn,pe=F.useState(!1),Ae=vi(pe,2),U=Ae[0],X=Ae[1],de=function(){X(!1)},ve=Wx({mutation:{onSuccess:function(){var ae=E5(Qu().m(function Oe(){var Mt,ln,qn,Mr,yl,pl,ml;return Qu().w(function(mi){for(;;)switch(mi.n){case 0:if(Mt=J==null?void 0:J.analysis,ln=(Mt==null?void 0:Mt.completedScans)||[],qn=Q||[],Mr=function(){return Promise.all([k.invalidateQueries({queryKey:Ko(h)}),k.invalidateQueries({queryKey:mn(h,p)}),k.invalidateQueries({queryKey:Jo(h)})])},X(!1),Mt){mi.n=2;break}return j("/brands/".concat(h)),mi.n=1,Mr();case 1:return mi.a(2);case 2:return yl=ln.filter(function(_r){return _r.aiProvider!==m}),yl.length>0?v(yl[0].aiProvider):(pl=qn.filter(function(_r){return _r.id!==p}),pl.length>0?(ml=pl.reduce(function(_r,jd){return new Date(jd.createdAt||0)>new Date(_r.createdAt||0)?jd:_r}),S(ml.id),j("/brands/".concat(h,"/analysis/").concat(ml.id))):(S("latest"),j("/brands/".concat(h)))),mi.n=3,Mr();case 3:return mi.a(2)}},Oe)}));function we(){return ae.apply(this,arguments)}return we}()}}),Ee=ve.mutate,it=ve.isPending,Xt=F.useState(!1),yt=vi(Xt,2),zn=yt[0],wn=yt[1],Te=W==null?void 0:W.find(function(ae){return String(ae.id)===String(h)}),An=(Te==null||(o=Te.settings)===null||o===void 0?void 0:o.enableAutomaticAnalysis)!==!1,st=ue.length>0?ue.map(function(ae){return{value:ae.aiProvider,label:ks(ae.aiProvider)}}):[{value:"",label:"AI platform"}];F.useEffect(function(){if(ue.length>0){var ae=ue.map(function(Oe){return Oe.aiProvider});if(!m||!ae.includes(m)){var we=ue[0].aiProvider;we&&v(we)}}},[ue,m,v]);var hl=Q!=null&&Q.some(function(ae){return String(ae.id)===String(p)})?p:Q&&Q.length>0?Q[0].id:"latest",ja=va(h,{query:{enabled:!!h,select:function(we){var Oe=we.data;return Oe}}}),Un=ja.data,te=ja.isLoading,re=qu(Un==null?void 0:Un.nextScheduledAnalysis),ce=J==null||(l=J.analysis)===null||l===void 0?void 0:l.status,me=F.useState(!1),Me=vi(me,2),lt=Me[0],Hn=Me[1];F.useEffect(function(){var ae,we=J==null||(ae=J.analysis)===null||ae===void 0?void 0:ae.id,Oe=G==null?void 0:G.id;if(!h||!we||!m||!Oe||ce!==yn.completed){Hn(!1);return}var Mt=jo(Oe,h,we,m),ln=window.localStorage.getItem(Mt)!==null;if(!ln&&m==="openai"){var qn=_5(h,we),Mr=window.localStorage.getItem(qn)!==null;Mr&&(window.localStorage.setItem(Mt,"true"),window.localStorage.removeItem(qn),ln=!0)}Hn(!ln)},[h,J==null||(u=J.analysis)===null||u===void 0?void 0:u.id,ce,m,G==null?void 0:G.id]);var Mv=function(we){var Oe;we.preventDefault();var Mt=J==null||(Oe=J.analysis)===null||Oe===void 0?void 0:Oe.id,ln=G==null?void 0:G.id;if(!(!h||!Mt||!m||!ln)){var qn=jo(ln,h,Mt,m);window.localStorage.setItem(qn,"true"),Hn(!1)}},_v=eh(eh({},yn.failed,{alertContent:c.jsx(c.Fragment,{children:"Analysis failed. Try restarting the analysis or contact support if the issue persists."}),alertVariant:"danger"}),yn.cancelled,{alertContent:c.jsx(c.Fragment,{children:"Analysis was cancelled. You can restart the analysis when ready."}),alertVariant:"warning"}),Ad=(d=_v[ce])!==null&&d!==void 0?d:{alertContent:null,alertVariant:"info"},Sd=Ad.alertContent,Rv=Ad.alertVariant,Cd=ce===yn.completed&&O&&["updating","completed"].includes(O.status)&&!O.isUpToDateWithBrandGroups,Dv=(O==null?void 0:O.status)===BS.updating&&Cd===!0,Bv=function(){var we,Oe,Mt=(we=_==null?void 0:_.maxNumberOfActiveBrands)!==null&&we!==void 0?we:0,ln=(Oe=_==null?void 0:_.numberOfActiveBrands)!==null&&Oe!==void 0?Oe:0,qn=Mt-ln,Mr=qn>0;if(!Mr){wn(!0);return}j("/setup")},ka=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;x(!0),we&&localStorage.setItem(rh,"true")},Ea=function(){var we=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;I(!0),we&&localStorage.setItem(ih,"true")};return c.jsxs(c.Fragment,{children:[c.jsx(S0,{isOpen:zn,onClose:function(){return wn(!1)}}),c.jsx(nl,{isOpen:U,onClose:de,onConfirm:function(){h&&p&&O!==null&&O!==void 0&&O.id&&Ee({brandId:h,analysisId:p,scanId:O.id})},isLoading:it,title:"Delete ".concat(ks(m)," analysis?"),description:c.jsxs(c.Fragment,{children:[c.jsxs("p",{children:["This will permanently delete the"," ",c.jsx("b",{children:ks(m)})," analysis for"," ",c.jsx("b",{children:O!=null&&O.finishedAt?_n(new Date(O.finishedAt),"MMMM d, yyyy"):"this date"}),". Analyses from other AI platforms for that date will not be affected."]}),c.jsx("p",{children:"This action cannot be undone."})]}),confirmText:"Yes, delete analysis",cancelText:"No, go back"}),ie.length>0&&!Ve&&c.jsx(S5,{failedScans:ie,brandId:h,analysisId:p,onDismiss:xn}),c.jsx(A.Card,{className:oe("yst-relative yst-overflow-visible",f),children:c.jsxs(A.Card.Content,{className:"yst-mt-0",children:[c.jsxs("div",{className:"yst-flex yst-flex-1 yst-flex-col yst-flex-wrap yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row xl:yst-items-center",children:[c.jsx("div",{className:"xl:yst-max-w-1/4",children:c.jsxs("div",{className:"yst-flex yst-flex-col yst-gap-2 lg:yst-gap-2 xl:yst-flex-row xl:yst-items-baseline",children:[c.jsx(A.Title,{children:c.jsxs(c.Fragment,{children:[R?c.jsx(A.SkeletonLoader,{className:"yst-inline-block yst-h-8 yst-w-64"}):c.jsxs(c.Fragment,{children:["Hi",Y&&" ".concat(Y),","]})," "]})}),c.jsx("p",{className:"yst-text-sm yst-font-normal yst-text-slate-600",children:"welcome to your brand analysis!"})]})}),c.jsxs("div",{className:"yst-flex yst-flex-row yst-flex-wrap yst-items-center yst-justify-end yst-gap-4 yst-self-end md:yst-self-start",children:[c.jsxs(A.Button,{variant:"primary",onClick:Bv,disabled:Z||H||R,children:[c.jsx(A0,{})," Analyze a different brand"]}),c.jsx("div",{className:"yst-relative yst-flex yst-items-center",children:c.jsxs(A.DropdownMenu,{children:[c.jsx(A.DropdownMenu.IconTrigger,{screenReaderTriggerLabel:"Open brand list options",disabled:Z||H||W&&(W==null?void 0:W.length)<1,children:c.jsx(hA,{})}),c.jsx(A.DropdownMenu.List,{className:"yst-absolute yst-right-0 yst-top-full yst-z-40 yst-mt-2 yst-flex yst-w-64 yst-flex-col yst-justify-start",children:c.jsxs(A.DropdownMenu.ButtonItem,{className:"yst-flex yst-justify-start yst-text-red-600 hover:yst-bg-red-50",onClick:function(){return X(!0)},disabled:!O,children:[c.jsx(zc,{className:"yst-h-4 yst-w-4"}),"Delete analysis"]})})]})})]})]}),c.jsx(li,{}),c.jsxs("form",{className:"yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-start",children:[c.jsxs(Pl,{className:"yst-relative",children:[c.jsx(A.Label,{htmlFor:"brand-name",children:"Brand"}),c.jsx(A.Select,{onChange:function(ae){j("/brands/".concat(ae))},id:"brand-name",value:h||"loading",options:W&&W.length>0?W.map(function(ae){return{value:ae.id,label:ae.name}}):[{value:"loading",label:"Loading..."}],disabled:H||!W||W.length<2||!h})]}),c.jsxs(Pl,{className:"yst-relative",children:[c.jsx(A.Label,{htmlFor:"analysis-date",children:"Analysis date"}),c.jsx(H0,{analyses:Q||[],selectedAnalysisId:hl,onAnalysisSelect:function(ae){j("/brands/".concat(h,"/analysis/").concat(String(ae)))},isLoading:Z,disabled:Z||!Q||Q.length<1,id:"analysis-date"})]}),c.jsxs(Pl,{className:"yst-relative",children:[c.jsx("div",{className:"yst-flex yst-items-center yst-gap-2",children:c.jsx(A.Label,{htmlFor:"ai-tool",children:"AI platform"})}),c.jsx(A.Select,{onChange:function(ae){Object.values(cn).includes(ae)?v(ae):console.error("Invalid AI provider selected:",ae),ae===cn.perplexity&&ka(),ae===cn.gemini&&Ea()},id:"ai-tool",value:m,options:le||Z?[{value:m,label:"Loading..."}]:st,disabled:le||Z||st.length<2,buttonProps:{className:oe("yst-select__button",{"yst-ring-2 yst-ring-primary-500":Ue||ye})}}),ie.length>0&&Ve&&c.jsx(C5,{failedScans:ie,brandId:h,analysisId:p}),c.jsx(Jf,{id:"perplexity-introduction-popover",isVisible:Ue,onClose:function(){return ka(!1)},variant:"info",delay:2e3,children:c.jsxs("div",{className:"yst-space-y-3",children:[c.jsxs("div",{className:"yst-flex yst-items-start yst-gap-2",children:[c.jsx(zu,{className:"yst-mt-0.5 yst-h-4 yst-w-4 yst-flex-shrink-0"}),c.jsxs("div",{className:"yst-flex-1 yst-space-y-1",children:[c.jsx(A.Title,{size:"4",className:"yst-text-sm yst-font-medium",children:"New: See how your brand appears in Perplexity"}),c.jsxs("p",{className:"yst-mb-4 yst-text-sm",children:["Select 'Perplexity' from the"," ",c.jsx("strong",{className:"yst-font-medium",children:"AI platform"})," ","dropdown to see how your brand appears."]})]})]}),c.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[c.jsx(A.Button,{variant:"tertiary",size:"small",onClick:function(){return ka(!0)},children:"Dismiss"}),c.jsx(A.Button,{variant:"primary",size:"small",onClick:function(){var ae=st.find(function(we){return we.value===cn.perplexity});ae&&v(cn.perplexity),ka(!0)},children:"Select Perplexity"})]})]})}),c.jsx(Jf,{id:"gemini-introduction-popover",isVisible:ye,onClose:function(){return Ea(!1)},variant:"info",delay:2e3,children:c.jsxs("div",{className:"yst-space-y-3",children:[c.jsxs("div",{className:"yst-flex yst-items-start yst-gap-2",children:[c.jsx(zu,{className:"yst-mt-0.5 yst-h-4 yst-w-4 yst-flex-shrink-0"}),c.jsxs("div",{className:"yst-flex-1 yst-space-y-1",children:[c.jsx(A.Title,{size:"4",className:"yst-text-sm yst-font-medium",children:"New: See how your brand appears in Gemini"}),c.jsxs("p",{className:"yst-mb-4 yst-text-sm",children:["Select 'Gemini' from the"," ",c.jsx("strong",{className:"yst-font-medium",children:"AI platform"})," ","dropdown to see how your brand appears."]})]})]}),c.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[c.jsx(A.Button,{variant:"tertiary",size:"small",onClick:function(){return Ea(!0)},children:"Dismiss"}),c.jsx(A.Button,{variant:"primary",size:"small",onClick:function(){var ae=st.find(function(we){return we.value===cn.gemini});ae&&v(cn.gemini),Ea(!0)},children:"Select Gemini"})]})]})})]})]}),(Te==null?void 0:Te.setupStatus)!=="pendingQuerySelection"&&c.jsxs(c.Fragment,{children:[c.jsx(li,{}),c.jsx("div",{className:"yst-flex yst-items-center yst-justify-center yst-gap-2 yst-text-sm yst-text-slate-600",children:H||te?c.jsx(A.SkeletonLoader,{className:"yst-h-5 yst-w-64"}):ce===yn.processing||Te!=null&&Te.hasAnalysisInProgress?c.jsxs(c.Fragment,{children:[c.jsx(A.Spinner,{size:"3"}),c.jsx("span",{children:"Your analysis is running now, and we'll email you when it's ready."})]}):An?Un!=null&&Un.nextScheduledAnalysis?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"yst-inline-block yst-h-2 yst-w-2 yst-rounded-full yst-bg-green-500"}),c.jsxs("span",{children:["Your analysis is scheduled for ",re,", and we'll email you when it's ready."]})]}):c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"yst-inline-block yst-h-2 yst-w-2 yst-rounded-full yst-bg-slate-400"}),c.jsx("span",{children:"Next analysis date will appear here soon"})]}):c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"yst-inline-block yst-h-2 yst-w-2 yst-rounded-full yst-bg-slate-400"}),c.jsxs("span",{children:["Automatic analysis is paused ·"," ",c.jsx(A.Link,{as:an,to:"/settings",className:"yst-font-medium yst-text-primary-500 yst-underline",children:"Enable in Settings"})]})]})})]})]})}),c.jsxs("div",{className:"ystaii-alerts yst-space-y-4",children:[lt&&c.jsx(A.Alert,{children:c.jsxs("div",{className:"yst-flex yst-w-full",children:[c.jsx("div",{className:"yst-max-w-xl yst-space-y-4",children:c.jsx("p",{className:"yst-mb-0",children:"Note: These insights are produced using AI and may contain errors."})}),c.jsx("div",{className:"yst-ml-auto",children:c.jsx(A.Link,{onClick:Mv,variant:"default",children:c.jsx($o,{})})})]})}),ce!==yn.completed&&Sd&&c.jsx(A.Alert,{className:"md:yst-col-span-2",variant:Rv,children:Sd}),ce===yn.completed&&ke.some(function(ae){return ae.manualRetryCount>=1})&&c.jsx(A.Alert,{variant:"info",children:function(){var ae=ke.filter(function(Oe){return Oe.manualRetryCount>=1}),we=ae.map(function(Oe){return ks(Oe.aiProvider)});return ae.length===1?c.jsxs(c.Fragment,{children:["Retrying the ",we[0]," scan — this may take a few minutes."]}):c.jsxs(c.Fragment,{children:["Retrying the ",we.join(" and ")," scans — this may take a few minutes."]})}()}),Cd&&c.jsxs(A.Alert,{variant:"warning",children:["Note: This scan is not up to date with your current brand groups.",Dv?c.jsxs(c.Fragment,{children:[" ","We're updating your sentiment analysis to reflect your new brand groups. This may take a few minutes."]}):c.jsx(c.Fragment,{children:" Newer scans will use your newly selected brand groupings."})]})]}),Te&&c.jsx(HC,{brand:Te},Te.id),Te&&c.jsx(e5,{brand:Te},"trial-".concat(Te.id))]})},D5=function(){var e,n,r,i=or(),s=i.data,a=i.isLoading,o=i.isRefetching,l=s==null?void 0:s.mentions;return c.jsx(A.Card,{className:"yst-overflow-visible",children:c.jsxs(A.Card.Content,{className:"yst-space-y-4",children:[c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx(wa,{title:"Mentions",tooltip:"The queries where your brand was mentioned."}),c.jsx(ts,{score:l==null||(e=l.mentionedInNumberOfQueries)===null||e===void 0?void 0:e.value,total:l==null||(n=l.queriesWithMentions)===null||n===void 0?void 0:n.length,suffix:"queries",isLoading:a||o})]}),!a&&l?c.jsx("ul",{children:l==null||(r=l.queriesWithMentions)===null||r===void 0?void 0:r.map(function(u,d){var f=d===0,y=l.queriesWithMentions&&d===l.queriesWithMentions.length-1;return c.jsxs("li",{className:oe("yst-flex yst-flex-row yst-items-center yst-gap-2 yst-border-l yst-border-r yst-border-slate-300 yst-p-4 yst-font-medium yst-text-slate-800",{"yst-rounded-t-lg yst-border-t":f,"yst-rounded-b-lg yst-border-b":y,"yst-border-b":!y}),children:[c.jsx("div",{className:"yst-h-4 yst-w-4",children:u!=null&&u.mentioned?c.jsx(nA,{className:"yst-text-green-500"}):c.jsx(MA,{className:"yst-text-red-500"})}),c.jsx("span",{className:"yst-justify-start",children:u.query}),c.jsx("span",{className:"yst-ml-auto yst-flex yst-items-end",children:u!=null&&u.mentioned?c.jsx(A.Badge,{className:"yst-bg-green-100 yst-text-green-800",children:"Found"}):c.jsx(A.Badge,{className:"yst-bg-red-100 yst-text-red-800",children:"Not found"})})]},u.query)})}):c.jsx(A.SkeletonLoader,{className:"yst-h-56 yst-w-full"})]})})};function Aa(t){return t+.5|0}const Ar=(t,e,n)=>Math.max(Math.min(t,n),e);function Es(t){return Ar(Aa(t*2.55),0,255)}function Er(t){return Ar(Aa(t*255),0,255)}function Kn(t){return Ar(Aa(t/2.55)/100,0,1)}function sh(t){return Ar(Aa(t*100),0,100)}const Jt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Yu=[..."0123456789ABCDEF"],B5=t=>Yu[t&15],F5=t=>Yu[(t&240)>>4]+Yu[t&15],La=t=>(t&240)>>4===(t&15),z5=t=>La(t.r)&&La(t.g)&&La(t.b)&&La(t.a);function U5(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Jt[t[1]]*17,g:255&Jt[t[2]]*17,b:255&Jt[t[3]]*17,a:e===5?Jt[t[4]]*17:255}:(e===7||e===9)&&(n={r:Jt[t[1]]<<4|Jt[t[2]],g:Jt[t[3]]<<4|Jt[t[4]],b:Jt[t[5]]<<4|Jt[t[6]],a:e===9?Jt[t[7]]<<4|Jt[t[8]]:255})),n}const H5=(t,e)=>t<255?e(t):"";function q5(t){var e=z5(t)?B5:F5;return t?"#"+e(t.r)+e(t.g)+e(t.b)+H5(t.a,e):void 0}const W5=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Q0(t,e,n){const r=e*Math.min(n,1-n),i=(s,a=(s+t/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function G5(t,e,n){const r=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function Q5(t,e,n){const r=Q0(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)r[i]*=1-e-n,r[i]+=e;return r}function Y5(t,e,n,r,i){return t===i?(e-n)/r+(e<n?6:0):e===i?(n-t)/r+2:(t-e)/r+4}function Gc(t){const n=t.r/255,r=t.g/255,i=t.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=(s+a)/2;let l,u,d;return s!==a&&(d=s-a,u=o>.5?d/(2-s-a):d/(s+a),l=Y5(n,r,i,d,s),l=l*60+.5),[l|0,u||0,o]}function Qc(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(Er)}function Yc(t,e,n){return Qc(Q0,t,e,n)}function V5(t,e,n){return Qc(Q5,t,e,n)}function K5(t,e,n){return Qc(G5,t,e,n)}function Y0(t){return(t%360+360)%360}function X5(t){const e=W5.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?Es(+e[5]):Er(+e[5]));const i=Y0(+e[2]),s=+e[3]/100,a=+e[4]/100;return e[1]==="hwb"?r=V5(i,s,a):e[1]==="hsv"?r=K5(i,s,a):r=Yc(i,s,a),{r:r[0],g:r[1],b:r[2],a:n}}function J5(t,e){var n=Gc(t);n[0]=Y0(n[0]+e),n=Yc(n),t.r=n[0],t.g=n[1],t.b=n[2]}function Z5(t){if(!t)return;const e=Gc(t),n=e[0],r=sh(e[1]),i=sh(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${i}%, ${Kn(t.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const ah={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},oh={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function $5(){const t={},e=Object.keys(oh),n=Object.keys(ah);let r,i,s,a,o;for(r=0;r<e.length;r++){for(a=o=e[r],i=0;i<n.length;i++)s=n[i],o=o.replace(s,ah[s]);s=parseInt(oh[a],16),t[o]=[s>>16&255,s>>8&255,s&255]}return t}let Na;function e6(t){Na||(Na=$5(),Na.transparent=[0,0,0,0]);const e=Na[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const t6=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function n6(t){const e=t6.exec(t);let n=255,r,i,s;if(e){if(e[7]!==r){const a=+e[7];n=e[8]?Es(a):Ar(a*255,0,255)}return r=+e[1],i=+e[3],s=+e[5],r=255&(e[2]?Es(r):Ar(r,0,255)),i=255&(e[4]?Es(i):Ar(i,0,255)),s=255&(e[6]?Es(s):Ar(s,0,255)),{r,g:i,b:s,a:n}}}function r6(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Kn(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Il=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,bi=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function i6(t,e,n){const r=bi(Kn(t.r)),i=bi(Kn(t.g)),s=bi(Kn(t.b));return{r:Er(Il(r+n*(bi(Kn(e.r))-r))),g:Er(Il(i+n*(bi(Kn(e.g))-i))),b:Er(Il(s+n*(bi(Kn(e.b))-s))),a:t.a+n*(e.a-t.a)}}function Ma(t,e,n){if(t){let r=Gc(t);r[e]=Math.max(0,Math.min(r[e]+r[e]*n,e===0?360:1)),r=Yc(r),t.r=r[0],t.g=r[1],t.b=r[2]}}function V0(t,e){return t&&Object.assign(e||{},t)}function lh(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Er(t[3]))):(e=V0(t,{r:0,g:0,b:0,a:1}),e.a=Er(e.a)),e}function s6(t){return t.charAt(0)==="r"?n6(t):X5(t)}class Zs{constructor(e){if(e instanceof Zs)return e;const n=typeof e;let r;n==="object"?r=lh(e):n==="string"&&(r=U5(e)||e6(e)||s6(e)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var e=V0(this._rgb);return e&&(e.a=Kn(e.a)),e}set rgb(e){this._rgb=lh(e)}rgbString(){return this._valid?r6(this._rgb):void 0}hexString(){return this._valid?q5(this._rgb):void 0}hslString(){return this._valid?Z5(this._rgb):void 0}mix(e,n){if(e){const r=this.rgb,i=e.rgb;let s;const a=n===s?.5:n,o=2*a-1,l=r.a-i.a,u=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;s=1-u,r.r=255&u*r.r+s*i.r+.5,r.g=255&u*r.g+s*i.g+.5,r.b=255&u*r.b+s*i.b+.5,r.a=a*r.a+(1-a)*i.a,this.rgb=r}return this}interpolate(e,n){return e&&(this._rgb=i6(this._rgb,e._rgb,n)),this}clone(){return new Zs(this.rgb)}alpha(e){return this._rgb.a=Er(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Aa(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ma(this._rgb,2,e),this}darken(e){return Ma(this._rgb,2,-e),this}saturate(e){return Ma(this._rgb,1,e),this}desaturate(e){return Ma(this._rgb,1,-e),this}rotate(e){return J5(this._rgb,e),this}}function Wn(){}const a6=(()=>{let t=0;return()=>t++})();function De(t){return t==null}function Ge(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function je(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function rt(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function jn(t,e){return rt(t)?t:e}function Se(t,e){return typeof t=="undefined"?e:t}const o6=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Fe(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Re(t,e,n,r){let i,s,a;if(Ge(t))for(s=t.length,i=0;i<s;i++)e.call(n,t[i],i);else if(je(t))for(a=Object.keys(t),s=a.length,i=0;i<s;i++)e.call(n,t[a[i]],a[i])}function ko(t,e){let n,r,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function Eo(t){if(Ge(t))return t.map(Eo);if(je(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let i=0;for(;i<r;++i)e[n[i]]=Eo(t[n[i]]);return e}return t}function K0(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function l6(t,e,n,r){if(!K0(t))return;const i=e[t],s=n[t];je(i)&&je(s)?$s(i,s,r):e[t]=Eo(s)}function $s(t,e,n){const r=Ge(e)?e:[e],i=r.length;if(!je(t))return t;n=n||{};const s=n.merger||l6;let a;for(let o=0;o<i;++o){if(a=r[o],!je(a))continue;const l=Object.keys(a);for(let u=0,d=l.length;u<d;++u)s(l[u],t,a,n)}return t}function Ms(t,e){return $s(t,e,{merger:u6})}function u6(t,e,n){if(!K0(t))return;const r=e[t],i=n[t];je(r)&&je(i)?Ms(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Eo(i))}const uh={"":t=>t,x:t=>t.x,y:t=>t.y};function c6(t){const e=t.split("."),n=[];let r="";for(const i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function d6(t){const e=c6(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function ea(t,e){return(uh[e]||(uh[e]=d6(e)))(t)}function Vc(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Oo=t=>typeof t!="undefined",Tr=t=>typeof t=="function",ch=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function f6(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Je=Math.PI,Kt=2*Je,h6=Kt+Je,To=Number.POSITIVE_INFINITY,y6=Je/180,Yt=Je/2,Rr=Je/4,dh=Je*2/3,X0=Math.log10,Gi=Math.sign;function _s(t,e,n){return Math.abs(t-e)<n}function fh(t){const e=Math.round(t);t=_s(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(X0(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function p6(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function m6(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function ta(t){return!m6(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function g6(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function v6(t,e,n){let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Sr(t){return t*(Je/180)}function Kc(t){return t*(180/Je)}function hh(t){if(!rt(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function b6(t,e){const n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*Je&&(s+=Kt),{angle:s,distance:i}}function Vu(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x6(t,e){return(t-e+h6)%Kt-Je}function Qt(t){return(t%Kt+Kt)%Kt}function J0(t,e,n,r){const i=Qt(t),s=Qt(e),a=Qt(n),o=Qt(s-i),l=Qt(a-i),u=Qt(i-s),d=Qt(i-a);return i===s||i===a||r&&s===a||o>l&&u<d}function nn(t,e,n){return Math.max(e,Math.min(n,t))}function w6(t){return nn(t,-32768,32767)}function Si(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function Xc(t,e,n){n=n||(a=>t[a]<e);let r=t.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const Wr=(t,e,n,r)=>Xc(t,n,r?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),A6=(t,e,n)=>Xc(t,n,r=>t[r][e]>=n);function S6(t,e,n){let r=0,i=t.length;for(;r<i&&t[r]<e;)r++;for(;i>r&&t[i-1]>n;)i--;return r>0||i<t.length?t.slice(r,i):t}const Z0=["push","pop","shift","splice","unshift"];function C6(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Z0.forEach(n=>{const r="_onData"+Vc(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const a=i.apply(this,s);return t._chartjs.listeners.forEach(o=>{typeof o[r]=="function"&&o[r](...s)}),a}})})}function yh(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(e);i!==-1&&r.splice(i,1),!(r.length>0)&&(Z0.forEach(s=>{delete t[s]}),delete t._chartjs)}function j6(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const $0=function(){return typeof window=="undefined"?function(t){return t()}:window.requestAnimationFrame}();function eg(t,e){let n=[],r=!1;return function(...i){n=i,r||(r=!0,$0.call(window,()=>{r=!1,t.apply(e,n)}))}}function k6(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const Jc=t=>t==="start"?"left":t==="end"?"right":"center",ut=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,E6=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function O6(t,e,n){const r=e.length;let i=0,s=r;if(t._sorted){const{iScale:a,vScale:o,_parsed:l}=t,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,d=a.axis,{min:f,max:y,minDefined:h,maxDefined:p}=a.getUserBounds();if(h){if(i=Math.min(Wr(l,d,f).lo,n?r:Wr(e,d,a.getPixelForValue(f)).lo),u){const m=l.slice(0,i+1).reverse().findIndex(g=>!De(g[o.axis]));i-=Math.max(0,m)}i=nn(i,0,r-1)}if(p){let m=Math.max(Wr(l,a.axis,y,!0).hi+1,n?0:Wr(e,d,a.getPixelForValue(y),!0).hi+1);if(u){const g=l.slice(m-1).findIndex(v=>!De(v[o.axis]));m+=Math.max(0,g)}s=nn(m,i,r)-i}else s=r-i}return{start:i,count:s}}function T6(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;const s=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const _a=t=>t===0||t===1,ph=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Kt/n)),mh=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*Kt/n)+1,Rs={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Yt)+1,easeOutSine:t=>Math.sin(t*Yt),easeInOutSine:t=>-.5*(Math.cos(Je*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>_a(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>_a(t)?t:ph(t,.075,.3),easeOutElastic:t=>_a(t)?t:mh(t,.075,.3),easeInOutElastic(t){return _a(t)?t:t<.5?.5*ph(t*2,.1125,.45):.5+.5*mh(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Rs.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Rs.easeInBounce(t*2)*.5:Rs.easeOutBounce(t*2-1)*.5+.5};function Zc(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function gh(t){return Zc(t)?t:new Zs(t)}function Ll(t){return Zc(t)?t:new Zs(t).saturate(.5).darken(.1).hexString()}const P6=["x","y","borderWidth","radius","tension"],I6=["color","borderColor","backgroundColor"];function L6(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:I6},numbers:{type:"number",properties:P6}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function N6(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const vh=new Map;function M6(t,e){e=e||{};const n=t+JSON.stringify(e);let r=vh.get(n);return r||(r=new Intl.NumberFormat(t,e),vh.set(n,r)),r}function tg(t,e,n){return M6(e,n).format(t)}const _6={values(t){return Ge(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let i,s=t;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),s=R6(t,n)}const a=X0(Math.abs(s)),o=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),tg(t,r,l)}};function R6(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var $c={formatters:_6};function D6(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:$c.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const ui=Object.create(null),Ku=Object.create(null);function Ds(t,e){if(!e)return t;const n=e.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];t=t[s]||(t[s]=Object.create(null))}return t}function Nl(t,e,n){return typeof e=="string"?$s(Ds(t,e),n):$s(Ds(t,""),e)}class B6{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Ll(i.backgroundColor),this.hoverBorderColor=(r,i)=>Ll(i.borderColor),this.hoverColor=(r,i)=>Ll(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Nl(this,e,n)}get(e){return Ds(this,e)}describe(e,n){return Nl(Ku,e,n)}override(e,n){return Nl(ui,e,n)}route(e,n,r,i){const s=Ds(this,e),a=Ds(this,r),o="_"+n;Object.defineProperties(s,{[o]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[o],u=a[i];return je(l)?Object.assign({},u,l):Se(l,u)},set(l){this[o]=l}}})}apply(e){e.forEach(n=>n(this))}}var Ye=new B6({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[L6,N6,D6]);function F6(t){return!t||De(t.size)||De(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Po(t,e,n,r,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>r&&(r=s),r}function z6(t,e,n,r){r=r||{};let i=r.data=r.data||{},s=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(i=r.data={},s=r.garbageCollect=[],r.font=e),t.save(),t.font=e;let a=0;const o=n.length;let l,u,d,f,y;for(l=0;l<o;l++)if(f=n[l],f!=null&&!Ge(f))a=Po(t,i,s,a,f);else if(Ge(f))for(u=0,d=f.length;u<d;u++)y=f[u],y!=null&&!Ge(y)&&(a=Po(t,i,s,a,y));t.restore();const h=s.length/2;if(h>n.length){for(l=0;l<h;l++)delete i[s[l]];s.splice(0,h)}return a}function Dr(t,e,n){const r=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function bh(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Xu(t,e,n,r){ng(t,e,n,r,null)}function ng(t,e,n,r,i){let s,a,o,l,u,d,f,y;const h=e.pointStyle,p=e.rotation,m=e.radius;let g=(p||0)*y6;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(g),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),t.restore();return}if(!(isNaN(m)||m<=0)){switch(t.beginPath(),h){default:i?t.ellipse(n,r,i/2,m,0,0,Kt):t.arc(n,r,m,0,Kt),t.closePath();break;case"triangle":d=i?i/2:m,t.moveTo(n+Math.sin(g)*d,r-Math.cos(g)*m),g+=dh,t.lineTo(n+Math.sin(g)*d,r-Math.cos(g)*m),g+=dh,t.lineTo(n+Math.sin(g)*d,r-Math.cos(g)*m),t.closePath();break;case"rectRounded":u=m*.516,l=m-u,a=Math.cos(g+Rr)*l,f=Math.cos(g+Rr)*(i?i/2-u:l),o=Math.sin(g+Rr)*l,y=Math.sin(g+Rr)*(i?i/2-u:l),t.arc(n-f,r-o,u,g-Je,g-Yt),t.arc(n+y,r-a,u,g-Yt,g),t.arc(n+f,r+o,u,g,g+Yt),t.arc(n-y,r+a,u,g+Yt,g+Je),t.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*m,d=i?i/2:l,t.rect(n-d,r-l,2*d,2*l);break}g+=Rr;case"rectRot":f=Math.cos(g)*(i?i/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,y=Math.sin(g)*(i?i/2:m),t.moveTo(n-f,r-o),t.lineTo(n+y,r-a),t.lineTo(n+f,r+o),t.lineTo(n-y,r+a),t.closePath();break;case"crossRot":g+=Rr;case"cross":f=Math.cos(g)*(i?i/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,y=Math.sin(g)*(i?i/2:m),t.moveTo(n-f,r-o),t.lineTo(n+f,r+o),t.moveTo(n+y,r-a),t.lineTo(n-y,r+a);break;case"star":f=Math.cos(g)*(i?i/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,y=Math.sin(g)*(i?i/2:m),t.moveTo(n-f,r-o),t.lineTo(n+f,r+o),t.moveTo(n+y,r-a),t.lineTo(n-y,r+a),g+=Rr,f=Math.cos(g)*(i?i/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,y=Math.sin(g)*(i?i/2:m),t.moveTo(n-f,r-o),t.lineTo(n+f,r+o),t.moveTo(n+y,r-a),t.lineTo(n-y,r+a);break;case"line":a=i?i/2:Math.cos(g)*m,o=Math.sin(g)*m,t.moveTo(n-a,r-o),t.lineTo(n+a,r+o);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(g)*(i?i/2:m),r+Math.sin(g)*m);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function nr(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function rl(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function il(t){t.restore()}function U6(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function H6(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function q6(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),De(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function W6(t,e,n,r,i){if(i.strikethrough||i.underline){const s=t.measureText(r),a=e-s.actualBoundingBoxLeft,o=e+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,u=n+s.actualBoundingBoxDescent,d=i.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(a,d),t.lineTo(o,d),t.stroke()}}function G6(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function ci(t,e,n,r,i,s={}){const a=Ge(e)?e:[e],o=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(t.save(),t.font=i.string,q6(t,s),l=0;l<a.length;++l)u=a[l],s.backdrop&&G6(t,s.backdrop),o&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),De(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(u,n,r,s.maxWidth)),t.fillText(u,n,r,s.maxWidth),W6(t,n,r,u,s),r+=Number(i.lineHeight);t.restore()}function Io(t,e){const{x:n,y:r,w:i,h:s,radius:a}=e;t.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*Je,Je,!0),t.lineTo(n,r+s-a.bottomLeft),t.arc(n+a.bottomLeft,r+s-a.bottomLeft,a.bottomLeft,Je,Yt,!0),t.lineTo(n+i-a.bottomRight,r+s),t.arc(n+i-a.bottomRight,r+s-a.bottomRight,a.bottomRight,Yt,0,!0),t.lineTo(n+i,r+a.topRight),t.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Yt,!0),t.lineTo(n+a.topLeft,r)}const Q6=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Y6=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function V6(t,e){const n=(""+t).match(Q6);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const K6=t=>+t||0;function rg(t,e){const n={},r=je(e),i=r?Object.keys(e):e,s=je(t)?r?a=>Se(t[a],t[e[a]]):a=>t[a]:()=>t;for(const a of i)n[a]=K6(s(a));return n}function X6(t){return rg(t,{top:"y",right:"x",bottom:"y",left:"x"})}function ki(t){return rg(t,["topLeft","topRight","bottomLeft","bottomRight"])}function dt(t){const e=X6(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function $e(t,e){t=t||{},e=e||Ye.font;let n=Se(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=Se(t.style,e.style);r&&!(""+r).match(Y6)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Se(t.family,e.family),lineHeight:V6(Se(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:Se(t.weight,e.weight),string:""};return i.string=F6(i),i}function Ra(t,e,n,r){let i,s,a;for(i=0,s=t.length;i<s;++i)if(a=t[i],a!==void 0&&a!==void 0)return a}function J6(t,e,n){const{min:r,max:i}=t,s=o6(e,(i-r)/2),a=(o,l)=>n&&o===0?0:o+l;return{min:a(r,-Math.abs(s)),max:a(i,s)}}function Lr(t,e){return Object.assign(Object.create(t),e)}function ed(t,e=[""],n,r,i=()=>t[0]){const s=n||t;typeof r=="undefined"&&(r=og("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:r,_getTarget:i,override:o=>ed([o,...t],e,s,r)};return new Proxy(a,{deleteProperty(o,l){return delete o[l],delete o._keys,delete t[0][l],!0},get(o,l){return sg(o,l,()=>sj(l,e,t,o))},getOwnPropertyDescriptor(o,l){return Reflect.getOwnPropertyDescriptor(o._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(o,l){return wh(o).includes(l)},ownKeys(o){return wh(o)},set(o,l,u){const d=o._storage||(o._storage=i());return o[l]=d[l]=u,delete o._keys,!0}})}function Qi(t,e,n,r){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:ig(t,r),setContext:s=>Qi(t,s,n,r),override:s=>Qi(t.override(s),e,n,r)};return new Proxy(i,{deleteProperty(s,a){return delete s[a],delete t[a],!0},get(s,a,o){return sg(s,a,()=>$6(s,a,o))},getOwnPropertyDescriptor(s,a){return s._descriptors.allKeys?Reflect.has(t,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,a)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,a){return Reflect.has(t,a)},ownKeys(){return Reflect.ownKeys(t)},set(s,a,o){return t[a]=o,delete s[a],!0}})}function ig(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Tr(n)?n:()=>n,isIndexable:Tr(r)?r:()=>r}}const Z6=(t,e)=>t?t+Vc(e):e,td=(t,e)=>je(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function sg(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const r=n();return t[e]=r,r}function $6(t,e,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:a}=t;let o=r[e];return Tr(o)&&a.isScriptable(e)&&(o=ej(e,o,t,n)),Ge(o)&&o.length&&(o=tj(e,o,t,a.isIndexable)),td(e,o)&&(o=Qi(o,i,s&&s[e],a)),o}function ej(t,e,n,r){const{_proxy:i,_context:s,_subProxy:a,_stack:o}=n;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let l=e(s,a||r);return o.delete(t),td(t,l)&&(l=nd(i._scopes,i,t,l)),l}function tj(t,e,n,r){const{_proxy:i,_context:s,_subProxy:a,_descriptors:o}=n;if(typeof s.index!="undefined"&&r(t))return e[s.index%e.length];if(je(e[0])){const l=e,u=i._scopes.filter(d=>d!==l);e=[];for(const d of l){const f=nd(u,i,t,d);e.push(Qi(f,s,a&&a[t],o))}}return e}function ag(t,e,n){return Tr(t)?t(e,n):t}const nj=(t,e)=>t===!0?e:typeof t=="string"?ea(e,t):void 0;function rj(t,e,n,r,i){for(const s of e){const a=nj(n,s);if(a){t.add(a);const o=ag(a._fallback,n,i);if(typeof o!="undefined"&&o!==n&&o!==r)return o}else if(a===!1&&typeof r!="undefined"&&n!==r)return null}return!1}function nd(t,e,n,r){const i=e._rootScopes,s=ag(e._fallback,n,r),a=[...t,...i],o=new Set;o.add(r);let l=xh(o,a,n,s||n,r);return l===null||typeof s!="undefined"&&s!==n&&(l=xh(o,a,s,l,r),l===null)?!1:ed(Array.from(o),[""],i,s,()=>ij(e,n,r))}function xh(t,e,n,r,i){for(;n;)n=rj(t,e,n,r,i);return n}function ij(t,e,n){const r=t._getTarget();e in r||(r[e]={});const i=r[e];return Ge(i)&&je(n)?n:i||{}}function sj(t,e,n,r){let i;for(const s of e)if(i=og(Z6(s,t),n),typeof i!="undefined")return td(t,i)?nd(n,r,t,i):i}function og(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r!="undefined")return r}}function wh(t){let e=t._keys;return e||(e=t._keys=aj(t._scopes)),e}function aj(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(r);return Array.from(e)}function oj(t,e,n,r){const{iScale:i}=t,{key:s="r"}=this._parsing,a=new Array(r);let o,l,u,d;for(o=0,l=r;o<l;++o)u=o+n,d=e[u],a[o]={r:i.parse(ea(d,s),u)};return a}const lj=Number.EPSILON||1e-14,Yi=(t,e)=>e<t.length&&!t[e].skip&&t[e],lg=t=>t==="x"?"y":"x";function uj(t,e,n,r){const i=t.skip?e:t,s=e,a=n.skip?e:n,o=Vu(s,i),l=Vu(a,s);let u=o/(o+l),d=l/(o+l);u=isNaN(u)?0:u,d=isNaN(d)?0:d;const f=r*u,y=r*d;return{previous:{x:s.x-f*(a.x-i.x),y:s.y-f*(a.y-i.y)},next:{x:s.x+y*(a.x-i.x),y:s.y+y*(a.y-i.y)}}}function cj(t,e,n){const r=t.length;let i,s,a,o,l,u=Yi(t,0);for(let d=0;d<r-1;++d)if(l=u,u=Yi(t,d+1),!(!l||!u)){if(_s(e[d],0,lj)){n[d]=n[d+1]=0;continue}i=n[d]/e[d],s=n[d+1]/e[d],o=Math.pow(i,2)+Math.pow(s,2),!(o<=9)&&(a=3/Math.sqrt(o),n[d]=i*a*e[d],n[d+1]=s*a*e[d])}}function dj(t,e,n="x"){const r=lg(n),i=t.length;let s,a,o,l=Yi(t,0);for(let u=0;u<i;++u){if(a=o,o=l,l=Yi(t,u+1),!o)continue;const d=o[n],f=o[r];a&&(s=(d-a[n])/3,o[`cp1${n}`]=d-s,o[`cp1${r}`]=f-s*e[u]),l&&(s=(l[n]-d)/3,o[`cp2${n}`]=d+s,o[`cp2${r}`]=f+s*e[u])}}function fj(t,e="x"){const n=lg(e),r=t.length,i=Array(r).fill(0),s=Array(r);let a,o,l,u=Yi(t,0);for(a=0;a<r;++a)if(o=l,l=u,u=Yi(t,a+1),!!l){if(u){const d=u[e]-l[e];i[a]=d!==0?(u[n]-l[n])/d:0}s[a]=o?u?Gi(i[a-1])!==Gi(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}cj(t,i,s),dj(t,s,e)}function Da(t,e,n){return Math.max(Math.min(t,n),e)}function hj(t,e){let n,r,i,s,a,o=nr(t[0],e);for(n=0,r=t.length;n<r;++n)a=s,s=o,o=n<r-1&&nr(t[n+1],e),s&&(i=t[n],a&&(i.cp1x=Da(i.cp1x,e.left,e.right),i.cp1y=Da(i.cp1y,e.top,e.bottom)),o&&(i.cp2x=Da(i.cp2x,e.left,e.right),i.cp2y=Da(i.cp2y,e.top,e.bottom)))}function yj(t,e,n,r,i){let s,a,o,l;if(e.spanGaps&&(t=t.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")fj(t,i);else{let u=r?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)o=t[s],l=uj(u,o,t[Math.min(s+1,a-(r?0:1))%a],e.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,u=o}e.capBezierPoints&&hj(t,n)}function rd(){return typeof window!="undefined"&&typeof document!="undefined"}function id(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Lo(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}const sl=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function pj(t,e){return sl(t).getPropertyValue(e)}const mj=["top","right","bottom","left"];function ri(t,e,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=mj[i];r[s]=parseFloat(t[e+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const gj=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function vj(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=r;let a=!1,o,l;if(gj(i,s,t.target))o=i,l=s;else{const u=e.getBoundingClientRect();o=r.clientX-u.left,l=r.clientY-u.top,a=!0}return{x:o,y:l,box:a}}function zr(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,i=sl(n),s=i.boxSizing==="border-box",a=ri(i,"padding"),o=ri(i,"border","width"),{x:l,y:u,box:d}=vj(t,n),f=a.left+(d&&o.left),y=a.top+(d&&o.top);let{width:h,height:p}=e;return s&&(h-=a.width+o.width,p-=a.height+o.height),{x:Math.round((l-f)/h*n.width/r),y:Math.round((u-y)/p*n.height/r)}}function bj(t,e,n){let r,i;if(e===void 0||n===void 0){const s=t&&id(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const a=s.getBoundingClientRect(),o=sl(s),l=ri(o,"border","width"),u=ri(o,"padding");e=a.width-u.width-l.width,n=a.height-u.height-l.height,r=Lo(o.maxWidth,s,"clientWidth"),i=Lo(o.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:r||To,maxHeight:i||To}}const Cr=t=>Math.round(t*10)/10;function xj(t,e,n,r){const i=sl(t),s=ri(i,"margin"),a=Lo(i.maxWidth,t,"clientWidth")||To,o=Lo(i.maxHeight,t,"clientHeight")||To,l=bj(t,e,n);let{width:u,height:d}=l;if(i.boxSizing==="content-box"){const y=ri(i,"border","width"),h=ri(i,"padding");u-=h.width+y.width,d-=h.height+y.height}return u=Math.max(0,u-s.width),d=Math.max(0,r?u/r:d-s.height),u=Cr(Math.min(u,a,l.maxWidth)),d=Cr(Math.min(d,o,l.maxHeight)),u&&!d&&(d=Cr(u/2)),(e!==void 0||n!==void 0)&&r&&l.height&&d>l.height&&(d=l.height,u=Cr(Math.floor(d*r))),{width:u,height:d}}function Ah(t,e,n){const r=e||1,i=Cr(t.height*r),s=Cr(t.width*r);t.height=Cr(t.height),t.width=Cr(t.width);const a=t.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||a.height!==i||a.width!==s?(t.currentDevicePixelRatio=r,a.height=i,a.width=s,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const wj=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};rd()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(e){}return t}();function Sh(t,e){const n=pj(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Ur(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Aj(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function Sj(t,e,n,r){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=Ur(t,i,n),o=Ur(i,s,n),l=Ur(s,e,n),u=Ur(a,o,n),d=Ur(o,l,n);return Ur(u,d,n)}const Cj=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},jj=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Ei(t,e,n){return t?Cj(e,n):jj()}function ug(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function cg(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function dg(t){return t==="angle"?{between:J0,compare:x6,normalize:Qt}:{between:Si,compare:(e,n)=>e-n,normalize:e=>e}}function Ch({start:t,end:e,count:n,loop:r,style:i}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:i}}function kj(t,e,n){const{property:r,start:i,end:s}=n,{between:a,normalize:o}=dg(r),l=e.length;let{start:u,end:d,loop:f}=t,y,h;if(f){for(u+=l,d+=l,y=0,h=l;y<h&&a(o(e[u%l][r]),i,s);++y)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:f,style:t.style}}function fg(t,e,n){if(!n)return[t];const{property:r,start:i,end:s}=n,a=e.length,{compare:o,between:l,normalize:u}=dg(r),{start:d,end:f,loop:y,style:h}=kj(t,e,n),p=[];let m=!1,g=null,v,S,k;const j=()=>l(i,k,v)&&o(i,k)!==0,C=()=>o(s,v)===0||l(s,k,v),b=()=>m||j(),w=()=>!m||C();for(let x=d,L=d;x<=f;++x)S=e[x%a],!S.skip&&(v=u(S[r]),v!==k&&(m=l(v,i,s),g===null&&b()&&(g=o(v,i)===0?x:L),g!==null&&w()&&(p.push(Ch({start:g,end:x,loop:y,count:a,style:h})),g=null),L=x,k=v));return g!==null&&p.push(Ch({start:g,end:f,loop:y,count:a,style:h})),p}function hg(t,e){const n=[],r=t.segments;for(let i=0;i<r.length;i++){const s=fg(r[i],t.points,e);s.length&&n.push(...s)}return n}function Ej(t,e,n,r){let i=0,s=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function Oj(t,e,n,r){const i=t.length,s=[];let a=e,o=t[e],l;for(l=e+1;l<=n;++l){const u=t[l%i];u.skip||u.stop?o.skip||(r=!1,s.push({start:e%i,end:(l-1)%i,loop:r}),e=a=u.stop?l:null):(a=l,o.skip&&(e=l)),o=u}return a!==null&&s.push({start:e%i,end:a%i,loop:r}),s}function Tj(t,e){const n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:a,end:o}=Ej(n,i,s,r);if(r===!0)return jh(t,[{start:a,end:o,loop:s}],n,e);const l=o<a?o+i:o,u=!!t._fullLoop&&a===0&&o===i-1;return jh(t,Oj(n,a,l,u),n,e)}function jh(t,e,n,r){return!r||!r.setContext||!n?e:Pj(t,e,n,r)}function Pj(t,e,n,r){const i=t._chart.getContext(),s=kh(t.options),{_datasetIndex:a,options:{spanGaps:o}}=t,l=n.length,u=[];let d=s,f=e[0].start,y=f;function h(p,m,g,v){const S=o?-1:1;if(p!==m){for(p+=l;n[p%l].skip;)p-=S;for(;n[m%l].skip;)m+=S;p%l!==m%l&&(u.push({start:p%l,end:m%l,loop:g,style:v}),d=v,f=m%l)}}for(const p of e){f=o?f:p.start;let m=n[f%l],g;for(y=f+1;y<=p.end;y++){const v=n[y%l];g=kh(r.setContext(Lr(i,{type:"segment",p0:m,p1:v,p0DataIndex:(y-1)%l,p1DataIndex:y%l,datasetIndex:a}))),Ij(g,d)&&h(f,y-1,p.loop,d),m=v,d=g}f<y-1&&h(f,y-1,p.loop,d)}return u}function kh(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Ij(t,e){if(!e)return!1;const n=[],r=function(i,s){return Zc(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,r)!==JSON.stringify(e,r)}function Ba(t,e,n){return t.options.clip?t[n]:e[n]}function Lj(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:Ba(n,e,"left"),right:Ba(n,e,"right"),top:Ba(r,e,"top"),bottom:Ba(r,e,"bottom")}:e}function yg(t,e){const n=e._clip;if(n.disabled)return!1;const r=Lj(e,t.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:r.bottom+(n.bottom===!0?0:n.bottom)}}class Nj{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,i){const s=n.listeners[i],a=n.duration;s.forEach(o=>o({chart:e,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=$0.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let a=s.length-1,o=!1,l;for(;a>=0;--a)l=s[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),o=!0):(s[a]=s[s.length-1],s.pop());o&&(i.draw(),this._notify(i,r,e,"progress")),s.length||(r.running=!1,this._notify(i,r,e,"complete"),r.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Yn=new Nj;const Eh="transparent",Mj={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=gh(t||Eh),i=r.valid&&gh(e||Eh);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class _j{constructor(e,n,r,i){const s=n[r];i=Ra([e.to,i,s,e.from]);const a=Ra([e.from,s,i]);this._active=!0,this._fn=e.fn||Mj[e.type||typeof a],this._easing=Rs[e.easing]||Rs.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,a=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Ra([e.to,n,i,e.from]),this._from=Ra([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,i=this._prop,s=this._from,a=this._loop,o=this._to;let l;if(this._active=s!==o&&(a||n<r),!this._active){this._target[i]=o,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,o,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class pg{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!je(e))return;const n=Object.keys(Ye.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!je(s))return;const a={};for(const o of n)a[o]=s[o];(Ge(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!r.has(o))&&r.set(o,a)})})}_animateOptions(e,n){const r=n.options,i=Dj(e,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&Rj(e.options.$animations,r).then(()=>{e.options=r},()=>{}),s}_createAnimations(e,n){const r=this._properties,i=[],s=e.$animations||(e.$animations={}),a=Object.keys(n),o=Date.now();let l;for(l=a.length-1;l>=0;--l){const u=a[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,n));continue}const d=n[u];let f=s[u];const y=r.get(u);if(f)if(y&&f.active()){f.update(y,d,o);continue}else f.cancel();if(!y||!y.duration){e[u]=d;continue}s[u]=f=new _j(y,e,u,d),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Yn.add(this._chart,r),!0}}function Rj(t,e){const n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){const s=t[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function Dj(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Oh(t,e){const n=t&&t.options||{},r=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:r?s:i,end:r?i:s}}function Bj(t,e,n){if(n===!1)return!1;const r=Oh(t,n),i=Oh(e,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function Fj(t){let e,n,r,i;return je(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:t===!1}}function mg(t,e){const n=[],r=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function Th(t,e,n,r={}){const i=t.keys,s=r.mode==="single";let a,o,l,u;if(e===null)return;let d=!1;for(a=0,o=i.length;a<o;++a){if(l=+i[a],l===n){if(d=!0,r.all)continue;break}u=t.values[l],rt(u)&&(s||e===0||Gi(e)===Gi(u))&&(e+=u)}return!d&&!r.all?0:e}function zj(t,e){const{iScale:n,vScale:r}=e,i=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",a=Object.keys(t),o=new Array(a.length);let l,u,d;for(l=0,u=a.length;l<u;++l)d=a[l],o[l]={[i]:d,[s]:t[d]};return o}function Ml(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function Uj(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Hj(t){const{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function qj(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function Ph(t,e,n,r){for(const i of e.getMatchingVisibleMetas(r).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Ih(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:a,index:o}=r,l=s.axis,u=a.axis,d=Uj(s,a,r),f=e.length;let y;for(let h=0;h<f;++h){const p=e[h],{[l]:m,[u]:g}=p,v=p._stacks||(p._stacks={});y=v[u]=qj(i,d,m),y[o]=g,y._top=Ph(y,a,!0,r.type),y._bottom=Ph(y,a,!1,r.type);const S=y._visualValues||(y._visualValues={});S[o]=g}}function _l(t,e){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function Wj(t,e){return Lr(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Gj(t,e,n){return Lr(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function hs(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Rl=t=>t==="reset"||t==="none",Lh=(t,e)=>e?t:Object.assign({},t),Qj=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:mg(n,!0),values:null};class Oi{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Ml(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&hs(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(f,y,h,p)=>f==="x"?y:f==="r"?p:h,s=n.xAxisID=Se(r.xAxisID,_l(e,"x")),a=n.yAxisID=Se(r.yAxisID,_l(e,"y")),o=n.rAxisID=Se(r.rAxisID,_l(e,"r")),l=n.indexAxis,u=n.iAxisID=i(l,s,a,o),d=n.vAxisID=i(l,a,s,o);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(d)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&yh(this._data,this),e._stacked&&hs(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(je(n)){const i=this._cachedMeta;this._data=zj(n,i)}else if(r!==n){if(r){yh(r,this);const i=this._cachedMeta;hs(i),i._parsed=[]}n&&Object.isExtensible(n)&&C6(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Ml(n.vScale,n),n.stack!==r.stack&&(i=!0,hs(n),n.stack=r.stack),this._resyncElements(e),(i||s!==n._stacked)&&(Ih(this,n._parsed),n._stacked=Ml(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:a}=r,o=s.axis;let l=e===0&&n===i.length?!0:r._sorted,u=e>0&&r._parsed[e-1],d,f,y;if(this._parsing===!1)r._parsed=i,r._sorted=!0,y=i;else{Ge(i[e])?y=this.parseArrayData(r,i,e,n):je(i[e])?y=this.parseObjectData(r,i,e,n):y=this.parsePrimitiveData(r,i,e,n);const h=()=>f[o]===null||u&&f[o]<u[o];for(d=0;d<n;++d)r._parsed[d+e]=f=y[d],l&&(h()&&(l=!1),u=f);r._sorted=l}a&&Ih(this,y)}parsePrimitiveData(e,n,r,i){const{iScale:s,vScale:a}=e,o=s.axis,l=a.axis,u=s.getLabels(),d=s===a,f=new Array(i);let y,h,p;for(y=0,h=i;y<h;++y)p=y+r,f[y]={[o]:d||s.parse(u[p],p),[l]:a.parse(n[p],p)};return f}parseArrayData(e,n,r,i){const{xScale:s,yScale:a}=e,o=new Array(i);let l,u,d,f;for(l=0,u=i;l<u;++l)d=l+r,f=n[d],o[l]={x:s.parse(f[0],d),y:a.parse(f[1],d)};return o}parseObjectData(e,n,r,i){const{xScale:s,yScale:a}=e,{xAxisKey:o="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let d,f,y,h;for(d=0,f=i;d<f;++d)y=d+r,h=n[y],u[d]={x:s.parse(ea(h,o),y),y:a.parse(ea(h,l),y)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){const i=this.chart,s=this._cachedMeta,a=n[e.axis],o={keys:mg(i,!0),values:n._stacks[e.axis]._visualValues};return Th(o,a,s.index,{mode:r})}updateRangeFromParsed(e,n,r,i){const s=r[n.axis];let a=s===null?NaN:s;const o=i&&r._stacks[n.axis];i&&o&&(i.values=o,a=Th(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,a),e.max=Math.max(e.max,a)}getMinMax(e,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&e===r.iScale,a=i.length,o=this._getOtherScale(e),l=Qj(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:d,max:f}=Hj(o);let y,h;function p(){h=i[y];const m=h[o.axis];return!rt(h[e.axis])||d>m||f<m}for(y=0;y<a&&!(!p()&&(this.updateRangeFromParsed(u,e,h,l),s));++y);if(s){for(y=a-1;y>=0;--y)if(!p()){this.updateRangeFromParsed(u,e,h,l);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let i,s,a;for(i=0,s=n.length;i<s;++i)a=n[i][e.axis],rt(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=Fj(Se(this.options.clip,Bj(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,a=[],o=this._drawStart||0,l=this._drawCount||i.length-o,u=this.options.drawActiveElementsOnTop;let d;for(r.dataset&&r.dataset.draw(e,s,o,l),d=o;d<o+l;++d){const f=i[d];f.hidden||(f.active&&u?a.push(f):f.draw(e,s))}for(d=0;d<a.length;++d)a[d].draw(e,s)}getStyle(e,n){const r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){const i=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const a=this._cachedMeta.data[e];s=a.$context||(a.$context=Gj(this.getContext(),e,a)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=Wj(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){const i=n==="active",s=this._cachedDataOpts,a=e+"-"+n,o=s[a],l=this.enableOptionSharing&&Oo(r);if(o)return Lh(o,l);const u=this.chart.config,d=u.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],y=u.getOptionScopes(this.getDataset(),d),h=Object.keys(Ye.elements[e]),p=()=>this.getContext(r,i,n),m=u.resolveNamedOptions(y,h,p,f);return m.$shared&&(m.$shared=l,s[a]=Object.freeze(Lh(m,l))),m}_resolveAnimations(e,n,r){const i=this.chart,s=this._cachedDataOpts,a=`animation-${n}`,o=s[a];if(o)return o;let l;if(i.options.animation!==!1){const d=this.chart.config,f=d.datasetAnimationScopeKeys(this._type,n),y=d.getOptionScopes(this.getDataset(),f);l=d.createResolver(y,this.getContext(e,r,n))}const u=new pg(i,l&&l.animations);return l&&l._cacheable&&(s[a]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Rl(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(r),a=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:a}}updateElement(e,n,r,i){Rl(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r)}updateSharedOptions(e,n,r){e&&!Rl(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[o,l,u]of this._syncList)this[o](l,u);this._syncList=[];const i=r.length,s=n.length,a=Math.min(s,i);a&&this.parse(0,a),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,r=!0){const i=this._cachedMeta,s=i.data,a=e+n;let o;const l=u=>{for(u.length+=n,o=u.length-1;o>=a;o--)u[o]=u[o-n]};for(l(s),o=e;o<a;++o)s[o]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(e,n),r&&this.updateElements(s,e,n,"reset")}updateElements(e,n,r,i){}_removeElements(e,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(e,n);r._stacked&&hs(r,i)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,r,i]=e;this[n](r,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}fe(Oi,"defaults",{}),fe(Oi,"datasetElementType",null),fe(Oi,"dataElementType",null);class lo extends Oi{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,a=this.chart._animationsDisabled;let{start:o,count:l}=O6(n,i,a);this._drawStart=o,this._drawCount=l,T6(n)&&(o=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:u},e),this.updateElements(i,o,l,e)}updateElements(e,n,r,i){const s=i==="reset",{iScale:a,vScale:o,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i),y=a.axis,h=o.axis,{spanGaps:p,segment:m}=this.options,g=ta(p)?p:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||s||i==="none",S=n+r,k=e.length;let j=n>0&&this.getParsed(n-1);for(let C=0;C<k;++C){const b=e[C],w=v?b:{};if(C<n||C>=S){w.skip=!0;continue}const x=this.getParsed(C),L=De(x[h]),D=w[y]=a.getPixelForValue(x[y],C),M=w[h]=s||L?o.getBasePixel():o.getPixelForValue(l?this.applyStack(o,x,l):x[h],C);w.skip=isNaN(D)||isNaN(M)||L,w.stop=C>0&&Math.abs(x[y]-j[y])>g,m&&(w.parsed=x,w.raw=u.data[C]),f&&(w.options=d||this.resolveDataElementOptions(C,b.active?"active":i)),v||this.updateElement(b,C,w,i),j=x}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,a)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}fe(lo,"id","line"),fe(lo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),fe(lo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class uo extends Oi{getLabelAndValue(e){const n=this._cachedMeta.vScale,r=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(e,n,r,i){return oj.bind(this)(e,n,r,i)}update(e){const n=this._cachedMeta,r=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(r.points=i,e!=="resize"){const a=this.resolveDatasetElementOptions(e);this.options.showLine||(a.borderWidth=0);const o={_loop:!0,_fullLoop:s.length===i.length,options:a};this.updateElement(r,void 0,o,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,r,i){const s=this._cachedMeta.rScale,a=i==="reset";for(let o=n;o<n+r;o++){const l=e[o],u=this.resolveDataElementOptions(o,l.active?"active":i),d=s.getPointPositionForValue(o,this.getParsed(o).r),f=a?s.xCenter:d.x,y=a?s.yCenter:d.y,h={x:f,y,angle:d.angle,skip:isNaN(f)||isNaN(y),options:u};this.updateElement(l,o,h,i)}}}fe(uo,"id","radar"),fe(uo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),fe(uo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});function Br(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class sd{constructor(e){fe(this,"options");this.options=e||{}}static override(e){Object.assign(sd.prototype,e)}init(){}formats(){return Br()}parse(){return Br()}format(){return Br()}add(){return Br()}diff(){return Br()}startOf(){return Br()}endOf(){return Br()}}var Yj={_date:sd};function Vj(t,e,n,r){const{controller:i,data:s,_sorted:a}=t,o=i._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(o&&e===o.axis&&e!=="r"&&a&&s.length){const u=o._reversePixels?A6:Wr;if(r){if(i._sharedOptions){const d=s[0],f=typeof d.getRange=="function"&&d.getRange(e);if(f){const y=u(s,e,n-f),h=u(s,e,n+f);return{lo:y.lo,hi:h.hi}}}}else{const d=u(s,e,n);if(l){const{vScale:f}=i._cachedMeta,{_parsed:y}=t,h=y.slice(0,d.lo+1).reverse().findIndex(m=>!De(m[f.axis]));d.lo-=Math.max(0,h);const p=y.slice(d.hi).findIndex(m=>!De(m[f.axis]));d.hi+=Math.max(0,p)}return d}}return{lo:0,hi:s.length-1}}function al(t,e,n,r,i){const s=t.getSortedVisibleDatasetMetas(),a=n[e];for(let o=0,l=s.length;o<l;++o){const{index:u,data:d}=s[o],{lo:f,hi:y}=Vj(s[o],e,a,i);for(let h=f;h<=y;++h){const p=d[h];p.skip||r(p,u,h)}}}function Kj(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,i){const s=e?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(a,2))}}function Dl(t,e,n,r,i){const s=[];return!i&&!t.isPointInArea(e)||al(t,n,e,function(o,l,u){!i&&!nr(o,t.chartArea,0)||o.inRange(e.x,e.y,r)&&s.push({element:o,datasetIndex:l,index:u})},!0),s}function Xj(t,e,n,r){let i=[];function s(a,o,l){const{startAngle:u,endAngle:d}=a.getProps(["startAngle","endAngle"],r),{angle:f}=b6(a,{x:e.x,y:e.y});J0(f,u,d)&&i.push({element:a,datasetIndex:o,index:l})}return al(t,n,e,s),i}function Jj(t,e,n,r,i,s){let a=[];const o=Kj(n);let l=Number.POSITIVE_INFINITY;function u(d,f,y){const h=d.inRange(e.x,e.y,i);if(r&&!h)return;const p=d.getCenterPoint(i);if(!(!!s||t.isPointInArea(p))&&!h)return;const g=o(e,p);g<l?(a=[{element:d,datasetIndex:f,index:y}],l=g):g===l&&a.push({element:d,datasetIndex:f,index:y})}return al(t,n,e,u),a}function Bl(t,e,n,r,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!r?Xj(t,e,n,i):Jj(t,e,n,r,i,s)}function Nh(t,e,n,r,i){const s=[],a=n==="x"?"inXRange":"inYRange";let o=!1;return al(t,n,e,(l,u,d)=>{l[a]&&l[a](e[n],i)&&(s.push({element:l,datasetIndex:u,index:d}),o=o||l.inRange(e.x,e.y,i))}),r&&!o?[]:s}var Zj={modes:{index(t,e,n,r){const i=zr(e,t),s=n.axis||"x",a=n.includeInvisible||!1,o=n.intersect?Dl(t,i,s,r,a):Bl(t,i,s,!1,r,a),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const d=o[0].index,f=u.data[d];f&&!f.skip&&l.push({element:f,datasetIndex:u.index,index:d})}),l):[]},dataset(t,e,n,r){const i=zr(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;let o=n.intersect?Dl(t,i,s,r,a):Bl(t,i,s,!1,r,a);if(o.length>0){const l=o[0].datasetIndex,u=t.getDatasetMeta(l).data;o=[];for(let d=0;d<u.length;++d)o.push({element:u[d],datasetIndex:l,index:d})}return o},point(t,e,n,r){const i=zr(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return Dl(t,i,s,r,a)},nearest(t,e,n,r){const i=zr(e,t),s=n.axis||"xy",a=n.includeInvisible||!1;return Bl(t,i,s,n.intersect,r,a)},x(t,e,n,r){const i=zr(e,t);return Nh(t,i,"x",n.intersect,r)},y(t,e,n,r){const i=zr(e,t);return Nh(t,i,"y",n.intersect,r)}}};const gg=["left","top","right","bottom"];function ys(t,e){return t.filter(n=>n.pos===e)}function Mh(t,e){return t.filter(n=>gg.indexOf(n.pos)===-1&&n.box.axis===e)}function ps(t,e){return t.sort((n,r)=>{const i=e?r:n,s=e?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function $j(t){const e=[];let n,r,i,s,a,o;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],{position:s,options:{stack:a,stackWeight:o=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&s+a,stackWeight:o});return e}function e4(t){const e={};for(const n of t){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!gg.includes(i))continue;const a=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=s}return e}function t4(t,e){const n=e4(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e;let s,a,o;for(s=0,a=t.length;s<a;++s){o=t[s];const{fullSize:l}=o.box,u=n[o.stack],d=u&&o.stackWeight/u.weight;o.horizontal?(o.width=d?d*r:l&&e.availableWidth,o.height=i):(o.width=r,o.height=d?d*i:l&&e.availableHeight)}return n}function n4(t){const e=$j(t),n=ps(e.filter(u=>u.box.fullSize),!0),r=ps(ys(e,"left"),!0),i=ps(ys(e,"right")),s=ps(ys(e,"top"),!0),a=ps(ys(e,"bottom")),o=Mh(e,"x"),l=Mh(e,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(a).concat(o),chartArea:ys(e,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(a).concat(o)}}function _h(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function vg(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function r4(t,e,n,r){const{pos:i,box:s}=n,a=t.maxPadding;if(!je(i)){n.size&&(t[i]-=n.size);const f=r[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&vg(a,s.getPadding());const o=Math.max(0,e.outerWidth-_h(a,t,"left","right")),l=Math.max(0,e.outerHeight-_h(a,t,"top","bottom")),u=o!==t.w,d=l!==t.h;return t.w=o,t.h=l,n.horizontal?{same:u,other:d}:{same:d,other:u}}function i4(t){const e=t.maxPadding;function n(r){const i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function s4(t,e){const n=e.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{s[a]=Math.max(e[a],n[a])}),s}return r(t?["left","right"]:["top","bottom"])}function Os(t,e,n,r){const i=[];let s,a,o,l,u,d;for(s=0,a=t.length,u=0;s<a;++s){o=t[s],l=o.box,l.update(o.width||e.w,o.height||e.h,s4(o.horizontal,e));const{same:f,other:y}=r4(e,n,o,r);u|=f&&i.length,d=d||y,l.fullSize||i.push(o)}return u&&Os(i,e,n,r)||d}function Fa(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i}function Rh(t,e,n,r){const i=n.padding;let{x:s,y:a}=e;for(const o of t){const l=o.box,u=r[o.stack]||{placed:0,weight:1},d=o.stackWeight/u.weight||1;if(o.horizontal){const f=e.w*d,y=u.size||l.height;Oo(u.start)&&(a=u.start),l.fullSize?Fa(l,i.left,a,n.outerWidth-i.right-i.left,y):Fa(l,e.left+u.placed,a,f,y),u.start=a,u.placed+=f,a=l.bottom}else{const f=e.h*d,y=u.size||l.width;Oo(u.start)&&(s=u.start),l.fullSize?Fa(l,s,i.top,y,n.outerHeight-i.bottom-i.top):Fa(l,s,e.top+u.placed,y,f),u.start=s,u.placed+=f,s=l.right}}e.x=s,e.y=a}var rn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const i=dt(t.options.layout.padding),s=Math.max(e-i.width,0),a=Math.max(n-i.height,0),o=n4(t.boxes),l=o.vertical,u=o.horizontal;Re(t.boxes,m=>{typeof m.beforeLayout=="function"&&m.beforeLayout()});const d=l.reduce((m,g)=>g.box.options&&g.box.options.display===!1?m:m+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/d,hBoxMaxHeight:a/2}),y=Object.assign({},i);vg(y,dt(r));const h=Object.assign({maxPadding:y,w:s,h:a,x:i.left,y:i.top},i),p=t4(l.concat(u),f);Os(o.fullSize,h,f,p),Os(l,h,f,p),Os(u,h,f,p)&&Os(l,h,f,p),i4(h),Rh(o.leftAndTop,h,f,p),h.x+=h.w,h.y+=h.h,Rh(o.rightAndBottom,h,f,p),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Re(o.chartArea,m=>{const g=m.box;Object.assign(g,t.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class bg{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return!0}updateConfig(e){}}class a4 extends bg{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const co="$chartjs",o4={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Dh=t=>t===null||t==="";function l4(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[co]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Dh(i)){const s=Sh(t,"width");s!==void 0&&(t.width=s)}if(Dh(r))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Sh(t,"height");s!==void 0&&(t.height=s)}return t}const xg=wj?{passive:!0}:!1;function u4(t,e,n){t&&t.addEventListener(e,n,xg)}function c4(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,xg)}function d4(t,e){const n=o4[t.type]||t.type,{x:r,y:i}=zr(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function No(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function f4(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const o of s)a=a||No(o.addedNodes,r),a=a&&!No(o.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function h4(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let a=!1;for(const o of s)a=a||No(o.removedNodes,r),a=a&&!No(o.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const na=new Map;let Bh=0;function wg(){const t=window.devicePixelRatio;t!==Bh&&(Bh=t,na.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function y4(t,e){na.size||window.addEventListener("resize",wg),na.set(t,e)}function p4(t){na.delete(t),na.size||window.removeEventListener("resize",wg)}function m4(t,e,n){const r=t.canvas,i=r&&id(r);if(!i)return;const s=eg((o,l)=>{const u=i.clientWidth;n(o,l),u<i.clientWidth&&n()},window),a=new ResizeObserver(o=>{const l=o[0],u=l.contentRect.width,d=l.contentRect.height;u===0&&d===0||s(u,d)});return a.observe(i),y4(t,s),a}function Fl(t,e,n){n&&n.disconnect(),e==="resize"&&p4(t)}function g4(t,e,n){const r=t.canvas,i=eg(s=>{t.ctx!==null&&n(d4(s,t))},t);return u4(r,e,i),i}class v4 extends bg{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(l4(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[co])return!1;const r=n[co].initial;["height","width"].forEach(s=>{const a=r[s];De(a)?n.removeAttribute(s):n.setAttribute(s,a)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[co],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),a={attach:f4,detach:h4,resize:m4}[n]||g4;i[n]=a(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),i=r[n];if(!i)return;({attach:Fl,detach:Fl,resize:Fl}[n]||c4)(e,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return xj(e,n,r,i)}isAttached(e){const n=e&&id(e);return!!(n&&n.isConnected)}}function b4(t){return!rd()||typeof OffscreenCanvas!="undefined"&&t instanceof OffscreenCanvas?a4:v4}class ar{constructor(){fe(this,"x");fe(this,"y");fe(this,"active",!1);fe(this,"options");fe(this,"$animations")}tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return ta(this.x)&&ta(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const i={};return e.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}}fe(ar,"defaults",{}),fe(ar,"defaultRoutes");function x4(t,e){const n=t.options.ticks,r=w4(t),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?S4(e):[],a=s.length,o=s[0],l=s[a-1],u=[];if(a>i)return C4(e,u,s,a/i),u;const d=A4(s,e,i);if(a>0){let f,y;const h=a>1?Math.round((l-o)/(a-1)):null;for(za(e,u,d,De(h)?0:o-h,o),f=0,y=a-1;f<y;f++)za(e,u,d,s[f],s[f+1]);return za(e,u,d,l,De(h)?e.length:l+h),u}return za(e,u,d),u}function w4(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}function A4(t,e,n){const r=j4(t),i=e.length/n;if(!r)return Math.max(i,1);const s=p6(r);for(let a=0,o=s.length-1;a<o;a++){const l=s[a];if(l>i)return l}return Math.max(i,1)}function S4(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function C4(t,e,n,r){let i=0,s=n[0],a;for(r=Math.ceil(r),a=0;a<t.length;a++)a===s&&(e.push(t[a]),i++,s=n[i*r])}function za(t,e,n,r,i){const s=Se(r,0),a=Math.min(Se(i,t.length),t.length);let o=0,l,u,d;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),d=s;d<0;)o++,d=Math.round(s+o*n);for(u=Math.max(s,0);u<a;u++)u===d&&(e.push(t[u]),o++,d=Math.round(s+o*n))}function j4(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}const k4=t=>t==="left"?"right":t==="right"?"left":t,Fh=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,zh=(t,e)=>Math.min(e||t,t);function Uh(t,e){const n=[],r=t.length/e,i=t.length;let s=0;for(;s<i;s+=r)n.push(t[Math.floor(s)]);return n}function E4(t,e,n){const r=t.ticks.length,i=Math.min(e,r-1),s=t._startPixel,a=t._endPixel,o=1e-6;let l=t.getPixelForTick(i),u;if(!(n&&(r===1?u=Math.max(l-s,a-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(i-1))/2,l+=i<e?u:-u,l<s-o||l>a+o)))return l}function O4(t,e){Re(t,n=>{const r=n.gc,i=r.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function ms(t){return t.drawTicks?t.tickLength:0}function Hh(t,e){if(!t.display)return 0;const n=$e(t.font,e),r=dt(t.padding);return(Ge(t.text)?t.text.length:1)*n.lineHeight+r.height}function T4(t,e){return Lr(t,{scale:e,type:"scale"})}function P4(t,e,n){return Lr(t,{tick:n,index:e,type:"tick"})}function I4(t,e,n){let r=Jc(t);return(n&&e!=="right"||!n&&e==="right")&&(r=k4(r)),r}function L4(t,e,n,r){const{top:i,left:s,bottom:a,right:o,chart:l}=t,{chartArea:u,scales:d}=l;let f=0,y,h,p;const m=a-i,g=o-s;if(t.isHorizontal()){if(h=ut(r,s,o),je(n)){const v=Object.keys(n)[0],S=n[v];p=d[v].getPixelForValue(S)+m-e}else n==="center"?p=(u.bottom+u.top)/2+m-e:p=Fh(t,n,e);y=o-s}else{if(je(n)){const v=Object.keys(n)[0],S=n[v];h=d[v].getPixelForValue(S)-g+e}else n==="center"?h=(u.left+u.right)/2-g+e:h=Fh(t,n,e);p=ut(r,a,i),f=n==="left"?-Yt:Yt}return{titleX:h,titleY:p,maxWidth:y,rotation:f}}class ns extends ar{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return e=jn(e,Number.POSITIVE_INFINITY),n=jn(n,Number.NEGATIVE_INFINITY),r=jn(r,Number.POSITIVE_INFINITY),i=jn(i,Number.NEGATIVE_INFINITY),{min:jn(e,r),max:jn(n,i),minDefined:rt(e),maxDefined:rt(n)}}getMinMax(e){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),a;if(i&&s)return{min:n,max:r};const o=this.getMatchingVisibleMetas();for(let l=0,u=o.length;l<u;++l)a=o[l].controller.getMinMax(this,e),i||(n=Math.min(n,a.min)),s||(r=Math.max(r,a.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:jn(n,jn(r,n)),max:jn(r,jn(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Fe(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:i,grace:s,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=J6(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=o<this.ticks.length;this._convertTicksToLabels(l?Uh(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=x4(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Fe(this.options.afterUpdate,[this])}beforeSetDimensions(){Fe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Fe(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Fe(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Fe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r],s.label=Fe(n.callback,[s.value,r,e],this)}afterTickToLabelConversion(){Fe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Fe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,r=zh(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let a=i,o,l,u;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const d=this._getLabelSizes(),f=d.widest.width,y=d.highest.height,h=nn(this.chart.width-f,0,this.maxWidth);o=e.offset?this.maxWidth/r:h/(r-1),f+6>o&&(o=h/(r-(e.offset?.5:1)),l=this.maxHeight-ms(e.grid)-n.padding-Hh(e.title,this.chart.options.font),u=Math.sqrt(f*f+y*y),a=Kc(Math.min(Math.asin(nn((d.highest.height+6)/o,-1,1)),Math.asin(nn(l/u,-1,1))-Math.asin(nn(y/u,-1,1)))),a=Math.max(i,Math.min(s,a))),this.labelRotation=a}afterCalculateLabelRotation(){Fe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Fe(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const l=Hh(i,n.options.font);if(o?(e.width=this.maxWidth,e.height=ms(s)+l):(e.height=this.maxHeight,e.width=ms(s)+l),r.display&&this.ticks.length){const{first:u,last:d,widest:f,highest:y}=this._getLabelSizes(),h=r.padding*2,p=Sr(this.labelRotation),m=Math.cos(p),g=Math.sin(p);if(o){const v=r.mirror?0:g*f.width+m*y.height;e.height=Math.min(this.maxHeight,e.height+v+h)}else{const v=r.mirror?0:m*f.width+g*y.height;e.width=Math.min(this.maxWidth,e.width+v+h)}this._calculatePadding(u,d,g,m)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,i){const{ticks:{align:s,padding:a},position:o}=this.options,l=this.labelRotation!==0,u=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const d=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let y=0,h=0;l?u?(y=i*e.width,h=r*n.height):(y=r*e.height,h=i*n.width):s==="start"?h=n.width:s==="end"?y=e.width:s!=="inner"&&(y=e.width/2,h=n.width/2),this.paddingLeft=Math.max((y-d+a)*this.width/(this.width-d),0),this.paddingRight=Math.max((h-f+a)*this.width/(this.width-f),0)}else{let d=n.height/2,f=e.height/2;s==="start"?(d=0,f=e.height):s==="end"&&(d=n.height,f=0),this.paddingTop=d+a,this.paddingBottom=f+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Fe(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)De(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Uh(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){const{ctx:i,_longestTextCache:s}=this,a=[],o=[],l=Math.floor(n/zh(n,r));let u=0,d=0,f,y,h,p,m,g,v,S,k,j,C;for(f=0;f<n;f+=l){if(p=e[f].label,m=this._resolveTickFontOptions(f),i.font=g=m.string,v=s[g]=s[g]||{data:{},gc:[]},S=m.lineHeight,k=j=0,!De(p)&&!Ge(p))k=Po(i,v.data,v.gc,k,p),j=S;else if(Ge(p))for(y=0,h=p.length;y<h;++y)C=p[y],!De(C)&&!Ge(C)&&(k=Po(i,v.data,v.gc,k,C),j+=S);a.push(k),o.push(j),u=Math.max(k,u),d=Math.max(j,d)}O4(s,n);const b=a.indexOf(u),w=o.indexOf(d),x=L=>({width:a[L]||0,height:o[L]||0});return{first:x(0),last:x(n-1),widest:x(b),highest:x(w),widths:a,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return w6(this._alignToPixels?Dr(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const r=n[e];return r.$context||(r.$context=P4(this.getContext(),e,r))}return this.$context||(this.$context=T4(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Sr(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),a=e.autoSkipPadding||0,o=s?s.widest.width+a:0,l=s?s.highest.height+a:0;return this.isHorizontal()?l*r>o*i?o/r:l/i:l*i<o*r?l/r:o/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:a,border:o}=i,l=s.offset,u=this.isHorizontal(),f=this.ticks.length+(l?1:0),y=ms(s),h=[],p=o.setContext(this.getContext()),m=p.display?p.width:0,g=m/2,v=function(_){return Dr(r,_,m)};let S,k,j,C,b,w,x,L,D,M,I,z;if(a==="top")S=v(this.bottom),w=this.bottom-y,L=S-g,M=v(e.top)+g,z=e.bottom;else if(a==="bottom")S=v(this.top),M=e.top,z=v(e.bottom)-g,w=S+g,L=this.top+y;else if(a==="left")S=v(this.right),b=this.right-y,x=S-g,D=v(e.left)+g,I=e.right;else if(a==="right")S=v(this.left),D=e.left,I=v(e.right)-g,b=S+g,x=this.left+y;else if(n==="x"){if(a==="center")S=v((e.top+e.bottom)/2+.5);else if(je(a)){const _=Object.keys(a)[0],R=a[_];S=v(this.chart.scales[_].getPixelForValue(R))}M=e.top,z=e.bottom,w=S+g,L=w+y}else if(n==="y"){if(a==="center")S=v((e.left+e.right)/2);else if(je(a)){const _=Object.keys(a)[0],R=a[_];S=v(this.chart.scales[_].getPixelForValue(R))}b=S-g,x=b-y,D=e.left,I=e.right}const O=Se(i.ticks.maxTicksLimit,f),T=Math.max(1,Math.ceil(f/O));for(k=0;k<f;k+=T){const _=this.getContext(k),R=s.setContext(_),G=o.setContext(_),Y=R.lineWidth,E=R.color,W=G.dash||[],H=G.dashOffset,P=R.tickWidth,Q=R.tickColor,Z=R.tickBorderDash||[],K=R.tickBorderDashOffset;j=E4(this,k,l),j!==void 0&&(C=Dr(r,j,Y),u?b=x=D=I=C:w=L=M=z=C,h.push({tx1:b,ty1:w,tx2:x,ty2:L,x1:D,y1:M,x2:I,y2:z,width:Y,color:E,borderDash:W,borderDashOffset:H,tickWidth:P,tickColor:Q,tickBorderDash:Z,tickBorderDashOffset:K}))}return this._ticksLength=f,this._borderValue=S,h}_computeLabelItems(e){const n=this.axis,r=this.options,{position:i,ticks:s}=r,a=this.isHorizontal(),o=this.ticks,{align:l,crossAlign:u,padding:d,mirror:f}=s,y=ms(r.grid),h=y+d,p=f?-d:h,m=-Sr(this.labelRotation),g=[];let v,S,k,j,C,b,w,x,L,D,M,I,z="middle";if(i==="top")b=this.bottom-p,w=this._getXAxisLabelAlignment();else if(i==="bottom")b=this.top+p,w=this._getXAxisLabelAlignment();else if(i==="left"){const T=this._getYAxisLabelAlignment(y);w=T.textAlign,C=T.x}else if(i==="right"){const T=this._getYAxisLabelAlignment(y);w=T.textAlign,C=T.x}else if(n==="x"){if(i==="center")b=(e.top+e.bottom)/2+h;else if(je(i)){const T=Object.keys(i)[0],_=i[T];b=this.chart.scales[T].getPixelForValue(_)+h}w=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")C=(e.left+e.right)/2-h;else if(je(i)){const T=Object.keys(i)[0],_=i[T];C=this.chart.scales[T].getPixelForValue(_)}w=this._getYAxisLabelAlignment(y).textAlign}n==="y"&&(l==="start"?z="top":l==="end"&&(z="bottom"));const O=this._getLabelSizes();for(v=0,S=o.length;v<S;++v){k=o[v],j=k.label;const T=s.setContext(this.getContext(v));x=this.getPixelForTick(v)+s.labelOffset,L=this._resolveTickFontOptions(v),D=L.lineHeight,M=Ge(j)?j.length:1;const _=M/2,R=T.color,G=T.textStrokeColor,Y=T.textStrokeWidth;let E=w;a?(C=x,w==="inner"&&(v===S-1?E=this.options.reverse?"left":"right":v===0?E=this.options.reverse?"right":"left":E="center"),i==="top"?u==="near"||m!==0?I=-M*D+D/2:u==="center"?I=-O.highest.height/2-_*D+D:I=-O.highest.height+D/2:u==="near"||m!==0?I=D/2:u==="center"?I=O.highest.height/2-_*D:I=O.highest.height-M*D,f&&(I*=-1),m!==0&&!T.showLabelBackdrop&&(C+=D/2*Math.sin(m))):(b=x,I=(1-M)*D/2);let W;if(T.showLabelBackdrop){const H=dt(T.backdropPadding),P=O.heights[v],Q=O.widths[v];let Z=I-H.top,K=0-H.left;switch(z){case"middle":Z-=P/2;break;case"bottom":Z-=P;break}switch(w){case"center":K-=Q/2;break;case"right":K-=Q;break;case"inner":v===S-1?K-=Q:v>0&&(K-=Q/2);break}W={left:K,top:Z,width:Q+H.width,height:P+H.height,color:T.backdropColor}}g.push({label:j,font:L,textOffset:I,options:{rotation:m,color:R,strokeColor:G,strokeWidth:Y,textAlign:E,textBaseline:z,translation:[C,b],backdrop:W}})}return g}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Sr(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,a=this._getLabelSizes(),o=e+s,l=a.widest.width;let u,d;return n==="left"?i?(d=this.right+s,r==="near"?u="left":r==="center"?(u="center",d+=l/2):(u="right",d+=l)):(d=this.right-o,r==="near"?u="right":r==="center"?(u="center",d-=l/2):(u="left",d=this.left)):n==="right"?i?(d=this.left+s,r==="near"?u="right":r==="center"?(u="center",d-=l/2):(u="left",d-=l)):(d=this.left+o,r==="near"?u="left":r==="center"?(u="center",d+=l/2):(u="right",d=this.right)):u="right",{textAlign:u,x:d}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:r,top:i,width:s,height:a}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,i,s,a),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,a;const o=(l,u,d)=>{!d.width||!d.color||(r.save(),r.lineWidth=d.width,r.strokeStyle=d.color,r.setLineDash(d.borderDash||[]),r.lineDashOffset=d.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(s=0,a=i.length;s<a;++s){const l=i[s];n.drawOnChartArea&&o({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&o({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),a=r.display?s.width:0;if(!a)return;const o=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,d,f,y;this.isHorizontal()?(u=Dr(e,this.left,a)-a/2,d=Dr(e,this.right,o)+o/2,f=y=l):(f=Dr(e,this.top,a)-a/2,y=Dr(e,this.bottom,o)+o/2,u=d=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,f),n.lineTo(d,y),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&rl(r,i);const s=this.getLabelItems(e);for(const a of s){const o=a.options,l=a.font,u=a.label,d=a.textOffset;ci(r,u,0,d,l,o)}i&&il(r)}drawTitle(){const{ctx:e,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=$e(r.font),a=dt(r.padding),o=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||je(n)?(l+=a.bottom,Ge(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:u,titleY:d,maxWidth:f,rotation:y}=L4(this,l,n,o);ci(e,r.text,0,0,s,{color:r.color,maxWidth:f,rotation:y,textAlign:I4(o,n,i),textBaseline:"middle",translation:[u,d]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,r=Se(e.grid&&e.grid.z,-1),i=Se(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==ns.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,a;for(s=0,a=n.length;s<a;++s){const o=n[s];o[r]===this.id&&(!e||o.type===e)&&i.push(o)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return $e(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Ua{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let r;_4(n)&&(r=this.register(n));const i=this.items,s=e.id,a=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,N4(e,a,r),this.override&&Ye.override(e.id,e.overrides)),a}get(e){return this.items[e]}unregister(e){const n=this.items,r=e.id,i=this.scope;r in n&&delete n[r],i&&r in Ye[i]&&(delete Ye[i][r],this.override&&delete ui[r])}}function N4(t,e,n){const r=$s(Object.create(null),[n?Ye.get(n):{},Ye.get(e),t.defaults]);Ye.set(e,r),t.defaultRoutes&&M4(e,t.defaultRoutes),t.descriptors&&Ye.describe(e,t.descriptors)}function M4(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),i=r.pop(),s=[t].concat(r).join("."),a=e[n].split("."),o=a.pop(),l=a.join(".");Ye.route(s,i,l,o)})}function _4(t){return"id"in t&&"defaults"in t}class R4{constructor(){this.controllers=new Ua(Oi,"datasets",!0),this.elements=new Ua(ar,"elements"),this.plugins=new Ua(Object,"plugins"),this.scales=new Ua(ns,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):Re(i,a=>{const o=r||this._getRegistryForType(a);this._exec(e,o,a)})})}_exec(e,n,r){const i=Vc(e);Fe(r["before"+i],[],r),n[e](r),Fe(r["after"+i],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return i}}var On=new R4;class D4{constructor(){this._init=void 0}notify(e,n,r,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const s=i?this._descriptors(e).filter(i):this._descriptors(e),a=this._notify(s,e,n,r);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),a}_notify(e,n,r,i){i=i||{};for(const s of e){const a=s.plugin,o=a[r],l=[n,i,s.options];if(Fe(o,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){De(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const r=e&&e.config,i=Se(r.options&&r.options.plugins,{}),s=B4(r);return i===!1&&!n?[]:z4(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],r=this._cache,i=(s,a)=>s.filter(o=>!a.some(l=>o.plugin.id===l.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start")}}function B4(t){const e={},n=[],r=Object.keys(On.plugins.items);for(let s=0;s<r.length;s++)n.push(On.getPlugin(r[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const a=i[s];n.indexOf(a)===-1&&(n.push(a),e[a.id]=!0)}return{plugins:n,localIds:e}}function F4(t,e){return!e&&t===!1?null:t===!0?{}:t}function z4(t,{plugins:e,localIds:n},r,i){const s=[],a=t.getContext();for(const o of e){const l=o.id,u=F4(r[l],i);u!==null&&s.push({plugin:o,options:U4(t.config,{plugin:o,local:n[l]},u,a)})}return s}function U4(t,{plugin:e,local:n},r,i){const s=t.pluginScopeKeys(e),a=t.getOptionScopes(r,s);return n&&e.defaults&&a.push(e.defaults),t.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ju(t,e){const n=Ye.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function H4(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function q4(t,e){return t===e?"_index_":"_value_"}function qh(t){if(t==="x"||t==="y"||t==="r")return t}function W4(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Zu(t,...e){if(qh(t))return t;for(const n of e){const r=n.axis||W4(n.position)||t.length>1&&qh(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Wh(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function G4(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return Wh(t,"x",n[0])||Wh(t,"y",n[0])}return{}}function Q4(t,e){const n=ui[t.type]||{scales:{}},r=e.scales||{},i=Ju(t.type,e),s=Object.create(null);return Object.keys(r).forEach(a=>{const o=r[a];if(!je(o))return console.error(`Invalid scale configuration for scale: ${a}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Zu(a,o,G4(a,t),Ye.scales[o.type]),u=q4(l,i),d=n.scales||{};s[a]=Ms(Object.create(null),[{axis:l},o,d[l],d[u]])}),t.data.datasets.forEach(a=>{const o=a.type||t.type,l=a.indexAxis||Ju(o,e),d=(ui[o]||{}).scales||{};Object.keys(d).forEach(f=>{const y=H4(f,l),h=a[y+"AxisID"]||y;s[h]=s[h]||Object.create(null),Ms(s[h],[{axis:y},r[h],d[f]])})}),Object.keys(s).forEach(a=>{const o=s[a];Ms(o,[Ye.scales[o.type],Ye.scale])}),s}function Ag(t){const e=t.options||(t.options={});e.plugins=Se(e.plugins,{}),e.scales=Q4(t,e)}function Sg(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Y4(t){return t=t||{},t.data=Sg(t.data),Ag(t),t}const Gh=new Map,Cg=new Set;function Ha(t,e){let n=Gh.get(t);return n||(n=e(),Gh.set(t,n),Cg.add(n)),n}const gs=(t,e,n)=>{const r=ea(e,n);r!==void 0&&t.add(r)};class V4{constructor(e){this._config=Y4(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Sg(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Ag(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ha(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Ha(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Ha(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Ha(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let i=r.get(e);return(!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){const{options:i,type:s}=this,a=this._cachedScopes(e,r),o=a.get(n);if(o)return o;const l=new Set;n.forEach(d=>{e&&(l.add(e),d.forEach(f=>gs(l,e,f))),d.forEach(f=>gs(l,i,f)),d.forEach(f=>gs(l,ui[s]||{},f)),d.forEach(f=>gs(l,Ye,f)),d.forEach(f=>gs(l,Ku,f))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),Cg.has(n)&&a.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,ui[n]||{},Ye.datasets[n]||{},{type:n},Ye,Ku]}resolveNamedOptions(e,n,r,i=[""]){const s={$shared:!0},{resolver:a,subPrefixes:o}=Qh(this._resolverCache,e,i);let l=a;if(X4(a,n)){s.$shared=!1,r=Tr(r)?r():r;const u=this.createResolver(e,r,o);l=Qi(a,r,u)}for(const u of n)s[u]=l[u];return s}createResolver(e,n,r=[""],i){const{resolver:s}=Qh(this._resolverCache,e,r);return je(n)?Qi(s,n,void 0,i):s}}function Qh(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let s=r.get(i);return s||(s={resolver:ed(e,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},r.set(i,s)),s}const K4=t=>je(t)&&Object.getOwnPropertyNames(t).some(e=>Tr(t[e]));function X4(t,e){const{isScriptable:n,isIndexable:r}=ig(t);for(const i of e){const s=n(i),a=r(i),o=(a||s)&&t[i];if(s&&(Tr(o)||K4(o))||a&&Ge(o))return!0}return!1}var J4="4.5.1";const Z4=["top","bottom","left","right","chartArea"];function Yh(t,e){return t==="top"||t==="bottom"||Z4.indexOf(t)===-1&&e==="x"}function Vh(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function Kh(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),Fe(n&&n.onComplete,[t],e)}function $4(t){const e=t.chart,n=e.options.animation;Fe(n&&n.onProgress,[t],e)}function jg(t){return rd()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const fo={},Xh=t=>{const e=jg(t);return Object.values(fo).filter(n=>n.canvas===e).pop()};function ek(t,e,n){const r=Object.keys(t);for(const i of r){const s=+i;if(s>=e){const a=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=a)}}}function tk(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}var dr;let ol=(dr=class{static register(...e){On.add(...e),Jh()}static unregister(...e){On.remove(...e),Jh()}constructor(e,n){const r=this.config=new V4(n),i=jg(e),s=Xh(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||b4(i)),this.platform.updateConfig(r);const o=this.platform.acquireContext(i,a.aspectRatio),l=o&&o.canvas,u=l&&l.height,d=l&&l.width;if(this.id=a6(),this.ctx=o,this.canvas=l,this.width=d,this.height=u,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new D4,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=k6(f=>this.update(f),a.resizeDelay||0),this._dataChanges=[],fo[this.id]=this,!o||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Yn.listen(this,"complete",Kh),Yn.listen(this,"progress",$4),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return De(e)?n&&s?s:i?r/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return On}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ah(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return bh(this.canvas,this.ctx),this}stop(){return Yn.stop(this),this}resize(e,n){Yn.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,e,n,s),o=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,Ah(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),Fe(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Re(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((a,o)=>(a[o]=!1,a),{});let s=[];n&&(s=s.concat(Object.keys(n).map(a=>{const o=n[a],l=Zu(a,o),u=l==="r",d=l==="x";return{options:o,dposition:u?"chartArea":d?"bottom":"left",dtype:u?"radialLinear":d?"category":"linear"}}))),Re(s,a=>{const o=a.options,l=o.id,u=Zu(l,o),d=Se(o.type,a.dtype);(o.position===void 0||Yh(o.position,u)!==Yh(a.dposition))&&(o.position=a.dposition),i[l]=!0;let f=null;if(l in r&&r[l].type===d)f=r[l];else{const y=On.getScale(d);f=new y({id:l,type:d,ctx:this.ctx,chart:this}),r[f.id]=f}f.init(o,e)}),Re(i,(a,o)=>{a||delete r[o]}),Re(r,a=>{rn.configure(this,a,a.options),rn.addBox(this,a)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);e.splice(n,r-n)}this._sortedMetasets=e.slice(0).sort(Vh("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let a=this.getDatasetMeta(r);const o=s.type||this.config.type;if(a.type&&a.type!==o&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=o,a.indexAxis=s.indexAxis||Ju(o,this.options),a.order=s.order||0,a.index=r,a.label=""+s.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=On.getController(o),{datasetElementType:u,dataElementType:d}=Ye.datasets[o];Object.assign(l,{dataElementType:On.getElement(d),datasetElementType:u&&On.getElement(u)}),a.controller=new l(this,r),e.push(a.controller)}}return this._updateMetasets(),e}_resetElements(){Re(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let u=0,d=this.data.datasets.length;u<d;u++){const{controller:f}=this.getDatasetMeta(u),y=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(y),a=Math.max(+f.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||Re(s,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Vh("z","_idx"));const{_active:o,_lastEvent:l}=this;l?this._eventHandler(l,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Re(this.scales,e=>{rn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!ch(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const a=r==="_removeElements"?-s:s;ek(e,i,a)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(e.filter(a=>a[0]===s).map((a,o)=>o+","+a.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!ch(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;rn.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Re(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Tr(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const r=this.getDatasetMeta(e),i={meta:r,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Yn.has(this)?this.attached&&!Yn.running(this)&&Yn.start(this):(this.draw(),Kh({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const a=n[i];(!e||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,r={meta:e,index:e.index,cancelable:!0},i=yg(this,e);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&rl(n,i),e.controller.draw(),i&&il(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return nr(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,i){const s=Zj.modes[n];return typeof s=="function"?s(this,e,r,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Lr(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(e),a=s.controller._resolveAnimations(void 0,i);Oo(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),a.update(s,{visible:r}),this.update(o=>o.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Yn.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),bh(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete fo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,r=(s,a)=>{n.addEventListener(this,s,a),e[s]=a},i=(s,a,o)=>{s.offsetX=a,s.offsetY=o,this._eventHandler(s)};Re(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),e[l]=u},i=(l,u)=>{e[l]&&(n.removeEventListener(this,l,u),delete e[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};let a;const o=()=>{i("attach",o),this.attached=!0,this.resize(),r("resize",s),r("detach",a)};a=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",o)},n.isAttached(this.canvas)?o():a()}unbindEvents(){Re(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Re(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const i=r?"set":"remove";let s,a,o,l;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),o=0,l=e.length;o<l;++o){a=e[o];const u=a&&this.getDatasetMeta(a.datasetIndex).controller;u&&u[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],r=e.map(({datasetIndex:s,index:a})=>{const o=this.getDatasetMeta(s);if(!o)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:o.data[a],index:a}});!ko(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const i=this.options.hover,s=(l,u)=>l.filter(d=>!u.some(f=>d.datasetIndex===f.datasetIndex&&d.index===f.index)),a=s(n,e),o=r?e:s(e,n);a.length&&this.updateHoverStyle(a,i.mode,!1),o.length&&i.mode&&this.updateHoverStyle(o,i.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=a=>(a.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:i=[],options:s}=this,a=n,o=this._getActiveElements(e,i,r,a),l=f6(e),u=tk(e,this._lastEvent,r,l);r&&(this._lastEvent=null,Fe(s.onHover,[e,o,this],this),l&&Fe(s.onClick,[e,o,this],this));const d=!ko(o,i);return(d||n)&&(this._active=o,this._updateHoverStyles(o,i,n)),this._lastEvent=u,d}_getActiveElements(e,n,r,i){if(e.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}},fe(dr,"defaults",Ye),fe(dr,"instances",fo),fe(dr,"overrides",ui),fe(dr,"registry",On),fe(dr,"version",J4),fe(dr,"getChart",Xh),dr);function Jh(){return Re(ol.instances,t=>t._plugins.invalidate())}function kg(t,e,n=e){t.lineCap=Se(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Se(n.borderDash,e.borderDash)),t.lineDashOffset=Se(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Se(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Se(n.borderWidth,e.borderWidth),t.strokeStyle=Se(n.borderColor,e.borderColor)}function nk(t,e,n){t.lineTo(n.x,n.y)}function rk(t){return t.stepped?U6:t.tension||t.cubicInterpolationMode==="monotone"?H6:nk}function Eg(t,e,n={}){const r=t.length,{start:i=0,end:s=r-1}=n,{start:a,end:o}=e,l=Math.max(i,a),u=Math.min(s,o),d=i<a&&s<a||i>o&&s>o;return{count:r,start:l,loop:e.loop,ilen:u<l&&!d?r+u-l:u-l}}function ik(t,e,n,r){const{points:i,options:s}=e,{count:a,start:o,loop:l,ilen:u}=Eg(i,n,r),d=rk(s);let{move:f=!0,reverse:y}=r||{},h,p,m;for(h=0;h<=u;++h)p=i[(o+(y?u-h:h))%a],!p.skip&&(f?(t.moveTo(p.x,p.y),f=!1):d(t,m,p,y,s.stepped),m=p);return l&&(p=i[(o+(y?u:0))%a],d(t,m,p,y,s.stepped)),!!l}function sk(t,e,n,r){const i=e.points,{count:s,start:a,ilen:o}=Eg(i,n,r),{move:l=!0,reverse:u}=r||{};let d=0,f=0,y,h,p,m,g,v;const S=j=>(a+(u?o-j:j))%s,k=()=>{m!==g&&(t.lineTo(d,g),t.lineTo(d,m),t.lineTo(d,v))};for(l&&(h=i[S(0)],t.moveTo(h.x,h.y)),y=0;y<=o;++y){if(h=i[S(y)],h.skip)continue;const j=h.x,C=h.y,b=j|0;b===p?(C<m?m=C:C>g&&(g=C),d=(f*d+j)/++f):(k(),t.lineTo(j,C),p=b,f=0,m=g=C),v=C}k()}function $u(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?sk:ik}function ak(t){return t.stepped?Aj:t.tension||t.cubicInterpolationMode==="monotone"?Sj:Ur}function ok(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),kg(t,e.options),t.stroke(i)}function lk(t,e,n,r){const{segments:i,options:s}=e,a=$u(e);for(const o of i)kg(t,s,o.style),t.beginPath(),a(t,e,o,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const uk=typeof Path2D=="function";function ck(t,e,n,r){uk&&!e.options.segment?ok(t,e,n,r):lk(t,e,n,r)}class jr extends ar{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;yj(this._points,r,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Tj(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){const r=this.options,i=e[n],s=this.points,a=hg(this,{property:n,start:i,end:i});if(!a.length)return;const o=[],l=ak(r);let u,d;for(u=0,d=a.length;u<d;++u){const{start:f,end:y}=a[u],h=s[f],p=s[y];if(h===p){o.push(h);continue}const m=Math.abs((i-h[n])/(p[n]-h[n])),g=l(h,p,m,r.stepped);g[n]=e[n],o.push(g)}return o.length===1?o[0]:o}pathSegment(e,n,r){return $u(this)(e,this,n,r)}path(e,n,r){const i=this.segments,s=$u(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const o of i)a&=s(e,this,o,{start:n,end:n+r-1});return!!a}draw(e,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),ck(e,this,r,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}fe(jr,"id","line"),fe(jr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),fe(jr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),fe(jr,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Zh(t,e,n,r){const i=t.options,{[n]:s}=t.getProps([n],r);return Math.abs(e-s)<i.radius+i.hitRadius}class ho extends ar{constructor(n){super();fe(this,"parsed");fe(this,"skip");fe(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:a,y:o}=this.getProps(["x","y"],i);return Math.pow(n-a,2)+Math.pow(r-o,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return Zh(this,n,"x",r)}inYRange(n,r){return Zh(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!nr(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Xu(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}fe(ho,"id","point"),fe(ho,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),fe(ho,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function dk(t,e,n){const r=t.segments,i=t.points,s=e.points,a=[];for(const o of r){let{start:l,end:u}=o;u=ll(l,u,i);const d=ec(n,i[l],i[u],o.loop);if(!e.segments){a.push({source:o,target:d,start:i[l],end:i[u]});continue}const f=hg(e,d);for(const y of f){const h=ec(n,s[y.start],s[y.end],y.loop),p=fg(o,i,h);for(const m of p)a.push({source:m,target:y,start:{[n]:$h(d,h,"start",Math.max)},end:{[n]:$h(d,h,"end",Math.min)}})}}return a}function ec(t,e,n,r){if(r)return;let i=e[t],s=n[t];return t==="angle"&&(i=Qt(i),s=Qt(s)),{property:t,start:i,end:s}}function fk(t,e){const{x:n=null,y:r=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:a,end:o})=>{o=ll(a,o,i);const l=i[a],u=i[o];r!==null?(s.push({x:l.x,y:r}),s.push({x:u.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:u.y}))}),s}function ll(t,e,n){for(;e>t;e--){const r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function $h(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function Og(t,e){let n=[],r=!1;return Ge(t)?(r=!0,n=t):n=fk(t,e),n.length?new jr({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function ey(t){return t&&t.fill!==!1}function hk(t,e,n){let i=t[e].fill;const s=[e];let a;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!rt(i))return i;if(a=t[i],!a)return!1;if(a.visible)return i;s.push(i),i=a.fill}return!1}function yk(t,e,n){const r=vk(t);if(je(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return rt(i)&&Math.floor(i)===i?pk(r[0],e,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function pk(t,e,n,r){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?!1:n}function mk(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:je(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function gk(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:je(t)?r=t.value:r=e.getBaseValue(),r}function vk(t){const e=t.options,n=e.fill;let r=Se(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function bk(t){const{scale:e,index:n,line:r}=t,i=[],s=r.segments,a=r.points,o=xk(e,n);o.push(Og({x:null,y:e.bottom},r));for(let l=0;l<s.length;l++){const u=s[l];for(let d=u.start;d<=u.end;d++)wk(i,a[d],o)}return new jr({points:i,options:{}})}function xk(t,e){const n=[],r=t.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function wk(t,e,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:a,last:o,point:l}=Ak(s,e,"x");if(!(!l||a&&o)){if(a)r.unshift(l);else if(t.push(l),!o)break}}t.push(...r)}function Ak(t,e,n){const r=t.interpolate(e,n);if(!r)return{};const i=r[n],s=t.segments,a=t.points;let o=!1,l=!1;for(let u=0;u<s.length;u++){const d=s[u],f=a[d.start][n],y=a[d.end][n];if(Si(i,f,y)){o=i===f,l=i===y;break}}return{first:o,last:l,point:r}}class Tg{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,r){const{x:i,y:s,radius:a}=this;return n=n||{start:0,end:Kt},e.arc(i,s,a,n.end,n.start,!0),!r.bounds}interpolate(e){const{x:n,y:r,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function Sk(t){const{chart:e,fill:n,line:r}=t;if(rt(n))return Ck(e,n);if(n==="stack")return bk(t);if(n==="shape")return!0;const i=jk(t);return i instanceof Tg?i:Og(i,r)}function Ck(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function jk(t){return(t.scale||{}).getPointPositionForValue?Ek(t):kk(t)}function kk(t){const{scale:e={},fill:n}=t,r=mk(n,e);if(rt(r)){const i=e.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function Ek(t){const{scale:e,fill:n}=t,r=e.options,i=e.getLabels().length,s=r.reverse?e.max:e.min,a=gk(n,e,s),o=[];if(r.grid.circular){const l=e.getPointPositionForValue(0,s);return new Tg({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(a)})}for(let l=0;l<i;++l)o.push(e.getPointPositionForValue(l,a));return o}function zl(t,e,n){const r=Sk(e),{chart:i,index:s,line:a,scale:o,axis:l}=e,u=a.options,d=u.fill,f=u.backgroundColor,{above:y=f,below:h=f}=d||{},p=i.getDatasetMeta(s),m=yg(i,p);r&&a.points.length&&(rl(t,n),Ok(t,{line:a,target:r,above:y,below:h,area:n,scale:o,axis:l,clip:m}),il(t))}function Ok(t,e){const{line:n,target:r,above:i,below:s,area:a,scale:o,clip:l}=e,u=n._loop?"angle":e.axis;t.save();let d=s;s!==i&&(u==="x"?(ty(t,r,a.top),Ul(t,{line:n,target:r,color:i,scale:o,property:u,clip:l}),t.restore(),t.save(),ty(t,r,a.bottom)):u==="y"&&(ny(t,r,a.left),Ul(t,{line:n,target:r,color:s,scale:o,property:u,clip:l}),t.restore(),t.save(),ny(t,r,a.right),d=i)),Ul(t,{line:n,target:r,color:d,scale:o,property:u,clip:l}),t.restore()}function ty(t,e,n){const{segments:r,points:i}=e;let s=!0,a=!1;t.beginPath();for(const o of r){const{start:l,end:u}=o,d=i[l],f=i[ll(l,u,i)];s?(t.moveTo(d.x,d.y),s=!1):(t.lineTo(d.x,n),t.lineTo(d.x,d.y)),a=!!e.pathSegment(t,o,{move:a}),a?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function ny(t,e,n){const{segments:r,points:i}=e;let s=!0,a=!1;t.beginPath();for(const o of r){const{start:l,end:u}=o,d=i[l],f=i[ll(l,u,i)];s?(t.moveTo(d.x,d.y),s=!1):(t.lineTo(n,d.y),t.lineTo(d.x,d.y)),a=!!e.pathSegment(t,o,{move:a}),a?t.closePath():t.lineTo(n,f.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function Ul(t,e){const{line:n,target:r,property:i,color:s,scale:a,clip:o}=e,l=dk(n,r,i);for(const{source:u,target:d,start:f,end:y}of l){const{style:{backgroundColor:h=s}={}}=u,p=r!==!0;t.save(),t.fillStyle=h,Tk(t,a,o,p&&ec(i,f,y)),t.beginPath();const m=!!n.pathSegment(t,u);let g;if(p){m?t.closePath():ry(t,r,y,i);const v=!!r.pathSegment(t,d,{move:m,reverse:!0});g=m&&v,g||ry(t,r,f,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function Tk(t,e,n,r){const i=e.chart.chartArea,{property:s,start:a,end:o}=r||{};if(s==="x"||s==="y"){let l,u,d,f;s==="x"?(l=a,u=i.top,d=o,f=i.bottom):(l=i.left,u=a,d=i.right,f=o),t.beginPath(),n&&(l=Math.max(l,n.left),d=Math.min(d,n.right),u=Math.max(u,n.top),f=Math.min(f,n.bottom)),t.rect(l,u,d-l,f-u),t.clip()}}function ry(t,e,n,r){const i=e.interpolate(n,r);i&&t.lineTo(i.x,i.y)}var Pk={id:"filler",afterDatasetsUpdate(t,e,n){const r=(t.data.datasets||[]).length,i=[];let s,a,o,l;for(a=0;a<r;++a)s=t.getDatasetMeta(a),o=s.dataset,l=null,o&&o.options&&o instanceof jr&&(l={visible:t.isDatasetVisible(a),index:a,fill:yk(o,a,r),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:o}),s.$filler=l,i.push(l);for(a=0;a<r;++a)l=i[a],!(!l||l.fill===!1)&&(l.fill=hk(i,a,n.propagate))},beforeDraw(t,e,n){const r=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let a=i.length-1;a>=0;--a){const o=i[a].$filler;o&&(o.line.updateControlPoints(s,o.axis),r&&o.fill&&zl(t.ctx,o,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;ey(s)&&zl(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const r=e.meta.$filler;!ey(r)||n.drawTime!=="beforeDatasetDraw"||zl(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const iy=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},Ik=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class sy extends ar{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=Fe(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,i)=>e.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,i=$e(r.font),s=i.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:l}=iy(r,s);let u,d;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,d=this._fitRows(a,s,o,l)+10):(d=this.maxHeight,u=this._fitCols(a,i,o,l)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(d,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,i){const{ctx:s,maxWidth:a,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],d=i+o;let f=e;s.textAlign="left",s.textBaseline="middle";let y=-1,h=-d;return this.legendItems.forEach((p,m)=>{const g=r+n/2+s.measureText(p.text).width;(m===0||u[u.length-1]+g+2*o>a)&&(f+=d,u[u.length-(m>0?0:1)]=0,h+=d,y++),l[m]={left:0,top:h,row:y,width:g,height:i},u[u.length-1]+=g+o}),f}_fitCols(e,n,r,i){const{ctx:s,maxHeight:a,options:{labels:{padding:o}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],d=a-e;let f=o,y=0,h=0,p=0,m=0;return this.legendItems.forEach((g,v)=>{const{itemWidth:S,itemHeight:k}=Lk(r,n,s,g,i);v>0&&h+k+2*o>d&&(f+=y+o,u.push({width:y,height:h}),p+=y+o,m++,y=h=0),l[v]={left:p,top:h,col:m,width:S,height:k},y=Math.max(y,S),h+=k+o}),f+=y,u.push({width:y,height:h}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,a=Ei(s,this.left,this.width);if(this.isHorizontal()){let o=0,l=ut(r,this.left+i,this.right-this.lineWidths[o]);for(const u of n)o!==u.row&&(o=u.row,l=ut(r,this.left+i,this.right-this.lineWidths[o])),u.top+=this.top+e+i,u.left=a.leftForLtr(a.x(l),u.width),l+=u.width+i}else{let o=0,l=ut(r,this.top+e+i,this.bottom-this.columnSizes[o].height);for(const u of n)u.col!==o&&(o=u.col,l=ut(r,this.top+e+i,this.bottom-this.columnSizes[o].height)),u.top=l,u.left+=this.left+i,u.left=a.leftForLtr(a.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;rl(e,this),this._draw(),il(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:a}=e,o=Ye.color,l=Ei(e.rtl,this.left,this.width),u=$e(a.font),{padding:d}=a,f=u.size,y=f/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:p,boxHeight:m,itemHeight:g}=iy(a,f),v=function(b,w,x){if(isNaN(p)||p<=0||isNaN(m)||m<0)return;i.save();const L=Se(x.lineWidth,1);if(i.fillStyle=Se(x.fillStyle,o),i.lineCap=Se(x.lineCap,"butt"),i.lineDashOffset=Se(x.lineDashOffset,0),i.lineJoin=Se(x.lineJoin,"miter"),i.lineWidth=L,i.strokeStyle=Se(x.strokeStyle,o),i.setLineDash(Se(x.lineDash,[])),a.usePointStyle){const D={radius:m*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:L},M=l.xPlus(b,p/2),I=w+y;ng(i,D,M,I,a.pointStyleWidth&&p)}else{const D=w+Math.max((f-m)/2,0),M=l.leftForLtr(b,p),I=ki(x.borderRadius);i.beginPath(),Object.values(I).some(z=>z!==0)?Io(i,{x:M,y:D,w:p,h:m,radius:I}):i.rect(M,D,p,m),i.fill(),L!==0&&i.stroke()}i.restore()},S=function(b,w,x){ci(i,x.text,b,w+g/2,u,{strikethrough:x.hidden,textAlign:l.textAlign(x.textAlign)})},k=this.isHorizontal(),j=this._computeTitleHeight();k?h={x:ut(s,this.left+d,this.right-r[0]),y:this.top+d+j,line:0}:h={x:this.left+d,y:ut(s,this.top+j+d,this.bottom-n[0].height),line:0},ug(this.ctx,e.textDirection);const C=g+d;this.legendItems.forEach((b,w)=>{i.strokeStyle=b.fontColor,i.fillStyle=b.fontColor;const x=i.measureText(b.text).width,L=l.textAlign(b.textAlign||(b.textAlign=a.textAlign)),D=p+y+x;let M=h.x,I=h.y;l.setWidth(this.width),k?w>0&&M+D+d>this.right&&(I=h.y+=C,h.line++,M=h.x=ut(s,this.left+d,this.right-r[h.line])):w>0&&I+C>this.bottom&&(M=h.x=M+n[h.line].width+d,h.line++,I=h.y=ut(s,this.top+j+d,this.bottom-n[h.line].height));const z=l.x(M);if(v(z,I,b),M=E6(L,M+p+y,k?M+D:this.right,e.rtl),S(l.x(M),I,b),k)h.x+=D+d;else if(typeof b.text!="string"){const O=u.lineHeight;h.y+=Pg(b,O)+d}else h.y+=C}),cg(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=$e(n.font),i=dt(n.padding);if(!n.display)return;const s=Ei(e.rtl,this.left,this.width),a=this.ctx,o=n.position,l=r.size/2,u=i.top+l;let d,f=this.left,y=this.width;if(this.isHorizontal())y=Math.max(...this.lineWidths),d=this.top+u,f=ut(e.align,f,this.right-y);else{const p=this.columnSizes.reduce((m,g)=>Math.max(m,g.height),0);d=u+ut(e.align,this.top,this.bottom-p-e.labels.padding-this._computeTitleHeight())}const h=ut(o,f,f+y);a.textAlign=s.textAlign(Jc(o)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,ci(a,n.text,h,d,r)}_computeTitleHeight(){const e=this.options.title,n=$e(e.font),r=dt(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,s;if(Si(e,this.left,this.right)&&Si(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],Si(e,i.left,i.left+i.width)&&Si(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(e){const n=this.options;if(!_k(e.type,n))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=Ik(i,r);i&&!s&&Fe(n.onLeave,[e,i,this],this),this._hoveredItem=r,r&&!s&&Fe(n.onHover,[e,r,this],this)}else r&&Fe(n.onClick,[e,r,this],this)}}function Lk(t,e,n,r,i){const s=Nk(r,t,e,n),a=Mk(i,r,e.lineHeight);return{itemWidth:s,itemHeight:a}}function Nk(t,e,n,r){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,a)=>s.length>a.length?s:a)),e+n.size/2+r.measureText(i).width}function Mk(t,e,n){let r=t;return typeof e.text!="string"&&(r=Pg(e,n)),r}function Pg(t,e){const n=t.text?t.text.length:0;return e*n}function _k(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var Rk={id:"legend",_element:sy,start(t,e,n){const r=t.legend=new sy({ctx:t.ctx,options:n,chart:t});rn.configure(t,r,n),rn.addBox(t,r)},stop(t){rn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;rn.configure(t,r,n),r.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=!0):(i.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:a,borderRadius:o}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),d=dt(u.borderWidth);return{text:e[l.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(d.width+d.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:a&&(o||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class Ig extends ar{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=Ge(r.text)?r.text.length:1;this._padding=dt(r.padding);const s=i*$e(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:r,bottom:i,right:s,options:a}=this,o=a.align;let l=0,u,d,f;return this.isHorizontal()?(d=ut(o,r,s),f=n+e,u=s-r):(a.position==="left"?(d=r+e,f=ut(o,i,n),l=Je*-.5):(d=s-e,f=ut(o,n,i),l=Je*.5),u=i-n),{titleX:d,titleY:f,maxWidth:u,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const r=$e(n.font),s=r.lineHeight/2+this._padding.top,{titleX:a,titleY:o,maxWidth:l,rotation:u}=this._drawArgs(s);ci(e,n.text,0,0,r,{color:n.color,maxWidth:l,rotation:u,textAlign:Jc(n.align),textBaseline:"middle",translation:[a,o]})}}function Dk(t,e){const n=new Ig({ctx:t.ctx,options:e,chart:t});rn.configure(t,n,e),rn.addBox(t,n),t.titleBlock=n}var Bk={id:"title",_element:Ig,start(t,e,n){Dk(t,n)},stop(t){const e=t.titleBlock;rn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const r=t.titleBlock;rn.configure(t,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ts={average(t){if(!t.length)return!1;let e,n,r=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const o=t[e].element;if(o&&o.hasValue()){const l=o.tooltipPosition();r.add(l.x),i+=l.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((o,l)=>o+l)/r.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,i=Number.POSITIVE_INFINITY,s,a,o;for(s=0,a=t.length;s<a;++s){const l=t[s].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),d=Vu(e,u);d<i&&(i=d,o=l)}}if(o){const l=o.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function En(t,e){return e&&(Ge(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Vn(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
25
25
|
`)>-1?t.split(`
|
|
26
26
|
`):t}function Fk(t,e){const{element:n,datasetIndex:r,index:i}=e,s=t.getDatasetMeta(r).controller,{label:a,value:o}=s.getLabelAndValue(i);return{chart:t,label:a,parsed:s.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:o,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function ay(t,e){const n=t.chart.ctx,{body:r,footer:i,title:s}=t,{boxWidth:a,boxHeight:o}=e,l=$e(e.bodyFont),u=$e(e.titleFont),d=$e(e.footerFont),f=s.length,y=i.length,h=r.length,p=dt(e.padding);let m=p.height,g=0,v=r.reduce((j,C)=>j+C.before.length+C.lines.length+C.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,f&&(m+=f*u.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),v){const j=e.displayColors?Math.max(o,l.lineHeight):l.lineHeight;m+=h*j+(v-h)*l.lineHeight+(v-1)*e.bodySpacing}y&&(m+=e.footerMarginTop+y*d.lineHeight+(y-1)*e.footerSpacing);let S=0;const k=function(j){g=Math.max(g,n.measureText(j).width+S)};return n.save(),n.font=u.string,Re(t.title,k),n.font=l.string,Re(t.beforeBody.concat(t.afterBody),k),S=e.displayColors?a+2+e.boxPadding:0,Re(r,j=>{Re(j.before,k),Re(j.lines,k),Re(j.after,k)}),S=0,n.font=d.string,Re(t.footer,k),n.restore(),g+=p.width,{width:g,height:m}}function zk(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function Uk(t,e,n,r){const{x:i,width:s}=r,a=n.caretSize+n.caretPadding;if(t==="left"&&i+s+a>e.width||t==="right"&&i-s-a<0)return!0}function Hk(t,e,n,r){const{x:i,width:s}=n,{width:a,chartArea:{left:o,right:l}}=t;let u="center";return r==="center"?u=i<=(o+l)/2?"left":"right":i<=s/2?u="left":i>=a-s/2&&(u="right"),Uk(u,t,e,n)&&(u="center"),u}function oy(t,e,n){const r=n.yAlign||e.yAlign||zk(t,n);return{xAlign:n.xAlign||e.xAlign||Hk(t,e,n,r),yAlign:r}}function qk(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function Wk(t,e,n){let{y:r,height:i}=t;return e==="top"?r+=n:e==="bottom"?r-=i+n:r-=i/2,r}function ly(t,e,n,r){const{caretSize:i,caretPadding:s,cornerRadius:a}=t,{xAlign:o,yAlign:l}=n,u=i+s,{topLeft:d,topRight:f,bottomLeft:y,bottomRight:h}=ki(a);let p=qk(e,o);const m=Wk(e,l,u);return l==="center"?o==="left"?p+=u:o==="right"&&(p-=u):o==="left"?p-=Math.max(d,y)+i:o==="right"&&(p+=Math.max(f,h)+i),{x:nn(p,0,r.width-e.width),y:nn(m,0,r.height-e.height)}}function qa(t,e,n){const r=dt(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function uy(t){return En([],Vn(t))}function Gk(t,e,n){return Lr(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function cy(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Lg={beforeTitle:Wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Wn,beforeBody:Wn,beforeLabel:Wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return De(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Wn,afterBody:Wn,beforeFooter:Wn,footer:Wn,afterFooter:Wn};function At(t,e,n,r){const i=t[e].call(n,r);return typeof i=="undefined"?Lg[e].call(n,r):i}class tc extends ar{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new pg(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Gk(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,i=At(r,"beforeTitle",this,e),s=At(r,"title",this,e),a=At(r,"afterTitle",this,e);let o=[];return o=En(o,Vn(i)),o=En(o,Vn(s)),o=En(o,Vn(a)),o}getBeforeBody(e,n){return uy(At(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,i=[];return Re(e,s=>{const a={before:[],lines:[],after:[]},o=cy(r,s);En(a.before,Vn(At(o,"beforeLabel",this,s))),En(a.lines,At(o,"label",this,s)),En(a.after,Vn(At(o,"afterLabel",this,s))),i.push(a)}),i}getAfterBody(e,n){return uy(At(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,i=At(r,"beforeFooter",this,e),s=At(r,"footer",this,e),a=At(r,"afterFooter",this,e);let o=[];return o=En(o,Vn(i)),o=En(o,Vn(s)),o=En(o,Vn(a)),o}_createItems(e){const n=this._active,r=this.chart.data,i=[],s=[],a=[];let o=[],l,u;for(l=0,u=n.length;l<u;++l)o.push(Fk(this.chart,n[l]));return e.filter&&(o=o.filter((d,f,y)=>e.filter(d,f,y,r))),e.itemSort&&(o=o.sort((d,f)=>e.itemSort(d,f,r))),Re(o,d=>{const f=cy(e.callbacks,d);i.push(At(f,"labelColor",this,d)),s.push(At(f,"labelPointStyle",this,d)),a.push(At(f,"labelTextColor",this,d))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=a,this.dataPoints=o,o}update(e,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,a=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const o=Ts[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=ay(this,r),u=Object.assign({},o,l),d=oy(this.chart,r,u),f=ly(r,u,d,this.chart);this.xAlign=d.xAlign,this.yAlign=d.yAlign,s={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}this._tooltipItems=a,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,i){const s=this.getCaretPosition(e,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:a,cornerRadius:o}=r,{topLeft:l,topRight:u,bottomLeft:d,bottomRight:f}=ki(o),{x:y,y:h}=e,{width:p,height:m}=n;let g,v,S,k,j,C;return s==="center"?(j=h+m/2,i==="left"?(g=y,v=g-a,k=j+a,C=j-a):(g=y+p,v=g+a,k=j-a,C=j+a),S=g):(i==="left"?v=y+Math.max(l,d)+a:i==="right"?v=y+p-Math.max(u,f)-a:v=this.caretX,s==="top"?(k=h,j=k-a,g=v-a,S=v+a):(k=h+m,j=k+a,g=v+a,S=v-a),C=k),{x1:g,x2:v,x3:S,y1:k,y2:j,y3:C}}drawTitle(e,n,r){const i=this.title,s=i.length;let a,o,l;if(s){const u=Ei(r.rtl,this.x,this.width);for(e.x=qa(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",a=$e(r.titleFont),o=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;l<s;++l)n.fillText(i[l],u.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+o,l+1===s&&(e.y+=r.titleMarginBottom-o)}}_drawColorBox(e,n,r,i,s){const a=this.labelColors[r],o=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=s,d=$e(s.bodyFont),f=qa(this,"left",s),y=i.x(f),h=l<d.lineHeight?(d.lineHeight-l)/2:0,p=n.y+h;if(s.usePointStyle){const m={radius:Math.min(u,l)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},g=i.leftForLtr(y,u)+u/2,v=p+l/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,Xu(e,m,g,v),e.strokeStyle=a.borderColor,e.fillStyle=a.backgroundColor,Xu(e,m,g,v)}else{e.lineWidth=je(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,e.strokeStyle=a.borderColor,e.setLineDash(a.borderDash||[]),e.lineDashOffset=a.borderDashOffset||0;const m=i.leftForLtr(y,u),g=i.leftForLtr(i.xPlus(y,1),u-2),v=ki(a.borderRadius);Object.values(v).some(S=>S!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,Io(e,{x:m,y:p,w:u,h:l,radius:v}),e.fill(),e.stroke(),e.fillStyle=a.backgroundColor,e.beginPath(),Io(e,{x:g,y:p+1,w:u-2,h:l-2,radius:v}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(m,p,u,l),e.strokeRect(m,p,u,l),e.fillStyle=a.backgroundColor,e.fillRect(g,p+1,u-2,l-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:a,displayColors:o,boxHeight:l,boxWidth:u,boxPadding:d}=r,f=$e(r.bodyFont);let y=f.lineHeight,h=0;const p=Ei(r.rtl,this.x,this.width),m=function(x){n.fillText(x,p.x(e.x+h),e.y+y/2),e.y+=y+s},g=p.textAlign(a);let v,S,k,j,C,b,w;for(n.textAlign=a,n.textBaseline="middle",n.font=f.string,e.x=qa(this,g,r),n.fillStyle=r.bodyColor,Re(this.beforeBody,m),h=o&&g!=="right"?a==="center"?u/2+d:u+2+d:0,j=0,b=i.length;j<b;++j){for(v=i[j],S=this.labelTextColors[j],n.fillStyle=S,Re(v.before,m),k=v.lines,o&&k.length&&(this._drawColorBox(n,e,j,p,r),y=Math.max(f.lineHeight,l)),C=0,w=k.length;C<w;++C)m(k[C]),y=f.lineHeight;Re(v.after,m)}h=0,y=f.lineHeight,Re(this.afterBody,m),e.y-=s}drawFooter(e,n,r){const i=this.footer,s=i.length;let a,o;if(s){const l=Ei(r.rtl,this.x,this.width);for(e.x=qa(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=$e(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,o=0;o<s;++o)n.fillText(i[o],l.x(e.x),e.y+a.lineHeight/2),e.y+=a.lineHeight+r.footerSpacing}}drawBackground(e,n,r,i){const{xAlign:s,yAlign:a}=this,{x:o,y:l}=e,{width:u,height:d}=r,{topLeft:f,topRight:y,bottomLeft:h,bottomRight:p}=ki(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(o+f,l),a==="top"&&this.drawCaret(e,n,r,i),n.lineTo(o+u-y,l),n.quadraticCurveTo(o+u,l,o+u,l+y),a==="center"&&s==="right"&&this.drawCaret(e,n,r,i),n.lineTo(o+u,l+d-p),n.quadraticCurveTo(o+u,l+d,o+u-p,l+d),a==="bottom"&&this.drawCaret(e,n,r,i),n.lineTo(o+h,l+d),n.quadraticCurveTo(o,l+d,o,l+d-h),a==="center"&&s==="left"&&this.drawCaret(e,n,r,i),n.lineTo(o,l+f),n.quadraticCurveTo(o,l,o+f,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const a=Ts[e.position].call(this,this._active,this._eventPosition);if(!a)return;const o=this._size=ay(this,e),l=Object.assign({},a,this._size),u=oy(n,e,l),d=ly(e,l,u,n);(i._to!==d.x||s._to!==d.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=o.width,this.height=o.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,d))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=dt(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(e.save(),e.globalAlpha=r,this.drawBackground(s,e,i,n),ug(e,n.textDirection),s.y+=a.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),cg(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,i=e.map(({datasetIndex:o,index:l})=>{const u=this.chart.getDatasetMeta(o);if(!u)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:u.data[l],index:l}}),s=!ko(r,i),a=this._positionChanged(i,n);(s||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],a=this._getActiveElements(e,s,n,r),o=this._positionChanged(a,e),l=n||!ko(a,s)||o;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,r,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const a=this.chart.getElementsAtEventForMode(e,s.mode,s,r);return s.reverse&&a.reverse(),a}_positionChanged(e,n){const{caretX:r,caretY:i,options:s}=this,a=Ts[s.position].call(this,e,n);return a!==!1&&(r!==a.x||i!==a.y)}}fe(tc,"positioners",Ts);var Qk={id:"tooltip",_element:tc,positioners:Ts,afterInit(t,e,n){n&&(t.tooltip=new tc({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Lg},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Yk=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function Vk(t,e,n,r){const i=t.indexOf(e);if(i===-1)return Yk(t,e,n,r);const s=t.lastIndexOf(e);return i!==s?n:i}const Kk=(t,e)=>t===null?null:nn(Math.round(t),0,e);function dy(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class nc extends ns{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(De(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:Vk(r,e,Se(n,e),this._addedLabels),Kk(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=e;a<=n;a++)i.push({value:a});return i}getLabelForValue(e){return dy.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}fe(nc,"id","category"),fe(nc,"defaults",{ticks:{callback:dy}});function Xk(t,e){const n=[],{bounds:i,step:s,min:a,max:o,precision:l,count:u,maxTicks:d,maxDigits:f,includeBounds:y}=t,h=s||1,p=d-1,{min:m,max:g}=e,v=!De(a),S=!De(o),k=!De(u),j=(g-m)/(f+1);let C=fh((g-m)/p/h)*h,b,w,x,L;if(C<1e-14&&!v&&!S)return[{value:m},{value:g}];L=Math.ceil(g/C)-Math.floor(m/C),L>p&&(C=fh(L*C/p/h)*h),De(l)||(b=Math.pow(10,l),C=Math.ceil(C*b)/b),i==="ticks"?(w=Math.floor(m/C)*C,x=Math.ceil(g/C)*C):(w=m,x=g),v&&S&&s&&g6((o-a)/s,C/1e3)?(L=Math.round(Math.min((o-a)/C,d)),C=(o-a)/L,w=a,x=o):k?(w=v?a:w,x=S?o:x,L=u-1,C=(x-w)/L):(L=(x-w)/C,_s(L,Math.round(L),C/1e3)?L=Math.round(L):L=Math.ceil(L));const D=Math.max(hh(C),hh(w));b=Math.pow(10,De(l)?D:l),w=Math.round(w*b)/b,x=Math.round(x*b)/b;let M=0;for(v&&(y&&w!==a?(n.push({value:a}),w<a&&M++,_s(Math.round((w+M*C)*b)/b,a,fy(a,j,t))&&M++):w<a&&M++);M<L;++M){const I=Math.round((w+M*C)*b)/b;if(S&&I>o)break;n.push({value:I})}return S&&y&&x!==o?n.length&&_s(n[n.length-1].value,o,fy(o,j,t))?n[n.length-1].value=o:n.push({value:o}):(!S||x===o)&&n.push({value:x}),n}function fy(t,e,{horizontal:n,minRotation:r}){const i=Sr(r),s=(n?Math.sin(i):Math.cos(i))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}class rc extends ns{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return De(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const a=l=>i=n?i:l,o=l=>s=r?s:l;if(e){const l=Gi(i),u=Gi(s);l<0&&u<0?o(0):l>0&&u>0&&a(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);o(s+l),e||a(i-l)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,a=Xk(i,s);return e.bounds==="ticks"&&v6(a,this,"value"),e.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return tg(e,this.chart.options.locale,this.options.ticks.format)}}class ic extends rc{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=rt(e)?e:0,this.max=rt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=Sr(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}fe(ic,"id","linear"),fe(ic,"defaults",{ticks:{callback:$c.formatters.numeric}});function sc(t){const e=t.ticks;if(e.display&&t.display){const n=dt(e.backdropPadding);return Se(e.font&&e.font.size,Ye.font.size)+n.height}return 0}function Jk(t,e,n){return n=Ge(n)?n:[n],{w:z6(t,e.string,n),h:n.length*e.lineHeight}}function hy(t,e,n,r,i){return t===r||t===i?{start:e-n/2,end:e+n/2}:t<r||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function Zk(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),r=[],i=[],s=t._pointLabels.length,a=t.options.pointLabels,o=a.centerPointLabels?Je/s:0;for(let l=0;l<s;l++){const u=a.setContext(t.getPointLabelContext(l));i[l]=u.padding;const d=t.getPointPosition(l,t.drawingArea+i[l],o),f=$e(u.font),y=Jk(t.ctx,f,t._pointLabels[l]);r[l]=y;const h=Qt(t.getIndexAngle(l)+o),p=Math.round(Kc(h)),m=hy(p,d.x,y.w,0,180),g=hy(p,d.y,y.h,90,270);$k(n,e,h,m,g)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=nE(t,r,i)}function $k(t,e,n,r,i){const s=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let o=0,l=0;r.start<e.l?(o=(e.l-r.start)/s,t.l=Math.min(t.l,e.l-o)):r.end>e.r&&(o=(r.end-e.r)/s,t.r=Math.max(t.r,e.r+o)),i.start<e.t?(l=(e.t-i.start)/a,t.t=Math.min(t.t,e.t-l)):i.end>e.b&&(l=(i.end-e.b)/a,t.b=Math.max(t.b,e.b+l))}function eE(t,e,n){const r=t.drawingArea,{extra:i,additionalAngle:s,padding:a,size:o}=n,l=t.getPointPosition(e,r+i+a,s),u=Math.round(Kc(Qt(l.angle+Yt))),d=sE(l.y,o.h,u),f=rE(u),y=iE(l.x,o.w,f);return{visible:!0,x:l.x,y:d,textAlign:f,left:y,top:d,right:y+o.w,bottom:d+o.h}}function tE(t,e){if(!e)return!0;const{left:n,top:r,right:i,bottom:s}=t;return!(nr({x:n,y:r},e)||nr({x:n,y:s},e)||nr({x:i,y:r},e)||nr({x:i,y:s},e))}function nE(t,e,n){const r=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:a,display:o}=s.pointLabels,l={extra:sc(s)/2,additionalAngle:a?Je/i:0};let u;for(let d=0;d<i;d++){l.padding=n[d],l.size=e[d];const f=eE(t,d,l);r.push(f),o==="auto"&&(f.visible=tE(f,u),f.visible&&(u=f))}return r}function rE(t){return t===0||t===180?"center":t<180?"left":"right"}function iE(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function sE(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function aE(t,e,n){const{left:r,top:i,right:s,bottom:a}=n,{backdropColor:o}=e;if(!De(o)){const l=ki(e.borderRadius),u=dt(e.backdropPadding);t.fillStyle=o;const d=r-u.left,f=i-u.top,y=s-r+u.width,h=a-i+u.height;Object.values(l).some(p=>p!==0)?(t.beginPath(),Io(t,{x:d,y:f,w:y,h,radius:l}),t.fill()):t.fillRect(d,f,y,h)}}function oE(t,e){const{ctx:n,options:{pointLabels:r}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const a=r.setContext(t.getPointLabelContext(i));aE(n,a,s);const o=$e(a.font),{x:l,y:u,textAlign:d}=s;ci(n,t._pointLabels[i],l,u+o.lineHeight/2,o,{color:a.color,textAlign:d,textBaseline:"middle"})}}function Ng(t,e,n,r){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,Kt);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let a=1;a<r;a++)s=t.getPointPosition(a,e),i.lineTo(s.x,s.y)}}function lE(t,e,n,r,i){const s=t.ctx,a=e.circular,{color:o,lineWidth:l}=e;!a&&!r||!o||!l||n<0||(s.save(),s.strokeStyle=o,s.lineWidth=l,s.setLineDash(i.dash||[]),s.lineDashOffset=i.dashOffset,s.beginPath(),Ng(t,n,a,r),s.closePath(),s.stroke(),s.restore())}function uE(t,e,n){return Lr(t,{label:n,index:e,type:"pointLabel"})}class Ps extends rc{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=dt(sc(this.options)/2),n=this.width=this.maxWidth-e.width,r=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+r/2+e.top),this.drawingArea=Math.floor(Math.min(n,r)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=rt(e)&&!isNaN(e)?e:0,this.max=rt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/sc(this.options))}generateTickLabels(e){rc.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,r)=>{const i=Fe(this.options.pointLabels.callback,[n,r],this);return i||i===0?i:""}).filter((n,r)=>this.chart.getDataVisibility(r))}fit(){const e=this.options;e.display&&e.pointLabels.display?Zk(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,r,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((r-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,r,i))}getIndexAngle(e){const n=Kt/(this._pointLabels.length||1),r=this.options.startAngle||0;return Qt(e*n+Sr(r))}getDistanceFromCenterForValue(e){if(De(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(De(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const r=n[e];return uE(this.getContext(),e,r)}}getPointPosition(e,n,r=0){const i=this.getIndexAngle(e)-Yt+r;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:r,right:i,bottom:s}=this._pointLabelItems[e];return{left:n,top:r,right:i,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const r=this.ctx;r.save(),r.beginPath(),Ng(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=e,r.fill(),r.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:r,grid:i,border:s}=n,a=this._pointLabels.length;let o,l,u;if(n.pointLabels.display&&oE(this,a),i.display&&this.ticks.forEach((d,f)=>{if(f!==0||f===0&&this.min<0){l=this.getDistanceFromCenterForValue(d.value);const y=this.getContext(f),h=i.setContext(y),p=s.setContext(y);lE(this,h,l,a,p)}}),r.display){for(e.save(),o=a-1;o>=0;o--){const d=r.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:y}=d;!y||!f||(e.lineWidth=y,e.strokeStyle=f,e.setLineDash(d.borderDash),e.lineDashOffset=d.borderDashOffset,l=this.getDistanceFromCenterForValue(n.reverse?this.min:this.max),u=this.getPointPosition(o,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,r=n.ticks;if(!r.display)return;const i=this.getIndexAngle(0);let s,a;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((o,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const u=r.setContext(this.getContext(l)),d=$e(u.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){e.font=d.string,a=e.measureText(o.label).width,e.fillStyle=u.backdropColor;const f=dt(u.backdropPadding);e.fillRect(-a/2-f.left,-s-d.size/2-f.top,a+f.width,d.size+f.height)}ci(e,o.label,0,-s,d,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}}fe(Ps,"id","radialLinear"),fe(Ps,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:$c.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),fe(Ps,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),fe(Ps,"descriptors",{angleLines:{_fallback:"grid"}});const ul={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},kt=Object.keys(ul);function yy(t,e){return t-e}function py(t,e){if(De(e))return null;const n=t._adapter,{parser:r,round:i,isoWeekday:s}=t._parseOpts;let a=e;return typeof r=="function"&&(a=r(a)),rt(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(ta(s)||s===!0)?n.startOf(a,"isoWeek",s):n.startOf(a,i)),+a)}function my(t,e,n,r){const i=kt.length;for(let s=kt.indexOf(t);s<i-1;++s){const a=ul[kt[s]],o=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-e)/(o*a.size))<=r)return kt[s]}return kt[i-1]}function cE(t,e,n,r,i){for(let s=kt.length-1;s>=kt.indexOf(n);s--){const a=kt[s];if(ul[a].common&&t._adapter.diff(i,r,a)>=e-1)return a}return kt[n?kt.indexOf(n):0]}function dE(t){for(let e=kt.indexOf(t)+1,n=kt.length;e<n;++e)if(ul[kt[e]].common)return kt[e]}function gy(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:i}=Xc(n,e),s=n[r]>=e?n[r]:n[i];t[s]=!0}}function fE(t,e,n,r){const i=t._adapter,s=+i.startOf(e[0].value,r),a=e[e.length-1].value;let o,l;for(o=s;o<=a;o=+i.add(o,1,r))l=n[o],l>=0&&(e[l].major=!0);return e}function vy(t,e,n){const r=[],i={},s=e.length;let a,o;for(a=0;a<s;++a)o=e[a],i[o]=a,r.push({value:o,major:!1});return s===0||!n?r:fE(t,r,i,n)}class Mo extends ns{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const r=e.time||(e.time={}),i=this._adapter=new Yj._date(e.adapters.date);i.init(n),Ms(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:py(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:i,max:s,minDefined:a,maxDefined:o}=this.getUserBounds();function l(u){!a&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!o&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!a||!o)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=rt(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=rt(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,a=this.max,o=S6(i,s,a);return this._unit=n.unit||(r.autoSkip?my(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):cE(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:dE(this._unit),this.initOffsets(i),e.reverse&&o.reverse(),vy(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?r=s:r=(s-this.getDecimalForValue(e[e.length-2]))/2);const a=e.length<3?.5:.25;n=nn(n,0,a),r=nn(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,a=s.unit||my(s.minUnit,n,r,this._getLabelCapacity(n)),o=Se(i.ticks.stepSize,1),l=a==="week"?s.isoWeekday:!1,u=ta(l)||l===!0,d={};let f=n,y,h;if(u&&(f=+e.startOf(f,"isoWeek",l)),f=+e.startOf(f,u?"day":a),e.diff(r,n,a)>1e5*o)throw new Error(n+" and "+r+" are too far apart with stepSize of "+o+" "+a);const p=i.ticks.source==="data"&&this.getDataTimestamps();for(y=f,h=0;y<r;y=+e.add(y,o,a),h++)gy(d,y,p);return(y===r||i.bounds==="ticks"||h===1)&&gy(d,y,p),Object.keys(d).sort(yy).map(m=>+m)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,s=this._unit,a=n||i[s];return this._adapter.format(e,a)}_tickFormatFunction(e,n,r,i){const s=this.options,a=s.ticks.callback;if(a)return Fe(a,[e,n,r],this);const o=s.time.displayFormats,l=this._unit,u=this._majorUnit,d=l&&o[l],f=u&&o[u],y=r[n],h=u&&f&&y&&y.major;return this._adapter.format(e,i||(h?f:d))}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,i=Sr(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),a=Math.sin(i),o=this._resolveTickFontOptions(0).size;return{w:r*s+o*a,h:r*a+o*s}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(e,0,vy(this,[e],this._majorUnit),i),a=this._getLabelSize(s),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)e.push(py(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return j6(e.sort(yy))}}fe(Mo,"id","time"),fe(Mo,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Wa(t,e,n){let r=0,i=t.length-1,s,a,o,l;n?(e>=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=Wr(t,"pos",e)),{pos:s,time:o}=t[r],{pos:a,time:l}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=Wr(t,"time",e)),{time:s,pos:o}=t[r],{time:a,pos:l}=t[i]);const u=a-s;return u?o+(l-o)*(e-s)/u:o}class by extends Mo{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Wa(n,this.min),this._tableRange=Wa(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,i=[],s=[];let a,o,l,u,d;for(a=0,o=e.length;a<o;++a)u=e[a],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,o=i.length;a<o;++a)d=i[a+1],l=i[a-1],u=i[a],Math.round((d+l)/2)!==u&&s.push({time:u,pos:a/(o-1)});return s}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(Wa(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return Wa(this._table,r*this._tableRange+this._minPos,!0)}}fe(by,"id","timeseries"),fe(by,"defaults",Mo.defaults);const Mg="label";function xy(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function hE(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function _g(t,e){t.labels=e}function Rg(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Mg;const r=[];t.datasets=e.map(i=>{const s=t.datasets.find(a=>a[n]===i[n]);return!s||!i.data||r.includes(s)?{...i}:(r.push(s),Object.assign(s,i),s)})}function yE(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mg;const n={labels:[],datasets:[]};return _g(n,t.labels),Rg(n,t.datasets,e),n}function pE(t,e){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:s,type:a,data:o,options:l,plugins:u=[],fallbackContent:d,updateMode:f,...y}=t,h=F.useRef(null),p=F.useRef(null),m=()=>{h.current&&(p.current=new ol(h.current,{type:a,data:yE(o,s),options:l&&{...l},plugins:u}),xy(e,p.current))},g=()=>{xy(e,null),p.current&&(p.current.destroy(),p.current=null)};return F.useEffect(()=>{!i&&p.current&&l&&hE(p.current,l)},[i,l]),F.useEffect(()=>{!i&&p.current&&_g(p.current.config.data,o.labels)},[i,o.labels]),F.useEffect(()=>{!i&&p.current&&o.datasets&&Rg(p.current.config.data,o.datasets,s)},[i,o.datasets]),F.useEffect(()=>{p.current&&(i?(g(),setTimeout(m)):p.current.update(f))},[i,l,o.labels,o.datasets,f]),F.useEffect(()=>{p.current&&(g(),setTimeout(m))},[a]),F.useEffect(()=>(m(),()=>g()),[]),F.createElement("canvas",{ref:h,role:"img",height:n,width:r,...y},d)}const mE=F.forwardRef(pE);function Dg(t,e){return ol.register(e),F.forwardRef((n,r)=>F.createElement(mE,{...n,ref:r,type:t}))}const gE=Dg("line",lo),vE=Dg("radar",uo);ol.register(nc,ic,Ps,jr,ho,Pk,Bk,Qk,Rk);var ac={elements:{line:{backgroundColor:"rgba(166, 30, 105, 0.2)",borderColor:"rgba(166, 30, 105, 1)",borderWidth:4},point:{backgroundColor:"rgba(166, 30, 105, 1)",borderColor:"rgba(255,255,255, .9)",borderWidth:2,radius:5,hoverRadius:6,hoverBorderWidth:3}},responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{mode:"index",intersect:!1}},interaction:{mode:"nearest",axis:"x",intersect:!1}},bE=function(e){var n=e.chart.ctx,r=e.chart.chartArea;if(!r)return"rgba(166, 30, 105, 0.1)";var i=(r.left+r.right)/2,s=(r.top+r.bottom)/2,a=Math.min((r.right-r.left)/2,(r.bottom-r.top)/2),o=n.createRadialGradient(i,s,0,i,s,a);return o.addColorStop(0,"rgba(255, 255, 255, 0.4)"),o.addColorStop(.3,"rgba(255, 255, 255, 0.4)"),o.addColorStop(1,"rgba(166, 30, 105, 0.2)"),o};function wy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Ay(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?wy(Object(n),!0).forEach(function(r){xE(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wy(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function xE(t,e,n){return(e=wE(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wE(t){var e=AE(t,"string");return Vi(e)=="symbol"?e:e+""}function AE(t,e){if(Vi(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Vi(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Vi(t){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vi(t)}function SE(t){var e=new Date(t);return isNaN(e.getTime())?String(t):e.toLocaleString("en-US",{month:"short",day:"numeric"})}var CE=function(){var e,n,r,i,s=or(),a=s.data,o=s.isLoading,l=s.isRefetching,u=a==null?void 0:a.mentions,d=u==null||(e=u.mentionedInNumberOfQueries)===null||e===void 0||(e=e.previous)===null||e===void 0?void 0:e.difference,f=u==null?void 0:u.chart,y=f==null||(n=f.datasets)===null||n===void 0?void 0:n[0],h=Array.isArray(f==null?void 0:f.labels)?f.labels:f!=null&&f.labels&&Vi(f.labels)==="object"?Object.values(f.labels):[],p=h.map(function(S){return SE(String(S))}),m=a==null?void 0:a.numberOfQueries;if(!m){var g=0;Array.isArray(f==null?void 0:f.datasets)&&f.datasets.forEach(function(S){Array.isArray(S==null?void 0:S.data)&&S.data.forEach(function(k){typeof k=="number"&&k>g&&(g=k)})}),m=g+2}var v=Ay(Ay({},ac),{},{responsive:!0,maintainAspectRatio:!1,scales:{x:{display:!0,title:{display:!1,text:"Date"},grid:{display:!1}},y:{display:!0,title:{display:!1,text:"Number of Mentions"},beginAtZero:!0,max:m,ticks:{stepSize:1}}}});return c.jsx(A.Card,{className:"yst-overflow-visible",children:c.jsxs(A.Card.Content,{className:"yst-space-y-4",children:[c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx(wa,{title:"Mentions progress",tooltip:"Tracks how your brand mentions have changed over time across the same query set."}),c.jsx(ts,{score:u==null||(r=u.mentionedInNumberOfQueries)===null||r===void 0?void 0:r.value,total:a==null?void 0:a.numberOfQueries,delta:d,deltaSuffix:"since last analysis",suffix:"queries",isLoading:o||l})]}),y&&y.data.length<2?c.jsx(A.Alert,{variant:"info",children:"One more analysis needed to show more insights."}):c.jsx("div",{className:"yst-h-72",children:c.jsx(gE,{data:{labels:p,datasets:(i=f==null?void 0:f.datasets)!==null&&i!==void 0?i:[]},options:v})})]})})},jE=function(){var e,n=or(),r=n.data,i=n.isLoading,s=n.isRefetching;if(i&&!s||(r==null||(e=r.mentions)===null||e===void 0||(e=e.mentionedInNumberOfQueries)===null||e===void 0?void 0:e.value)!==0)return null;var a=[{title:"Activate llms.txt",description:"Make sure AI systems know where to look and which pages matter most.",link:{url:"https://yoast.com/help/enable-llmstxt/",text:"Set up llms.txt in Yoast SEO"}},{title:"Adopt an LLM-friendly content structure",description:"Start with clear definitions or TL;DRs, use subheadings, and format answers so LLMs can lift them directly.",link:{url:"https://yoast.com/yoast-seo-premium-september-9-2025/",text:"Learn how to generate AI summaries"}},{title:"Simplify writing and readability",description:"Use shorter sentences, plain language, and one idea per paragraph. This makes it easier for AI systems to recognize and quote your content."}];return c.jsx(A.Card,{className:"yst-overflow-visible yst-p-8 yst-text-slate-800 md:yst-col-span-2",children:c.jsxs(A.Card.Content,{className:"yst-max-w-2xl",children:[c.jsx(A.Title,{size:"2",className:"yst-mb-2 yst-text-slate-900",children:"We couldn't find your brand in this brand analysis..."}),c.jsx("p",{className:"yst-text-slate-600",children:"This means LLMs may not yet be surfacing your site in answers. Don't worry, here are some steps you can take today to boost your AI visibility:"}),c.jsx("ol",{className:"yst-my-0 yst-list-none yst-divide-y yst-divide-slate-200 [counter-reset:list-counter]",children:a.map(function(o,l){return c.jsx("li",{className:"yst-relative yst-py-4 [counter-increment:list-counter] before:yst-absolute before:yst-left-0 before:yst-font-semibold before:yst-text-slate-800 before:yst-content-[counter(list-counter)'.'] last:yst-pb-0",children:c.jsxs("div",{className:"yst-ml-4 yst-text-slate-600",children:[c.jsx("strong",{className:"yst-font-medium yst-text-slate-800",children:o.title}),c.jsx("br",{}),o.description,o.link&&c.jsxs(c.Fragment,{children:[c.jsx("br",{}),c.jsx("span",{className:"yst-mt-2 yst-block",children:c.jsxs("a",{href:o.link.url,target:"_blank",rel:"noopener noreferrer",className:"yst-font-medium",children:[o.link.text,c.jsx(lf,{className:"yst-ml-1 yst-inline yst-h-3 yst-w-3"})]})})]})]})},l)})}),c.jsx(li,{size:4,className:"yst-pt-0"}),c.jsxs("p",{className:"yst-text-slate-600",children:["Want to go deeper? →"," ",c.jsxs("a",{href:"https://yoast.com/how-to-optimize-content-for-llms/",target:"_blank",rel:"noopener noreferrer",className:"yst-font-medium",children:["Read our full guide on optimizing content for LLMs",c.jsx(lf,{className:"yst-ml-1 yst-inline yst-h-3 yst-w-3"})]})]})]})})};function Ga(t){var e=t.value,n=e===void 0?"—":e,r=t.label,i=t.tooltip,s=t.className,a=t.borderBottom,o=a===void 0?!1:a,l=t.borderRight,u=l===void 0?!1:l,d=t.delta,f=t.tooltipPosition,y=f===void 0?"left":f;return c.jsxs("div",{className:oe("yst-relative yst-flex yst-flex-col yst-items-center yst-gap-1 yst-p-4 yst-text-center",o&&"yst-border-b yst-border-slate-200",u&&"yst-border-r yst-border-slate-200",s),children:[c.jsx("p",{className:"yst-text-2xl yst-font-bold yst-text-slate-900",children:n}),c.jsx("p",{className:"yst-text-tiny yst-text-slate-600",children:r}),typeof d=="number"&&c.jsxs("p",{className:oe("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",Ao(d)),children:[d>0?c.jsx(k0,{}):d<0?c.jsx(j0,{}):null,d>-1e-6&&"+",d]}),i&&c.jsx(qc,{id:"tooltip-".concat(r.replace(/\s+/g,"-").toLowerCase()),className:"yst-absolute yst-right-2 yst-top-2",position:y,children:i})]})}function kE(t){var e=t.children,n=t.className;return c.jsx("div",{className:oe("yst-grid yst-w-full yst-grid-cols-2 yst-gap-0 yst-rounded-lg",n),children:e})}function EE(t){return t>0?"yst-text-green-600":t<0?"yst-text-red-600":"yst-text-slate-500"}function OE(t){var e=t.current,n=t.previous,r=t.className;if(typeof n!="number")return null;var i=e-n,s=i>0,a=i<0,o="".concat(i>0?"+":"").concat(i.toFixed(1),"%");return c.jsxs("div",{className:oe("yst-flex yst-items-center yst-gap-1 yst-text-tiny yst-font-bold",EE(i),r),"aria-label":s?"Visibility increased by ".concat(o):a?"Visibility decreased by ".concat(o):"No change in visibility",children:[s&&c.jsx(k0,{className:"yst-w-4 yst-h-4"}),a&&c.jsx(j0,{className:"yst-w-4 yst-h-4"}),o]})}function ra(t){"@babel/helpers - typeof";return ra=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ra(t)}function TE(t,e){return NE(t)||LE(t,e)||IE(t,e)||PE()}function PE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
27
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IE(t,e){if(t){if(typeof t=="string")return Sy(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sy(t,e):void 0}}function Sy(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function LE(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function NE(t){if(Array.isArray(t))return t}function Cy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cy(Object(n),!0).forEach(function(r){ME(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cy(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ME(t,e,n){return(e=_E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _E(t){var e=RE(t,"string");return ra(e)=="symbol"?e:e+""}function RE(t,e){if(ra(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ra(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function DE(){var t,e,n,r,i,s,a,o,l,u,d,f,y,h,p,m,g,v,S,k,j,C,b,w=or(),x=w.data,L=w.isLoading,D=x==null||(t=x.scores)===null||t===void 0?void 0:t.standardized,M=(e=x==null||(n=x.mentions)===null||n===void 0||(n=n.mentionedInNumberOfQueries)===null||n===void 0?void 0:n.value)!==null&&e!==void 0?e:0,I=x==null||(r=x.mentions)===null||r===void 0||(r=r.mentionedInNumberOfQueries)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,z=(i=x==null||(s=x.scores)===null||s===void 0||(s=s.standardized)===null||s===void 0||(s=s.citations)===null||s===void 0?void 0:s.value)!==null&&i!==void 0?i:0,
|
|
28
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zE(t,e){if(t){if(typeof t=="string")return jy(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jy(t,e):void 0}}function jy(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function UE(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function HE(t){if(Array.isArray(t))return t}var Hl=function(){var e=xt(),n=e.brandId,r=e.analysisId,i=FS(),s=i.isProduction,a=ft(),o=hi({query:{select:function(
|
|
29
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s8(t,e){if(t){if(typeof t=="string")return ky(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ky(t,e):void 0}}function ky(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a8(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function o8(t){if(Array.isArray(t))return t}var l8=function(e){var n=e.isRtl,r=n===void 0?!1:n,i=e.className,s=e.style,a=e.token,o=a===void 0?"":a,l=e.apiUrl,u=e.env,d=e.DebugInfo,f=e.basename,y=f===void 0?"/":f,h=e.subpath,p=h===void 0?"/":h,m=e.onNavigate,g=m===void 0?function(){}:m,v=e.onLogout,S=v===void 0?function(){}:v,k=e.onAddSubscription,j=k===void 0?function(){}:k,C=function(
|
|
30
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c8(t,e){if(t){if(typeof t=="string")return Ty(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ty(t,e):void 0}}function Ty(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d8(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function f8(t){if(Array.isArray(t))return t}var h8=function(e){var n=e.isOpen,r=e.onClose,i=e.groupToEdit,s=e.allBrands,a=xt(),o=a.brandId,l=a.analysisId,u=F.useState(""),d=ql(u,2),f=d[0],y=d[1],h=F.useState([]),p=ql(h,2),m=p[0],g=p[1],v=F.useState(!1),S=ql(v,2),k=S[0],j=S[1],C=It();F.useEffect(function(){if(n&&i&&i.type==="group"){var Y;y(String(i.name||""));var E=((Y=i.groupedBrands)===null||Y===void 0?void 0:Y.map(function(W){return String(W.id||"")}))||[];g(E)}},[n,i]);var b=g0({mutation:{onSuccess:function(){var Y=Oy(Is().m(function W(){return Is().w(function(H){for(;;)switch(H.n){case 0:return H.n=1,Promise.all([C.invalidateQueries({queryKey:wo(o)}),C.invalidateQueries({queryKey:tr(o,"latest")}),C.invalidateQueries({queryKey:mn(o,"latest")}),C.invalidateQueries({queryKey:tr(o,l)}),C.invalidateQueries({queryKey:mn(o,l)})]);case 1:
|
|
27
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IE(t,e){if(t){if(typeof t=="string")return Sy(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sy(t,e):void 0}}function Sy(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function LE(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function NE(t){if(Array.isArray(t))return t}function Cy(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Qa(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Cy(Object(n),!0).forEach(function(r){ME(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Cy(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ME(t,e,n){return(e=_E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _E(t){var e=RE(t,"string");return ra(e)=="symbol"?e:e+""}function RE(t,e){if(ra(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ra(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function DE(){var t,e,n,r,i,s,a,o,l,u,d,f,y,h,p,m,g,v,S,k,j,C,b,w=or(),x=w.data,L=w.isLoading,D=x==null||(t=x.scores)===null||t===void 0?void 0:t.standardized,M=(e=x==null||(n=x.mentions)===null||n===void 0||(n=n.mentionedInNumberOfQueries)===null||n===void 0?void 0:n.value)!==null&&e!==void 0?e:0,I=x==null||(r=x.mentions)===null||r===void 0||(r=r.mentionedInNumberOfQueries)===null||r===void 0||(r=r.previous)===null||r===void 0?void 0:r.difference,z=(i=x==null||(s=x.scores)===null||s===void 0||(s=s.standardized)===null||s===void 0||(s=s.citations)===null||s===void 0?void 0:s.value)!==null&&i!==void 0?i:0,O=(a=x==null||(o=x.citations)===null||o===void 0||(o=o.total)===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:0,T=x==null||(l=x.citations)===null||l===void 0||(l=l.total)===null||l===void 0||(l=l.previous)===null||l===void 0?void 0:l.difference,_=x==null||(u=x.rankings)===null||u===void 0||(u=u.list)===null||u===void 0?void 0:u.find(function(ie){var ke;return((ke=ie.brand)===null||ke===void 0?void 0:ke.isSelf)===!0}),R=(d=_==null||(f=_.rank)===null||f===void 0?void 0:f.value)!==null&&d!==void 0?d:"—",G=_==null||(y=_.rank)===null||y===void 0||(y=y.previous)===null||y===void 0?void 0:y.difference;G&&(G=G*-1);var Y=(h=D==null||(p=D.visibility)===null||p===void 0?void 0:p.value)!==null&&h!==void 0?h:0,E=D==null||(m=D.visibility)===null||m===void 0||(m=m.previous)===null||m===void 0?void 0:m.value,W=(g=D==null||(v=D.ranking)===null||v===void 0?void 0:v.value)!==null&&g!==void 0?g:0,H=(S=D==null||(k=D.sentiment)===null||k===void 0?void 0:k.value)!==null&&S!==void 0?S:0,P=(j=D==null||(C=D.mentions)===null||C===void 0?void 0:C.value)!==null&&j!==void 0?j:0,Q={labels:["Mentions","Ranking","Citations","Sentiment"],datasets:[{data:[P,W,z,H],backgroundColor:bE,pointBackgroundColor:"rgba(166, 30, 105, 1)"}]},Z=Qa(Qa({},ac),{},{plugins:Qa(Qa({},ac.plugins),{},{tooltip:{mode:"point",intersect:!0,callbacks:{label:function(ke){var $=ke.label||"",He=ke.parsed.r||0;return"".concat($,": ").concat(He,"%")}}}}),interaction:{mode:"point",intersect:!0},scales:{r:{beginAtZero:!0,min:0,max:100,ticks:{stepSize:20}}}}),K=F.useState(typeof window!="undefined"&&window.innerWidth<800?"top":"left"),J=TE(K,2),le=J[0],ue=J[1];return F.useEffect(function(){function ie(){ue(window.innerWidth<800?"top":"left")}return window.addEventListener("resize",ie),function(){return window.removeEventListener("resize",ie)}},[]),c.jsx(A.Card,{className:"yst-overflow-visible md:yst-col-span-2",children:c.jsxs(A.Card.Content,{children:[c.jsx(A.Title,{size:"3",className:"yst-mb-2",children:"AI Visibility Index (AIVI)"}),c.jsx(ts,{score:Y,total:100,isLoading:L}),c.jsx(OE,{current:Y,previous:E,className:"yst-mb-4"}),c.jsxs("div",{className:"yst-flex yst-flex-col yst-items-center yst-justify-around yst-justify-items-center yst-gap-8 md:yst-flex-row",children:[c.jsxs("div",{className:"yst-radar-chart-container yst-relative yst-aspect-square yst-h-full yst-w-full md:yst-flex md:yst-w-1/2 md:yst-items-center md:yst-justify-center",children:[c.jsx(vE,{data:Q,options:Z}),c.jsx(qc,{id:"tooltip-radar-chart",className:"yst-absolute yst-right-2 yst-top-2",position:"left",children:"The AI Visibility Index (AIVI) shows how visible your brand is across major AI platforms like ChatGPT and Perplexity, based on mentions, citations, sentiment, and rankings."})]}),c.jsx("div",{className:"yst-mt-6 yst-w-full md:yst-mt-0 md:yst-flex md:yst-w-1/2 md:yst-items-center",children:c.jsxs(kE,{children:[c.jsx(Ga,{value:M,label:"Mentions",tooltip:"Mentions show how often your brand appears in AI-generated answers to the questions we send to LLMs.",borderBottom:!0,borderRight:!0,delta:I,tooltipPosition:le}),c.jsx(Ga,{value:typeof R=="number"&&Number.isFinite(R)&&R>0?c.jsxs(c.Fragment,{children:["#",R,R===1&&" 🏆"]}):"—",label:"Competitor ranking",tooltip:"Ranking shows the position your brand is mentioned in AI-generated answers—whether in a numbered list or the order of appearance in full-text responses.",borderBottom:!0,delta:G}),c.jsx(Ga,{value:O,label:"Citations",tooltip:"Citations are the source links found in AI-generated answers. They form the basis for mentions, sentiment, and ranking insights.",borderRight:!0,delta:T,tooltipPosition:le}),c.jsx(Ga,{value:H?"".concat(H,"%"):"—",label:"Positive sentiment",tooltip:"Sentiment reflects how positively, neutrally, or negatively your brand is mentioned in AI-generated answers, based on the cited sources.",delta:x==null||(b=x.scores)===null||b===void 0||(b=b.standardized)===null||b===void 0||(b=b.sentiment)===null||b===void 0||(b=b.previous)===null||b===void 0?void 0:b.difference})]})})]})]})})}function BE(t,e){return HE(t)||UE(t,e)||zE(t,e)||FE()}function FE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
28
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zE(t,e){if(t){if(typeof t=="string")return jy(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jy(t,e):void 0}}function jy(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function UE(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function HE(t){if(Array.isArray(t))return t}var Hl=function(){var e=xt(),n=e.brandId,r=e.analysisId,i=FS(),s=i.isProduction,a=ft(),o=hi({query:{select:function(O){var T=O.data;return T==null?void 0:T.brands}}}),l=o.data,u=o.isLoading,d=ga(n,r,{query:{enabled:!!n&&wf(r),select:function(O){var T=O.data;return T==null?void 0:T.analysis}}}),f=d.data,y=d.isLoading,h=Xo(n,{query:{enabled:!!n&&wf(r),select:function(O){var T=O.data;return T==null?void 0:T.analyses}}}),p=h.data,m=h.isLoading,g=f==null?void 0:f.status,v=u||y||m,S=l&&(l==null?void 0:l.length)>0,k=!v&&f&&g===yn.completed,j=F.useState(!1),C=BE(j,2),b=C[0],w=C[1],x=F.useRef(null),L=F.useRef(void 0),D=localStorage.getItem("yst_congratulations_toast_seen")==="true";F.useEffect(function(){return k&&!L.current&&!D&&(x.current=setTimeout(function(){w(!0),localStorage.setItem("yst_congratulations_toast_seen","true")},1e4)),!k&&L.current&&(w(!1),x.current&&(clearTimeout(x.current),x.current=null)),L.current=k,function(){x.current&&(clearTimeout(x.current),x.current=null)}},[k,D]);function M(z){var O=z.children;if(typeof window=="undefined")return null;var T=document.getElementById("tsx-toasts");return T?pm.createPortal(O,T):null}var I=function(O){var T=O.isVisible,_=O.setIsVisible,R=function(){_(!1)},G=l&&l.length>1||p&&p.length>1;return c.jsxs(A.Toast,{id:"toast",isVisible:T,setIsVisible:function(Y){Y||_(!1)},children:[c.jsxs("div",{className:"yst-mb-3 yst-flex yst-items-start yst-gap-3",children:[c.jsx(zu,{}),c.jsxs("div",{className:"yst-grow",children:[c.jsx(A.Title,{size:"3",className:"yst-mb-1",children:G?"Congratulations, your analysis is ready!":"Congratulations on completing your first brand analysis!"}),"You've completed your brand analysis. We'd love to hear what you think."]}),c.jsx(A.Button,{variant:"tertiary",onClick:R,children:c.jsx($o,{})})]}),c.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-4",children:[c.jsx(A.Button,{variant:"tertiary",onClick:R,children:"Dismiss"}),c.jsxs(A.Button,{as:"a",href:"https://www.surveymonkey.com/r/HGSB8DL",target:"_blank",children:["Give feedback",c.jsx(O0,{className:"yst-ml-2"})]})]})]})};return u?c.jsx(Pr,{}):S?c.jsxs("div",{className:"yst-space-y-4",children:[c.jsx(R5,{}),v&&!u&&c.jsxs("div",{children:[c.jsx(A.Title,{size:"2",className:"yst-mb-2",children:"Your brand analysis is loading"}),c.jsx("div",{className:"yst-inline-flex yst-w-full yst-items-center yst-justify-center",children:c.jsx(A.Spinner,{size:"8",variant:"primary",className:"yst-ml-2"})})]}),k&&c.jsxs("div",{className:"yst-space-y-4",children:[c.jsxs("div",{className:"yst-flex yst-flex-col yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-between",children:[c.jsx(A.Title,{size:"2",children:"Your brand analysis"}),c.jsxs("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:[!s&&c.jsx(A.Button,{variant:"secondary",onClick:function(){return a("/brands/".concat(n,"/analysis/").concat(r,"/scan-details"))},children:"Scan details"}),c.jsx(A.Button,{as:an,variant:"secondary",to:"/brands/".concat(n,"/analysis/").concat(r,"/analysis-details"),children:"Analysis details"}),c.jsxs(A.Button,{as:an,variant:"secondary",to:"/brands/".concat(n,"/brand-list"),disabled:!n,children:[c.jsx(w0,{})," Edit brand list"]})]})]}),c.jsxs("div",{className:"yst-grid yst-grid-cols-1 yst-gap-4 md:yst-grid-cols-2",children:[c.jsx(jE,{}),c.jsx(DE,{}),c.jsx(D5,{}),c.jsx(CE,{}),c.jsx(O3,{}),c.jsx(A3,{}),c.jsx(l3,{}),c.jsx(T3,{})]}),c.jsx(M,{children:c.jsx(I,{isVisible:b,setIsVisible:w})})]})]}):c.jsx(QS,{})},qE=F.lazy(function(){return Promise.resolve().then(()=>P8)}),WE=F.lazy(function(){return Promise.resolve().then(()=>IP)}),GE=F.lazy(function(){return Promise.resolve().then(()=>FP)}),QE=F.lazy(function(){return Promise.resolve().then(()=>hI)}),YE=F.lazy(function(){return Promise.resolve().then(()=>mI)}),VE=F.lazy(function(){return Promise.resolve().then(()=>PI)}),KE=F.lazy(function(){return Promise.resolve().then(()=>KI)}),XE=F.lazy(function(){return Promise.resolve().then(()=>yL)}),JE=F.lazy(function(){return Promise.resolve().then(()=>mL)}),ZE=new M2({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:1e3*60*5},mutations:{retry:!1}}}),$E=F.lazy(function(){return Promise.resolve({default:function(){return null}})}),dn=function(){return c.jsx("div",{className:"yst-flex yst-min-h-[200px] yst-items-center yst-justify-center",children:c.jsxs("div",{className:"yst-w-full yst-max-w-md yst-space-y-3",children:[c.jsx(A.SkeletonLoader,{className:"yst-h-8 yst-w-3/4"}),c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-full"}),c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-2/3"})]})})},e8=function(e){var n=e.hideNav,r=n===void 0?!1:n,i=e.disableLayout,s=i===void 0?!1:i,a=e.DebugInfo;return c.jsx(Nb,{children:c.jsxs(tt,{element:c.jsx(uS,{hideNav:r,disableLayout:s,DebugInfo:a}),children:[c.jsxs(tt,{path:"/",element:c.jsx(Wi,{}),children:[c.jsx(tt,{index:!0,element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"AI Brand Insights"}),c.jsx(Hl,{})]})}),c.jsxs(tt,{path:"brands/:brandId",element:c.jsx(mf,{}),children:[c.jsx(tt,{index:!0,element:c.jsx(Hl,{})}),c.jsx(tt,{path:"brand-list",element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"Brands - AI Brand Insights"}),c.jsx(qE,{})]})}),c.jsxs(tt,{path:"analysis/:analysisId",element:c.jsx(cS,{}),children:[c.jsx(tt,{index:!0,element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"Analysis - AI Brand Insights"}),c.jsx(Hl,{})]})}),c.jsx(tt,{path:"scan-details",element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"Scan details - AI Brand Insights"}),c.jsx(GE,{})]})}),c.jsx(tt,{path:"analysis-details",element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"Analysis Details - AI Brand Insights"}),c.jsx(WE,{})]})})]})]}),c.jsxs(tt,{path:"/setup",element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"Setup brand - AI Brand Insights"}),c.jsx(YE,{})]}),children:[c.jsx(tt,{index:!0,element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"AI Brand Insights"}),c.jsx(VE,{})]})}),c.jsxs(tt,{path:":brandId",element:c.jsx(mf,{}),children:[c.jsx(tt,{path:"queries",element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"Setup queries - AI Brand Insights"}),c.jsx(KE,{})]})}),c.jsx(tt,{path:"analysis",element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"Analysis - AI Brand Insights"}),c.jsx(XE,{})]})})]})]})]}),c.jsx(tt,{path:"/settings",element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"Settings - AI Brand Insights"}),c.jsx(QE,{})]})}),c.jsx(tt,{path:"/account-debug",element:c.jsxs(F.Suspense,{fallback:c.jsx(dn,{}),children:[c.jsx(un,{title:"Account debug - AI Brand Insights"}),c.jsx(JE,{})]})}),!1]})})},t8=function(e){var n=e.DebugInfo,r=e.hostAppProps;return c.jsxs(_2,{client:ZE,children:[c.jsx(bS,{children:c.jsxs(Gw,{hostAppProps:r,children:[c.jsx(e8,{DebugInfo:n}),c.jsx(xS,{})]})}),c.jsx(F.Suspense,{fallback:null,children:c.jsx($E,{initialIsOpen:!1})})]})};function n8(t){var e=t.subpath,n=e===void 0?"/":e,r=t.onNavigate,i=ft(),s=bt(),a=F.useRef(n),o=F.useRef(null),l=F.useRef(!1),u="".concat(s.pathname).concat(s.search).concat(s.hash),d=F.useCallback(r,[r]);return F.useEffect(function(){if(n===u){a.current=n;return}l.current||n!==a.current&&(a.current=n,o.current=n,l.current=!0,i(n,{replace:!0}),setTimeout(function(){l.current=!1},10))},[n,u,i]),F.useEffect(function(){l.current||u!==n&&u!==o.current&&(o.current=u,d(u))},[u,n,d]),null}function r8(t,e){return o8(t)||a8(t,e)||s8(t,e)||i8()}function i8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
29
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s8(t,e){if(t){if(typeof t=="string")return ky(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ky(t,e):void 0}}function ky(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a8(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function o8(t){if(Array.isArray(t))return t}var l8=function(e){var n=e.isRtl,r=n===void 0?!1:n,i=e.className,s=e.style,a=e.token,o=a===void 0?"":a,l=e.apiUrl,u=e.env,d=e.DebugInfo,f=e.basename,y=f===void 0?"/":f,h=e.subpath,p=h===void 0?"/":h,m=e.onNavigate,g=m===void 0?function(){}:m,v=e.onLogout,S=v===void 0?function(){}:v,k=e.onAddSubscription,j=k===void 0?function(){}:k,C=function(z,O){var T=z.endsWith("/")?z.slice(0,-1):z,_=O.startsWith("/")?O:"/".concat(O);return T+_||"/"},b=F.useState(!!(o||l)),w=r8(b,2),x=w[0],L=w[1],D={onAddSubscription:j,onLogout:S,onNavigate:g,env:u,DebugInfo:d,basename:y,subpath:p};F.useEffect(function(){l&&y0(l),Tx(typeof o!="function"?function(){return o}:o),L(!1)},[l,o]);var M=["ai-insights-app",i].filter(Boolean).join(" ");return x?c.jsx("div",{className:M,style:s,children:c.jsx(A.Spinner,{})}):c.jsx("div",{className:M,style:s,children:c.jsxs(Ib,{initialEntries:[C(y,p)],basename:y||"/",children:[c.jsx(n8,{subpath:p,onNavigate:g}),c.jsx(A.Root,{context:{isRtl:r},children:c.jsx(t8,{DebugInfo:d,hostAppProps:D})})]})})};function Bg(t){var e=t.children,n=t.description,r=t.title;return c.jsxs(A.Paper.Header,{children:[r&&c.jsx(A.Title,{className:oe({"yst-mb-3":n||e}),children:r}),n&&(typeof n=="string"?c.jsx("p",{children:n}):n),e]})}function oc(t){"@babel/helpers - typeof";return oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oc(t)}function Is(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return zt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(zt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,zt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,zt(f,"constructor",u),zt(u,"constructor",l),l.displayName="GeneratorFunction",zt(u,i,"GeneratorFunction"),zt(f),zt(f,i,"Generator"),zt(f,r,function(){return this}),zt(f,"toString",function(){return"[object Generator]"}),(Is=function(){return{w:s,m:y}})()}function zt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}zt=function(a,o,l,u){function d(f,y){zt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},zt(t,e,n,r)}function Ey(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function Oy(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){Ey(s,r,i,a,o,"next",l)}function o(l){Ey(s,r,i,a,o,"throw",l)}a(void 0)})}}function ql(t,e){return f8(t)||d8(t,e)||c8(t,e)||u8()}function u8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
30
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c8(t,e){if(t){if(typeof t=="string")return Ty(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ty(t,e):void 0}}function Ty(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function d8(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function f8(t){if(Array.isArray(t))return t}var h8=function(e){var n=e.isOpen,r=e.onClose,i=e.groupToEdit,s=e.allBrands,a=xt(),o=a.brandId,l=a.analysisId,u=F.useState(""),d=ql(u,2),f=d[0],y=d[1],h=F.useState([]),p=ql(h,2),m=p[0],g=p[1],v=F.useState(!1),S=ql(v,2),k=S[0],j=S[1],C=It();F.useEffect(function(){if(n&&i&&i.type==="group"){var Y;y(String(i.name||""));var E=((Y=i.groupedBrands)===null||Y===void 0?void 0:Y.map(function(W){return String(W.id||"")}))||[];g(E)}},[n,i]);var b=g0({mutation:{onSuccess:function(){var Y=Oy(Is().m(function W(){return Is().w(function(H){for(;;)switch(H.n){case 0:return H.n=1,Promise.all([C.invalidateQueries({queryKey:wo(o)}),C.invalidateQueries({queryKey:tr(o,"latest")}),C.invalidateQueries({queryKey:mn(o,"latest")}),C.invalidateQueries({queryKey:tr(o,l)}),C.invalidateQueries({queryKey:mn(o,l)})]);case 1:O();case 2:return H.a(2)}},W)}));function E(){return Y.apply(this,arguments)}return E}(),onError:function(E){console.error("Error creating brand group:",E)}}}),w=b.mutate,x=b.isPending,L=cw({mutation:{onSuccess:function(){var Y=Oy(Is().m(function W(){return Is().w(function(H){for(;;)switch(H.n){case 0:return H.n=1,Promise.all([C.invalidateQueries({queryKey:wo(o)}),C.invalidateQueries({queryKey:tr(o,"latest")}),C.invalidateQueries({queryKey:mn(o,"latest")}),C.invalidateQueries({queryKey:tr(o,l)}),C.invalidateQueries({queryKey:mn(o,l)})]);case 1:O(),R();case 2:return H.a(2)}},W)}));function E(){return Y.apply(this,arguments)}return E}(),onError:function(E){console.error("Error deleting brand group:",E),window.alert("An error occurred while ungrouping the brands. Please try again later.")}}}),D=L.mutate,M=L.isPending,I=typeof(i==null?void 0:i.id)=="string"&&i.id.length>0||typeof(i==null?void 0:i.id)=="number"&&!isNaN(i.id),z=function(){!f.trim()||!I||w({brandId:o,data:{groupName:f.trim(),brandIds:m}})},O=function(){y(""),g([]),r()},T=function(){return m.map(function(E){if(i&&i.type==="group"){var W,H=(W=i.groupedBrands)===null||W===void 0?void 0:W.find(function(Q){return String(Q.id)===E});if(H)return H.name||""}var P=s.find(function(Q){return String(Q.id)===E});return P?P.type==="group"?"Group: ".concat(P.name):P.name||"":""}).filter(Boolean)},_=function(){j(!0)},R=function(){return j(!1)},G=function(){if(!I){console.error("Invalid groupId provided for ungrouping. groupToEdit?.id: ".concat(i==null?void 0:i.id," (type: ").concat(oc(i==null?void 0:i.id),")")),R();return}D({brandId:o,brandGroupId:i.id})};return!i||i.type!=="group"?null:c.jsxs(c.Fragment,{children:[c.jsx(A.Modal,{isOpen:n,onClose:k?function(){}:O,as:"div",children:c.jsx(A.Modal.Panel,{children:c.jsxs(A.Modal.Container,{children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-4",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Edit brand group"})}),c.jsxs(A.Modal.Container.Content,{className:"yst-mb-8 yst-space-y-4",children:[c.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"Update the group name or ungroup brands by removing their tags."}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"editGroupName",className:"yst-mb-2 yst-block yst-text-sm yst-font-medium",children:"Group name"}),c.jsx(A.TextInput,{id:"editGroupName",value:f,onChange:function(Y){return y(Y.target.value)},placeholder:"Enter group name",className:"yst-w-full"})]}),c.jsxs("div",{children:[c.jsx(A.TagField,{readOnly:!0,id:"editGroupedBrands",label:"Grouped brands",tags:T(),onRemoveTag:function(Y){if(m.length<2)return j(!0);g(function(E){return E.filter(function(W,H){return H!==Y})})},onAddTag:function(){}}),m.length===0?c.jsx("p",{className:"yst-mt-2 yst-text-sm",children:'Click "Ungroup brands" to remove this group.'}):c.jsx("p",{className:"yst-mt-2 yst-text-sm yst-italic yst-text-gray-500",children:"Note: To add brands to this group, save this group, then use the checkboxes to select this group as well as any additional brands to be grouped."})]})]}),c.jsx(A.Modal.Container.Footer,{children:c.jsxs("div",{className:"yst-flex yst-w-full yst-items-center yst-justify-between",children:[c.jsx("div",{className:"yst-flex yst-justify-start",children:c.jsx(A.Button,{variant:"tertiary",onClick:_,disabled:x||!I,className:"yst-text-red-600",children:"Ungroup brands"})}),c.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[c.jsx(A.Button,{variant:"secondary",onClick:O,children:"Cancel"}),c.jsx(A.Button,{variant:"primary",onClick:z,disabled:!f.trim()||x,isLoading:x,children:x?"Saving...":"Save changes"})]})]})})]})})}),c.jsx(nl,{isOpen:k,onClose:R,onConfirm:G,disabled:!I||M,isLoading:M,title:"Ungroup this brand group?",description:c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"The group will be removed, but the brands inside will remain in your brand list."}),c.jsx("p",{children:"This action cannot be undone. To create a new group with these brands, simply select them and create a new group."})]}),confirmText:"Yes, ungroup"})]})};function lc(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Ut(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Ut(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Ut(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Ut(f,"constructor",u),Ut(u,"constructor",l),l.displayName="GeneratorFunction",Ut(u,i,"GeneratorFunction"),Ut(f),Ut(f,i,"Generator"),Ut(f,r,function(){return this}),Ut(f,"toString",function(){return"[object Generator]"}),(lc=function(){return{w:s,m:y}})()}function Ut(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Ut=function(a,o,l,u){function d(f,y){Ut(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Ut(t,e,n,r)}function Py(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function y8(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){Py(s,r,i,a,o,"next",l)}function o(l){Py(s,r,i,a,o,"throw",l)}a(void 0)})}}function Iy(t,e){return v8(t)||g8(t,e)||m8(t,e)||p8()}function p8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
31
31
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m8(t,e){if(t){if(typeof t=="string")return Ly(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ly(t,e):void 0}}function Ly(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function g8(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function v8(t){if(Array.isArray(t))return t}var b8=function(e){var n=e.isOpen,r=e.onClose,i=e.brandId,s=e.brandsToGroup,a=e.onGroupCreated,o=It(),l=xt(),u=l.analysisId,d=F.useState(""),f=Iy(d,2),y=f[0],h=f[1],p=F.useState([]),m=Iy(p,2),g=m[0],v=m[1];F.useEffect(function(){if(n&&s.length>0){var L,D=(L=s[0])===null||L===void 0?void 0:L.name;h(String(D||"New Group")),v(s.map(function(M){var I;return String((I=M.id)!==null&&I!==void 0?I:"")}))}},[n,s]);var S=g0({mutation:{onSuccess:function(){var L=y8(lc().m(function M(){return lc().w(function(I){for(;;)switch(I.n){case 0:return I.n=1,Promise.all([o.invalidateQueries({queryKey:wo(i)}),o.invalidateQueries({queryKey:Ko(i)}),o.invalidateQueries({queryKey:tr(i,"latest")}),o.invalidateQueries({queryKey:mn(i,"latest")}),o.invalidateQueries({queryKey:tr(i,u)}),o.invalidateQueries({queryKey:mn(i,u)})]);case 1:a==null||a(),C();case 2:return I.a(2)}},M)}));function D(){return L.apply(this,arguments)}return D}(),onError:function(D){console.error("Error creating group:",D)}}}),k=S.mutate,j=S.isPending,C=function(){h(""),v([]),r()},b=function(){if(!(!y.trim()||g.length===0)){var D=g.flatMap(function(M){var I=s.find(function(z){return String(z.id)===M});return I&&I.type==="group"&&Array.isArray(I.groupedBrands)?I.groupedBrands.map(function(z){return String(z.id)}):M});k({brandId:i,data:{groupName:y.trim(),brandIds:D.filter(function(M){return M!==""})}})}},w=function(D){v(function(M){var I=M.filter(function(z){return z!==D});return I.length===0&&C(),I})},x=g.map(function(L){var D=s.find(function(M){return String(M.id)===L});return D?D.type==="group"?"Group: ".concat(D.name):D.name||"":""}).filter(Boolean);return c.jsx(A.Modal,{isOpen:n,onClose:C,children:c.jsx(A.Modal.Panel,{children:c.jsxs(A.Modal.Container,{children:[c.jsx(A.Modal.Container.Header,{children:c.jsx(A.Modal.Title,{children:"Create brand group"})}),c.jsxs(A.Modal.Container.Content,{className:"yst-space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"groupName",className:"yst-mb-2 yst-block yst-text-sm yst-font-medium",children:"Group name"}),c.jsx(A.TextInput,{id:"groupName",value:y,onChange:function(L){return h(L.target.value)},placeholder:"Enter group name",className:"yst-w-full"})]}),c.jsxs("div",{children:[c.jsx(A.TagField,{readOnly:!0,id:"groupedBrands",label:"Brands in group (".concat(g.length,")"),tags:x,onRemoveTag:function(L){var D=g[L];D&&w(D)},onAddTag:function(){}}),g.length===0&&c.jsx("p",{className:"yst-text-sm yst-italic yst-text-gray-500",children:"No brands selected"})]}),c.jsx("p",{children:"Note: To add brands to this group, save this group, then use the checkboxes to select this group as well as any additional brands to be grouped."})]}),c.jsx(A.Modal.Container.Footer,{className:"yst-pt-4",children:c.jsxs("div",{className:"yst-flex yst-justify-end yst-gap-2",children:[c.jsx(A.Button,{variant:"secondary",onClick:C,disabled:j,children:"Cancel"}),c.jsx(A.Button,{variant:"primary",onClick:b,disabled:!y.trim()||g.length===0||j,children:j?"Saving...":"Save group"})]})})]})})})};function ia(t){"@babel/helpers - typeof";return ia=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ia(t)}function Ny(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function My(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ny(Object(n),!0).forEach(function(r){Fg(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ny(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Fg(t,e,n){return(e=x8(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function x8(t){var e=w8(t,"string");return ia(e)=="symbol"?e:e+""}function w8(t,e){if(ia(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ia(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function A8(t){return j8(t)||C8(t)||zg(t)||S8()}function S8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
32
32
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C8(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function j8(t){if(Array.isArray(t))return uc(t)}function kn(t,e){return O8(t)||E8(t,e)||zg(t,e)||k8()}function k8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
33
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zg(t,e){if(t){if(typeof t=="string")return uc(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uc(t,e):void 0}}function uc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function E8(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function O8(t){if(Array.isArray(t))return t}var T8=function(){var e,n=ft(),r=F.useState(!1),i=kn(r,2),s=i[0],a=i[1],o=F.useState({}),l=kn(o,2),u=l[0],d=l[1],f=F.useState(""),y=kn(f,2),h=y[0],p=y[1],m=F.useState(1),g=kn(m,2),v=g[0],S=g[1],k=F.useState({}),j=kn(k,2),C=j[0],b=j[1],w=F.useState(!1),x=kn(w,2),L=x[0],D=x[1],M=F.useState(!1),I=kn(M,2),z=I[0],P=I[1],O=F.useState(null),_=kn(O,2),R=_[0],G=_[1],Y=xt(),E=Y.brandId;function W(ye){return String(ye.id)}var H=sw(E,{query:{enabled:!!E}}),T=H.data,Q=H.isLoading,Z=10,K=(T==null||(e=T.data)===null||e===void 0?void 0:e.associatedBrands.filter(function(ye){var pe,Ae;return h?((pe=(Ae=ye.name)===null||Ae===void 0?void 0:Ae.toLowerCase())!==null&&pe!==void 0?pe:"").includes(h.toLowerCase()):!0}))||[],J=Math.ceil(K.length/Z),le=(v-1)*Z,ue=A8(K).sort(function(ye,pe){return ye.type==="group"&&pe.type!=="group"?-1:ye.type!=="group"&&pe.type==="group"?1:0}),ie=ue.slice(le,le+Z),ke=function(pe){var Ae=K.find(function(U){return W(U)===pe});Ae&&Ae.type==="group"&&(G(Ae),P(!0))},$=Object.entries(C).filter(function(ye){var pe=kn(ye,2),Ae=pe[1];return Ae}).map(function(ye){var pe=kn(ye,1),Ae=pe[0];return Ae}),He=function(){D(!0)},Nt=function(pe){p(pe.target.value),S(1)},at=function(pe){b(function(Ae){return My(My({},Ae),{},Fg({},pe,!Ae[pe]))})},Ve=function(){n("/")},et=function(){b({}),d({}),a(!1)},xn=function(){D(!1)},ot=function(){b({}),S(1),p("")},Bn=function(){P(!1),G(null)},Fn=function(pe,Ae){return pe in u?!!u[pe]:!Ae.isHidden},Ue=[{Header:"Brand name",accessor:"name",Cell:function(pe){var Ae=pe.value,U=pe.row;return c.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-2",children:[c.jsx(A.Checkbox,{id:"brand-checkbox-".concat(U.id),checked:!!C[W(U)],onChange:function(){return at(W(U))},value:W(U),label:U.isSelf?c.jsx(Qs,{children:Ae}):Ae,name:"brand-checkbox-".concat(U.id),disabled:!Fn(W(U),U)}),U.type==="group"&&c.jsx(MS,{className:"yst-h-4 yst-w-4 yst-text-slate-400"})]})})},LoadingComponent:function(pe){var Ae=pe.id,U=Ae===void 0?"":Ae;return c.jsxs("div",{className:"yst-flex",children:[c.jsx(A.Checkbox,{id:"loading-row-checkbox-".concat(U),value:"loading",label:"",disabled:!0,name:"brand-checkbox-".concat(U)})," ",c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-32",id:"loading-row-skeleton-".concat(U)})]})}},{Header:"Actions",accessor:"id",Cell:function(pe){var Ae=pe.value,U=pe.row;return c.jsx(c.Fragment,{children:U.type==="group"?c.jsxs(A.Button,{variant:"tertiary",size:"small",onClick:function(){return ke(String(Ae!=null?Ae:""))},className:"yst-px-0",disabled:!Fn(W(U),U),children:[c.jsx(w0,{className:"yst-h-4 yst-w-4"}),"Edit group"]}):void 0})},LoadingComponent:function(){return c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"})}}];return c.jsxs(A.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[c.jsx(Bg,{title:"Brand list ".concat(""),children:c.jsx("p",{children:"These are the brands found in responses to your example prompts. Group related brands to improve your analysis. You can rename or exclude irrelevant brands, and new brands will be added automatically if they appear in future analysis runs."})}),c.jsxs(A.Paper.Content,{children:[c.jsx("div",{className:"yst-mb-6",children:c.jsx(A.TextInput,{id:"brand-search",label:"Search brands",placeholder:"Search brands",value:h,onChange:Nt})}),c.jsx("div",{className:"yst-mb-6",children:c.jsxs(A.Table,{columns:Ue,className:"yst-w-full",variant:"minimal",children:[c.jsx(A.Table.Head,{children:c.jsx(A.Table.Row,{children:Ue.map(function(ye){return c.jsx(A.Table.Header,{children:ye.Header},ye.accessor)})})}),c.jsx(A.Table.Body,{children:Q?[1,2,3].map(function(ye,pe){return c.jsx(A.Table.Row,{children:Ue.map(function(Ae,U){return c.jsx(A.Table.Cell,{children:c.jsx(Ae.LoadingComponent,{id:"skeleton-".concat(pe,"-").concat(U)},Ae.accessor)},"cell-".concat(U))})},pe)}):ie.length===0?c.jsx(A.Table.Row,{children:c.jsx(A.Table.Cell,{colSpan:Ue.length,children:c.jsxs("div",{className:"yst-py-12 yst-text-center",children:[c.jsx("h3",{className:"yst-mt-4 yst-text-lg yst-font-medium yst-text-slate-900",children:"No brands found"}),c.jsx("p",{className:"yst-mt-2 yst-text-sm yst-text-slate-500",children:h?'No brands match "'.concat(h,'". Try a different search term.'):"No brands have been found yet. Run an analysis to discover brands."}),h&&c.jsx(A.Button,{variant:"secondary",size:"small",onClick:function(){p(""),S(1)},className:"yst-mt-4",children:"Clear search"})]})})}):ie.map(function(ye){return c.jsx(A.Table.Row,{children:Ue.map(function(pe){return c.jsx(A.Table.Cell,{children:pe.Cell?pe.Cell({value:ye[pe.accessor],row:ye}):ye[pe.accessor]},pe.accessor)})},ye.id)})})]})}),c.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[c.jsxs(A.Button,{variant:"secondary",onClick:He,className:"yst-mb-0 yst-gap-2",disabled:$.length<2,children:[c.jsx(jA,{})," Group brands"]}),c.jsx(A.Pagination,{variant:"text",current:v,total:J,onNavigate:S,className:"yst-flex-row",screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]}),c.jsx(Hc,{children:c.jsx("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:s?c.jsxs(c.Fragment,{children:[c.jsx(A.Button,{variant:"secondary",className:"yst-mb-0",onClick:et,children:"Discard changes"}),c.jsx(A.Button,{variant:"primary",className:"yst-mb-0",onClick:Ve,children:"Save changes"})]}):c.jsx(A.Button,{as:an,to:"/brands/".concat(E),variant:"tertiary",className:"yst-mb-0",children:"Return to analysis"})})}),c.jsx(b8,{isOpen:L,onClose:xn,brandId:E,brandsToGroup:K.filter(function(ye){return $.includes(W(ye))}),onGroupCreated:ot}),c.jsx(h8,{isOpen:z,onClose:Bn,groupToEdit:R,allBrands:K})]})};const P8=Object.freeze(Object.defineProperty({__proto__:null,default:T8},Symbol.toStringTag,{value:"Module"}));function er(t){var e=t.children,n=t.description,r=t.title;return c.jsxs(A.Card.Header,{className:"yst-h-auto yst-flex-col yst-items-start yst-gap-0 yst-border-b-[1px] yst-border-b-slate-200 yst-bg-white yst-py-8",children:[r&&c.jsx(A.Title,{className:oe({"yst-mb-3":n||e}),children:r}),n&&c.jsx("p",{children:n}),e]})}function I8(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const L8=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N8=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M8={};function _y(t,e){return(M8.jsx?N8:L8).test(t)}const _8=/[ \t\n\f\r]/g;function R8(t){return typeof t=="object"?t.type==="text"?Ry(t.value):!1:Ry(t)}function Ry(t){return t.replace(_8,"")===""}class Sa{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}Sa.prototype.normal={};Sa.prototype.property={};Sa.prototype.space=void 0;function Ug(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Sa(n,r,e)}function cc(t){return t.toLowerCase()}class Lt{constructor(e,n){this.attribute=n,this.property=e}}Lt.prototype.attribute="";Lt.prototype.booleanish=!1;Lt.prototype.boolean=!1;Lt.prototype.commaOrSpaceSeparated=!1;Lt.prototype.commaSeparated=!1;Lt.prototype.defined=!1;Lt.prototype.mustUseProperty=!1;Lt.prototype.number=!1;Lt.prototype.overloadedBoolean=!1;Lt.prototype.property="";Lt.prototype.spaceSeparated=!1;Lt.prototype.space=void 0;let D8=0;const be=pi(),Xe=pi(),dc=pi(),V=pi(),Be=pi(),Ti=pi(),_t=pi();function pi(){return 2**++D8}const fc=Object.freeze(Object.defineProperty({__proto__:null,boolean:be,booleanish:Xe,commaOrSpaceSeparated:_t,commaSeparated:Ti,number:V,overloadedBoolean:dc,spaceSeparated:Be},Symbol.toStringTag,{value:"Module"})),Wl=Object.keys(fc);class ad extends Lt{constructor(e,n,r,i){let s=-1;if(super(e,n),Dy(this,"space",i),typeof r=="number")for(;++s<Wl.length;){const a=Wl[s];Dy(this,Wl[s],(r&fc[a])===fc[a])}}}ad.prototype.defined=!0;function Dy(t,e,n){n&&(t[e]=n)}function rs(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new ad(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[cc(r)]=r,n[cc(s.attribute)]=r}return new Sa(e,n,t.space)}const Hg=rs({properties:{ariaActiveDescendant:null,ariaAtomic:Xe,ariaAutoComplete:null,ariaBusy:Xe,ariaChecked:Xe,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Be,ariaCurrent:null,ariaDescribedBy:Be,ariaDetails:null,ariaDisabled:Xe,ariaDropEffect:Be,ariaErrorMessage:null,ariaExpanded:Xe,ariaFlowTo:Be,ariaGrabbed:Xe,ariaHasPopup:null,ariaHidden:Xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Be,ariaLevel:V,ariaLive:null,ariaModal:Xe,ariaMultiLine:Xe,ariaMultiSelectable:Xe,ariaOrientation:null,ariaOwns:Be,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Xe,ariaReadOnly:Xe,ariaRelevant:null,ariaRequired:Xe,ariaRoleDescription:Be,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Xe,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function qg(t,e){return e in t?t[e]:e}function Wg(t,e){return qg(t,e.toLowerCase())}const B8=rs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ti,acceptCharset:Be,accessKey:Be,action:null,allow:null,allowFullScreen:be,allowPaymentRequest:be,allowUserMedia:be,alt:null,as:null,async:be,autoCapitalize:null,autoComplete:Be,autoFocus:be,autoPlay:be,blocking:Be,capture:null,charSet:null,checked:be,cite:null,className:Be,cols:V,colSpan:null,content:null,contentEditable:Xe,controls:be,controlsList:Be,coords:V|Ti,crossOrigin:null,data:null,dateTime:null,decoding:null,default:be,defer:be,dir:null,dirName:null,disabled:be,download:dc,draggable:Xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:be,formTarget:null,headers:Be,height:V,hidden:dc,high:V,href:null,hrefLang:null,htmlFor:Be,httpEquiv:Be,id:null,imageSizes:null,imageSrcSet:null,inert:be,inputMode:null,integrity:null,is:null,isMap:be,itemId:null,itemProp:Be,itemRef:Be,itemScope:be,itemType:Be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:be,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:be,muted:be,name:null,nonce:null,noModule:be,noValidate:be,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:be,optimum:V,pattern:null,ping:Be,placeholder:null,playsInline:be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:be,referrerPolicy:null,rel:Be,required:be,reversed:be,rows:V,rowSpan:V,sandbox:Be,scope:null,scoped:be,seamless:be,selected:be,shadowRootClonable:be,shadowRootDelegatesFocus:be,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:be,useMap:null,value:Xe,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Be,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:be,declare:be,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:be,noHref:be,noShade:be,noWrap:be,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Xe,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:be,disableRemotePlayback:be,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:Wg}),F8=rs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:_t,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Be,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:be,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ti,g2:Ti,glyphName:Ti,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:_t,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_t,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_t,rev:_t,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_t,requiredFeatures:_t,requiredFonts:_t,requiredFormats:_t,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:_t,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_t,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_t,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qg}),Gg=rs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),Qg=rs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wg}),Yg=rs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),z8={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},U8=/[A-Z]/g,By=/-[a-z]/g,H8=/^data[-\w.:]+$/i;function q8(t,e){const n=cc(e);let r=e,i=Lt;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&H8.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(By,G8);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!By.test(s)){let a=s.replace(U8,W8);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=ad}return new i(r,e)}function W8(t){return"-"+t.toLowerCase()}function G8(t){return t.charAt(1).toUpperCase()}const Q8=Ug([Hg,B8,Gg,Qg,Yg],"html"),od=Ug([Hg,F8,Gg,Qg,Yg],"svg");function Y8(t){return t.join(" ").trim()}var xi={},Gl,Fy;function V8(){if(Fy)return Gl;Fy=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
|
|
34
|
-
`,u="/",d="*",f="",y="comment",h="declaration";function p(g,v){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];v=v||{};var S=1,k=1;function j(P){var O=P.match(e);O&&(S+=O.length);var _=P.lastIndexOf(l);k=~_?P.length-_:k+P.length}function C(){var P={line:S,column:k};return function(O){return O.position=new b(P),L(),O}}function b(P){this.start=P,this.end={line:S,column:k},this.source=v.source}b.prototype.content=g;function w(P){var O=new Error(v.source+":"+S+":"+k+": "+P);if(O.reason=P,O.filename=v.source,O.line=S,O.column=k,O.source=g,!v.silent)throw O}function x(P){var O=P.exec(g);if(O){var _=O[0];return j(_),g=g.slice(_.length),O}}function L(){x(n)}function D(P){var O;for(P=P||[];O=M();)O!==!1&&P.push(O);return P}function M(){var P=C();if(!(u!=g.charAt(0)||d!=g.charAt(1))){for(var O=2;f!=g.charAt(O)&&(d!=g.charAt(O)||u!=g.charAt(O+1));)++O;if(O+=2,f===g.charAt(O-1))return w("End of comment missing");var _=g.slice(2,O-2);return k+=2,j(_),g=g.slice(O),k+=2,P({type:y,comment:_})}}function I(){var P=C(),O=x(r);if(O){if(M(),!x(i))return w("property missing ':'");var _=x(s),R=P({type:h,property:m(O[0].replace(t,f)),value:_?m(_[0].replace(t,f)):f});return x(a),R}}function z(){var P=[];D(P);for(var O;O=I();)O!==!1&&(P.push(O),D(P));return P}return L(),z()}function m(g){return g?g.replace(o,f):f}return Gl=p,Gl}var zy;function K8(){if(zy)return xi;zy=1;var t=xi&&xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xi,"__esModule",{value:!0}),xi.default=n;const e=t(V8());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const a=(0,e.default)(r),o=typeof i=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:d}=l;o?i(u,d,l):d&&(s=s||{},s[u]=d)}),s}return xi}var vs={},Uy;function X8(){if(Uy)return vs;Uy=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||n.test(u)||t.test(u)},a=function(u,d){return d.toUpperCase()},o=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),s(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,o):u=u.replace(r,o),u.replace(e,a))};return vs.camelCase=l,vs}var bs,Hy;function J8(){if(Hy)return bs;Hy=1;var t=bs&&bs.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=t(K8()),n=X8();function r(i,s){var a={};return!i||typeof i!="string"||(0,e.default)(i,function(o,l){o&&l&&(a[(0,n.camelCase)(o,s)]=l)}),a}return r.default=r,bs=r,bs}var Z8=J8();const $8=Bo(Z8),Vg=Kg("end"),ld=Kg("start");function Kg(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function eO(t){const e=ld(t),n=Vg(t);if(e&&n)return{start:e,end:n}}function Bs(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?qy(t.position):"start"in t||"end"in t?qy(t):"line"in t||"column"in t?hc(t):""}function hc(t){return Wy(t&&t.line)+":"+Wy(t&&t.column)}function qy(t){return hc(t&&t.start)+"-"+hc(t&&t.end)}function Wy(t){return t&&typeof t=="number"?t:1}class ht extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(a=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Bs(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ht.prototype.file="";ht.prototype.name="";ht.prototype.reason="";ht.prototype.message="";ht.prototype.stack="";ht.prototype.column=void 0;ht.prototype.line=void 0;ht.prototype.ancestors=void 0;ht.prototype.cause=void 0;ht.prototype.fatal=void 0;ht.prototype.place=void 0;ht.prototype.ruleId=void 0;ht.prototype.source=void 0;const ud={}.hasOwnProperty,tO=new Map,nO=/[A-Z]/g,rO=new Set(["table","tbody","thead","tfoot","tr"]),iO=new Set(["td","th"]),Xg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sO(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=hO(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=fO(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?od:Q8,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=Jg(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function Jg(t,e,n){if(e.type==="element")return aO(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return oO(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return uO(t,e,n);if(e.type==="mdxjsEsm")return lO(t,e);if(e.type==="root")return cO(t,e,n);if(e.type==="text")return dO(t,e)}function aO(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=od,t.schema=i),t.ancestors.push(e);const s=$g(t,e.tagName,!1),a=yO(t,e);let o=dd(t,e);return rO.has(e.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!R8(l):!0})),Zg(t,a,s,e),cd(a,o),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function oO(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}sa(t,e.position)}function lO(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);sa(t,e.position)}function uO(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=od,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:$g(t,e.name,!0),a=pO(t,e),o=dd(t,e);return Zg(t,a,s,e),cd(a,o),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function cO(t,e,n){const r={};return cd(r,dd(t,e)),t.create(e,t.Fragment,r,n)}function dO(t,e){return e.value}function Zg(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function cd(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function fO(t,e,n){return r;function r(i,s,a,o){const u=Array.isArray(a.children)?n:e;return o?u(s,a,o):u(s,a)}}function hO(t,e){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=ld(r);return e(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function yO(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&ud.call(e.properties,i)){const s=mO(t,i,e.properties[i]);if(s){const[a,o]=s;t.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&iO.has(e.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function pO(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,t.evaluater.evaluateExpression(o.argument))}else sa(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const o=r.value.data.estree.body[0];o.type,s=t.evaluater.evaluateExpression(o.expression)}else sa(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function dd(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:tO;for(;++r<e.children.length;){const s=e.children[r];let a;if(t.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const o=Jg(t,s,a);o!==void 0&&n.push(o)}return n}function mO(t,e,n){const r=q8(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?I8(n):Y8(n)),r.property==="style"){let i=typeof n=="object"?n:gO(t,String(n));return t.stylePropertyNameCase==="css"&&(i=vO(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?z8[r.property]||r.property:r.attribute,n]}}function gO(t,e){try{return $8(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new ht("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Xg+"#cannot-parse-style-attribute",i}}function $g(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,a;for(;++s<i.length;){const o=_y(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=_y(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return ud.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);sa(t)}function sa(t,e){const n=new ht("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=Xg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function vO(t){const e={};let n;for(n in t)ud.call(t,n)&&(e[bO(n)]=t[n]);return e}function bO(t){let e=t.replace(nO,xO);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function xO(t){return"-"+t.toLowerCase()}const Ql={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},wO={};function AO(t,e){const n=wO,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ev(t,r,i)}function ev(t,e,n){if(SO(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Gy(t.children,e,n)}return Array.isArray(t)?Gy(t,e,n):""}function Gy(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=ev(t[i],e,n);return r.join("")}function SO(t){return!!(t&&typeof t=="object")}const Qy=document.createElement("i");function fd(t){const e="&"+t+";";Qy.innerHTML=e;const n=Qy.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function Rn(t,e,n,r){const i=t.length;let s=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(e,0),t.splice(...a),s+=1e4,e+=1e4}function tn(t,e){return t.length>0?(Rn(t,t.length,0,e),t):e}const Yy={}.hasOwnProperty;function CO(t){const e={};let n=-1;for(;++n<t.length;)jO(e,t[n]);return e}function jO(t,e){let n;for(n in e){const i=(Yy.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let a;if(s)for(a in s){Yy.call(i,a)||(i[a]=[]);const o=s[a];kO(i[a],Array.isArray(o)?o:o?[o]:[])}}}function kO(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);Rn(t,0,0,r)}function tv(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Pi(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=Nr(/[A-Za-z]/),Vt=Nr(/[\dA-Za-z]/),EO=Nr(/[#-'*+\--9=?A-Z^-~]/);function yc(t){return t!==null&&(t<32||t===127)}const pc=Nr(/\d/),OO=Nr(/[\dA-Fa-f]/),TO=Nr(/[!-/:-@[-`{-~]/);function he(t){return t!==null&&t<-2}function Tt(t){return t!==null&&(t<0||t===32)}function Pe(t){return t===-2||t===-1||t===32}const PO=Nr(/\p{P}|\p{S}/u),IO=Nr(/\s/);function Nr(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function is(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const s=t.charCodeAt(n);let a="";if(s===37&&Vt(t.charCodeAt(n+1))&&Vt(t.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=t.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function ze(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Pe(l)?(t.enter(n),o(l)):e(l)}function o(l){return Pe(l)&&s++<i?(t.consume(l),o):(t.exit(n),e(l))}}const LO={tokenize:NO};function NO(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),ze(t,e,"linePrefix")}function i(o){return t.enter("paragraph"),s(o)}function s(o){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(o);return}return he(o)?(t.consume(o),t.exit("chunkText"),s):(t.consume(o),a)}}const MO={tokenize:_O},Vy={tokenize:RO};function _O(t){const e=this,n=[];let r=0,i,s,a;return o;function o(k){if(r<n.length){const j=n[r];return e.containerState=j[1],t.attempt(j[0].continuation,l,u)(k)}return u(k)}function l(k){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&S();const j=e.events.length;let C=j,b;for(;C--;)if(e.events[C][0]==="exit"&&e.events[C][1].type==="chunkFlow"){b=e.events[C][1].end;break}v(r);let w=j;for(;w<e.events.length;)e.events[w][1].end={...b},w++;return Rn(e.events,C+1,0,e.events.slice(j)),e.events.length=w,u(k)}return o(k)}function u(k){if(r===n.length){if(!i)return y(k);if(i.currentConstruct&&i.currentConstruct.concrete)return p(k);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Vy,d,f)(k)}function d(k){return i&&S(),v(r),y(k)}function f(k){return e.parser.lazy[e.now().line]=r!==n.length,a=e.now().offset,p(k)}function y(k){return e.containerState={},t.attempt(Vy,h,p)(k)}function h(k){return r++,n.push([e.currentConstruct,e.containerState]),y(k)}function p(k){if(k===null){i&&S(),v(0),t.consume(k);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(k)}function m(k){if(k===null){g(t.exit("chunkFlow"),!0),v(0),t.consume(k);return}return he(k)?(t.consume(k),g(t.exit("chunkFlow")),r=0,e.interrupt=void 0,o):(t.consume(k),m)}function g(k,j){const C=e.sliceStream(k);if(j&&C.push(null),k.previous=s,s&&(s.next=k),s=k,i.defineSkip(k.start),i.write(C),e.parser.lazy[k.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<a&&(!i.events[b][1].end||i.events[b][1].end.offset>a))return;const w=e.events.length;let x=w,L,D;for(;x--;)if(e.events[x][0]==="exit"&&e.events[x][1].type==="chunkFlow"){if(L){D=e.events[x][1].end;break}L=!0}for(v(r),b=w;b<e.events.length;)e.events[b][1].end={...D},b++;Rn(e.events,x+1,0,e.events.slice(w)),e.events.length=b}}function v(k){let j=n.length;for(;j-- >k;){const C=n[j];e.containerState=C[1],C[0].exit.call(e,t)}n.length=k}function S(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function RO(t,e,n){return ze(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ky(t){if(t===null||Tt(t)||IO(t))return 1;if(PO(t))return 2}function hd(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const s=t[i].resolveAll;s&&!r.includes(s)&&(e=s(e,n),r.push(s))}return e}const mc={name:"attention",resolveAll:DO,tokenize:BO};function DO(t,e){let n=-1,r,i,s,a,o,l,u,d;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},y={...t[n][1].start};Xy(f,-l),Xy(y,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:y},s={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},t[r][1].end={...a.start},t[n][1].start={...o.end},u=[],t[r][1].end.offset-t[r][1].start.offset&&(u=tn(u,[["enter",t[r][1],e],["exit",t[r][1],e]])),u=tn(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",s,e]]),u=tn(u,hd(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),u=tn(u,[["exit",s,e],["enter",o,e],["exit",o,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(d=2,u=tn(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):d=0,Rn(t,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function BO(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ky(r);let s;return a;function a(l){return s=l,t.enter("attentionSequence"),o(l)}function o(l){if(l===s)return t.consume(l),o;const u=t.exit("attentionSequence"),d=Ky(l),f=!d||d===2&&i||n.includes(l),y=!i||i===2&&d||n.includes(r);return u._open=!!(s===42?f:f&&(i||!y)),u._close=!!(s===42?y:y&&(d||!f)),e(l)}}function Xy(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const FO={name:"autolink",tokenize:zO};function zO(t,e,n){let r=0;return i;function i(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(h){return Mn(h)?(t.consume(h),a):h===64?n(h):u(h)}function a(h){return h===43||h===45||h===46||Vt(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(t.consume(h),r=0,l):(h===43||h===45||h===46||Vt(h))&&r++<32?(t.consume(h),o):(r=0,u(h))}function l(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||yc(h)?n(h):(t.consume(h),l)}function u(h){return h===64?(t.consume(h),d):EO(h)?(t.consume(h),u):n(h)}function d(h){return Vt(h)?f(h):n(h)}function f(h){return h===46?(t.consume(h),r=0,d):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):y(h)}function y(h){if((h===45||Vt(h))&&r++<63){const p=h===45?y:f;return t.consume(h),p}return n(h)}}const cl={partial:!0,tokenize:UO};function UO(t,e,n){return r;function r(s){return Pe(s)?ze(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||he(s)?e(s):n(s)}}const nv={continuation:{tokenize:qO},exit:WO,name:"blockQuote",tokenize:HO};function HO(t,e,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(t.enter("blockQuote",{_container:!0}),o.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),s}return n(a)}function s(a){return Pe(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}function qO(t,e,n){const r=this;return i;function i(a){return Pe(a)?ze(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return t.attempt(nv,e,n)(a)}}function WO(t){t.exit("blockQuote")}const rv={name:"characterEscape",tokenize:GO};function GO(t,e,n){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return TO(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const iv={name:"characterReference",tokenize:QO};function QO(t,e,n){const r=this;let i=0,s,a;return o;function o(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),l}function l(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),u):(t.enter("characterReferenceValue"),s=31,a=Vt,d(f))}function u(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,a=OO,d):(t.enter("characterReferenceValue"),s=7,a=pc,d(f))}function d(f){if(f===59&&i){const y=t.exit("characterReferenceValue");return a===Vt&&!fd(r.sliceSerialize(y))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(f)&&i++<s?(t.consume(f),d):n(f)}}const Jy={partial:!0,tokenize:VO},Zy={concrete:!0,name:"codeFenced",tokenize:YO};function YO(t,e,n){const r=this,i={partial:!0,tokenize:C};let s=0,a=0,o;return l;function l(b){return u(b)}function u(b){const w=r.events[r.events.length-1];return s=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,o=b,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),d(b)}function d(b){return b===o?(a++,t.consume(b),d):a<3?n(b):(t.exit("codeFencedFenceSequence"),Pe(b)?ze(t,f,"whitespace")(b):f(b))}function f(b){return b===null||he(b)?(t.exit("codeFencedFence"),r.interrupt?e(b):t.check(Jy,m,j)(b)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||he(b)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(b)):Pe(b)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),ze(t,h,"whitespace")(b)):b===96&&b===o?n(b):(t.consume(b),y)}function h(b){return b===null||he(b)?f(b):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||he(b)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(b)):b===96&&b===o?n(b):(t.consume(b),p)}function m(b){return t.attempt(i,j,g)(b)}function g(b){return t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),v}function v(b){return s>0&&Pe(b)?ze(t,S,"linePrefix",s+1)(b):S(b)}function S(b){return b===null||he(b)?t.check(Jy,m,j)(b):(t.enter("codeFlowValue"),k(b))}function k(b){return b===null||he(b)?(t.exit("codeFlowValue"),S(b)):(t.consume(b),k)}function j(b){return t.exit("codeFenced"),e(b)}function C(b,w,x){let L=0;return D;function D(O){return b.enter("lineEnding"),b.consume(O),b.exit("lineEnding"),M}function M(O){return b.enter("codeFencedFence"),Pe(O)?ze(b,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):I(O)}function I(O){return O===o?(b.enter("codeFencedFenceSequence"),z(O)):x(O)}function z(O){return O===o?(L++,b.consume(O),z):L>=a?(b.exit("codeFencedFenceSequence"),Pe(O)?ze(b,P,"whitespace")(O):P(O)):x(O)}function P(O){return O===null||he(O)?(b.exit("codeFencedFence"),w(O)):x(O)}}}function VO(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const Yl={name:"codeIndented",tokenize:XO},KO={partial:!0,tokenize:JO};function XO(t,e,n){const r=this;return i;function i(u){return t.enter("codeIndented"),ze(t,s,"linePrefix",5)(u)}function s(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):he(u)?t.attempt(KO,a,l)(u):(t.enter("codeFlowValue"),o(u))}function o(u){return u===null||he(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),o)}function l(u){return t.exit("codeIndented"),e(u)}}function JO(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):he(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):ze(t,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):he(a)?i(a):n(a)}}const ZO={name:"codeText",previous:e7,resolve:$O,tokenize:t7};function $O(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function e7(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function t7(t,e,n){let r=0,i,s;return a;function a(f){return t.enter("codeText"),t.enter("codeTextSequence"),o(f)}function o(f){return f===96?(t.consume(f),r++,o):(t.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),l):f===96?(s=t.enter("codeTextSequence"),i=0,d(f)):he(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),l):(t.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||he(f)?(t.exit("codeTextData"),l(f)):(t.consume(f),u)}function d(f){return f===96?(t.consume(f),i++,d):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(s.type="codeTextData",u(f))}}class n7{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&xs(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),xs(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),xs(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);xs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);xs(this.left,n.reverse())}}}function xs(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function sv(t){const e={};let n=-1,r,i,s,a,o,l,u;const d=new n7(t);for(;++n<d.length;){for(;n in e;)n=e[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,r7(d,n)),n=e[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return Rn(t,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function r7(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],u={};let d,f,y=-1,h=n,p=0,m=0;const g=[m];for(;h;){for(;t.get(++i)[1]!==h;);s.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++y<o.length;)o[y][0]==="exit"&&o[y-1][0]==="enter"&&o[y][1].type===o[y-1][1].type&&o[y][1].start.line!==o[y][1].end.line&&(m=y+1,g.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),y=g.length;y--;){const v=o.slice(g[y],g[y+1]),S=s.pop();l.push([S,S+v.length-1]),t.splice(S,2,v)}for(l.reverse(),y=-1;++y<l.length;)u[p+l[y][0]]=p+l[y][1],p+=l[y][1]-l[y][0]-1;return u}const i7={resolve:a7,tokenize:o7},s7={partial:!0,tokenize:l7};function a7(t){return sv(t),t}function o7(t,e){let n;return r;function r(o){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):he(o)?t.check(s7,a,s)(o):(t.consume(o),i)}function s(o){return t.exit("chunkContent"),t.exit("content"),e(o)}function a(o){return t.consume(o),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function l7(t,e,n){const r=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),ze(t,s,"linePrefix")}function s(a){if(a===null||he(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function av(t,e,n,r,i,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return f;function f(v){return v===60?(t.enter(r),t.enter(i),t.enter(s),t.consume(v),t.exit(s),y):v===null||v===32||v===41||yc(v)?n(v):(t.enter(r),t.enter(a),t.enter(o),t.enter("chunkString",{contentType:"string"}),m(v))}function y(v){return v===62?(t.enter(s),t.consume(v),t.exit(s),t.exit(i),t.exit(r),e):(t.enter(o),t.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===62?(t.exit("chunkString"),t.exit(o),y(v)):v===null||v===60||he(v)?n(v):(t.consume(v),v===92?p:h)}function p(v){return v===60||v===62||v===92?(t.consume(v),h):h(v)}function m(v){return!d&&(v===null||v===41||Tt(v))?(t.exit("chunkString"),t.exit(o),t.exit(a),t.exit(r),e(v)):d<u&&v===40?(t.consume(v),d++,m):v===41?(t.consume(v),d--,m):v===null||v===32||v===40||yc(v)?n(v):(t.consume(v),v===92?g:m)}function g(v){return v===40||v===41||v===92?(t.consume(v),m):m(v)}}function ov(t,e,n,r,i,s){const a=this;let o=0,l;return u;function u(h){return t.enter(r),t.enter(i),t.consume(h),t.exit(i),t.enter(s),d}function d(h){return o>999||h===null||h===91||h===93&&!l||h===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(t.exit(s),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):he(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),d):(t.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||he(h)||o++>999?(t.exit("chunkString"),d(h)):(t.consume(h),l||(l=!Pe(h)),h===92?y:f)}function y(h){return h===91||h===92||h===93?(t.consume(h),o++,f):f(h)}}function lv(t,e,n,r,i,s){let a;return o;function o(y){return y===34||y===39||y===40?(t.enter(r),t.enter(i),t.consume(y),t.exit(i),a=y===40?41:y,l):n(y)}function l(y){return y===a?(t.enter(i),t.consume(y),t.exit(i),t.exit(r),e):(t.enter(s),u(y))}function u(y){return y===a?(t.exit(s),l(a)):y===null?n(y):he(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),ze(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===a||y===null||he(y)?(t.exit("chunkString"),u(y)):(t.consume(y),y===92?f:d)}function f(y){return y===a||y===92?(t.consume(y),d):d(y)}}function Fs(t,e){let n;return r;function r(i){return he(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):Pe(i)?ze(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const u7={name:"definition",tokenize:d7},c7={partial:!0,tokenize:f7};function d7(t,e,n){const r=this;let i;return s;function s(h){return t.enter("definition"),a(h)}function a(h){return ov.call(r,t,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),l):n(h)}function l(h){return Tt(h)?Fs(t,u)(h):u(h)}function u(h){return av(t,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return t.attempt(c7,f,f)(h)}function f(h){return Pe(h)?ze(t,y,"whitespace")(h):y(h)}function y(h){return h===null||he(h)?(t.exit("definition"),r.parser.defined.push(i),e(h)):n(h)}}function f7(t,e,n){return r;function r(o){return Tt(o)?Fs(t,i)(o):n(o)}function i(o){return lv(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Pe(o)?ze(t,a,"whitespace")(o):a(o)}function a(o){return o===null||he(o)?e(o):n(o)}}const h7={name:"hardBreakEscape",tokenize:y7};function y7(t,e,n){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return he(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const p7={name:"headingAtx",resolve:m7,tokenize:g7};function m7(t,e){let n=t.length-2,r=3,i,s;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},s={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},Rn(t,r,n-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}function g7(t,e,n){let r=0;return i;function i(d){return t.enter("atxHeading"),s(d)}function s(d){return t.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(t.consume(d),a):d===null||Tt(d)?(t.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(t.enter("atxHeadingSequence"),l(d)):d===null||he(d)?(t.exit("atxHeading"),e(d)):Pe(d)?ze(t,o,"whitespace")(d):(t.enter("atxHeadingText"),u(d))}function l(d){return d===35?(t.consume(d),l):(t.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||Tt(d)?(t.exit("atxHeadingText"),o(d)):(t.consume(d),u)}}const v7=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$y=["pre","script","style","textarea"],b7={concrete:!0,name:"htmlFlow",resolveTo:A7,tokenize:S7},x7={partial:!0,tokenize:j7},w7={partial:!0,tokenize:C7};function A7(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function S7(t,e,n){const r=this;let i,s,a,o,l;return u;function u(T){return d(T)}function d(T){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(T),f}function f(T){return T===33?(t.consume(T),y):T===47?(t.consume(T),s=!0,m):T===63?(t.consume(T),i=3,r.interrupt?e:E):Mn(T)?(t.consume(T),a=String.fromCharCode(T),g):n(T)}function y(T){return T===45?(t.consume(T),i=2,h):T===91?(t.consume(T),i=5,o=0,p):Mn(T)?(t.consume(T),i=4,r.interrupt?e:E):n(T)}function h(T){return T===45?(t.consume(T),r.interrupt?e:E):n(T)}function p(T){const Q="CDATA[";return T===Q.charCodeAt(o++)?(t.consume(T),o===Q.length?r.interrupt?e:I:p):n(T)}function m(T){return Mn(T)?(t.consume(T),a=String.fromCharCode(T),g):n(T)}function g(T){if(T===null||T===47||T===62||Tt(T)){const Q=T===47,Z=a.toLowerCase();return!Q&&!s&&$y.includes(Z)?(i=1,r.interrupt?e(T):I(T)):v7.includes(a.toLowerCase())?(i=6,Q?(t.consume(T),v):r.interrupt?e(T):I(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):s?S(T):k(T))}return T===45||Vt(T)?(t.consume(T),a+=String.fromCharCode(T),g):n(T)}function v(T){return T===62?(t.consume(T),r.interrupt?e:I):n(T)}function S(T){return Pe(T)?(t.consume(T),S):D(T)}function k(T){return T===47?(t.consume(T),D):T===58||T===95||Mn(T)?(t.consume(T),j):Pe(T)?(t.consume(T),k):D(T)}function j(T){return T===45||T===46||T===58||T===95||Vt(T)?(t.consume(T),j):C(T)}function C(T){return T===61?(t.consume(T),b):Pe(T)?(t.consume(T),C):k(T)}function b(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(t.consume(T),l=T,w):Pe(T)?(t.consume(T),b):x(T)}function w(T){return T===l?(t.consume(T),l=null,L):T===null||he(T)?n(T):(t.consume(T),w)}function x(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Tt(T)?C(T):(t.consume(T),x)}function L(T){return T===47||T===62||Pe(T)?k(T):n(T)}function D(T){return T===62?(t.consume(T),M):n(T)}function M(T){return T===null||he(T)?I(T):Pe(T)?(t.consume(T),M):n(T)}function I(T){return T===45&&i===2?(t.consume(T),_):T===60&&i===1?(t.consume(T),R):T===62&&i===4?(t.consume(T),W):T===63&&i===3?(t.consume(T),E):T===93&&i===5?(t.consume(T),Y):he(T)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(x7,H,z)(T)):T===null||he(T)?(t.exit("htmlFlowData"),z(T)):(t.consume(T),I)}function z(T){return t.check(w7,P,H)(T)}function P(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),O}function O(T){return T===null||he(T)?z(T):(t.enter("htmlFlowData"),I(T))}function _(T){return T===45?(t.consume(T),E):I(T)}function R(T){return T===47?(t.consume(T),a="",G):I(T)}function G(T){if(T===62){const Q=a.toLowerCase();return $y.includes(Q)?(t.consume(T),W):I(T)}return Mn(T)&&a.length<8?(t.consume(T),a+=String.fromCharCode(T),G):I(T)}function Y(T){return T===93?(t.consume(T),E):I(T)}function E(T){return T===62?(t.consume(T),W):T===45&&i===2?(t.consume(T),E):I(T)}function W(T){return T===null||he(T)?(t.exit("htmlFlowData"),H(T)):(t.consume(T),W)}function H(T){return t.exit("htmlFlow"),e(T)}}function C7(t,e,n){const r=this;return i;function i(a){return he(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function j7(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(cl,e,n)}}const k7={name:"htmlText",tokenize:E7};function E7(t,e,n){const r=this;let i,s,a;return o;function o(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),l}function l(E){return E===33?(t.consume(E),u):E===47?(t.consume(E),C):E===63?(t.consume(E),k):Mn(E)?(t.consume(E),x):n(E)}function u(E){return E===45?(t.consume(E),d):E===91?(t.consume(E),s=0,p):Mn(E)?(t.consume(E),S):n(E)}function d(E){return E===45?(t.consume(E),h):n(E)}function f(E){return E===null?n(E):E===45?(t.consume(E),y):he(E)?(a=f,R(E)):(t.consume(E),f)}function y(E){return E===45?(t.consume(E),h):f(E)}function h(E){return E===62?_(E):E===45?y(E):f(E)}function p(E){const W="CDATA[";return E===W.charCodeAt(s++)?(t.consume(E),s===W.length?m:p):n(E)}function m(E){return E===null?n(E):E===93?(t.consume(E),g):he(E)?(a=m,R(E)):(t.consume(E),m)}function g(E){return E===93?(t.consume(E),v):m(E)}function v(E){return E===62?_(E):E===93?(t.consume(E),v):m(E)}function S(E){return E===null||E===62?_(E):he(E)?(a=S,R(E)):(t.consume(E),S)}function k(E){return E===null?n(E):E===63?(t.consume(E),j):he(E)?(a=k,R(E)):(t.consume(E),k)}function j(E){return E===62?_(E):k(E)}function C(E){return Mn(E)?(t.consume(E),b):n(E)}function b(E){return E===45||Vt(E)?(t.consume(E),b):w(E)}function w(E){return he(E)?(a=w,R(E)):Pe(E)?(t.consume(E),w):_(E)}function x(E){return E===45||Vt(E)?(t.consume(E),x):E===47||E===62||Tt(E)?L(E):n(E)}function L(E){return E===47?(t.consume(E),_):E===58||E===95||Mn(E)?(t.consume(E),D):he(E)?(a=L,R(E)):Pe(E)?(t.consume(E),L):_(E)}function D(E){return E===45||E===46||E===58||E===95||Vt(E)?(t.consume(E),D):M(E)}function M(E){return E===61?(t.consume(E),I):he(E)?(a=M,R(E)):Pe(E)?(t.consume(E),M):L(E)}function I(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(t.consume(E),i=E,z):he(E)?(a=I,R(E)):Pe(E)?(t.consume(E),I):(t.consume(E),P)}function z(E){return E===i?(t.consume(E),i=void 0,O):E===null?n(E):he(E)?(a=z,R(E)):(t.consume(E),z)}function P(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Tt(E)?L(E):(t.consume(E),P)}function O(E){return E===47||E===62||Tt(E)?L(E):n(E)}function _(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),e):n(E)}function R(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),G}function G(E){return Pe(E)?ze(t,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Y(E)}function Y(E){return t.enter("htmlTextData"),a(E)}}const yd={name:"labelEnd",resolveAll:I7,resolveTo:L7,tokenize:N7},O7={tokenize:M7},T7={tokenize:_7},P7={tokenize:R7};function I7(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&Rn(t,0,t.length,n),t}function L7(t,e){let n=t.length,r=0,i,s,a,o;for(;n--;)if(i=t[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},u={type:"label",start:{...t[s][1].start},end:{...t[a][1].end}},d={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[a-2][1].start}};return o=[["enter",l,e],["enter",u,e]],o=tn(o,t.slice(s+1,s+r+3)),o=tn(o,[["enter",d,e]]),o=tn(o,hd(e.parser.constructs.insideSpan.null,t.slice(s+r+4,a-3),e)),o=tn(o,[["exit",d,e],t[a-2],t[a-1],["exit",u,e]]),o=tn(o,t.slice(a+1)),o=tn(o,[["exit",l,e]]),Rn(t,s,t.length,o),t}function N7(t,e,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(y){return s?s._inactive?f(y):(a=r.parser.defined.includes(Pi(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(y),t.exit("labelMarker"),t.exit("labelEnd"),l):n(y)}function l(y){return y===40?t.attempt(O7,d,a?d:f)(y):y===91?t.attempt(T7,d,a?u:f)(y):a?d(y):f(y)}function u(y){return t.attempt(P7,d,f)(y)}function d(y){return e(y)}function f(y){return s._balanced=!0,n(y)}}function M7(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return Tt(f)?Fs(t,s)(f):s(f)}function s(f){return f===41?d(f):av(t,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Tt(f)?Fs(t,l)(f):d(f)}function o(f){return n(f)}function l(f){return f===34||f===39||f===40?lv(t,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return Tt(f)?Fs(t,d)(f):d(f)}function d(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function _7(t,e,n){const r=this;return i;function i(o){return ov.call(r,t,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(o):n(o)}function a(o){return n(o)}}function R7(t,e,n){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const D7={name:"labelStartImage",resolveAll:yd.resolveAll,tokenize:B7};function B7(t,e,n){const r=this;return i;function i(o){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(o),t.exit("labelImageMarker"),s}function s(o){return o===91?(t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):e(o)}}const F7={name:"labelStartLink",resolveAll:yd.resolveAll,tokenize:z7};function z7(t,e,n){const r=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}const Vl={name:"lineEnding",tokenize:U7};function U7(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),ze(t,e,"linePrefix")}}const yo={name:"thematicBreak",tokenize:H7};function H7(t,e,n){let r=0,i;return s;function s(u){return t.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(t.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||he(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===i?(t.consume(u),r++,l):(t.exit("thematicBreakSequence"),Pe(u)?ze(t,o,"whitespace")(u):o(u))}}const St={continuation:{tokenize:Q7},exit:V7,name:"list",tokenize:G7},q7={partial:!0,tokenize:K7},W7={partial:!0,tokenize:Y7};function G7(t,e,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:pc(h)){if(r.containerState.type||(r.containerState.type=p,t.enter(p,{_container:!0})),p==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(yo,n,u)(h):u(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(h)}return n(h)}function l(h){return pc(h)&&++a<10?(t.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),u(h)):n(h)}function u(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(cl,r.interrupt?n:d,t.attempt(q7,y,f))}function d(h){return r.containerState.initialBlankLine=!0,s++,y(h)}function f(h){return Pe(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),y):n(h)}function y(h){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function Q7(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(cl,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ze(t,e,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!Pe(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(W7,e,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ze(t,t.attempt(St,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Y7(t,e,n){const r=this;return ze(t,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(s):n(s)}}function V7(t){t.exit(this.containerState.type)}function K7(t,e,n){const r=this;return ze(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Pe(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const ep={name:"setextUnderline",resolveTo:X7,tokenize:J7};function X7(t,e){let n=t.length,r,i,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",a,e]),t.splice(s+1,0,["exit",t[r][1],e]),t[r][1].end={...t[s][1].end}):t[r][1]=a,t.push(["exit",a,e]),t}function J7(t,e,n){const r=this;let i;return s;function s(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return t.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(t.consume(u),o):(t.exit("setextHeadingLineSequence"),Pe(u)?ze(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||he(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const Z7={tokenize:$7};function $7(t){const e=this,n=t.attempt(cl,r,t.attempt(this.parser.constructs.flowInitial,i,ze(t,t.attempt(this.parser.constructs.flow,i,t.attempt(i7,i)),"linePrefix")));return n;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const eT={resolveAll:cv()},tT=uv("string"),nT=uv("text");function uv(t){return{resolveAll:cv(t==="text"?rT:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],s=n.attempt(i,a,o);return a;function a(d){return u(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const f=i[d];let y=-1;if(f)for(;++y<f.length;){const h=f[y];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function cv(t){return e;function e(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(n,r):n}}function rT(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let s=i.length,a=-1,o=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)l=!0,o++;else if(u!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(o=0),o){const u={type:n===t.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(t.splice(n,0,["enter",u,e],["exit",u,e]),n+=2)}n++}return t}const iT={42:St,43:St,45:St,48:St,49:St,50:St,51:St,52:St,53:St,54:St,55:St,56:St,57:St,62:nv},sT={91:u7},aT={[-2]:Yl,[-1]:Yl,32:Yl},oT={35:p7,42:yo,45:[ep,yo],60:b7,61:ep,95:yo,96:Zy,126:Zy},lT={38:iv,92:rv},uT={[-5]:Vl,[-4]:Vl,[-3]:Vl,33:D7,38:iv,42:mc,60:[FO,k7],91:F7,92:[h7,rv],93:yd,95:mc,96:ZO},cT={null:[mc,eT]},dT={null:[42,95]},fT={null:[]},hT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dT,contentInitial:sT,disable:fT,document:iT,flow:oT,flowInitial:aT,insideSpan:cT,string:lT,text:uT},Symbol.toStringTag,{value:"Module"}));function yT(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:w(C),check:w(b),consume:S,enter:k,exit:j,interrupt:w(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:t,previous:null,sliceSerialize:y,sliceStream:h,write:f};let d=e.tokenize.call(u,l);return e.resolveAll&&s.push(e),u;function f(M){return a=tn(a,M),g(),a[a.length-1]!==null?[]:(x(e,0),u.events=hd(s,u.events,u),u.events)}function y(M,I){return mT(h(M),I)}function h(M){return pT(a,M)}function p(){const{_bufferIndex:M,_index:I,line:z,column:P,offset:O}=r;return{_bufferIndex:M,_index:I,line:z,column:P,offset:O}}function m(M){i[M.line]=M.column,D()}function g(){let M;for(;r._index<a.length;){const I=a[r._index];if(typeof I=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<I.length;)v(I.charCodeAt(r._bufferIndex));else v(I)}}function v(M){d=d(M)}function S(M){he(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,D()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=M}function k(M,I){const z=I||{};return z.type=M,z.start=p(),u.events.push(["enter",z,u]),o.push(z),z}function j(M){const I=o.pop();return I.end=p(),u.events.push(["exit",I,u]),I}function C(M,I){x(M,I.from)}function b(M,I){I.restore()}function w(M,I){return z;function z(P,O,_){let R,G,Y,E;return Array.isArray(P)?H(P):"tokenize"in P?H([P]):W(P);function W(K){return J;function J(le){const ue=le!==null&&K[le],ie=le!==null&&K.null,ke=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return H(ke)(le)}}function H(K){return R=K,G=0,K.length===0?_:T(K[G])}function T(K){return J;function J(le){return E=L(),Y=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?Z():K.tokenize.call(I?Object.assign(Object.create(u),I):u,l,Q,Z)(le)}}function Q(K){return M(Y,E),O}function Z(K){return E.restore(),++G<R.length?T(R[G]):_}}}function x(M,I){M.resolveAll&&!s.includes(M)&&s.push(M),M.resolve&&Rn(u.events,I,u.events.length-I,M.resolve(u.events.slice(I),u)),M.resolveTo&&(u.events=M.resolveTo(u.events,u))}function L(){const M=p(),I=u.previous,z=u.currentConstruct,P=u.events.length,O=Array.from(o);return{from:P,restore:_};function _(){r=M,u.previous=I,u.currentConstruct=z,u.events.length=P,o=O,D()}}function D(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function pT(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let a;if(n===i)a=[t[n].slice(r,s)];else{if(a=t.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(t[i].slice(0,s))}return a}function mT(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const s=t[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
|
|
33
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zg(t,e){if(t){if(typeof t=="string")return uc(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uc(t,e):void 0}}function uc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function E8(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function O8(t){if(Array.isArray(t))return t}var T8=function(){var e,n=ft(),r=F.useState(!1),i=kn(r,2),s=i[0],a=i[1],o=F.useState({}),l=kn(o,2),u=l[0],d=l[1],f=F.useState(""),y=kn(f,2),h=y[0],p=y[1],m=F.useState(1),g=kn(m,2),v=g[0],S=g[1],k=F.useState({}),j=kn(k,2),C=j[0],b=j[1],w=F.useState(!1),x=kn(w,2),L=x[0],D=x[1],M=F.useState(!1),I=kn(M,2),z=I[0],O=I[1],T=F.useState(null),_=kn(T,2),R=_[0],G=_[1],Y=xt(),E=Y.brandId;function W(ye){return String(ye.id)}var H=sw(E,{query:{enabled:!!E}}),P=H.data,Q=H.isLoading,Z=10,K=(P==null||(e=P.data)===null||e===void 0?void 0:e.associatedBrands.filter(function(ye){var pe,Ae;return h?((pe=(Ae=ye.name)===null||Ae===void 0?void 0:Ae.toLowerCase())!==null&&pe!==void 0?pe:"").includes(h.toLowerCase()):!0}))||[],J=Math.ceil(K.length/Z),le=(v-1)*Z,ue=A8(K).sort(function(ye,pe){return ye.type==="group"&&pe.type!=="group"?-1:ye.type!=="group"&&pe.type==="group"?1:0}),ie=ue.slice(le,le+Z),ke=function(pe){var Ae=K.find(function(U){return W(U)===pe});Ae&&Ae.type==="group"&&(G(Ae),O(!0))},$=Object.entries(C).filter(function(ye){var pe=kn(ye,2),Ae=pe[1];return Ae}).map(function(ye){var pe=kn(ye,1),Ae=pe[0];return Ae}),He=function(){D(!0)},Nt=function(pe){p(pe.target.value),S(1)},at=function(pe){b(function(Ae){return My(My({},Ae),{},Fg({},pe,!Ae[pe]))})},Ve=function(){n("/")},et=function(){b({}),d({}),a(!1)},xn=function(){D(!1)},ot=function(){b({}),S(1),p("")},Bn=function(){O(!1),G(null)},Fn=function(pe,Ae){return pe in u?!!u[pe]:!Ae.isHidden},Ue=[{Header:"Brand name",accessor:"name",Cell:function(pe){var Ae=pe.value,U=pe.row;return c.jsx("span",{className:"yst-font-medium yst-text-slate-900",children:c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-2",children:[c.jsx(A.Checkbox,{id:"brand-checkbox-".concat(U.id),checked:!!C[W(U)],onChange:function(){return at(W(U))},value:W(U),label:U.isSelf?c.jsx(Qs,{children:Ae}):Ae,name:"brand-checkbox-".concat(U.id),disabled:!Fn(W(U),U)}),U.type==="group"&&c.jsx(MS,{className:"yst-h-4 yst-w-4 yst-text-slate-400"})]})})},LoadingComponent:function(pe){var Ae=pe.id,U=Ae===void 0?"":Ae;return c.jsxs("div",{className:"yst-flex",children:[c.jsx(A.Checkbox,{id:"loading-row-checkbox-".concat(U),value:"loading",label:"",disabled:!0,name:"brand-checkbox-".concat(U)})," ",c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-32",id:"loading-row-skeleton-".concat(U)})]})}},{Header:"Actions",accessor:"id",Cell:function(pe){var Ae=pe.value,U=pe.row;return c.jsx(c.Fragment,{children:U.type==="group"?c.jsxs(A.Button,{variant:"tertiary",size:"small",onClick:function(){return ke(String(Ae!=null?Ae:""))},className:"yst-px-0",disabled:!Fn(W(U),U),children:[c.jsx(w0,{className:"yst-h-4 yst-w-4"}),"Edit group"]}):void 0})},LoadingComponent:function(){return c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"})}}];return c.jsxs(A.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[c.jsx(Bg,{title:"Brand list ".concat(""),children:c.jsx("p",{children:"These are the brands found in responses to your example prompts. Group related brands to improve your analysis. You can rename or exclude irrelevant brands, and new brands will be added automatically if they appear in future analysis runs."})}),c.jsxs(A.Paper.Content,{children:[c.jsx("div",{className:"yst-mb-6",children:c.jsx(A.TextInput,{id:"brand-search",label:"Search brands",placeholder:"Search brands",value:h,onChange:Nt})}),c.jsx("div",{className:"yst-mb-6",children:c.jsxs(A.Table,{columns:Ue,className:"yst-w-full",variant:"minimal",children:[c.jsx(A.Table.Head,{children:c.jsx(A.Table.Row,{children:Ue.map(function(ye){return c.jsx(A.Table.Header,{children:ye.Header},ye.accessor)})})}),c.jsx(A.Table.Body,{children:Q?[1,2,3].map(function(ye,pe){return c.jsx(A.Table.Row,{children:Ue.map(function(Ae,U){return c.jsx(A.Table.Cell,{children:c.jsx(Ae.LoadingComponent,{id:"skeleton-".concat(pe,"-").concat(U)},Ae.accessor)},"cell-".concat(U))})},pe)}):ie.length===0?c.jsx(A.Table.Row,{children:c.jsx(A.Table.Cell,{colSpan:Ue.length,children:c.jsxs("div",{className:"yst-py-12 yst-text-center",children:[c.jsx("h3",{className:"yst-mt-4 yst-text-lg yst-font-medium yst-text-slate-900",children:"No brands found"}),c.jsx("p",{className:"yst-mt-2 yst-text-sm yst-text-slate-500",children:h?'No brands match "'.concat(h,'". Try a different search term.'):"No brands have been found yet. Run an analysis to discover brands."}),h&&c.jsx(A.Button,{variant:"secondary",size:"small",onClick:function(){p(""),S(1)},className:"yst-mt-4",children:"Clear search"})]})})}):ie.map(function(ye){return c.jsx(A.Table.Row,{children:Ue.map(function(pe){return c.jsx(A.Table.Cell,{children:pe.Cell?pe.Cell({value:ye[pe.accessor],row:ye}):ye[pe.accessor]},pe.accessor)})},ye.id)})})]})}),c.jsxs("div",{className:"yst-flex yst-items-center yst-justify-between",children:[c.jsxs(A.Button,{variant:"secondary",onClick:He,className:"yst-mb-0 yst-gap-2",disabled:$.length<2,children:[c.jsx(jA,{})," Group brands"]}),c.jsx(A.Pagination,{variant:"text",current:v,total:J,onNavigate:S,className:"yst-flex-row",screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]}),c.jsx(Hc,{children:c.jsx("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4",children:s?c.jsxs(c.Fragment,{children:[c.jsx(A.Button,{variant:"secondary",className:"yst-mb-0",onClick:et,children:"Discard changes"}),c.jsx(A.Button,{variant:"primary",className:"yst-mb-0",onClick:Ve,children:"Save changes"})]}):c.jsx(A.Button,{as:an,to:"/brands/".concat(E),variant:"tertiary",className:"yst-mb-0",children:"Return to analysis"})})}),c.jsx(b8,{isOpen:L,onClose:xn,brandId:E,brandsToGroup:K.filter(function(ye){return $.includes(W(ye))}),onGroupCreated:ot}),c.jsx(h8,{isOpen:z,onClose:Bn,groupToEdit:R,allBrands:K})]})};const P8=Object.freeze(Object.defineProperty({__proto__:null,default:T8},Symbol.toStringTag,{value:"Module"}));function er(t){var e=t.children,n=t.description,r=t.title;return c.jsxs(A.Card.Header,{className:"yst-h-auto yst-flex-col yst-items-start yst-gap-0 yst-border-b-[1px] yst-border-b-slate-200 yst-bg-white yst-py-8",children:[r&&c.jsx(A.Title,{className:oe({"yst-mb-3":n||e}),children:r}),n&&c.jsx("p",{children:n}),e]})}function I8(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const L8=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N8=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M8={};function _y(t,e){return(M8.jsx?N8:L8).test(t)}const _8=/[ \t\n\f\r]/g;function R8(t){return typeof t=="object"?t.type==="text"?Ry(t.value):!1:Ry(t)}function Ry(t){return t.replace(_8,"")===""}class Sa{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}Sa.prototype.normal={};Sa.prototype.property={};Sa.prototype.space=void 0;function Ug(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Sa(n,r,e)}function cc(t){return t.toLowerCase()}class Lt{constructor(e,n){this.attribute=n,this.property=e}}Lt.prototype.attribute="";Lt.prototype.booleanish=!1;Lt.prototype.boolean=!1;Lt.prototype.commaOrSpaceSeparated=!1;Lt.prototype.commaSeparated=!1;Lt.prototype.defined=!1;Lt.prototype.mustUseProperty=!1;Lt.prototype.number=!1;Lt.prototype.overloadedBoolean=!1;Lt.prototype.property="";Lt.prototype.spaceSeparated=!1;Lt.prototype.space=void 0;let D8=0;const be=pi(),Xe=pi(),dc=pi(),V=pi(),Be=pi(),Ti=pi(),_t=pi();function pi(){return 2**++D8}const fc=Object.freeze(Object.defineProperty({__proto__:null,boolean:be,booleanish:Xe,commaOrSpaceSeparated:_t,commaSeparated:Ti,number:V,overloadedBoolean:dc,spaceSeparated:Be},Symbol.toStringTag,{value:"Module"})),Wl=Object.keys(fc);class ad extends Lt{constructor(e,n,r,i){let s=-1;if(super(e,n),Dy(this,"space",i),typeof r=="number")for(;++s<Wl.length;){const a=Wl[s];Dy(this,Wl[s],(r&fc[a])===fc[a])}}}ad.prototype.defined=!0;function Dy(t,e,n){n&&(t[e]=n)}function rs(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new ad(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[cc(r)]=r,n[cc(s.attribute)]=r}return new Sa(e,n,t.space)}const Hg=rs({properties:{ariaActiveDescendant:null,ariaAtomic:Xe,ariaAutoComplete:null,ariaBusy:Xe,ariaChecked:Xe,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Be,ariaCurrent:null,ariaDescribedBy:Be,ariaDetails:null,ariaDisabled:Xe,ariaDropEffect:Be,ariaErrorMessage:null,ariaExpanded:Xe,ariaFlowTo:Be,ariaGrabbed:Xe,ariaHasPopup:null,ariaHidden:Xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Be,ariaLevel:V,ariaLive:null,ariaModal:Xe,ariaMultiLine:Xe,ariaMultiSelectable:Xe,ariaOrientation:null,ariaOwns:Be,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Xe,ariaReadOnly:Xe,ariaRelevant:null,ariaRequired:Xe,ariaRoleDescription:Be,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Xe,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function qg(t,e){return e in t?t[e]:e}function Wg(t,e){return qg(t,e.toLowerCase())}const B8=rs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ti,acceptCharset:Be,accessKey:Be,action:null,allow:null,allowFullScreen:be,allowPaymentRequest:be,allowUserMedia:be,alt:null,as:null,async:be,autoCapitalize:null,autoComplete:Be,autoFocus:be,autoPlay:be,blocking:Be,capture:null,charSet:null,checked:be,cite:null,className:Be,cols:V,colSpan:null,content:null,contentEditable:Xe,controls:be,controlsList:Be,coords:V|Ti,crossOrigin:null,data:null,dateTime:null,decoding:null,default:be,defer:be,dir:null,dirName:null,disabled:be,download:dc,draggable:Xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:be,formTarget:null,headers:Be,height:V,hidden:dc,high:V,href:null,hrefLang:null,htmlFor:Be,httpEquiv:Be,id:null,imageSizes:null,imageSrcSet:null,inert:be,inputMode:null,integrity:null,is:null,isMap:be,itemId:null,itemProp:Be,itemRef:Be,itemScope:be,itemType:Be,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:be,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:be,muted:be,name:null,nonce:null,noModule:be,noValidate:be,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:be,optimum:V,pattern:null,ping:Be,placeholder:null,playsInline:be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:be,referrerPolicy:null,rel:Be,required:be,reversed:be,rows:V,rowSpan:V,sandbox:Be,scope:null,scoped:be,seamless:be,selected:be,shadowRootClonable:be,shadowRootDelegatesFocus:be,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:be,useMap:null,value:Xe,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Be,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:be,declare:be,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:be,noHref:be,noShade:be,noWrap:be,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Xe,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:be,disableRemotePlayback:be,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:Wg}),F8=rs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:_t,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Be,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:be,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ti,g2:Ti,glyphName:Ti,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:_t,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Be,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_t,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_t,rev:_t,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_t,requiredFeatures:_t,requiredFonts:_t,requiredFormats:_t,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:_t,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_t,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_t,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qg}),Gg=rs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),Qg=rs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wg}),Yg=rs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),z8={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},U8=/[A-Z]/g,By=/-[a-z]/g,H8=/^data[-\w.:]+$/i;function q8(t,e){const n=cc(e);let r=e,i=Lt;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&H8.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(By,G8);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!By.test(s)){let a=s.replace(U8,W8);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=ad}return new i(r,e)}function W8(t){return"-"+t.toLowerCase()}function G8(t){return t.charAt(1).toUpperCase()}const Q8=Ug([Hg,B8,Gg,Qg,Yg],"html"),od=Ug([Hg,F8,Gg,Qg,Yg],"svg");function Y8(t){return t.join(" ").trim()}var xi={},Gl,Fy;function V8(){if(Fy)return Gl;Fy=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,l=`
|
|
34
|
+
`,u="/",d="*",f="",y="comment",h="declaration";function p(g,v){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];v=v||{};var S=1,k=1;function j(O){var T=O.match(e);T&&(S+=T.length);var _=O.lastIndexOf(l);k=~_?O.length-_:k+O.length}function C(){var O={line:S,column:k};return function(T){return T.position=new b(O),L(),T}}function b(O){this.start=O,this.end={line:S,column:k},this.source=v.source}b.prototype.content=g;function w(O){var T=new Error(v.source+":"+S+":"+k+": "+O);if(T.reason=O,T.filename=v.source,T.line=S,T.column=k,T.source=g,!v.silent)throw T}function x(O){var T=O.exec(g);if(T){var _=T[0];return j(_),g=g.slice(_.length),T}}function L(){x(n)}function D(O){var T;for(O=O||[];T=M();)T!==!1&&O.push(T);return O}function M(){var O=C();if(!(u!=g.charAt(0)||d!=g.charAt(1))){for(var T=2;f!=g.charAt(T)&&(d!=g.charAt(T)||u!=g.charAt(T+1));)++T;if(T+=2,f===g.charAt(T-1))return w("End of comment missing");var _=g.slice(2,T-2);return k+=2,j(_),g=g.slice(T),k+=2,O({type:y,comment:_})}}function I(){var O=C(),T=x(r);if(T){if(M(),!x(i))return w("property missing ':'");var _=x(s),R=O({type:h,property:m(T[0].replace(t,f)),value:_?m(_[0].replace(t,f)):f});return x(a),R}}function z(){var O=[];D(O);for(var T;T=I();)T!==!1&&(O.push(T),D(O));return O}return L(),z()}function m(g){return g?g.replace(o,f):f}return Gl=p,Gl}var zy;function K8(){if(zy)return xi;zy=1;var t=xi&&xi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(xi,"__esModule",{value:!0}),xi.default=n;const e=t(V8());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const a=(0,e.default)(r),o=typeof i=="function";return a.forEach(l=>{if(l.type!=="declaration")return;const{property:u,value:d}=l;o?i(u,d,l):d&&(s=s||{},s[u]=d)}),s}return xi}var vs={},Uy;function X8(){if(Uy)return vs;Uy=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||n.test(u)||t.test(u)},a=function(u,d){return d.toUpperCase()},o=function(u,d){return"".concat(d,"-")},l=function(u,d){return d===void 0&&(d={}),s(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(i,o):u=u.replace(r,o),u.replace(e,a))};return vs.camelCase=l,vs}var bs,Hy;function J8(){if(Hy)return bs;Hy=1;var t=bs&&bs.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=t(K8()),n=X8();function r(i,s){var a={};return!i||typeof i!="string"||(0,e.default)(i,function(o,l){o&&l&&(a[(0,n.camelCase)(o,s)]=l)}),a}return r.default=r,bs=r,bs}var Z8=J8();const $8=Bo(Z8),Vg=Kg("end"),ld=Kg("start");function Kg(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function eO(t){const e=ld(t),n=Vg(t);if(e&&n)return{start:e,end:n}}function Bs(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?qy(t.position):"start"in t||"end"in t?qy(t):"line"in t||"column"in t?hc(t):""}function hc(t){return Wy(t&&t.line)+":"+Wy(t&&t.column)}function qy(t){return hc(t&&t.start)+"-"+hc(t&&t.end)}function Wy(t){return t&&typeof t=="number"?t:1}class ht extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(a=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Bs(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ht.prototype.file="";ht.prototype.name="";ht.prototype.reason="";ht.prototype.message="";ht.prototype.stack="";ht.prototype.column=void 0;ht.prototype.line=void 0;ht.prototype.ancestors=void 0;ht.prototype.cause=void 0;ht.prototype.fatal=void 0;ht.prototype.place=void 0;ht.prototype.ruleId=void 0;ht.prototype.source=void 0;const ud={}.hasOwnProperty,tO=new Map,nO=/[A-Z]/g,rO=new Set(["table","tbody","thead","tfoot","tr"]),iO=new Set(["td","th"]),Xg="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sO(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=hO(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=fO(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?od:Q8,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=Jg(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function Jg(t,e,n){if(e.type==="element")return aO(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return oO(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return uO(t,e,n);if(e.type==="mdxjsEsm")return lO(t,e);if(e.type==="root")return cO(t,e,n);if(e.type==="text")return dO(t,e)}function aO(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=od,t.schema=i),t.ancestors.push(e);const s=$g(t,e.tagName,!1),a=yO(t,e);let o=dd(t,e);return rO.has(e.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!R8(l):!0})),Zg(t,a,s,e),cd(a,o),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function oO(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}sa(t,e.position)}function lO(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);sa(t,e.position)}function uO(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=od,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:$g(t,e.name,!0),a=pO(t,e),o=dd(t,e);return Zg(t,a,s,e),cd(a,o),t.ancestors.pop(),t.schema=r,t.create(e,s,a,n)}function cO(t,e,n){const r={};return cd(r,dd(t,e)),t.create(e,t.Fragment,r,n)}function dO(t,e){return e.value}function Zg(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function cd(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function fO(t,e,n){return r;function r(i,s,a,o){const u=Array.isArray(a.children)?n:e;return o?u(s,a,o):u(s,a)}}function hO(t,e){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=ld(r);return e(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function yO(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&ud.call(e.properties,i)){const s=mO(t,i,e.properties[i]);if(s){const[a,o]=s;t.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&iO.has(e.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function pO(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,t.evaluater.evaluateExpression(o.argument))}else sa(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const o=r.value.data.estree.body[0];o.type,s=t.evaluater.evaluateExpression(o.expression)}else sa(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function dd(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:tO;for(;++r<e.children.length;){const s=e.children[r];let a;if(t.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const o=Jg(t,s,a);o!==void 0&&n.push(o)}return n}function mO(t,e,n){const r=q8(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?I8(n):Y8(n)),r.property==="style"){let i=typeof n=="object"?n:gO(t,String(n));return t.stylePropertyNameCase==="css"&&(i=vO(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?z8[r.property]||r.property:r.attribute,n]}}function gO(t,e){try{return $8(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new ht("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Xg+"#cannot-parse-style-attribute",i}}function $g(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,a;for(;++s<i.length;){const o=_y(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=_y(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return ud.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);sa(t)}function sa(t,e){const n=new ht("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=Xg+"#cannot-handle-mdx-estrees-without-createevaluater",n}function vO(t){const e={};let n;for(n in t)ud.call(t,n)&&(e[bO(n)]=t[n]);return e}function bO(t){let e=t.replace(nO,xO);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function xO(t){return"-"+t.toLowerCase()}const Ql={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},wO={};function AO(t,e){const n=wO,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ev(t,r,i)}function ev(t,e,n){if(SO(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Gy(t.children,e,n)}return Array.isArray(t)?Gy(t,e,n):""}function Gy(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=ev(t[i],e,n);return r.join("")}function SO(t){return!!(t&&typeof t=="object")}const Qy=document.createElement("i");function fd(t){const e="&"+t+";";Qy.innerHTML=e;const n=Qy.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function Rn(t,e,n,r){const i=t.length;let s=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(e,0),t.splice(...a),s+=1e4,e+=1e4}function tn(t,e){return t.length>0?(Rn(t,t.length,0,e),t):e}const Yy={}.hasOwnProperty;function CO(t){const e={};let n=-1;for(;++n<t.length;)jO(e,t[n]);return e}function jO(t,e){let n;for(n in e){const i=(Yy.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let a;if(s)for(a in s){Yy.call(i,a)||(i[a]=[]);const o=s[a];kO(i[a],Array.isArray(o)?o:o?[o]:[])}}}function kO(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);Rn(t,0,0,r)}function tv(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Pi(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=Nr(/[A-Za-z]/),Vt=Nr(/[\dA-Za-z]/),EO=Nr(/[#-'*+\--9=?A-Z^-~]/);function yc(t){return t!==null&&(t<32||t===127)}const pc=Nr(/\d/),OO=Nr(/[\dA-Fa-f]/),TO=Nr(/[!-/:-@[-`{-~]/);function he(t){return t!==null&&t<-2}function Tt(t){return t!==null&&(t<0||t===32)}function Pe(t){return t===-2||t===-1||t===32}const PO=Nr(/\p{P}|\p{S}/u),IO=Nr(/\s/);function Nr(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function is(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const s=t.charCodeAt(n);let a="";if(s===37&&Vt(t.charCodeAt(n+1))&&Vt(t.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=t.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(e.push(t.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function ze(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Pe(l)?(t.enter(n),o(l)):e(l)}function o(l){return Pe(l)&&s++<i?(t.consume(l),o):(t.exit(n),e(l))}}const LO={tokenize:NO};function NO(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),ze(t,e,"linePrefix")}function i(o){return t.enter("paragraph"),s(o)}function s(o){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(o);return}return he(o)?(t.consume(o),t.exit("chunkText"),s):(t.consume(o),a)}}const MO={tokenize:_O},Vy={tokenize:RO};function _O(t){const e=this,n=[];let r=0,i,s,a;return o;function o(k){if(r<n.length){const j=n[r];return e.containerState=j[1],t.attempt(j[0].continuation,l,u)(k)}return u(k)}function l(k){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&S();const j=e.events.length;let C=j,b;for(;C--;)if(e.events[C][0]==="exit"&&e.events[C][1].type==="chunkFlow"){b=e.events[C][1].end;break}v(r);let w=j;for(;w<e.events.length;)e.events[w][1].end={...b},w++;return Rn(e.events,C+1,0,e.events.slice(j)),e.events.length=w,u(k)}return o(k)}function u(k){if(r===n.length){if(!i)return y(k);if(i.currentConstruct&&i.currentConstruct.concrete)return p(k);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Vy,d,f)(k)}function d(k){return i&&S(),v(r),y(k)}function f(k){return e.parser.lazy[e.now().line]=r!==n.length,a=e.now().offset,p(k)}function y(k){return e.containerState={},t.attempt(Vy,h,p)(k)}function h(k){return r++,n.push([e.currentConstruct,e.containerState]),y(k)}function p(k){if(k===null){i&&S(),v(0),t.consume(k);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),m(k)}function m(k){if(k===null){g(t.exit("chunkFlow"),!0),v(0),t.consume(k);return}return he(k)?(t.consume(k),g(t.exit("chunkFlow")),r=0,e.interrupt=void 0,o):(t.consume(k),m)}function g(k,j){const C=e.sliceStream(k);if(j&&C.push(null),k.previous=s,s&&(s.next=k),s=k,i.defineSkip(k.start),i.write(C),e.parser.lazy[k.start.line]){let b=i.events.length;for(;b--;)if(i.events[b][1].start.offset<a&&(!i.events[b][1].end||i.events[b][1].end.offset>a))return;const w=e.events.length;let x=w,L,D;for(;x--;)if(e.events[x][0]==="exit"&&e.events[x][1].type==="chunkFlow"){if(L){D=e.events[x][1].end;break}L=!0}for(v(r),b=w;b<e.events.length;)e.events[b][1].end={...D},b++;Rn(e.events,x+1,0,e.events.slice(w)),e.events.length=b}}function v(k){let j=n.length;for(;j-- >k;){const C=n[j];e.containerState=C[1],C[0].exit.call(e,t)}n.length=k}function S(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function RO(t,e,n){return ze(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ky(t){if(t===null||Tt(t)||IO(t))return 1;if(PO(t))return 2}function hd(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const s=t[i].resolveAll;s&&!r.includes(s)&&(e=s(e,n),r.push(s))}return e}const mc={name:"attention",resolveAll:DO,tokenize:BO};function DO(t,e){let n=-1,r,i,s,a,o,l,u,d;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},y={...t[n][1].start};Xy(f,-l),Xy(y,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:y},s={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},t[r][1].end={...a.start},t[n][1].start={...o.end},u=[],t[r][1].end.offset-t[r][1].start.offset&&(u=tn(u,[["enter",t[r][1],e],["exit",t[r][1],e]])),u=tn(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",s,e]]),u=tn(u,hd(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),u=tn(u,[["exit",s,e],["enter",o,e],["exit",o,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(d=2,u=tn(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):d=0,Rn(t,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function BO(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Ky(r);let s;return a;function a(l){return s=l,t.enter("attentionSequence"),o(l)}function o(l){if(l===s)return t.consume(l),o;const u=t.exit("attentionSequence"),d=Ky(l),f=!d||d===2&&i||n.includes(l),y=!i||i===2&&d||n.includes(r);return u._open=!!(s===42?f:f&&(i||!y)),u._close=!!(s===42?y:y&&(d||!f)),e(l)}}function Xy(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const FO={name:"autolink",tokenize:zO};function zO(t,e,n){let r=0;return i;function i(h){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(h){return Mn(h)?(t.consume(h),a):h===64?n(h):u(h)}function a(h){return h===43||h===45||h===46||Vt(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(t.consume(h),r=0,l):(h===43||h===45||h===46||Vt(h))&&r++<32?(t.consume(h),o):(r=0,u(h))}function l(h){return h===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):h===null||h===32||h===60||yc(h)?n(h):(t.consume(h),l)}function u(h){return h===64?(t.consume(h),d):EO(h)?(t.consume(h),u):n(h)}function d(h){return Vt(h)?f(h):n(h)}function f(h){return h===46?(t.consume(h),r=0,d):h===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(h),t.exit("autolinkMarker"),t.exit("autolink"),e):y(h)}function y(h){if((h===45||Vt(h))&&r++<63){const p=h===45?y:f;return t.consume(h),p}return n(h)}}const cl={partial:!0,tokenize:UO};function UO(t,e,n){return r;function r(s){return Pe(s)?ze(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||he(s)?e(s):n(s)}}const nv={continuation:{tokenize:qO},exit:WO,name:"blockQuote",tokenize:HO};function HO(t,e,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(t.enter("blockQuote",{_container:!0}),o.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),s}return n(a)}function s(a){return Pe(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}function qO(t,e,n){const r=this;return i;function i(a){return Pe(a)?ze(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return t.attempt(nv,e,n)(a)}}function WO(t){t.exit("blockQuote")}const rv={name:"characterEscape",tokenize:GO};function GO(t,e,n){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return TO(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const iv={name:"characterReference",tokenize:QO};function QO(t,e,n){const r=this;let i=0,s,a;return o;function o(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),l}function l(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),u):(t.enter("characterReferenceValue"),s=31,a=Vt,d(f))}function u(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,a=OO,d):(t.enter("characterReferenceValue"),s=7,a=pc,d(f))}function d(f){if(f===59&&i){const y=t.exit("characterReferenceValue");return a===Vt&&!fd(r.sliceSerialize(y))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(f)&&i++<s?(t.consume(f),d):n(f)}}const Jy={partial:!0,tokenize:VO},Zy={concrete:!0,name:"codeFenced",tokenize:YO};function YO(t,e,n){const r=this,i={partial:!0,tokenize:C};let s=0,a=0,o;return l;function l(b){return u(b)}function u(b){const w=r.events[r.events.length-1];return s=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,o=b,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),d(b)}function d(b){return b===o?(a++,t.consume(b),d):a<3?n(b):(t.exit("codeFencedFenceSequence"),Pe(b)?ze(t,f,"whitespace")(b):f(b))}function f(b){return b===null||he(b)?(t.exit("codeFencedFence"),r.interrupt?e(b):t.check(Jy,m,j)(b)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||he(b)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(b)):Pe(b)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),ze(t,h,"whitespace")(b)):b===96&&b===o?n(b):(t.consume(b),y)}function h(b){return b===null||he(b)?f(b):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===null||he(b)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(b)):b===96&&b===o?n(b):(t.consume(b),p)}function m(b){return t.attempt(i,j,g)(b)}function g(b){return t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),v}function v(b){return s>0&&Pe(b)?ze(t,S,"linePrefix",s+1)(b):S(b)}function S(b){return b===null||he(b)?t.check(Jy,m,j)(b):(t.enter("codeFlowValue"),k(b))}function k(b){return b===null||he(b)?(t.exit("codeFlowValue"),S(b)):(t.consume(b),k)}function j(b){return t.exit("codeFenced"),e(b)}function C(b,w,x){let L=0;return D;function D(T){return b.enter("lineEnding"),b.consume(T),b.exit("lineEnding"),M}function M(T){return b.enter("codeFencedFence"),Pe(T)?ze(b,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):I(T)}function I(T){return T===o?(b.enter("codeFencedFenceSequence"),z(T)):x(T)}function z(T){return T===o?(L++,b.consume(T),z):L>=a?(b.exit("codeFencedFenceSequence"),Pe(T)?ze(b,O,"whitespace")(T):O(T)):x(T)}function O(T){return T===null||he(T)?(b.exit("codeFencedFence"),w(T)):x(T)}}}function VO(t,e,n){const r=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}const Yl={name:"codeIndented",tokenize:XO},KO={partial:!0,tokenize:JO};function XO(t,e,n){const r=this;return i;function i(u){return t.enter("codeIndented"),ze(t,s,"linePrefix",5)(u)}function s(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):he(u)?t.attempt(KO,a,l)(u):(t.enter("codeFlowValue"),o(u))}function o(u){return u===null||he(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),o)}function l(u){return t.exit("codeIndented"),e(u)}}function JO(t,e,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):he(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):ze(t,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):he(a)?i(a):n(a)}}const ZO={name:"codeText",previous:e7,resolve:$O,tokenize:t7};function $O(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function e7(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function t7(t,e,n){let r=0,i,s;return a;function a(f){return t.enter("codeText"),t.enter("codeTextSequence"),o(f)}function o(f){return f===96?(t.consume(f),r++,o):(t.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),l):f===96?(s=t.enter("codeTextSequence"),i=0,d(f)):he(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),l):(t.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||he(f)?(t.exit("codeTextData"),l(f)):(t.consume(f),u)}function d(f){return f===96?(t.consume(f),i++,d):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(s.type="codeTextData",u(f))}}class n7{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&xs(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),xs(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),xs(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);xs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);xs(this.left,n.reverse())}}}function xs(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function sv(t){const e={};let n=-1,r,i,s,a,o,l,u;const d=new n7(t);for(;++n<d.length;){for(;n in e;)n=e[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,r7(d,n)),n=e[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=d.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},o=d.slice(i,n),o.unshift(r),d.splice(i,n-i+1,o))}}return Rn(t,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function r7(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],u={};let d,f,y=-1,h=n,p=0,m=0;const g=[m];for(;h;){for(;t.get(++i)[1]!==h;);s.push(i),h._tokenizer||(d=r.sliceStream(h),h.next||d.push(null),f&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++y<o.length;)o[y][0]==="exit"&&o[y-1][0]==="enter"&&o[y][1].type===o[y-1][1].type&&o[y][1].start.line!==o[y][1].end.line&&(m=y+1,g.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),y=g.length;y--;){const v=o.slice(g[y],g[y+1]),S=s.pop();l.push([S,S+v.length-1]),t.splice(S,2,v)}for(l.reverse(),y=-1;++y<l.length;)u[p+l[y][0]]=p+l[y][1],p+=l[y][1]-l[y][0]-1;return u}const i7={resolve:a7,tokenize:o7},s7={partial:!0,tokenize:l7};function a7(t){return sv(t),t}function o7(t,e){let n;return r;function r(o){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):he(o)?t.check(s7,a,s)(o):(t.consume(o),i)}function s(o){return t.exit("chunkContent"),t.exit("content"),e(o)}function a(o){return t.consume(o),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function l7(t,e,n){const r=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),ze(t,s,"linePrefix")}function s(a){if(a===null||he(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):t.interrupt(r.parser.constructs.flow,n,e)(a)}}function av(t,e,n,r,i,s,a,o,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return f;function f(v){return v===60?(t.enter(r),t.enter(i),t.enter(s),t.consume(v),t.exit(s),y):v===null||v===32||v===41||yc(v)?n(v):(t.enter(r),t.enter(a),t.enter(o),t.enter("chunkString",{contentType:"string"}),m(v))}function y(v){return v===62?(t.enter(s),t.consume(v),t.exit(s),t.exit(i),t.exit(r),e):(t.enter(o),t.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===62?(t.exit("chunkString"),t.exit(o),y(v)):v===null||v===60||he(v)?n(v):(t.consume(v),v===92?p:h)}function p(v){return v===60||v===62||v===92?(t.consume(v),h):h(v)}function m(v){return!d&&(v===null||v===41||Tt(v))?(t.exit("chunkString"),t.exit(o),t.exit(a),t.exit(r),e(v)):d<u&&v===40?(t.consume(v),d++,m):v===41?(t.consume(v),d--,m):v===null||v===32||v===40||yc(v)?n(v):(t.consume(v),v===92?g:m)}function g(v){return v===40||v===41||v===92?(t.consume(v),m):m(v)}}function ov(t,e,n,r,i,s){const a=this;let o=0,l;return u;function u(h){return t.enter(r),t.enter(i),t.consume(h),t.exit(i),t.enter(s),d}function d(h){return o>999||h===null||h===91||h===93&&!l||h===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(t.exit(s),t.enter(i),t.consume(h),t.exit(i),t.exit(r),e):he(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),d):(t.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||he(h)||o++>999?(t.exit("chunkString"),d(h)):(t.consume(h),l||(l=!Pe(h)),h===92?y:f)}function y(h){return h===91||h===92||h===93?(t.consume(h),o++,f):f(h)}}function lv(t,e,n,r,i,s){let a;return o;function o(y){return y===34||y===39||y===40?(t.enter(r),t.enter(i),t.consume(y),t.exit(i),a=y===40?41:y,l):n(y)}function l(y){return y===a?(t.enter(i),t.consume(y),t.exit(i),t.exit(r),e):(t.enter(s),u(y))}function u(y){return y===a?(t.exit(s),l(a)):y===null?n(y):he(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),ze(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===a||y===null||he(y)?(t.exit("chunkString"),u(y)):(t.consume(y),y===92?f:d)}function f(y){return y===a||y===92?(t.consume(y),d):d(y)}}function Fs(t,e){let n;return r;function r(i){return he(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):Pe(i)?ze(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const u7={name:"definition",tokenize:d7},c7={partial:!0,tokenize:f7};function d7(t,e,n){const r=this;let i;return s;function s(h){return t.enter("definition"),a(h)}function a(h){return ov.call(r,t,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(t.enter("definitionMarker"),t.consume(h),t.exit("definitionMarker"),l):n(h)}function l(h){return Tt(h)?Fs(t,u)(h):u(h)}function u(h){return av(t,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function d(h){return t.attempt(c7,f,f)(h)}function f(h){return Pe(h)?ze(t,y,"whitespace")(h):y(h)}function y(h){return h===null||he(h)?(t.exit("definition"),r.parser.defined.push(i),e(h)):n(h)}}function f7(t,e,n){return r;function r(o){return Tt(o)?Fs(t,i)(o):n(o)}function i(o){return lv(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return Pe(o)?ze(t,a,"whitespace")(o):a(o)}function a(o){return o===null||he(o)?e(o):n(o)}}const h7={name:"hardBreakEscape",tokenize:y7};function y7(t,e,n){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return he(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const p7={name:"headingAtx",resolve:m7,tokenize:g7};function m7(t,e){let n=t.length-2,r=3,i,s;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},s={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},Rn(t,r,n-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}function g7(t,e,n){let r=0;return i;function i(d){return t.enter("atxHeading"),s(d)}function s(d){return t.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(t.consume(d),a):d===null||Tt(d)?(t.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(t.enter("atxHeadingSequence"),l(d)):d===null||he(d)?(t.exit("atxHeading"),e(d)):Pe(d)?ze(t,o,"whitespace")(d):(t.enter("atxHeadingText"),u(d))}function l(d){return d===35?(t.consume(d),l):(t.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||Tt(d)?(t.exit("atxHeadingText"),o(d)):(t.consume(d),u)}}const v7=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$y=["pre","script","style","textarea"],b7={concrete:!0,name:"htmlFlow",resolveTo:A7,tokenize:S7},x7={partial:!0,tokenize:j7},w7={partial:!0,tokenize:C7};function A7(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function S7(t,e,n){const r=this;let i,s,a,o,l;return u;function u(P){return d(P)}function d(P){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(P),f}function f(P){return P===33?(t.consume(P),y):P===47?(t.consume(P),s=!0,m):P===63?(t.consume(P),i=3,r.interrupt?e:E):Mn(P)?(t.consume(P),a=String.fromCharCode(P),g):n(P)}function y(P){return P===45?(t.consume(P),i=2,h):P===91?(t.consume(P),i=5,o=0,p):Mn(P)?(t.consume(P),i=4,r.interrupt?e:E):n(P)}function h(P){return P===45?(t.consume(P),r.interrupt?e:E):n(P)}function p(P){const Q="CDATA[";return P===Q.charCodeAt(o++)?(t.consume(P),o===Q.length?r.interrupt?e:I:p):n(P)}function m(P){return Mn(P)?(t.consume(P),a=String.fromCharCode(P),g):n(P)}function g(P){if(P===null||P===47||P===62||Tt(P)){const Q=P===47,Z=a.toLowerCase();return!Q&&!s&&$y.includes(Z)?(i=1,r.interrupt?e(P):I(P)):v7.includes(a.toLowerCase())?(i=6,Q?(t.consume(P),v):r.interrupt?e(P):I(P)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):s?S(P):k(P))}return P===45||Vt(P)?(t.consume(P),a+=String.fromCharCode(P),g):n(P)}function v(P){return P===62?(t.consume(P),r.interrupt?e:I):n(P)}function S(P){return Pe(P)?(t.consume(P),S):D(P)}function k(P){return P===47?(t.consume(P),D):P===58||P===95||Mn(P)?(t.consume(P),j):Pe(P)?(t.consume(P),k):D(P)}function j(P){return P===45||P===46||P===58||P===95||Vt(P)?(t.consume(P),j):C(P)}function C(P){return P===61?(t.consume(P),b):Pe(P)?(t.consume(P),C):k(P)}function b(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(t.consume(P),l=P,w):Pe(P)?(t.consume(P),b):x(P)}function w(P){return P===l?(t.consume(P),l=null,L):P===null||he(P)?n(P):(t.consume(P),w)}function x(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Tt(P)?C(P):(t.consume(P),x)}function L(P){return P===47||P===62||Pe(P)?k(P):n(P)}function D(P){return P===62?(t.consume(P),M):n(P)}function M(P){return P===null||he(P)?I(P):Pe(P)?(t.consume(P),M):n(P)}function I(P){return P===45&&i===2?(t.consume(P),_):P===60&&i===1?(t.consume(P),R):P===62&&i===4?(t.consume(P),W):P===63&&i===3?(t.consume(P),E):P===93&&i===5?(t.consume(P),Y):he(P)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(x7,H,z)(P)):P===null||he(P)?(t.exit("htmlFlowData"),z(P)):(t.consume(P),I)}function z(P){return t.check(w7,O,H)(P)}function O(P){return t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),T}function T(P){return P===null||he(P)?z(P):(t.enter("htmlFlowData"),I(P))}function _(P){return P===45?(t.consume(P),E):I(P)}function R(P){return P===47?(t.consume(P),a="",G):I(P)}function G(P){if(P===62){const Q=a.toLowerCase();return $y.includes(Q)?(t.consume(P),W):I(P)}return Mn(P)&&a.length<8?(t.consume(P),a+=String.fromCharCode(P),G):I(P)}function Y(P){return P===93?(t.consume(P),E):I(P)}function E(P){return P===62?(t.consume(P),W):P===45&&i===2?(t.consume(P),E):I(P)}function W(P){return P===null||he(P)?(t.exit("htmlFlowData"),H(P)):(t.consume(P),W)}function H(P){return t.exit("htmlFlow"),e(P)}}function C7(t,e,n){const r=this;return i;function i(a){return he(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):e(a)}}function j7(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(cl,e,n)}}const k7={name:"htmlText",tokenize:E7};function E7(t,e,n){const r=this;let i,s,a;return o;function o(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),l}function l(E){return E===33?(t.consume(E),u):E===47?(t.consume(E),C):E===63?(t.consume(E),k):Mn(E)?(t.consume(E),x):n(E)}function u(E){return E===45?(t.consume(E),d):E===91?(t.consume(E),s=0,p):Mn(E)?(t.consume(E),S):n(E)}function d(E){return E===45?(t.consume(E),h):n(E)}function f(E){return E===null?n(E):E===45?(t.consume(E),y):he(E)?(a=f,R(E)):(t.consume(E),f)}function y(E){return E===45?(t.consume(E),h):f(E)}function h(E){return E===62?_(E):E===45?y(E):f(E)}function p(E){const W="CDATA[";return E===W.charCodeAt(s++)?(t.consume(E),s===W.length?m:p):n(E)}function m(E){return E===null?n(E):E===93?(t.consume(E),g):he(E)?(a=m,R(E)):(t.consume(E),m)}function g(E){return E===93?(t.consume(E),v):m(E)}function v(E){return E===62?_(E):E===93?(t.consume(E),v):m(E)}function S(E){return E===null||E===62?_(E):he(E)?(a=S,R(E)):(t.consume(E),S)}function k(E){return E===null?n(E):E===63?(t.consume(E),j):he(E)?(a=k,R(E)):(t.consume(E),k)}function j(E){return E===62?_(E):k(E)}function C(E){return Mn(E)?(t.consume(E),b):n(E)}function b(E){return E===45||Vt(E)?(t.consume(E),b):w(E)}function w(E){return he(E)?(a=w,R(E)):Pe(E)?(t.consume(E),w):_(E)}function x(E){return E===45||Vt(E)?(t.consume(E),x):E===47||E===62||Tt(E)?L(E):n(E)}function L(E){return E===47?(t.consume(E),_):E===58||E===95||Mn(E)?(t.consume(E),D):he(E)?(a=L,R(E)):Pe(E)?(t.consume(E),L):_(E)}function D(E){return E===45||E===46||E===58||E===95||Vt(E)?(t.consume(E),D):M(E)}function M(E){return E===61?(t.consume(E),I):he(E)?(a=M,R(E)):Pe(E)?(t.consume(E),M):L(E)}function I(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(t.consume(E),i=E,z):he(E)?(a=I,R(E)):Pe(E)?(t.consume(E),I):(t.consume(E),O)}function z(E){return E===i?(t.consume(E),i=void 0,T):E===null?n(E):he(E)?(a=z,R(E)):(t.consume(E),z)}function O(E){return E===null||E===34||E===39||E===60||E===61||E===96?n(E):E===47||E===62||Tt(E)?L(E):(t.consume(E),O)}function T(E){return E===47||E===62||Tt(E)?L(E):n(E)}function _(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),e):n(E)}function R(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),G}function G(E){return Pe(E)?ze(t,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Y(E)}function Y(E){return t.enter("htmlTextData"),a(E)}}const yd={name:"labelEnd",resolveAll:I7,resolveTo:L7,tokenize:N7},O7={tokenize:M7},T7={tokenize:_7},P7={tokenize:R7};function I7(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&Rn(t,0,t.length,n),t}function L7(t,e){let n=t.length,r=0,i,s,a,o;for(;n--;)if(i=t[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},u={type:"label",start:{...t[s][1].start},end:{...t[a][1].end}},d={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[a-2][1].start}};return o=[["enter",l,e],["enter",u,e]],o=tn(o,t.slice(s+1,s+r+3)),o=tn(o,[["enter",d,e]]),o=tn(o,hd(e.parser.constructs.insideSpan.null,t.slice(s+r+4,a-3),e)),o=tn(o,[["exit",d,e],t[a-2],t[a-1],["exit",u,e]]),o=tn(o,t.slice(a+1)),o=tn(o,[["exit",l,e]]),Rn(t,s,t.length,o),t}function N7(t,e,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(y){return s?s._inactive?f(y):(a=r.parser.defined.includes(Pi(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(y),t.exit("labelMarker"),t.exit("labelEnd"),l):n(y)}function l(y){return y===40?t.attempt(O7,d,a?d:f)(y):y===91?t.attempt(T7,d,a?u:f)(y):a?d(y):f(y)}function u(y){return t.attempt(P7,d,f)(y)}function d(y){return e(y)}function f(y){return s._balanced=!0,n(y)}}function M7(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return Tt(f)?Fs(t,s)(f):s(f)}function s(f){return f===41?d(f):av(t,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Tt(f)?Fs(t,l)(f):d(f)}function o(f){return n(f)}function l(f){return f===34||f===39||f===40?lv(t,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return Tt(f)?Fs(t,d)(f):d(f)}function d(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function _7(t,e,n){const r=this;return i;function i(o){return ov.call(r,t,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Pi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(o):n(o)}function a(o){return n(o)}}function R7(t,e,n){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const D7={name:"labelStartImage",resolveAll:yd.resolveAll,tokenize:B7};function B7(t,e,n){const r=this;return i;function i(o){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(o),t.exit("labelImageMarker"),s}function s(o){return o===91?(t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):e(o)}}const F7={name:"labelStartLink",resolveAll:yd.resolveAll,tokenize:z7};function z7(t,e,n){const r=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}const Vl={name:"lineEnding",tokenize:U7};function U7(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),ze(t,e,"linePrefix")}}const yo={name:"thematicBreak",tokenize:H7};function H7(t,e,n){let r=0,i;return s;function s(u){return t.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(t.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||he(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===i?(t.consume(u),r++,l):(t.exit("thematicBreakSequence"),Pe(u)?ze(t,o,"whitespace")(u):o(u))}}const St={continuation:{tokenize:Q7},exit:V7,name:"list",tokenize:G7},q7={partial:!0,tokenize:K7},W7={partial:!0,tokenize:Y7};function G7(t,e,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:pc(h)){if(r.containerState.type||(r.containerState.type=p,t.enter(p,{_container:!0})),p==="listUnordered")return t.enter("listItemPrefix"),h===42||h===45?t.check(yo,n,u)(h):u(h);if(!r.interrupt||h===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(h)}return n(h)}function l(h){return pc(h)&&++a<10?(t.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(t.exit("listItemValue"),u(h)):n(h)}function u(h){return t.enter("listItemMarker"),t.consume(h),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,t.check(cl,r.interrupt?n:d,t.attempt(q7,y,f))}function d(h){return r.containerState.initialBlankLine=!0,s++,y(h)}function f(h){return Pe(h)?(t.enter("listItemPrefixWhitespace"),t.consume(h),t.exit("listItemPrefixWhitespace"),y):n(h)}function y(h){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(h)}}function Q7(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(cl,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ze(t,e,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!Pe(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(W7,e,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,ze(t,t.attempt(St,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Y7(t,e,n){const r=this;return ze(t,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?e(s):n(s)}}function V7(t){t.exit(this.containerState.type)}function K7(t,e,n){const r=this;return ze(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Pe(s)&&a&&a[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const ep={name:"setextUnderline",resolveTo:X7,tokenize:J7};function X7(t,e){let n=t.length,r,i,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",a,e]),t.splice(s+1,0,["exit",t[r][1],e]),t[r][1].end={...t[s][1].end}):t[r][1]=a,t.push(["exit",a,e]),t}function J7(t,e,n){const r=this;let i;return s;function s(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return t.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(t.consume(u),o):(t.exit("setextHeadingLineSequence"),Pe(u)?ze(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||he(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const Z7={tokenize:$7};function $7(t){const e=this,n=t.attempt(cl,r,t.attempt(this.parser.constructs.flowInitial,i,ze(t,t.attempt(this.parser.constructs.flow,i,t.attempt(i7,i)),"linePrefix")));return n;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const eT={resolveAll:cv()},tT=uv("string"),nT=uv("text");function uv(t){return{resolveAll:cv(t==="text"?rT:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],s=n.attempt(i,a,o);return a;function a(d){return u(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),s(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const f=i[d];let y=-1;if(f)for(;++y<f.length;){const h=f[y];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function cv(t){return e;function e(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(n,r):n}}function rT(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let s=i.length,a=-1,o=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)l=!0,o++;else if(u!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(o=0),o){const u={type:n===t.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(t.splice(n,0,["enter",u,e],["exit",u,e]),n+=2)}n++}return t}const iT={42:St,43:St,45:St,48:St,49:St,50:St,51:St,52:St,53:St,54:St,55:St,56:St,57:St,62:nv},sT={91:u7},aT={[-2]:Yl,[-1]:Yl,32:Yl},oT={35:p7,42:yo,45:[ep,yo],60:b7,61:ep,95:yo,96:Zy,126:Zy},lT={38:iv,92:rv},uT={[-5]:Vl,[-4]:Vl,[-3]:Vl,33:D7,38:iv,42:mc,60:[FO,k7],91:F7,92:[h7,rv],93:yd,95:mc,96:ZO},cT={null:[mc,eT]},dT={null:[42,95]},fT={null:[]},hT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dT,contentInitial:sT,disable:fT,document:iT,flow:oT,flowInitial:aT,insideSpan:cT,string:lT,text:uT},Symbol.toStringTag,{value:"Module"}));function yT(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:w(C),check:w(b),consume:S,enter:k,exit:j,interrupt:w(b,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:t,previous:null,sliceSerialize:y,sliceStream:h,write:f};let d=e.tokenize.call(u,l);return e.resolveAll&&s.push(e),u;function f(M){return a=tn(a,M),g(),a[a.length-1]!==null?[]:(x(e,0),u.events=hd(s,u.events,u),u.events)}function y(M,I){return mT(h(M),I)}function h(M){return pT(a,M)}function p(){const{_bufferIndex:M,_index:I,line:z,column:O,offset:T}=r;return{_bufferIndex:M,_index:I,line:z,column:O,offset:T}}function m(M){i[M.line]=M.column,D()}function g(){let M;for(;r._index<a.length;){const I=a[r._index];if(typeof I=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<I.length;)v(I.charCodeAt(r._bufferIndex));else v(I)}}function v(M){d=d(M)}function S(M){he(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,D()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=M}function k(M,I){const z=I||{};return z.type=M,z.start=p(),u.events.push(["enter",z,u]),o.push(z),z}function j(M){const I=o.pop();return I.end=p(),u.events.push(["exit",I,u]),I}function C(M,I){x(M,I.from)}function b(M,I){I.restore()}function w(M,I){return z;function z(O,T,_){let R,G,Y,E;return Array.isArray(O)?H(O):"tokenize"in O?H([O]):W(O);function W(K){return J;function J(le){const ue=le!==null&&K[le],ie=le!==null&&K.null,ke=[...Array.isArray(ue)?ue:ue?[ue]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return H(ke)(le)}}function H(K){return R=K,G=0,K.length===0?_:P(K[G])}function P(K){return J;function J(le){return E=L(),Y=K,K.partial||(u.currentConstruct=K),K.name&&u.parser.constructs.disable.null.includes(K.name)?Z():K.tokenize.call(I?Object.assign(Object.create(u),I):u,l,Q,Z)(le)}}function Q(K){return M(Y,E),T}function Z(K){return E.restore(),++G<R.length?P(R[G]):_}}}function x(M,I){M.resolveAll&&!s.includes(M)&&s.push(M),M.resolve&&Rn(u.events,I,u.events.length-I,M.resolve(u.events.slice(I),u)),M.resolveTo&&(u.events=M.resolveTo(u.events,u))}function L(){const M=p(),I=u.previous,z=u.currentConstruct,O=u.events.length,T=Array.from(o);return{from:O,restore:_};function _(){r=M,u.previous=I,u.currentConstruct=z,u.events.length=O,o=T,D()}}function D(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function pT(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let a;if(n===i)a=[t[n].slice(r,s)];else{if(a=t.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(t[i].slice(0,s))}return a}function mT(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const s=t[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
|
|
35
35
|
`;break}case-3:{a=`\r
|
|
36
|
-
`;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function gT(t){const r={constructs:CO([hT,...(t||{}).extensions||[]]),content:i(LO),defined:[],document:i(MO),flow:i(Z7),lazy:{},string:i(tT),text:i(nT)};return r;function i(s){return a;function a(o){return yT(r,s,o)}}}function vT(t){for(;!sv(t););return t}const tp=/[\0\t\n\r]/g;function bT(){let t=1,e="",n=!0,r;return i;function i(s,a,o){const l=[];let u,d,f,y,h;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),f=0,e="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(tp.lastIndex=f,u=tp.exec(s),y=u&&u.index!==void 0?u.index:s.length,h=s.charCodeAt(y),!u){e=s.slice(f);break}if(h===10&&f===y&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<y&&(l.push(s.slice(f,y)),t+=y-f),h){case 0:{l.push(65533),t++;break}case 9:{for(d=Math.ceil(t/4)*4,l.push(-2);t++<d;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}f=y+1}return o&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}const xT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wT(t){return t.replace(xT,AT)}function AT(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return tv(n.slice(s?2:1),s?16:10)}return fd(n)||t}const dv={}.hasOwnProperty;function ST(t,e,n){return typeof e!="string"&&(n=e,e=void 0),CT(n)(vT(gT(n).document().write(bT()(t,e,!0))))}function CT(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ot),autolinkProtocol:L,autolinkEmail:L,atxHeading:s(at),blockQuote:s(ie),characterEscape:L,characterReference:L,codeFenced:s(ke),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(ke,a),codeText:s($,a),codeTextData:L,data:L,codeFlowValue:L,definition:s(He),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Nt),hardBreakEscape:s(Ve),hardBreakTrailing:s(Ve),htmlFlow:s(et,a),htmlFlowData:L,htmlText:s(et,a),htmlTextData:L,image:s(xn),label:a,link:s(ot),listItem:s(Fn),listItemValue:y,listOrdered:s(Bn,f),listUnordered:s(Bn),paragraph:s(Ue),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(at),strong:s(ye),thematicBreak:s(Ae)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:K,characterReference:J,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:D,codeIndented:l(v),codeText:l(O),codeTextData:D,data:D,definition:l(),definitionDestinationString:j,definitionLabelString:S,definitionTitleString:k,emphasis:l(),hardBreakEscape:l(I),hardBreakTrailing:l(I),htmlFlow:l(z),htmlFlowData:D,htmlText:l(P),htmlTextData:D,image:l(R),label:Y,labelText:G,lineEnding:M,link:l(_),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Q,resourceDestinationString:E,resourceTitleString:W,resource:H,setextHeading:l(x),setextHeadingLineSequence:w,setextHeadingText:b,strong:l(),thematicBreak:l()}};fv(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(U){let X={type:"root",children:[]};const de={stack:[X],tokenStack:[],config:e,enter:o,exit:u,buffer:a,resume:d,data:n},ve=[];let Ee=-1;for(;++Ee<U.length;)if(U[Ee][1].type==="listOrdered"||U[Ee][1].type==="listUnordered")if(U[Ee][0]==="enter")ve.push(Ee);else{const it=ve.pop();Ee=i(U,it,Ee)}for(Ee=-1;++Ee<U.length;){const it=e[U[Ee][0]];dv.call(it,U[Ee][1].type)&&it[U[Ee][1].type].call(Object.assign({sliceSerialize:U[Ee][2].sliceSerialize},de),U[Ee][1])}if(de.tokenStack.length>0){const it=de.tokenStack[de.tokenStack.length-1];(it[1]||np).call(de,void 0,it[0])}for(X.position={start:ur(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:ur(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<e.transforms.length;)X=e.transforms[Ee](X)||X;return X}function i(U,X,de){let ve=X-1,Ee=-1,it=!1,Xt,yt,zn,wn;for(;++ve<=de;){const Te=U[ve];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Te[0]==="enter"?Ee++:Ee--,wn=void 0;break}case"lineEndingBlank":{Te[0]==="enter"&&(Xt&&!wn&&!Ee&&!zn&&(zn=ve),wn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:wn=void 0}if(!Ee&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||Ee===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(Xt){let An=ve;for(yt=void 0;An--;){const st=U[An];if(st[1].type==="lineEnding"||st[1].type==="lineEndingBlank"){if(st[0]==="exit")continue;yt&&(U[yt][1].type="lineEndingBlank",it=!0),st[1].type="lineEnding",yt=An}else if(!(st[1].type==="linePrefix"||st[1].type==="blockQuotePrefix"||st[1].type==="blockQuotePrefixWhitespace"||st[1].type==="blockQuoteMarker"||st[1].type==="listItemIndent"))break}zn&&(!yt||zn<yt)&&(Xt._spread=!0),Xt.end=Object.assign({},yt?U[yt][1].start:Te[1].end),U.splice(yt||ve,0,["exit",Xt,Te[2]]),ve++,de++}if(Te[1].type==="listItemPrefix"){const An={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};Xt=An,U.splice(ve,0,["enter",An,Te[2]]),ve++,de++,zn=void 0,wn=!0}}}return U[X][1]._spread=it,de}function s(U,X){return de;function de(ve){o.call(this,U(ve),ve),X&&X.call(this,ve)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(U,X,de){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([X,de||void 0]),U.position={start:ur(X.start),end:void 0}}function l(U){return X;function X(de){U&&U.call(this,de),u.call(this,de)}}function u(U,X){const de=this.stack.pop(),ve=this.tokenStack.pop();if(ve)ve[0].type!==U.type&&(X?X.call(this,U,ve[0]):(ve[1]||np).call(this,U,ve[0]));else throw new Error("Cannot close `"+U.type+"` ("+Bs({start:U.start,end:U.end})+"): it’s not open");de.position.end=ur(U.end)}function d(){return AO(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function y(U){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function h(){const U=this.resume(),X=this.stack[this.stack.length-1];X.lang=U}function p(){const U=this.resume(),X=this.stack[this.stack.length-1];X.meta=U}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U.replace(/(\r?\n|\r)$/g,"")}function S(U){const X=this.resume(),de=this.stack[this.stack.length-1];de.label=X,de.identifier=Pi(this.sliceSerialize(U)).toLowerCase()}function k(){const U=this.resume(),X=this.stack[this.stack.length-1];X.title=U}function j(){const U=this.resume(),X=this.stack[this.stack.length-1];X.url=U}function C(U){const X=this.stack[this.stack.length-1];if(!X.depth){const de=this.sliceSerialize(U).length;X.depth=de}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function w(U){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function x(){this.data.setextHeadingSlurpLineEnding=void 0}function L(U){const de=this.stack[this.stack.length-1].children;let ve=de[de.length-1];(!ve||ve.type!=="text")&&(ve=pe(),ve.position={start:ur(U.start),end:void 0},de.push(ve)),this.stack.push(ve)}function D(U){const X=this.stack.pop();X.value+=this.sliceSerialize(U),X.position.end=ur(U.end)}function M(U){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=X.children[X.children.length-1];de.position.end=ur(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(X.type)&&(L.call(this,U),D.call(this,U))}function I(){this.data.atHardBreak=!0}function z(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U}function P(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U}function O(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U}function _(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=X,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function R(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=X,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function G(U){const X=this.sliceSerialize(U),de=this.stack[this.stack.length-2];de.label=wT(X),de.identifier=Pi(X).toLowerCase()}function Y(){const U=this.stack[this.stack.length-1],X=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const ve=U.children;de.children=ve}else de.alt=X}function E(){const U=this.resume(),X=this.stack[this.stack.length-1];X.url=U}function W(){const U=this.resume(),X=this.stack[this.stack.length-1];X.title=U}function H(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function Q(U){const X=this.resume(),de=this.stack[this.stack.length-1];de.label=X,de.identifier=Pi(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function Z(U){this.data.characterReferenceType=U.type}function K(U){const X=this.sliceSerialize(U),de=this.data.characterReferenceType;let ve;de?(ve=tv(X,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ve=fd(X);const Ee=this.stack[this.stack.length-1];Ee.value+=ve}function J(U){const X=this.stack.pop();X.position.end=ur(U.end)}function le(U){D.call(this,U);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(U)}function ue(U){D.call(this,U);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(U)}function ie(){return{type:"blockquote",children:[]}}function ke(){return{type:"code",lang:null,meta:null,value:""}}function $(){return{type:"inlineCode",value:""}}function He(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Nt(){return{type:"emphasis",children:[]}}function at(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function et(){return{type:"html",value:""}}function xn(){return{type:"image",title:null,url:"",alt:null}}function ot(){return{type:"link",title:null,url:"",children:[]}}function Bn(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function Fn(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function Ue(){return{type:"paragraph",children:[]}}function ye(){return{type:"strong",children:[]}}function pe(){return{type:"text",value:""}}function Ae(){return{type:"thematicBreak"}}}function ur(t){return{line:t.line,column:t.column,offset:t.offset}}function fv(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?fv(t,r):jT(t,r)}}function jT(t,e){let n;for(n in e)if(dv.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function np(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Bs({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Bs({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Bs({start:e.start,end:e.end})+") is still open")}function kT(t){const e=this;e.parser=n;function n(r){return ST(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function ET(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function OT(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
|
|
36
|
+
`;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function gT(t){const r={constructs:CO([hT,...(t||{}).extensions||[]]),content:i(LO),defined:[],document:i(MO),flow:i(Z7),lazy:{},string:i(tT),text:i(nT)};return r;function i(s){return a;function a(o){return yT(r,s,o)}}}function vT(t){for(;!sv(t););return t}const tp=/[\0\t\n\r]/g;function bT(){let t=1,e="",n=!0,r;return i;function i(s,a,o){const l=[];let u,d,f,y,h;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),f=0,e="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(tp.lastIndex=f,u=tp.exec(s),y=u&&u.index!==void 0?u.index:s.length,h=s.charCodeAt(y),!u){e=s.slice(f);break}if(h===10&&f===y&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<y&&(l.push(s.slice(f,y)),t+=y-f),h){case 0:{l.push(65533),t++;break}case 9:{for(d=Math.ceil(t/4)*4,l.push(-2);t++<d;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}f=y+1}return o&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}const xT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function wT(t){return t.replace(xT,AT)}function AT(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return tv(n.slice(s?2:1),s?16:10)}return fd(n)||t}const dv={}.hasOwnProperty;function ST(t,e,n){return typeof e!="string"&&(n=e,e=void 0),CT(n)(vT(gT(n).document().write(bT()(t,e,!0))))}function CT(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ot),autolinkProtocol:L,autolinkEmail:L,atxHeading:s(at),blockQuote:s(ie),characterEscape:L,characterReference:L,codeFenced:s(ke),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(ke,a),codeText:s($,a),codeTextData:L,data:L,codeFlowValue:L,definition:s(He),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Nt),hardBreakEscape:s(Ve),hardBreakTrailing:s(Ve),htmlFlow:s(et,a),htmlFlowData:L,htmlText:s(et,a),htmlTextData:L,image:s(xn),label:a,link:s(ot),listItem:s(Fn),listItemValue:y,listOrdered:s(Bn,f),listUnordered:s(Bn),paragraph:s(Ue),reference:P,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(at),strong:s(ye),thematicBreak:s(Ae)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:K,characterReference:J,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:D,codeIndented:l(v),codeText:l(T),codeTextData:D,data:D,definition:l(),definitionDestinationString:j,definitionLabelString:S,definitionTitleString:k,emphasis:l(),hardBreakEscape:l(I),hardBreakTrailing:l(I),htmlFlow:l(z),htmlFlowData:D,htmlText:l(O),htmlTextData:D,image:l(R),label:Y,labelText:G,lineEnding:M,link:l(_),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Q,resourceDestinationString:E,resourceTitleString:W,resource:H,setextHeading:l(x),setextHeadingLineSequence:w,setextHeadingText:b,strong:l(),thematicBreak:l()}};fv(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(U){let X={type:"root",children:[]};const de={stack:[X],tokenStack:[],config:e,enter:o,exit:u,buffer:a,resume:d,data:n},ve=[];let Ee=-1;for(;++Ee<U.length;)if(U[Ee][1].type==="listOrdered"||U[Ee][1].type==="listUnordered")if(U[Ee][0]==="enter")ve.push(Ee);else{const it=ve.pop();Ee=i(U,it,Ee)}for(Ee=-1;++Ee<U.length;){const it=e[U[Ee][0]];dv.call(it,U[Ee][1].type)&&it[U[Ee][1].type].call(Object.assign({sliceSerialize:U[Ee][2].sliceSerialize},de),U[Ee][1])}if(de.tokenStack.length>0){const it=de.tokenStack[de.tokenStack.length-1];(it[1]||np).call(de,void 0,it[0])}for(X.position={start:ur(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:ur(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},Ee=-1;++Ee<e.transforms.length;)X=e.transforms[Ee](X)||X;return X}function i(U,X,de){let ve=X-1,Ee=-1,it=!1,Xt,yt,zn,wn;for(;++ve<=de;){const Te=U[ve];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Te[0]==="enter"?Ee++:Ee--,wn=void 0;break}case"lineEndingBlank":{Te[0]==="enter"&&(Xt&&!wn&&!Ee&&!zn&&(zn=ve),wn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:wn=void 0}if(!Ee&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||Ee===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(Xt){let An=ve;for(yt=void 0;An--;){const st=U[An];if(st[1].type==="lineEnding"||st[1].type==="lineEndingBlank"){if(st[0]==="exit")continue;yt&&(U[yt][1].type="lineEndingBlank",it=!0),st[1].type="lineEnding",yt=An}else if(!(st[1].type==="linePrefix"||st[1].type==="blockQuotePrefix"||st[1].type==="blockQuotePrefixWhitespace"||st[1].type==="blockQuoteMarker"||st[1].type==="listItemIndent"))break}zn&&(!yt||zn<yt)&&(Xt._spread=!0),Xt.end=Object.assign({},yt?U[yt][1].start:Te[1].end),U.splice(yt||ve,0,["exit",Xt,Te[2]]),ve++,de++}if(Te[1].type==="listItemPrefix"){const An={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};Xt=An,U.splice(ve,0,["enter",An,Te[2]]),ve++,de++,zn=void 0,wn=!0}}}return U[X][1]._spread=it,de}function s(U,X){return de;function de(ve){o.call(this,U(ve),ve),X&&X.call(this,ve)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(U,X,de){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([X,de||void 0]),U.position={start:ur(X.start),end:void 0}}function l(U){return X;function X(de){U&&U.call(this,de),u.call(this,de)}}function u(U,X){const de=this.stack.pop(),ve=this.tokenStack.pop();if(ve)ve[0].type!==U.type&&(X?X.call(this,U,ve[0]):(ve[1]||np).call(this,U,ve[0]));else throw new Error("Cannot close `"+U.type+"` ("+Bs({start:U.start,end:U.end})+"): it’s not open");de.position.end=ur(U.end)}function d(){return AO(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function y(U){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function h(){const U=this.resume(),X=this.stack[this.stack.length-1];X.lang=U}function p(){const U=this.resume(),X=this.stack[this.stack.length-1];X.meta=U}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U.replace(/(\r?\n|\r)$/g,"")}function S(U){const X=this.resume(),de=this.stack[this.stack.length-1];de.label=X,de.identifier=Pi(this.sliceSerialize(U)).toLowerCase()}function k(){const U=this.resume(),X=this.stack[this.stack.length-1];X.title=U}function j(){const U=this.resume(),X=this.stack[this.stack.length-1];X.url=U}function C(U){const X=this.stack[this.stack.length-1];if(!X.depth){const de=this.sliceSerialize(U).length;X.depth=de}}function b(){this.data.setextHeadingSlurpLineEnding=!0}function w(U){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function x(){this.data.setextHeadingSlurpLineEnding=void 0}function L(U){const de=this.stack[this.stack.length-1].children;let ve=de[de.length-1];(!ve||ve.type!=="text")&&(ve=pe(),ve.position={start:ur(U.start),end:void 0},de.push(ve)),this.stack.push(ve)}function D(U){const X=this.stack.pop();X.value+=this.sliceSerialize(U),X.position.end=ur(U.end)}function M(U){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=X.children[X.children.length-1];de.position.end=ur(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(X.type)&&(L.call(this,U),D.call(this,U))}function I(){this.data.atHardBreak=!0}function z(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U}function O(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U}function T(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U}function _(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=X,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function R(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=X,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function G(U){const X=this.sliceSerialize(U),de=this.stack[this.stack.length-2];de.label=wT(X),de.identifier=Pi(X).toLowerCase()}function Y(){const U=this.stack[this.stack.length-1],X=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const ve=U.children;de.children=ve}else de.alt=X}function E(){const U=this.resume(),X=this.stack[this.stack.length-1];X.url=U}function W(){const U=this.resume(),X=this.stack[this.stack.length-1];X.title=U}function H(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function Q(U){const X=this.resume(),de=this.stack[this.stack.length-1];de.label=X,de.identifier=Pi(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function Z(U){this.data.characterReferenceType=U.type}function K(U){const X=this.sliceSerialize(U),de=this.data.characterReferenceType;let ve;de?(ve=tv(X,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ve=fd(X);const Ee=this.stack[this.stack.length-1];Ee.value+=ve}function J(U){const X=this.stack.pop();X.position.end=ur(U.end)}function le(U){D.call(this,U);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(U)}function ue(U){D.call(this,U);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(U)}function ie(){return{type:"blockquote",children:[]}}function ke(){return{type:"code",lang:null,meta:null,value:""}}function $(){return{type:"inlineCode",value:""}}function He(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Nt(){return{type:"emphasis",children:[]}}function at(){return{type:"heading",depth:0,children:[]}}function Ve(){return{type:"break"}}function et(){return{type:"html",value:""}}function xn(){return{type:"image",title:null,url:"",alt:null}}function ot(){return{type:"link",title:null,url:"",children:[]}}function Bn(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function Fn(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function Ue(){return{type:"paragraph",children:[]}}function ye(){return{type:"strong",children:[]}}function pe(){return{type:"text",value:""}}function Ae(){return{type:"thematicBreak"}}}function ur(t){return{line:t.line,column:t.column,offset:t.offset}}function fv(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?fv(t,r):jT(t,r)}}function jT(t,e){let n;for(n in e)if(dv.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function np(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Bs({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Bs({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Bs({start:e.start,end:e.end})+") is still open")}function kT(t){const e=this;e.parser=n;function n(r){return ST(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function ET(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function OT(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
|
|
37
37
|
`}]}function TT(t,e){const n=e.value?e.value+`
|
|
38
38
|
`:"",r={};e.lang&&(r.className=["language-"+e.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return e.meta&&(i.data={meta:e.meta}),t.patch(e,i),i=t.applyData(e,i),i={type:"element",tagName:"pre",properties:{},children:[i]},t.patch(e,i),i}function PT(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function IT(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function LT(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),i=is(r.toLowerCase()),s=t.footnoteOrder.indexOf(r);let a,o=t.footnoteCounts.get(r);o===void 0?(o=0,t.footnoteOrder.push(r),a=t.footnoteOrder.length):a=s+1,o+=1,t.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,u),t.applyData(e,u)}function NT(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function MT(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function hv(t,e){const n=e.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=t.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function _T(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return hv(t,e);const i={src:is(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,s),t.applyData(e,s)}function RT(t,e){const n={src:is(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,r),t.applyData(e,r)}function DT(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,r),t.applyData(e,r)}function BT(t,e){const n=String(e.identifier).toUpperCase(),r=t.definitionById.get(n);if(!r)return hv(t,e);const i={href:is(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function FT(t,e){const n={href:is(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const r={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function zT(t,e,n){const r=t.all(e),i=n?UT(n):yv(e),s={},a=[];if(typeof e.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
|
|
39
39
|
`}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
@@ -50,17 +50,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
50
50
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cv(t,e){if(t){if(typeof t=="string")return wc(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wc(t,e):void 0}}function wc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function hP(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function yP(t){if(Array.isArray(t))return t}function pP(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Ja=Ir(xp||(xp=pP(["md:yst-hidden yst-mr-2 yst-font-medium yst-text-slate-400 yst-inline-flex yst-w-20"]))),Za=10,mP=function(e){var n=e.id,r=e.citations,i=F.useState(1),s=dP(i,2),a=s[0],o=s[1],l=F.useMemo(function(){return oP(r).sort(function(h,p){return h.rank-p.rank})},[r]),u=Math.ceil(l.length/Za),d=(a-1)*Za,f=d+Za,y=l.slice(d,f);return F.useEffect(function(){a>u&&u>0&&o(1)},[u,a]),r.length===0?null:c.jsxs("details",{id:n,className:"yst-group/citations yst-mt-6",open:!0,children:[c.jsxs("summary",{className:"yst-flex yst-items-center yst-justify-between yst-cursor-pointer yst-list-none [&::-webkit-details-marker]:yst-hidden yst-mb-4",children:[c.jsxs("h3",{className:"yst-font-semibold",children:["Citations (",r.length,")"]}),c.jsx(xa,{className:"yst-h-4 yst-w-4 yst-text-gray-400 yst-flex-shrink-0 group-open/citations:yst-rotate-180 yst-transition-transform"})]}),c.jsxs(A.Table,{children:[c.jsx(A.Table.Head,{children:c.jsxs(A.Table.Row,{children:[c.jsx(A.Table.Header,{className:"yst-hidden md:yst-table-cell",children:" "}),c.jsx(A.Table.Header,{className:"yst-hidden md:yst-table-cell",children:"URL"}),c.jsx(A.Table.Header,{className:"yst-hidden md:yst-table-cell",children:"Root domain"}),c.jsx(A.Table.Header,{className:"yst-hidden md:yst-table-cell",children:"Brands"})]})}),c.jsx(A.Table.Body,{className:"max-md:yst-border-t-0",children:y.map(function(h,p){return c.jsxs("tr",{className:"yst-flex yst-flex-col yst-py-4 md:yst-table-row md:yst-py-0",children:[c.jsxs(A.Table.Cell,{className:"yst-px-4 yst-py-1 md:yst-p-2 md:yst-pl-4",children:[c.jsx(Ja,{as:"span",children:"Rank:"}),"#",h.rank]}),c.jsxs(A.Table.Cell,{className:"yst-break-all yst-px-4 yst-py-1 md:yst-p-2 md:yst-w-1/2",children:[c.jsx(Ja,{as:"span",children:"URL:"}),c.jsx(A.Link,{href:h.url,target:"_blank",rel:"noopener noreferrer",children:h.url})]}),c.jsxs(A.Table.Cell,{className:"yst-px-4 yst-py-1 md:yst-p-2",children:[c.jsx(Ja,{as:"span",children:"Domain:"}),h.rootDomain]}),c.jsxs(A.Table.Cell,{className:"yst-px-4 yst-py-1 md:yst-p-2",children:[c.jsx(Ja,{as:"span",children:"Brands:"}),h.associatedBrands.length>0?c.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-1",children:h.associatedBrands.map(function(m){return c.jsx(A.Badge,{variant:m.isSelf?"ai":"plain",children:m.name},m.id)})}):c.jsx("span",{className:"yst-text-gray-500",children:"None"})]})]},"".concat(h.url,"-").concat(p))})})]}),l.length>Za&&c.jsxs("div",{className:"yst-flex yst-items-center yst-justify-end yst-gap-4 yst-mt-4",children:[c.jsxs("p",{className:"yst-mb-0",children:["Showing ",d+1," to"," ",f>l.length?l.length:f," of"," ",l.length," results"]}),c.jsx(A.Pagination,{variant:"text",className:"yst-flex-row yst-gap-0",current:a,total:u,onNavigate:o,screenReaderTextPrevious:"Previous page",screenReaderTextNext:"Next page"})]})]})},wp=function(e){var n=e.title,r=e.sentiment,i=Wu(r.score),s=r.brands.map(function(l){return l.name}).join(", "),a=r.keywords.filter(function(l){return l.isPositive}).map(function(l){return l.keyword}),o=r.keywords.filter(function(l){return l.isNegative}).map(function(l){return l.keyword});return c.jsxs("div",{className:"yst-rounded-lg yst-border yst-border-gray-300 yst-p-4 yst-space-y-4",children:[c.jsx(A.Title,{as:"h4",size:"4",children:n}),s&&c.jsx("p",{className:"yst-text-sm",children:s}),c.jsxs("div",{children:[c.jsx("div",{className:"yst-inline-flex",children:c.jsx(ts,{className:"yst-mb-1.5",score:i,scoreFormat:"percentage",suffix:"positive"})}),c.jsx(A.ProgressBar,{max:100,min:0,progress:i,className:oe("yst-bg-red-500","[&>*]:yst-bg-green-500")})]}),a.length>0&&c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx(A.Title,{as:"h5",size:"5",children:"Positive keywords"}),c.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:a.map(function(l,u){return c.jsx(A.Badge,{className:"yst-bg-green-100 yst-text-green-800",children:l},u)})})]}),o.length>0&&c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx(A.Title,{as:"h5",size:"5",children:"Negative keywords"}),c.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:o.map(function(l,u){return c.jsx(A.Badge,{className:"yst-bg-red-100 yst-text-red-800",children:l},u)})})]})]})},gP=function(e){var n=e.id,r=e.ownSentiment,i=e.competitorSentiment;return!r&&!i?null:c.jsxs("details",{id:n,className:"yst-group/sentiment yst-mt-6",open:!0,children:[c.jsxs("summary",{className:"yst-flex yst-items-center yst-justify-between yst-cursor-pointer yst-list-none [&::-webkit-details-marker]:yst-hidden yst-mb-4",children:[c.jsx("h3",{className:"yst-font-semibold",children:"Sentiment Analysis"}),c.jsx(xa,{className:"yst-h-4 yst-w-4 yst-text-gray-400 yst-flex-shrink-0 group-open/sentiment:yst-rotate-180 yst-transition-transform"})]}),c.jsxs("div",{className:"yst-grid yst-grid-cols-1 md:yst-grid-cols-2 yst-gap-4",children:[r&&c.jsx(wp,{title:"Brand sentiment",sentiment:r}),i&&c.jsx(wp,{title:"Competitor sentiment",sentiment:i})]})]})};function vP(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=jv(t))||e){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
51
51
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,a=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var u=n.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{a||n.return==null||n.return()}finally{if(o)throw s}}}}function Ap(t,e){return wP(t)||xP(t,e)||jv(t,e)||bP()}function bP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
52
52
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jv(t,e){if(t){if(typeof t=="string")return Sp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sp(t,e):void 0}}function Sp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function xP(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function wP(t){if(Array.isArray(t))return t}var AP=function(e){var n,r,i=e.items,s=F.useState((n=(r=i[0])===null||r===void 0?void 0:r.id)!==null&&n!==void 0?n:""),a=Ap(s,2),o=a[0],l=a[1],u=F.useRef(new Map),d=F.useState(null),f=Ap(d,2),y=f[0],h=f[1],p=F.useCallback(function(g){var v=u.current.get(g);v&&h({top:v.offsetTop,height:v.offsetHeight})},[]);F.useEffect(function(){if(i.length!==0){var g=new IntersectionObserver(function(C){var b=C.filter(function(L){return L.isIntersecting});if(b.length>0){var w=b.reduce(function(L,D){return L.boundingClientRect.top<D.boundingClientRect.top?L:D}),x=w.target.id;l(x),p(x)}},{rootMargin:"-10% 0px -80% 0px",threshold:0}),v=vP(i),S;try{for(v.s();!(S=v.n()).done;){var k=S.value,j=document.getElementById(k.id);j&&g.observe(j)}}catch(C){v.e(C)}finally{v.f()}return function(){return g.disconnect()}}},[i,p]),F.useEffect(function(){p(o)},[o,p]);var m=function(v){var S=document.getElementById(v);S&&(S.scrollIntoView({behavior:"smooth",block:"start"}),l(v))};return i.length===0?null:c.jsx("nav",{"aria-label":"Table of contents",className:"yst-sticky yst-top-4 yst-overflow-visible",children:c.jsxs("div",{className:"yst-relative yst-flex yst-flex-col",children:[y&&c.jsx("div",{className:"yst-absolute yst-left-0 yst-w-0.5 yst-bg-slate-700 yst-rounded-full",style:{top:y.top,height:y.height,transition:"top 0.3s ease, height 0.3s ease"}}),i.map(function(g){return c.jsx("button",{ref:function(v){u.current.set(g.id,v)},type:"button",onClick:function(){return m(g.id)},className:oe("yst-text-left yst-pl-4 yst-py-1.5 yst-text-sm yst-transition-colors yst-duration-200",o===g.id?"yst-text-slate-700 yst-font-semibold":"yst-text-slate-400 hover:yst-text-slate-500"),children:g.label},g.id)})]})})},SP=function(e){var n=e.queryResult,r=n.mentionedBrands||[],i=n.citations||[],s=n.sentiments||[],a=r.some(function(h){return h.isSelf}),o=s.find(function(h){return h.brands.length>0&&h.brands.every(function(p){return p.isSelf})}),l=s.find(function(h){return h.brands.length>0&&h.brands.every(function(p){return!p.isSelf})}),u=!!(o||l),d=F.useMemo(function(){var h=n.id,p=[{id:"summary-".concat(h),label:"AI Summary"}];return r.length>0&&p.push({id:"brands-".concat(h),label:"Brands (".concat(r.length,")")}),i.length>0&&p.push({id:"citations-".concat(h),label:"Citations (".concat(i.length,")")}),u&&p.push({id:"sentiment-".concat(h),label:"Sentiment Analysis"}),p},[n.id,r.length,i.length,u]),f=o?"".concat(Wu(o.score),"% Brand sentiment"):"No brand sentiment",y=l?"".concat(Wu(l.score),"% Competitor sentiment"):"No competitor sentiment";return c.jsx(A.Card,{className:"yst-mb-6 !yst-overflow-visible",children:c.jsx(A.Card.Content,{children:c.jsxs("details",{className:"yst-group",children:[c.jsxs("summary",{className:"yst-flex yst-items-start yst-cursor-pointer yst-list-none [&::-webkit-details-marker]:yst-hidden",children:[c.jsxs("div",{className:"yst-flex yst-items-start yst-gap-3 yst-flex-1 yst-min-w-0",children:[c.jsx("div",{className:"yst-w-20 yst-flex-shrink-0",children:c.jsx(A.Badge,{className:a?"yst-bg-green-100 yst-text-green-800":"yst-bg-red-100 yst-text-red-800",children:a?"Found":"Not found"})}),c.jsxs("div",{className:"yst-flex-1 yst-min-w-0",children:[c.jsx("span",{className:"yst-text-base yst-font-semibold",children:n.query}),c.jsxs("div",{className:"yst-grid yst-grid-cols-2 md:yst-grid-cols-4 yst-text-sm yst-text-gray-500 yst-mt-2",children:[c.jsxs("span",{className:"yst-flex yst-items-center yst-gap-1.5",children:[c.jsx(Zw,{className:"yst-h-4 yst-w-4"}),r.length," brand",r.length!==1?"s":""]}),c.jsxs("span",{className:"yst-flex yst-items-center yst-gap-1.5",children:[c.jsx(Xw,{className:"yst-h-4 yst-w-4"}),i.length," citation",i.length!==1?"s":""]}),c.jsxs("span",{className:"yst-flex yst-items-center yst-gap-1.5",children:[c.jsx(TA,{className:"yst-h-4 yst-w-4"}),f]}),c.jsxs("span",{className:"yst-flex yst-items-center yst-gap-1.5",children:[c.jsx(LA,{className:"yst-h-4 yst-w-4"}),y]})]})]})]}),c.jsx(xa,{className:"yst-h-5 yst-w-5 yst-text-gray-400 yst-mt-1 yst-ml-4 yst-flex-shrink-0 group-open:yst-rotate-180 yst-transition-transform"})]}),c.jsxs("div",{className:"yst-mt-6 yst-pt-6 yst-border-t yst-flex yst-gap-6",children:[c.jsx("div",{className:"yst-hidden md:yst-block md:yst-w-1/5 md:yst-flex-shrink-0",children:c.jsx(AP,{items:d})}),c.jsxs("div",{className:"yst-flex-1 yst-min-w-0 [&>details:not([open]):not(:last-of-type)]:yst-border-b",children:[c.jsx(X9,{id:"summary-".concat(n.id),response:n.response}),c.jsx(aP,{id:"brands-".concat(n.id),mentionedBrands:r}),c.jsx(mP,{id:"citations-".concat(n.id),citations:i}),c.jsx(gP,{id:"sentiment-".concat(n.id),ownSentiment:o,competitorSentiment:l})]})]})]})})})},CP=function(e){var n=e.brandId,r=e.analysisId,i=e.scanId,s=m0(n,r,i,{query:{enabled:!!n&&!!r&&!!i,select:function(d){var f=d.data;return f}}}),a=s.data,o=s.isLoading;if(o)return c.jsx(Pr,{});var l=(a==null?void 0:a.queryResults)||[];return l.length===0?null:c.jsxs("div",{className:"yst-mt-6",children:[c.jsx(A.Title,{size:"2",className:"yst-mb-4",children:"Queries"}),l.map(function(u){return c.jsx(SP,{queryResult:u},u.id)})]})};function jP(t,e){return TP(t)||OP(t,e)||EP(t,e)||kP()}function kP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
53
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EP(t,e){if(t){if(typeof t=="string")return Cp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cp(t,e):void 0}}function Cp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function OP(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function TP(t){if(Array.isArray(t))return t}var PP=function(){var e=xt(),n=e.brandId,r=e.analysisId,i=e.aiProvider,s=es(),a=s.setAiProvider,o=ft(),l=yi({query:{select:function(R){var G=R.data;return G}}}),u=l.data,d=u==null?void 0:u.data,f=Xo(n,{query:{enabled:!!n,select:function(R){var G=R.data;return G==null?void 0:G.analyses}}}),y=f.data,h=f.isLoading,p=va(n,{query:{enabled:!!n,select:function(R){var G=R.data;return G}}}),m=p.data,g=p.isLoading,v=ga(n,r,{query:{enabled:!!n&&!!r,select:function(R){var G=R.data;return G==null?void 0:G.analysis}}}),S=v.data,k=v.isLoading,j=F.useState(!1),C=jP(j,2),b=C[0],w=C[1];F.useEffect(function(){var _=S==null?void 0:S.id,R=d==null?void 0:d.id;if(!n||!_||!i||!R||(S==null?void 0:S.status)!==yn.completed){w(!1);return}var G=jo(R,n,_,i),Y=window.localStorage.getItem(G)!==null;w(!Y)},[n,S==null?void 0:S.id,S==null?void 0:S.status,i,d==null?void 0:d.id]);var x=function(R){R.preventDefault();var G=S==null?void 0:S.id,Y=d==null?void 0:d.id;if(!(!n||!G||!i||!Y)){var E=jo(Y,n,G,i);window.localStorage.setItem(E,"true"),w(!1)}},L=F.useMemo(function(){var _;return(_=S==null?void 0:S.completedScans)!==null&&_!==void 0?_:[]},[S==null?void 0:S.completedScans]),D=F.useMemo(function(){var _;return(_=L.find(function(R){return String(R.aiProvider)===String(i)}))!==null&&_!==void 0?_:null},[L,i]),M=L.length>0?L.map(function(_){var R;return{value:(R=_.aiProvider)!==null&&R!==void 0?R:"",label:ks(_.aiProvider)}}):[{value:"",label:"AI platform"}];F.useEffect(function(){if(L.length>0){var _=L.map(function(G){return G.aiProvider});if(!i||!_.includes(i)){var R=L[0].aiProvider;R&&a(R)}}},[L,i,a]);var I=g||k||h,z=S&&S.status===yn.completed;if(I)return c.jsx(Pr,{});if(!z)return c.jsxs(A.Card,{children:[c.jsx(er,{title:"Analysis details"}),c.jsx(A.Card.Content,{children:c.jsx("p",{children:"No completed analysis found. Please run an analysis first."})})]});var
|
|
53
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EP(t,e){if(t){if(typeof t=="string")return Cp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cp(t,e):void 0}}function Cp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function OP(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function TP(t){if(Array.isArray(t))return t}var PP=function(){var e=xt(),n=e.brandId,r=e.analysisId,i=e.aiProvider,s=es(),a=s.setAiProvider,o=ft(),l=yi({query:{select:function(R){var G=R.data;return G}}}),u=l.data,d=u==null?void 0:u.data,f=Xo(n,{query:{enabled:!!n,select:function(R){var G=R.data;return G==null?void 0:G.analyses}}}),y=f.data,h=f.isLoading,p=va(n,{query:{enabled:!!n,select:function(R){var G=R.data;return G}}}),m=p.data,g=p.isLoading,v=ga(n,r,{query:{enabled:!!n&&!!r,select:function(R){var G=R.data;return G==null?void 0:G.analysis}}}),S=v.data,k=v.isLoading,j=F.useState(!1),C=jP(j,2),b=C[0],w=C[1];F.useEffect(function(){var _=S==null?void 0:S.id,R=d==null?void 0:d.id;if(!n||!_||!i||!R||(S==null?void 0:S.status)!==yn.completed){w(!1);return}var G=jo(R,n,_,i),Y=window.localStorage.getItem(G)!==null;w(!Y)},[n,S==null?void 0:S.id,S==null?void 0:S.status,i,d==null?void 0:d.id]);var x=function(R){R.preventDefault();var G=S==null?void 0:S.id,Y=d==null?void 0:d.id;if(!(!n||!G||!i||!Y)){var E=jo(Y,n,G,i);window.localStorage.setItem(E,"true"),w(!1)}},L=F.useMemo(function(){var _;return(_=S==null?void 0:S.completedScans)!==null&&_!==void 0?_:[]},[S==null?void 0:S.completedScans]),D=F.useMemo(function(){var _;return(_=L.find(function(R){return String(R.aiProvider)===String(i)}))!==null&&_!==void 0?_:null},[L,i]),M=L.length>0?L.map(function(_){var R;return{value:(R=_.aiProvider)!==null&&R!==void 0?R:"",label:ks(_.aiProvider)}}):[{value:"",label:"AI platform"}];F.useEffect(function(){if(L.length>0){var _=L.map(function(G){return G.aiProvider});if(!i||!_.includes(i)){var R=L[0].aiProvider;R&&a(R)}}},[L,i,a]);var I=g||k||h,z=S&&S.status===yn.completed;if(I)return c.jsx(Pr,{});if(!z)return c.jsxs(A.Card,{children:[c.jsx(er,{title:"Analysis details"}),c.jsx(A.Card.Content,{children:c.jsx("p",{children:"No completed analysis found. Please run an analysis first."})})]});var O=hr(S.completedAt),T=O?_n(O,"yyyy-MM-dd HH:mm:ss"):"Unknown date";return c.jsxs(A.Card,{className:"!yst-overflow-visible",children:[c.jsxs(A.Card.Content,{children:[c.jsxs("div",{className:"yst-mb-6",children:[c.jsx(A.Title,{size:"1",children:"Analysis details"}),c.jsx("p",{className:"yst-mt-1 yst-text-slate-500",children:"Review the query results, citations, and sentiment data for this analysis."})]}),c.jsx(A.Button,{as:an,className:"yst-mb-2",variant:"secondary",to:"/brands/".concat(n,"/analysis/").concat(r),children:"← Back to analysis results"})]}),c.jsx(li,{size:8}),c.jsxs(A.Card.Content,{className:"!yst-mt-0",children:[b&&c.jsx(A.Alert,{className:"yst-mb-4",children:c.jsxs("div",{className:"yst-flex yst-w-full",children:[c.jsx("div",{className:"yst-max-w-xl yst-space-y-4",children:c.jsx("p",{className:"yst-mb-0",children:"Note: These insights are produced using AI and may contain errors."})}),c.jsx("div",{className:"yst-ml-auto",children:c.jsx(A.Link,{onClick:x,variant:"default",children:c.jsx($o,{className:"yst-h-4 yst-w-4"})})})]})}),c.jsxs("p",{className:"!yst-mb-4",children:[c.jsx("span",{className:"yst-text-lg yst-font-bold",children:m==null?void 0:m.name})," ","- Scan performed on:"," ",c.jsx(A.Badge,{children:T})]}),c.jsxs("div",{className:"yst-flex yst-flex-wrap yst-gap-4",children:[c.jsxs("div",{className:"yst-flex-1 yst-min-w-[200px] yst-max-w-xs yst-space-y-2",children:[c.jsx("span",{className:"yst-text-sm yst-font-medium yst-text-slate-600",children:"Analysis date"}),c.jsx(H0,{analyses:y||[],selectedAnalysisId:r,onAnalysisSelect:function(_){o("/brands/".concat(n,"/analysis/").concat(String(_),"/analysis-details"))},isLoading:h,disabled:h||!y||y.length<1,id:"analysis-date"})]}),c.jsxs("div",{className:"yst-flex-1 yst-min-w-[200px] yst-max-w-xs yst-space-y-2",children:[c.jsx("span",{className:"yst-text-sm yst-font-medium yst-text-slate-600",children:"AI platform"}),c.jsx(A.Select,{id:"ai-platform-select",value:i!=null?i:"",options:k?[{value:i!=null?i:"",label:"Loading..."}]:M,onChange:function(_){a(_)},disabled:k||M.length<2})]})]}),(D==null?void 0:D.id)&&c.jsx(CP,{brandId:n,analysisId:r,scanId:D.id})]})]})};const IP=Object.freeze(Object.defineProperty({__proto__:null,default:PP},Symbol.toStringTag,{value:"Module"}));function iu(t,e){return _P(t)||MP(t,e)||NP(t,e)||LP()}function LP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
54
54
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NP(t,e){if(t){if(typeof t=="string")return jp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jp(t,e):void 0}}function jp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function MP(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function _P(t){if(Array.isArray(t))return t}var RP=function(e){var n=e.queryResult,r=F.useState(null),i=iu(r,2),s=i[0],a=i[1],o=F.useState(null),l=iu(o,2),u=l[0],d=l[1],f=F.useState(null),y=iu(f,2),h=y[0],p=y[1],m=F.useRef(null),g=n.response||"No response available",v=F.useMemo(function(){return n.mentionedBrands||[]},[n.mentionedBrands]),S=n.citations||[],k=n.sentiments||[],j=u!==null?u:s,C=F.useMemo(function(){if(j===null)return g;var x=v.find(function(L){return L.id===j});return x?g.replaceAll(x.name,"**".concat(x.name,"**")):g},[g,j,v]),b=function(L){d(u===L?null:L)};F.useEffect(function(){if(m.current&&j!==null){var x=m.current.scrollHeight;(h===null||x>h)&&p(x)}},[j,C,h]);var w=Array.from(new Map(v.map(function(x){return[x.id,x]})).values());return c.jsx(A.Card,{className:"yst-mb-4",children:c.jsx(A.Card.Content,{className:"yst-p-4",children:c.jsxs("details",{className:"yst-group",children:[c.jsxs("summary",{className:"yst-flex yst-items-center yst-justify-between yst-cursor-pointer yst-list-none [&::-webkit-details-marker]:yst-hidden",children:[c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Title,{size:"3",className:"yst-mb-2",children:n.query}),c.jsxs("div",{className:"yst-flex yst-gap-4 yst-text-sm yst-text-gray-600",children:[v.length>0&&c.jsxs("span",{children:[w.length," brand",w.length!==1?"s":""]}),S.length>0&&c.jsxs("span",{children:[S.length," citation",S.length!==1?"s":""]}),k.length>0&&c.jsxs("span",{children:[k.length," sentiment",k.length!==1?"s":""]})]})]}),c.jsx("div",{className:"yst-text-gray-500 group-open:yst-rotate-90 yst-transition-transform",children:"▶"})]}),c.jsxs("div",{className:"yst-mt-6 yst-flex yst-flex-col yst-gap-6",children:[c.jsxs("details",{className:"yst-border-t yst-pt-4",children:[c.jsxs("summary",{className:"yst-flex yst-items-center yst-justify-between yst-cursor-pointer yst-list-none [&::-webkit-details-marker]:yst-hidden yst-font-semibold yst-mb-2",children:[c.jsx("span",{children:"AI Response"}),c.jsx("span",{className:"yst-text-gray-500",children:"▶"})]}),c.jsx("div",{className:"yst-mt-2",children:c.jsx("div",{className:"yst-rounded-lg yst-border yst-border-gray-300 yst-bg-gray-50 yst-p-4",children:c.jsx("div",{ref:m,className:"yst-text-sm yst-text-gray-700 [&_p]:yst-mb-4 [&_ul]:yst-list-disc [&_ul]:yst-ml-6 [&_ul]:yst-mb-4 [&_ol]:yst-list-decimal [&_ol]:yst-ml-6 [&_ol]:yst-mb-4 [&_li]:yst-mb-1 [&_h1]:yst-text-xl [&_h1]:yst-font-bold [&_h1]:yst-mb-2 [&_h2]:yst-text-lg [&_h2]:yst-font-bold [&_h2]:yst-mb-2 [&_h3]:yst-font-bold [&_h3]:yst-mb-2 [&_code]:yst-bg-white [&_code]:yst-px-1 [&_code]:yst-rounded [&_pre]:yst-bg-white [&_pre]:yst-p-3 [&_pre]:yst-rounded [&_pre]:yst-mb-4 [&_pre]:yst-overflow-x-auto [&_p:last-child]:yst-mb-0 [&_ul:last-child]:yst-mb-0 [&_ol:last-child]:yst-mb-0 [&_strong]:yst-bg-yellow-200 [&_strong]:yst-rounded [&_strong]:yst-px-1",style:h!==null?{height:"".concat(h,"px")}:void 0,children:c.jsx(Av,{components:{a:function(L){var D=L.children,M=L.href;return c.jsx("a",{href:M,target:"_blank",rel:"noopener noreferrer",children:D})}},children:C})})})})]}),v.length>0&&c.jsxs("details",{className:"yst-border-t yst-pt-4",children:[c.jsxs("summary",{className:"yst-flex yst-items-center yst-justify-between yst-cursor-pointer yst-list-none [&::-webkit-details-marker]:yst-hidden yst-font-semibold yst-mb-2",children:[c.jsxs("span",{children:["Brands (",w.length,")"]}),c.jsx("span",{className:"yst-text-gray-500",children:"▶"})]}),c.jsxs("div",{className:"yst-mt-2 yst-space-y-4",children:[c.jsxs("div",{children:[c.jsx("p",{className:"yst-mb-2 yst-text-sm yst-font-medium",children:"Mentioned brands:"}),c.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:w.map(function(x){return c.jsx(A.Badge,{variant:x.isSelf?"info":"plain",className:"yst-cursor-pointer yst-transition-colors ".concat(j===x.id?"yst-ring-2 yst-ring-yellow-400":""),onMouseEnter:function(){return a(x.id)},onMouseLeave:function(){return a(null)},onClick:function(){return b(x.id)},children:x.name},x.id)})})]}),c.jsxs("div",{children:[c.jsx("p",{className:"yst-mb-2 yst-text-sm yst-font-medium",children:"Brand ranking:"}),c.jsx("ol",{className:"yst-list-decimal yst-list-inside yst-space-y-3",children:v.sort(function(x,L){return x.rank-L.rank}).map(function(x){return c.jsxs("li",{className:"yst-text-sm",children:[c.jsx(A.Badge,{variant:x.isSelf?"info":"plain",className:"yst-cursor-pointer yst-transition-colors ".concat(j===x.id?"yst-ring-2 yst-ring-yellow-400":""),onMouseEnter:function(){return a(x.id)},onMouseLeave:function(){return a(null)},onClick:function(){return b(x.id)},children:x.name}),c.jsxs("p",{className:"yst-ml-6 yst-mt-1 yst-text-sm yst-text-gray-600 yst-italic",children:['"',x.context,'"']})]},"".concat(x.id,"-").concat(x.rank))})})]})]})]}),S.length>0&&c.jsxs("details",{className:"yst-border-t yst-pt-4",children:[c.jsxs("summary",{className:"yst-flex yst-items-center yst-justify-between yst-cursor-pointer yst-list-none [&::-webkit-details-marker]:yst-hidden yst-font-semibold yst-mb-2",children:[c.jsxs("span",{children:["Citations (",S.length,")"]}),c.jsx("span",{className:"yst-text-gray-500",children:"▶"})]}),c.jsx("div",{className:"yst-mt-2",children:c.jsxs(A.Table,{children:[c.jsx(A.Table.Head,{children:c.jsxs(A.Table.Row,{children:[c.jsx(A.Table.Header,{children:"Rank"}),c.jsx(A.Table.Header,{children:"Domain"}),c.jsx(A.Table.Header,{children:"URL"}),c.jsx(A.Table.Header,{children:"Associated brands"})]})}),c.jsx(A.Table.Body,{children:S.sort(function(x,L){return x.rank-L.rank}).map(function(x,L){return c.jsxs(A.Table.Row,{children:[c.jsxs(A.Table.Cell,{children:["#",x.rank]}),c.jsx(A.Table.Cell,{children:x.rootDomain}),c.jsx(A.Table.Cell,{children:c.jsx(A.Link,{href:x.url,target:"_blank",rel:"noopener noreferrer",children:x.url})}),c.jsx(A.Table.Cell,{children:x.associatedBrands.length>0?c.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-1",children:x.associatedBrands.map(function(D){return c.jsx(A.Badge,{variant:D.isSelf?"info":"plain",className:"yst-cursor-pointer yst-transition-colors ".concat(j===D.id?"yst-ring-2 yst-ring-yellow-400":""),onMouseEnter:function(){return a(D.id)},onMouseLeave:function(){return a(null)},onClick:function(){return b(D.id)},children:D.name},D.id)})}):c.jsx("span",{className:"yst-text-gray-500",children:"None"})})]},"".concat(x.url,"-").concat(L))})})]})})]}),k.length>0&&c.jsxs("details",{className:"yst-border-t yst-pt-4",children:[c.jsxs("summary",{className:"yst-flex yst-items-center yst-justify-between yst-cursor-pointer yst-list-none [&::-webkit-details-marker]:yst-hidden yst-font-semibold yst-mb-2",children:[c.jsxs("span",{children:["Sentiment Analysis (",k.length,")"]}),c.jsx("span",{className:"yst-text-gray-500",children:"▶"})]}),c.jsx("div",{className:"yst-mt-2 yst-flex yst-flex-col yst-gap-4",children:k.map(function(x){return c.jsxs("div",{className:"yst-rounded-lg yst-border yst-border-gray-300 yst-p-4",children:[c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-3 yst-mb-3",children:[c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-2",children:[c.jsx("span",{className:"yst-text-sm yst-font-semibold",children:"Score:"}),c.jsx(A.Badge,{variant:x.score>.3?"success":x.score<-.3?"error":"plain",children:x.score.toFixed(2)})]}),c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-2",children:[c.jsx("span",{className:"yst-text-sm yst-font-semibold",children:"Confidence:"}),c.jsxs(A.Badge,{variant:"plain",children:[(x.confidence*100).toFixed(0),"%"]})]})]}),x.brands.length>0&&c.jsxs("div",{className:"yst-mb-3",children:[c.jsx("span",{className:"yst-text-sm yst-font-semibold yst-mb-1 yst-block",children:"Brands:"}),c.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-1",children:x.brands.map(function(L){return c.jsx(A.Badge,{variant:L.isSelf?"info":"plain",className:"yst-cursor-pointer yst-transition-colors ".concat(j===L.id?"yst-ring-2 yst-ring-yellow-400":""),onMouseEnter:function(){return a(L.id)},onMouseLeave:function(){return a(null)},onClick:function(){return b(L.id)},children:L.name},L.id)})})]}),x.keywords.length>0&&c.jsxs("div",{children:[c.jsx("span",{className:"yst-text-sm yst-font-semibold yst-mb-1 yst-block",children:"Keywords:"}),c.jsx("div",{className:"yst-flex yst-flex-wrap yst-gap-2",children:x.keywords.map(function(L,D){return c.jsxs("div",{className:"yst-flex yst-items-center yst-gap-1 yst-rounded yst-bg-gray-100 yst-px-2 yst-py-1",children:[c.jsx("span",{className:"yst-text-sm",children:L.keyword}),c.jsx(A.Badge,{variant:L.isPositive?"success":L.isNegative?"error":"plain",children:L.sentiment.toFixed(2)})]},D)})})]})]},x.id)})})]}),n.rawResponse&&c.jsxs("details",{className:"yst-border-t yst-pt-4",children:[c.jsxs("summary",{className:"yst-flex yst-items-center yst-justify-between yst-cursor-pointer yst-list-none [&::-webkit-details-marker]:yst-hidden yst-font-semibold yst-mb-2",children:[c.jsx("span",{children:"Raw Response"}),c.jsx("span",{className:"yst-text-gray-500",children:"▶"})]}),c.jsx("div",{className:"yst-mt-2",children:c.jsx("pre",{className:"yst-rounded-lg yst-border yst-border-gray-300 yst-bg-gray-50 yst-p-4 yst-text-xs yst-overflow-x-auto yst-max-h-96 yst-overflow-y-auto",children:JSON.stringify(n.rawResponse,null,2)})})]})]})]})})})},DP=function(){var e=xt(),n=e.brandId,r=e.analysisId,i=va(n,{query:{enabled:!!n,select:function(h){var p=h.data;return p}}}),s=i.data,a=i.isLoading,o=ga(n,r,{query:{enabled:!!n&&!!r,select:function(h){var p=h.data;return p==null?void 0:p.analysis}}}),l=o.data,u=o.isLoading,d=a||u,f=l&&l.status===yn.completed;return d?c.jsx(Pr,{}):f?c.jsxs(A.Card,{children:[c.jsx(er,{title:"Scan details",children:c.jsx(A.Button,{as:an,variant:"secondary",to:"/brands/".concat(n,"/analysis/").concat(r),children:"Back to analysis results"})}),l.completedScans.map(function(y){return c.jsx(BP,{brandId:n,analysisId:r,scanId:y.id,provider:y.aiProvider?String(y.aiProvider):"Unknown",scanFinishedAt:y.finishedAt,brandName:s==null?void 0:s.name},y.id)})]}):c.jsxs(A.Card,{children:[c.jsx(er,{title:"Scan details"}),c.jsx(A.Card.Content,{children:c.jsx("p",{children:"No completed analysis found. Please run an analysis first."})})]})},BP=function(e){var n=e.brandId,r=e.analysisId,i=e.scanId,s=e.provider,a=e.scanFinishedAt,o=e.brandName,l=m0(n,r,i,{query:{enabled:!!n&&!!r&&!!i,select:function(h){var p=h.data;return p}}}),u=l.data,d=l.isLoading;if(d)return c.jsx(Pr,{});var f=(u==null?void 0:u.queryResults)||[];return f.length===0?null:c.jsx(A.Card,{className:"yst-mb-4",children:c.jsxs(A.Card.Content,{children:[c.jsxs("p",{className:"yst-mb-8",children:[o," - Scan performed on:"," ",c.jsx(A.Badge,{children:a?_n(new Date(a),"yyyy-MM-dd HH:mm:ss"):"In progress"})," ","- AI Platform:"," ",c.jsx(A.Badge,{className:"yst-bg-green-100 yst-text-green-800",children:s})]}),f.map(function(y){return c.jsx(RP,{queryResult:y},y.id)})]})},i)};const FP=Object.freeze(Object.defineProperty({__proto__:null,default:DP},Symbol.toStringTag,{value:"Module"}));function zP(t,e){return WP(t)||qP(t,e)||HP(t,e)||UP()}function UP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
55
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HP(t,e){if(t){if(typeof t=="string")return kp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kp(t,e):void 0}}function kp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qP(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function WP(t){if(Array.isArray(t))return t}var GP=function(e){var n=e.isOpen,r=e.onClose,i=It(),s=Zo(),a=F.useState(""),o=zP(a,2),l=o[0],u=o[1],d=Bw({mutation:{onSettled:function(){i.clear()},onSuccess:function(){r(),s("Successfully deleted all data.",{variant:"success"})},onError:function(){i.clear(),s("Failed to delete all data. Please try again later.",{variant:"error"})}}}),f=d.mutate,y=d.isPending;return F.useEffect(function(){n&&u("")},[n]),c.jsx(nl,{isOpen:n,onClose:r,onConfirm:function(){f()},isLoading:y,disabled:l!=="DELETE ALL",title:"Delete all data?",description:c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"This will permanently erase all brands, analysis results, and queries from your account."}),c.jsx("p",{children:"This action cannot be undone."}),c.jsx(A.TextField,{id:"delete-all-confirmation",label:"To confirm, please type DELETE ALL:",value:l,onChange:function(h){return u(h.target.value)}}),c.jsx("p",{children:c.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete all data",cancelText:"No, go back"})};function Ac(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Ht(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(
|
|
56
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KP(t,e){if(t){if(typeof t=="string")return Op(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Op(t,e):void 0}}function Op(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function XP(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function JP(t){if(Array.isArray(t))return t}var ZP=function(e){var n=e.isOpen,r=e.brandId,i=e.onClose,s=e.brandName,a=It(),o=Zo(),l=F.useState(""),u=YP(l,2),d=u[0],f=u[1],y=xw({mutation:{onSuccess:function(){var m=QP(Ac().m(function v(){return Ac().w(function(S){for(;;)switch(S.n){case 0:return S.n=1,Promise.all([a.invalidateQueries({queryKey:pn()}),a.invalidateQueries({queryKey:ba()})]);case 1:o("Brand deleted successfully",{variant:"success"}),i();case 2:return S.a(2)}},v)}));function g(){return m.apply(this,arguments)}return g}(),onError:function(g){var v=g instanceof Error?g.message:"Please try again later.";o("Failed to delete brand. ".concat(v),{variant:"error"})}}}),h=y.mutate,p=y.isPending;return F.useEffect(function(){n&&f("")},[n]),c.jsx(nl,{isOpen:n,onClose:i,onConfirm:function(){if(!s){console.error("Brand name is required for deletion confirmation");return}h({brandId:r})},isLoading:p,disabled:d.toLowerCase()!==(s==null?void 0:s.toLowerCase()),title:"Delete brand?",description:c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"This will permanently delete all data associated with this brand, including past analyses and query history."}),c.jsx("p",{children:"This action cannot be undone."}),c.jsx(A.TextField,{id:"delete-modal-brand-name-confirmation",label:"To confirm, please type your brand name ".concat(s,":"),value:d,onChange:function(m){return f(m.target.value)}}),c.jsx("p",{children:c.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete brand",cancelText:"No, go back"})};function aa(t){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(t)}function Ls(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return qt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iI(t,e){if(t){if(typeof t=="string")return Lp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lp(t,e):void 0}}function Lp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function sI(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function aI(t){if(Array.isArray(t))return t}var oI=function(e){var n,r,i=e.brand,s=e.isLast,a=e.onDelete,o=i.id,l=xt(),u=l.hostAppProps,d=l.analysisId,f=u.onAddSubscription,y=ft(),h=es(),p=h.setBrandId,m=F.useState(!1),g=nI(m,2),v=g[0],S=g[1],k=It(),j=yi({query:{select:function(
|
|
58
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uI(t,e){if(t){if(typeof t=="string")return Rp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rp(t,e):void 0}}function Rp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function cI(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function dI(t){if(Array.isArray(t))return t}function xd(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Dp=Ir(Np||(Np=xd(["xl:yst-w-1/3"]))),Bp=Ir(Mp||(Mp=xd(["xl:yst-w-2/3"]))),Fp=Ir(_p||(_p=xd(["yst-flex yst-flex-col yst-gap-8 xl:yst-flex-row"]))),fI=function(){var e,n,r,i,s=F.useState(!1),a=su(s,2),o=a[0],l=a[1],u=F.useState(!1),d=su(u,2),f=d[0],y=d[1],h=F.useState(null),p=su(h,2),m=p[0],g=p[1],v=yi({query:{select:function(w){var x=w.data;return x}}}),S=v.data,k=hi({query:{select:function(w){var x=w.data;return x==null?void 0:x.brands},staleTime:5*1e3,refetchOnWindowFocus:!0,refetchInterval:30*1e3}}),j=k.data,C=j==null?void 0:j.find(function(b){return b.id===m});return c.jsxs("form",{children:[c.jsxs(A.Card,{children:[c.jsx(er,{title:"Settings",description:"Manage your brand settings and data. You can update analysis preferences or delete brands from your account."}),c.jsxs(A.Card.Content,{children:[c.jsxs(Fp,{children:[c.jsxs(Dp,{className:"yst-space-y-2",children:[c.jsx(A.Title,{size:"4",children:"Brands"}),c.jsxs("p",{children:["You have"," ",c.jsxs("b",{className:"yst-font-semibold yst-text-slate-800",children:[(e=S==null?void 0:S.activeSubscriptions)!==null&&e!==void 0?e:"—"," subscription(s)"]}),". This gives you up to"," ",c.jsxs("b",{className:"yst-font-semibold yst-text-slate-800",children:[(n=S==null?void 0:S.maxNumberOfActiveBrands)!==null&&n!==void 0?n:"—"," active brand(s)"]}),", for which we’ll automatically run a weekly analysis."]}),c.jsx("p",{children:"You can activate or deactivate brands anytime, or permanently delete a brand and all its data."})]}),c.jsxs(Bp,{children:[j&&c.jsxs("p",{className:"yst-flex yst-w-full yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-2 yst-border-b-[1px] yst-border-b-slate-200 yst-py-4 yst-font-medium yst-text-slate-800",children:["Active brands: ",(r=S==null?void 0:S.numberOfActiveBrands)!==null&&r!==void 0?r:"—"," of"," ",(i=S==null?void 0:S.maxNumberOfActiveBrands)!==null&&i!==void 0?i:"—"]}),j&&j.length===0&&c.jsxs("p",{className:"yst-mt-4 yst-text-slate-500",children:["No brands found. Please"," ",c.jsx(A.Link,{as:an,to:"/setup",children:"add a brand"})," ","to start analyzing."]}),(j!=null?j:[{id:"loading",name:"Loading..."}]).map(function(b,w,x){return c.jsx(oI,{brand:b,isLast:w===x.length-1,onDelete:function(L){g(L),l(!0)}},b.id)})]})]}),c.jsx(li,{}),c.jsxs(Fp,{children:[c.jsxs(Dp,{className:"yst-space-y-2",children:[c.jsx(A.Title,{size:"4",children:"Delete all data"}),c.jsx("p",{children:"Permanently delete all brands, analysis results, and query history from your account."})]}),c.jsxs(Bp,{className:"yst-space-y-4",children:[c.jsxs(A.Button,{variant:"error",onClick:function(){y(!0)},disabled:(j==null?void 0:j.length)===0,children:[c.jsx(zc,{})," Delete all data"]}),c.jsx("p",{children:c.jsxs("i",{children:[c.jsx("b",{children:"Note:"})," This will erase everything and cannot be reversed."]})})]})]})]})]}),c.jsx(ZP,{isOpen:o,onClose:function(){l(!1),g(null)},brandId:m||"",brandName:C==null?void 0:C.name}),c.jsx(GP,{isOpen:f,onClose:function(){y(!1)}})]})};const hI=Object.freeze(Object.defineProperty({__proto__:null,default:fI},Symbol.toStringTag,{value:"Module"}));function Do(t){"@babel/helpers - typeof";return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Do(t)}var Sc=[{path:"/setup",id:1,title:"Brand & location info",description:"Enter a few basic details about your brand so we can generate relevant queries people might use in AI platforms like ChatGPT and Perplexity. This helps us analyze how visible your brand is in their responses."},{path:"/setup/:brandId/queries",id:2,title:"Queries",description:"Review the queries we've generated from your brand info. These are phrases people might type into AI platforms that could trigger your brand to appear."},{path:"/setup/:brandId/analysis",id:3,title:"Analysis",description:"We're checking how your brand shows up in AI. Your queries will now be tested in ChatGPT, Perplexity and Gemini. This process should take around 5 minutes."}],yI=function(e){return Sc.find(function(n){return!!qi(n.path,e)})||Sc[0]};function pI(){var t=bt(),e=yI(t.pathname);return c.jsxs(A.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[c.jsx(Bg,{title:c.jsx(kv,{currentStep:e,steps:Sc}),description:e.description}),c.jsx(A.Paper.Content,{children:c.jsx(Wi,{})})]})}var kv=function(e){var n=e.title,r=e.currentStep,i=e.steps;return c.jsxs("span",{className:"yst-inline-flex yst-flex-row yst-gap-4",children:[c.jsxs("span",{className:"yst-tracking-[.2em] yst-text-slate-400",children:[c.jsx("span",{className:"yst-text-slate-900",children:Do(r)==="object"?r.id:r}),"/",Array.isArray(i)?i.length:i]}),c.jsx("span",{children:Do(r)==="object"?r.title:n||"Step ".concat(r)})]})};const mI=Object.freeze(Object.defineProperty({__proto__:null,SetupPaperTitle:kv,default:pI},Symbol.toStringTag,{value:"Module"}));var Ev=function(e){var n=e.onBack,r=e.variant,i=r===void 0?"ai":r,s=e.buttonText,a=e.onButtonClick,o=e.isButtonDisabled,l=o===void 0?!1:o,u=e.isLoading,d=u===void 0?!1:u;return c.jsx(Hc,{nestedInPaperContent:!0,children:c.jsxs("div",{className:oe({"yst-flex yst-flex-1 yst-flex-col yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-between":n}),children:[n&&c.jsx(A.Button,{variant:"tertiary",onClick:n,className:"yst-no-underline",children:"← Back"}),c.jsx("div",{className:oe("yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-end"),children:c.jsxs(A.Button,{onClick:a,variant:i==="ai"?"primary":i,style:i==="ai"?{background:"linear-gradient(102deg, #A61E69 0%, #6366F1 100%)",color:"#fff"}:{},disabled:l,type:"submit",isLoading:d,children:[i==="ai"&&c.jsx(EA,{}),s]})})]})})},gI=[{value:"US",label:"United States"},{value:"GB",label:"United Kingdom"},{value:"CA",label:"Canada"},{value:"AU",label:"Australia"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"NL",label:"Netherlands"}],vI=[{value:"AF",label:"Afghanistan"},{value:"AX",label:"Åland Islands"},{value:"AL",label:"Albania"},{value:"DZ",label:"Algeria"},{value:"AS",label:"American Samoa"},{value:"AD",label:"Andorra"},{value:"AO",label:"Angola"},{value:"AI",label:"Anguilla"},{value:"AQ",label:"Antarctica"},{value:"AG",label:"Antigua and Barbuda"},{value:"AR",label:"Argentina"},{value:"AM",label:"Armenia"},{value:"AW",label:"Aruba"},{value:"AT",label:"Austria"},{value:"AZ",label:"Azerbaijan"},{value:"BS",label:"Bahamas"},{value:"BH",label:"Bahrain"},{value:"BD",label:"Bangladesh"},{value:"BB",label:"Barbados"},{value:"BY",label:"Belarus"},{value:"BE",label:"Belgium"},{value:"PW",label:"Belau"},{value:"BZ",label:"Belize"},{value:"BJ",label:"Benin"},{value:"BM",label:"Bermuda"},{value:"BT",label:"Bhutan"},{value:"BO",label:"Bolivia"},{value:"BQ",label:"Bonaire, Saint Eustatius and Saba"},{value:"BA",label:"Bosnia and Herzegovina"},{value:"BW",label:"Botswana"},{value:"BV",label:"Bouvet Island"},{value:"BR",label:"Brazil"},{value:"IO",label:"British Indian Ocean Territory"},{value:"BN",label:"Brunei"},{value:"BG",label:"Bulgaria"},{value:"BF",label:"Burkina Faso"},{value:"BI",label:"Burundi"},{value:"KH",label:"Cambodia"},{value:"CM",label:"Cameroon"},{value:"CV",label:"Cape Verde"},{value:"KY",label:"Cayman Islands"},{value:"CF",label:"Central African Republic"},{value:"TD",label:"Chad"},{value:"CL",label:"Chile"},{value:"CN",label:"China"},{value:"CX",label:"Christmas Island"},{value:"CC",label:"Cocos (Keeling) Islands"},{value:"CO",label:"Colombia"},{value:"KM",label:"Comoros"},{value:"CG",label:"Congo (Brazzaville)"},{value:"CD",label:"Congo (Kinshasa)"},{value:"CK",label:"Cook Islands"},{value:"CR",label:"Costa Rica"},{value:"HR",label:"Croatia"},{value:"CU",label:"Cuba"},{value:"CW",label:"Curaçao"},{value:"CY",label:"Cyprus"},{value:"CZ",label:"Czech Republic"},{value:"DK",label:"Denmark"},{value:"DJ",label:"Djibouti"},{value:"DM",label:"Dominica"},{value:"DO",label:"Dominican Republic"},{value:"EC",label:"Ecuador"},{value:"EG",label:"Egypt"},{value:"SV",label:"El Salvador"},{value:"GQ",label:"Equatorial Guinea"},{value:"ER",label:"Eritrea"},{value:"EE",label:"Estonia"},{value:"ET",label:"Ethiopia"},{value:"FK",label:"Falkland Islands"},{value:"FO",label:"Faroe Islands"},{value:"FJ",label:"Fiji"},{value:"FI",label:"Finland"},{value:"GF",label:"French Guiana"},{value:"PF",label:"French Polynesia"},{value:"TF",label:"French Southern Territories"},{value:"GA",label:"Gabon"},{value:"GM",label:"Gambia"},{value:"GE",label:"Georgia"},{value:"GH",label:"Ghana"},{value:"GI",label:"Gibraltar"},{value:"GR",label:"Greece"},{value:"GL",label:"Greenland"},{value:"GD",label:"Grenada"},{value:"GP",label:"Guadeloupe"},{value:"GU",label:"Guam"},{value:"GT",label:"Guatemala"},{value:"GG",label:"Guernsey"},{value:"GN",label:"Guinea"},{value:"GW",label:"Guinea-Bissau"},{value:"GY",label:"Guyana"},{value:"HT",label:"Haiti"},{value:"HM",label:"Heard Island and McDonald Islands"},{value:"HN",label:"Honduras"},{value:"HK",label:"Hong Kong"},{value:"HU",label:"Hungary"},{value:"IS",label:"Iceland"},{value:"IN",label:"India"},{value:"ID",label:"Indonesia"},{value:"IR",label:"Iran"},{value:"IQ",label:"Iraq"},{value:"IE",label:"Ireland"},{value:"IM",label:"Isle of Man"},{value:"IL",label:"Israel"},{value:"IT",label:"Italy"},{value:"CI",label:"Ivory Coast"},{value:"JM",label:"Jamaica"},{value:"JP",label:"Japan"},{value:"JE",label:"Jersey"},{value:"JO",label:"Jordan"},{value:"KZ",label:"Kazakhstan"},{value:"KE",label:"Kenya"},{value:"KI",label:"Kiribati"},{value:"XK",label:"Kosovo"},{value:"KW",label:"Kuwait"},{value:"KG",label:"Kyrgyzstan"},{value:"LA",label:"Laos"},{value:"LV",label:"Latvia"},{value:"LB",label:"Lebanon"},{value:"LS",label:"Lesotho"},{value:"LR",label:"Liberia"},{value:"LY",label:"Libya"},{value:"LI",label:"Liechtenstein"},{value:"LT",label:"Lithuania"},{value:"LU",label:"Luxembourg"},{value:"MO",label:"Macao"},{value:"MK",label:"North Macedonia"},{value:"MG",label:"Madagascar"},{value:"MW",label:"Malawi"},{value:"MY",label:"Malaysia"},{value:"MV",label:"Maldives"},{value:"ML",label:"Mali"},{value:"MT",label:"Malta"},{value:"MH",label:"Marshall Islands"},{value:"MQ",label:"Martinique"},{value:"MR",label:"Mauritania"},{value:"MU",label:"Mauritius"},{value:"YT",label:"Mayotte"},{value:"MX",label:"Mexico"},{value:"FM",label:"Micronesia"},{value:"MD",label:"Moldova"},{value:"MC",label:"Monaco"},{value:"MN",label:"Mongolia"},{value:"ME",label:"Montenegro"},{value:"MS",label:"Montserrat"},{value:"MA",label:"Morocco"},{value:"MZ",label:"Mozambique"},{value:"MM",label:"Myanmar"},{value:"NA",label:"Namibia"},{value:"NR",label:"Nauru"},{value:"NP",label:"Nepal"},{value:"NC",label:"New Caledonia"},{value:"NZ",label:"New Zealand"},{value:"NI",label:"Nicaragua"},{value:"NE",label:"Niger"},{value:"NG",label:"Nigeria"},{value:"NU",label:"Niue"},{value:"NF",label:"Norfolk Island"},{value:"MP",label:"Northern Mariana Islands"},{value:"KP",label:"North Korea"},{value:"NO",label:"Norway"},{value:"OM",label:"Oman"},{value:"PK",label:"Pakistan"},{value:"PS",label:"Palestinian Territory"},{value:"PA",label:"Panama"},{value:"PG",label:"Papua New Guinea"},{value:"PY",label:"Paraguay"},{value:"PE",label:"Peru"},{value:"PH",label:"Philippines"},{value:"PN",label:"Pitcairn"},{value:"PL",label:"Poland"},{value:"PT",label:"Portugal"},{value:"PR",label:"Puerto Rico"},{value:"QA",label:"Qatar"},{value:"RE",label:"Reunion"},{value:"RO",label:"Romania"},{value:"RU",label:"Russia"},{value:"RW",label:"Rwanda"},{value:"BL",label:"Saint Barthélemy"},{value:"SH",label:"Saint Helena"},{value:"KN",label:"Saint Kitts and Nevis"},{value:"LC",label:"Saint Lucia"},{value:"MF",label:"Saint Martin (French part)"},{value:"SX",label:"Saint Martin (Dutch part)"},{value:"PM",label:"Saint Pierre and Miquelon"},{value:"VC",label:"Saint Vincent and the Grenadines"},{value:"SM",label:"San Marino"},{value:"ST",label:"São Tomé and Príncipe"},{value:"SA",label:"Saudi Arabia"},{value:"SN",label:"Senegal"},{value:"RS",label:"Serbia"},{value:"SC",label:"Seychelles"},{value:"SL",label:"Sierra Leone"},{value:"SG",label:"Singapore"},{value:"SK",label:"Slovakia"},{value:"SI",label:"Slovenia"},{value:"SB",label:"Solomon Islands"},{value:"SO",label:"Somalia"},{value:"ZA",label:"South Africa"},{value:"GS",label:"South Georgia/Sandwich Islands"},{value:"KR",label:"South Korea"},{value:"SS",label:"South Sudan"},{value:"ES",label:"Spain"},{value:"LK",label:"Sri Lanka"},{value:"SD",label:"Sudan"},{value:"SR",label:"Suriname"},{value:"SJ",label:"Svalbard and Jan Mayen"},{value:"SZ",label:"Eswatini"},{value:"SE",label:"Sweden"},{value:"CH",label:"Switzerland"},{value:"SY",label:"Syria"},{value:"TW",label:"Taiwan"},{value:"TJ",label:"Tajikistan"},{value:"TZ",label:"Tanzania"},{value:"TH",label:"Thailand"},{value:"TL",label:"Timor-Leste"},{value:"TG",label:"Togo"},{value:"TK",label:"Tokelau"},{value:"TO",label:"Tonga"},{value:"TT",label:"Trinidad and Tobago"},{value:"TN",label:"Tunisia"},{value:"TR",label:"Turkey"},{value:"TM",label:"Turkmenistan"},{value:"TC",label:"Turks and Caicos Islands"},{value:"TV",label:"Tuvalu"},{value:"UG",label:"Uganda"},{value:"UA",label:"Ukraine"},{value:"AE",label:"United Arab Emirates"},{value:"UM",label:"United States (US) Minor Outlying Islands"},{value:"UY",label:"Uruguay"},{value:"UZ",label:"Uzbekistan"},{value:"VU",label:"Vanuatu"},{value:"VA",label:"Vatican"},{value:"VE",label:"Venezuela"},{value:"VN",label:"Vietnam"},{value:"VG",label:"Virgin Islands (British)"},{value:"VI",label:"Virgin Islands (US)"},{value:"WF",label:"Wallis and Futuna"},{value:"EH",label:"Western Sahara"},{value:"WS",label:"Samoa"},{value:"YE",label:"Yemen"},{value:"ZM",label:"Zambia"},{value:"ZW",label:"Zimbabwe"}],au=[].concat(gI,vI,[{value:"OTHER",label:"Other"}]),bI=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"zh-Hans",label:"Chinese (Simplified)"},{value:"ja",label:"Japanese"}],xI=[{value:"af",label:"Afrikaans"},{value:"sq",label:"Albanian"},{value:"am",label:"Amharic"},{value:"ar",label:"Arabic"},{value:"hy",label:"Armenian"},{value:"az",label:"Azerbaijani"},{value:"be",label:"Belarusian"},{value:"bn",label:"Bengali"},{value:"bs",label:"Bosnian"},{value:"bg",label:"Bulgarian"},{value:"my",label:"Burmese"},{value:"yue",label:"Cantonese"},{value:"ca",label:"Catalan"},{value:"zh-Hant",label:"Chinese (Traditional)"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"et",label:"Estonian"},{value:"fil",label:"Filipino"},{value:"fi",label:"Finnish"},{value:"ka",label:"Georgian"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"ht",label:"Haitian Creole"},{value:"he",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"is",label:"Icelandic"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"km",label:"Khmer"},{value:"ko",label:"Korean"},{value:"ku",label:"Kurdish (Kurmanji)"},{value:"ckb",label:"Kurdish (Sorani)"},{value:"ky",label:"Kyrgyz"},{value:"lv",label:"Latvian"},{value:"lt",label:"Lithuanian"},{value:"mk",label:"Macedonian"},{value:"ms",label:"Malay"},{value:"ml",label:"Malayalam"},{value:"mr",label:"Marathi"},{value:"mn",label:"Mongolian"},{value:"ne",label:"Nepali"},{value:"no",label:"Norwegian"},{value:"ps",label:"Pashto"},{value:"fa",label:"Persian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"si",label:"Sinhala"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"so",label:"Somali"},{value:"sw",label:"Swahili"},{value:"sv",label:"Swedish"},{value:"tg",label:"Tajik"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"ur",label:"Urdu"},{value:"uz",label:"Uzbek"},{value:"vi",label:"Vietnamese"},{value:"xh",label:"Xhosa"},{value:"zu",label:"Zulu"}],wI=[].concat(bI,xI);function Or(t){"@babel/helpers - typeof";return Or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Or(t)}function zp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Up(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zp(Object(n),!0).forEach(function(r){Ov(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ov(t,e,n){return(e=AI(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function AI(t){var e=SI(t,"string");return Or(e)=="symbol"?e:e+""}function SI(t,e){if(Or(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Or(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Cc(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Wt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(O,_){return b=O,w=0,x=t,I.n=_,a}};function z(P,O){for(w=P,x=O,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];P>3?(_=Y===O)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=P<2&&G<R[1])?(w=0,I.v=O,I.n=R[1]):G<Y&&(_=P<3||R[0]>O||O>Y)&&(R[4]=P,R[5]=O,I.n=Y,w=0))}if(_||P>1)return a;throw M=!0,O}return function(P,O,_){if(L>1)throw TypeError("Generator is already running");for(M&&O===1&&z(O,_),w=O,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(P="next"),e=b[P]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+P+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Wt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Wt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Wt(f,"constructor",u),Wt(u,"constructor",l),l.displayName="GeneratorFunction",Wt(u,i,"GeneratorFunction"),Wt(f),Wt(f,i,"Generator"),Wt(f,r,function(){return this}),Wt(f,"toString",function(){return"[object Generator]"}),(Cc=function(){return{w:s,m:y}})()}function Wt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Wt=function(a,o,l,u){function d(f,y){Wt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Wt(t,e,n,r)}function Hp(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function CI(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){Hp(s,r,i,a,o,"next",l)}function o(l){Hp(s,r,i,a,o,"throw",l)}a(void 0)})}}function Ai(t,e){return OI(t)||EI(t,e)||kI(t,e)||jI()}function jI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
59
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kI(t,e){if(t){if(typeof t=="string")return qp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qp(t,e):void 0}}function qp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function EI(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function OI(t){if(Array.isArray(t))return t}var TI=function(){var e=ft(),n=es(),r=It(),i=F.useState(),s=Ai(i,2),a=s[0],o=s[1],l=F.useState(!1),u=Ai(l,2),d=u[0],f=u[1],y=F.useState({name:"",url:"",description:"",language:"en",isLocal:!1,country:void 0,region:""}),h=Ai(y,2),p=h[0],m=h[1],g=F.useState(null),v=Ai(g,2),S=v[0],k=v[1],j=F.useState(""),C=Ai(j,2),b=C[0],w=C[1],x=F.useMemo(function(){var H;if(!p.country)return"";var
|
|
55
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HP(t,e){if(t){if(typeof t=="string")return kp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kp(t,e):void 0}}function kp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qP(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function WP(t){if(Array.isArray(t))return t}var GP=function(e){var n=e.isOpen,r=e.onClose,i=It(),s=Zo(),a=F.useState(""),o=zP(a,2),l=o[0],u=o[1],d=Bw({mutation:{onSettled:function(){i.clear()},onSuccess:function(){r(),s("Successfully deleted all data.",{variant:"success"})},onError:function(){i.clear(),s("Failed to delete all data. Please try again later.",{variant:"error"})}}}),f=d.mutate,y=d.isPending;return F.useEffect(function(){n&&u("")},[n]),c.jsx(nl,{isOpen:n,onClose:r,onConfirm:function(){f()},isLoading:y,disabled:l!=="DELETE ALL",title:"Delete all data?",description:c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"This will permanently erase all brands, analysis results, and queries from your account."}),c.jsx("p",{children:"This action cannot be undone."}),c.jsx(A.TextField,{id:"delete-all-confirmation",label:"To confirm, please type DELETE ALL:",value:l,onChange:function(h){return u(h.target.value)}}),c.jsx("p",{children:c.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete all data",cancelText:"No, go back"})};function Ac(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Ht(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Ht(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Ht(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Ht(f,"constructor",u),Ht(u,"constructor",l),l.displayName="GeneratorFunction",Ht(u,i,"GeneratorFunction"),Ht(f),Ht(f,i,"Generator"),Ht(f,r,function(){return this}),Ht(f,"toString",function(){return"[object Generator]"}),(Ac=function(){return{w:s,m:y}})()}function Ht(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Ht=function(a,o,l,u){function d(f,y){Ht(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Ht(t,e,n,r)}function Ep(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function QP(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){Ep(s,r,i,a,o,"next",l)}function o(l){Ep(s,r,i,a,o,"throw",l)}a(void 0)})}}function YP(t,e){return JP(t)||XP(t,e)||KP(t,e)||VP()}function VP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
56
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KP(t,e){if(t){if(typeof t=="string")return Op(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Op(t,e):void 0}}function Op(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function XP(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function JP(t){if(Array.isArray(t))return t}var ZP=function(e){var n=e.isOpen,r=e.brandId,i=e.onClose,s=e.brandName,a=It(),o=Zo(),l=F.useState(""),u=YP(l,2),d=u[0],f=u[1],y=xw({mutation:{onSuccess:function(){var m=QP(Ac().m(function v(){return Ac().w(function(S){for(;;)switch(S.n){case 0:return S.n=1,Promise.all([a.invalidateQueries({queryKey:pn()}),a.invalidateQueries({queryKey:ba()})]);case 1:o("Brand deleted successfully",{variant:"success"}),i();case 2:return S.a(2)}},v)}));function g(){return m.apply(this,arguments)}return g}(),onError:function(g){var v=g instanceof Error?g.message:"Please try again later.";o("Failed to delete brand. ".concat(v),{variant:"error"})}}}),h=y.mutate,p=y.isPending;return F.useEffect(function(){n&&f("")},[n]),c.jsx(nl,{isOpen:n,onClose:i,onConfirm:function(){if(!s){console.error("Brand name is required for deletion confirmation");return}h({brandId:r})},isLoading:p,disabled:d.toLowerCase()!==(s==null?void 0:s.toLowerCase()),title:"Delete brand?",description:c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"This will permanently delete all data associated with this brand, including past analyses and query history."}),c.jsx("p",{children:"This action cannot be undone."}),c.jsx(A.TextField,{id:"delete-modal-brand-name-confirmation",label:"To confirm, please type your brand name ".concat(s,":"),value:d,onChange:function(m){return f(m.target.value)}}),c.jsx("p",{children:c.jsx("em",{children:"This is to make sure you understand this action is permanent."})})]}),confirmText:"Yes, delete brand",cancelText:"No, go back"})};function aa(t){"@babel/helpers - typeof";return aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},aa(t)}function Ls(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return qt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(qt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,qt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,qt(f,"constructor",u),qt(u,"constructor",l),l.displayName="GeneratorFunction",qt(u,i,"GeneratorFunction"),qt(f),qt(f,i,"Generator"),qt(f,r,function(){return this}),qt(f,"toString",function(){return"[object Generator]"}),(Ls=function(){return{w:s,m:y}})()}function qt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}qt=function(a,o,l,u){function d(f,y){qt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},qt(t,e,n,r)}function Tp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function cr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Tp(Object(n),!0).forEach(function(r){$P(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Tp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function $P(t,e,n){return(e=eI(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function eI(t){var e=tI(t,"string");return aa(e)=="symbol"?e:e+""}function tI(t,e){if(aa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(aa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pp(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function Ip(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){Pp(s,r,i,a,o,"next",l)}function o(l){Pp(s,r,i,a,o,"throw",l)}a(void 0)})}}function nI(t,e){return aI(t)||sI(t,e)||iI(t,e)||rI()}function rI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iI(t,e){if(t){if(typeof t=="string")return Lp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lp(t,e):void 0}}function Lp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function sI(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function aI(t){if(Array.isArray(t))return t}var oI=function(e){var n,r,i=e.brand,s=e.isLast,a=e.onDelete,o=i.id,l=xt(),u=l.hostAppProps,d=l.analysisId,f=u.onAddSubscription,y=ft(),h=es(),p=h.setBrandId,m=F.useState(!1),g=nI(m,2),v=g[0],S=g[1],k=It(),j=yi({query:{select:function(T){var _=T.data;return _},staleTime:5*1e3,refetchOnWindowFocus:!0,refetchInterval:30*1e3}}),C=j.data,b=v0({mutation:{onMutate:function(){var O=Ip(Ls().m(function _(R){var G,Y,E;return Ls().w(function(W){for(;;)switch(W.n){case 0:return G=R.brandId,Y=R.data,W.n=1,k.cancelQueries({queryKey:pn()});case 1:return E=k.getQueryData(pn()),k.setQueryData(pn(),function(H){var P,Q;return H&&cr(cr({},H),{},{data:cr(cr({},H.data),{},{brands:((P=(Q=H.data)===null||Q===void 0?void 0:Q.brands)!==null&&P!==void 0?P:[]).map(function(Z){return Z.id===G?cr(cr({},Z),{},{settings:cr(cr({},Z.settings),{},{enableAutomaticAnalysis:Y.enableAutomaticAnalysis})}):Z})})})}),W.a(2,{previous:E})}},_)}));function T(_){return O.apply(this,arguments)}return T}(),onSuccess:function(){if(i&&i.settings&&i.settings.enableAutomaticAnalysis===!1)return S(!1);S(!I)},onError:function(T,_,R){R!=null&&R.previous&&k.setQueryData(pn(),R.previous)},onSettled:function(){var O=Ip(Ls().m(function _(){return Ls().w(function(R){for(;;)switch(R.n){case 0:return R.n=1,Promise.all([k.invalidateQueries({queryKey:pn()}),k.invalidateQueries({queryKey:ba()}),k.invalidateQueries({queryKey:Jo(o)}),k.invalidateQueries({queryKey:tr(o,"latest")}),k.invalidateQueries({queryKey:mn(o,"latest")}),k.invalidateQueries({queryKey:tr(o,d)}),k.invalidateQueries({queryKey:mn(o,d)})]);case 1:return R.a(2)}},_)}));function T(){return O.apply(this,arguments)}return T}()}}),w=b.mutate,x=b.isPending,L=function(T){w({brandId:o,data:{enableAutomaticAnalysis:T}})},D=function(T){if(T){if(!M)return S(!0);if(!I)return L(!0);S(!0)}else L(!1)},M=Number(C==null?void 0:C.maxNumberOfActiveBrands)-Number(C==null?void 0:C.numberOfActiveBrands)>0||!!(i!=null&&(n=i.settings)!==null&&n!==void 0&&n.enableAutomaticAnalysis),I=U0(i==null?void 0:i.firstNextAnalysisOpportunity),z=(i==null?void 0:i.setupStatus)==="pendingQuerySelection";return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:oe("yst-flex yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-4 yst-py-4 yst-text-slate-800",{"yst-border-b-[1px] yst-border-b-slate-200":!s}),children:[c.jsx(A.Toggle,{id:"toggle-brand-".concat(i==null?void 0:i.id),checked:i==null||(r=i.settings)===null||r===void 0?void 0:r.enableAutomaticAnalysis,screenReaderLabel:"Enable or disable automatic analysis for this brand",onChange:D,disabled:(i==null?void 0:i.id)==="loading"||x}),c.jsxs("div",{className:"yst-font-medium",children:[(i==null?void 0:i.id)==="loading"?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-32"}):i==null?void 0:i.name,z&&c.jsx("div",{children:c.jsx(A.Link,{variant:"primary",onClick:function(){i.id?(p(i.id),y("/setup/".concat(i.id,"/queries"))):console.error("Brand ID is missing.")},children:"Finish setup"})}),(i==null?void 0:i.nextScheduledAnalysis)&&c.jsxs("div",{className:"yst-font-normal yst-italic yst-text-slate-500",children:["Next analysis:"," ",qu(i.nextScheduledAnalysis)]})]}),c.jsx("div",{className:"yst-ml-auto yst-flex yst-flex-row yst-items-center yst-justify-end yst-gap-2 yst-text-slate-800",children:(i==null?void 0:i.id)==="loading"?c.jsx(A.SkeletonLoader,{className:"yst-h-6 yst-w-24"}):i!=null&&i.hasAnalysisInProgress?null:c.jsxs(A.Button,{size:"small",variant:"tertiary",className:"yst-text-red-600 hover:yst-text-red-700",onClick:function(){i!=null&&i.id&&a(i.id)},children:[c.jsx(zc,{})," Delete brand"]})})]}),c.jsx(A.Modal,{isOpen:v,onClose:function(){return S(!1)},position:"center",as:"div",className:oe({"yst-mx-auto yst-max-w-xl":M}),children:M?c.jsx(A.Modal.Panel,{children:I?c.jsxs(c.Fragment,{children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Start brand analysis now?"})}),c.jsxs(A.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:[c.jsx("p",{children:"Activating this brand will immediately start a new analysis."}),c.jsx("p",{children:"This will use one of your weekly analyses included in your subscription."})]}),c.jsxs(A.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:[c.jsx(A.Button,{variant:"secondary",onClick:function(){return S(!1)},children:"Cancel"}),c.jsx(A.Button,{variant:"primary",onClick:function(){L(!0)},isLoading:x,children:"Yes, start analysis"})]})]}):c.jsxs(c.Fragment,{children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Automatic analysis enabled"})}),c.jsxs(A.Modal.Container.Content,{className:"yst-mb-4 yst-space-y-3",children:[c.jsx("p",{children:"You've turned on the weekly automatic analysis for this brand."}),c.jsxs("p",{children:["The next analysis will run on"," ",c.jsx("span",{className:"yst-font-medium",children:qu(i==null?void 0:i.nextScheduledAnalysis)||"the next analysis cycle"}),"."]})]}),c.jsx(A.Modal.Container.Footer,{className:"yst-mt-3 yst-flex yst-justify-end yst-gap-2",children:c.jsx(A.Button,{variant:"primary",onClick:function(){return S(!1)},children:"Got it"})})]})}):c.jsxs(A.Modal.Panel,{className:"yst-flex yst-max-w-96 yst-flex-col yst-gap-6",children:[c.jsx("div",{className:"yst-flex yst-justify-center",children:c.jsx("div",{className:"yst-flex yst-h-12 yst-w-12 yst-items-center yst-justify-center yst-rounded-full yst-bg-amber-200",children:c.jsx(LS,{className:"yst-h-6 yst-w-6 yst-text-amber-900"})})}),c.jsx("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-center yst-text-lg yst-font-medium",children:"You've reached your active brand limit"})}),c.jsx(A.Modal.Container.Content,{children:c.jsx("p",{className:"yst-text-center",children:"Each subscription lets you activate 1 brand. Add another subscription or deactivate an existing brand to activate this brand."})})]})}),c.jsx(A.Modal.Container.Footer,{children:c.jsxs("div",{className:"yst-flex yst-flex-col yst-justify-stretch yst-gap-2",children:[f&&c.jsxs(A.Button,{variant:"upsell",className:"yst-flex yst-gap-1",onClick:f,children:[c.jsx(A0,{}),"Add a subscription"]}),c.jsx(A.Button,{variant:"tertiary",className:"",onClick:function(){return S(!1)},children:"Manage active brands"})]})})]})})]})},Np,Mp,_p;function su(t,e){return dI(t)||cI(t,e)||uI(t,e)||lI()}function lI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
58
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uI(t,e){if(t){if(typeof t=="string")return Rp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rp(t,e):void 0}}function Rp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function cI(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function dI(t){if(Array.isArray(t))return t}function xd(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Dp=Ir(Np||(Np=xd(["xl:yst-w-1/3"]))),Bp=Ir(Mp||(Mp=xd(["xl:yst-w-2/3"]))),Fp=Ir(_p||(_p=xd(["yst-flex yst-flex-col yst-gap-8 xl:yst-flex-row"]))),fI=function(){var e,n,r,i,s=F.useState(!1),a=su(s,2),o=a[0],l=a[1],u=F.useState(!1),d=su(u,2),f=d[0],y=d[1],h=F.useState(null),p=su(h,2),m=p[0],g=p[1],v=yi({query:{select:function(w){var x=w.data;return x}}}),S=v.data,k=hi({query:{select:function(w){var x=w.data;return x==null?void 0:x.brands},staleTime:5*1e3,refetchOnWindowFocus:!0,refetchInterval:30*1e3}}),j=k.data,C=j==null?void 0:j.find(function(b){return b.id===m});return c.jsxs("form",{children:[c.jsxs(A.Card,{children:[c.jsx(er,{title:"Settings",description:"Manage your brand settings and data. You can update analysis preferences or delete brands from your account."}),c.jsxs(A.Card.Content,{children:[c.jsxs(Fp,{children:[c.jsxs(Dp,{className:"yst-space-y-2",children:[c.jsx(A.Title,{size:"4",children:"Brands"}),c.jsxs("p",{children:["You have"," ",c.jsxs("b",{className:"yst-font-semibold yst-text-slate-800",children:[(e=S==null?void 0:S.activeSubscriptions)!==null&&e!==void 0?e:"—"," subscription(s)"]}),". This gives you up to"," ",c.jsxs("b",{className:"yst-font-semibold yst-text-slate-800",children:[(n=S==null?void 0:S.maxNumberOfActiveBrands)!==null&&n!==void 0?n:"—"," active brand(s)"]}),", for which we’ll automatically run a weekly analysis."]}),c.jsx("p",{children:"You can activate or deactivate brands anytime, or permanently delete a brand and all its data."})]}),c.jsxs(Bp,{children:[j&&c.jsxs("p",{className:"yst-flex yst-w-full yst-max-w-2xl yst-flex-1 yst-flex-row yst-items-center yst-justify-start yst-gap-2 yst-border-b-[1px] yst-border-b-slate-200 yst-py-4 yst-font-medium yst-text-slate-800",children:["Active brands: ",(r=S==null?void 0:S.numberOfActiveBrands)!==null&&r!==void 0?r:"—"," of"," ",(i=S==null?void 0:S.maxNumberOfActiveBrands)!==null&&i!==void 0?i:"—"]}),j&&j.length===0&&c.jsxs("p",{className:"yst-mt-4 yst-text-slate-500",children:["No brands found. Please"," ",c.jsx(A.Link,{as:an,to:"/setup",children:"add a brand"})," ","to start analyzing."]}),(j!=null?j:[{id:"loading",name:"Loading..."}]).map(function(b,w,x){return c.jsx(oI,{brand:b,isLast:w===x.length-1,onDelete:function(L){g(L),l(!0)}},b.id)})]})]}),c.jsx(li,{}),c.jsxs(Fp,{children:[c.jsxs(Dp,{className:"yst-space-y-2",children:[c.jsx(A.Title,{size:"4",children:"Delete all data"}),c.jsx("p",{children:"Permanently delete all brands, analysis results, and query history from your account."})]}),c.jsxs(Bp,{className:"yst-space-y-4",children:[c.jsxs(A.Button,{variant:"error",onClick:function(){y(!0)},disabled:(j==null?void 0:j.length)===0,children:[c.jsx(zc,{})," Delete all data"]}),c.jsx("p",{children:c.jsxs("i",{children:[c.jsx("b",{children:"Note:"})," This will erase everything and cannot be reversed."]})})]})]})]})]}),c.jsx(ZP,{isOpen:o,onClose:function(){l(!1),g(null)},brandId:m||"",brandName:C==null?void 0:C.name}),c.jsx(GP,{isOpen:f,onClose:function(){y(!1)}})]})};const hI=Object.freeze(Object.defineProperty({__proto__:null,default:fI},Symbol.toStringTag,{value:"Module"}));function Do(t){"@babel/helpers - typeof";return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Do(t)}var Sc=[{path:"/setup",id:1,title:"Brand & location info",description:"Enter a few basic details about your brand so we can generate relevant queries people might use in AI platforms like ChatGPT and Perplexity. This helps us analyze how visible your brand is in their responses."},{path:"/setup/:brandId/queries",id:2,title:"Queries",description:"Review the queries we've generated from your brand info. These are phrases people might type into AI platforms that could trigger your brand to appear."},{path:"/setup/:brandId/analysis",id:3,title:"Analysis",description:"We're checking how your brand shows up in AI. Your queries will now be tested in ChatGPT, Perplexity and Gemini. This process should take around 5 minutes."}],yI=function(e){return Sc.find(function(n){return!!qi(n.path,e)})||Sc[0]};function pI(){var t=bt(),e=yI(t.pathname);return c.jsxs(A.Paper,{className:"yst-mx-auto yst-max-w-2xl",children:[c.jsx(Bg,{title:c.jsx(kv,{currentStep:e,steps:Sc}),description:e.description}),c.jsx(A.Paper.Content,{children:c.jsx(Wi,{})})]})}var kv=function(e){var n=e.title,r=e.currentStep,i=e.steps;return c.jsxs("span",{className:"yst-inline-flex yst-flex-row yst-gap-4",children:[c.jsxs("span",{className:"yst-tracking-[.2em] yst-text-slate-400",children:[c.jsx("span",{className:"yst-text-slate-900",children:Do(r)==="object"?r.id:r}),"/",Array.isArray(i)?i.length:i]}),c.jsx("span",{children:Do(r)==="object"?r.title:n||"Step ".concat(r)})]})};const mI=Object.freeze(Object.defineProperty({__proto__:null,SetupPaperTitle:kv,default:pI},Symbol.toStringTag,{value:"Module"}));var Ev=function(e){var n=e.onBack,r=e.variant,i=r===void 0?"ai":r,s=e.buttonText,a=e.onButtonClick,o=e.isButtonDisabled,l=o===void 0?!1:o,u=e.isLoading,d=u===void 0?!1:u;return c.jsx(Hc,{nestedInPaperContent:!0,children:c.jsxs("div",{className:oe({"yst-flex yst-flex-1 yst-flex-col yst-items-start yst-justify-between yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-between":n}),children:[n&&c.jsx(A.Button,{variant:"tertiary",onClick:n,className:"yst-no-underline",children:"← Back"}),c.jsx("div",{className:oe("yst-flex yst-flex-col yst-items-stretch yst-gap-4 md:yst-flex-row md:yst-items-center md:yst-justify-end"),children:c.jsxs(A.Button,{onClick:a,variant:i==="ai"?"primary":i,style:i==="ai"?{background:"linear-gradient(102deg, #A61E69 0%, #6366F1 100%)",color:"#fff"}:{},disabled:l,type:"submit",isLoading:d,children:[i==="ai"&&c.jsx(EA,{}),s]})})]})})},gI=[{value:"US",label:"United States"},{value:"GB",label:"United Kingdom"},{value:"CA",label:"Canada"},{value:"AU",label:"Australia"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"NL",label:"Netherlands"}],vI=[{value:"AF",label:"Afghanistan"},{value:"AX",label:"Åland Islands"},{value:"AL",label:"Albania"},{value:"DZ",label:"Algeria"},{value:"AS",label:"American Samoa"},{value:"AD",label:"Andorra"},{value:"AO",label:"Angola"},{value:"AI",label:"Anguilla"},{value:"AQ",label:"Antarctica"},{value:"AG",label:"Antigua and Barbuda"},{value:"AR",label:"Argentina"},{value:"AM",label:"Armenia"},{value:"AW",label:"Aruba"},{value:"AT",label:"Austria"},{value:"AZ",label:"Azerbaijan"},{value:"BS",label:"Bahamas"},{value:"BH",label:"Bahrain"},{value:"BD",label:"Bangladesh"},{value:"BB",label:"Barbados"},{value:"BY",label:"Belarus"},{value:"BE",label:"Belgium"},{value:"PW",label:"Belau"},{value:"BZ",label:"Belize"},{value:"BJ",label:"Benin"},{value:"BM",label:"Bermuda"},{value:"BT",label:"Bhutan"},{value:"BO",label:"Bolivia"},{value:"BQ",label:"Bonaire, Saint Eustatius and Saba"},{value:"BA",label:"Bosnia and Herzegovina"},{value:"BW",label:"Botswana"},{value:"BV",label:"Bouvet Island"},{value:"BR",label:"Brazil"},{value:"IO",label:"British Indian Ocean Territory"},{value:"BN",label:"Brunei"},{value:"BG",label:"Bulgaria"},{value:"BF",label:"Burkina Faso"},{value:"BI",label:"Burundi"},{value:"KH",label:"Cambodia"},{value:"CM",label:"Cameroon"},{value:"CV",label:"Cape Verde"},{value:"KY",label:"Cayman Islands"},{value:"CF",label:"Central African Republic"},{value:"TD",label:"Chad"},{value:"CL",label:"Chile"},{value:"CN",label:"China"},{value:"CX",label:"Christmas Island"},{value:"CC",label:"Cocos (Keeling) Islands"},{value:"CO",label:"Colombia"},{value:"KM",label:"Comoros"},{value:"CG",label:"Congo (Brazzaville)"},{value:"CD",label:"Congo (Kinshasa)"},{value:"CK",label:"Cook Islands"},{value:"CR",label:"Costa Rica"},{value:"HR",label:"Croatia"},{value:"CU",label:"Cuba"},{value:"CW",label:"Curaçao"},{value:"CY",label:"Cyprus"},{value:"CZ",label:"Czech Republic"},{value:"DK",label:"Denmark"},{value:"DJ",label:"Djibouti"},{value:"DM",label:"Dominica"},{value:"DO",label:"Dominican Republic"},{value:"EC",label:"Ecuador"},{value:"EG",label:"Egypt"},{value:"SV",label:"El Salvador"},{value:"GQ",label:"Equatorial Guinea"},{value:"ER",label:"Eritrea"},{value:"EE",label:"Estonia"},{value:"ET",label:"Ethiopia"},{value:"FK",label:"Falkland Islands"},{value:"FO",label:"Faroe Islands"},{value:"FJ",label:"Fiji"},{value:"FI",label:"Finland"},{value:"GF",label:"French Guiana"},{value:"PF",label:"French Polynesia"},{value:"TF",label:"French Southern Territories"},{value:"GA",label:"Gabon"},{value:"GM",label:"Gambia"},{value:"GE",label:"Georgia"},{value:"GH",label:"Ghana"},{value:"GI",label:"Gibraltar"},{value:"GR",label:"Greece"},{value:"GL",label:"Greenland"},{value:"GD",label:"Grenada"},{value:"GP",label:"Guadeloupe"},{value:"GU",label:"Guam"},{value:"GT",label:"Guatemala"},{value:"GG",label:"Guernsey"},{value:"GN",label:"Guinea"},{value:"GW",label:"Guinea-Bissau"},{value:"GY",label:"Guyana"},{value:"HT",label:"Haiti"},{value:"HM",label:"Heard Island and McDonald Islands"},{value:"HN",label:"Honduras"},{value:"HK",label:"Hong Kong"},{value:"HU",label:"Hungary"},{value:"IS",label:"Iceland"},{value:"IN",label:"India"},{value:"ID",label:"Indonesia"},{value:"IR",label:"Iran"},{value:"IQ",label:"Iraq"},{value:"IE",label:"Ireland"},{value:"IM",label:"Isle of Man"},{value:"IL",label:"Israel"},{value:"IT",label:"Italy"},{value:"CI",label:"Ivory Coast"},{value:"JM",label:"Jamaica"},{value:"JP",label:"Japan"},{value:"JE",label:"Jersey"},{value:"JO",label:"Jordan"},{value:"KZ",label:"Kazakhstan"},{value:"KE",label:"Kenya"},{value:"KI",label:"Kiribati"},{value:"XK",label:"Kosovo"},{value:"KW",label:"Kuwait"},{value:"KG",label:"Kyrgyzstan"},{value:"LA",label:"Laos"},{value:"LV",label:"Latvia"},{value:"LB",label:"Lebanon"},{value:"LS",label:"Lesotho"},{value:"LR",label:"Liberia"},{value:"LY",label:"Libya"},{value:"LI",label:"Liechtenstein"},{value:"LT",label:"Lithuania"},{value:"LU",label:"Luxembourg"},{value:"MO",label:"Macao"},{value:"MK",label:"North Macedonia"},{value:"MG",label:"Madagascar"},{value:"MW",label:"Malawi"},{value:"MY",label:"Malaysia"},{value:"MV",label:"Maldives"},{value:"ML",label:"Mali"},{value:"MT",label:"Malta"},{value:"MH",label:"Marshall Islands"},{value:"MQ",label:"Martinique"},{value:"MR",label:"Mauritania"},{value:"MU",label:"Mauritius"},{value:"YT",label:"Mayotte"},{value:"MX",label:"Mexico"},{value:"FM",label:"Micronesia"},{value:"MD",label:"Moldova"},{value:"MC",label:"Monaco"},{value:"MN",label:"Mongolia"},{value:"ME",label:"Montenegro"},{value:"MS",label:"Montserrat"},{value:"MA",label:"Morocco"},{value:"MZ",label:"Mozambique"},{value:"MM",label:"Myanmar"},{value:"NA",label:"Namibia"},{value:"NR",label:"Nauru"},{value:"NP",label:"Nepal"},{value:"NC",label:"New Caledonia"},{value:"NZ",label:"New Zealand"},{value:"NI",label:"Nicaragua"},{value:"NE",label:"Niger"},{value:"NG",label:"Nigeria"},{value:"NU",label:"Niue"},{value:"NF",label:"Norfolk Island"},{value:"MP",label:"Northern Mariana Islands"},{value:"KP",label:"North Korea"},{value:"NO",label:"Norway"},{value:"OM",label:"Oman"},{value:"PK",label:"Pakistan"},{value:"PS",label:"Palestinian Territory"},{value:"PA",label:"Panama"},{value:"PG",label:"Papua New Guinea"},{value:"PY",label:"Paraguay"},{value:"PE",label:"Peru"},{value:"PH",label:"Philippines"},{value:"PN",label:"Pitcairn"},{value:"PL",label:"Poland"},{value:"PT",label:"Portugal"},{value:"PR",label:"Puerto Rico"},{value:"QA",label:"Qatar"},{value:"RE",label:"Reunion"},{value:"RO",label:"Romania"},{value:"RU",label:"Russia"},{value:"RW",label:"Rwanda"},{value:"BL",label:"Saint Barthélemy"},{value:"SH",label:"Saint Helena"},{value:"KN",label:"Saint Kitts and Nevis"},{value:"LC",label:"Saint Lucia"},{value:"MF",label:"Saint Martin (French part)"},{value:"SX",label:"Saint Martin (Dutch part)"},{value:"PM",label:"Saint Pierre and Miquelon"},{value:"VC",label:"Saint Vincent and the Grenadines"},{value:"SM",label:"San Marino"},{value:"ST",label:"São Tomé and Príncipe"},{value:"SA",label:"Saudi Arabia"},{value:"SN",label:"Senegal"},{value:"RS",label:"Serbia"},{value:"SC",label:"Seychelles"},{value:"SL",label:"Sierra Leone"},{value:"SG",label:"Singapore"},{value:"SK",label:"Slovakia"},{value:"SI",label:"Slovenia"},{value:"SB",label:"Solomon Islands"},{value:"SO",label:"Somalia"},{value:"ZA",label:"South Africa"},{value:"GS",label:"South Georgia/Sandwich Islands"},{value:"KR",label:"South Korea"},{value:"SS",label:"South Sudan"},{value:"ES",label:"Spain"},{value:"LK",label:"Sri Lanka"},{value:"SD",label:"Sudan"},{value:"SR",label:"Suriname"},{value:"SJ",label:"Svalbard and Jan Mayen"},{value:"SZ",label:"Eswatini"},{value:"SE",label:"Sweden"},{value:"CH",label:"Switzerland"},{value:"SY",label:"Syria"},{value:"TW",label:"Taiwan"},{value:"TJ",label:"Tajikistan"},{value:"TZ",label:"Tanzania"},{value:"TH",label:"Thailand"},{value:"TL",label:"Timor-Leste"},{value:"TG",label:"Togo"},{value:"TK",label:"Tokelau"},{value:"TO",label:"Tonga"},{value:"TT",label:"Trinidad and Tobago"},{value:"TN",label:"Tunisia"},{value:"TR",label:"Turkey"},{value:"TM",label:"Turkmenistan"},{value:"TC",label:"Turks and Caicos Islands"},{value:"TV",label:"Tuvalu"},{value:"UG",label:"Uganda"},{value:"UA",label:"Ukraine"},{value:"AE",label:"United Arab Emirates"},{value:"UM",label:"United States (US) Minor Outlying Islands"},{value:"UY",label:"Uruguay"},{value:"UZ",label:"Uzbekistan"},{value:"VU",label:"Vanuatu"},{value:"VA",label:"Vatican"},{value:"VE",label:"Venezuela"},{value:"VN",label:"Vietnam"},{value:"VG",label:"Virgin Islands (British)"},{value:"VI",label:"Virgin Islands (US)"},{value:"WF",label:"Wallis and Futuna"},{value:"EH",label:"Western Sahara"},{value:"WS",label:"Samoa"},{value:"YE",label:"Yemen"},{value:"ZM",label:"Zambia"},{value:"ZW",label:"Zimbabwe"}],au=[].concat(gI,vI,[{value:"OTHER",label:"Other"}]),bI=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"zh-Hans",label:"Chinese (Simplified)"},{value:"ja",label:"Japanese"}],xI=[{value:"af",label:"Afrikaans"},{value:"sq",label:"Albanian"},{value:"am",label:"Amharic"},{value:"ar",label:"Arabic"},{value:"hy",label:"Armenian"},{value:"az",label:"Azerbaijani"},{value:"be",label:"Belarusian"},{value:"bn",label:"Bengali"},{value:"bs",label:"Bosnian"},{value:"bg",label:"Bulgarian"},{value:"my",label:"Burmese"},{value:"yue",label:"Cantonese"},{value:"ca",label:"Catalan"},{value:"zh-Hant",label:"Chinese (Traditional)"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"et",label:"Estonian"},{value:"fil",label:"Filipino"},{value:"fi",label:"Finnish"},{value:"ka",label:"Georgian"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"ht",label:"Haitian Creole"},{value:"he",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"is",label:"Icelandic"},{value:"id",label:"Indonesian"},{value:"it",label:"Italian"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"km",label:"Khmer"},{value:"ko",label:"Korean"},{value:"ku",label:"Kurdish (Kurmanji)"},{value:"ckb",label:"Kurdish (Sorani)"},{value:"ky",label:"Kyrgyz"},{value:"lv",label:"Latvian"},{value:"lt",label:"Lithuanian"},{value:"mk",label:"Macedonian"},{value:"ms",label:"Malay"},{value:"ml",label:"Malayalam"},{value:"mr",label:"Marathi"},{value:"mn",label:"Mongolian"},{value:"ne",label:"Nepali"},{value:"no",label:"Norwegian"},{value:"ps",label:"Pashto"},{value:"fa",label:"Persian"},{value:"pl",label:"Polish"},{value:"pt",label:"Portuguese"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"si",label:"Sinhala"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"so",label:"Somali"},{value:"sw",label:"Swahili"},{value:"sv",label:"Swedish"},{value:"tg",label:"Tajik"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"ur",label:"Urdu"},{value:"uz",label:"Uzbek"},{value:"vi",label:"Vietnamese"},{value:"xh",label:"Xhosa"},{value:"zu",label:"Zulu"}],wI=[].concat(bI,xI);function Or(t){"@babel/helpers - typeof";return Or=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Or(t)}function zp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Up(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zp(Object(n),!0).forEach(function(r){Ov(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ov(t,e,n){return(e=AI(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function AI(t){var e=SI(t,"string");return Or(e)=="symbol"?e:e+""}function SI(t,e){if(Or(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(Or(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Cc(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Wt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Wt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Wt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Wt(f,"constructor",u),Wt(u,"constructor",l),l.displayName="GeneratorFunction",Wt(u,i,"GeneratorFunction"),Wt(f),Wt(f,i,"Generator"),Wt(f,r,function(){return this}),Wt(f,"toString",function(){return"[object Generator]"}),(Cc=function(){return{w:s,m:y}})()}function Wt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Wt=function(a,o,l,u){function d(f,y){Wt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Wt(t,e,n,r)}function Hp(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function CI(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){Hp(s,r,i,a,o,"next",l)}function o(l){Hp(s,r,i,a,o,"throw",l)}a(void 0)})}}function Ai(t,e){return OI(t)||EI(t,e)||kI(t,e)||jI()}function jI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
59
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kI(t,e){if(t){if(typeof t=="string")return qp(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qp(t,e):void 0}}function qp(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function EI(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function OI(t){if(Array.isArray(t))return t}var TI=function(){var e=ft(),n=es(),r=It(),i=F.useState(),s=Ai(i,2),a=s[0],o=s[1],l=F.useState(!1),u=Ai(l,2),d=u[0],f=u[1],y=F.useState({name:"",url:"",description:"",language:"en",isLocal:!1,country:void 0,region:""}),h=Ai(y,2),p=h[0],m=h[1],g=F.useState(null),v=Ai(g,2),S=v[0],k=v[1],j=F.useState(""),C=Ai(j,2),b=C[0],w=C[1],x=F.useMemo(function(){var H;if(!p.country)return"";var P=au.find(function(Q){return Q.value===p.country});return(H=P==null?void 0:P.label)!==null&&H!==void 0?H:""},[p.country]),L=F.useMemo(function(){var H=b.trim().toLowerCase();return H?au.filter(function(P){var Q=P.label.toLowerCase().includes(H),Z=P.value.toLowerCase().includes(H);return Q||Z}):au},[b]),D=pw({mutation:{onSuccess:function(){var H=CI(Cc().m(function Q(Z){var K;return Cc().w(function(J){for(;;)switch(J.n){case 0:return K=Z.data.id,J.n=1,Promise.all([r.invalidateQueries({queryKey:ba()}),r.invalidateQueries({queryKey:pn()})]);case 1:K&&n.setBrandId(K),Z!=null&&Z.status&&Z.status>=200&&Z.status<300&&K&&(n.setBrandId(K),o(K));case 2:return J.a(2)}},Q)}));function P(Q){return H.apply(this,arguments)}return P}(),onError:function(){f(!1)}}}),M=D.mutate,I=D.isPending,z=D.error,O=hi({query:{enabled:!!a,select:function(P){var Q=P.data;return Q==null?void 0:Q.brands},refetchInterval:function(P){var Q;return((P==null||(Q=P.state)===null||Q===void 0||(Q=Q.data)===null||Q===void 0||(Q=Q.data)===null||Q===void 0?void 0:Q.brands)||[]).find(function(Z){return Z.id===a})?!1:2*1e3}}}),T=O.data;F.useEffect(function(){a&&T!==null&&T!==void 0&&T.find(function(H){return H.id===a})&&e("/setup/".concat(a,"/queries"),{replace:!0})},[a,T,e]);var _=function(P,Q){m(function(Z){return Up(Up({},Z),{},Ov({},P,Q))})},R=function(P){w(P.target.value)},G=function(P){_("country",P!=null?P:void 0),w("")},Y=function(P){if(P.preventDefault(),k(null),p.description.length>250){k("Your brand description is too long. Please keep it within the 250-character limit."),f(!1);return}f(!0);var Q=p.url;Q&&!/^https?:\/\//i.test(Q)&&(Q="https://".concat(Q)),M({data:{name:p.name,url:Q,description:p.description,focusLanguage:p.language,country:p.country,region:p.region,city:p.city}})};function E(H){return Or(H)==="object"&&H!==null&&"response"in H&&Or(H.response)==="object"&&H.response!==void 0&&"data"in H.response}var W=E(z)?z.response.data.errors:void 0;return c.jsxs("form",{onSubmit:Y,children:[c.jsxs("div",{className:"yst-space-y-6",children:[c.jsx(A.Title,{size:"2",children:"Brand info"}),!!z&&c.jsx(A.Alert,{variant:"error",title:"Error",isVisible:!!z,children:c.jsx("ul",{children:W&&Or(W)==="object"?Object.entries(W).flatMap(function(H){var P=Ai(H,2),Q=P[0],Z=P[1];return Array.isArray(Z)?Z.map(function(K,J){return c.jsx("li",{children:K},"".concat(Q,"-").concat(J))}):null}):"There was an error creating the brand."})}),S&&c.jsx(A.Alert,{variant:"error",title:"Error",isVisible:!!S,children:c.jsx("ul",{children:c.jsx("li",{children:"Your brand description is too long. Please keep it within the 250-character limit."})})}),c.jsx(A.TextField,{id:"name",label:"Brand name",value:p.name,onChange:function(H){return _("name",H.target.value)},maxLength:255}),c.jsx(A.TextField,{id:"url",label:"Website URL (optional)",placeholder:"Example: https://yourwebsite.com",value:p.url,maxLength:247,onChange:function(H){return _("url",H.target.value)}}),c.jsxs("div",{id:"brand-description-textarea",children:[c.jsx(A.TextareaField,{id:"brand-description",label:"Brand description",value:p.description,onChange:function(H){var P=H.target.value;_("description",P)},...p.description.length>250?{validation:{variant:"error",message:"Your brand description is too long. Please keep it within the 250-character limit."}}:{},placeholder:"e.g. We design eco-friendly yoga mats for busy professionals who want sustainable gear that’s durable, stylish and kind to the planet."}),c.jsxs("div",{className:"yst-mt-1 yst-flex",children:[c.jsxs("div",{className:"yst-flex-grow yst-flex-col",children:[p.description.length>250&&c.jsx("div",{className:"yst-mb-2 yst-text-red-500",children:"Your brand description is too long. Please keep it within the 250-character limit."}),"Tell us about your brand: what you do, who it’s for and what makes it special."]}),c.jsxs("div",{className:oe("yst-ml-6 yst-mt-[-4px] yst-text-xs",{"yst-text-slate-500":p.description.length<=250,"yst-text-red-500":p.description.length>250}),children:[p.description.length,"/250"]})]})]}),c.jsxs("div",{className:"yst-space-y-2",children:[c.jsx(A.Select,{className:"yst-max-w-sm",id:"language-select",label:"Target language",value:p.language,onChange:function(H){return _("language",H)},options:wI.map(function(H){return{label:H.label,value:H.value}})}),c.jsx("p",{children:"The main language your brand uses to communicate or create content."})]})]}),c.jsx(li,{}),c.jsxs("div",{className:"yst-space-y-6",children:[c.jsx(A.Title,{size:"2",children:"Location info"}),c.jsx("p",{children:"Specify a location (optional) or leave it blank for a global analysis."}),c.jsx(A.Autocomplete,{className:"yst-max-w-sm",id:"country-select",label:"Target country (optional)",labelProps:{className:"yst-font-medium yst-text-slate-800"},value:p.country||null,nullable:!0,placeholder:"Search countries...",onQueryChange:R,onChange:G,selectedLabel:x,children:L.map(function(H){return c.jsx(A.Autocomplete.Option,{value:H.value,children:H.label},H.value)})}),p.country&&c.jsxs(c.Fragment,{children:[c.jsx(A.TextField,{id:"region",label:"Target region (optional)",value:p.region,onChange:function(H){return _("region",H.target.value)},description:`Enter a region to narrow down the analysis. For
|
|
60
60
|
example: Southern France, Europe or the Pacific Northwest.`,maxLength:255}),c.jsx(A.TextField,{id:"city",label:"Target city (optional)",value:p.city,onChange:function(H){return _("city",H.target.value)},description:`Enter a city to narrow down the analysis. For
|
|
61
61
|
example: Paris or Los Angeles.`,maxLength:255})]})]}),c.jsx(Ev,{onBack:function(){return e(-1)},buttonText:"Generate queries",isButtonDisabled:I||!!a||d,isLoading:I||!!a})]})};const PI=Object.freeze(Object.defineProperty({__proto__:null,default:TI},Symbol.toStringTag,{value:"Module"}));function oa(t){"@babel/helpers - typeof";return oa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oa(t)}function II(t){return MI(t)||NI(t)||Tv(t)||LI()}function LI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
62
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NI(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function MI(t){if(Array.isArray(t))return kc(t)}function Wp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wp(Object(n),!0).forEach(function(r){_I(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _I(t,e,n){return(e=RI(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function RI(t){var e=DI(t,"string");return oa(e)=="symbol"?e:e+""}function DI(t,e){if(oa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(oa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jc(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Gt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tv(t,e){if(t){if(typeof t=="string")return kc(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kc(t,e):void 0}}function kc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function zI(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function UI(t){if(Array.isArray(t))return t}var Ci=5,Ns="Generating...",HI="Re-generating...",qI=100,WI=800,GI=["******************************","***********************","*******************************************************","***********************************************","***************************************************************","*******************************************************","*******************************************************","***********************************************"],QI=Array.from({length:Ci},function(t,e){return{id:"query-".concat(e),text:Ns,isRegenerating:!0}}),YI=function(){return Array.from({length:Ci},function(e,n){return{id:"query-".concat(n),text:"",isRegenerating:!1}})},VI=function(){var e,n,r,i=zo(),s=i.brandId,a="/setup/".concat(s,"/analysis"),o=ft(),l=It(),u=Zo(),d=F.useRef(!1),f=F.useState(QI),y=Gn(f,2),h=y[0],p=y[1],m=F.useState(!1),g=Gn(m,2),v=g[0],S=g[1],k=F.useState([]),j=Gn(k,2),C=j[0],b=j[1],w=F.useState([]),x=Gn(w,2),L=x[0],D=x[1],M=F.useState(!1),I=Gn(M,2),z=I[0],P=I[1],O=F.useState(null),_=Gn(O,2),R=_[0],G=_[1],Y=F.useState(!1),E=Gn(Y,2),W=E[0],H=E[1],T=VC({shouldBlock:!0}),Q=T.showModal,Z=T.confirmLeave,K=T.cancelLeave,J=F.useState(!1),le=Gn(J,2),ue=le[0],ie=le[1],ke=F.useState(null),$=Gn(ke,2),He=$[0],Nt=$[1],at=Tw(s||"",{query:{enabled:!!s}}),Ve=at.data,et=at.isRefetching,xn=at.error,ot=at.isError,Bn=at.refetch,Fn=va(s||"",{query:{enabled:!!s}}),Ue=Fn.data,ye=F.useCallback(function(te){var re;if(!(Ue!=null&&(re=Ue.data)!==null&&re!==void 0&&re.name))return!1;var ce=Ue.data.name.toLowerCase().trim();return ce?te.toLowerCase().includes(ce):!1},[Ue==null||(e=Ue.data)===null||e===void 0?void 0:e.name]),pe=F.useCallback(function(){return h.some(function(te){return ye(te.text)})},[h,ye]),Ae=function(){H(!1)},U=function(){H(!1),s&&Ee({brandId:s,data:{queries:h.map(function(re){return re.text})}})},X=function(){H(!1);var re=h.findIndex(function(ce){return ye(ce.text)});re!==-1&&setTimeout(function(){var ce=document.getElementById("query-text-".concat(re));ce&&(ce.focus(),ce.select())},qI)};function de(te){var re,ce,me,Me="Moderation error: one or more queries flagged by OpenAI moderation endpoint.",lt=te==null||(re=te.response)===null||re===void 0||(re=re.data)===null||re===void 0?void 0:re.flagged_queries;return(te==null||(ce=te.response)===null||ce===void 0?void 0:ce.status)===422&&(te==null||(me=te.response)===null||me===void 0||(me=me.data)===null||me===void 0?void 0:me.error)===Me&&Array.isArray(lt)?{flaggedQueries:lt}:null}var ve=jw({mutation:{onSuccess:function(){var te=BI(jc().m(function ce(me){return jc().w(function(Me){for(;;)switch(Me.n){case 0:if(G(null),!(me!=null&&me.status&&me.status>=200&&me.status<300)){Me.n=2;break}return Me.n=1,Promise.all([l.invalidateQueries({queryKey:Jo(s||"")}),l.invalidateQueries({queryKey:pn()})]);case 1:o(a);case 2:return Me.a(2)}},ce)}));function re(ce){return te.apply(this,arguments)}return re}(),onError:function(re){var ce,me,Me=de(re);if(Me){Nt({flaggedQueries:Me.flaggedQueries});return}if((re==null||(ce=re.response)===null||ce===void 0||(ce=ce.data)===null||ce===void 0?void 0:ce.message)==="Cannot update queries for a brand that has existing analyses."){o(a,{replace:!0});return}var lt=(re==null||(me=re.response)===null||me===void 0||(me=me.data)===null||me===void 0?void 0:me.message)||(re==null?void 0:re.message)||"An unexpected error occurred.";G(lt)}}}),Ee=ve.mutate,it=ve.isPending;F.useEffect(function(){s||o("/setup",{replace:!0})},[s,o,u]),F.useEffect(function(){var te;!(Ue!=null&&(te=Ue.data)!==null&&te!==void 0&&te.setupStatus)||d.current||(d.current=!0,Ue.data.setupStatus!=="pendingQuerySelection"&&(u("Queries cannot be changed for a brand with a pending analysis.",{variant:"warning"}),o(a,{replace:!0})))},[Ue==null||(n=Ue.data)===null||n===void 0?void 0:n.setupStatus,s,o,a,u]),F.useEffect(function(){var te;if(Ve!=null&&(te=Ve.data)!==null&&te!==void 0&&te.queries&&Array.isArray(Ve.data.queries)){var re=Ve.data.queries.slice(0,Ci),ce=re.map(function(Me,lt){return{id:"query-".concat(lt),text:Me,isRegenerating:!1}});p(ce),D(Ve.data.queries.slice(Ci))}else if(ot){var me=YI();p(me),D([])}},[Ve,ot]);var Xt=F.useCallback(function(te){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;setTimeout(function(){p(function(ce){return ce.map(function(me,Me){var lt=C.indexOf(Me.toString());return lt>=0&&te[lt]?Zt(Zt({},me),{},{text:te[lt],isRegenerating:!1}):Zt(Zt({},me),{},{isRegenerating:!1})})}),b([]),P(!1),S(!1),re&&D(function(ce){var me=new Set(te);return ce.filter(function(Me){return!me.has(Me)})})},WI)},[C]);F.useEffect(function(){if(z&&!et){var te;if(Ve!=null&&(te=Ve.data)!==null&&te!==void 0&&te.queries&&Array.isArray(Ve.data.queries)){var re=Ve.data.queries.slice(0,Ci),ce=C.map(Number);p(function(me){return me.map(function(Me,lt){var Hn=ce.indexOf(lt);return Zt(Zt({},Me),{},{text:Hn>=0&&re[Hn]?re[Hn]:Me.text,isRegenerating:!1})})}),b([]),P(!1),S(!1)}else ot&&(p(function(me){return me.map(function(Me){return Zt(Zt({},Me),{},{isRegenerating:!1})})}),b([]),P(!1),S(!1))}},[Ve,et,z,C,ot]);var yt=F.useCallback(function(te,re){var ce=new Set(re);return L.filter(function(me){return!ce.has(me)}).slice(0,te)},[L]),zn=F.useMemo(function(){return et||h.length===0||h.some(function(te){return te.isRegenerating||te.text===Ns&&!ot||te.text.trim()===""})||v},[et,h,v,ot]),wn=et||h.some(function(te){return te.text===Ns})&&!ot,Te=F.useCallback(function(te){var re=te.toString();b(function(ce){return ce.includes(re)?ce.filter(function(me){return me!==re}):[].concat(II(ce),[re])})},[]),An=F.useCallback(function(te,re){p(function(ce){return ce.map(function(me,Me){return Me===te?Zt(Zt({},me),{},{text:re}):me})})},[]),st=function(){S(!v),b([])},hl=F.useCallback(function(){if(!(et||C.length===0)){p(function(Me){return Me.map(function(lt,Hn){return Zt(Zt({},lt),{},{isRegenerating:C.includes(Hn.toString())})})});var te=h.map(function(Me){return Me.text}),re=C.length,ce=yt(re,te),me=ce.length>=re;me?Xt(ce,!0):(P(!0),Bn())}},[et,C,Bn,h,yt,Xt]),ja=F.useCallback(function(te){if(te.preventDefault(),Nt(null),!!s){if(pe()){H(!0);return}Ee({brandId:s,data:{queries:h.map(function(re){return re.text})}})}},[s,h,Ee,pe]),Un=function(){ie(!0)};return c.jsxs("div",{children:[He&&c.jsxs(A.Alert,{className:"yst-mb-4",variant:"error",children:[c.jsx("strong",{children:"Moderation Error"}),c.jsxs("div",{className:"yst-mt-2",children:[c.jsx("span",{children:"Some of your queries include content that our AI moderation system can’t process."}),c.jsx("br",{}),c.jsx("span",{children:"These queries were flagged and won’t be saved:"}),c.jsx("ul",{className:"yst-ml-4 yst-list-disc",children:He.flaggedQueries.map(function(te,re){return c.jsx("li",{children:te.query},re)})}),c.jsx("br",{}),c.jsx("span",{children:"Edit or replace them to continue."})]})]}),R&&c.jsx(A.Alert,{className:"yst-mb-4",variant:"error",children:R}),c.jsxs("form",{onSubmit:ja,children:[c.jsxs("div",{className:"yst-mb-8",children:[c.jsx(A.Title,{size:"2",className:"yst-mb-2",children:"Your queries"}),c.jsxs("div",{className:"yst-space-y-4",children:[c.jsx("p",{children:"You can edit your queries or regenerate new ones with AI."}),c.jsx("div",{className:oe("yst-flex yst-gap-2",v?"yst-justify-end":"yst-justify-start"),children:v?c.jsxs(c.Fragment,{children:[c.jsx(A.Button,{size:"small",variant:"secondary",onClick:st,children:"Done"}),c.jsxs(A.Button,{variant:"secondary",size:"small",onClick:hl,className:"yst-gap-1",isLoading:et||z,disabled:z||et||C.length===0,children:[c.jsx(Bu,{"aria-hidden":"true"}),"Regenerate selected queries"]})]}):c.jsxs(A.Button,{size:"small",variant:"secondary",onClick:st,disabled:wn||ot,children:[c.jsx(dA,{}),"Select queries to regenerate"]})})]})]}),c.jsx("div",{className:"yst-mb-8",children:h.length===0?GI.map(function(te,re){return c.jsx("div",{className:oe("yst-mb-4 yst-cursor-pointer yst-rounded yst-border yst-border-slate-300 yst-p-3 yst-transition-colors","yst-bg-white"),children:c.jsx(A.SkeletonLoader,{children:te||"Example placeholder query for demonstration purposes."})},"placeholder-query-".concat(re))}):h.slice(0,Ci).map(function(te,re){var ce=te.isRegenerating?te.text===Ns?Ns:HI:te.text;return c.jsx("div",{className:oe("yst-mb-4"),children:c.jsxs("div",{className:"yst-flex yst-gap-2",children:[v&&c.jsx("div",{className:"yst-flex yst-items-center",children:c.jsx(A.Checkbox,{id:"query-regenerate-".concat(re),name:"query-regenerate-".concat(re),value:re.toString(),checked:C.includes(re.toString()),onChange:function(){return Te(re)},disabled:et})}),c.jsx("div",{className:"yst-flex-1",children:c.jsx(A.TextField,{id:"query-text-".concat(re),label:"Query ".concat(re+1),type:"text",value:ce,onChange:function(me){te.isRegenerating||An(re,me.target.value)},placeholder:"Enter your query...",className:"yst-w-full",disabled:te.isRegenerating,required:!0,minLength:3,maxLength:255,validation:ye(te.text)?{variant:"warning",message:"For more accurate insights, avoid using your brand name in the query."}:void 0})})]})},te.id)})}),c.jsx(Ev,{buttonText:"Run analysis (~ 5 minutes)",isButtonDisabled:zn,isLoading:it})]}),c.jsx(A.Modal,{isOpen:ot&&Sx(xn)&&(xn==null||(r=xn.response)===null||r===void 0?void 0:r.status)===429&&!ue,onClose:Un,position:"center",as:"div",children:c.jsx(A.Modal.Panel,{children:c.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[c.jsx("div",{children:c.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-red-100",children:c.jsx(oo,{className:"yst-h-6 yst-w-6 yst-text-red-600"})})}),c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Query regeneration limit reached"})}),c.jsx(A.Modal.Container.Content,{className:"yst-mb-6 yst-space-y-3",children:c.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"You’ve used all your query regenerations for this brand analysis, but you can still edit your queries manually."})}),c.jsx(A.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:c.jsx(A.Button,{variant:"primary",onClick:Un,children:"Edit queries manually"})})]})]})})}),c.jsx(A.Modal,{isOpen:W,onClose:Ae,position:"center",as:"div",children:c.jsx(A.Modal.Panel,{children:c.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[c.jsx("div",{children:c.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-amber-100",children:c.jsx(oo,{className:"yst-h-6 yst-w-6 yst-text-amber-600"})})}),c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Brand name detected in your queries"})}),c.jsxs(A.Modal.Container.Content,{className:"yst-mb-6 yst-space-y-3",children:[c.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"We found your brand name in one or more of your queries. Using your brand name in queries often show more mentions and more positive sentiment, which can skew your results."}),c.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"For more balanced results, remove your brand name or make the queries more general."})]}),c.jsxs(A.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:[c.jsxs(A.Button,{onClick:U,variant:"secondary",disabled:it,isLoading:it,children:[c.jsx(Bu,{}),"Run analysis anyway"]}),c.jsx(A.Button,{variant:"primary",onClick:X,children:"Review and edit queries"})]})]})]})})}),c.jsx(A.Modal,{isOpen:Q,onClose:K,position:"center",as:"div",children:c.jsx(A.Modal.Panel,{children:c.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[c.jsx("div",{children:c.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-amber-100",children:c.jsx(oo,{className:"yst-h-6 yst-w-6 yst-text-amber-600"})})}),c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Leave this page?"})}),c.jsx(A.Modal.Container.Content,{className:"yst-mb-6",children:c.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"You have unsaved changes. Finish setting up your brand to save your queries. Leaving this page will discard your queries."})}),c.jsxs(A.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:[c.jsx(A.Button,{onClick:K,variant:"secondary",children:"No, stay on page"}),c.jsx(A.Button,{variant:"primary",onClick:Z,children:"Yes, discard queries"})]})]})]})})})]})};const KI=Object.freeze(Object.defineProperty({__proto__:null,default:VI},Symbol.toStringTag,{value:"Module"}));var $a={exports:{}},eo={exports:{}},Ie={};var Qp;function XI(){if(Qp)return Ie;Qp=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,y=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function k(C){if(typeof C=="object"&&C!==null){var b=C.$$typeof;switch(b){case e:switch(C=C.type,C){case l:case u:case r:case s:case i:case f:return C;default:switch(C=C&&C.$$typeof,C){case o:case d:case p:case h:case a:return C;default:return b}}case n:return b}}}function j(C){return k(C)===u}return Ie.AsyncMode=l,Ie.ConcurrentMode=u,Ie.ContextConsumer=o,Ie.ContextProvider=a,Ie.Element=e,Ie.ForwardRef=d,Ie.Fragment=r,Ie.Lazy=p,Ie.Memo=h,Ie.Portal=n,Ie.Profiler=s,Ie.StrictMode=i,Ie.Suspense=f,Ie.isAsyncMode=function(C){return j(C)||k(C)===l},Ie.isConcurrentMode=j,Ie.isContextConsumer=function(C){return k(C)===o},Ie.isContextProvider=function(C){return k(C)===a},Ie.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===e},Ie.isForwardRef=function(C){return k(C)===d},Ie.isFragment=function(C){return k(C)===r},Ie.isLazy=function(C){return k(C)===p},Ie.isMemo=function(C){return k(C)===h},Ie.isPortal=function(C){return k(C)===n},Ie.isProfiler=function(C){return k(C)===s},Ie.isStrictMode=function(C){return k(C)===i},Ie.isSuspense=function(C){return k(C)===f},Ie.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===r||C===u||C===s||C===i||C===f||C===y||typeof C=="object"&&C!==null&&(C.$$typeof===p||C.$$typeof===h||C.$$typeof===a||C.$$typeof===o||C.$$typeof===d||C.$$typeof===g||C.$$typeof===v||C.$$typeof===S||C.$$typeof===m)},Ie.typeOf=k,Ie}var Le={};var Yp;function JI(){return Yp||(Yp=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,y=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function k($){return typeof $=="string"||typeof $=="function"||$===r||$===u||$===s||$===i||$===f||$===y||typeof $=="object"&&$!==null&&($.$$typeof===p||$.$$typeof===h||$.$$typeof===a||$.$$typeof===o||$.$$typeof===d||$.$$typeof===g||$.$$typeof===v||$.$$typeof===S||$.$$typeof===m)}function j($){if(typeof $=="object"&&$!==null){var He=$.$$typeof;switch(He){case e:var Nt=$.type;switch(Nt){case l:case u:case r:case s:case i:case f:return Nt;default:var at=Nt&&Nt.$$typeof;switch(at){case o:case d:case p:case h:case a:return at;default:return He}}case n:return He}}}var C=l,b=u,w=o,x=a,L=e,D=d,M=r,I=p,z=h,P=n,O=s,_=i,R=f,G=!1;function Y($){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),E($)||j($)===l}function E($){return j($)===u}function W($){return j($)===o}function H($){return j($)===a}function T($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function Q($){return j($)===d}function Z($){return j($)===r}function K($){return j($)===p}function J($){return j($)===h}function le($){return j($)===n}function ue($){return j($)===s}function ie($){return j($)===i}function ke($){return j($)===f}Le.AsyncMode=C,Le.ConcurrentMode=b,Le.ContextConsumer=w,Le.ContextProvider=x,Le.Element=L,Le.ForwardRef=D,Le.Fragment=M,Le.Lazy=I,Le.Memo=z,Le.Portal=P,Le.Profiler=O,Le.StrictMode=_,Le.Suspense=R,Le.isAsyncMode=Y,Le.isConcurrentMode=E,Le.isContextConsumer=W,Le.isContextProvider=H,Le.isElement=T,Le.isForwardRef=Q,Le.isFragment=Z,Le.isLazy=K,Le.isMemo=J,Le.isPortal=le,Le.isProfiler=ue,Le.isStrictMode=ie,Le.isSuspense=ke,Le.isValidElementType=k,Le.typeOf=j}()),Le}var Vp;function Pv(){return Vp||(Vp=1,process.env.NODE_ENV==="production"?eo.exports=XI():eo.exports=JI()),eo.exports}var ou,Kp;function ZI(){if(Kp)return ou;Kp=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},o=0;o<10;o++)a["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch(d){return!1}}return ou=i()?Object.assign:function(s,a){for(var o,l=r(s),u,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var f in o)e.call(o,f)&&(l[f]=o[f]);if(t){u=t(o);for(var y=0;y<u.length;y++)n.call(o,u[y])&&(l[u[y]]=o[u[y]])}}return l},ou}var lu,Xp;function wd(){if(Xp)return lu;Xp=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lu=t,lu}var uu,Jp;function Iv(){return Jp||(Jp=1,uu=Function.call.bind(Object.prototype.hasOwnProperty)),uu}var cu,Zp;function $I(){if(Zp)return cu;Zp=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=wd(),n={},r=Iv();t=function(s){var a="Warning: "+s;typeof console!="undefined"&&console.error(a);try{throw new Error(a)}catch(o){}}}function i(s,a,o,l,u){if(process.env.NODE_ENV!=="production"){for(var d in s)if(r(s,d)){var f;try{if(typeof s[d]!="function"){var y=Error((l||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw y.name="Invariant Violation",y}f=s[d](a,d,l,o,null,e)}catch(p){f=p}if(f&&!(f instanceof Error)&&t((l||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";t("Failed "+o+" type: "+f.message+(h!=null?h:""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},cu=i,cu}var du,$p;function eL(){if($p)return du;$p=1;var t=Pv(),e=ZI(),n=wd(),r=Iv(),i=$I(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(o){var l="Warning: "+o;typeof console!="undefined"&&console.error(l);try{throw new Error(l)}catch(u){}});function a(){return null}return du=function(o,l){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(E){var W=E&&(u&&E[u]||E[d]);if(typeof W=="function")return W}var y="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:S(),arrayOf:k,element:j(),elementType:C(),instanceOf:b,node:D(),objectOf:x,oneOf:w,oneOfType:L,shape:I,exact:z};function p(E,W){return E===W?E!==0||1/E===1/W:E!==E&&W!==W}function m(E,W){this.message=E,this.data=W&&typeof W=="object"?W:{},this.stack=""}m.prototype=Error.prototype;function g(E){if(process.env.NODE_ENV!=="production")var W={},H=0;function T(Z,K,J,le,ue,ie,ke){if(le=le||y,ie=ie||J,ke!==n){if(l){var $=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw $.name="Invariant Violation",$}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var He=le+":"+J;!W[He]&&H<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+le+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[He]=!0,H++)}}return K[J]==null?Z?K[J]===null?new m("The "+ue+" `"+ie+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new m("The "+ue+" `"+ie+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:E(K,J,le,ue,ie)}var Q=T.bind(null,!1);return Q.isRequired=T.bind(null,!0),Q}function v(E){function W(H,T,Q,Z,K,J){var le=H[T],ue=_(le);if(ue!==E){var ie=R(le);return new m("Invalid "+Z+" `"+K+"` of type "+("`"+ie+"` supplied to `"+Q+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return g(W)}function S(){return g(a)}function k(E){function W(H,T,Q,Z,K){if(typeof E!="function")return new m("Property `"+K+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var J=H[T];if(!Array.isArray(J)){var le=_(J);return new m("Invalid "+Z+" `"+K+"` of type "+("`"+le+"` supplied to `"+Q+"`, expected an array."))}for(var ue=0;ue<J.length;ue++){var ie=E(J,ue,Q,Z,K+"["+ue+"]",n);if(ie instanceof Error)return ie}return null}return g(W)}function j(){function E(W,H,T,Q,Z){var K=W[H];if(!o(K)){var J=_(K);return new m("Invalid "+Q+" `"+Z+"` of type "+("`"+J+"` supplied to `"+T+"`, expected a single ReactElement."))}return null}return g(E)}function C(){function E(W,H,T,Q,Z){var K=W[H];if(!t.isValidElementType(K)){var J=_(K);return new m("Invalid "+Q+" `"+Z+"` of type "+("`"+J+"` supplied to `"+T+"`, expected a single ReactElement type."))}return null}return g(E)}function b(E){function W(H,T,Q,Z,K){if(!(H[T]instanceof E)){var J=E.name||y,le=Y(H[T]);return new m("Invalid "+Z+" `"+K+"` of type "+("`"+le+"` supplied to `"+Q+"`, expected ")+("instance of `"+J+"`."))}return null}return g(W)}function w(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function W(H,T,Q,Z,K){for(var J=H[T],le=0;le<E.length;le++)if(p(J,E[le]))return null;var ue=JSON.stringify(E,function(ke,$){var He=R($);return He==="symbol"?String($):$});return new m("Invalid "+Z+" `"+K+"` of value `"+String(J)+"` "+("supplied to `"+Q+"`, expected one of "+ue+"."))}return g(W)}function x(E){function W(H,T,Q,Z,K){if(typeof E!="function")return new m("Property `"+K+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var J=H[T],le=_(J);if(le!=="object")return new m("Invalid "+Z+" `"+K+"` of type "+("`"+le+"` supplied to `"+Q+"`, expected an object."));for(var ue in J)if(r(J,ue)){var ie=E(J,ue,Q,Z,K+"."+ue,n);if(ie instanceof Error)return ie}return null}return g(W)}function L(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<E.length;W++){var H=E[W];if(typeof H!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(H)+" at index "+W+"."),a}function T(Q,Z,K,J,le){for(var ue=[],ie=0;ie<E.length;ie++){var ke=E[ie],$=ke(Q,Z,K,J,le,n);if($==null)return null;$.data&&r($.data,"expectedType")&&ue.push($.data.expectedType)}var He=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new m("Invalid "+J+" `"+le+"` supplied to "+("`"+K+"`"+He+"."))}return g(T)}function D(){function E(W,H,T,Q,Z){return P(W[H])?null:new m("Invalid "+Q+" `"+Z+"` supplied to "+("`"+T+"`, expected a ReactNode."))}return g(E)}function M(E,W,H,T,Q){return new m((E||"React class")+": "+W+" type `"+H+"."+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function I(E){function W(H,T,Q,Z,K){var J=H[T],le=_(J);if(le!=="object")return new m("Invalid "+Z+" `"+K+"` of type `"+le+"` "+("supplied to `"+Q+"`, expected `object`."));for(var ue in E){var ie=E[ue];if(typeof ie!="function")return M(Q,Z,K,ue,R(ie));var ke=ie(J,ue,Q,Z,K+"."+ue,n);if(ke)return ke}return null}return g(W)}function z(E){function W(H,T,Q,Z,K){var J=H[T],le=_(J);if(le!=="object")return new m("Invalid "+Z+" `"+K+"` of type `"+le+"` "+("supplied to `"+Q+"`, expected `object`."));var ue=e({},H[T],E);for(var ie in ue){var ke=E[ie];if(r(E,ie)&&typeof ke!="function")return M(Q,Z,K,ie,R(ke));if(!ke)return new m("Invalid "+Z+" `"+K+"` key `"+ie+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(H[T],null," ")+`
|
|
64
|
-
Valid keys: `+JSON.stringify(Object.keys(E),null," "));var $=ke(J,ie,Q,Z,K+"."+ie,n);if($)return $}return null}return g(W)}function
|
|
62
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NI(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function MI(t){if(Array.isArray(t))return kc(t)}function Wp(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Zt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Wp(Object(n),!0).forEach(function(r){_I(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wp(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function _I(t,e,n){return(e=RI(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function RI(t){var e=DI(t,"string");return oa(e)=="symbol"?e:e+""}function DI(t,e){if(oa(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(oa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function jc(){var t,e,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(h,p,m,g){var v=p&&p.prototype instanceof o?p:o,S=Object.create(v.prototype);return Gt(S,"_invoke",function(k,j,C){var b,w,x,L=0,D=C||[],M=!1,I={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(T,_){return b=T,w=0,x=t,I.n=_,a}};function z(O,T){for(w=O,x=T,e=0;!M&&L&&!_&&e<D.length;e++){var _,R=D[e],G=I.p,Y=R[2];O>3?(_=Y===T)&&(x=R[(w=R[4])?5:(w=3,3)],R[4]=R[5]=t):R[0]<=G&&((_=O<2&&G<R[1])?(w=0,I.v=T,I.n=R[1]):G<Y&&(_=O<3||R[0]>T||T>Y)&&(R[4]=O,R[5]=T,I.n=Y,w=0))}if(_||O>1)return a;throw M=!0,T}return function(O,T,_){if(L>1)throw TypeError("Generator is already running");for(M&&T===1&&z(T,_),w=T,x=_;(e=w<2?t:x)||!M;){b||(w?w<3?(w>1&&(I.n=-1),z(w,x)):I.n=x:I.v=x);try{if(L=2,b){if(w||(O="next"),e=b[O]){if(!(e=e.call(b,x)))throw TypeError("iterator result is not an object");if(!e.done)return e;x=e.value,w<2&&(w=0)}else w===1&&(e=b.return)&&e.call(b),w<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),w=1);b=t}else if((e=(M=I.n<0)?x:k.call(j,I))!==a)break}catch(R){b=t,w=1,x=R}finally{L=1}}return{value:e,done:M}}}(h,m,g),!0),S}var a={};function o(){}function l(){}function u(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(Gt(e={},r,function(){return this}),e),f=u.prototype=o.prototype=Object.create(d);function y(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Gt(h,i,"GeneratorFunction")),h.prototype=Object.create(f),h}return l.prototype=u,Gt(f,"constructor",u),Gt(u,"constructor",l),l.displayName="GeneratorFunction",Gt(u,i,"GeneratorFunction"),Gt(f),Gt(f,i,"Generator"),Gt(f,r,function(){return this}),Gt(f,"toString",function(){return"[object Generator]"}),(jc=function(){return{w:s,m:y}})()}function Gt(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(s){i=0}Gt=function(a,o,l,u){function d(f,y){Gt(a,f,function(h){return this._invoke(f,y,h)})}o?i?i(a,o,{value:l,enumerable:!u,configurable:!u,writable:!u}):a[o]=l:(d("next",0),d("throw",1),d("return",2))},Gt(t,e,n,r)}function Gp(t,e,n,r,i,s,a){try{var o=t[s](a),l=o.value}catch(u){return void n(u)}o.done?e(l):Promise.resolve(l).then(r,i)}function BI(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var s=t.apply(e,n);function a(l){Gp(s,r,i,a,o,"next",l)}function o(l){Gp(s,r,i,a,o,"throw",l)}a(void 0)})}}function Gn(t,e){return UI(t)||zI(t,e)||Tv(t,e)||FI()}function FI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tv(t,e){if(t){if(typeof t=="string")return kc(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kc(t,e):void 0}}function kc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function zI(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function UI(t){if(Array.isArray(t))return t}var Ci=5,Ns="Generating...",HI="Re-generating...",qI=100,WI=800,GI=["******************************","***********************","*******************************************************","***********************************************","***************************************************************","*******************************************************","*******************************************************","***********************************************"],QI=Array.from({length:Ci},function(t,e){return{id:"query-".concat(e),text:Ns,isRegenerating:!0}}),YI=function(){return Array.from({length:Ci},function(e,n){return{id:"query-".concat(n),text:"",isRegenerating:!1}})},VI=function(){var e,n,r,i=zo(),s=i.brandId,a="/setup/".concat(s,"/analysis"),o=ft(),l=It(),u=Zo(),d=F.useRef(!1),f=F.useState(QI),y=Gn(f,2),h=y[0],p=y[1],m=F.useState(!1),g=Gn(m,2),v=g[0],S=g[1],k=F.useState([]),j=Gn(k,2),C=j[0],b=j[1],w=F.useState([]),x=Gn(w,2),L=x[0],D=x[1],M=F.useState(!1),I=Gn(M,2),z=I[0],O=I[1],T=F.useState(null),_=Gn(T,2),R=_[0],G=_[1],Y=F.useState(!1),E=Gn(Y,2),W=E[0],H=E[1],P=VC({shouldBlock:!0}),Q=P.showModal,Z=P.confirmLeave,K=P.cancelLeave,J=F.useState(!1),le=Gn(J,2),ue=le[0],ie=le[1],ke=F.useState(null),$=Gn(ke,2),He=$[0],Nt=$[1],at=Tw(s||"",{query:{enabled:!!s}}),Ve=at.data,et=at.isRefetching,xn=at.error,ot=at.isError,Bn=at.refetch,Fn=va(s||"",{query:{enabled:!!s}}),Ue=Fn.data,ye=F.useCallback(function(te){var re;if(!(Ue!=null&&(re=Ue.data)!==null&&re!==void 0&&re.name))return!1;var ce=Ue.data.name.toLowerCase().trim();return ce?te.toLowerCase().includes(ce):!1},[Ue==null||(e=Ue.data)===null||e===void 0?void 0:e.name]),pe=F.useCallback(function(){return h.some(function(te){return ye(te.text)})},[h,ye]),Ae=function(){H(!1)},U=function(){H(!1),s&&Ee({brandId:s,data:{queries:h.map(function(re){return re.text})}})},X=function(){H(!1);var re=h.findIndex(function(ce){return ye(ce.text)});re!==-1&&setTimeout(function(){var ce=document.getElementById("query-text-".concat(re));ce&&(ce.focus(),ce.select())},qI)};function de(te){var re,ce,me,Me="Moderation error: one or more queries flagged by OpenAI moderation endpoint.",lt=te==null||(re=te.response)===null||re===void 0||(re=re.data)===null||re===void 0?void 0:re.flagged_queries;return(te==null||(ce=te.response)===null||ce===void 0?void 0:ce.status)===422&&(te==null||(me=te.response)===null||me===void 0||(me=me.data)===null||me===void 0?void 0:me.error)===Me&&Array.isArray(lt)?{flaggedQueries:lt}:null}var ve=jw({mutation:{onSuccess:function(){var te=BI(jc().m(function ce(me){return jc().w(function(Me){for(;;)switch(Me.n){case 0:if(G(null),!(me!=null&&me.status&&me.status>=200&&me.status<300)){Me.n=2;break}return Me.n=1,Promise.all([l.invalidateQueries({queryKey:Jo(s||"")}),l.invalidateQueries({queryKey:pn()})]);case 1:o(a);case 2:return Me.a(2)}},ce)}));function re(ce){return te.apply(this,arguments)}return re}(),onError:function(re){var ce,me,Me=de(re);if(Me){Nt({flaggedQueries:Me.flaggedQueries});return}if((re==null||(ce=re.response)===null||ce===void 0||(ce=ce.data)===null||ce===void 0?void 0:ce.message)==="Cannot update queries for a brand that has existing analyses."){o(a,{replace:!0});return}var lt=(re==null||(me=re.response)===null||me===void 0||(me=me.data)===null||me===void 0?void 0:me.message)||(re==null?void 0:re.message)||"An unexpected error occurred.";G(lt)}}}),Ee=ve.mutate,it=ve.isPending;F.useEffect(function(){s||o("/setup",{replace:!0})},[s,o,u]),F.useEffect(function(){var te;!(Ue!=null&&(te=Ue.data)!==null&&te!==void 0&&te.setupStatus)||d.current||(d.current=!0,Ue.data.setupStatus!=="pendingQuerySelection"&&(u("Queries cannot be changed for a brand with a pending analysis.",{variant:"warning"}),o(a,{replace:!0})))},[Ue==null||(n=Ue.data)===null||n===void 0?void 0:n.setupStatus,s,o,a,u]),F.useEffect(function(){var te;if(Ve!=null&&(te=Ve.data)!==null&&te!==void 0&&te.queries&&Array.isArray(Ve.data.queries)){var re=Ve.data.queries.slice(0,Ci),ce=re.map(function(Me,lt){return{id:"query-".concat(lt),text:Me,isRegenerating:!1}});p(ce),D(Ve.data.queries.slice(Ci))}else if(ot){var me=YI();p(me),D([])}},[Ve,ot]);var Xt=F.useCallback(function(te){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;setTimeout(function(){p(function(ce){return ce.map(function(me,Me){var lt=C.indexOf(Me.toString());return lt>=0&&te[lt]?Zt(Zt({},me),{},{text:te[lt],isRegenerating:!1}):Zt(Zt({},me),{},{isRegenerating:!1})})}),b([]),O(!1),S(!1),re&&D(function(ce){var me=new Set(te);return ce.filter(function(Me){return!me.has(Me)})})},WI)},[C]);F.useEffect(function(){if(z&&!et){var te;if(Ve!=null&&(te=Ve.data)!==null&&te!==void 0&&te.queries&&Array.isArray(Ve.data.queries)){var re=Ve.data.queries.slice(0,Ci),ce=C.map(Number);p(function(me){return me.map(function(Me,lt){var Hn=ce.indexOf(lt);return Zt(Zt({},Me),{},{text:Hn>=0&&re[Hn]?re[Hn]:Me.text,isRegenerating:!1})})}),b([]),O(!1),S(!1)}else ot&&(p(function(me){return me.map(function(Me){return Zt(Zt({},Me),{},{isRegenerating:!1})})}),b([]),O(!1),S(!1))}},[Ve,et,z,C,ot]);var yt=F.useCallback(function(te,re){var ce=new Set(re);return L.filter(function(me){return!ce.has(me)}).slice(0,te)},[L]),zn=F.useMemo(function(){return et||h.length===0||h.some(function(te){return te.isRegenerating||te.text===Ns&&!ot||te.text.trim()===""})||v},[et,h,v,ot]),wn=et||h.some(function(te){return te.text===Ns})&&!ot,Te=F.useCallback(function(te){var re=te.toString();b(function(ce){return ce.includes(re)?ce.filter(function(me){return me!==re}):[].concat(II(ce),[re])})},[]),An=F.useCallback(function(te,re){p(function(ce){return ce.map(function(me,Me){return Me===te?Zt(Zt({},me),{},{text:re}):me})})},[]),st=function(){S(!v),b([])},hl=F.useCallback(function(){if(!(et||C.length===0)){p(function(Me){return Me.map(function(lt,Hn){return Zt(Zt({},lt),{},{isRegenerating:C.includes(Hn.toString())})})});var te=h.map(function(Me){return Me.text}),re=C.length,ce=yt(re,te),me=ce.length>=re;me?Xt(ce,!0):(O(!0),Bn())}},[et,C,Bn,h,yt,Xt]),ja=F.useCallback(function(te){if(te.preventDefault(),Nt(null),!!s){if(pe()){H(!0);return}Ee({brandId:s,data:{queries:h.map(function(re){return re.text})}})}},[s,h,Ee,pe]),Un=function(){ie(!0)};return c.jsxs("div",{children:[He&&c.jsxs(A.Alert,{className:"yst-mb-4",variant:"error",children:[c.jsx("strong",{children:"Moderation Error"}),c.jsxs("div",{className:"yst-mt-2",children:[c.jsx("span",{children:"Some of your queries include content that our AI moderation system can’t process."}),c.jsx("br",{}),c.jsx("span",{children:"These queries were flagged and won’t be saved:"}),c.jsx("ul",{className:"yst-ml-4 yst-list-disc",children:He.flaggedQueries.map(function(te,re){return c.jsx("li",{children:te.query},re)})}),c.jsx("br",{}),c.jsx("span",{children:"Edit or replace them to continue."})]})]}),R&&c.jsx(A.Alert,{className:"yst-mb-4",variant:"error",children:R}),c.jsxs("form",{onSubmit:ja,children:[c.jsxs("div",{className:"yst-mb-8",children:[c.jsx(A.Title,{size:"2",className:"yst-mb-2",children:"Your queries"}),c.jsxs("div",{className:"yst-space-y-4",children:[c.jsx("p",{children:"You can edit your queries or regenerate new ones with AI."}),c.jsx("div",{className:oe("yst-flex yst-gap-2",v?"yst-justify-end":"yst-justify-start"),children:v?c.jsxs(c.Fragment,{children:[c.jsx(A.Button,{size:"small",variant:"secondary",onClick:st,children:"Done"}),c.jsxs(A.Button,{variant:"secondary",size:"small",onClick:hl,className:"yst-gap-1",isLoading:et||z,disabled:z||et||C.length===0,children:[c.jsx(Bu,{"aria-hidden":"true"}),"Regenerate selected queries"]})]}):c.jsxs(A.Button,{size:"small",variant:"secondary",onClick:st,disabled:wn||ot,children:[c.jsx(dA,{}),"Select queries to regenerate"]})})]})]}),c.jsx("div",{className:"yst-mb-8",children:h.length===0?GI.map(function(te,re){return c.jsx("div",{className:oe("yst-mb-4 yst-cursor-pointer yst-rounded yst-border yst-border-slate-300 yst-p-3 yst-transition-colors","yst-bg-white"),children:c.jsx(A.SkeletonLoader,{children:te||"Example placeholder query for demonstration purposes."})},"placeholder-query-".concat(re))}):h.slice(0,Ci).map(function(te,re){var ce=te.isRegenerating?te.text===Ns?Ns:HI:te.text;return c.jsx("div",{className:oe("yst-mb-4"),children:c.jsxs("div",{className:"yst-flex yst-gap-2",children:[v&&c.jsx("div",{className:"yst-flex yst-items-center",children:c.jsx(A.Checkbox,{id:"query-regenerate-".concat(re),name:"query-regenerate-".concat(re),value:re.toString(),checked:C.includes(re.toString()),onChange:function(){return Te(re)},disabled:et})}),c.jsx("div",{className:"yst-flex-1",children:c.jsx(A.TextField,{id:"query-text-".concat(re),label:"Query ".concat(re+1),type:"text",value:ce,onChange:function(me){te.isRegenerating||An(re,me.target.value)},placeholder:"Enter your query...",className:"yst-w-full",disabled:te.isRegenerating,required:!0,minLength:3,maxLength:255,validation:ye(te.text)?{variant:"warning",message:"For more accurate insights, avoid using your brand name in the query."}:void 0})})]})},te.id)})}),c.jsx(Ev,{buttonText:"Run analysis (~ 5 minutes)",isButtonDisabled:zn,isLoading:it})]}),c.jsx(A.Modal,{isOpen:ot&&Sx(xn)&&(xn==null||(r=xn.response)===null||r===void 0?void 0:r.status)===429&&!ue,onClose:Un,position:"center",as:"div",children:c.jsx(A.Modal.Panel,{children:c.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[c.jsx("div",{children:c.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-red-100",children:c.jsx(oo,{className:"yst-h-6 yst-w-6 yst-text-red-600"})})}),c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Query regeneration limit reached"})}),c.jsx(A.Modal.Container.Content,{className:"yst-mb-6 yst-space-y-3",children:c.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"You’ve used all your query regenerations for this brand analysis, but you can still edit your queries manually."})}),c.jsx(A.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:c.jsx(A.Button,{variant:"primary",onClick:Un,children:"Edit queries manually"})})]})]})})}),c.jsx(A.Modal,{isOpen:W,onClose:Ae,position:"center",as:"div",children:c.jsx(A.Modal.Panel,{children:c.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[c.jsx("div",{children:c.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-amber-100",children:c.jsx(oo,{className:"yst-h-6 yst-w-6 yst-text-amber-600"})})}),c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Brand name detected in your queries"})}),c.jsxs(A.Modal.Container.Content,{className:"yst-mb-6 yst-space-y-3",children:[c.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"We found your brand name in one or more of your queries. Using your brand name in queries often show more mentions and more positive sentiment, which can skew your results."}),c.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"For more balanced results, remove your brand name or make the queries more general."})]}),c.jsxs(A.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:[c.jsxs(A.Button,{onClick:U,variant:"secondary",disabled:it,isLoading:it,children:[c.jsx(Bu,{}),"Run analysis anyway"]}),c.jsx(A.Button,{variant:"primary",onClick:X,children:"Review and edit queries"})]})]})]})})}),c.jsx(A.Modal,{isOpen:Q,onClose:K,position:"center",as:"div",children:c.jsx(A.Modal.Panel,{children:c.jsxs("div",{className:"yst-flex yst-items-start yst-justify-stretch yst-gap-4",children:[c.jsx("div",{children:c.jsx("span",{className:"yst-inline-flex yst-h-10 yst-w-10 yst-items-center yst-justify-center yst-rounded-full yst-bg-amber-100",children:c.jsx(oo,{className:"yst-h-6 yst-w-6 yst-text-amber-600"})})}),c.jsxs("div",{className:"yst-flex-1",children:[c.jsx(A.Modal.Container.Header,{className:"yst-mb-3 yst-w-full",children:c.jsx(A.Modal.Title,{as:"h3",className:"yst-text-lg yst-font-medium",children:"Leave this page?"})}),c.jsx(A.Modal.Container.Content,{className:"yst-mb-6",children:c.jsx("p",{className:"yst-text-sm yst-text-slate-600",children:"You have unsaved changes. Finish setting up your brand to save your queries. Leaving this page will discard your queries."})}),c.jsxs(A.Modal.Container.Footer,{className:"yst-flex yst-justify-end yst-gap-3",children:[c.jsx(A.Button,{onClick:K,variant:"secondary",children:"No, stay on page"}),c.jsx(A.Button,{variant:"primary",onClick:Z,children:"Yes, discard queries"})]})]})]})})})]})};const KI=Object.freeze(Object.defineProperty({__proto__:null,default:VI},Symbol.toStringTag,{value:"Module"}));var $a={exports:{}},eo={exports:{}},Ie={};var Qp;function XI(){if(Qp)return Ie;Qp=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,y=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function k(C){if(typeof C=="object"&&C!==null){var b=C.$$typeof;switch(b){case e:switch(C=C.type,C){case l:case u:case r:case s:case i:case f:return C;default:switch(C=C&&C.$$typeof,C){case o:case d:case p:case h:case a:return C;default:return b}}case n:return b}}}function j(C){return k(C)===u}return Ie.AsyncMode=l,Ie.ConcurrentMode=u,Ie.ContextConsumer=o,Ie.ContextProvider=a,Ie.Element=e,Ie.ForwardRef=d,Ie.Fragment=r,Ie.Lazy=p,Ie.Memo=h,Ie.Portal=n,Ie.Profiler=s,Ie.StrictMode=i,Ie.Suspense=f,Ie.isAsyncMode=function(C){return j(C)||k(C)===l},Ie.isConcurrentMode=j,Ie.isContextConsumer=function(C){return k(C)===o},Ie.isContextProvider=function(C){return k(C)===a},Ie.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===e},Ie.isForwardRef=function(C){return k(C)===d},Ie.isFragment=function(C){return k(C)===r},Ie.isLazy=function(C){return k(C)===p},Ie.isMemo=function(C){return k(C)===h},Ie.isPortal=function(C){return k(C)===n},Ie.isProfiler=function(C){return k(C)===s},Ie.isStrictMode=function(C){return k(C)===i},Ie.isSuspense=function(C){return k(C)===f},Ie.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===r||C===u||C===s||C===i||C===f||C===y||typeof C=="object"&&C!==null&&(C.$$typeof===p||C.$$typeof===h||C.$$typeof===a||C.$$typeof===o||C.$$typeof===d||C.$$typeof===g||C.$$typeof===v||C.$$typeof===S||C.$$typeof===m)},Ie.typeOf=k,Ie}var Le={};var Yp;function JI(){return Yp||(Yp=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,s=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,u=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,f=t?Symbol.for("react.suspense"):60113,y=t?Symbol.for("react.suspense_list"):60120,h=t?Symbol.for("react.memo"):60115,p=t?Symbol.for("react.lazy"):60116,m=t?Symbol.for("react.block"):60121,g=t?Symbol.for("react.fundamental"):60117,v=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function k($){return typeof $=="string"||typeof $=="function"||$===r||$===u||$===s||$===i||$===f||$===y||typeof $=="object"&&$!==null&&($.$$typeof===p||$.$$typeof===h||$.$$typeof===a||$.$$typeof===o||$.$$typeof===d||$.$$typeof===g||$.$$typeof===v||$.$$typeof===S||$.$$typeof===m)}function j($){if(typeof $=="object"&&$!==null){var He=$.$$typeof;switch(He){case e:var Nt=$.type;switch(Nt){case l:case u:case r:case s:case i:case f:return Nt;default:var at=Nt&&Nt.$$typeof;switch(at){case o:case d:case p:case h:case a:return at;default:return He}}case n:return He}}}var C=l,b=u,w=o,x=a,L=e,D=d,M=r,I=p,z=h,O=n,T=s,_=i,R=f,G=!1;function Y($){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),E($)||j($)===l}function E($){return j($)===u}function W($){return j($)===o}function H($){return j($)===a}function P($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function Q($){return j($)===d}function Z($){return j($)===r}function K($){return j($)===p}function J($){return j($)===h}function le($){return j($)===n}function ue($){return j($)===s}function ie($){return j($)===i}function ke($){return j($)===f}Le.AsyncMode=C,Le.ConcurrentMode=b,Le.ContextConsumer=w,Le.ContextProvider=x,Le.Element=L,Le.ForwardRef=D,Le.Fragment=M,Le.Lazy=I,Le.Memo=z,Le.Portal=O,Le.Profiler=T,Le.StrictMode=_,Le.Suspense=R,Le.isAsyncMode=Y,Le.isConcurrentMode=E,Le.isContextConsumer=W,Le.isContextProvider=H,Le.isElement=P,Le.isForwardRef=Q,Le.isFragment=Z,Le.isLazy=K,Le.isMemo=J,Le.isPortal=le,Le.isProfiler=ue,Le.isStrictMode=ie,Le.isSuspense=ke,Le.isValidElementType=k,Le.typeOf=j}()),Le}var Vp;function Pv(){return Vp||(Vp=1,process.env.NODE_ENV==="production"?eo.exports=XI():eo.exports=JI()),eo.exports}var ou,Kp;function ZI(){if(Kp)return ou;Kp=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function i(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},o=0;o<10;o++)a["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(a).map(function(d){return a[d]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(d){u[d]=d}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch(d){return!1}}return ou=i()?Object.assign:function(s,a){for(var o,l=r(s),u,d=1;d<arguments.length;d++){o=Object(arguments[d]);for(var f in o)e.call(o,f)&&(l[f]=o[f]);if(t){u=t(o);for(var y=0;y<u.length;y++)n.call(o,u[y])&&(l[u[y]]=o[u[y]])}}return l},ou}var lu,Xp;function wd(){if(Xp)return lu;Xp=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lu=t,lu}var uu,Jp;function Iv(){return Jp||(Jp=1,uu=Function.call.bind(Object.prototype.hasOwnProperty)),uu}var cu,Zp;function $I(){if(Zp)return cu;Zp=1;var t=function(){};if(process.env.NODE_ENV!=="production"){var e=wd(),n={},r=Iv();t=function(s){var a="Warning: "+s;typeof console!="undefined"&&console.error(a);try{throw new Error(a)}catch(o){}}}function i(s,a,o,l,u){if(process.env.NODE_ENV!=="production"){for(var d in s)if(r(s,d)){var f;try{if(typeof s[d]!="function"){var y=Error((l||"React class")+": "+o+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw y.name="Invariant Violation",y}f=s[d](a,d,l,o,null,e)}catch(p){f=p}if(f&&!(f instanceof Error)&&t((l||"React class")+": type specification of "+o+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=u?u():"";t("Failed "+o+" type: "+f.message+(h!=null?h:""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},cu=i,cu}var du,$p;function eL(){if($p)return du;$p=1;var t=Pv(),e=ZI(),n=wd(),r=Iv(),i=$I(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(o){var l="Warning: "+o;typeof console!="undefined"&&console.error(l);try{throw new Error(l)}catch(u){}});function a(){return null}return du=function(o,l){var u=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function f(E){var W=E&&(u&&E[u]||E[d]);if(typeof W=="function")return W}var y="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:S(),arrayOf:k,element:j(),elementType:C(),instanceOf:b,node:D(),objectOf:x,oneOf:w,oneOfType:L,shape:I,exact:z};function p(E,W){return E===W?E!==0||1/E===1/W:E!==E&&W!==W}function m(E,W){this.message=E,this.data=W&&typeof W=="object"?W:{},this.stack=""}m.prototype=Error.prototype;function g(E){if(process.env.NODE_ENV!=="production")var W={},H=0;function P(Z,K,J,le,ue,ie,ke){if(le=le||y,ie=ie||J,ke!==n){if(l){var $=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw $.name="Invariant Violation",$}else if(process.env.NODE_ENV!=="production"&&typeof console!="undefined"){var He=le+":"+J;!W[He]&&H<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ie+"` prop on `"+le+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),W[He]=!0,H++)}}return K[J]==null?Z?K[J]===null?new m("The "+ue+" `"+ie+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new m("The "+ue+" `"+ie+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:E(K,J,le,ue,ie)}var Q=P.bind(null,!1);return Q.isRequired=P.bind(null,!0),Q}function v(E){function W(H,P,Q,Z,K,J){var le=H[P],ue=_(le);if(ue!==E){var ie=R(le);return new m("Invalid "+Z+" `"+K+"` of type "+("`"+ie+"` supplied to `"+Q+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return g(W)}function S(){return g(a)}function k(E){function W(H,P,Q,Z,K){if(typeof E!="function")return new m("Property `"+K+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var J=H[P];if(!Array.isArray(J)){var le=_(J);return new m("Invalid "+Z+" `"+K+"` of type "+("`"+le+"` supplied to `"+Q+"`, expected an array."))}for(var ue=0;ue<J.length;ue++){var ie=E(J,ue,Q,Z,K+"["+ue+"]",n);if(ie instanceof Error)return ie}return null}return g(W)}function j(){function E(W,H,P,Q,Z){var K=W[H];if(!o(K)){var J=_(K);return new m("Invalid "+Q+" `"+Z+"` of type "+("`"+J+"` supplied to `"+P+"`, expected a single ReactElement."))}return null}return g(E)}function C(){function E(W,H,P,Q,Z){var K=W[H];if(!t.isValidElementType(K)){var J=_(K);return new m("Invalid "+Q+" `"+Z+"` of type "+("`"+J+"` supplied to `"+P+"`, expected a single ReactElement type."))}return null}return g(E)}function b(E){function W(H,P,Q,Z,K){if(!(H[P]instanceof E)){var J=E.name||y,le=Y(H[P]);return new m("Invalid "+Z+" `"+K+"` of type "+("`"+le+"` supplied to `"+Q+"`, expected ")+("instance of `"+J+"`."))}return null}return g(W)}function w(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function W(H,P,Q,Z,K){for(var J=H[P],le=0;le<E.length;le++)if(p(J,E[le]))return null;var ue=JSON.stringify(E,function(ke,$){var He=R($);return He==="symbol"?String($):$});return new m("Invalid "+Z+" `"+K+"` of value `"+String(J)+"` "+("supplied to `"+Q+"`, expected one of "+ue+"."))}return g(W)}function x(E){function W(H,P,Q,Z,K){if(typeof E!="function")return new m("Property `"+K+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var J=H[P],le=_(J);if(le!=="object")return new m("Invalid "+Z+" `"+K+"` of type "+("`"+le+"` supplied to `"+Q+"`, expected an object."));for(var ue in J)if(r(J,ue)){var ie=E(J,ue,Q,Z,K+"."+ue,n);if(ie instanceof Error)return ie}return null}return g(W)}function L(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var W=0;W<E.length;W++){var H=E[W];if(typeof H!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(H)+" at index "+W+"."),a}function P(Q,Z,K,J,le){for(var ue=[],ie=0;ie<E.length;ie++){var ke=E[ie],$=ke(Q,Z,K,J,le,n);if($==null)return null;$.data&&r($.data,"expectedType")&&ue.push($.data.expectedType)}var He=ue.length>0?", expected one of type ["+ue.join(", ")+"]":"";return new m("Invalid "+J+" `"+le+"` supplied to "+("`"+K+"`"+He+"."))}return g(P)}function D(){function E(W,H,P,Q,Z){return O(W[H])?null:new m("Invalid "+Q+" `"+Z+"` supplied to "+("`"+P+"`, expected a ReactNode."))}return g(E)}function M(E,W,H,P,Q){return new m((E||"React class")+": "+W+" type `"+H+"."+P+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function I(E){function W(H,P,Q,Z,K){var J=H[P],le=_(J);if(le!=="object")return new m("Invalid "+Z+" `"+K+"` of type `"+le+"` "+("supplied to `"+Q+"`, expected `object`."));for(var ue in E){var ie=E[ue];if(typeof ie!="function")return M(Q,Z,K,ue,R(ie));var ke=ie(J,ue,Q,Z,K+"."+ue,n);if(ke)return ke}return null}return g(W)}function z(E){function W(H,P,Q,Z,K){var J=H[P],le=_(J);if(le!=="object")return new m("Invalid "+Z+" `"+K+"` of type `"+le+"` "+("supplied to `"+Q+"`, expected `object`."));var ue=e({},H[P],E);for(var ie in ue){var ke=E[ie];if(r(E,ie)&&typeof ke!="function")return M(Q,Z,K,ie,R(ke));if(!ke)return new m("Invalid "+Z+" `"+K+"` key `"+ie+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(H[P],null," ")+`
|
|
64
|
+
Valid keys: `+JSON.stringify(Object.keys(E),null," "));var $=ke(J,ie,Q,Z,K+"."+ie,n);if($)return $}return null}return g(W)}function O(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(O);if(E===null||o(E))return!0;var W=f(E);if(W){var H=W.call(E),P;if(W!==E.entries){for(;!(P=H.next()).done;)if(!O(P.value))return!1}else for(;!(P=H.next()).done;){var Q=P.value;if(Q&&!O(Q[1]))return!1}}else return!1;return!0;default:return!1}}function T(E,W){return E==="symbol"?!0:W?W["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&W instanceof Symbol:!1}function _(E){var W=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":T(W,E)?"symbol":W}function R(E){if(typeof E=="undefined"||E===null)return""+E;var W=_(E);if(W==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return W}function G(E){var W=R(E);switch(W){case"array":case"object":return"an "+W;case"boolean":case"date":case"regexp":return"a "+W;default:return W}}function Y(E){return!E.constructor||!E.constructor.name?y:E.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},du}var fu,em;function tL(){if(em)return fu;em=1;var t=wd();function e(){}function n(){}return n.resetWarningCache=e,fu=function(){function r(a,o,l,u,d,f){if(f!==t){var y=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw y.name="Invariant Violation",y}}r.isRequired=r;function i(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return s.PropTypes=s,s},fu}var tm;function nL(){if(tm)return $a.exports;if(tm=1,process.env.NODE_ENV!=="production"){var t=Pv(),e=!0;$a.exports=eL()(t.isElement,e)}else $a.exports=tL()();return $a.exports}var rL=nL();const nm=Bo(rL);var iL=["min","max","progress","className"];function sL(t,e){if(t==null)return{};var n,r,i=aL(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function aL(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}var Lv=F.forwardRef(function(t,e){var n=t.min,r=t.max,i=t.progress,s=t.className,a=sL(t,iL),o=F.useMemo(function(){var u=Math.max(0,r-n);if(u===0)return 0;var d=(i-n)/u*100;return Math.max(0,Math.min(100,d))},[n,r,i]),l=Math.min(Math.max(i,n),r);return c.jsx("div",{ref:e,role:"progressbar","aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":l,"aria-valuetext":"".concat(Math.round(o),"%"),className:oe(s),...a,children:c.jsx("div",{className:"yst-relative yst-h-2 yst-w-full yst-overflow-hidden yst-rounded-full yst-bg-slate-200/40",children:c.jsx("div",{className:"yst-absolute yst-left-0 yst-top-0 yst-h-full yst-rounded-full yst-bg-[linear-gradient(97.38deg,_#A61E69_0%,_#6366F1_100%)] yst-transition-[width] yst-duration-300 yst-ease-out",style:{width:"".concat(o,"%")}})})})});Lv.displayName="ProgressBarGradient";var As=[{labelAbove:"Running queries...",threshold:80},{labelAbove:"Building analysis...",threshold:90},{labelAbove:"Finalizing...",threshold:99},{labelAbove:"Done!",threshold:100}],Nv=function(e){var n=e.progress,r=n===void 0?0:n,i=e.className,s=i===void 0?"":i,a=function(){for(var d=0;d<As.length;d++)if(r<=As[d].threshold)return As[d];return As[As.length-1]},o=a(),l=r<=80;return c.jsxs("div",{className:oe("yst-font-medium yst-text-slate-800",s),children:[c.jsxs("div",{className:"yst-flex yst-items-center yst-justify-center yst-gap-2",children:[r<100?c.jsx(A.Spinner,{}):c.jsx(E0,{className:"yst-text-green-400"}),c.jsx("span",{className:"yst-text-sm yst-font-medium yst-italic",children:o.labelAbove})]}),c.jsx(Lv,{className:"yst-mt-3",progress:r,min:0,max:100}),c.jsxs("div",{className:"yst-mt-3 yst-flex yst-justify-between yst-text-xs",children:[c.jsx("span",{children:c.jsx(Qs,{disabled:!l,children:"Running queries"})}),c.jsx("span",{children:c.jsx(Qs,{disabled:l,children:"Building analysis"})})]})]})};Nv.propTypes={progress:nm.number,className:nm.string};function oL(t,e){return dL(t)||cL(t,e)||uL(t,e)||lL()}function lL(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
65
65
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uL(t,e){if(t){if(typeof t=="string")return rm(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rm(t,e):void 0}}function rm(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function cL(t,e){var n=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return o}}function dL(t){if(Array.isArray(t))return t}var fL=function(e){switch(e){case"pending":case"processing":return 2*1e3;case"completed":return!1;default:return 10*1e3}},hL=function(){var e,n,r,i=ft(),s=It(),a=zo(),o=xt(),l=o.brandId,u=a.brandId||l,d=F.useState(null),f=oL(d,2),y=f[0],h=f[1],p=va(u,{query:{enabled:!!u,select:function(L){var D=L.data;return D}}}),m=p.data,g=Xx(u,"latest",{query:{enabled:!!u,select:function(L){var D=L.data;return D},refetchInterval:function(L){var D,M=L==null||(D=L.state)===null||D===void 0||(D=D.data)===null||D===void 0?void 0:D.data;return fL(M==null?void 0:M.status)}}}),v=g.data,S=v==null?void 0:v.id,k=S?"/brands/".concat(u,"/analysis/").concat(S):"/brands/".concat(u);F.useEffect(function(){var x=(v==null?void 0:v.status)==="pending"||(v==null?void 0:v.status)==="processing"||(v==null?void 0:v.status)==="completed";m!=null&&m.nextScheduledAnalysis&&v!==null&&v!==void 0&&v.status&&t5(m.nextScheduledAnalysis,5)&&!x&&i("/brands/".concat(u),{replace:!0})},[m==null?void 0:m.nextScheduledAnalysis,u,i,v==null?void 0:v.status]),F.useEffect(function(){((m==null?void 0:m.setupStatus)==="completed"||(m==null?void 0:m.setupStatus)==="firstAnalysisNotScheduled"||(m==null?void 0:m.setupStatus)==="scheduledFirstAnalysis"&&m!==null&&m!==void 0&&m.firstNextAnalysisOpportunity&&!U0(m.firstNextAnalysisOpportunity,2))&&i(k,{replace:!0})},[m==null?void 0:m.firstNextAnalysisOpportunity,m==null?void 0:m.setupStatus,k,i]);var j=m==null||(e=m.queries)===null||e===void 0?void 0:e.length,C=(v==null||(n=v.completedQueries)===null||n===void 0?void 0:n.length)||0;F.useEffect(function(){if((v==null?void 0:v.status)==="processing"&&j&&C===j){h("building");var x=setTimeout(function(){h("finalizing")},1e4);return function(){return clearTimeout(x)}}else h(null)},[v==null?void 0:v.status,j,C]);var b=function(){if(j&&j>0){var x=80/j,L=C*x;return(v==null?void 0:v.status)==="completed"?100:(v==null?void 0:v.status)==="processing"&&C===j&&y!==null?y==="building"?90:95:Math.round(Math.min(L,80))}return 0}(),w=b<=80||b===100;return c.jsxs("div",{children:[c.jsxs("div",{className:"yst-space-y-8",children:[c.jsx(Nv,{progress:b}),w&&c.jsxs(c.Fragment,{children:[c.jsx(li,{}),c.jsx("div",{className:"yst-space-y-8",children:m==null||(r=m.queries)===null||r===void 0?void 0:r.map(function(x){var L,D=x.id,M=x.query,I=D&&(v==null||(L=v.completedQueries)===null||L===void 0?void 0:L.includes(D));return c.jsxs("div",{className:oe("yst-flex yst-items-center yst-justify-between yst-gap-3"),children:[I===!0?c.jsx(E0,{className:"yst-h-5 yst-w-5 yst-text-green-400"}):c.jsx(A.Spinner,{}),c.jsx("span",{className:"yst-flex-1 yst-text-sm",children:M})]},"result-item-".concat(M))})})]})]}),c.jsx("div",{className:"yst-mb-[-2rem] yst-ml-[-2rem] yst-mr-[-2rem] yst-mt-8 yst-flex yst-justify-end yst-gap-4 yst-rounded-bl-lg yst-rounded-br-lg yst-border-t yst-border-slate-200 yst-bg-slate-50 yst-px-8 yst-py-6",children:c.jsx(A.Button,{as:an,to:k,onClick:function(x){if(b!==100){x.preventDefault();return}s.clear()},disabled:b!==100,children:"Continue →"})})]})};const yL=Object.freeze(Object.defineProperty({__proto__:null,default:hL},Symbol.toStringTag,{value:"Module"}));function Ss(t){return t?new Date(t).toLocaleString():"-"}var pL=function(){var e,n,r,i,s,a,o,l=_w({query:{select:function(h){var p=h.data;return p}}}),u=l.data,d=l.isLoading,f=l.error;return d?c.jsxs(A.Card,{children:[c.jsx(er,{title:"Account debug"}),c.jsx(A.Card.Content,{children:c.jsx("p",{className:"yst-text-slate-500",children:"Loading..."})})]}):f||!u?c.jsxs(A.Card,{children:[c.jsx(er,{title:"Account debug"}),c.jsx(A.Card.Content,{children:c.jsx("p",{className:"yst-text-red-600",children:"Failed to load account debug info."})})]}):c.jsxs("div",{className:"yst-space-y-6",children:[c.jsxs(A.Card,{children:[c.jsx(er,{title:"MyYoast subscription info",description:"What MyYoast reports about your account."}),c.jsx(A.Card.Content,{children:c.jsx("table",{className:"yst-w-full yst-text-sm",children:c.jsxs("tbody",{children:[c.jsxs("tr",{className:"yst-border-b yst-border-slate-200",children:[c.jsx("td",{className:"yst-py-3 yst-pr-4 yst-font-medium yst-text-slate-700",children:"Weekly analysis limit"}),c.jsx("td",{className:"yst-py-3",children:(e=(n=u.myYoast)===null||n===void 0?void 0:n.weeklyLimit)!==null&&e!==void 0?e:"-"})]}),c.jsxs("tr",{className:"yst-border-b yst-border-slate-200",children:[c.jsx("td",{className:"yst-py-3 yst-pr-4 yst-font-medium yst-text-slate-700",children:"Eligible for free trial (MyYoast)"}),c.jsx("td",{className:"yst-py-3",children:c.jsx(A.Badge,{variant:(r=u.myYoast)!==null&&r!==void 0&&r.isEligibleForFreeTrial?"info":"plain",children:(i=u.myYoast)!==null&&i!==void 0&&i.isEligibleForFreeTrial?"Yes":"No"})})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"yst-py-3 yst-pr-4 yst-font-medium yst-text-slate-700",children:"Eligible for trial analysis (AIBI)"}),c.jsx("td",{className:"yst-py-3",children:c.jsx(A.Badge,{variant:(s=u.myYoast)!==null&&s!==void 0&&s.isEligibleForTrialAnalysis?"info":"plain",children:(a=u.myYoast)!==null&&a!==void 0&&a.isEligibleForTrialAnalysis?"Yes":"No"})})]})]})})})]}),(o=u.brands)!==null&&o!==void 0&&o.length?u.brands.map(function(y){var h,p,m=(h=(p=u.analyses)===null||p===void 0?void 0:p.filter(function(g){return g.brandId===y.id}))!==null&&h!==void 0?h:[];return c.jsxs(A.Card,{children:[c.jsx(er,{title:c.jsxs("span",{className:"yst-flex yst-items-center yst-gap-3",children:[y.name,y.deletedAt?c.jsxs(A.Badge,{variant:"plain",children:["Deleted ",Ss(y.deletedAt)]}):c.jsx(A.Badge,{variant:"info",children:"Active"})]}),description:"Created ".concat(Ss(y.createdAt))}),c.jsx(A.Card.Content,{children:m.length===0?c.jsx("p",{className:"yst-text-slate-500",children:"No analyses for this brand."}):c.jsx("div",{className:"yst-overflow-x-auto",children:c.jsxs("table",{className:"yst-w-full yst-text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"yst-border-b yst-border-slate-300 yst-text-left",children:[c.jsx("th",{className:"yst-py-2 yst-pr-4 yst-font-medium yst-text-slate-700",children:"Created"}),c.jsx("th",{className:"yst-py-2 yst-pr-4 yst-font-medium yst-text-slate-700",children:"Finished"}),c.jsx("th",{className:"yst-py-2 yst-pr-4 yst-font-medium yst-text-slate-700",children:"Trial"}),c.jsx("th",{className:"yst-py-2 yst-font-medium yst-text-slate-700",children:"Status"})]})}),c.jsx("tbody",{children:m.map(function(g){return c.jsxs("tr",{className:"yst-border-b yst-border-slate-200",children:[c.jsx("td",{className:"yst-py-2 yst-pr-4",children:Ss(g.createdAt)}),c.jsx("td",{className:"yst-py-2 yst-pr-4",children:Ss(g.finishedAt)}),c.jsx("td",{className:"yst-py-2 yst-pr-4",children:g.isTrial?"Yes":"-"}),c.jsx("td",{className:"yst-py-2",children:g.deletedAt?c.jsxs(A.Badge,{variant:"plain",children:["Deleted ",Ss(g.deletedAt)]}):g.finishedAt?c.jsx(A.Badge,{variant:"info",children:"Completed"}):c.jsx(A.Badge,{variant:"plain",children:"In progress"})})]},g.id)})})]})})})]},y.id)}):c.jsxs(A.Card,{children:[c.jsx(er,{title:"Brands"}),c.jsx(A.Card.Content,{children:c.jsx("p",{className:"yst-text-slate-500",children:"No brands found."})})]})]})};const mL=Object.freeze(Object.defineProperty({__proto__:null,default:pL},Symbol.toStringTag,{value:"Module"}));exports.AIInsightsClient=l8;exports.setApiBaseUrl=y0;
|
|
66
66
|
//# sourceMappingURL=ai-insights-client.cjs.js.map
|