lighthouse
Version:
Automated auditing, performance metrics, and best practices for the web.
1 lines • 556 kB
JavaScript
"use strict";(()=>{var Ge,w,rn,ti,Ae,sn,tn,ln,Fe={},pn=[],ni=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ae(e,t){for(var n in t)e[n]=t[n];return e}function un(e){var t=e.parentNode;t&&t.removeChild(e)}function _t(e,t,n){var a,i,o,r={};for(o in t)o=="key"?a=t[o]:o=="ref"?i=t[o]:r[o]=t[o];if(arguments.length>2&&(r.children=arguments.length>3?Ge.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)r[o]===void 0&&(r[o]=e.defaultProps[o]);return Me(e,r,a,i,null)}function Me(e,t,n,a,i){var o={type:e,props:t,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++rn};return i==null&&w.vnode!=null&&w.vnode(o),o}function N(e){return e.children}function He(e,t){this.props=e,this.context=t}function fe(e,t){if(t==null)return e.__?fe(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?fe(e):null}function cn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return cn(e)}}function yt(e){(!e.__d&&(e.__d=!0)&&Ae.push(e)&&!Oe.__r++||tn!==w.debounceRendering)&&((tn=w.debounceRendering)||sn)(Oe)}function Oe(){for(var e;Oe.__r=Ae.length;)e=Ae.sort(function(t,n){return t.__v.__b-n.__v.__b}),Ae=[],e.some(function(t){var n,a,i,o,r,s;t.__d&&(r=(o=(n=t).__v).__e,(s=n.__P)&&(a=[],(i=ae({},o)).__v=o.__v+1,Ct(s,o,i,n.__n,s.ownerSVGElement!==void 0,o.__h!=null?[r]:null,a,r??fe(o),o.__h),gn(a,o),o.__e!=r&&cn(o)))})}function mn(e,t,n,a,i,o,r,s,p,c){var l,d,m,h,f,_,v,g=a&&a.__k||pn,b=g.length;for(n.__k=[],l=0;l<t.length;l++)if((h=n.__k[l]=(h=t[l])==null||typeof h=="boolean"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"?Me(null,h,null,null,h):Array.isArray(h)?Me(N,{children:h},null,null,null):h.__b>0?Me(h.type,h.props,h.key,null,h.__v):h)!=null){if(h.__=n,h.__b=n.__b+1,(m=g[l])===null||m&&h.key==m.key&&h.type===m.type)g[l]=void 0;else for(d=0;d<b;d++){if((m=g[d])&&h.key==m.key&&h.type===m.type){g[d]=void 0;break}m=null}Ct(e,h,m=m||Fe,i,o,r,s,p,c),f=h.__e,(d=h.ref)&&m.ref!=d&&(v||(v=[]),m.ref&&v.push(m.ref,null,h),v.push(d,h.__c||f,h)),f!=null?(_==null&&(_=f),typeof h.type=="function"&&h.__k===m.__k?h.__d=p=dn(h,p,e):p=hn(e,h,m,g,f,p),typeof n.type=="function"&&(n.__d=p)):p&&m.__e==p&&p.parentNode!=e&&(p=fe(m))}for(n.__e=_,l=b;l--;)g[l]!=null&&(typeof n.type=="function"&&g[l].__e!=null&&g[l].__e==n.__d&&(n.__d=fe(a,l+1)),vn(g[l],g[l]));if(v)for(l=0;l<v.length;l++)fn(v[l],v[++l],v[++l])}function dn(e,t,n){for(var a,i=e.__k,o=0;i&&o<i.length;o++)(a=i[o])&&(a.__=e,t=typeof a.type=="function"?dn(a,t,n):hn(n,a,a,i,a.__e,t));return t}function hn(e,t,n,a,i,o){var r,s,p;if(t.__d!==void 0)r=t.__d,t.__d=void 0;else if(n==null||i!=o||i.parentNode==null)e:if(o==null||o.parentNode!==e)e.appendChild(i),r=null;else{for(s=o,p=0;(s=s.nextSibling)&&p<a.length;p+=2)if(s==i)break e;e.insertBefore(i,o),r=o}return r!==void 0?r:i.nextSibling}function ai(e,t,n,a,i){var o;for(o in n)o==="children"||o==="key"||o in t||Be(e,o,null,n[o],a);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||Be(e,o,t[o],n[o],a)}function nn(e,t,n){t[0]==="-"?e.setProperty(t,n):e[t]=n==null?"":typeof n!="number"||ni.test(t)?n:n+"px"}function Be(e,t,n,a,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof a=="string"&&(e.style.cssText=a=""),a)for(t in a)n&&t in n||nn(e.style,t,"");if(n)for(t in n)a&&n[t]===a[t]||nn(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?a||e.addEventListener(t,o?on:an,o):e.removeEventListener(t,o?on:an,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n!=null&&(n!==!1||t[0]==="a"&&t[1]==="r")?e.setAttribute(t,n):e.removeAttribute(t))}}function an(e){this.l[e.type+!1](w.event?w.event(e):e)}function on(e){this.l[e.type+!0](w.event?w.event(e):e)}function Ct(e,t,n,a,i,o,r,s,p){var c,l,d,m,h,f,_,v,g,b,C,x=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(p=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=w.__b)&&c(t);try{e:if(typeof x=="function"){if(v=t.props,g=(c=x.contextType)&&a[c.__c],b=c?g?g.props.value:c.__:a,n.__c?_=(l=t.__c=n.__c).__=l.__E:("prototype"in x&&x.prototype.render?t.__c=l=new x(v,b):(t.__c=l=new He(v,b),l.constructor=x,l.render=oi),g&&g.sub(l),l.props=v,l.state||(l.state={}),l.context=b,l.__n=a,d=l.__d=!0,l.__h=[]),l.__s==null&&(l.__s=l.state),x.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=ae({},l.__s)),ae(l.__s,x.getDerivedStateFromProps(v,l.__s))),m=l.props,h=l.state,d)x.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(x.getDerivedStateFromProps==null&&v!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(v,b),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(v,l.__s,b)===!1||t.__v===n.__v){l.props=v,l.state=l.__s,t.__v!==n.__v&&(l.__d=!1),l.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(A){A&&(A.__=t)}),l.__h.length&&r.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(v,l.__s,b),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,h,f)})}l.context=b,l.props=v,l.state=l.__s,(c=w.__r)&&c(t),l.__d=!1,l.__v=t,l.__P=e,c=l.render(l.props,l.state,l.context),l.state=l.__s,l.getChildContext!=null&&(a=ae(ae({},a),l.getChildContext())),d||l.getSnapshotBeforeUpdate==null||(f=l.getSnapshotBeforeUpdate(m,h)),C=c!=null&&c.type===N&&c.key==null?c.props.children:c,mn(e,Array.isArray(C)?C:[C],t,n,a,i,o,r,s,p),l.base=t.__e,t.__h=null,l.__h.length&&r.push(l),_&&(l.__E=l.__=null),l.__e=!1}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=ii(n.__e,t,n,a,i,o,r,p);(c=w.diffed)&&c(t)}catch(A){t.__v=null,(p||o!=null)&&(t.__e=s,t.__h=!!p,o[o.indexOf(s)]=null),w.__e(A,t,n)}}function gn(e,t){w.__c&&w.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(a){a.call(n)})}catch(a){w.__e(a,n.__v)}})}function ii(e,t,n,a,i,o,r,s){var p,c,l,d=n.props,m=t.props,h=t.type,f=0;if(h==="svg"&&(i=!0),o!=null){for(;f<o.length;f++)if((p=o[f])&&"setAttribute"in p==!!h&&(h?p.localName===h:p.nodeType===3)){e=p,o[f]=null;break}}if(e==null){if(h===null)return document.createTextNode(m);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,m.is&&m),o=null,s=!1}if(h===null)d===m||s&&e.data===m||(e.data=m);else{if(o=o&&Ge.call(e.childNodes),c=(d=n.props||Fe).dangerouslySetInnerHTML,l=m.dangerouslySetInnerHTML,!s){if(o!=null)for(d={},f=0;f<e.attributes.length;f++)d[e.attributes[f].name]=e.attributes[f].value;(l||c)&&(l&&(c&&l.__html==c.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(ai(e,m,d,i,s),l)t.__k=[];else if(f=t.props.children,mn(e,Array.isArray(f)?f:[f],t,n,a,i&&h!=="foreignObject",o,r,o?o[0]:n.__k&&fe(n,0),s),o!=null)for(f=o.length;f--;)o[f]!=null&&un(o[f]);s||("value"in m&&(f=m.value)!==void 0&&(f!==e.value||h==="progress"&&!f||h==="option"&&f!==d.value)&&Be(e,"value",f,d.value,!1),"checked"in m&&(f=m.checked)!==void 0&&f!==e.checked&&Be(e,"checked",f,d.checked,!1))}return e}function fn(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(a){w.__e(a,n)}}function vn(e,t,n){var a,i;if(w.unmount&&w.unmount(e),(a=e.ref)&&(a.current&&a.current!==e.__e||fn(a,null,t)),(a=e.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(o){w.__e(o,t)}a.base=a.__P=null}if(a=e.__k)for(i=0;i<a.length;i++)a[i]&&vn(a[i],t,typeof e.type!="function");n||e.__e==null||un(e.__e),e.__e=e.__d=void 0}function oi(e,t,n){return this.constructor(e,n)}function bn(e,t,n){var a,i,o;w.__&&w.__(e,t),i=(a=typeof n=="function")?null:n&&n.__k||t.__k,o=[],Ct(t,e=(!a&&n||t).__k=_t(N,null,[e]),i||Fe,Fe,t.ownerSVGElement!==void 0,!a&&n?[n]:i?null:t.firstChild?Ge.call(t.childNodes):null,o,!a&&n?n:i?i.__e:t.firstChild,a),gn(o,e)}function Ee(e,t){var n={__c:t="__cC"+ln++,__:e,Consumer:function(a,i){return a.children(i)},Provider:function(a){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(r){this.props.value!==r.value&&i.some(yt)},this.sub=function(r){i.push(r);var s=r.componentWillUnmount;r.componentWillUnmount=function(){i.splice(i.indexOf(r),1),s&&s.call(r)}}),a.children}};return n.Provider.__=n.Consumer.contextType=n}Ge=pn.slice,w={__e:function(e,t,n,a){for(var i,o,r;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),r=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,a||{}),r=i.__d),r)return i.__E=i}catch(s){e=s}throw e}},rn=0,ti=function(e){return e!=null&&e.constructor===void 0},He.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ae({},this.state),typeof e=="function"&&(e=e(ae({},n),this.props)),e&&ae(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),yt(this))},He.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),yt(this))},He.prototype.render=N,Ae=[],sn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Oe.__r=0,ln=0;var ve,H,yn,$e=0,Pn=[],_n=w.__b,Cn=w.__r,wn=w.diffed,xn=w.__c,Sn=w.unmount;function Le(e,t){w.__h&&w.__h(H,e,$e||t),$e=0;var n=H.__H||(H.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ie(e){return $e=1,ri(An,e)}function ri(e,t,n){var a=Le(ve++,2);return a.t=e,a.__c||(a.__=[n?n(t):An(void 0,t),function(i){var o=a.t(a.__[0],i);a.__[0]!==o&&(a.__=[o,a.__[1]],a.__c.setState({}))}],a.__c=H),a.__}function qe(e,t){var n=Le(ve++,3);!w.__s&&xt(n.__H,t)&&(n.__=e,n.__H=t,H.__H.__h.push(n))}function We(e,t){var n=Le(ve++,4);!w.__s&&xt(n.__H,t)&&(n.__=e,n.__H=t,H.__h.push(n))}function Je(e){return $e=5,Q(function(){return{current:e}},[])}function Q(e,t){var n=Le(ve++,7);return xt(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Ue(e){var t=H.context[e.__c],n=Le(ve++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(H)),t.props.value):e.__}function si(){for(var e;e=Pn.shift();)if(e.__P)try{e.__H.__h.forEach(Ve),e.__H.__h.forEach(wt),e.__H.__h=[]}catch(t){e.__H.__h=[],w.__e(t,e.__v)}}w.__b=function(e){H=null,_n&&_n(e)},w.__r=function(e){Cn&&Cn(e),ve=0;var t=(H=e.__c).__H;t&&(t.__h.forEach(Ve),t.__h.forEach(wt),t.__h=[])},w.diffed=function(e){wn&&wn(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(Pn.push(t)!==1&&yn===w.requestAnimationFrame||((yn=w.requestAnimationFrame)||function(n){var a,i=function(){clearTimeout(o),kn&&cancelAnimationFrame(a),setTimeout(n)},o=setTimeout(i,100);kn&&(a=requestAnimationFrame(i))})(si)),H=null},w.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ve),n.__h=n.__h.filter(function(a){return!a.__||wt(a)})}catch(a){t.some(function(i){i.__h&&(i.__h=[])}),t=[],w.__e(a,n.__v)}}),xn&&xn(e,t)},w.unmount=function(e){Sn&&Sn(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(a){try{Ve(a)}catch(i){t=i}}),t&&w.__e(t,n.__v))};var kn=typeof requestAnimationFrame=="function";function Ve(e){var t=H,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),H=t}function wt(e){var t=H;e.__c=e.__(),H=t}function xt(e,t){return!e||e.length!==t.length||t.some(function(n,a){return n!==e[a]})}function An(e,t){return typeof t=="function"?t(e):t}var li=.8999999999999999,pi=.5,ui=.49999999999999994;function ci(e){let t=Math.sign(e);e=Math.abs(e);let n=.254829592,a=-.284496736,i=1.421413741,o=-1.453152027,r=1.061405429,p=1/(1+.3275911*e),c=p*(n+p*(a+p*(i+p*(o+p*r))));return t*(1-c*Math.exp(-e*e))}function En({median:e,p10:t},n){if(e<=0)throw new Error("median must be greater than zero");if(t<=0)throw new Error("p10 must be greater than zero");if(t>=e)throw new Error("p10 must be less than the median");if(n<=0)return 1;let a=.9061938024368232,i=Math.max(Number.MIN_VALUE,n/e),o=Math.log(i),r=Math.max(Number.MIN_VALUE,t/e),s=-Math.log(r),p=o*a/s,c=(1-ci(p))/2,l;return n<=t?l=Math.max(.9,Math.min(1,c)):n<=e?l=Math.max(pi,Math.min(li,c)):l=Math.max(0,Math.min(ui,c)),l}var ee="…",di=" ",Ln=.9,hi={PASS:{label:"pass",minScore:Ln},AVERAGE:{label:"average",minScore:.5},FAIL:{label:"fail"},ERROR:{label:"error"}},gi=["com","co","gov","edu","ac","org","go","gob","or","net","in","ne","nic","gouv","web","spb","blog","jus","kiev","mil","wi","qc","ca","bel","on"],U=class e{static get RATINGS(){return hi}static get PASS_THRESHOLD(){return Ln}static get MS_DISPLAY_VALUE(){return`%10d${di}ms`}static getFinalDisplayedUrl(t){if(t.finalDisplayedUrl)return t.finalDisplayedUrl;if(t.finalUrl)return t.finalUrl;throw new Error("Could not determine final displayed URL")}static getMainDocumentUrl(t){return t.mainDocumentUrl||t.finalUrl}static getFullPageScreenshot(t){return t.fullPageScreenshot?t.fullPageScreenshot:t.audits["full-page-screenshot"]?.details}static getEntityFromUrl(t,n){return n&&n.find(i=>i.origins.find(o=>t.startsWith(o)))||e.getPseudoRootDomain(t)}static splitMarkdownCodeSpans(t){let n=[],a=t.split(/`(.*?)`/g);for(let i=0;i<a.length;i++){let o=a[i];if(!o)continue;let r=i%2!==0;n.push({isCode:r,text:o})}return n}static splitMarkdownLink(t){let n=[],a=t.split(/\[([^\]]+?)\]\((https?:\/\/.*?)\)/g);for(;a.length;){let[i,o,r]=a.splice(0,3);i&&n.push({isLink:!1,text:i}),o&&r&&n.push({isLink:!0,text:o,linkHref:r})}return n}static truncate(t,n,a="…"){if(t.length<=n)return t;let o=new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(t)[Symbol.iterator](),r=0;for(let s=0;s<=n-a.length;s++){let p=o.next();if(p.done)return t;r=p.value.index}for(let s=0;s<a.length;s++)if(o.next().done)return t;return t.slice(0,r)+a}static getURLDisplayName(t,n){n=n||{numPathParts:void 0,preserveQuery:void 0,preserveHost:void 0};let a=n.numPathParts!==void 0?n.numPathParts:2,i=n.preserveQuery!==void 0?n.preserveQuery:!0,o=n.preserveHost||!1,r;if(t.protocol==="about:"||t.protocol==="data:")r=t.href;else{r=t.pathname;let p=r.split("/").filter(c=>c.length);a&&p.length>a&&(r=ee+p.slice(-1*a).join("/")),o&&(r=`${t.host}/${r.replace(/^\//,"")}`),i&&(r=`${r}${t.search}`)}let s=64;if(t.protocol!=="data:"&&(r=r.slice(0,200),r=r.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g,`$1${ee}`),r=r.replace(/([a-zA-Z0-9-_]{9})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9-_]{10,}/g,`$1${ee}`),r=r.replace(/(\d{3})\d{6,}/g,`$1${ee}`),r=r.replace(/\u2026+/g,ee),r.length>s&&r.includes("?")&&(r=r.replace(/\?([^=]*)(=)?.*/,`?$1$2${ee}`),r.length>s&&(r=r.replace(/\?.*/,`?${ee}`)))),r.length>s){let p=r.lastIndexOf(".");p>=0?r=r.slice(0,s-1-(r.length-p))+`${ee}${r.slice(p)}`:r=r.slice(0,s-1)+ee}return r}static getChromeExtensionOrigin(t){let n=new URL(t);return n.protocol+"//"+n.host}static parseURL(t){let n=new URL(t);return{file:e.getURLDisplayName(n),hostname:n.hostname,origin:n.protocol==="chrome-extension:"?e.getChromeExtensionOrigin(t):n.origin}}static createOrReturnURL(t){return t instanceof URL?t:new URL(t)}static getPseudoTld(t){let n=t.split(".").slice(-2);return gi.includes(n[0])?`.${n.join(".")}`:`.${n[n.length-1]}`}static getPseudoRootDomain(t){let n=e.createOrReturnURL(t).hostname,i=e.getPseudoTld(n).split(".");return n.split(".").slice(-i.length).join(".")}static filterRelevantLines(t,n,a){if(n.length===0)return t.slice(0,a*2+1);let i=3,o=new Set;return n=n.sort((r,s)=>(r.lineNumber||0)-(s.lineNumber||0)),n.forEach(({lineNumber:r})=>{let s=r-a,p=r+a;for(;s<1;)s++,p++;o.has(s-i-1)&&(s-=i);for(let c=s;c<=p;c++){let l=c;o.add(l)}}),t.filter(r=>o.has(r.lineNumber))}static computeLogNormalScore(t,n){let a=En(t,n);return a>.9&&(a+=.05*(a-.9)),Math.floor(a*100)/100}};var Un=0,y=class e{static i18n=null;static strings={};static reportJson=null;static apply(t){e.strings={...Ze,...t.providedStrings},e.i18n=t.i18n,e.reportJson=t.reportJson}static getUniqueSuffix(){return Un++}static resetUniqueSuffix(){Un=0}};var Tn="data:image/jpeg;base64,";function In(e){e.configSettings.locale||(e.configSettings.locale="en"),e.configSettings.formFactor||(e.configSettings.formFactor=e.configSettings.emulatedFormFactor),e.finalDisplayedUrl=U.getFinalDisplayedUrl(e),e.mainDocumentUrl=U.getMainDocumentUrl(e);for(let a of Object.values(e.audits))if((a.scoreDisplayMode==="not_applicable"||a.scoreDisplayMode==="not-applicable")&&(a.scoreDisplayMode="notApplicable"),a.scoreDisplayMode==="informative"&&(a.score=1),a.details){if((a.details.type===void 0||a.details.type==="diagnostic")&&(a.details.type="debugdata"),a.details.type==="filmstrip")for(let i of a.details.items)i.data.startsWith(Tn)||(i.data=Tn+i.data);if(a.details.type==="table")for(let i of a.details.headings){let{itemType:o,text:r}=i;o!==void 0&&(i.valueType=o,delete i.itemType),r!==void 0&&(i.label=r,delete i.text);let s=i.subItemsHeading?.itemType;i.subItemsHeading&&s!==void 0&&(i.subItemsHeading.valueType=s,delete i.subItemsHeading.itemType)}if(a.id==="third-party-summary"&&(a.details.type==="opportunity"||a.details.type==="table")){let{headings:i,items:o}=a.details;if(i[0].valueType==="link"){i[0].valueType="text";for(let r of o)typeof r.entity=="object"&&r.entity.type==="link"&&(r.entity=r.entity.text);a.details.isEntityGrouped=!0}}}let[t]=e.lighthouseVersion.split(".").map(Number),n=e.categories.performance;if(n){if(t<9){e.categoryGroups||(e.categoryGroups={}),e.categoryGroups.hidden={title:""};for(let a of n.auditRefs)a.group?a.group==="load-opportunities"&&(a.group="diagnostics"):a.group="hidden"}else if(t<12)for(let a of n.auditRefs)a.group||(a.group="diagnostics")}if(t<12&&n){let a=new Map;for(let i of n.auditRefs){let o=i.relevantAudits;if(!(!o||!i.acronym))for(let r of o){let s=a.get(r)||[];s.push(i.acronym),a.set(r,s)}}for(let[i,o]of a){if(!o.length)continue;let r=e.audits[i];if(r&&!r.metricSavings){r.metricSavings={};for(let s of o)r.metricSavings[s]=0}}}if(e.environment||(e.environment={benchmarkIndex:0,networkUserAgent:e.userAgent,hostUserAgent:e.userAgent}),e.configSettings.screenEmulation||(e.configSettings.screenEmulation={width:-1,height:-1,deviceScaleFactor:-1,mobile:/mobile/i.test(e.environment.hostUserAgent),disabled:!1}),e.i18n||(e.i18n={}),e.audits["full-page-screenshot"]){let a=e.audits["full-page-screenshot"].details;a?e.fullPageScreenshot={screenshot:a.screenshot,nodes:a.nodes}:e.fullPageScreenshot=null,delete e.audits["full-page-screenshot"]}}var te=U.RATINGS,P=class e{static prepareReportResult(t){let n=JSON.parse(JSON.stringify(t));In(n);for(let i of Object.values(n.audits))i.details&&(i.details.type==="opportunity"||i.details.type==="table")&&!i.details.isEntityGrouped&&n.entities&&e.classifyEntities(n.entities,i.details);if(typeof n.categories!="object")throw new Error("No categories provided.");let a=new Map;for(let i of Object.values(n.categories))i.auditRefs.forEach(o=>{o.acronym&&a.set(o.acronym,o)}),i.auditRefs.forEach(o=>{let r=n.audits[o.id];o.result=r;let s=Object.keys(o.result.metricSavings||{});if(s.length){o.relevantMetrics=[];for(let p of s){let c=a.get(p);c&&o.relevantMetrics.push(c)}}n.stackPacks&&n.stackPacks.forEach(p=>{p.descriptions[o.id]&&(o.stackPacks=o.stackPacks||[],o.stackPacks.push({title:p.title,iconDataURL:p.iconDataURL,description:p.descriptions[o.id]}))})});return n}static getUrlLocatorFn(t){let n=t.find(i=>i.valueType==="url")?.key;if(n&&typeof n=="string")return i=>{let o=i[n];if(typeof o=="string")return o};let a=t.find(i=>i.valueType==="source-location")?.key;if(a)return i=>{let o=i[a];if(typeof o=="object"&&o.type==="source-location")return o.url}}static classifyEntities(t,n){let{items:a,headings:i}=n;if(!a.length||a.some(r=>r.entity))return;let o=e.getUrlLocatorFn(i);if(o)for(let r of a){let s=o(r);if(!s)continue;let p="";try{p=U.parseURL(s).origin}catch{}if(!p)continue;let c=t.find(l=>l.origins.includes(p));c&&(r.entity=c.name)}}static getTableItemSortComparator(t){return(n,a)=>{for(let i of t){let o=n[i],r=a[i];if((typeof o!=typeof r||!["number","string"].includes(typeof o))&&console.warn(`Warning: Attempting to sort unsupported value type: ${i}.`),typeof o=="number"&&typeof r=="number"&&o!==r)return r-o;if(typeof o=="string"&&typeof r=="string"&&o!==r)return o.localeCompare(r)}return 0}}static getEmulationDescriptions(t){let n,a,i,o=t.throttling,r=y.i18n,s=y.strings;switch(t.throttlingMethod){case"provided":i=a=n=s.throttlingProvided;break;case"devtools":{let{cpuSlowdownMultiplier:m,requestLatencyMs:h}=o;n=`${r.formatNumber(m)}x slowdown (DevTools)`,a=`${r.formatMilliseconds(h)} HTTP RTT, ${r.formatKbps(o.downloadThroughputKbps)} down, ${r.formatKbps(o.uploadThroughputKbps)} up (DevTools)`,i=h===150*3.75&&o.downloadThroughputKbps===1.6*1024*.9&&o.uploadThroughputKbps===750*.9?s.runtimeSlow4g:s.runtimeCustom;break}case"simulate":{let{cpuSlowdownMultiplier:m,rttMs:h,throughputKbps:f}=o;n=`${r.formatNumber(m)}x slowdown (Simulated)`,a=`${r.formatMilliseconds(h)} TCP RTT, ${r.formatKbps(f)} throughput (Simulated)`,i=h===150&&f===1.6*1024?s.runtimeSlow4g:s.runtimeCustom;break}default:i=n=a=s.runtimeUnknown}let p=t.channel==="devtools"?!1:t.screenEmulation.disabled,c=t.channel==="devtools"?t.formFactor==="mobile":t.screenEmulation.mobile,l=s.runtimeMobileEmulation;p?l=s.runtimeNoEmulation:c||(l=s.runtimeDesktopEmulation);let d=p?void 0:`${t.screenEmulation.width}x${t.screenEmulation.height}, DPR ${t.screenEmulation.deviceScaleFactor}`;return{deviceEmulation:l,screenEmulation:d,cpuThrottling:n,networkThrottling:a,summary:i}}static showAsPassed(t){switch(t.scoreDisplayMode){case"manual":case"notApplicable":return!0;case"error":case"informative":return!1;case"numeric":case"binary":default:return Number(t.score)>=te.PASS.minScore}}static calculateRating(t,n){if(n==="manual"||n==="notApplicable")return te.PASS.label;if(n==="error")return te.ERROR.label;if(t===null)return te.FAIL.label;let a=te.FAIL.label;return t>=te.PASS.minScore?a=te.PASS.label:t>=te.AVERAGE.minScore&&(a=te.AVERAGE.label),a}static calculateCategoryFraction(t){let n=0,a=0,i=0,o=0;for(let r of t.auditRefs){let s=e.showAsPassed(r.result);if(!(r.group==="hidden"||r.result.scoreDisplayMode==="manual"||r.result.scoreDisplayMode==="notApplicable")){if(r.result.scoreDisplayMode==="informative"){s||++i;continue}++n,o+=r.weight,s&&a++}}return{numPassed:a,numPassableAudits:n,numInformative:i,totalWeight:o}}static isPluginCategory(t){return t.startsWith("lighthouse-plugin-")}static shouldDisplayAsFraction(t){return t==="timespan"||t==="snapshot"}},Ze={varianceDisclaimer:"Values are estimated and may vary. The [performance score is calculated](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring/) directly from these metrics.",calculatorLink:"See calculator.",showRelevantAudits:"Show audits relevant to:",opportunityResourceColumnLabel:"Opportunity",opportunitySavingsColumnLabel:"Estimated Savings",errorMissingAuditInfo:"Report error: no audit information",errorLabel:"Error!",warningHeader:"Warnings: ",warningAuditsGroupTitle:"Passed audits but with warnings",passedAuditsGroupTitle:"Passed audits",notApplicableAuditsGroupTitle:"Not applicable",manualAuditsGroupTitle:"Additional items to manually check",toplevelWarningsMessage:"There were issues affecting this run of Lighthouse:",crcInitialNavigation:"Initial Navigation",crcLongestDurationLabel:"Maximum critical path latency:",snippetExpandButtonLabel:"Expand snippet",snippetCollapseButtonLabel:"Collapse snippet",lsPerformanceCategoryDescription:"[Lighthouse](https://developers.google.com/web/tools/lighthouse/) analysis of the current page on an emulated mobile network. Values are estimated and may vary.",labDataTitle:"Lab Data",thirdPartyResourcesLabel:"Show 3rd-party resources",viewTreemapLabel:"View Treemap",viewTraceLabel:"View Trace",dropdownPrintSummary:"Print Summary",dropdownPrintExpanded:"Print Expanded",dropdownCopyJSON:"Copy JSON",dropdownSaveHTML:"Save as HTML",dropdownSaveJSON:"Save as JSON",dropdownViewer:"Open in Viewer",dropdownSaveGist:"Save as Gist",dropdownDarkTheme:"Toggle Dark Theme",dropdownInsightsToggle:"Toggle experimental insights",dropdownViewUnthrottledTrace:"View Unthrottled Trace",runtimeSettingsDevice:"Device",runtimeSettingsNetworkThrottling:"Network throttling",runtimeSettingsCPUThrottling:"CPU throttling",runtimeSettingsUANetwork:"User agent (network)",runtimeSettingsBenchmark:"Unthrottled CPU/Memory Power",runtimeSettingsAxeVersion:"Axe version",runtimeSettingsScreenEmulation:"Screen emulation",footerIssue:"File an issue",runtimeNoEmulation:"No emulation",runtimeMobileEmulation:"Emulated Moto G Power",runtimeDesktopEmulation:"Emulated Desktop",runtimeUnknown:"Unknown",runtimeSingleLoad:"Single page session",runtimeAnalysisWindow:"Initial page load",runtimeAnalysisWindowTimespan:"User interactions timespan",runtimeAnalysisWindowSnapshot:"Point-in-time snapshot",runtimeSingleLoadTooltip:"This data is taken from a single page session, as opposed to field data summarizing many sessions.",throttlingProvided:"Provided by environment",show:"Show",hide:"Hide",expandView:"Expand view",collapseView:"Collapse view",runtimeSlow4g:"Slow 4G throttling",runtimeCustom:"Custom throttling",firstPartyChipLabel:"1st party",openInANewTabTooltip:"Open in a new tab",unattributable:"Unattributable"};var fi=0;function u(e,t,n,a,i){var o,r,s={};for(r in t)r=="ref"?o=t[r]:s[r]=t[r];var p={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--fi,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(r in o)s[r]===void 0&&(s[r]=o[r]);return w.vnode&&w.vnode(p),p}var Rn=()=>u("svg",{width:"14",viewBox:"0 0 18 16",fill:"none",role:"img",children:u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 2C0 1.17 0.67 0.5 1.5 0.5C2.33 0.5 3 1.17 3 2C3 2.83 2.33 3.5 1.5 3.5C0.67 3.5 0 2.83 0 2ZM0 8C0 7.17 0.67 6.5 1.5 6.5C2.33 6.5 3 7.17 3 8C3 8.83 2.33 9.5 1.5 9.5C0.67 9.5 0 8.83 0 8ZM1.5 12.5C0.67 12.5 0 13.18 0 14C0 14.82 0.68 15.5 1.5 15.5C2.32 15.5 3 14.82 3 14C3 13.18 2.33 12.5 1.5 12.5ZM18 15H5V13H18V15ZM5 9H18V7H5V9ZM5 3V1H18V3H5Z",fill:"currentColor"})}),Ke=()=>u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",role:"img","aria-label":"Icon representing a navigation report",children:u("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor","stroke-width":"2"})}),Xe=()=>u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",role:"img","aria-label":"Icon representing a timespan report",children:[u("circle",{cx:"8",cy:"8",r:"7",fill:"none",stroke:"currentColor","stroke-width":"2"}),u("path",{d:"m 8,4 v 4 l 4,1.9999998",stroke:"currentColor","stroke-width":"1.5"})]}),Ye=()=>u("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",role:"img","aria-label":"Icon representing a snapshot report",children:u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M 12.2038,12.2812 C 11.1212,13.3443 9.6372,14 8,14 7.81038,14 7.62281,13.9912 7.43768,13.974 L 10.3094,9 Z M 12.8925,11.4741 10.0207,6.5 H 13.811 C 13.9344,6.97943 14,7.48205 14,8 c 0,1.2947 -0.4101,2.4937 -1.1075,3.4741 z M 13.456,5.5 H 7.71135 L 9.6065,2.21749 C 11.3203,2.69259 12.7258,3.90911 13.456,5.5 Z M 8.5624,2.02601 C 8.3772,2.0088 8.1896,2 8,2 6.36282,2 4.8788,2.65572 3.79622,3.71885 L 5.69061,7.00002 Z M 3.10749,4.52594 C 2.4101,5.5063 2,6.70526 2,8 2,8.5179 2.06563,9.0206 2.18903,9.5 H 5.97927 Z M 2.54404,10.5 c 0.73017,1.5909 2.1357,2.8074 3.84949,3.2825 L 8.2887,10.5 Z M 16,8 c 0,4.4183 -3.5817,8 -8,8 C 3.58172,16 0,12.4183 0,8 0,3.58172 3.58172,0 8,0 c 4.4183,0 8,3.58172 8,8 z",fill:"currentColor"})}),Nn=()=>u("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",fill:"currentColor",role:"img","aria-label":"Icon representing a close action",children:[u("path",{d:"M0 0h24v24H0V0z",fill:"none"}),u("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"})]}),Dn=()=>u("svg",{width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",role:"img",children:u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.33317 2.00008H13.9998V0.666748H3.33317C2.59984 0.666748 1.99984 1.26675 1.99984 2.00008V9.33341H0.666504V11.3334H7.99984V9.33341H3.33317V2.00008ZM13.9998 3.33341H9.99984C9.63317 3.33341 9.33317 3.63341 9.33317 4.00008V10.6667C9.33317 11.0334 9.63317 11.3334 9.99984 11.3334H13.9998C14.3665 11.3334 14.6665 11.0334 14.6665 10.6667V4.00008C14.6665 3.63341 14.3665 3.33341 13.9998 3.33341ZM10.6665 9.33341H13.3332V4.66675H10.6665V9.33341Z",fill:"currentColor"})}),zn=()=>u("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",role:"img",children:u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.666687 3.26663L2.00002 4.59997C3.92002 2.67997 6.52669 1.87997 9.02002 2.18663L9.81335 0.399966C6.59335 -0.173367 3.16002 0.779966 0.666687 3.26663ZM10.6 0.599966C10.4867 0.599966 10.3867 0.659966 10.3267 0.753299L10.28 0.853299L6.82669 8.61996C6.72002 8.8133 6.65335 9.02663 6.65335 9.25996C6.65335 9.99996 7.25335 10.6 7.99335 10.6C8.63335 10.6 9.17335 10.1466 9.30002 9.53996L9.30669 9.51997L10.9334 0.933299C10.9334 0.746633 10.7867 0.599966 10.6 0.599966ZM15.3334 3.26663L14 4.59997C13.1867 3.78663 12.2534 3.17997 11.2534 2.76663L11.6067 0.886633C12.9667 1.38663 14.24 2.1733 15.3334 3.26663ZM11.3334 7.26663L12.6667 5.9333C12.1334 5.39997 11.5334 4.98663 10.8934 4.6733L10.5267 6.61997C10.8067 6.79997 11.08 7.0133 11.3334 7.26663ZM4.66669 7.26663L3.33335 5.9333C4.67335 4.5933 6.45335 3.95997 8.20669 4.0133L7.35335 5.9333C6.37335 6.0733 5.42002 6.5133 4.66669 7.26663Z",fill:"currentColor"})}),jn=()=>u("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",role:"img",children:u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.5 7.16667V5.5H13.8333V3.83333C13.8333 2.91667 13.0833 2.16667 12.1667 2.16667H10.5V0.5H8.83333V2.16667H7.16667V0.5H5.5V2.16667H3.83333C2.91667 2.16667 2.16667 2.91667 2.16667 3.83333V5.5H0.5V7.16667H2.16667V8.83333H0.5V10.5H2.16667V12.1667C2.16667 13.0833 2.91667 13.8333 3.83333 13.8333H5.5V15.5H7.16667V13.8333H8.83333V15.5H10.5V13.8333H12.1667C13.0833 13.8333 13.8333 13.0833 13.8333 12.1667V10.5H15.5V8.83333H13.8333V7.16667H15.5ZM10.5 5.5H5.5V10.5H10.5V5.5ZM3.83333 12.1667H12.1667V3.83333H3.83333V12.1667Z",fill:"currentColor"})}),Mn=()=>u("svg",{viewBox:"0 0 18 12",width:"18",height:"12",role:"img",children:[u("rect",{width:"18",height:"2",fill:"currentColor"}),u("rect",{y:"5",width:"18",height:"2",fill:"currentColor"}),u("rect",{y:"10",width:"18",height:"2",fill:"currentColor"})]}),Hn=()=>u("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:u("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 7C13 10.3137 10.3137 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7ZM14 7C14 10.866 10.866 14 7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7ZM7.66658 11H6.33325V9.66667H7.66658V11ZM4.33325 5.66667C4.33325 4.19333 5.52659 3 6.99992 3C8.47325 3 9.66658 4.19333 9.66658 5.66667C9.66658 6.52194 9.1399 6.98221 8.62709 7.43036C8.1406 7.85551 7.66658 8.26975 7.66658 9H6.33325C6.33325 7.78582 6.96133 7.30439 7.51355 6.88112C7.94674 6.54907 8.33325 6.25281 8.33325 5.66667C8.33325 4.93333 7.73325 4.33333 6.99992 4.33333C6.26658 4.33333 5.66658 4.93333 5.66658 5.66667H4.33325Z",fill:"currentColor"})});var St=Ee(void 0),kt=Ee({});function Fn(e){return new URLSearchParams(location.hash.replace("#","?")).get(e)}function be(...e){let t=[];for(let n of e){if(!n)continue;if(typeof n=="string"){t.push(n);continue}let a=Object.entries(n).filter(([i,o])=>o).map(([i])=>i);t.push(...a)}return t.join(" ")}function On(e){let{width:t,height:n}=e.configSettings.screenEmulation;return{width:t,height:n}}function Bn(e){let t=e.audits["screenshot-thumbnails"];return t&&t.details&&t.details.type==="filmstrip"&&t.details.items||void 0}function Qe(e,t){switch(e){case"navigation":return t.navigationDescription;case"timespan":return t.timespanDescription;case"snapshot":return t.snapshotDescription}}function O(){let e=Ue(St);if(!e)throw Error("useFlowResult must be called in the FlowResultContext");return e}function vi(...e){let[t,n]=ie(e.map(Fn));return qe(()=>{function a(){let i=e.map(Fn);i.every((o,r)=>o===t[r])||n(i)}return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)},[t]),t}function ye(){let e=O(),[t,n]=vi("index","anchor");return Q(()=>{if(!t)return null;let a=Number(t);if(!Number.isFinite(a))return console.warn(`Invalid hash index: ${t}`),null;let i=e.steps[a];return i?{currentLhr:i.lhr,index:a,anchor:n}:(console.warn(`No flow step at index ${a}`),null)},[t,e,n])}function oe(e,t){let n=Je(null);return We(()=>{if(!n.current)return;let a=e();return n.current.append(a),()=>{n.current?.contains(a)&&n.current.removeChild(a)}},t),n}function Gn(){return Ue(kt)}var bi=500,$=()=>u("div",{className:"Separator",role:"separator"}),Pt=({mode:e})=>u(N,{children:[e==="navigation"&&u(Ke,{}),e==="timespan"&&u(Xe,{}),e==="snapshot"&&u(Ye,{})]}),re=({mode:e})=>u("div",{className:"FlowSegment",children:[u("div",{className:"FlowSegment__top-line"}),e&&u(Pt,{mode:e}),u("div",{className:"FlowSegment__bottom-line"})]}),yi=({frames:e,width:t,height:n})=>{let[a,i]=ie(0),o=a%e.length;return qe(()=>{let r=setInterval(()=>i(s=>(s+1)%e.length),bi);return()=>clearInterval(r)},[e.length]),u("img",{className:"FlowStepThumbnail","data-testid":"FlowStepAnimatedThumbnail",src:e[o].data,style:{width:t,height:n},alt:"Animated screenshots of a page tested by Lighthouse"})},et=({lhr:e,width:t,height:n})=>{let a=Bn(e),i=On(e);if(t&&n===void 0?n=i.height*t/i.width:n&&t===void 0&&(t=i.width*n/i.height),!t||!n)return console.warn(new Error("FlowStepThumbnail requested without any dimensions").stack),u(N,{});let o;if(a?.length){if(o=a[a.length-1].data,e.gatherMode==="timespan")return u(yi,{frames:a,width:t,height:n})}else o=U.getFullPageScreenshot(e)?.screenshot.data;return u(N,{children:o&&u("img",{className:"FlowStepThumbnail",src:o,style:{width:t,height:n},alt:"Screenshot of a page tested by Lighthouse"})})};var At=function(e,t){return At=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},At(e,t)};function Te(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");At(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var J=function(){return J=Object.assign||function(t){for(var n,a=1,i=arguments.length;a<i;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},J.apply(this,arguments)};function Vn(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]]);return n}function tt(e,t,n){if(n||arguments.length===2)for(var a=0,i=t.length,o;a<i;a++)(o||!(a in t))&&(o||(o=Array.prototype.slice.call(t,0,a)),o[a]=t[a]);return e.concat(o||Array.prototype.slice.call(t))}var _e=function(){return _e=Object.assign||function(t){for(var n,a=1,i=arguments.length;a<i;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_e.apply(this,arguments)};var S;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(S||(S={}));var L;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(L||(L={}));var ue;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(ue||(ue={}));function Et(e){return e.type===L.literal}function $n(e){return e.type===L.argument}function nt(e){return e.type===L.number}function at(e){return e.type===L.date}function it(e){return e.type===L.time}function ot(e){return e.type===L.select}function rt(e){return e.type===L.plural}function qn(e){return e.type===L.pound}function st(e){return e.type===L.tag}function lt(e){return!!(e&&typeof e=="object"&&e.type===ue.number)}function Ie(e){return!!(e&&typeof e=="object"&&e.type===ue.dateTime)}var Lt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;var _i=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Wn(e){var t={};return e.replace(_i,function(n){var a=n.length;switch(n[0]){case"G":t.era=a===4?"long":a===5?"narrow":"short";break;case"y":t.year=a===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][a-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][a-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=a===4?"short":a===5?"narrow":"short";break;case"e":if(a<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][a-4];break;case"c":if(a<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][a-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][a-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][a-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][a-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][a-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][a-1];break;case"s":t.second=["numeric","2-digit"][a-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=a<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var T=function(){return T=Object.assign||function(t){for(var n,a=1,i=arguments.length;a<i;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},T.apply(this,arguments)};var Jn=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Yn(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Jn).filter(function(m){return m.length>0}),n=[],a=0,i=t;a<i.length;a++){var o=i[a],r=o.split("/");if(r.length===0)throw new Error("Invalid number skeleton");for(var s=r[0],p=r.slice(1),c=0,l=p;c<l.length;c++){var d=l[c];if(d.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:p})}return n}function Ci(e){return e.replace(/^(.*?)-/,"")}var Zn=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Qn=/^(@+)?(\+|#+)?[rs]?$/g,wi=/(\*)(0+)|(#+)(0+)|(0+)/g,ea=/^(0+)$/;function Kn(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Qn,function(n,a,i){return typeof i!="string"?(t.minimumSignificantDigits=a.length,t.maximumSignificantDigits=a.length):i==="+"?t.minimumSignificantDigits=a.length:a[0]==="#"?t.maximumSignificantDigits=a.length:(t.minimumSignificantDigits=a.length,t.maximumSignificantDigits=a.length+(typeof i=="string"?i.length:0)),""}),t}function ta(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function xi(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!ea.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Xn(e){var t={},n=ta(e);return n||t}function na(e){for(var t={},n=0,a=e;n<a.length;n++){var i=a[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Ci(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=T(T(T({},t),{notation:"scientific"}),i.options.reduce(function(p,c){return T(T({},p),Xn(c))},{}));continue;case"engineering":t=T(T(T({},t),{notation:"engineering"}),i.options.reduce(function(p,c){return T(T({},p),Xn(c))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(wi,function(p,c,l,d,m,h){if(c)t.minimumIntegerDigits=l.length;else{if(d&&m)throw new Error("We currently do not support maximum integer digits");if(h)throw new Error("We currently do not support exact integer digits")}return""});continue}if(ea.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Zn.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Zn,function(p,c,l,d,m,h){return l==="*"?t.minimumFractionDigits=c.length:d&&d[0]==="#"?t.maximumFractionDigits=d.length:m&&h?(t.minimumFractionDigits=m.length,t.maximumFractionDigits=m.length+h.length):(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length),""});var o=i.options[0];o==="w"?t=T(T({},t),{trailingZeroDisplay:"stripIfInteger"}):o&&(t=T(T({},t),Kn(o)));continue}if(Qn.test(i.stem)){t=T(T({},t),Kn(i.stem));continue}var r=ta(i.stem);r&&(t=T(T({},t),r));var s=xi(i.stem);s&&(t=T(T({},t),s))}return t}var Re={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta