@fluentui/chart-web-components 0.0.0 → 0.0.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +12 -2
  2. package/package.json +2 -2
  3. package/dist/chart-web-components.d.ts +0 -213
  4. package/dist/chart-web-components.js +0 -7088
  5. package/dist/chart-web-components.min.js +0 -106
  6. package/dist/dts/donut-chart/define.d.ts +0 -1
  7. package/dist/dts/donut-chart/donut-chart.bench.d.ts +0 -3
  8. package/dist/dts/donut-chart/donut-chart.d.ts +0 -40
  9. package/dist/dts/donut-chart/donut-chart.definition.d.ts +0 -7
  10. package/dist/dts/donut-chart/donut-chart.options.d.ts +0 -38
  11. package/dist/dts/donut-chart/donut-chart.styles.d.ts +0 -6
  12. package/dist/dts/donut-chart/donut-chart.template.d.ts +0 -12
  13. package/dist/dts/donut-chart/index.d.ts +0 -4
  14. package/dist/dts/helpers.tests.d.ts +0 -30
  15. package/dist/dts/horizontal-bar-chart/define.d.ts +0 -1
  16. package/dist/dts/horizontal-bar-chart/horizontal-bar-chart.bench.d.ts +0 -3
  17. package/dist/dts/horizontal-bar-chart/horizontal-bar-chart.d.ts +0 -46
  18. package/dist/dts/horizontal-bar-chart/horizontal-bar-chart.definition.d.ts +0 -9
  19. package/dist/dts/horizontal-bar-chart/horizontal-bar-chart.options.d.ts +0 -40
  20. package/dist/dts/horizontal-bar-chart/horizontal-bar-chart.styles.d.ts +0 -7
  21. package/dist/dts/horizontal-bar-chart/horizontal-bar-chart.template.d.ts +0 -12
  22. package/dist/dts/horizontal-bar-chart/index.d.ts +0 -4
  23. package/dist/dts/index-rollup.d.ts +0 -2
  24. package/dist/dts/index.d.ts +0 -2
  25. package/dist/dts/utils/benchmark-wrapper.d.ts +0 -2
  26. package/dist/dts/utils/chart-helpers.d.ts +0 -37
  27. package/dist/esm/donut-chart/define.js +0 -4
  28. package/dist/esm/donut-chart/define.js.map +0 -1
  29. package/dist/esm/donut-chart/donut-chart.bench.js +0 -10
  30. package/dist/esm/donut-chart/donut-chart.bench.js.map +0 -1
  31. package/dist/esm/donut-chart/donut-chart.definition.js +0 -18
  32. package/dist/esm/donut-chart/donut-chart.definition.js.map +0 -1
  33. package/dist/esm/donut-chart/donut-chart.js +0 -227
  34. package/dist/esm/donut-chart/donut-chart.js.map +0 -1
  35. package/dist/esm/donut-chart/donut-chart.options.js +0 -2
  36. package/dist/esm/donut-chart/donut-chart.options.js.map +0 -1
  37. package/dist/esm/donut-chart/donut-chart.styles.js +0 -133
  38. package/dist/esm/donut-chart/donut-chart.styles.js.map +0 -1
  39. package/dist/esm/donut-chart/donut-chart.template.js +0 -57
  40. package/dist/esm/donut-chart/donut-chart.template.js.map +0 -1
  41. package/dist/esm/donut-chart/index.js +0 -5
  42. package/dist/esm/donut-chart/index.js.map +0 -1
  43. package/dist/esm/helpers.tests.js +0 -73
  44. package/dist/esm/helpers.tests.js.map +0 -1
  45. package/dist/esm/horizontal-bar-chart/define.js +0 -4
  46. package/dist/esm/horizontal-bar-chart/define.js.map +0 -1
  47. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.bench.js +0 -10
  48. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.bench.js.map +0 -1
  49. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.definition.js +0 -20
  50. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.definition.js.map +0 -1
  51. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.js +0 -412
  52. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.js.map +0 -1
  53. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.options.js +0 -7
  54. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.options.js.map +0 -1
  55. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.styles.js +0 -163
  56. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.styles.js.map +0 -1
  57. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.template.js +0 -53
  58. package/dist/esm/horizontal-bar-chart/horizontal-bar-chart.template.js.map +0 -1
  59. package/dist/esm/horizontal-bar-chart/index.js +0 -5
  60. package/dist/esm/horizontal-bar-chart/index.js.map +0 -1
  61. package/dist/esm/index-rollup.js +0 -3
  62. package/dist/esm/index-rollup.js.map +0 -1
  63. package/dist/esm/index.js +0 -3
  64. package/dist/esm/index.js.map +0 -1
  65. package/dist/esm/utils/benchmark-wrapper.js +0 -18
  66. package/dist/esm/utils/benchmark-wrapper.js.map +0 -1
  67. package/dist/esm/utils/chart-helpers.js +0 -160
  68. package/dist/esm/utils/chart-helpers.js.map +0 -1
@@ -1,106 +0,0 @@
1
- let zt;const Ke="fast-kernel";try{if(document.currentScript)zt=document.currentScript.getAttribute(Ke);else{const e=document.getElementsByTagName("script");zt=e[e.length-1].getAttribute(Ke)}}catch{zt="isolate"}let dt;switch(zt){case"share":dt=Object.freeze({updateQueue:1,observable:2,contextEvent:3,elementRegistry:4});break;case"share-v2":dt=Object.freeze({updateQueue:1.2,observable:2.2,contextEvent:3.2,elementRegistry:4.2});break;default:const e=`-${Math.random().toString(36).substring(2,8)}`;dt=Object.freeze({updateQueue:`1.2${e}`,observable:`2.2${e}`,contextEvent:`3.2${e}`,elementRegistry:`4.2${e}`});break}const ot=e=>typeof e=="function",lt=e=>typeof e=="string",zn=()=>{};var be=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};(function(){if(!(typeof globalThis<"u"))if(typeof be<"u")be.globalThis=be;else if(typeof self<"u")self.globalThis=self;else if(typeof window<"u")window.globalThis=window;else{const t=new Function("return this")();t.globalThis=t}})();const Je={configurable:!1,enumerable:!1,writable:!1};globalThis.FAST===void 0&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},Je));const M=globalThis.FAST;if(M.getById===void 0){const e=Object.create(null);Reflect.defineProperty(M,"getById",Object.assign({value(t,i){let n=e[t];return n===void 0&&(n=i?e[t]=i():null),n}},Je))}M.error===void 0&&Object.assign(M,{warn(){},error(e){return new Error(`Error ${e}`)},addMessages(){}});const Dt=Object.freeze([]);function ye(){const e=new Map;return Object.freeze({register(t){return e.has(t.type)?!1:(e.set(t.type,t),!0)},getByType(t){return e.get(t)},getForInstance(t){if(t!=null)return e.get(t.constructor)}})}function Ye(){const e=new WeakMap;return function(t){let i=e.get(t);if(i===void 0){let n=Reflect.getPrototypeOf(t);for(;i===void 0&&n!==null;)i=e.get(n),n=Reflect.getPrototypeOf(n);i=i===void 0?[]:i.slice(0),e.set(t,i)}return i}}function ut(e){e.prototype.toJSON=zn}const N=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),Ze=e=>e,Dn=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:Ze}):{createHTML:Ze};let It=Object.freeze({createHTML(e){return Dn.createHTML(e)},protect(e,t,i,n){return n}});const In=It,ft=Object.freeze({get policy(){return It},setPolicy(e){if(It!==In)throw M.error(1201);It=e},setAttribute(e,t,i){i==null?e.removeAttribute(t):e.setAttribute(t,i)},setBooleanAttribute(e,t,i){i?e.setAttribute(t,""):e.removeAttribute(t)}}),me=M.getById(dt.updateQueue,()=>{const e=[],t=[],i=globalThis.requestAnimationFrame;let n=!0;function s(){if(t.length)throw t.shift()}function r(c){try{c.call()}catch(h){if(n)t.push(h),setTimeout(s,0);else throw e.length=0,h}}function o(){let h=0;for(;h<e.length;)if(r(e[h]),h++,h>1024){for(let l=0,d=e.length-h;l<d;l++)e[l]=e[l+h];e.length-=h,h=0}e.length=0}function a(c){e.push(c),e.length<2&&(n?i(o):o())}return Object.freeze({enqueue:a,next:()=>new Promise(a),process:o,setMode:c=>n=c})});class Ht{constructor(t,i){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=t,this.sub1=i}has(t){return this.spillover===void 0?this.sub1===t||this.sub2===t:this.spillover.indexOf(t)!==-1}subscribe(t){const i=this.spillover;if(i===void 0){if(this.has(t))return;if(this.sub1===void 0){this.sub1=t;return}if(this.sub2===void 0){this.sub2=t;return}this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else i.indexOf(t)===-1&&i.push(t)}unsubscribe(t){const i=this.spillover;if(i===void 0)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{const n=i.indexOf(t);n!==-1&&i.splice(n,1)}}notify(t){const i=this.spillover,n=this.subject;if(i===void 0){const s=this.sub1,r=this.sub2;s!==void 0&&s.handleChange(n,t),r!==void 0&&r.handleChange(n,t)}else for(let s=0,r=i.length;s<r;++s)i[s].handleChange(n,t)}}class ti{constructor(t){this.subscribers={},this.subjectSubscribers=null,this.subject=t}notify(t){var i,n;(i=this.subscribers[t])===null||i===void 0||i.notify(t),(n=this.subjectSubscribers)===null||n===void 0||n.notify(t)}subscribe(t,i){var n,s;let r;i?r=(n=this.subscribers[i])!==null&&n!==void 0?n:this.subscribers[i]=new Ht(this.subject):r=(s=this.subjectSubscribers)!==null&&s!==void 0?s:this.subjectSubscribers=new Ht(this.subject),r.subscribe(t)}unsubscribe(t,i){var n,s;i?(n=this.subscribers[i])===null||n===void 0||n.unsubscribe(t):(s=this.subjectSubscribers)===null||s===void 0||s.unsubscribe(t)}}const Ft=Object.freeze({unknown:void 0,coupled:1}),V=M.getById(dt.observable,()=>{const e=me.enqueue,t=/(:|&&|\|\||if|\?\.)/,i=new WeakMap;let n,s=h=>{throw M.error(1101)};function r(h){var l;let d=(l=h.$fastController)!==null&&l!==void 0?l:i.get(h);return d===void 0&&(Array.isArray(h)?d=s(h):i.set(h,d=new ti(h))),d}const o=Ye();class a{constructor(l){this.name=l,this.field=`_${l}`,this.callback=`${l}Changed`}getValue(l){return n!==void 0&&n.watch(l,this.name),l[this.field]}setValue(l,d){const u=this.field,f=l[u];if(f!==d){l[u]=d;const p=l[this.callback];ot(p)&&p.call(l,f,d),r(l).notify(this.name)}}}class c extends Ht{constructor(l,d,u=!1){super(l,d),this.expression=l,this.isVolatileBinding=u,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(l){this.isAsync=this.needsQueue=l}bind(l){this.controller=l;const d=this.observe(l.source,l.context);return!l.isBound&&this.requiresUnbind(l)&&l.onUnbind(this),d}requiresUnbind(l){return l.sourceLifetime!==Ft.coupled||this.first!==this.last||this.first.propertySource!==l.source}unbind(l){this.dispose()}observe(l,d){this.needsRefresh&&this.last!==null&&this.dispose();const u=n;n=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let f;try{f=this.expression(l,d)}finally{n=u}return f}disconnect(){this.dispose()}dispose(){if(this.last!==null){let l=this.first;for(;l!==void 0;)l.notifier.unsubscribe(this,l.propertyName),l=l.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(l,d){const u=this.last,f=r(l),p=u===null?this.first:{};if(p.propertySource=l,p.propertyName=d,p.notifier=f,f.subscribe(this,d),u!==null){if(!this.needsRefresh){let g;n=void 0,g=u.propertySource[u.propertyName],n=this,l===g&&(this.needsRefresh=!0)}u.next=p}this.last=p}handleChange(){this.needsQueue?(this.needsQueue=!1,e(this)):this.isAsync||this.call()}call(){this.last!==null&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let l=this.first;for(;l!==void 0;)yield l,l=l.next}}return ut(c),Object.freeze({setArrayObserverFactory(h){s=h},getNotifier:r,track(h,l){n&&n.watch(h,l)},trackVolatile(){n&&(n.needsRefresh=!0)},notify(h,l){r(h).notify(l)},defineProperty(h,l){lt(l)&&(l=new a(l)),o(h).push(l),Reflect.defineProperty(h,l.name,{enumerable:!0,get(){return l.getValue(this)},set(d){l.setValue(this,d)}})},getAccessors:o,binding(h,l,d=this.isVolatileBinding(h)){return new c(h,l,d)},isVolatileBinding(h){return t.test(h.toString())}})});function ct(e,t){V.defineProperty(e,t)}const ei=M.getById(dt.contextEvent,()=>{let e=null;return{get(){return e},set(t){e=t}}}),yt=Object.freeze({default:{index:0,length:0,get event(){return yt.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent(){return ei.get()},setEvent(e){ei.set(e)}});class U{constructor(t,i,n){this.index=t,this.removed=i,this.addedCount=n}adjustTo(t){let i=this.index;const n=t.length;return i>n?i=n-this.addedCount:i<0&&(i=n+this.removed.length+i-this.addedCount),this.index=i<0?0:i,this}}const Hn=Object.freeze({reset:1,splice:2,optimized:3}),ii=new U(0,Dt,0);ii.reset=!0;const ni=[ii];function Fn(e,t,i,n,s,r){const o=r-s+1,a=i-t+1,c=new Array(o);let h,l;for(let d=0;d<o;++d)c[d]=new Array(a),c[d][0]=d;for(let d=0;d<a;++d)c[0][d]=d;for(let d=1;d<o;++d)for(let u=1;u<a;++u)e[t+u-1]===n[s+d-1]?c[d][u]=c[d-1][u-1]:(h=c[d-1][u]+1,l=c[d][u-1]+1,c[d][u]=h<l?h:l);return c}function qn(e){let t=e.length-1,i=e[0].length-1,n=e[t][i];const s=[];for(;t>0||i>0;){if(t===0){s.push(2),i--;continue}if(i===0){s.push(3),t--;continue}const r=e[t-1][i-1],o=e[t-1][i],a=e[t][i-1];let c;o<a?c=o<r?o:r:c=a<r?a:r,c===r?(r===n?s.push(0):(s.push(1),n=r),t--,i--):c===o?(s.push(3),t--,n=o):(s.push(2),i--,n=a)}return s.reverse()}function jn(e,t,i){for(let n=0;n<i;++n)if(e[n]!==t[n])return n;return i}function Wn(e,t,i){let n=e.length,s=t.length,r=0;for(;r<i&&e[--n]===t[--s];)r++;return r}function Un(e,t,i,n){return t<i||n<e?-1:t===i||n===e?0:e<i?t<n?t-i:n-i:n<t?n-e:t-e}function Qn(e,t,i,n,s,r){let o=0,a=0;const c=Math.min(i-t,r-s);if(t===0&&s===0&&(o=jn(e,n,c)),i===e.length&&r===n.length&&(a=Wn(e,n,c-o)),t+=o,s+=o,i-=a,r-=a,i-t===0&&r-s===0)return Dt;if(t===i){const p=new U(t,[],0);for(;s<r;)p.removed.push(n[s++]);return[p]}else if(s===r)return[new U(t,[],i-t)];const h=qn(Fn(e,t,i,n,s,r)),l=[];let d,u=t,f=s;for(let p=0;p<h.length;++p)switch(h[p]){case 0:d!==void 0&&(l.push(d),d=void 0),u++,f++;break;case 1:d===void 0&&(d=new U(u,[],0)),d.addedCount++,u++,d.removed.push(n[f]),f++;break;case 2:d===void 0&&(d=new U(u,[],0)),d.addedCount++,u++;break;case 3:d===void 0&&(d=new U(u,[],0)),d.removed.push(n[f]),f++;break}return d!==void 0&&l.push(d),l}function Xn(e,t){let i=!1,n=0;for(let s=0;s<t.length;s++){const r=t[s];if(r.index+=n,i)continue;const o=Un(e.index,e.index+e.removed.length,r.index,r.index+r.addedCount);if(o>=0){t.splice(s,1),s--,n-=r.addedCount-r.removed.length,e.addedCount+=r.addedCount-o;const a=e.removed.length+r.removed.length-o;if(!e.addedCount&&!a)i=!0;else{let c=r.removed;if(e.index<r.index){const h=e.removed.slice(0,r.index-e.index);h.push(...c),c=h}if(e.index+e.removed.length>r.index+r.addedCount){const h=e.removed.slice(r.index+r.addedCount-e.index);c.push(...h)}e.removed=c,r.index<e.index&&(e.index=r.index)}}else if(e.index<r.index){i=!0,t.splice(s,0,e),s++;const a=e.addedCount-e.removed.length;r.index+=a,n+=a}}i||t.push(e)}function Gn(e,t){let i=[];const n=[];for(let s=0,r=t.length;s<r;s++)Xn(t[s],n);for(let s=0,r=n.length;s<r;++s){const o=n[s];if(o.addedCount===1&&o.removed.length===1){o.removed[0]!==e[o.index]&&i.push(o);continue}i=i.concat(Qn(e,o.index,o.index+o.addedCount,o.removed,0,o.removed.length))}return i}let we=Object.freeze({support:Hn.optimized,normalize(e,t,i){return e===void 0?i===void 0?Dt:Gn(t,i):ni},pop(e,t,i,n){const s=e.length>0,r=i.apply(e,n);return s&&t.addSplice(new U(e.length,[r],0)),r},push(e,t,i,n){const s=i.apply(e,n);return t.addSplice(new U(e.length-n.length,[],n.length).adjustTo(e)),s},reverse(e,t,i,n){const s=i.apply(e,n);return t.reset(e),s},shift(e,t,i,n){const s=e.length>0,r=i.apply(e,n);return s&&t.addSplice(new U(0,[r],0)),r},sort(e,t,i,n){const s=i.apply(e,n);return t.reset(e),s},splice(e,t,i,n){const s=i.apply(e,n);return t.addSplice(new U(+n[0],s,n.length>2?n.length-2:0).adjustTo(e)),s},unshift(e,t,i,n){const s=i.apply(e,n);return t.addSplice(new U(0,[],n.length).adjustTo(e)),s}});Object.freeze({reset:ni,setDefaultStrategy(e){we=e}});function si(e,t,i){Reflect.defineProperty(e,t,{value:i,enumerable:!1})}class Kn extends Ht{constructor(t){super(t),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this.call=this.flush,si(t,"$fastController",this)}get strategy(){return this._strategy}set strategy(t){this._strategy=t}get lengthObserver(){let t=this._lengthObserver;if(t===void 0){const i=this.subject;this._lengthObserver=t={length:i.length,handleChange(){this.length!==i.length&&(this.length=i.length,V.notify(t,"length"))}},this.subscribe(t)}return t}subscribe(t){this.flush(),super.subscribe(t)}addSplice(t){this.splices===void 0?this.splices=[t]:this.splices.push(t),this.enqueue()}reset(t){this.oldCollection=t,this.enqueue()}flush(){var t;const i=this.splices,n=this.oldCollection;i===void 0&&n===void 0||(this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0,this.notify(((t=this._strategy)!==null&&t!==void 0?t:we).normalize(n,this.subject,i)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,me.enqueue(this))}}let ri=!1;const Jn=Object.freeze({enable(){if(ri)return;ri=!0,V.setArrayObserverFactory(t=>new Kn(t));const e=Array.prototype;e.$fastPatch||(si(e,"$fastPatch",1),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach(t=>{e[t.name]=function(...i){var n;const s=this.$fastController;return s===void 0?t.apply(this,i):((n=s.strategy)!==null&&n!==void 0?n:we)[t.name](this,s,t,i)}}))}});class _t{constructor(t,i,n=!1){this.evaluate=t,this.policy=i,this.isVolatile=n}}class Yn extends _t{createObserver(t){return V.binding(this.evaluate,t,this.isVolatile)}}function qt(e,t,i=V.isVolatileBinding(e)){return new Yn(e,t,i)}class oi extends _t{createObserver(){return this}bind(t){return this.evaluate(t.source,t.context)}}ut(oi);function $e(e,t){return new oi(e,t)}function ai(e){return ot(e)?qt(e):e instanceof _t?e:$e(()=>e)}let li;function ci(e){return e.map(t=>t instanceof H?ci(t.styles):[t]).reduce((t,i)=>t.concat(i),[])}class H{constructor(t){this.styles=t,this.targets=new WeakSet,this._strategy=null,this.behaviors=t.map(i=>i instanceof H?i.behaviors:null).reduce((i,n)=>n===null?i:i===null?n:i.concat(n),null)}get strategy(){return this._strategy===null&&this.withStrategy(li),this._strategy}addStylesTo(t){this.strategy.addStylesTo(t),this.targets.add(t)}removeStylesFrom(t){this.strategy.removeStylesFrom(t),this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=this.behaviors===null?t:this.behaviors.concat(t),this}withStrategy(t){return this._strategy=new t(ci(this.styles)),this}static setDefaultStrategy(t){li=t}static normalize(t){return t===void 0?void 0:Array.isArray(t)?new H(t):t instanceof H?t:new H([t])}}H.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const Se=ye(),xe=Object.freeze({getForInstance:Se.getForInstance,getByType:Se.getByType,define(e){return Se.register({type:e}),e}});function _e(e,t,i){t.source.style.setProperty(e.targetAspect,i.bind(t))}class Ce{constructor(t,i){this.dataBinding=t,this.targetAspect=i}createCSS(t){return t(this),`var(${this.targetAspect})`}addedCallback(t){var i;const n=t.source;if(!n.$cssBindings){n.$cssBindings=new Map;const r=n.setAttribute;n.setAttribute=(o,a)=>{r.call(n,o,a),o==="style"&&n.$cssBindings.forEach((c,h)=>_e(h,c.controller,c.observer))}}const s=(i=t[this.targetAspect])!==null&&i!==void 0?i:t[this.targetAspect]=this.dataBinding.createObserver(this,this);s.controller=t,t.source.$cssBindings.set(this,{controller:t,observer:s})}connectedCallback(t){_e(this,t,t[this.targetAspect])}removedCallback(t){t.source.$cssBindings&&t.source.$cssBindings.delete(this)}handleChange(t,i){_e(this,i.controller,i)}}xe.define(Ce);const Zn=`${Math.random().toString(36).substring(2,8)}`;let ts=0;const hi=()=>`--v${Zn}${++ts}`;function di(e,t){const i=[];let n="";const s=[],r=o=>{s.push(o)};for(let o=0,a=e.length-1;o<a;++o){n+=e[o];let c=t[o];ot(c)?c=new Ce(qt(c),hi()).createCSS(r):c instanceof _t?c=new Ce(c,hi()).createCSS(r):xe.getForInstance(c)!==void 0&&(c=c.createCSS(r)),c instanceof H||c instanceof CSSStyleSheet?(n.trim()!==""&&(i.push(n),n=""),i.push(c)):n+=c}return n+=e[e.length-1],n.trim()!==""&&i.push(n),{styles:i,behaviors:s}}const k=(e,...t)=>{const{styles:i,behaviors:n}=di(e,t),s=new H(i);return n.length?s.withBehaviors(...n):s};class ui{constructor(t,i){this.behaviors=i,this.css="";const n=t.reduce((s,r)=>(lt(r)?this.css+=r:s.push(r),s),[]);n.length&&(this.styles=new H(n))}createCSS(t){return this.behaviors.forEach(t),this.styles&&t(this),this.css}addedCallback(t){t.addStyles(this.styles)}removedCallback(t){t.removeStyles(this.styles)}}xe.define(ui),k.partial=(e,...t)=>{const{styles:i,behaviors:n}=di(e,t);return new ui(i,n)};const fi=/fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/,pi=/fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/,gi=/fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/,vi=/fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/,bi=/^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/,yi=/fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;function mi(e){return e&&e.nodeType===Node.COMMENT_NODE}const D=Object.freeze({attributeMarkerName:"data-fe-b",attributeBindingSeparator:" ",contentBindingStartMarker(e,t){return`fe-b$$start$$${e}$$${t}$$fe-b`},contentBindingEndMarker(e,t){return`fe-b$$end$$${e}$$${t}$$fe-b`},repeatStartMarker(e){return`fe-repeat$$start$$${e}$$fe-repeat`},repeatEndMarker(e){return`fe-repeat$$end$$${e}$$fe-repeat`},isContentBindingStartMarker(e){return fi.test(e)},isContentBindingEndMarker(e){return pi.test(e)},isRepeatViewStartMarker(e){return gi.test(e)},isRepeatViewEndMarker(e){return vi.test(e)},isElementBoundaryStartMarker(e){return mi(e)&&bi.test(e.data.trim())},isElementBoundaryEndMarker(e){return mi(e)&&yi.test(e.data)},parseAttributeBinding(e){const t=e.getAttribute(this.attributeMarkerName);return t===null?t:t.split(this.attributeBindingSeparator).map(i=>parseInt(i))},parseContentBindingStartMarker(e){return Si(fi,e)},parseContentBindingEndMarker(e){return Si(pi,e)},parseRepeatStartMarker(e){return wi(gi,e)},parseRepeatEndMarker(e){return wi(vi,e)},parseElementBoundaryStartMarker(e){return $i(bi,e.trim())},parseElementBoundaryEndMarker(e){return $i(yi,e)}});function wi(e,t){const i=e.exec(t);return i===null?i:parseInt(i[1])}function $i(e,t){const i=e.exec(t);return i===null?i:i[1]}function Si(e,t){const i=e.exec(t);return i===null?i:[parseInt(i[1]),i[2]]}const jt=Symbol.for("fe-hydration");function mt(e){return e[jt]===jt}const Ae=`fast-${Math.random().toString(36).substring(2,8)}`,Wt=`${Ae}{`,Ct=`}${Ae}`,es=Ct.length;let is=0;const At=()=>`${Ae}-${++is}`,Te=Object.freeze({interpolation:e=>`${Wt}${e}${Ct}`,attribute:e=>`${At()}="${Wt}${e}${Ct}"`,comment:e=>`<!--${Wt}${e}${Ct}-->`}),Ut=Object.freeze({parse(e,t){const i=e.split(Wt);if(i.length===1)return null;const n=[];for(let s=0,r=i.length;s<r;++s){const o=i[s],a=o.indexOf(Ct);let c;if(a===-1)c=o;else{const h=o.substring(0,a);n.push(t[h]),c=o.substring(a+es)}c!==""&&n.push(c)}return n}}),Be=ye(),Y=Object.freeze({getForInstance:Be.getForInstance,getByType:Be.getByType,define(e,t){return t=t||{},t.type=e,Be.register(t),e},assignAspect(e,t){if(!t){e.aspectType=N.content;return}switch(e.sourceAspect=t,t[0]){case":":e.targetAspect=t.substring(1),e.aspectType=e.targetAspect==="classList"?N.tokenList:N.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=N.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=N.event;break;default:e.targetAspect=t,e.aspectType=N.attribute;break}}});class xi{constructor(t){this.options=t}createHTML(t){return Te.attribute(t(this))}createBehavior(){return this}}ut(xi);class _i extends Error{constructor(t,i,n){super(t),this.factories=i,this.node=n}}function ke(e){return e.nodeType===Node.COMMENT_NODE}function Ci(e){return e.nodeType===Node.TEXT_NODE}function Ai(e,t){const i=document.createRange();return i.setStart(e,0),i.setEnd(t,ke(t)||Ci(t)?t.data.length:t.childNodes.length),i}function ns(e){return e instanceof DocumentFragment&&"mode"in e}function ss(e,t,i){const n=Ai(e,t),s=n.commonAncestorContainer,r=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_COMMENT+NodeFilter.SHOW_TEXT,{acceptNode(h){return n.comparePoint(h,0)===0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),o={},a={};let c=r.currentNode=e;for(;c!==null;){switch(c.nodeType){case Node.ELEMENT_NODE:{rs(c,i,o);break}case Node.COMMENT_NODE:{os(c,r,i,o,a);break}}c=r.nextNode()}return n.detach(),{targets:o,boundaries:a}}function rs(e,t,i){const n=D.parseAttributeBinding(e);if(n!==null){for(const s of n){if(!t[s])throw new _i(`HydrationView was unable to successfully target factory on ${e.nodeName} inside ${e.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`,t,e);Qt(t[s],e,i)}e.removeAttribute(D.attributeMarkerName)}}function os(e,t,i,n,s){if(D.isElementBoundaryStartMarker(e)){as(e,t);return}if(D.isContentBindingStartMarker(e.data)){const r=D.parseContentBindingStartMarker(e.data);if(r===null)return;const[o,a]=r,c=i[o],h=[];let l=t.nextSibling();e.data="";const d=l;for(;l!==null;){if(ke(l)){const u=D.parseContentBindingEndMarker(l.data);if(u&&u[1]===a)break}h.push(l),l=t.nextSibling()}if(l===null){const u=e.getRootNode();throw new Error(`Error hydrating Comment node inside "${ns(u)?u.host.nodeName:u.nodeName}".`)}if(l.data="",h.length===1&&Ci(h[0]))Qt(c,h[0],n);else{l!==d&&l.previousSibling!==null&&(s[c.targetNodeId]={first:d,last:l.previousSibling});const u=l.parentNode.insertBefore(document.createTextNode(""),l);Qt(c,u,n)}}}function as(e,t){const i=D.parseElementBoundaryStartMarker(e.data);let n=t.nextSibling();for(;n!==null;){if(ke(n)){const s=D.parseElementBoundaryEndMarker(n.data);if(s&&s===i)break}n=t.nextSibling()}}function Qt(e,t,i){if(e.targetNodeId===void 0)throw new Error("Factory could not be target to the node");i[e.targetNodeId]=t}var Ti;function Le(e,t){const i=e.parentNode;let n=e,s;for(;n!==t;){if(s=n.nextSibling,!s)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);i.removeChild(n),n=s}i.removeChild(t)}class Bi{constructor(){this.index=0,this.length=0}get event(){return yt.getEvent()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}}class Tt extends Bi{constructor(t,i,n){super(),this.fragment=t,this.factories=i,this.targets=n,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=Ft.unknown,this.context=this,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{const i=this.lastChild;if(t.previousSibling===i)return;const n=t.parentNode;let s=this.firstChild,r;for(;s!==i;)r=s.nextSibling,n.insertBefore(s,t),s=r;n.insertBefore(i,t)}}remove(){const t=this.fragment,i=this.lastChild;let n=this.firstChild,s;for(;n!==i;)s=n.nextSibling,t.appendChild(n),n=s;t.appendChild(i)}dispose(){Le(this.firstChild,this.lastChild),this.unbind()}onUnbind(t){this.unbindables.push(t)}bind(t,i=this){if(this.source===t)return;let n=this.behaviors;if(n===null){this.source=t,this.context=i,this.behaviors=n=new Array(this.factories.length);const s=this.factories;for(let r=0,o=s.length;r<o;++r){const a=s[r].createBehavior();a.bind(this),n[r]=a}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=t,this.context=i;for(let s=0,r=n.length;s<r;++s)n[s].bind(this)}this.isBound=!0}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const t=this.unbindables;for(let i=0,n=t.length;i<n;++i)t[i].unbind(this);t.length=0}static disposeContiguousBatch(t){if(t.length!==0){Le(t[0].firstChild,t[t.length-1].lastChild);for(let i=0,n=t.length;i<n;++i)t[i].unbind()}}}ut(Tt),V.defineProperty(Tt.prototype,"index"),V.defineProperty(Tt.prototype,"length");const pt={unhydrated:"unhydrated",hydrating:"hydrating",hydrated:"hydrated"};class ls extends Error{constructor(t,i,n,s){super(t),this.factory=i,this.fragment=n,this.templateString=s}}class cs extends Bi{constructor(t,i,n,s){super(),this.firstChild=t,this.lastChild=i,this.sourceTemplate=n,this.hostBindingTarget=s,this[Ti]=jt,this.context=this,this.source=null,this.isBound=!1,this.sourceLifetime=Ft.unknown,this.unbindables=[],this.fragment=null,this.behaviors=null,this._hydrationStage=pt.unhydrated,this._bindingViewBoundaries={},this._targets={},this.factories=n.compile().factories}get hydrationStage(){return this._hydrationStage}get targets(){return this._targets}get bindingViewBoundaries(){return this._bindingViewBoundaries}insertBefore(t){if(this.fragment!==null)if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{const i=this.lastChild;if(t.previousSibling===i)return;const n=t.parentNode;let s=this.firstChild,r;for(;s!==i;)r=s.nextSibling,n.insertBefore(s,t),s=r;n.insertBefore(i,t)}}appendTo(t){this.fragment!==null&&t.appendChild(this.fragment)}remove(){const t=this.fragment||(this.fragment=document.createDocumentFragment()),i=this.lastChild;let n=this.firstChild,s;for(;n!==i;){if(s=n.nextSibling,!s)throw new Error(`Unmatched first/last child inside "${i.getRootNode().host.nodeName}".`);t.appendChild(n),n=s}t.appendChild(i)}bind(t,i=this){var n,s;if(this.hydrationStage!==pt.hydrated&&(this._hydrationStage=pt.hydrating),this.source===t)return;let r=this.behaviors;if(r===null){this.source=t,this.context=i;try{const{targets:a,boundaries:c}=ss(this.firstChild,this.lastChild,this.factories);this._targets=a,this._bindingViewBoundaries=c}catch(a){if(a instanceof _i){let c=this.sourceTemplate.html;typeof c!="string"&&(c=c.innerHTML),a.templateString=c}throw a}this.behaviors=r=new Array(this.factories.length);const o=this.factories;for(let a=0,c=o.length;a<c;++a){const h=o[a];if(h.targetNodeId==="h"&&this.hostBindingTarget&&Qt(h,this.hostBindingTarget,this._targets),h.targetNodeId in this.targets){const l=h.createBehavior();l.bind(this),r[a]=l}else{let l=this.sourceTemplate.html;throw typeof l!="string"&&(l=l.innerHTML),new ls(`HydrationView was unable to successfully target bindings inside "${(s=((n=this.firstChild)===null||n===void 0?void 0:n.getRootNode()).host)===null||s===void 0?void 0:s.nodeName}".`,h,Ai(this.firstChild,this.lastChild).cloneContents(),l)}}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=t,this.context=i;for(let o=0,a=r.length;o<a;++o)r[o].bind(this)}this.isBound=!0,this._hydrationStage=pt.hydrated}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){Le(this.firstChild,this.lastChild),this.unbind()}onUnbind(t){this.unbindables.push(t)}evaluateUnbindables(){const t=this.unbindables;for(let i=0,n=t.length;i<n;++i)t[i].unbind(this);t.length=0}}Ti=jt,ut(cs);function hs(e){return e.create!==void 0}function ds(e,t,i,n){if(i==null&&(i=""),hs(i)){e.textContent="";let s=e.$fastView;if(s===void 0)if(mt(n)&&mt(i)&&n.bindingViewBoundaries[this.targetNodeId]!==void 0&&n.hydrationStage!==pt.hydrated){const r=n.bindingViewBoundaries[this.targetNodeId];s=i.hydrate(r.first,r.last)}else s=i.create();else e.$fastTemplate!==i&&(s.isComposed&&(s.remove(),s.unbind()),s=i.create());s.isComposed?s.needsBindOnly&&(s.needsBindOnly=!1,s.bind(n.source,n.context)):(s.isComposed=!0,s.bind(n.source,n.context),s.insertBefore(e),e.$fastView=s,e.$fastTemplate=i)}else{const s=e.$fastView;s!==void 0&&s.isComposed&&(s.isComposed=!1,s.remove(),s.needsBindOnly?s.needsBindOnly=!1:s.unbind()),e.textContent=i}}function us(e,t,i){var n;const s=`${this.id}-t`,r=(n=e[s])!==null&&n!==void 0?n:e[s]={v:0,cv:Object.create(null)},o=r.cv;let a=r.v;const c=e[t];if(i!=null&&i.length){const h=i.split(/\s+/);for(let l=0,d=h.length;l<d;++l){const u=h[l];u!==""&&(o[u]=a,c.add(u))}}if(r.v=a+1,a!==0){a-=1;for(const h in o)o[h]===a&&c.remove(h)}}const fs={[N.attribute]:ft.setAttribute,[N.booleanAttribute]:ft.setBooleanAttribute,[N.property]:(e,t,i)=>e[t]=i,[N.content]:ds,[N.tokenList]:us,[N.event]:()=>{}};class wt{constructor(t){this.dataBinding=t,this.updateTarget=null,this.aspectType=N.content}createHTML(t){return Te.interpolation(t(this))}createBehavior(){var t;if(this.updateTarget===null){const i=fs[this.aspectType],n=(t=this.dataBinding.policy)!==null&&t!==void 0?t:this.policy;if(!i)throw M.error(1205);this.data=`${this.id}-d`,this.updateTarget=n.protect(this.targetTagName,this.aspectType,this.targetAspect,i)}return this}bind(t){var i;const n=t.targets[this.targetNodeId],s=mt(t)&&t.hydrationStage&&t.hydrationStage!==pt.hydrated;switch(this.aspectType){case N.event:n[this.data]=t,n.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case N.content:t.onUnbind(this);default:const r=(i=n[this.data])!==null&&i!==void 0?i:n[this.data]=this.dataBinding.createObserver(this,this);if(r.target=n,r.controller=t,s&&(this.aspectType===N.attribute||this.aspectType===N.booleanAttribute)){r.bind(t);break}this.updateTarget(n,this.targetAspect,r.bind(t),t);break}}unbind(t){const n=t.targets[this.targetNodeId].$fastView;n!==void 0&&n.isComposed&&(n.unbind(),n.needsBindOnly=!0)}handleEvent(t){const i=t.currentTarget[this.data];if(i.isBound){yt.setEvent(t);const n=this.dataBinding.evaluate(i.source,i.context);yt.setEvent(null),n!==!0&&t.preventDefault()}}handleChange(t,i){const n=i.target,s=i.controller;this.updateTarget(n,this.targetAspect,i.bind(s),s)}}Y.define(wt,{aspected:!0});const ki=(e,t)=>`${e}.${t}`,Li={},Z={index:0,node:null};function Ni(e){e.startsWith("fast-")||M.warn(1204,{name:e})}const ps=new Proxy(document.createElement("div"),{get(e,t){Ni(t);const i=Reflect.get(e,t);return ot(i)?i.bind(e):i},set(e,t,i){return Ni(t),Reflect.set(e,t,i)}});class gs{constructor(t,i,n){this.fragment=t,this.directives=i,this.policy=n,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(t,i,n,s,r){var o,a;this.nodeIds.has(n)||(this.nodeIds.add(n),this.addTargetDescriptor(i,n,s)),t.id=(o=t.id)!==null&&o!==void 0?o:At(),t.targetNodeId=n,t.targetTagName=r,t.policy=(a=t.policy)!==null&&a!==void 0?a:this.policy,this.factories.push(t)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(t,i,n){const s=this.descriptors;if(i==="r"||i==="h"||s[i])return;if(!s[t]){const o=t.lastIndexOf("."),a=t.substring(0,o),c=parseInt(t.substring(o+1));this.addTargetDescriptor(a,t,c)}let r=Li[i];if(!r){const o=`_${i}`;Li[i]=r={get(){var a;return(a=this[o])!==null&&a!==void 0?a:this[o]=this[t].childNodes[n]}}}s[i]=r}createView(t){const i=this.fragment.cloneNode(!0),n=Object.create(this.proto);n.r=i,n.h=t??ps;for(const s of this.nodeIds)n[s];return new Tt(i,this.factories,n)}}function Ei(e,t,i,n,s,r=!1){const o=i.attributes,a=e.directives;for(let c=0,h=o.length;c<h;++c){const l=o[c],d=l.value,u=Ut.parse(d,a);let f=null;u===null?r&&(f=new wt($e(()=>d,e.policy)),Y.assignAspect(f,l.name)):f=Ne.aggregate(u,e.policy),f!==null&&(i.removeAttributeNode(l),c--,h--,e.addFactory(f,t,n,s,i.tagName))}}function vs(e,t,i,n,s){const r=Ut.parse(t.textContent,e.directives);if(r===null)return Z.node=t.nextSibling,Z.index=s+1,Z;let o,a=o=t;for(let c=0,h=r.length;c<h;++c){const l=r[c];c!==0&&(s++,n=ki(i,s),o=a.parentNode.insertBefore(document.createTextNode(""),a.nextSibling)),lt(l)?o.textContent=l:(o.textContent=" ",Y.assignAspect(l),e.addFactory(l,i,n,s,null)),a=o}return Z.index=s+1,Z.node=a.nextSibling,Z}function Mi(e,t,i){let n=0,s=t.firstChild;for(;s;){const r=bs(e,i,s,n);s=r.node,n=r.index}}function bs(e,t,i,n){const s=ki(t,n);switch(i.nodeType){case 1:Ei(e,t,i,s,n),Mi(e,i,s);break;case 3:return vs(e,i,t,s,n);case 8:const r=Ut.parse(i.data,e.directives);r!==null&&e.addFactory(Ne.aggregate(r),t,s,n,null);break}return Z.index=n+1,Z.node=i.nextSibling,Z}function ys(e,t){return e&&e.nodeType==8&&Ut.parse(e.data,t)!==null}const Oi="TEMPLATE",Ne={compile(e,t,i=ft.policy){let n;if(lt(e)){n=document.createElement(Oi),n.innerHTML=i.createHTML(e);const o=n.content.firstElementChild;o!==null&&o.tagName===Oi&&(n=o)}else n=e;!n.content.firstChild&&!n.content.lastChild&&n.content.appendChild(document.createComment(""));const s=document.adoptNode(n.content),r=new gs(s,t,i);return Ei(r,"",n,"h",0,!0),(ys(s.firstChild,t)||s.childNodes.length===1&&Object.keys(t).length>0)&&s.insertBefore(document.createComment(""),s.firstChild),Mi(r,s,"r"),Z.node=null,r.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e,t=ft.policy){if(e.length===1)return e[0];let i,n=!1,s;const r=e.length,o=e.map(h=>lt(h)?()=>h:(i=h.sourceAspect||i,n=n||h.dataBinding.isVolatile,s=s||h.dataBinding.policy,h.dataBinding.evaluate)),a=(h,l)=>{let d="";for(let u=0;u<r;++u)d+=o[u](h,l);return d},c=new wt(qt(a,s??t,n));return Y.assignAspect(c,i),c}},ms=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,ws=Object.create(null);class Bt{constructor(t,i=ws){this.html=t,this.factories=i}createHTML(t){const i=this.factories;for(const n in i)t(i[n]);return this.html}}Bt.empty=new Bt(""),Y.define(Bt);function $s(e,t,i,n=Y.getForInstance(e)){if(n.aspected){const s=ms.exec(t);s!==null&&Y.assignAspect(e,s[2])}return e.createHTML(i)}class le{constructor(t,i={},n){this.policy=n,this.result=null,this.html=t,this.factories=i}compile(){return this.result===null&&(this.result=Ne.compile(this.html,this.factories,this.policy)),this.result}create(t){return this.compile().createView(t)}inline(){return new Bt(lt(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(t){if(this.result)throw M.error(1208);if(this.policy)throw M.error(1207);return this.policy=t,this}render(t,i,n){const s=this.create(n);return s.bind(t),s.appendTo(i),s}static create(t,i,n){let s="";const r=Object.create(null),o=a=>{var c;const h=(c=a.id)!==null&&c!==void 0?c:a.id=At();return r[h]=a,h};for(let a=0,c=t.length-1;a<c;++a){const h=t[a];let l=i[a],d;if(s+=h,ot(l))l=new wt(qt(l));else if(l instanceof _t)l=new wt(l);else if(!(d=Y.getForInstance(l))){const u=l;l=new wt($e(()=>u))}s+=$s(l,h,o,d)}return new le(s+t[t.length-1],r,n)}}ut(le);const at=(e,...t)=>{if(Array.isArray(e)&&Array.isArray(e.raw))return le.create(e,t);throw M.error(1206)};at.partial=e=>new Bt(e);class Ri extends xi{bind(t){t.source[this.options]=t.targets[this.targetNodeId]}}Y.define(Ri);const Ee=e=>new Ri(e),Ss=()=>null;function Vi(e){return e===void 0?Ss:ot(e)?e:()=>e}function Xt(e,t,i){const n=ot(e)?e:()=>e,s=Vi(t),r=Vi(i);return(o,a)=>n(o,a)?s(o,a):r(o,a)}const Pi=Object.freeze({positioning:!1,recycle:!0});function xs(e,t,i,n){e.context.parent=n.source,e.context.parentContext=n.context,e.bind(t[i])}function _s(e,t,i,n){e.context.parent=n.source,e.context.parentContext=n.context,e.context.length=t.length,e.context.index=i,e.bind(t[i])}function zi(e){return e.nodeType===Node.COMMENT_NODE}class Di extends Error{constructor(t,i){super(t),this.propertyBag=i}}class Cs{constructor(t){this.directive=t,this.items=null,this.itemsObserver=null,this.bindView=xs,this.views=[],this.itemsBindingObserver=t.dataBinding.createObserver(this,t),this.templateBindingObserver=t.templateBinding.createObserver(this,t),t.options.positioning&&(this.bindView=_s)}bind(t){this.location=t.targets[this.directive.targetNodeId],this.controller=t,this.items=this.itemsBindingObserver.bind(t),this.template=this.templateBindingObserver.bind(t),this.observeItems(!0),mt(this.template)&&mt(t)&&t.hydrationStage!==pt.hydrated?this.hydrateViews(this.template):this.refreshAllViews(),t.onUnbind(this)}unbind(){this.itemsObserver!==null&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(t,i){if(i===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(i===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else if(i[0])i[0].reset?this.refreshAllViews():this.updateViews(i);else return}observeItems(t=!1){if(!this.items){this.items=Dt;return}const i=this.itemsObserver,n=this.itemsObserver=V.getNotifier(this.items),s=i!==n;s&&i!==null&&i.unsubscribe(this),(s||t)&&n.subscribe(this)}updateViews(t){const i=this.views,n=this.bindView,s=this.items,r=this.template,o=this.controller,a=this.directive.options.recycle,c=[];let h=0,l=0;for(let d=0,u=t.length;d<u;++d){const f=t[d],p=f.removed;let g=0,A=f.index;const m=A+f.addedCount,w=i.splice(f.index,p.length),_=l=c.length+w.length;for(;A<m;++A){const S=i[A],T=S?S.firstChild:this.location;let B;a&&l>0?(g<=_&&w.length>0?(B=w[g],g++):(B=c[h],h++),l--):B=r.create(),i.splice(A,0,B),n(B,s,A,o),B.insertBefore(T)}w[g]&&c.push(...w.slice(g))}for(let d=h,u=c.length;d<u;++d)c[d].dispose();if(this.directive.options.positioning)for(let d=0,u=i.length;d<u;++d){const f=i[d].context;f.length=u,f.index=d}}refreshAllViews(t=!1){const i=this.items,n=this.template,s=this.location,r=this.bindView,o=this.controller;let a=i.length,c=this.views,h=c.length;if((a===0||t||!this.directive.options.recycle)&&(Tt.disposeContiguousBatch(c),h=0),h===0){this.views=c=new Array(a);for(let l=0;l<a;++l){const d=n.create();r(d,i,l,o),c[l]=d,d.insertBefore(s)}}else{let l=0;for(;l<a;++l)if(l<h){const u=c[l];if(!u){const f=new XMLSerializer;throw new Di(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:l,hydrationStage:this.controller.hydrationStage,itemsLength:a,viewsState:c.map(p=>p?"hydrated":"empty"),viewTemplateString:f.serializeToString(n.create().fragment),rootNodeContent:f.serializeToString(this.location.getRootNode())})}r(u,i,l,o)}else{const u=n.create();r(u,i,l,o),c.push(u),u.insertBefore(s)}const d=c.splice(l,h-l);for(l=0,a=d.length;l<a;++l)d[l].dispose()}}unbindAllViews(){const t=this.views;for(let i=0,n=t.length;i<n;++i){const s=t[i];if(!s){const r=new XMLSerializer;throw new Di(`View is null or undefined inside "${this.location.getRootNode().host.nodeName}".`,{index:i,hydrationStage:this.controller.hydrationStage,viewsState:t.map(o=>o?"hydrated":"empty"),rootNodeContent:r.serializeToString(this.location.getRootNode())})}s.unbind()}}hydrateViews(t){if(!this.items)return;this.views=new Array(this.items.length);let i=this.location.previousSibling;for(;i!==null;){if(!zi(i)){i=i.previousSibling;continue}const n=D.parseRepeatEndMarker(i.data);if(n===null){i=i.previousSibling;continue}i.data="";const s=i.previousSibling;if(!s)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": end should never be null.`);let r=s,o=0;for(;r!==null;){if(zi(r)){if(D.isRepeatViewEndMarker(r.data))o++;else if(D.isRepeatViewStartMarker(r.data))if(o)o--;else{if(D.parseRepeatStartMarker(r.data)!==n)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": Mismatched start and end markers.`);r.data="",i=r.previousSibling,r=r.nextSibling;const a=t.hydrate(r,s);this.views[n]=a,this.bindView(a,this.items,n,this.controller);break}}r=r.previousSibling}if(!r)throw new Error(`Error when hydrating inside "${this.location.getRootNode().host.nodeName}": start should never be null.`)}}}class Ii{constructor(t,i,n){this.dataBinding=t,this.templateBinding=i,this.options=n,Jn.enable()}createHTML(t){return Te.comment(t(this))}createBehavior(){return new Cs(this)}}Y.define(Ii);function Hi(e,t,i=Pi){const n=ai(e),s=ai(t);return new Ii(n,s,Object.assign(Object.assign({},Pi),i))}const Fi="boolean",qi="reflect",ji=Object.freeze({locate:Ye()}),As={toView(e){return e?"true":"false"},fromView(e){return!(e==null||e==="false"||e===!1||e===0)}};function Wi(e){if(e==null)return null;const t=e*1;return isNaN(t)?null:t}const Me={toView(e){const t=Wi(e);return t&&t.toString()},fromView:Wi};class ce{constructor(t,i,n=i.toLowerCase(),s=qi,r){this.guards=new Set,this.Owner=t,this.name=i,this.attribute=n,this.mode=s,this.converter=r,this.fieldName=`_${i}`,this.callbackName=`${i}Changed`,this.hasCallback=this.callbackName in t.prototype,s===Fi&&r===void 0&&(this.converter=As)}setValue(t,i){const n=t[this.fieldName],s=this.converter;s!==void 0&&(i=s.fromView(i)),n!==i&&(t[this.fieldName]=i,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](n,i),t.$fastController.notify(this.name))}getValue(t){return V.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,i){this.guards.has(t)||(this.guards.add(t),this.setValue(t,i),this.guards.delete(t))}tryReflectToAttribute(t){const i=this.mode,n=this.guards;n.has(t)||i==="fromView"||me.enqueue(()=>{n.add(t);const s=t[this.fieldName];switch(i){case qi:const r=this.converter;ft.setAttribute(t,this.attribute,r!==void 0?r.toView(s):s);break;case Fi:ft.setBooleanAttribute(t,this.attribute,s);break}n.delete(t)})}static collect(t,...i){const n=[];i.push(ji.locate(t));for(let s=0,r=i.length;s<r;++s){const o=i[s];if(o!==void 0)for(let a=0,c=o.length;a<c;++a){const h=o[a];lt(h)?n.push(new ce(t,h)):n.push(new ce(t,h.property,h.attribute,h.mode,h.converter))}}return n}}function P(e,t){let i;function n(s,r){arguments.length>1&&(i.property=r),ji.locate(s.constructor).push(i)}if(arguments.length>1){i={},n(e,t);return}return i=e===void 0?{}:e,n}const Ui={mode:"open"},Qi={},Xi=new Set,Gt=M.getById(dt.elementRegistry,()=>ye());class X{constructor(t,i=t.definition){var n;this.platformDefined=!1,lt(i)&&(i={name:i}),this.type=t,this.name=i.name,this.template=i.template,this.registry=(n=i.registry)!==null&&n!==void 0?n:customElements;const s=t.prototype,r=ce.collect(t,i.attributes),o=new Array(r.length),a={},c={};for(let h=0,l=r.length;h<l;++h){const d=r[h];o[h]=d.attribute,a[d.name]=d,c[d.attribute]=d,V.defineProperty(s,d)}Reflect.defineProperty(t,"observedAttributes",{value:o,enumerable:!0}),this.attributes=r,this.propertyLookup=a,this.attributeLookup=c,this.shadowOptions=i.shadowOptions===void 0?Ui:i.shadowOptions===null?void 0:Object.assign(Object.assign({},Ui),i.shadowOptions),this.elementOptions=i.elementOptions===void 0?Qi:Object.assign(Object.assign({},Qi),i.elementOptions),this.styles=H.normalize(i.styles),Gt.register(this)}get isDefined(){return this.platformDefined}define(t=this.registry){const i=this.type;return t.get(this.name)||(this.platformDefined=!0,t.define(this.name,i,this.elementOptions)),this}static compose(t,i){return Xi.has(t)||Gt.getByType(t)?new X(class extends t{},i):new X(t,i)}static registerBaseType(t){Xi.add(t)}}X.getByType=Gt.getByType,X.getForInstance=Gt.getForInstance;class Ts extends MutationObserver{constructor(t){function i(n){this.callback.call(null,n.filter(s=>this.observedNodes.has(s.target)))}super(i),this.callback=t,this.observedNodes=new Set}observe(t,i){this.observedNodes.add(t),super.observe(t,i)}unobserve(t){this.observedNodes.delete(t),this.observedNodes.size<1&&this.disconnect()}}Object.freeze({create(e){const t=[],i={};let n=null,s=!1;return{source:e,context:yt.default,targets:i,get isBound(){return s},addBehaviorFactory(r,o){var a,c,h,l;const d=r;d.id=(a=d.id)!==null&&a!==void 0?a:At(),d.targetNodeId=(c=d.targetNodeId)!==null&&c!==void 0?c:At(),d.targetTagName=(h=o.tagName)!==null&&h!==void 0?h:null,d.policy=(l=d.policy)!==null&&l!==void 0?l:ft.policy,this.addTarget(d.targetNodeId,o),this.addBehavior(d.createBehavior())},addTarget(r,o){i[r]=o},addBehavior(r){t.push(r),s&&r.bind(this)},onUnbind(r){n===null&&(n=[]),n.push(r)},connectedCallback(r){s||(s=!0,t.forEach(o=>o.bind(this)))},disconnectedCallback(r){s&&(s=!1,n!==null&&n.forEach(o=>o.unbind(this)))}}}});const Bs={bubbles:!0,composed:!0,cancelable:!0},Kt="isConnected",Gi=new WeakMap;function kt(e){var t,i;return(i=(t=e.shadowRoot)!==null&&t!==void 0?t:Gi.get(e))!==null&&i!==void 0?i:null}let Ki;class $t extends ti{constructor(t,i){super(t),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this.source=t,this.definition=i;const n=i.shadowOptions;if(n!==void 0){let r=t.shadowRoot;r?this.hasExistingShadowRoot=!0:(r=t.attachShadow(n),n.mode==="closed"&&Gi.set(t,r))}const s=V.getAccessors(t);if(s.length>0){const r=this.boundObservables=Object.create(null);for(let o=0,a=s.length;o<a;++o){const c=s[o].name,h=t[c];h!==void 0&&(delete t[c],r[c]=h)}}}get isConnected(){return V.track(this,Kt),this.stage===1}get context(){var t,i;return(i=(t=this.view)===null||t===void 0?void 0:t.context)!==null&&i!==void 0?i:yt.default}get isBound(){var t,i;return(i=(t=this.view)===null||t===void 0?void 0:t.isBound)!==null&&i!==void 0?i:!1}get sourceLifetime(){var t;return(t=this.view)===null||t===void 0?void 0:t.sourceLifetime}get template(){var t;if(this._template===null){const i=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():i.template&&(this._template=(t=i.template)!==null&&t!==void 0?t:null)}return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get mainStyles(){var t;if(this._mainStyles===null){const i=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():i.styles&&(this._mainStyles=(t=i.styles)!==null&&t!==void 0?t:null)}return this._mainStyles}set mainStyles(t){this._mainStyles!==t&&(this._mainStyles!==null&&this.removeStyles(this._mainStyles),this._mainStyles=t,this.needsInitialization||this.addStyles(t))}onUnbind(t){var i;(i=this.view)===null||i===void 0||i.onUnbind(t)}addBehavior(t){var i,n;const s=(i=this.behaviors)!==null&&i!==void 0?i:this.behaviors=new Map,r=(n=s.get(t))!==null&&n!==void 0?n:0;r===0?(s.set(t,1),t.addedCallback&&t.addedCallback(this),t.connectedCallback&&!this.guardBehaviorConnection&&(this.stage===1||this.stage===0)&&t.connectedCallback(this)):s.set(t,r+1)}removeBehavior(t,i=!1){const n=this.behaviors;if(n===null)return;const s=n.get(t);s!==void 0&&(s===1||i?(n.delete(t),t.disconnectedCallback&&this.stage!==3&&t.disconnectedCallback(this),t.removedCallback&&t.removedCallback(this)):n.set(t,s-1))}addStyles(t){var i;if(!t)return;const n=this.source;if(t instanceof HTMLElement)((i=kt(n))!==null&&i!==void 0?i:this.source).append(t);else if(!t.isAttachedTo(n)){const s=t.behaviors;if(t.addStylesTo(n),s!==null)for(let r=0,o=s.length;r<o;++r)this.addBehavior(s[r])}}removeStyles(t){var i;if(!t)return;const n=this.source;if(t instanceof HTMLElement)((i=kt(n))!==null&&i!==void 0?i:n).removeChild(t);else if(t.isAttachedTo(n)){const s=t.behaviors;if(t.removeStylesFrom(n),s!==null)for(let r=0,o=s.length;r<o;++r)this.removeBehavior(s[r])}}connect(){this.stage===3&&(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):this.view!==null&&this.view.bind(this.source),this.stage=1,V.notify(this,Kt))}bindObservables(){if(this.boundObservables!==null){const t=this.source,i=this.boundObservables,n=Object.keys(i);for(let s=0,r=n.length;s<r;++s){const o=n[s];t[o]=i[o]}this.boundObservables=null}}connectBehaviors(){if(this.behaviorsConnected===!1){const t=this.behaviors;if(t!==null){this.guardBehaviorConnection=!0;for(const i of t.keys())i.connectedCallback&&i.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(this.behaviorsConnected===!0){const t=this.behaviors;if(t!==null)for(const i of t.keys())i.disconnectedCallback&&i.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===1&&(this.stage=2,V.notify(this,Kt),this.view!==null&&this.view.unbind(),this.disconnectBehaviors(),this.stage=3)}onAttributeChangedCallback(t,i,n){const s=this.definition.attributeLookup[t];s!==void 0&&s.onAttributeChangedCallback(this.source,n)}emit(t,i,n){return this.stage===1?this.source.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:i},Bs),n))):!1}renderTemplate(t){var i;const n=this.source,s=(i=kt(n))!==null&&i!==void 0?i:n;if(this.view!==null)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let r=s.firstChild;r!==null;r=s.firstChild)s.removeChild(r)}t&&(this.view=t.render(n,s,n),this.view.sourceLifetime=Ft.coupled)}static forCustomElement(t){const i=t.$fastController;if(i!==void 0)return i;const n=X.getForInstance(t);if(n===void 0)throw M.error(1401);return t.$fastController=new Ki(t,n)}static setStrategy(t){Ki=t}}ut($t),$t.setStrategy($t);function Jt(e){var t;return"adoptedStyleSheets"in e?e:(t=kt(e))!==null&&t!==void 0?t:e.getRootNode()}class he{constructor(t){const i=he.styleSheetCache;this.sheets=t.map(n=>{if(n instanceof CSSStyleSheet)return n;let s=i.get(n);return s===void 0&&(s=new CSSStyleSheet,s.replaceSync(n),i.set(n,s)),s})}addStylesTo(t){Yi(Jt(t),this.sheets)}removeStylesFrom(t){Zi(Jt(t),this.sheets)}}he.styleSheetCache=new Map;let ks=0;const Ls=()=>`fast-${++ks}`;function Ji(e){return e===document?document.body:e}class Ns{constructor(t){this.styles=t,this.styleClass=Ls()}addStylesTo(t){t=Ji(Jt(t));const i=this.styles,n=this.styleClass;for(let s=0;s<i.length;s++){const r=document.createElement("style");r.innerHTML=i[s],r.className=n,t.append(r)}}removeStylesFrom(t){t=Ji(Jt(t));const i=t.querySelectorAll(`.${this.styleClass}`);for(let n=0,s=i.length;n<s;++n)t.removeChild(i[n])}}let Yi=(e,t)=>{e.adoptedStyleSheets=[...e.adoptedStyleSheets,...t]},Zi=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(i=>t.indexOf(i)===-1)};if(H.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),Yi=(e,t)=>{e.adoptedStyleSheets.push(...t)},Zi=(e,t)=>{for(const i of t){const n=e.adoptedStyleSheets.indexOf(i);n!==-1&&e.adoptedStyleSheets.splice(n,1)}}}catch{}H.setDefaultStrategy(he)}else H.setDefaultStrategy(Ns);const tn="defer-hydration",en="needs-hydration";class bt extends $t{static hydrationObserverHandler(t){for(const i of t)bt.hydrationObserver.unobserve(i.target),i.target.$fastController.connect()}connect(){var t,i;if(this.needsHydration===void 0&&(this.needsHydration=this.source.getAttribute(en)!==null),this.source.hasAttribute(tn)){bt.hydrationObserver.observe(this.source,{attributeFilter:[tn]});return}if(!this.needsHydration){super.connect();return}if(this.stage!==3)return;this.stage=0,this.bindObservables(),this.connectBehaviors();const n=this.source,s=(t=kt(n))!==null&&t!==void 0?t:n;if(this.template)if(mt(this.template)){let r=s.firstChild,o=s.lastChild;n.shadowRoot===null&&(D.isElementBoundaryStartMarker(r)&&(r.data="",r=r.nextSibling),D.isElementBoundaryEndMarker(o)&&(o.data="",o=o.previousSibling)),this.view=this.template.hydrate(r,o,n),(i=this.view)===null||i===void 0||i.bind(this.source)}else this.renderTemplate(this.template);this.addStyles(this.mainStyles),this.stage=1,this.source.removeAttribute(en),this.needsInitialization=this.needsHydration=!1,V.notify(this,Kt)}disconnect(){super.disconnect(),bt.hydrationObserver.unobserve(this.source)}static install(){$t.setStrategy(bt)}}bt.hydrationObserver=new Ts(bt.hydrationObserverHandler);function nn(e){const t=class extends e{constructor(){super(),$t.forCustomElement(this)}$emit(i,n,s){return this.$fastController.emit(i,n,s)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(i,n,s){this.$fastController.onAttributeChangedCallback(i,n,s)}};return X.registerBaseType(t),t}function Es(e,t){return ot(e)?X.compose(e,t):X.compose(this,e)}function Ms(e,t){return ot(e)?X.compose(e,t).define().type:X.compose(this,e).define().type}function Os(e){return nn(e)}const sn=Object.assign(nn(HTMLElement),{from:Os,define:Ms,compose:Es});var Lt;(function(e){e.ltr="ltr",e.rtl="rtl"})(Lt||(Lt={}));const Rs=e=>{var t;return((t=e.closest("[dir]"))===null||t===void 0?void 0:t.dir)==="rtl"?Lt.rtl:Lt.ltr},Vs=":host([hidden]){display:none}";function rn(e){return`${Vs}:host{display:${e}}`}class Ps{constructor(t){this.listenerCache=new WeakMap,this.query=t}connectedCallback(t){const{query:i}=this;let n=this.listenerCache.get(t);n||(n=this.constructListener(t),this.listenerCache.set(t,n)),n.bind(i)(),i.addEventListener("change",n)}disconnectedCallback(t){const i=this.listenerCache.get(t);i&&this.query.removeEventListener("change",i)}}class Mt extends Ps{constructor(t,i){super(t),this.styles=i}static with(t){return i=>new Mt(t,i)}constructListener(t){let i=!1;const n=this.styles;return function(){const{matches:r}=this;r&&!i?(t.addStyles(n),i=r):!r&&i&&(t.removeStyles(n),i=r)}}removedCallback(t){t.removeStyles(this.styles)}}const on=Mt.with(window.matchMedia("(forced-colors)"));Mt.with(window.matchMedia("(prefers-color-scheme: dark)")),Mt.with(window.matchMedia("(prefers-color-scheme: light)"));const tt="var(--colorNeutralForeground1)",Yt="var(--colorNeutralBackground1)",zs="var(--colorNeutralStrokeAccessible)",Ds="var(--colorTransparentStroke)",Is="var(--colorStrokeFocus1)",Hs="var(--colorStrokeFocus2)",Fs="var(--colorNeutralShadowAmbient)",qs="var(--colorNeutralShadowKey)",js="var(--borderRadiusMedium)",E="var(--fontFamilyBase)",an="var(--fontSizeBase100)",Oe="var(--fontSizeBase200)",Re="var(--fontSizeBase300)",Ve="var(--fontSizeBase400)",Ws="var(--fontSizeBase500)",Us="var(--fontSizeBase600)",Qs="var(--fontSizeHero700)",Xs="var(--fontSizeHero800)",Gs="var(--fontSizeHero900)",Ks="var(--fontSizeHero1000)",Zt="var(--fontWeightRegular)",et="var(--fontWeightSemibold)",Pe="var(--fontWeightBold)",ln="var(--lineHeightBase100)",ze="var(--lineHeightBase200)",De="var(--lineHeightBase300)",Ie="var(--lineHeightBase400)",Js="var(--lineHeightBase500)",Ys="var(--lineHeightBase600)",Zs="var(--lineHeightHero700)",tr="var(--lineHeightHero800)",er="var(--lineHeightHero900)",ir="var(--lineHeightHero1000)",nr="var(--shadow4)",He="var(--strokeWidthThin)",cn="var(--strokeWidthThick)",te="var(--strokeWidthThickest)",hn="var(--spacingHorizontalNone)",sr="var(--spacingHorizontalSNudge)",ht="var(--spacingHorizontalS)",dn="var(--spacingHorizontalL)",un="var(--spacingVerticalNone)",rr="var(--spacingVerticalXS)",fn="var(--spacingVerticalS)",pn="var(--spacingVerticalMNudge)",gn="var(--spacingVerticalL)",ee=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElements}),vn=k.partial`
2
- font-family: ${E};
3
- font-size: ${Re};
4
- line-height: ${De};
5
- font-weight: ${Zt};
6
- `,ie=k.partial`
7
- font-family: ${E};
8
- font-size: ${Re};
9
- line-height: ${De};
10
- font-weight: ${et};
11
- `;k.partial`
12
- font-family: ${E};
13
- font-size: ${Re};
14
- line-height: ${De};
15
- font-weight: ${Pe};
16
- `,k.partial`
17
- font-family: ${E};
18
- font-size: ${Ve};
19
- line-height: ${Ie};
20
- font-weight: ${Zt};
21
- `;const Nt=k.partial`
22
- font-family: ${E};
23
- font-size: ${Oe};
24
- line-height: ${ze};
25
- font-weight: ${Zt};
26
- `;k.partial`
27
- font-family: ${E};
28
- font-size: ${Oe};
29
- line-height: ${ze};
30
- font-weight: ${et};
31
- `,k.partial`
32
- font-family: ${E};
33
- font-size: ${Oe};
34
- line-height: ${ze};
35
- font-weight: ${Pe};
36
- `,k.partial`
37
- font-family: ${E};
38
- font-size: ${an};
39
- line-height: ${ln};
40
- font-weight: ${Zt};
41
- `,k.partial`
42
- font-family: ${E};
43
- font-size: ${an};
44
- line-height: ${ln};
45
- font-weight: ${et};
46
- `,k.partial`
47
- font-family: ${E};
48
- font-size: ${Ws};
49
- line-height: ${Js};
50
- font-weight: ${et};
51
- `,k.partial`
52
- font-family: ${E};
53
- font-size: ${Ve};
54
- line-height: ${Ie};
55
- font-weight: ${et};
56
- `,k.partial`
57
- font-family: ${E};
58
- font-size: ${Ve};
59
- line-height: ${Ie};
60
- font-weight: ${Pe};
61
- `,k.partial`
62
- font-family: ${E};
63
- font-size: ${Xs};
64
- line-height: ${tr};
65
- font-weight: ${et};
66
- `;const bn=k.partial`
67
- font-family: ${E};
68
- font-size: ${Qs};
69
- line-height: ${Zs};
70
- font-weight: ${et};
71
- `,or=k.partial`
72
- font-family: ${E};
73
- font-size: ${Us};
74
- line-height: ${Ys};
75
- font-weight: ${et};
76
- `;k.partial`
77
- font-family: ${E};
78
- font-size: ${Gs};
79
- line-height: ${er};
80
- font-weight: ${et};
81
- `,k.partial`
82
- font-family: ${E};
83
- font-size: ${Ks};
84
- line-height: ${ir};
85
- font-weight: ${et};
86
- `;var Fe="http://www.w3.org/1999/xhtml",yn={svg:"http://www.w3.org/2000/svg",xhtml:Fe,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function mn(e){var t=e+="",i=t.indexOf(":");return i>=0&&(t=e.slice(0,i))!=="xmlns"&&(e=e.slice(i+1)),yn.hasOwnProperty(t)?{space:yn[t],local:e}:e}function ar(e){return function(){var t=this.ownerDocument,i=this.namespaceURI;return i===Fe&&t.documentElement.namespaceURI===Fe?t.createElement(e):t.createElementNS(i,e)}}function lr(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function qe(e){var t=mn(e);return(t.local?lr:ar)(t)}function cr(){}function wn(e){return e==null?cr:function(){return this.querySelector(e)}}function hr(e){typeof e!="function"&&(e=wn(e));for(var t=this._groups,i=t.length,n=new Array(i),s=0;s<i;++s)for(var r=t[s],o=r.length,a=n[s]=new Array(o),c,h,l=0;l<o;++l)(c=r[l])&&(h=e.call(c,c.__data__,l,r))&&("__data__"in c&&(h.__data__=c.__data__),a[l]=h);return new q(n,this._parents)}function dr(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ur(){return[]}function fr(e){return e==null?ur:function(){return this.querySelectorAll(e)}}function pr(e){return function(){return dr(e.apply(this,arguments))}}function gr(e){typeof e=="function"?e=pr(e):e=fr(e);for(var t=this._groups,i=t.length,n=[],s=[],r=0;r<i;++r)for(var o=t[r],a=o.length,c,h=0;h<a;++h)(c=o[h])&&(n.push(e.call(c,c.__data__,h,o)),s.push(c));return new q(n,s)}function vr(e){return function(){return this.matches(e)}}function $n(e){return function(t){return t.matches(e)}}var br=Array.prototype.find;function yr(e){return function(){return br.call(this.children,e)}}function mr(){return this.firstElementChild}function wr(e){return this.select(e==null?mr:yr(typeof e=="function"?e:$n(e)))}var $r=Array.prototype.filter;function Sr(){return Array.from(this.children)}function xr(e){return function(){return $r.call(this.children,e)}}function _r(e){return this.selectAll(e==null?Sr:xr(typeof e=="function"?e:$n(e)))}function Cr(e){typeof e!="function"&&(e=vr(e));for(var t=this._groups,i=t.length,n=new Array(i),s=0;s<i;++s)for(var r=t[s],o=r.length,a=n[s]=[],c,h=0;h<o;++h)(c=r[h])&&e.call(c,c.__data__,h,r)&&a.push(c);return new q(n,this._parents)}function Sn(e){return new Array(e.length)}function Ar(){return new q(this._enter||this._groups.map(Sn),this._parents)}function ne(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ne.prototype={constructor:ne,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Tr(e){return function(){return e}}function Br(e,t,i,n,s,r){for(var o=0,a,c=t.length,h=r.length;o<h;++o)(a=t[o])?(a.__data__=r[o],n[o]=a):i[o]=new ne(e,r[o]);for(;o<c;++o)(a=t[o])&&(s[o]=a)}function kr(e,t,i,n,s,r,o){var a,c,h=new Map,l=t.length,d=r.length,u=new Array(l),f;for(a=0;a<l;++a)(c=t[a])&&(u[a]=f=o.call(c,c.__data__,a,t)+"",h.has(f)?s[a]=c:h.set(f,c));for(a=0;a<d;++a)f=o.call(e,r[a],a,r)+"",(c=h.get(f))?(n[a]=c,c.__data__=r[a],h.delete(f)):i[a]=new ne(e,r[a]);for(a=0;a<l;++a)(c=t[a])&&h.get(u[a])===c&&(s[a]=c)}function Lr(e){return e.__data__}function Nr(e,t){if(!arguments.length)return Array.from(this,Lr);var i=t?kr:Br,n=this._parents,s=this._groups;typeof e!="function"&&(e=Tr(e));for(var r=s.length,o=new Array(r),a=new Array(r),c=new Array(r),h=0;h<r;++h){var l=n[h],d=s[h],u=d.length,f=Er(e.call(l,l&&l.__data__,h,n)),p=f.length,g=a[h]=new Array(p),A=o[h]=new Array(p),m=c[h]=new Array(u);i(l,d,g,A,m,f,t);for(var w=0,_=0,S,T;w<p;++w)if(S=g[w]){for(w>=_&&(_=w+1);!(T=A[_])&&++_<p;);S._next=T||null}}return o=new q(o,n),o._enter=a,o._exit=c,o}function Er(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Mr(){return new q(this._exit||this._groups.map(Sn),this._parents)}function Or(e,t,i){var n=this.enter(),s=this,r=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),i==null?r.remove():i(r),n&&s?n.merge(s).order():s}function Rr(e){for(var t=e.selection?e.selection():e,i=this._groups,n=t._groups,s=i.length,r=n.length,o=Math.min(s,r),a=new Array(s),c=0;c<o;++c)for(var h=i[c],l=n[c],d=h.length,u=a[c]=new Array(d),f,p=0;p<d;++p)(f=h[p]||l[p])&&(u[p]=f);for(;c<s;++c)a[c]=i[c];return new q(a,this._parents)}function Vr(){for(var e=this._groups,t=-1,i=e.length;++t<i;)for(var n=e[t],s=n.length-1,r=n[s],o;--s>=0;)(o=n[s])&&(r&&o.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(o,r),r=o);return this}function Pr(e){e||(e=zr);function t(d,u){return d&&u?e(d.__data__,u.__data__):!d-!u}for(var i=this._groups,n=i.length,s=new Array(n),r=0;r<n;++r){for(var o=i[r],a=o.length,c=s[r]=new Array(a),h,l=0;l<a;++l)(h=o[l])&&(c[l]=h);c.sort(t)}return new q(s,this._parents).order()}function zr(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Dr(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ir(){return Array.from(this)}function Hr(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var n=e[t],s=0,r=n.length;s<r;++s){var o=n[s];if(o)return o}return null}function Fr(){let e=0;for(const t of this)++e;return e}function qr(){return!this.node()}function jr(e){for(var t=this._groups,i=0,n=t.length;i<n;++i)for(var s=t[i],r=0,o=s.length,a;r<o;++r)(a=s[r])&&e.call(a,a.__data__,r,s);return this}function Wr(e){return function(){this.removeAttribute(e)}}function Ur(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qr(e,t){return function(){this.setAttribute(e,t)}}function Xr(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Gr(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttribute(e):this.setAttribute(e,i)}}function Kr(e,t){return function(){var i=t.apply(this,arguments);i==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,i)}}function Jr(e,t){var i=mn(e);if(arguments.length<2){var n=this.node();return i.local?n.getAttributeNS(i.space,i.local):n.getAttribute(i)}return this.each((t==null?i.local?Ur:Wr:typeof t=="function"?i.local?Kr:Gr:i.local?Xr:Qr)(i,t))}function xn(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Yr(e){return function(){this.style.removeProperty(e)}}function Zr(e,t,i){return function(){this.style.setProperty(e,t,i)}}function to(e,t,i){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,i)}}function eo(e,t,i){return arguments.length>1?this.each((t==null?Yr:typeof t=="function"?to:Zr)(e,t,i??"")):io(this.node(),e)}function io(e,t){return e.style.getPropertyValue(t)||xn(e).getComputedStyle(e,null).getPropertyValue(t)}function no(e){return function(){delete this[e]}}function so(e,t){return function(){this[e]=t}}function ro(e,t){return function(){var i=t.apply(this,arguments);i==null?delete this[e]:this[e]=i}}function oo(e,t){return arguments.length>1?this.each((t==null?no:typeof t=="function"?ro:so)(e,t)):this.node()[e]}function _n(e){return e.trim().split(/^|\s+/)}function je(e){return e.classList||new Cn(e)}function Cn(e){this._node=e,this._names=_n(e.getAttribute("class")||"")}Cn.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function An(e,t){for(var i=je(e),n=-1,s=t.length;++n<s;)i.add(t[n])}function Tn(e,t){for(var i=je(e),n=-1,s=t.length;++n<s;)i.remove(t[n])}function ao(e){return function(){An(this,e)}}function lo(e){return function(){Tn(this,e)}}function co(e,t){return function(){(t.apply(this,arguments)?An:Tn)(this,e)}}function ho(e,t){var i=_n(e+"");if(arguments.length<2){for(var n=je(this.node()),s=-1,r=i.length;++s<r;)if(!n.contains(i[s]))return!1;return!0}return this.each((typeof t=="function"?co:t?ao:lo)(i,t))}function uo(){this.textContent=""}function fo(e){return function(){this.textContent=e}}function po(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function go(e){return arguments.length?this.each(e==null?uo:(typeof e=="function"?po:fo)(e)):this.node().textContent}function vo(){this.innerHTML=""}function bo(e){return function(){this.innerHTML=e}}function yo(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function mo(e){return arguments.length?this.each(e==null?vo:(typeof e=="function"?yo:bo)(e)):this.node().innerHTML}function wo(){this.nextSibling&&this.parentNode.appendChild(this)}function $o(){return this.each(wo)}function So(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xo(){return this.each(So)}function _o(e){var t=typeof e=="function"?e:qe(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Co(){return null}function Ao(e,t){var i=typeof e=="function"?e:qe(e),n=t==null?Co:typeof t=="function"?t:wn(t);return this.select(function(){return this.insertBefore(i.apply(this,arguments),n.apply(this,arguments)||null)})}function To(){var e=this.parentNode;e&&e.removeChild(this)}function Bo(){return this.each(To)}function ko(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Lo(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function No(e){return this.select(e?Lo:ko)}function Eo(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Mo(e){return function(t){e.call(this,t,this.__data__)}}function Oo(e){return e.trim().split(/^|\s+/).map(function(t){var i="",n=t.indexOf(".");return n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),{type:t,name:i}})}function Ro(e){return function(){var t=this.__on;if(t){for(var i=0,n=-1,s=t.length,r;i<s;++i)r=t[i],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++n]=r;++n?t.length=n:delete this.__on}}}function Vo(e,t,i){return function(){var n=this.__on,s,r=Mo(t);if(n){for(var o=0,a=n.length;o<a;++o)if((s=n[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=r,s.options=i),s.value=t;return}}this.addEventListener(e.type,r,i),s={type:e.type,name:e.name,value:t,listener:r,options:i},n?n.push(s):this.__on=[s]}}function Po(e,t,i){var n=Oo(e+""),s,r=n.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,h=a.length,l;c<h;++c)for(s=0,l=a[c];s<r;++s)if((o=n[s]).type===l.type&&o.name===l.name)return l.value}return}for(a=t?Vo:Ro,s=0;s<r;++s)this.each(a(n[s],t,i));return this}function Bn(e,t,i){var n=xn(e),s=n.CustomEvent;typeof s=="function"?s=new s(t,i):(s=n.document.createEvent("Event"),i?(s.initEvent(t,i.bubbles,i.cancelable),s.detail=i.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function zo(e,t){return function(){return Bn(this,e,t)}}function Do(e,t){return function(){return Bn(this,e,t.apply(this,arguments))}}function Io(e,t){return this.each((typeof t=="function"?Do:zo)(e,t))}function*Ho(){for(var e=this._groups,t=0,i=e.length;t<i;++t)for(var n=e[t],s=0,r=n.length,o;s<r;++s)(o=n[s])&&(yield o)}var Fo=[null];function q(e,t){this._groups=e,this._parents=t}function qo(){return this}q.prototype={constructor:q,select:hr,selectAll:gr,selectChild:wr,selectChildren:_r,filter:Cr,data:Nr,enter:Ar,exit:Mr,join:Or,merge:Rr,selection:qo,order:Vr,sort:Pr,call:Dr,nodes:Ir,node:Hr,size:Fr,empty:qr,each:jr,attr:Jr,style:eo,property:oo,classed:ho,text:go,html:mo,raise:$o,lower:xo,append:_o,insert:Ao,remove:Bo,clone:No,datum:Eo,on:Po,dispatch:Io,[Symbol.iterator]:Ho};function se(e){return typeof e=="string"?new q([[document.querySelector(e)]],[document.documentElement]):new q([[e]],Fo)}function jo(e){return se(qe(e).call(document.documentElement))}const kn={toView(e){return JSON.stringify(e)},fromView(e){return JSON.parse(e)}},Wo=(e,t)=>{if(!Array.isArray(e))throw TypeError(`Invalid ${t}: Expected an array.`);e.forEach((i,n)=>{Ln(i,`${t}[${n}]`)})},Ln=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw TypeError(`Invalid ${t}: Expected an object.`);if(!Array.isArray(e.chartData))throw TypeError(`Invalid ${t}.chartData: Expected an array.`);e.chartData.forEach((i,n)=>{if(i===null||typeof i!="object"||Array.isArray(i))throw TypeError(`Invalid ${t}.chartData[${n}]: Expected an object.`);if(typeof i.legend!="string")throw TypeError(`Invalid ${t}.chartData[${n}].legend: Expected a string.`);if(typeof i.data!="number")throw TypeError(`Invalid ${t}.chartData[${n}].data: Expected a number.`)})},Uo={color1:"qualitative.1",color2:"qualitative.2",color3:"qualitative.3",color4:"qualitative.4",color5:"qualitative.5",color6:"qualitative.6",color7:"qualitative.7",color8:"qualitative.8",color9:"qualitative.9",color10:"qualitative.10",color11:"qualitative.21",color12:"qualitative.22",color13:"qualitative.23",color14:"qualitative.24",color15:"qualitative.25",color16:"qualitative.26",color17:"qualitative.27",color18:"qualitative.28",color19:"qualitative.29",info:"semantic.info",disabled:"semantic.disabled",highError:"semantic.highError",error:"semantic.error",warning:"semantic.warning",success:"semantic.success",highSuccess:"semantic.highSuccess"},Nn={1:["#637cef"],2:["#e3008c"],3:["#2aa0a4"],4:["#9373c0"],5:["#13a10e"],6:["#3a96dd"],7:["#ca5010"],8:["#57811b"],9:["#b146c2"],10:["#ae8c00"],21:["#4f6bed"],22:["#ea38a6"],23:["#038387"],24:["#8764b8"],25:["#11910d"],26:["#3487c7"],27:["#d06228"],28:["#689920"],29:["#ba58c9"]},Qo={info:["#015cda"],disabled:["#dbdbdb","#4d4d4d"],highError:["#6e0811","#cc2635"],error:["#c50f1f","#dc626d"],warning:["#f7630c","#f87528"],success:["#107c10","#54b054"],highSuccess:["#094509","#218c21"]},Xo={qualitative:Nn,semantic:Qo},En=Object.values(Nn),Go=Object.values(Uo),Mn=(e,t)=>{if(e.length===0)return"";const i=Number(t);return i<e.length?e[i]:e[0]},Ko=(e,t=0,i=!1)=>{const n=En[(e+t)%En.length];return Mn(n,i)},Jo=(e,t=!1)=>{if(Go.indexOf(e)>=0){const[i,n]=e.split("."),s=Xo[i][n];return Mn(s,t)}return e},On=e=>Rs(e)===Lt.rtl,it="http://www.w3.org/2000/svg",Yo=(e,t)=>{if(!e.textContent)return;const i=e.textContent.split(/\s+/).reverse();let n,s=[],r=0;const o=e.getBoundingClientRect().height,a=e.getAttribute("y")||"0";e.textContent=null;let c=document.createElementNS(it,"tspan");for(e.appendChild(c),c.setAttribute("x","0"),c.setAttribute("y",a),c.setAttribute("dy",`${r++*o}`);n=i.pop();)s.push(n),c.textContent=s.join(" ")+" ",c.getComputedTextLength()>t&&s.length>1&&(s.pop(),c.textContent=s.join(" ")+" ",s=[n],c=document.createElementNS(it,"tspan"),e.appendChild(c),c.setAttribute("x","0"),c.setAttribute("y",a),c.setAttribute("dy",`${r++*o}`),c.textContent=n)};var St=(e=>(e.PartToWhole="part-to-whole",e.AbsoluteScale="absolute-scale",e.SingleBar="single-bar",e))(St||{}),Zo=Object.defineProperty,ta=Object.getOwnPropertyDescriptor,Q=(e,t,i,n)=>{for(var s=n>1?void 0:n?ta(t,i):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(s=(n?o(t,i,s):o(s))||s);return n&&s&&Zo(t,i,s),s};class j extends sn{constructor(){super(),this.hideRatio=!1,this.hideLegends=!1,this.hideTooltip=!1,this.uniqueLegends=[],this.activeLegend="",this.activeLegendChanged=(t,i)=>{i===""?this._bars?.forEach(n=>n.classList.remove("inactive")):this._bars?.forEach(n=>{n.getAttribute("barinfo")===i?n.classList.remove("inactive"):n.classList.add("inactive")})},this.isLegendSelected=!1,this.tooltipProps={isVisible:!1,legend:"",yValue:"",color:"",xPos:0,yPos:0},this.elementInternals=this.attachInternals(),this._isRTL=!1,this._barHeight=12,this._bars=[],this.handleLegendMouseoverAndFocus=t=>{this.isLegendSelected||(this.activeLegend=t)},this.handleLegendMouseoutAndBlur=()=>{this.isLegendSelected||(this.activeLegend="")},this.handleLegendClick=t=>{this.isLegendSelected&&this.activeLegend===t?(this.activeLegend="",this.isLegendSelected=!1):(this.activeLegend=t,this.isLegendSelected=!0)},this.elementInternals.role="region"}connectedCallback(){super.connectedCallback(),Wo(this.data,"data"),this._isRTL=On(this),this.elementInternals.ariaLabel=this.chartTitle||`Horizontal bar chart with ${this.data.length} categories.`,this._initializeData(),this._renderChart()}_initializeData(){this.variant===St.SingleBar&&this._hydrateData(),this._hydrateLegends()}_renderChart(){se(this.chartContainer).selectAll("div").data(this.data).enter().append("div").each((i,n,s)=>{this._createSingleChartBars(i,n,s)})}_createSingleChartBars(t,i,n){const s=this._createBarsAndLegends(t,i);se(n[i]).attr("key",i).attr("id",`_MSBC_bar-${i}`).node().appendChild(s.node())}_hydrateLegends(){const t=new Map;for(const i of this.data)for(const n of i.chartData)n.placeholder!==!0&&(t.has(n.legend)||t.set(n.legend,{legend:n.legend,data:n.data,color:n.gradient?n.gradient[0]:n.color}));this.uniqueLegends=Array.from(t.values())}_hydrateData(){this.data.forEach(({chartData:t})=>{if(t.length===1){const i=t[0],n={legend:"",data:Math.max(i.total-i.data,0),y:i.total,color:"#edebe9",placeholder:!0};t.push(n)}})}_calculateBarSpacing(){const t=this.getBoundingClientRect().width;let i=0;return t&&(i=3/t*100),i}_createBarsAndLegends(t,i){const n=this._isRTL,r=(()=>{let v=0;return this.data.forEach(({chartData:y})=>{const x=y.reduce((L,C)=>L+(C.data??0),0);v=Math.max(v,x)}),v})(),o=t.chartData?.reduce((v,y)=>v+=(y.data||0)>0?1:0,0)||1,a=this._calculateBarSpacing(),c=a*(o-1),h=[],l=t.chartData.reduce((v,y)=>v+(y.data??0),0),d=this.variant===St.AbsoluteScale?r:l;let u=0;if(t.chartData.map((v,y)=>{let C=(v.data??0)/d*100??0;return C<1&&C!==0?C=1:C>99&&C!==100&&(C=99),u+=C,u}),this.variant===St.AbsoluteScale){let v=d===0?0:(d-l)/d*100;v<1&&v!==0?v=1:v>99&&v!==100&&(v=99),u+=v}const f=u!==0?u/(100-c):1;let p=0,g=0;const A=(v,y,x)=>{const C=y.data??0;x>0&&(p+=g),g=C/d*100?C/d*100:0,g<1&&g!==0?g=1/f:g>99&&g!==100?g=99/f:g=g/f,h.push(p);const R=se(v).attr("key",x).attr("role","img").attr("aria-label",C);let b="";if(y.gradient){const G=document.createElementNS(it,"defs");R.node().appendChild(G);const st=document.createElementNS(it,"linearGradient");G.appendChild(st),b=`gradient-${i}-${x}`,st.setAttribute("id",b);const K=document.createElementNS(it,"stop");st.appendChild(K),K.setAttribute("offset","0%"),K.setAttribute("stop-color",y.gradient[0]);const J=document.createElementNS(it,"stop");st.appendChild(J),J.setAttribute("offset","100%"),J.setAttribute("stop-color",y.gradient[1])}const $=R.append("rect").attr("key",x).attr("id",`${i}-${x}`).attr("barinfo",`${y.legend}`).attr("class","bar").attr("style",y.gradient?`fill:url(#${b})`:`fill:${y.color}`).attr("x",`${n?100-h[x]-g-a*x:h[x]+a*x}%`).attr("y",0).attr("width",g+"%").attr("height",12).attr("tabindex",0);this._bars.push($.node())},m=jo("div").attr("style","position: relative"),w=m.append("div").attr("class","chart-title-div");w.append("div").append("span").attr("class","chart-title").text(t?.chartSeriesTitle?t?.chartSeriesTitle:"");const _=this.variant!==St.AbsoluteScale,S=!this.hideRatio&&t.chartData.length===2;if(_){if(t.chartDataText){const v=document.createElement("div");w.node().appendChild(v),v.classList.add("chart-data-text"),v.textContent=t.chartDataText}else if(S){const v=w.append("div").attr("role","text"),y=t.chartData[0].data,x=t.chartData[1].data,L=y+x;v.append("span").attr("class","ratio-numerator").text(y),v.append("span").attr("class","ratio-denominator").text(`/${L}`)}}const T=m.append("div").attr("style","display: flex;"),B=T.append("svg").attr("height",12).attr("width","100%").attr("class","svg-chart").attr("aria-label",t?.chartSeriesTitle??`Series with ${t.chartData.length}${t.chartData.length>1?" stacked":""} bars.`).selectAll("g").data(t.chartData).enter().append("g").each(function(v,y){A(this,v,y)}).on("mouseover",(v,y)=>{if(y&&y.hasOwnProperty("placeholder")&&y.placeholder===!0)return;const x=this.getBoundingClientRect(),L=window.innerWidth/2,C=Math.max(0,Math.min(L,window.innerWidth));this.tooltipProps={isVisible:!0,legend:y.legend,yValue:`${y.data}`,color:y.gradient?y.gradient[0]:y.color,xPos:this._isRTL?x.right-v.clientX:Math.min(v.clientX-x.left,C),yPos:v.clientY-x.top-40}}).on("mouseout",()=>{this.tooltipProps={isVisible:!1,legend:"",yValue:"",color:"",xPos:0,yPos:0}});if(this.variant===St.AbsoluteScale){const v=l;Math.round((h[h.length-1]||0)+g+c)===100?T.append("text").attr("key","text").attr("style","margin-top: -4.5px; margin-left: 2px;").attr("class","bar-label").attr("x",`${this._isRTL?100-(h[h.length-1]||0)-g-c:(h[h.length-1]||0)+g+c}%`).attr("textAnchor","start").attr("y",this._barHeight/2+6).attr("dominantBaseline","central").attr("transform",`translate(${this._isRTL?-4:4})`).attr("aria-label",`Total: ${v}`).attr("role","img").text(v):B.append("text").attr("key","text").attr("class","bar-label").attr("x",`${this._isRTL?100-(h[h.length-1]||0)-g-c:(h[h.length-1]||0)+g+c}%`).attr("textAnchor","start").attr("y",this._barHeight/2+6).attr("dominantBaseline","central").attr("transform",`translate(${this._isRTL?-4:4})`).attr("aria-label",`Total: ${v}`).attr("role","img").text(v)}if(t.benchmarkData){const v=document.createElement("div");m.node().appendChild(v),v.classList.add("benchmark-container");const y=document.createElement("div");v.appendChild(y),y.classList.add("triangle");const x=t.benchmarkData/d*100;y.style.insetInlineStart=`calc(${x}% - 4px)`}return m}}Q([P],j.prototype,"variant",2),Q([P({converter:kn})],j.prototype,"data",2),Q([P({attribute:"hide-ratio",mode:"boolean"})],j.prototype,"hideRatio",2),Q([P({attribute:"hide-legends",mode:"boolean"})],j.prototype,"hideLegends",2),Q([P({attribute:"hide-tooltip",mode:"boolean"})],j.prototype,"hideTooltip",2),Q([P({attribute:"legend-list-label"})],j.prototype,"legendListLabel",2),Q([P({attribute:"chart-title"})],j.prototype,"chartTitle",2),Q([ct],j.prototype,"uniqueLegends",2),Q([ct],j.prototype,"activeLegend",2),Q([ct],j.prototype,"isLegendSelected",2),Q([ct],j.prototype,"tooltipProps",2);const ea=k`
87
- ${rn("inline-block")}
88
-
89
- :host{position:relative}.root{background-color:${Yt};width:100vw;display:flex;flex-direction:column;align-items:center;position:relative}.tooltip{${Nt}
90
- position:absolute;z-index:999;display:grid;overflow:hidden;padding:${pn} ${dn};backgroundcolor:${Yt};background-blend-mode:normal,luminosity;text-align:center;background:${Yt};box-shadow:${nr};border:${cn};pointer-events:none}.tooltip-line{padding-inline-start:${ht};height:50px;border-inline-start:${te} solid}.tooltip-legend-text{${Nt}
91
- color:${tt};text-align:start}.tooltip-data-y{${bn}
92
- text-align:start}.bar{opacity:1}.bar.inactive{opacity:0.1}.bar:focus{outline:none;stroke-width:${cn};stroke:black}.svg-chart{display:block;overflow:visible}.chart-title{${vn}
93
- display:flex;justify-content:space-between;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:block;color:${tt};margin-bottom:${sr}}.legendcontainer{display:flex;flex-direction:row;flex-wrap:wrap;padding-top:${gn};width:100%;align-items:center;margin:-${fn} ${hn} ${un} -${ht}}.legend{display:flex;align-items:center;cursor:pointer;border:none;padding:${ht};background:none;text-transform:capitalize}.legend-rect{width:12px;height:12px;margin-inline-end:${ht};border:${He} solid}.legend-text{${Nt}
94
- color:${tt}}.legend.inactive .legend-rect{background-color:transparent !important}.legend.inactive .legend-text{opacity:0.67}.bar-label{${ie}
95
- fill:${tt}}.chart-title-div{width:100%;display:flex;justify-content:space-between}.ratio-numerator{${ie}
96
- color:${tt}}.ratio-denominator{${ie}
97
- color:${tt};font-weight:bold}.benchmark-container{position:relative;height:7px;margin-top:-3px}.triangle{width:0;height:0;border-left:${te} solid transparent;border-right:${te} solid transparent;border-bottom:7px solid;border-bottom-color:${zs};margin-bottom:${rr};position:absolute}.chart-data-text{${ie}
98
- color:${tt}}`.withBehaviors(on(k`
99
- .legend-rect,.tooltip-line,.triangle{forced-color-adjust:none}.tooltip-legend-text,.tooltip-content-y{forced-color-adjust:auto;color:CanvasText}.bar-label{fill:CanvasText !important}`));function ia(){return at`<template><div ${Ee("chartContainer")}></div>${Xt(e=>!e.hideLegends,at`<div class="legendcontainer" role="listbox" aria-label="${e=>e.legendListLabel}">${Hi(e=>e.uniqueLegends,at`<button class="legend${(e,t)=>t.parent.activeLegend===""||t.parent.activeLegend===e.legend?"":" inactive"}" role="option" aria-setsize="${(e,t)=>t.length}" aria-posinset="${(e,t)=>t.index+1}" aria-selected="${(e,t)=>e.legend===t.parent.activeLegend}" @mouseover="${(e,t)=>t.parent.handleLegendMouseoverAndFocus(e.legend)}" @mouseout="${(e,t)=>t.parent.handleLegendMouseoutAndBlur()}" @focus="${(e,t)=>t.parent.handleLegendMouseoverAndFocus(e.legend)}" @blur="${(e,t)=>t.parent.handleLegendMouseoutAndBlur()}" @click="${(e,t)=>t.parent.handleLegendClick(e.legend)}"><div class="legend-rect" style="background-color: ${e=>e.color}; border-color: ${e=>e.color};"></div><div class="legend-text">${e=>e.legend}</div></button>`)}</div>`)} ${Xt(e=>!e.hideTooltip&&e.tooltipProps.isVisible,at`<div class="tooltip" style="inset-inline-start: ${e=>e.tooltipProps.xPos}px; top: ${e=>e.tooltipProps.yPos}px"><div class="tooltip-line" style="border-color: ${e=>e.tooltipProps.color};"><div class="tooltip-legend-text">${e=>e.tooltipProps.legend}</div><div class="tooltip-data-y" style="color: ${e=>e.tooltipProps.color};">${e=>e.tooltipProps.yValue}</div></div></div>`)}</template>`}const na=ia(),sa=j.compose({name:`${ee.prefix}-horizontal-bar-chart`,template:na,styles:ea,shadowOptions:{delegatesFocus:!0}});sa.define(ee.registry);function z(e){return function(){return e}}const Rn=Math.abs,O=Math.atan2,gt=Math.cos,ra=Math.max,We=Math.min,nt=Math.sin,xt=Math.sqrt,I=1e-12,Et=Math.PI,re=Et/2,oe=2*Et;function oa(e){return e>1?0:e<-1?Et:Math.acos(e)}function Vn(e){return e>=1?re:e<=-1?-re:Math.asin(e)}const Ue=Math.PI,Qe=2*Ue,vt=1e-6,aa=Qe-vt;function Pn(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=arguments[t]+e[t]}function la(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Pn;const i=10**t;return function(n){this._+=n[0];for(let s=1,r=n.length;s<r;++s)this._+=Math.round(arguments[s]*i)/i+n[s]}}class ca{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Pn:la(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,n,s){this._append`Q${+t},${+i},${this._x1=+n},${this._y1=+s}`}bezierCurveTo(t,i,n,s,r,o){this._append`C${+t},${+i},${+n},${+s},${this._x1=+r},${this._y1=+o}`}arcTo(t,i,n,s,r){if(t=+t,i=+i,n=+n,s=+s,r=+r,r<0)throw new Error(`negative radius: ${r}`);let o=this._x1,a=this._y1,c=n-t,h=s-i,l=o-t,d=a-i,u=l*l+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=i}`;else if(u>vt)if(!(Math.abs(d*c-h*l)>vt)||!r)this._append`L${this._x1=t},${this._y1=i}`;else{let f=n-o,p=s-a,g=c*c+h*h,A=f*f+p*p,m=Math.sqrt(g),w=Math.sqrt(u),_=r*Math.tan((Ue-Math.acos((g+u-A)/(2*m*w)))/2),S=_/w,T=_/m;Math.abs(S-1)>vt&&this._append`L${t+S*l},${i+S*d}`,this._append`A${r},${r},0,0,${+(d*f>l*p)},${this._x1=t+T*c},${this._y1=i+T*h}`}}arc(t,i,n,s,r,o){if(t=+t,i=+i,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(s),c=n*Math.sin(s),h=t+a,l=i+c,d=1^o,u=o?s-r:r-s;this._x1===null?this._append`M${h},${l}`:(Math.abs(this._x1-h)>vt||Math.abs(this._y1-l)>vt)&&this._append`L${h},${l}`,n&&(u<0&&(u=u%Qe+Qe),u>aa?this._append`A${n},${n},0,1,${d},${t-a},${i-c}A${n},${n},0,1,${d},${this._x1=h},${this._y1=l}`:u>vt&&this._append`A${n},${n},0,${+(u>=Ue)},${d},${this._x1=t+n*Math.cos(r)},${this._y1=i+n*Math.sin(r)}`)}rect(t,i,n,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${n=+n}v${+s}h${-n}Z`}toString(){return this._}}function ha(e){let t=3;return e.digits=function(i){if(!arguments.length)return t;if(i==null)t=null;else{const n=Math.floor(i);if(!(n>=0))throw new RangeError(`invalid digits: ${i}`);t=n}return e},()=>new ca(t)}function da(e){return e.innerRadius}function ua(e){return e.outerRadius}function fa(e){return e.startAngle}function pa(e){return e.endAngle}function ga(e){return e&&e.padAngle}function va(e,t,i,n,s,r,o,a){var c=i-e,h=n-t,l=o-s,d=a-r,u=d*c-l*h;if(!(u*u<I))return u=(l*(t-r)-d*(e-s))/u,[e+u*c,t+u*h]}function ae(e,t,i,n,s,r,o){var a=e-i,c=t-n,h=(o?r:-r)/xt(a*a+c*c),l=h*c,d=-h*a,u=e+l,f=t+d,p=i+l,g=n+d,A=(u+p)/2,m=(f+g)/2,w=p-u,_=g-f,S=w*w+_*_,T=s-r,B=u*g-p*f,v=(_<0?-1:1)*xt(ra(0,T*T*S-B*B)),y=(B*_-w*v)/S,x=(-B*w-_*v)/S,L=(B*_+w*v)/S,C=(-B*w+_*v)/S,R=y-A,b=x-m,$=L-A,G=C-m;return R*R+b*b>$*$+G*G&&(y=L,x=C),{cx:y,cy:x,x01:-l,y01:-d,x11:y*(s/T-1),y11:x*(s/T-1)}}function ba(){var e=da,t=ua,i=z(0),n=null,s=fa,r=pa,o=ga,a=null,c=ha(h);function h(){var l,d,u=+e.apply(this,arguments),f=+t.apply(this,arguments),p=s.apply(this,arguments)-re,g=r.apply(this,arguments)-re,A=Rn(g-p),m=g>p;if(a||(a=l=c()),f<u&&(d=f,f=u,u=d),!(f>I))a.moveTo(0,0);else if(A>oe-I)a.moveTo(f*gt(p),f*nt(p)),a.arc(0,0,f,p,g,!m),u>I&&(a.moveTo(u*gt(g),u*nt(g)),a.arc(0,0,u,g,p,m));else{var w=p,_=g,S=p,T=g,B=A,v=A,y=o.apply(this,arguments)/2,x=y>I&&(n?+n.apply(this,arguments):xt(u*u+f*f)),L=We(Rn(f-u)/2,+i.apply(this,arguments)),C=L,R=L,b,$;if(x>I){var G=Vn(x/u*nt(y)),st=Vn(x/f*nt(y));(B-=G*2)>I?(G*=m?1:-1,S+=G,T-=G):(B=0,S=T=(p+g)/2),(v-=st*2)>I?(st*=m?1:-1,w+=st,_-=st):(v=0,w=_=(p+g)/2)}var K=f*gt(w),J=f*nt(w),Ot=u*gt(T),Rt=u*nt(T);if(L>I){var Vt=f*gt(_),Pt=f*nt(_),de=u*gt(S),ue=u*nt(S),rt;if(A<Et)if(rt=va(K,J,de,ue,Vt,Pt,Ot,Rt)){var fe=K-rt[0],pe=J-rt[1],ge=Vt-rt[0],ve=Pt-rt[1],Xe=1/nt(oa((fe*ge+pe*ve)/(xt(fe*fe+pe*pe)*xt(ge*ge+ve*ve)))/2),Ge=xt(rt[0]*rt[0]+rt[1]*rt[1]);C=We(L,(u-Ge)/(Xe-1)),R=We(L,(f-Ge)/(Xe+1))}else C=R=0}v>I?R>I?(b=ae(de,ue,K,J,f,R,m),$=ae(Vt,Pt,Ot,Rt,f,R,m),a.moveTo(b.cx+b.x01,b.cy+b.y01),R<L?a.arc(b.cx,b.cy,R,O(b.y01,b.x01),O($.y01,$.x01),!m):(a.arc(b.cx,b.cy,R,O(b.y01,b.x01),O(b.y11,b.x11),!m),a.arc(0,0,f,O(b.cy+b.y11,b.cx+b.x11),O($.cy+$.y11,$.cx+$.x11),!m),a.arc($.cx,$.cy,R,O($.y11,$.x11),O($.y01,$.x01),!m))):(a.moveTo(K,J),a.arc(0,0,f,w,_,!m)):a.moveTo(K,J),!(u>I)||!(B>I)?a.lineTo(Ot,Rt):C>I?(b=ae(Ot,Rt,Vt,Pt,u,-C,m),$=ae(K,J,de,ue,u,-C,m),a.lineTo(b.cx+b.x01,b.cy+b.y01),C<L?a.arc(b.cx,b.cy,C,O(b.y01,b.x01),O($.y01,$.x01),!m):(a.arc(b.cx,b.cy,C,O(b.y01,b.x01),O(b.y11,b.x11),!m),a.arc(0,0,u,O(b.cy+b.y11,b.cx+b.x11),O($.cy+$.y11,$.cx+$.x11),m),a.arc($.cx,$.cy,C,O($.y11,$.x11),O($.y01,$.x01),!m))):a.arc(0,0,u,T,S,m)}if(a.closePath(),l)return a=null,l+""||null}return h.centroid=function(){var l=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+s.apply(this,arguments)+ +r.apply(this,arguments))/2-Et/2;return[gt(d)*l,nt(d)*l]},h.innerRadius=function(l){return arguments.length?(e=typeof l=="function"?l:z(+l),h):e},h.outerRadius=function(l){return arguments.length?(t=typeof l=="function"?l:z(+l),h):t},h.cornerRadius=function(l){return arguments.length?(i=typeof l=="function"?l:z(+l),h):i},h.padRadius=function(l){return arguments.length?(n=l==null?null:typeof l=="function"?l:z(+l),h):n},h.startAngle=function(l){return arguments.length?(s=typeof l=="function"?l:z(+l),h):s},h.endAngle=function(l){return arguments.length?(r=typeof l=="function"?l:z(+l),h):r},h.padAngle=function(l){return arguments.length?(o=typeof l=="function"?l:z(+l),h):o},h.context=function(l){return arguments.length?(a=l??null,h):a},h}function ya(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ma(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function wa(e){return e}function $a(){var e=wa,t=ma,i=null,n=z(0),s=z(oe),r=z(0);function o(a){var c,h=(a=ya(a)).length,l,d,u=0,f=new Array(h),p=new Array(h),g=+n.apply(this,arguments),A=Math.min(oe,Math.max(-oe,s.apply(this,arguments)-g)),m,w=Math.min(Math.abs(A)/h,r.apply(this,arguments)),_=w*(A<0?-1:1),S;for(c=0;c<h;++c)(S=p[f[c]=c]=+e(a[c],c,a))>0&&(u+=S);for(t!=null?f.sort(function(T,B){return t(p[T],p[B])}):i!=null&&f.sort(function(T,B){return i(a[T],a[B])}),c=0,d=u?(A-h*_)/u:0;c<h;++c,g=m)l=f[c],S=p[l],m=g+(S>0?S*d:0)+_,p[l]={data:a[l],index:c,value:S,startAngle:g,endAngle:m,padAngle:w};return p}return o.value=function(a){return arguments.length?(e=typeof a=="function"?a:z(+a),o):e},o.sortValues=function(a){return arguments.length?(t=a,i=null,o):t},o.sort=function(a){return arguments.length?(i=a,t=null,o):i},o.startAngle=function(a){return arguments.length?(n=typeof a=="function"?a:z(+a),o):n},o.endAngle=function(a){return arguments.length?(s=typeof a=="function"?a:z(+a),o):s},o.padAngle=function(a){return arguments.length?(r=typeof a=="function"?a:z(+a),o):r},o}var Sa=Object.defineProperty,xa=Object.getOwnPropertyDescriptor,W=(e,t,i,n)=>{for(var s=n>1?void 0:n?xa(t,i):t,r=e.length-1,o;r>=0;r--)(o=e[r])&&(s=(n?o(t,i,s):o(s))||s);return n&&s&&Sa(t,i,s),s};class F extends sn{constructor(){super(),this.height=200,this.width=200,this.hideLegends=!1,this.hideTooltip=!1,this.innerRadius=1,this.legends=[],this.activeLegend="",this.isLegendSelected=!1,this.tooltipProps={isVisible:!1,legend:"",yValue:"",color:"",xPos:0,yPos:0},this.elementInternals=this.attachInternals(),this._arcs=[],this._isRTL=!1,this.elementInternals.role="region"}activeLegendChanged(t,i){i===""?this._arcs?.forEach(n=>n.classList.remove("inactive")):this._arcs?.forEach(n=>{n.getAttribute("data-id")===i?n.classList.remove("inactive"):n.classList.add("inactive")}),this._updateTextInsideDonut()}tooltipPropsChanged(t,i){this._updateTextInsideDonut()}handleLegendMouseoverAndFocus(t){this.isLegendSelected||(this.activeLegend=t)}handleLegendMouseoutAndBlur(){this.isLegendSelected||(this.activeLegend="")}handleLegendClick(t){this.isLegendSelected&&this.activeLegend===t?(this.activeLegend="",this.isLegendSelected=!1):(this.activeLegend=t,this.isLegendSelected=!0)}connectedCallback(){super.connectedCallback(),Ln(this.data,"data"),this.data.chartData.forEach((t,i)=>{t.color?t.color=Jo(t.color):t.color=Ko(i)}),this.legends=this._getLegends(),this._isRTL=On(this),this.elementInternals.ariaLabel=this.data.chartTitle||`Donut chart with ${this.data.chartData.length} segments.`,this._render()}_render(){const t=$a().value(n=>n.data).padAngle(.02),i=ba().innerRadius(this.innerRadius).outerRadius((Math.min(this.height,this.width)-20)/2);t(this.data.chartData).forEach(n=>{const s=document.createElementNS(it,"g");this.group.appendChild(s);const r=document.createElementNS(it,"path");s.appendChild(r),r.classList.add("arc-outline"),r.setAttribute("d",i(n));const o=document.createElementNS(it,"path");s.appendChild(o),this._arcs.push(o),o.classList.add("arc"),o.setAttribute("d",i(n)),o.setAttribute("fill",n.data.color),o.setAttribute("data-id",n.data.legend),o.setAttribute("tabindex","0"),o.setAttribute("aria-label",`${n.data.legend}, ${n.data.data}.`),o.setAttribute("role","img"),o.addEventListener("mouseover",a=>{if(this.activeLegend!==""&&this.activeLegend!==n.data.legend)return;const c=this.getBoundingClientRect();this.tooltipProps={isVisible:!0,legend:n.data.legend,yValue:`${n.data.data}`,color:n.data.color,xPos:this._isRTL?c.right-a.clientX:a.clientX-c.left,yPos:a.clientY-c.top-85}}),o.addEventListener("focus",a=>{if(this.activeLegend!==""&&this.activeLegend!==n.data.legend)return;const c=this.getBoundingClientRect(),h=o.getBoundingClientRect();this.tooltipProps={isVisible:!0,legend:n.data.legend,yValue:`${n.data.data}`,color:n.data.color,xPos:this._isRTL?c.right-h.left-h.width/2:h.left+h.width/2-c.left,yPos:h.top-c.top-85}}),o.addEventListener("blur",a=>{this.tooltipProps={isVisible:!1,legend:"",yValue:"",color:"",xPos:0,yPos:0}})}),this.addEventListener("mouseleave",()=>{this.tooltipProps={isVisible:!1,legend:"",yValue:"",color:"",xPos:0,yPos:0}}),this.valueInsideDonut&&(this._textInsideDonut=document.createElementNS(it,"text"),this.group.appendChild(this._textInsideDonut),this._textInsideDonut.classList.add("text-inside-donut"),this._textInsideDonut.setAttribute("x","0"),this._textInsideDonut.setAttribute("y","0"),this._textInsideDonut.setAttribute("text-anchor","middle"),this._textInsideDonut.setAttribute("dominant-baseline","middle"),this._updateTextInsideDonut())}_getLegends(){return this.data.chartData.map((t,i)=>({title:t.legend,color:t.color}))}_getTextInsideDonut(t){let i=t;if(t&&(this.activeLegend!==""||this.tooltipProps.isVisible)){const n=this.data.chartData.find(s=>s.legend===this.activeLegend||this.tooltipProps.isVisible&&s.legend===this.tooltipProps.legend);i=n.yAxisCalloutData??n.data.toLocaleString()}return i}_updateTextInsideDonut(){if(!this._textInsideDonut||!this.valueInsideDonut)return;this._textInsideDonut.textContent=this._getTextInsideDonut(this.valueInsideDonut);const t=this._textInsideDonut.getBoundingClientRect().height;Yo(this._textInsideDonut,2*this.innerRadius);const i=this._textInsideDonut.getElementsByTagName("tspan"),n=-1*Math.trunc((i.length-1)/2);for(let s=0;s<i.length;s++)i[s].setAttribute("dy",`${(n+s)*t}`)}}W([P({converter:Me})],F.prototype,"height",2),W([P({converter:Me})],F.prototype,"width",2),W([P({attribute:"hide-legends",mode:"boolean"})],F.prototype,"hideLegends",2),W([P({attribute:"hide-tooltip",mode:"boolean"})],F.prototype,"hideTooltip",2),W([P({converter:kn})],F.prototype,"data",2),W([P({attribute:"inner-radius",converter:Me})],F.prototype,"innerRadius",2),W([P({attribute:"value-inside-donut"})],F.prototype,"valueInsideDonut",2),W([P({attribute:"legend-list-label"})],F.prototype,"legendListLabel",2),W([ct],F.prototype,"legends",2),W([ct],F.prototype,"activeLegend",2),W([ct],F.prototype,"isLegendSelected",2),W([ct],F.prototype,"tooltipProps",2);const _a=k`
100
- ${rn("inline-block")}
101
-
102
- :host{${vn}
103
- align-items:center;flex-direction:column;width:100%;height:100%;position:relative}.chart{box-sizing:content-box;overflow:visible;display:block}.arc.inactive{opacity:0.1}.arc:focus{outline:none;stroke-width:${He};stroke:${Is}}.arc-outline{fill:none}.arc-outline:has(+ .arc:focus){stroke-width:${te};stroke:${Hs}}.text-inside-donut{${or}
104
- fill:${tt}}.legend-container{padding-top:${gn};white-space:nowrap;width:100%;align-items:center;margin:-${fn} ${hn} ${un} -${ht};flex-wrap:wrap;display:flex}.legend{display:flex;align-items:center;cursor:pointer;border:none;padding:${ht};background:none;text-transform:capitalize}.legend-rect{width:12px;height:12px;margin-inline-end:${ht};border:${He} solid}.legend-text{${Nt}
105
- color:${tt}}.legend.inactive .legend-rect{background-color:transparent !important}.legend.inactive .legend-text{opacity:0.67}.tooltip{display:grid;overflow:hidden;padding:${pn} ${dn};background-color:${Yt};background-blend-mode:normal,luminosity;border-radius:${js};border:1px solid ${Ds};filter:drop-shadow(0 0 2px ${Fs}) drop-shadow(0 8px 16px ${qs});position:absolute;z-index:1;pointer-events:none}.tooltip-body{padding-inline-start:${ht};color:${tt};border-inline-start:4px solid}.tooltip-legend-text{${Nt}}.tooltip-content-y{${bn}}`.withBehaviors(on(k`
106
- .text-inside-donut{fill:CanvasText}.legend-rect,.tooltip-body{forced-color-adjust:none}.tooltip-legend-text,.tooltip-content-y{forced-color-adjust:auto;color:CanvasText}`));function Ca(){return at`<template><div ${Ee("chartWrapper")}><svg class="chart" width="${e=>e.width}" height="${e=>e.height}"><g ${Ee("group")} transform="translate(${e=>e.width/2}, ${e=>e.height/2})"></g></svg></div>${Xt(e=>!e.hideLegends,at`<div class="legend-container" role="listbox" aria-label="${e=>e.legendListLabel}">${Hi(e=>e.legends,at`<button class="legend${(e,t)=>t.parent.activeLegend===""||t.parent.activeLegend===e.title?"":" inactive"}" role="option" aria-setsize="${(e,t)=>t.length}" aria-posinset="${(e,t)=>t.index+1}" aria-selected="${(e,t)=>e.title===t.parent.activeLegend}" @mouseover="${(e,t)=>t.parent.handleLegendMouseoverAndFocus(e.title)}" @mouseout="${(e,t)=>t.parent.handleLegendMouseoutAndBlur()}" @focus="${(e,t)=>t.parent.handleLegendMouseoverAndFocus(e.title)}" @blur="${(e,t)=>t.parent.handleLegendMouseoutAndBlur()}" @click="${(e,t)=>t.parent.handleLegendClick(e.title)}"><div class="legend-rect" style="background-color: ${e=>e.color}; border-color: ${e=>e.color};"></div><div class="legend-text">${e=>e.title}</div></button>`)}</div>`)} ${Xt(e=>!e.hideTooltip&&e.tooltipProps.isVisible,at`<div class="tooltip" style="inset-inline-start: ${e=>e.tooltipProps.xPos}px; top: ${e=>e.tooltipProps.yPos}px"><div class="tooltip-body" style="border-color: ${e=>e.tooltipProps.color};"><div class="tooltip-legend-text">${e=>e.tooltipProps.legend}</div><div class="tooltip-content-y" style="color: ${e=>e.tooltipProps.color};">${e=>e.tooltipProps.yValue}</div></div></div>`)}</template>`}const Aa=Ca(),Ta=F.compose({name:`${ee.prefix}-donut-chart`,template:Aa,styles:_a,shadowOptions:{delegatesFocus:!0}});Ta.define(ee.registry);
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- declare const itemRenderer: () => HTMLElement;
2
- export default itemRenderer;
3
- export { tests } from '../utils/benchmark-wrapper.js';
@@ -1,40 +0,0 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
- import type { ChartProps, Legend } from './donut-chart.options.js';
3
- export declare class DonutChart extends FASTElement {
4
- height: number;
5
- width: number;
6
- hideLegends: boolean;
7
- hideTooltip: boolean;
8
- data: ChartProps;
9
- innerRadius: number;
10
- valueInsideDonut?: string;
11
- legendListLabel?: string;
12
- legends: Legend[];
13
- activeLegend: string;
14
- protected activeLegendChanged(oldValue: string, newValue: string): void;
15
- isLegendSelected: boolean;
16
- tooltipProps: {
17
- isVisible: boolean;
18
- legend: string;
19
- yValue: string;
20
- color: string;
21
- xPos: number;
22
- yPos: number;
23
- };
24
- protected tooltipPropsChanged(oldValue: any, newValue: any): void;
25
- chartWrapper: HTMLDivElement;
26
- group: SVGGElement;
27
- elementInternals: ElementInternals;
28
- private _arcs;
29
- private _isRTL;
30
- private _textInsideDonut?;
31
- constructor();
32
- handleLegendMouseoverAndFocus(legendTitle: string): void;
33
- handleLegendMouseoutAndBlur(): void;
34
- handleLegendClick(legendTitle: string): void;
35
- connectedCallback(): void;
36
- private _render;
37
- private _getLegends;
38
- private _getTextInsideDonut;
39
- private _updateTextInsideDonut;
40
- }
@@ -1,7 +0,0 @@
1
- import { DonutChart } from './donut-chart.js';
2
- /**
3
- * @public
4
- * @remarks
5
- * HTML Element: `<fluent-donut-chart>`
6
- */
7
- export declare const definition: import("@microsoft/fast-element").FASTElementDefinition<typeof DonutChart>;
@@ -1,38 +0,0 @@
1
- export interface ChartDataPoint {
2
- /**
3
- * Legend text for the datapoint in the chart
4
- */
5
- legend: string;
6
- /**
7
- * data the datapoint in the chart
8
- */
9
- data: number;
10
- /**
11
- * Color for the legend in the chart. If not provided, it will fallback on the default color palette.
12
- */
13
- color?: string;
14
- /**
15
- * Callout data for x axis
16
- * This is an optional prop, If haven;t given legend will take
17
- */
18
- xAxisCalloutData?: string;
19
- /**
20
- * Callout data for y axis
21
- * This is an optional prop, If haven't given data will take
22
- */
23
- yAxisCalloutData?: string;
24
- }
25
- export interface ChartProps {
26
- /**
27
- * chart title for the chart
28
- */
29
- chartTitle?: string;
30
- /**
31
- * data for the points in the chart
32
- */
33
- chartData: ChartDataPoint[];
34
- }
35
- export type Legend = {
36
- title: string;
37
- color: string;
38
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * Styles for the DonutChart component.
3
- *
4
- * @public
5
- */
6
- export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -1,12 +0,0 @@
1
- import { ElementViewTemplate } from '@microsoft/fast-element';
2
- import type { DonutChart } from './donut-chart.js';
3
- /**
4
- * Generates a template for the DonutChart component.
5
- *
6
- * @public
7
- */
8
- export declare function donutChartTemplate<T extends DonutChart>(): ElementViewTemplate<T>;
9
- /**
10
- * @internal
11
- */
12
- export declare const template: ElementViewTemplate<DonutChart>;
@@ -1,4 +0,0 @@
1
- export { definition as DonutChartDefinition } from './donut-chart.definition.js';
2
- export { DonutChart } from './donut-chart.js';
3
- export { styles as DonutChartStyles } from './donut-chart.styles.js';
4
- export { template as DonutChartTemplate } from './donut-chart.template.js';
@@ -1,30 +0,0 @@
1
- import { type ExpectMatcherState, type Locator } from '@playwright/test';
2
- /**
3
- * Returns a formatted URL for a given Storybook fixture.
4
- *
5
- * @param id - the Storybook fixture ID
6
- * @param args - Story args
7
- * @returns - the local URL for the Storybook fixture iframe
8
- */
9
- export declare function fixtureURL(id?: string, args?: Record<string, any>): string;
10
- /**
11
- * Evaluate whether an element has the given state or not on its `elementInternals` property.
12
- *
13
- * @param locator - The Playwright locator for the element.
14
- * @param state - The name of the state.
15
- * @param expected - Whether the given state is expected to exist.
16
- * @param has - Whether the element is expected to have or not have the given state, defaults to `true`.
17
- */
18
- declare function toHaveCustomState(this: ExpectMatcherState, locator: Locator, state: string, options?: {
19
- timeout?: number;
20
- }): Promise<{
21
- name: string;
22
- message: () => string;
23
- pass: boolean;
24
- expected: boolean;
25
- actual: any;
26
- }>;
27
- export declare const expect: import("@playwright/test").Expect<{
28
- toHaveCustomState: typeof toHaveCustomState;
29
- }>;
30
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- declare const itemRenderer: () => HTMLElement;
2
- export default itemRenderer;
3
- export { tests } from '../utils/benchmark-wrapper.js';
@@ -1,46 +0,0 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
- import type { ChartDataPoint, ChartProps } from './horizontal-bar-chart.options.js';
3
- import { Variant } from './horizontal-bar-chart.options.js';
4
- /**
5
- * A Horizontal Bar Chart HTML Element.
6
- *
7
- * @public
8
- */
9
- export declare class HorizontalBarChart extends FASTElement {
10
- variant?: Variant;
11
- data: ChartProps[];
12
- hideRatio: boolean;
13
- hideLegends: boolean;
14
- hideTooltip: boolean;
15
- legendListLabel?: string;
16
- chartTitle?: string;
17
- uniqueLegends: ChartDataPoint[];
18
- activeLegend: string;
19
- protected activeLegendChanged: (oldValue: string, newValue: string) => void;
20
- isLegendSelected: boolean;
21
- tooltipProps: {
22
- isVisible: boolean;
23
- legend: string;
24
- yValue: string;
25
- color: string;
26
- xPos: number;
27
- yPos: number;
28
- };
29
- chartContainer: HTMLDivElement;
30
- elementInternals: ElementInternals;
31
- private _isRTL;
32
- private _barHeight;
33
- private _bars;
34
- constructor();
35
- handleLegendMouseoverAndFocus: (legendTitle: string) => void;
36
- handleLegendMouseoutAndBlur: () => void;
37
- handleLegendClick: (legendTitle: string) => void;
38
- connectedCallback(): void;
39
- private _initializeData;
40
- private _renderChart;
41
- private _createSingleChartBars;
42
- private _hydrateLegends;
43
- private _hydrateData;
44
- private _calculateBarSpacing;
45
- private _createBarsAndLegends;
46
- }
@@ -1,9 +0,0 @@
1
- import { HorizontalBarChart } from './horizontal-bar-chart.js';
2
- /**
3
- * The Fluent Textarea Element definition.
4
- *
5
- * @public
6
- * @remarks
7
- * HTML Element: `<fluent-textarea>`
8
- */
9
- export declare const definition: import("@microsoft/fast-element").FASTElementDefinition<typeof HorizontalBarChart>;
@@ -1,40 +0,0 @@
1
- export declare enum Variant {
2
- PartToWhole = "part-to-whole",
3
- AbsoluteScale = "absolute-scale",
4
- SingleBar = "single-bar"
5
- }
6
- export interface ChartDataPoint {
7
- /**
8
- * Legend text for the datapoint in the chart
9
- */
10
- legend: string;
11
- /**
12
- * data the datapoint in the chart
13
- */
14
- data: number;
15
- /**
16
- * total length of bar
17
- */
18
- total?: number;
19
- /**
20
- * onClick action for each datapoint in the chart
21
- */
22
- onClick?: VoidFunction;
23
- /**
24
- * Color for the legend in the chart. If not provided, it will fallback on the default color palette.
25
- */
26
- color?: string;
27
- gradient?: [string, string];
28
- }
29
- export interface ChartProps {
30
- /**
31
- * title for the data series
32
- */
33
- chartSeriesTitle?: string;
34
- /**
35
- * data for the points in the chart
36
- */
37
- chartData: ChartDataPoint[];
38
- benchmarkData?: number;
39
- chartDataText?: string;
40
- }
@@ -1,7 +0,0 @@
1
- import type { ElementStyles } from '@microsoft/fast-element';
2
- /**
3
- * Styles for the HorizontalBarChart component.
4
- *
5
- * @public
6
- */
7
- export declare const styles: ElementStyles;
@@ -1,12 +0,0 @@
1
- import { ElementViewTemplate } from '@microsoft/fast-element';
2
- import type { HorizontalBarChart } from './horizontal-bar-chart.js';
3
- /**
4
- * Generates a template for the HorizontalBarChart component.
5
- *
6
- * @public
7
- */
8
- export declare function horizontalbarchartTemplate<T extends HorizontalBarChart>(): ElementViewTemplate<T>;
9
- /**
10
- * @internal
11
- */
12
- export declare const template: ElementViewTemplate<HorizontalBarChart>;
@@ -1,4 +0,0 @@
1
- export { definition as HorizontalBarChartDefinition } from './horizontal-bar-chart.definition.js';
2
- export { HorizontalBarChart } from './horizontal-bar-chart.js';
3
- export { styles as HorizontalBarChartStyles } from './horizontal-bar-chart.styles.js';
4
- export { template as HorizontalBarChartTemplate } from './horizontal-bar-chart.template.js';
@@ -1,2 +0,0 @@
1
- import './horizontal-bar-chart/define.js';
2
- import './donut-chart/define.js';
@@ -1,2 +0,0 @@
1
- export { HorizontalBarChart, HorizontalBarChartDefinition, HorizontalBarChartStyles, HorizontalBarChartTemplate, } from './horizontal-bar-chart/index.js';
2
- export { DonutChart, DonutChartDefinition, DonutChartStyles, DonutChartTemplate } from './donut-chart/index.js';