1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[75277],{24291:(e,t,l)=>{l.d(t,{a:()=>i,b:()=>n,c:()=>s,d:()=>r,e:()=>a});var i=e=>t=>"function"==typeof t?(customElements.define(e,t),t):((e,t)=>{let{kind:l,elements:i}=t;return{kind:l,elements:i,finisher(t){customElements.define(e,t)}}})(e,t);function n(e){return(t,l)=>void 0!==l?void t.constructor.createProperty(l,e):"method"!==t.kind||!t.descriptor||"value"in t.descriptor?{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){"function"==typeof t.initializer&&(this[t.key]=t.initializer.call(this))},finisher(l){l.createProperty(t.key,e)}}:{...t,finisher(l){l.createProperty(t.key,e)}}}function s(e){return n({...e,state:!0})}var o=({finisher:e,descriptor:t})=>(l,i)=>{var n;if(void 0===i){let i=null!=(n=l.originalKey)?n:l.key,s=null!=t?{kind:"method",placement:"prototype",key:i,descriptor:t(l.key)}:{...l,key:i};return null!=e&&(s.finisher=function(t){e(t,i)}),s}{let n=l.constructor;void 0!==t&&Object.defineProperty(l,i,t(i)),e?.(n,i)}};function r(e,t){return o({descriptor:l=>{let i={get(){var t,l;return null!=(l=null==(t=this.renderRoot)?void 0:t.querySelector(e))?l:null},enumerable:!0,configurable:!0};if(t){let t="symbol"==typeof l?Symbol():"__"+l;i.get=function(){var l,i;return void 0===this[t]&&(this[t]=null!=(i=null==(l=this.renderRoot)?void 0:l.querySelector(e))?i:null),this[t]}}return i}})}var d,c=(null==(d=window.HTMLSlotElement)?void 0:d.prototype.assignedElements)!=null?(e,t)=>e.assignedElements(t):(e,t)=>e.assignedNodes(t).filter(e=>e.nodeType===Node.ELEMENT_NODE);function a(e){let{slot:t,selector:l}=e??{};return o({descriptor:i=>({get(){var i;let n="slot"+(t?`[name=${t}]`:":not([name])"),s=null==(i=this.renderRoot)?void 0:i.querySelector(n),o=null!=s?c(s,e):[];return l?o.filter(e=>e.matches(l)):o},enumerable:!0,configurable:!0})})}},41088:(e,t,l)=>{l.d(t,{a:()=>i});var i={bubbles:!0,cancelable:!1,composed:!0}},46745:(e,t,l)=>{l.r(t),l.d(t,{GdsSegmentedControlGroup:()=>c});var i=l(41088),n=l(24291),s=l(85065),o=l(40629),r=l(11598),d=(0,o.b)` 2 :host { 3 display: block; 4 width: 100%; 5 max-width: 100%; 6 } 7 8 div { 9 display: grid; 10 grid-auto-flow: column; 11 grid-template-columns: repeat(var(--child-count, 5), 1fr); 12 gap: var(--seg-control-external-gap); 13 width: 100%; 14 max-width: 100%; 15 min-width: 0; 16 align-items: stretch; 17 grid-auto-rows: auto; 18 } 19 20 ::slotted(gds-segmented-control) { 21 width: 100%; 22 min-width: 0; 23 align-self: stretch; 24 box-sizing: border-box; 25 height: 100%; 26 } 27`,c=class extends o.g{constructor(){super(...arguments),this.selectionMode="single"}connectedCallback(){super.connectedCallback(),this.updatePositions(),this.addEventListener("segment-click",this.handleChildClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("segment-click",this.handleChildClick)}firstUpdated(){this.updatePositions(),this.resolveSelectionConflicts()}render(){return(0,o.c)` 28 <div> 29 <slot @slotchange="${this.updatePositions}"></slot> 30 </div> 31 `}handleChildClick(e){let t=e.detail.element;"single"===this.selectionMode?this.querySelectorAll("gds-segmented-control").forEach(e=>{e.selected=e===t}):t.selected=!t.selected,setTimeout(()=>{let e=Array.from(this.querySelectorAll("gds-segmented-control[selected]"));this.dispatchEvent(new CustomEvent("segment-selection-change",{detail:{selectedControls:e},...i.a}))},0)}resolveSelectionConflicts(){if("single"!==this.selectionMode)return;let e=Array.from(this.querySelectorAll("gds-segmented-control")),t=e.filter(e=>e.selected);if(t.length>1){let l=t[t.length-1];e.forEach(e=>{e.selected=e===l}),setTimeout(()=>{this.dispatchEvent(new CustomEvent("segment-selection-change",{detail:{selectedControls:[l]},...i.a}))},0)}}updatePositions(){let e=Array.from(this.querySelectorAll("gds-segmented-control"));this.style.setProperty("--child-count",e.length.toString()),e.forEach((t,l)=>{t.classList.remove("first","middle","last"),e.length>1&&(0===l?t.classList.add("first"):l===e.length-1?t.classList.add("last"):t.classList.add("middle"))}),"single"===this.selectionMode&&this.resolveSelectionConflicts()}};c.styles=d,(0,r.c)([(0,n.b)({type:String,reflect:!0,attribute:"selection-mode"})],c.prototype,"selectionMode",2),c=(0,r.c)([(0,s.a)("gds-segmented-control-group")],c),l(8802)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.