@genesislcap/foundation-events 10.3.1 → 11.3.1
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.
- package/dist/esm/eventEmitter/eventEmitterDI.js +0 -1
- package/dist/esm/eventEmitter/eventEmitterMixin.js +0 -1
- package/dist/esm/eventEmitter/index.js +0 -1
- package/dist/esm/index.federated.js +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/types.js +0 -1
- package/package.json +3 -4
- package/dist/1.0.0.remoteEntry.js +0 -1
- package/dist/573.573.6e60854155addcc72467.js +0 -2
- package/dist/573.650390e975bc6c8376d3ff8eda7e52f4.js.map +0 -1
- package/dist/755.537dff5a23d468b98824bdef43b0cda0.js.map +0 -1
- package/dist/755.755.e981769af6aec9db513d.js +0 -2
- package/dist/856.3e4045c8104c25006236673f533997ff.js.map +0 -1
- package/dist/856.856.72fdef7363783c3bf498.js +0 -3
- package/dist/856.856.72fdef7363783c3bf498.js.LICENSE.txt +0 -4
- package/dist/dashboard.json +0 -1
- package/dist/esm/eventEmitter/eventEmitterDI.js.map +0 -1
- package/dist/esm/eventEmitter/eventEmitterMixin.js.map +0 -1
- package/dist/esm/eventEmitter/index.js.map +0 -1
- package/dist/esm/index.federated.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types.js.map +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/foundation-events.iife.min.js +0 -1
- package/dist/foundation-events.js +0 -2728
- package/dist/foundation-events.min.js +0 -1
- package/dist/foundationEvents.8f5b3182da29e4d9304d1d4c151e3e58.js.map +0 -1
- package/dist/index.ejs +0 -23
- package/dist/index.html +0 -13
- package/dist/info.ejs +0 -13
- package/dist/main.50811a618c5e054436cd.js +0 -2
- package/dist/main.db9310a7c29193d4ad3bbbeeb42b7729.js.map +0 -1
- package/dist/npm.microsoft.127.08b9ac45e34e116d147c.js +0 -1469
- package/dist/npm.microsoft.127.08b9ac45e34e116d147c.js.LICENSE.txt +0 -14
- package/dist/npm.microsoft.c693b5fe4306901c8d3cdd3b3c894944.js.map +0 -1
- package/dist/remoteEntry.js +0 -2
- package/dist/serve.json +0 -3
|
@@ -1,1469 +0,0 @@
|
|
|
1
|
-
/*! For license information please see npm.microsoft.127.08b9ac45e34e116d147c.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_genesislcap_foundation_events=self.webpackChunk_genesislcap_foundation_events||[]).push([[127],{759:(e,t,i)=>{"use strict";i.r(t),i.d(t,{$global:()=>s,AttachedBehaviorHTMLDirective:()=>k,AttributeConfiguration:()=>se,AttributeDefinition:()=>re,BindingBehavior:()=>M,CSSDirective:()=>ye,ChildrenBehavior:()=>Xe,Controller:()=>ve,DOM:()=>m,ElementStyles:()=>Q,ExecutionContext:()=>x,FAST:()=>n,FASTElement:()=>be,FASTElementDefinition:()=>ce,HTMLBindingDirective:()=>P,HTMLDirective:()=>$,HTMLView:()=>K,Observable:()=>b,PropertyChangeNotifier:()=>f,RefBehavior:()=>Me,RepeatBehavior:()=>qe,RepeatDirective:()=>Ue,SlottedBehavior:()=>Ge,SubscriberSet:()=>v,TargetedHTMLDirective:()=>I,ViewTemplate:()=>G,attr:()=>ae,booleanConverter:()=>oe,children:()=>Qe,compileTemplate:()=>j,createMetadataLocator:()=>a,css:()=>xe,cssPartial:()=>$e,customElement:()=>ge,defaultExecutionContext:()=>w,elements:()=>We,emptyArray:()=>r,enableArrayObservation:()=>Pe,html:()=>X,nullableNumberConverter:()=>ne,observable:()=>g,ref:()=>Ve,repeat:()=>je,slotted:()=>Ye,volatile:()=>y,when:()=>He});const s=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;try{return new Function("return this")()}catch(e){return{}}}();void 0===s.trustedTypes&&(s.trustedTypes={createPolicy:(e,t)=>t});const o={configurable:!1,enumerable:!1,writable:!1};void 0===s.FAST&&Reflect.defineProperty(s,"FAST",Object.assign({value:Object.create(null)},o));const n=s.FAST;if(void 0===n.getById){const e=Object.create(null);Reflect.defineProperty(n,"getById",Object.assign({value(t,i){let s=e[t];return void 0===s&&(s=i?e[t]=i():null),s}},o))}const r=Object.freeze([]);function a(){const e=new WeakMap;return function(t){let i=e.get(t);if(void 0===i){let s=Reflect.getPrototypeOf(t);for(;void 0===i&&null!==s;)i=e.get(s),s=Reflect.getPrototypeOf(s);i=void 0===i?[]:i.slice(0),e.set(t,i)}return i}}const l=s.FAST.getById(1,(()=>{const e=[],t=[];function i(){if(t.length)throw t.shift()}function o(e){try{e.call()}catch(e){t.push(e),setTimeout(i,0)}}function n(){let t=0;for(;t<e.length;)if(o(e[t]),t++,t>1024){for(let i=0,s=e.length-t;i<s;i++)e[i]=e[i+t];e.length-=t,t=0}e.length=0}return Object.freeze({enqueue:function(t){e.length<1&&s.requestAnimationFrame(n),e.push(t)},process:n})})),d=s.trustedTypes.createPolicy("fast-html",{createHTML:e=>e});let h=d;const c=`fast-${Math.random().toString(36).substring(2,8)}`,u=`${c}{`,p=`}${c}`,m=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(e){if(h!==d)throw new Error("The HTML policy can only be set once.");h=e},createHTML:e=>h.createHTML(e),isMarker:e=>e&&8===e.nodeType&&e.data.startsWith(c),extractDirectiveIndexFromMarker:e=>parseInt(e.data.replace(`${c}:`,"")),createInterpolationPlaceholder:e=>`${u}${e}${p}`,createCustomAttributePlaceholder(e,t){return`${e}="${this.createInterpolationPlaceholder(t)}"`},createBlockPlaceholder:e=>`\x3c!--${c}:${e}--\x3e`,queueUpdate:l.enqueue,processUpdates:l.process,nextUpdate:()=>new Promise(l.enqueue),setAttribute(e,t,i){null==i?e.removeAttribute(t):e.setAttribute(t,i)},setBooleanAttribute(e,t,i){i?e.setAttribute(t,""):e.removeAttribute(t)},removeChildNodes(e){for(let t=e.firstChild;null!==t;t=e.firstChild)e.removeChild(t)},createTemplateWalker:e=>document.createTreeWalker(e,133,null,!1)});class v{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const i=t.indexOf(e);-1!==i&&t.splice(i,1)}}notify(e){const t=this.spillover,i=this.source;if(void 0===t){const t=this.sub1,s=this.sub2;void 0!==t&&t.handleChange(i,e),void 0!==s&&s.handleChange(i,e)}else for(let s=0,o=t.length;s<o;++s)t[s].handleChange(i,e)}}class f{constructor(e){this.subscribers={},this.sourceSubscribers=null,this.source=e}notify(e){var t;const i=this.subscribers[e];void 0!==i&&i.notify(e),null===(t=this.sourceSubscribers)||void 0===t||t.notify(e)}subscribe(e,t){var i;if(t){let i=this.subscribers[t];void 0===i&&(this.subscribers[t]=i=new v(this.source)),i.subscribe(e)}else this.sourceSubscribers=null!==(i=this.sourceSubscribers)&&void 0!==i?i:new v(this.source),this.sourceSubscribers.subscribe(e)}unsubscribe(e,t){var i;if(t){const i=this.subscribers[t];void 0!==i&&i.unsubscribe(e)}else null===(i=this.sourceSubscribers)||void 0===i||i.unsubscribe(e)}}const b=n.getById(2,(()=>{const e=/(:|&&|\|\||if)/,t=new WeakMap,i=m.queueUpdate;let s,o=e=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function n(e){let i=e.$fastController||t.get(e);return void 0===i&&(Array.isArray(e)?i=o(e):t.set(e,i=new f(e))),i}const r=a();class l{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==s&&s.watch(e,this.name),e[this.field]}setValue(e,t){const i=this.field,s=e[i];if(s!==t){e[i]=t;const o=e[this.callback];"function"==typeof o&&o.call(e,s,t),n(e).notify(this.name)}}}class d extends v{constructor(e,t,i=!1){super(e,t),this.binding=e,this.isVolatileBinding=i,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(e,t){this.needsRefresh&&null!==this.last&&this.disconnect();const i=s;s=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const o=this.binding(e,t);return s=i,o}disconnect(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(e,t){const i=this.last,o=n(e),r=null===i?this.first:{};if(r.propertySource=e,r.propertyName=t,r.notifier=o,o.subscribe(this,t),null!==i){if(!this.needsRefresh){let t;s=void 0,t=i.propertySource[i.propertyName],s=this,e===t&&(this.needsRefresh=!0)}i.next=r}this.last=r}handleChange(){this.needsQueue&&(this.needsQueue=!1,i(this))}call(){null!==this.last&&(this.needsQueue=!0,this.notify(this))}records(){let e=this.first;return{next:()=>{const t=e;return void 0===t?{value:void 0,done:!0}:(e=e.next,{value:t,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(e){o=e},getNotifier:n,track(e,t){void 0!==s&&s.watch(e,t)},trackVolatile(){void 0!==s&&(s.needsRefresh=!0)},notify(e,t){n(e).notify(t)},defineProperty(e,t){"string"==typeof t&&(t=new l(t)),r(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get:function(){return t.getValue(this)},set:function(e){t.setValue(this,e)}})},getAccessors:r,binding(e,t,i=this.isVolatileBinding(e)){return new d(e,t,i)},isVolatileBinding:t=>e.test(t.toString())})}));function g(e,t){b.defineProperty(e,t)}function y(e,t,i){return Object.assign({},i,{get:function(){return b.trackVolatile(),i.get.apply(this)}})}const C=n.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}}));class x{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return C.get()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(e){C.set(e)}}b.defineProperty(x.prototype,"index"),b.defineProperty(x.prototype,"length");const w=Object.seal(new x);class ${constructor(){this.targetIndex=0}}class I extends ${constructor(){super(...arguments),this.createPlaceholder=m.createInterpolationPlaceholder}}class k extends ${constructor(e,t,i){super(),this.name=e,this.behavior=t,this.options=i}createPlaceholder(e){return m.createCustomAttributePlaceholder(this.name,e)}createBehavior(e){return new this.behavior(e,this.options)}}function _(e,t){this.source=e,this.context=t,null===this.bindingObserver&&(this.bindingObserver=b.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(e,t))}function T(e,t){this.source=e,this.context=t,this.target.addEventListener(this.targetName,this)}function O(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function E(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const e=this.target.$fastView;void 0!==e&&e.isComposed&&(e.unbind(),e.needsBindOnly=!0)}function S(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function R(e){m.setAttribute(this.target,this.targetName,e)}function D(e){m.setBooleanAttribute(this.target,this.targetName,e)}function A(e){if(null==e&&(e=""),e.create){this.target.textContent="";let t=this.target.$fastView;void 0===t?t=e.create():this.target.$fastTemplate!==e&&(t.isComposed&&(t.remove(),t.unbind()),t=e.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(this.source,this.context)):(t.isComposed=!0,t.bind(this.source,this.context),t.insertBefore(this.target),this.target.$fastView=t,this.target.$fastTemplate=e)}else{const t=this.target.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),this.target.textContent=e}}function F(e){this.target[this.targetName]=e}function L(e){const t=this.classVersions||Object.create(null),i=this.target;let s=this.version||0;if(null!=e&&e.length){const o=e.split(/\s+/);for(let e=0,n=o.length;e<n;++e){const n=o[e];""!==n&&(t[n]=s,i.classList.add(n))}}if(this.classVersions=t,this.version=s+1,0!==s){s-=1;for(const e in t)t[e]===s&&i.classList.remove(e)}}class P extends I{constructor(e){super(),this.binding=e,this.bind=_,this.unbind=O,this.updateTarget=R,this.isBindingVolatile=b.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(e){if(this.originalTargetName=e,void 0!==e)switch(e[0]){case":":if(this.cleanedTargetName=e.substr(1),this.updateTarget=F,"innerHTML"===this.cleanedTargetName){const e=this.binding;this.binding=(t,i)=>m.createHTML(e(t,i))}break;case"?":this.cleanedTargetName=e.substr(1),this.updateTarget=D;break;case"@":this.cleanedTargetName=e.substr(1),this.bind=T,this.unbind=S;break;default:this.cleanedTargetName=e,"class"===e&&(this.updateTarget=L)}}targetAtContent(){this.updateTarget=A,this.unbind=E}createBehavior(e){return new M(e,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class M{constructor(e,t,i,s,o,n,r){this.source=null,this.context=null,this.bindingObserver=null,this.target=e,this.binding=t,this.isBindingVolatile=i,this.bind=s,this.unbind=o,this.updateTarget=n,this.targetName=r}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(e){x.setEvent(e);const t=this.binding(this.source,this.context);x.setEvent(null),!0!==t&&e.preventDefault()}}let V=null;class H{addFactory(e){e.targetIndex=this.targetIndex,this.behaviorFactories.push(e)}captureContentBinding(e){e.targetAtContent(),this.addFactory(e)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){V=this}static borrow(e){const t=V||new H;return t.directives=e,t.reset(),V=null,t}}function z(e){if(1===e.length)return e[0];let t;const i=e.length,s=e.map((e=>"string"==typeof e?()=>e:(t=e.targetName||t,e.binding))),o=new P(((e,t)=>{let o="";for(let n=0;n<i;++n)o+=s[n](e,t);return o}));return o.targetName=t,o}const B=p.length;function N(e,t){const i=t.split(u);if(1===i.length)return null;const s=[];for(let t=0,o=i.length;t<o;++t){const o=i[t],n=o.indexOf(p);let r;if(-1===n)r=o;else{const t=parseInt(o.substring(0,n));s.push(e.directives[t]),r=o.substring(n+B)}""!==r&&s.push(r)}return s}function q(e,t,i=!1){const s=t.attributes;for(let o=0,n=s.length;o<n;++o){const r=s[o],a=r.value,l=N(e,a);let d=null;null===l?i&&(d=new P((()=>a)),d.targetName=r.name):d=z(l),null!==d&&(t.removeAttributeNode(r),o--,n--,e.addFactory(d))}}function U(e,t,i){const s=N(e,t.textContent);if(null!==s){let o=t;for(let n=0,r=s.length;n<r;++n){const r=s[n],a=0===n?t:o.parentNode.insertBefore(document.createTextNode(""),o.nextSibling);"string"==typeof r?a.textContent=r:(a.textContent=" ",e.captureContentBinding(r)),o=a,e.targetIndex++,a!==t&&i.nextNode()}e.targetIndex--}}function j(e,t){const i=e.content;document.adoptNode(i);const s=H.borrow(t);q(s,e,!0);const o=s.behaviorFactories;s.reset();const n=m.createTemplateWalker(i);let r;for(;r=n.nextNode();)switch(s.targetIndex++,r.nodeType){case 1:q(s,r);break;case 3:U(s,r,n);break;case 8:m.isMarker(r)&&s.addFactory(t[m.extractDirectiveIndexFromMarker(r)])}let a=0;(m.isMarker(i.firstChild)||1===i.childNodes.length&&t.length)&&(i.insertBefore(document.createComment(""),i.firstChild),a=-1);const l=s.behaviorFactories;return s.release(),{fragment:i,viewBehaviorFactories:l,hostBehaviorFactories:o,targetOffset:a}}const W=document.createRange();class K{constructor(e,t){this.fragment=e,this.behaviors=t,this.source=null,this.context=null,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const i=e.parentNode;let s,o=this.firstChild;for(;o!==t;)s=o.nextSibling,i.insertBefore(o,e),o=s;i.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let i,s=this.firstChild;for(;s!==t;)i=s.nextSibling,e.appendChild(s),s=i;e.appendChild(t)}dispose(){const e=this.firstChild.parentNode,t=this.lastChild;let i,s=this.firstChild;for(;s!==t;)i=s.nextSibling,e.removeChild(s),s=i;e.removeChild(t);const o=this.behaviors,n=this.source;for(let e=0,t=o.length;e<t;++e)o[e].unbind(n)}bind(e,t){const i=this.behaviors;if(this.source!==e)if(null!==this.source){const s=this.source;this.source=e,this.context=t;for(let o=0,n=i.length;o<n;++o){const n=i[o];n.unbind(s),n.bind(e,t)}}else{this.source=e,this.context=t;for(let s=0,o=i.length;s<o;++s)i[s].bind(e,t)}}unbind(){if(null===this.source)return;const e=this.behaviors,t=this.source;for(let i=0,s=e.length;i<s;++i)e[i].unbind(t);this.source=null}static disposeContiguousBatch(e){if(0!==e.length){W.setStartBefore(e[0].firstChild),W.setEndAfter(e[e.length-1].lastChild),W.deleteContents();for(let t=0,i=e.length;t<i;++t){const i=e[t],s=i.behaviors,o=i.source;for(let e=0,t=s.length;e<t;++e)s[e].unbind(o)}}}}class G{constructor(e,t){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=e,this.directives=t}create(e){if(null===this.fragment){let e;const t=this.html;if("string"==typeof t){e=document.createElement("template"),e.innerHTML=m.createHTML(t);const i=e.content.firstElementChild;null!==i&&"TEMPLATE"===i.tagName&&(e=i)}else e=t;const i=j(e,this.directives);this.fragment=i.fragment,this.viewBehaviorFactories=i.viewBehaviorFactories,this.hostBehaviorFactories=i.hostBehaviorFactories,this.targetOffset=i.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}const t=this.fragment.cloneNode(!0),i=this.viewBehaviorFactories,s=new Array(this.behaviorCount),o=m.createTemplateWalker(t);let n=0,r=this.targetOffset,a=o.nextNode();for(let e=i.length;n<e;++n){const e=i[n],t=e.targetIndex;for(;null!==a;){if(r===t){s[n]=e.createBehavior(a);break}a=o.nextNode(),r++}}if(this.hasHostBehaviors){const t=this.hostBehaviorFactories;for(let i=0,o=t.length;i<o;++i,++n)s[n]=t[i].createBehavior(e)}return new K(t,s)}render(e,t,i){"string"==typeof t&&(t=document.getElementById(t)),void 0===i&&(i=t);const s=this.create(i);return s.bind(e,w),s.appendTo(t),s}}const Y=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function X(e,...t){const i=[];let s="";for(let o=0,n=e.length-1;o<n;++o){const n=e[o];let r=t[o];if(s+=n,r instanceof G){const e=r;r=()=>e}if("function"==typeof r&&(r=new P(r)),r instanceof I){const e=Y.exec(n);null!==e&&(r.targetName=e[2])}r instanceof $?(s+=r.createPlaceholder(i.length),i.push(r)):s+=r}return s+=e[e.length-1],new G(s,i)}class Q{constructor(){this.targets=new WeakSet}addStylesTo(e){this.targets.add(e)}removeStylesFrom(e){this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}}function Z(e){return e.map((e=>e instanceof Q?Z(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}function J(e){return e.map((e=>e instanceof Q?e.behaviors:null)).reduce(((e,t)=>null===t?e:(null===e&&(e=[]),e.concat(t))),null)}Q.create=(()=>{if(m.supportsAdoptedStyleSheets){const e=new Map;return t=>new ee(t,e)}return e=>new ie(e)})();class ee extends Q{constructor(e,t){super(),this.styles=e,this.styleSheetCache=t,this._styleSheets=void 0,this.behaviors=J(e)}get styleSheets(){if(void 0===this._styleSheets){const e=this.styles,t=this.styleSheetCache;this._styleSheets=Z(e).map((e=>{if(e instanceof CSSStyleSheet)return e;let i=t.get(e);return void 0===i&&(i=new CSSStyleSheet,i.replaceSync(e),t.set(e,i)),i}))}return this._styleSheets}addStylesTo(e){e.adoptedStyleSheets=[...e.adoptedStyleSheets,...this.styleSheets],super.addStylesTo(e)}removeStylesFrom(e){const t=this.styleSheets;e.adoptedStyleSheets=e.adoptedStyleSheets.filter((e=>-1===t.indexOf(e))),super.removeStylesFrom(e)}}let te=0;class ie extends Q{constructor(e){super(),this.styles=e,this.behaviors=null,this.behaviors=J(e),this.styleSheets=Z(e),this.styleClass="fast-style-class-"+ ++te}addStylesTo(e){const t=this.styleSheets,i=this.styleClass;e=this.normalizeTarget(e);for(let s=0;s<t.length;s++){const o=document.createElement("style");o.innerHTML=t[s],o.className=i,e.append(o)}super.addStylesTo(e)}removeStylesFrom(e){const t=(e=this.normalizeTarget(e)).querySelectorAll(`.${this.styleClass}`);for(let i=0,s=t.length;i<s;++i)e.removeChild(t[i]);super.removeStylesFrom(e)}isAttachedTo(e){return super.isAttachedTo(this.normalizeTarget(e))}normalizeTarget(e){return e===document?document.body:e}}const se=Object.freeze({locate:a()}),oe={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e},ne={toView(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t.toString()},fromView(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}};class re{constructor(e,t,i=t.toLowerCase(),s="reflect",o){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=i,this.mode=s,this.converter=o,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===s&&void 0===o&&(this.converter=oe)}setValue(e,t){const i=e[this.fieldName],s=this.converter;void 0!==s&&(t=s.fromView(t)),i!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](i,t),e.$fastController.notify(this.name))}getValue(e){return b.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,i=this.guards;i.has(e)||"fromView"===t||m.queueUpdate((()=>{i.add(e);const s=e[this.fieldName];switch(t){case"reflect":const t=this.converter;m.setAttribute(e,this.attribute,void 0!==t?t.toView(s):s);break;case"boolean":m.setBooleanAttribute(e,this.attribute,s)}i.delete(e)}))}static collect(e,...t){const i=[];t.push(se.locate(e));for(let s=0,o=t.length;s<o;++s){const o=t[s];if(void 0!==o)for(let t=0,s=o.length;t<s;++t){const s=o[t];"string"==typeof s?i.push(new re(e,s)):i.push(new re(e,s.property,s.attribute,s.mode,s.converter))}}return i}}function ae(e,t){let i;function s(e,t){arguments.length>1&&(i.property=t),se.locate(e.constructor).push(i)}return arguments.length>1?(i={},void s(e,t)):(i=void 0===e?{}:e,s)}const le={mode:"open"},de={},he=n.getById(4,(()=>{const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t)})}));class ce{constructor(e,t=e.definition){"string"==typeof t&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template;const i=re.collect(e,t.attributes),s=new Array(i.length),o={},n={};for(let e=0,t=i.length;e<t;++e){const t=i[e];s[e]=t.attribute,o[t.name]=t,n[t.attribute]=t}this.attributes=i,this.observedAttributes=s,this.propertyLookup=o,this.attributeLookup=n,this.shadowOptions=void 0===t.shadowOptions?le:null===t.shadowOptions?void 0:Object.assign(Object.assign({},le),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?de:Object.assign(Object.assign({},de),t.elementOptions),this.styles=void 0===t.styles?void 0:Array.isArray(t.styles)?Q.create(t.styles):t.styles instanceof Q?t.styles:Q.create([t.styles])}get isDefined(){return!!he.getByType(this.type)}define(e=customElements){const t=this.type;if(he.register(this)){const e=this.attributes,i=t.prototype;for(let t=0,s=e.length;t<s;++t)b.defineProperty(i,e[t]);Reflect.defineProperty(t,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return e.get(this.name)||e.define(this.name,t,this.elementOptions),this}}ce.forType=he.getByType;const ue=new WeakMap,pe={bubbles:!0,composed:!0,cancelable:!0};function me(e){return e.shadowRoot||ue.get(e)||null}class ve extends f{constructor(e,t){super(e),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=e,this.definition=t;const i=t.shadowOptions;if(void 0!==i){const t=e.attachShadow(i);"closed"===i.mode&&ue.set(e,t)}const s=b.getAccessors(e);if(s.length>0){const t=this.boundObservables=Object.create(null);for(let i=0,o=s.length;i<o;++i){const o=s[i].name,n=e[o];void 0!==n&&(delete e[o],t[o]=n)}}}get isConnected(){return b.track(this,"isConnected"),this._isConnected}setIsConnected(e){this._isConnected=e,b.notify(this,"isConnected")}get template(){return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get styles(){return this._styles}set styles(e){this._styles!==e&&(null!==this._styles&&this.removeStyles(this._styles),this._styles=e,this.needsInitialization||null===e||this.addStyles(e))}addStyles(e){const t=me(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.append(e);else if(!e.isAttachedTo(t)){const i=e.behaviors;e.addStylesTo(t),null!==i&&this.addBehaviors(i)}}removeStyles(e){const t=me(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.removeChild(e);else if(e.isAttachedTo(t)){const i=e.behaviors;e.removeStylesFrom(t),null!==i&&this.removeBehaviors(i)}}addBehaviors(e){const t=this.behaviors||(this.behaviors=new Map),i=e.length,s=[];for(let o=0;o<i;++o){const i=e[o];t.has(i)?t.set(i,t.get(i)+1):(t.set(i,1),s.push(i))}if(this._isConnected){const e=this.element;for(let t=0;t<s.length;++t)s[t].bind(e,w)}}removeBehaviors(e,t=!1){const i=this.behaviors;if(null===i)return;const s=e.length,o=[];for(let n=0;n<s;++n){const s=e[n];if(i.has(s)){const e=i.get(s)-1;0===e||t?i.delete(s)&&o.push(s):i.set(s,e)}}if(this._isConnected){const e=this.element;for(let t=0;t<o.length;++t)o[t].unbind(e)}}onConnectedCallback(){if(this._isConnected)return;const e=this.element;this.needsInitialization?this.finishInitialization():null!==this.view&&this.view.bind(e,w);const t=this.behaviors;if(null!==t)for(const[i]of t)i.bind(e,w);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);const e=this.view;null!==e&&e.unbind();const t=this.behaviors;if(null!==t){const e=this.element;for(const[i]of t)i.unbind(e)}}onAttributeChangedCallback(e,t,i){const s=this.definition.attributeLookup[e];void 0!==s&&s.onAttributeChangedCallback(this.element,i)}emit(e,t,i){return!!this._isConnected&&this.element.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},pe),i)))}finishInitialization(){const e=this.element,t=this.boundObservables;if(null!==t){const i=Object.keys(t);for(let s=0,o=i.length;s<o;++s){const o=i[s];e[o]=t[o]}this.boundObservables=null}const i=this.definition;null===this._template&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():i.template&&(this._template=i.template||null)),null!==this._template&&this.renderTemplate(this._template),null===this._styles&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():i.styles&&(this._styles=i.styles||null)),null!==this._styles&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(e){const t=this.element,i=me(t)||t;null!==this.view?(this.view.dispose(),this.view=null):this.needsInitialization||m.removeChildNodes(i),e&&(this.view=e.render(t,i,t))}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const i=ce.forType(e.constructor);if(void 0===i)throw new Error("Missing FASTElement definition.");return e.$fastController=new ve(e,i)}}function fe(e){return class extends e{constructor(){super(),ve.forCustomElement(this)}$emit(e,t,i){return this.$fastController.emit(e,t,i)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(e,t,i){this.$fastController.onAttributeChangedCallback(e,t,i)}}}const be=Object.assign(fe(HTMLElement),{from:e=>fe(e),define:(e,t)=>new ce(e,t).define().type});function ge(e){return function(t){new ce(t,e).define()}}class ye{createCSS(){return""}createBehavior(){}}function Ce(e,t){const i=[];let s="";const o=[];for(let n=0,r=e.length-1;n<r;++n){s+=e[n];let r=t[n];if(r instanceof ye){const e=r.createBehavior();r=r.createCSS(),e&&o.push(e)}r instanceof Q||r instanceof CSSStyleSheet?(""!==s.trim()&&(i.push(s),s=""),i.push(r)):s+=r}return s+=e[e.length-1],""!==s.trim()&&i.push(s),{styles:i,behaviors:o}}function xe(e,...t){const{styles:i,behaviors:s}=Ce(e,t),o=Q.create(i);return s.length&&o.withBehaviors(...s),o}class we extends ye{constructor(e,t){super(),this.behaviors=t,this.css="";const i=e.reduce(((e,t)=>("string"==typeof t?this.css+=t:e.push(t),e)),[]);i.length&&(this.styles=Q.create(i))}createBehavior(){return this}createCSS(){return this.css}bind(e){this.styles&&e.$fastController.addStyles(this.styles),this.behaviors.length&&e.$fastController.addBehaviors(this.behaviors)}unbind(e){this.styles&&e.$fastController.removeStyles(this.styles),this.behaviors.length&&e.$fastController.removeBehaviors(this.behaviors)}}function $e(e,...t){const{styles:i,behaviors:s}=Ce(e,t);return new we(i,s)}function Ie(e,t,i){return{index:e,removed:t,addedCount:i}}const ke=0,_e=1,Te=2,Oe=3;function Ee(e,t,i,s,o,n){let a=0,l=0;const d=Math.min(i-t,n-o);if(0===t&&0===o&&(a=function(e,t,i){for(let s=0;s<i;++s)if(e[s]!==t[s])return s;return i}(e,s,d)),i===e.length&&n===s.length&&(l=function(e,t,i){let s=e.length,o=t.length,n=0;for(;n<i&&e[--s]===t[--o];)n++;return n}(e,s,d-a)),o+=a,n-=l,(i-=l)-(t+=a)==0&&n-o==0)return r;if(t===i){const e=Ie(t,[],0);for(;o<n;)e.removed.push(s[o++]);return[e]}if(o===n)return[Ie(t,[],i-t)];const h=function(e){let t=e.length-1,i=e[0].length-1,s=e[t][i];const o=[];for(;t>0||i>0;){if(0===t){o.push(Te),i--;continue}if(0===i){o.push(Oe),t--;continue}const n=e[t-1][i-1],r=e[t-1][i],a=e[t][i-1];let l;l=r<a?r<n?r:n:a<n?a:n,l===n?(n===s?o.push(ke):(o.push(_e),s=n),t--,i--):l===r?(o.push(Oe),t--,s=r):(o.push(Te),i--,s=a)}return o.reverse(),o}(function(e,t,i,s,o,n){const r=n-o+1,a=i-t+1,l=new Array(r);let d,h;for(let e=0;e<r;++e)l[e]=new Array(a),l[e][0]=e;for(let e=0;e<a;++e)l[0][e]=e;for(let i=1;i<r;++i)for(let n=1;n<a;++n)e[t+n-1]===s[o+i-1]?l[i][n]=l[i-1][n-1]:(d=l[i-1][n]+1,h=l[i][n-1]+1,l[i][n]=d<h?d:h);return l}(e,t,i,s,o,n)),c=[];let u,p=t,m=o;for(let e=0;e<h.length;++e)switch(h[e]){case ke:void 0!==u&&(c.push(u),u=void 0),p++,m++;break;case _e:void 0===u&&(u=Ie(p,[],0)),u.addedCount++,p++,u.removed.push(s[m]),m++;break;case Te:void 0===u&&(u=Ie(p,[],0)),u.addedCount++,p++;break;case Oe:void 0===u&&(u=Ie(p,[],0)),u.removed.push(s[m]),m++}return void 0!==u&&c.push(u),c}const Se=Array.prototype.push;function Re(e,t,i,s){const o=Ie(t,i,s);let n=!1,r=0;for(let t=0;t<e.length;t++){const i=e[t];if(i.index+=r,n)continue;const s=(a=o.index,l=o.index+o.removed.length,d=i.index,h=i.index+i.addedCount,l<d||h<a?-1:l===d||h===a?0:a<d?l<h?l-d:h-d:h<l?h-a:l-a);if(s>=0){e.splice(t,1),t--,r-=i.addedCount-i.removed.length,o.addedCount+=i.addedCount-s;const a=o.removed.length+i.removed.length-s;if(o.addedCount||a){let e=i.removed;if(o.index<i.index){const t=o.removed.slice(0,i.index-o.index);Se.apply(t,e),e=t}if(o.index+o.removed.length>i.index+i.addedCount){const t=o.removed.slice(i.index+i.addedCount-o.index);Se.apply(e,t)}o.removed=e,i.index<o.index&&(o.index=i.index)}else n=!0}else if(o.index<i.index){n=!0,e.splice(t,0,o),t++;const s=o.addedCount-o.removed.length;i.index+=s,r+=s}}var a,l,d,h;n||e.push(o)}function De(e,t){let i=[];const s=function(e){const t=[];for(let i=0,s=e.length;i<s;i++){const s=e[i];Re(t,s.index,s.removed,s.addedCount)}return t}(t);for(let t=0,o=s.length;t<o;++t){const o=s[t];1!==o.addedCount||1!==o.removed.length?i=i.concat(Ee(e,o.index,o.index+o.addedCount,o.removed,0,o.removed.length)):o.removed[0]!==e[o.index]&&i.push(o)}return i}let Ae=!1;function Fe(e,t){let i=e.index;const s=t.length;return i>s?i=s-e.addedCount:i<0&&(i=s+e.removed.length+i-e.addedCount),i<0&&(i=0),e.index=i,e}class Le extends v{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this.call=this.flush,Reflect.defineProperty(e,"$fastController",{value:this,enumerable:!1})}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.needsQueue&&(this.needsQueue=!1,m.queueUpdate(this))}reset(e){this.oldCollection=e,this.needsQueue&&(this.needsQueue=!1,m.queueUpdate(this))}flush(){const e=this.splices,t=this.oldCollection;if(void 0===e&&void 0===t)return;this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0;const i=void 0===t?De(this.source,e):Ee(this.source,0,this.source.length,t,0,t.length);this.notify(i)}}function Pe(){if(Ae)return;Ae=!0,b.setArrayObserverFactory((e=>new Le(e)));const e=Array.prototype;if(e.$fastPatch)return;Reflect.defineProperty(e,"$fastPatch",{value:1,enumerable:!1});const t=e.pop,i=e.push,s=e.reverse,o=e.shift,n=e.sort,r=e.splice,a=e.unshift;e.pop=function(){const e=this.length>0,i=t.apply(this,arguments),s=this.$fastController;return void 0!==s&&e&&s.addSplice(Ie(this.length,[i],0)),i},e.push=function(){const e=i.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(Fe(Ie(this.length-arguments.length,[],arguments.length),this)),e},e.reverse=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const i=s.apply(this,arguments);return void 0!==t&&t.reset(e),i},e.shift=function(){const e=this.length>0,t=o.apply(this,arguments),i=this.$fastController;return void 0!==i&&e&&i.addSplice(Ie(0,[t],0)),t},e.sort=function(){let e;const t=this.$fastController;void 0!==t&&(t.flush(),e=this.slice());const i=n.apply(this,arguments);return void 0!==t&&t.reset(e),i},e.splice=function(){const e=r.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(Fe(Ie(+arguments[0],e,arguments.length>2?arguments.length-2:0),this)),e},e.unshift=function(){const e=a.apply(this,arguments),t=this.$fastController;return void 0!==t&&t.addSplice(Fe(Ie(0,[],arguments.length),this)),e}}class Me{constructor(e,t){this.target=e,this.propertyName=t}bind(e){e[this.propertyName]=this.target}unbind(){}}function Ve(e){return new k("fast-ref",Me,e)}function He(e,t){const i="function"==typeof t?t:()=>t;return(t,s)=>e(t,s)?i(t,s):null}const ze=Object.freeze({positioning:!1,recycle:!0});function Be(e,t,i,s){e.bind(t[i],s)}function Ne(e,t,i,s){const o=Object.create(s);o.index=i,o.length=t.length,e.bind(t[i],o)}class qe{constructor(e,t,i,s,o,n){this.location=e,this.itemsBinding=t,this.templateBinding=s,this.options=n,this.source=null,this.views=[],this.items=null,this.itemsObserver=null,this.originalContext=void 0,this.childContext=void 0,this.bindView=Be,this.itemsBindingObserver=b.binding(t,this,i),this.templateBindingObserver=b.binding(s,this,o),n.positioning&&(this.bindView=Ne)}bind(e,t){this.source=e,this.originalContext=t,this.childContext=Object.create(t),this.childContext.parent=e,this.childContext.parentContext=this.originalContext,this.items=this.itemsBindingObserver.observe(e,this.originalContext),this.template=this.templateBindingObserver.observe(e,this.originalContext),this.observeItems(!0),this.refreshAllViews()}unbind(){this.source=null,this.items=null,null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews(),this.itemsBindingObserver.disconnect(),this.templateBindingObserver.disconnect()}handleChange(e,t){e===this.itemsBinding?(this.items=this.itemsBindingObserver.observe(this.source,this.originalContext),this.observeItems(),this.refreshAllViews()):e===this.templateBinding?(this.template=this.templateBindingObserver.observe(this.source,this.originalContext),this.refreshAllViews(!0)):this.updateViews(t)}observeItems(e=!1){if(!this.items)return void(this.items=r);const t=this.itemsObserver,i=this.itemsObserver=b.getNotifier(this.items),s=t!==i;s&&null!==t&&t.unsubscribe(this),(s||e)&&i.subscribe(this)}updateViews(e){const t=this.childContext,i=this.views,s=this.bindView,o=this.items,n=this.template,r=this.options.recycle,a=[];let l=0,d=0;for(let h=0,c=e.length;h<c;++h){const c=e[h],u=c.removed;let p=0,m=c.index;const v=m+c.addedCount,f=i.splice(c.index,u.length),b=d=a.length+f.length;for(;m<v;++m){const e=i[m],h=e?e.firstChild:this.location;let c;r&&d>0?(p<=b&&f.length>0?(c=f[p],p++):(c=a[l],l++),d--):c=n.create(),i.splice(m,0,c),s(c,o,m,t),c.insertBefore(h)}f[p]&&a.push(...f.slice(p))}for(let e=l,t=a.length;e<t;++e)a[e].dispose();if(this.options.positioning)for(let e=0,t=i.length;e<t;++e){const s=i[e].context;s.length=t,s.index=e}}refreshAllViews(e=!1){const t=this.items,i=this.childContext,s=this.template,o=this.location,n=this.bindView;let r=t.length,a=this.views,l=a.length;if(0!==r&&!e&&this.options.recycle||(K.disposeContiguousBatch(a),l=0),0===l){this.views=a=new Array(r);for(let e=0;e<r;++e){const r=s.create();n(r,t,e,i),a[e]=r,r.insertBefore(o)}}else{let e=0;for(;e<r;++e)if(e<l){n(a[e],t,e,i)}else{const r=s.create();n(r,t,e,i),a.push(r),r.insertBefore(o)}const d=a.splice(e,l-e);for(e=0,r=d.length;e<r;++e)d[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,i=e.length;t<i;++t)e[t].unbind()}}class Ue extends ${constructor(e,t,i){super(),this.itemsBinding=e,this.templateBinding=t,this.options=i,this.createPlaceholder=m.createBlockPlaceholder,Pe(),this.isItemsBindingVolatile=b.isVolatileBinding(e),this.isTemplateBindingVolatile=b.isVolatileBinding(t)}createBehavior(e){return new qe(e,this.itemsBinding,this.isItemsBindingVolatile,this.templateBinding,this.isTemplateBindingVolatile,this.options)}}function je(e,t,i=ze){return new Ue(e,"function"==typeof t?t:()=>t,Object.assign(Object.assign({},ze),i))}function We(e){return e?function(t,i,s){return 1===t.nodeType&&t.matches(e)}:function(e,t,i){return 1===e.nodeType}}class Ke{constructor(e,t){this.target=e,this.options=t,this.source=null}bind(e){const t=this.options.property;this.shouldUpdate=b.getAccessors(e).some((e=>e.name===t)),this.source=e,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(r),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let e=this.getNodes();return void 0!==this.options.filter&&(e=e.filter(this.options.filter)),e}updateTarget(e){this.source[this.options.property]=e}}class Ge extends Ke{constructor(e,t){super(e,t)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}}function Ye(e){return"string"==typeof e&&(e={property:e}),new k("fast-slotted",Ge,e)}class Xe extends Ke{constructor(e,t){super(e,t),this.observer=null,t.childList=!0}observe(){null===this.observer&&(this.observer=new MutationObserver(this.handleEvent.bind(this))),this.observer.observe(this.target,this.options)}disconnect(){this.observer.disconnect()}getNodes(){return"subtree"in this.options?Array.from(this.target.querySelectorAll(this.options.selector)):Array.from(this.target.childNodes)}}function Qe(e){return"string"==typeof e&&(e={property:e}),new k("fast-children",Xe,e)}},812:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ARIAGlobalStatesAndProperties:()=>Re,Accordion:()=>Ee,AccordionExpandMode:()=>Oe,AccordionItem:()=>ce,Anchor:()=>De,AnchoredRegion:()=>qe,Avatar:()=>Ze,Badge:()=>et,BaseProgress:()=>Es,Breadcrumb:()=>ot,BreadcrumbItem:()=>it,Button:()=>mt,Calendar:()=>bt,CalendarTitleTemplate:()=>_t,Card:()=>Ft,CheckableFormAssociated:()=>ct,Checkbox:()=>Vt,Combobox:()=>Jt,ComboboxAutocomplete:()=>Zt,ComponentPresentation:()=>ne,Container:()=>C,ContainerConfiguration:()=>v,ContainerImpl:()=>W,DI:()=>y,DataGrid:()=>kt,DataGridCell:()=>$t,DataGridCellTypes:()=>yt,DataGridRow:()=>It,DataGridRowTypes:()=>Ct,DateFormatter:()=>ft,DefaultComponentPresentation:()=>re,DefaultResolver:()=>m,DelegatesARIAButton:()=>vt,DelegatesARIACombobox:()=>ei,DelegatesARIALink:()=>Ae,DelegatesARIAListbox:()=>Gt,DelegatesARIAListboxOption:()=>Wt,DelegatesARIASearch:()=>Us,DelegatesARIASelect:()=>Gs,DelegatesARIATextbox:()=>Is,DelegatesARIAToolbar:()=>Oo,DesignSystem:()=>Ei,DesignToken:()=>$i,Dialog:()=>Fi,Disclosure:()=>zi,Divider:()=>ji,DividerRole:()=>Ui,ElementDisambiguation:()=>Ii,FactoryImpl:()=>H,Flipper:()=>Gi,FlipperDirection:()=>Wi,FlyoutPosBottom:()=>We,FlyoutPosBottomFill:()=>Ye,FlyoutPosTallest:()=>Ke,FlyoutPosTallestFill:()=>Xe,FlyoutPosTop:()=>je,FlyoutPosTopFill:()=>Ge,FormAssociated:()=>ht,FoundationElement:()=>ae,FoundationElementRegistry:()=>de,GenerateHeaderOptions:()=>gt,HorizontalScroll:()=>Ms,Listbox:()=>Kt,ListboxElement:()=>Xi,ListboxOption:()=>jt,MatchMediaBehavior:()=>Mo,MatchMediaStyleSheetBehavior:()=>Vo,Menu:()=>gs,MenuItem:()=>fs,MenuItemRole:()=>ps,NumberField:()=>Ts,Picker:()=>ls,PickerList:()=>ts,PickerListItem:()=>ss,PickerMenu:()=>Zi,PickerMenuOption:()=>es,PropertyStyleSheetBehavior:()=>No,Radio:()=>Ps,RadioGroup:()=>Ds,Registration:()=>Y,ResolverBuilder:()=>u,ResolverImpl:()=>P,Search:()=>qs,Select:()=>Ks,SelectPosition:()=>Yt,ServiceLocator:()=>x,Skeleton:()=>Qs,Slider:()=>ro,SliderLabel:()=>to,SliderMode:()=>no,StartEnd:()=>o,Switch:()=>co,Tab:()=>vo,TabPanel:()=>po,Tabs:()=>go,TabsOrientation:()=>bo,TextArea:()=>$o,TextAreaResize:()=>yo,TextField:()=>$s,TextFieldType:()=>ws,Toolbar:()=>To,Tooltip:()=>Ro,TooltipPosition:()=>So,TreeItem:()=>Fo,TreeView:()=>Po,accordionItemTemplate:()=>d,accordionTemplate:()=>ue,all:()=>O,anchorTemplate:()=>Se,anchoredRegionTemplate:()=>Fe,applyMixins:()=>he,avatarTemplate:()=>Qe,badgeTemplate:()=>Je,breadcrumbItemTemplate:()=>tt,breadcrumbTemplate:()=>st,buttonTemplate:()=>nt,calendarCellTemplate:()=>Ot,calendarRowTemplate:()=>Et,calendarTemplate:()=>Dt,calendarWeekdayTemplate:()=>Tt,cardTemplate:()=>At,checkboxTemplate:()=>Lt,comboboxTemplate:()=>ti,composedContains:()=>ri,composedParent:()=>ni,darkModeStylesheetBehavior:()=>zo,dataGridCellTemplate:()=>oi,dataGridRowTemplate:()=>si,dataGridTemplate:()=>ii,dialogTemplate:()=>Di,disabledCursor:()=>qo,disclosureTemplate:()=>Hi,display:()=>jo,dividerTemplate:()=>Bi,endSlotTemplate:()=>n,endTemplate:()=>a,flipperTemplate:()=>Ki,focusVisible:()=>Wo,forcedColorsStylesheetBehavior:()=>Ho,getDirection:()=>Ne,hidden:()=>Uo,horizontalScrollTemplate:()=>Vs,ignore:()=>D,inject:()=>$,interactiveCalendarGridTemplate:()=>St,isListboxOption:()=>Ut,isTreeItemElement:()=>Ao,lazy:()=>S,lightModeStylesheetBehavior:()=>Bo,listboxOptionTemplate:()=>Yi,listboxTemplate:()=>Qi,menuItemTemplate:()=>vs,menuTemplate:()=>bs,newInstanceForScope:()=>A,newInstanceOf:()=>F,noninteractiveCalendarTemplate:()=>Rt,numberFieldTemplate:()=>ys,optional:()=>R,pickerListItemTemplate:()=>us,pickerListTemplate:()=>cs,pickerMenuOptionTemplate:()=>hs,pickerMenuTemplate:()=>ds,pickerTemplate:()=>os,progressRingTemplate:()=>Os,progressTemplate:()=>Ss,radioGroupTemplate:()=>Rs,radioTemplate:()=>As,reflectAttributes:()=>Vi,roleForMenuItem:()=>ms,searchTemplate:()=>zs,selectTemplate:()=>Ys,singleton:()=>T,skeletonTemplate:()=>Xs,sliderLabelTemplate:()=>Zs,sliderTemplate:()=>io,startSlotTemplate:()=>r,startTemplate:()=>l,supportsElementInternals:()=>lt,switchTemplate:()=>ao,tabPanelTemplate:()=>uo,tabTemplate:()=>mo,tabsTemplate:()=>fo,textAreaTemplate:()=>Co,textFieldTemplate:()=>Io,toolbarTemplate:()=>ko,tooltipTemplate:()=>Eo,transient:()=>k,treeItemTemplate:()=>Do,treeViewTemplate:()=>Lo,validateKey:()=>X,whitespaceFilter:()=>Hs});var s=i(147);class o{handleStartContentChange(){this.startContainer.classList.toggle("start",this.start.assignedNodes().length>0)}handleEndContentChange(){this.endContainer.classList.toggle("end",this.end.assignedNodes().length>0)}}const n=(e,t)=>s.html`
|
|
3
|
-
<span
|
|
4
|
-
part="end"
|
|
5
|
-
${(0,s.ref)("endContainer")}
|
|
6
|
-
class=${e=>t.end?"end":void 0}
|
|
7
|
-
>
|
|
8
|
-
<slot name="end" ${(0,s.ref)("end")} @slotchange="${e=>e.handleEndContentChange()}">
|
|
9
|
-
${t.end||""}
|
|
10
|
-
</slot>
|
|
11
|
-
</span>
|
|
12
|
-
`,r=(e,t)=>s.html`
|
|
13
|
-
<span
|
|
14
|
-
part="start"
|
|
15
|
-
${(0,s.ref)("startContainer")}
|
|
16
|
-
class="${e=>t.start?"start":void 0}"
|
|
17
|
-
>
|
|
18
|
-
<slot
|
|
19
|
-
name="start"
|
|
20
|
-
${(0,s.ref)("start")}
|
|
21
|
-
@slotchange="${e=>e.handleStartContentChange()}"
|
|
22
|
-
>
|
|
23
|
-
${t.start||""}
|
|
24
|
-
</slot>
|
|
25
|
-
</span>
|
|
26
|
-
`,a=s.html`
|
|
27
|
-
<span part="end" ${(0,s.ref)("endContainer")}>
|
|
28
|
-
<slot
|
|
29
|
-
name="end"
|
|
30
|
-
${(0,s.ref)("end")}
|
|
31
|
-
@slotchange="${e=>e.handleEndContentChange()}"
|
|
32
|
-
></slot>
|
|
33
|
-
</span>
|
|
34
|
-
`,l=s.html`
|
|
35
|
-
<span part="start" ${(0,s.ref)("startContainer")}>
|
|
36
|
-
<slot
|
|
37
|
-
name="start"
|
|
38
|
-
${(0,s.ref)("start")}
|
|
39
|
-
@slotchange="${e=>e.handleStartContentChange()}"
|
|
40
|
-
></slot>
|
|
41
|
-
</span>
|
|
42
|
-
`,d=(e,t)=>s.html`
|
|
43
|
-
<template class="${e=>e.expanded?"expanded":""}">
|
|
44
|
-
<div
|
|
45
|
-
class="heading"
|
|
46
|
-
part="heading"
|
|
47
|
-
role="heading"
|
|
48
|
-
aria-level="${e=>e.headinglevel}"
|
|
49
|
-
>
|
|
50
|
-
<button
|
|
51
|
-
class="button"
|
|
52
|
-
part="button"
|
|
53
|
-
${(0,s.ref)("expandbutton")}
|
|
54
|
-
aria-expanded="${e=>e.expanded}"
|
|
55
|
-
aria-controls="${e=>e.id}-panel"
|
|
56
|
-
id="${e=>e.id}"
|
|
57
|
-
@click="${(e,t)=>e.clickHandler(t.event)}"
|
|
58
|
-
>
|
|
59
|
-
<span class="heading-content" part="heading-content">
|
|
60
|
-
<slot name="heading"></slot>
|
|
61
|
-
</span>
|
|
62
|
-
</button>
|
|
63
|
-
${r(e,t)}
|
|
64
|
-
${n(e,t)}
|
|
65
|
-
<span class="icon" part="icon" aria-hidden="true">
|
|
66
|
-
<slot name="expanded-icon" part="expanded-icon">
|
|
67
|
-
${t.expandedIcon||""}
|
|
68
|
-
</slot>
|
|
69
|
-
<slot name="collapsed-icon" part="collapsed-icon">
|
|
70
|
-
${t.collapsedIcon||""}
|
|
71
|
-
</slot>
|
|
72
|
-
<span>
|
|
73
|
-
</div>
|
|
74
|
-
<div
|
|
75
|
-
class="region"
|
|
76
|
-
part="region"
|
|
77
|
-
id="${e=>e.id}-panel"
|
|
78
|
-
role="region"
|
|
79
|
-
aria-labelledby="${e=>e.id}"
|
|
80
|
-
>
|
|
81
|
-
<slot></slot>
|
|
82
|
-
</div>
|
|
83
|
-
</template>
|
|
84
|
-
`;var h=i(495);const c=new Map;"metadata"in Reflect||(Reflect.metadata=function(e,t){return function(i){Reflect.defineMetadata(e,t,i)}},Reflect.defineMetadata=function(e,t,i){let s=c.get(i);void 0===s&&c.set(i,s=new Map),s.set(e,t)},Reflect.getOwnMetadata=function(e,t){const i=c.get(t);if(void 0!==i)return i.get(e)});class u{constructor(e,t){this.container=e,this.key=t}instance(e){return this.registerResolver(0,e)}singleton(e){return this.registerResolver(1,e)}transient(e){return this.registerResolver(2,e)}callback(e){return this.registerResolver(3,e)}cachedCallback(e){return this.registerResolver(3,G(e))}aliasTo(e){return this.registerResolver(5,e)}registerResolver(e,t){const{container:i,key:s}=this;return this.container=this.key=void 0,i.registerResolver(s,new P(s,e,t))}}function p(e){const t=e.slice(),i=Object.keys(e),s=i.length;let o;for(let n=0;n<s;++n)o=i[n],ie(o)||(t[o]=e[o]);return t}const m=Object.freeze({none(e){throw Error(`${e.toString()} not registered, did you forget to add @singleton()?`)},singleton:e=>new P(e,1,e),transient:e=>new P(e,2,e)}),v=Object.freeze({default:Object.freeze({parentLocator:()=>null,responsibleForOwnerRequests:!1,defaultResolver:m.singleton})}),f=new Map;function b(e){return t=>Reflect.getOwnMetadata(e,t)}let g=null;const y=Object.freeze({createContainer:e=>new W(null,Object.assign({},v.default,e)),findResponsibleContainer(e){const t=e.$$container$$;return t&&t.responsibleForOwnerRequests?t:y.findParentContainer(e)},findParentContainer(e){const t=new CustomEvent(U,{bubbles:!0,composed:!0,cancelable:!0,detail:{container:void 0}});return e.dispatchEvent(t),t.detail.container||y.getOrCreateDOMContainer()},getOrCreateDOMContainer:(e,t)=>e?e.$$container$$||new W(e,Object.assign({},v.default,t,{parentLocator:y.findParentContainer})):g||(g=new W(null,Object.assign({},v.default,t,{parentLocator:()=>null}))),getDesignParamtypes:b("design:paramtypes"),getAnnotationParamtypes:b("di:paramtypes"),getOrCreateAnnotationParamTypes(e){let t=this.getAnnotationParamtypes(e);return void 0===t&&Reflect.defineMetadata("di:paramtypes",t=[],e),t},getDependencies(e){let t=f.get(e);if(void 0===t){const i=e.inject;if(void 0===i){const i=y.getDesignParamtypes(e),s=y.getAnnotationParamtypes(e);if(void 0===i)if(void 0===s){const i=Object.getPrototypeOf(e);t="function"==typeof i&&i!==Function.prototype?p(y.getDependencies(i)):[]}else t=p(s);else if(void 0===s)t=p(i);else{t=p(i);let e,o=s.length;for(let i=0;i<o;++i)e=s[i],void 0!==e&&(t[i]=e);const n=Object.keys(s);let r;o=n.length;for(let e=0;e<o;++e)r=n[e],ie(r)||(t[r]=s[r])}}else t=p(i);f.set(e,t)}return t},defineProperty(e,t,i,o=!1){const n=`$di_${t}`;Reflect.defineProperty(e,t,{get:function(){let e=this[n];if(void 0===e){const r=this instanceof HTMLElement?y.findResponsibleContainer(this):y.getOrCreateDOMContainer();if(e=r.get(i),this[n]=e,o&&this instanceof s.FASTElement){const s=this.$fastController,o=()=>{y.findResponsibleContainer(this).get(i)!==this[n]&&(this[n]=e,s.notify(t))};s.subscribe({handleChange:o},"isConnected")}}return e}})},createInterface(e,t){const i="function"==typeof e?e:t,s="string"==typeof e?e:e&&"friendlyName"in e&&e.friendlyName||Z,o="string"!=typeof e&&(e&&"respectConnection"in e&&e.respectConnection||!1),n=function(e,t,i){if(null==e||void 0!==new.target)throw new Error(`No registration for interface: '${n.friendlyName}'`);if(t)y.defineProperty(e,t,n,o);else{y.getOrCreateAnnotationParamTypes(e)[i]=n}};return n.$isInterface=!0,n.friendlyName=null==s?"(anonymous)":s,null!=i&&(n.register=function(e,t){return i(new u(e,null!=t?t:n))}),n.toString=function(){return`InterfaceSymbol<${n.friendlyName}>`},n},inject:(...e)=>function(t,i,s){if("number"==typeof s){const i=y.getOrCreateAnnotationParamTypes(t),o=e[0];void 0!==o&&(i[s]=o)}else if(i)y.defineProperty(t,i,e[0]);else{const i=s?y.getOrCreateAnnotationParamTypes(s.value):y.getOrCreateAnnotationParamTypes(t);let o;for(let t=0;t<e.length;++t)o=e[t],void 0!==o&&(i[t]=o)}},transient:e=>(e.register=function(t){return Y.transient(e,e).register(t)},e.registerInRequestor=!1,e),singleton:(e,t=_)=>(e.register=function(t){return Y.singleton(e,e).register(t)},e.registerInRequestor=t.scoped,e)}),C=y.createInterface("Container"),x=C;function w(e){return function(t){const i=function(e,t,s){y.inject(i)(e,t,s)};return i.$isResolver=!0,i.resolve=function(i,s){return e(t,i,s)},i}}const $=y.inject;function I(e){return y.transient(e)}function k(e){return null==e?I:I(e)}const _={scoped:!1};function T(e){return"function"==typeof e?y.singleton(e):function(t){return y.singleton(t,e)}}const O=(E=(e,t,i,s)=>i.getAll(e,s),function(e,t){t=!!t;const i=function(e,t,s){y.inject(i)(e,t,s)};return i.$isResolver=!0,i.resolve=function(i,s){return E(e,i,s,t)},i});var E;const S=w(((e,t,i)=>()=>i.get(e))),R=w(((e,t,i)=>i.has(e,!0)?i.get(e):void 0));function D(e,t,i){y.inject(D)(e,t,i)}D.$isResolver=!0,D.resolve=()=>{};const A=w(((e,t,i)=>{const s=L(e,t),o=new P(e,0,s);return i.registerResolver(e,o),s})),F=w(((e,t,i)=>L(e,t)));function L(e,t){return t.getFactory(e).construct(t)}class P{constructor(e,t,i){this.key=e,this.strategy=t,this.state=i,this.resolving=!1}get $isResolver(){return!0}register(e){return e.registerResolver(this.key,this)}resolve(e,t){switch(this.strategy){case 0:return this.state;case 1:if(this.resolving)throw new Error(`Cyclic dependency found: ${this.state.name}`);return this.resolving=!0,this.state=e.getFactory(this.state).construct(t),this.strategy=0,this.resolving=!1,this.state;case 2:{const i=e.getFactory(this.state);if(null===i)throw new Error(`Resolver for ${String(this.key)} returned a null factory`);return i.construct(t)}case 3:return this.state(e,t,this);case 4:return this.state[0].resolve(e,t);case 5:return t.get(this.state);default:throw new Error(`Invalid resolver strategy specified: ${this.strategy}.`)}}getFactory(e){var t,i,s;switch(this.strategy){case 1:case 2:return e.getFactory(this.state);case 5:return null!==(s=null===(i=null===(t=e.getResolver(this.state))||void 0===t?void 0:t.getFactory)||void 0===i?void 0:i.call(t,e))&&void 0!==s?s:null;default:return null}}}function M(e){return this.get(e)}function V(e,t){return t(e)}class H{constructor(e,t){this.Type=e,this.dependencies=t,this.transformers=null}construct(e,t){let i;return i=void 0===t?new this.Type(...this.dependencies.map(M,e)):new this.Type(...this.dependencies.map(M,e),...t),null==this.transformers?i:this.transformers.reduce(V,i)}registerTransformer(e){(this.transformers||(this.transformers=[])).push(e)}}const z={$isResolver:!0,resolve:(e,t)=>t};function B(e){return"function"==typeof e.register}function N(e){return function(e){return B(e)&&"boolean"==typeof e.registerInRequestor}(e)&&e.registerInRequestor}const q=new Set(["Array","ArrayBuffer","Boolean","DataView","Date","Error","EvalError","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Number","Object","Promise","RangeError","ReferenceError","RegExp","Set","SharedArrayBuffer","String","SyntaxError","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakSet"]),U="__DI_LOCATE_PARENT__",j=new Map;class W{constructor(e,t){this.owner=e,this.config=t,this._parent=void 0,this.registerDepth=0,this.context=null,null!==e&&(e.$$container$$=this),this.resolvers=new Map,this.resolvers.set(C,z),e instanceof Node&&e.addEventListener(U,(e=>{e.composedPath()[0]!==this.owner&&(e.detail.container=this,e.stopImmediatePropagation())}))}get parent(){return void 0===this._parent&&(this._parent=this.config.parentLocator(this.owner)),this._parent}get depth(){return null===this.parent?0:this.parent.depth+1}get responsibleForOwnerRequests(){return this.config.responsibleForOwnerRequests}registerWithContext(e,...t){return this.context=e,this.register(...t),this.context=null,this}register(...e){if(100==++this.registerDepth)throw new Error("Unable to autoregister dependency");let t,i,s,o,n;const r=this.context;for(let a=0,l=e.length;a<l;++a)if(t=e[a],J(t))if(B(t))t.register(this,r);else if(void 0!==t.prototype)Y.singleton(t,t).register(this);else for(i=Object.keys(t),o=0,n=i.length;o<n;++o)s=t[i[o]],J(s)&&(B(s)?s.register(this,r):this.register(s));return--this.registerDepth,this}registerResolver(e,t){X(e);const i=this.resolvers,s=i.get(e);return null==s?i.set(e,t):s instanceof P&&4===s.strategy?s.state.push(t):i.set(e,new P(e,4,[s,t])),t}registerTransformer(e,t){const i=this.getResolver(e);if(null==i)return!1;if(i.getFactory){const e=i.getFactory(this);return null!=e&&(e.registerTransformer(t),!0)}return!1}getResolver(e,t=!0){if(X(e),void 0!==e.resolve)return e;let i,s=this;for(;null!=s;){if(i=s.resolvers.get(e),null!=i)return i;if(null==s.parent){const i=N(e)?this:s;return t?this.jitRegister(e,i):null}s=s.parent}return null}has(e,t=!1){return!!this.resolvers.has(e)||!(!t||null==this.parent)&&this.parent.has(e,!0)}get(e){if(X(e),e.$isResolver)return e.resolve(this,this);let t,i=this;for(;null!=i;){if(t=i.resolvers.get(e),null!=t)return t.resolve(i,this);if(null==i.parent){const s=N(e)?this:i;return t=this.jitRegister(e,s),t.resolve(i,this)}i=i.parent}throw new Error(`Unable to resolve key: ${e}`)}getAll(e,t=!1){X(e);const i=this;let o,n=i;if(t){let t=s.emptyArray;for(;null!=n;)o=n.resolvers.get(e),null!=o&&(t=t.concat(Q(o,n,i))),n=n.parent;return t}for(;null!=n;){if(o=n.resolvers.get(e),null!=o)return Q(o,n,i);if(n=n.parent,null==n)return s.emptyArray}return s.emptyArray}getFactory(e){let t=j.get(e);if(void 0===t){if(ee(e))throw new Error(`${e.name} is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.`);j.set(e,t=new H(e,y.getDependencies(e)))}return t}registerFactory(e,t){j.set(e,t)}createChild(e){return new W(null,Object.assign({},this.config,e,{parentLocator:()=>this}))}jitRegister(e,t){if("function"!=typeof e)throw new Error(`Attempted to jitRegister something that is not a constructor: '${e}'. Did you forget to register this dependency?`);if(q.has(e.name))throw new Error(`Attempted to jitRegister an intrinsic type: ${e.name}. Did you forget to add @inject(Key)`);if(B(e)){const i=e.register(t);if(!(i instanceof Object)||null==i.resolve){const i=t.resolvers.get(e);if(null!=i)return i;throw new Error("A valid resolver was not returned from the static register method")}return i}if(e.$isInterface)throw new Error(`Attempted to jitRegister an interface: ${e.friendlyName}`);{const i=this.config.defaultResolver(e,t);return t.resolvers.set(e,i),i}}}const K=new WeakMap;function G(e){return function(t,i,s){if(K.has(s))return K.get(s);const o=e(t,i,s);return K.set(s,o),o}}const Y=Object.freeze({instance:(e,t)=>new P(e,0,t),singleton:(e,t)=>new P(e,1,t),transient:(e,t)=>new P(e,2,t),callback:(e,t)=>new P(e,3,t),cachedCallback:(e,t)=>new P(e,3,G(t)),aliasTo:(e,t)=>new P(t,5,e)});function X(e){if(null==e)throw new Error("key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?")}function Q(e,t,i){if(e instanceof P&&4===e.strategy){const s=e.state;let o=s.length;const n=new Array(o);for(;o--;)n[o]=s[o].resolve(t,i);return n}return[e.resolve(t,i)]}const Z="(anonymous)";function J(e){return"object"==typeof e&&null!==e||"function"==typeof e}const ee=function(){const e=new WeakMap;let t=!1,i="",s=0;return function(o){return t=e.get(o),void 0===t&&(i=o.toString(),s=i.length,t=s>=29&&s<=100&&125===i.charCodeAt(s-1)&&i.charCodeAt(s-2)<=32&&93===i.charCodeAt(s-3)&&101===i.charCodeAt(s-4)&&100===i.charCodeAt(s-5)&&111===i.charCodeAt(s-6)&&99===i.charCodeAt(s-7)&&32===i.charCodeAt(s-8)&&101===i.charCodeAt(s-9)&&118===i.charCodeAt(s-10)&&105===i.charCodeAt(s-11)&&116===i.charCodeAt(s-12)&&97===i.charCodeAt(s-13)&&110===i.charCodeAt(s-14)&&88===i.charCodeAt(s-15),e.set(o,t)),t}}(),te={};function ie(e){switch(typeof e){case"number":return e>=0&&(0|e)===e;case"string":{const t=te[e];if(void 0!==t)return t;const i=e.length;if(0===i)return te[e]=!1;let s=0;for(let t=0;t<i;++t)if(s=e.charCodeAt(t),0===t&&48===s&&i>1||s<48||s>57)return te[e]=!1;return te[e]=!0}default:return!1}}function se(e){return`${e.toLowerCase()}:presentation`}const oe=new Map,ne=Object.freeze({define(e,t,i){const s=se(e);void 0===oe.get(s)?oe.set(s,t):oe.set(s,!1),i.register(Y.instance(s,t))},forTag(e,t){const i=se(e),s=oe.get(i);if(!1===s){return y.findResponsibleContainer(t).get(i)}return s||null}});class re{constructor(e,t){this.template=e||null,this.styles=void 0===t?null:Array.isArray(t)?s.ElementStyles.create(t):t instanceof s.ElementStyles?t:s.ElementStyles.create([t])}applyTo(e){const t=e.$fastController;null===t.template&&(t.template=this.template),null===t.styles&&(t.styles=this.styles)}}class ae extends s.FASTElement{constructor(){super(...arguments),this._presentation=void 0}get $presentation(){return void 0===this._presentation&&(this._presentation=ne.forTag(this.tagName,this)),this._presentation}templateChanged(){void 0!==this.template&&(this.$fastController.template=this.template)}stylesChanged(){void 0!==this.styles&&(this.$fastController.styles=this.styles)}connectedCallback(){null!==this.$presentation&&this.$presentation.applyTo(this),super.connectedCallback()}static compose(e){return(t={})=>new de(this===ae?class extends ae{}:this,e,t)}}function le(e,t,i){return"function"==typeof e?e(t,i):e}(0,h.__decorate)([s.observable],ae.prototype,"template",void 0),(0,h.__decorate)([s.observable],ae.prototype,"styles",void 0);class de{constructor(e,t,i){this.type=e,this.elementDefinition=t,this.overrideDefinition=i,this.definition=Object.assign(Object.assign({},this.elementDefinition),this.overrideDefinition)}register(e,t){const i=this.definition,s=this.overrideDefinition,o=`${i.prefix||t.elementPrefix}-${i.baseName}`;t.tryDefineElement({name:o,type:this.type,baseClass:this.elementDefinition.baseClass,callback:e=>{const t=new re(le(i.template,e,i),le(i.styles,e,i));e.definePresentation(t);let o=le(i.shadowOptions,e,i);e.shadowRootMode&&(o?s.shadowOptions||(o.mode=e.shadowRootMode):null!==o&&(o={mode:e.shadowRootMode})),e.defineElement({elementOptions:le(i.elementOptions,e,i),shadowOptions:o,attributes:le(i.attributes,e,i)})}})}}function he(e,...t){const i=s.AttributeConfiguration.locate(e);t.forEach((t=>{Object.getOwnPropertyNames(t.prototype).forEach((i=>{"constructor"!==i&&Object.defineProperty(e.prototype,i,Object.getOwnPropertyDescriptor(t.prototype,i))}));s.AttributeConfiguration.locate(t).forEach((e=>i.push(e)))}))}class ce extends ae{constructor(){super(...arguments),this.headinglevel=2,this.expanded=!1,this.clickHandler=e=>{this.expanded=!this.expanded,this.change()},this.change=()=>{this.$emit("change")}}}(0,h.__decorate)([(0,s.attr)({attribute:"heading-level",mode:"fromView",converter:s.nullableNumberConverter})],ce.prototype,"headinglevel",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],ce.prototype,"expanded",void 0),(0,h.__decorate)([s.attr],ce.prototype,"id",void 0),he(ce,o);const ue=(e,t)=>s.html`
|
|
85
|
-
<template>
|
|
86
|
-
<slot ${(0,s.slotted)({property:"accordionItems",filter:(0,s.elements)()})}></slot>
|
|
87
|
-
<slot name="item" part="item" ${(0,s.slotted)("accordionItems")}></slot>
|
|
88
|
-
</template>
|
|
89
|
-
`;var pe;!function(e){e[e.alt=18]="alt",e[e.arrowDown=40]="arrowDown",e[e.arrowLeft=37]="arrowLeft",e[e.arrowRight=39]="arrowRight",e[e.arrowUp=38]="arrowUp",e[e.back=8]="back",e[e.backSlash=220]="backSlash",e[e.break=19]="break",e[e.capsLock=20]="capsLock",e[e.closeBracket=221]="closeBracket",e[e.colon=186]="colon",e[e.colon2=59]="colon2",e[e.comma=188]="comma",e[e.ctrl=17]="ctrl",e[e.delete=46]="delete",e[e.end=35]="end",e[e.enter=13]="enter",e[e.equals=187]="equals",e[e.equals2=61]="equals2",e[e.equals3=107]="equals3",e[e.escape=27]="escape",e[e.forwardSlash=191]="forwardSlash",e[e.function1=112]="function1",e[e.function10=121]="function10",e[e.function11=122]="function11",e[e.function12=123]="function12",e[e.function2=113]="function2",e[e.function3=114]="function3",e[e.function4=115]="function4",e[e.function5=116]="function5",e[e.function6=117]="function6",e[e.function7=118]="function7",e[e.function8=119]="function8",e[e.function9=120]="function9",e[e.home=36]="home",e[e.insert=45]="insert",e[e.menu=93]="menu",e[e.minus=189]="minus",e[e.minus2=109]="minus2",e[e.numLock=144]="numLock",e[e.numPad0=96]="numPad0",e[e.numPad1=97]="numPad1",e[e.numPad2=98]="numPad2",e[e.numPad3=99]="numPad3",e[e.numPad4=100]="numPad4",e[e.numPad5=101]="numPad5",e[e.numPad6=102]="numPad6",e[e.numPad7=103]="numPad7",e[e.numPad8=104]="numPad8",e[e.numPad9=105]="numPad9",e[e.numPadDivide=111]="numPadDivide",e[e.numPadDot=110]="numPadDot",e[e.numPadMinus=109]="numPadMinus",e[e.numPadMultiply=106]="numPadMultiply",e[e.numPadPlus=107]="numPadPlus",e[e.openBracket=219]="openBracket",e[e.pageDown=34]="pageDown",e[e.pageUp=33]="pageUp",e[e.period=190]="period",e[e.print=44]="print",e[e.quote=222]="quote",e[e.scrollLock=145]="scrollLock",e[e.shift=16]="shift",e[e.space=32]="space",e[e.tab=9]="tab",e[e.tilde=192]="tilde",e[e.windowsLeft=91]="windowsLeft",e[e.windowsOpera=219]="windowsOpera",e[e.windowsRight=92]="windowsRight"}(pe||(pe={}));const me="ArrowDown",ve="ArrowLeft",fe="ArrowRight",be="ArrowUp",ge="Enter",ye="Escape",Ce="Home",xe="End",we=" ",$e="Tab",Ie={ArrowDown:me,ArrowLeft:ve,ArrowRight:fe,ArrowUp:be};function ke(e,t,i){return i<e?t:i>t?e:i}function _e(e,t,i){return Math.min(Math.max(i,e),t)}function Te(e,t,i=0){return[t,i]=[t,i].sort(((e,t)=>e-t)),t<=e&&e<i}const Oe={single:"single",multi:"multi"};class Ee extends ae{constructor(){super(...arguments),this.expandmode=Oe.multi,this.activeItemIndex=0,this.change=()=>{this.$emit("change",this.activeid)},this.setItems=()=>{var e;if(0!==this.accordionItems.length&&(this.accordionIds=this.getItemIds(),this.accordionItems.forEach(((e,t)=>{e instanceof ce&&(e.addEventListener("change",this.activeItemChange),this.isSingleExpandMode()&&(this.activeItemIndex!==t?e.expanded=!1:e.expanded=!0));const i=this.accordionIds[t];e.setAttribute("id","string"!=typeof i?`accordion-${t+1}`:i),this.activeid=this.accordionIds[this.activeItemIndex],e.addEventListener("keydown",this.handleItemKeyDown),e.addEventListener("focus",this.handleItemFocus)})),this.isSingleExpandMode())){(null!==(e=this.findExpandedItem())&&void 0!==e?e:this.accordionItems[0]).setAttribute("aria-disabled","true")}},this.removeItemListeners=e=>{e.forEach(((e,t)=>{e.removeEventListener("change",this.activeItemChange),e.removeEventListener("keydown",this.handleItemKeyDown),e.removeEventListener("focus",this.handleItemFocus)}))},this.activeItemChange=e=>{if(e.defaultPrevented||e.target!==e.currentTarget)return;e.preventDefault();const t=e.target;this.activeid=t.getAttribute("id"),this.isSingleExpandMode()&&(this.resetItems(),t.expanded=!0,t.setAttribute("aria-disabled","true"),this.accordionItems.forEach((e=>{e.hasAttribute("disabled")||e.id===this.activeid||e.removeAttribute("aria-disabled")}))),this.activeItemIndex=Array.from(this.accordionItems).indexOf(t),this.change()},this.handleItemKeyDown=e=>{if(e.target===e.currentTarget)switch(this.accordionIds=this.getItemIds(),e.key){case be:e.preventDefault(),this.adjust(-1);break;case me:e.preventDefault(),this.adjust(1);break;case Ce:this.activeItemIndex=0,this.focusItem();break;case xe:this.activeItemIndex=this.accordionItems.length-1,this.focusItem()}},this.handleItemFocus=e=>{if(e.target===e.currentTarget){const t=e.target,i=this.activeItemIndex=Array.from(this.accordionItems).indexOf(t);this.activeItemIndex!==i&&-1!==i&&(this.activeItemIndex=i,this.activeid=this.accordionIds[this.activeItemIndex])}}}accordionItemsChanged(e,t){this.$fastController.isConnected&&(this.removeItemListeners(e),this.setItems())}findExpandedItem(){for(let e=0;e<this.accordionItems.length;e++)if("true"===this.accordionItems[e].getAttribute("expanded"))return this.accordionItems[e];return null}resetItems(){this.accordionItems.forEach(((e,t)=>{e.expanded=!1}))}getItemIds(){return this.accordionItems.map((e=>e.getAttribute("id")))}isSingleExpandMode(){return this.expandmode===Oe.single}adjust(e){this.activeItemIndex=ke(0,this.accordionItems.length-1,this.activeItemIndex+e),this.focusItem()}focusItem(){const e=this.accordionItems[this.activeItemIndex];e instanceof ce&&e.expandbutton.focus()}}(0,h.__decorate)([(0,s.attr)({attribute:"expand-mode"})],Ee.prototype,"expandmode",void 0),(0,h.__decorate)([s.observable],Ee.prototype,"accordionItems",void 0);const Se=(e,t)=>s.html`
|
|
90
|
-
<a
|
|
91
|
-
class="control"
|
|
92
|
-
part="control"
|
|
93
|
-
download="${e=>e.download}"
|
|
94
|
-
href="${e=>e.href}"
|
|
95
|
-
hreflang="${e=>e.hreflang}"
|
|
96
|
-
ping="${e=>e.ping}"
|
|
97
|
-
referrerpolicy="${e=>e.referrerpolicy}"
|
|
98
|
-
rel="${e=>e.rel}"
|
|
99
|
-
target="${e=>e.target}"
|
|
100
|
-
type="${e=>e.type}"
|
|
101
|
-
aria-atomic="${e=>e.ariaAtomic}"
|
|
102
|
-
aria-busy="${e=>e.ariaBusy}"
|
|
103
|
-
aria-controls="${e=>e.ariaControls}"
|
|
104
|
-
aria-current="${e=>e.ariaCurrent}"
|
|
105
|
-
aria-describedby="${e=>e.ariaDescribedby}"
|
|
106
|
-
aria-details="${e=>e.ariaDetails}"
|
|
107
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
108
|
-
aria-errormessage="${e=>e.ariaErrormessage}"
|
|
109
|
-
aria-expanded="${e=>e.ariaExpanded}"
|
|
110
|
-
aria-flowto="${e=>e.ariaFlowto}"
|
|
111
|
-
aria-haspopup="${e=>e.ariaHaspopup}"
|
|
112
|
-
aria-hidden="${e=>e.ariaHidden}"
|
|
113
|
-
aria-invalid="${e=>e.ariaInvalid}"
|
|
114
|
-
aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
|
|
115
|
-
aria-label="${e=>e.ariaLabel}"
|
|
116
|
-
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
117
|
-
aria-live="${e=>e.ariaLive}"
|
|
118
|
-
aria-owns="${e=>e.ariaOwns}"
|
|
119
|
-
aria-relevant="${e=>e.ariaRelevant}"
|
|
120
|
-
aria-roledescription="${e=>e.ariaRoledescription}"
|
|
121
|
-
${(0,s.ref)("control")}
|
|
122
|
-
>
|
|
123
|
-
${r(e,t)}
|
|
124
|
-
<span class="content" part="content">
|
|
125
|
-
<slot ${(0,s.slotted)("defaultSlottedContent")}></slot>
|
|
126
|
-
</span>
|
|
127
|
-
${n(e,t)}
|
|
128
|
-
</a>
|
|
129
|
-
`;class Re{}(0,h.__decorate)([(0,s.attr)({attribute:"aria-atomic"})],Re.prototype,"ariaAtomic",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-busy"})],Re.prototype,"ariaBusy",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-controls"})],Re.prototype,"ariaControls",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-current"})],Re.prototype,"ariaCurrent",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-describedby"})],Re.prototype,"ariaDescribedby",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-details"})],Re.prototype,"ariaDetails",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-disabled"})],Re.prototype,"ariaDisabled",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-errormessage"})],Re.prototype,"ariaErrormessage",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-flowto"})],Re.prototype,"ariaFlowto",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-haspopup"})],Re.prototype,"ariaHaspopup",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-hidden"})],Re.prototype,"ariaHidden",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-invalid"})],Re.prototype,"ariaInvalid",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-keyshortcuts"})],Re.prototype,"ariaKeyshortcuts",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-label"})],Re.prototype,"ariaLabel",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-labelledby"})],Re.prototype,"ariaLabelledby",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-live"})],Re.prototype,"ariaLive",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-owns"})],Re.prototype,"ariaOwns",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-relevant"})],Re.prototype,"ariaRelevant",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-roledescription"})],Re.prototype,"ariaRoledescription",void 0);class De extends ae{constructor(){super(...arguments),this.handleUnsupportedDelegatesFocus=()=>{var e;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(null===(e=this.$fastController.definition.shadowOptions)||void 0===e?void 0:e.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}connectedCallback(){super.connectedCallback(),this.handleUnsupportedDelegatesFocus()}}(0,h.__decorate)([s.attr],De.prototype,"download",void 0),(0,h.__decorate)([s.attr],De.prototype,"href",void 0),(0,h.__decorate)([s.attr],De.prototype,"hreflang",void 0),(0,h.__decorate)([s.attr],De.prototype,"ping",void 0),(0,h.__decorate)([s.attr],De.prototype,"referrerpolicy",void 0),(0,h.__decorate)([s.attr],De.prototype,"rel",void 0),(0,h.__decorate)([s.attr],De.prototype,"target",void 0),(0,h.__decorate)([s.attr],De.prototype,"type",void 0),(0,h.__decorate)([s.observable],De.prototype,"defaultSlottedContent",void 0);class Ae{}(0,h.__decorate)([(0,s.attr)({attribute:"aria-expanded"})],Ae.prototype,"ariaExpanded",void 0),he(Ae,Re),he(De,o,Ae);const Fe=(e,t)=>s.html`
|
|
130
|
-
<template class="${e=>e.initialLayoutComplete?"loaded":""}">
|
|
131
|
-
${(0,s.when)((e=>e.initialLayoutComplete),s.html`
|
|
132
|
-
<slot></slot>
|
|
133
|
-
`)}
|
|
134
|
-
</template>
|
|
135
|
-
`;var Le;!function(e){e.ltr="ltr",e.rtl="rtl"}(Le||(Le={}));const Pe="focus",Me="focusin",Ve="focusout",He="keydown",ze="resize",Be="scroll",Ne=e=>{const t=e.closest("[dir]");return null!==t&&"rtl"===t.dir?Le.rtl:Le.ltr};class qe extends ae{constructor(){super(...arguments),this.anchor="",this.viewport="",this.horizontalPositioningMode="uncontrolled",this.horizontalDefaultPosition="unset",this.horizontalViewportLock=!1,this.horizontalInset=!1,this.horizontalScaling="content",this.verticalPositioningMode="uncontrolled",this.verticalDefaultPosition="unset",this.verticalViewportLock=!1,this.verticalInset=!1,this.verticalScaling="content",this.fixedPlacement=!1,this.autoUpdateMode="anchor",this.anchorElement=null,this.viewportElement=null,this.initialLayoutComplete=!1,this.resizeDetector=null,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.pendingPositioningUpdate=!1,this.pendingReset=!1,this.currentDirection=Le.ltr,this.regionVisible=!1,this.forceUpdate=!1,this.updateThreshold=.5,this.update=()=>{this.pendingPositioningUpdate||this.requestPositionUpdates()},this.startObservers=()=>{this.stopObservers(),null!==this.anchorElement&&(this.requestPositionUpdates(),null!==this.resizeDetector&&(this.resizeDetector.observe(this.anchorElement),this.resizeDetector.observe(this)))},this.requestPositionUpdates=()=>{null===this.anchorElement||this.pendingPositioningUpdate||(qe.intersectionService.requestPosition(this,this.handleIntersection),qe.intersectionService.requestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&qe.intersectionService.requestPosition(this.viewportElement,this.handleIntersection),this.pendingPositioningUpdate=!0)},this.stopObservers=()=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,qe.intersectionService.cancelRequestPosition(this,this.handleIntersection),null!==this.anchorElement&&qe.intersectionService.cancelRequestPosition(this.anchorElement,this.handleIntersection),null!==this.viewportElement&&qe.intersectionService.cancelRequestPosition(this.viewportElement,this.handleIntersection)),null!==this.resizeDetector&&this.resizeDetector.disconnect()},this.getViewport=()=>"string"!=typeof this.viewport||""===this.viewport?document.documentElement:document.getElementById(this.viewport),this.getAnchor=()=>document.getElementById(this.anchor),this.handleIntersection=e=>{this.pendingPositioningUpdate&&(this.pendingPositioningUpdate=!1,this.applyIntersectionEntries(e)&&this.updateLayout())},this.applyIntersectionEntries=e=>{const t=e.find((e=>e.target===this)),i=e.find((e=>e.target===this.anchorElement)),s=e.find((e=>e.target===this.viewportElement));return void 0!==t&&void 0!==s&&void 0!==i&&(!!(!this.regionVisible||this.forceUpdate||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect||this.isRectDifferent(this.anchorRect,i.boundingClientRect)||this.isRectDifferent(this.viewportRect,s.boundingClientRect)||this.isRectDifferent(this.regionRect,t.boundingClientRect))&&(this.regionRect=t.boundingClientRect,this.anchorRect=i.boundingClientRect,this.viewportElement===document.documentElement?this.viewportRect=new DOMRectReadOnly(s.boundingClientRect.x+document.documentElement.scrollLeft,s.boundingClientRect.y+document.documentElement.scrollTop,s.boundingClientRect.width,s.boundingClientRect.height):this.viewportRect=s.boundingClientRect,this.updateRegionOffset(),this.forceUpdate=!1,!0))},this.updateRegionOffset=()=>{this.anchorRect&&this.regionRect&&(this.baseHorizontalOffset=this.baseHorizontalOffset+(this.anchorRect.left-this.regionRect.left)+(this.translateX-this.baseHorizontalOffset),this.baseVerticalOffset=this.baseVerticalOffset+(this.anchorRect.top-this.regionRect.top)+(this.translateY-this.baseVerticalOffset))},this.isRectDifferent=(e,t)=>Math.abs(e.top-t.top)>this.updateThreshold||Math.abs(e.right-t.right)>this.updateThreshold||Math.abs(e.bottom-t.bottom)>this.updateThreshold||Math.abs(e.left-t.left)>this.updateThreshold,this.handleResize=e=>{this.update()},this.reset=()=>{this.pendingReset&&(this.pendingReset=!1,null===this.anchorElement&&(this.anchorElement=this.getAnchor()),null===this.viewportElement&&(this.viewportElement=this.getViewport()),this.currentDirection=Ne(this),this.startObservers())},this.updateLayout=()=>{let e,t;if("uncontrolled"!==this.horizontalPositioningMode){const e=this.getPositioningOptions(this.horizontalInset);if("center"===this.horizontalDefaultPosition)t="center";else if("unset"!==this.horizontalDefaultPosition){let e=this.horizontalDefaultPosition;if("start"===e||"end"===e){const t=Ne(this);if(t!==this.currentDirection)return this.currentDirection=t,void this.initialize();e=this.currentDirection===Le.ltr?"start"===e?"left":"right":"start"===e?"right":"left"}switch(e){case"left":t=this.horizontalInset?"insetStart":"start";break;case"right":t=this.horizontalInset?"insetEnd":"end"}}const i=void 0!==this.horizontalThreshold?this.horizontalThreshold:void 0!==this.regionRect?this.regionRect.width:0,s=void 0!==this.anchorRect?this.anchorRect.left:0,o=void 0!==this.anchorRect?this.anchorRect.right:0,n=void 0!==this.anchorRect?this.anchorRect.width:0,r=void 0!==this.viewportRect?this.viewportRect.left:0,a=void 0!==this.viewportRect?this.viewportRect.right:0;(void 0===t||"locktodefault"!==this.horizontalPositioningMode&&this.getAvailableSpace(t,s,o,n,r,a)<i)&&(t=this.getAvailableSpace(e[0],s,o,n,r,a)>this.getAvailableSpace(e[1],s,o,n,r,a)?e[0]:e[1])}if("uncontrolled"!==this.verticalPositioningMode){const t=this.getPositioningOptions(this.verticalInset);if("center"===this.verticalDefaultPosition)e="center";else if("unset"!==this.verticalDefaultPosition)switch(this.verticalDefaultPosition){case"top":e=this.verticalInset?"insetStart":"start";break;case"bottom":e=this.verticalInset?"insetEnd":"end"}const i=void 0!==this.verticalThreshold?this.verticalThreshold:void 0!==this.regionRect?this.regionRect.height:0,s=void 0!==this.anchorRect?this.anchorRect.top:0,o=void 0!==this.anchorRect?this.anchorRect.bottom:0,n=void 0!==this.anchorRect?this.anchorRect.height:0,r=void 0!==this.viewportRect?this.viewportRect.top:0,a=void 0!==this.viewportRect?this.viewportRect.bottom:0;(void 0===e||"locktodefault"!==this.verticalPositioningMode&&this.getAvailableSpace(e,s,o,n,r,a)<i)&&(e=this.getAvailableSpace(t[0],s,o,n,r,a)>this.getAvailableSpace(t[1],s,o,n,r,a)?t[0]:t[1])}const i=this.getNextRegionDimension(t,e),s=this.horizontalPosition!==t||this.verticalPosition!==e;if(this.setHorizontalPosition(t,i),this.setVerticalPosition(e,i),this.updateRegionStyle(),!this.initialLayoutComplete)return this.initialLayoutComplete=!0,void this.requestPositionUpdates();this.regionVisible||(this.regionVisible=!0,this.style.removeProperty("pointer-events"),this.style.removeProperty("opacity"),this.classList.toggle("loaded",!0),this.$emit("loaded",this,{bubbles:!1})),this.updatePositionClasses(),s&&this.$emit("positionchange",this,{bubbles:!1})},this.updateRegionStyle=()=>{this.style.width=this.regionWidth,this.style.height=this.regionHeight,this.style.transform=`translate(${this.translateX}px, ${this.translateY}px)`},this.updatePositionClasses=()=>{this.classList.toggle("top","start"===this.verticalPosition),this.classList.toggle("bottom","end"===this.verticalPosition),this.classList.toggle("inset-top","insetStart"===this.verticalPosition),this.classList.toggle("inset-bottom","insetEnd"===this.verticalPosition),this.classList.toggle("vertical-center","center"===this.verticalPosition),this.classList.toggle("left","start"===this.horizontalPosition),this.classList.toggle("right","end"===this.horizontalPosition),this.classList.toggle("inset-left","insetStart"===this.horizontalPosition),this.classList.toggle("inset-right","insetEnd"===this.horizontalPosition),this.classList.toggle("horizontal-center","center"===this.horizontalPosition)},this.setHorizontalPosition=(e,t)=>{if(void 0===e||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.horizontalScaling){case"anchor":case"fill":i=this.horizontalViewportLock?this.viewportRect.width:t.width,this.regionWidth=`${i}px`;break;case"content":i=this.regionRect.width,this.regionWidth="unset"}let s=0;switch(e){case"start":this.translateX=this.baseHorizontalOffset-i,this.horizontalViewportLock&&this.anchorRect.left>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.left-this.viewportRect.right));break;case"insetStart":this.translateX=this.baseHorizontalOffset-i+this.anchorRect.width,this.horizontalViewportLock&&this.anchorRect.right>this.viewportRect.right&&(this.translateX=this.translateX-(this.anchorRect.right-this.viewportRect.right));break;case"insetEnd":this.translateX=this.baseHorizontalOffset,this.horizontalViewportLock&&this.anchorRect.left<this.viewportRect.left&&(this.translateX=this.translateX-(this.anchorRect.left-this.viewportRect.left));break;case"end":this.translateX=this.baseHorizontalOffset+this.anchorRect.width,this.horizontalViewportLock&&this.anchorRect.right<this.viewportRect.left&&(this.translateX=this.translateX-(this.anchorRect.right-this.viewportRect.left));break;case"center":if(s=(this.anchorRect.width-i)/2,this.translateX=this.baseHorizontalOffset+s,this.horizontalViewportLock){const e=this.anchorRect.left+s,t=this.anchorRect.right-s;e<this.viewportRect.left&&!(t>this.viewportRect.right)?this.translateX=this.translateX-(e-this.viewportRect.left):t>this.viewportRect.right&&!(e<this.viewportRect.left)&&(this.translateX=this.translateX-(t-this.viewportRect.right))}}this.horizontalPosition=e},this.setVerticalPosition=(e,t)=>{if(void 0===e||void 0===this.regionRect||void 0===this.anchorRect||void 0===this.viewportRect)return;let i=0;switch(this.verticalScaling){case"anchor":case"fill":i=this.verticalViewportLock?this.viewportRect.height:t.height,this.regionHeight=`${i}px`;break;case"content":i=this.regionRect.height,this.regionHeight="unset"}let s=0;switch(e){case"start":this.translateY=this.baseVerticalOffset-i,this.verticalViewportLock&&this.anchorRect.top>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.top-this.viewportRect.bottom));break;case"insetStart":this.translateY=this.baseVerticalOffset-i+this.anchorRect.height,this.verticalViewportLock&&this.anchorRect.bottom>this.viewportRect.bottom&&(this.translateY=this.translateY-(this.anchorRect.bottom-this.viewportRect.bottom));break;case"insetEnd":this.translateY=this.baseVerticalOffset,this.verticalViewportLock&&this.anchorRect.top<this.viewportRect.top&&(this.translateY=this.translateY-(this.anchorRect.top-this.viewportRect.top));break;case"end":this.translateY=this.baseVerticalOffset+this.anchorRect.height,this.verticalViewportLock&&this.anchorRect.bottom<this.viewportRect.top&&(this.translateY=this.translateY-(this.anchorRect.bottom-this.viewportRect.top));break;case"center":if(s=(this.anchorRect.height-i)/2,this.translateY=this.baseVerticalOffset+s,this.verticalViewportLock){const e=this.anchorRect.top+s,t=this.anchorRect.bottom-s;e<this.viewportRect.top&&!(t>this.viewportRect.bottom)?this.translateY=this.translateY-(e-this.viewportRect.top):t>this.viewportRect.bottom&&!(e<this.viewportRect.top)&&(this.translateY=this.translateY-(t-this.viewportRect.bottom))}}this.verticalPosition=e},this.getPositioningOptions=e=>e?["insetStart","insetEnd"]:["start","end"],this.getAvailableSpace=(e,t,i,s,o,n)=>{const r=t-o,a=n-(t+s);switch(e){case"start":return r;case"insetStart":return r+s;case"insetEnd":return a+s;case"end":return a;case"center":return 2*Math.min(r,a)+s}},this.getNextRegionDimension=(e,t)=>{const i={height:void 0!==this.regionRect?this.regionRect.height:0,width:void 0!==this.regionRect?this.regionRect.width:0};return void 0!==e&&"fill"===this.horizontalScaling?i.width=this.getAvailableSpace(e,void 0!==this.anchorRect?this.anchorRect.left:0,void 0!==this.anchorRect?this.anchorRect.right:0,void 0!==this.anchorRect?this.anchorRect.width:0,void 0!==this.viewportRect?this.viewportRect.left:0,void 0!==this.viewportRect?this.viewportRect.right:0):"anchor"===this.horizontalScaling&&(i.width=void 0!==this.anchorRect?this.anchorRect.width:0),void 0!==t&&"fill"===this.verticalScaling?i.height=this.getAvailableSpace(t,void 0!==this.anchorRect?this.anchorRect.top:0,void 0!==this.anchorRect?this.anchorRect.bottom:0,void 0!==this.anchorRect?this.anchorRect.height:0,void 0!==this.viewportRect?this.viewportRect.top:0,void 0!==this.viewportRect?this.viewportRect.bottom:0):"anchor"===this.verticalScaling&&(i.height=void 0!==this.anchorRect?this.anchorRect.height:0),i},this.startAutoUpdateEventListeners=()=>{window.addEventListener(ze,this.update,{passive:!0}),window.addEventListener(Be,this.update,{passive:!0,capture:!0}),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.observe(this.viewportElement)},this.stopAutoUpdateEventListeners=()=>{window.removeEventListener(ze,this.update),window.removeEventListener(Be,this.update),null!==this.resizeDetector&&null!==this.viewportElement&&this.resizeDetector.unobserve(this.viewportElement)}}anchorChanged(){this.initialLayoutComplete&&(this.anchorElement=this.getAnchor())}viewportChanged(){this.initialLayoutComplete&&(this.viewportElement=this.getViewport())}horizontalPositioningModeChanged(){this.requestReset()}horizontalDefaultPositionChanged(){this.updateForAttributeChange()}horizontalViewportLockChanged(){this.updateForAttributeChange()}horizontalInsetChanged(){this.updateForAttributeChange()}horizontalThresholdChanged(){this.updateForAttributeChange()}horizontalScalingChanged(){this.updateForAttributeChange()}verticalPositioningModeChanged(){this.requestReset()}verticalDefaultPositionChanged(){this.updateForAttributeChange()}verticalViewportLockChanged(){this.updateForAttributeChange()}verticalInsetChanged(){this.updateForAttributeChange()}verticalThresholdChanged(){this.updateForAttributeChange()}verticalScalingChanged(){this.updateForAttributeChange()}fixedPlacementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}autoUpdateModeChanged(e,t){this.$fastController.isConnected&&this.initialLayoutComplete&&("auto"===e&&this.stopAutoUpdateEventListeners(),"auto"===t&&this.startAutoUpdateEventListeners())}anchorElementChanged(){this.requestReset()}viewportElementChanged(){this.$fastController.isConnected&&this.initialLayoutComplete&&this.initialize()}connectedCallback(){super.connectedCallback(),"auto"===this.autoUpdateMode&&this.startAutoUpdateEventListeners(),this.initialize()}disconnectedCallback(){super.disconnectedCallback(),"auto"===this.autoUpdateMode&&this.stopAutoUpdateEventListeners(),this.stopObservers(),this.disconnectResizeDetector()}adoptedCallback(){this.initialize()}disconnectResizeDetector(){null!==this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.handleResize)}updateForAttributeChange(){this.$fastController.isConnected&&this.initialLayoutComplete&&(this.forceUpdate=!0,this.update())}initialize(){this.initializeResizeDetector(),null===this.anchorElement&&(this.anchorElement=this.getAnchor()),this.requestReset()}requestReset(){this.$fastController.isConnected&&!1===this.pendingReset&&(this.setInitialState(),s.DOM.queueUpdate((()=>this.reset())),this.pendingReset=!0)}setInitialState(){this.initialLayoutComplete=!1,this.regionVisible=!1,this.translateX=0,this.translateY=0,this.baseHorizontalOffset=0,this.baseVerticalOffset=0,this.viewportRect=void 0,this.regionRect=void 0,this.anchorRect=void 0,this.verticalPosition=void 0,this.horizontalPosition=void 0,this.style.opacity="0",this.style.pointerEvents="none",this.forceUpdate=!1,this.style.position=this.fixedPlacement?"fixed":"absolute",this.updatePositionClasses(),this.updateRegionStyle()}}qe.intersectionService=new class{constructor(){this.intersectionDetector=null,this.observedElements=new Map,this.requestPosition=(e,t)=>{var i;null!==this.intersectionDetector&&(this.observedElements.has(e)?null===(i=this.observedElements.get(e))||void 0===i||i.push(t):(this.observedElements.set(e,[t]),this.intersectionDetector.observe(e)))},this.cancelRequestPosition=(e,t)=>{const i=this.observedElements.get(e);if(void 0!==i){const e=i.indexOf(t);-1!==e&&i.splice(e,1)}},this.initializeIntersectionDetector=()=>{s.$global.IntersectionObserver&&(this.intersectionDetector=new IntersectionObserver(this.handleIntersection,{root:null,rootMargin:"0px",threshold:[0,1]}))},this.handleIntersection=e=>{if(null===this.intersectionDetector)return;const t=[],i=[];e.forEach((e=>{var s;null===(s=this.intersectionDetector)||void 0===s||s.unobserve(e.target);const o=this.observedElements.get(e.target);void 0!==o&&(o.forEach((s=>{let o=t.indexOf(s);-1===o&&(o=t.length,t.push(s),i.push([])),i[o].push(e)})),this.observedElements.delete(e.target))})),t.forEach(((e,t)=>{e(i[t])}))},this.initializeIntersectionDetector()}},(0,h.__decorate)([s.attr],qe.prototype,"anchor",void 0),(0,h.__decorate)([s.attr],qe.prototype,"viewport",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"horizontal-positioning-mode"})],qe.prototype,"horizontalPositioningMode",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"horizontal-default-position"})],qe.prototype,"horizontalDefaultPosition",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"horizontal-viewport-lock",mode:"boolean"})],qe.prototype,"horizontalViewportLock",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"horizontal-inset",mode:"boolean"})],qe.prototype,"horizontalInset",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"horizontal-threshold"})],qe.prototype,"horizontalThreshold",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"horizontal-scaling"})],qe.prototype,"horizontalScaling",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"vertical-positioning-mode"})],qe.prototype,"verticalPositioningMode",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"vertical-default-position"})],qe.prototype,"verticalDefaultPosition",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"vertical-viewport-lock",mode:"boolean"})],qe.prototype,"verticalViewportLock",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"vertical-inset",mode:"boolean"})],qe.prototype,"verticalInset",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"vertical-threshold"})],qe.prototype,"verticalThreshold",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"vertical-scaling"})],qe.prototype,"verticalScaling",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"fixed-placement",mode:"boolean"})],qe.prototype,"fixedPlacement",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"auto-update-mode"})],qe.prototype,"autoUpdateMode",void 0),(0,h.__decorate)([s.observable],qe.prototype,"anchorElement",void 0),(0,h.__decorate)([s.observable],qe.prototype,"viewportElement",void 0),(0,h.__decorate)([s.observable],qe.prototype,"initialLayoutComplete",void 0);const Ue={horizontalDefaultPosition:"center",horizontalPositioningMode:"locktodefault",horizontalInset:!1,horizontalScaling:"anchor"},je=Object.assign(Object.assign({},Ue),{verticalDefaultPosition:"top",verticalPositioningMode:"locktodefault",verticalInset:!1,verticalScaling:"content"}),We=Object.assign(Object.assign({},Ue),{verticalDefaultPosition:"bottom",verticalPositioningMode:"locktodefault",verticalInset:!1,verticalScaling:"content"}),Ke=Object.assign(Object.assign({},Ue),{verticalPositioningMode:"dynamic",verticalInset:!1,verticalScaling:"content"}),Ge=Object.assign(Object.assign({},je),{verticalScaling:"fill"}),Ye=Object.assign(Object.assign({},We),{verticalScaling:"fill"}),Xe=Object.assign(Object.assign({},Ke),{verticalScaling:"fill"}),Qe=(e,t)=>s.html`
|
|
136
|
-
<div
|
|
137
|
-
class="backplate ${e=>e.shape}"
|
|
138
|
-
part="backplate"
|
|
139
|
-
style="${e=>e.fill?`background-color: var(--avatar-fill-${e.fill});`:void 0}"
|
|
140
|
-
>
|
|
141
|
-
<a
|
|
142
|
-
class="link"
|
|
143
|
-
part="link"
|
|
144
|
-
href="${e=>e.link?e.link:void 0}"
|
|
145
|
-
style="${e=>e.color?`color: var(--avatar-color-${e.color});`:void 0}"
|
|
146
|
-
>
|
|
147
|
-
<slot name="media" part="media">${t.media||""}</slot>
|
|
148
|
-
<slot class="content" part="content"><slot>
|
|
149
|
-
</a>
|
|
150
|
-
</div>
|
|
151
|
-
<slot name="badge" part="badge"></slot>
|
|
152
|
-
`;class Ze extends ae{connectedCallback(){super.connectedCallback(),this.shape||(this.shape="circle")}}(0,h.__decorate)([s.attr],Ze.prototype,"fill",void 0),(0,h.__decorate)([s.attr],Ze.prototype,"color",void 0),(0,h.__decorate)([s.attr],Ze.prototype,"link",void 0),(0,h.__decorate)([s.attr],Ze.prototype,"shape",void 0);const Je=(e,t)=>s.html`
|
|
153
|
-
<template class="${e=>e.circular?"circular":""}">
|
|
154
|
-
<div class="control" part="control" style="${e=>e.generateBadgeStyle()}">
|
|
155
|
-
<slot></slot>
|
|
156
|
-
</div>
|
|
157
|
-
</template>
|
|
158
|
-
`;class et extends ae{constructor(){super(...arguments),this.generateBadgeStyle=()=>{if(!this.fill&&!this.color)return;const e=`background-color: var(--badge-fill-${this.fill});`,t=`color: var(--badge-color-${this.color});`;return this.fill&&!this.color?e:this.color&&!this.fill?t:`${t} ${e}`}}}(0,h.__decorate)([(0,s.attr)({attribute:"fill"})],et.prototype,"fill",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"color"})],et.prototype,"color",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],et.prototype,"circular",void 0);const tt=(e,t)=>s.html`
|
|
159
|
-
<div role="listitem" class="listitem" part="listitem">
|
|
160
|
-
${(0,s.when)((e=>e.href&&e.href.length>0),s.html`
|
|
161
|
-
${Se(e,t)}
|
|
162
|
-
`)}
|
|
163
|
-
${(0,s.when)((e=>!e.href),s.html`
|
|
164
|
-
${r(e,t)}
|
|
165
|
-
<slot></slot>
|
|
166
|
-
${n(e,t)}
|
|
167
|
-
`)}
|
|
168
|
-
${(0,s.when)((e=>e.separator),s.html`
|
|
169
|
-
<span class="separator" part="separator" aria-hidden="true">
|
|
170
|
-
<slot name="separator">${t.separator||""}</slot>
|
|
171
|
-
</span>
|
|
172
|
-
`)}
|
|
173
|
-
</div>
|
|
174
|
-
`;class it extends De{constructor(){super(...arguments),this.separator=!0}}(0,h.__decorate)([s.observable],it.prototype,"separator",void 0),he(it,o,Ae);const st=(e,t)=>s.html`
|
|
175
|
-
<template role="navigation">
|
|
176
|
-
<div role="list" class="list" part="list">
|
|
177
|
-
<slot
|
|
178
|
-
${(0,s.slotted)({property:"slottedBreadcrumbItems",filter:(0,s.elements)()})}
|
|
179
|
-
></slot>
|
|
180
|
-
</div>
|
|
181
|
-
</template>
|
|
182
|
-
`;class ot extends ae{slottedBreadcrumbItemsChanged(){if(this.$fastController.isConnected){if(void 0===this.slottedBreadcrumbItems||0===this.slottedBreadcrumbItems.length)return;const e=this.slottedBreadcrumbItems[this.slottedBreadcrumbItems.length-1];this.slottedBreadcrumbItems.forEach((t=>{const i=t===e;this.setItemSeparator(t,i),this.setAriaCurrent(t,i)}))}}setItemSeparator(e,t){e instanceof it&&(e.separator=!t)}findChildWithHref(e){var t,i;return e.childElementCount>0?e.querySelector("a[href]"):(null===(t=e.shadowRoot)||void 0===t?void 0:t.childElementCount)?null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector("a[href]"):null}setAriaCurrent(e,t){const i=this.findChildWithHref(e);null===i&&e.hasAttribute("href")&&e instanceof it?t?e.setAttribute("aria-current","page"):e.removeAttribute("aria-current"):null!==i&&(t?i.setAttribute("aria-current","page"):i.removeAttribute("aria-current"))}}(0,h.__decorate)([s.observable],ot.prototype,"slottedBreadcrumbItems",void 0);const nt=(e,t)=>s.html`
|
|
183
|
-
<button
|
|
184
|
-
class="control"
|
|
185
|
-
part="control"
|
|
186
|
-
?autofocus="${e=>e.autofocus}"
|
|
187
|
-
?disabled="${e=>e.disabled}"
|
|
188
|
-
form="${e=>e.formId}"
|
|
189
|
-
formaction="${e=>e.formaction}"
|
|
190
|
-
formenctype="${e=>e.formenctype}"
|
|
191
|
-
formmethod="${e=>e.formmethod}"
|
|
192
|
-
formnovalidate="${e=>e.formnovalidate}"
|
|
193
|
-
formtarget="${e=>e.formtarget}"
|
|
194
|
-
name="${e=>e.name}"
|
|
195
|
-
type="${e=>e.type}"
|
|
196
|
-
value="${e=>e.value}"
|
|
197
|
-
aria-atomic="${e=>e.ariaAtomic}"
|
|
198
|
-
aria-busy="${e=>e.ariaBusy}"
|
|
199
|
-
aria-controls="${e=>e.ariaControls}"
|
|
200
|
-
aria-current="${e=>e.ariaCurrent}"
|
|
201
|
-
aria-describedby="${e=>e.ariaDescribedby}"
|
|
202
|
-
aria-details="${e=>e.ariaDetails}"
|
|
203
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
204
|
-
aria-errormessage="${e=>e.ariaErrormessage}"
|
|
205
|
-
aria-expanded="${e=>e.ariaExpanded}"
|
|
206
|
-
aria-flowto="${e=>e.ariaFlowto}"
|
|
207
|
-
aria-haspopup="${e=>e.ariaHaspopup}"
|
|
208
|
-
aria-hidden="${e=>e.ariaHidden}"
|
|
209
|
-
aria-invalid="${e=>e.ariaInvalid}"
|
|
210
|
-
aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
|
|
211
|
-
aria-label="${e=>e.ariaLabel}"
|
|
212
|
-
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
213
|
-
aria-live="${e=>e.ariaLive}"
|
|
214
|
-
aria-owns="${e=>e.ariaOwns}"
|
|
215
|
-
aria-pressed="${e=>e.ariaPressed}"
|
|
216
|
-
aria-relevant="${e=>e.ariaRelevant}"
|
|
217
|
-
aria-roledescription="${e=>e.ariaRoledescription}"
|
|
218
|
-
${(0,s.ref)("control")}
|
|
219
|
-
>
|
|
220
|
-
${r(e,t)}
|
|
221
|
-
<span class="content" part="content">
|
|
222
|
-
<slot ${(0,s.slotted)("defaultSlottedContent")}></slot>
|
|
223
|
-
</span>
|
|
224
|
-
${n(e,t)}
|
|
225
|
-
</button>
|
|
226
|
-
`,rt="form-associated-proxy",at="ElementInternals",lt=at in window&&"setFormValue"in window[at].prototype,dt=new WeakMap;function ht(e){const t=class extends e{constructor(...e){super(...e),this.dirtyValue=!1,this.disabled=!1,this.proxyEventsToBlock=["change","click"],this.proxyInitialized=!1,this.required=!1,this.initialValue=this.initialValue||"",this.elementInternals||(this.formResetCallback=this.formResetCallback.bind(this))}static get formAssociated(){return lt}get validity(){return this.elementInternals?this.elementInternals.validity:this.proxy.validity}get form(){return this.elementInternals?this.elementInternals.form:this.proxy.form}get validationMessage(){return this.elementInternals?this.elementInternals.validationMessage:this.proxy.validationMessage}get willValidate(){return this.elementInternals?this.elementInternals.willValidate:this.proxy.willValidate}get labels(){if(this.elementInternals)return Object.freeze(Array.from(this.elementInternals.labels));if(this.proxy instanceof HTMLElement&&this.proxy.ownerDocument&&this.id){const e=this.proxy.labels,t=Array.from(this.proxy.getRootNode().querySelectorAll(`[for='${this.id}']`)),i=e?t.concat(Array.from(e)):t;return Object.freeze(i)}return s.emptyArray}valueChanged(e,t){this.dirtyValue=!0,this.proxy instanceof HTMLElement&&(this.proxy.value=this.value),this.currentValue=this.value,this.setFormValue(this.value),this.validate()}currentValueChanged(){this.value=this.currentValue}initialValueChanged(e,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}disabledChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.disabled=this.disabled),s.DOM.queueUpdate((()=>this.classList.toggle("disabled",this.disabled)))}nameChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.name=this.name)}requiredChanged(e,t){this.proxy instanceof HTMLElement&&(this.proxy.required=this.required),s.DOM.queueUpdate((()=>this.classList.toggle("required",this.required))),this.validate()}get elementInternals(){if(!lt)return null;let e=dt.get(this);return e||(e=this.attachInternals(),dt.set(this,e)),e}connectedCallback(){super.connectedCallback(),this.addEventListener("keypress",this._keypressHandler),this.value||(this.value=this.initialValue,this.dirtyValue=!1),this.elementInternals||(this.attachProxy(),this.form&&this.form.addEventListener("reset",this.formResetCallback))}disconnectedCallback(){this.proxyEventsToBlock.forEach((e=>this.proxy.removeEventListener(e,this.stopPropagation))),!this.elementInternals&&this.form&&this.form.removeEventListener("reset",this.formResetCallback)}checkValidity(){return this.elementInternals?this.elementInternals.checkValidity():this.proxy.checkValidity()}reportValidity(){return this.elementInternals?this.elementInternals.reportValidity():this.proxy.reportValidity()}setValidity(e,t,i){this.elementInternals?this.elementInternals.setValidity(e,t,i):"string"==typeof t&&this.proxy.setCustomValidity(t)}formDisabledCallback(e){this.disabled=e}formResetCallback(){this.value=this.initialValue,this.dirtyValue=!1}attachProxy(){var e;this.proxyInitialized||(this.proxyInitialized=!0,this.proxy.style.display="none",this.proxyEventsToBlock.forEach((e=>this.proxy.addEventListener(e,this.stopPropagation))),this.proxy.disabled=this.disabled,this.proxy.required=this.required,"string"==typeof this.name&&(this.proxy.name=this.name),"string"==typeof this.value&&(this.proxy.value=this.value),this.proxy.setAttribute("slot",rt),this.proxySlot=document.createElement("slot"),this.proxySlot.setAttribute("name",rt)),null===(e=this.shadowRoot)||void 0===e||e.appendChild(this.proxySlot),this.appendChild(this.proxy)}detachProxy(){var e;this.removeChild(this.proxy),null===(e=this.shadowRoot)||void 0===e||e.removeChild(this.proxySlot)}validate(e){this.proxy instanceof HTMLElement&&this.setValidity(this.proxy.validity,this.proxy.validationMessage,e)}setFormValue(e,t){this.elementInternals&&this.elementInternals.setFormValue(e,t||e)}_keypressHandler(e){if(e.key===ge)if(this.form instanceof HTMLFormElement){const e=this.form.querySelector("[type=submit]");null==e||e.click()}}stopPropagation(e){e.stopPropagation()}};return(0,s.attr)({mode:"boolean"})(t.prototype,"disabled"),(0,s.attr)({mode:"fromView",attribute:"value"})(t.prototype,"initialValue"),(0,s.attr)({attribute:"current-value"})(t.prototype,"currentValue"),(0,s.attr)(t.prototype,"name"),(0,s.attr)({mode:"boolean"})(t.prototype,"required"),(0,s.observable)(t.prototype,"value"),t}function ct(e){class t extends(ht(e)){}class i extends t{constructor(...e){super(e),this.dirtyChecked=!1,this.checkedAttribute=!1,this.checked=!1,this.dirtyChecked=!1}checkedAttributeChanged(){this.defaultChecked=this.checkedAttribute}defaultCheckedChanged(){this.dirtyChecked||(this.checked=this.defaultChecked,this.dirtyChecked=!1)}checkedChanged(e,t){this.dirtyChecked||(this.dirtyChecked=!0),this.currentChecked=this.checked,this.updateForm(),this.proxy instanceof HTMLInputElement&&(this.proxy.checked=this.checked),void 0!==e&&this.$emit("change"),this.validate()}currentCheckedChanged(e,t){this.checked=this.currentChecked}updateForm(){const e=this.checked?this.value:null;this.setFormValue(e,e)}connectedCallback(){super.connectedCallback(),this.updateForm()}formResetCallback(){super.formResetCallback(),this.checked=!!this.checkedAttribute,this.dirtyChecked=!1}}return(0,s.attr)({attribute:"checked",mode:"boolean"})(i.prototype,"checkedAttribute"),(0,s.attr)({attribute:"current-checked",converter:s.booleanConverter})(i.prototype,"currentChecked"),(0,s.observable)(i.prototype,"defaultChecked"),(0,s.observable)(i.prototype,"checked"),i}class ut extends ae{}class pt extends(ht(ut)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class mt extends pt{constructor(){super(...arguments),this.handleClick=e=>{var t;this.disabled&&(null===(t=this.defaultSlottedContent)||void 0===t?void 0:t.length)<=1&&e.stopPropagation()},this.handleSubmission=()=>{if(!this.form)return;const e=this.proxy.isConnected;e||this.attachProxy(),"function"==typeof this.form.requestSubmit?this.form.requestSubmit(this.proxy):this.proxy.click(),e||this.detachProxy()},this.handleFormReset=()=>{var e;null===(e=this.form)||void 0===e||e.reset()},this.handleUnsupportedDelegatesFocus=()=>{var e;window.ShadowRoot&&!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus")&&(null===(e=this.$fastController.definition.shadowOptions)||void 0===e?void 0:e.delegatesFocus)&&(this.focus=()=>{this.control.focus()})}}formactionChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formAction=this.formaction)}formenctypeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formEnctype=this.formenctype)}formmethodChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formMethod=this.formmethod)}formnovalidateChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formNoValidate=this.formnovalidate)}formtargetChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.formTarget=this.formtarget)}typeChanged(e,t){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type),"submit"===t&&this.addEventListener("click",this.handleSubmission),"submit"===e&&this.removeEventListener("click",this.handleSubmission),"reset"===t&&this.addEventListener("click",this.handleFormReset),"reset"===e&&this.removeEventListener("click",this.handleFormReset)}validate(){super.validate(this.control)}connectedCallback(){var e;super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.handleUnsupportedDelegatesFocus();const t=Array.from(null===(e=this.control)||void 0===e?void 0:e.children);t&&t.forEach((e=>{e.addEventListener("click",this.handleClick)}))}disconnectedCallback(){var e;super.disconnectedCallback();const t=Array.from(null===(e=this.control)||void 0===e?void 0:e.children);t&&t.forEach((e=>{e.removeEventListener("click",this.handleClick)}))}}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],mt.prototype,"autofocus",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"form"})],mt.prototype,"formId",void 0),(0,h.__decorate)([s.attr],mt.prototype,"formaction",void 0),(0,h.__decorate)([s.attr],mt.prototype,"formenctype",void 0),(0,h.__decorate)([s.attr],mt.prototype,"formmethod",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],mt.prototype,"formnovalidate",void 0),(0,h.__decorate)([s.attr],mt.prototype,"formtarget",void 0),(0,h.__decorate)([s.attr],mt.prototype,"type",void 0),(0,h.__decorate)([s.observable],mt.prototype,"defaultSlottedContent",void 0);class vt{}(0,h.__decorate)([(0,s.attr)({attribute:"aria-expanded"})],vt.prototype,"ariaExpanded",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-pressed"})],vt.prototype,"ariaPressed",void 0),he(vt,Re),he(mt,o,vt);class ft{constructor(e){if(this.dayFormat="numeric",this.weekdayFormat="long",this.monthFormat="long",this.yearFormat="numeric",this.date=new Date,e)for(const t in e){const i=e[t];"date"===t?this.date=this.getDateObject(i):this[t]=i}}getDateObject(e){if("string"==typeof e){const t=e.split(/[/-]/);return t.length<3?new Date:new Date(parseInt(t[2],10),parseInt(t[0],10)-1,parseInt(t[1],10))}if("day"in e&&"month"in e&&"year"in e){const{day:t,month:i,year:s}=e;return new Date(s,i-1,t)}return e}getDate(e=this.date,t={weekday:this.weekdayFormat,month:this.monthFormat,day:this.dayFormat,year:this.yearFormat},i=this.locale){const s=this.getDateObject(e),o=Object.assign({timeZone:"utc"},t);return new Intl.DateTimeFormat(i,o).format(s)}getDay(e=this.date.getDate(),t=this.dayFormat,i=this.locale){return this.getDate({month:1,day:e,year:2020},{day:t},i)}getMonth(e=this.date.getMonth()+1,t=this.monthFormat,i=this.locale){return this.getDate({month:e,day:2,year:2020},{month:t},i)}getYear(e=this.date.getFullYear(),t=this.yearFormat,i=this.locale){return this.getDate({month:2,day:2,year:e},{year:t},i)}getWeekday(e=0,t=this.weekdayFormat,i=this.locale){const s=`1-${e+1}-2017`;return this.getDate(s,{weekday:t},i)}getWeekdays(e=this.weekdayFormat,t=this.locale){return Array(7).fill(null).map(((i,s)=>this.getWeekday(s,e,t)))}}class bt extends ae{constructor(){super(...arguments),this.dateFormatter=new ft,this.readonly=!1,this.locale="en-US",this.month=(new Date).getMonth()+1,this.year=(new Date).getFullYear(),this.dayFormat="numeric",this.weekdayFormat="short",this.monthFormat="long",this.yearFormat="numeric",this.minWeeks=0,this.disabledDates="",this.selectedDates="",this.oneDayInMs=864e5}localeChanged(){this.dateFormatter.locale=this.locale}dayFormatChanged(){this.dateFormatter.dayFormat=this.dayFormat}weekdayFormatChanged(){this.dateFormatter.weekdayFormat=this.weekdayFormat}monthFormatChanged(){this.dateFormatter.monthFormat=this.monthFormat}yearFormatChanged(){this.dateFormatter.yearFormat=this.yearFormat}getMonthInfo(e=this.month,t=this.year){const i=e=>new Date(e.getFullYear(),e.getMonth(),1).getDay(),s=e=>{const t=new Date(e.getFullYear(),e.getMonth()+1,1);return new Date(t.getTime()-this.oneDayInMs).getDate()},o=new Date(t,e-1),n=new Date(t,e),r=new Date(t,e-2);return{length:s(o),month:e,start:i(o),year:t,previous:{length:s(r),month:r.getMonth()+1,start:i(r),year:r.getFullYear()},next:{length:s(n),month:n.getMonth()+1,start:i(n),year:n.getFullYear()}}}getDays(e=this.getMonthInfo(),t=this.minWeeks){t=t>10?10:t;const{start:i,length:s,previous:o,next:n}=e,r=[];let a=1-i;for(;a<s+1||r.length<t||r[r.length-1].length%7!=0;){const{month:t,year:i}=a<1?o:a>s?n:e,l=a<1?o.length+a:a>s?a-s:a,d=`${t}-${l}-${i}`,h={day:l,month:t,year:i,disabled:this.dateInString(d,this.disabledDates),selected:this.dateInString(d,this.selectedDates)},c=r[r.length-1];0===r.length||c.length%7==0?r.push([h]):c.push(h),a++}return r}dateInString(e,t){const i=t.split(",").map((e=>e.trim()));return e="string"==typeof e?e:`${e.getMonth()+1}-${e.getDate()}-${e.getFullYear()}`,i.some((t=>t===e))}getDayClassNames(e,t){const{day:i,month:s,year:o,disabled:n,selected:r}=e;return["day",t===`${s}-${i}-${o}`&&"today",this.month!==s&&"inactive",n&&"disabled",r&&"selected"].filter(Boolean).join(" ")}getWeekdayText(){const e=this.dateFormatter.getWeekdays().map((e=>({text:e})));if("long"!==this.weekdayFormat){const t=this.dateFormatter.getWeekdays("long");e.forEach(((e,i)=>{e.abbr=t[i]}))}return e}handleDateSelect(e,t){e.preventDefault,this.$emit("dateselected",t)}handleKeydown(e,t){return e.key===ge&&this.handleDateSelect(e,t),!0}}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],bt.prototype,"readonly",void 0),(0,h.__decorate)([s.attr],bt.prototype,"locale",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],bt.prototype,"month",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],bt.prototype,"year",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"day-format",mode:"fromView"})],bt.prototype,"dayFormat",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"weekday-format",mode:"fromView"})],bt.prototype,"weekdayFormat",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"month-format",mode:"fromView"})],bt.prototype,"monthFormat",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"year-format",mode:"fromView"})],bt.prototype,"yearFormat",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"min-weeks",converter:s.nullableNumberConverter})],bt.prototype,"minWeeks",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"disabled-dates"})],bt.prototype,"disabledDates",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"selected-dates"})],bt.prototype,"selectedDates",void 0);const gt={none:"none",default:"default",sticky:"sticky"},yt={default:"default",columnHeader:"columnheader",rowHeader:"rowheader"},Ct={default:"default",header:"header",stickyHeader:"sticky-header"},xt=s.html`
|
|
227
|
-
<template>
|
|
228
|
-
${e=>null===e.rowData||null===e.columnDefinition||null===e.columnDefinition.columnDataKey?null:e.rowData[e.columnDefinition.columnDataKey]}
|
|
229
|
-
</template>
|
|
230
|
-
`,wt=s.html`
|
|
231
|
-
<template>
|
|
232
|
-
${e=>null===e.columnDefinition?null:void 0===e.columnDefinition.title?e.columnDefinition.columnDataKey:e.columnDefinition.title}
|
|
233
|
-
</template>
|
|
234
|
-
`;class $t extends ae{constructor(){super(...arguments),this.cellType=yt.default,this.rowData=null,this.columnDefinition=null,this.isActiveCell=!1,this.customCellView=null,this.updateCellStyle=()=>{this.style.gridColumn=this.gridColumn}}cellTypeChanged(){this.$fastController.isConnected&&this.updateCellView()}gridColumnChanged(){this.$fastController.isConnected&&this.updateCellStyle()}columnDefinitionChanged(e,t){this.$fastController.isConnected&&this.updateCellView()}connectedCallback(){var e;super.connectedCallback(),this.addEventListener(Me,this.handleFocusin),this.addEventListener(Ve,this.handleFocusout),this.addEventListener(He,this.handleKeydown),this.style.gridColumn=`${void 0===(null===(e=this.columnDefinition)||void 0===e?void 0:e.gridColumn)?0:this.columnDefinition.gridColumn}`,this.updateCellView(),this.updateCellStyle()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Me,this.handleFocusin),this.removeEventListener(Ve,this.handleFocusout),this.removeEventListener(He,this.handleKeydown),this.disconnectCellView()}handleFocusin(e){if(!this.isActiveCell){if(this.isActiveCell=!0,this.cellType===yt.columnHeader){if(null!==this.columnDefinition&&!0!==this.columnDefinition.headerCellInternalFocusQueue&&"function"==typeof this.columnDefinition.headerCellFocusTargetCallback){const e=this.columnDefinition.headerCellFocusTargetCallback(this);null!==e&&e.focus()}}else if(null!==this.columnDefinition&&!0!==this.columnDefinition.cellInternalFocusQueue&&"function"==typeof this.columnDefinition.cellFocusTargetCallback){const e=this.columnDefinition.cellFocusTargetCallback(this);null!==e&&e.focus()}this.$emit("cell-focused",this)}}handleFocusout(e){this===document.activeElement||this.contains(document.activeElement)||(this.isActiveCell=!1)}handleKeydown(e){if(!(e.defaultPrevented||null===this.columnDefinition||this.cellType===yt.default&&!0!==this.columnDefinition.cellInternalFocusQueue||this.cellType===yt.columnHeader&&!0!==this.columnDefinition.headerCellInternalFocusQueue))switch(e.key){case ge:case"F2":if(this.contains(document.activeElement)&&document.activeElement!==this)return;if(this.cellType===yt.columnHeader){if(void 0!==this.columnDefinition.headerCellFocusTargetCallback){const t=this.columnDefinition.headerCellFocusTargetCallback(this);null!==t&&t.focus(),e.preventDefault()}}else if(void 0!==this.columnDefinition.cellFocusTargetCallback){const t=this.columnDefinition.cellFocusTargetCallback(this);null!==t&&t.focus(),e.preventDefault()}break;case ye:this.contains(document.activeElement)&&document.activeElement!==this&&(this.focus(),e.preventDefault())}}updateCellView(){if(this.disconnectCellView(),null!==this.columnDefinition)switch(this.cellType){case yt.columnHeader:void 0!==this.columnDefinition.headerCellTemplate?this.customCellView=this.columnDefinition.headerCellTemplate.render(this,this):this.customCellView=wt.render(this,this);break;case void 0:case yt.rowHeader:case yt.default:void 0!==this.columnDefinition.cellTemplate?this.customCellView=this.columnDefinition.cellTemplate.render(this,this):this.customCellView=xt.render(this,this)}}disconnectCellView(){null!==this.customCellView&&(this.customCellView.dispose(),this.customCellView=null)}}(0,h.__decorate)([(0,s.attr)({attribute:"cell-type"})],$t.prototype,"cellType",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"grid-column"})],$t.prototype,"gridColumn",void 0),(0,h.__decorate)([s.observable],$t.prototype,"rowData",void 0),(0,h.__decorate)([s.observable],$t.prototype,"columnDefinition",void 0);class It extends ae{constructor(){super(...arguments),this.rowType=Ct.default,this.rowData=null,this.columnDefinitions=null,this.isActiveRow=!1,this.cellsRepeatBehavior=null,this.cellsPlaceholder=null,this.focusColumnIndex=0,this.refocusOnLoad=!1,this.updateRowStyle=()=>{this.style.gridTemplateColumns=this.gridTemplateColumns}}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowStyle()}rowTypeChanged(){this.$fastController.isConnected&&this.updateItemTemplate()}rowDataChanged(){null!==this.rowData&&this.isActiveRow&&(this.refocusOnLoad=!0)}cellItemTemplateChanged(){this.updateItemTemplate()}headerCellItemTemplateChanged(){this.updateItemTemplate()}connectedCallback(){super.connectedCallback(),null===this.cellsRepeatBehavior&&(this.cellsPlaceholder=document.createComment(""),this.appendChild(this.cellsPlaceholder),this.updateItemTemplate(),this.cellsRepeatBehavior=new s.RepeatDirective((e=>e.columnDefinitions),(e=>e.activeCellItemTemplate),{positioning:!0}).createBehavior(this.cellsPlaceholder),this.$fastController.addBehaviors([this.cellsRepeatBehavior])),this.addEventListener("cell-focused",this.handleCellFocus),this.addEventListener(Ve,this.handleFocusout),this.addEventListener(He,this.handleKeydown),this.updateRowStyle(),this.refocusOnLoad&&(this.refocusOnLoad=!1,this.cellElements.length>this.focusColumnIndex&&this.cellElements[this.focusColumnIndex].focus())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("cell-focused",this.handleCellFocus),this.removeEventListener(Ve,this.handleFocusout),this.removeEventListener(He,this.handleKeydown)}handleFocusout(e){this.contains(e.target)||(this.isActiveRow=!1,this.focusColumnIndex=0)}handleCellFocus(e){this.isActiveRow=!0,this.focusColumnIndex=this.cellElements.indexOf(e.target),this.$emit("row-focused",this)}handleKeydown(e){if(e.defaultPrevented)return;let t=0;switch(e.key){case ve:t=Math.max(0,this.focusColumnIndex-1),this.cellElements[t].focus(),e.preventDefault();break;case fe:t=Math.min(this.cellElements.length-1,this.focusColumnIndex+1),this.cellElements[t].focus(),e.preventDefault();break;case Ce:e.ctrlKey||(this.cellElements[0].focus(),e.preventDefault());break;case xe:e.ctrlKey||(this.cellElements[this.cellElements.length-1].focus(),e.preventDefault())}}updateItemTemplate(){this.activeCellItemTemplate=this.rowType===Ct.default&&void 0!==this.cellItemTemplate?this.cellItemTemplate:this.rowType===Ct.default&&void 0===this.cellItemTemplate?this.defaultCellItemTemplate:void 0!==this.headerCellItemTemplate?this.headerCellItemTemplate:this.defaultHeaderCellItemTemplate}}(0,h.__decorate)([(0,s.attr)({attribute:"grid-template-columns"})],It.prototype,"gridTemplateColumns",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"row-type"})],It.prototype,"rowType",void 0),(0,h.__decorate)([s.observable],It.prototype,"rowData",void 0),(0,h.__decorate)([s.observable],It.prototype,"columnDefinitions",void 0),(0,h.__decorate)([s.observable],It.prototype,"cellItemTemplate",void 0),(0,h.__decorate)([s.observable],It.prototype,"headerCellItemTemplate",void 0),(0,h.__decorate)([s.observable],It.prototype,"rowIndex",void 0),(0,h.__decorate)([s.observable],It.prototype,"isActiveRow",void 0),(0,h.__decorate)([s.observable],It.prototype,"activeCellItemTemplate",void 0),(0,h.__decorate)([s.observable],It.prototype,"defaultCellItemTemplate",void 0),(0,h.__decorate)([s.observable],It.prototype,"defaultHeaderCellItemTemplate",void 0),(0,h.__decorate)([s.observable],It.prototype,"cellElements",void 0);class kt extends ae{constructor(){super(),this.noTabbing=!1,this.generateHeader=gt.default,this.rowsData=[],this.columnDefinitions=null,this.focusRowIndex=0,this.focusColumnIndex=0,this.rowsPlaceholder=null,this.generatedHeader=null,this.isUpdatingFocus=!1,this.pendingFocusUpdate=!1,this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!0,this.generatedGridTemplateColumns="",this.focusOnCell=(e,t,i)=>{if(0===this.rowElements.length)return this.focusRowIndex=0,void(this.focusColumnIndex=0);const s=Math.max(0,Math.min(this.rowElements.length-1,e)),o=this.rowElements[s].querySelectorAll('[role="cell"], [role="gridcell"], [role="columnheader"], [role="rowheader"]'),n=o[Math.max(0,Math.min(o.length-1,t))];i&&this.scrollHeight!==this.clientHeight&&(s<this.focusRowIndex&&this.scrollTop>0||s>this.focusRowIndex&&this.scrollTop<this.scrollHeight-this.clientHeight)&&n.scrollIntoView({block:"center",inline:"center"}),n.focus()},this.onChildListChange=(e,t)=>{e&&e.length&&(e.forEach((e=>{e.addedNodes.forEach((e=>{1===e.nodeType&&"row"===e.getAttribute("role")&&(e.columnDefinitions=this.columnDefinitions)}))})),this.queueRowIndexUpdate())},this.queueRowIndexUpdate=()=>{this.rowindexUpdateQueued||(this.rowindexUpdateQueued=!0,s.DOM.queueUpdate(this.updateRowIndexes))},this.updateRowIndexes=()=>{let e=this.gridTemplateColumns;if(void 0===e){if(""===this.generatedGridTemplateColumns&&this.rowElements.length>0){const e=this.rowElements[0];this.generatedGridTemplateColumns=new Array(e.cellElements.length).fill("1fr").join(" ")}e=this.generatedGridTemplateColumns}this.rowElements.forEach(((t,i)=>{const s=t;s.rowIndex=i,s.gridTemplateColumns=e,this.columnDefinitionsStale&&(s.columnDefinitions=this.columnDefinitions)})),this.rowindexUpdateQueued=!1,this.columnDefinitionsStale=!1}}static generateTemplateColumns(e){let t="";return e.forEach((e=>{t=`${t}${""===t?"":" "}1fr`})),t}noTabbingChanged(){this.$fastController.isConnected&&(this.noTabbing?this.setAttribute("tabIndex","-1"):this.setAttribute("tabIndex",this.contains(document.activeElement)||this===document.activeElement?"-1":"0"))}generateHeaderChanged(){this.$fastController.isConnected&&this.toggleGeneratedHeader()}gridTemplateColumnsChanged(){this.$fastController.isConnected&&this.updateRowIndexes()}rowsDataChanged(){null===this.columnDefinitions&&this.rowsData.length>0&&(this.columnDefinitions=kt.generateColumns(this.rowsData[0])),this.$fastController.isConnected&&this.toggleGeneratedHeader()}columnDefinitionsChanged(){null!==this.columnDefinitions?(this.generatedGridTemplateColumns=kt.generateTemplateColumns(this.columnDefinitions),this.$fastController.isConnected&&(this.columnDefinitionsStale=!0,this.queueRowIndexUpdate())):this.generatedGridTemplateColumns=""}headerCellItemTemplateChanged(){this.$fastController.isConnected&&null!==this.generatedHeader&&(this.generatedHeader.headerCellItemTemplate=this.headerCellItemTemplate)}focusRowIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}focusColumnIndexChanged(){this.$fastController.isConnected&&this.queueFocusUpdate()}connectedCallback(){super.connectedCallback(),void 0===this.rowItemTemplate&&(this.rowItemTemplate=this.defaultRowItemTemplate),this.rowsPlaceholder=document.createComment(""),this.appendChild(this.rowsPlaceholder),this.toggleGeneratedHeader(),this.rowsRepeatBehavior=new s.RepeatDirective((e=>e.rowsData),(e=>e.rowItemTemplate),{positioning:!0}).createBehavior(this.rowsPlaceholder),this.$fastController.addBehaviors([this.rowsRepeatBehavior]),this.addEventListener("row-focused",this.handleRowFocus),this.addEventListener(Pe,this.handleFocus),this.addEventListener(He,this.handleKeydown),this.addEventListener(Ve,this.handleFocusOut),this.observer=new MutationObserver(this.onChildListChange),this.observer.observe(this,{childList:!0}),this.noTabbing&&this.setAttribute("tabindex","-1"),s.DOM.queueUpdate(this.queueRowIndexUpdate)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("row-focused",this.handleRowFocus),this.removeEventListener(Pe,this.handleFocus),this.removeEventListener(He,this.handleKeydown),this.removeEventListener(Ve,this.handleFocusOut),this.observer.disconnect(),this.rowsPlaceholder=null,this.generatedHeader=null}handleRowFocus(e){this.isUpdatingFocus=!0;const t=e.target;this.focusRowIndex=this.rowElements.indexOf(t),this.focusColumnIndex=t.focusColumnIndex,this.setAttribute("tabIndex","-1"),this.isUpdatingFocus=!1}handleFocus(e){this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}handleFocusOut(e){null!==e.relatedTarget&&this.contains(e.relatedTarget)||this.setAttribute("tabIndex",this.noTabbing?"-1":"0")}handleKeydown(e){if(e.defaultPrevented)return;let t;const i=this.rowElements.length-1,s=this.offsetHeight+this.scrollTop,o=this.rowElements[i];switch(e.key){case be:e.preventDefault(),this.focusOnCell(this.focusRowIndex-1,this.focusColumnIndex,!0);break;case me:e.preventDefault(),this.focusOnCell(this.focusRowIndex+1,this.focusColumnIndex,!0);break;case"PageUp":if(e.preventDefault(),0===this.rowElements.length){this.focusOnCell(0,0,!1);break}if(0===this.focusRowIndex)return void this.focusOnCell(0,this.focusColumnIndex,!1);for(t=this.focusRowIndex-1;t>=0;t--){const e=this.rowElements[t];if(e.offsetTop<this.scrollTop){this.scrollTop=e.offsetTop+e.clientHeight-this.clientHeight;break}}this.focusOnCell(t,this.focusColumnIndex,!1);break;case"PageDown":if(e.preventDefault(),0===this.rowElements.length){this.focusOnCell(0,0,!1);break}if(this.focusRowIndex>=i||o.offsetTop+o.offsetHeight<=s)return void this.focusOnCell(i,this.focusColumnIndex,!1);for(t=this.focusRowIndex+1;t<=i;t++){const e=this.rowElements[t];if(e.offsetTop+e.offsetHeight>s){let t=0;this.generateHeader===gt.sticky&&null!==this.generatedHeader&&(t=this.generatedHeader.clientHeight),this.scrollTop=e.offsetTop-t;break}}this.focusOnCell(t,this.focusColumnIndex,!1);break;case Ce:e.ctrlKey&&(e.preventDefault(),this.focusOnCell(0,0,!0));break;case xe:e.ctrlKey&&null!==this.columnDefinitions&&(e.preventDefault(),this.focusOnCell(this.rowElements.length-1,this.columnDefinitions.length-1,!0))}}queueFocusUpdate(){this.isUpdatingFocus&&(this.contains(document.activeElement)||this===document.activeElement)||!1===this.pendingFocusUpdate&&(this.pendingFocusUpdate=!0,s.DOM.queueUpdate((()=>this.updateFocus())))}updateFocus(){this.pendingFocusUpdate=!1,this.focusOnCell(this.focusRowIndex,this.focusColumnIndex,!0)}toggleGeneratedHeader(){if(null!==this.generatedHeader&&(this.removeChild(this.generatedHeader),this.generatedHeader=null),this.generateHeader!==gt.none&&this.rowsData.length>0){const e=document.createElement(this.rowElementTag);return this.generatedHeader=e,this.generatedHeader.columnDefinitions=this.columnDefinitions,this.generatedHeader.gridTemplateColumns=this.gridTemplateColumns,this.generatedHeader.rowType=this.generateHeader===gt.sticky?Ct.stickyHeader:Ct.header,void(null===this.firstChild&&null===this.rowsPlaceholder||this.insertBefore(e,null!==this.firstChild?this.firstChild:this.rowsPlaceholder))}}}kt.generateColumns=e=>Object.getOwnPropertyNames(e).map(((e,t)=>({columnDataKey:e,gridColumn:`${t}`}))),(0,h.__decorate)([(0,s.attr)({attribute:"no-tabbing",mode:"boolean"})],kt.prototype,"noTabbing",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"generate-header"})],kt.prototype,"generateHeader",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"grid-template-columns"})],kt.prototype,"gridTemplateColumns",void 0),(0,h.__decorate)([s.observable],kt.prototype,"rowsData",void 0),(0,h.__decorate)([s.observable],kt.prototype,"columnDefinitions",void 0),(0,h.__decorate)([s.observable],kt.prototype,"rowItemTemplate",void 0),(0,h.__decorate)([s.observable],kt.prototype,"cellItemTemplate",void 0),(0,h.__decorate)([s.observable],kt.prototype,"headerCellItemTemplate",void 0),(0,h.__decorate)([s.observable],kt.prototype,"focusRowIndex",void 0),(0,h.__decorate)([s.observable],kt.prototype,"focusColumnIndex",void 0),(0,h.__decorate)([s.observable],kt.prototype,"defaultRowItemTemplate",void 0),(0,h.__decorate)([s.observable],kt.prototype,"rowElementTag",void 0),(0,h.__decorate)([s.observable],kt.prototype,"rowElements",void 0);const _t=s.html`
|
|
235
|
-
<div
|
|
236
|
-
class="title"
|
|
237
|
-
part="title"
|
|
238
|
-
aria-label="${e=>e.dateFormatter.getDate(`${e.month}-2-${e.year}`,{month:"long",year:"numeric"})}"
|
|
239
|
-
>
|
|
240
|
-
<span part="month">
|
|
241
|
-
${e=>e.dateFormatter.getMonth(e.month)}
|
|
242
|
-
</span>
|
|
243
|
-
<span part="year">${e=>e.dateFormatter.getYear(e.year)}</span>
|
|
244
|
-
</div>
|
|
245
|
-
`,Tt=e=>{const t=e.tagFor($t);return s.html`
|
|
246
|
-
<${t}
|
|
247
|
-
class="week-day"
|
|
248
|
-
part="week-day"
|
|
249
|
-
tabindex="-1"
|
|
250
|
-
grid-column="${(e,t)=>t.index+1}"
|
|
251
|
-
abbr="${e=>e.abbr}"
|
|
252
|
-
>
|
|
253
|
-
${e=>e.text}
|
|
254
|
-
</${t}>
|
|
255
|
-
`},Ot=(e,t)=>{const i=e.tagFor($t);return s.html`
|
|
256
|
-
<${i}
|
|
257
|
-
class="${(e,i)=>i.parentContext.parent.getDayClassNames(e,t)}"
|
|
258
|
-
part="day"
|
|
259
|
-
tabindex="-1"
|
|
260
|
-
role="gridcell"
|
|
261
|
-
grid-column="${(e,t)=>t.index+1}"
|
|
262
|
-
@click="${(e,t)=>t.parentContext.parent.handleDateSelect(t.event,e)}"
|
|
263
|
-
@keydown="${(e,t)=>t.parentContext.parent.handleKeydown(t.event,e)}"
|
|
264
|
-
aria-label="${(e,t)=>t.parentContext.parent.dateFormatter.getDate(`${e.month}-${e.day}-${e.year}`,{month:"long",day:"numeric"})}"
|
|
265
|
-
>
|
|
266
|
-
<div
|
|
267
|
-
class="date"
|
|
268
|
-
part="${e=>t===`${e.month}-${e.day}-${e.year}`?"today":"date"}"
|
|
269
|
-
>
|
|
270
|
-
${(e,t)=>t.parentContext.parent.dateFormatter.getDay(e.day)}
|
|
271
|
-
</div>
|
|
272
|
-
<slot name="${e=>e.month}-${e=>e.day}-${e=>e.year}"></slot>
|
|
273
|
-
</${i}>
|
|
274
|
-
`},Et=(e,t)=>{const i=e.tagFor(It);return s.html`
|
|
275
|
-
<${i}
|
|
276
|
-
class="week"
|
|
277
|
-
part="week"
|
|
278
|
-
role="row"
|
|
279
|
-
role-type="default"
|
|
280
|
-
grid-template-columns="1fr 1fr 1fr 1fr 1fr 1fr 1fr"
|
|
281
|
-
>
|
|
282
|
-
${(0,s.repeat)((e=>e),Ot(e,t),{positioning:!0})}
|
|
283
|
-
</${i}>
|
|
284
|
-
`},St=(e,t)=>{const i=e.tagFor(kt),o=e.tagFor(It);return s.html`
|
|
285
|
-
<${i} class="days interact" part="days" generate-header="none">
|
|
286
|
-
<${o}
|
|
287
|
-
class="week-days"
|
|
288
|
-
part="week-days"
|
|
289
|
-
role="row"
|
|
290
|
-
row-type="header"
|
|
291
|
-
grid-template-columns="1fr 1fr 1fr 1fr 1fr 1fr 1fr"
|
|
292
|
-
>
|
|
293
|
-
${(0,s.repeat)((e=>e.getWeekdayText()),Tt(e),{positioning:!0})}
|
|
294
|
-
</${o}>
|
|
295
|
-
${(0,s.repeat)((e=>e.getDays()),Et(e,t))}
|
|
296
|
-
</${i}>
|
|
297
|
-
`},Rt=e=>s.html`
|
|
298
|
-
<div class="days" part="days">
|
|
299
|
-
<div class="week-days" part="week-days">
|
|
300
|
-
${(0,s.repeat)((e=>e.getWeekdayText()),s.html`
|
|
301
|
-
<div class="week-day" part="week-day" abbr="${e=>e.abbr}">
|
|
302
|
-
${e=>e.text}
|
|
303
|
-
</div>
|
|
304
|
-
`)}
|
|
305
|
-
</div>
|
|
306
|
-
${(0,s.repeat)((e=>e.getDays()),s.html`
|
|
307
|
-
<div class="week">
|
|
308
|
-
${(0,s.repeat)((e=>e),s.html`
|
|
309
|
-
<div
|
|
310
|
-
class="${(t,i)=>i.parentContext.parent.getDayClassNames(t,e)}"
|
|
311
|
-
part="day"
|
|
312
|
-
aria-label="${(e,t)=>t.parentContext.parent.dateFormatter.getDate(`${e.month}-${e.day}-${e.year}`,{month:"long",day:"numeric"})}"
|
|
313
|
-
>
|
|
314
|
-
<div
|
|
315
|
-
class="date"
|
|
316
|
-
part="${t=>e===`${t.month}-${t.day}-${t.year}`?"today":"date"}"
|
|
317
|
-
>
|
|
318
|
-
${(e,t)=>t.parentContext.parent.dateFormatter.getDay(e.day)}
|
|
319
|
-
</div>
|
|
320
|
-
<slot
|
|
321
|
-
name="${e=>e.month}-${e=>e.day}-${e=>e.year}"
|
|
322
|
-
></slot>
|
|
323
|
-
</div>
|
|
324
|
-
`)}
|
|
325
|
-
</div>
|
|
326
|
-
`)}
|
|
327
|
-
</div>
|
|
328
|
-
`,Dt=(e,t)=>{var i;const o=new Date,n=`${o.getMonth()+1}-${o.getDate()}-${o.getFullYear()}`;return s.html`
|
|
329
|
-
<template>
|
|
330
|
-
${l}
|
|
331
|
-
${t.title instanceof Function?t.title(e,t):null!==(i=t.title)&&void 0!==i?i:""}
|
|
332
|
-
<slot></slot>
|
|
333
|
-
${(0,s.when)((e=>!1===e.readonly),St(e,n))}
|
|
334
|
-
${(0,s.when)((e=>!0===e.readonly),Rt(n))}
|
|
335
|
-
${a}
|
|
336
|
-
</template>
|
|
337
|
-
`},At=(e,t)=>s.html`
|
|
338
|
-
<slot></slot>
|
|
339
|
-
`;class Ft extends ae{}const Lt=(e,t)=>s.html`
|
|
340
|
-
<template
|
|
341
|
-
role="checkbox"
|
|
342
|
-
aria-checked="${e=>e.checked}"
|
|
343
|
-
aria-required="${e=>e.required}"
|
|
344
|
-
aria-disabled="${e=>e.disabled}"
|
|
345
|
-
aria-readonly="${e=>e.readOnly}"
|
|
346
|
-
tabindex="${e=>e.disabled?null:0}"
|
|
347
|
-
@keypress="${(e,t)=>e.keypressHandler(t.event)}"
|
|
348
|
-
@click="${(e,t)=>e.clickHandler(t.event)}"
|
|
349
|
-
class="${e=>e.readOnly?"readonly":""} ${e=>e.checked?"checked":""} ${e=>e.indeterminate?"indeterminate":""}"
|
|
350
|
-
>
|
|
351
|
-
<div part="control" class="control">
|
|
352
|
-
<slot name="checked-indicator">
|
|
353
|
-
${t.checkedIndicator||""}
|
|
354
|
-
</slot>
|
|
355
|
-
<slot name="indeterminate-indicator">
|
|
356
|
-
${t.indeterminateIndicator||""}
|
|
357
|
-
</slot>
|
|
358
|
-
</div>
|
|
359
|
-
<label
|
|
360
|
-
part="label"
|
|
361
|
-
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
|
|
362
|
-
>
|
|
363
|
-
<slot ${(0,s.slotted)("defaultSlottedNodes")}></slot>
|
|
364
|
-
</label>
|
|
365
|
-
</template>
|
|
366
|
-
`;class Pt extends ae{}class Mt extends(ct(Pt)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Vt extends Mt{constructor(){super(),this.initialValue="on",this.indeterminate=!1,this.keypressHandler=e=>{if(!this.readOnly&&e.key===we)this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked},this.clickHandler=e=>{this.disabled||this.readOnly||(this.indeterminate&&(this.indeterminate=!1),this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}}(0,h.__decorate)([(0,s.attr)({attribute:"readonly",mode:"boolean"})],Vt.prototype,"readOnly",void 0),(0,h.__decorate)([s.observable],Vt.prototype,"defaultSlottedNodes",void 0),(0,h.__decorate)([s.observable],Vt.prototype,"indeterminate",void 0);let Ht=0;function zt(e=""){return`${e}${Ht++}`}var Bt=i(861);function Nt(...e){return e.every((e=>e instanceof HTMLElement))}let qt;function Ut(e){return Nt(e)&&("option"===e.getAttribute("role")||e instanceof HTMLOptionElement)}class jt extends ae{constructor(e,t,i,s){super(),this.defaultSelected=!1,this.dirtySelected=!1,this.selected=this.defaultSelected,this.dirtyValue=!1,e&&(this.textContent=e),t&&(this.initialValue=t),i&&(this.defaultSelected=i),s&&(this.selected=s),this.proxy=new Option(`${this.textContent}`,this.initialValue,this.defaultSelected,this.selected),this.proxy.disabled=this.disabled}checkedChanged(e,t){this.ariaChecked="boolean"!=typeof t?null:t?"true":"false"}contentChanged(e,t){this.proxy instanceof HTMLOptionElement&&(this.proxy.textContent=this.textContent),this.$emit("contentchange",null,{bubbles:!0})}defaultSelectedChanged(){this.dirtySelected||(this.selected=this.defaultSelected,this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.defaultSelected))}disabledChanged(e,t){this.ariaDisabled=this.disabled?"true":"false",this.proxy instanceof HTMLOptionElement&&(this.proxy.disabled=this.disabled)}selectedAttributeChanged(){this.defaultSelected=this.selectedAttribute,this.proxy instanceof HTMLOptionElement&&(this.proxy.defaultSelected=this.defaultSelected)}selectedChanged(){this.ariaSelected=this.selected?"true":"false",this.dirtySelected||(this.dirtySelected=!0),this.proxy instanceof HTMLOptionElement&&(this.proxy.selected=this.selected)}initialValueChanged(e,t){this.dirtyValue||(this.value=this.initialValue,this.dirtyValue=!1)}get label(){var e;return null!==(e=this.value)&&void 0!==e?e:this.text}get text(){var e,t;return null!==(t=null===(e=this.textContent)||void 0===e?void 0:e.replace(/\s+/g," ").trim())&&void 0!==t?t:""}set value(e){const t=`${null!=e?e:""}`;this._value=t,this.dirtyValue=!0,this.proxy instanceof HTMLOptionElement&&(this.proxy.value=t),s.Observable.notify(this,"value")}get value(){var e;return s.Observable.track(this,"value"),null!==(e=this._value)&&void 0!==e?e:this.text}get form(){return this.proxy?this.proxy.form:null}}(0,h.__decorate)([s.observable],jt.prototype,"checked",void 0),(0,h.__decorate)([s.observable],jt.prototype,"content",void 0),(0,h.__decorate)([s.observable],jt.prototype,"defaultSelected",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],jt.prototype,"disabled",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"selected",mode:"boolean"})],jt.prototype,"selectedAttribute",void 0),(0,h.__decorate)([s.observable],jt.prototype,"selected",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"value",mode:"fromView"})],jt.prototype,"initialValue",void 0);class Wt{}(0,h.__decorate)([s.observable],Wt.prototype,"ariaChecked",void 0),(0,h.__decorate)([s.observable],Wt.prototype,"ariaPosInSet",void 0),(0,h.__decorate)([s.observable],Wt.prototype,"ariaSelected",void 0),(0,h.__decorate)([s.observable],Wt.prototype,"ariaSetSize",void 0),he(Wt,Re),he(jt,o,Wt);class Kt extends ae{constructor(){super(...arguments),this._options=[],this.selectedIndex=-1,this.selectedOptions=[],this.shouldSkipFocus=!1,this.typeaheadBuffer="",this.typeaheadExpired=!0,this.typeaheadTimeout=-1}get firstSelectedOption(){var e;return null!==(e=this.selectedOptions[0])&&void 0!==e?e:null}get hasSelectableOptions(){return this.options.length>0&&!this.options.every((e=>e.disabled))}get length(){var e,t;return null!==(t=null===(e=this.options)||void 0===e?void 0:e.length)&&void 0!==t?t:0}get options(){return s.Observable.track(this,"options"),this._options}set options(e){this._options=e,s.Observable.notify(this,"options")}get typeAheadExpired(){return this.typeaheadExpired}set typeAheadExpired(e){this.typeaheadExpired=e}clickHandler(e){const t=e.target.closest("option,[role=option]");if(t&&!t.disabled)return this.selectedIndex=this.options.indexOf(t),!0}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(document.activeElement)&&null!==e&&(e.focus(),requestAnimationFrame((()=>{e.scrollIntoView({block:"nearest"})})))}focusinHandler(e){this.shouldSkipFocus||e.target!==e.currentTarget||(this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}getTypeaheadMatches(){const e=this.typeaheadBuffer.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&"),t=new RegExp(`^${e}`,"gi");return this.options.filter((e=>e.text.trim().match(t)))}getSelectableIndex(e=this.selectedIndex,t){const i=e>t?-1:e<t?1:0,s=e+i;let o=null;switch(i){case-1:o=this.options.reduceRight(((e,t,i)=>!e&&!t.disabled&&i<s?t:e),o);break;case 1:o=this.options.reduce(((e,t,i)=>!e&&!t.disabled&&i>s?t:e),o)}return this.options.indexOf(o)}handleChange(e,t){if("selected"===t)Kt.slottedOptionFilter(e)&&(this.selectedIndex=this.options.indexOf(e)),this.setSelectedOptions()}handleTypeAhead(e){this.typeaheadTimeout&&window.clearTimeout(this.typeaheadTimeout),this.typeaheadTimeout=window.setTimeout((()=>this.typeaheadExpired=!0),Kt.TYPE_AHEAD_TIMEOUT_MS),e.length>1||(this.typeaheadBuffer=`${this.typeaheadExpired?"":this.typeaheadBuffer}${e}`)}keydownHandler(e){if(this.disabled)return!0;this.shouldSkipFocus=!1;const t=e.key;switch(t){case Ce:e.shiftKey||(e.preventDefault(),this.selectFirstOption());break;case me:e.shiftKey||(e.preventDefault(),this.selectNextOption());break;case be:e.shiftKey||(e.preventDefault(),this.selectPreviousOption());break;case xe:e.preventDefault(),this.selectLastOption();break;case $e:return this.focusAndScrollOptionIntoView(),!0;case ge:case ye:return!0;case we:if(this.typeaheadExpired)return!0;default:return 1===t.length&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){return this.shouldSkipFocus=!this.contains(document.activeElement),!0}multipleChanged(e,t){this.ariaMultiSelectable=t?"true":null}selectedIndexChanged(e,t){var i;if(this.hasSelectableOptions){if((null===(i=this.options[this.selectedIndex])||void 0===i?void 0:i.disabled)&&"number"==typeof e){const i=this.getSelectableIndex(e,t),s=i>-1?i:e;return this.selectedIndex=s,void(t===s&&this.selectedIndexChanged(t,s))}this.setSelectedOptions()}else this.selectedIndex=-1}selectedOptionsChanged(e,t){var i;const o=t.filter(Kt.slottedOptionFilter);null===(i=this.options)||void 0===i||i.forEach((e=>{const t=s.Observable.getNotifier(e);t.unsubscribe(this,"selected"),e.selected=o.includes(e),t.subscribe(this,"selected")}))}selectFirstOption(){var e,t;this.disabled||(this.selectedIndex=null!==(t=null===(e=this.options)||void 0===e?void 0:e.findIndex((e=>!e.disabled)))&&void 0!==t?t:-1)}selectLastOption(){this.disabled||(this.selectedIndex=function(e,t){let i=e.length;for(;i--;)if(t(e[i],i,e))return i;return-1}(this.options,(e=>!e.disabled)))}selectNextOption(){!this.disabled&&this.selectedIndex<this.options.length-1&&(this.selectedIndex+=1)}selectPreviousOption(){!this.disabled&&this.selectedIndex>0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){var e,t;this.selectedIndex=null!==(t=null===(e=this.options)||void 0===e?void 0:e.findIndex((e=>e.defaultSelected)))&&void 0!==t?t:-1}setSelectedOptions(){var e,t,i;(null===(e=this.options)||void 0===e?void 0:e.length)&&(this.selectedOptions=[this.options[this.selectedIndex]],this.ariaActiveDescendant=null!==(i=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.id)&&void 0!==i?i:"",this.focusAndScrollOptionIntoView())}slottedOptionsChanged(e,t){this.options=t.reduce(((e,t)=>(Ut(t)&&e.push(t),e)),[]);const i=`${this.options.length}`;this.options.forEach(((e,t)=>{e.id||(e.id=zt("option-")),e.ariaPosInSet=`${t+1}`,e.ariaSetSize=i})),this.$fastController.isConnected&&(this.setSelectedOptions(),this.setDefaultSelectedOption())}typeaheadBufferChanged(e,t){if(this.$fastController.isConnected){const e=this.getTypeaheadMatches();if(e.length){const t=this.options.indexOf(e[0]);t>-1&&(this.selectedIndex=t)}this.typeaheadExpired=!1}}}Kt.slottedOptionFilter=e=>Ut(e)&&!e.hidden,Kt.TYPE_AHEAD_TIMEOUT_MS=1e3,(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Kt.prototype,"disabled",void 0),(0,h.__decorate)([s.observable],Kt.prototype,"selectedIndex",void 0),(0,h.__decorate)([s.observable],Kt.prototype,"selectedOptions",void 0),(0,h.__decorate)([s.observable],Kt.prototype,"slottedOptions",void 0),(0,h.__decorate)([s.observable],Kt.prototype,"typeaheadBuffer",void 0);class Gt{}(0,h.__decorate)([s.observable],Gt.prototype,"ariaActiveDescendant",void 0),(0,h.__decorate)([s.observable],Gt.prototype,"ariaDisabled",void 0),(0,h.__decorate)([s.observable],Gt.prototype,"ariaExpanded",void 0),(0,h.__decorate)([s.observable],Gt.prototype,"ariaMultiSelectable",void 0),he(Gt,Re),he(Kt,Gt);const Yt={above:"above",below:"below"};class Xt extends Kt{}class Qt extends(ht(Xt)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const Zt={inline:"inline",list:"list",both:"both",none:"none"};class Jt extends Qt{constructor(){super(...arguments),this._value="",this.filteredOptions=[],this.filter="",this.forcedPosition=!1,this.listboxId=zt("listbox-"),this.maxHeight=0,this.open=!1}formResetCallback(){super.formResetCallback(),this.setDefaultSelectedOption(),this.updateValue()}validate(){super.validate(this.control)}get isAutocompleteInline(){return this.autocomplete===Zt.inline||this.isAutocompleteBoth}get isAutocompleteList(){return this.autocomplete===Zt.list||this.isAutocompleteBoth}get isAutocompleteBoth(){return this.autocomplete===Zt.both}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),void s.DOM.queueUpdate((()=>this.focus()));this.ariaControls="",this.ariaExpanded="false"}get options(){return s.Observable.track(this,"options"),this.filteredOptions.length?this.filteredOptions:this._options}set options(e){this._options=e,s.Observable.notify(this,"options")}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}positionChanged(e,t){this.positionAttribute=t,this.setPositioning()}get value(){return s.Observable.track(this,"value"),this._value}set value(e){var t,i,o;const n=`${this._value}`;if(this.$fastController.isConnected&&this.options){const s=this.options.findIndex((t=>t.text.toLowerCase()===e.toLowerCase())),n=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(i=this.options[s])||void 0===i?void 0:i.text;this.selectedIndex=n!==r?s:this.selectedIndex,e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e}n!==e&&(this._value=e,super.valueChanged(n,e),s.Observable.notify(this,"value"))}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.clearSelectionRange(),this.updateValue(!0)}return this.open=!this.open,this.open&&this.control.focus(),!0}}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.value&&(this.initialValue=this.value)}disabledChanged(e,t){super.disabledChanged&&super.disabledChanged(e,t),this.ariaDisabled=this.disabled?"true":"false"}filterOptions(){this.autocomplete&&this.autocomplete!==Zt.none||(this.filter="");const e=this.filter.toLowerCase();this.filteredOptions=this._options.filter((e=>e.text.toLowerCase().startsWith(this.filter.toLowerCase()))),this.isAutocompleteList&&(this.filteredOptions.length||e||(this.filteredOptions=this._options),this._options.forEach((e=>{e.hidden=!this.filteredOptions.includes(e)})))}focusAndScrollOptionIntoView(){this.contains(document.activeElement)&&(this.control.focus(),this.firstSelectedOption&&requestAnimationFrame((()=>{var e;null===(e=this.firstSelectedOption)||void 0===e||e.scrollIntoView({block:"nearest"})})))}focusoutHandler(e){if(this.syncValue(),!this.open)return!0;const t=e.relatedTarget;this.isSameNode(t)?this.focus():this.options&&this.options.includes(t)||(this.open=!1)}inputHandler(e){if(this.filter=this.control.value,this.filterOptions(),this.isAutocompleteInline||(this.selectedIndex=this.options.map((e=>e.text)).indexOf(this.control.value)),e.inputType.includes("deleteContent")||!this.filter.length)return!0;this.isAutocompleteList&&!this.open&&(this.open=!0),this.isAutocompleteInline&&(this.filteredOptions.length?(this.selectedOptions=[this.filteredOptions[0]],this.selectedIndex=this.options.indexOf(this.firstSelectedOption),this.setInlineSelection()):this.selectedIndex=-1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":this.syncValue(),this.isAutocompleteInline&&(this.filter=this.value),this.open=!1,this.clearSelectionRange();break;case"Escape":if(this.isAutocompleteInline||(this.selectedIndex=-1),this.open){this.open=!1;break}this.value="",this.control.value="",this.filter="",this.filterOptions();break;case"Tab":if(this.setInputToSelection(),!this.open)return!0;e.preventDefault(),this.open=!1;break;case"ArrowUp":case"ArrowDown":if(this.filterOptions(),!this.open){this.open=!0;break}this.filteredOptions.length>0&&super.keydownHandler(e),this.isAutocompleteInline&&this.setInlineSelection();break;default:return!0}}keyupHandler(e){switch(e.key){case"ArrowLeft":case"ArrowRight":case"Backspace":case"Delete":case"Home":case"End":this.filter=this.control.value,this.selectedIndex=-1,this.filterOptions()}}selectedIndexChanged(e,t){if(this.$fastController.isConnected){if((t=_e(-1,this.options.length-1,t))!==this.selectedIndex)return void(this.selectedIndex=t);super.selectedIndexChanged(e,t)}}selectPreviousOption(){!this.disabled&&this.selectedIndex>=0&&(this.selectedIndex=this.selectedIndex-1)}setDefaultSelectedOption(){if(this.$fastController.isConnected&&this.options){const e=this.options.findIndex((e=>null!==e.getAttribute("selected")||e.selected));this.selectedIndex=e,!this.dirtyValue&&this.firstSelectedOption&&(this.value=this.firstSelectedOption.text),this.setSelectedOptions()}}setInputToSelection(){this.firstSelectedOption&&(this.control.value=this.firstSelectedOption.text,this.control.focus())}setInlineSelection(){this.firstSelectedOption&&(this.setInputToSelection(),this.control.setSelectionRange(this.filter.length,this.control.value.length,"backward"))}syncValue(){var e;const t=this.selectedIndex>-1?null===(e=this.firstSelectedOption)||void 0===e?void 0:e.text:this.control.value;this.updateValue(this.value!==t)}setPositioning(){const e=this.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.position=this.forcedPosition?this.positionAttribute:e.top>t?Yt.above:Yt.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Yt.above?~~e.top:~~t}selectedOptionsChanged(e,t){this.$fastController.isConnected&&this._options.forEach((e=>{e.selected=t.includes(e)}))}slottedOptionsChanged(e,t){super.slottedOptionsChanged(e,t),this.updateValue()}updateValue(e){var t;this.$fastController.isConnected&&(this.value=(null===(t=this.firstSelectedOption)||void 0===t?void 0:t.text)||this.control.value,this.control.value=this.value),e&&this.$emit("change")}clearSelectionRange(){const e=this.control.value.length;this.control.setSelectionRange(e,e)}}(0,h.__decorate)([(0,s.attr)({attribute:"autocomplete",mode:"fromView"})],Jt.prototype,"autocomplete",void 0),(0,h.__decorate)([s.observable],Jt.prototype,"maxHeight",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"open",mode:"boolean"})],Jt.prototype,"open",void 0),(0,h.__decorate)([s.attr],Jt.prototype,"placeholder",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"position"})],Jt.prototype,"positionAttribute",void 0),(0,h.__decorate)([s.observable],Jt.prototype,"position",void 0);class ei{}(0,h.__decorate)([s.observable],ei.prototype,"ariaAutoComplete",void 0),(0,h.__decorate)([s.observable],ei.prototype,"ariaControls",void 0),he(ei,Gt),he(Jt,o,ei);const ti=(e,t)=>s.html`
|
|
367
|
-
<template
|
|
368
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
369
|
-
autocomplete="${e=>e.autocomplete}"
|
|
370
|
-
class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}"
|
|
371
|
-
?open="${e=>e.open}"
|
|
372
|
-
tabindex="${e=>e.disabled?null:"0"}"
|
|
373
|
-
@click="${(e,t)=>e.clickHandler(t.event)}"
|
|
374
|
-
@focusout="${(e,t)=>e.focusoutHandler(t.event)}"
|
|
375
|
-
@keydown="${(e,t)=>e.keydownHandler(t.event)}"
|
|
376
|
-
>
|
|
377
|
-
<div class="control" part="control">
|
|
378
|
-
${r(e,t)}
|
|
379
|
-
<slot name="control">
|
|
380
|
-
<input
|
|
381
|
-
aria-activedescendant="${e=>e.open?e.ariaActiveDescendant:null}"
|
|
382
|
-
aria-autocomplete="${e=>e.ariaAutoComplete}"
|
|
383
|
-
aria-controls="${e=>e.ariaControls}"
|
|
384
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
385
|
-
aria-expanded="${e=>e.ariaExpanded}"
|
|
386
|
-
aria-haspopup="listbox"
|
|
387
|
-
class="selected-value"
|
|
388
|
-
part="selected-value"
|
|
389
|
-
placeholder="${e=>e.placeholder}"
|
|
390
|
-
role="combobox"
|
|
391
|
-
type="text"
|
|
392
|
-
?disabled="${e=>e.disabled}"
|
|
393
|
-
:value="${e=>e.value}"
|
|
394
|
-
@input="${(e,t)=>e.inputHandler(t.event)}"
|
|
395
|
-
@keyup="${(e,t)=>e.keyupHandler(t.event)}"
|
|
396
|
-
${(0,s.ref)("control")}
|
|
397
|
-
/>
|
|
398
|
-
<div class="indicator" part="indicator" aria-hidden="true">
|
|
399
|
-
<slot name="indicator">
|
|
400
|
-
${t.indicator||""}
|
|
401
|
-
</slot>
|
|
402
|
-
</div>
|
|
403
|
-
</slot>
|
|
404
|
-
${n(e,t)}
|
|
405
|
-
</div>
|
|
406
|
-
<div
|
|
407
|
-
class="listbox"
|
|
408
|
-
id="${e=>e.listboxId}"
|
|
409
|
-
part="listbox"
|
|
410
|
-
role="listbox"
|
|
411
|
-
?disabled="${e=>e.disabled}"
|
|
412
|
-
?hidden="${e=>!e.open}"
|
|
413
|
-
${(0,s.ref)("listbox")}
|
|
414
|
-
>
|
|
415
|
-
<slot
|
|
416
|
-
${(0,s.slotted)({filter:Kt.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
|
|
417
|
-
></slot>
|
|
418
|
-
</div>
|
|
419
|
-
</template>
|
|
420
|
-
`;const ii=(e,t)=>{const i=function(e){const t=e.tagFor(It);return s.html`
|
|
421
|
-
<${t}
|
|
422
|
-
:rowData="${e=>e}"
|
|
423
|
-
:cellItemTemplate="${(e,t)=>t.parent.cellItemTemplate}"
|
|
424
|
-
:headerCellItemTemplate="${(e,t)=>t.parent.headerCellItemTemplate}"
|
|
425
|
-
></${t}>
|
|
426
|
-
`}(e),o=e.tagFor(It);return s.html`
|
|
427
|
-
<template
|
|
428
|
-
role="grid"
|
|
429
|
-
tabindex="0"
|
|
430
|
-
:rowElementTag="${()=>o}"
|
|
431
|
-
:defaultRowItemTemplate="${i}"
|
|
432
|
-
${(0,s.children)({property:"rowElements",filter:(0,s.elements)("[role=row]")})}
|
|
433
|
-
>
|
|
434
|
-
<slot></slot>
|
|
435
|
-
</template>
|
|
436
|
-
`};const si=(e,t)=>{const i=function(e){const t=e.tagFor($t);return s.html`
|
|
437
|
-
<${t}
|
|
438
|
-
cell-type="${e=>e.isRowHeader?"rowheader":void 0}"
|
|
439
|
-
grid-column="${(e,t)=>t.index+1}"
|
|
440
|
-
:rowData="${(e,t)=>t.parent.rowData}"
|
|
441
|
-
:columnDefinition="${e=>e}"
|
|
442
|
-
></${t}>
|
|
443
|
-
`}(e),o=function(e){const t=e.tagFor($t);return s.html`
|
|
444
|
-
<${t}
|
|
445
|
-
cell-type="columnheader"
|
|
446
|
-
grid-column="${(e,t)=>t.index+1}"
|
|
447
|
-
:columnDefinition="${e=>e}"
|
|
448
|
-
></${t}>
|
|
449
|
-
`}(e);return s.html`
|
|
450
|
-
<template
|
|
451
|
-
role="row"
|
|
452
|
-
class="${e=>"default"!==e.rowType?e.rowType:""}"
|
|
453
|
-
:defaultCellItemTemplate="${i}"
|
|
454
|
-
:defaultHeaderCellItemTemplate="${o}"
|
|
455
|
-
${(0,s.children)({property:"cellElements",filter:(0,s.elements)('[role="cell"],[role="gridcell"],[role="columnheader"],[role="rowheader"]')})}
|
|
456
|
-
>
|
|
457
|
-
<slot ${(0,s.slotted)("slottedCellElements")}></slot>
|
|
458
|
-
</template>
|
|
459
|
-
`},oi=(e,t)=>s.html`
|
|
460
|
-
<template
|
|
461
|
-
tabindex="-1"
|
|
462
|
-
role="${e=>e.cellType&&"default"!==e.cellType?e.cellType:"gridcell"}"
|
|
463
|
-
class="
|
|
464
|
-
${e=>"columnheader"===e.cellType?"column-header":"rowheader"===e.cellType?"row-header":""}
|
|
465
|
-
"
|
|
466
|
-
>
|
|
467
|
-
<slot></slot>
|
|
468
|
-
</template>
|
|
469
|
-
`;function ni(e){const t=e.parentElement;if(t)return t;{const t=e.getRootNode();if(t.host instanceof HTMLElement)return t.host}return null}function ri(e,t){let i=t;for(;null!==i;){if(i===e)return!0;i=ni(i)}return!1}const ai=document.createElement("div");class li{setProperty(e,t){s.DOM.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){s.DOM.queueUpdate((()=>this.target.removeProperty(e)))}}class di extends li{constructor(){super();const e=new CSSStyleSheet;this.target=e.cssRules[e.insertRule(":root{}")].style,document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}}class hi extends li{constructor(){super(),this.style=document.createElement("style"),document.head.appendChild(this.style);const{sheet:e}=this.style;if(e){const t=e.insertRule(":root{}",e.cssRules.length);this.target=e.cssRules[t].style}}}class ci{constructor(e){this.store=new Map,this.target=null;const t=e.$fastController;this.style=document.createElement("style"),t.addStyles(this.style),s.Observable.getNotifier(t).subscribe(this,"isConnected"),this.handleChange(t,"isConnected")}targetChanged(){if(null!==this.target)for(const[e,t]of this.store.entries())this.target.setProperty(e,t)}setProperty(e,t){this.store.set(e,t),s.DOM.queueUpdate((()=>{null!==this.target&&this.target.setProperty(e,t)}))}removeProperty(e){this.store.delete(e),s.DOM.queueUpdate((()=>{null!==this.target&&this.target.removeProperty(e)}))}handleChange(e,t){const{sheet:i}=this.style;if(i){const e=i.insertRule(":host{}",i.cssRules.length);this.target=i.cssRules[e].style}else this.target=null}}(0,h.__decorate)([s.observable],ci.prototype,"target",void 0);class ui{constructor(e){this.target=e.style}setProperty(e,t){s.DOM.queueUpdate((()=>this.target.setProperty(e,t)))}removeProperty(e){s.DOM.queueUpdate((()=>this.target.removeProperty(e)))}}class pi{setProperty(e,t){pi.properties[e]=t;for(const i of pi.roots.values())fi.getOrCreate(pi.normalizeRoot(i)).setProperty(e,t)}removeProperty(e){delete pi.properties[e];for(const t of pi.roots.values())fi.getOrCreate(pi.normalizeRoot(t)).removeProperty(e)}static registerRoot(e){const{roots:t}=pi;if(!t.has(e)){t.add(e);const i=fi.getOrCreate(this.normalizeRoot(e));for(const e in pi.properties)i.setProperty(e,pi.properties[e])}}static unregisterRoot(e){const{roots:t}=pi;if(t.has(e)){t.delete(e);const i=fi.getOrCreate(pi.normalizeRoot(e));for(const e in pi.properties)i.removeProperty(e)}}static normalizeRoot(e){return e===ai?document:e}}pi.roots=new Set,pi.properties={};const mi=new WeakMap,vi=s.DOM.supportsAdoptedStyleSheets?class extends li{constructor(e){super();const t=new CSSStyleSheet;this.target=t.cssRules[t.insertRule(":host{}")].style,e.$fastController.addStyles(s.ElementStyles.create([t]))}}:ci,fi=Object.freeze({getOrCreate(e){if(mi.has(e))return mi.get(e);let t;return e===ai?t=new pi:e instanceof Document?t=s.DOM.supportsAdoptedStyleSheets?new di:new hi:t=e instanceof s.FASTElement?new vi(e):new ui(e),mi.set(e,t),t}});class bi extends s.CSSDirective{constructor(e){super(),this.subscribers=new WeakMap,this._appliedTo=new Set,this.name=e.name,null!==e.cssCustomPropertyName&&(this.cssCustomProperty=`--${e.cssCustomPropertyName}`,this.cssVar=`var(${this.cssCustomProperty})`),this.id=bi.uniqueId(),bi.tokensById.set(this.id,this)}get appliedTo(){return[...this._appliedTo]}static from(e){return new bi({name:"string"==typeof e?e:e.name,cssCustomPropertyName:"string"==typeof e?e:void 0===e.cssCustomPropertyName?e.name:e.cssCustomPropertyName})}static isCSSDesignToken(e){return"string"==typeof e.cssCustomProperty}static isDerivedDesignTokenValue(e){return"function"==typeof e}static getTokenById(e){return bi.tokensById.get(e)}getOrCreateSubscriberSet(e=this){return this.subscribers.get(e)||this.subscribers.set(e,new Set)&&this.subscribers.get(e)}createCSS(){return this.cssVar||""}getValueFor(e){const t=wi.getOrCreate(e).get(this);if(void 0!==t)return t;throw new Error(`Value could not be retrieved for token named "${this.name}". Ensure the value is set for ${e} or an ancestor of ${e}.`)}setValueFor(e,t){return this._appliedTo.add(e),t instanceof bi&&(t=this.alias(t)),wi.getOrCreate(e).set(this,t),this}deleteValueFor(e){return this._appliedTo.delete(e),wi.existsFor(e)&&wi.getOrCreate(e).delete(this),this}withDefault(e){return this.setValueFor(ai,e),this}subscribe(e,t){const i=this.getOrCreateSubscriberSet(t);t&&!wi.existsFor(t)&&wi.getOrCreate(t),i.has(e)||i.add(e)}unsubscribe(e,t){const i=this.subscribers.get(t||this);i&&i.has(e)&&i.delete(e)}notify(e){const t=Object.freeze({token:this,target:e});this.subscribers.has(this)&&this.subscribers.get(this).forEach((e=>e.handleChange(t))),this.subscribers.has(e)&&this.subscribers.get(e).forEach((e=>e.handleChange(t)))}alias(e){return t=>e.getValueFor(t)}}bi.uniqueId=(()=>{let e=0;return()=>(e++,e.toString(16))})(),bi.tokensById=new Map;class gi{constructor(e,t,i){this.source=e,this.token=t,this.node=i,this.dependencies=new Set,this.observer=s.Observable.binding(e,this,!1),this.observer.handleChange=this.observer.call,this.handleChange()}disconnect(){this.observer.disconnect()}handleChange(){this.node.store.set(this.token,this.observer.observe(this.node.target,s.defaultExecutionContext))}}class yi{constructor(){this.values=new Map}set(e,t){this.values.get(e)!==t&&(this.values.set(e,t),s.Observable.getNotifier(this).notify(e.id))}get(e){return s.Observable.track(this,e.id),this.values.get(e)}delete(e){this.values.delete(e)}all(){return this.values.entries()}}const Ci=new WeakMap,xi=new WeakMap;class wi{constructor(e){this.target=e,this.store=new yi,this.children=[],this.assignedValues=new Map,this.reflecting=new Set,this.bindingObservers=new Map,this.tokenValueChangeHandler={handleChange:(e,t)=>{const i=bi.getTokenById(t);if(i&&(i.notify(this.target),bi.isCSSDesignToken(i))){const t=this.parent,s=this.isReflecting(i);if(t){const o=t.get(i),n=e.get(i);o===n||s?o===n&&s&&this.stopReflectToCSS(i):this.reflectToCSS(i)}else s||this.reflectToCSS(i)}}},Ci.set(e,this),s.Observable.getNotifier(this.store).subscribe(this.tokenValueChangeHandler),e instanceof s.FASTElement?e.$fastController.addBehaviors([this]):e.isConnected&&this.bind()}static getOrCreate(e){return Ci.get(e)||new wi(e)}static existsFor(e){return Ci.has(e)}static findParent(e){if(ai!==e.target){let t=ni(e.target);for(;null!==t;){if(Ci.has(t))return Ci.get(t);t=ni(t)}return wi.getOrCreate(ai)}return null}static findClosestAssignedNode(e,t){let i=t;do{if(i.has(e))return i;i=i.parent?i.parent:i.target!==ai?wi.getOrCreate(ai):null}while(null!==i);return null}get parent(){return xi.get(this)||null}has(e){return this.assignedValues.has(e)}get(e){const t=this.store.get(e);if(void 0!==t)return t;const i=this.getRaw(e);return void 0!==i?(this.hydrate(e,i),this.get(e)):void 0}getRaw(e){var t;return this.assignedValues.has(e)?this.assignedValues.get(e):null===(t=wi.findClosestAssignedNode(e,this))||void 0===t?void 0:t.getRaw(e)}set(e,t){bi.isDerivedDesignTokenValue(this.assignedValues.get(e))&&this.tearDownBindingObserver(e),this.assignedValues.set(e,t),bi.isDerivedDesignTokenValue(t)?this.setupBindingObserver(e,t):this.store.set(e,t)}delete(e){this.assignedValues.delete(e),this.tearDownBindingObserver(e);const t=this.getRaw(e);t?this.hydrate(e,t):this.store.delete(e)}bind(){const e=wi.findParent(this);e&&e.appendChild(this);for(const e of this.assignedValues.keys())e.notify(this.target)}unbind(){if(this.parent){xi.get(this).removeChild(this)}}appendChild(e){e.parent&&xi.get(e).removeChild(e);const t=this.children.filter((t=>e.contains(t)));xi.set(e,this),this.children.push(e),t.forEach((t=>e.appendChild(t))),s.Observable.getNotifier(this.store).subscribe(e);for(const[t,i]of this.store.all())e.hydrate(t,this.bindingObservers.has(t)?this.getRaw(t):i)}removeChild(e){const t=this.children.indexOf(e);return-1!==t&&this.children.splice(t,1),s.Observable.getNotifier(this.store).unsubscribe(e),e.parent===this&&xi.delete(e)}contains(e){return ri(this.target,e.target)}reflectToCSS(e){this.isReflecting(e)||(this.reflecting.add(e),wi.cssCustomPropertyReflector.startReflection(e,this.target))}stopReflectToCSS(e){this.isReflecting(e)&&(this.reflecting.delete(e),wi.cssCustomPropertyReflector.stopReflection(e,this.target))}isReflecting(e){return this.reflecting.has(e)}handleChange(e,t){const i=bi.getTokenById(t);i&&this.hydrate(i,this.getRaw(i))}hydrate(e,t){if(!this.has(e)){const i=this.bindingObservers.get(e);bi.isDerivedDesignTokenValue(t)?i?i.source!==t&&(this.tearDownBindingObserver(e),this.setupBindingObserver(e,t)):this.setupBindingObserver(e,t):(i&&this.tearDownBindingObserver(e),this.store.set(e,t))}}setupBindingObserver(e,t){const i=new gi(t,e,this);return this.bindingObservers.set(e,i),i}tearDownBindingObserver(e){return!!this.bindingObservers.has(e)&&(this.bindingObservers.get(e).disconnect(),this.bindingObservers.delete(e),!0)}}wi.cssCustomPropertyReflector=new class{startReflection(e,t){e.subscribe(this,t),this.handleChange({token:e,target:t})}stopReflection(e,t){e.unsubscribe(this,t),this.remove(e,t)}handleChange(e){const{token:t,target:i}=e;this.add(t,i)}add(e,t){fi.getOrCreate(t).setProperty(e.cssCustomProperty,this.resolveCSSValue(wi.getOrCreate(t).get(e)))}remove(e,t){fi.getOrCreate(t).removeProperty(e.cssCustomProperty)}resolveCSSValue(e){return e&&"function"==typeof e.createCSS?e.createCSS():e}},(0,h.__decorate)([s.observable],wi.prototype,"children",void 0);const $i=Object.freeze({create:function(e){return bi.from(e)},notifyConnection:e=>!(!e.isConnected||!wi.existsFor(e))&&(wi.getOrCreate(e).bind(),!0),notifyDisconnection:e=>!(e.isConnected||!wi.existsFor(e))&&(wi.getOrCreate(e).unbind(),!0),registerRoot(e=ai){pi.registerRoot(e)},unregisterRoot(e=ai){pi.unregisterRoot(e)}}),Ii=Object.freeze({definitionCallbackOnly:null,ignoreDuplicate:Symbol()}),ki=new Map,_i=new Map;let Ti=null;const Oi=y.createInterface((e=>e.cachedCallback((e=>(null===Ti&&(Ti=new Si(null,e)),Ti))))),Ei=Object.freeze({tagFor:e=>_i.get(e),responsibleFor(e){const t=e.$$designSystem$$;if(t)return t;return y.findResponsibleContainer(e).get(Oi)},getOrCreate(e){if(!e)return null===Ti&&(Ti=y.getOrCreateDOMContainer().get(Oi)),Ti;const t=e.$$designSystem$$;if(t)return t;const i=y.getOrCreateDOMContainer(e);if(i.has(Oi,!1))return i.get(Oi);{const t=new Si(e,i);return i.register(Y.instance(Oi,t)),t}}});class Si{constructor(e,t){this.owner=e,this.container=t,this.designTokensInitialized=!1,this.prefix="fast",this.shadowRootMode=void 0,this.disambiguate=()=>Ii.definitionCallbackOnly,null!==e&&(e.$$designSystem$$=this)}withPrefix(e){return this.prefix=e,this}withShadowRootMode(e){return this.shadowRootMode=e,this}withElementDisambiguation(e){return this.disambiguate=e,this}withDesignTokenRoot(e){return this.designTokenRoot=e,this}register(...e){const t=this.container,i=[],s=this.disambiguate,o=this.shadowRootMode,n={elementPrefix:this.prefix,tryDefineElement(e,n,r){const a=function(e,t,i){return"string"==typeof e?{name:e,type:t,callback:i}:e}(e,n,r),{name:l,callback:d,baseClass:h}=a;let{type:c}=a,u=l,p=ki.get(u),m=!0;for(;p;){const e=s(u,c,p);switch(e){case Ii.ignoreDuplicate:return;case Ii.definitionCallbackOnly:m=!1,p=void 0;break;default:u=e,p=ki.get(u)}}m&&((_i.has(c)||c===ae)&&(c=class extends c{}),ki.set(u,c),_i.set(c,u),h&&_i.set(h,u)),i.push(new Ri(t,u,c,o,d,m))}};this.designTokensInitialized||(this.designTokensInitialized=!0,null!==this.designTokenRoot&&$i.registerRoot(this.designTokenRoot)),t.registerWithContext(n,...e);for(const e of i)e.callback(e),e.willDefine&&null!==e.definition&&e.definition.define();return this}}class Ri{constructor(e,t,i,s,o,n){this.container=e,this.name=t,this.type=i,this.shadowRootMode=s,this.callback=o,this.willDefine=n,this.definition=null}definePresentation(e){ne.define(this.name,e,this.container)}defineElement(e){this.definition=new s.FASTElementDefinition(this.type,Object.assign(Object.assign({},e),{name:this.name}))}tagFor(e){return Ei.tagFor(e)}}const Di=(e,t)=>s.html`
|
|
470
|
-
<div class="positioning-region" part="positioning-region">
|
|
471
|
-
${(0,s.when)((e=>e.modal),s.html`
|
|
472
|
-
<div
|
|
473
|
-
class="overlay"
|
|
474
|
-
part="overlay"
|
|
475
|
-
role="presentation"
|
|
476
|
-
@click="${e=>e.dismiss()}"
|
|
477
|
-
></div>
|
|
478
|
-
`)}
|
|
479
|
-
<div
|
|
480
|
-
role="dialog"
|
|
481
|
-
tabindex="-1"
|
|
482
|
-
class="control"
|
|
483
|
-
part="control"
|
|
484
|
-
aria-modal="${e=>e.modal}"
|
|
485
|
-
aria-describedby="${e=>e.ariaDescribedby}"
|
|
486
|
-
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
487
|
-
aria-label="${e=>e.ariaLabel}"
|
|
488
|
-
${(0,s.ref)("dialog")}
|
|
489
|
-
>
|
|
490
|
-
<slot></slot>
|
|
491
|
-
</div>
|
|
492
|
-
</div>
|
|
493
|
-
`;var Ai=i(642);class Fi extends ae{constructor(){super(...arguments),this.modal=!0,this.hidden=!1,this.trapFocus=!0,this.trapFocusChanged=()=>{this.$fastController.isConnected&&this.updateTrapFocus()},this.isTrappingFocus=!1,this.handleDocumentKeydown=e=>{if(!e.defaultPrevented&&!this.hidden)switch(e.key){case ye:this.dismiss(),e.preventDefault();break;case $e:this.handleTabKeyDown(e)}},this.handleDocumentFocus=e=>{!e.defaultPrevented&&this.shouldForceFocus(e.target)&&(this.focusFirstElement(),e.preventDefault())},this.handleTabKeyDown=e=>{if(!this.trapFocus||this.hidden)return;const t=this.getTabQueueBounds();return 0!==t.length?1===t.length?(t[0].focus(),void e.preventDefault()):void(e.shiftKey&&e.target===t[0]?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||e.target!==t[t.length-1]||(t[0].focus(),e.preventDefault())):void 0},this.getTabQueueBounds=()=>Fi.reduceTabbableItems([],this),this.focusFirstElement=()=>{const e=this.getTabQueueBounds();e.length>0?e[0].focus():this.dialog instanceof HTMLElement&&this.dialog.focus()},this.shouldForceFocus=e=>this.isTrappingFocus&&!this.contains(e),this.shouldTrapFocus=()=>this.trapFocus&&!this.hidden,this.updateTrapFocus=e=>{const t=void 0===e?this.shouldTrapFocus():e;t&&!this.isTrappingFocus?(this.isTrappingFocus=!0,document.addEventListener("focusin",this.handleDocumentFocus),s.DOM.queueUpdate((()=>{this.shouldForceFocus(document.activeElement)&&this.focusFirstElement()}))):!t&&this.isTrappingFocus&&(this.isTrappingFocus=!1,document.removeEventListener("focusin",this.handleDocumentFocus))}}dismiss(){this.$emit("dismiss"),this.$emit("cancel")}show(){this.hidden=!1}hide(){this.hidden=!0,this.$emit("close")}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleDocumentKeydown),this.notifier=s.Observable.getNotifier(this),this.notifier.subscribe(this,"hidden"),this.updateTrapFocus()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleDocumentKeydown),this.updateTrapFocus(!1),this.notifier.unsubscribe(this,"hidden")}handleChange(e,t){if("hidden"===t)this.updateTrapFocus()}static reduceTabbableItems(e,t){return"-1"===t.getAttribute("tabindex")?e:(0,Ai.Wq)(t)||Fi.isFocusableFastElement(t)&&Fi.hasTabbableShadow(t)?(e.push(t),e):t.childElementCount?e.concat(Array.from(t.children).reduce(Fi.reduceTabbableItems,[])):e}static isFocusableFastElement(e){var t,i;return!!(null===(i=null===(t=e.$fastController)||void 0===t?void 0:t.definition.shadowOptions)||void 0===i?void 0:i.delegatesFocus)}static hasTabbableShadow(e){var t,i;return Array.from(null!==(i=null===(t=e.shadowRoot)||void 0===t?void 0:t.querySelectorAll("*"))&&void 0!==i?i:[]).some((e=>(0,Ai.Wq)(e)))}}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Fi.prototype,"modal",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Fi.prototype,"hidden",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"trap-focus",mode:"boolean"})],Fi.prototype,"trapFocus",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-describedby"})],Fi.prototype,"ariaDescribedby",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-labelledby"})],Fi.prototype,"ariaLabelledby",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-label"})],Fi.prototype,"ariaLabel",void 0);const Li=new MutationObserver((e=>{for(const t of e)Pi.getOrCreateFor(t.target).notify(t.attributeName)}));class Pi extends s.SubscriberSet{constructor(e){super(e),this.watchedAttributes=new Set,Pi.subscriberCache.set(e,this)}subscribe(e){super.subscribe(e),this.watchedAttributes.has(e.attributes)||(this.watchedAttributes.add(e.attributes),this.observe())}unsubscribe(e){super.unsubscribe(e),this.watchedAttributes.has(e.attributes)&&(this.watchedAttributes.delete(e.attributes),this.observe())}static getOrCreateFor(e){return this.subscriberCache.get(e)||new Pi(e)}observe(){const e=[];for(const t of this.watchedAttributes.values())for(let i=0;i<t.length;i++)e.push(t[i]);Li.observe(this.source,{attributeFilter:e})}}Pi.subscriberCache=new WeakMap;class Mi{constructor(e,t){this.target=e,this.attributes=Object.freeze(t)}bind(e){if(Pi.getOrCreateFor(e).subscribe(this),e.hasAttributes())for(let t=0;t<e.attributes.length;t++)this.handleChange(e,e.attributes[t].name)}unbind(e){Pi.getOrCreateFor(e).unsubscribe(this)}handleChange(e,t){this.attributes.includes(t)&&s.DOM.setAttribute(this.target,t,e.getAttribute(t))}}function Vi(...e){return new s.AttachedBehaviorHTMLDirective("fast-reflect-attr",Mi,e)}const Hi=(e,t)=>s.html`
|
|
494
|
-
<details class="disclosure" ${(0,s.ref)("details")}>
|
|
495
|
-
<summary
|
|
496
|
-
class="invoker"
|
|
497
|
-
role="button"
|
|
498
|
-
aria-controls="disclosure-content"
|
|
499
|
-
aria-expanded="${e=>e.expanded}"
|
|
500
|
-
>
|
|
501
|
-
<slot name="start"></slot>
|
|
502
|
-
<slot name="title">${e=>e.title}</slot>
|
|
503
|
-
<slot name="end"></slot>
|
|
504
|
-
</summary>
|
|
505
|
-
<div id="disclosure-content"><slot></slot></div>
|
|
506
|
-
</details>
|
|
507
|
-
`;class zi extends ae{connectedCallback(){super.connectedCallback(),this.setup()}disconnectedCallback(){super.disconnectedCallback(),this.details.removeEventListener("toggle",this.onToggle)}show(){this.details.open=!0}hide(){this.details.open=!1}toggle(){this.details.open=!this.details.open}setup(){this.onToggle=this.onToggle.bind(this),this.details.addEventListener("toggle",this.onToggle),this.expanded&&this.show()}onToggle(){this.expanded=this.details.open,this.$emit("toggle")}}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],zi.prototype,"expanded",void 0),(0,h.__decorate)([s.attr],zi.prototype,"title",void 0);const Bi=(e,t)=>s.html`
|
|
508
|
-
<template role="${e=>e.role}" aria-orientation="${e=>e.orientation}"></template>
|
|
509
|
-
`,Ni="horizontal",qi="vertical",Ui={separator:"separator",presentation:"presentation"};class ji extends ae{constructor(){super(...arguments),this.role=Ui.separator,this.orientation=Ni}}(0,h.__decorate)([s.attr],ji.prototype,"role",void 0),(0,h.__decorate)([s.attr],ji.prototype,"orientation",void 0);const Wi={next:"next",previous:"previous"},Ki=(e,t)=>s.html`
|
|
510
|
-
<template
|
|
511
|
-
role="button"
|
|
512
|
-
aria-disabled="${e=>!!e.disabled||void 0}"
|
|
513
|
-
tabindex="${e=>e.hiddenFromAT?-1:0}"
|
|
514
|
-
class="${e=>e.direction} ${e=>e.disabled?"disabled":""}"
|
|
515
|
-
@keyup="${(e,t)=>e.keyupHandler(t.event)}"
|
|
516
|
-
>
|
|
517
|
-
${(0,s.when)((e=>e.direction===Wi.next),s.html`
|
|
518
|
-
<span part="next" class="next">
|
|
519
|
-
<slot name="next">
|
|
520
|
-
${t.next||""}
|
|
521
|
-
</slot>
|
|
522
|
-
</span>
|
|
523
|
-
`)}
|
|
524
|
-
${(0,s.when)((e=>e.direction===Wi.previous),s.html`
|
|
525
|
-
<span part="previous" class="previous">
|
|
526
|
-
<slot name="previous">
|
|
527
|
-
${t.previous||""}
|
|
528
|
-
</slot>
|
|
529
|
-
</span>
|
|
530
|
-
`)}
|
|
531
|
-
</template>
|
|
532
|
-
`;class Gi extends ae{constructor(){super(...arguments),this.hiddenFromAT=!0,this.direction=Wi.next}keyupHandler(e){if(!this.hiddenFromAT){const t=e.key;"Enter"!==t&&"Space"!==t||this.$emit("click",e),"Escape"===t&&this.blur()}}}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Gi.prototype,"disabled",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-hidden",converter:s.booleanConverter})],Gi.prototype,"hiddenFromAT",void 0),(0,h.__decorate)([s.attr],Gi.prototype,"direction",void 0);const Yi=(e,t)=>s.html`
|
|
533
|
-
<template
|
|
534
|
-
aria-checked="${e=>e.ariaChecked}"
|
|
535
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
536
|
-
aria-posinset="${e=>e.ariaPosInSet}"
|
|
537
|
-
aria-selected="${e=>e.ariaSelected}"
|
|
538
|
-
aria-setsize="${e=>e.ariaSetSize}"
|
|
539
|
-
class="${e=>[e.checked&&"checked",e.selected&&"selected",e.disabled&&"disabled"].filter(Boolean).join(" ")}"
|
|
540
|
-
role="option"
|
|
541
|
-
>
|
|
542
|
-
${r(e,t)}
|
|
543
|
-
<span class="content" part="content">
|
|
544
|
-
<slot ${(0,s.slotted)("content")}></slot>
|
|
545
|
-
</span>
|
|
546
|
-
${n(e,t)}
|
|
547
|
-
</template>
|
|
548
|
-
`;class Xi extends Kt{constructor(){super(...arguments),this.activeIndex=-1,this.rangeStartIndex=-1}get activeOption(){return this.options[this.activeIndex]}get checkedOptions(){var e;return null===(e=this.options)||void 0===e?void 0:e.filter((e=>e.checked))}get firstSelectedOptionIndex(){return this.options.indexOf(this.firstSelectedOption)}activeIndexChanged(e,t){var i,s;this.ariaActiveDescendant=null!==(s=null===(i=this.options[t])||void 0===i?void 0:i.id)&&void 0!==s?s:"",this.focusAndScrollOptionIntoView()}checkActiveIndex(){if(!this.multiple)return;const e=this.activeOption;e&&(e.checked=!0)}checkFirstOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex+1),this.options.forEach(((e,t)=>{e.checked=Te(t,this.rangeStartIndex)}))):this.uncheckAllOptions(),this.activeIndex=0,this.checkActiveIndex()}checkLastOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach(((e,t)=>{e.checked=Te(t,this.rangeStartIndex,this.options.length)}))):this.uncheckAllOptions(),this.activeIndex=this.options.length-1,this.checkActiveIndex()}connectedCallback(){super.connectedCallback(),this.addEventListener("focusout",this.focusoutHandler)}disconnectedCallback(){this.removeEventListener("focusout",this.focusoutHandler),super.disconnectedCallback()}checkNextOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),this.options.forEach(((e,t)=>{e.checked=Te(t,this.rangeStartIndex,this.activeIndex+1)}))):this.uncheckAllOptions(),this.activeIndex+=this.activeIndex<this.options.length-1?1:0,this.checkActiveIndex()}checkPreviousOption(e=!1){e?(-1===this.rangeStartIndex&&(this.rangeStartIndex=this.activeIndex),1===this.checkedOptions.length&&(this.rangeStartIndex+=1),this.options.forEach(((e,t)=>{e.checked=Te(t,this.activeIndex,this.rangeStartIndex)}))):this.uncheckAllOptions(),this.activeIndex-=this.activeIndex>0?1:0,this.checkActiveIndex()}clickHandler(e){var t;if(!this.multiple)return super.clickHandler(e);const i=null===(t=e.target)||void 0===t?void 0:t.closest("[role=option]");return i&&!i.disabled?(this.uncheckAllOptions(),this.activeIndex=this.options.indexOf(i),this.checkActiveIndex(),this.toggleSelectedForAllCheckedOptions(),!0):void 0}focusAndScrollOptionIntoView(){super.focusAndScrollOptionIntoView(this.activeOption)}focusinHandler(e){if(!this.multiple)return super.focusinHandler(e);this.shouldSkipFocus||e.target!==e.currentTarget||(this.uncheckAllOptions(),-1===this.activeIndex&&(this.activeIndex=-1!==this.firstSelectedOptionIndex?this.firstSelectedOptionIndex:0),this.checkActiveIndex(),this.setSelectedOptions(),this.focusAndScrollOptionIntoView()),this.shouldSkipFocus=!1}focusoutHandler(e){this.multiple&&this.uncheckAllOptions()}keydownHandler(e){if(!this.multiple)return super.keydownHandler(e);if(this.disabled)return!0;const{key:t,shiftKey:i}=e;switch(this.shouldSkipFocus=!1,t){case Ce:return void this.checkFirstOption(i);case me:return void this.checkNextOption(i);case be:return void this.checkPreviousOption(i);case xe:return void this.checkLastOption(i);case $e:return this.focusAndScrollOptionIntoView(),!0;case ye:return this.uncheckAllOptions(),this.checkActiveIndex(),!0;case we:if(e.preventDefault(),this.typeAheadExpired)return void this.toggleSelectedForAllCheckedOptions();default:return 1===t.length&&this.handleTypeAhead(`${t}`),!0}}mousedownHandler(e){if(e.offsetX>=0&&e.offsetX<=this.scrollWidth)return super.mousedownHandler(e)}multipleChanged(e,t){var i;this.ariaMultiSelectable=t?"true":null,null===(i=this.options)||void 0===i||i.forEach((e=>{e.checked=!t&&void 0})),this.setSelectedOptions()}setSelectedOptions(){this.multiple?this.$fastController.isConnected&&this.options&&(this.selectedOptions=this.options.filter((e=>e.selected)),this.focusAndScrollOptionIntoView()):super.setSelectedOptions()}sizeChanged(e,t){var i;const o=Math.max(0,parseInt(null!==(i=null==t?void 0:t.toFixed())&&void 0!==i?i:"",10));o!==t&&s.DOM.queueUpdate((()=>{this.size=o}))}toggleSelectedForAllCheckedOptions(){const e=this.checkedOptions.filter((e=>!e.disabled)),t=!e.every((e=>e.selected));e.forEach((e=>e.selected=t)),this.selectedIndex=this.options.indexOf(e[e.length-1]),this.setSelectedOptions()}typeaheadBufferChanged(e,t){if(this.multiple){if(this.$fastController.isConnected){const e=this.getTypeaheadMatches(),t=this.options.indexOf(e[0]);t>-1&&(this.activeIndex=t,this.uncheckAllOptions(),this.checkActiveIndex()),this.typeAheadExpired=!1}}else super.typeaheadBufferChanged(e,t)}uncheckAllOptions(e=!1){this.options.forEach((e=>e.checked=!this.multiple&&void 0)),e||(this.rangeStartIndex=-1)}}(0,h.__decorate)([s.observable],Xi.prototype,"activeIndex",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Xi.prototype,"multiple",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Xi.prototype,"size",void 0);const Qi=(e,t)=>s.html`
|
|
549
|
-
<template
|
|
550
|
-
aria-activedescendant="${e=>e.ariaActiveDescendant}"
|
|
551
|
-
aria-multiselectable="${e=>e.ariaMultiSelectable}"
|
|
552
|
-
class="listbox"
|
|
553
|
-
role="listbox"
|
|
554
|
-
tabindex="${e=>e.disabled?null:"0"}"
|
|
555
|
-
@click="${(e,t)=>e.clickHandler(t.event)}"
|
|
556
|
-
@focusin="${(e,t)=>e.focusinHandler(t.event)}"
|
|
557
|
-
@keydown="${(e,t)=>e.keydownHandler(t.event)}"
|
|
558
|
-
@mousedown="${(e,t)=>e.mousedownHandler(t.event)}"
|
|
559
|
-
>
|
|
560
|
-
<slot
|
|
561
|
-
${(0,s.slotted)({filter:Xi.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
|
|
562
|
-
></slot>
|
|
563
|
-
</template>
|
|
564
|
-
`;class Zi extends ae{constructor(){super(...arguments),this.optionElements=[]}menuElementsChanged(){this.updateOptions()}headerElementsChanged(){this.updateOptions()}footerElementsChanged(){this.updateOptions()}updateOptions(){this.optionElements.splice(0,this.optionElements.length),this.addSlottedListItems(this.headerElements),this.addSlottedListItems(this.menuElements),this.addSlottedListItems(this.footerElements),this.$emit("optionsupdated",{bubbles:!1})}addSlottedListItems(e){void 0!==e&&e.forEach((e=>{1===e.nodeType&&"listitem"===e.getAttribute("role")&&(e.id=e.id||zt("option-"),this.optionElements.push(e))}))}}(0,h.__decorate)([s.observable],Zi.prototype,"menuElements",void 0),(0,h.__decorate)([s.observable],Zi.prototype,"headerElements",void 0),(0,h.__decorate)([s.observable],Zi.prototype,"footerElements",void 0),(0,h.__decorate)([s.observable],Zi.prototype,"suggestionsAvailableText",void 0);const Ji=s.html`
|
|
565
|
-
<template>
|
|
566
|
-
${e=>e.value}
|
|
567
|
-
</template>
|
|
568
|
-
`;class es extends ae{contentsTemplateChanged(){this.$fastController.isConnected&&this.updateView()}connectedCallback(){super.connectedCallback(),this.updateView()}disconnectedCallback(){super.disconnectedCallback(),this.disconnectView()}handleClick(e){return e.defaultPrevented||this.handleInvoked(),!1}handleInvoked(){this.$emit("pickeroptioninvoked")}updateView(){var e,t;this.disconnectView(),this.customView=null!==(t=null===(e=this.contentsTemplate)||void 0===e?void 0:e.render(this,this))&&void 0!==t?t:Ji.render(this,this)}disconnectView(){var e;null===(e=this.customView)||void 0===e||e.dispose(),this.customView=void 0}}(0,h.__decorate)([(0,s.attr)({attribute:"value"})],es.prototype,"value",void 0),(0,h.__decorate)([s.observable],es.prototype,"contentsTemplate",void 0);class ts extends ae{}const is=s.html`
|
|
569
|
-
<template>
|
|
570
|
-
${e=>e.value}
|
|
571
|
-
</template>
|
|
572
|
-
`;class ss extends ae{contentsTemplateChanged(){this.$fastController.isConnected&&this.updateView()}connectedCallback(){super.connectedCallback(),this.updateView()}disconnectedCallback(){this.disconnectView(),super.disconnectedCallback()}handleKeyDown(e){return!e.defaultPrevented&&(e.key!==ge||(this.handleInvoke(),!1))}handleClick(e){return e.defaultPrevented||this.handleInvoke(),!1}handleInvoke(){this.$emit("pickeriteminvoked")}updateView(){var e,t;this.disconnectView(),this.customView=null!==(t=null===(e=this.contentsTemplate)||void 0===e?void 0:e.render(this,this))&&void 0!==t?t:is.render(this,this)}disconnectView(){var e;null===(e=this.customView)||void 0===e||e.dispose(),this.customView=void 0}}(0,h.__decorate)([(0,s.attr)({attribute:"value"})],ss.prototype,"value",void 0),(0,h.__decorate)([s.observable],ss.prototype,"contentsTemplate",void 0);const os=(e,t)=>{const i=e.tagFor(qe),o=e.tagFor(Zi),n=e.tagFor(ts),r=e.tagFor(ts),a=function(e){const t=e.tagFor(ss);return s.html`
|
|
573
|
-
<${t}
|
|
574
|
-
value="${e=>e}"
|
|
575
|
-
:contentsTemplate="${(e,t)=>t.parent.listItemContentsTemplate}"
|
|
576
|
-
>
|
|
577
|
-
</${t}>
|
|
578
|
-
`}(e),l=function(e){const t=e.tagFor(es);return s.html`
|
|
579
|
-
<${t}
|
|
580
|
-
value="${e=>e}"
|
|
581
|
-
:contentsTemplate="${(e,t)=>t.parent.menuOptionContentsTemplate}"
|
|
582
|
-
>
|
|
583
|
-
</${t}>
|
|
584
|
-
`}(e);return s.html`
|
|
585
|
-
<template
|
|
586
|
-
:selectedListTag="${()=>n}"
|
|
587
|
-
:menuTag="${()=>o}"
|
|
588
|
-
:defaultListItemTemplate="${a}"
|
|
589
|
-
:defaultMenuOptionTemplate="${l}"
|
|
590
|
-
@focusin="${(e,t)=>e.handleFocusIn(t.event)}"
|
|
591
|
-
@focusout="${(e,t)=>e.handleFocusOut(t.event)}"
|
|
592
|
-
@keydown="${(e,t)=>e.handleKeyDown(t.event)}"
|
|
593
|
-
@pickeriteminvoked="${(e,t)=>e.handleItemInvoke(t.event)}"
|
|
594
|
-
@pickeroptioninvoked="${(e,t)=>e.handleOptionInvoke(t.event)}"
|
|
595
|
-
>
|
|
596
|
-
<slot name="list-region"></slot>
|
|
597
|
-
|
|
598
|
-
${(0,s.when)((e=>e.flyoutOpen),s.html`
|
|
599
|
-
<${i}
|
|
600
|
-
class="region"
|
|
601
|
-
part="region"
|
|
602
|
-
auto-update-mode="${e=>e.menuConfig.autoUpdateMode}"
|
|
603
|
-
fixed-placement="${e=>e.menuConfig.fixedPlacement}"
|
|
604
|
-
vertical-positioning-mode="${e=>e.menuConfig.verticalPositioningMode}"
|
|
605
|
-
vertical-default-position="${e=>e.menuConfig.verticalDefaultPosition}"
|
|
606
|
-
vertical-scaling="${e=>e.menuConfig.verticalScaling}"
|
|
607
|
-
vertical-inset="${e=>e.menuConfig.verticalInset}"
|
|
608
|
-
vertical-viewport-lock="${e=>e.menuConfig.verticalViewportLock}"
|
|
609
|
-
horizontal-positioning-mode="${e=>e.menuConfig.horizontalPositioningMode}"
|
|
610
|
-
horizontal-default-position="${e=>e.menuConfig.horizontalDefaultPosition}"
|
|
611
|
-
horizontal-scaling="${e=>e.menuConfig.horizontalScaling}"
|
|
612
|
-
horizontal-inset="${e=>e.menuConfig.horizontalInset}"
|
|
613
|
-
horizontal-viewport-lock="${e=>e.menuConfig.horizontalViewportLock}"
|
|
614
|
-
@loaded="${(e,t)=>e.handleRegionLoaded(t.event)}"
|
|
615
|
-
${(0,s.ref)("region")}
|
|
616
|
-
>
|
|
617
|
-
${(0,s.when)((e=>!e.showNoOptions&&!e.showLoading),s.html`
|
|
618
|
-
<slot name="menu-region"></slot>
|
|
619
|
-
`)}
|
|
620
|
-
${(0,s.when)((e=>e.showNoOptions&&!e.showLoading),s.html`
|
|
621
|
-
<div class="no-options-display" part="no-options-display">
|
|
622
|
-
<slot name="no-options-region">
|
|
623
|
-
${e=>e.noSuggestionsText}
|
|
624
|
-
</slot>
|
|
625
|
-
</div>
|
|
626
|
-
`)}
|
|
627
|
-
${(0,s.when)((e=>e.showLoading),s.html`
|
|
628
|
-
<div class="loading-display" part="loading-display">
|
|
629
|
-
<slot name="loading-region">
|
|
630
|
-
<${r}
|
|
631
|
-
part="loading-progress"
|
|
632
|
-
class="loading-progress
|
|
633
|
-
slot="loading-region"
|
|
634
|
-
></${r}>
|
|
635
|
-
${e=>e.loadingText}
|
|
636
|
-
</slot>
|
|
637
|
-
</div>
|
|
638
|
-
`)}
|
|
639
|
-
</${i}>
|
|
640
|
-
`)}
|
|
641
|
-
</template>
|
|
642
|
-
`};class ns extends ae{}class rs extends(ht(ns)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const as=s.html`
|
|
643
|
-
<input
|
|
644
|
-
slot="input-region"
|
|
645
|
-
role="combobox"
|
|
646
|
-
type="text"
|
|
647
|
-
autocapitalize="off"
|
|
648
|
-
autocomplete="off"
|
|
649
|
-
haspopup="list"
|
|
650
|
-
aria-label="${e=>e.label}"
|
|
651
|
-
aria-labelledby="${e=>e.labelledBy}"
|
|
652
|
-
placeholder="${e=>e.placeholder}"
|
|
653
|
-
${(0,s.ref)("inputElement")}
|
|
654
|
-
></input>
|
|
655
|
-
`;class ls extends rs{constructor(){super(...arguments),this.selection="",this.filterSelected=!0,this.filterQuery=!0,this.noSuggestionsText="No suggestions available",this.suggestionsAvailableText="Suggestions available",this.loadingText="Loading suggestions",this.menuPlacement="bottom-fill",this.showLoading=!1,this.optionsList=[],this.filteredOptionsList=[],this.flyoutOpen=!1,this.menuFocusIndex=-1,this.showNoOptions=!1,this.selectedItems=[],this.inputElementView=null,this.handleTextInput=e=>{this.query=this.inputElement.value},this.handleInputClick=e=>{e.preventDefault(),this.toggleFlyout(!0)},this.setRegionProps=()=>{this.flyoutOpen&&(null!==this.region&&void 0!==this.region?this.region.anchorElement=this.inputElement:s.DOM.queueUpdate(this.setRegionProps))},this.configLookup={top:je,bottom:We,tallest:Ke,"top-fill":Ge,"bottom-fill":Ye,"tallest-fill":Xe}}selectionChanged(){this.$fastController.isConnected&&(this.handleSelectionChange(),this.proxy instanceof HTMLInputElement&&(this.proxy.value=this.selection,this.validate()))}optionsChanged(){this.optionsList=this.options.split(",").map((e=>e.trim())).filter((e=>""!==e))}menuPlacementChanged(){this.$fastController.isConnected&&this.updateMenuConfig()}showLoadingChanged(){this.$fastController.isConnected&&s.DOM.queueUpdate((()=>{this.setFocusedOption(0)}))}listItemTemplateChanged(){this.updateListItemTemplate()}defaultListItemTemplateChanged(){this.updateListItemTemplate()}menuOptionTemplateChanged(){this.updateOptionTemplate()}defaultMenuOptionTemplateChanged(){this.updateOptionTemplate()}optionsListChanged(){this.updateFilteredOptions()}queryChanged(){this.$fastController.isConnected&&(this.inputElement.value!==this.query&&(this.inputElement.value=this.query),this.updateFilteredOptions(),this.$emit("querychange",{bubbles:!1}))}filteredOptionsListChanged(){this.$fastController.isConnected&&(this.showNoOptions=0===this.filteredOptionsList.length&&0===this.menuElement.querySelectorAll('[role="listitem"]').length,this.setFocusedOption(this.showNoOptions?-1:0))}flyoutOpenChanged(){this.flyoutOpen?(s.DOM.queueUpdate(this.setRegionProps),this.$emit("menuopening",{bubbles:!1})):this.$emit("menuclosing",{bubbles:!1})}showNoOptionsChanged(){this.$fastController.isConnected&&s.DOM.queueUpdate((()=>{this.setFocusedOption(0)}))}connectedCallback(){super.connectedCallback(),this.listElement=document.createElement(this.selectedListTag),this.appendChild(this.listElement),this.itemsPlaceholderElement=document.createComment(""),this.listElement.append(this.itemsPlaceholderElement),this.inputElementView=as.render(this,this.listElement);const e=this.menuTag.toUpperCase();this.menuElement=Array.from(this.children).find((t=>t.tagName===e)),void 0===this.menuElement&&(this.menuElement=document.createElement(this.menuTag),this.appendChild(this.menuElement)),""===this.menuElement.id&&(this.menuElement.id=zt("listbox-")),this.menuId=this.menuElement.id,this.optionsPlaceholder=document.createComment(""),this.menuElement.append(this.optionsPlaceholder),this.updateMenuConfig(),s.DOM.queueUpdate((()=>this.initialize()))}disconnectedCallback(){super.disconnectedCallback(),this.toggleFlyout(!1),this.inputElement.removeEventListener("input",this.handleTextInput),this.inputElement.removeEventListener("click",this.handleInputClick),null!==this.inputElementView&&(this.inputElementView.dispose(),this.inputElementView=null)}focus(){this.inputElement.focus()}initialize(){this.updateListItemTemplate(),this.updateOptionTemplate(),this.itemsRepeatBehavior=new s.RepeatDirective((e=>e.selectedItems),(e=>e.activeListItemTemplate),{positioning:!0}).createBehavior(this.itemsPlaceholderElement),this.inputElement.addEventListener("input",this.handleTextInput),this.inputElement.addEventListener("click",this.handleInputClick),this.$fastController.addBehaviors([this.itemsRepeatBehavior]),this.menuElement.suggestionsAvailableText=this.suggestionsAvailableText,this.menuElement.addEventListener("optionsupdated",this.handleMenuOptionsUpdated),this.optionsRepeatBehavior=new s.RepeatDirective((e=>e.filteredOptionsList),(e=>e.activeMenuOptionTemplate),{positioning:!0}).createBehavior(this.optionsPlaceholder),this.$fastController.addBehaviors([this.optionsRepeatBehavior]),this.handleSelectionChange()}toggleFlyout(e){if(this.flyoutOpen!==e){if(e&&document.activeElement===this.inputElement)return this.flyoutOpen=e,void s.DOM.queueUpdate((()=>{void 0!==this.menuElement?this.setFocusedOption(0):this.disableMenu()}));this.flyoutOpen=!1,this.disableMenu()}}handleMenuOptionsUpdated(e){e.preventDefault(),this.flyoutOpen&&this.setFocusedOption(0)}handleKeyDown(e){if(e.defaultPrevented)return!1;switch(e.key){case me:if(this.flyoutOpen){const e=this.flyoutOpen?Math.min(this.menuFocusIndex+1,this.menuElement.optionElements.length-1):0;this.setFocusedOption(e)}else this.toggleFlyout(!0);return!1;case be:if(this.flyoutOpen){const e=this.flyoutOpen?Math.max(this.menuFocusIndex-1,0):0;this.setFocusedOption(e)}else this.toggleFlyout(!0);return!1;case ye:return this.toggleFlyout(!1),!1;case ge:return-1!==this.menuFocusIndex&&this.menuElement.optionElements.length>this.menuFocusIndex&&this.menuElement.optionElements[this.menuFocusIndex].click(),!1;case fe:return document.activeElement===this.inputElement||(this.incrementFocusedItem(1),!1);case ve:return 0!==this.inputElement.selectionStart||(this.incrementFocusedItem(-1),!1);case"Delete":case"Backspace":{if(null===document.activeElement)return!0;if(document.activeElement===this.inputElement)return 0!==this.inputElement.selectionStart||(this.selection=this.selectedItems.slice(0,this.selectedItems.length-1).toString(),this.toggleFlyout(!1),!1);const e=Array.from(this.listElement.children),t=e.indexOf(document.activeElement);return!(t>-1)||(this.selection=this.selectedItems.splice(t,1).toString(),s.DOM.queueUpdate((()=>{e[Math.min(e.length,t)].focus()})),!1)}}return this.toggleFlyout(!0),!0}handleFocusIn(e){return!1}handleFocusOut(e){return void 0!==this.menuElement&&this.menuElement.contains(e.relatedTarget)||this.toggleFlyout(!1),!1}handleSelectionChange(){this.selectedItems.toString()!==this.selection&&(this.selectedItems=""===this.selection?[]:this.selection.split(","),this.updateFilteredOptions(),s.DOM.queueUpdate((()=>{this.checkMaxItems()})),this.$emit("selectionchange",{bubbles:!1}))}handleRegionLoaded(e){s.DOM.queueUpdate((()=>{this.setFocusedOption(0),this.$emit("menuloaded",{bubbles:!1})}))}checkMaxItems(){if(void 0!==this.inputElement)if(void 0!==this.maxSelected&&this.selectedItems.length>=this.maxSelected){if(document.activeElement===this.inputElement){const e=Array.from(this.listElement.querySelectorAll("[role='listitem']"));e[e.length-1].focus()}this.inputElement.hidden=!0}else this.inputElement.hidden=!1}handleItemInvoke(e){if(e.defaultPrevented)return!1;if(e.target instanceof ss){const t=Array.from(this.listElement.querySelectorAll("[role='listitem']")).indexOf(e.target);if(-1!==t){const e=this.selectedItems.slice();e.splice(t,1),this.selection=e.toString(),s.DOM.queueUpdate((()=>this.incrementFocusedItem(0)))}return!1}return!0}handleOptionInvoke(e){return!e.defaultPrevented&&(!(e.target instanceof es)||(void 0!==e.target.value&&(this.selection=`${this.selection}${""===this.selection?"":","}${e.target.value}`),this.inputElement.value="",this.query="",this.inputElement.focus(),this.toggleFlyout(!1),!1))}incrementFocusedItem(e){if(0===this.selectedItems.length)return void this.inputElement.focus();const t=Array.from(this.listElement.querySelectorAll("[role='listitem']"));if(null!==document.activeElement){let i=t.indexOf(document.activeElement);-1===i&&(i=t.length);const s=Math.min(t.length,Math.max(0,i+e));s===t.length?void 0!==this.maxSelected&&this.selectedItems.length>=this.maxSelected?t[s-1].focus():this.inputElement.focus():t[s].focus()}}disableMenu(){var e,t,i;this.menuFocusIndex=-1,this.menuFocusOptionId=void 0,null===(e=this.inputElement)||void 0===e||e.removeAttribute("aria-activedescendant"),null===(t=this.inputElement)||void 0===t||t.removeAttribute("aria-owns"),null===(i=this.inputElement)||void 0===i||i.removeAttribute("aria-expanded")}setFocusedOption(e){if(!this.flyoutOpen||-1===e||this.showNoOptions||this.showLoading)return void this.disableMenu();if(0===this.menuElement.optionElements.length)return;this.menuElement.optionElements.forEach((e=>{e.setAttribute("aria-selected","false")})),this.menuFocusIndex=e,this.menuFocusIndex>this.menuElement.optionElements.length-1&&(this.menuFocusIndex=this.menuElement.optionElements.length-1),this.menuFocusOptionId=this.menuElement.optionElements[this.menuFocusIndex].id,this.inputElement.setAttribute("aria-owns",this.menuId),this.inputElement.setAttribute("aria-expanded","true"),this.inputElement.setAttribute("aria-activedescendant",this.menuFocusOptionId);const t=this.menuElement.optionElements[this.menuFocusIndex];t.setAttribute("aria-selected","true"),this.menuElement.scrollTo(0,t.offsetTop)}updateListItemTemplate(){var e;this.activeListItemTemplate=null!==(e=this.listItemTemplate)&&void 0!==e?e:this.defaultListItemTemplate}updateOptionTemplate(){var e;this.activeMenuOptionTemplate=null!==(e=this.menuOptionTemplate)&&void 0!==e?e:this.defaultMenuOptionTemplate}updateFilteredOptions(){this.filteredOptionsList=this.optionsList.slice(0),this.filterSelected&&(this.filteredOptionsList=this.filteredOptionsList.filter((e=>-1===this.selectedItems.indexOf(e)))),this.filterQuery&&""!==this.query&&void 0!==this.query&&(this.filteredOptionsList=this.filteredOptionsList.filter((e=>-1!==e.indexOf(this.query))))}updateMenuConfig(){let e=this.configLookup[this.menuPlacement];null===e&&(e=Ye),this.menuConfig=Object.assign(Object.assign({},e),{autoUpdateMode:"auto",fixedPlacement:!0,horizontalViewportLock:!1,verticalViewportLock:!1})}}(0,h.__decorate)([(0,s.attr)({attribute:"selection"})],ls.prototype,"selection",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"options"})],ls.prototype,"options",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"filter-selected",mode:"boolean"})],ls.prototype,"filterSelected",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"filter-query",mode:"boolean"})],ls.prototype,"filterQuery",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"max-selected"})],ls.prototype,"maxSelected",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"no-suggestions-text"})],ls.prototype,"noSuggestionsText",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"suggestions-available-text"})],ls.prototype,"suggestionsAvailableText",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"loading-text"})],ls.prototype,"loadingText",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"label"})],ls.prototype,"label",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"labelledby"})],ls.prototype,"labelledBy",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"placeholder"})],ls.prototype,"placeholder",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"menu-placement"})],ls.prototype,"menuPlacement",void 0),(0,h.__decorate)([s.observable],ls.prototype,"showLoading",void 0),(0,h.__decorate)([s.observable],ls.prototype,"listItemTemplate",void 0),(0,h.__decorate)([s.observable],ls.prototype,"defaultListItemTemplate",void 0),(0,h.__decorate)([s.observable],ls.prototype,"activeListItemTemplate",void 0),(0,h.__decorate)([s.observable],ls.prototype,"menuOptionTemplate",void 0),(0,h.__decorate)([s.observable],ls.prototype,"defaultMenuOptionTemplate",void 0),(0,h.__decorate)([s.observable],ls.prototype,"activeMenuOptionTemplate",void 0),(0,h.__decorate)([s.observable],ls.prototype,"listItemContentsTemplate",void 0),(0,h.__decorate)([s.observable],ls.prototype,"menuOptionContentsTemplate",void 0),(0,h.__decorate)([s.observable],ls.prototype,"optionsList",void 0),(0,h.__decorate)([s.observable],ls.prototype,"query",void 0),(0,h.__decorate)([s.observable],ls.prototype,"filteredOptionsList",void 0),(0,h.__decorate)([s.observable],ls.prototype,"flyoutOpen",void 0),(0,h.__decorate)([s.observable],ls.prototype,"menuId",void 0),(0,h.__decorate)([s.observable],ls.prototype,"selectedListTag",void 0),(0,h.__decorate)([s.observable],ls.prototype,"menuTag",void 0),(0,h.__decorate)([s.observable],ls.prototype,"menuFocusIndex",void 0),(0,h.__decorate)([s.observable],ls.prototype,"menuFocusOptionId",void 0),(0,h.__decorate)([s.observable],ls.prototype,"showNoOptions",void 0),(0,h.__decorate)([s.observable],ls.prototype,"menuConfig",void 0),(0,h.__decorate)([s.observable],ls.prototype,"selectedItems",void 0);const ds=(e,t)=>s.html`
|
|
656
|
-
<template role="list" slot="menu-region">
|
|
657
|
-
<div class="options-display" part="options-display">
|
|
658
|
-
<div class="header-region" part="header-region">
|
|
659
|
-
<slot name="header-region" ${(0,s.slotted)("headerElements")}></slot>
|
|
660
|
-
</div>
|
|
661
|
-
|
|
662
|
-
<slot ${(0,s.slotted)("menuElements")}></slot>
|
|
663
|
-
<div class="footer-region" part="footer-region">
|
|
664
|
-
<slot name="footer-region" ${(0,s.slotted)("footerElements")}></slot>
|
|
665
|
-
</div>
|
|
666
|
-
<div
|
|
667
|
-
role="alert"
|
|
668
|
-
aria-live="polite"
|
|
669
|
-
part="suggestions-available-alert"
|
|
670
|
-
class="suggestions-available-alert"
|
|
671
|
-
>
|
|
672
|
-
${e=>e.suggestionsAvailableText}
|
|
673
|
-
</div>
|
|
674
|
-
</div>
|
|
675
|
-
</template>
|
|
676
|
-
`,hs=(e,t)=>s.html`
|
|
677
|
-
<template
|
|
678
|
-
role="listitem"
|
|
679
|
-
tabindex="-1"
|
|
680
|
-
@click="${(e,t)=>e.handleClick(t.event)}"
|
|
681
|
-
>
|
|
682
|
-
<slot></slot>
|
|
683
|
-
</template>
|
|
684
|
-
`,cs=(e,t)=>s.html`
|
|
685
|
-
<template slot="list-region" role="list" class="picker-list">
|
|
686
|
-
<slot></slot>
|
|
687
|
-
<slot name="input-region"></slot>
|
|
688
|
-
</template>
|
|
689
|
-
`,us=(e,t)=>s.html`
|
|
690
|
-
<template
|
|
691
|
-
role="listitem"
|
|
692
|
-
tabindex="0"
|
|
693
|
-
@click="${(e,t)=>e.handleClick(t.event)}"
|
|
694
|
-
@keydown="${(e,t)=>e.handleKeyDown(t.event)}"
|
|
695
|
-
>
|
|
696
|
-
<slot></slot>
|
|
697
|
-
</template>
|
|
698
|
-
`,ps={menuitem:"menuitem",menuitemcheckbox:"menuitemcheckbox",menuitemradio:"menuitemradio"},ms={[ps.menuitem]:"menuitem",[ps.menuitemcheckbox]:"menuitemcheckbox",[ps.menuitemradio]:"menuitemradio"},vs=(e,t)=>s.html`
|
|
699
|
-
<template
|
|
700
|
-
role="${e=>e.role}"
|
|
701
|
-
aria-haspopup="${e=>e.hasSubmenu?"menu":void 0}"
|
|
702
|
-
aria-checked="${e=>e.role!==ps.menuitem?e.checked:void 0}"
|
|
703
|
-
aria-disabled="${e=>e.disabled}"
|
|
704
|
-
aria-expanded="${e=>e.expanded}"
|
|
705
|
-
@keydown="${(e,t)=>e.handleMenuItemKeyDown(t.event)}"
|
|
706
|
-
@click="${(e,t)=>e.handleMenuItemClick(t.event)}"
|
|
707
|
-
@mouseover="${(e,t)=>e.handleMouseOver(t.event)}"
|
|
708
|
-
@mouseout="${(e,t)=>e.handleMouseOut(t.event)}"
|
|
709
|
-
class="${e=>e.disabled?"disabled":""} ${e=>e.expanded?"expanded":""} ${e=>`indent-${e.startColumnCount}`}"
|
|
710
|
-
>
|
|
711
|
-
${(0,s.when)((e=>e.role===ps.menuitemcheckbox),s.html`
|
|
712
|
-
<div part="input-container" class="input-container">
|
|
713
|
-
<span part="checkbox" class="checkbox">
|
|
714
|
-
<slot name="checkbox-indicator">
|
|
715
|
-
${t.checkboxIndicator||""}
|
|
716
|
-
</slot>
|
|
717
|
-
</span>
|
|
718
|
-
</div>
|
|
719
|
-
`)}
|
|
720
|
-
${(0,s.when)((e=>e.role===ps.menuitemradio),s.html`
|
|
721
|
-
<div part="input-container" class="input-container">
|
|
722
|
-
<span part="radio" class="radio">
|
|
723
|
-
<slot name="radio-indicator">
|
|
724
|
-
${t.radioIndicator||""}
|
|
725
|
-
</slot>
|
|
726
|
-
</span>
|
|
727
|
-
</div>
|
|
728
|
-
`)}
|
|
729
|
-
</div>
|
|
730
|
-
${r(e,t)}
|
|
731
|
-
<span class="content" part="content">
|
|
732
|
-
<slot></slot>
|
|
733
|
-
</span>
|
|
734
|
-
${n(e,t)}
|
|
735
|
-
${(0,s.when)((e=>e.hasSubmenu),s.html`
|
|
736
|
-
<div
|
|
737
|
-
part="expand-collapse-glyph-container"
|
|
738
|
-
class="expand-collapse-glyph-container"
|
|
739
|
-
>
|
|
740
|
-
<span part="expand-collapse" class="expand-collapse">
|
|
741
|
-
<slot name="expand-collapse-indicator">
|
|
742
|
-
${t.expandCollapseGlyph||""}
|
|
743
|
-
</slot>
|
|
744
|
-
</span>
|
|
745
|
-
</div>
|
|
746
|
-
`)}
|
|
747
|
-
${(0,s.when)((e=>e.expanded),s.html`
|
|
748
|
-
<${e.tagFor(qe)}
|
|
749
|
-
:anchorElement="${e=>e}"
|
|
750
|
-
vertical-positioning-mode="dynamic"
|
|
751
|
-
vertical-default-position="bottom"
|
|
752
|
-
vertical-inset="true"
|
|
753
|
-
horizontal-positioning-mode="dynamic"
|
|
754
|
-
horizontal-default-position="end"
|
|
755
|
-
class="submenu-region"
|
|
756
|
-
dir="${e=>e.currentDirection}"
|
|
757
|
-
@loaded="${e=>e.submenuLoaded()}"
|
|
758
|
-
${(0,s.ref)("submenuRegion")}
|
|
759
|
-
part="submenu-region"
|
|
760
|
-
>
|
|
761
|
-
<slot name="submenu"></slot>
|
|
762
|
-
</${e.tagFor(qe)}>
|
|
763
|
-
`)}
|
|
764
|
-
</template>
|
|
765
|
-
`;class fs extends ae{constructor(){super(...arguments),this.role=ps.menuitem,this.hasSubmenu=!1,this.currentDirection=Le.ltr,this.focusSubmenuOnLoad=!1,this.handleMenuItemKeyDown=e=>{if(e.defaultPrevented)return!1;switch(e.key){case ge:case we:return this.invoke(),!1;case fe:return this.expandAndFocus(),!1;case ve:if(this.expanded)return this.expanded=!1,this.focus(),!1}return!0},this.handleMenuItemClick=e=>(e.defaultPrevented||this.disabled||this.invoke(),!1),this.submenuLoaded=()=>{this.focusSubmenuOnLoad&&(this.focusSubmenuOnLoad=!1,this.hasSubmenu&&(this.submenu.focus(),this.setAttribute("tabindex","-1")))},this.handleMouseOver=e=>(this.disabled||!this.hasSubmenu||this.expanded||(this.expanded=!0),!1),this.handleMouseOut=e=>(!this.expanded||this.contains(document.activeElement)||(this.expanded=!1),!1),this.expandAndFocus=()=>{this.hasSubmenu&&(this.focusSubmenuOnLoad=!0,this.expanded=!0)},this.invoke=()=>{if(!this.disabled)switch(this.role){case ps.menuitemcheckbox:this.checked=!this.checked;break;case ps.menuitem:this.updateSubmenu(),this.hasSubmenu?this.expandAndFocus():this.$emit("change");break;case ps.menuitemradio:this.checked||(this.checked=!0)}},this.updateSubmenu=()=>{this.submenu=this.domChildren().find((e=>"menu"===e.getAttribute("role"))),this.hasSubmenu=void 0!==this.submenu}}expandedChanged(e){if(this.$fastController.isConnected){if(void 0===this.submenu)return;!1===this.expanded?this.submenu.collapseExpandedItem():this.currentDirection=Ne(this),this.$emit("expanded-change",this,{bubbles:!1})}}checkedChanged(e,t){this.$fastController.isConnected&&this.$emit("change")}connectedCallback(){super.connectedCallback(),s.DOM.queueUpdate((()=>{this.updateSubmenu()})),this.startColumnCount||(this.startColumnCount=1),this.observer=new MutationObserver(this.updateSubmenu)}disconnectedCallback(){super.disconnectedCallback(),this.submenu=void 0,void 0!==this.observer&&(this.observer.disconnect(),this.observer=void 0)}domChildren(){return Array.from(this.children).filter((e=>!e.hasAttribute("hidden")))}}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],fs.prototype,"disabled",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],fs.prototype,"expanded",void 0),(0,h.__decorate)([s.observable],fs.prototype,"startColumnCount",void 0),(0,h.__decorate)([s.attr],fs.prototype,"role",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],fs.prototype,"checked",void 0),(0,h.__decorate)([s.observable],fs.prototype,"submenuRegion",void 0),(0,h.__decorate)([s.observable],fs.prototype,"hasSubmenu",void 0),(0,h.__decorate)([s.observable],fs.prototype,"currentDirection",void 0),(0,h.__decorate)([s.observable],fs.prototype,"submenu",void 0),he(fs,o);const bs=(e,t)=>s.html`
|
|
766
|
-
<template
|
|
767
|
-
slot="${e=>e.slot?e.slot:e.isNestedMenu()?"submenu":void 0}"
|
|
768
|
-
role="menu"
|
|
769
|
-
@keydown="${(e,t)=>e.handleMenuKeyDown(t.event)}"
|
|
770
|
-
@focusout="${(e,t)=>e.handleFocusOut(t.event)}"
|
|
771
|
-
>
|
|
772
|
-
<slot ${(0,s.slotted)("items")}></slot>
|
|
773
|
-
</template>
|
|
774
|
-
`;class gs extends ae{constructor(){super(...arguments),this.expandedItem=null,this.focusIndex=-1,this.isNestedMenu=()=>null!==this.parentElement&&Nt(this.parentElement)&&"menuitem"===this.parentElement.getAttribute("role"),this.handleFocusOut=e=>{if(!this.contains(e.relatedTarget)&&void 0!==this.menuItems){this.collapseExpandedItem();const e=this.menuItems.findIndex(this.isFocusableElement);this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.menuItems[e].setAttribute("tabindex","0"),this.focusIndex=e}},this.handleItemFocus=e=>{const t=e.target;void 0!==this.menuItems&&t!==this.menuItems[this.focusIndex]&&(this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=this.menuItems.indexOf(t),t.setAttribute("tabindex","0"))},this.handleExpandedChanged=e=>{if(e.defaultPrevented||null===e.target||void 0===this.menuItems||this.menuItems.indexOf(e.target)<0)return;e.preventDefault();const t=e.target;null===this.expandedItem||t!==this.expandedItem||!1!==t.expanded?t.expanded&&(null!==this.expandedItem&&this.expandedItem!==t&&(this.expandedItem.expanded=!1),this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.expandedItem=t,this.focusIndex=this.menuItems.indexOf(t),t.setAttribute("tabindex","0")):this.expandedItem=null},this.removeItemListeners=()=>{void 0!==this.menuItems&&this.menuItems.forEach((e=>{e.removeEventListener("expanded-change",this.handleExpandedChanged),e.removeEventListener("focus",this.handleItemFocus)}))},this.setItems=()=>{const e=this.domChildren();this.removeItemListeners(),this.menuItems=e;const t=this.menuItems.filter(this.isMenuItemElement);t.length&&(this.focusIndex=0);const i=t.reduce(((e,t)=>{const i=function(e){const t=e.getAttribute("role"),i=e.querySelector("[slot=start]");return t!==ps.menuitem&&null===i||t===ps.menuitem&&null!==i?1:t!==ps.menuitem&&null!==i?2:0}(t);return e>i?e:i}),0);t.forEach(((e,t)=>{e.setAttribute("tabindex",0===t?"0":"-1"),e.addEventListener("expanded-change",this.handleExpandedChanged),e.addEventListener("focus",this.handleItemFocus),e instanceof fs&&(e.startColumnCount=i)}))},this.changeHandler=e=>{if(void 0===this.menuItems)return;const t=e.target,i=this.menuItems.indexOf(t);if(-1!==i&&"menuitemradio"===t.role&&!0===t.checked){for(let e=i-1;e>=0;--e){const t=this.menuItems[e],i=t.getAttribute("role");if(i===ps.menuitemradio&&(t.checked=!1),"separator"===i)break}const e=this.menuItems.length-1;for(let t=i+1;t<=e;++t){const e=this.menuItems[t],i=e.getAttribute("role");if(i===ps.menuitemradio&&(e.checked=!1),"separator"===i)break}}},this.isMenuItemElement=e=>Nt(e)&&gs.focusableElementRoles.hasOwnProperty(e.getAttribute("role")),this.isFocusableElement=e=>this.isMenuItemElement(e)}itemsChanged(e,t){this.$fastController.isConnected&&void 0!==this.menuItems&&this.setItems()}connectedCallback(){super.connectedCallback(),s.DOM.queueUpdate((()=>{this.setItems()})),this.addEventListener("change",this.changeHandler)}disconnectedCallback(){super.disconnectedCallback(),this.removeItemListeners(),this.menuItems=void 0,this.removeEventListener("change",this.changeHandler)}focus(){this.setFocus(0,1)}collapseExpandedItem(){null!==this.expandedItem&&(this.expandedItem.expanded=!1,this.expandedItem=null)}handleMenuKeyDown(e){if(!e.defaultPrevented&&void 0!==this.menuItems)switch(e.key){case me:return void this.setFocus(this.focusIndex+1,1);case be:return void this.setFocus(this.focusIndex-1,-1);case xe:return void this.setFocus(this.menuItems.length-1,-1);case Ce:return void this.setFocus(0,1);default:return!0}}domChildren(){return Array.from(this.children).filter((e=>!e.hasAttribute("hidden")))}setFocus(e,t){if(void 0!==this.menuItems)for(;e>=0&&e<this.menuItems.length;){const i=this.menuItems[e];if(this.isFocusableElement(i)){this.focusIndex>-1&&this.menuItems.length>=this.focusIndex-1&&this.menuItems[this.focusIndex].setAttribute("tabindex","-1"),this.focusIndex=e,i.setAttribute("tabindex","0"),i.focus();break}e+=t}}}gs.focusableElementRoles=ms,(0,h.__decorate)([s.observable],gs.prototype,"items",void 0);const ys=(e,t)=>s.html`
|
|
775
|
-
<template class="${e=>e.readOnly?"readonly":""}">
|
|
776
|
-
<label
|
|
777
|
-
part="label"
|
|
778
|
-
for="control"
|
|
779
|
-
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
|
|
780
|
-
>
|
|
781
|
-
<slot ${(0,s.slotted)("defaultSlottedNodes")}></slot>
|
|
782
|
-
</label>
|
|
783
|
-
<div class="root" part="root">
|
|
784
|
-
${r(e,t)}
|
|
785
|
-
<input
|
|
786
|
-
class="control"
|
|
787
|
-
part="control"
|
|
788
|
-
id="control"
|
|
789
|
-
@input="${e=>e.handleTextInput()}"
|
|
790
|
-
@change="${e=>e.handleChange()}"
|
|
791
|
-
@keydown="${(e,t)=>e.handleKeyDown(t.event)}"
|
|
792
|
-
@blur="${(e,t)=>e.handleBlur()}"
|
|
793
|
-
?autofocus="${e=>e.autofocus}"
|
|
794
|
-
?disabled="${e=>e.disabled}"
|
|
795
|
-
list="${e=>e.list}"
|
|
796
|
-
maxlength="${e=>e.maxlength}"
|
|
797
|
-
minlength="${e=>e.minlength}"
|
|
798
|
-
placeholder="${e=>e.placeholder}"
|
|
799
|
-
?readonly="${e=>e.readOnly}"
|
|
800
|
-
?required="${e=>e.required}"
|
|
801
|
-
size="${e=>e.size}"
|
|
802
|
-
type="text"
|
|
803
|
-
inputmode="numeric"
|
|
804
|
-
min="${e=>e.min}"
|
|
805
|
-
max="${e=>e.max}"
|
|
806
|
-
step="${e=>e.step}"
|
|
807
|
-
aria-atomic="${e=>e.ariaAtomic}"
|
|
808
|
-
aria-busy="${e=>e.ariaBusy}"
|
|
809
|
-
aria-controls="${e=>e.ariaControls}"
|
|
810
|
-
aria-current="${e=>e.ariaCurrent}"
|
|
811
|
-
aria-describedby="${e=>e.ariaDescribedby}"
|
|
812
|
-
aria-details="${e=>e.ariaDetails}"
|
|
813
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
814
|
-
aria-errormessage="${e=>e.ariaErrormessage}"
|
|
815
|
-
aria-flowto="${e=>e.ariaFlowto}"
|
|
816
|
-
aria-haspopup="${e=>e.ariaHaspopup}"
|
|
817
|
-
aria-hidden="${e=>e.ariaHidden}"
|
|
818
|
-
aria-invalid="${e=>e.ariaInvalid}"
|
|
819
|
-
aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
|
|
820
|
-
aria-label="${e=>e.ariaLabel}"
|
|
821
|
-
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
822
|
-
aria-live="${e=>e.ariaLive}"
|
|
823
|
-
aria-owns="${e=>e.ariaOwns}"
|
|
824
|
-
aria-relevant="${e=>e.ariaRelevant}"
|
|
825
|
-
aria-roledescription="${e=>e.ariaRoledescription}"
|
|
826
|
-
${(0,s.ref)("control")}
|
|
827
|
-
/>
|
|
828
|
-
${(0,s.when)((e=>!e.hideStep&&!e.readOnly&&!e.disabled),s.html`
|
|
829
|
-
<div class="controls" part="controls">
|
|
830
|
-
<div class="step-up" part="step-up" @click="${e=>e.stepUp()}">
|
|
831
|
-
<slot name="step-up-glyph">
|
|
832
|
-
${t.stepUpGlyph||""}
|
|
833
|
-
</slot>
|
|
834
|
-
</div>
|
|
835
|
-
<div
|
|
836
|
-
class="step-down"
|
|
837
|
-
part="step-down"
|
|
838
|
-
@click="${e=>e.stepDown()}"
|
|
839
|
-
>
|
|
840
|
-
<slot name="step-down-glyph">
|
|
841
|
-
${t.stepDownGlyph||""}
|
|
842
|
-
</slot>
|
|
843
|
-
</div>
|
|
844
|
-
</div>
|
|
845
|
-
`)}
|
|
846
|
-
${n(e,t)}
|
|
847
|
-
</div>
|
|
848
|
-
</template>
|
|
849
|
-
`;class Cs extends ae{}class xs extends(ht(Cs)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const ws={email:"email",password:"password",tel:"tel",text:"text",url:"url"};class $s extends xs{constructor(){super(...arguments),this.type=ws.text}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}typeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.type=this.type,this.validate())}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type",this.type),this.validate(),this.autofocus&&s.DOM.queueUpdate((()=>{this.focus()}))}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.value=this.control.value}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}(0,h.__decorate)([(0,s.attr)({attribute:"readonly",mode:"boolean"})],$s.prototype,"readOnly",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],$s.prototype,"autofocus",void 0),(0,h.__decorate)([s.attr],$s.prototype,"placeholder",void 0),(0,h.__decorate)([s.attr],$s.prototype,"type",void 0),(0,h.__decorate)([s.attr],$s.prototype,"list",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],$s.prototype,"maxlength",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],$s.prototype,"minlength",void 0),(0,h.__decorate)([s.attr],$s.prototype,"pattern",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],$s.prototype,"size",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],$s.prototype,"spellcheck",void 0),(0,h.__decorate)([s.observable],$s.prototype,"defaultSlottedNodes",void 0);class Is{}he(Is,Re),he($s,o,Is);class ks extends ae{}class _s extends(ht(ks)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Ts extends _s{constructor(){super(...arguments),this.hideStep=!1,this.step=1,this.isUserInput=!1}maxChanged(e,t){var i;this.max=Math.max(t,null!==(i=this.min)&&void 0!==i?i:t);const s=Math.min(this.min,this.max);void 0!==this.min&&this.min!==s&&(this.min=s),this.value=this.getValidValue(this.value)}minChanged(e,t){var i;this.min=Math.min(t,null!==(i=this.max)&&void 0!==i?i:t);const s=Math.max(this.min,this.max);void 0!==this.max&&this.max!==s&&(this.max=s),this.value=this.getValidValue(this.value)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(e){this.value=e.toString()}valueChanged(e,t){this.value=this.getValidValue(t),t===this.value&&(this.control&&!this.isUserInput&&(this.control.value=this.value),super.valueChanged(e,this.value),void 0===e||this.isUserInput||(this.$emit("input"),this.$emit("change")),this.isUserInput=!1)}validate(){super.validate(this.control)}getValidValue(e){var t,i;let s=parseFloat(parseFloat(e).toPrecision(12));return isNaN(s)?s="":(s=Math.min(s,null!==(t=this.max)&&void 0!==t?t:s),s=Math.max(s,null!==(i=this.min)&&void 0!==i?i:s).toString()),s}stepUp(){const e=parseFloat(this.value),t=isNaN(e)?this.min>0?this.min:this.max<0?this.max:this.min?0:this.step:e+this.step;this.value=t.toString()}stepDown(){const e=parseFloat(this.value),t=isNaN(e)?this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step:e-this.step;this.value=t.toString()}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","number"),this.validate(),this.control.value=this.value,this.autofocus&&s.DOM.queueUpdate((()=>{this.focus()}))}select(){this.control.select(),this.$emit("select")}handleTextInput(){this.control.value=this.control.value.replace(/[^0-9\-+e.]/g,""),this.isUserInput=!0,this.value=this.control.value}handleChange(){this.$emit("change")}handleKeyDown(e){switch(e.key){case be:return this.stepUp(),!1;case me:return this.stepDown(),!1}return!0}handleBlur(){this.control.value=this.value}}(0,h.__decorate)([(0,s.attr)({attribute:"readonly",mode:"boolean"})],Ts.prototype,"readOnly",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Ts.prototype,"autofocus",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"hide-step",mode:"boolean"})],Ts.prototype,"hideStep",void 0),(0,h.__decorate)([s.attr],Ts.prototype,"placeholder",void 0),(0,h.__decorate)([s.attr],Ts.prototype,"list",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Ts.prototype,"maxlength",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Ts.prototype,"minlength",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Ts.prototype,"size",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Ts.prototype,"step",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Ts.prototype,"max",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Ts.prototype,"min",void 0),(0,h.__decorate)([s.observable],Ts.prototype,"defaultSlottedNodes",void 0),he(Ts,o,Is);const Os=(e,t)=>s.html`
|
|
850
|
-
<template
|
|
851
|
-
role="progressbar"
|
|
852
|
-
aria-valuenow="${e=>e.value}"
|
|
853
|
-
aria-valuemin="${e=>e.min}"
|
|
854
|
-
aria-valuemax="${e=>e.max}"
|
|
855
|
-
class="${e=>e.paused?"paused":""}"
|
|
856
|
-
>
|
|
857
|
-
${(0,s.when)((e=>"number"==typeof e.value),s.html`
|
|
858
|
-
<svg
|
|
859
|
-
class="progress"
|
|
860
|
-
part="progress"
|
|
861
|
-
viewBox="0 0 16 16"
|
|
862
|
-
slot="determinate"
|
|
863
|
-
>
|
|
864
|
-
<circle
|
|
865
|
-
class="background"
|
|
866
|
-
part="background"
|
|
867
|
-
cx="8px"
|
|
868
|
-
cy="8px"
|
|
869
|
-
r="7px"
|
|
870
|
-
></circle>
|
|
871
|
-
<circle
|
|
872
|
-
class="determinate"
|
|
873
|
-
part="determinate"
|
|
874
|
-
style="stroke-dasharray: ${e=>44*e.percentComplete/100}px ${44}px"
|
|
875
|
-
cx="8px"
|
|
876
|
-
cy="8px"
|
|
877
|
-
r="7px"
|
|
878
|
-
></circle>
|
|
879
|
-
</svg>
|
|
880
|
-
`)}
|
|
881
|
-
${(0,s.when)((e=>"number"!=typeof e.value),s.html`
|
|
882
|
-
<slot name="indeterminate" slot="indeterminate">
|
|
883
|
-
${t.indeterminateIndicator||""}
|
|
884
|
-
</slot>
|
|
885
|
-
`)}
|
|
886
|
-
</template>
|
|
887
|
-
`;class Es extends ae{constructor(){super(...arguments),this.percentComplete=0}valueChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}minChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}maxChanged(){this.$fastController.isConnected&&this.updatePercentComplete()}connectedCallback(){super.connectedCallback(),this.updatePercentComplete()}updatePercentComplete(){const e="number"==typeof this.min?this.min:0,t="number"==typeof this.max?this.max:100,i="number"==typeof this.value?this.value:0,s=t-e;this.percentComplete=0===s?0:Math.fround((i-e)/s*100)}}(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Es.prototype,"value",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Es.prototype,"min",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Es.prototype,"max",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Es.prototype,"paused",void 0),(0,h.__decorate)([s.observable],Es.prototype,"percentComplete",void 0);const Ss=(e,t)=>s.html`
|
|
888
|
-
<template
|
|
889
|
-
role="progressbar"
|
|
890
|
-
aria-valuenow="${e=>e.value}"
|
|
891
|
-
aria-valuemin="${e=>e.min}"
|
|
892
|
-
aria-valuemax="${e=>e.max}"
|
|
893
|
-
class="${e=>e.paused?"paused":""}"
|
|
894
|
-
>
|
|
895
|
-
${(0,s.when)((e=>"number"==typeof e.value),s.html`
|
|
896
|
-
<div class="progress" part="progress" slot="determinate">
|
|
897
|
-
<div
|
|
898
|
-
class="determinate"
|
|
899
|
-
part="determinate"
|
|
900
|
-
style="width: ${e=>e.percentComplete}%"
|
|
901
|
-
></div>
|
|
902
|
-
</div>
|
|
903
|
-
`)}
|
|
904
|
-
${(0,s.when)((e=>"number"!=typeof e.value),s.html`
|
|
905
|
-
<div class="progress" part="progress" slot="indeterminate">
|
|
906
|
-
<slot class="indeterminate" name="indeterminate">
|
|
907
|
-
${t.indeterminateIndicator1||""}
|
|
908
|
-
${t.indeterminateIndicator2||""}
|
|
909
|
-
</slot>
|
|
910
|
-
</div>
|
|
911
|
-
`)}
|
|
912
|
-
</template>
|
|
913
|
-
`,Rs=(e,t)=>s.html`
|
|
914
|
-
<template
|
|
915
|
-
role="radiogroup"
|
|
916
|
-
aria-disabled="${e=>e.disabled}"
|
|
917
|
-
aria-readonly="${e=>e.readOnly}"
|
|
918
|
-
@click="${(e,t)=>e.clickHandler(t.event)}"
|
|
919
|
-
@keydown="${(e,t)=>e.keydownHandler(t.event)}"
|
|
920
|
-
@focusout="${(e,t)=>e.focusOutHandler(t.event)}"
|
|
921
|
-
>
|
|
922
|
-
<slot name="label"></slot>
|
|
923
|
-
<div
|
|
924
|
-
class="positioning-region ${e=>e.orientation===Ni?"horizontal":"vertical"}"
|
|
925
|
-
part="positioning-region"
|
|
926
|
-
>
|
|
927
|
-
<slot
|
|
928
|
-
${(0,s.slotted)({property:"slottedRadioButtons",filter:(0,s.elements)("[role=radio]")})}
|
|
929
|
-
></slot>
|
|
930
|
-
</div>
|
|
931
|
-
</template>
|
|
932
|
-
`;class Ds extends ae{constructor(){super(...arguments),this.orientation=Ni,this.radioChangeHandler=e=>{const t=e.target;t.checked&&(this.slottedRadioButtons.forEach((e=>{e!==t&&(e.checked=!1,this.isInsideFoundationToolbar||e.setAttribute("tabindex","-1"))})),this.selectedRadio=t,this.value=t.value,t.setAttribute("tabindex","0"),this.focusedRadio=t),e.stopPropagation()},this.moveToRadioByIndex=(e,t)=>{const i=e[t];this.isInsideToolbar||(i.setAttribute("tabindex","0"),i.readOnly?this.slottedRadioButtons.forEach((e=>{e!==i&&e.setAttribute("tabindex","-1")})):(i.checked=!0,this.selectedRadio=i)),this.focusedRadio=i,i.focus()},this.moveRightOffGroup=()=>{var e;null===(e=this.nextElementSibling)||void 0===e||e.focus()},this.moveLeftOffGroup=()=>{var e;null===(e=this.previousElementSibling)||void 0===e||e.focus()},this.focusOutHandler=e=>{const t=this.slottedRadioButtons,i=e.target,s=null!==i?t.indexOf(i):0,o=this.focusedRadio?t.indexOf(this.focusedRadio):-1;return(0===o&&s===o||o===t.length-1&&o===s)&&(this.selectedRadio?(this.focusedRadio=this.selectedRadio,this.isInsideFoundationToolbar||(this.selectedRadio.setAttribute("tabindex","0"),t.forEach((e=>{e!==this.selectedRadio&&e.setAttribute("tabindex","-1")})))):(this.focusedRadio=t[0],this.focusedRadio.setAttribute("tabindex","0"),t.forEach((e=>{e!==this.focusedRadio&&e.setAttribute("tabindex","-1")})))),!0},this.clickHandler=e=>{const t=e.target;if(t){const e=this.slottedRadioButtons;t.checked||0===e.indexOf(t)?(t.setAttribute("tabindex","0"),this.selectedRadio=t):(t.setAttribute("tabindex","-1"),this.selectedRadio=null),this.focusedRadio=t}e.preventDefault()},this.shouldMoveOffGroupToTheRight=(e,t,i)=>e===t.length&&this.isInsideToolbar&&i===fe,this.shouldMoveOffGroupToTheLeft=(e,t)=>(this.focusedRadio?e.indexOf(this.focusedRadio)-1:0)<0&&this.isInsideToolbar&&t===ve,this.checkFocusedRadio=()=>{null===this.focusedRadio||this.focusedRadio.readOnly||this.focusedRadio.checked||(this.focusedRadio.checked=!0,this.focusedRadio.setAttribute("tabindex","0"),this.focusedRadio.focus(),this.selectedRadio=this.focusedRadio)},this.moveRight=e=>{const t=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?t.indexOf(this.focusedRadio)+1:1,this.shouldMoveOffGroupToTheRight(i,t,e.key))this.moveRightOffGroup();else for(i===t.length&&(i=0);i<t.length&&t.length>1;){if(!t[i].disabled){this.moveToRadioByIndex(t,i);break}if(this.focusedRadio&&i===t.indexOf(this.focusedRadio))break;if(i+1>=t.length){if(this.isInsideToolbar)break;i=0}else i+=1}},this.moveLeft=e=>{const t=this.slottedRadioButtons;let i=0;if(i=this.focusedRadio?t.indexOf(this.focusedRadio)-1:0,i=i<0?t.length-1:i,this.shouldMoveOffGroupToTheLeft(t,e.key))this.moveLeftOffGroup();else for(;i>=0&&t.length>1;){if(!t[i].disabled){this.moveToRadioByIndex(t,i);break}if(this.focusedRadio&&i===t.indexOf(this.focusedRadio))break;i-1<0?i=t.length-1:i-=1}},this.keydownHandler=e=>{const t=e.key;if(t in Ie&&this.isInsideFoundationToolbar)return!0;switch(t){case ge:this.checkFocusedRadio();break;case fe:case me:this.direction===Le.ltr?this.moveRight(e):this.moveLeft(e);break;case ve:case be:this.direction===Le.ltr?this.moveLeft(e):this.moveRight(e);break;default:return!0}}}readOnlyChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{this.readOnly?e.readOnly=!0:e.readOnly=!1}))}disabledChanged(){void 0!==this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{this.disabled?e.disabled=!0:e.disabled=!1}))}nameChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{e.setAttribute("name",this.name)}))}valueChanged(){this.slottedRadioButtons&&this.slottedRadioButtons.forEach((e=>{e.value===this.value&&(e.checked=!0,this.selectedRadio=e)})),this.$emit("change")}slottedRadioButtonsChanged(e,t){this.slottedRadioButtons&&this.slottedRadioButtons.length>0&&this.setupRadioButtons()}get parentToolbar(){return this.closest('[role="toolbar"]')}get isInsideToolbar(){var e;return null!==(e=this.parentToolbar)&&void 0!==e&&e}get isInsideFoundationToolbar(){var e;return!!(null===(e=this.parentToolbar)||void 0===e?void 0:e.$fastController)}connectedCallback(){super.connectedCallback(),this.direction=Ne(this),this.setupRadioButtons()}disconnectedCallback(){this.slottedRadioButtons.forEach((e=>{e.removeEventListener("change",this.radioChangeHandler)}))}setupRadioButtons(){const e=this.slottedRadioButtons.filter((e=>e.hasAttribute("checked"))),t=e?e.length:0;if(t>1){e[t-1].checked=!0}let i=!1;if(this.slottedRadioButtons.forEach((e=>{void 0!==this.name&&e.setAttribute("name",this.name),this.disabled&&(e.disabled=!0),this.readOnly&&(e.readOnly=!0),this.value&&this.value===e.value?(this.selectedRadio=e,this.focusedRadio=e,e.checked=!0,e.setAttribute("tabindex","0"),i=!0):(this.isInsideFoundationToolbar||e.setAttribute("tabindex","-1"),e.checked=!1),e.addEventListener("change",this.radioChangeHandler)})),void 0===this.value&&this.slottedRadioButtons.length>0){const e=this.slottedRadioButtons.filter((e=>e.hasAttribute("checked"))),t=null!==e?e.length:0;if(t>0&&!i){const i=e[t-1];i.checked=!0,this.focusedRadio=i,i.setAttribute("tabindex","0")}else this.slottedRadioButtons[0].setAttribute("tabindex","0"),this.focusedRadio=this.slottedRadioButtons[0]}}}(0,h.__decorate)([(0,s.attr)({attribute:"readonly",mode:"boolean"})],Ds.prototype,"readOnly",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"disabled",mode:"boolean"})],Ds.prototype,"disabled",void 0),(0,h.__decorate)([s.attr],Ds.prototype,"name",void 0),(0,h.__decorate)([s.attr],Ds.prototype,"value",void 0),(0,h.__decorate)([s.attr],Ds.prototype,"orientation",void 0),(0,h.__decorate)([s.observable],Ds.prototype,"childItems",void 0),(0,h.__decorate)([s.observable],Ds.prototype,"slottedRadioButtons",void 0);const As=(e,t)=>s.html`
|
|
933
|
-
<template
|
|
934
|
-
role="radio"
|
|
935
|
-
class="${e=>e.checked?"checked":""} ${e=>e.readOnly?"readonly":""}"
|
|
936
|
-
aria-checked="${e=>e.checked}"
|
|
937
|
-
aria-required="${e=>e.required}"
|
|
938
|
-
aria-disabled="${e=>e.disabled}"
|
|
939
|
-
aria-readonly="${e=>e.readOnly}"
|
|
940
|
-
@keypress="${(e,t)=>e.keypressHandler(t.event)}"
|
|
941
|
-
@click="${(e,t)=>e.clickHandler(t.event)}"
|
|
942
|
-
>
|
|
943
|
-
<div part="control" class="control">
|
|
944
|
-
<slot name="checked-indicator">
|
|
945
|
-
${t.checkedIndicator||""}
|
|
946
|
-
</slot>
|
|
947
|
-
</div>
|
|
948
|
-
<label
|
|
949
|
-
part="label"
|
|
950
|
-
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
|
|
951
|
-
>
|
|
952
|
-
<slot ${(0,s.slotted)("defaultSlottedNodes")}></slot>
|
|
953
|
-
</label>
|
|
954
|
-
</template>
|
|
955
|
-
`;class Fs extends ae{}class Ls extends(ct(Fs)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class Ps extends Ls{constructor(){super(),this.initialValue="on",this.keypressHandler=e=>{if(e.key!==we)return!0;this.checked||this.readOnly||(this.checked=!0)},this.proxy.setAttribute("type","radio")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}defaultCheckedChanged(){var e;this.$fastController.isConnected&&!this.dirtyChecked&&(this.isInsideRadioGroup()||(this.checked=null!==(e=this.defaultChecked)&&void 0!==e&&e,this.dirtyChecked=!1))}connectedCallback(){var e,t;super.connectedCallback(),this.validate(),"radiogroup"!==(null===(e=this.parentElement)||void 0===e?void 0:e.getAttribute("role"))&&null===this.getAttribute("tabindex")&&(this.disabled||this.setAttribute("tabindex","0")),this.checkedAttribute&&(this.dirtyChecked||this.isInsideRadioGroup()||(this.checked=null!==(t=this.defaultChecked)&&void 0!==t&&t,this.dirtyChecked=!1))}isInsideRadioGroup(){return null!==this.closest("[role=radiogroup]")}clickHandler(e){this.disabled||this.readOnly||this.checked||(this.checked=!0)}}(0,h.__decorate)([(0,s.attr)({attribute:"readonly",mode:"boolean"})],Ps.prototype,"readOnly",void 0),(0,h.__decorate)([s.observable],Ps.prototype,"name",void 0),(0,h.__decorate)([s.observable],Ps.prototype,"defaultSlottedNodes",void 0);class Ms extends ae{constructor(){super(...arguments),this.framesPerSecond=60,this.updatingItems=!1,this.speed=600,this.easing="ease-in-out",this.flippersHiddenFromAT=!1,this.scrolling=!1,this.resizeDetector=null}get frameTime(){return 1e3/this.framesPerSecond}scrollingChanged(e,t){if(this.scrollContainer){const e=1==this.scrolling?"scrollstart":"scrollend";this.$emit(e,this.scrollContainer.scrollLeft)}}get isRtl(){return this.scrollItems.length>1&&this.scrollItems[0].offsetLeft>this.scrollItems[1].offsetLeft}connectedCallback(){super.connectedCallback(),this.initializeResizeDetector()}disconnectedCallback(){this.disconnectResizeDetector(),super.disconnectedCallback()}scrollItemsChanged(e,t){t&&!this.updatingItems&&s.DOM.queueUpdate((()=>this.setStops()))}disconnectResizeDetector(){this.resizeDetector&&(this.resizeDetector.disconnect(),this.resizeDetector=null)}initializeResizeDetector(){this.disconnectResizeDetector(),this.resizeDetector=new window.ResizeObserver(this.resized.bind(this)),this.resizeDetector.observe(this)}updateScrollStops(){this.updatingItems=!0;const e=this.scrollItems.reduce(((e,t)=>t instanceof HTMLSlotElement?e.concat(t.assignedElements()):(e.push(t),e)),[]);this.scrollItems=e,this.updatingItems=!1}setStops(){this.updateScrollStops();const{scrollContainer:e}=this,{scrollLeft:t}=e,{width:i,left:s}=e.getBoundingClientRect();this.width=i;let o=0,n=this.scrollItems.map(((e,i)=>{const{left:n,width:r}=e.getBoundingClientRect(),a=Math.round(n+t-s),l=Math.round(a+r);return this.isRtl?-l:(o=l,0===i?0:a)})).concat(o);n=this.fixScrollMisalign(n),n.sort(((e,t)=>Math.abs(e)-Math.abs(t))),this.scrollStops=n,this.setFlippers()}fixScrollMisalign(e){if(this.isRtl&&e.some((e=>e>0))){e.sort(((e,t)=>t-e));const t=e[0];e=e.map((e=>e-t))}return e}setFlippers(){var e,t;const i=this.scrollContainer.scrollLeft;if(null===(e=this.previousFlipperContainer)||void 0===e||e.classList.toggle("disabled",0===i),this.scrollStops){const e=Math.abs(this.scrollStops[this.scrollStops.length-1]);null===(t=this.nextFlipperContainer)||void 0===t||t.classList.toggle("disabled",Math.abs(i)+this.width>=e)}}scrollInView(e,t=0,i){var s;if("number"!=typeof e&&e&&(e=this.scrollItems.findIndex((t=>t===e||t.contains(e)))),void 0!==e){i=null!=i?i:t;const{scrollContainer:o,scrollStops:n,scrollItems:r}=this,{scrollLeft:a}=this.scrollContainer,{width:l}=o.getBoundingClientRect(),d=n[e],{width:h}=r[e].getBoundingClientRect(),c=d+h,u=a+t>d;if(u||a+l-i<c){const e=null!==(s=[...n].sort(((e,t)=>u?t-e:e-t)).find((e=>u?e+t<d:e+l-(null!=i?i:0)>c)))&&void 0!==s?s:0;this.scrollToPosition(e)}}}keyupHandler(e){switch(e.key){case"ArrowLeft":this.scrollToPrevious();break;case"ArrowRight":this.scrollToNext()}}scrollToPrevious(){const e=this.scrollContainer.scrollLeft,t=this.scrollStops.findIndex(((t,i)=>t>=e&&(this.isRtl||i===this.scrollStops.length-1||this.scrollStops[i+1]>e))),i=Math.abs(this.scrollStops[t+1]);let s=this.scrollStops.findIndex((e=>Math.abs(e)+this.width>i));(s>=t||-1===s)&&(s=t>0?t-1:0),this.scrollToPosition(this.scrollStops[s],e)}scrollToNext(){const e=this.scrollContainer.scrollLeft,t=this.scrollStops.findIndex((t=>Math.abs(t)>=Math.abs(e))),i=this.scrollStops.findIndex((t=>Math.abs(e)+this.width<=Math.abs(t)));let s=t;i>t+2?s=i-2:t<this.scrollStops.length-2&&(s=t+1),this.scrollToPosition(this.scrollStops[s],e)}scrollToPosition(e,t=this.scrollContainer.scrollLeft){var i;if(this.scrolling)return;this.scrolling=!0;const s=null!==(i=this.duration)&&void 0!==i?i:Math.abs(e-t)/this.speed+"s";this.content.style.setProperty("transition-duration",s);const o=parseFloat(getComputedStyle(this.content).getPropertyValue("transition-duration")),n=t=>{t&&t.target!==t.currentTarget||(this.content.style.setProperty("transition-duration","0s"),this.content.style.removeProperty("transform"),this.scrollContainer.style.setProperty("scroll-behavior","auto"),this.scrollContainer.scrollLeft=e,this.setFlippers(),this.content.removeEventListener("transitionend",n),this.scrolling=!1)};if(0===o)return void n();this.content.addEventListener("transitionend",n);const r=this.scrollContainer.scrollWidth-this.scrollContainer.clientWidth;let a=this.scrollContainer.scrollLeft-Math.min(e,r);this.isRtl&&(a=this.scrollContainer.scrollLeft+Math.min(Math.abs(e),r)),this.content.style.setProperty("transition-property","transform"),this.content.style.setProperty("transition-timing-function",this.easing),this.content.style.setProperty("transform",`translateX(${a}px)`)}resized(){this.resizeTimeout&&(this.resizeTimeout=clearTimeout(this.resizeTimeout)),this.resizeTimeout=setTimeout((()=>{this.width=this.scrollContainer.offsetWidth,this.setFlippers()}),this.frameTime)}scrolled(){this.scrollTimeout&&(this.scrollTimeout=clearTimeout(this.scrollTimeout)),this.scrollTimeout=setTimeout((()=>{this.setFlippers()}),this.frameTime)}}(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],Ms.prototype,"speed",void 0),(0,h.__decorate)([s.attr],Ms.prototype,"duration",void 0),(0,h.__decorate)([s.attr],Ms.prototype,"easing",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"flippers-hidden-from-at",converter:s.booleanConverter})],Ms.prototype,"flippersHiddenFromAT",void 0),(0,h.__decorate)([s.observable],Ms.prototype,"scrolling",void 0),(0,h.__decorate)([s.observable],Ms.prototype,"scrollItems",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"view"})],Ms.prototype,"view",void 0);const Vs=(e,t)=>{var i,o;return s.html`
|
|
956
|
-
<template
|
|
957
|
-
class="horizontal-scroll"
|
|
958
|
-
@keyup="${(e,t)=>e.keyupHandler(t.event)}"
|
|
959
|
-
>
|
|
960
|
-
${r(e,t)}
|
|
961
|
-
<div class="scroll-area" part="scroll-area">
|
|
962
|
-
<div
|
|
963
|
-
class="scroll-view"
|
|
964
|
-
part="scroll-view"
|
|
965
|
-
@scroll="${e=>e.scrolled()}"
|
|
966
|
-
${(0,s.ref)("scrollContainer")}
|
|
967
|
-
>
|
|
968
|
-
<div class="content-container" part="content-container" ${(0,s.ref)("content")}>
|
|
969
|
-
<slot
|
|
970
|
-
${(0,s.slotted)({property:"scrollItems",filter:(0,s.elements)()})}
|
|
971
|
-
></slot>
|
|
972
|
-
</div>
|
|
973
|
-
</div>
|
|
974
|
-
${(0,s.when)((e=>"mobile"!==e.view),s.html`
|
|
975
|
-
<div
|
|
976
|
-
class="scroll scroll-prev"
|
|
977
|
-
part="scroll-prev"
|
|
978
|
-
${(0,s.ref)("previousFlipperContainer")}
|
|
979
|
-
>
|
|
980
|
-
<div class="scroll-action" part="scroll-action-previous">
|
|
981
|
-
<slot name="previous-flipper">
|
|
982
|
-
${t.previousFlipper instanceof Function?t.previousFlipper(e,t):null!==(i=t.previousFlipper)&&void 0!==i?i:""}
|
|
983
|
-
</slot>
|
|
984
|
-
</div>
|
|
985
|
-
</div>
|
|
986
|
-
<div
|
|
987
|
-
class="scroll scroll-next"
|
|
988
|
-
part="scroll-next"
|
|
989
|
-
${(0,s.ref)("nextFlipperContainer")}
|
|
990
|
-
>
|
|
991
|
-
<div class="scroll-action" part="scroll-action-next">
|
|
992
|
-
<slot name="next-flipper">
|
|
993
|
-
${t.nextFlipper instanceof Function?t.nextFlipper(e,t):null!==(o=t.nextFlipper)&&void 0!==o?o:""}
|
|
994
|
-
</slot>
|
|
995
|
-
</div>
|
|
996
|
-
</div>
|
|
997
|
-
`)}
|
|
998
|
-
</div>
|
|
999
|
-
${n(e,t)}
|
|
1000
|
-
</template>
|
|
1001
|
-
`};function Hs(e,t,i){return e.nodeType!==Node.TEXT_NODE||"string"==typeof e.nodeValue&&!!e.nodeValue.trim().length}const zs=(e,t)=>s.html`
|
|
1002
|
-
<template
|
|
1003
|
-
class="
|
|
1004
|
-
${e=>e.readOnly?"readonly":""}
|
|
1005
|
-
"
|
|
1006
|
-
>
|
|
1007
|
-
<label
|
|
1008
|
-
part="label"
|
|
1009
|
-
for="control"
|
|
1010
|
-
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
|
|
1011
|
-
>
|
|
1012
|
-
<slot
|
|
1013
|
-
${(0,s.slotted)({property:"defaultSlottedNodes",filter:Hs})}
|
|
1014
|
-
></slot>
|
|
1015
|
-
</label>
|
|
1016
|
-
<div class="root" part="root" ${(0,s.ref)("root")}>
|
|
1017
|
-
${r(e,t)}
|
|
1018
|
-
<div class="input-wrapper" part="input-wrapper">
|
|
1019
|
-
<input
|
|
1020
|
-
class="control"
|
|
1021
|
-
part="control"
|
|
1022
|
-
id="control"
|
|
1023
|
-
@input="${e=>e.handleTextInput()}"
|
|
1024
|
-
@change="${e=>e.handleChange()}"
|
|
1025
|
-
?autofocus="${e=>e.autofocus}"
|
|
1026
|
-
?disabled="${e=>e.disabled}"
|
|
1027
|
-
list="${e=>e.list}"
|
|
1028
|
-
maxlength="${e=>e.maxlength}"
|
|
1029
|
-
minlength="${e=>e.minlength}"
|
|
1030
|
-
pattern="${e=>e.pattern}"
|
|
1031
|
-
placeholder="${e=>e.placeholder}"
|
|
1032
|
-
?readonly="${e=>e.readOnly}"
|
|
1033
|
-
?required="${e=>e.required}"
|
|
1034
|
-
size="${e=>e.size}"
|
|
1035
|
-
?spellcheck="${e=>e.spellcheck}"
|
|
1036
|
-
:value="${e=>e.value}"
|
|
1037
|
-
type="search"
|
|
1038
|
-
aria-atomic="${e=>e.ariaAtomic}"
|
|
1039
|
-
aria-busy="${e=>e.ariaBusy}"
|
|
1040
|
-
aria-controls="${e=>e.ariaControls}"
|
|
1041
|
-
aria-current="${e=>e.ariaCurrent}"
|
|
1042
|
-
aria-describedby="${e=>e.ariaDescribedby}"
|
|
1043
|
-
aria-details="${e=>e.ariaDetails}"
|
|
1044
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
1045
|
-
aria-errormessage="${e=>e.ariaErrormessage}"
|
|
1046
|
-
aria-flowto="${e=>e.ariaFlowto}"
|
|
1047
|
-
aria-haspopup="${e=>e.ariaHaspopup}"
|
|
1048
|
-
aria-hidden="${e=>e.ariaHidden}"
|
|
1049
|
-
aria-invalid="${e=>e.ariaInvalid}"
|
|
1050
|
-
aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
|
|
1051
|
-
aria-label="${e=>e.ariaLabel}"
|
|
1052
|
-
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
1053
|
-
aria-live="${e=>e.ariaLive}"
|
|
1054
|
-
aria-owns="${e=>e.ariaOwns}"
|
|
1055
|
-
aria-relevant="${e=>e.ariaRelevant}"
|
|
1056
|
-
aria-roledescription="${e=>e.ariaRoledescription}"
|
|
1057
|
-
${(0,s.ref)("control")}
|
|
1058
|
-
/>
|
|
1059
|
-
<slot name="close-button">
|
|
1060
|
-
<button
|
|
1061
|
-
class="clear-button ${e=>e.value?"":"clear-button__hidden"}"
|
|
1062
|
-
part="clear-button"
|
|
1063
|
-
tabindex="-1"
|
|
1064
|
-
@click=${e=>e.handleClearInput()}
|
|
1065
|
-
>
|
|
1066
|
-
<slot name="close-glyph">
|
|
1067
|
-
<svg
|
|
1068
|
-
width="9"
|
|
1069
|
-
height="9"
|
|
1070
|
-
viewBox="0 0 9 9"
|
|
1071
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
1072
|
-
>
|
|
1073
|
-
<path
|
|
1074
|
-
d="M0.146447 0.146447C0.338683 -0.0478972 0.645911 -0.0270359 0.853553 0.146447L4.5 3.793L8.14645 0.146447C8.34171 -0.0488155 8.65829 -0.0488155 8.85355 0.146447C9.04882 0.341709 9.04882 0.658291 8.85355 0.853553L5.207 4.5L8.85355 8.14645C9.05934 8.35223 9.03129 8.67582 8.85355 8.85355C8.67582 9.03129 8.35409 9.02703 8.14645 8.85355L4.5 5.207L0.853553 8.85355C0.658291 9.04882 0.341709 9.04882 0.146447 8.85355C-0.0488155 8.65829 -0.0488155 8.34171 0.146447 8.14645L3.793 4.5L0.146447 0.853553C-0.0268697 0.680237 -0.0457894 0.34079 0.146447 0.146447Z"
|
|
1075
|
-
/>
|
|
1076
|
-
</svg>
|
|
1077
|
-
</slot>
|
|
1078
|
-
</button>
|
|
1079
|
-
</slot>
|
|
1080
|
-
</div>
|
|
1081
|
-
${n(e,t)}
|
|
1082
|
-
</div>
|
|
1083
|
-
</template>
|
|
1084
|
-
`;class Bs extends ae{}class Ns extends(ht(Bs)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class qs extends Ns{readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly,this.validate())}autofocusChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autofocus=this.autofocus,this.validate())}placeholderChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.placeholder=this.placeholder)}listChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.setAttribute("list",this.list),this.validate())}maxlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.maxLength=this.maxlength,this.validate())}minlengthChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.minLength=this.minlength,this.validate())}patternChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.pattern=this.pattern,this.validate())}sizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.size=this.size)}spellcheckChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.spellcheck=this.spellcheck)}connectedCallback(){super.connectedCallback(),this.validate(),this.autofocus&&s.DOM.queueUpdate((()=>{this.focus()}))}validate(){super.validate(this.control)}handleTextInput(){this.value=this.control.value}handleClearInput(){this.value="",this.control.focus(),this.handleChange()}handleChange(){this.$emit("change")}}(0,h.__decorate)([(0,s.attr)({attribute:"readonly",mode:"boolean"})],qs.prototype,"readOnly",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],qs.prototype,"autofocus",void 0),(0,h.__decorate)([s.attr],qs.prototype,"placeholder",void 0),(0,h.__decorate)([s.attr],qs.prototype,"list",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],qs.prototype,"maxlength",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],qs.prototype,"minlength",void 0),(0,h.__decorate)([s.attr],qs.prototype,"pattern",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],qs.prototype,"size",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],qs.prototype,"spellcheck",void 0),(0,h.__decorate)([s.observable],qs.prototype,"defaultSlottedNodes",void 0);class Us{}he(Us,Re),he(qs,o,Us);class js extends Xi{}class Ws extends(ht(js)){constructor(){super(...arguments),this.proxy=document.createElement("select")}}class Ks extends Ws{constructor(){super(...arguments),this.open=!1,this.forcedPosition=!1,this.listboxId=zt("listbox-"),this.maxHeight=0}openChanged(e,t){if(this.collapsible){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void s.DOM.queueUpdate((()=>this.focus()));this.ariaControls="",this.ariaExpanded="false"}}get collapsible(){return!(this.multiple||"number"==typeof this.size)}get value(){return s.Observable.track(this,"value"),this._value}set value(e){var t,i,o,n,r,a,l;const d=`${this._value}`;if(null===(t=this._options)||void 0===t?void 0:t.length){const t=this._options.findIndex((t=>t.value===e)),s=null!==(o=null===(i=this._options[this.selectedIndex])||void 0===i?void 0:i.value)&&void 0!==o?o:null,d=null!==(r=null===(n=this._options[t])||void 0===n?void 0:n.value)&&void 0!==r?r:null;-1!==t&&s===d||(e="",this.selectedIndex=t),e=null!==(l=null===(a=this.firstSelectedOption)||void 0===a?void 0:a.value)&&void 0!==l?l:e}d!==e&&(this._value=e,super.valueChanged(d,e),s.Observable.notify(this,"value"),this.updateDisplayValue())}updateValue(e){var t,i;this.$fastController.isConnected&&(this.value=null!==(i=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value)&&void 0!==i?i:""),e&&(this.$emit("input"),this.$emit("change",this,{bubbles:!0,composed:void 0}))}selectedIndexChanged(e,t){super.selectedIndexChanged(e,t),this.updateValue()}positionChanged(e,t){this.positionAttribute=t,this.setPositioning()}setPositioning(){const e=this.getBoundingClientRect(),t=window.innerHeight-e.bottom;this.position=this.forcedPosition?this.positionAttribute:e.top>t?Yt.above:Yt.below,this.positionAttribute=this.forcedPosition?this.positionAttribute:this.position,this.maxHeight=this.position===Yt.above?~~e.top:~~t}get displayValue(){var e,t;return s.Observable.track(this,"displayValue"),null!==(t=null===(e=this.firstSelectedOption)||void 0===e?void 0:e.text)&&void 0!==t?t:""}disabledChanged(e,t){super.disabledChanged&&super.disabledChanged(e,t),this.ariaDisabled=this.disabled?"true":"false"}formResetCallback(){this.setProxyOptions(),super.setDefaultSelectedOption(),-1===this.selectedIndex&&(this.selectedIndex=0)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(t&&t.disabled)return}return super.clickHandler(e),this.open=this.collapsible&&!this.open,this.open||this.indexWhenOpened===this.selectedIndex||this.updateValue(!0),!0}}focusoutHandler(e){var t;if(super.focusoutHandler(e),!this.open)return!0;const i=e.relatedTarget;this.isSameNode(i)?this.focus():(null===(t=this.options)||void 0===t?void 0:t.includes(i))||(this.open=!1,this.indexWhenOpened!==this.selectedIndex&&this.updateValue(!0))}handleChange(e,t){super.handleChange(e,t),"value"===t&&this.updateValue()}slottedOptionsChanged(e,t){this.options.forEach((e=>{s.Observable.getNotifier(e).unsubscribe(this,"value")})),super.slottedOptionsChanged(e,t),this.options.forEach((e=>{s.Observable.getNotifier(e).subscribe(this,"value")})),this.setProxyOptions(),this.updateValue()}mousedownHandler(e){var t;return e.offsetX>=0&&e.offsetX<=(null===(t=this.listbox)||void 0===t?void 0:t.scrollWidth)?super.mousedownHandler(e):this.collapsible}multipleChanged(e,t){super.multipleChanged(e,t),this.proxy&&(this.proxy.multiple=t)}selectedOptionsChanged(e,t){var i;super.selectedOptionsChanged(e,t),null===(i=this.options)||void 0===i||i.forEach(((e,t)=>{var i;const s=null===(i=this.proxy)||void 0===i?void 0:i.options.item(t);s&&(s.selected=e.selected)}))}setDefaultSelectedOption(){var e;const t=null!==(e=this.options)&&void 0!==e?e:Array.from(this.children).filter(Kt.slottedOptionFilter),i=null==t?void 0:t.findIndex((e=>e.hasAttribute("selected")||e.selected||e.value===this.value));this.selectedIndex=-1===i?0:i}setProxyOptions(){this.proxy instanceof HTMLSelectElement&&this.options&&(this.proxy.options.length=0,this.options.forEach((e=>{const t=e.proxy||(e instanceof HTMLOptionElement?e.cloneNode():null);t&&this.proxy.options.add(t)})))}keydownHandler(e){super.keydownHandler(e);const t=e.key||e.key.charCodeAt(0);switch(t){case we:e.preventDefault(),this.collapsible&&this.typeAheadExpired&&(this.open=!this.open);break;case Ce:case xe:e.preventDefault();break;case ge:e.preventDefault(),this.open=!this.open;break;case ye:this.collapsible&&this.open&&(e.preventDefault(),this.open=!1);break;case $e:return this.collapsible&&this.open&&(e.preventDefault(),this.open=!1),!0}return this.open||this.indexWhenOpened===this.selectedIndex||(this.updateValue(!0),this.indexWhenOpened=this.selectedIndex),!(t===me||t===be)}connectedCallback(){super.connectedCallback(),this.forcedPosition=!!this.positionAttribute,this.addEventListener("contentchange",this.updateDisplayValue)}disconnectedCallback(){this.removeEventListener("contentchange",this.updateDisplayValue),super.disconnectedCallback()}sizeChanged(e,t){super.sizeChanged(e,t),this.proxy&&(this.proxy.size=t)}updateDisplayValue(){this.collapsible&&s.Observable.notify(this,"displayValue")}}(0,h.__decorate)([(0,s.attr)({attribute:"open",mode:"boolean"})],Ks.prototype,"open",void 0),(0,h.__decorate)([s.volatile],Ks.prototype,"collapsible",null),(0,h.__decorate)([s.observable],Ks.prototype,"control",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"position"})],Ks.prototype,"positionAttribute",void 0),(0,h.__decorate)([s.observable],Ks.prototype,"position",void 0),(0,h.__decorate)([s.observable],Ks.prototype,"maxHeight",void 0);class Gs{}(0,h.__decorate)([s.observable],Gs.prototype,"ariaControls",void 0),he(Gs,Gt),he(Ks,o,Gs);const Ys=(e,t)=>s.html`
|
|
1085
|
-
<template
|
|
1086
|
-
class="${e=>[e.collapsible&&"collapsible",e.collapsible&&e.open&&"open",e.disabled&&"disabled",e.collapsible&&e.position].filter(Boolean).join(" ")}"
|
|
1087
|
-
aria-activedescendant="${e=>e.ariaActiveDescendant}"
|
|
1088
|
-
aria-controls="${e=>e.ariaControls}"
|
|
1089
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
1090
|
-
aria-expanded="${e=>e.ariaExpanded}"
|
|
1091
|
-
aria-haspopup="${e=>e.collapsible?"listbox":null}"
|
|
1092
|
-
aria-multiselectable="${e=>e.ariaMultiSelectable}"
|
|
1093
|
-
?open="${e=>e.open}"
|
|
1094
|
-
role="combobox"
|
|
1095
|
-
tabindex="${e=>e.disabled?null:"0"}"
|
|
1096
|
-
@click="${(e,t)=>e.clickHandler(t.event)}"
|
|
1097
|
-
@focusin="${(e,t)=>e.focusinHandler(t.event)}"
|
|
1098
|
-
@focusout="${(e,t)=>e.focusoutHandler(t.event)}"
|
|
1099
|
-
@keydown="${(e,t)=>e.keydownHandler(t.event)}"
|
|
1100
|
-
@mousedown="${(e,t)=>e.mousedownHandler(t.event)}"
|
|
1101
|
-
>
|
|
1102
|
-
${(0,s.when)((e=>e.collapsible),s.html`
|
|
1103
|
-
<div
|
|
1104
|
-
class="control"
|
|
1105
|
-
part="control"
|
|
1106
|
-
?disabled="${e=>e.disabled}"
|
|
1107
|
-
${(0,s.ref)("control")}
|
|
1108
|
-
>
|
|
1109
|
-
${r(e,t)}
|
|
1110
|
-
<slot name="button-container">
|
|
1111
|
-
<div class="selected-value" part="selected-value">
|
|
1112
|
-
<slot name="selected-value">${e=>e.displayValue}</slot>
|
|
1113
|
-
</div>
|
|
1114
|
-
<div aria-hidden="true" class="indicator" part="indicator">
|
|
1115
|
-
<slot name="indicator">
|
|
1116
|
-
${t.indicator||""}
|
|
1117
|
-
</slot>
|
|
1118
|
-
</div>
|
|
1119
|
-
</slot>
|
|
1120
|
-
${n(e,t)}
|
|
1121
|
-
</div>
|
|
1122
|
-
`)}
|
|
1123
|
-
<div
|
|
1124
|
-
class="listbox"
|
|
1125
|
-
id="${e=>e.listboxId}"
|
|
1126
|
-
part="listbox"
|
|
1127
|
-
role="listbox"
|
|
1128
|
-
?disabled="${e=>e.disabled}"
|
|
1129
|
-
?hidden="${e=>!!e.collapsible&&!e.open}"
|
|
1130
|
-
${(0,s.ref)("listbox")}
|
|
1131
|
-
>
|
|
1132
|
-
<slot
|
|
1133
|
-
${(0,s.slotted)({filter:Kt.slottedOptionFilter,flatten:!0,property:"slottedOptions"})}
|
|
1134
|
-
></slot>
|
|
1135
|
-
</div>
|
|
1136
|
-
</template>
|
|
1137
|
-
`,Xs=(e,t)=>s.html`
|
|
1138
|
-
<template
|
|
1139
|
-
class="${e=>"circle"===e.shape?"circle":"rect"}"
|
|
1140
|
-
pattern="${e=>e.pattern}"
|
|
1141
|
-
?shimmer="${e=>e.shimmer}"
|
|
1142
|
-
>
|
|
1143
|
-
${(0,s.when)((e=>!0===e.shimmer),s.html`
|
|
1144
|
-
<span class="shimmer"></span>
|
|
1145
|
-
`)}
|
|
1146
|
-
<object type="image/svg+xml" data="${e=>e.pattern}" role="presentation">
|
|
1147
|
-
<img class="pattern" src="${e=>e.pattern}" />
|
|
1148
|
-
</object>
|
|
1149
|
-
<slot></slot>
|
|
1150
|
-
</template>
|
|
1151
|
-
`;class Qs extends ae{constructor(){super(...arguments),this.shape="rect"}}(0,h.__decorate)([s.attr],Qs.prototype,"fill",void 0),(0,h.__decorate)([s.attr],Qs.prototype,"shape",void 0),(0,h.__decorate)([s.attr],Qs.prototype,"pattern",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Qs.prototype,"shimmer",void 0);const Zs=(e,t)=>s.html`
|
|
1152
|
-
<template
|
|
1153
|
-
aria-disabled="${e=>e.disabled}"
|
|
1154
|
-
class="${e=>e.sliderOrientation||Ni}
|
|
1155
|
-
${e=>e.disabled?"disabled":""}"
|
|
1156
|
-
>
|
|
1157
|
-
<div ${(0,s.ref)("root")} part="root" class="root" style="${e=>e.positionStyle}">
|
|
1158
|
-
<div class="container">
|
|
1159
|
-
${(0,s.when)((e=>!e.hideMark),s.html`
|
|
1160
|
-
<div class="mark"></div>
|
|
1161
|
-
`)}
|
|
1162
|
-
<div class="label">
|
|
1163
|
-
<slot></slot>
|
|
1164
|
-
</div>
|
|
1165
|
-
</div>
|
|
1166
|
-
</div>
|
|
1167
|
-
</template>
|
|
1168
|
-
`;function Js(e,t,i,s){let o=_e(0,1,(e-t)/(i-t));return s===Le.rtl&&(o=1-o),o}const eo={min:0,max:0,direction:Le.ltr,orientation:Ni,disabled:!1};class to extends ae{constructor(){super(...arguments),this.hideMark=!1,this.sliderDirection=Le.ltr,this.getSliderConfiguration=()=>{if(this.isSliderConfig(this.parentNode)){const e=this.parentNode,{min:t,max:i,direction:s,orientation:o,disabled:n}=e;void 0!==n&&(this.disabled=n),this.sliderDirection=s||Le.ltr,this.sliderOrientation=o||Ni,this.sliderMaxPosition=i,this.sliderMinPosition=t}else this.sliderDirection=eo.direction||Le.ltr,this.sliderOrientation=eo.orientation||Ni,this.sliderMaxPosition=eo.max,this.sliderMinPosition=eo.min},this.positionAsStyle=()=>{const e=this.sliderDirection?this.sliderDirection:Le.ltr,t=Js(Number(this.position),Number(this.sliderMinPosition),Number(this.sliderMaxPosition));let i=Math.round(100*(1-t)),s=Math.round(100*t);return Number.isNaN(s)&&Number.isNaN(i)&&(i=50,s=50),this.sliderOrientation===Ni?e===Le.rtl?`right: ${s}%; left: ${i}%;`:`left: ${s}%; right: ${i}%;`:`top: ${s}%; bottom: ${i}%;`}}positionChanged(){this.positionStyle=this.positionAsStyle()}sliderOrientationChanged(){}connectedCallback(){super.connectedCallback(),this.getSliderConfiguration(),this.positionStyle=this.positionAsStyle(),this.notifier=s.Observable.getNotifier(this.parentNode),this.notifier.subscribe(this,"orientation"),this.notifier.subscribe(this,"direction"),this.notifier.subscribe(this,"max"),this.notifier.subscribe(this,"min")}disconnectedCallback(){super.disconnectedCallback(),this.notifier.unsubscribe(this,"orientation"),this.notifier.unsubscribe(this,"direction"),this.notifier.unsubscribe(this,"max"),this.notifier.unsubscribe(this,"min")}handleChange(e,t){switch(t){case"direction":this.sliderDirection=e.direction;break;case"orientation":this.sliderOrientation=e.orientation;break;case"max":this.sliderMaxPosition=e.max;break;case"min":this.sliderMinPosition=e.min}this.positionStyle=this.positionAsStyle()}isSliderConfig(e){return void 0!==e.max&&void 0!==e.min}}(0,h.__decorate)([s.observable],to.prototype,"positionStyle",void 0),(0,h.__decorate)([s.attr],to.prototype,"position",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"hide-mark",mode:"boolean"})],to.prototype,"hideMark",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"disabled",mode:"boolean"})],to.prototype,"disabled",void 0),(0,h.__decorate)([s.observable],to.prototype,"sliderOrientation",void 0),(0,h.__decorate)([s.observable],to.prototype,"sliderMinPosition",void 0),(0,h.__decorate)([s.observable],to.prototype,"sliderMaxPosition",void 0),(0,h.__decorate)([s.observable],to.prototype,"sliderDirection",void 0);const io=(e,t)=>s.html`
|
|
1169
|
-
<template
|
|
1170
|
-
role="slider"
|
|
1171
|
-
class="${e=>e.readOnly?"readonly":""}
|
|
1172
|
-
${e=>e.orientation||Ni}"
|
|
1173
|
-
tabindex="${e=>e.disabled?null:0}"
|
|
1174
|
-
aria-valuetext="${e=>e.valueTextFormatter(e.value)}"
|
|
1175
|
-
aria-valuenow="${e=>e.value}"
|
|
1176
|
-
aria-valuemin="${e=>e.min}"
|
|
1177
|
-
aria-valuemax="${e=>e.max}"
|
|
1178
|
-
aria-disabled="${e=>!!e.disabled||void 0}"
|
|
1179
|
-
aria-readonly="${e=>!!e.readOnly||void 0}"
|
|
1180
|
-
aria-orientation="${e=>e.orientation}"
|
|
1181
|
-
class="${e=>e.orientation}"
|
|
1182
|
-
>
|
|
1183
|
-
<div part="positioning-region" class="positioning-region">
|
|
1184
|
-
<div ${(0,s.ref)("track")} part="track-container" class="track">
|
|
1185
|
-
<slot name="track"></slot>
|
|
1186
|
-
<div part="track-start" class="track-start" style="${e=>e.position}">
|
|
1187
|
-
<slot name="track-start"></slot>
|
|
1188
|
-
</div>
|
|
1189
|
-
</div>
|
|
1190
|
-
<slot></slot>
|
|
1191
|
-
<div
|
|
1192
|
-
${(0,s.ref)("thumb")}
|
|
1193
|
-
part="thumb-container"
|
|
1194
|
-
class="thumb-container"
|
|
1195
|
-
style="${e=>e.position}"
|
|
1196
|
-
>
|
|
1197
|
-
<slot name="thumb">${t.thumb||""}</slot>
|
|
1198
|
-
</div>
|
|
1199
|
-
</div>
|
|
1200
|
-
</template>
|
|
1201
|
-
`;class so extends ae{}class oo extends(ht(so)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}const no={singleValue:"single-value"};class ro extends oo{constructor(){super(...arguments),this.direction=Le.ltr,this.isDragging=!1,this.trackWidth=0,this.trackMinWidth=0,this.trackHeight=0,this.trackLeft=0,this.trackMinHeight=0,this.valueTextFormatter=()=>null,this.min=0,this.max=10,this.step=1,this.orientation=Ni,this.mode=no.singleValue,this.keypressHandler=e=>{if(!this.readOnly)if(e.key===Ce)e.preventDefault(),this.value=`${this.min}`;else if(e.key===xe)e.preventDefault(),this.value=`${this.max}`;else if(!e.shiftKey)switch(e.key){case fe:case be:e.preventDefault(),this.increment();break;case ve:case me:e.preventDefault(),this.decrement()}},this.setupTrackConstraints=()=>{const e=this.track.getBoundingClientRect();this.trackWidth=this.track.clientWidth,this.trackMinWidth=this.track.clientLeft,this.trackHeight=e.bottom,this.trackMinHeight=e.top,this.trackLeft=this.getBoundingClientRect().left,0===this.trackWidth&&(this.trackWidth=1)},this.setupListeners=(e=!1)=>{const t=(e?"remove":"add")+"EventListener";this[t]("keydown",this.keypressHandler),this[t]("mousedown",this.handleMouseDown),this.thumb[t]("mousedown",this.handleThumbMouseDown,{passive:!0}),this.thumb[t]("touchstart",this.handleThumbMouseDown,{passive:!0}),e&&(this.handleMouseDown(null),this.handleThumbMouseDown(null))},this.initialValue="",this.handleThumbMouseDown=e=>{if(e){if(this.readOnly||this.disabled||e.defaultPrevented)return;e.target.focus()}const t=(null!==e?"add":"remove")+"EventListener";window[t]("mouseup",this.handleWindowMouseUp),window[t]("mousemove",this.handleMouseMove,{passive:!0}),window[t]("touchmove",this.handleMouseMove,{passive:!0}),window[t]("touchend",this.handleWindowMouseUp),this.isDragging=null!==e},this.handleMouseMove=e=>{if(this.readOnly||this.disabled||e.defaultPrevented)return;const t=window.TouchEvent&&e instanceof TouchEvent?e.touches[0]:e,i=this.orientation===Ni?t.pageX-document.documentElement.scrollLeft-this.trackLeft:t.pageY-document.documentElement.scrollTop;this.value=`${this.calculateNewValue(i)}`},this.calculateNewValue=e=>{const t=Js(e,this.orientation===Ni?this.trackMinWidth:this.trackMinHeight,this.orientation===Ni?this.trackWidth:this.trackHeight,this.direction),i=(this.max-this.min)*t+this.min;return this.convertToConstrainedValue(i)},this.handleWindowMouseUp=e=>{this.stopDragging()},this.stopDragging=()=>{this.isDragging=!1,this.handleMouseDown(null),this.handleThumbMouseDown(null)},this.handleMouseDown=e=>{const t=(null!==e?"add":"remove")+"EventListener";if((null===e||!this.disabled&&!this.readOnly)&&(window[t]("mouseup",this.handleWindowMouseUp),window.document[t]("mouseleave",this.handleWindowMouseUp),window[t]("mousemove",this.handleMouseMove),e)){e.preventDefault(),this.setupTrackConstraints(),e.target.focus();const t=this.orientation===Ni?e.pageX-document.documentElement.scrollLeft-this.trackLeft:e.pageY-document.documentElement.scrollTop;this.value=`${this.calculateNewValue(t)}`}},this.convertToConstrainedValue=e=>{isNaN(e)&&(e=this.min);let t=e-this.min;const i=t-Math.round(t/this.step)*(this.stepMultiplier*this.step)/this.stepMultiplier;return t=i>=Number(this.step)/2?t-i+Number(this.step):t-i,t+this.min}}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly)}get valueAsNumber(){return parseFloat(super.value)}set valueAsNumber(e){this.value=e.toString()}valueChanged(e,t){super.valueChanged(e,t),this.$fastController.isConnected&&this.setThumbPositionForOrientation(this.direction),this.$emit("change")}minChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.min=`${this.min}`),this.validate()}maxChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.max=`${this.max}`),this.validate()}stepChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.step=`${this.step}`),this.updateStepMultiplier(),this.validate()}orientationChanged(){this.$fastController.isConnected&&this.setThumbPositionForOrientation(this.direction)}connectedCallback(){super.connectedCallback(),this.proxy.setAttribute("type","range"),this.direction=Ne(this),this.updateStepMultiplier(),this.setupTrackConstraints(),this.setupListeners(),this.setupDefaultValue(),this.setThumbPositionForOrientation(this.direction)}disconnectedCallback(){this.setupListeners(!0)}increment(){const e=this.direction!==Le.rtl&&this.orientation!==qi?Number(this.value)+Number(this.step):Number(this.value)-Number(this.step),t=this.convertToConstrainedValue(e),i=t<Number(this.max)?`${t}`:`${this.max}`;this.value=i}decrement(){const e=this.direction!==Le.rtl&&this.orientation!==qi?Number(this.value)-Number(this.step):Number(this.value)+Number(this.step),t=this.convertToConstrainedValue(e),i=t>Number(this.min)?`${t}`:`${this.min}`;this.value=i}setThumbPositionForOrientation(e){const t=100*(1-Js(Number(this.value),Number(this.min),Number(this.max),e));this.orientation===Ni?this.position=this.isDragging?`right: ${t}%; transition: none;`:`right: ${t}%; transition: all 0.2s ease;`:this.position=this.isDragging?`bottom: ${t}%; transition: none;`:`bottom: ${t}%; transition: all 0.2s ease;`}updateStepMultiplier(){const e=this.step+"",t=this.step%1?e.length-e.indexOf(".")-1:0;this.stepMultiplier=Math.pow(10,t)}get midpoint(){return`${this.convertToConstrainedValue((this.max+this.min)/2)}`}setupDefaultValue(){if("string"==typeof this.value)if(0===this.value.length)this.initialValue=this.midpoint;else{const e=parseFloat(this.value);!Number.isNaN(e)&&(e<this.min||e>this.max)&&(this.value=this.midpoint)}}}(0,h.__decorate)([(0,s.attr)({attribute:"readonly",mode:"boolean"})],ro.prototype,"readOnly",void 0),(0,h.__decorate)([s.observable],ro.prototype,"direction",void 0),(0,h.__decorate)([s.observable],ro.prototype,"isDragging",void 0),(0,h.__decorate)([s.observable],ro.prototype,"position",void 0),(0,h.__decorate)([s.observable],ro.prototype,"trackWidth",void 0),(0,h.__decorate)([s.observable],ro.prototype,"trackMinWidth",void 0),(0,h.__decorate)([s.observable],ro.prototype,"trackHeight",void 0),(0,h.__decorate)([s.observable],ro.prototype,"trackLeft",void 0),(0,h.__decorate)([s.observable],ro.prototype,"trackMinHeight",void 0),(0,h.__decorate)([s.observable],ro.prototype,"valueTextFormatter",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],ro.prototype,"min",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],ro.prototype,"max",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],ro.prototype,"step",void 0),(0,h.__decorate)([s.attr],ro.prototype,"orientation",void 0),(0,h.__decorate)([s.attr],ro.prototype,"mode",void 0);const ao=(e,t)=>s.html`
|
|
1202
|
-
<template
|
|
1203
|
-
role="switch"
|
|
1204
|
-
aria-checked="${e=>e.checked}"
|
|
1205
|
-
aria-disabled="${e=>e.disabled}"
|
|
1206
|
-
aria-readonly="${e=>e.readOnly}"
|
|
1207
|
-
tabindex="${e=>e.disabled?null:0}"
|
|
1208
|
-
@keypress="${(e,t)=>e.keypressHandler(t.event)}"
|
|
1209
|
-
@click="${(e,t)=>e.clickHandler(t.event)}"
|
|
1210
|
-
class="${e=>e.checked?"checked":""}"
|
|
1211
|
-
>
|
|
1212
|
-
<label
|
|
1213
|
-
part="label"
|
|
1214
|
-
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
|
|
1215
|
-
>
|
|
1216
|
-
<slot ${(0,s.slotted)("defaultSlottedNodes")}></slot>
|
|
1217
|
-
</label>
|
|
1218
|
-
<div part="switch" class="switch">
|
|
1219
|
-
<slot name="switch">${t.switch||""}</slot>
|
|
1220
|
-
</div>
|
|
1221
|
-
<span class="status-message" part="status-message">
|
|
1222
|
-
<span class="checked-message" part="checked-message">
|
|
1223
|
-
<slot name="checked-message"></slot>
|
|
1224
|
-
</span>
|
|
1225
|
-
<span class="unchecked-message" part="unchecked-message">
|
|
1226
|
-
<slot name="unchecked-message"></slot>
|
|
1227
|
-
</span>
|
|
1228
|
-
</span>
|
|
1229
|
-
</template>
|
|
1230
|
-
`;class lo extends ae{}class ho extends(ct(lo)){constructor(){super(...arguments),this.proxy=document.createElement("input")}}class co extends ho{constructor(){super(),this.initialValue="on",this.keypressHandler=e=>{if(!this.readOnly)switch(e.key){case ge:case we:this.checked=!this.checked}},this.clickHandler=e=>{this.disabled||this.readOnly||(this.checked=!this.checked)},this.proxy.setAttribute("type","checkbox")}readOnlyChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.readOnly=this.readOnly),this.readOnly?this.classList.add("readonly"):this.classList.remove("readonly")}checkedChanged(e,t){super.checkedChanged(e,t),this.checked?this.classList.add("checked"):this.classList.remove("checked")}}(0,h.__decorate)([(0,s.attr)({attribute:"readonly",mode:"boolean"})],co.prototype,"readOnly",void 0),(0,h.__decorate)([s.observable],co.prototype,"defaultSlottedNodes",void 0);const uo=(e,t)=>s.html`
|
|
1231
|
-
<template slot="tabpanel" role="tabpanel">
|
|
1232
|
-
<slot></slot>
|
|
1233
|
-
</template>
|
|
1234
|
-
`;class po extends ae{}const mo=(e,t)=>s.html`
|
|
1235
|
-
<template slot="tab" role="tab" aria-disabled="${e=>e.disabled}">
|
|
1236
|
-
<slot></slot>
|
|
1237
|
-
</template>
|
|
1238
|
-
`;class vo extends ae{}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],vo.prototype,"disabled",void 0);const fo=(e,t)=>s.html`
|
|
1239
|
-
<template class="${e=>e.orientation}">
|
|
1240
|
-
${r(e,t)}
|
|
1241
|
-
<div class="tablist" part="tablist" role="tablist">
|
|
1242
|
-
<slot class="tab" name="tab" part="tab" ${(0,s.slotted)("tabs")}></slot>
|
|
1243
|
-
|
|
1244
|
-
${(0,s.when)((e=>e.showActiveIndicator),s.html`
|
|
1245
|
-
<div
|
|
1246
|
-
${(0,s.ref)("activeIndicatorRef")}
|
|
1247
|
-
class="activeIndicator"
|
|
1248
|
-
part="activeIndicator"
|
|
1249
|
-
></div>
|
|
1250
|
-
`)}
|
|
1251
|
-
</div>
|
|
1252
|
-
${n(e,t)}
|
|
1253
|
-
<div class="tabpanel">
|
|
1254
|
-
<slot name="tabpanel" part="tabpanel" ${(0,s.slotted)("tabpanels")}></slot>
|
|
1255
|
-
</div>
|
|
1256
|
-
</template>
|
|
1257
|
-
`,bo={vertical:"vertical",horizontal:"horizontal"};class go extends ae{constructor(){super(...arguments),this.orientation=bo.horizontal,this.activeindicator=!0,this.showActiveIndicator=!0,this.prevActiveTabIndex=0,this.activeTabIndex=0,this.ticking=!1,this.change=()=>{this.$emit("change",this.activetab)},this.isDisabledElement=e=>"true"===e.getAttribute("aria-disabled"),this.isFocusableElement=e=>!this.isDisabledElement(e),this.setTabs=()=>{const e="gridColumn",t="gridRow",i=this.isHorizontal()?e:t;this.activeTabIndex=this.getActiveIndex(),this.showActiveIndicator=!1,this.tabs.forEach(((s,o)=>{if("tab"===s.slot){const e=this.activeTabIndex===o&&this.isFocusableElement(s);this.activeindicator&&this.isFocusableElement(s)&&(this.showActiveIndicator=!0);const t=this.tabIds[o],i=this.tabpanelIds[o];s.setAttribute("id",t),s.setAttribute("aria-selected",e?"true":"false"),s.setAttribute("aria-controls",i),s.addEventListener("click",this.handleTabClick),s.addEventListener("keydown",this.handleTabKeyDown),s.setAttribute("tabindex",e?"0":"-1"),e&&(this.activetab=s)}s.style[e]="",s.style[t]="",s.style[i]=`${o+1}`,this.isHorizontal()?s.classList.remove("vertical"):s.classList.add("vertical")}))},this.setTabPanels=()=>{this.tabpanels.forEach(((e,t)=>{const i=this.tabIds[t],s=this.tabpanelIds[t];e.setAttribute("id",s),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")}))},this.handleTabClick=e=>{const t=e.currentTarget;1===t.nodeType&&this.isFocusableElement(t)&&(this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=this.tabs.indexOf(t),this.setComponent())},this.handleTabKeyDown=e=>{if(this.isHorizontal())switch(e.key){case ve:e.preventDefault(),this.adjustBackward(e);break;case fe:e.preventDefault(),this.adjustForward(e)}else switch(e.key){case be:e.preventDefault(),this.adjustBackward(e);break;case me:e.preventDefault(),this.adjustForward(e)}switch(e.key){case Ce:e.preventDefault(),this.adjust(-this.activeTabIndex);break;case xe:e.preventDefault(),this.adjust(this.tabs.length-this.activeTabIndex-1)}},this.adjustForward=e=>{const t=this.tabs;let i=0;for(i=this.activetab?t.indexOf(this.activetab)+1:1,i===t.length&&(i=0);i<t.length&&t.length>1;){if(this.isFocusableElement(t[i])){this.moveToTabByIndex(t,i);break}if(this.activetab&&i===t.indexOf(this.activetab))break;i+1>=t.length?i=0:i+=1}},this.adjustBackward=e=>{const t=this.tabs;let i=0;for(i=this.activetab?t.indexOf(this.activetab)-1:0,i=i<0?t.length-1:i;i>=0&&t.length>1;){if(this.isFocusableElement(t[i])){this.moveToTabByIndex(t,i);break}i-1<0?i=t.length-1:i-=1}},this.moveToTabByIndex=(e,t)=>{const i=e[t];this.activetab=i,this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=t,i.focus(),this.setComponent()}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}activeidChanged(e,t){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.prevActiveTabIndex=this.tabs.findIndex((t=>t.id===e)),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.handleActiveIndicatorPosition())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}getTabIds(){return this.tabs.map((e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${zt()}`}))}getTabPanelIds(){return this.tabpanels.map((e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${zt()}`}))}setComponent(){this.activeTabIndex!==this.prevActiveTabIndex&&(this.activeid=this.tabIds[this.activeTabIndex],this.focusTab(),this.change())}isHorizontal(){return this.orientation===bo.horizontal}handleActiveIndicatorPosition(){this.showActiveIndicator&&this.activeindicator&&this.activeTabIndex!==this.prevActiveTabIndex&&(this.ticking?this.ticking=!1:(this.ticking=!0,this.animateActiveIndicator()))}animateActiveIndicator(){this.ticking=!0;const e=this.isHorizontal()?"gridColumn":"gridRow",t=this.isHorizontal()?"translateX":"translateY",i=this.isHorizontal()?"offsetLeft":"offsetTop",s=this.activeIndicatorRef[i];this.activeIndicatorRef.style[e]=`${this.activeTabIndex+1}`;const o=this.activeIndicatorRef[i];this.activeIndicatorRef.style[e]=`${this.prevActiveTabIndex+1}`;const n=o-s;this.activeIndicatorRef.style.transform=`${t}(${n}px)`,this.activeIndicatorRef.classList.add("activeIndicatorTransition"),this.activeIndicatorRef.addEventListener("transitionend",(()=>{this.ticking=!1,this.activeIndicatorRef.style[e]=`${this.activeTabIndex+1}`,this.activeIndicatorRef.style.transform=`${t}(0px)`,this.activeIndicatorRef.classList.remove("activeIndicatorTransition")}))}adjust(e){this.prevActiveTabIndex=this.activeTabIndex,this.activeTabIndex=ke(0,this.tabs.length-1,this.activeTabIndex+e),this.setComponent()}focusTab(){this.tabs[this.activeTabIndex].focus()}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}}(0,h.__decorate)([s.attr],go.prototype,"orientation",void 0),(0,h.__decorate)([s.attr],go.prototype,"activeid",void 0),(0,h.__decorate)([s.observable],go.prototype,"tabs",void 0),(0,h.__decorate)([s.observable],go.prototype,"tabpanels",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],go.prototype,"activeindicator",void 0),(0,h.__decorate)([s.observable],go.prototype,"activeIndicatorRef",void 0),(0,h.__decorate)([s.observable],go.prototype,"showActiveIndicator",void 0),he(go,o);const yo={none:"none",both:"both",horizontal:"horizontal",vertical:"vertical"},Co=(e,t)=>s.html`
|
|
1258
|
-
<template
|
|
1259
|
-
class="
|
|
1260
|
-
${e=>e.readOnly?"readonly":""}
|
|
1261
|
-
${e=>e.resize!==yo.none?`resize-${e.resize}`:""}"
|
|
1262
|
-
>
|
|
1263
|
-
<label
|
|
1264
|
-
part="label"
|
|
1265
|
-
for="control"
|
|
1266
|
-
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
|
|
1267
|
-
>
|
|
1268
|
-
<slot ${(0,s.slotted)("defaultSlottedNodes")}></slot>
|
|
1269
|
-
</label>
|
|
1270
|
-
<textarea
|
|
1271
|
-
part="control"
|
|
1272
|
-
class="control"
|
|
1273
|
-
id="control"
|
|
1274
|
-
?autofocus="${e=>e.autofocus}"
|
|
1275
|
-
cols="${e=>e.cols}"
|
|
1276
|
-
?disabled="${e=>e.disabled}"
|
|
1277
|
-
form="${e=>e.form}"
|
|
1278
|
-
list="${e=>e.list}"
|
|
1279
|
-
maxlength="${e=>e.maxlength}"
|
|
1280
|
-
minlength="${e=>e.minlength}"
|
|
1281
|
-
name="${e=>e.name}"
|
|
1282
|
-
placeholder="${e=>e.placeholder}"
|
|
1283
|
-
?readonly="${e=>e.readOnly}"
|
|
1284
|
-
?required="${e=>e.required}"
|
|
1285
|
-
rows="${e=>e.rows}"
|
|
1286
|
-
?spellcheck="${e=>e.spellcheck}"
|
|
1287
|
-
:value="${e=>e.value}"
|
|
1288
|
-
aria-atomic="${e=>e.ariaAtomic}"
|
|
1289
|
-
aria-busy="${e=>e.ariaBusy}"
|
|
1290
|
-
aria-controls="${e=>e.ariaControls}"
|
|
1291
|
-
aria-current="${e=>e.ariaCurrent}"
|
|
1292
|
-
aria-describedby="${e=>e.ariaDescribedby}"
|
|
1293
|
-
aria-details="${e=>e.ariaDetails}"
|
|
1294
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
1295
|
-
aria-errormessage="${e=>e.ariaErrormessage}"
|
|
1296
|
-
aria-flowto="${e=>e.ariaFlowto}"
|
|
1297
|
-
aria-haspopup="${e=>e.ariaHaspopup}"
|
|
1298
|
-
aria-hidden="${e=>e.ariaHidden}"
|
|
1299
|
-
aria-invalid="${e=>e.ariaInvalid}"
|
|
1300
|
-
aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
|
|
1301
|
-
aria-label="${e=>e.ariaLabel}"
|
|
1302
|
-
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
1303
|
-
aria-live="${e=>e.ariaLive}"
|
|
1304
|
-
aria-owns="${e=>e.ariaOwns}"
|
|
1305
|
-
aria-relevant="${e=>e.ariaRelevant}"
|
|
1306
|
-
aria-roledescription="${e=>e.ariaRoledescription}"
|
|
1307
|
-
@input="${(e,t)=>e.handleTextInput()}"
|
|
1308
|
-
@change="${e=>e.handleChange()}"
|
|
1309
|
-
${(0,s.ref)("control")}
|
|
1310
|
-
></textarea>
|
|
1311
|
-
</template>
|
|
1312
|
-
`;class xo extends ae{}class wo extends(ht(xo)){constructor(){super(...arguments),this.proxy=document.createElement("textarea")}}class $o extends wo{constructor(){super(...arguments),this.resize=yo.none,this.cols=20,this.handleTextInput=()=>{this.value=this.control.value}}readOnlyChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.readOnly=this.readOnly)}autofocusChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.autofocus=this.autofocus)}listChanged(){this.proxy instanceof HTMLTextAreaElement&&this.proxy.setAttribute("list",this.list)}maxlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.maxLength=this.maxlength)}minlengthChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.minLength=this.minlength)}spellcheckChanged(){this.proxy instanceof HTMLTextAreaElement&&(this.proxy.spellcheck=this.spellcheck)}select(){this.control.select(),this.$emit("select")}handleChange(){this.$emit("change")}validate(){super.validate(this.control)}}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],$o.prototype,"readOnly",void 0),(0,h.__decorate)([s.attr],$o.prototype,"resize",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],$o.prototype,"autofocus",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"form"})],$o.prototype,"formId",void 0),(0,h.__decorate)([s.attr],$o.prototype,"list",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],$o.prototype,"maxlength",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter})],$o.prototype,"minlength",void 0),(0,h.__decorate)([s.attr],$o.prototype,"name",void 0),(0,h.__decorate)([s.attr],$o.prototype,"placeholder",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter,mode:"fromView"})],$o.prototype,"cols",void 0),(0,h.__decorate)([(0,s.attr)({converter:s.nullableNumberConverter,mode:"fromView"})],$o.prototype,"rows",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],$o.prototype,"spellcheck",void 0),(0,h.__decorate)([s.observable],$o.prototype,"defaultSlottedNodes",void 0),he($o,Is);const Io=(e,t)=>s.html`
|
|
1313
|
-
<template
|
|
1314
|
-
class="
|
|
1315
|
-
${e=>e.readOnly?"readonly":""}
|
|
1316
|
-
"
|
|
1317
|
-
>
|
|
1318
|
-
<label
|
|
1319
|
-
part="label"
|
|
1320
|
-
for="control"
|
|
1321
|
-
class="${e=>e.defaultSlottedNodes&&e.defaultSlottedNodes.length?"label":"label label__hidden"}"
|
|
1322
|
-
>
|
|
1323
|
-
<slot
|
|
1324
|
-
${(0,s.slotted)({property:"defaultSlottedNodes",filter:Hs})}
|
|
1325
|
-
></slot>
|
|
1326
|
-
</label>
|
|
1327
|
-
<div class="root" part="root">
|
|
1328
|
-
${r(e,t)}
|
|
1329
|
-
<input
|
|
1330
|
-
class="control"
|
|
1331
|
-
part="control"
|
|
1332
|
-
id="control"
|
|
1333
|
-
@input="${e=>e.handleTextInput()}"
|
|
1334
|
-
@change="${e=>e.handleChange()}"
|
|
1335
|
-
?autofocus="${e=>e.autofocus}"
|
|
1336
|
-
?disabled="${e=>e.disabled}"
|
|
1337
|
-
list="${e=>e.list}"
|
|
1338
|
-
maxlength="${e=>e.maxlength}"
|
|
1339
|
-
minlength="${e=>e.minlength}"
|
|
1340
|
-
pattern="${e=>e.pattern}"
|
|
1341
|
-
placeholder="${e=>e.placeholder}"
|
|
1342
|
-
?readonly="${e=>e.readOnly}"
|
|
1343
|
-
?required="${e=>e.required}"
|
|
1344
|
-
size="${e=>e.size}"
|
|
1345
|
-
?spellcheck="${e=>e.spellcheck}"
|
|
1346
|
-
:value="${e=>e.value}"
|
|
1347
|
-
type="${e=>e.type}"
|
|
1348
|
-
aria-atomic="${e=>e.ariaAtomic}"
|
|
1349
|
-
aria-busy="${e=>e.ariaBusy}"
|
|
1350
|
-
aria-controls="${e=>e.ariaControls}"
|
|
1351
|
-
aria-current="${e=>e.ariaCurrent}"
|
|
1352
|
-
aria-describedby="${e=>e.ariaDescribedby}"
|
|
1353
|
-
aria-details="${e=>e.ariaDetails}"
|
|
1354
|
-
aria-disabled="${e=>e.ariaDisabled}"
|
|
1355
|
-
aria-errormessage="${e=>e.ariaErrormessage}"
|
|
1356
|
-
aria-flowto="${e=>e.ariaFlowto}"
|
|
1357
|
-
aria-haspopup="${e=>e.ariaHaspopup}"
|
|
1358
|
-
aria-hidden="${e=>e.ariaHidden}"
|
|
1359
|
-
aria-invalid="${e=>e.ariaInvalid}"
|
|
1360
|
-
aria-keyshortcuts="${e=>e.ariaKeyshortcuts}"
|
|
1361
|
-
aria-label="${e=>e.ariaLabel}"
|
|
1362
|
-
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
1363
|
-
aria-live="${e=>e.ariaLive}"
|
|
1364
|
-
aria-owns="${e=>e.ariaOwns}"
|
|
1365
|
-
aria-relevant="${e=>e.ariaRelevant}"
|
|
1366
|
-
aria-roledescription="${e=>e.ariaRoledescription}"
|
|
1367
|
-
${(0,s.ref)("control")}
|
|
1368
|
-
/>
|
|
1369
|
-
${n(e,t)}
|
|
1370
|
-
</div>
|
|
1371
|
-
</template>
|
|
1372
|
-
`,ko=(e,t)=>s.html`
|
|
1373
|
-
<template
|
|
1374
|
-
aria-label="${e=>e.ariaLabel}"
|
|
1375
|
-
aria-labelledby="${e=>e.ariaLabelledby}"
|
|
1376
|
-
aria-orientation="${e=>e.orientation}"
|
|
1377
|
-
orientation="${e=>e.orientation}"
|
|
1378
|
-
role="toolbar"
|
|
1379
|
-
@click="${(e,t)=>e.clickHandler(t.event)}"
|
|
1380
|
-
@focusin="${(e,t)=>e.focusinHandler(t.event)}"
|
|
1381
|
-
@keydown="${(e,t)=>e.keydownHandler(t.event)}"
|
|
1382
|
-
${(0,s.children)({property:"childItems",attributeFilter:["disabled","hidden"],filter:(0,s.elements)(),subtree:!0})}
|
|
1383
|
-
>
|
|
1384
|
-
<slot name="label"></slot>
|
|
1385
|
-
<div class="positioning-region" part="positioning-region">
|
|
1386
|
-
${r(e,t)}
|
|
1387
|
-
<slot
|
|
1388
|
-
${(0,s.slotted)({filter:(0,s.elements)(),property:"slottedItems"})}
|
|
1389
|
-
></slot>
|
|
1390
|
-
${n(e,t)}
|
|
1391
|
-
</div>
|
|
1392
|
-
</template>
|
|
1393
|
-
`,_o=Object.freeze({[Ie.ArrowUp]:{[qi]:-1},[Ie.ArrowDown]:{[qi]:1},[Ie.ArrowLeft]:{[Ni]:{[Le.ltr]:-1,[Le.rtl]:1}},[Ie.ArrowRight]:{[Ni]:{[Le.ltr]:1,[Le.rtl]:-1}}});class To extends ae{constructor(){super(...arguments),this._activeIndex=0,this.direction=Le.ltr,this.orientation=Ni}get activeIndex(){return s.Observable.track(this,"activeIndex"),this._activeIndex}set activeIndex(e){this.$fastController.isConnected&&(this._activeIndex=_e(0,this.focusableElements.length-1,e),s.Observable.notify(this,"activeIndex"))}slottedItemsChanged(){this.$fastController.isConnected&&this.reduceFocusableElements()}clickHandler(e){var t;const i=null===(t=this.focusableElements)||void 0===t?void 0:t.indexOf(e.target);return i>-1&&this.activeIndex!==i&&this.setFocusedElement(i),!0}childItemsChanged(e,t){this.$fastController.isConnected&&this.reduceFocusableElements()}connectedCallback(){super.connectedCallback(),this.direction=Ne(this)}focusinHandler(e){const t=e.relatedTarget;t&&!this.contains(t)&&this.setFocusedElement()}getDirectionalIncrementer(e){var t,i,s,o,n;return null!==(n=null!==(s=null===(i=null===(t=_o[e])||void 0===t?void 0:t[this.orientation])||void 0===i?void 0:i[this.direction])&&void 0!==s?s:null===(o=_o[e])||void 0===o?void 0:o[this.orientation])&&void 0!==n?n:0}keydownHandler(e){const t=e.key;if(!(t in Ie)||e.defaultPrevented||e.shiftKey)return!0;const i=this.getDirectionalIncrementer(t);if(!i)return!e.target.closest("[role=radiogroup]");const s=this.activeIndex+i;return this.focusableElements[s]&&e.preventDefault(),this.setFocusedElement(s),!0}get allSlottedItems(){return[...this.start.assignedElements(),...this.slottedItems,...this.end.assignedElements()]}reduceFocusableElements(){var e;const t=null===(e=this.focusableElements)||void 0===e?void 0:e[this.activeIndex];this.focusableElements=this.allSlottedItems.reduce(To.reduceFocusableItems,[]);const i=this.focusableElements.indexOf(t);this.activeIndex=Math.max(0,i),this.setFocusableElements()}setFocusedElement(e=this.activeIndex){var t;this.activeIndex=e,this.setFocusableElements(),null===(t=this.focusableElements[this.activeIndex])||void 0===t||t.focus()}static reduceFocusableItems(e,t){var i,s,o,n;const r="radio"===t.getAttribute("role"),a=null===(s=null===(i=t.$fastController)||void 0===i?void 0:i.definition.shadowOptions)||void 0===s?void 0:s.delegatesFocus,l=Array.from(null!==(n=null===(o=t.shadowRoot)||void 0===o?void 0:o.querySelectorAll("*"))&&void 0!==n?n:[]).some((e=>(0,Ai.EB)(e)));return t.hasAttribute("disabled")||t.hasAttribute("hidden")||!((0,Ai.EB)(t)||r||a||l)?t.childElementCount?e.concat(Array.from(t.children).reduce(To.reduceFocusableItems,[])):e:(e.push(t),e)}setFocusableElements(){this.$fastController.isConnected&&this.focusableElements.length>0&&this.focusableElements.forEach(((e,t)=>{e.tabIndex=this.activeIndex===t?0:-1}))}}(0,h.__decorate)([s.observable],To.prototype,"direction",void 0),(0,h.__decorate)([s.attr],To.prototype,"orientation",void 0),(0,h.__decorate)([s.observable],To.prototype,"slottedItems",void 0),(0,h.__decorate)([s.observable],To.prototype,"slottedLabel",void 0),(0,h.__decorate)([s.observable],To.prototype,"childItems",void 0);class Oo{}(0,h.__decorate)([(0,s.attr)({attribute:"aria-labelledby"})],Oo.prototype,"ariaLabelledby",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"aria-label"})],Oo.prototype,"ariaLabel",void 0),he(Oo,Re),he(To,o,Oo);const Eo=(e,t)=>s.html`
|
|
1394
|
-
${(0,s.when)((e=>e.tooltipVisible),s.html`
|
|
1395
|
-
<${e.tagFor(qe)}
|
|
1396
|
-
fixed-placement="true"
|
|
1397
|
-
auto-update-mode="${e=>e.autoUpdateMode}"
|
|
1398
|
-
vertical-positioning-mode="${e=>e.verticalPositioningMode}"
|
|
1399
|
-
vertical-default-position="${e=>e.verticalDefaultPosition}"
|
|
1400
|
-
vertical-inset="${e=>e.verticalInset}"
|
|
1401
|
-
vertical-scaling="${e=>e.verticalScaling}"
|
|
1402
|
-
horizontal-positioning-mode="${e=>e.horizontalPositioningMode}"
|
|
1403
|
-
horizontal-default-position="${e=>e.horizontalDefaultPosition}"
|
|
1404
|
-
horizontal-scaling="${e=>e.horizontalScaling}"
|
|
1405
|
-
horizontal-inset="${e=>e.horizontalInset}"
|
|
1406
|
-
vertical-viewport-lock="${e=>e.horizontalViewportLock}"
|
|
1407
|
-
horizontal-viewport-lock="${e=>e.verticalViewportLock}"
|
|
1408
|
-
dir="${e=>e.currentDirection}"
|
|
1409
|
-
${(0,s.ref)("region")}
|
|
1410
|
-
>
|
|
1411
|
-
<div class="tooltip" part="tooltip" role="tooltip">
|
|
1412
|
-
<slot></slot>
|
|
1413
|
-
</div>
|
|
1414
|
-
</${e.tagFor(qe)}>
|
|
1415
|
-
`)}
|
|
1416
|
-
`,So={top:"top",right:"right",bottom:"bottom",left:"left",start:"start",end:"end",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",topStart:"top-start",topEnd:"top-end",bottomStart:"bottom-start",bottomEnd:"bottom-end"};class Ro extends ae{constructor(){super(...arguments),this.anchor="",this.delay=300,this.autoUpdateMode="anchor",this.anchorElement=null,this.viewportElement=null,this.verticalPositioningMode="dynamic",this.horizontalPositioningMode="dynamic",this.horizontalInset="false",this.verticalInset="false",this.horizontalScaling="content",this.verticalScaling="content",this.verticalDefaultPosition=void 0,this.horizontalDefaultPosition=void 0,this.tooltipVisible=!1,this.currentDirection=Le.ltr,this.showDelayTimer=null,this.hideDelayTimer=null,this.isAnchorHoveredFocused=!1,this.isRegionHovered=!1,this.handlePositionChange=e=>{this.classList.toggle("top","start"===this.region.verticalPosition),this.classList.toggle("bottom","end"===this.region.verticalPosition),this.classList.toggle("inset-top","insetStart"===this.region.verticalPosition),this.classList.toggle("inset-bottom","insetEnd"===this.region.verticalPosition),this.classList.toggle("center-vertical","center"===this.region.verticalPosition),this.classList.toggle("left","start"===this.region.horizontalPosition),this.classList.toggle("right","end"===this.region.horizontalPosition),this.classList.toggle("inset-left","insetStart"===this.region.horizontalPosition),this.classList.toggle("inset-right","insetEnd"===this.region.horizontalPosition),this.classList.toggle("center-horizontal","center"===this.region.horizontalPosition)},this.handleRegionMouseOver=e=>{this.isRegionHovered=!0},this.handleRegionMouseOut=e=>{this.isRegionHovered=!1,this.startHideDelayTimer()},this.handleAnchorMouseOver=e=>{this.tooltipVisible?this.isAnchorHoveredFocused=!0:this.startShowDelayTimer()},this.handleAnchorMouseOut=e=>{this.isAnchorHoveredFocused=!1,this.clearShowDelayTimer(),this.startHideDelayTimer()},this.handleAnchorFocusIn=e=>{this.startShowDelayTimer()},this.handleAnchorFocusOut=e=>{this.isAnchorHoveredFocused=!1,this.clearShowDelayTimer(),this.startHideDelayTimer()},this.startHideDelayTimer=()=>{this.clearHideDelayTimer(),this.tooltipVisible&&(this.hideDelayTimer=window.setTimeout((()=>{this.updateTooltipVisibility()}),60))},this.clearHideDelayTimer=()=>{null!==this.hideDelayTimer&&(clearTimeout(this.hideDelayTimer),this.hideDelayTimer=null)},this.startShowDelayTimer=()=>{this.isAnchorHoveredFocused||(this.delay>1?null===this.showDelayTimer&&(this.showDelayTimer=window.setTimeout((()=>{this.startHover()}),this.delay)):this.startHover())},this.startHover=()=>{this.isAnchorHoveredFocused=!0,this.updateTooltipVisibility()},this.clearShowDelayTimer=()=>{null!==this.showDelayTimer&&(clearTimeout(this.showDelayTimer),this.showDelayTimer=null)},this.getAnchor=()=>{const e=this.getRootNode();return e instanceof ShadowRoot?e.getElementById(this.anchor):document.getElementById(this.anchor)},this.handleDocumentKeydown=e=>{if(!e.defaultPrevented&&this.tooltipVisible&&e.key===ye)this.isAnchorHoveredFocused=!1,this.updateTooltipVisibility(),this.$emit("dismiss")},this.updateTooltipVisibility=()=>{if(!1===this.visible)this.hideTooltip();else{if(!0===this.visible)return void this.showTooltip();if(this.isAnchorHoveredFocused||this.isRegionHovered)return void this.showTooltip();this.hideTooltip()}},this.showTooltip=()=>{this.tooltipVisible||(this.currentDirection=Ne(this),this.tooltipVisible=!0,document.addEventListener("keydown",this.handleDocumentKeydown),s.DOM.queueUpdate(this.setRegionProps))},this.hideTooltip=()=>{this.tooltipVisible&&(this.clearHideDelayTimer(),null!==this.region&&void 0!==this.region&&(this.region.removeEventListener("positionchange",this.handlePositionChange),this.region.viewportElement=null,this.region.anchorElement=null,this.region.removeEventListener("mouseover",this.handleRegionMouseOver),this.region.removeEventListener("mouseout",this.handleRegionMouseOut)),document.removeEventListener("keydown",this.handleDocumentKeydown),this.tooltipVisible=!1)},this.setRegionProps=()=>{this.tooltipVisible&&(this.region.viewportElement=this.viewportElement,this.region.anchorElement=this.anchorElement,this.region.addEventListener("positionchange",this.handlePositionChange),this.region.addEventListener("mouseover",this.handleRegionMouseOver,{passive:!0}),this.region.addEventListener("mouseout",this.handleRegionMouseOut,{passive:!0}))}}visibleChanged(){this.$fastController.isConnected&&(this.updateTooltipVisibility(),this.updateLayout())}anchorChanged(){this.$fastController.isConnected&&(this.anchorElement=this.getAnchor())}positionChanged(){this.$fastController.isConnected&&this.updateLayout()}anchorElementChanged(e){if(this.$fastController.isConnected){if(null!=e&&(e.removeEventListener("mouseover",this.handleAnchorMouseOver),e.removeEventListener("mouseout",this.handleAnchorMouseOut),e.removeEventListener("focusin",this.handleAnchorFocusIn),e.removeEventListener("focusout",this.handleAnchorFocusOut)),null!==this.anchorElement&&void 0!==this.anchorElement){this.anchorElement.addEventListener("mouseover",this.handleAnchorMouseOver,{passive:!0}),this.anchorElement.addEventListener("mouseout",this.handleAnchorMouseOut,{passive:!0}),this.anchorElement.addEventListener("focusin",this.handleAnchorFocusIn,{passive:!0}),this.anchorElement.addEventListener("focusout",this.handleAnchorFocusOut,{passive:!0});const e=this.anchorElement.id;null!==this.anchorElement.parentElement&&this.anchorElement.parentElement.querySelectorAll(":hover").forEach((t=>{t.id===e&&this.startShowDelayTimer()}))}null!==this.region&&void 0!==this.region&&this.tooltipVisible&&(this.region.anchorElement=this.anchorElement),this.updateLayout()}}viewportElementChanged(){null!==this.region&&void 0!==this.region&&(this.region.viewportElement=this.viewportElement),this.updateLayout()}connectedCallback(){super.connectedCallback(),this.anchorElement=this.getAnchor(),this.updateTooltipVisibility()}disconnectedCallback(){this.hideTooltip(),this.clearShowDelayTimer(),this.clearHideDelayTimer(),super.disconnectedCallback()}updateLayout(){switch(this.verticalPositioningMode="locktodefault",this.horizontalPositioningMode="locktodefault",this.position){case So.top:case So.bottom:this.verticalDefaultPosition=this.position,this.horizontalDefaultPosition="center";break;case So.right:case So.left:case So.start:case So.end:this.verticalDefaultPosition="center",this.horizontalDefaultPosition=this.position;break;case So.topLeft:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="left";break;case So.topRight:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="right";break;case So.bottomLeft:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="left";break;case So.bottomRight:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="right";break;case So.topStart:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="start";break;case So.topEnd:this.verticalDefaultPosition="top",this.horizontalDefaultPosition="end";break;case So.bottomStart:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="start";break;case So.bottomEnd:this.verticalDefaultPosition="bottom",this.horizontalDefaultPosition="end";break;default:this.verticalPositioningMode="dynamic",this.horizontalPositioningMode="dynamic",this.verticalDefaultPosition=void 0,this.horizontalDefaultPosition="center"}}}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Ro.prototype,"visible",void 0),(0,h.__decorate)([s.attr],Ro.prototype,"anchor",void 0),(0,h.__decorate)([s.attr],Ro.prototype,"delay",void 0),(0,h.__decorate)([s.attr],Ro.prototype,"position",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"auto-update-mode"})],Ro.prototype,"autoUpdateMode",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"horizontal-viewport-lock"})],Ro.prototype,"horizontalViewportLock",void 0),(0,h.__decorate)([(0,s.attr)({attribute:"vertical-viewport-lock"})],Ro.prototype,"verticalViewportLock",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"anchorElement",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"viewportElement",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"verticalPositioningMode",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"horizontalPositioningMode",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"horizontalInset",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"verticalInset",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"horizontalScaling",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"verticalScaling",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"verticalDefaultPosition",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"horizontalDefaultPosition",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"tooltipVisible",void 0),(0,h.__decorate)([s.observable],Ro.prototype,"currentDirection",void 0);const Do=(e,t)=>s.html`
|
|
1417
|
-
<template
|
|
1418
|
-
role="treeitem"
|
|
1419
|
-
slot="${e=>e.isNestedItem()?"item":void 0}"
|
|
1420
|
-
tabindex="-1"
|
|
1421
|
-
class="${e=>e.expanded?"expanded":""} ${e=>e.selected?"selected":""} ${e=>e.nested?"nested":""}
|
|
1422
|
-
${e=>e.disabled?"disabled":""}"
|
|
1423
|
-
aria-expanded="${e=>e.childItems&&e.childItemLength()>0?e.expanded:void 0}"
|
|
1424
|
-
aria-selected="${e=>e.selected}"
|
|
1425
|
-
aria-disabled="${e=>e.disabled}"
|
|
1426
|
-
@focusin="${(e,t)=>e.handleFocus(t.event)}"
|
|
1427
|
-
@focusout="${(e,t)=>e.handleBlur(t.event)}"
|
|
1428
|
-
${(0,s.children)({property:"childItems",filter:(0,s.elements)()})}
|
|
1429
|
-
>
|
|
1430
|
-
<div class="positioning-region" part="positioning-region">
|
|
1431
|
-
<div class="content-region" part="content-region">
|
|
1432
|
-
${(0,s.when)((e=>e.childItems&&e.childItemLength()>0),s.html`
|
|
1433
|
-
<div
|
|
1434
|
-
aria-hidden="true"
|
|
1435
|
-
class="expand-collapse-button"
|
|
1436
|
-
part="expand-collapse-button"
|
|
1437
|
-
@click="${(e,t)=>e.handleExpandCollapseButtonClick(t.event)}"
|
|
1438
|
-
${(0,s.ref)("expandCollapseButton")}
|
|
1439
|
-
>
|
|
1440
|
-
<slot name="expand-collapse-glyph">
|
|
1441
|
-
${t.expandCollapseGlyph||""}
|
|
1442
|
-
</slot>
|
|
1443
|
-
</div>
|
|
1444
|
-
`)}
|
|
1445
|
-
${r(e,t)}
|
|
1446
|
-
<slot></slot>
|
|
1447
|
-
${n(e,t)}
|
|
1448
|
-
</div>
|
|
1449
|
-
</div>
|
|
1450
|
-
${(0,s.when)((e=>e.childItems&&e.childItemLength()>0&&(e.expanded||e.renderCollapsedChildren)),s.html`
|
|
1451
|
-
<div role="group" class="items" part="items">
|
|
1452
|
-
<slot name="item" ${(0,s.slotted)("items")}></slot>
|
|
1453
|
-
</div>
|
|
1454
|
-
`)}
|
|
1455
|
-
</template>
|
|
1456
|
-
`;function Ao(e){return Nt(e)&&"treeitem"===e.getAttribute("role")}class Fo extends ae{constructor(){super(...arguments),this.expanded=!1,this.focusable=!1,this.isNestedItem=()=>Ao(this.parentElement),this.handleExpandCollapseButtonClick=e=>{this.disabled||e.defaultPrevented||(this.expanded=!this.expanded)},this.handleFocus=e=>{this.setAttribute("tabindex","0")},this.handleBlur=e=>{this.setAttribute("tabindex","-1")}}expandedChanged(){this.$fastController.isConnected&&this.$emit("expanded-change",this)}selectedChanged(){this.$fastController.isConnected&&this.$emit("selected-change",this)}itemsChanged(e,t){this.$fastController.isConnected&&this.items.forEach((e=>{Ao(e)&&(e.nested=!0)}))}static focusItem(e){e.focusable=!0,e.focus()}childItemLength(){const e=this.childItems.filter((e=>Ao(e)));return e?e.length:0}}(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Fo.prototype,"expanded",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Fo.prototype,"selected",void 0),(0,h.__decorate)([(0,s.attr)({mode:"boolean"})],Fo.prototype,"disabled",void 0),(0,h.__decorate)([s.observable],Fo.prototype,"focusable",void 0),(0,h.__decorate)([s.observable],Fo.prototype,"childItems",void 0),(0,h.__decorate)([s.observable],Fo.prototype,"items",void 0),(0,h.__decorate)([s.observable],Fo.prototype,"nested",void 0),(0,h.__decorate)([s.observable],Fo.prototype,"renderCollapsedChildren",void 0),he(Fo,o);const Lo=(e,t)=>s.html`
|
|
1457
|
-
<template
|
|
1458
|
-
role="tree"
|
|
1459
|
-
${(0,s.ref)("treeView")}
|
|
1460
|
-
@keydown="${(e,t)=>e.handleKeyDown(t.event)}"
|
|
1461
|
-
@focusin="${(e,t)=>e.handleFocus(t.event)}"
|
|
1462
|
-
@focusout="${(e,t)=>e.handleBlur(t.event)}"
|
|
1463
|
-
@click="${(e,t)=>e.handleClick(t.event)}"
|
|
1464
|
-
@selected-change="${(e,t)=>e.handleSelectedChange(t.event)}"
|
|
1465
|
-
>
|
|
1466
|
-
<slot ${(0,s.slotted)("slottedTreeItems")}></slot>
|
|
1467
|
-
</template>
|
|
1468
|
-
`;class Po extends ae{constructor(){super(...arguments),this.currentFocused=null,this.handleFocus=e=>{if(!(this.slottedTreeItems.length<1))return e.target===this?(null===this.currentFocused&&(this.currentFocused=this.getValidFocusableItem()),void(null!==this.currentFocused&&Fo.focusItem(this.currentFocused))):void(this.contains(e.target)&&(this.setAttribute("tabindex","-1"),this.currentFocused=e.target))},this.handleBlur=e=>{e.target instanceof HTMLElement&&(null===e.relatedTarget||!this.contains(e.relatedTarget))&&this.setAttribute("tabindex","0")},this.handleKeyDown=e=>{if(e.defaultPrevented)return;if(this.slottedTreeItems.length<1)return!0;const t=this.getVisibleNodes();switch(e.key){case Ce:return void(t.length&&Fo.focusItem(t[0]));case xe:return void(t.length&&Fo.focusItem(t[t.length-1]));case ve:if(e.target&&this.isFocusableElement(e.target)){const t=e.target;t instanceof Fo&&t.childItemLength()>0&&t.expanded?t.expanded=!1:t instanceof Fo&&t.parentElement instanceof Fo&&Fo.focusItem(t.parentElement)}return!1;case fe:if(e.target&&this.isFocusableElement(e.target)){const t=e.target;t instanceof Fo&&t.childItemLength()>0&&!t.expanded?t.expanded=!0:t instanceof Fo&&t.childItemLength()>0&&this.focusNextNode(1,e.target)}return;case me:return void(e.target&&this.isFocusableElement(e.target)&&this.focusNextNode(1,e.target));case be:return void(e.target&&this.isFocusableElement(e.target)&&this.focusNextNode(-1,e.target));case ge:return void this.handleClick(e)}return!0},this.handleSelectedChange=e=>{if(e.defaultPrevented)return;if(!(e.target instanceof Element&&Ao(e.target)))return!0;const t=e.target;t.selected?(this.currentSelected&&this.currentSelected!==t&&(this.currentSelected.selected=!1),this.currentSelected=t):t.selected||this.currentSelected!==t||(this.currentSelected=null)},this.setItems=()=>{const e=this.treeView.querySelector("[aria-selected='true']");this.currentSelected=e,null!==this.currentFocused&&this.contains(this.currentFocused)||(this.currentFocused=this.getValidFocusableItem()),this.nested=this.checkForNestedItems();this.getVisibleNodes().forEach((e=>{Ao(e)&&(e.nested=this.nested)}))},this.isFocusableElement=e=>Ao(e),this.isSelectedElement=e=>e.selected}slottedTreeItemsChanged(){this.$fastController.isConnected&&this.setItems()}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),s.DOM.queueUpdate((()=>{this.setItems()}))}handleClick(e){if(e.defaultPrevented)return;if(!(e.target instanceof Element&&Ao(e.target)))return!0;const t=e.target;t.disabled||(t.selected=!t.selected)}focusNextNode(e,t){const i=this.getVisibleNodes();if(!i)return;const s=i[i.indexOf(t)+e];Nt(s)&&Fo.focusItem(s)}getValidFocusableItem(){const e=this.getVisibleNodes();let t=e.findIndex(this.isSelectedElement);return-1===t&&(t=e.findIndex(this.isFocusableElement)),-1!==t?e[t]:null}checkForNestedItems(){return this.slottedTreeItems.some((e=>Ao(e)&&e.querySelector("[role='treeitem']")))}getVisibleNodes(){return function(e,t){if(!e||!t||!Nt(e))return;return Array.from(e.querySelectorAll(t)).filter((e=>null!==e.offsetParent))}(this,"[role='treeitem']")||[]}}(0,h.__decorate)([(0,s.attr)({attribute:"render-collapsed-nodes"})],Po.prototype,"renderCollapsedNodes",void 0),(0,h.__decorate)([s.observable],Po.prototype,"currentSelected",void 0),(0,h.__decorate)([s.observable],Po.prototype,"slottedTreeItems",void 0);class Mo{constructor(e){this.listenerCache=new WeakMap,this.query=e}bind(e){const{query:t}=this,i=this.constructListener(e);i.bind(t)(),t.addListener(i),this.listenerCache.set(e,i)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeListener(t),this.listenerCache.delete(e))}}class Vo extends Mo{constructor(e,t){super(e),this.styles=t}static with(e){return t=>new Vo(e,t)}constructListener(e){let t=!1;const i=this.styles;return function(){const{matches:s}=this;s&&!t?(e.$fastController.addStyles(i),t=s):!s&&t&&(e.$fastController.removeStyles(i),t=s)}}unbind(e){super.unbind(e),e.$fastController.removeStyles(this.styles)}}const Ho=Vo.with(window.matchMedia("(forced-colors)")),zo=Vo.with(window.matchMedia("(prefers-color-scheme: dark)")),Bo=Vo.with(window.matchMedia("(prefers-color-scheme: light)"));class No{constructor(e,t,i){this.propertyName=e,this.value=t,this.styles=i}bind(e){s.Observable.getNotifier(e).subscribe(this,this.propertyName),this.handleChange(e,this.propertyName)}unbind(e){s.Observable.getNotifier(e).unsubscribe(this,this.propertyName),e.$fastController.removeStyles(this.styles)}handleChange(e,t){e[t]===this.value?e.$fastController.addStyles(this.styles):e.$fastController.removeStyles(this.styles)}}const qo="not-allowed",Uo=":host([hidden]){display:none}";function jo(e){return`${Uo}:host{display:${e}}`}const Wo=function(){if("boolean"==typeof qt)return qt;if(!(0,Bt.N)())return qt=!1,qt;const e=document.createElement("style"),t=function(){const e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}();null!==t&&e.setAttribute("nonce",t),document.head.appendChild(e);try{e.sheet.insertRule("foo:focus-visible {color:inherit}",0),qt=!0}catch(e){qt=!1}finally{document.head.removeChild(e)}return qt}()?"focus-visible":"focus"},726:(e,t,i)=>{"use strict";i.r(t),i.d(t,{__extends:()=>o,__assign:()=>n,__rest:()=>r,__decorate:()=>a,__param:()=>l,__metadata:()=>d,__awaiter:()=>h,__generator:()=>c,__createBinding:()=>u,__exportStar:()=>p,__values:()=>m,__read:()=>v,__spread:()=>f,__spreadArrays:()=>b,__await:()=>g,__asyncGenerator:()=>y,__asyncDelegator:()=>C,__asyncValues:()=>x,__makeTemplateObject:()=>w,__importStar:()=>$,__importDefault:()=>I,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>_});var s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},s(e,t)};function o(e,t){function i(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var n=function(){return n=Object.assign||function(e){for(var t,i=1,s=arguments.length;i<s;i++)for(var o in t=arguments[i])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t){var i={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(i[s[o]]=e[s[o]])}return i}function a(e,t,i,s){var o,n=arguments.length,r=n<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(n<3?o(r):n>3?o(t,i,r):o(t,i))||r);return n>3&&r&&Object.defineProperty(t,i,r),r}function l(e,t){return function(i,s){t(i,s,e)}}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,i,s){return new(i||(i=Promise))((function(o,n){function r(e){try{l(s.next(e))}catch(e){n(e)}}function a(e){try{l(s.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((s=s.apply(e,t||[])).next())}))}function c(e,t){var i,s,o,n,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return n={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function a(n){return function(a){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,s&&(o=2&n[0]?s.return:n[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,n[1])).done)return o;switch(s=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return r.label++,{value:n[1],done:!1};case 5:r.label++,s=n[1],n=[0];continue;case 7:n=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==n[0]&&2!==n[0])){r=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){r.label=n[1];break}if(6===n[0]&&r.label<o[1]){r.label=o[1],o=n;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(n);break}o[2]&&r.ops.pop(),r.trys.pop();continue}n=t.call(e,r)}catch(e){n=[6,e],s=0}finally{i=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}}function u(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}function p(e,t){for(var i in e)"default"===i||t.hasOwnProperty(i)||(t[i]=e[i])}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],s=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var s,o,n=i.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(s=n.next()).done;)r.push(s.value)}catch(e){o={error:e}}finally{try{s&&!s.done&&(i=n.return)&&i.call(n)}finally{if(o)throw o.error}}return r}function f(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function b(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;var s=Array(e),o=0;for(t=0;t<i;t++)for(var n=arguments[t],r=0,a=n.length;r<a;r++,o++)s[o]=n[r];return s}function g(e){return this instanceof g?(this.v=e,this):new g(e)}function y(e,t,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,o=i.apply(e,t||[]),n=[];return s={},r("next"),r("throw"),r("return"),s[Symbol.asyncIterator]=function(){return this},s;function r(e){o[e]&&(s[e]=function(t){return new Promise((function(i,s){n.push([e,t,i,s])>1||a(e,t)}))})}function a(e,t){try{(i=o[e](t)).value instanceof g?Promise.resolve(i.value.v).then(l,d):h(n[0][2],i)}catch(e){h(n[0][3],e)}var i}function l(e){a("next",e)}function d(e){a("throw",e)}function h(e,t){e(t),n.shift(),n.length&&a(n[0][0],n[0][1])}}function C(e){var t,i;return t={},s("next"),s("throw",(function(e){throw e})),s("return"),t[Symbol.iterator]=function(){return this},t;function s(s,o){t[s]=e[s]?function(t){return(i=!i)?{value:g(e[s](t)),done:"return"===s}:o?o(t):t}:o}}function x(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=m(e),t={},s("next"),s("throw"),s("return"),t[Symbol.asyncIterator]=function(){return this},t);function s(i){t[i]=e[i]&&function(t){return new Promise((function(s,o){(function(e,t,i,s){Promise.resolve(s).then((function(t){e({value:t,done:i})}),t)})(s,o,(t=e[i](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function $(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function I(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function _(e,t,i){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,i),i}}}]);
|
|
1469
|
-
//# sourceMappingURL=npm.microsoft.c693b5fe4306901c8d3cdd3b3c894944.js.map
|