UNPKG

@nebula.js/sn-kpi

Version:

KPI supernova

17 lines (16 loc) 2.36 MB
/* * @nebula.js/sn-kpi v2.0.6 * Copyright (c) 2025 QlikTech International AB * Released under the MIT license. */ System.register(["@nebula.js/stardust","react","react-dom"],(function(e){"use strict";var t,c,n,l,a,r,h,o,m,v,i,s,z,d,p,u,M,H,V,E,f,L,g,y,C,S;return{setters:[function(e){t=e.useState,c=e.useEffect,n=e.useMemo,l=e.useInteractionState,a=e.useTheme,r=e.useOptions,h=e.useElement,o=e.useLayout,m=e.useRect,v=e.useTranslator,i=e.useAppLayout,s=e.useApp,z=e.useEmbed,d=e.useModel,p=e.usePromise,u=e.useImperativeHandle,M=e.onTakeSnapshot},function(e){H=e.forwardRef,V=e,E=e.default,f=e.useContext,L=e.useRef,g=e.useState,y=e.useEffect},function(e){C=e.default,S=e}],execute:function(){function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var c=arguments[t];for(var n in c)({}).hasOwnProperty.call(c,n)&&(e[n]=c[n])}return e},b.apply(null,arguments)}function T(e,t,c){return t in e?Object.defineProperty(e,t,{value:c,enumerable:!0,configurable:!0,writable:!0}):e[t]=c,e}e("default",(function(e){const{sense:n,flags:H,anything:V}=e,{logInfo:f}=V,L=n&&n.navigation;return{qae:t3e(e.translator),component(){const[V,g]=t({}),[y,C]=t(),S=l(),b=a(),T=r(),w=h(),x=B5e(w),O=o(),F=m(),R=v(),A=i(),D=s(),k=z(),P=d(),q=P5e({flags:H,layout:O,theme:b,model:P,translator:R,options:T,app:D,embed:k}),I=(e,t)=>{if(V[e]!==t){const c={...V};c[e]=t,g(c)}};c((()=>{var t;const c=function(e,t,c,n,l){const a={backendApi:{},options:{}},r={};let h;a.props=r;const o=()=>{c("showVerify",!1)},m=e.getBoundingClientRect();return a.props.mainValueStyle={},a.props.measureTitleStyle={},a.props.viz={},a.props.secondaryValues=[],a.props.secondaryLayouts=[],a.props.showSecondaryValues=!1,a.props.mainValue={formattedValue:"",value:null,style:null},c("showVerify",!1),r.onShowVerifyDialog=()=>{r.linkInteractionOn&&(c("showVerify",!0),r.updateVerifyDialogFontSize(),h=setTimeout(o,3e3))},r.linkToSheet=(e,t)=>{if(r.linkInteractionOn&&!r.sheetIsMissing&&r.renderState.showVerify){if(t&&l&&l.getUrlForSheet){const t=l.getUrlForSheet(e);window.open(t)}else l.goToSheet(e);clearTimeout(h),o()}},r.updateVerifyDialogFontSize=()=>{if(r.renderState.showVerify){const e=r.verifyDialogLayoutInfo.components[0];Y5e.checkLayout(r.verifyDialogLayoutInfo),Y5e.sizeComponent(e,r.verifyDialogLayoutInfo,r.verifyDialogLayoutInfo.boundingBox.width,r.verifyDialogLayoutInfo.boundingBox.height,Y5e.TextScaleMode.SCALE,Y5e.ElementScaleMode.NONE,n),r.verifyDialogStyle={fontSize:e.fontSizes.fontSize}}},a.props.baseLayoutInfo={direction:Y5e.Direction.COLUMN,ratio:1e9,boundingBox:{width:m.width,height:m.height},components:[{size:{min:.5,treshold:{width:50,height:12}},getText:()=>r.measureTitle,fontSizes:{maxNrChars:15,min:{fontSize:10,height:12},max:{fontSize:40,height:80}},isVisible:()=>r.showMeasureTitle},{size:{min:.8,stretch:!0},ratio:1,components:[{size:{min:.5,stretch:!0},getText:()=>a.props.mainValue.formattedValue+(a.props.mainValue.glyph?a.props.mainValue.glyph:""),fontSizes:{maxNrChars:4,min:{fontSize:10,height:10},max:{fontSize:500,height:500}}},{size:.5,components:a.props.secondaryLayouts,isVisible:()=>a.props.secondaryLayouts.length>0}]}]},a.props.secondaryLayoutInfo={size:{min:1,treshold:{width:50,height:30}},direction:Y5e.Direction.COLUMN,components:[{size:{min:.6,stretch:!0},fontSizes:{maxNrChars:8,min:{fontSize:10,height:20},max:{fontSize:500,height:500}}},{size:{min:.4},fontSizes:{maxNrChars:15,min:{fontSize:10,height:20},max:{fontSize:30,height:500}},isVisible:()=>!1!==r.showSecondMeasureTitle}]},a.props.verifyDialogLayoutInfo={size:{min:1,width:20,height:20},boundingBox:{width:0,height:0},components:[{size:{min:.2,treshold:{width:100,height:100}},getText:()=>t.get("properties.kpi.verifyToGoSheet"),fontSizes:{maxNrChars:16,min:{fontSize:10,height:20},max:{fontSize:13,height:50}}}]},a}(w,R,I,b,L);c.localeInfo=A.qLocaleInfo,c.inClient=!(null===(t=e.anything)||void 0===t||!t.sense),C(c)}),[w,A,b.name()]),c((()=>{n&&w&&y&&O&&function(e,t,c){t.cellEl?t.cellEl.removeEventListener("keydown",t.handleKeyDown):t.cellEl=e.closest(".qv-gridcell");t.handleKeyDown=e=>{const{key:n}=e;"Spacebar"!==n&&" "!==n&&"Enter"!==n||(t.props.renderState.showVerify?t.props.linkToSheet(c.sheetLink,c.openUrlInNewTab):t.props.onShowVerifyDialog())},t.cellEl&&t.cellEl.addEventListener("keydown",t.handleKeyDown)}(w,y,O)}),[w,y,O]),p((async()=>{y&&O&&(y.props.renderState=V,y.updateRenderState=I,y.navigation=S.active,y.options=T,y.maxFontState=function(e,t,c,n){const l=e.backendApi.isSnapshot&&n&&!c.freeResize;return l?n.snapshotData.isZoomed:c.isZoomed&&e.inClient}(y,0,T,O),y.formatters=function(e,t,c){let n;const l=new Fe(c,t.qHyperCube.qMeasureInfo);let a;const r=[];for(let c=0;c<e;c++)n=t.qHyperCube.qMeasureInfo[c],a=l.getMeasureFormatter(c),a&&"U"===a.type&&(a.pattern=a.createPatternFromRange(n.qMax,n.qMax,!0),Math.floor(Math.log(Math.abs(n.qMax))/Math.log(10))%3==2&&(a.pattern=a.pattern.substr(0,a.pattern.length-2),a.pattern+="A"),a.prepare()),r.push(a);return r}(O.qHyperCube.qMeasureInfo.length,O,y.localeInfo),function(e,t,c,n,l){if(!function(e){return!(!e||!e.qHyperCube||!e.qHyperCube.qMeasureInfo.length||e.qHyperCube.qMeasureInfo.some((e=>!!e.qError)))}(e))return!1;t.layout=e;const a=3.75,r=function(){const e=7,t=4,c=3,n=1.5;return{font:{baseFontSizeSmall:e,baseFontSizeMedium:t,baseFontSizeLarge:c},layout:{responsive:{S:e,M:t,L:c},relative:{S:e*n,M:t*n,L:c},fixed:{S:e*n,M:t*n,L:c}}}}(),h=e.qHyperCube.qDataPages[0].qMatrix[0],o=e.qHyperCube.qMeasureInfo.length,{inClient:m,formatters:v}=t,{styleModel:i}=l,s=o-1,{secondaryValues:z}=t.props;let d;const{secondaryLayouts:p}=t.props;let u,M,H,V,E;const f=t.props.sheet&&t.props.sheet.qMetaDef&&t.props.sheet.qMetaDef.title?t.props.sheet.qMetaDef.title:null,L=()=>H,g=()=>E;t.props.showMeasureTitle=i.query.firstMeasure.title.show(e.showMeasureTitle),t.props.showSecondMeasureTitle=i.query.secondMeasure.title.show(e.showSecondMeasureTitle),t.props.textAlign=i.query.textAlignment.getStyle(e.textAlign);const y=e.layoutBehavior||"responsive",C=t.props.baseLayoutInfo.components[0],S=t.props.baseLayoutInfo.components[1];"fixed"===y?(C.fontSizes.maxNrChars=r.layout[y][e.fontSize]*a,S.components[0].fontSizes.maxNrChars=r.layout[y][e.fontSize]):"relative"===y?(C.fontSizes.maxNrChars=r.font.baseFontSizeMedium*a,S.components[0].fontSizes.maxNrChars=r.layout[y][e.fontSize]):(C.fontSizes.maxNrChars=r.font.baseFontSizeMedium*a,S.components[0].fontSizes.maxNrChars=0);const b=7/3;S.components[0].fontSizes.scale="S"===e.fontSize?b:"L"===e.fontSize?1:Math.sqrt(b),t.props.useLink=e.useLink,!m||e.snapshotData||!t.props.useLink||!e.sheetLink||f&&e.sheetLink===f||function(e,t,c,n){c&&c.getObject(t).then((t=>{t.getLayout().then((t=>{const c=t&&t.labelExpression,n=t&&t.qMeta&&t.qMeta.title;e.props.sheetLinkTitle=c||n||"",e.props.sheetIsMissing=!1}))})).catch((()=>{e.props.sheetLinkTitle=n.get("Bookmarks.SheetMissingDialogTitle"),e.props.sheetIsMissing=!0}))}(t,e.sheetLink,c,n);t.props.mainValue.value=e.qHyperCube.qDataPages[0].qMatrix[0][0].qNum,t.props.mainValue.formattedValue=v[0]&&"U"===v[0].type&&!Number.isNaN(+e.qHyperCube.qDataPages[0].qMatrix[0][0].qNum)?v[0].formatValue(t.props.mainValue.value):e.qHyperCube.qDataPages[0].qMatrix[0][0].qText,t.props.mainValue.formatter=v[0],null!=l&&l.customTooltipService.isEnabled()&&(t.props.mainValue.customTooltipAttrExps=u4e.getNode(t.layout,{measureIndex:0,d:e.qHyperCube.qDataPages[0].qMatrix[0][0]}));for(let c=0;c<s;c++){M=h[c+1].qText,V=h[c+1].qNum,H=!v[c+1]||"U"!==v[c+1].type||Number.isNaN(+V)?M:v[c+1].formatValue(V),E=e.qHyperCube.qMeasureInfo[c+1].qFallbackTitle,z[c]||(u=De(L,g,t.props.secondaryLayoutInfo),d={style:u.layoutInfo.components[0].fontSizes.value,titleStyle:u.layoutInfo.components[1].fontSizes.value},z.push(d),p.push(u.layoutInfo)),d=z[c],d.value=V,d.formattedValue=H,d.formatter=v[c+1],d.measureTitle=E,p[c].components[0].getText=L,p[c].components[1].getText=g;const n=p[c].components[0],l=p[c].components[1];"fixed"===y?(n.fontSizes.maxNrChars=2*r.layout[y][e.fontSize],l.fontSizes.maxNrChars=r.layout[y][e.fontSize]*a):(n.fontSizes.maxNrChars=2*r.layout[y][e.fontSize],l.fontSizes.maxNrChars=r.font.baseFontSizeMedium*a)}z.length>s&&(p.splice(s,z.length-s),z.splice(s,z.length-s));return t.props.measureTitle=e.qHyperCube.qMeasureInfo[0].qFallbackTitle,t.props.showSecondaryValues=z.length>0,!0}(O,y,D,R,q)&&(!function(e,t,c,n){var l,a;if(!e.layout)return;const r=t.getBoundingClientRect(),h=e.layout,{inClient:o}=e,{styleModel:m}=n,{baseLayoutInfo:v}=e.props;let i,s;e.props.linkInteractionOn=o&&e.navigation&&e.layout.useLink&&!!e.layout.sheetLink,e.props.verifyDialogLayoutInfo.boundingBox.width=r.width,e.props.verifyDialogLayoutInfo.boundingBox.height=r.height,v.boundingBox=function(e,t){const c=e.layout&&e.layout.snapshotData&&!e.options.freeResize;if(c&&e.layout.snapshotData.elementRatio)return{width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.w*e.layout.snapshotData.elementRatio};const n=t.getBoundingClientRect();return{width:n.width,height:n.height}}(e,t),Y5e.checkLayout(v),v.components.forEach((t=>{let n;n="fixed"===h.layoutBehavior?Y5e.TextScaleMode.NONE:0===e.props.secondaryValues.length&&e.maxFontState?Y5e.TextScaleMode.MAX:Y5e.TextScaleMode.SCALE,Y5e.sizeComponent(t,v,v.boundingBox.width,v.boundingBox.height,n,0===e.props.secondaryValues.length&&e.maxFontState?Y5e.ElementScaleMode.ADJUSTTOTEXT:Y5e.ElementScaleMode.NONE,c)})),s=d4e.getValueInfo(e.props.mainValue.value,0,h,c),e.props.mainValue.cssClass=Z5e.getIconClass(s.icon.icon),e.props.mainValue.icon=s.icon.icon,e.props.mainValue.iconContent=s.icon.iconContent;let z=s.useCondColor&&(null===(l=s)||void 0===l||null===(l=l.icon)||void 0===l||null===(l=l.icon)||void 0===l?void 0:l.length)>0;e.props.mainValue.showGlyph=z;const d=m.query.firstMeasure.value.getStyle({baseLayoutInfo:v,showGlyph:z});e.props.mainValue.style={color:s.color,...d};const p=m.query.firstMeasure.title.getStyle({baseLayoutInfo:v,showGlyph:z});e.props.measureTitleStyle={...p};for(let t=0;t<h.qHyperCube.qMeasureInfo.length-1;t++){var u;s=d4e.getValueInfo(e.props.secondaryValues[t].value,t+1,h,c),e.props.secondaryValues[t].cssClass=Z5e.getIconClass(s.icon.icon),e.props.secondaryValues[t].icon=s.icon.icon,e.props.secondaryValues[t].iconContent=s.icon.iconContent,z=s.useCondColor&&(null===(u=s)||void 0===u||null===(u=u.icon)||void 0===u||null===(u=u.icon)||void 0===u?void 0:u.length)>0,e.props.secondaryValues[t].showGlyph=z;const n=m.query.secondMeasure.value.getStyle({baseLayoutInfo:v,showGlyph:z});e.props.secondaryValues[t].style={color:s.color,...n};const l=m.query.secondMeasure.title.getStyle({baseLayoutInfo:v,showGlyph:z});e.props.secondaryValues[t].titleStyle={...l},i=v.components[1].components[1].components[t].components[1],i.show||(e.props.secondaryValues[t].titleStyle.width=0)}e.props.updateVerifyDialogFontSize(),null!==(a=h.components)&&void 0!==a&&null!==(a=a.find((e=>"general"===e.key)))&&void 0!==a&&a.bgColor?e.props.backgroundStyle={backgroundColor:void 0}:e.props.backgroundStyle={backgroundColor:J5e(h,c)}}(y,w,b,q),await new Promise((e=>{!function(e,t){e.render(E.createElement(h1e,t))}(x,{layout:O,...y.props,models:q,interactions:S,logInfo:f,renderCallback:e})}))))}),[V,O,y,F,S,b.name(),T,q]),u((()=>({getPreferredSize(){const e=w.getBoundingClientRect();return Promise.resolve({w:e.width(),h:Y5e.FixedMobileHeight})}}))),M((e=>{const t=w.getBoundingClientRect();e.snapshotData.isZoomed=y.maxFontState,e.snapshotData.elementRatio=t.height/t.width}))},ext:J4e(e)}}));const w=(e,t)=>V.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{},n=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(c).filter((function(e){return Object.getOwnPropertyDescriptor(c,e).enumerable})))),n.forEach((function(t){T(e,t,c[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),V.createElement("path",{d:"M9 1v1H2v12h12V7h1v7a1 1 0 0 1-.883.993L14 15H2a1 1 0 0 1-.993-.883L1 14V2a1 1 0 0 1 .883-.993L2 1zm7-1v5h-1V1.706l-4.5 4.501-.707-.707L14.292 1H11V0z"})),x=H(w);function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function F(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var c=function e(){var c=!1;try{c=this instanceof e}catch{}return c?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};c.prototype=t.prototype}else c={};return Object.defineProperty(c,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(c,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),c}var R,A,D,k,P,q={exports:{}};function I(){if(A)return R;A=1;return R="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function N(){if(k)return D;k=1;var e=I();function t(){}function c(){}return c.resetWarningCache=t,D=function(){function n(t,c,n,l,a,r){if(r!==e){var h=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 h.name="Invariant Violation",h}}function l(){return n}n.isRequired=n;var a={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:l,element:n,elementType:n,instanceOf:l,node:n,objectOf:l,oneOf:l,oneOfType:l,shape:l,exact:l,checkPropTypes:c,resetWarningCache:t};return a.PropTypes=a,a}}function B(){return P||(P=1,q.exports=N()()),q.exports}var _,j,W=O(B()),$={exports:{}},U={};var G,K,Y=(j||(j=1,$.exports=function(){if(_)return U;_=1;var e=E,t=Symbol.for("react.element"),c=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function r(e,c,r){var h,o={},m=null,v=null;for(h in void 0!==r&&(m=""+r),void 0!==c.key&&(m=""+c.key),void 0!==c.ref&&(v=c.ref),c)n.call(c,h)&&!a.hasOwnProperty(h)&&(o[h]=c[h]);if(e&&e.defaultProps)for(h in c=e.defaultProps)void 0===o[h]&&(o[h]=c[h]);return{$$typeof:t,type:e,key:m,ref:v,props:o,_owner:l.current}}return U.Fragment=c,U.jsx=r,U.jsxs=r,U}()),$.exports);var X=function(){if(K)return G;K=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,c=Object.defineProperty,n=Object.getOwnPropertyDescriptor,l=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},a=function(c){if(!c||"[object Object]"!==t.call(c))return!1;var n,l=e.call(c,"constructor"),a=c.constructor&&c.constructor.prototype&&e.call(c.constructor.prototype,"isPrototypeOf");if(c.constructor&&!l&&!a)return!1;for(n in c);return void 0===n||e.call(c,n)},r=function(e,t){c&&"__proto__"===t.name?c(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},h=function(t,c){if("__proto__"===c){if(!e.call(t,c))return;if(n)return n(t,c).value}return t[c]};return G=function e(){var t,c,n,o,m,v,i=arguments[0],s=1,z=arguments.length,d=!1;for("boolean"==typeof i&&(d=i,i=arguments[1]||{},s=2),(null==i||"object"!=typeof i&&"function"!=typeof i)&&(i={});s<z;++s)if(null!=(t=arguments[s]))for(c in t)n=h(i,c),i!==(o=h(t,c))&&(d&&o&&(a(o)||(m=l(o)))?(m?(m=!1,v=n&&l(n)?n:[]):v=n&&a(n)?n:{},r(i,{name:c,newValue:e(d,v,o)})):void 0!==o&&r(i,{name:c,newValue:o}));return i},G}(),Q=O(X); /** * @preserve IntegraXor Web SCADA - JavaScript Number Formatter * http://www.integraxor.com/ * author: KPL, KHL * (c)2011 ecava * Dual licensed under the MIT or GPL Version 2 licenses. */ function Z(e,t){var c,n,l;if(!e||isNaN(+t))return t;const a=(t="-"===e.charAt(0)?-t:+t)<0?t=-t:0,r=e.match(/[^\d\-\+#]/g),h=(null==r?void 0:r[r.length-1])||".",o=r&&r[1]&&r[0]||",";e=e.split(h);t=""+ +(t=t.toFixed(null===(c=e[1])||void 0===c?void 0:c.length));const m=null===(n=e[1])||void 0===n?void 0:n.lastIndexOf("0"),v=t.split(".");(!v[1]||v[1]&&v[1].length<=m)&&(t=(+t).toFixed(m+1));const i=e[0].split(o);e[0]=i.join("");const s=null===(l=e[0])||void 0===l?void 0:l.indexOf("0");if(s>-1)for(;v[0].length<e[0].length-s;)v[0]=`0${v[0]}`;else 0==+v[0]&&(v[0]="");(t=t.split("."))[0]=v[0];const z=i[1]&&i[i.length-1].length;if(z){const e=t[0];let c="";const n=e.length%z;for(let t=0,l=e.length;t<l;t++)c+=e.charAt(t),!((t-n+1)%z)&&t<l-z&&(c+=o);t[0]=c}return t[1]=e[1]&&t[1]?h+t[1]:"",(a?"-":"")+t[0]+t[1]}const J=e=>e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),ee={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},te=/%$/,ce=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,ne=/^\(oct\)/i,le=/^\(dec\)/i,ae=/^\(hex\)/i,re=/^\(bin\)/i,he=/^\(rom\)/i,oe=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i;function me(e,t,c,n){return e=e.toString(t),c[1]===c[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function ve(e,t,c){let n;return ce.test(t)?e=me(e,Number(/\d{2}/.exec(t)[0]),t,c):ne.test(t)?e=me(e,8,t,c):le.test(t)?e=me(e,10,t,c):ae.test(t)?e=me(e,16,t,c):re.test(t)?e=me(e,2,t,c):he.test(t)&&(n="",e<0&&(n="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let c,n="",l=Number(String(e).slice(-3));const a=(e-l)/1e3,r=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),h=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;l>0;)for(c=0;c<r.length;c++)if(r[c]<=l){n+=h[c],l-=r[c];break}for(c=0;c<a;c++)n=`M${n}`;t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase());return n}(e,t),e=n+e):e=t+n+e.toExponential(0)),e}class ie{constructor(e,t,c,n,l){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=c||",",this.decimalDelimiter=n||".",this.type=l||"numeric",this.abbreviations=function(e){if(!e||!e.qNumericalAbbreviation)return ee;const t={};return e.qNumericalAbbreviation.split(";").forEach((e=>{const c=e.split(":");2===c.length&&(t[c[0]]=c[1])})),t}(e),this.prepare()}clone(){const e=new ie(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,c,n){return this.prepare(t,c,n),this.formatValue(e)}prepare(e,t,c){if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===c&&(c=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:c,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:c,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}};const n=this._prepared;e=e.split(";"),n.positive.pattern=e[0],n.negative.pattern=e[1],oe.test(e[0])&&(n.positive.isFunctional=!0),e[1]?oe.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1;n.positive.isFunctional&&(!n.negative||n.negative&&n.negative.isFunctional)||(se(n.positive,t,c),n.negative&&se(n.negative,t,c))}formatValue(e){let t,c,n,l,a,r,h,o=this._prepared,m="",v="";if(Number.isNaN(+e))return e;if(!1===o.pattern)return e.toString();e<0&&o.negative?(o=o.negative,e=-e):o=o.positive;const i=o.d,s=o.t;if(o.isFunctional)e=ve(e,o.pattern,i);else{if(o.percentage&&(e*=100),o.abbreviate){const t=this.abbreviations,n=Object.keys(t).map((e=>parseInt(e,10))).sort(((e,t)=>e>t?1:-1));let l,r,h=n[0];for(a=0,c=Number(Number(e).toExponential().split("e")[1]);h<=c&&a<n.length;)a++,h=n[a];a>0&&(l=n[a-1]),l&&c>0&&l>0?r=l:(c<0&&l<0||!l)&&(h<0&&h-c<=o.maxPrecision?r=h:l<=c&&!(h>0&&-c<=o.maxPrecision)&&(r=l)),r&&(m=t[r],e/=10**r)}if(n=Math.abs(e),t=o.temp,r=o.numericPattern,h=r.split(i)[1],"I"===this.type&&(e=Math.round(e)),l=e,h||"#"!==r.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number(e.toFixed(Math.min(20,h?h.length:0)).split(".")[0]);let c=r.split(i)[0];if(c+=i,e=Z(c,t)||"0",h){const t=Math.max(0,Math.min(14,h.length)),c=h.replace(/#+$/,"").length;let l=(n%1+Number.EPSILON).toFixed(t);for(l=l.slice(2).replace(/0+$/,""),a=l.length;a<c;a++)l+="0";l&&(e+=i+l)}else 0===t&&(l=0)}else if(n>=10**t||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=l.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),v=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",i));else{for(r+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),a=0;a<t;a++)r+="#";e=Z(r,e)}e=e.replace(o.numericRegex,(e=>e===s?o.groupTemp:e===i?o.decTemp:"")),l<0&&!/^-/.test(e)&&(e=`-${e}`)}return o.prefix+e+v+m+o.postfix}}function se(e,t,c){let n,l,a=e.pattern;a.indexOf("A")>=0&&(a=a.replace("A",""),e.abbreviate=!0);const r=function(e,t){t&&(t=J(t));e&&(e=J(e));return new RegExp(`(?:[#0]+${e})?[#0]+(?:${t}[#0]+)?`)}(t,c);let h=a.match(r);h=h?h[0]:"";const o=h?a.substr(0,a.indexOf(h)):a,m=h?a.substring(a.indexOf(h)+h.length):"";h||(h=a?"#":"##########"),t&&t===c&&(n=h.split(c),l=n.pop(),h=n.join("")+c+l,t="");const v=t;t=/,/.test(c)?"¤":",",v&&(h=h.replace(ze(v,"g"),t));const i=c;c=".",i&&(h=h.replace(ze(i,"g"),c));let s=h.match(/#/g);s=s?s.length:0;const z=a.split(i);let d;z[1]&&(d=z[1].match(/#|0/g)),e.prefix=o||"",e.postfix=m||"",e.pattern=a,e.maxPrecision=d?d.length:2,e.percentage=te.test(a),e.numericPattern=h||"",e.numericRegex=new RegExp(`${ze(t,null,!0)}|${ze(c,null,!0)}`,"g"),e.groupTemp=v,e.decTemp=i,e.t=t,e.d=c,e.temp=s}function ze(e,t,c){const n=J(e);return c?n:new RegExp(n||"",t)}ie.getStaticFormatter=function(){return{prepare(){},formatValue:e=>`${e}`}};const de=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ue=["January","February","March","April","May","June","July","August","September","October","November","December"],Me=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function He(e,t){for(let c=e.length;c<t;c++)e=`0${e}`;return e}function Ve(e){let t=e.toString().split(".");return t[1]?(t=Number(`0.${t[1]}`),t):0}function Ee(e){const t=e,c=24*Ve(t),n=60*Ve(c),l=60*Ve(n),a=1e3*Ve(l);return{d:Math.floor(t),h:Math.floor(c),m:Math.floor(n),s:Math.floor(l),f:Math.round(a)}}class fe{constructor(e,t){const c=e||{};c.qCalendarStrings||(c.qCalendarStrings={qLongDayNames:de,qDayNames:pe,qLongMonthNames:ue,qMonthNames:Me}),this.localeInfo=c,this.locale_days=c.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=c.qCalendarStrings.qDayNames.slice(),this.locale_months=c.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=c.qCalendarStrings.qMonthNames.slice(),this.pattern=t}clone(){const e=new fe(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+\]|\[|\]/g,"");const c=/t+/gi.test(t);let n;e instanceof Date?n=function(e,t){let c=e.getHours(),n=e.getDay()-1;return t&&(c%=12,c||(c=12)),n<0&&(n=6),{year:e.getFullYear(),month:e.getMonth(),day:n,date:e.getDate(),h:c,m:e.getMinutes(),s:e.getSeconds(),f:e.getMilliseconds(),t:e.getHours()>=12?"pm":"am"}}(e,c):(e<0&&(e=-e,t=`-${t}`),n=function(e,t){const c=Ee(e),n=c.d;let l=c.h,a=c.m,r=c.s;const h=c.f;let o,m=0;return/w+|t+/gi.test(t)&&(o=new Date(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e))),Number.isNaN(+o.getTime())&&(o=null)),/D+/gi.test(t)||(l+=24*n),/h+/gi.test(t)||(a+=60*l),/m+/gi.test(t)||(r+=60*a),/w+/gi.test(t)&&(m=o?o.getDay()-1:0,m<0&&(m=6)),{year:0,month:0,day:m,date:n,h:l,m:a,s:r,f:h,t:o?o.getHours()>=12?"pm":"am":""}}(e,t));const l=function(e,t){return{"Y+|y+":{Y:`${Number(`${t.year}`.slice(-2))}`,YY:He(`${t.year}`.slice(-2),2),YYY:He(`${t.year}`.slice(-3),3),def:e=>He(`${t.year}`,e.length)},"M+":{M:t.month+1,MM:He(`${t.month+1}`,2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:He(`${t.day}`,2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>He(`${t.date}`,e.length)},"h+|H+":{h:t.h,def:e=>He(`${t.h}`,e.length)},"m+":{m:t.m,def:e=>He(`${t.m}`,e.length)},"s+|S+":{s:t.s,def:e=>He(`${t.s}`,e.length)},"f+|F+":{def(e){let c=`${t.f}`;const n=e.length-c.length;if(n>0)for(let e=0;e<n;e++)c+="0";else n<0&&(c=c.slice(0,e.length));return c}},"t{1,2}|T{1,2}":{def(e){let c=t.t;return e[0].toUpperCase()===e[0]&&(c=c.toUpperCase()),c=c.slice(0,e.length),c}}}}(this,n),a=[];for(const e in l)a.push(e);const r=new RegExp(a.join("|"),"g"),h=t.replace(r,(e=>{let t,c,n;for(c in l)if(t=new RegExp(c),t.test(e))break;if(!t)return"";for(const t in l[c])if(t===e||t.toLowerCase()===e){n=l[c][t],void 0===n&&(n=l[c][t.toLowerCase()]);break}return void 0===n&&(n=l[c].def),"function"==typeof n&&(n=n(e)),n}));return h}}fe.parseInterval=Ee;const Le="U",ge="I",ye="R",Ce="F",Se="M",be="D",Te="T",we="TS",xe="IV";class Oe{constructor(e,t,c,n,l){const a=e||{};this.localeInfo=a,this.pattern=t||"",this.decimalDelimiter="string"==typeof n?n:"string"==typeof a.qDecimalSep?a.qDecimalSep:".",this.thousandDelimiter="string"==typeof c?c:"string"==typeof a.qThousandSep&&this.decimalDelimiter!==a.qThousandSep?a.qThousandSep:"",this.type=l||Le,l===Le&&(this.pattern=`#${this.decimalDelimiter}##A`),this._numberFormatter=new ie(e),this._dateFormatter=new fe(e),this.prepare()}clone(){return new Oe(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type)}prepare(e,t,c){if(e||(e=this.pattern),!e)switch(this.type){case ge:e="##############";break;case ye:e=Array(this.localeInfo.qnDec||11).join("#");break;case Ce:e=`#${this.localeInfo.qDecimalSep}`||`.${Array(this.localeInfo.qnDec||4).join("#")}`;break;case Se:e=this.localeInfo.qMoneyFmt,c||(c=this.localeInfo.qMoneyDecimalSep||"."),t||c===this.localeInfo.qMoneyThousandSep||(t=this.localeInfo.qMoneyThousandSep);break;case be:e=this.localeInfo.qDateFmt||"YYYY-MM-DD";break;case we:e=this.localeInfo.qTimestampFmt||"YYYY-MM-DD hh:mm:ss";break;case Te:case xe:e=this.localeInfo.qTimeFmt||"hh:mm:ss";break;default:e="##########"}this._numberFormatter.pattern=this.pattern,this._dateFormatter.pattern=this.pattern,this._numberFormatter.thousandDelimiter=this.thousandDelimiter,this._numberFormatter.decimalDelimiter=this.decimalDelimiter,this._numberFormatter.type=this.type,this._numberFormatter.prepare(e,t,c),this._prepared={pattern:e,t:t,d:c}}formatValue(e,t){let c;const n=this._prepared;if("NaN"===e||"number"==typeof e&&Number.isNaN(+e))return"-";if(Number.isNaN(+e)||"number"!=typeof e)return`${e}`;switch(this.type){case be:case Te:case we:return c=new Date(1899,11,30+Math.floor(e),0,0,86400*(e-Math.floor(e))),Number.isNaN(+c.getTime())?this._numberFormatter.format(e,"0",n.t,n.d):this._dateFormatter.format(c,t||n.pattern);case xe:return this._dateFormatter.format(e,n.pattern);default:return this._numberFormatter.formatValue(e)}}format(e,t,c,n){return"NaN"===e||"number"==typeof e&&Number.isNaN(+e)?"-":Number.isNaN(+e)||"number"!=typeof e?`${e}`:(this.prepare(t,c,n),this.formatValue(e))}createPatternFromRange(e,t,c){let n,l="";const a=Number(Number(e).toExponential().split("e")[1]),r=Number(Number(t).toExponential().split("e")[1]),h=Math.min(Math.abs(a),Math.abs(r)),o=Math.abs(t-e);let m;const v=Number(Number(o/50).toExponential().split("e")[1]);let i;if(i=Math.abs(v),0===o)return`0${this.decimalDelimiter}##${c?"A":""}`;if(v>=0?i=c?Math.max(2,h-v):0:(m=(c?h-h%3:0)*(r<0?1:-1),i-=m),this.thousandDelimiter?l+=`#${this.thousandDelimiter}##0`:l+="0",i)for(l+=this.decimalDelimiter,n=0;n<i;n++)l+="#";return l+(c?"A":"")}}class Fe{constructor(e,t){this.localeInfo=e;const c=this.getFormattersForMeasures(t);let n=Q(!0,[],c);if(n&&1===n.length&&t[0].isCustomFormatted)n=null;else{let e=0;for(let c=0;c<n.length;c++)t[c].isCustomFormatted&&(n[c]=null,e++);e===n.length&&(n=null)}this.measureFormatters=n,this.combinedMeasuresFormatter=this.getFormatterFromFormatters(c)}createFormatter(){return new Oe(this.localeInfo)}getLocaleInfo(){return this.localeInfo||{}}getFormatters(){return this.measureFormatters||[]}getMeasureFormatter(e){if(this.measureFormatters&&this.measureFormatters[e])return this.measureFormatters[e]}getCombinedMeasuresFormatter(){return this.combinedMeasuresFormatter}formatMeasure(e,t){const c=this.measureFormatters[t];return c?c.format(e):e}getFormatterFromFormatters(e){let t,c,n,l=0,a=0,r=0;const h=e?e.filter((e=>!!e.values&&!Number.isNaN(+e.values.range))):[];let o,m;return e&&e.length&&(e.forEach((e=>("U"===e.type||e.values&&Number.isNaN(+e.values.range)?a++:["D","T","TS","IV"].includes(e.type)?l=1:r=1,e.prepare(),e))),h.length&&(t=h.reduce(((e,t)=>Math.min(t.values.min,e)),h[0].values.min),c=h.reduce(((e,t)=>Math.max(t.values.max,e)),h[0].values.max),n=Math.abs(c-t)),l+r>1?(m=e.filter((e=>"datetime"!==e.type))[0]||{},o=new Oe(this.localeInfo,m.pattern,m.thousandDelimiter,m.decimalDelimiter,"U"),Number.isNaN(+n)||(o.pattern=o.createPatternFromRange(t,c,!0))):l+r===1&&0===a?(m=e[0]||{},o=new Oe(this.localeInfo,m.pattern,m.thousandDelimiter,m.decimalDelimiter,m.type)):(m=e.filter((e=>"U"!==e.type)),m=m.length?m[0]:e[0]||{},o=new Oe(this.localeInfo,m.pattern,m.thousandDelimiter,m.decimalDelimiter,m.type),Number.isNaN(+n)||"U"!==m.type||(o.pattern=o.createPatternFromRange(t,c,!0))),o.prepare()),o||(o=new Oe(this.localeInfo,"0")),o}getFormattersForMeasures(e,t){let c,n=[];return e&&e.length&&(c=t?e.filter(((e,c)=>t.indexOf(c)>=0)):e,n=c.map((function(e){const t=function(e){return!!e.qIsAutoFormat&&["M","D","T","TS","IV"].indexOf(e.qNumFormat.qType)<0}(e),c=new Oe(this.localeInfo,e.qNumFormat.qFmt,e.qNumFormat.qThou,e.qNumFormat.qDec,t?"U":e.qNumFormat.qType),n=Math.abs(e.qMax-e.qMin),l=Number.isNaN(+n);return c.values={min:e.qMin,max:e.qMax,range:n},!l&&t&&(c.pattern=c.createPatternFromRange(e.qMin,e.qMax,!0)),c.prepare(),c}),this)),n}}function Re(e,t){return!Number.isNaN(+e)&&"U"===(null==t?void 0:t.type)}function Ae(e,t){if("U"===t.type){const c=t.clone();return c.pattern=function(e){let t="0";const c=e.indexOf(".")>-1?e.length-e.indexOf(".")-1:0;if(c){t+=".";for(let e=0;e<c;e++)t+="0"}return`${t}A`}(e),c.prepare(),c}return t}function De(e,t,c){const n={...c};return n.components[0].getText=e,n.components[1].getText=t,{layoutInfo:n,text:e()}}const ke=e=>e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&"),{useState:Pe,useEffect:qe}=E,Ie=({endValue:e,duration:t,formatter:c})=>{const[n,l]=Pe(e),[a,r]=Pe(null),h=(e,c,n,a,o)=>{if(a-o>=t)return void r(Math.random());return l(c=e+(1-(o+t-a)/t)*n),window.requestAnimationFrame((t=>h(e,c,n,t,o)))};return qe((()=>{if(n!==e){const t=performance.now();h(n,n,e-n,t,t)}}),[e]),qe((()=>{null!==a&&l(e)}),[a]),c.format(n)};Ie.propTypes={endValue:W.number.isRequired,duration:W.number.isRequired,formatter:W.object.isRequired}; /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */ const{entries:Ne,setPrototypeOf:Be,isFrozen:_e,getPrototypeOf:je,getOwnPropertyDescriptor:We}=Object;let{freeze:$e,seal:Ue,create:Ge}=Object,{apply:Ke,construct:Ye}="undefined"!=typeof Reflect&&Reflect;$e||($e=function(e){return e}),Ue||(Ue=function(e){return e}),Ke||(Ke=function(e,t,c){return e.apply(t,c)}),Ye||(Ye=function(e,t){return new e(...t)});const Xe=it(Array.prototype.forEach),Qe=it(Array.prototype.lastIndexOf),Ze=it(Array.prototype.pop),Je=it(Array.prototype.push),et=it(Array.prototype.splice),tt=it(String.prototype.toLowerCase),ct=it(String.prototype.toString),nt=it(String.prototype.match),lt=it(String.prototype.replace),at=it(String.prototype.indexOf),rt=it(String.prototype.trim),ht=it(Object.prototype.hasOwnProperty),ot=it(RegExp.prototype.test),mt=(vt=TypeError,function(){for(var e=arguments.length,t=new Array(e),c=0;c<e;c++)t[c]=arguments[c];return Ye(vt,t)});var vt;function it(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var c=arguments.length,n=new Array(c>1?c-1:0),l=1;l<c;l++)n[l-1]=arguments[l];return Ke(e,t,n)}}function st(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tt;Be&&Be(e,null);let n=t.length;for(;n--;){let l=t[n];if("string"==typeof l){const e=c(l);e!==l&&(_e(t)||(t[n]=e),l=e)}e[l]=!0}return e}function zt(e){for(let t=0;t<e.length;t++){ht(e,t)||(e[t]=null)}return e}function dt(e){const t=Ge(null);for(const[c,n]of Ne(e)){ht(e,c)&&(Array.isArray(n)?t[c]=zt(n):n&&"object"==typeof n&&n.constructor===Object?t[c]=dt(n):t[c]=n)}return t}function pt(e,t){for(;null!==e;){const c=We(e,t);if(c){if(c.get)return it(c.get);if("function"==typeof c.value)return it(c.value)}e=je(e)}return function(){return null}}const ut=$e(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Mt=$e(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ht=$e(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Vt=$e(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Et=$e(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ft=$e(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Lt=$e(["#text"]),gt=$e(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),yt=$e(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ct=$e(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),St=$e(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bt=Ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Tt=Ue(/<%[\w\W]*|[\w\W]*%>/gm),wt=Ue(/\$\{[\w\W]*/gm),xt=Ue(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ot=Ue(/^aria-[\-\w]+$/),Ft=Ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Rt=Ue(/^(?:\w+script|data):/i),At=Ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dt=Ue(/^html$/i),kt=Ue(/^[a-z][.\w]*(-[.\w]+)+$/i);var Pt=Object.freeze({__proto__:null,ARIA_ATTR:Ot,ATTR_WHITESPACE:At,CUSTOM_ELEMENT:kt,DATA_ATTR:xt,DOCTYPE_NAME:Dt,ERB_EXPR:Tt,IS_ALLOWED_URI:Ft,IS_SCRIPT_OR_DATA:Rt,MUSTACHE_EXPR:bt,TMPLIT_EXPR:wt});const qt=1,It=3,Nt=7,Bt=8,_t=9,jt=function(){return"undefined"==typeof window?null:window};var Wt=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:jt();const c=t=>e(t);if(c.version="3.2.6",c.removed=[],!t||!t.document||t.document.nodeType!==_t||!t.Element)return c.isSupported=!1,c;let{document:n}=t;const l=n,a=l.currentScript,{DocumentFragment:r,HTMLTemplateElement:h,Node:o,Element:m,NodeFilter:v,NamedNodeMap:i=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:s,DOMParser:z,trustedTypes:d}=t,p=m.prototype,u=pt(p,"cloneNode"),M=pt(p,"remove"),H=pt(p,"nextSibling"),V=pt(p,"childNodes"),E=pt(p,"parentNode");if("function"==typeof h){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let f,L="";const{implementation:g,createNodeIterator:y,createDocumentFragment:C,getElementsByTagName:S}=n,{importNode:b}=l;let T={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};c.isSupported="function"==typeof Ne&&"function"==typeof E&&g&&void 0!==g.createHTMLDocument;const{MUSTACHE_EXPR:w,ERB_EXPR:x,TMPLIT_EXPR:O,DATA_ATTR:F,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:A,ATTR_WHITESPACE:D,CUSTOM_ELEMENT:k}=Pt;let{IS_ALLOWED_URI:P}=Pt,q=null;const I=st({},[...ut,...Mt,...Ht,...Et,...Lt]);let N=null;const B=st({},[...gt,...yt,...Ct,...St]);let _=Object.seal(Ge(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,W=null,$=!0,U=!0,G=!1,K=!0,Y=!1,X=!0,Q=!1,Z=!1,J=!1,ee=!1,te=!1,ce=!1,ne=!0,le=!1,ae=!0,re=!1,he={},oe=null;const me=st({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ve=null;const ie=st({},["audio","video","img","source","image","track"]);let se=null;const ze=st({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml";let Me=ue,He=!1,Ve=null;const Ee=st({},[de,pe,ue],ct);let fe=st({},["mi","mo","mn","ms","mtext"]),Le=st({},["annotation-xml"]);const ge=st({},["title","style","font","a","script"]);let ye=null;const Ce=["application/xhtml+xml","text/html"];let Se=null,be=null;const Te=n.createElement("form"),we=function(e){return e instanceof RegExp||e instanceof Function},xe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!be||be!==e){if(e&&"object"==typeof e||(e={}),e=dt(e),ye=-1===Ce.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Se="application/xhtml+xml"===ye?ct:tt,q=ht(e,"ALLOWED_TAGS")?st({},e.ALLOWED_TAGS,Se):I,N=ht(e,"ALLOWED_ATTR")?st({},e.ALLOWED_ATTR,Se):B,Ve=ht(e,"ALLOWED_NAMESPACES")?st({},e.ALLOWED_NAMESPACES,ct):Ee,se=ht(e,"ADD_URI_SAFE_ATTR")?st(dt(ze),e.ADD_URI_SAFE_ATTR,Se):ze,ve=ht(e,"ADD_DATA_URI_TAGS")?st(dt(ie),e.ADD_DATA_URI_TAGS,Se):ie,oe=ht(e,"FORBID_CONTENTS")?st({},e.FORBID_CONTENTS,Se):me,j=ht(e,"FORBID_TAGS")?st({},e.FORBID_TAGS,Se):dt({}),W=ht(e,"FORBID_ATTR")?st({},e.FORBID_ATTR,Se):dt({}),he=!!ht(e,"USE_PROFILES")&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,U=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,K=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Y=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,ce=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,le=e.SANITIZE_NAMED_PROPS||!1,ae=!1!==e.KEEP_CONTENT,re=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||Ft,Me=e.NAMESPACE||ue,fe=e.MATHML_TEXT_INTEGRATION_POINTS||fe,Le=e.HTML_INTEGRATION_POINTS||Le,_=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Y&&(U=!1),te&&(ee=!0),he&&(q=st({},Lt),N=[],!0===he.html&&(st(q,ut),st(N,gt)),!0===he.svg&&(st(q,Mt),st(N,yt),st(N,St)),!0===he.svgFilters&&(st(q,Ht),st(N,yt),st(N,St)),!0===he.mathMl&&(st(q,Et),st(N,Ct),st(N,St))),e.ADD_TAGS&&(q===I&&(q=dt(q)),st(q,e.ADD_TAGS,Se)),e.ADD_ATTR&&(N===B&&(N=dt(N)),st(N,e.ADD_ATTR,Se)),e.ADD_URI_SAFE_ATTR&&st(se,e.ADD_URI_SAFE_ATTR,Se),e.FORBID_CONTENTS&&(oe===me&&(oe=dt(oe)),st(oe,e.FORBID_CONTENTS,Se)),ae&&(q["#text"]=!0),Q&&st(q,["html","head","body"]),q.table&&(st(q,["tbody"]),delete j.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw mt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');f=e.TRUSTED_TYPES_POLICY,L=f.createHTML("")}else void 0===f&&(f=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let c=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(c=t.getAttribute(n));const l="dompurify"+(c?"#"+c:"");try{return e.createPolicy(l,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+l+" could not be created."),null}}(d,a)),null!==f&&"string"==typeof L&&(L=f.createHTML(""));$e&&$e(e),be=e}},Oe=st({},[...Mt,...Ht,...Vt]),Fe=st({},[...Et,...ft]),Re=function(e){Je(c.removed,{element:e});try{E(e).removeChild(e)}catch(t){M(e)}},Ae=function(e,t){try{Je(c.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Je(c.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{Re(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},De=function(e){let t=null,c=null;if(J)e="<remove></remove>"+e;else{const t=nt(e,/^[\r\n\t ]+/);c=t&&t[0]}"application/xhtml+xml"===ye&&Me===ue&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const l=f?f.createHTML(e):e;if(Me===ue)try{t=(new z).parseFromString(l,ye)}catch(e){}if(!t||!t.documentElement){t=g.createDocument(Me,"template",null);try{t.documentElement.innerHTML=He?L:l}catch(e){}}const a=t.body||t.documentElement;return e&&c&&a.insertBefore(n.createTextNode(c),a.childNodes[0]||null),Me===ue?S.call(t,Q?"html":"body")[0]:Q?t.documentElement:a},ke=function(e){return y.call(e.ownerDocument||e,e,v.SHOW_ELEMENT|v.SHOW_COMMENT|v.SHOW_TEXT|v.SHOW_PROCESSING_INSTRUCTION|v.SHOW_CDATA_SECTION,null)},Pe=function(e){return e instanceof s&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof i)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},qe=function(e){return"function"==typeof o&&e instanceof o};function Ie(e,t,n){Xe(e,(e=>{e.call(c,t,n,be)}))}const Be=function(e){let t=null;if(Ie(T.beforeSanitizeElements,e,null),Pe(e))return Re(e),!0;const n=Se(e.nodeName);if(Ie(T.uponSanitizeElement,e,{tagName:n,allowedTags:q}),X&&e.hasChildNodes()&&!qe(e.firstElementChild)&&ot(/<[/\w!]/g,e.innerHTML)&&ot(/<[/\w!]/g,e.textContent))return Re(e),!0;if(e.nodeType===Nt)return Re(e),!0;if(X&&e.nodeType===Bt&&ot(/<[/\w]/g,e.data))return Re(e),!0;if(!q[n]||j[n]){if(!j[n]&&je(n)){if(_.tagNameCheck instanceof RegExp&&ot(_.tagNameCheck,n))return!1;if(_.tagNameCheck instanceof Function&&_.tagNameCheck(n))return!1}if(ae&&!oe[n]){const t=E(e)||e.parentNode,c=V(e)||e.childNodes;if(c&&t){for(let n=c.length-1;n>=0;--n){const l=u(c[n],!0);l.__removalCount=(e.__removalCount||0)+1,t.insertBefore(l,H(e))}}}return Re(e),!0}return e instanceof m&&!function(e){let t=E(e);t&&t.tagName||(t={namespaceURI:Me,tagName:"template"});const c=tt(e.tagName),n=tt(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===pe?t.namespaceURI===ue?"svg"===c:t.namespaceURI===de?"svg"===c&&("annotation-xml"===n||fe[n]):Boolean(Oe[c]):e.namespaceURI===de?t.namespaceURI===ue?"math"===c:t.namespaceURI===pe?"math"===c&&Le[n]:Boolean(Fe[c]):e.namespaceURI===ue?!(t.namespaceURI===pe&&!Le[n])&&!(t.namespaceURI===de&&!fe[n])&&!Fe[c]&&(ge[c]||!Oe[c]):!("application/xhtml+xml"!==ye||!Ve[e.namespaceURI]))}(e)?(Re(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!ot(/<\/no(script|embed|frames)/i,e.innerHTML)?(Y&&e.nodeType===It&&(t=e.textContent,Xe([w,x,O],(e=>{t=lt(t,e," ")})),e.textContent!==t&&(Je(c.removed,{element:e.cloneNode()}),e.textContent=t)),Ie(T.afterSanitizeElements,e,null),!1):(Re(e),!0)},_e=function(e,t,c){if(ne&&("id"===t||"name"===t)&&(c in n||c in Te))return!1;if(U&&!W[t]&&ot(F,t));else if($&&ot(R,t));else if(!N[t]||W[t]){if(!(je(e)&&(_.tagNameCheck instanceof RegExp&&ot(_.tagNameCheck,e)||_.tagNameCheck instanceof Function&&_.tagNameCheck(e))&&(_.attributeNameCheck instanceof RegExp&&ot(_.attributeNameCheck,t)||_.attributeNameCheck instanceof Function&&_.attributeNameCheck(t))||"is"===t&&_.allowCustomizedBuiltInElements&&(_.tagNameCheck instanceof RegExp&&ot(_.tagNameCheck,c)||_.tagNameCheck instanceof Function&&_.tagNameCheck(c))))return!1}else if(se[t]);else if(ot(P,lt(c,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==at(c,"data:")||!ve[e]){if(G&&!ot(A,lt(c,D,"")));else if(c)return!1}else;return!0},je=function(e){return"annotation-xml"!==e&&nt(e,k)},We=function(e){Ie(T.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||Pe(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0};let l=t.length;for(;l--;){const a=t[l],{name:r,namespaceURI:h,value:o}=a,m=Se(r),v=o;let i="value"===r?v:rt(v);if(n.attrName=m,n.attrValue=i,n.keepAttr=!0,n.forceKeepAttr=void 0,Ie(T.uponSanitizeAttribute,e,n),i=n.attrValue,!le||"id"!==m&&"name"!==m||(Ae(r,e),i="user-content-"+i),X&&ot(/((--!?|])>)|<\/(style|title)/i,i)){Ae