@mattilsynet/design 3.3.8 → 3.3.9
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/mtds/ai/avatar.stories.tsx +3 -0
- package/mtds/ai/field.stories.tsx +1 -1
- package/mtds/ai/typography.stories.tsx +1 -3
- package/mtds/atlas/atlas-element.js +1 -1
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js +153 -132
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js.map +1 -1
- package/mtds/illustrations/books.svg +1 -0
- package/mtds/illustrations/carrot.svg +1 -0
- package/mtds/illustrations/collaboration-and-culture.svg +1 -0
- package/mtds/illustrations/emergency-vehicle.svg +1 -0
- package/mtds/illustrations/eu-flags.svg +1 -0
- package/mtds/illustrations/eu-work-1.svg +1 -0
- package/mtds/illustrations/eu-work-2.svg +1 -0
- package/mtds/illustrations/fishing-boat-and-fish-health-biologist.svg +1 -0
- package/mtds/illustrations/fishing-boat.svg +1 -0
- package/mtds/illustrations/index.json +143 -7
- package/mtds/illustrations/it-and-security.svg +1 -0
- package/mtds/illustrations/kompass.svg +1 -1
- package/mtds/illustrations/lab-work.svg +1 -0
- package/mtds/illustrations/law-books.svg +1 -0
- package/mtds/illustrations/law.svg +1 -0
- package/mtds/illustrations/letter-in-mailbox.svg +1 -0
- package/mtds/illustrations/man-with-magnifying-glass.svg +1 -0
- package/mtds/illustrations/milk-carton.svg +1 -0
- package/mtds/illustrations/norwegian-parliament.svg +1 -0
- package/mtds/illustrations/pen.svg +1 -0
- package/mtds/illustrations/pencil.svg +1 -0
- package/mtds/illustrations/person-and-infographic.svg +1 -0
- package/mtds/illustrations/person-with-tie.svg +1 -0
- package/mtds/illustrations/screen-with-content.svg +1 -0
- package/mtds/illustrations/shopping-cart-large.svg +1 -0
- package/mtds/illustrations/study.svg +1 -0
- package/mtds/illustrations/telescope.svg +1 -0
- package/mtds/illustrations/trailer.svg +1 -0
- package/mtds/illustrations/user-dialogue.svg +1 -0
- package/mtds/illustrations/user-interface.svg +1 -0
- package/mtds/illustrations/waterworks.svg +1 -0
- package/mtds/index.iife.js +89 -21
- package/mtds/package.json.js +1 -1
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +23 -23
- package/mtds/styles.module.css.js +40 -40
- package/package.json +5 -5
package/mtds/index.iife.js
CHANGED
|
@@ -1,36 +1,104 @@
|
|
|
1
|
-
var mtds=(function($){"use strict";var
|
|
1
|
+
var mtds=(function($){"use strict";var qo=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",be=qo(),xs=be?navigator.userAgent:"",Bo=/iPad|iPhone|iPod/.test(xs),zo;be&&/^Mac/i.test(((zo=navigator.userAgentData)==null?void 0:zo.platform)||navigator.platform);var $s=be&&window.CSSStyleSheet&&document.adoptedStyleSheets,Ts=typeof HTMLElement>"u"?class{}:HTMLElement,N=(t,e,n)=>n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),As=(t,e)=>{const n=t.shadowRoot||t.attachShadow({mode:"open"});if(n.querySelector("slot")||n.append(Uo("slot")),!n.querySelector("style"))if(!$s)n.append(Uo("style",null,e));else{const o=new CSSStyleSheet;o.replaceSync(e),n.adoptedStyleSheets=[o]}return n},Cs=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},ks=t=>{var e;const n=N(t,"aria-label")||"";return[...(((e=N(t,"aria-labelledby"))==null?void 0:e.split(" "))||[]).map(i=>document.getElementById(i.trim()||"-")),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n).trim()},Ls=t=>{if(!t||!be)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},Uo=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))N(o,i,r);return o},Ms={define:(t,e)=>!qo()||window.customElements.get(t)||window.customElements.define(t,e)},ve="value",fn="max",Rs=`:host(:not([hidden])) { box-sizing: border-box; border: 1px solid; display: inline-block; height: .5em; width: 10em; overflow: hidden }
|
|
2
2
|
:host::before { content: ''; display: block; height: 100%; background: currentColor; width: var(--percentage, 0%); transition: width .2s }
|
|
3
3
|
:host(:not([value])) { background: linear-gradient(90deg,currentColor 25%, transparent 50%, currentColor 75%) 50%/400% }
|
|
4
4
|
@media (prefers-reduced-motion: no-preference) { :host { animation: indeterminate 2s linear infinite } }
|
|
5
|
-
@keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,ho=class extends Ws{constructor(){var t;super(),this._skipAttrChange=!1,Vs(this,Ys),this._internals=(t=this.attachInternals)==null?void 0:t.call(this)}static get observedAttributes(){return["aria-label","aria-labelledby",se,je]}connectedCallback(){H(this,"aria-valuemin","0"),H(this,"aria-valuemax","100"),H(this,"role",fo?"img":"progressbar"),this.attributeChangedCallback()}attributeChangedCallback(){if(this._skipAttrChange||!this.hasAttribute("role"))return;this._skipAttrChange=!0;const t=this.position,e=Math.max(0,Math.round(t*100));this.style.setProperty("--percentage",`${e}%`);let n=js(this);fo&&(n=`${n.replace(/\(\d+%\)$/,"")} (${e}%)`.trim()),H(this,"aria-busy",`${t===-1}`),H(this,"aria-label",n),H(this,"aria-labelledby",null),H(this,"aria-valuenow",t===-1?null:`${e}`),this._skipAttrChange=!1}get labels(){var t;const e=(t=this._internals)==null?void 0:t.labels;if(e)return e;const n=Xs(this),o=this.closest("label:not([for])");return o&&H(o,"for",n),Gs(this).querySelectorAll(`label[for="${n}"]`)}get position(){return this.hasAttribute(se)?Math.min(this.value/this.max,1):-1}get value(){return Math.min(go(this,se),this.max)}set value(t){bo(this,se,t)}get max(){return go(this,je,1)}set max(t){bo(this,je,t,1)}};ho.formAssociated=!0;var go=(t,e,n=0)=>{const o=H(t,e),i=Number(o);return o===null?n:Number.isFinite(i)&&Math.max(n,i)||n},bo=(t,e,n,o=0)=>{const i=Number(n);if(Number.isFinite(i))return H(t,e,`${Math.max(o,i)||o}`);throw new Error(`Failed to set the '${e}' property on 'UHTMLProgressElement': The provided double value is non-finite.`)};Ks.define("u-progress",ho);function Qs(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Zs(){document.addEventListener("invoke",f=>{f.type=="invoke"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0),document.addEventListener("command",f=>{f.type=="command"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0);function t(f,p,b=!0){Object.defineProperty(f,p,{...Object.getOwnPropertyDescriptor(f,p),enumerable:b})}function e(f){return f&&typeof f.getRootNode=="function"?f.getRootNode():f&&f.parentNode?e(f.parentNode):f}let n=new WeakMap,o=new WeakMap;class i extends Event{constructor(p,b={}){super(p,b);let{source:y,command:_}=b;if(y!=null&&!(y instanceof Element))throw TypeError("source must be an element");n.set(this,y||null),o.set(this,_===void 0?"":String(_))}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!n.has(this))throw TypeError("illegal invocation");let p=n.get(this);if(!(p instanceof Element))return null;let b=e(p);return b===e(this.target||document)?p:b.host}get command(){if(!o.has(this))throw TypeError("illegal invocation");return o.get(this)}}t(i.prototype,"source"),t(i.prototype,"command");let r=new WeakMap;function s(f){Object.defineProperties(f.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(p){if(p===null)this.removeAttribute("commandfor"),r.delete(this);else if(p instanceof Element){this.setAttribute("commandfor","");let b=e(p);e(this)===b||b===this.ownerDocument?r.set(this,p):r.delete(this)}else throw TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button"||this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;let p=r.get(this);if(p)return p.isConnected?p:(r.delete(this),null);let b=e(this),y=this.getAttribute("commandfor");return(b instanceof Document||b instanceof ShadowRoot)&&y&&b.getElementById(y)||null}},command:{enumerable:!0,configurable:!0,get(){let p=this.getAttribute("command")||"";if(p.startsWith("--"))return p;let b=p.toLowerCase();switch(b){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return b}return""},set(p){this.setAttribute("command",p)}}})}let a=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return c.takeRecords(),a.get(this)||null},set(f){let p=a.get(this)||null;p&&this.removeEventListener("command",p),a.set(this,typeof f=="object"||typeof f=="function"?f:null),typeof f=="function"&&this.addEventListener("command",f)}}});function l(f){for(let p of f)p.oncommand=Function("event",p.getAttribute("oncommand"))}let c=new MutationObserver(f=>{for(let p of f){let{target:b}=p;p.type==="childList"?l(b.querySelectorAll("[oncommand]")):l([b])}});c.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]"));let u=new WeakSet;function d(f){if(u.has(f)||(u.add(f),f.defaultPrevented)||f.type!=="click")return;let p=f.composedPath().find(w=>w.matches?.("button[commandfor], button[command]"));if(!p)return;if(p.form&&p.getAttribute("type")!=="button")throw f.preventDefault(),Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(p.hasAttribute("command")!==p.hasAttribute("commandfor")){let w=p.hasAttribute("command")?"command":"commandfor",S=p.hasAttribute("command")?"commandfor":"command";throw Error(`Element with ${w} attribute must also have a ${S} attribute to function.`)}if(p.command!=="show-popover"&&p.command!=="hide-popover"&&p.command!=="toggle-popover"&&p.command!=="show-modal"&&p.command!=="request-close"&&p.command!=="close"&&!p.command.startsWith("--")){console.warn(`"${p.command}" is not a valid command value. Custom commands must begin with --`);return}let b=p.commandForElement;if(!b)return;let y=new i("command",{command:p.command,source:p,cancelable:!0});if(b.dispatchEvent(y),y.defaultPrevented)return;let _=y.command.toLowerCase();if(b.popover){let w=!b.matches(":popover-open");w&&(_==="toggle-popover"||_==="show-popover")?b.showPopover({source:p}):!w&&_==="hide-popover"&&b.hidePopover()}else if(b.localName==="dialog"){let w=!b.hasAttribute("open");w&&_=="show-modal"?b.showModal():!w&&_=="close"?b.close(p.value?p.value:void 0):!w&&_=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){let S=new Event("cancel",{cancelable:!0});this.dispatchEvent(S),S.defaultPrevented||this.close()}),b.requestClose(p.value?p.value:void 0))}}function m(f){f.addEventListener("click",d,!0)}function h(f,p){let b=f.prototype.attachShadow;f.prototype.attachShadow=function(_){let w=b.call(this,_);return p(w),w};let y=f.prototype.attachInternals;f.prototype.attachInternals=function(){let _=y.call(this);return _.shadowRoot&&p(_.shadowRoot),_}}s(HTMLButtonElement),h(HTMLElement,f=>{m(f),c.observe(f,{attributeFilter:["oncommand"]}),l(f.querySelectorAll("[oncommand]"))}),m(document),Object.assign(globalThis,{CommandEvent:i})}const U={passive:!0,capture:!0},G=()=>typeof window<"u"&&typeof document<"u",Js=()=>G()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),ae=typeof HTMLElement>"u"?class{}:HTMLElement;function vo(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const pt=(t,...e)=>!G()||window.dsWarnings===!1||console.log(`\x1B[1mDesignsystemet:\x1B[m ${t}`,...e),v=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),Xe=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),ta=/^["']|["']$/g,At=(t,e)=>{let n=v(t,e);return n||=Xe(t,`--_ds-${e}`).replace(ta,"").trim(),n||pt(`Missing ${e} on:`,t),n||null},O=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.addEventListener(i,...o);return()=>Ke(t,...e)},Ke=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.removeEventListener(i,...o)},tt=(t,e)=>{G()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(n=>n()),window._dsHotReloadCleanup?.set(t,e()))},et=(t,e,n)=>{let o=()=>i.disconnect(),i=new MutationObserver(r=>{if(!G()||!t.isConnected)return o();e(t,r)});return e(t),i.observe(t,n),o},yo=(t,e)=>{let n=document.createElement(t);if(e)for(let[o,i]of Object.entries(e))v(n,o,i);return n},nt={define:(t,e)=>!G()||window.customElements.get(t)||window.customElements.define(t,e)};let ea=0;function ot(t){return G()?(window.dsUseId||(window.dsUseId=0),t&&!t.id&&(t.id=`:ds:${++window.dsUseId}`),t?.id||""):`:ds:${++ea}`}let j,na=0,wo=0;const Ye=t=>{clearTimeout(wo),j&&(j.textContent=`${t}${na++%2?" ":""}`),t&&(wo=setTimeout(Ye,2e3,""))},oa=()=>{document.readyState==="complete"&&(j||(j=yo("div",{"aria-live":"assertive"}),j.style.overflow="hidden",j.style.position="fixed",j.style.whiteSpace="nowrap",j.style.width="1px"),j.isConnected||document.body.appendChild(j))};tt("announce",()=>[O(document,"focus mouseover",oa,U)]);const _o=":click-delegate-hover",So="data-clickdelegatefor",ia=`[${So}]`,ra=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,n=t.button<2&&xo(t);if(!(!n||n.contains(t.target))){if(e&&n instanceof HTMLAnchorElement)return window.open(n.href,void 0,n.rel);t.stopImmediatePropagation(),n.click()}};let le;const sa=t=>{let e=xo(t);le!==e&&(le&&le.classList.remove(_o),e&&e.classList.add(_o),le=e)},xo=({target:t})=>{let e=(t instanceof Element?t.closest(ia):null)?.getAttribute(So),n=e&&document.getElementById(e)||void 0,o=n&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!o||o===n)&&!n?.disabled?n:void 0};tt("clickdelegatefor",()=>[O(window,"click auxclick",ra,!0),O(document,"mouseover",sa,U)]);let Qe=!1;const aa=({type:t,target:e,clientX:n=0,clientY:o=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();Qe=!!(i&&i.top<=o&&o<=i.bottom&&i.left<=n&&n<=i.right)}else{let i=e instanceof HTMLDialogElement&&!Qe&&v(e,"closedby")==="any";Qe=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},la=G()?document.getElementsByTagName("button"):[],ca=()=>{for(let t of la)t.getAttribute("command")?.endsWith("-modal")&&t.setAttribute("aria-haspopup","dialog")},da=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();tt("dialog",()=>[O(document,"command",da,U),O(document,"pointerdown pointerup",aa,U),et(document,ca,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const ua=G()?document.getElementsByTagName("fieldset"):[],fa=()=>{for(let t of ua)t.hasAttribute("aria-labelledby")||v(t,"aria-labelledby",`${ot(t.querySelector("legend"))} ${ot(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null)};tt("fieldset",()=>[et(document,fa,{childList:!0,subtree:!0})]);const Tt=Math.min,q=Math.max,ce=Math.round,de=Math.floor,X=t=>({x:t,y:t}),ma={left:"right",right:"left",bottom:"top",top:"bottom"};function Eo(t,e,n){return q(t,Tt(e,n))}function ht(t,e){return typeof t=="function"?t(e):t}function it(t){return t.split("-")[0]}function Ut(t){return t.split("-")[1]}function Ze(t){return t==="x"?"y":"x"}function $o(t){return t==="y"?"height":"width"}function K(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Co(t){return Ze(K(t))}function pa(t,e,n){n===void 0&&(n=!1);const o=Ut(t),i=Co(t),r=$o(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=ue(s)),[s,ue(s)]}function ha(t){const e=ue(t);return[Je(t),e,Je(e)]}function Je(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Ao=["left","right"],To=["right","left"],ga=["top","bottom"],ba=["bottom","top"];function va(t,e,n){switch(t){case"top":case"bottom":return n?e?To:Ao:e?Ao:To;case"left":case"right":return e?ga:ba;default:return[]}}function ya(t,e,n,o){const i=Ut(t);let r=va(it(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(Je)))),r}function ue(t){const e=it(t);return ma[e]+t.slice(e.length)}function wa(t){return{top:0,right:0,bottom:0,left:0,...t}}function _a(t){return typeof t!="number"?wa(t):{top:t,right:t,bottom:t,left:t}}function fe(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function ko(t,e,n){let{reference:o,floating:i}=t;const r=K(e),s=Co(e),a=$o(s),l=it(e),c=r==="y",u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,m=o[a]/2-i[a]/2;let h;switch(l){case"top":h={x:u,y:o.y-i.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-i.width,y:d};break;default:h={x:o.x,y:o.y}}switch(Ut(e)){case"start":h[s]-=m*(n&&c?-1:1);break;case"end":h[s]+=m*(n&&c?-1:1);break}return h}async function Sa(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:h=0}=ht(e,t),f=_a(h),b=a[m?d==="floating"?"reference":"floating":d],y=fe(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(b)))==null||n?b:b.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),_=d==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),S=await(r.isElement==null?void 0:r.isElement(w))?await(r.getScale==null?void 0:r.getScale(w))||{x:1,y:1}:{x:1,y:1},A=fe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:w,strategy:l}):_);return{top:(y.top-A.top+f.top)/S.y,bottom:(A.bottom-y.bottom+f.bottom)/S.y,left:(y.left-A.left+f.left)/S.x,right:(A.right-y.right+f.right)/S.x}}const xa=50,Ea=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:Sa},l=await(s.isRTL==null?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=ko(c,o,l),m=o,h=0;const f={};for(let p=0;p<r.length;p++){const b=r[p];if(!b)continue;const{name:y,fn:_}=b,{x:w,y:S,data:A,reset:k}=await _({x:u,y:d,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:c,platform:a,elements:{reference:t,floating:e}});u=w??u,d=S??d,f[y]={...f[y],...A},k&&h<xa&&(h++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(c=k.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):k.rects),{x:u,y:d}=ko(c,m,l)),p=-1)}return{x:u,y:d,placement:m,strategy:i,middlewareData:f}},$a=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:p=!0,...b}=ht(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const y=it(i),_=K(a),w=it(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=m||(w||!p?[ue(a)]:ha(a)),k=f!=="none";!m&&k&&A.push(...ya(a,p,f,S));const J=[a,...A],xt=await l.detectOverflow(e,b),Et=[];let lt=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&Et.push(xt[y]),d){const $t=pa(i,s,S);Et.push(xt[$t[0]],xt[$t[1]])}if(lt=[...lt,{placement:i,overflows:Et}],!Et.every($t=>$t<=0)){var ee,ne;const $t=(((ee=r.flip)==null?void 0:ee.index)||0)+1,co=J[$t];if(co&&(!(d==="alignment"?_!==K(co):!1)||lt.every(V=>K(V.placement)===_?V.overflows[0]>0:!0)))return{data:{index:$t,overflows:lt},reset:{placement:co}};let ie=(ne=lt.filter(Ct=>Ct.overflows[0]<=0).sort((Ct,V)=>Ct.overflows[1]-V.overflows[1])[0])==null?void 0:ne.placement;if(!ie)switch(h){case"bestFit":{var oe;const Ct=(oe=lt.filter(V=>{if(k){const mt=K(V.placement);return mt===_||mt==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(mt=>mt>0).reduce((mt,Fu)=>mt+Fu,0)]).sort((V,mt)=>V[1]-mt[1])[0])==null?void 0:oe[0];Ct&&(ie=Ct);break}case"initialPlacement":ie=a;break}if(i!==ie)return{reset:{placement:ie}}}return{}}}},Lo=new Set(["left","top"]);async function Ca(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=it(n),a=Ut(n),l=K(n)==="y",c=Lo.has(s)?-1:1,u=r&&l?-1:1,d=ht(e,t);let{mainAxis:m,crossAxis:h,alignmentAxis:f}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof f=="number"&&(h=a==="end"?f*-1:f),l?{x:h*u,y:m*c}:{x:m*c,y:h*u}}const Aa=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:a}=e,l=await Ca(e,t);return s===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Ta=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:_,y:w}=y;return{x:_,y:w}}},...c}=ht(t,e),u={x:n,y:o},d=await r.detectOverflow(e,c),m=K(it(i)),h=Ze(m);let f=u[h],p=u[m];if(s){const y=h==="y"?"top":"left",_=h==="y"?"bottom":"right",w=f+d[y],S=f-d[_];f=Eo(w,f,S)}if(a){const y=m==="y"?"top":"left",_=m==="y"?"bottom":"right",w=p+d[y],S=p-d[_];p=Eo(w,p,S)}const b=l.fn({...e,[h]:f,[m]:p});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[h]:s,[m]:a}}}}}},ka=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:s}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=ht(t,e),u={x:n,y:o},d=K(i),m=Ze(d);let h=u[m],f=u[d];const p=ht(a,e),b=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const w=m==="y"?"height":"width",S=r.reference[m]-r.floating[w]+b.mainAxis,A=r.reference[m]+r.reference[w]-b.mainAxis;h<S?h=S:h>A&&(h=A)}if(c){var y,_;const w=m==="y"?"width":"height",S=Lo.has(it(i)),A=r.reference[d]-r.floating[w]+(S&&((y=s.offset)==null?void 0:y[d])||0)+(S?0:b.crossAxis),k=r.reference[d]+r.reference[w]+(S?0:((_=s.offset)==null?void 0:_[d])||0)-(S?b.crossAxis:0);f<A?f=A:f>k&&(f=k)}return{[m]:h,[d]:f}}}},La=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:a}=e,{apply:l=()=>{},...c}=ht(t,e),u=await s.detectOverflow(e,c),d=it(i),m=Ut(i),h=K(i)==="y",{width:f,height:p}=r.floating;let b,y;d==="top"||d==="bottom"?(b=d,y=m===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,b=m==="end"?"top":"bottom");const _=p-u.top-u.bottom,w=f-u.left-u.right,S=Tt(p-u[b],_),A=Tt(f-u[y],w),k=!e.middlewareData.shift;let J=S,xt=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(xt=w),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(J=_),k&&!m){const lt=q(u.left,0),ee=q(u.right,0),ne=q(u.top,0),oe=q(u.bottom,0);h?xt=f-2*(lt!==0||ee!==0?lt+ee:q(u.left,u.right)):J=p-2*(ne!==0||oe!==0?ne+oe:q(u.top,u.bottom))}await l({...e,availableWidth:xt,availableHeight:J});const Et=await s.getDimensions(a.floating);return f!==Et.width||p!==Et.height?{reset:{rects:!0}}:{}}}};function me(){return typeof window<"u"}function kt(t){return Ro(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(Ro(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ro(t){return me()?t instanceof Node||t instanceof B(t).Node:!1}function z(t){return me()?t instanceof Element||t instanceof B(t).Element:!1}function rt(t){return me()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function Io(t){return!me()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}function zt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=F(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Ra(t){return/^(table|td|th)$/.test(kt(t))}function pe(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Ia=/transform|translate|scale|rotate|perspective|filter/,Oa=/paint|layout|strict|content/,gt=t=>!!t&&t!=="none";let tn;function en(t){const e=z(t)?F(t):t;return gt(e.transform)||gt(e.translate)||gt(e.scale)||gt(e.rotate)||gt(e.perspective)||!nn()&&(gt(e.backdropFilter)||gt(e.filter))||Ia.test(e.willChange||"")||Oa.test(e.contain||"")}function Ma(t){let e=ct(t);for(;rt(e)&&!Lt(e);){if(en(e))return e;if(pe(e))return null;e=ct(e)}return null}function nn(){return tn==null&&(tn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tn}function Lt(t){return/^(html|body|#document)$/.test(kt(t))}function F(t){return B(t).getComputedStyle(t)}function he(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ct(t){if(kt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Io(t)&&t.host||Y(t);return Io(e)?e.host:e}function Oo(t){const e=ct(t);return Lt(e)?t.ownerDocument?t.ownerDocument.body:t.body:rt(e)&&zt(e)?e:Oo(e)}function Ft(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Oo(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=B(i);if(r){const a=on(s);return e.concat(s,s.visualViewport||[],zt(i)?i:[],a&&n?Ft(a):[])}else return e.concat(i,Ft(i,[],n))}function on(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Mo(t){const e=F(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=rt(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,a=ce(n)!==r||ce(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function rn(t){return z(t)?t:t.contextElement}function Rt(t){const e=rn(t);if(!rt(e))return X(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Mo(e);let s=(r?ce(n.width):n.width)/o,a=(r?ce(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Da=X(0);function Do(t){const e=B(t);return!nn()||!e.visualViewport?Da:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Pa(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==B(t)?!1:e}function bt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=rn(t);let s=X(1);e&&(o?z(o)&&(s=Rt(o)):s=Rt(t));const a=Pa(r,n,o)?Do(r):X(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,d=i.height/s.y;if(r){const m=B(r),h=o&&z(o)?B(o):o;let f=m,p=on(f);for(;p&&o&&h!==f;){const b=Rt(p),y=p.getBoundingClientRect(),_=F(p),w=y.left+(p.clientLeft+parseFloat(_.paddingLeft))*b.x,S=y.top+(p.clientTop+parseFloat(_.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=w,c+=S,f=B(p),p=on(f)}}return fe({width:u,height:d,x:l,y:c})}function ge(t,e){const n=he(t).scrollLeft;return e?e.left+n:bt(Y(t)).left+n}function Po(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-ge(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Na(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=Y(o),a=e?pe(e.floating):!1;if(o===s||a&&r)return n;let l={scrollLeft:0,scrollTop:0},c=X(1);const u=X(0),d=rt(o);if((d||!d&&!r)&&((kt(o)!=="body"||zt(s))&&(l=he(o)),d)){const h=bt(o);c=Rt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}const m=s&&!d&&!r?Po(s,l):X(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+m.x,y:n.y*c.y-l.scrollTop*c.y+u.y+m.y}}function Ha(t){return Array.from(t.getClientRects())}function qa(t){const e=Y(t),n=he(t),o=t.ownerDocument.body,i=q(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=q(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ge(t);const a=-n.scrollTop;return F(o).direction==="rtl"&&(s+=q(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}const No=25;function Ba(t,e){const n=B(t),o=Y(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,l=0;if(i){r=i.width,s=i.height;const u=nn();(!u||u&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=ge(o);if(c<=0){const u=o.ownerDocument,d=u.body,m=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,f=Math.abs(o.clientWidth-d.clientWidth-h);f<=No&&(r-=f)}else c<=No&&(r+=c);return{width:r,height:s,x:a,y:l}}function Ua(t,e){const n=bt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=rt(t)?Rt(t):X(1),s=t.clientWidth*r.x,a=t.clientHeight*r.y,l=i*r.x,c=o*r.y;return{width:s,height:a,x:l,y:c}}function Ho(t,e,n){let o;if(e==="viewport")o=Ba(t,n);else if(e==="document")o=qa(Y(t));else if(z(e))o=Ua(e,n);else{const i=Do(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return fe(o)}function qo(t,e){const n=ct(t);return n===e||!z(n)||Lt(n)?!1:F(n).position==="fixed"||qo(n,e)}function za(t,e){const n=e.get(t);if(n)return n;let o=Ft(t,[],!1).filter(a=>z(a)&&kt(a)!=="body"),i=null;const r=F(t).position==="fixed";let s=r?ct(t):t;for(;z(s)&&!Lt(s);){const a=F(s),l=en(s);!l&&a.position==="fixed"&&(i=null),(r?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||zt(s)&&!l&&qo(t,s))?o=o.filter(u=>u!==s):i=a,s=ct(s)}return e.set(t,o),o}function Fa(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?pe(e)?[]:za(e,this._c):[].concat(n),o],a=Ho(e,s[0],i);let l=a.top,c=a.right,u=a.bottom,d=a.left;for(let m=1;m<s.length;m++){const h=Ho(e,s[m],i);l=q(h.top,l),c=Tt(h.right,c),u=Tt(h.bottom,u),d=q(h.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Wa(t){const{width:e,height:n}=Mo(t);return{width:e,height:n}}function Va(t,e,n){const o=rt(e),i=Y(e),r=n==="fixed",s=bt(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=X(0);function c(){l.x=ge(i)}if(o||!o&&!r)if((kt(e)!=="body"||zt(i))&&(a=he(e)),o){const h=bt(e,!0,r,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&c();r&&!o&&i&&c();const u=i&&!o&&!r?Po(i,a):X(0),d=s.left+a.scrollLeft-l.x-u.x,m=s.top+a.scrollTop-l.y-u.y;return{x:d,y:m,width:s.width,height:s.height}}function sn(t){return F(t).position==="static"}function Bo(t,e){if(!rt(t)||F(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function Uo(t,e){const n=B(t);if(pe(t))return n;if(!rt(t)){let i=ct(t);for(;i&&!Lt(i);){if(z(i)&&!sn(i))return i;i=ct(i)}return n}let o=Bo(t,e);for(;o&&Ra(o)&&sn(o);)o=Bo(o,e);return o&&Lt(o)&&sn(o)&&!en(o)?n:o||Ma(t)||n}const Ga=async function(t){const e=this.getOffsetParent||Uo,n=this.getDimensions,o=await n(t.floating);return{reference:Va(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ja(t){return F(t).direction==="rtl"}const Xa={convertOffsetParentRelativeRectToViewportRelativeRect:Na,getDocumentElement:Y,getClippingRect:Fa,getOffsetParent:Uo,getElementRects:Ga,getClientRects:Ha,getDimensions:Wa,getScale:Rt,isElement:z,isRTL:ja};function zo(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ka(t,e){let n=null,o;const i=Y(t);function r(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),r();const c=t.getBoundingClientRect(),{left:u,top:d,width:m,height:h}=c;if(a||e(),!m||!h)return;const f=de(d),p=de(i.clientWidth-(u+m)),b=de(i.clientHeight-(d+h)),y=de(u),w={rootMargin:-f+"px "+-p+"px "+-b+"px "+-y+"px",threshold:q(0,Tt(1,l))||1};let S=!0;function A(k){const J=k[0].intersectionRatio;if(J!==l){if(!S)return s();J?s(!1,J):o=setTimeout(()=>{s(!1,1e-7)},1e3)}J===1&&!zo(c,t.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(A,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,w)}n.observe(t)}return s(!0),r}function Ya(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=rn(t),u=i||r?[...c?Ft(c):[],...e?Ft(e):[]]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const d=c&&a?Ka(c,n):null;let m=-1,h=null;s&&(h=new ResizeObserver(y=>{let[_]=y;_&&_.target===c&&h&&e&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(e)})),n()}),c&&!l&&h.observe(c),e&&h.observe(e));let f,p=l?bt(t):null;l&&b();function b(){const y=bt(t);p&&!zo(p,y)&&n(),p=y,f=requestAnimationFrame(b)}return n(),()=>{var y;u.forEach(_=>{i&&_.removeEventListener("scroll",n),r&&_.removeEventListener("resize",n)}),d?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Qa=Aa,Za=Ta,Ja=$a,tl=La,el=ka,nl=(t,e,n)=>{const o=new Map,i={platform:Xa,...n},r={...i.platform,_c:o};return Ea(t,e,{...i,platform:r})},Fo="data-placement",Wo="data-autoplacement",Wt=new Map;function ol(t){let{newState:e,oldState:n,target:o,source:i=t.detail}=t,r=o instanceof HTMLElement&&v(o,"popover")!==null&&Xe(o,"--_ds-floating");if(!r)return;if(e==="closed")return Wt.get(o)?.();if(!i){let f=o.getRootNode(),p=`[popovertarget="${o.id}"],[commandfor="${o.id}"]`;i=o.id&&f?.querySelector?.(p)||void 0}if(!i||i===o||n&&n===e)return;let s=Xe(o,"--_ds-floating-overscroll"),a=v(o,Fo)||v(i,Fo)||r,l=v(o,Wo)||v(i,Wo),c=parseFloat(getComputedStyle(o,"::before").height)||0,u=a.match(/left|right/gi)?"Height":"Width",d=i[`offset${u}`]/2+c;if(a==="none")return;let m={strategy:"absolute",placement:a,middleware:[Qa(c||0),Za({padding:10,limiter:el({offset:{mainAxis:d}})}),rl(),...l==="false"?[]:[Ja({padding:10,crossAxis:!1})],...s?[tl({apply({availableHeight:f}){s==="fit"&&(o.style.width=`${i.offsetWidth}px`),o.style.maxHeight=`${Math.max(50,f-20)}px`}})]:[]]},h=Ya(i,o,async()=>{if(!i?.isConnected)return Wt.get(o)?.();let{x:f,y:p}=await nl(i,o,m);o.style.translate=`${f}px ${p}px`});Wt.set(o,()=>Wt.delete(o)&&h())}let be;const il=({type:t})=>{if(t==="mousedown"&&(be=!1),t==="scroll"&&be===!1&&(be=!0),t==="mouseup"&&be)for(let[e]of Wt)e.showPopover()};tt("popover",()=>[O(document,"mousedown scroll mouseup",il,!0),O(document,"toggle ds-toggle-source",ol,U)]);const rl=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,n=t.rects.reference,o=`${Math.round(n.width/2+n.x-t.x)}px`,i=`${Math.round(n.height/2+n.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",o),e.style.setProperty("--_ds-floating-arrow-y",i),v(e,"data-floating",t.placement),t}}),an=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||v(t,"aria-readonly")==="true"),sl=t=>{if(t.key!=="Tab"&&an(t.target)){let e=t.key?.startsWith("Arrow"),n=t.altKey||t.ctrlKey||t.metaKey;if((e||!n)&&t.preventDefault(),e&&v(t.target,"type")==="radio"){let o=document.querySelectorAll(`input[name="${t.target.name}"]`),i=t.key?.match(/Arrow(Right|Down)/)?1:-1;o[(o.length+[...o].indexOf(t.target)+i)%o.length]?.focus()}}},al=t=>{let e=t.target?.closest?.("label")?.control||t.target;an(e)&&(t.preventDefault(),e.focus())},ll=t=>{t.target instanceof HTMLSelectElement&&an(t.target)&&t.preventDefault()};tt("readonly",()=>[O(document,"keydown",sl),O(document,"click",al),O(document,"mousedown",ll)]);const Vo="aria-label",ve="data-toggle-group",Go=`[${ve}]`,cl=()=>{for(let t of document.querySelectorAll(Go))v(t,"aria-label",At(t,ve))},dl=t=>{let{key:e,target:n}=t,o=n instanceof HTMLInputElement&&n.closest(Go);if(o&&(!v(o,Vo)&&!v(o,"aria-labelledby")&&v(o,Vo,At(o,ve)),e==="Enter"&&n.click(),e?.startsWith("Arrow"))){t.preventDefault?.();let i=[...o.getElementsByTagName("input")],r=i.indexOf(n),s=e.match(/Arrow(Right|Down)/)?1:-1,a=r;for(let l=0;l<i.length;l++)if(a=(i.length+a+s)%i.length,!i[a]?.disabled){i[a]?.focus();break}}};tt("toggle-group",()=>[O(document,"keydown",dl),et(document,cl,{attributeFilter:[ve],attributes:!0,childList:!0,subtree:!0})]);let T,Vt,ye=!1,ln=0,cn=0;const ul=G()&&/iPad|iPhone|iPod/.test(navigator.userAgent),It="data-tooltip",dn="data-color",jo="aria-label",Xo="aria-description",fl=`[${dn}]`,ml=`[${It}]`,un="data-color-scheme",pl=`[${un}]`,Ko=t=>{t&&!(t instanceof HTMLElement)&&pt("setTooltipElement expects an HTMLElement, got: ",t),clearTimeout(cn),clearTimeout(ln),Vt=void 0,ye=!1,T=t||void 0},hl=()=>{for(let t of document.querySelectorAll(ml)){let e=At(t,It);if(!e)return;if(e!==(t.getAttribute(jo)||t.getAttribute(Xo))){let i=v(t,"role")!=="img"&&t.textContent?.trim();v(t,It,e),v(t,jo,i?null:e),v(t,Xo,i?e:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||pt('Missing tabindex="0" attribute on: ',t)}let n=t===Vt&&T?.offsetHeight&&T?.offsetWidth,o=n&&e&&T?.textContent!==e;n&&o&&(T&&(T.textContent=e),document.activeElement===t&&Ye(e))}},Yo=({type:t,target:e})=>{if(clearTimeout(ln),e===T)return;if(t==="mouseover"&&!ye&&!ul){ln=setTimeout(Yo,300,{target:e});return}let n=e?.closest?.(`[${It}]`);if(n===Vt)return;if(!n)return Qo();T||=yo("div",{class:"ds-tooltip"}),T.isConnected||document.body.appendChild(T);let o=n.closest(fl),i=n.closest(pl),r=o!==i&&o?.contains(i);clearTimeout(cn),v(T,"popover","manual"),v(T,un,i?.getAttribute(un)||null),v(T,dn,r&&o?.getAttribute(dn)||null),T.textContent=v(n,It),T.showPopover(),T.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n})),ye=!0,Vt=n},Qo=()=>T?.isConnected&&T.popover&&T.hidePopover(),Zo=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&Qo();t?t.target===T&&t.newState==="closed"&&(Vt=void 0,cn=setTimeout(Zo,300)):ye=!1};tt("tooltip",()=>[O(document,"blur focus mouseover",Yo,U),O(document,"toggle keydown",Zo,U),et(document,hl,{attributeFilter:[It],attributes:!0,childList:!0,subtree:!0})]);const fn="aria-label";var Jo=class extends ae{_items;_label=null;_unresize;_unmutate;static get observedAttributes(){return[fn]}connectedCallback(){let e=vo(()=>mn(this),100);this._label=At(this,fn),this._items=this.getElementsByTagName("a"),this._unresize=O(window,"resize",e),this._unmutate=et(this,mn,{childList:!0,subtree:!0})}attributeChangedCallback(e,n,o){!this._unmutate||!o||(this._label=o,mn(this))}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._items=void 0}};const mn=t=>{let e=t._items?.[t._items.length-1],n=e?.parentElement===t?null:e,o=!n?.offsetHeight;v(t,"role",o?null:"navigation"),v(t,fn,o?null:t._label);for(let i of t._items||[])v(i,"aria-current",i===n?"page":null)};nt.define("ds-breadcrumbs",Jo);var ti=class extends ae{_unmutate;connectedCallback(){O(this,"animationend",this,U),v(this,"role","group"),v(this,"tabindex","-1"),this._unmutate=et(this,gl,{childList:!0,subtree:!0}),this.focus()}handleEvent({target:e}){e===this&&this.focus()}disconnectedCallback(){Ke(this,"animationend",this,U),this._unmutate?.(),this._unmutate=void 0}};const gl=t=>{let e=v(t,"aria-label")?.trim(),n=v(t,"aria-labelledby")?.trim(),o=t.querySelector("h2,h3,h4,h5,h6");o&&!e&&!n&&v(t,"aria-labelledby",ot(o)),!o&&!e&&!n&&pt("Missing accessible name on:",t,`
|
|
6
|
-
|
|
5
|
+
@keyframes indeterminate { from { background-position-x: 100% } to { background-position-x: 0 } }`,Fo=class extends Ts{constructor(){var t;super(),this._skipAttrChange=!1,As(this,Rs),this._internals=(t=this.attachInternals)==null?void 0:t.call(this)}static get observedAttributes(){return["aria-label","aria-labelledby",ve,fn]}connectedCallback(){N(this,"aria-valuemin","0"),N(this,"aria-valuemax","100"),N(this,"role",Bo?"img":"progressbar"),this.attributeChangedCallback()}attributeChangedCallback(){if(this._skipAttrChange||!this.hasAttribute("role"))return;this._skipAttrChange=!0;const t=this.position,e=Math.max(0,Math.round(t*100));this.style.setProperty("--percentage",`${e}%`);let n=ks(this);Bo&&(n=`${n.replace(/\(\d+%\)$/,"")} (${e}%)`.trim()),N(this,"aria-busy",`${t===-1}`),N(this,"aria-label",n),N(this,"aria-labelledby",null),N(this,"aria-valuenow",t===-1?null:`${e}`),this._skipAttrChange=!1}get labels(){var t;const e=(t=this._internals)==null?void 0:t.labels;if(e)return e;const n=Ls(this),o=this.closest("label:not([for])");return o&&N(o,"for",n),Cs(this).querySelectorAll(`label[for="${n}"]`)}get position(){return this.hasAttribute(ve)?Math.min(this.value/this.max,1):-1}get value(){return Math.min(Wo(this,ve),this.max)}set value(t){Vo(this,ve,t)}get max(){return Wo(this,fn,1)}set max(t){Vo(this,fn,t,1)}};Fo.formAssociated=!0;var Wo=(t,e,n=0)=>{const o=N(t,e),i=Number(o);return o===null?n:Number.isFinite(i)&&Math.max(n,i)||n},Vo=(t,e,n,o=0)=>{const i=Number(n);if(Number.isFinite(i))return N(t,e,`${Math.max(o,i)||o}`);throw new Error(`Failed to set the '${e}' property on 'UHTMLProgressElement': The provided double value is non-finite.`)};Ms.define("u-progress",Fo);const z={passive:!0,capture:!0},F=()=>typeof window<"u"&&typeof document<"u",Is=()=>F()&&/^Win/i.test(navigator.userAgentData?.platform||navigator.platform),ye=typeof HTMLElement>"u"?class{}:HTMLElement;function Go(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const gt=(t,...e)=>!F()||window.dsWarnings===!1||console.log(`\x1B[1mDesignsystemet:\x1B[m ${t}`,...e),v=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),we=(t,e)=>getComputedStyle(t).getPropertyValue(e).trim(),Os=/^["']|["']$/g,Rt=(t,e)=>{let n=v(t,e);return n||=we(t,`--_ds-${e}`).replace(Os,"").trim(),n||gt(`Missing ${e} on:`,t),n||null},I=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.addEventListener(i,...o);return()=>pn(t,...e)},pn=(t,...e)=>{let[n,...o]=e;for(let i of n.split(" "))t.removeEventListener(i,...o)},nt=(t,e)=>{F()&&(window._dsHotReloadCleanup||(window._dsHotReloadCleanup=new Map),window._dsHotReloadCleanup?.get(t)?.map(n=>n()),window._dsHotReloadCleanup?.set(t,e()))},ot=(t,e,n)=>{let o=()=>i.disconnect(),i=new MutationObserver(r=>{if(!F()||!t.isConnected)return o();e(t,r)});return e(t),i.observe(t,n),o},jo=(t,e)=>{let n=document.createElement(t);if(e)for(let[o,i]of Object.entries(e))v(n,o,i);return n},it={define:(t,e)=>!F()||window.customElements.get(t)||window.customElements.define(t,e)};let Ds=0;function rt(t){return F()?(window.dsUseId||(window.dsUseId=0),t&&!t.id&&(t.id=`:ds:${++window.dsUseId}`),t?.id||""):`:ds:${++Ds}`}let X,Ps=0,Xo=0;const mn=t=>{clearTimeout(Xo),X&&(X.textContent=`${t}${Ps++%2?" ":""}`),t&&(Xo=setTimeout(mn,2e3,""))},Hs=()=>{document.readyState==="complete"&&(X||(X=jo("div",{"aria-live":"assertive"}),X.style.overflow="hidden",X.style.position="fixed",X.style.whiteSpace="nowrap",X.style.width="1px"),X.isConnected||document.body.appendChild(X))};nt("announce",()=>[I(document,"focus mouseover",Hs,z)]);const Ko=":click-delegate-hover",Yo="data-clickdelegatefor",Ns=`[${Yo}]`,qs=t=>{let e=t.button===1||t.metaKey||t.ctrlKey,n=t.button<2&&Qo(t);if(!(!n||n.contains(t.target))){if(e&&n instanceof HTMLAnchorElement)return window.open(n.href,void 0,n.rel);t.stopImmediatePropagation(),n.click()}};let _e;const Bs=t=>{let e=Qo(t);_e!==e&&(_e&&_e.classList.remove(Ko),e&&e.classList.add(Ko),_e=e)},Qo=({target:t})=>{let e=(t instanceof Element?t.closest(Ns):null)?.getAttribute(Yo),n=e&&document.getElementById(e)||void 0,o=n&&t.closest('a,button,label,input,select,textarea,details,dialog,[role="button"],[popover],[contenteditable]');return(!o||o===n)&&!n?.disabled?n:void 0};nt("clickdelegatefor",()=>[I(window,"click auxclick",qs,!0),I(document,"mouseover",Bs,z)]);var hn=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Zo=hn(),Jo=Zo?navigator.userAgent:"",zs=/android/i.test(Jo),Us=/firefox/i.test(Jo),ti;Zo&&/^Mac/i.test(((ti=navigator.userAgentData)==null?void 0:ti.platform)||navigator.platform);var ei=(t,e,n)=>n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),Fs=(t,e,n)=>{const o=new MutationObserver(r=>{if(!hn()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>o.disconnect(),{takeRecords:()=>o.takeRecords()});return e(t),o.observe(t,n),i},ni="__uDetailsPolyfillSummarys";if(hn()&&zs&&Us&&!window[ni]){const t=document.getElementsByTagName("summary"),e=()=>{for(const n of t){const o=n.parentElement;ei(n,"role","button"),ei(n,"aria-expanded",`${!!o?.open}`)}};window[ni]=Fs(document,e,{attributeFilter:["open"],attributes:!0,childList:!0,subtree:!0})}let gn=!1;const Ws=({type:t,target:e,clientX:n=0,clientY:o=0})=>{if(t==="pointerdown"){let i=e?.closest?.("dialog")?.getBoundingClientRect();gn=!!(i&&i.top<=o&&o<=i.bottom&&i.left<=n&&n<=i.right)}else{let i=e instanceof HTMLDialogElement&&!gn&&v(e,"closedby")==="any";gn=!1,i&&requestAnimationFrame(()=>e.open&&e.close())}},Vs=F()?document.getElementsByTagName("button"):[],Gs=()=>{for(let t of Vs)t.getAttribute("command")?.endsWith("-modal")&&t.setAttribute("aria-haspopup","dialog")},js=({command:t,target:e})=>t==="--show-non-modal"&&e instanceof HTMLDialogElement&&e.show();nt("dialog",()=>[I(document,"command",js,z),I(document,"pointerdown pointerup",Ws,z),ot(document,Gs,{attributeFilter:["command"],attributes:!0,childList:!0,subtree:!0})]);const Xs=F()?document.getElementsByTagName("fieldset"):[],Ks=()=>{for(let t of Xs)t.hasAttribute("aria-labelledby")||v(t,"aria-labelledby",`${rt(t.querySelector("legend"))} ${rt(t.querySelector(':scope > :is([data-field="description"],legend + p)'))}`.trim()||null)};nt("fieldset",()=>[ot(document,Ks,{childList:!0,subtree:!0})]);function Ys(){return typeof HTMLButtonElement<"u"&&"command"in HTMLButtonElement.prototype&&"source"in((globalThis.CommandEvent||{}).prototype||{})}function Qs(){document.addEventListener("invoke",f=>{f.type=="invoke"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0),document.addEventListener("command",f=>{f.type=="command"&&f.isTrusted&&(f.stopImmediatePropagation(),f.preventDefault())},!0);function t(f,p,g=!0){Object.defineProperty(f,p,{...Object.getOwnPropertyDescriptor(f,p),enumerable:g})}function e(f){return f&&typeof f.getRootNode=="function"?f.getRootNode():f&&f.parentNode?e(f.parentNode):f}let n=new WeakMap,o=new WeakMap;class i extends Event{constructor(p,g={}){super(p,g);let{source:y,command:_}=g;if(y!=null&&!(y instanceof Element))throw TypeError("source must be an element");n.set(this,y||null),o.set(this,_===void 0?"":String(_))}get[Symbol.toStringTag](){return"CommandEvent"}get source(){if(!n.has(this))throw TypeError("illegal invocation");let p=n.get(this);if(!(p instanceof Element))return null;let g=e(p);return g===e(this.target||document)?p:g.host}get command(){if(!o.has(this))throw TypeError("illegal invocation");return o.get(this)}}t(i.prototype,"source"),t(i.prototype,"command");let r=new WeakMap;function a(f){Object.defineProperties(f.prototype,{commandForElement:{enumerable:!0,configurable:!0,set(p){if(p===null)this.removeAttribute("commandfor"),r.delete(this);else if(p instanceof Element){this.setAttribute("commandfor","");let g=e(p);e(this)===g||g===this.ownerDocument?r.set(this,p):r.delete(this)}else throw TypeError("commandForElement must be an element or null")},get(){if(this.localName!=="button"||this.disabled)return null;if(this.form&&this.getAttribute("type")!=="button")return console.warn("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work"),null;let p=r.get(this);if(p)return p.isConnected?p:(r.delete(this),null);let g=e(this),y=this.getAttribute("commandfor");return(g instanceof Document||g instanceof ShadowRoot)&&y&&g.getElementById(y)||null}},command:{enumerable:!0,configurable:!0,get(){let p=this.getAttribute("command")||"";if(p.startsWith("--"))return p;let g=p.toLowerCase();switch(g){case"show-modal":case"request-close":case"close":case"toggle-popover":case"hide-popover":case"show-popover":return g}return""},set(p){this.setAttribute("command",p)}}})}let s=new WeakMap;Object.defineProperties(HTMLElement.prototype,{oncommand:{enumerable:!0,configurable:!0,get(){return c.takeRecords(),s.get(this)||null},set(f){let p=s.get(this)||null;p&&this.removeEventListener("command",p),s.set(this,typeof f=="object"||typeof f=="function"?f:null),typeof f=="function"&&this.addEventListener("command",f)}}});function l(f){for(let p of f)p.oncommand=Function("event",p.getAttribute("oncommand"))}let c=new MutationObserver(f=>{for(let p of f){let{target:g}=p;p.type==="childList"?l(g.querySelectorAll("[oncommand]")):l([g])}});c.observe(document,{subtree:!0,childList:!0,attributeFilter:["oncommand"]}),l(document.querySelectorAll("[oncommand]"));let d=new WeakSet;function u(f){if(d.has(f)||(d.add(f),f.defaultPrevented)||f.type!=="click")return;let p=f.composedPath().find(w=>w.matches?.("button[commandfor], button[command]"));if(!p)return;if(p.form&&p.getAttribute("type")!=="button")throw f.preventDefault(),Error("Element with `commandFor` is a form participant. It should explicitly set `type=button` in order for `commandFor` to work. In order for it to act as a Submit button, it must not have command or commandfor attributes");if(p.hasAttribute("command")!==p.hasAttribute("commandfor")){let w=p.hasAttribute("command")?"command":"commandfor",E=p.hasAttribute("command")?"commandfor":"command";throw Error(`Element with ${w} attribute must also have a ${E} attribute to function.`)}if(p.command!=="show-popover"&&p.command!=="hide-popover"&&p.command!=="toggle-popover"&&p.command!=="show-modal"&&p.command!=="request-close"&&p.command!=="close"&&!p.command.startsWith("--")){console.warn(`"${p.command}" is not a valid command value. Custom commands must begin with --`);return}let g=p.commandForElement;if(!g)return;let y=new i("command",{command:p.command,source:p,cancelable:!0});if(g.dispatchEvent(y),y.defaultPrevented)return;let _=y.command.toLowerCase();if(g.popover){let w=!g.matches(":popover-open");w&&(_==="toggle-popover"||_==="show-popover")?g.showPopover({source:p}):!w&&_==="hide-popover"&&g.hidePopover()}else if(g.localName==="dialog"){let w=!g.hasAttribute("open");w&&_=="show-modal"?g.showModal():!w&&_=="close"?g.close(p.value?p.value:void 0):!w&&_=="request-close"&&(HTMLDialogElement.prototype.requestClose||(HTMLDialogElement.prototype.requestClose=function(){let E=new Event("cancel",{cancelable:!0});this.dispatchEvent(E),E.defaultPrevented||this.close()}),g.requestClose(p.value?p.value:void 0))}}function m(f){f.addEventListener("click",u,!0)}function h(f,p){let g=f.prototype.attachShadow;f.prototype.attachShadow=function(_){let w=g.call(this,_);return p(w),w};let y=f.prototype.attachInternals;f.prototype.attachInternals=function(){let _=y.call(this);return _.shadowRoot&&p(_.shadowRoot),_}}a(HTMLButtonElement),h(HTMLElement,f=>{m(f),c.observe(f,{attributeFilter:["oncommand"]}),l(f.querySelectorAll("[oncommand]"))}),m(document),Object.assign(globalThis,{CommandEvent:i})}F()&&!Ys()&&Qs();var Se=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},oi=new WeakMap;function ii(t,e,n){oi.set(t,setTimeout(()=>{oi.has(t)&&t.dispatchEvent(new Se("toggle",{cancelable:!1,oldState:e,newState:n}))},0))}var bn=globalThis.ShadowRoot||function(){},Zs=globalThis.HTMLDialogElement||function(){},Ee=new WeakMap,at=new WeakMap,U=new WeakMap,It=new WeakMap;function xe(t){return It.get(t)||"hidden"}var $e=new WeakMap;function Kt(t){return[...t].pop()}function Js(t){let e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;let n=xe(e);t.popoverTargetAction==="show"&&n==="showing"||t.popoverTargetAction==="hide"&&n==="hidden"||(n==="showing"?Dt(e,!0,!0):bt(e,!1)&&($e.set(e,t),vn(e)))}function bt(t,e){return!(t.popover!=="auto"&&t.popover!=="manual"&&t.popover!=="hint"||!t.isConnected||e&&xe(t)!=="showing"||!e&&xe(t)!=="hidden"||t instanceof Zs&&t.hasAttribute("open")||document.fullscreenElement===t)}function ri(t){if(!t)return 0;let e=at.get(document)||new Set,n=U.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function tl(t){let e=si(t),n=el(t);return ri(e)>ri(n)?e:n}function Yt(t){let e,n=U.get(t)||new Set,o=at.get(t)||new Set,i=n.size>0?n:o.size>0?o:null;return i?(e=Kt(i),e.isConnected?e:(i.delete(e),Yt(t))):null}function ai(t){for(let e of t||[])if(!e.isConnected)t.delete(e);else return e;return null}function Ot(t){return typeof t.getRootNode=="function"?t.getRootNode():t.parentNode?Ot(t.parentNode):t}function si(t){for(;t;){if(t instanceof HTMLElement&&t.popover==="auto"&&It.get(t)==="showing")return t;if(t=t instanceof Element&&t.assignedSlot||t.parentElement||Ot(t),t instanceof bn&&(t=t.host),t instanceof Document)return}}function el(t){for(;t;){let e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if(t=t.parentElement||Ot(t),t instanceof bn&&(t=t.host),t instanceof Document)return}}function li(t,e){let n=new Map,o=0;for(let a of e||[])n.set(a,o),o+=1;n.set(t,o),o+=1;let i=null;function r(a){if(!a)return;let s=!1,l=null,c=null;for(;!s;){if(l=si(a)||null,l===null||!n.has(l))return;(t.popover==="hint"||l.popover==="auto")&&(s=!0),s||(a=l.parentElement)}c=n.get(l),(i===null||n.get(i)<c)&&(i=l)}return r(t.parentElement||Ot(t)),i}function nl(t){return t.hidden||t instanceof bn||(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)&&t.disabled||t instanceof HTMLInputElement&&t.type==="hidden"||t instanceof HTMLAnchorElement&&t.href===""?!1:typeof t.tabIndex=="number"&&t.tabIndex!==-1}function ol(t){if(t.shadowRoot&&t.shadowRoot.delegatesFocus!==!0)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{let r=e.querySelectorAll("slot");for(let a of r){let s=a.assignedElements({flatten:!0});for(let l of s){if(l.hasAttribute("autofocus"))return l;if(n=l.querySelector("[autofocus]"),n)return n}}}let o=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),i=o.currentNode;for(;i;){if(nl(i))return i;i=o.nextNode()}}function il(t){var e;(e=ol(t))==null||e.focus()}var Te=new WeakMap;function vn(t){if(!bt(t,!1))return;let e=t.ownerDocument;if(!t.dispatchEvent(new Se("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!bt(t,!1))return;let n=!1,o=t.popover,i=null,r=li(t,at.get(e)||new Set),a=li(t,U.get(e)||new Set);if(o==="auto"&&(yn(U.get(e)||new Set,n,!0),vt(r||e,n,!0),i="auto"),o==="hint"&&(a?(vt(a,n,!0),i="hint"):(yn(U.get(e)||new Set,n,!0),r?(vt(r,n,!0),i="auto"):i="hint")),o==="auto"||o==="hint"){if(o!==t.popover||!bt(t,!1))return;Yt(e)||(n=!0),i==="auto"?(at.has(e)||at.set(e,new Set),at.get(e).add(t)):i==="hint"&&(U.has(e)||U.set(e,new Set),U.get(e).add(t))}Te.delete(t);let s=e.activeElement;t.classList.add(":popover-open"),It.set(t,"showing"),Ee.has(e)||Ee.set(e,new Set),Ee.get(e).add(t),ui($e.get(t),!0),il(t),n&&s&&t.popover==="auto"&&Te.set(t,s),ii(t,"closed","open")}function Dt(t,e=!1,n=!1){var o,i;if(!bt(t,!0))return;let r=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(vt(t,e,n),!bt(t,!0)))return;let a=at.get(r)||new Set,s=a.has(t)&&Kt(a)===t;if(ui($e.get(t),!1),$e.delete(t),n&&(t.dispatchEvent(new Se("beforetoggle",{oldState:"open",newState:"closed"})),s&&Kt(a)!==t&&vt(t,e,n),!bt(t,!0)))return;(o=Ee.get(r))==null||o.delete(t),a.delete(t),(i=U.get(r))==null||i.delete(t),t.classList.remove(":popover-open"),It.set(t,"hidden"),n&&ii(t,"open","closed");let l=Te.get(t);l&&(Te.delete(t),e&&l.focus())}function rl(t,e=!1,n=!1){let o=Yt(t);for(;o;)Dt(o,e,n),o=Yt(t)}function yn(t,e=!1,n=!1){let o=ai(t);for(;o;)Dt(o,e,n),o=ai(t)}function ci(t,e,n,o){let i=!1,r=!1;for(;i||!r;){r=!0;let a=null,s=!1;for(let l of e)if(l===t)s=!0;else if(s){a=l;break}if(!a)return;for(;xe(a)==="showing"&&e.size;)Dt(Kt(e),n,o);e.has(t)&&Kt(e)!==t&&(i=!0),i&&(o=!1)}}function vt(t,e,n){let o=t.ownerDocument||t;if(t instanceof Document)return rl(o,e,n);if(U.get(o)?.has(t)){ci(t,U.get(o),e,n);return}yn(U.get(o)||new Set,e,n),at.get(o)?.has(t)&&ci(t,at.get(o),e,n)}var wn=new WeakMap;function di(t){if(!t.isTrusted)return;let e=t.composedPath()[0];if(!e)return;let n=e.ownerDocument;if(!Yt(n))return;let o=tl(e);if(o&&t.type==="pointerdown")wn.set(n,o);else if(t.type==="pointerup"){let i=wn.get(n)===o;wn.delete(n),i&&vt(o||n,!1,!0)}}var _n=new WeakMap;function ui(t,e=!1){if(!t)return;_n.has(t)||_n.set(t,t.getAttribute("aria-expanded"));let n=t.popoverTargetElement;if(n instanceof HTMLElement&&n.popover==="auto")t.setAttribute("aria-expanded",String(e));else{let o=_n.get(t);o?t.setAttribute("aria-expanded",o):t.removeAttribute("aria-expanded")}}var fi=globalThis.ShadowRoot||function(){};function al(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function yt(t,e,n){let o=t[e];Object.defineProperty(t,e,{value(i){return o.call(this,n(i))}})}var sl=/(^|[^\\]):popover-open\b/g;function ll(){return typeof globalThis.CSSLayerBlockRule=="function"}function cl(){let t=ll();return`
|
|
6
|
+
${t?"@layer popover-polyfill {":""}
|
|
7
|
+
:where([popover]) {
|
|
8
|
+
position: fixed;
|
|
9
|
+
z-index: 2147483647;
|
|
10
|
+
inset: 0;
|
|
11
|
+
padding: 0.25em;
|
|
12
|
+
width: fit-content;
|
|
13
|
+
height: fit-content;
|
|
14
|
+
border-width: initial;
|
|
15
|
+
border-color: initial;
|
|
16
|
+
border-image: initial;
|
|
17
|
+
border-style: solid;
|
|
18
|
+
background-color: canvas;
|
|
19
|
+
color: canvastext;
|
|
20
|
+
overflow: auto;
|
|
21
|
+
margin: auto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where([popover]:not(.\\:popover-open)) {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(dialog[popover].\\:popover-open) {
|
|
29
|
+
display: block;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(dialog[popover][open]) {
|
|
33
|
+
display: revert;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where([anchor].\\:popover-open) {
|
|
37
|
+
inset: auto;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where([anchor]:popover-open) {
|
|
41
|
+
inset: auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@supports not (background-color: canvas) {
|
|
45
|
+
:where([popover]) {
|
|
46
|
+
background-color: white;
|
|
47
|
+
color: black;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@supports (width: -moz-fit-content) {
|
|
52
|
+
:where([popover]) {
|
|
53
|
+
width: -moz-fit-content;
|
|
54
|
+
height: -moz-fit-content;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@supports not (inset: 0) {
|
|
59
|
+
:where([popover]) {
|
|
60
|
+
top: 0;
|
|
61
|
+
left: 0;
|
|
62
|
+
right: 0;
|
|
63
|
+
bottom: 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
${t?"}":""}
|
|
67
|
+
`}var Pt=null;function Sn(t){let e=cl();if(Pt===null)try{Pt=new CSSStyleSheet,Pt.replaceSync(e)}catch{Pt=!1}if(Pt===!1){let n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[Pt,...t.adoptedStyleSheets]}function dl(){if(typeof window>"u")return;window.ToggleEvent=window.ToggleEvent||Se;function t(s){return s?.includes(":popover-open")&&(s=s.replace(sl,"$1.\\:popover-open")),s}yt(Document.prototype,"querySelector",t),yt(Document.prototype,"querySelectorAll",t),yt(Element.prototype,"querySelector",t),yt(Element.prototype,"querySelectorAll",t),yt(Element.prototype,"matches",t),yt(Element.prototype,"closest",t),yt(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let s=(this.getAttribute("popover")||"").toLowerCase();return s===""||s=="auto"?"auto":s=="hint"?"hint":"manual"},set(s){s===null?this.removeAttribute("popover"):this.setAttribute("popover",s)}},showPopover:{enumerable:!0,configurable:!0,value(s={}){vn(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Dt(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(s={}){return typeof s=="boolean"&&(s={force:s}),It.get(this)==="showing"&&s.force===void 0||s.force===!1?Dt(this,!0,!0):(s.force===void 0||s.force===!0)&&vn(this),It.get(this)==="showing"}}});let e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(s){let l=e.call(this,s);return Sn(l),l}}});let n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let s=n.call(this);return s.shadowRoot&&Sn(s.shadowRoot),s}}});let o=new WeakMap;function i(s){Object.defineProperties(s.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(l){if(l===null)this.removeAttribute("popovertarget"),o.delete(this);else if(l instanceof Element)this.setAttribute("popovertarget",""),o.set(this,l);else throw TypeError("popoverTargetElement must be an element or null")},get(){if(this.localName!=="button"&&this.localName!=="input"||this.localName==="input"&&this.type!=="reset"&&this.type!=="image"&&this.type!=="button"||this.disabled||this.form&&this.type==="submit")return null;let l=o.get(this);if(l&&l.isConnected)return l;if(l&&!l.isConnected)return o.delete(this),null;let c=Ot(this),d=this.getAttribute("popovertarget");return(c instanceof Document||c instanceof fi)&&d&&c.getElementById(d)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let l=(this.getAttribute("popovertargetaction")||"").toLowerCase();return l==="show"||l==="hide"?l:"toggle"},set(l){this.setAttribute("popovertargetaction",l)}}})}i(HTMLButtonElement),i(HTMLInputElement);let r=s=>{if(s.defaultPrevented)return;let l=s.composedPath(),c=l[0];if(!(c instanceof Element)||c?.shadowRoot)return;let d=Ot(c);if(!(d instanceof fi||d instanceof Document))return;let u=l.find(m=>m.matches?.call(m,"[popovertargetaction],[popovertarget]"));if(u){Js(u),s.preventDefault();return}},a=s=>{let l=s.key,c=s.target;!s.defaultPrevented&&c&&(l==="Escape"||l==="Esc")&&vt(c.ownerDocument,!0,!0)};(s=>{s.addEventListener("click",r),s.addEventListener("keydown",a),s.addEventListener("pointerdown",di),s.addEventListener("pointerup",di)})(document),Sn(document)}const Ht=Math.min,q=Math.max,Ae=Math.round,Ce=Math.floor,K=t=>({x:t,y:t}),ul={left:"right",right:"left",bottom:"top",top:"bottom"};function pi(t,e,n){return q(t,Ht(e,n))}function wt(t,e){return typeof t=="function"?t(e):t}function st(t){return t.split("-")[0]}function Qt(t){return t.split("-")[1]}function En(t){return t==="x"?"y":"x"}function mi(t){return t==="y"?"height":"width"}function Y(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function hi(t){return En(Y(t))}function fl(t,e,n){n===void 0&&(n=!1);const o=Qt(t),i=hi(t),r=mi(i);let a=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=ke(a)),[a,ke(a)]}function pl(t){const e=ke(t);return[xn(t),e,xn(e)]}function xn(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const gi=["left","right"],bi=["right","left"],ml=["top","bottom"],hl=["bottom","top"];function gl(t,e,n){switch(t){case"top":case"bottom":return n?e?bi:gi:e?gi:bi;case"left":case"right":return e?ml:hl;default:return[]}}function bl(t,e,n,o){const i=Qt(t);let r=gl(st(t),n==="start",o);return i&&(r=r.map(a=>a+"-"+i),e&&(r=r.concat(r.map(xn)))),r}function ke(t){const e=st(t);return ul[e]+t.slice(e.length)}function vl(t){return{top:0,right:0,bottom:0,left:0,...t}}function yl(t){return typeof t!="number"?vl(t):{top:t,right:t,bottom:t,left:t}}function Le(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function vi(t,e,n){let{reference:o,floating:i}=t;const r=Y(e),a=hi(e),s=mi(a),l=st(e),c=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[s]/2-i[s]/2;let h;switch(l){case"top":h={x:d,y:o.y-i.height};break;case"bottom":h={x:d,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-i.width,y:u};break;default:h={x:o.x,y:o.y}}switch(Qt(e)){case"start":h[a]-=m*(n&&c?-1:1);break;case"end":h[a]+=m*(n&&c?-1:1);break}return h}async function wl(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=wt(e,t),f=yl(h),g=s[m?u==="floating"?"reference":"floating":u],y=Le(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(g)))==null||n?g:g.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),_=u==="floating"?{x:o,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),E=await(r.isElement==null?void 0:r.isElement(w))?await(r.getScale==null?void 0:r.getScale(w))||{x:1,y:1}:{x:1,y:1},A=Le(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:w,strategy:l}):_);return{top:(y.top-A.top+f.top)/E.y,bottom:(A.bottom-y.bottom+f.bottom)/E.y,left:(y.left-A.left+f.left)/E.x,right:(A.right-y.right+f.right)/E.x}}const _l=50,Sl=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:wl},l=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=vi(c,o,l),m=o,h=0;const f={};for(let p=0;p<r.length;p++){const g=r[p];if(!g)continue;const{name:y,fn:_}=g,{x:w,y:E,data:A,reset:k}=await _({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:c,platform:s,elements:{reference:t,floating:e}});d=w??d,u=E??u,f[y]={...f[y],...A},k&&h<_l&&(h++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(c=k.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):k.rects),{x:d,y:u}=vi(c,m,l)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}},El=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:a,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:p=!0,...g}=wt(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const y=st(i),_=Y(s),w=st(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=m||(w||!p?[ke(s)]:pl(s)),k=f!=="none";!m&&k&&A.push(...bl(s,p,f,E));const et=[s,...A],Ct=await l.detectOverflow(e,g),kt=[];let ut=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&kt.push(Ct[y]),u){const Lt=fl(i,a,E);kt.push(Ct[Lt[0]],Ct[Lt[1]])}if(ut=[...ut,{placement:i,overflows:kt}],!kt.every(Lt=>Lt<=0)){var pe,me;const Lt=(((pe=r.flip)==null?void 0:pe.index)||0)+1,No=et[Lt];if(No&&(!(u==="alignment"?_!==Y(No):!1)||ut.every(j=>Y(j.placement)===_?j.overflows[0]>0:!0)))return{data:{index:Lt,overflows:ut},reset:{placement:No}};let ge=(me=ut.filter(Mt=>Mt.overflows[0]<=0).sort((Mt,j)=>Mt.overflows[1]-j.overflows[1])[0])==null?void 0:me.placement;if(!ge)switch(h){case"bestFit":{var he;const Mt=(he=ut.filter(j=>{if(k){const ht=Y(j.placement);return ht===_||ht==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(ht=>ht>0).reduce((ht,zf)=>ht+zf,0)]).sort((j,ht)=>j[1]-ht[1])[0])==null?void 0:he[0];Mt&&(ge=Mt);break}case"initialPlacement":ge=s;break}if(i!==ge)return{reset:{placement:ge}}}return{}}}},yi=new Set(["left","top"]);async function xl(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),a=st(n),s=Qt(n),l=Y(n)==="y",c=yi.has(a)?-1:1,d=r&&l?-1:1,u=wt(e,t);let{mainAxis:m,crossAxis:h,alignmentAxis:f}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof f=="number"&&(h=s==="end"?f*-1:f),l?{x:h*d,y:m*c}:{x:m*c,y:h*d}}const $l=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:a,middlewareData:s}=e,l=await xl(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:a}}}}},Tl=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:_,y:w}=y;return{x:_,y:w}}},...c}=wt(t,e),d={x:n,y:o},u=await r.detectOverflow(e,c),m=Y(st(i)),h=En(m);let f=d[h],p=d[m];if(a){const y=h==="y"?"top":"left",_=h==="y"?"bottom":"right",w=f+u[y],E=f-u[_];f=pi(w,f,E)}if(s){const y=m==="y"?"top":"left",_=m==="y"?"bottom":"right",w=p+u[y],E=p-u[_];p=pi(w,p,E)}const g=l.fn({...e,[h]:f,[m]:p});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:a,[m]:s}}}}}},Al=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:r,middlewareData:a}=e,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=wt(t,e),d={x:n,y:o},u=Y(i),m=En(u);let h=d[m],f=d[u];const p=wt(s,e),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const w=m==="y"?"height":"width",E=r.reference[m]-r.floating[w]+g.mainAxis,A=r.reference[m]+r.reference[w]-g.mainAxis;h<E?h=E:h>A&&(h=A)}if(c){var y,_;const w=m==="y"?"width":"height",E=yi.has(st(i)),A=r.reference[u]-r.floating[w]+(E&&((y=a.offset)==null?void 0:y[u])||0)+(E?0:g.crossAxis),k=r.reference[u]+r.reference[w]+(E?0:((_=a.offset)==null?void 0:_[u])||0)-(E?g.crossAxis:0);f<A?f=A:f>k&&(f=k)}return{[m]:h,[u]:f}}}},Cl=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:a,elements:s}=e,{apply:l=()=>{},...c}=wt(t,e),d=await a.detectOverflow(e,c),u=st(i),m=Qt(i),h=Y(i)==="y",{width:f,height:p}=r.floating;let g,y;u==="top"||u==="bottom"?(g=u,y=m===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=u,g=m==="end"?"top":"bottom");const _=p-d.top-d.bottom,w=f-d.left-d.right,E=Ht(p-d[g],_),A=Ht(f-d[y],w),k=!e.middlewareData.shift;let et=E,Ct=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(Ct=w),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(et=_),k&&!m){const ut=q(d.left,0),pe=q(d.right,0),me=q(d.top,0),he=q(d.bottom,0);h?Ct=f-2*(ut!==0||pe!==0?ut+pe:q(d.left,d.right)):et=p-2*(me!==0||he!==0?me+he:q(d.top,d.bottom))}await l({...e,availableWidth:Ct,availableHeight:et});const kt=await a.getDimensions(s.floating);return f!==kt.width||p!==kt.height?{reset:{rects:!0}}:{}}}};function Me(){return typeof window<"u"}function Nt(t){return wi(t)?(t.nodeName||"").toLowerCase():"#document"}function B(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Q(t){var e;return(e=(wi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function wi(t){return Me()?t instanceof Node||t instanceof B(t).Node:!1}function W(t){return Me()?t instanceof Element||t instanceof B(t).Element:!1}function lt(t){return Me()?t instanceof HTMLElement||t instanceof B(t).HTMLElement:!1}function _i(t){return!Me()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof B(t).ShadowRoot}function Zt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=V(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function kl(t){return/^(table|td|th)$/.test(Nt(t))}function Re(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Ll=/transform|translate|scale|rotate|perspective|filter/,Ml=/paint|layout|strict|content/,_t=t=>!!t&&t!=="none";let $n;function Tn(t){const e=W(t)?V(t):t;return _t(e.transform)||_t(e.translate)||_t(e.scale)||_t(e.rotate)||_t(e.perspective)||!An()&&(_t(e.backdropFilter)||_t(e.filter))||Ll.test(e.willChange||"")||Ml.test(e.contain||"")}function Rl(t){let e=ft(t);for(;lt(e)&&!qt(e);){if(Tn(e))return e;if(Re(e))return null;e=ft(e)}return null}function An(){return $n==null&&($n=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$n}function qt(t){return/^(html|body|#document)$/.test(Nt(t))}function V(t){return B(t).getComputedStyle(t)}function Ie(t){return W(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ft(t){if(Nt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_i(t)&&t.host||Q(t);return _i(e)?e.host:e}function Si(t){const e=ft(t);return qt(e)?t.ownerDocument?t.ownerDocument.body:t.body:lt(e)&&Zt(e)?e:Si(e)}function Jt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Si(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),a=B(i);if(r){const s=Cn(a);return e.concat(a,a.visualViewport||[],Zt(i)?i:[],s&&n?Jt(s):[])}else return e.concat(i,Jt(i,[],n))}function Cn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ei(t){const e=V(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=lt(t),r=i?t.offsetWidth:n,a=i?t.offsetHeight:o,s=Ae(n)!==r||Ae(o)!==a;return s&&(n=r,o=a),{width:n,height:o,$:s}}function kn(t){return W(t)?t:t.contextElement}function Bt(t){const e=kn(t);if(!lt(e))return K(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Ei(e);let a=(r?Ae(n.width):n.width)/o,s=(r?Ae(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Il=K(0);function xi(t){const e=B(t);return!An()||!e.visualViewport?Il:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ol(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==B(t)?!1:e}function St(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=kn(t);let a=K(1);e&&(o?W(o)&&(a=Bt(o)):a=Bt(t));const s=Ol(r,n,o)?xi(r):K(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,d=i.width/a.x,u=i.height/a.y;if(r){const m=B(r),h=o&&W(o)?B(o):o;let f=m,p=Cn(f);for(;p&&o&&h!==f;){const g=Bt(p),y=p.getBoundingClientRect(),_=V(p),w=y.left+(p.clientLeft+parseFloat(_.paddingLeft))*g.x,E=y.top+(p.clientTop+parseFloat(_.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=w,c+=E,f=B(p),p=Cn(f)}}return Le({width:d,height:u,x:l,y:c})}function Oe(t,e){const n=Ie(t).scrollLeft;return e?e.left+n:St(Q(t)).left+n}function $i(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-Oe(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Dl(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",a=Q(o),s=e?Re(e.floating):!1;if(o===a||s&&r)return n;let l={scrollLeft:0,scrollTop:0},c=K(1);const d=K(0),u=lt(o);if((u||!u&&!r)&&((Nt(o)!=="body"||Zt(a))&&(l=Ie(o)),u)){const h=St(o);c=Bt(o),d.x=h.x+o.clientLeft,d.y=h.y+o.clientTop}const m=a&&!u&&!r?$i(a,l):K(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+m.x,y:n.y*c.y-l.scrollTop*c.y+d.y+m.y}}function Pl(t){return Array.from(t.getClientRects())}function Hl(t){const e=Q(t),n=Ie(t),o=t.ownerDocument.body,i=q(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=q(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Oe(t);const s=-n.scrollTop;return V(o).direction==="rtl"&&(a+=q(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:a,y:s}}const Ti=25;function Nl(t,e){const n=B(t),o=Q(t),i=n.visualViewport;let r=o.clientWidth,a=o.clientHeight,s=0,l=0;if(i){r=i.width,a=i.height;const d=An();(!d||d&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=Oe(o);if(c<=0){const d=o.ownerDocument,u=d.body,m=getComputedStyle(u),h=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,f=Math.abs(o.clientWidth-u.clientWidth-h);f<=Ti&&(r-=f)}else c<=Ti&&(r+=c);return{width:r,height:a,x:s,y:l}}function ql(t,e){const n=St(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=lt(t)?Bt(t):K(1),a=t.clientWidth*r.x,s=t.clientHeight*r.y,l=i*r.x,c=o*r.y;return{width:a,height:s,x:l,y:c}}function Ai(t,e,n){let o;if(e==="viewport")o=Nl(t,n);else if(e==="document")o=Hl(Q(t));else if(W(e))o=ql(e,n);else{const i=xi(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Le(o)}function Ci(t,e){const n=ft(t);return n===e||!W(n)||qt(n)?!1:V(n).position==="fixed"||Ci(n,e)}function Bl(t,e){const n=e.get(t);if(n)return n;let o=Jt(t,[],!1).filter(s=>W(s)&&Nt(s)!=="body"),i=null;const r=V(t).position==="fixed";let a=r?ft(t):t;for(;W(a)&&!qt(a);){const s=V(a),l=Tn(a);!l&&s.position==="fixed"&&(i=null),(r?!l&&!i:!l&&s.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Zt(a)&&!l&&Ci(t,a))?o=o.filter(d=>d!==a):i=s,a=ft(a)}return e.set(t,o),o}function zl(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const a=[...n==="clippingAncestors"?Re(e)?[]:Bl(e,this._c):[].concat(n),o],s=Ai(e,a[0],i);let l=s.top,c=s.right,d=s.bottom,u=s.left;for(let m=1;m<a.length;m++){const h=Ai(e,a[m],i);l=q(h.top,l),c=Ht(h.right,c),d=Ht(h.bottom,d),u=q(h.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function Ul(t){const{width:e,height:n}=Ei(t);return{width:e,height:n}}function Fl(t,e,n){const o=lt(e),i=Q(e),r=n==="fixed",a=St(t,!0,r,e);let s={scrollLeft:0,scrollTop:0};const l=K(0);function c(){l.x=Oe(i)}if(o||!o&&!r)if((Nt(e)!=="body"||Zt(i))&&(s=Ie(e)),o){const h=St(e,!0,r,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&c();r&&!o&&i&&c();const d=i&&!o&&!r?$i(i,s):K(0),u=a.left+s.scrollLeft-l.x-d.x,m=a.top+s.scrollTop-l.y-d.y;return{x:u,y:m,width:a.width,height:a.height}}function Ln(t){return V(t).position==="static"}function ki(t,e){if(!lt(t)||V(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Q(t)===n&&(n=n.ownerDocument.body),n}function Li(t,e){const n=B(t);if(Re(t))return n;if(!lt(t)){let i=ft(t);for(;i&&!qt(i);){if(W(i)&&!Ln(i))return i;i=ft(i)}return n}let o=ki(t,e);for(;o&&kl(o)&&Ln(o);)o=ki(o,e);return o&&qt(o)&&Ln(o)&&!Tn(o)?n:o||Rl(t)||n}const Wl=async function(t){const e=this.getOffsetParent||Li,n=this.getDimensions,o=await n(t.floating);return{reference:Fl(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Vl(t){return V(t).direction==="rtl"}const Gl={convertOffsetParentRelativeRectToViewportRelativeRect:Dl,getDocumentElement:Q,getClippingRect:zl,getOffsetParent:Li,getElementRects:Wl,getClientRects:Pl,getDimensions:Ul,getScale:Bt,isElement:W,isRTL:Vl};function Mi(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function jl(t,e){let n=null,o;const i=Q(t);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),r();const c=t.getBoundingClientRect(),{left:d,top:u,width:m,height:h}=c;if(s||e(),!m||!h)return;const f=Ce(u),p=Ce(i.clientWidth-(d+m)),g=Ce(i.clientHeight-(u+h)),y=Ce(d),w={rootMargin:-f+"px "+-p+"px "+-g+"px "+-y+"px",threshold:q(0,Ht(1,l))||1};let E=!0;function A(k){const et=k[0].intersectionRatio;if(et!==l){if(!E)return a();et?a(!1,et):o=setTimeout(()=>{a(!1,1e-7)},1e3)}et===1&&!Mi(c,t.getBoundingClientRect())&&a(),E=!1}try{n=new IntersectionObserver(A,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,w)}n.observe(t)}return a(!0),r}function Xl(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,c=kn(t),d=i||r?[...c?Jt(c):[],...e?Jt(e):[]]:[];d.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const u=c&&s?jl(c,n):null;let m=-1,h=null;a&&(h=new ResizeObserver(y=>{let[_]=y;_&&_.target===c&&h&&e&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(e)})),n()}),c&&!l&&h.observe(c),e&&h.observe(e));let f,p=l?St(t):null;l&&g();function g(){const y=St(t);p&&!Mi(p,y)&&n(),p=y,f=requestAnimationFrame(g)}return n(),()=>{var y;d.forEach(_=>{i&&_.removeEventListener("scroll",n),r&&_.removeEventListener("resize",n)}),u?.(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Kl=$l,Yl=Tl,Ql=El,Zl=Cl,Jl=Al,tc=(t,e,n)=>{const o=new Map,i={platform:Gl,...n},r={...i.platform,_c:o};return Sl(t,e,{...i,platform:r})};F()&&!al()&&dl();const Ri="data-placement",Ii="data-autoplacement",te=new Map;function ec(t){let{newState:e,oldState:n,target:o,source:i=t.detail}=t,r=o instanceof HTMLElement&&v(o,"popover")!==null&&we(o,"--_ds-floating");if(!r)return;if(e==="closed")return te.get(o)?.();if(!i){let f=o.getRootNode(),p=`[popovertarget="${o.id}"],[commandfor="${o.id}"]`;i=o.id&&f?.querySelector?.(p)||void 0}if(!i||i===o||n&&n===e)return;o.style.scrollMarginBottom="var(--_ds-floating-arrow-size)";let a=we(o,"--_ds-floating-overscroll"),s=v(o,Ri)||v(i,Ri)||r,l=v(o,Ii)||v(i,Ii),c=parseFloat(we(o,"scroll-margin-bottom"))||0,d=s.match(/left|right/gi)?"Height":"Width",u=i[`offset${d}`]/2+c;if(s==="none")return;let m={strategy:"absolute",placement:s,middleware:[Kl(c),Yl({padding:10,limiter:Jl({offset:{mainAxis:u}})}),oc(),...l==="false"?[]:[Ql({padding:10,crossAxis:!1})],...a?[Zl({apply({availableHeight:f}){a==="fit"&&(o.style.width=`${i.offsetWidth}px`),o.style.maxHeight=`${Math.max(50,f-20)}px`}})]:[]]},h=Xl(i,o,async()=>{if(!i?.isConnected)return te.get(o)?.();let{x:f,y:p}=await tc(i,o,m);o.style.translate=`${f}px ${p}px`});te.set(o,()=>te.delete(o)&&h())}let De;const nc=({type:t})=>{if(t==="mousedown"&&(De=!1),t==="scroll"&&De===!1&&(De=!0),t==="mouseup"&&De)for(let[e]of te)e.showPopover()};nt("popover",()=>[I(document,"mousedown scroll mouseup",nc,!0),I(document,"toggle ds-toggle-source",ec,z)]);const oc=()=>({name:"arrowPseudo",fn(t){let e=t.elements.floating,n=t.rects.reference,o=`${Math.round(n.width/2+n.x-t.x)}px`,i=`${Math.round(n.height/2+n.y-t.y)}px`;return e.style.setProperty("--_ds-floating-arrow-x",o),e.style.setProperty("--_ds-floating-arrow-y",i),v(e,"data-floating",t.placement),t}}),Mn=t=>(t instanceof HTMLSelectElement||t instanceof HTMLInputElement)&&(t.hasAttribute("readonly")||v(t,"aria-readonly")==="true"),ic=t=>{if(t.key!=="Tab"&&Mn(t.target)){let e=t.key?.startsWith("Arrow"),n=t.altKey||t.ctrlKey||t.metaKey;if((e||!n)&&t.preventDefault(),e&&v(t.target,"type")==="radio"){let o=document.querySelectorAll(`input[name="${t.target.name}"]`),i=t.key?.match(/Arrow(Right|Down)/)?1:-1;o[(o.length+[...o].indexOf(t.target)+i)%o.length]?.focus()}}},rc=t=>{let e=t.target?.closest?.("label")?.control||t.target;Mn(e)&&(t.preventDefault(),e.focus())},ac=t=>{t.target instanceof HTMLSelectElement&&Mn(t.target)&&t.preventDefault()};nt("readonly",()=>[I(document,"keydown",ic),I(document,"click",rc),I(document,"mousedown",ac)]);const Oi="aria-label",Pe="data-toggle-group",Di=`[${Pe}]`,sc=()=>{for(let t of document.querySelectorAll(Di))v(t,"aria-label",Rt(t,Pe))},lc=t=>{let{key:e,target:n}=t,o=n instanceof HTMLInputElement&&n.closest(Di);if(o&&(!v(o,Oi)&&!v(o,"aria-labelledby")&&v(o,Oi,Rt(o,Pe)),e==="Enter"&&n.click(),e?.startsWith("Arrow"))){t.preventDefault?.();let i=[...o.getElementsByTagName("input")],r=i.indexOf(n),a=e.match(/Arrow(Right|Down)/)?1:-1,s=r;for(let l=0;l<i.length;l++)if(s=(i.length+s+a)%i.length,!i[s]?.disabled){i[s]?.focus();break}}};nt("toggle-group",()=>[I(document,"keydown",lc),ot(document,sc,{attributeFilter:[Pe],attributes:!0,childList:!0,subtree:!0})]);let C,zt,He=!1,Rn=0,In=0;const cc=F()&&/iPad|iPhone|iPod/.test(navigator.userAgent),ee="data-tooltip",On="data-color",Pi="aria-label",Hi="aria-description",dc=`[${On}]`,Dn=`[${ee}]`,Pn="data-color-scheme",uc=`[${Pn}]`,Ni=t=>{t&&!(t instanceof HTMLElement)&>("setTooltipElement expects an HTMLElement, got: ",t),clearTimeout(In),clearTimeout(Rn),zt=void 0,He=!1,C=t||void 0},fc=()=>{for(let t of document.querySelectorAll(Dn)){let e=Rt(t,ee);if(!e)return;if(e!==(t.getAttribute(Pi)||t.getAttribute(Hi))){let i=v(t,"role")!=="img"&&t.textContent?.trim();v(t,ee,e),v(t,Pi,i?null:e),v(t,Hi,i?e:null),t.matches("a,button,input,label,select,textarea,[tabindex]")||gt('Missing tabindex="0" attribute on: ',t)}let n=t===zt&&C?.offsetHeight&&C?.offsetWidth,o=n&&e&&C?.textContent!==e;n&&o&&(C&&(C.textContent=e),document.activeElement===t&&mn(e))}},qi=t=>{let{type:e,target:n}=t;if(clearTimeout(Rn),n===C)return;let o=n?.closest?.(Dn);if(e==="blur"){let s=t.relatedTarget;o===zt&&!s?.closest?.(Dn)&&Hn();return}if(e==="mouseover"&&!He&&!cc){Rn=setTimeout(qi,300,{target:n});return}if(o===zt)return;if(!o)return Hn();C||=jo("div",{class:"ds-tooltip"}),C.isConnected||document.body.appendChild(C);let i=o.closest(dc),r=o.closest(uc),a=i!==r&&i?.contains(r);clearTimeout(In),v(C,"popover","manual"),v(C,Pn,r?.getAttribute(Pn)||null),v(C,On,a&&i?.getAttribute(On)||null),C.textContent=v(o,ee),C.showPopover(),C.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:o})),He=!0,zt=o},Hn=()=>C?.isConnected&&C.popover&&C.hidePopover(),Bi=t=>{if(t?.type==="keydown")return t?.key==="Escape"&&Hn();t?t.target===C&&t.newState==="closed"&&(zt=void 0,In=setTimeout(Bi,300)):He=!1};nt("tooltip",()=>[I(document,"blur focus mouseover",qi,z),I(document,"toggle keydown",Bi,z),ot(document,fc,{attributeFilter:[ee],attributes:!0,childList:!0,subtree:!0})]);const Nn="aria-label";var zi=class extends ye{_items;_label=null;_unresize;_unmutate;static get observedAttributes(){return[Nn]}connectedCallback(){let e=Go(()=>qn(this),100);this._label=Rt(this,Nn),this._items=this.getElementsByTagName("a"),this._unresize=I(window,"resize",e),this._unmutate=ot(this,qn,{childList:!0,subtree:!0})}attributeChangedCallback(e,n,o){!this._unmutate||!o||(this._label=o,qn(this))}disconnectedCallback(){this._unresize?.(),this._unmutate?.(),this._unresize=this._unmutate=this._items=void 0}};const qn=t=>{let e=t._items?.[t._items.length-1],n=e?.parentElement===t?null:e,o=!n?.offsetHeight;v(t,"role",o?null:"navigation"),v(t,Nn,o?null:t._label);for(let i of t._items||[])v(i,"aria-current",i===n?"page":null)};it.define("ds-breadcrumbs",zi);var Ui=class extends ye{_unmutate;connectedCallback(){I(this,"animationend",this,z),v(this,"role","group"),v(this,"tabindex","-1"),this._unmutate=ot(this,pc,{childList:!0,subtree:!0}),this.focus()}handleEvent({target:e}){e===this&&this.focus()}disconnectedCallback(){pn(this,"animationend",this,z),this._unmutate?.(),this._unmutate=void 0}};const pc=t=>{let e=v(t,"aria-label")?.trim(),n=v(t,"aria-labelledby")?.trim(),o=t.querySelector("h2,h3,h4,h5,h6");o&&!e&&!n&&v(t,"aria-labelledby",rt(o)),!o&&!e&&!n&>("Missing accessible name on:",t,`
|
|
68
|
+
Add a heading (h2–h6), or set aria-label or aria-labelledby to provide an accessible name for screen readers.`)};it.define("ds-error-summary",Ui);const Bn="aria-invalid",Fi="aria-describedby",Wi="data-indeterminate",mc=Is()?800:200,Vi=new WeakMap,ne=new Map,zn=new WeakSet,hc=(t,e=[])=>{for(let{target:n}of e){let o=n instanceof HTMLFieldSetElement;for(let[i]of ne)(o?n.contains(i):i.contains(n))&&Gi(i)}},Gi=t=>{let e=[],n=[],o=ne.get(t)||[],i,r,a=!1,s=!1;for(let m of t.getElementsByTagName("*"))if(m instanceof HTMLLabelElement&&e.push(m),!m.hidden)if(vc(m))i?gt("Fields should only have one input element. Use <fieldset> to group multiple fields:",t):i=m;else{let h=m.getAttribute("data-field");h==="counter"&&(r=m),h==="validation"?(n.unshift(rt(m)),a=!0,s||=Xi(m)):h&&n.push(rt(m))}if(!i)return;r&&Vi.set(i,r);for(let m of e)v(m,"for",rt(i));let l=t.closest("fieldset")?.querySelector(':scope > [data-field="validation"]');l&&!l?.hidden&&(a=!0,s||=Xi(l),n.unshift(rt(l)));let c=v(i,Wi);c&&(i.indeterminate=c==="true"),(i.type==="radio"||i.type==="checkbox")&&v(t,"data-clickdelegatefor",rt(i));let d=v(i,Fi)?.trim().split(/\s+/)?.filter(m=>!o.includes(m))||[];v(i,Fi,[...n,...d].join(" ")||null),ne.set(t,n);let u=zn.has(i);a&&!u&&!i.hasAttribute(Bn)?(v(i,Bn,"true"),zn.add(i)):!a&&u&&(v(i,Bn,null),zn.delete(i)),ji(i)},gc={over:"%d tegn for mye",under:"%d tegn igjen"},ji=t=>{let e=t.target||t,n=Vi.get(e);if(n?.isConnected){let o=(Number(v(n,"data-limit"))||0)-e.value.length,i=o<0?"over":"under",r=(Rt(n,`data-${i}`)||gc[i])?.replace("%d",`${Math.abs(o)}`);v(n,"data-label",r),v(n,"data-state",i),v(n,"data-color",o<0?"danger":null),t.type==="input"&&r&&bc(e,r)}e instanceof HTMLTextAreaElement&&(e.style.setProperty("--_ds-field-sizing","auto"),e.style.setProperty("--_ds-field-sizing",`${e.scrollHeight}px`))},bc=Go((t,e)=>{document.activeElement===t&&mn(e)},mc),Xi=t=>t.getAttribute("data-color")!=="success",vc=t=>t instanceof HTMLElement&&"validity"in t&&!(t instanceof HTMLButtonElement)&&t.type!=="hidden";var Ne=class extends ye{connectedCallback(){ne.set(this,[]),Gi(this)}disconnectedCallback(){ne.delete(this)}};it.define("ds-field",Ne),nt("field",()=>[I(document,"input",ji,z),ot(document,hc,{attributeFilter:["data-field","data-limit","hidden","id","value",Wi],attributes:!0,childList:!0,subtree:!0})]);const Un="aria-label",qe="data-current",Be="data-total",Ki="data-href",Yi=({current:t=1,total:e=10,show:n=7})=>({prev:t>1?t-1:0,next:t<e?t+1:0,pages:yc(t,e,n).map((o,i)=>({current:o===t&&"page",key:`key-${o}-${i}`,page:o}))});var Qi=class extends ye{_unmutate;_render;static get observedAttributes(){return[Un,qe,Be,Ki]}connectedCallback(){let t=v(this,Be),e=v(this,qe);e&&!t&>(`Missing ${Be} attribute on:`,this),t&&!e&>(`Missing ${qe} attribute on:`,this),v(this,Un,Rt(this,Un)),v(this,"role","navigation"),this._unmutate=ot(this,Zi,{childList:!0,subtree:!0})}attributeChangedCallback(){this._unmutate&&Zi(this)}disconnectedCallback(){this._unmutate?.(),this._unmutate=this._render=void 0}};const Zi=t=>{let e=Number(v(t,qe)),n=Number(v(t,Be));if(e&&n){let o=t.querySelectorAll("button,a"),i=o.length-2,r=v(t,Ki),{next:a,prev:s,pages:l}=Yi({current:e,total:n,show:i});o.forEach((c,d)=>{let u=d?o[d+1]?l[d-1]?.page:a:s;v(c,"aria-current",l[d-1]?.current?"true":null),v(c,"aria-label",`${u??"hidden"}`),v(c,"role",u?null:"none"),v(c,"tabindex",u?null:"-1"),c instanceof HTMLButtonElement&&v(c,"value",`${u}`),r&&c instanceof HTMLAnchorElement&&v(c,"href",r.replace("%d",`${u}`))})}},yc=(t,e,n=1/0)=>{let o=(n-1)/2,i=Math.max(Math.min(t-Math.floor(o),e-n+1),1),r=Math.min(Math.max(t+Math.ceil(o),n),e),a=Array.from({length:r+1-i},(s,l)=>l+i);return n>4&&i>1&&a.splice(0,2,1,0),n>3&&r<e&&a.splice(-2,2,0,e),a};it.define("ds-pagination",Qi);var wc=Object.defineProperty,Ji=Object.getOwnPropertySymbols,_c=Object.prototype.hasOwnProperty,Sc=Object.prototype.propertyIsEnumerable,tr=(t,e,n)=>e in t?wc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ec=(t,e)=>{for(var n in e||(e={}))_c.call(e,n)&&tr(t,n,e[n]);if(Ji)for(var n of Ji(e))Sc.call(e,n)&&tr(t,n,e[n]);return t},Fn=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",ze=Fn(),Wn=ze?navigator.userAgent:"",Vn=/android/i.test(Wn),xc=/firefox/i.test(Wn),Gn=/iPad|iPhone|iPod/.test(Wn),er,$c=ze&&/^Mac/i.test(((er=navigator.userAgentData)==null?void 0:er.platform)||navigator.platform),Tc=ze&&window.CSSStyleSheet&&document.adoptedStyleSheets,nr={once:!0,capture:!0,passive:!0},Ac=":host(:not([hidden])) { display: block }",Cc="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",kc=`${Vn?"data":"aria"}-multiselectable`,Lc=typeof HTMLElement>"u"?class{}:HTMLElement,S=(t,e,n)=>n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),jn=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>or(t,...e)},or=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},Mc=(t,e)=>{const n=t.shadowRoot||t.attachShadow({mode:"open"});if(n.querySelector("slot")||n.append(oe("slot")),!n.querySelector("style"))if(!Tc)n.append(oe("style",null,e));else{const o=new CSSStyleSheet;o.replaceSync(e),n.adoptedStyleSheets=[o]}return n},Rc=(t,e,n)=>{const o=new MutationObserver(r=>{if(!Fn()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>o.disconnect(),{takeRecords:()=>o.takeRecords()});return e(t),o.observe(t,n),i},Ic=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Xn=t=>Ic(t).activeElement,Oc=t=>{var e;const n=S(t,"aria-label")||"";return[...(((e=S(t,"aria-labelledby"))==null?void 0:e.split(" "))||[]).map(i=>document.getElementById(i.trim()||"-")),...Array.from(t.labels||[])].reduce((i,r)=>{var a;return i||((a=r?.innerText)==null?void 0:a.trim())||""},n).trim()},Dc=t=>{if(!t||!ze)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},oe=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))S(o,i,r);return o},Pc={define:(t,e)=>!Fn()||window.customElements.get(t)||window.customElements.define(t,e)},ir=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},Kn=new WeakSet,rr=(t,e)=>(e?.type==="pointerdown"&&(Kn.add(t),jn(document,"pointerup",()=>Kn.delete(t),nr)),Kn.has(t)),Hc=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Nc=t=>{const e=S(t,"form");S(t,"form","#"),setTimeout(qc,0,t,e)},qc=(t,e)=>S(t,"form",e),Et=t=>{var e;return((e=t?.textContent)==null?void 0:e.trim())||""},Z,Bc=0,ar=0,Ue=t=>{clearTimeout(ar),Z||(Z=oe("div",{"aria-live":"assertive"}),Z.style.overflow="hidden",Z.style.position="fixed",Z.style.whiteSpace="nowrap",Z.style.width="1px"),Z.isConnected||document.body.append(Z),t===""&&(Z.textContent=""),t&&(Z.textContent=`${t}${Bc++%2?" ":""}`,ar=setTimeout(Ue,!$c&&xc?2e3:300,""))},Yn=`${Ac}
|
|
7
69
|
:is(:host(:not([data-multiple])), :host([data-multiple="false"])) [part="items"] { display: none }
|
|
8
|
-
[role="listbox"] { display: contents
|
|
9
|
-
::slotted(button[type="reset"])
|
|
70
|
+
[role="listbox"] { display: inline-flex } /* Can not be "contents" as this confuses VoiceOver */
|
|
71
|
+
::slotted(button[type="reset"]),
|
|
72
|
+
::slotted(button[aria-expanded]),
|
|
73
|
+
::slotted(del) { font: inherit; border: 0; padding: 0; background: none; color: inherit; cursor: pointer; text-decoration: none }
|
|
10
74
|
::slotted(data) { cursor: pointer; pointer-events: none }
|
|
11
75
|
::slotted(data)::after { padding-inline: .5ch; pointer-events: auto }
|
|
12
|
-
::slotted(data)::after
|
|
13
|
-
::slotted(data:focus),::slotted(del:focus),::slotted(button[type="reset"]:focus) { ${Rl} }`,Wl=Bl(Sn),dt="aria-label",Vl='button[type="reset"],del',Gl='datalist,[role="listbox"]',jl='option,[role="option"]',_i="blur focus click input keydown pointerdown",$e="false",Ce={added:"Added",clear:"Clear input",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed"},xn=class extends Ol{constructor(){super(),this._focusMoved=!1,this._itemSingleVale="",this._speak="",this._texts=Cl({},Ce),this._value="";const t=Ml(this,Sn);this._listbox=t.querySelector('[role="listbox"]')||jt("div"),this._listbox.innerHTML='<slot name="items"></slot>',x(this._listbox,"aria-orientation","horizontal"),x(this._listbox,"role","listbox"),x(this._listbox,"part","items"),x(this._listbox,"tabindex","-1"),t.prepend(this._listbox)}static get observedAttributes(){return Object.keys(Ce).map(t=>`data-sr-${t}`)}connectedCallback(){yn(this,_i,this,!0),this._umutate=Dl(this,ec,{attributeFilter:["id","value","role"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),Ae(this),En(this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];Ce[o]&&(this._texts[o]=n||Ce[o]),o==="clear"&&this.clear&&x(this.clear,dt,this._texts.clear)}disconnectedCallback(){var t;bi(this,_i,this,!0),(t=this._umutate)==null||t.call(this),this._umutate=this._list=this._options=this._match=void 0,this._items=this._clear=this._control=this._select=void 0}handleEvent(t){var e,n;(e=this.control)!=null&&e.disabled||(n=this.control)!=null&&n.readOnly||(t.type==="blur"&&Xl(this),t.type==="click"&&Yl(this,t),t.type==="focus"&&Ee(),t.type==="input"&&Ql(this,t),t.type==="keydown"&&Zl(this,t),t.type==="pointerdown"&&yi(this,t))}get multiple(){var t;return((t=x(this,"data-multiple"))!=null?t:$e)!==$e}set multiple(t){x(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=x(this,"data-creatable"))!=null?t:$e)!==$e}set creatable(t){x(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector(Gl),this._options=void 0),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector(Vl)),this._clear}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e,n;const o=!this._options&&((e=(t=this.list)==null?void 0:t.querySelector(jl))==null?void 0:e.nodeName);return o&&(this._options=(n=this.list)==null?void 0:n.getElementsByTagName(o)),this._options||this.getElementsByTagName("-")}get values(){return Array.from(this.items,({value:t})=>t)}},Si=t=>{var e;const{creatable:n,control:o,options:i,multiple:r}=t,s=((e=o?.value)==null?void 0:e.trim())||"",a=s.toLowerCase()||null;let l=[...i].find(u=>u.label.trim().toLowerCase()===a);const c={bubbles:!0,cancelable:!0,detail:l};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",c))||(l=[...i].find(u=>u.selected)),r)Ei(t);else for(const u of i)u.selected=u===l;return!l&&n&&s?{value:s,label:s}:l&&{value:l.value,label:l.label}},Mt=(t,e,n=!0)=>{const{_texts:o,control:i,items:r,multiple:s}=t;if(!e)return s?Ee(o.invalid):!i?.value&&r[0]?Mt(t,r[0]):Ae(t);const a=[...r].findIndex(m=>m.value===e.value),l=r[a],c=l===wn(t)&&(s&&(r[a-1]||r[a+1])||i);if(l&&!n)return Ae(t);c&&c.focus(),t._focusMoved=!!c;const u=jt("data",{value:e.value},e.label||e.value),d={bubbles:!0,cancelable:!0,detail:l||u};if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",d))){if(!s)for(const m of[...r])m.remove();l?l.remove():i?.insertAdjacentElement("beforebegin",u),t.dispatchEvent(new CustomEvent("comboboxafterselect",d))}},Xl=t=>yi(t)||setTimeout(Kl,0,t),Kl=t=>t.multiple||t.contains(wn(t))||Mt(t,t._match,!1),Yl=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:r,control:s,items:a}=t;if(s&&r?.contains(i))return e.preventDefault(),vi(s,"","deleteContentBackward"),s.focus();for(const l of a){if(l.contains(i))return Mt(t,l);const c=l.getBoundingClientRect(),{top:u,right:d,bottom:m,left:h,width:f,height:p}=c;if(f&&p&&o>=u&&o<=m&&n>=h&&n<=d)return l.focus()}i===t&&s?.focus()},Ql=(t,e)=>{var n;const{control:o,options:i,multiple:r}=t,s=o?.value||null,a=e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!o?.value;if(a||(t._value=o?.value||""),a){(n=e.stopImmediatePropagation)==null||n.call(e);const l=[...i].find(c=>c.value===s);if(o&&(o.value=t._value),l)return Mt(t,l,r)}else r||(t._match=Si(t));En(t)},Zl=(t,e)=>{e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt"||(t.control===e.target?Jl(t,e):tc(t,e))},Jl=(t,e)=>{var n;const{_match:o,clear:i,control:r,items:s,multiple:a}=t;(e.key==="ArrowLeft"||e.key==="Backspace")&&!r?.selectionEnd&&((n=s[s.length-1])==null||n.focus()),e.key==="Enter"&&r&&(Ul(r),Mt(t,a?Si(t):o,a)),e.key==="Tab"&&!e.shiftKey&&i&&!i.hidden&&(e.preventDefault(),x(i,"aria-hidden","false"),x(i,"tabindex","0"),i.focus(),yn(i,"blur",()=>En(t),gi))},tc=(t,e)=>{var n,o,i;const{clear:r,control:s,items:a}=t,{key:l,repeat:c,target:u}=e,d=[...a].indexOf(u);if((l===" "||l==="Enter")&&(a[d]||u===r))return(n=a[d]||r)==null||n.click(),e.preventDefault();if(a[d]){if(l==="ArrowLeft")return(o=a[d-1])==null?void 0:o.focus();if(l==="ArrowRight")return(i=a[d+1]||s)==null?void 0:i.focus();if(l==="Backspace")return e.preventDefault(),c||Mt(t,a[d]);s?.focus()}},ec=(t,e)=>{var n;if(!t.control)return;const{_texts:o,control:i,items:r,list:s,multiple:a}=t,l=[];for(const{addedNodes:m,removedNodes:h}of e||[]){for(const f of m)f instanceof HTMLDataElement&&l.unshift(f);for(const f of h)f instanceof HTMLDataElement&&l.push(f)}const c=wn(t);if((a?l.length===1:l[0]===c)&&t.contains(c)){const m=i?x(i,dt):null;t._speak=`${o[l[0].isConnected?"added":"removed"]} ${Ot(l[0])}, `,x(i,dt,`${t._speak}${Nl(i)}`),t._focusMoved||setTimeout(()=>Ee(t._speak.slice(0,-2))),setTimeout(nc,300,t,m)}if(!a){const m=Ot(r[0]);m!==t._itemSingleVale&&Ae(t),t._itemSingleVale=m}xi(t),Ei(t),oc(t);const d=`${r.length?o.found.replace("%d",`${r.length}`):o.empty}`;x(i,"aria-description",a?d:null),x(i,"list",Hl(s)),x(t._listbox,dt,o.items),(n=t._umutate)==null||n.takeRecords()},nc=(t,e)=>{t._speak="",t.control&&x(t.control,dt,e),xi(t)},xi=t=>{const{_texts:e,_speak:n,items:o}=t;let i=0;for(const r of o){const s=`${n}${Ot(r)}, ${e.remove}${pi?`, ${++i} ${e.of} ${o.length}`:""}`;x(r,dt,s),x(r,"role","option"),x(r,"slot","items"),x(r,"tabindex","-1"),x(r,"value",r.value||Ot(r))}},oc=t=>{var e,n;if((e=t._select)!=null&&e.isConnected||(t._select=t.querySelector("select")),!t._select)return;const{_select:o,items:i,multiple:r}=t,s=[];let a=0;x(o,"multiple",r?"":null);for(const l of i){const c=o?.options[a++],u=Ot(l),d=l?.value;c?Object.assign(c,{defaultSelected:!0,selected:!0,text:u,value:d}):s.push(new Option(u,d,!0,!0))}if(s.length)o.append(...s);else for(const l of[...o.options].slice(a))l.remove();(n=t._umutate)==null||n.takeRecords()},En=t=>{if(!t.clear)return;const{clear:e,control:n}=t,o=!n?.value||n?.disabled||n?.readOnly;e.nodeName==="DEL"&&x(e,"role","button"),x(e,dt)||x(e,dt,t._texts.clear),x(e,"aria-hidden",`${pi||mi}`),x(e,"hidden",o?"":null),x(e,"tabindex","-1")},Ei=t=>{if(!t.list)return;const{_texts:e,list:n,multiple:o,options:i,values:r}=t;x(n,"data-sr-of",e.of),x(n,Il,`${o}`);for(const s of i)s.selected=r.includes(s.value)},Ae=t=>{if(!t.control||t.multiple)return;const{control:e,items:n}=t,o=Ot(n[0]),i=o?"insertText":"deleteContentBackward";o!==e.value&&vi(e,o,i)};ql.define("u-combobox",xn);var $i=class extends xn{_unmutate;connectedCallback(){super.connectedCallback(),this._unmutate=et(this,ic,{childList:!0}),O(this,"toggle",Ci,U)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=void 0,Ke(this,"toggle",Ci,U)}};const ic=({control:t,list:e})=>{t&&!t.placeholder&&v(t,"placeholder"," "),t&&v(t,"popovertarget",ot(e)||null),e&&v(e,"popover","manual"),e&&v(e,"data-is-floating","true")},Ci=t=>{let e=t.currentTarget,n=t.newState==="open"&&e.control;n&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n}))};nt.define("ds-suggestion",$i);var $n=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Te=$n(),rc=Te?navigator.userAgent:"",sc=/android/i.test(rc),Ai;Te&&/^Mac/i.test(((Ai=navigator.userAgentData)==null?void 0:Ai.platform)||navigator.platform);var ac=Te&&window.CSSStyleSheet&&document.adoptedStyleSheets,Cn=":host(:not([hidden])) { display: block }",lc=`${sc?"data":"aria"}-labelledby`,ke=typeof HTMLElement>"u"?class{}:HTMLElement,L=(t,e,n)=>n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),cc=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Ti(t,...e)},Ti=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},An=(t,e)=>{const n=t.shadowRoot||t.attachShadow({mode:"open"});if(n.querySelector("slot")||n.append(Li("slot")),!n.querySelector("style"))if(!ac)n.append(Li("style",null,e));else{const o=new CSSStyleSheet;o.replaceSync(e),n.adoptedStyleSheets=[o]}return n},dc=(t,e,n)=>{const o=new MutationObserver(r=>{if(!$n()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>o.disconnect(),{takeRecords:()=>o.takeRecords()});return e(t),o.observe(t,n),i},ki=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Tn=t=>{if(!t||!Te)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},Li=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))L(o,i,r);return o},Le={define:(t,e)=>!$n()||window.customElements.get(t)||window.customElements.define(t,e)},Dt="aria-controls",Ri="aria-disabled",Xt="aria-selected",Kt="tabindex",uc=Cn,fc=Cn,mc=`${Cn}
|
|
76
|
+
::slotted(data)::after,
|
|
77
|
+
::slotted(del:empty)::before,
|
|
78
|
+
::slotted(button[type="reset"]:empty)::before { content: '\\00D7'; content: '\\00D7' / '' }
|
|
79
|
+
::slotted(button[aria-expanded="false"]:empty)::before { content: '\\25BC'; content: '\\25BC' / '' }
|
|
80
|
+
::slotted(button[aria-expanded="true"]:empty)::before { content: '\\25B2'; content: '\\25B2' / '' }
|
|
81
|
+
::slotted(data:focus),::slotted(del:focus),::slotted(button[type="reset"]:focus) { ${Cc} }`,zc=Hc(Yn),Qn=!1,J="aria-label",Uc='button[type="reset"],del',Fc="button[aria-expanded]",Wc='datalist,u-datalist,[role="listbox"]',Vc='option,u-option,[role="option"]',sr="blur focus click input keydown pointerdown",Fe="false",We={added:"Added",clear:"Clear input",empty:"No selected",found:"Navigate left to find %d selected",invalid:"Invalid value",items:"Selected",of:"of",remove:"Press to remove",removed:"Removed",toggle:"Options"},Zn=class extends Lc{constructor(){super(),this._focusMoved=!1,this._itemSingleVale="",this._speak="",this._texts=Ec({},We),this._value="";const t=Mc(this,Yn);this._listbox=t.querySelector('[role="listbox"]')||oe("div"),this._listbox.innerHTML='<slot name="items"></slot>',S(this._listbox,"aria-orientation","horizontal"),S(this._listbox,"role","listbox"),S(this._listbox,"part","items"),S(this._listbox,"tabindex","-1"),t.prepend(this._listbox)}static get observedAttributes(){return Object.keys(We).map(t=>`data-sr-${t}`)}connectedCallback(){jn(this,sr,this,!0),this._umutate=Rc(this,Jc,{attributeFilter:["id","value","role","aria-expanded"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),Ve(this),Jn(this)}attributeChangedCallback(t,e,n){const o=t.split("data-sr-")[1];We[o]&&(this._texts[o]=n||We[o]),o==="clear"&&this.clear&&S(this.clear,J,this._texts.clear)}disconnectedCallback(){var t;or(this,sr,this,!0),(t=this._umutate)==null||t.call(this),this._umutate=this._clear=this._toggle=void 0,this._control=this._match=this._select=void 0,this._options=this._items=this._list=void 0}handleEvent(t){var e,n,o;(e=this.control)!=null&&e.disabled||(n=this.control)!=null&&n.readOnly||(t.type==="blur"&&Gc(this),t.type==="click"&&Xc(this,t),t.type==="focus"&&Ue(),t.type==="input"&&Kc(this,t),t.type==="keydown"&&Yc(this,t),t.type==="pointerdown"&&(Qn=!!((o=this.list)!=null&&o.hidden),rr(this,t)))}get multiple(){var t;return((t=S(this,"data-multiple"))!=null?t:Fe)!==Fe}set multiple(t){S(this,"data-multiple",t?"":null)}get creatable(){var t;return((t=S(this,"data-creatable"))!=null?t:Fe)!==Fe}set creatable(t){S(this,"data-creatable",t?"":null)}get control(){var t;return(t=this._control)!=null&&t.isConnected||(this._control=this.querySelector("input")),this._control}get list(){var t;return(t=this._list)!=null&&t.isConnected||(this._list=this.querySelector(Wc),this._options=void 0),this._list}get clear(){var t;return(t=this._clear)!=null&&t.isConnected||(this._clear=this.querySelector(Uc)),this._clear}get toggle(){var t;return(t=this._toggle)!=null&&t.isConnected||(this._toggle=this.querySelector(Fc)),this._toggle}get items(){return this._items||(this._items=this.getElementsByTagName("data")),this._items}get options(){var t,e,n;const o=!this._options&&((e=(t=this.list)==null?void 0:t.querySelector(Vc))==null?void 0:e.nodeName);return o&&(this._options=(n=this.list)==null?void 0:n.getElementsByTagName(o)),this._options||this.getElementsByTagName("-")}get values(){return Array.from(this.items,({value:t})=>t)}},lr=t=>{var e;const{creatable:n,control:o,options:i,multiple:r}=t,a=((e=o?.value)==null?void 0:e.trim())||"",s=a.toLowerCase()||null;let l=[...i].find(d=>ur(d).trim().toLowerCase()===s);const c={bubbles:!0,cancelable:!0,detail:l};if(t.dispatchEvent(new CustomEvent("comboboxbeforematch",c))||(l=[...i].find(nd)),r)dr(t);else for(const d of i)fr(d,d===l);return!l&&n&&a?{value:a,label:a}:l&&{value:ie(l),label:ur(l)}},Ut=(t,e,n=!0)=>{const{_texts:o,control:i,items:r,multiple:a}=t;if(!e)return a?Ue(o.invalid):!i?.value&&r[0]?Ut(t,r[0]):Ve(t);const s=[...r].findIndex(m=>m.value===e.value),l=r[s],c=l===Xn(t)&&(a&&(r[s-1]||r[s+1])||i);if(l&&!n)return Ve(t);c&&c.focus(),t._focusMoved=!!c;const d=oe("data",{value:e.value},e.label||e.value),u={bubbles:!0,cancelable:!0,detail:l||d};if(t.dispatchEvent(new CustomEvent("comboboxbeforeselect",u))){if(!a)for(const m of[...r])m.remove();l?l.remove():i?.insertAdjacentElement("beforebegin",d),t.dispatchEvent(new CustomEvent("comboboxafterselect",u))}},Gc=t=>rr(t)||setTimeout(jc,0,t),jc=t=>t.multiple||t.contains(Xn(t))||Ut(t,t._match,!1),Xc=(t,e)=>{const{clientX:n,clientY:o,target:i}=e,{clear:r,control:a,items:s,toggle:l}=t;if(l?.contains(i)&&(a?.focus(),Qn&&a?.click()),a&&r?.contains(i))return e.preventDefault(),ir(a,"","deleteContentBackward"),a.focus(),Qn||a.click();for(const c of s){if(c.contains(i))return Ut(t,c);const d=c.getBoundingClientRect(),{top:u,right:m,bottom:h,left:f,width:p,height:g}=d;if(p&&g&&o>=u&&o<=h&&n>=f&&n<=m)return c.focus()}i===t&&a?.focus()},Kc=(t,e)=>{var n;const{control:o,options:i,multiple:r}=t,a=o?.value||null,s=e instanceof InputEvent?!e.inputType||e.inputType==="insertReplacementText":!!o?.value;if(s||(t._value=o?.value||""),s){(n=e.stopImmediatePropagation)==null||n.call(e);const l=[...i].find(c=>ie(c)===a);if(o&&(o.value=t._value),l)return Ut(t,l,r)}else r||(t._match=lr(t));Jn(t)},Yc=(t,e)=>{e.ctrlKey||e.metaKey||e.shiftKey||e.key==="Alt"||(t.control===e.target?Qc(t,e):Zc(t,e))},Qc=(t,e)=>{var n;const{_match:o,clear:i,control:r,items:a,multiple:s}=t;(e.key==="ArrowLeft"||e.key==="Backspace")&&!r?.selectionEnd&&((n=a[a.length-1])==null||n.focus(),e.preventDefault()),e.key==="Enter"&&r&&(Nc(r),Ut(t,s?lr(t):o,s)),e.key==="Tab"&&!e.shiftKey&&i&&!i.hidden&&(e.preventDefault(),S(i,"aria-hidden","false"),S(i,"tabindex","0"),i.focus(),jn(i,"blur",()=>Jn(t),nr))},Zc=(t,e)=>{var n,o,i;const{clear:r,control:a,items:s}=t,{key:l,repeat:c,target:d}=e,u=[...s].indexOf(d);if((l===" "||l==="Enter")&&(s[u]||d===r))return(n=s[u]||r)==null||n.click(),e.preventDefault();if(s[u]){if(l.startsWith("Arrow")&&e.preventDefault(),l==="ArrowLeft")return(o=s[u-1])==null?void 0:o.focus();if(l==="ArrowRight")return(i=s[u+1]||a)==null?void 0:i.focus();if(l==="Backspace")return e.preventDefault(),c||Ut(t,s[u]);a?.focus()}},Jc=(t,e)=>{var n;if(!t.control)return;const{_texts:o,control:i,items:r,list:a,multiple:s,toggle:l}=t,c=[];for(const{addedNodes:h,removedNodes:f}of e||[]){for(const p of h)p instanceof HTMLDataElement&&c.unshift(p);for(const p of f)p instanceof HTMLDataElement&&c.push(p)}const d=Xn(t);if((s?c.length===1:c[0]===d)&&t.contains(d)){const h=i?S(i,J):null;t._speak=`${o[c[0].isConnected?"added":"removed"]} ${Et(c[0])}, `,S(i,J,`${t._speak}${Oc(i)}`),t._focusMoved||setTimeout(()=>Ue(t._speak.slice(0,-2))),setTimeout(td,300,t,h)}if(!s){const h=Et(r[0]);h!==t._itemSingleVale&&Ve(t),t._itemSingleVale=h}cr(t),dr(t),ed(t),l&&S(l,"aria-expanded",`${!a?.hidden}`);const m=`${r.length?o.found.replace("%d",`${r.length}`):o.empty}`;S(i,"aria-description",s?m:null),S(i,"list",Dc(a)),S(t._listbox,J,o.items),(n=t._umutate)==null||n.takeRecords()},td=(t,e)=>{t._speak="",t.control&&S(t.control,J,e),cr(t)},cr=t=>{const{_texts:e,_speak:n,items:o}=t;let i=0;for(const r of o){const a=`${n}${Et(r)}, ${e.remove}${Gn?`, ${++i} ${e.of} ${o.length}`:""}`;S(r,J,a),S(r,"role","option"),S(r,"slot","items"),S(r,"tabindex","-1"),S(r,"value",ie(r))}},ed=t=>{var e,n;if((e=t._select)!=null&&e.isConnected||(t._select=t.querySelector("select")),!t._select)return;const{_select:o,items:i,multiple:r}=t,a=[];let s=0;S(o,"multiple",r?"":null);for(const l of i){const c=o?.options[s++],d=Et(l),u=ie(l);c?Object.assign(c,{defaultSelected:!0,selected:!0,text:d,value:u}):a.push(new Option(d,u,!0,!0))}if(a.length)o.append(...a);else for(const l of[...o.options].slice(s))l.remove();(n=t._umutate)==null||n.takeRecords()},Jn=t=>{const{clear:e,control:n,toggle:o}=t,i=!n?.value||n?.disabled||n?.readOnly;e?.nodeName==="DEL"&&S(e,"role","button"),e&&(S(e,J)||S(e,J,t._texts.clear),S(e,"aria-hidden",`${Gn||Vn}`),S(e,"hidden",i?"":null),S(e,"tabindex","-1")),o&&(S(o,J)||S(o,J,t._texts.toggle),S(o,"aria-hidden",`${Gn||Vn}`),S(o,"hidden",i?null:""),S(o,"tabindex","-1"),S(o,"type","button"))},dr=t=>{if(!t.list)return;const{_texts:e,list:n,multiple:o,options:i,values:r}=t;S(n,"data-sr-of",e.of),S(n,kc,`${o}`);for(const a of i)fr(a,r.includes(ie(a)))},Ve=t=>{if(!t.control||t.multiple)return;const{control:e,items:n}=t,o=Et(n[0]),i=o?"insertText":"deleteContentBackward";o!==e.value&&ir(e,o,i)},ur=t=>{var e;return(e=S(t,"label"))!=null?e:Et(t)},ie=t=>{var e;return(e=S(t,"value"))!=null?e:Et(t)},fr=(t,e)=>S(t,"selected",e?"":null),nd=t=>{var e;return(e=t.selected)!=null?e:t.hasAttribute("selected")};Pc.define("u-combobox",Zn);var pr=class extends Zn{_unmutate;connectedCallback(){super.connectedCallback(),this._unmutate=ot(this,od,{childList:!0}),I(this,"toggle",mr,z)}disconnectedCallback(){super.disconnectedCallback(),this._unmutate?.(),this._unmutate=void 0,pn(this,"toggle",mr,z)}};const od=t=>{let{control:e,list:n}=t,o=n||t.querySelector("u-datalist");e&&!e.placeholder&&v(e,"placeholder"," "),e&&v(e,"popovertarget",rt(n)||null),o&&v(o,"popover","manual"),o&&v(o,"data-is-floating","true")},mr=t=>{let e=t.currentTarget,n=t.newState==="open"&&e.control;n&&e.list?.dispatchEvent(new CustomEvent("ds-toggle-source",{detail:n}))};it.define("ds-suggestion",pr);var to=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ge=to(),id=Ge?navigator.userAgent:"",rd=/android/i.test(id),hr;Ge&&/^Mac/i.test(((hr=navigator.userAgentData)==null?void 0:hr.platform)||navigator.platform);var ad=Ge&&window.CSSStyleSheet&&document.adoptedStyleSheets,eo=":host(:not([hidden])) { display: block }",sd=`${rd?"data":"aria"}-labelledby`,je=typeof HTMLElement>"u"?class{}:HTMLElement,L=(t,e,n)=>n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),ld=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>gr(t,...e)},gr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},no=(t,e)=>{const n=t.shadowRoot||t.attachShadow({mode:"open"});if(n.querySelector("slot")||n.append(vr("slot")),!n.querySelector("style"))if(!ad)n.append(vr("style",null,e));else{const o=new CSSStyleSheet;o.replaceSync(e),n.adoptedStyleSheets=[o]}return n},cd=(t,e,n)=>{const o=new MutationObserver(r=>{if(!to()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>o.disconnect(),{takeRecords:()=>o.takeRecords()});return e(t),o.observe(t,n),i},br=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},oo=t=>{if(!t||!Ge)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},vr=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))L(o,i,r);return o},Xe={define:(t,e)=>!to()||window.customElements.get(t)||window.customElements.define(t,e)},Ft="aria-controls",yr="aria-disabled",re="aria-selected",ae="tabindex",dd=eo,ud=eo,fd=`${eo}
|
|
14
82
|
::slotted([role="tab"]:not([hidden])) { display: inline-block; cursor: pointer }
|
|
15
|
-
::slotted([role="tab"][${
|
|
83
|
+
::slotted([role="tab"][${yr}="true"]) { cursor: default }`,io=class extends je{constructor(){super(),no(this,dd)}get tabList(){return this.querySelector('[role="tablist"]:not(:scope [role="tabpanel"] [role="tablist"])')}get selectedIndex(){const t=Vt(this.tabList);return t.indexOf(se(t))}set selectedIndex(t){xt(this.tabs[t])}get tabs(){return this.querySelectorAll('[role="tab"]:not(:scope [role="tabpanel"] [role="tab"])')}get panels(){return this.querySelectorAll('[role="tabpanel"]:not(:scope [role="tabpanel"] [role="tabpanel"])')}},ro=class extends je{constructor(){super(),no(this,fd)}connectedCallback(){L(this,"role","tablist"),ld(this,"click keydown",this),this._umutate=cd(this,pd,{attributeFilter:["id","role",Ft,re],attributes:!0,childList:!0,subtree:!0})}disconnectedCallback(){var t;gr(this,"click keydown",this),(t=this._umutate)==null||t.call(this),this._umutate=void 0}handleEvent(t){var e,n,o,i;const{key:r,type:a,target:s}=t,l=Vt(this),c=l.findIndex(m=>m.contains(s)),d=r===" "||r==="Enter";let u=c;if(!(t.defaultPrevented||c===-1)&&(a==="click"&&xt(l[c]),a==="keydown")){if(d){(e=t.preventDefault)==null||e.call(t);const m={bubbles:!0,cancelable:!0,composed:!0};return l[c].dispatchEvent(new MouseEvent("click",m))}if(r==="ArrowDown"||r==="ArrowRight")u=(c+1)%l.length;else if(r==="ArrowUp"||r==="ArrowLeft")u=(c||l.length)-1;else if(r==="End")u=l.length-1;else if(r==="Home")u=0;else if(r==="Tab"&&!Wt(l[c])){const m=se(l);return m&&L(m,ae,"-1"),m&&setTimeout(()=>L(m,ae,"0"))}else return;(n=t.preventDefault)==null||n.call(t),(i=(o=l[u]).focus)==null||i.call(o)}}get tabsElement(){return Gt(this)}get tabs(){return this.querySelectorAll(':scope > [role="tab"]')}get selectedIndex(){const t=Vt(this);return t.indexOf(se(t))}set selectedIndex(t){xt(this.tabs[t])}},wr=class extends je{static get observedAttributes(){return["id",re,Ft]}connectedCallback(){var t;L(this,"role","tab"),L(this,re,`${this.selected}`),L(this,ae,this.selected?"0":"-1"),se((t=this.parentElement)==null?void 0:t.children)||xt(this)}attributeChangedCallback(){!ao.has(this.parentElement)&&this.selected&&xt(this)}get tabsElement(){return Gt(this)}get tabList(){const t=this.parentElement;return t instanceof ro?t:null}get selected(){return Wt(this)}set selected(t){t&&xt(this)}get index(){return Math.max(Vt(this.parentElement).indexOf(this),0)}get panel(){var t;const e=(t=Gt(this))==null?void 0:t.panels,n=Vt(this.parentElement).indexOf(this);return so(this,e?.[n])}},_r=class extends je{constructor(){super(),no(this,ud)}connectedCallback(){L(this,"role","tabpanel");const t=new Set(this.tabs),e=Gt(this),n=e?.tabs[Array.prototype.indexOf.call(e?.panels,this)];n&&!n.hasAttribute(Ft)&&t.add(n);const o=se(t)||t.values().next().value;Er(o,()=>Sr(this,o,!!o&&Wt(o)))}get tabsElement(){return Gt(this)}get tabs(){return br(this).querySelectorAll(`[${Ft}="${oo(this)}"]`)}},pd=(t,e=[])=>{let n;for(const{target:o}of e)o instanceof Element&&L(o,"role")==="tab"&&Wt(o)&&(n=o);xt(n)},Sr=(t,e,n=!1)=>{L(t,"aria-hidden",`${!n}`),L(t,"hidden",n?null:""),L(t,ae,n?"0":null),e&&L(e,Ft,oo(t)),e&&n&&Wt(e)&&L(t,sd,oo(e))},ao=new Set,Er=(t,e)=>{var n;const o=t?.parentElement;o&&ao.add(o),e(),o&&ao.delete(o),(n=o?._umutate)==null||n.takeRecords()},md=t=>L(t,yr)!=="true",Wt=t=>L(t,re)==="true",se=(t=[])=>{for(const e of t)if(Wt(e))return e},Vt=t=>{const e=[];for(const n of t?.children||[])n.getAttribute("role")==="tab"&&e.push(n);return e},so=(t,e=null)=>{const n=L(t,Ft);return n?br(t).getElementById(n):e},Gt=t=>{for(let e=t;e;e=e.parentNode||e.host)if(e instanceof io)return e;return null},xt=t=>t&&md(t)&&Er(t,()=>{var e;const n=Vt(t.parentElement),o=((e=Gt(t))==null?void 0:e.panels)||[],i=so(t,o?.[n.indexOf(t)]);let r=0;for(const a of n){const s=so(a,o[r++]);L(a,re,`${a===t}`),L(a,ae,a===t?"0":"-1"),s&&Sr(s,a,s===i)}});Xe.define("u-tabs",io),Xe.define("u-tablist",ro),Xe.define("u-tab",wr),Xe.define("u-tabpanel",_r);var xr=class extends io{},$r=class extends ro{},Tr=class extends wr{},Ar=class extends _r{};it.define("ds-tabs",xr),it.define("ds-tablist",$r),it.define("ds-tab",Tr),it.define("ds-tabpanel",Ar);var hd=Object.defineProperty,Cr=Object.getOwnPropertySymbols,gd=Object.prototype.hasOwnProperty,bd=Object.prototype.propertyIsEnumerable,kr=(t,e,n)=>e in t?hd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vd=(t,e)=>{for(var n in e||(e={}))gd.call(e,n)&&kr(t,n,e[n]);if(Cr)for(var n of Cr(e))bd.call(e,n)&&kr(t,n,e[n]);return t},Ke=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ye=Ke(),lo=Ye?navigator.userAgent:"",Qe=/android/i.test(lo),yd=/firefox/i.test(lo),wd=/iPad|iPhone|iPod/.test(lo),Lr,_d=Ye&&/^Mac/i.test(((Lr=navigator.userAgentData)==null?void 0:Lr.platform)||navigator.platform),Sd=Ye&&window.CSSStyleSheet&&document.adoptedStyleSheets,Ed={once:!0,capture:!0,passive:!0},xd=":host(:not([hidden])) { display: block }",$d="outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color",Td=`${Qe?"data":"aria"}-multiselectable`,Mr=typeof HTMLElement>"u"?class{}:HTMLElement,x=(t,e,n)=>n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),co=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Ze(t,...e)},Ze=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},Ad=(t,e)=>{const n=t.shadowRoot||t.attachShadow({mode:"open"});if(n.querySelector("slot")||n.append(uo("slot")),!n.querySelector("style"))if(!Sd)n.append(uo("style",null,e));else{const o=new CSSStyleSheet;o.replaceSync(e),n.adoptedStyleSheets=[o]}return n},Cd=(t,e,n)=>{const o=new MutationObserver(r=>{if(!Ke()||!t.isConnected)return i();e(t,r)}),i=Object.assign(()=>o.disconnect(),{takeRecords:()=>o.takeRecords()});return e(t),o.observe(t,n),i},Je=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},Rr=t=>Je(t).activeElement,le=t=>{if(!t||!Ye)return null;if(window.uElementsId||(window.uElementsId={}),!t.id){const e=t.nodeName.toLowerCase();window.uElementsId[e]||(window.uElementsId[e]=1),t.id=`:${e}${window.uElementsId[e]++}`}return t.id},uo=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))x(o,i,r);return o},Ir={define:(t,e)=>!Ke()||window.customElements.get(t)||window.customElements.define(t,e)},kd=(t,e,n="")=>{var o,i;const r={bubbles:!0,composed:!0,data:e,inputType:n},a=HTMLInputElement.prototype;t.dispatchEvent(new InputEvent("beforeinput",r)),(i=(o=Object.getOwnPropertyDescriptor(a,"value"))==null?void 0:o.set)==null||i.call(t,e),t.dispatchEvent(new InputEvent("input",r)),t.dispatchEvent(new Event("change",{bubbles:!0}))},fo=!1,po=t=>(t?.type==="pointerup"&&(fo=!1),t?.type==="pointerdown"&&(fo=!0,co(document,"pointerup",po,Ed)),fo),Ld=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Md=t=>{const e=x(t,"form");x(t,"form","#"),setTimeout(Rd,0,t,e)},Rd=(t,e)=>x(t,"form",e),tt,Id=0,Or=0,mo=t=>{clearTimeout(Or),tt||(tt=uo("div",{"aria-live":"assertive"}),tt.style.overflow="hidden",tt.style.position="fixed",tt.style.whiteSpace="nowrap",tt.style.width="1px"),tt.isConnected||document.body.append(tt),t===""&&(tt.textContent=""),t&&(tt.textContent=`${t}${Id++%2?" ":""}`,Or=setTimeout(mo,!_d&&yd?2e3:300,""))},ho="disabled",ce="selected",Od=class extends Mr{constructor(){super(...arguments),this._skipAttrChange=!1}static get observedAttributes(){return["id",ho,ce]}connectedCallback(){Qe&&(this.tabIndex=-1),this.hasAttribute("role")||x(this,"role","option"),x(this,"aria-disabled",`${this.disabled}`),x(this,"aria-selected",`${this.selected}`),le(this)}attributeChangedCallback(t){this._skipAttrChange||(this._skipAttrChange=!0,t==="id"?le(this):x(this,`aria-${t}`,`${this[t]}`),this._skipAttrChange=!1)}get defaultSelected(){return this[ce]}set defaultSelected(t){this[ce]=t}get disabled(){return x(this,ho)!==null}set disabled(t){x(this,ho,t?"":null)}get form(){return this.closest("form")}get index(){var t;return[...((t=this.parentElement)==null?void 0:t.options)||[this]].indexOf(this)}get label(){var t;return(t=x(this,"label"))!=null?t:this.text}set label(t){x(this,"label",t)}get selected(){return x(this,ce)!==null}set selected(t){x(this,ce,t?"":null)}get text(){var t;return((t=this.textContent)==null?void 0:t.trim())||""}set text(t){this.textContent=t}get value(){var t;return(t=x(this,"value"))!=null?t:this.text}set value(t){x(this,"value",t)}};Ir.define("u-option",Od);var Dr="data-activedescendant",tn="aria-hidden",go=`${xd}
|
|
16
84
|
::slotted([role="option"]) { display: block; cursor: pointer }
|
|
17
|
-
::slotted([role="option"][${
|
|
18
|
-
::slotted([role="option"]:is([${
|
|
85
|
+
::slotted([role="option"][${Dr}]) { ${$d} }
|
|
86
|
+
::slotted([role="option"]:is([${tn}="true"], [disabled], [hidden])) { display: none !important }`,Dd=Ld(go),bo,Pr="focus click keydown",vo="focusout input pointerdown",en={of:"of",plural:"%d hits",singular:"%d hit"},Hr=class extends Mr{constructor(){super(),this._texts=vd({},en),Ad(this,go)}static get observedAttributes(){return["id",...Object.keys(en).map(t=>`data-sr-${t}`)]}connectedCallback(){this._root=Je(this),x(this,"hidden",""),x(this,"role","listbox"),x(this,"tabindex","-1"),co(this._root,Pr,this,!0),this._umutate=Cd(this,Br,{attributeFilter:["disabled","hidden","label","value"],attributes:!0,characterData:!0,childList:!0,subtree:!0})}disconnectedCallback(){var t;this._root&&Ze(this._root,Pr,this,!0),this._root&&Ze(this._root,vo,this),nn(this,null),(t=this._umutate)==null||t.call(this),this._umutate=this._root=this._input=void 0}attributeChangedCallback(t,e,n){const o=t?.split("data-sr-")[1];if(en[o])this._texts[o]=n||en[o];else if(this.id){const i=`input[list="${this.id}"]`,r=Je(this).querySelector(i);r&&nn(this,r)}}handleEvent(t){t.defaultPrevented||(t.type==="focus"&&wo(this,t),t.type==="focusout"&&Hd(this,t),t.type==="click"&&qd(this,t),t.type==="input"&&Br(this),t.type==="keydown"&&Bd(this,t),t.type==="pointerdown"&&Nd(this,t))}get options(){const t=!this._options&&this.querySelector('[role="option"],option');return t&&(this._options=this.getElementsByTagName(t?.nodeName)),this._options||this.getElementsByTagName("option")}},Nr=t=>t.disabled||t.readOnly,yo=t=>t instanceof HTMLInputElement,Pd=t=>x(t,tn)!=="true"&&t.clientHeight,de=(t,e)=>{t._input&&x(t._input,"aria-expanded",`${e}`),!(!t.isConnected||t.hidden!==e)&&(e||qr(t),t.popover&&t.togglePopover(e),e&&setTimeout(()=>clearTimeout(bo)),t.hidden=!e)},qr=(t,e)=>{t._input&&x(t._input,"aria-activedescendant",le(e));for(const n of t.options)x(n,Dr,n===e?"":null);e?.scrollIntoView({block:"nearest"})},nn=(t,e)=>{const n=e||t._input;n&&(t.popover&&(x(t,"popover","manual"),x(n,"popovertarget",e&&le(t))),x(n,"aria-autocomplete",e&&"list"),x(n,"aria-controls",e&&le(t)),x(n,"autocomplete",e&&"off"),x(n,"enterkeyhint","done"),x(n,"role",e&&!Nr(n)?"combobox":null))},wo=(t,{target:e})=>{var n,o;if(t._input!==e)if(yo(e)&&e.getAttribute("list")===t.id){if(nn(t,null),nn(t,e),Nr(e))return;t._root&&co(t._root,vo,t),x(t,"aria-label",((o=(n=e.labels)==null?void 0:n[0])==null?void 0:o.textContent.trim())||null),mo(),t._input=e,Qe&&de(t,!0)}else _o(t)},Hd=(t,e)=>{po()?e.stopImmediatePropagation():Qe||setTimeout(_o,0,t,e)},_o=t=>{const e=Rr(t);t._input===e||t.contains(e)||(t._root&&Ze(t._root,vo,t),de(t,!1),t._input=void 0)},Nd=(t,e)=>t.contains(e.target)&&po(e),qd=(t,e)=>{var n;if(yo(e.target)&&wo(t,e),t._input===e.target)return de(t,!0);if(!t.contains(e.target))return _o(t);for(const o of t.options)if(o.contains(e.target))return(n=t._input)==null||n.focus(),t._input&&kd(t._input,o.value),de(t,x(t,Td)==="true")},Bd=(t,e)=>{if(yo(e.target)&&wo(t,e),t._input!==e.target)return;const{key:n,ctrlKey:o,metaKey:i,shiftKey:r,altKey:a}=e;if(o||i||r||n==="Tab"||a&&!n.startsWith("Arrow"))return;n==="Escape"&&!t.hidden&&e.preventDefault(),de(t,n!=="Escape");const s=n==="Enter",l=x(t._input,"aria-activedescendant"),c=[];let d=-1,u=-1;for(const m of t.options)Pd(m)&&(c.push(m),m.id===l&&(d=c.length-1));!a&&n==="ArrowDown"&&(u=(d+1)%c.length),!a&&n==="ArrowUp"&&(u=(d||c.length)-1),~d&&((n==="Home"||n==="PageUp")&&(u=0),(n==="End"||n==="PageDown")&&(u=c.length-1),s&&(u=d)),c[u]&&(e.preventDefault(),t._input.focus()),s&&c[u]?(e.stopImmediatePropagation(),Md(t._input),c[u].click()):qr(t,c[u])},Br=t=>{var e;if(!t._input||t.hidden)return;const n=t._input.value.toLowerCase().trim()||"",o=!t.hasAttribute("data-nofilter"),i=[],r=[];for(const a of t.options)(a.disabled||a.hidden||o&&!a.label.toLowerCase().includes(n)?i:r).push(a);for(const a of i)x(a,tn,"true");for(const a of r)x(a,tn,"false");clearTimeout(bo),bo=setTimeout(zd,500,t,r),wd&&r.forEach((a,s,{length:l})=>{x(a,"title",`${s+1} ${t._texts.of} ${l}`)}),(e=t._umutate)==null||e.takeRecords()},zd=(t,e)=>!t.hidden&&t._input===Rr(t)&&mo(`${e.some(({value:n})=>n)?`${t._texts[e[1]?"plural":"singular"]}`.replace("%d",`${e.length}`):t.innerText}`);Ke()&&Object.defineProperty(HTMLInputElement.prototype,"list",{configurable:!0,enumerable:!0,get(){const t=x(this,"list");return t&&Je(this).getElementById(t)}}),Ir.define("u-datalist",Hr);var zr=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.navigator<"u",Ur=zr(),Fr;Ur&&/^Mac/i.test(((Fr=navigator.userAgentData)==null?void 0:Fr.platform)||navigator.platform);var Ud=Ur&&window.CSSStyleSheet&&document.adoptedStyleSheets,Fd=":host(:not([hidden])) { display: block }",Wr=typeof HTMLElement>"u"?class{}:HTMLElement,ct=(t,e,n)=>n===void 0?t.getAttribute(e):(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),Vr=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>So(t,...e)},So=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},Wd=(t,e)=>{const n=t.shadowRoot||t.attachShadow({mode:"open"});if(n.querySelector("slot")||n.append(on("slot")),!n.querySelector("style"))if(!Ud)n.append(on("style",null,e));else{const o=new CSSStyleSheet;o.replaceSync(e),n.adoptedStyleSheets=[o]}return n},Vd=t=>{var e;const n=((e=t.getRootNode)==null?void 0:e.call(t))||t.ownerDocument;return n instanceof Document||n instanceof ShadowRoot?n:document},on=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))ct(o,i,r);return o},Gr={define:(t,e)=>!zr()||window.customElements.get(t)||window.customElements.define(t,e)},Gd=(t,e="<slot></slot>")=>`<template shadowrootmode="open">${e}<style>${t}</style></template>`,Eo=`${Fd}
|
|
19
87
|
::slotted([slot="summary"]) { cursor: pointer; display: block }
|
|
20
88
|
::slotted([slot="summary"])::before { content: ''; display: inline-block; vertical-align: middle; margin-inline: .05em .3125em; border-block: .3125em solid transparent; border-inline-start: .5em solid }
|
|
21
89
|
::slotted([slot="summary"][aria-expanded="true"])::before { rotate: 90deg }
|
|
22
|
-
:host > [part="details-content"]:not([hidden=""]) { display: block }`,
|
|
23
|
-
Please use <details> and <summary>, but import '@u-elements/u-details/polyfill' to polyfill support for Talkback screen reader when used with Firefox on Android.`,this)}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],
|
|
24
|
-
#${
|
|
25
|
-
#${
|
|
26
|
-
#${
|
|
27
|
-
#${
|
|
28
|
-
#${
|
|
29
|
-
#${
|
|
90
|
+
:host > [part="details-content"]:not([hidden=""]) { display: block }`,jd=Gd(Eo,'<slot name="summary"></slot><slot part="details-content" hidden="until-found"></slot>'),jr=class extends Wr{static get observedAttributes(){return["open"]}constructor(){var t;super(),Wd(this,Eo),(t=this.shadowRoot)==null||t.prepend(on("slot",{name:"summary"}),on("slot",{part:"details-content"})),console.warn(`\x1B[1m<u-details> is deprecated as <details> now has sufficient screen reader support 🎉\x1B[0m
|
|
91
|
+
Please use <details> and <summary>, but import '@u-elements/u-details/polyfill' to polyfill support for Talkback screen reader when used with Firefox on Android.`,this)}connectedCallback(){var t;this._content=(t=this.shadowRoot)==null?void 0:t.children[1],ct(this,"role","group"),Vr(this._content,"beforematch",this),Vr(this,"click keydown",this),this.attributeChangedCallback()}disconnectedCallback(){this._content&&So(this._content,"beforematch",this),So(this,"click keydown",this),this._content=void 0}attributeChangedCallback(t,e,n){const o="onbeforematch"in this?"until-found":!0,i=this.open;for(const r of this.children)r.nodeName==="U-SUMMARY"&&ct(r,"aria-expanded",`${i}`);if(this._content&&(ct(this._content,"aria-hidden",`${!i}`),ct(this._content,"tabindex",i?null:"-1"),this._content.hidden=i?!1:o),i&&this.name){const r=Vd(this).querySelectorAll(`${this.nodeName}[name="${this.name}"]`);for(const a of r)a!==this&&(a.open=!1)}t==="open"&&e===null!=(n===null)&&this.dispatchEvent(new Event("toggle"))}handleEvent(t){var e,n;const o=t.key===" "||t.key==="Enter",i=t.target instanceof Element&&((e=t.target.closest('[slot="summary"]'))==null?void 0:e.parentElement)===this;t.defaultPrevented||(t.type==="beforematch"&&(this.open=!0),i&&t.type==="click"&&(this.open=!this.open),i&&t.type==="keydown"&&o&&((n=t.preventDefault)==null||n.call(t),t.target.dispatchEvent(new MouseEvent("click",t))))}get open(){return this.hasAttribute("open")}set open(t){ct(this,"open",t?"":null)}get name(){return ct(this,"name")||""}set name(t){ct(this,"name",t)}},Xr=class extends Wr{connectedCallback(){ct(this,"role","button"),this.slot="summary",this.tabIndex=0}};Gr.define("u-details",jr),Gr.define("u-summary",Xr);const Xd="3.3.9",Kr="_alert_14zqc_1 _ds-alert_1s2lo_1",Yr="_app_14zqc_1",Qr="_sticky_14zqc_1",Zr="_avatar_14zqc_1 _ds-avatar_1s2lo_1",Jr="_badge_14zqc_1",ta="_breadcrumbs_14zqc_1 _ds-breadcrumbs_1s2lo_3",ea="_button_14zqc_1 _ds-button_1s2lo_1",na="_card_14zqc_1",oa="_group_14zqc_1",ia="_chip_14zqc_1 _ds-chip_1s2lo_3",ra="_details_14zqc_1 _ds-details_1s2lo_1",aa="_dialog_14zqc_1 _ds-dialog_1s2lo_3",sa="__drawer_14zqc_1",la="_divider_14zqc_1",ca="_errorsummary_14zqc_1 _ds-error-summary_1s2lo_3",da="_field_14zqc_1 _ds-field_1s2lo_1",ua="_suggestion_14zqc_1 _ds-suggestion_1s2lo_3",fa="_affixes_14zqc_1 _ds-field-affixes_1s2lo_1",pa="_fieldset_14zqc_1 _ds-fieldset_1s2lo_1",ma="_fileupload_14zqc_1",ha="_helptext_14zqc_1 _ds-focus_1s2lo_1",ga="_input_14zqc_1 _ds-input_1s2lo_1",ba="_law_14zqc_1",va="_grid_14zqc_1",ya="_flex_14zqc_1",wa="_link_14zqc_1",_a="_logo_14zqc_1",Sa="__logo_14zqc_1",Ea="_pagination_14zqc_1 _ds-pagination_1s2lo_3",xa="_popover_14zqc_1 _ds-popover_1s2lo_1",$a="_print_14zqc_1",Ta="_progress_14zqc_1",Aa="__indeterminate_14zqc_1",Ca="_skeleton_14zqc_1 _ds-skeleton_1s2lo_3",ka="__skeleton_14zqc_1",La="_spinner_14zqc_1",Ma="_steps_14zqc_1",Ra="_table_14zqc_1 _ds-table_1s2lo_3",Ia="__scrollShadow_14zqc_1",Oa="_tabs_14zqc_1 _ds-tabs_1s2lo_3",Da="__scrollMask_14zqc_1",Pa="_tag_14zqc_1 _ds-tag_1s2lo_3",Ha="_toast_14zqc_1",Na="__toastClose_14zqc_1",qa="__toastOpen_14zqc_1",Ba="__toastTimeout_14zqc_1",za="_togglegroup_14zqc_1 _ds-toggle-group_1s2lo_3",Ua="__tooltip_14zqc_1 _ds-tooltip_1s2lo_3",Fa="_heading_14zqc_1 _ds-heading_1s2lo_1",Wa="_ingress_14zqc_1",Va="_muted_14zqc_1",Ga="_info_14zqc_1",ja="_prose_14zqc_1",Xa="_validation_14zqc_1 _ds-validation-message_1s2lo_1",Ka="_body_14zqc_162",Ya="__checked_14zqc_1",T={alert:Kr,app:Yr,sticky:Qr,avatar:Zr,badge:Jr,breadcrumbs:ta,button:ea,card:na,group:oa,chip:ia,details:ra,dialog:aa,_drawer:sa,divider:la,errorsummary:ca,field:da,suggestion:ua,affixes:fa,fieldset:pa,fileupload:ma,helptext:ha,input:ga,law:ba,grid:va,flex:ya,link:wa,logo:_a,_logo:Sa,pagination:Ea,popover:xa,print:$a,progress:Ta,_indeterminate:Aa,skeleton:Ca,_skeleton:ka,spinner:La,steps:Ma,table:Ra,_scrollShadow:Ia,tabs:Oa,_scrollMask:Da,tag:Pa,toast:Ha,_toastClose:Na,_toastOpen:qa,_toastTimeout:Ba,togglegroup:za,_tooltip:Ua,heading:Fa,ingress:Wa,muted:Va,info:Ga,prose:ja,validation:Xa,body:Ka,_checked:Ya},Kd=Object.freeze(Object.defineProperty({__proto__:null,_checked:Ya,_drawer:sa,_indeterminate:Aa,_logo:Sa,_scrollMask:Da,_scrollShadow:Ia,_skeleton:ka,_toastClose:Na,_toastOpen:qa,_toastTimeout:Ba,_tooltip:Ua,affixes:fa,alert:Kr,app:Yr,avatar:Zr,badge:Jr,body:Ka,breadcrumbs:ta,button:ea,card:na,chip:ia,default:T,details:ra,dialog:aa,divider:la,errorsummary:ca,field:da,fieldset:pa,fileupload:ma,flex:ya,grid:va,group:oa,heading:Fa,helptext:ha,info:Ga,ingress:Wa,input:ga,law:ba,link:wa,logo:_a,muted:Va,pagination:Ea,popover:xa,print:$a,progress:Ta,prose:ja,skeleton:Ca,spinner:La,steps:Ma,sticky:Qr,suggestion:ua,table:Ra,tabs:Oa,tag:Pa,toast:Ha,togglegroup:za,validation:Xa},Symbol.toStringTag,{value:"Module"}));function Qa(t){var e,n,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Qa(t[e]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}function Yd(){for(var t,e,n=0,o="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Qa(t))&&(o&&(o+=" "),o+=e);return o}const ue={capture:!0,passive:!0},H=()=>typeof window<"u"&&typeof document<"u",$t=t=>H()?document.getElementsByClassName(T[t].split(" ")[0]):[];function jt(t,e){let n;return function(...o){clearTimeout(n),n=setTimeout(()=>t.apply(this,o),e)}}const b=(t,e,n)=>n===void 0?t.getAttribute(e)??null:(n===null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n),null),O=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.addEventListener(i,...o);return()=>Za(t,...e)},Za=(t,...e)=>{const[n,...o]=e;for(const i of n.split(" "))t.removeEventListener(i,...o)},pt=(t,e)=>{if(!H())return;window._mtdsHotReloadCleanup||(window._mtdsHotReloadCleanup=new Map);const n=()=>{window._mtdsHotReloadCleanup?.get(t)?.map(o=>o()),window._mtdsHotReloadCleanup?.set(t,e())};document.readyState!=="complete"?O(window,"load",n):document.fonts?.ready?.then(n)||setTimeout(n,0)},rn=(t,e,n)=>{let o=0;const i=()=>{if(!t.isConnected)return r();e(a),a.takeRecords(),o=0},r=()=>a?.disconnect?.(),a=new MutationObserver(()=>{o||(o=requestAnimationFrame(i))});return a.observe(t,n),i(),r},M=(t,e,n)=>{const o=document.createElement(t);if(n&&(o.textContent=n),e)for(const[i,r]of Object.entries(e))b(o,i,r);return o},Qd=typeof HTMLElement>"u"?class{}:HTMLElement,Zd=(t,e)=>!H()||window.customElements.get(t)||window.customElements.define(t,e),Jd=typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets,tu=(t,e)=>{if(!Jd)return;t.shadowRoot||t.attachShadow({mode:"open"}).append(M("slot"));const n=new CSSStyleSheet;n.replaceSync(e),t.shadowRoot.adoptedStyleSheets=[n]},eu=`[data-command="toggle-app-expanded"],.${T.app.split(" ")[0]} > [command="show-modal"]`,nu=`.${T.breadcrumbs.split(" ")[0]}`,ou=`.${T.card.split(" ")[0]}`,Ja=`.${T.chip.split(" ")[0]}`,iu=`.${T.helptext.split(" ")[0]}`,ru=`.${T.pagination.split(" ")[0]}`,au='summary,u-summary,a,button,[role="tab"],[role="button"]',xo="mattilsynet.matomo.cloud",su=["setCustomUrl","setDocumentTitle","setReferrerUrl"],G="mtds-analytics-banner",lu="https://www.mattilsynet.no/om-mattilsynet/personvernerklaering/informasjonskapsler";function ts(t,e={}){if(H()){if(window._paq||(window._paq=[],window._paq.push(["HeatmapSessionRecording::disable"]),window._paq.push(["enableLinkTracking"]),window._paq.push(["setTrackerUrl",`https://${xo}/matomo.php`])),window._mtm||(window._mtm=window._mtm||[],window._mtm.push({"mtm.startTime":Date.now(),event:"mtm.Start"})),t==="init"){window._mtdsTracking={enabled:window.location.hostname!=="localhost",...window._mtdsTracking,...e};const{consent:n,enabled:o,matomoId:i,matomoTagManagerId:r}=window._mtdsTracking;if(i&&window._paq.push(["setSiteId",i]),o){n!=="custom"&&cu();const a=r?`https://cdn.matomo.cloud/${xo}/container_${r}.js`:`https://cdn.matomo.cloud/${xo}/matomo.js`;document.querySelector(`script[src="${a}"]`)||document.head.append(M("script",{async:"",src:a}))}}if(window._mtdsTracking?.enabled!==!1){if(window._mtdsTracking?.enabled==="debug")return console.info(`analytics ${t}:`,e);if(t==="pageview"){const{url:n,title:o}=e;window._paq.push(["setCustomUrl",n||location.href]),window._paq.push(["setDocumentTitle",o||document.title]),window._paq.push(["trackPageView"])}else if(t==="event"){const{category:n,action:o,name:i,value:r}=e,a=["trackEvent",n,o,i,r];let s=location.href;window._paq.push([function(){s=this.getCurrentUrl()}]),window._paq.push(["setCustomUrl",s.split("#")[0]]),window._paq.push(a.filter(l=>l!==void 0)),window._paq.push(["setCustomUrl",s])}else if(t==="search"){const{query:n,category:o=!1,results:i=!1}=e;window._paq.push(["trackSiteSearch",n,o,i])}else if(t==="matomo"){const n=e;su.includes(n?.[0])&&typeof n[1]!="string"&&(n[1]=`${n[1]??""}`),window._paq.push(n)}}}}function cu(){if(document.getElementById(G)||window.localStorage.getItem(G))return;document.body.insertAdjacentHTML("afterbegin",`<dialog id="${G}" data-analytics="ignore"><style>
|
|
92
|
+
#${G}[open] { box-sizing: border-box; display: flex; align-items: center; background: #116e6b; border-radius: .5em; border: 0; box-shadow: 0 .25em .5em rgba(0,0,0,.3); color: #fff; font-size: .875em; inset: auto auto 1em 1em; max-width: calc(100vw - 2em); outline: 0; padding: .5em; position: fixed; z-index: 99999 }
|
|
93
|
+
#${G} button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; width: 1.5em; height: 1.5em; font: 300 1.5em/1.35 sans-serif; border-radius: .25em; place-content: center; transition: .2s; transition-property: background, scale }
|
|
94
|
+
#${G} button:focus-visible { outline: 2px solid }
|
|
95
|
+
#${G} button:hover { background: #0a4e4f }
|
|
96
|
+
#${G} button:active { background: #054449; scale: .9 }
|
|
97
|
+
#${G} p { margin: 0 .25em }
|
|
30
98
|
</style>
|
|
31
|
-
<p>Vi bruker <a href="${
|
|
99
|
+
<p>Vi bruker <a href="${lu}" target="_blank">informasjonskapsler</a> for å forbedre brukeropplevelsen.</p>
|
|
32
100
|
<form method="dialog" data-analytics="ignore"><button type="submit" aria-label="OK">×</button></form>
|
|
33
|
-
</dialog>`);const e=document.getElementById(
|
|
101
|
+
</dialog>`);const e=document.getElementById(G),n=()=>window.localStorage.setItem(G,"seen");e.addEventListener("close",n,{once:!0}),e.show()}function du(t){window._mtdsTracking?.enabled&&setTimeout(uu,0,t)}function uu({type:t,target:e}){const n=t==="click"?e?.closest?.(au):e;if(!(n instanceof Element)||n.closest('[data-analytics="ignore"]'))return;let o="click",i="Button",r=es(n)||mu(n)||b(n,"data-tooltip")||"";if(t==="submit")i="Form",o="submit",r=r||document.title;else if(t==="toggle"){if(!n.matches("dialog:modal"))return;i="Dialog",o="open"}else if(t==="change"){const a=b(n,"type"),s=a==="checkbox"||a==="radio"?n.closest("fieldset"):null;i=n.closest(Ja)?"Chip":"Form",o="change",r=es(s||n)||fe(s?.querySelector("legend"))||fe(n?.labels?.[0])}else if(b(n,"role")==="tab")i="Tab",o="navigate";else if(b(n,"popovertarget")){if(!fu(n)?.matches(":popover-open"))return;i=n.closest(iu)?"HelpText":"Popover",o="open"}else if(n.nodeName.endsWith("SUMMARY")){if(!n.parentElement.open)return;i="Details",o="open"}else if(n.matches(eu)){const a=pu(n,"--mtds-tooltip-position")==="none";i="Sidebar",o=a?"expand":"minimize",r=a&&b(n,"data-tooltip")||fe(n)}else if(n.closest(nu))i="Breadcrumbs",o="navigate";else if(n.closest(ru))i="Pagination",o="navigate";else if(n.closest(ou))i="Card",o=n instanceof HTMLAnchorElement?"navigate":"click";else if(n.closest(Ja))i="Chip",o=n.hasAttribute("data-removable")?"remove":"click";else if(n.closest("th[aria-sort]"))i="Table",o="sort";else if(n instanceof HTMLAnchorElement)i="Link",o=n.protocol==="mailto:"?"email":"navigate",n.hasAttribute("download")?o="download":n.hash&&n.href.startsWith(location.href.split("#")[0])&&(o="anchor");else if(n.hasAttribute("aria-expanded")){if(b(n,"aria-expanded")!=="true")return;i="Expand",o="open"}else n.nodeName.startsWith("MTDS-ATLAS-")&&(i="Map Marker",o="open");(t==="change"||t==="submit")&&(i=n.closest("form")?.getAttribute("data-analytics-category")||i),ts("event",{category:b(n,"data-analytics-category")??i,action:b(n,"data-analytics-action")??o,name:b(n,"data-analytics-name")??r})}const fe=t=>t?.textContent?.trim()||"",es=t=>t&&b(t,"aria-label")||"",fu=t=>document.getElementById(b(t,"popovertarget")||""),pu=(t,e)=>window.getComputedStyle(t).getPropertyValue(e)?.trim(),mu=t=>{const e=fe(t),n=fe(t.querySelector("h1,h2,h3,h4,h5,h6"));return e.startsWith(n)&&n||e.slice(0,100).trim()};pt("analytics",()=>[O(document,"click toggle submit change",du,ue)]),typeof window<"u"&&window.CSSStyleSheet&&document.adoptedStyleSheets&&(()=>{const t="--mtds-app-expanded",e=new CSSStyleSheet,n=()=>!window.localStorage.getItem(t)?.includes("false");document.adoptedStyleSheets.push(e),window.mtdsToggleAppExpanded=o=>{try{const i=o??!n();e.replaceSync?.(`:root { ${t}: var(${t}--${i})}`),window.localStorage.setItem(t,i)}catch{}},window.mtdsToggleAppExpanded(n())})();const $o=T.app.split(" ")[0],hu=`[data-command="toggle-app-expanded"],.${$o} > [command="show-modal"]`,To=`.${$o} > dialog,.${$o} dialog ~ main`,ns=$t("sticky"),os=t=>{document.startViewTransition?document.startViewTransition(t):t()},is=t=>os(()=>window.mtdsToggleAppExpanded?.(t));function gu(t){const{target:e,defaultPrevented:n}=t,o=e?.closest?.("a");if(o?.closest("dialog")&&o?.closest(To))return rs();if(n||!(e instanceof HTMLButtonElement)||!e.matches(hu))return;const i=getComputedStyle(e).position==="sticky";t.preventDefault(),i?is():os(()=>{const r=document.querySelector(To);r?.setAttribute("closedby","any"),r?.showModal()})}function rs(){document.querySelector(To)?.close()}let Ao=0,Xt,dt=0,Co=0,an=0,ko=!1,Lo=0,Tt=0;function bu(){if(!ns?.length)return;const t=ns[0],e=window.scrollY,n=e<Tt;Tt=e,n!==Xt&&(Ao=(t.parentElement?.getBoundingClientRect().top||0)+Tt,Xt=n,Co=t.offsetHeight,an=t.getBoundingClientRect().top+Tt,ko=t.offsetHeight<=window.innerHeight,Lo=window.innerHeight),!(dt===-1&&ko)&&(dt!==-1&&(ko||Xt&&Tt<=an)?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top","0px"),dt=-1):dt===-1&&!Xt?(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${Math.max(0,Tt-Ao)}px`),dt=0):dt!==1&&!Xt&&Tt+Lo>=an+Co?(t.style.setProperty("--pos","sticky"),t.style.setProperty("--top",`${Lo-Co}px`),dt=1):dt===1&&Xt&&(t.style.setProperty("--pos","relative"),t.style.setProperty("--top",`${an-Ao}px`),dt=0))}pt("app",()=>[O(document,"click",gu,!0),O(window,"resize",jt(rs,100),ue),O(window,"scroll",bu,ue)]);const vu=/<[^>]+\bid="([^"]+)[^>]+>/gi,as=/\([^)]{1,4}\).{1,9}\d+\/\d+/i,yu=/<(h\d|[^>]+role="heading")[^>]*>(.*?)<\/?(h\d|br|div)/i,wu=/kapittel-\d+-ledd-\d+/,_u=/<button[^>]+>.*?<\/button>/g,Su=/►m\d+/i,sn=/<[^>]+>/g,Eu=/<dt([^>]*class="([^"]+)")?[^>]*>(.*?)<\/dt><dd[^>]*>(.*?)<\/dd>/gis,xu=/<(\/?)(article|footer|section)/gi,$u=/(src|href)="([^"]+)"/gi,Tu=/(<li[^>]*)>\s*<div([^>]*>)|<\/div>(<\/li>)/gi,Au=/(<li[^>]+data-name="([^"]+)[^>]+>)(\s*<(ul|ol|div)[^>]+>)/gis,Cu=/(<[^>]+class="[^"]*\bnumberedLegalP\b[^>]+>\s*)(\d+\.)(.*?)(?=<\/?(ul|ol|div)|$)/gis,ss="https://lovdata.no/",ku="https://www.mattilsynet.no/regelveiledning/?regelverk=",Lu={dokid:{label:"DokumentID",value:""},legacyid:{label:"Datokode",value:""},refid:{label:"RefID",value:""},title:{label:"Tittel",value:""},titleshort:{label:"Korttittel",value:""},url:{label:"Url",value:""}},Mo=t=>Array.from(Array.isArray(t)?t:[t],e=>e instanceof HTMLButtonElement?e.value:e),Mu=t=>Array.from(t?.querySelectorAll('button[aria-checked="true"]')||[],e=>e.value),Ru=(t,e)=>{const n=Mo(t);e?.querySelectorAll("button").forEach(o=>{n.includes(o.value)&&b(o,"aria-checked",`${b(o,"aria-checked")!=="true"}`)})},Iu=(t,e)=>{const n=Mo(t);e?.querySelectorAll("button").forEach(o=>{b(o,"aria-checked",`${n.includes(o.value)||!1}`)})},Ou=(t,e)=>{const n=ls(e);return Mo(t).map(o=>Pu(o,n)).filter(o=>!!o)},Du=t=>{const e=t.slice(0,t.indexOf("</dl>")),n={...Lu};for(const o of e.matchAll(Eu)){const i=o[2].replace(/-/g,"").toLowerCase();n[i]={label:o[3],value:o[4]}}return n},ls=t=>t.includes("<main")?(t.split(/<\/?main[^>]*>/)[1]||"").replace(xu,"<$1div").replace(Tu,"$1$2$3").replace($u,(e,n,o)=>`${n}="${o.includes(":")?"":ss}${o}" ${n==="href"?'rel="noopener noreferrer" target="_blank"':""}`).replace(Cu,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span><div class="legalP" id="${At("id",n)}-ledd-0">${i}</div>`).replace(Au,(e,n,o,i)=>`${n}<span class="data-originalId">${o}</span>${i}`).replace(vu,(e,n,o,i)=>{const r=cs(e,n,o,i);return`${e}${r?`<button type="button" role="checkbox" aria-label="${r}" value="${n}"></button>`:""}`}):t,Pu=(t,e)=>{const n=wu.test(t),o=t.split("-").map((c,d,u)=>d%2?Hu(u.slice(0,d+1).join("-"),e,n):null).filter(c=>!!c);if(!o.length)return null;const i=o.filter(({guideUrl:c})=>c).pop()?.guideUrl,r=o.filter(({url:c})=>c).pop(),a=o.filter(c=>c.className==="section"&&as.test(c.label)).pop(),s=r?`${ss}${r.url}`:"",l=o.slice(o.indexOf(a||o[0])).map(({label:c})=>c).join(", ");return{...o.slice(-1)[0],path:o,label:l,url:s,guideUrl:i}},Hu=(t,e,n)=>{const o=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),i=e.slice(o,e.indexOf(">",o)+1),r=At("class",i),a=At("data-lovdata-url",i),s=cs(i,t,o,e),[l,c,d]=a.match(/(lov|forskrift)\/([^/]+)/)||[],u=`${c?.slice(0,3).toUpperCase()}-${d}`;return{id:t,className:r,guideUrl:a&&`${ku}${u}_${t}`,html:Nu(t,e),url:a,label:!n&&r==="section"&&s?.match(as)?.[0]||s}},At=(t,e)=>{const n=` ${t.toLowerCase()}="`,o=e.toLowerCase().indexOf(n),i=o+n.length;return o===-1?"":e.slice(i,e.indexOf('"',i))},Nu=(t,e)=>{const n=e.lastIndexOf("<",e.indexOf(` id="${t}"`)),o=e.length;let i=n+1,r=0;for(;i&&i<o;)if(i=e.indexOf("<",i)+1,e[i]!=="/")r++;else if(--r<0)break;const a=e.indexOf(">",i)+1;return i?e.slice(n,a).replace(_u,""):""},cs=(t,e,n,o)=>qu[At("class",t)]?.(t,e,n,o)||"",qu={numberedLegalP:t=>`nr. ${At("data-numerator",t)}.`,section:(t,e,n,o)=>o.slice(n).match(yu)?.[2]?.replace(sn,"")?.replace(Su,"").trim()||"",legalArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("legalArticleValue",n));return o.slice(i+1,o.indexOf("</span>",i)).replace(sn,"").replace("Artikkel","artikkel")},legalP:(t,e)=>{const[n,o,i,r]=e.split("-").reverse();return`avsnitt ${(o==="nummer"?1:Number(n))+(r==="nummer"?1:0)}`},listArticle:(t,e,n,o)=>{const i=e.split("-"),r=` id="${i.slice(0,-2).join("-")}"`,a=o.lastIndexOf(r,n),s=o.slice(o.indexOf("<ol",a),n),l=At("data-name",t)||"-",c=At("type",s)||"-";let d="punkt";return c==="1"&&(d="tall"),c==="a"&&(d="bokstav"),c==="i"&&(d="romtertall"),`${d} ${l==="-"?i.pop():l.replace(sn,"")}`},marginIdArticle:(t,e,n,o)=>{const i=o.indexOf(">",o.indexOf("data-marginOriginalId",n));return`nr. ${o.slice(i+1,o.indexOf("</span>",i)).replace(sn,"")}`}};function D(t,e={}){const n=document.getElementById(e.id||"")||M("dialog");return b(n,"aria-busy",e.busy?"true":null),b(n,"class",Yd(T.toast,e.className)),b(n,"closedby",e.closedby||null),b(n,"data-color",e.color||null),b(n,"data-icon",`${e.icon??""}`||null),b(n,"data-timeout",`${e.timeout??""}`||null),b(n,"id",e.id||`${Date.now()}`),b(n,"open",e.open===!1?null:""),n.innerHTML=t,O(n,"animationend",Bu,{once:!0}),document.body.appendChild(n),n.id}function Bu({animationName:t,target:e}){t===T._toastClose&&e.remove()}D.success=(t,e)=>D(t,{color:"success",...e}),D.danger=(t,e)=>D(t,{color:"danger",...e}),D.info=(t,e)=>D(t,{color:"info",...e}),D.warning=(t,e)=>D(t,{color:"warning",...e}),D.neutral=(t,e)=>D(t,{color:"neutral",...e}),D.promise=async function(e,n){const{loading:o,success:i,error:r,...a}=n,s=D(o,{busy:!0,...a});try{const l=await e();return D.success(i,{id:s,busy:!1}),l}catch(l){throw D.danger(r,{id:s,busy:!1}),l}};const zu=`/* NOTE: Using --mtds- not --mtds- since we're inside shadow dom */
|
|
34
102
|
:host(:not([hidden])) { display: grid; gap: var(--mtds-6) }
|
|
35
103
|
[data-event] { cursor: pointer } /* Used to forward clicks from Chart ShaowDOM to relevant cell in child table */
|
|
36
104
|
|
|
@@ -212,4 +280,4 @@ Please use <details> and <summary>, but import '@u-elements/u-details/polyfill'
|
|
|
212
280
|
vertical-align: middle;
|
|
213
281
|
width: var(--mtds-5);
|
|
214
282
|
}
|
|
215
|
-
`,Vd=[.1,.2,.25,.5,1];function Gd(t,{aspect:e,type:n}){const i=n==="stacked",r=t[0].reduce((f,p,b)=>{const y=t.map(w=>w[b].number),_=y.reduce((w,S)=>w+S,0);return Math.max(f,...i?[_]:y)},0),s=r/10,a=10**`${Math.round(s)}`.length,l=s/a,c=(Vd.find(f=>f>l)||1)*a,u=Math.ceil(r/c)*c,d=R("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure"});e&&d.style.setProperty("--mtdsc-chart-aspect",e),d.style.setProperty("--bars",`${t[0]?.length-1}`),d.style.setProperty("--groups",`${t.length-1}`),d.style.setProperty("--total",`${u}`);const m=d.appendChild(R("div",{class:"axisSteps"})),h=d.appendChild(R("div",{class:"axisGroups"}));return Array.from({length:u/c+1},(f,p)=>jd(c*p)).reverse().map(f=>m.append(R("div",{class:"axisStep","data-label":f}))),{total:u,groups:h,axis:d}}const jd=new Intl.NumberFormat().format;function Xd(t){return t[0].slice(1).map(({value:e,event:n},o)=>{const i=R("div",{class:"axisGroup","data-label":e}),r=i.appendChild(R("div",{class:"axisGroupContent"}));return t.slice(1).map(s=>s[o+1]).map(({tooltip:s,color:a,number:l})=>{const c=R("div",{"aria-label":s,"data-event":n,class:"bar",role:"img",tabindex:"0"});return c.style.setProperty("--color",a),c.style.setProperty("--value",`${l}`),r.appendChild(c)}),i})}function Kd(t,{total:e,type:n,variant:o}){const i=Number.parseFloat(n||"0")||0,r=R("div",{class:"axisGroup"});return t.slice(1).forEach(([,...s])=>{const a=R("div",{class:"lineContainer",role:"list"});a.style.setProperty("--color",s[0].color);const l=Yd(s.map(({number:d},m,{length:h})=>[100/(h-1)*m,100-d/e*100]),i/100),c=document.createElementNS("http://www.w3.org/2000/svg","svg");g(c,"aria-hidden","true"),g(c,"preserveAspectRatio","none"),g(c,"viewBox","0 0 100 100");const u=document.createElementNS("http://www.w3.org/2000/svg","path");if(g(u,"class","line"),g(u,"d",l),g(u,"fill","none"),g(u,"stroke","currentColor"),o==="area"){const d=u.cloneNode(!0);g(d,"d",`M-100,100 L${l.slice(1)}L200,100`),g(d,"class","lineShade"),c.append(d)}s.forEach(({number:d,tooltip:m,event:h},f)=>{const p=R("div",{role:"listitem"}),b=R("div",{"aria-label":m,"data-event":h,tabindex:"0",class:"linePoint",role:"img"});g(p,"data-label",t[0][f+1]?.value),b.style.setProperty("--value",`${d}`),p.appendChild(b),a.append(p)}),a.appendChild(c).append(u),r.append(a)}),r}const Yd=(t,e)=>t.map(([n,o],i,r)=>i?Qd(i,r,e):`M${n},${o}`).join(" "),Ts=([t,e],[n,o])=>[t+n,e+o],ks=([t,e],[n,o])=>[t-n,e-o],Ls=(t,[e,n])=>[t*e,t*n],Qd=(t,e,n)=>{const o=e[t-1],i=e[t],[r,s]=Ts(o,Ls(n,ks(i,e[t-2]||o))),[a,l]=Ts(i,Ls(n,ks(o,e[t+1]||i)));return`C ${r},${s} ${a},${l} ${i[0]},${i[1]}`};function Zd(t,{aspect:e,variant:n}){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&o.style.setProperty("--mtdsc-chart-aspect",e),g(o,"class","pie"),g(o,"viewBox","0 0 100 100");let i=0;const r=50,s=n==="doughnut"?25:0,a=t.slice(1).reduce((l,[,c])=>l+c.number,0);return t.slice(1).forEach(([,{tooltip:l,number:c,event:u,color:d}])=>{if(!c)return;const m=document.createElementNS("http://www.w3.org/2000/svg","path"),h=i/a;i+=c;const f=Math.min(i/a,.99999),p=f-h>.5?1:0,b=2*Math.PI*(h-.25),y=2*Math.PI*(f-.25),_=Math.cos(b),w=Math.sin(b),S=Math.cos(y),A=Math.sin(y),k=`M ${r+s*_} ${r+s*w} L ${r+r*_} ${r+r*w} A ${r} ${r} 0 ${p} 1 ${r+r*S} ${r+r*A} L ${r+s*S} ${r+s*A} A ${s} ${s} 0 ${p} 0 ${r+s*_} ${r+s*w}`;m.style.setProperty("--color",d),g(m,"aria-label",l),g(m,"data-event",u),g(m,"d",k),g(m,"role","img"),g(m,"tabindex","0"),o.appendChild(m)}),o}const Rs="click keydown mousemove mouseout",Is="mtds-chart-tooltip",ft=N()?document.getElementById(Is)||R("div",{"aria-hidden":"true",class:C._tooltip,hidden:"",id:Is}):null;class Jd extends td{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=qt(()=>this.attributeChangedCallback(),100),n=new ResizeObserver(()=>this.handleResize());n.observe(this),this.#e=()=>n.disconnect(),this.#t=Be(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),M(this,Rs,this)}disconnectedCallback(){ft&&(ft.hidden=!0),gs(this,Rs,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=nu(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(c=>c.remove());const[n,o]=(g(this,"data-variant")||"column").split("-"),i=g(this,"data-aspect")||void 0,r=R("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:c,color:u}])=>{const d=R("div",{class:"legend"},c);r.appendChild(d).style.setProperty("--color",u)});const{axis:s,groups:a,total:l}=Gd(e,{aspect:i,type:o});(n==="column"||n==="bar")&&a.append(...Xd(e)),(n==="line"||n==="area")&&a.append(Kd(e,{total:l,variant:n,type:o})),(n==="doughnut"||n==="pie")&&this.shadowRoot?.append(Zd(e,{aspect:i,variant:n})),this.shadowRoot?.append(s,r),od(this,Wd)}handleEvent(e){e.type==="click"||e.type==="keydown"?tu(e,this):eu(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,n=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(n?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(n?.offsetWidth||0)<500)}}function tu(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const n=t.composedPath()[0],o=e.querySelector("table"),[i,r]=n instanceof Element&&g(n,"data-event")?.split("-").map(Number)||[];o?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let Os="";function eu(t){if(!ft)return;ft?.isConnected||document.body.append(ft);const e=t.composedPath()[0],n=e instanceof Element&&e.getAttribute("aria-label")||"";n&&(ft.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),n!==Os&&(n&&(ft.textContent=n),Os=n,ft.hidden=!n)}const oo=t=>t?.textContent?.trim()||"",nu=t=>Array.from(t?.rows||[]).map((e,n,{length:o})=>Array.from(e.cells,(i,r)=>{const s=oo(e.cells[0]),a=oo(t?.rows[0].cells[r]),l=oo(i),c=o===2?`${a}: ${l}`:`${s}: ${l}${a?` (${a})`:""}`;return g(i,"tabindex","-1"),{number:r&&n&&Number.parseFloat(l)||0,event:i.querySelector("a,button")&&`${n}-${r}`,color:`var(--mtdsc-chart-color-${n}-${r}, var(--mtdsc-chart-color-${n}, var(--mtdsc-chart-color-base)))`,value:l,tooltip:g(i,"data-tooltip")||c}}));ed("mtds-chart",Jd);const Ms=new WeakSet,P=t=>!Ms.has(t)&&Ms.add(t),I=(t,e,n)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,n),ou=wt("togglegroup"),Ds=C.button.split(" "),iu=()=>{for(const t of ou){P(t)&&!t.hasAttribute("data-toggle-group")&&(g(t,"data-toggle-group","Valgknapper"),I('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))P(e)&&!e.classList.contains(Ds[0])&&(e.classList.add(...Ds),I('Only setting class="styles.button"','<label class="styles.button">',e))}},ru=wt("breadcrumbs"),su=()=>{for(const t of ru)P(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...C.breadcrumbs.split(" ")),I('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},au=wt("errorsummary"),lu=()=>{for(const t of au)P(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&I('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},cu=wt("dialog"),Ps=()=>{for(const t of cu){if(P(t)){const e=g(t,"data-closedby");e&&(g(t,"closedby",e),I(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&I('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t)}t.isConnected&&t.showModal&&t.close&&(t.matches('[open][data-modal]:not([data-modal="false"]):not(:modal)')?(I('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),g(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(g(t,"open",""),t.close()))}},du=()=>{for(const t of document.querySelectorAll("[data-count]"))if(P(t)){const e=g(t,"data-count");t.classList.add(...C.validation.split(" ")),g(t,"data-limit",e),I(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},uu=()=>{for(const t of document.querySelectorAll("[data-command]"))if(P(t)){const e=g(t,"data-command");e==="row"?I(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):I(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},fu=N()?document.getElementsByTagName("u-tabs"):[],mu=()=>{for(const t of fu)P(t)&&I("u-tabs","ds-tabs",t)},pu=N()?document.getElementsByTagName("u-details"):[],hu=()=>{for(const t of pu)P(t)&&I("u-details","details",t)},io=C.suggestion.split(" "),gu=N()?document.getElementsByTagName("u-combobox"):[],bu=N()?document.getElementsByTagName("ds-suggestion"):[],vu=()=>{for(const t of gu)P(t)&&(t.classList.add(...io),I("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of bu)P(t)&&!t.classList.contains(io[0])&&(t.classList.add(...io),I("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},yu=({target:t})=>{if(!(t instanceof Element))return;const e=t?.closest("tr")?.querySelector('[data-command="row"]');e&&!t?.closest('a,button,label,input,select,textarea,[role="button"]')&&e.click();const o=t?.closest("dialog");o&&t?.closest('[data-command="close"]')&&o.close()},wu=wt("field"),Fe=new Set,_u=()=>{for(const t of wu)t.nodeName!=="DS-FIELD"&&(P(t)||I('Only setting class="styles.field"','<ds-field class="styles.field">',t),!Fe.has(t)&&Fe.add(t)&&we.prototype.connectedCallback.call(t))},Su=()=>{for(const t of Fe)we.prototype.disconnectedCallback.call(t),Fe.delete(t)},xu=`[data-description], .${C.field.split(" ")[0]} label + p`,Eu=()=>{for(const t of document.querySelectorAll(xu))P(t)&&t.getAttribute("data-field")!=="description"&&(g(t,"data-field","description"),I("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},$u=wt("validation"),Cu=()=>{for(const t of $u)P(t)&&!t.hasAttribute("data-field")&&(g(t,"data-field","validation"),I('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},Au=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))P(t)&&(g(t,"data-placement",g(t,"data-position")),I("data-position","data-placement",t))},Tu=qt(()=>{N()&&(du(),uu(),su(),Ps(),lu(),Eu(),Cu(),Au(),_u(),iu(),vu(),mu(),hu())},200);ut("deprecations",()=>[Su,M(document,"click",yu,Jt),M(document,"toggle",Ps,!0),Be(document,Tu,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const ku=qt(t=>{if(t.animationName!==C._logo)return;const e=t.target.closest?.(`.${C.logo.split(" ")[0]}`),n=e?.firstElementChild;if(n instanceof SVGSVGElement){for(const l of document.head.querySelectorAll("link[rel~='icon']"))l.setAttribute("rel","disabled");const o=e?.hasAttribute("data-env"),i=window.getComputedStyle(n),r=i.getPropertyValue("color"),s=i.getPropertyValue("--mtdsc-logo-background"),a=n.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${r}"`);document.head.appendChild(R("link",{href:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${o?"none":s}' width='51' height='51' x='2' y='2' stroke='${r}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${o?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${a}</g></svg>`)}`,rel:"icon"}))}},200);ut("logo",()=>[M(document,"animationend",ku)]);const Lu=C.popover.split(" ")[0];function Ru({target:t}){const e=t?.closest?.('a,button,[role="button"]'),n=e instanceof HTMLButtonElement,o=e&&g(e,"popovertarget"),i=o?document.getElementById(o):e?.closest("[popover]");if(!(o&&n)&&i?.classList.contains(Lu)&&e){const r=g(e,"popovertargetaction"),s=r==="show"||(r==="hide"?!1:void 0);if(n&&!r&&i.contains(e))return;i instanceof HTMLElement&&i.popover&&i.togglePopover(s)}}ut("popover",()=>[M(document,"click",Ru)]);const ro=new WeakSet,Iu=N()?document.getElementsByTagName("table"):[],Ns=N()&&window.ResizeObserver?new ResizeObserver(qt(Hs,200)):null;function Hs(t){for(const{target:e,contentRect:n}of t)if(!e.isConnected)ro.delete(e)&&Ns?.unobserve(e);else{const i=e.getAttribute("data-mobile-source")==="self"?n.width:window.innerWidth,r=Number(e.getAttribute("data-mobile-size"))||768;g(e,"data-mobile-active",i<r?"":null)}}function Ou(){for(const t of Iu)if(t.hasAttribute("data-mobile")){const e=Array.from(t.tHead?.rows[0]?.cells||[],n=>(n.innerText??n.textContent)?.trim()||"");ro.has(t)||(ro.add(t),Ns?.observe(t),Hs([{target:t,contentRect:t.getBoundingClientRect()}]));for(const n of t.tBodies)for(const o of n.rows)for(const i of o.cells)g(i,"data-th",e[i.cellIndex]||":empty")}}ut("table",()=>[Be(document,Ou,{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const qs=C.toast.split(" ")[0],We="data-sort";function Mu({animationName:t,target:e}){const n=e;if(t===C._toastTimeout&&n.close(),t!==C._toastOpen)return;const o=Number(g(n,"data-timeout"));n.style.setProperty("--mtdsc-toast-timeout",o?`${o}ms`:null),n.hasAttribute(We)||g(n,We,`${Date.now()}`),g(n,"tabindex","0"),[...document.querySelectorAll(`.${qs}[open]`)].sort((i,r)=>Number(g(r,We))-Number(g(i,We))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function Du({target:t,clientX:e,clientY:n}){if(t instanceof HTMLDialogElement&&t.classList.contains(qs)&&g(t,"data-closedby")!=="none"){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),s=o.top+Number.parseInt(i.paddingTop,10),a=s+Number.parseInt(r.height,10),l=o.right-Number.parseInt(i.paddingRight,10),c=l-Number.parseInt(r.width,10);s<=n&&n<=a&&c<=e&&e<=l&&t.close()}}ut("toast",()=>[M(document,"animationstart",Mu),M(document,"click",Du)]),N()&&Ko(document.getElementById("mtds-tooltip")||R("div",{class:C._tooltip,id:"mtds-tooltip",popover:"manual"}));const so=`.${C.field.split(" ")[0]}`,Pu=`${so} :is(input,textarea,select)`,Nu="ds-suggestion,u-combobox",Hu=C.validation.split(" ")[0],Ve=t=>t instanceof HTMLFormElement&&g(t,"data-validation")==="form",ao=t=>t.closest(so),lo=t=>t?.querySelectorAll(Pu)||[],Ge=t=>t?.getElementsByClassName(Hu)||[],Bs=t=>{const e=!t.clientHeight||t.disabled||t.readOnly||g(t,"aria-readonly")==="true"||g(t,"aria-disabled")==="true",n=t.closest(Nu)?.items,o=g(t,"aria-required")!=="true"||!!n?.length;return n&&t.setCustomValidity(e||o?"":"Required"),e?!1:t.matches(":user-invalid")},Us=t=>{const e=t.target?.form||t.target;let n;if(Ve(e)){for(const o of e.querySelectorAll(so)){const i=[...lo(o)].find(Bs);!n&&i&&(n=i);for(const r of Ge(o))g(r,"hidden",i?null:"")}for(const o of e.querySelectorAll("fieldset")){const i=[...lo(o)].some(Bs);for(const r of Ge(o))ao(r)||g(r,"hidden",i?null:"")}n&&(t.preventDefault(),n.focus())}},qu=({target:t})=>{const e=t;if(Ve(e.form))for(const n of Ge(e.closest("fieldset")||ao(e)))g(n,"hidden","")},Bu=t=>Ve(t.target.form)&&t?.preventDefault(),Uu=N()?Ge(document):[],zu=()=>{for(const t of Uu)if(!t.hasAttribute("data-validation")){const e=lo(ao(t))[0];g(t,"data-validation","form"),Ve(e?.form)&&g(t,"hidden","")}};return ut("validations",()=>[M(document,"input comboboxbeforeselect",qu,!0),M(document,"invalid",Bu,!0),M(document,"invalid",qt(Us,10),Jt),M(document,"submit",Us,!0),Be(document,zu,{childList:!0,subtree:!0})]),$.DSBreadcrumbsElement=Jo,$.DSErrorSummaryElement=ti,$.DSFieldElement=we,$.DSPaginationElement=ci,$.DSSuggestionElement=$i,$.DSTabElement=qi,$.DSTabListElement=Hi,$.DSTabPanelElement=Bi,$.DSTabsElement=Ni,$.UHTMLComboboxElement=xn,$.UHTMLComboboxShadowRoot=Wl,$.UHTMLComboboxStyle=Sn,$.UHTMLDataListElement=er,$.UHTMLDataListShadowRoot=Hc,$.UHTMLDataListStyle=Un,$.UHTMLDetailsElement=ur,$.UHTMLDetailsShadowRoot=Yc,$.UHTMLDetailsStyle=Xn,$.UHTMLSummaryElement=fr,$.analytics=vs,$.fixLawHtml=Cs,$.getLawChecked=Md,$.pagination=li,$.parseLawIds=Nd,$.parseLawMeta=Hd,$.setLawChecked=Pd,$.setTooltipElement=Ko,$.styles=Zc,$.toast=D,$.toggleAppExpanded=Ss,$.toggleLawChecked=Dd,$.version=Qc,Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),$})({});
|
|
283
|
+
`,Uu=[.1,.2,.25,.5,1];function Fu(t,{aspect:e,type:n}){const i=n==="stacked",r=t[0].reduce((f,p,g)=>{const y=t.map(w=>w[g].number),_=y.reduce((w,E)=>w+E,0);return Math.max(f,...i?[_]:y)},0),a=r/10,s=10**`${Math.round(a)}`.length,l=a/s,c=(Uu.find(f=>f>l)||1)*s,d=Math.ceil(r/c)*c,u=M("div",{"aria-label":t[0][0].value||null,class:"axis",role:"figure"});e&&u.style.setProperty("--mtdsc-chart-aspect",e),u.style.setProperty("--bars",`${t[0]?.length-1}`),u.style.setProperty("--groups",`${t.length-1}`),u.style.setProperty("--total",`${d}`);const m=u.appendChild(M("div",{class:"axisSteps"})),h=u.appendChild(M("div",{class:"axisGroups"}));return Array.from({length:d/c+1},(f,p)=>Wu(c*p)).reverse().map(f=>m.append(M("div",{class:"axisStep","data-label":f}))),{total:d,groups:h,axis:u}}const Wu=new Intl.NumberFormat().format;function Vu(t){return t[0].slice(1).map(({value:e,event:n},o)=>{const i=M("div",{class:"axisGroup","data-label":e}),r=i.appendChild(M("div",{class:"axisGroupContent"}));return t.slice(1).map(a=>a[o+1]).map(({tooltip:a,color:s,number:l})=>{const c=M("div",{"aria-label":a,"data-event":n,class:"bar",role:"img",tabindex:"0"});return c.style.setProperty("--color",s),c.style.setProperty("--value",`${l}`),r.appendChild(c)}),i})}function Gu(t,{total:e,type:n,variant:o}){const i=Number.parseFloat(n||"0")||0,r=M("div",{class:"axisGroup"});return t.slice(1).forEach(([,...a])=>{const s=M("div",{class:"lineContainer",role:"list"});s.style.setProperty("--color",a[0].color);const l=ju(a.map(({number:u},m,{length:h})=>[100/(h-1)*m,100-u/e*100]),i/100),c=document.createElementNS("http://www.w3.org/2000/svg","svg");b(c,"aria-hidden","true"),b(c,"preserveAspectRatio","none"),b(c,"viewBox","0 0 100 100");const d=document.createElementNS("http://www.w3.org/2000/svg","path");if(b(d,"class","line"),b(d,"d",l),b(d,"fill","none"),b(d,"stroke","currentColor"),o==="area"){const u=d.cloneNode(!0);b(u,"d",`M-100,100 L${l.slice(1)}L200,100`),b(u,"class","lineShade"),c.append(u)}a.forEach(({number:u,tooltip:m,event:h},f)=>{const p=M("div",{role:"listitem"}),g=M("div",{"aria-label":m,"data-event":h,tabindex:"0",class:"linePoint",role:"img"});b(p,"data-label",t[0][f+1]?.value),g.style.setProperty("--value",`${u}`),p.appendChild(g),s.append(p)}),s.appendChild(c).append(d),r.append(s)}),r}const ju=(t,e)=>t.map(([n,o],i,r)=>i?Xu(i,r,e):`M${n},${o}`).join(" "),ds=([t,e],[n,o])=>[t+n,e+o],us=([t,e],[n,o])=>[t-n,e-o],fs=(t,[e,n])=>[t*e,t*n],Xu=(t,e,n)=>{const o=e[t-1],i=e[t],[r,a]=ds(o,fs(n,us(i,e[t-2]||o))),[s,l]=ds(i,fs(n,us(o,e[t+1]||i)));return`C ${r},${a} ${s},${l} ${i[0]},${i[1]}`};function Ku(t,{aspect:e,variant:n}){const o=document.createElementNS("http://www.w3.org/2000/svg","svg");e&&o.style.setProperty("--mtdsc-chart-aspect",e),b(o,"class","pie"),b(o,"viewBox","0 0 100 100");let i=0;const r=50,a=n==="doughnut"?25:0,s=t.slice(1).reduce((l,[,c])=>l+c.number,0);return t.slice(1).forEach(([,{tooltip:l,number:c,event:d,color:u}])=>{if(!c)return;const m=document.createElementNS("http://www.w3.org/2000/svg","path"),h=i/s;i+=c;const f=Math.min(i/s,.99999),p=f-h>.5?1:0,g=2*Math.PI*(h-.25),y=2*Math.PI*(f-.25),_=Math.cos(g),w=Math.sin(g),E=Math.cos(y),A=Math.sin(y),k=`M ${r+a*_} ${r+a*w} L ${r+r*_} ${r+r*w} A ${r} ${r} 0 ${p} 1 ${r+r*E} ${r+r*A} L ${r+a*E} ${r+a*A} A ${a} ${a} 0 ${p} 0 ${r+a*_} ${r+a*w}`;m.style.setProperty("--color",u),b(m,"aria-label",l),b(m,"data-event",d),b(m,"d",k),b(m,"role","img"),b(m,"tabindex","0"),o.appendChild(m)}),o}const ps="click keydown mousemove mouseout",ms="mtds-chart-tooltip",mt=H()?document.getElementById(ms)||M("div",{"aria-hidden":"true",class:T._tooltip,hidden:"",id:ms}):null;class Yu extends Qd{#t;#e;static get observedAttributes(){return["data-variant","data-aspect"]}constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const e=jt(()=>this.attributeChangedCallback(),100),n=new ResizeObserver(()=>this.handleResize());n.observe(this),this.#e=()=>n.disconnect(),this.#t=rn(this,e,{attributeFilter:["data-tooltip"],attributes:!0,characterData:!0,childList:!0,subtree:!0}),requestAnimationFrame(()=>this.attributeChangedCallback()),O(this,ps,this)}disconnectedCallback(){mt&&(mt.hidden=!0),Za(this,ps,this),this.#e?.(),this.#t?.(),this.#t=this.#e=void 0}attributeChangedCallback(){const e=Ju(this.querySelector("table"));if(!e[0])return;Array.from(this.shadowRoot?.children||[]).map(c=>c.remove());const[n,o]=(b(this,"data-variant")||"column").split("-"),i=b(this,"data-aspect")||void 0,r=M("div",{"aria-hidden":"hidden",class:"legends",role:"group"});e.slice(1).forEach(([{value:c,color:d}])=>{const u=M("div",{class:"legend"},c);r.appendChild(u).style.setProperty("--color",d)});const{axis:a,groups:s,total:l}=Fu(e,{aspect:i,type:o});(n==="column"||n==="bar")&&s.append(...Vu(e)),(n==="line"||n==="area")&&s.append(Gu(e,{total:l,variant:n,type:o})),(n==="doughnut"||n==="pie")&&this.shadowRoot?.append(Ku(e,{aspect:i,variant:n})),this.shadowRoot?.append(a,r),tu(this,zu)}handleEvent(e){e.type==="click"||e.type==="keydown"?Qu(e,this):Zu(e)}handleResize(){const e=this.shadowRoot?.firstElementChild,n=e?.firstElementChild;e?.classList.toggle("axisStepsYHalf",(n?.offsetHeight||0)<400),e?.classList.toggle("axisStepsXHalf",(n?.offsetWidth||0)<500)}}function Qu(t,e){if(t instanceof KeyboardEvent&&t.key!=="Enter")return;const n=t.composedPath()[0],o=e.querySelector("table"),[i,r]=n instanceof Element&&b(n,"data-event")?.split("-").map(Number)||[];o?.rows[i]?.cells[r]?.querySelector("a,button")?.click?.()}let hs="";function Zu(t){if(!mt)return;mt?.isConnected||document.body.append(mt);const e=t.composedPath()[0],n=e instanceof Element&&e.getAttribute("aria-label")||"";n&&(mt.style.transform=`translate(${Math.min(t.clientX,window.innerWidth)}px, ${t.clientY}px)`),n!==hs&&(n&&(mt.textContent=n),hs=n,mt.hidden=!n)}const Ro=t=>t?.textContent?.trim()||"",Ju=t=>Array.from(t?.rows||[]).map((e,n,{length:o})=>Array.from(e.cells,(i,r)=>{const a=Ro(e.cells[0]),s=Ro(t?.rows[0].cells[r]),l=Ro(i),c=o===2?`${s}: ${l}`:`${a}: ${l}${s?` (${s})`:""}`;return b(i,"tabindex","-1"),{number:r&&n&&Number.parseFloat(l)||0,event:i.querySelector("a,button")&&`${n}-${r}`,color:`var(--mtdsc-chart-color-${n}-${r}, var(--mtdsc-chart-color-${n}, var(--mtdsc-chart-color-base)))`,value:l,tooltip:b(i,"data-tooltip")||c}}));Zd("mtds-chart",Yu);const gs=new WeakSet,P=t=>!gs.has(t)&&gs.add(t),R=(t,e,n)=>window.dsWarnings===!1||console.warn(`\x1B[1m@mattilsynet/design:\x1B[m ${t} is deprecated, please use ${e}:`,n),tf=$t("togglegroup"),bs=T.button.split(" "),ef=()=>{for(const t of tf){P(t)&&!t.hasAttribute("data-toggle-group")&&(b(t,"data-toggle-group","Valgknapper"),R('Only setting class="styles.togglegroup"','data-toggle-group="LABEL-HERE" attribute also for better accessibility',t));for(const e of t.getElementsByTagName("label"))P(e)&&!e.classList.contains(bs[0])&&(e.classList.add(...bs),R('Only setting class="styles.button"','<label class="styles.button">',e))}},nf=$t("breadcrumbs"),of=()=>{for(const t of nf)P(t)&&t.nodeName!=="DS-BREADCRUMBS"&&(t.classList.add(...T.breadcrumbs.split(" ")),R('Only setting class="styles.breadcrumbs"','<ds-breadcrumbs class="styles.breadcrumbs">',t))},rf=$t("errorsummary"),af=()=>{for(const t of rf)P(t)&&t.nodeName!=="DS-ERROR-SUMMARY"&&R('Only setting class="styles.errorsummary"','<ds-error-summary class="styles.errorsummary">',t)},sf=$t("dialog"),vs=()=>{for(const t of sf){if(P(t)){const e=b(t,"data-closedby");e&&(b(t,"closedby",e),R(`<dialog data-closedby="${e}">`,`<dialog closedby="${e}">`,t)),t.hasAttribute("data-variant")&&R('<dialog data-variant="drawer">','<dialog data-placement="center|left|right|top|bottom">',t)}t.isConnected&&t.showModal&&t.close&&(t.matches('[open][data-modal]:not([data-modal="false"]):not(:modal)')?(R('<dialog data-modal="true">','.showModal() or <button command="show-modal" commandfor="DIALOG-ID"></button>',t),b(t,"open",null),t.showModal()):t.matches(":modal:not([open])")&&(b(t,"open",""),t.close()))}},lf=()=>{for(const t of document.querySelectorAll("[data-count]"))if(P(t)){const e=b(t,"data-count");t.classList.add(...T.validation.split(" ")),b(t,"data-limit",e),R(`data-count="${e}"`,`class="styles.validation" data-field="counter" data-limit="${e}"`,t)}},cf=()=>{for(const t of document.querySelectorAll("[data-command]"))if(P(t)){const e=b(t,"data-command");e==="row"?R(`<${t.nodeName.toLowerCase()} data-command="${e}">`,`<tr data-clickdelegatefor="${t.nodeName}-ID">`,t):R(`<button data-command="${e}">`,`<button command="${e?.replace("toggle-app-expanded","show-modal")}" commandfor="TARGET-ID">`,t)}},df=H()?document.getElementsByTagName("u-tabs"):[],uf=()=>{for(const t of df)P(t)&&R("u-tabs","ds-tabs",t)},ff=H()?document.getElementsByTagName("u-details"):[],pf=()=>{for(const t of ff)P(t)&&R("u-details","details",t)},Io=T.suggestion.split(" "),mf=H()?document.getElementsByTagName("u-combobox"):[],hf=H()?document.getElementsByTagName("ds-suggestion"):[],gf=()=>{for(const t of mf)P(t)&&(t.classList.add(...Io),R("<u-combobox>",'<ds-suggestion class="styles.suggestion">',t));for(const t of hf)P(t)&&!t.classList.contains(Io[0])&&(t.classList.add(...Io),R("Only using <ds-suggestion>",'<ds-suggestion class="styles.suggestion">',t))},bf=({target:t})=>{if(!(t instanceof Element))return;const e=t?.closest("tr")?.querySelector('[data-command="row"]');e&&!t?.closest('a,button,label,input,select,textarea,[role="button"]')&&e.click();const o=t?.closest("dialog");o&&t?.closest('[data-command="close"]')&&o.close()},vf=$t("field"),ln=new Set,yf=()=>{for(const t of vf)t.nodeName!=="DS-FIELD"&&(P(t)||R('Only setting class="styles.field"','<ds-field class="styles.field">',t),!ln.has(t)&&ln.add(t)&&Ne.prototype.connectedCallback.call(t))},wf=()=>{for(const t of ln)Ne.prototype.disconnectedCallback.call(t),ln.delete(t)},_f=`[data-description], .${T.field.split(" ")[0]} label + p`,Sf=()=>{for(const t of document.querySelectorAll(_f))P(t)&&t.getAttribute("data-field")!=="description"&&(b(t,"data-field","description"),R("Descriptions created by data-description of <p> only",'data-field="data-description"',t))},Ef=$t("validation"),xf=()=>{for(const t of Ef)P(t)&&!t.hasAttribute("data-field")&&(b(t,"data-field","validation"),R('Only setting class="styles.validation"','class="styles.validation" data-field="validation"',t))},$f=()=>{for(const t of document.querySelectorAll("[popover][data-position]"))P(t)&&(b(t,"data-placement",b(t,"data-position")),R("data-position","data-placement",t))},Tf=jt(()=>{H()&&(lf(),cf(),of(),vs(),af(),Sf(),xf(),$f(),yf(),ef(),gf(),uf(),pf())},200);pt("deprecations",()=>[wf,O(document,"click",bf,ue),O(document,"toggle",vs,!0),rn(document,Tf,{attributeFilter:["class","data-command","data-count","data-description","data-variant","open"],attributes:!0,childList:!0,subtree:!0})]);const Af=jt(t=>{if(t.animationName!==T._logo)return;const e=t.target.closest?.(`.${T.logo.split(" ")[0]}`),n=e?.firstElementChild;if(n instanceof SVGSVGElement){for(const l of document.head.querySelectorAll("link[rel~='icon']"))l.setAttribute("rel","disabled");const o=e?.hasAttribute("data-env"),i=window.getComputedStyle(n),r=i.getPropertyValue("color"),a=i.getPropertyValue("--mtdsc-logo-background"),s=n.outerHTML.replace(/\n+/g," ").replace(/(fill|width|height|xmlns)="[^"]+"/gi,"").replace("<svg",`<svg width="40" height="40" fill="${r}"`);document.head.appendChild(M("link",{href:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 55 55'><rect fill='${o?"none":a}' width='51' height='51' x='2' y='2' stroke='${r}' stroke-dasharray='0.09 6.38' stroke-linecap='round' stroke-opacity='${o?.6:0}' stroke-width='2.3' rx='25.5'/><g transform="translate(7.5 7.5)">${s}</g></svg>`)}`,rel:"icon"}))}},200);pt("logo",()=>[O(document,"animationend",Af)]);const Cf=T.popover.split(" ")[0];function kf({target:t}){const e=t?.closest?.('a,button,[role="button"]'),n=e instanceof HTMLButtonElement,o=e&&b(e,"popovertarget"),i=o?document.getElementById(o):e?.closest("[popover]");if(!(o&&n)&&i?.classList.contains(Cf)&&e){const r=b(e,"popovertargetaction"),a=r==="show"||(r==="hide"?!1:void 0);if(n&&!r&&i.contains(e))return;i instanceof HTMLElement&&i.popover&&i.togglePopover(a)}}pt("popover",()=>[O(document,"click",kf)]);const Oo=new WeakSet,Lf=H()?document.getElementsByTagName("table"):[],ys=H()&&window.ResizeObserver?new ResizeObserver(jt(ws,200)):null;function ws(t){for(const{target:e,contentRect:n}of t)if(!e.isConnected)Oo.delete(e)&&ys?.unobserve(e);else{const i=e.getAttribute("data-mobile-source")==="self"?n.width:window.innerWidth,r=Number(e.getAttribute("data-mobile-size"))||768;b(e,"data-mobile-active",i<r?"":null)}}function Mf(){for(const t of Lf)if(t.hasAttribute("data-mobile")){const e=Array.from(t.tHead?.rows[0]?.cells||[],n=>(n.innerText??n.textContent)?.trim()||"");Oo.has(t)||(Oo.add(t),ys?.observe(t),ws([{target:t,contentRect:t.getBoundingClientRect()}]));for(const n of t.tBodies)for(const o of n.rows)for(const i of o.cells)b(i,"data-th",e[i.cellIndex]||":empty")}}pt("table",()=>[rn(document,Mf,{attributeFilter:["data-mobile"],attributes:!0,childList:!0,subtree:!0})]);const _s=T.toast.split(" ")[0],cn="data-sort";function Rf({animationName:t,target:e}){const n=e;if(t===T._toastTimeout&&n.close(),t!==T._toastOpen)return;const o=Number(b(n,"data-timeout"));n.style.setProperty("--mtdsc-toast-timeout",o?`${o}ms`:null),n.hasAttribute(cn)||b(n,cn,`${Date.now()}`),b(n,"tabindex","0"),[...document.querySelectorAll(`.${_s}[open]`)].sort((i,r)=>Number(b(r,cn))-Number(b(i,cn))).reduce((i,r)=>(r.style.translate=`0 ${r===e?0:i}px`,i+r.offsetHeight+5),0)}function If({target:t,clientX:e,clientY:n}){if(t instanceof HTMLDialogElement&&t.classList.contains(_s)&&b(t,"data-closedby")!=="none"){const o=t.getBoundingClientRect(),i=window.getComputedStyle(t),r=window.getComputedStyle(t,"::after"),a=o.top+Number.parseInt(i.paddingTop,10),s=a+Number.parseInt(r.height,10),l=o.right-Number.parseInt(i.paddingRight,10),c=l-Number.parseInt(r.width,10);a<=n&&n<=s&&c<=e&&e<=l&&t.close()}}pt("toast",()=>[O(document,"animationstart",Rf),O(document,"click",If)]),H()&&Ni(document.getElementById("mtds-tooltip")||M("div",{class:T._tooltip,id:"mtds-tooltip",popover:"manual"}));const Do=`.${T.field.split(" ")[0]}`,Of=`${Do} :is(input,textarea,select)`,Df="ds-suggestion,u-combobox",Pf=T.validation.split(" ")[0],dn=t=>t instanceof HTMLFormElement&&b(t,"data-validation")==="form",Po=t=>t.closest(Do),Ho=t=>t?.querySelectorAll(Of)||[],un=t=>t?.getElementsByClassName(Pf)||[],Ss=t=>{const e=!t.clientHeight||t.disabled||t.readOnly||b(t,"aria-readonly")==="true"||b(t,"aria-disabled")==="true",n=t.closest(Df)?.items,o=b(t,"aria-required")!=="true"||!!n?.length;return n&&t.setCustomValidity(e||o?"":"Required"),e?!1:t.matches(":user-invalid")},Es=t=>{const e=t.target?.form||t.target;let n;if(dn(e)){for(const o of e.querySelectorAll(Do)){const i=[...Ho(o)].find(Ss);!n&&i&&(n=i);for(const r of un(o))b(r,"hidden",i?null:"")}for(const o of e.querySelectorAll("fieldset")){const i=[...Ho(o)].some(Ss);for(const r of un(o))Po(r)||b(r,"hidden",i?null:"")}n&&(t.preventDefault(),n.focus())}},Hf=({target:t})=>{const e=t;if(dn(e.form))for(const n of un(e.closest("fieldset")||Po(e)))b(n,"hidden","")},Nf=t=>dn(t.target.form)&&t?.preventDefault(),qf=H()?un(document):[],Bf=()=>{for(const t of qf)if(!t.hasAttribute("data-validation")){const e=Ho(Po(t))[0];b(t,"data-validation","form"),dn(e?.form)&&b(t,"hidden","")}};return pt("validations",()=>[O(document,"input comboboxbeforeselect",Hf,!0),O(document,"invalid",Nf,!0),O(document,"invalid",jt(Es,10),ue),O(document,"submit",Es,!0),rn(document,Bf,{childList:!0,subtree:!0})]),$.DSBreadcrumbsElement=zi,$.DSErrorSummaryElement=Ui,$.DSFieldElement=Ne,$.DSPaginationElement=Qi,$.DSSuggestionElement=pr,$.DSTabElement=Tr,$.DSTabListElement=$r,$.DSTabPanelElement=Ar,$.DSTabsElement=xr,$.UHTMLComboboxElement=Zn,$.UHTMLComboboxShadowRoot=zc,$.UHTMLComboboxStyle=Yn,$.UHTMLDataListElement=Hr,$.UHTMLDataListShadowRoot=Dd,$.UHTMLDataListStyle=go,$.UHTMLDetailsElement=jr,$.UHTMLDetailsShadowRoot=jd,$.UHTMLDetailsStyle=Eo,$.UHTMLSummaryElement=Xr,$.analytics=ts,$.fixLawHtml=ls,$.getLawChecked=Mu,$.pagination=Yi,$.parseLawIds=Ou,$.parseLawMeta=Du,$.setLawChecked=Iu,$.setTooltipElement=Ni,$.styles=Kd,$.toast=D,$.toggleAppExpanded=is,$.toggleLawChecked=Ru,$.version=Xd,Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),$})({});
|